1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791247922479324794247952479624797247982479924800248012480224803248042480524806248072480824809248102481124812248132481424815248162481724818248192482024821248222482324824248252482624827248282482924830248312483224833248342483524836248372483824839248402484124842248432484424845248462484724848248492485024851248522485324854248552485624857248582485924860248612486224863248642486524866248672486824869248702487124872248732487424875248762487724878248792488024881248822488324884248852488624887248882488924890248912489224893248942489524896248972489824899249002490124902249032490424905249062490724908249092491024911249122491324914249152491624917249182491924920249212492224923249242492524926249272492824929249302493124932249332493424935249362493724938249392494024941249422494324944249452494624947249482494924950249512495224953249542495524956249572495824959249602496124962249632496424965249662496724968249692497024971249722497324974249752497624977249782497924980249812498224983249842498524986249872498824989249902499124992249932499424995249962499724998249992500025001250022500325004250052500625007250082500925010250112501225013250142501525016250172501825019250202502125022250232502425025250262502725028250292503025031250322503325034250352503625037250382503925040250412504225043250442504525046250472504825049250502505125052250532505425055250562505725058250592506025061250622506325064250652506625067250682506925070250712507225073250742507525076250772507825079250802508125082250832508425085250862508725088250892509025091250922509325094250952509625097250982509925100251012510225103251042510525106251072510825109251102511125112251132511425115251162511725118251192512025121251222512325124251252512625127251282512925130251312513225133251342513525136251372513825139251402514125142251432514425145251462514725148251492515025151251522515325154251552515625157251582515925160251612516225163251642516525166251672516825169251702517125172251732517425175251762517725178251792518025181251822518325184251852518625187251882518925190251912519225193251942519525196251972519825199252002520125202252032520425205252062520725208252092521025211252122521325214252152521625217252182521925220252212522225223252242522525226252272522825229252302523125232252332523425235252362523725238252392524025241252422524325244252452524625247252482524925250252512525225253252542525525256252572525825259252602526125262252632526425265252662526725268252692527025271252722527325274252752527625277252782527925280252812528225283252842528525286252872528825289252902529125292252932529425295252962529725298252992530025301253022530325304253052530625307253082530925310253112531225313253142531525316253172531825319253202532125322253232532425325253262532725328253292533025331253322533325334253352533625337253382533925340253412534225343253442534525346253472534825349253502535125352253532535425355253562535725358253592536025361253622536325364253652536625367253682536925370253712537225373253742537525376253772537825379253802538125382253832538425385253862538725388253892539025391253922539325394253952539625397253982539925400254012540225403254042540525406254072540825409254102541125412254132541425415254162541725418254192542025421254222542325424254252542625427254282542925430254312543225433254342543525436254372543825439254402544125442254432544425445254462544725448254492545025451254522545325454254552545625457254582545925460254612546225463254642546525466254672546825469254702547125472254732547425475254762547725478254792548025481254822548325484254852548625487254882548925490254912549225493254942549525496254972549825499255002550125502255032550425505255062550725508255092551025511255122551325514255152551625517255182551925520255212552225523255242552525526255272552825529255302553125532255332553425535255362553725538255392554025541255422554325544255452554625547255482554925550255512555225553255542555525556255572555825559255602556125562255632556425565255662556725568255692557025571255722557325574255752557625577255782557925580255812558225583255842558525586255872558825589255902559125592255932559425595255962559725598255992560025601256022560325604256052560625607256082560925610256112561225613256142561525616256172561825619256202562125622256232562425625256262562725628256292563025631256322563325634256352563625637256382563925640256412564225643256442564525646256472564825649256502565125652256532565425655256562565725658256592566025661256622566325664256652566625667256682566925670256712567225673256742567525676256772567825679256802568125682256832568425685256862568725688256892569025691256922569325694256952569625697256982569925700257012570225703257042570525706257072570825709257102571125712257132571425715257162571725718257192572025721257222572325724257252572625727257282572925730257312573225733257342573525736257372573825739257402574125742257432574425745257462574725748257492575025751257522575325754257552575625757257582575925760257612576225763257642576525766257672576825769257702577125772257732577425775257762577725778257792578025781257822578325784257852578625787257882578925790257912579225793257942579525796257972579825799258002580125802258032580425805258062580725808258092581025811258122581325814258152581625817258182581925820258212582225823258242582525826258272582825829258302583125832258332583425835258362583725838258392584025841258422584325844258452584625847258482584925850258512585225853258542585525856258572585825859258602586125862258632586425865258662586725868258692587025871258722587325874258752587625877258782587925880258812588225883258842588525886258872588825889258902589125892258932589425895258962589725898258992590025901259022590325904259052590625907259082590925910259112591225913259142591525916259172591825919259202592125922259232592425925259262592725928259292593025931259322593325934259352593625937259382593925940259412594225943259442594525946259472594825949259502595125952259532595425955259562595725958259592596025961259622596325964259652596625967259682596925970259712597225973259742597525976259772597825979259802598125982259832598425985259862598725988259892599025991259922599325994259952599625997259982599926000260012600226003260042600526006260072600826009260102601126012260132601426015260162601726018260192602026021260222602326024260252602626027260282602926030260312603226033260342603526036260372603826039260402604126042260432604426045260462604726048260492605026051260522605326054260552605626057260582605926060260612606226063260642606526066260672606826069260702607126072260732607426075260762607726078260792608026081260822608326084260852608626087260882608926090260912609226093260942609526096260972609826099261002610126102261032610426105261062610726108261092611026111261122611326114261152611626117261182611926120261212612226123261242612526126261272612826129261302613126132261332613426135261362613726138261392614026141261422614326144261452614626147261482614926150261512615226153261542615526156261572615826159261602616126162261632616426165261662616726168261692617026171261722617326174261752617626177261782617926180261812618226183261842618526186261872618826189261902619126192261932619426195261962619726198261992620026201262022620326204262052620626207262082620926210262112621226213262142621526216262172621826219262202622126222262232622426225262262622726228262292623026231262322623326234262352623626237262382623926240262412624226243262442624526246262472624826249262502625126252262532625426255262562625726258262592626026261262622626326264262652626626267262682626926270262712627226273262742627526276262772627826279262802628126282262832628426285262862628726288262892629026291262922629326294262952629626297262982629926300263012630226303263042630526306263072630826309263102631126312263132631426315263162631726318263192632026321263222632326324263252632626327263282632926330263312633226333263342633526336263372633826339263402634126342263432634426345263462634726348263492635026351263522635326354263552635626357263582635926360263612636226363263642636526366263672636826369263702637126372263732637426375263762637726378263792638026381263822638326384263852638626387263882638926390263912639226393263942639526396263972639826399264002640126402264032640426405264062640726408264092641026411264122641326414264152641626417264182641926420264212642226423264242642526426264272642826429264302643126432264332643426435264362643726438264392644026441264422644326444264452644626447264482644926450264512645226453264542645526456264572645826459264602646126462264632646426465264662646726468264692647026471264722647326474264752647626477264782647926480264812648226483264842648526486264872648826489264902649126492264932649426495264962649726498264992650026501265022650326504265052650626507265082650926510265112651226513265142651526516265172651826519265202652126522265232652426525265262652726528265292653026531265322653326534265352653626537265382653926540265412654226543265442654526546265472654826549265502655126552265532655426555265562655726558265592656026561265622656326564265652656626567265682656926570265712657226573265742657526576265772657826579265802658126582265832658426585265862658726588265892659026591265922659326594265952659626597265982659926600266012660226603266042660526606266072660826609266102661126612266132661426615266162661726618266192662026621266222662326624266252662626627266282662926630266312663226633266342663526636266372663826639266402664126642266432664426645266462664726648266492665026651266522665326654266552665626657266582665926660266612666226663266642666526666266672666826669266702667126672266732667426675266762667726678266792668026681266822668326684266852668626687266882668926690266912669226693266942669526696266972669826699267002670126702267032670426705267062670726708267092671026711267122671326714267152671626717267182671926720267212672226723267242672526726267272672826729267302673126732267332673426735267362673726738267392674026741267422674326744267452674626747267482674926750267512675226753267542675526756267572675826759267602676126762267632676426765267662676726768267692677026771267722677326774267752677626777267782677926780267812678226783267842678526786267872678826789267902679126792267932679426795267962679726798267992680026801268022680326804268052680626807268082680926810268112681226813268142681526816268172681826819268202682126822268232682426825268262682726828268292683026831268322683326834268352683626837268382683926840268412684226843268442684526846268472684826849268502685126852268532685426855268562685726858268592686026861268622686326864268652686626867268682686926870268712687226873268742687526876268772687826879268802688126882268832688426885268862688726888268892689026891268922689326894268952689626897268982689926900269012690226903269042690526906269072690826909269102691126912269132691426915269162691726918269192692026921269222692326924269252692626927269282692926930269312693226933269342693526936269372693826939269402694126942269432694426945269462694726948269492695026951269522695326954269552695626957269582695926960269612696226963269642696526966269672696826969269702697126972269732697426975269762697726978269792698026981269822698326984269852698626987269882698926990269912699226993269942699526996269972699826999270002700127002270032700427005270062700727008270092701027011270122701327014270152701627017270182701927020270212702227023270242702527026270272702827029270302703127032270332703427035270362703727038270392704027041270422704327044270452704627047270482704927050270512705227053270542705527056270572705827059270602706127062270632706427065270662706727068270692707027071270722707327074270752707627077270782707927080270812708227083270842708527086270872708827089270902709127092270932709427095270962709727098270992710027101271022710327104271052710627107271082710927110271112711227113271142711527116271172711827119271202712127122271232712427125271262712727128271292713027131271322713327134271352713627137271382713927140271412714227143271442714527146271472714827149271502715127152271532715427155271562715727158271592716027161271622716327164271652716627167271682716927170271712717227173271742717527176271772717827179271802718127182271832718427185271862718727188271892719027191271922719327194271952719627197271982719927200272012720227203272042720527206272072720827209272102721127212272132721427215272162721727218272192722027221272222722327224272252722627227272282722927230272312723227233272342723527236272372723827239272402724127242272432724427245272462724727248272492725027251272522725327254272552725627257272582725927260272612726227263272642726527266272672726827269272702727127272272732727427275272762727727278272792728027281272822728327284272852728627287272882728927290272912729227293272942729527296272972729827299273002730127302273032730427305273062730727308273092731027311273122731327314273152731627317273182731927320273212732227323273242732527326273272732827329273302733127332273332733427335273362733727338273392734027341273422734327344273452734627347273482734927350273512735227353273542735527356273572735827359273602736127362273632736427365273662736727368273692737027371273722737327374273752737627377273782737927380273812738227383273842738527386273872738827389273902739127392273932739427395273962739727398273992740027401274022740327404274052740627407274082740927410274112741227413274142741527416274172741827419274202742127422274232742427425274262742727428274292743027431274322743327434274352743627437274382743927440 |
- import { ref as Le, reactive as z0, nextTick as go, openBlock as Je, createElementBlock as qe, normalizeStyle as lr, createElementVNode as hr, toDisplayString as yn, unref as X0, createCommentVNode as qn, createTextVNode as Qp, Fragment as il, renderList as rl, normalizeClass as G0, defineCustomElement as tu } from "vue";
- const mo = {
- //图表配置
- chart: {
- spacingTop: 30,
- backgroundColor: "rgba(0,0,0,0)"
- },
- title: {
- enabled: !1
- },
- exporting: {
- enabled: !1
- },
- boost: {
- useGPUTranslations: !0
- },
- //默认颜色配置
- colors: [
- "#00f",
- "#f00",
- "#999",
- "#000",
- "#7cb5ec",
- "#90ed7d",
- "#f7a35c",
- "#8085e9",
- "#f15c80",
- "#e4d354",
- "#2b908f",
- "#f45b5b",
- "#91e8e1"
- ],
- //版权信息
- credits: { enabled: !1 },
- //数据列通用配置
- plotOptions: {
- series: {
- turboThreshold: 0,
- //不限制数据点个数
- boostThreshold: 0,
- dataGrouping: {
- enabled: !1
- },
- //取消数据大自动数据合并
- animation: {
- duration: 1e3
- }
- },
- areaspline: {
- lineWidth: 1,
- stacking: "normal",
- marker: {
- enabled: !1
- }
- // fillOpacity: 0.5,
- },
- column: {
- pointPadding: 0.05,
- stacking: "normal"
- },
- scatter: {
- turboThreshold: 0,
- marker: {
- symbol: "circle",
- radius: 5,
- states: {
- hover: {
- enabled: !0
- }
- }
- },
- states: {
- hover: {
- marker: {
- enabled: !0
- }
- }
- }
- }
- },
- //范围选择器
- rangeSelector: {
- enabled: !1,
- selected: 2
- },
- //悬浮提示框
- tooltip: {
- split: !1,
- shared: !0,
- dateTimeLabelFormats: {
- // 时间格式化字符
- day: "%Y/%m/%d",
- week: "%Y/%m",
- month: "%Y/%m",
- year: "%Y/%m"
- },
- xDateFormat: "%Y/%m/%d",
- className: "chart-tooltips-box"
- // formatter:function(e){
- // return `<p>${this.x}</p><p>aaa</p>`
- // // return e
- // }
- // outside: true,
- // valueDecimals: 4,
- },
- //图例
- legend: {
- enabled: !0,
- verticalAlign: "top",
- margin: 3
- // layout: 'vertical'
- },
- //滚动条
- scrollbar: {
- enabled: !1
- },
- //导航器
- navigator: {
- enabled: !1
- },
- //范围选择器
- rangeSelector: {
- enabled: !1
- },
- xAxis: {
- tickPosition: "inside",
- lineColor: "#bfbfbf",
- tickColor: "#bfbfbf",
- tickLength: 5,
- type: "datetime",
- ordinal: !1,
- dateTimeLabelFormats: {
- day: "%y/%m",
- week: "%y/%m",
- month: "%y/%m",
- year: "%y/%m"
- }
- // gridLineWidth:0
- }
- }, H0 = {
- //默认颜色配置
- colors: ["#4B0082", "#7FFFAA", "#FF4500", "#808000", "#EEE8AA", "#849EC1", "#8A4294", "#578B5A", "#FDA8C7", "#53B3FF", "#999999", "#000000", "#FFDF0C", "#FF0000", "#0033FF"],
- yAxis: {
- lineWidth: 1,
- lineColor: "#bfbfbf",
- tickColor: "#bfbfbf",
- offset: 0,
- opposite: !1,
- reversed: !1,
- visible: !0,
- gridLineWidth: 0,
- tickWidth: 1,
- tickLength: 5,
- tickPosition: "inside",
- endOnTick: !1,
- startOnTick: !1,
- showLastLabel: !0,
- //显示最后刻度值
- tickPixelInterval: 50
- }
- }, wn = {
- tickPosition: "inside",
- lineColor: "#bfbfbf",
- tickColor: "#bfbfbf",
- tickLength: 5,
- ordinal: !1,
- type: "linear"
- }, gr = {
- tickWidth: 1,
- tickLength: 5,
- lineWidth: 1,
- lineColor: "#bfbfbf",
- tickColor: "#bfbfbf",
- // offset: 0,
- visible: !0,
- gridLineWidth: 0,
- tickPosition: "inside",
- endOnTick: !1,
- startOnTick: !1,
- showLastLabel: !0,
- tickPixelInterval: 50
- }, eu = {
- tickPosition: "inside",
- lineColor: "#bfbfbf",
- tickColor: "#bfbfbf",
- tickLength: 5,
- type: "datetime",
- ordinal: !1,
- dateTimeLabelFormats: {
- day: "%y/%m",
- week: "%y/%m",
- month: "%y/%m",
- year: "%y/%m"
- },
- xDateFormat: "%Y-%m-%d"
- }, F0 = {
- 年: "Y",
- 季: "Q",
- 月: "M",
- 周: "W",
- 天: "D"
- }, Lp = {
- 年: "Year",
- 季: "Season",
- 月: "Month",
- 周: "Week",
- 天: "Day"
- };
- var Gr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
- function Cn(r) {
- return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
- }
- var iu = { exports: {} };
- (function(r) {
- (function(p, M) {
- r.exports ? (M.default = M, r.exports = p.document ? M(p) : M) : (p.Highcharts && p.Highcharts.error(16, !0), p.Highcharts = M(p));
- })(typeof window < "u" ? window : Gr, function(p) {
- function M(y, N, D, U) {
- y.hasOwnProperty(N) || (y[N] = U.apply(null, D));
- }
- var o = {};
- return M(o, "Core/Globals.js", [], function() {
- var y = typeof p < "u" ? p : typeof window < "u" ? window : {}, N;
- return function(D) {
- D.SVG_NS = "http://www.w3.org/2000/svg", D.product = "Highcharts", D.version = "9.3.3", D.win = y, D.doc = D.win.document, D.svg = D.doc && D.doc.createElementNS && !!D.doc.createElementNS(D.SVG_NS, "svg").createSVGRect, D.userAgent = D.win.navigator && D.win.navigator.userAgent || "", D.isChrome = D.userAgent.indexOf("Chrome") !== -1, D.isFirefox = D.userAgent.indexOf("Firefox") !== -1, D.isMS = /(edge|msie|trident)/i.test(D.userAgent) && !D.win.opera, D.isSafari = !D.isChrome && D.userAgent.indexOf("Safari") !== -1, D.isTouchDevice = /(Mobile|Android|Windows Phone)/.test(D.userAgent), D.isWebKit = D.userAgent.indexOf("AppleWebKit") !== -1, D.deg2rad = 2 * Math.PI / 360, D.hasBidiBug = D.isFirefox && 4 > parseInt(D.userAgent.split("Firefox/")[1], 10), D.hasTouch = !!D.win.TouchEvent, D.marginNames = ["plotTop", "marginRight", "marginBottom", "plotLeft"], D.noop = function() {
- }, D.supportsPassiveEvents = function() {
- var U = !1;
- if (!D.isMS) {
- var H = Object.defineProperty({}, "passive", { get: function() {
- U = !0;
- } });
- D.win.addEventListener && D.win.removeEventListener && (D.win.addEventListener(
- "testPassive",
- D.noop,
- H
- ), D.win.removeEventListener("testPassive", D.noop, H));
- }
- return U;
- }(), D.charts = [], D.dateFormats = {}, D.seriesTypes = {}, D.symbolSizes = {}, D.chartCount = 0;
- }(N || (N = {})), N;
- }), M(o, "Core/Utilities.js", [o["Core/Globals.js"]], function(y) {
- function N(t, s, n, P) {
- var _ = s ? "Highcharts error" : "Highcharts warning";
- t === 32 && (t = _ + ": Deprecated member");
- var I = S(t), W = I ? _ + " #" + t + ": www.highcharts.com/errors/" + t + "/" : t.toString();
- if (typeof P < "u") {
- var E = "";
- I && (W += "?"), b(P, function(X, g) {
- E += `
- - ` + g + ": " + X, I && (W += encodeURI(g) + "=" + encodeURI(X));
- }), W += E;
- }
- v(y, "displayError", { chart: n, code: t, message: W, params: P }, function() {
- if (s)
- throw Error(W);
- u.console && N.messages.indexOf(W) === -1 && console.warn(W);
- }), N.messages.push(W);
- }
- function D(t, s) {
- var n = {};
- return b(t, function(P, _) {
- G(t[_], !0) && !t.nodeType && s[_] ? (P = D(t[_], s[_]), Object.keys(P).length && (n[_] = P)) : (G(t[_]) || t[_] !== s[_]) && (n[_] = t[_]);
- }), n;
- }
- function U(t, s) {
- return parseInt(t, s || 10);
- }
- function H(t) {
- return typeof t == "string";
- }
- function V(t) {
- return t = Object.prototype.toString.call(t), t === "[object Array]" || t === "[object Array Iterator]";
- }
- function G(t, s) {
- return !!t && typeof t == "object" && (!s || !V(t));
- }
- function R(t) {
- return G(t) && typeof t.nodeType == "number";
- }
- function B(t) {
- var s = t && t.constructor;
- return !(!G(t, !0) || R(t) || !s || !s.name || s.name === "Object");
- }
- function S(t) {
- return typeof t == "number" && !isNaN(t) && 1 / 0 > t && -1 / 0 < t;
- }
- function x(t) {
- return typeof t < "u" && t !== null;
- }
- function f(t, s, n) {
- var P;
- return H(s) ? x(n) ? t.setAttribute(s, n) : t && t.getAttribute && ((P = t.getAttribute(s)) || s !== "class" || (P = t.getAttribute(s + "Name"))) : b(s, function(_, I) {
- x(_) ? t.setAttribute(I, _) : t.removeAttribute(I);
- }), P;
- }
- function d(t, s) {
- var n;
- t || (t = {});
- for (n in s)
- t[n] = s[n];
- return t;
- }
- function T() {
- for (var t = arguments, s = t.length, n = 0; n < s; n++) {
- var P = t[n];
- if (typeof P < "u" && P !== null)
- return P;
- }
- }
- function O(t, s) {
- y.isMS && !y.svg && s && typeof s.opacity < "u" && (s.filter = "alpha(opacity=" + 100 * s.opacity + ")"), d(t.style, s);
- }
- function j(t, s) {
- return 1e14 < t ? t : parseFloat(t.toPrecision(s || 14));
- }
- function k(t, s, n) {
- var P = y.getStyle || k;
- if (s === "width")
- return s = Math.min(t.offsetWidth, t.scrollWidth), n = t.getBoundingClientRect && t.getBoundingClientRect().width, n < s && n >= s - 1 && (s = Math.floor(n)), Math.max(0, s - (P(t, "padding-left", !0) || 0) - (P(t, "padding-right", !0) || 0));
- if (s === "height")
- return Math.max(0, Math.min(t.offsetHeight, t.scrollHeight) - (P(t, "padding-top", !0) || 0) - (P(t, "padding-bottom", !0) || 0));
- if (u.getComputedStyle || N(27, !0), t = u.getComputedStyle(t, void 0)) {
- var _ = t.getPropertyValue(s);
- T(n, s !== "opacity") && (_ = U(_));
- }
- return _;
- }
- function b(t, s, n) {
- for (var P in t)
- Object.hasOwnProperty.call(t, P) && s.call(n || t[P], t[P], P, t);
- }
- function w(t, s, n) {
- function P(E, X) {
- var g = t.removeEventListener || y.removeEventListenerPolyfill;
- g && g.call(t, E, X, !1);
- }
- function _(E) {
- var X;
- if (t.nodeName) {
- if (s) {
- var g = {};
- g[s] = !0;
- } else
- g = E;
- b(g, function(m, L) {
- if (E[L])
- for (X = E[L].length; X--; )
- P(L, E[L][X].fn);
- });
- }
- }
- var I = typeof t == "function" && t.prototype || t;
- if (Object.hasOwnProperty.call(I, "hcEvents")) {
- var W = I.hcEvents;
- s ? (I = W[s] || [], n ? (W[s] = I.filter(function(E) {
- return n !== E.fn;
- }), P(s, n)) : (_(W), W[s] = [])) : (_(W), delete I.hcEvents);
- }
- }
- function v(t, s, n, P) {
- if (n = n || {}, h.createEvent && (t.dispatchEvent || t.fireEvent && t !== y)) {
- var _ = h.createEvent("Events");
- _.initEvent(s, !0, !0), n = d(_, n), t.dispatchEvent ? t.dispatchEvent(n) : t.fireEvent(s, n);
- } else if (t.hcEvents) {
- n.target || d(n, { preventDefault: function() {
- n.defaultPrevented = !0;
- }, target: t, type: s }), _ = [];
- for (var I = t, W = !1; I.hcEvents; )
- Object.hasOwnProperty.call(I, "hcEvents") && I.hcEvents[s] && (_.length && (W = !0), _.unshift.apply(_, I.hcEvents[s])), I = Object.getPrototypeOf(I);
- W && _.sort(function(E, X) {
- return E.order - X.order;
- }), _.forEach(function(E) {
- E.fn.call(t, n) === !1 && n.preventDefault();
- });
- }
- P && !n.defaultPrevented && P.call(t, n);
- }
- var l = y.charts, h = y.doc, u = y.win;
- (N || (N = {})).messages = [], Math.easeInOutSine = function(t) {
- return -0.5 * (Math.cos(Math.PI * t) - 1);
- };
- var i = Array.prototype.find ? function(t, s) {
- return t.find(s);
- } : function(t, s) {
- var n, P = t.length;
- for (n = 0; n < P; n++)
- if (s(t[n], n))
- return t[n];
- };
- b({ map: "map", each: "forEach", grep: "filter", reduce: "reduce", some: "some" }, function(t, s) {
- y[s] = function(n) {
- var P;
- return N(32, !1, void 0, (P = {}, P["Highcharts." + s] = "use Array." + t, P)), Array.prototype[t].apply(n, [].slice.call(arguments, 1));
- };
- });
- var c, a = function() {
- var t = Math.random().toString(36).substring(2, 9) + "-", s = 0;
- return function() {
- return "highcharts-" + (c ? "" : t) + s++;
- };
- }();
- return u.jQuery && (u.jQuery.fn.highcharts = function() {
- var t = [].slice.call(arguments);
- if (this[0])
- return t[0] ? (new y[H(t[0]) ? t.shift() : "Chart"](this[0], t[0], t[1]), this) : l[f(this[0], "data-highcharts-chart")];
- }), i = { addEvent: function(t, s, n, P) {
- P === void 0 && (P = {});
- var _ = typeof t == "function" && t.prototype || t;
- Object.hasOwnProperty.call(_, "hcEvents") || (_.hcEvents = {}), _ = _.hcEvents, y.Point && t instanceof y.Point && t.series && t.series.chart && (t.series.chart.runTrackerClick = !0);
- var I = t.addEventListener || y.addEventListenerPolyfill;
- return I && I.call(t, s, n, y.supportsPassiveEvents ? { passive: P.passive === void 0 ? s.indexOf("touch") !== -1 : P.passive, capture: !1 } : !1), _[s] || (_[s] = []), _[s].push({ fn: n, order: typeof P.order == "number" ? P.order : 1 / 0 }), _[s].sort(function(W, E) {
- return W.order - E.order;
- }), function() {
- w(t, s, n);
- };
- }, arrayMax: function(t) {
- for (var s = t.length, n = t[0]; s--; )
- t[s] > n && (n = t[s]);
- return n;
- }, arrayMin: function(t) {
- for (var s = t.length, n = t[0]; s--; )
- t[s] < n && (n = t[s]);
- return n;
- }, attr: f, clamp: function(t, s, n) {
- return t > s ? t < n ? t : n : s;
- }, cleanRecursively: D, clearTimeout: function(t) {
- x(t) && clearTimeout(t);
- }, correctFloat: j, createElement: function(t, s, n, P, _) {
- return t = h.createElement(t), s && d(t, s), _ && O(t, { padding: "0", border: "none", margin: "0" }), n && O(t, n), P && P.appendChild(t), t;
- }, css: O, defined: x, destroyObjectProperties: function(t, s) {
- b(t, function(n, P) {
- n && n !== s && n.destroy && n.destroy(), delete t[P];
- });
- }, discardElement: function(t) {
- t && t.parentElement && t.parentElement.removeChild(t);
- }, erase: function(t, s) {
- for (var n = t.length; n--; )
- if (t[n] === s) {
- t.splice(n, 1);
- break;
- }
- }, error: N, extend: d, extendClass: function(t, s) {
- var n = function() {
- };
- return n.prototype = new t(), d(n.prototype, s), n;
- }, find: i, fireEvent: v, getMagnitude: function(t) {
- return Math.pow(10, Math.floor(Math.log(t) / Math.LN10));
- }, getNestedProperty: function(t, s) {
- for (t = t.split("."); t.length && x(s); ) {
- var n = t.shift();
- if (typeof n > "u" || n === "__proto__" || (s = s[n], !x(s) || typeof s == "function" || typeof s.nodeType == "number" || s === u))
- return;
- }
- return s;
- }, getStyle: k, inArray: function(t, s, n) {
- return N(32, !1, void 0, { "Highcharts.inArray": "use Array.indexOf" }), s.indexOf(t, n);
- }, isArray: V, isClass: B, isDOMElement: R, isFunction: function(t) {
- return typeof t == "function";
- }, isNumber: S, isObject: G, isString: H, keys: function(t) {
- return N(32, !1, void 0, { "Highcharts.keys": "use Object.keys" }), Object.keys(t);
- }, merge: function() {
- var t, s = arguments, n = {}, P = function(I, W) {
- return typeof I != "object" && (I = {}), b(W, function(E, X) {
- X !== "__proto__" && X !== "constructor" && (!G(E, !0) || B(E) || R(E) ? I[X] = W[X] : I[X] = P(I[X] || {}, E));
- }), I;
- };
- s[0] === !0 && (n = s[1], s = Array.prototype.slice.call(s, 2));
- var _ = s.length;
- for (t = 0; t < _; t++)
- n = P(n, s[t]);
- return n;
- }, normalizeTickInterval: function(t, s, n, P, _) {
- var I = t;
- n = T(n, 1);
- var W = t / n;
- for (s || (s = _ ? [1, 1.2, 1.5, 2, 2.5, 3, 4, 5, 6, 8, 10] : [1, 2, 2.5, 5, 10], P === !1 && (n === 1 ? s = s.filter(function(E) {
- return E % 1 === 0;
- }) : 0.1 >= n && (s = [1 / n]))), P = 0; P < s.length && (I = s[P], !(_ && I * n >= t || !_ && W <= (s[P] + (s[P + 1] || s[P])) / 2)); P++)
- ;
- return I = j(I * n, -Math.round(Math.log(1e-3) / Math.LN10));
- }, objectEach: b, offset: function(t) {
- var s = h.documentElement;
- return t = t.parentElement || t.parentNode ? t.getBoundingClientRect() : { top: 0, left: 0, width: 0, height: 0 }, { top: t.top + (u.pageYOffset || s.scrollTop) - (s.clientTop || 0), left: t.left + (u.pageXOffset || s.scrollLeft) - (s.clientLeft || 0), width: t.width, height: t.height };
- }, pad: function(t, s, n) {
- return Array((s || 2) + 1 - String(t).replace("-", "").length).join(n || "0") + t;
- }, pick: T, pInt: U, relativeLength: function(t, s, n) {
- return /%$/.test(t) ? s * parseFloat(t) / 100 + (n || 0) : parseFloat(t);
- }, removeEvent: w, splat: function(t) {
- return V(t) ? t : [t];
- }, stableSort: function(t, s) {
- var n = t.length, P, _;
- for (_ = 0; _ < n; _++)
- t[_].safeI = _;
- for (t.sort(function(I, W) {
- return P = s(I, W), P === 0 ? I.safeI - W.safeI : P;
- }), _ = 0; _ < n; _++)
- delete t[_].safeI;
- }, syncTimeout: function(t, s, n) {
- return 0 < s ? setTimeout(t, s, n) : (t.call(0, n), -1);
- }, timeUnits: {
- millisecond: 1,
- second: 1e3,
- minute: 6e4,
- hour: 36e5,
- day: 864e5,
- week: 6048e5,
- month: 24192e5,
- year: 314496e5
- }, uniqueKey: a, useSerialIds: function(t) {
- return c = T(t, c);
- }, wrap: function(t, s, n) {
- var P = t[s];
- t[s] = function() {
- var _ = Array.prototype.slice.call(arguments), I = arguments, W = this;
- return W.proceed = function() {
- P.apply(W, arguments.length ? arguments : I);
- }, _.unshift(P), _ = n.apply(this, _), W.proceed = null, _;
- };
- } }, i;
- }), M(o, "Core/Chart/ChartDefaults.js", [], function() {
- return { panning: { enabled: !1, type: "x" }, styledMode: !1, borderRadius: 0, colorCount: 10, defaultSeriesType: "line", ignoreHiddenSeries: !0, spacing: [
- 10,
- 10,
- 15,
- 10
- ], resetZoomButton: { theme: { zIndex: 6 }, position: { align: "right", x: -10, y: 10 } }, zoomBySingleTouch: !1, width: null, height: null, borderColor: "#335cad", backgroundColor: "#ffffff", plotBorderColor: "#cccccc" };
- }), M(o, "Core/Color/Color.js", [o["Core/Globals.js"], o["Core/Utilities.js"]], function(y, N) {
- var D = N.isNumber, U = N.merge, H = N.pInt;
- return N = function() {
- function V(G) {
- this.rgba = [NaN, NaN, NaN, NaN], this.input = G;
- var R = y.Color;
- if (R && R !== V)
- return new R(G);
- if (!(this instanceof V))
- return new V(G);
- this.init(G);
- }
- return V.parse = function(G) {
- return G ? new V(G) : V.None;
- }, V.prototype.init = function(G) {
- var R;
- if (typeof G == "object" && typeof G.stops < "u")
- this.stops = G.stops.map(function(f) {
- return new V(f[1]);
- });
- else if (typeof G == "string") {
- if (this.input = G = V.names[G.toLowerCase()] || G, G.charAt(0) === "#") {
- var B = G.length, S = parseInt(G.substr(1), 16);
- B === 7 ? R = [(S & 16711680) >> 16, (S & 65280) >> 8, S & 255, 1] : B === 4 && (R = [(S & 3840) >> 4 | (S & 3840) >> 8, (S & 240) >> 4 | S & 240, (S & 15) << 4 | S & 15, 1]);
- }
- if (!R)
- for (S = V.parsers.length; S-- && !R; ) {
- var x = V.parsers[S];
- (B = x.regex.exec(G)) && (R = x.parse(B));
- }
- }
- R && (this.rgba = R);
- }, V.prototype.get = function(G) {
- var R = this.input, B = this.rgba;
- if (typeof R == "object" && typeof this.stops < "u") {
- var S = U(R);
- return S.stops = [].slice.call(S.stops), this.stops.forEach(function(x, f) {
- S.stops[f] = [S.stops[f][0], x.get(G)];
- }), S;
- }
- return B && D(B[0]) ? G === "rgb" || !G && B[3] === 1 ? "rgb(" + B[0] + "," + B[1] + "," + B[2] + ")" : G === "a" ? "" + B[3] : "rgba(" + B.join(",") + ")" : R;
- }, V.prototype.brighten = function(G) {
- var R = this.rgba;
- if (this.stops)
- this.stops.forEach(function(S) {
- S.brighten(G);
- });
- else if (D(G) && G !== 0)
- for (var B = 0; 3 > B; B++)
- R[B] += H(255 * G), 0 > R[B] && (R[B] = 0), 255 < R[B] && (R[B] = 255);
- return this;
- }, V.prototype.setOpacity = function(G) {
- return this.rgba[3] = G, this;
- }, V.prototype.tweenTo = function(G, R) {
- var B = this.rgba, S = G.rgba;
- return !D(B[0]) || !D(S[0]) ? G.input || "none" : (G = S[3] !== 1 || B[3] !== 1, (G ? "rgba(" : "rgb(") + Math.round(S[0] + (B[0] - S[0]) * (1 - R)) + "," + Math.round(S[1] + (B[1] - S[1]) * (1 - R)) + "," + Math.round(S[2] + (B[2] - S[2]) * (1 - R)) + (G ? "," + (S[3] + (B[3] - S[3]) * (1 - R)) : "") + ")");
- }, V.names = { white: "#ffffff", black: "#000000" }, V.parsers = [{
- regex: /rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/,
- parse: function(G) {
- return [H(G[1]), H(G[2]), H(G[3]), parseFloat(G[4], 10)];
- }
- }, { regex: /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/, parse: function(G) {
- return [H(G[1]), H(G[2]), H(G[3]), 1];
- } }], V.None = new V(""), V;
- }(), N;
- }), M(o, "Core/Color/Palettes.js", [], function() {
- return { colors: "#7cb5ec #434348 #90ed7d #f7a35c #8085e9 #f15c80 #e4d354 #2b908f #f45b5b #91e8e1".split(" ") };
- }), M(o, "Core/Time.js", [o["Core/Globals.js"], o["Core/Utilities.js"]], function(y, N) {
- var D = y.win, U = N.defined, H = N.error, V = N.extend, G = N.isObject, R = N.merge, B = N.objectEach, S = N.pad, x = N.pick, f = N.splat, d = N.timeUnits, T = y.isSafari && D.Intl && D.Intl.DateTimeFormat.prototype.formatRange, O = y.isSafari && D.Intl && !D.Intl.DateTimeFormat.prototype.formatRange;
- return N = function() {
- function j(k) {
- this.options = {}, this.variableTimezone = this.useUTC = !1, this.Date = D.Date, this.getTimezoneOffset = this.timezoneOffsetFunction(), this.update(k);
- }
- return j.prototype.get = function(k, b) {
- if (this.variableTimezone || this.timezoneOffset) {
- var w = b.getTime(), v = w - this.getTimezoneOffset(b);
- return b.setTime(v), k = b["getUTC" + k](), b.setTime(w), k;
- }
- return this.useUTC ? b["getUTC" + k]() : b["get" + k]();
- }, j.prototype.set = function(k, b, w) {
- if (this.variableTimezone || this.timezoneOffset) {
- if (k === "Milliseconds" || k === "Seconds" || k === "Minutes" && this.getTimezoneOffset(b) % 36e5 === 0)
- return b["setUTC" + k](w);
- var v = this.getTimezoneOffset(b);
- return v = b.getTime() - v, b.setTime(v), b["setUTC" + k](w), k = this.getTimezoneOffset(b), v = b.getTime() + k, b.setTime(v);
- }
- return this.useUTC || T && k === "FullYear" ? b["setUTC" + k](w) : b["set" + k](w);
- }, j.prototype.update = function(k) {
- var b = x(k && k.useUTC, !0);
- this.options = k = R(!0, this.options || {}, k), this.Date = k.Date || D.Date || Date, this.timezoneOffset = (this.useUTC = b) && k.timezoneOffset, this.getTimezoneOffset = this.timezoneOffsetFunction(), this.variableTimezone = b && !(!k.getTimezoneOffset && !k.timezone);
- }, j.prototype.makeTime = function(k, b, w, v, l, h) {
- if (this.useUTC) {
- var u = this.Date.UTC.apply(0, arguments), i = this.getTimezoneOffset(u);
- u += i;
- var c = this.getTimezoneOffset(u);
- i !== c ? u += c - i : i - 36e5 !== this.getTimezoneOffset(u - 36e5) || O || (u -= 36e5);
- } else
- u = new this.Date(k, b, x(w, 1), x(v, 0), x(l, 0), x(h, 0)).getTime();
- return u;
- }, j.prototype.timezoneOffsetFunction = function() {
- var k = this, b = this.options, w = b.getTimezoneOffset, v = b.moment || D.moment;
- if (!this.useUTC)
- return function(l) {
- return 6e4 * new Date(l.toString()).getTimezoneOffset();
- };
- if (b.timezone) {
- if (v)
- return function(l) {
- return 6e4 * -v.tz(l, b.timezone).utcOffset();
- };
- H(25);
- }
- return this.useUTC && w ? function(l) {
- return 6e4 * w(l.valueOf());
- } : function() {
- return 6e4 * (k.timezoneOffset || 0);
- };
- }, j.prototype.dateFormat = function(k, b, w) {
- if (!U(b) || isNaN(b))
- return y.defaultOptions.lang && y.defaultOptions.lang.invalidDate || "";
- k = x(k, "%Y-%m-%d %H:%M:%S");
- var v = this, l = new this.Date(b), h = this.get("Hours", l), u = this.get("Day", l), i = this.get("Date", l), c = this.get("Month", l), a = this.get("FullYear", l), t = y.defaultOptions.lang, s = t && t.weekdays, n = t && t.shortWeekdays;
- return l = V({ a: n ? n[u] : s[u].substr(0, 3), A: s[u], d: S(i), e: S(i, 2, " "), w: u, b: t.shortMonths[c], B: t.months[c], m: S(c + 1), o: c + 1, y: a.toString().substr(2, 2), Y: a, H: S(h), k: h, I: S(h % 12 || 12), l: h % 12 || 12, M: S(this.get("Minutes", l)), p: 12 > h ? "AM" : "PM", P: 12 > h ? "am" : "pm", S: S(l.getSeconds()), L: S(Math.floor(b % 1e3), 3) }, y.dateFormats), B(l, function(P, _) {
- for (; k.indexOf("%" + _) !== -1; )
- k = k.replace("%" + _, typeof P == "function" ? P.call(v, b) : P);
- }), w ? k.substr(0, 1).toUpperCase() + k.substr(1) : k;
- }, j.prototype.resolveDTLFormat = function(k) {
- return G(k, !0) ? k : (k = f(k), { main: k[0], from: k[1], to: k[2] });
- }, j.prototype.getTimeTicks = function(k, b, w, v) {
- var l = this, h = [], u = {}, i = new l.Date(b), c = k.unitRange, a = k.count || 1, t;
- if (v = x(v, 1), U(b)) {
- if (l.set(
- "Milliseconds",
- i,
- c >= d.second ? 0 : a * Math.floor(l.get("Milliseconds", i) / a)
- ), c >= d.second && l.set("Seconds", i, c >= d.minute ? 0 : a * Math.floor(l.get("Seconds", i) / a)), c >= d.minute && l.set("Minutes", i, c >= d.hour ? 0 : a * Math.floor(l.get("Minutes", i) / a)), c >= d.hour && l.set("Hours", i, c >= d.day ? 0 : a * Math.floor(l.get("Hours", i) / a)), c >= d.day && l.set("Date", i, c >= d.month ? 1 : Math.max(1, a * Math.floor(l.get("Date", i) / a))), c >= d.month) {
- l.set("Month", i, c >= d.year ? 0 : a * Math.floor(l.get("Month", i) / a));
- var s = l.get("FullYear", i);
- }
- c >= d.year && l.set(
- "FullYear",
- i,
- s - s % a
- ), c === d.week && (s = l.get("Day", i), l.set("Date", i, l.get("Date", i) - s + v + (s < v ? -7 : 0))), s = l.get("FullYear", i), v = l.get("Month", i);
- var n = l.get("Date", i), P = l.get("Hours", i);
- for (b = i.getTime(), !l.variableTimezone && l.useUTC || !U(w) || (t = w - b > 4 * d.month || l.getTimezoneOffset(b) !== l.getTimezoneOffset(w)), b = i.getTime(), i = 1; b < w; )
- h.push(b), b = c === d.year ? l.makeTime(s + i * a, 0) : c === d.month ? l.makeTime(s, v + i * a) : !t || c !== d.day && c !== d.week ? t && c === d.hour && 1 < a ? l.makeTime(s, v, n, P + i * a) : b + c * a : l.makeTime(s, v, n + i * a * (c === d.day ? 1 : 7)), i++;
- h.push(b), c <= d.hour && 1e4 > h.length && h.forEach(function(_) {
- _ % 18e5 === 0 && l.dateFormat("%H%M%S%L", _) === "000000000" && (u[_] = "day");
- });
- }
- return h.info = V(k, { higherRanks: u, totalRange: c * a }), h;
- }, j.prototype.getDateFormat = function(k, b, w, v) {
- var l = this.dateFormat("%m-%d %H:%M:%S.%L", b), h = { millisecond: 15, second: 12, minute: 9, hour: 6, day: 3 }, u = "millisecond";
- for (i in d) {
- if (k === d.week && +this.dateFormat("%w", b) === w && l.substr(6) === "00:00:00.000") {
- var i = "week";
- break;
- }
- if (d[i] > k) {
- i = u;
- break;
- }
- if (h[i] && l.substr(h[i]) !== "01-01 00:00:00.000".substr(h[i]))
- break;
- i !== "week" && (u = i);
- }
- if (i)
- var c = this.resolveDTLFormat(v[i]).main;
- return c;
- }, j;
- }(), N;
- }), M(o, "Core/DefaultOptions.js", [o["Core/Chart/ChartDefaults.js"], o["Core/Color/Color.js"], o["Core/Globals.js"], o["Core/Color/Palettes.js"], o["Core/Time.js"], o["Core/Utilities.js"]], function(y, N, D, U, H, V) {
- N = N.parse;
- var G = V.merge, R = {
- colors: U.colors,
- symbols: ["circle", "diamond", "square", "triangle", "triangle-down"],
- lang: {
- loading: "Loading...",
- months: "January February March April May June July August September October November December".split(" "),
- shortMonths: "Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),
- weekdays: "Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),
- decimalPoint: ".",
- numericSymbols: "kMGTPE".split(""),
- resetZoom: "Reset zoom",
- resetZoomTitle: "Reset zoom level 1:1",
- thousandsSep: " "
- },
- global: {},
- time: { Date: void 0, getTimezoneOffset: void 0, timezone: void 0, timezoneOffset: 0, useUTC: !0 },
- chart: y,
- title: { text: "Chart title", align: "center", margin: 15, widthAdjust: -44 },
- subtitle: { text: "", align: "center", widthAdjust: -44 },
- caption: { margin: 15, text: "", align: "left", verticalAlign: "bottom" },
- plotOptions: {},
- labels: { style: { position: "absolute", color: "#333333" } },
- legend: {
- enabled: !0,
- align: "center",
- alignColumns: !0,
- className: "highcharts-no-tooltip",
- layout: "horizontal",
- labelFormatter: function() {
- return this.name;
- },
- borderColor: "#999999",
- borderRadius: 0,
- navigation: { activeColor: "#003399", inactiveColor: "#cccccc" },
- itemStyle: { color: "#333333", cursor: "pointer", fontSize: "12px", fontWeight: "bold", textOverflow: "ellipsis" },
- itemHoverStyle: { color: "#000000" },
- itemHiddenStyle: { color: "#cccccc" },
- shadow: !1,
- itemCheckboxStyle: { position: "absolute", width: "13px", height: "13px" },
- squareSymbol: !0,
- symbolPadding: 5,
- verticalAlign: "bottom",
- x: 0,
- y: 0,
- title: { style: { fontWeight: "bold" } }
- },
- loading: { labelStyle: { fontWeight: "bold", position: "relative", top: "45%" }, style: { position: "absolute", backgroundColor: "#ffffff", opacity: 0.5, textAlign: "center" } },
- tooltip: {
- enabled: !0,
- animation: D.svg,
- borderRadius: 3,
- dateTimeLabelFormats: {
- millisecond: "%A, %b %e, %H:%M:%S.%L",
- second: "%A, %b %e, %H:%M:%S",
- minute: "%A, %b %e, %H:%M",
- hour: "%A, %b %e, %H:%M",
- day: "%A, %b %e, %Y",
- week: "Week from %A, %b %e, %Y",
- month: "%B %Y",
- year: "%Y"
- },
- footerFormat: "",
- headerShape: "callout",
- hideDelay: 500,
- padding: 8,
- shape: "callout",
- shared: !1,
- snap: D.isTouchDevice ? 25 : 10,
- headerFormat: '<span style="font-size: 10px">{point.key}</span><br/>',
- pointFormat: '<span style="color:{point.color}">●</span> {series.name}: <b>{point.y}</b><br/>',
- backgroundColor: N("#f7f7f7").setOpacity(0.85).get(),
- borderWidth: 1,
- shadow: !0,
- stickOnContact: !1,
- style: { color: "#333333", cursor: "default", fontSize: "12px", whiteSpace: "nowrap" },
- useHTML: !1
- },
- credits: { enabled: !0, href: "https://www.highcharts.com?credits", position: { align: "right", x: -10, verticalAlign: "bottom", y: -5 }, style: { cursor: "pointer", color: "#999999", fontSize: "9px" }, text: "Highcharts.com" }
- };
- R.chart.styledMode = !1;
- var B = new H(G(R.global, R.time));
- return y = { defaultOptions: R, defaultTime: B, getOptions: function() {
- return R;
- }, setOptions: function(S) {
- return G(!0, R, S), (S.time || S.global) && (D.time ? D.time.update(G(
- R.global,
- R.time,
- S.global,
- S.time
- )) : D.time = B), R;
- } }, y;
- }), M(o, "Core/Animation/Fx.js", [o["Core/Color/Color.js"], o["Core/Globals.js"], o["Core/Utilities.js"]], function(y, N, D) {
- var U = y.parse, H = N.win, V = D.isNumber, G = D.objectEach;
- return function() {
- function R(B, S, x) {
- this.pos = NaN, this.options = S, this.elem = B, this.prop = x;
- }
- return R.prototype.dSetter = function() {
- var B = this.paths, S = B && B[0];
- B = B && B[1];
- var x = this.now || 0, f = [];
- if (x !== 1 && S && B)
- if (S.length === B.length && 1 > x)
- for (var d = 0; d < B.length; d++) {
- for (var T = S[d], O = B[d], j = [], k = 0; k < O.length; k++) {
- var b = T[k], w = O[k];
- V(b) && V(w) && (O[0] !== "A" || k !== 4 && k !== 5) ? j[k] = b + x * (w - b) : j[k] = w;
- }
- f.push(j);
- }
- else
- f = B;
- else
- f = this.toD || [];
- this.elem.attr("d", f, void 0, !0);
- }, R.prototype.update = function() {
- var B = this.elem, S = this.prop, x = this.now, f = this.options.step;
- this[S + "Setter"] ? this[S + "Setter"]() : B.attr ? B.element && B.attr(S, x, null, !0) : B.style[S] = x + this.unit, f && f.call(B, x, this);
- }, R.prototype.run = function(B, S, x) {
- var f = this, d = f.options, T = function(k) {
- return T.stopped ? !1 : f.step(k);
- }, O = H.requestAnimationFrame || function(k) {
- setTimeout(
- k,
- 13
- );
- }, j = function() {
- for (var k = 0; k < R.timers.length; k++)
- R.timers[k]() || R.timers.splice(k--, 1);
- R.timers.length && O(j);
- };
- B !== S || this.elem["forceAnimate:" + this.prop] ? (this.startTime = +/* @__PURE__ */ new Date(), this.start = B, this.end = S, this.unit = x, this.now = this.start, this.pos = 0, T.elem = this.elem, T.prop = this.prop, T() && R.timers.push(T) === 1 && O(j)) : (delete d.curAnim[this.prop], d.complete && Object.keys(d.curAnim).length === 0 && d.complete.call(this.elem));
- }, R.prototype.step = function(B) {
- var S = +/* @__PURE__ */ new Date(), x = this.options, f = this.elem, d = x.complete, T = x.duration, O = x.curAnim;
- if (f.attr && !f.element)
- B = !1;
- else if (B || S >= T + this.startTime) {
- this.now = this.end, this.pos = 1, this.update();
- var j = O[this.prop] = !0;
- G(O, function(k) {
- k !== !0 && (j = !1);
- }), j && d && d.call(f), B = !1;
- } else
- this.pos = x.easing((S - this.startTime) / T), this.now = this.start + (this.end - this.start) * this.pos, this.update(), B = !0;
- return B;
- }, R.prototype.initPath = function(B, S, x) {
- function f(l, h) {
- for (; l.length < v; ) {
- var u = l[0], i = h[v - l.length];
- i && u[0] === "M" && (l[0] = i[0] === "C" ? ["C", u[1], u[2], u[1], u[2], u[1], u[2]] : [
- "L",
- u[1],
- u[2]
- ]), l.unshift(u), j && (u = l.pop(), l.push(l[l.length - 1], u));
- }
- }
- function d(l, h) {
- for (; l.length < v; )
- if (h = l[Math.floor(l.length / k) - 1].slice(), h[0] === "C" && (h[1] = h[5], h[2] = h[6]), j) {
- var u = l[Math.floor(l.length / k)].slice();
- l.splice(l.length / 2, 0, h, u);
- } else
- l.push(h);
- }
- var T = B.startX, O = B.endX;
- x = x.slice();
- var j = B.isArea, k = j ? 2 : 1;
- if (S = S && S.slice(), !S)
- return [x, x];
- if (T && O && O.length) {
- for (B = 0; B < T.length; B++)
- if (T[B] === O[0]) {
- var b = B;
- break;
- } else if (T[0] === O[O.length - T.length + B]) {
- b = B;
- var w = !0;
- break;
- } else if (T[T.length - 1] === O[O.length - T.length + B]) {
- b = T.length - B;
- break;
- }
- typeof b > "u" && (S = []);
- }
- if (S.length && V(b)) {
- var v = x.length + b * k;
- w ? (f(S, x), d(x, S)) : (f(x, S), d(S, x));
- }
- return [S, x];
- }, R.prototype.fillSetter = function() {
- R.prototype.strokeSetter.apply(this, arguments);
- }, R.prototype.strokeSetter = function() {
- this.elem.attr(this.prop, U(this.start).tweenTo(U(this.end), this.pos), void 0, !0);
- }, R.timers = [], R;
- }();
- }), M(o, "Core/Animation/AnimationUtilities.js", [o["Core/Animation/Fx.js"], o["Core/Utilities.js"]], function(y, N) {
- function D(d) {
- return B(d) ? S({ duration: 500, defer: 0 }, d) : { duration: d ? 500 : 0, defer: 0 };
- }
- function U(d, T) {
- for (var O = y.timers.length; O--; )
- y.timers[O].elem !== d || T && T !== y.timers[O].prop || (y.timers[O].stopped = !0);
- }
- var H = N.defined, V = N.getStyle, G = N.isArray, R = N.isNumber, B = N.isObject, S = N.merge, x = N.objectEach, f = N.pick;
- return { animate: function(d, T, O) {
- var j, k = "", b, w;
- if (!B(O)) {
- var v = arguments;
- O = { duration: v[2], easing: v[3], complete: v[4] };
- }
- R(O.duration) || (O.duration = 400), O.easing = typeof O.easing == "function" ? O.easing : Math[O.easing] || Math.easeInOutSine, O.curAnim = S(T), x(T, function(l, h) {
- U(d, h), w = new y(d, O, h), b = void 0, h === "d" && G(T.d) ? (w.paths = w.initPath(d, d.pathArray, T.d), w.toD = T.d, j = 0, b = 1) : d.attr ? j = d.attr(h) : (j = parseFloat(V(d, h)) || 0, h !== "opacity" && (k = "px")), b || (b = l), typeof b == "string" && b.match("px") && (b = b.replace(/px/g, "")), w.run(j, b, k);
- });
- }, animObject: D, getDeferredAnimation: function(d, T, O) {
- var j = D(T), k = 0, b = 0;
- return (O ? [O] : d.series).forEach(function(w) {
- w = D(w.options.animation), k = T && H(T.defer) ? j.defer : Math.max(k, w.duration + w.defer), b = Math.min(j.duration, w.duration);
- }), d.renderer.forExport && (k = 0), { defer: Math.max(0, k - b), duration: Math.min(k, b) };
- }, setAnimation: function(d, T) {
- T.renderer.globalAnimation = f(d, T.options.chart.animation, !0);
- }, stop: U };
- }), M(o, "Core/Renderer/HTML/AST.js", [o["Core/Globals.js"], o["Core/Utilities.js"]], function(y, N) {
- var D = y.SVG_NS, U = N.attr, H = N.createElement, V = N.error, G = N.isFunction, R = N.isString, B = N.objectEach, S = N.splat, x = (N = y.win.trustedTypes) && G(N.createPolicy) && N.createPolicy("highcharts", { createHTML: function(T) {
- return T;
- } }), f = x ? x.createHTML("") : "";
- try {
- var d = !!new DOMParser().parseFromString(f, "text/html");
- } catch {
- d = !1;
- }
- return G = function() {
- function T(O) {
- this.nodes = typeof O == "string" ? this.parseMarkup(O) : O;
- }
- return T.filterUserAttributes = function(O) {
- return B(O, function(j, k) {
- var b = !0;
- T.allowedAttributes.indexOf(k) === -1 && (b = !1), ["background", "dynsrc", "href", "lowsrc", "src"].indexOf(k) !== -1 && (b = R(j) && T.allowedReferences.some(function(w) {
- return j.indexOf(w) === 0;
- })), b || (V("Highcharts warning: Invalid attribute '" + k + "' in config"), delete O[k]);
- }), O;
- }, T.setElementHTML = function(O, j) {
- O.innerHTML = T.emptyHTML, j && new T(j).addToDOM(O);
- }, T.prototype.addToDOM = function(O) {
- function j(k, b) {
- var w;
- return S(k).forEach(function(v) {
- var l = v.tagName, h = v.textContent ? y.doc.createTextNode(v.textContent) : void 0;
- if (l)
- if (l === "#text")
- var u = h;
- else if (T.allowedTags.indexOf(l) !== -1) {
- l = y.doc.createElementNS(l === "svg" ? D : b.namespaceURI || D, l);
- var i = v.attributes || {};
- B(v, function(c, a) {
- a !== "tagName" && a !== "attributes" && a !== "children" && a !== "textContent" && (i[a] = c);
- }), U(l, T.filterUserAttributes(i)), h && l.appendChild(h), j(v.children || [], l), u = l;
- } else
- V("Highcharts warning: Invalid tagName " + l + " in config");
- u && b.appendChild(u), w = u;
- }), w;
- }
- return j(this.nodes, O);
- }, T.prototype.parseMarkup = function(O) {
- var j = [];
- if (O = O.trim(), d)
- O = new DOMParser().parseFromString(x ? x.createHTML(O) : O, "text/html");
- else {
- var k = H("div");
- k.innerHTML = O, O = { body: k };
- }
- var b = function(w, v) {
- var l = w.nodeName.toLowerCase(), h = { tagName: l };
- if (l === "#text" && (h.textContent = w.textContent || ""), l = w.attributes) {
- var u = {};
- [].forEach.call(l, function(c) {
- u[c.name] = c.value;
- }), h.attributes = u;
- }
- if (w.childNodes.length) {
- var i = [];
- [].forEach.call(w.childNodes, function(c) {
- b(c, i);
- }), i.length && (h.children = i);
- }
- v.push(h);
- };
- return [].forEach.call(O.body.childNodes, function(w) {
- return b(w, j);
- }), j;
- }, T.allowedAttributes = "aria-controls aria-describedby aria-expanded aria-haspopup aria-hidden aria-label aria-labelledby aria-live aria-pressed aria-readonly aria-roledescription aria-selected class clip-path color colspan cx cy d dx dy disabled fill height href id in markerHeight markerWidth offset opacity orient padding paddingLeft paddingRight patternUnits r refX refY role scope slope src startOffset stdDeviation stroke stroke-linecap stroke-width style tableValues result rowspan summary target tabindex text-align textAnchor textLength title type valign width x x1 x2 y y1 y2 zIndex".split(" "), T.allowedReferences = "https:// http:// mailto: / ../ ./ #".split(" "), T.allowedTags = "a abbr b br button caption circle clipPath code dd defs div dl dt em feComponentTransfer feFuncA feFuncB feFuncG feFuncR feGaussianBlur feOffset feMerge feMergeNode filter h1 h2 h3 h4 h5 h6 hr i img li linearGradient marker ol p path pattern pre rect small span stop strong style sub sup svg table text thead tbody tspan td th tr u ul #text".split(" "), T.emptyHTML = f, T;
- }(), G;
- }), M(
- o,
- "Core/FormatUtilities.js",
- [o["Core/DefaultOptions.js"], o["Core/Utilities.js"]],
- function(y, N) {
- function D(S, x, f, d) {
- S = +S || 0, x = +x;
- var T = U.lang, O = (S.toString().split(".")[1] || "").split("e")[0].length, j = S.toString().split("e"), k = x;
- if (x === -1)
- x = Math.min(O, 20);
- else if (!G(x))
- x = 2;
- else if (x && j[1] && 0 > j[1]) {
- var b = x + +j[1];
- 0 <= b ? (j[0] = (+j[0]).toExponential(b).split("e")[0], x = b) : (j[0] = j[0].split(".")[0] || 0, S = 20 > x ? (j[0] * Math.pow(10, j[1])).toFixed(x) : 0, j[1] = 0);
- }
- b = (Math.abs(j[1] ? j[0] : S) + Math.pow(10, -Math.max(x, O) - 1)).toFixed(x), O = String(B(b));
- var w = 3 < O.length ? O.length % 3 : 0;
- return f = R(f, T.decimalPoint), d = R(d, T.thousandsSep), S = (0 > S ? "-" : "") + (w ? O.substr(0, w) + d : ""), S = 0 > +j[1] && !k ? "0" : S + O.substr(w).replace(/(\d{3})(?=\d)/g, "$1" + d), x && (S += f + b.slice(-x)), j[1] && +S != 0 && (S += "e" + j[1]), S;
- }
- var U = y.defaultOptions, H = y.defaultTime, V = N.getNestedProperty, G = N.isNumber, R = N.pick, B = N.pInt;
- return { dateFormat: function(S, x, f) {
- return H.dateFormat(S, x, f);
- }, format: function(S, x, f) {
- var d = "{", T = !1, O = /f$/, j = /\.([0-9])/, k = U.lang, b = f && f.time || H;
- f = f && f.numberFormatter || D;
- for (var w = []; S; ) {
- var v = S.indexOf(d);
- if (v === -1)
- break;
- var l = S.slice(0, v);
- if (T) {
- if (l = l.split(":"), d = V(l.shift() || "", x), l.length && typeof d == "number")
- if (l = l.join(":"), O.test(l)) {
- var h = parseInt((l.match(j) || ["", "-1"])[1], 10);
- d !== null && (d = f(d, h, k.decimalPoint, -1 < l.indexOf(",") ? k.thousandsSep : ""));
- } else
- d = b.dateFormat(l, d);
- w.push(d);
- } else
- w.push(l);
- S = S.slice(v + 1), d = (T = !T) ? "}" : "{";
- }
- return w.push(S), w.join("");
- }, numberFormat: D };
- }
- ), M(o, "Core/Renderer/RendererUtilities.js", [o["Core/Utilities.js"]], function(y) {
- var N = y.clamp, D = y.pick, U = y.stableSort, H;
- return function(V) {
- function G(R, B, S) {
- var x = R, f = x.reducedLen || B, d = function(w, v) {
- return (v.rank || 0) - (w.rank || 0);
- }, T = function(w, v) {
- return w.target - v.target;
- }, O, j = !0, k = [], b = 0;
- for (O = R.length; O--; )
- b += R[O].size;
- if (b > f) {
- for (U(R, d), b = O = 0; b <= f; )
- b += R[O].size, O++;
- k = R.splice(O - 1, R.length);
- }
- for (U(R, T), R = R.map(function(w) {
- return { size: w.size, targets: [w.target], align: D(w.align, 0.5) };
- }); j; ) {
- for (O = R.length; O--; )
- f = R[O], d = (Math.min.apply(0, f.targets) + Math.max.apply(0, f.targets)) / 2, f.pos = N(
- d - f.size * f.align,
- 0,
- B - f.size
- );
- for (O = R.length, j = !1; O--; )
- 0 < O && R[O - 1].pos + R[O - 1].size > R[O].pos && (R[O - 1].size += R[O].size, R[O - 1].targets = R[O - 1].targets.concat(R[O].targets), R[O - 1].align = 0.5, R[O - 1].pos + R[O - 1].size > B && (R[O - 1].pos = B - R[O - 1].size), R.splice(O, 1), j = !0);
- }
- return x.push.apply(x, k), O = 0, R.some(function(w) {
- var v = 0;
- return (w.targets || []).some(function() {
- return x[O].pos = w.pos + v, typeof S < "u" && Math.abs(x[O].pos - x[O].target) > S ? (x.slice(0, O + 1).forEach(function(l) {
- return delete l.pos;
- }), x.reducedLen = (x.reducedLen || B) - 0.1 * B, x.reducedLen > 0.1 * B && G(x, B, S), !0) : (v += x[O].size, O++, !1);
- });
- }), U(x, T), x;
- }
- V.distribute = G;
- }(H || (H = {})), H;
- }), M(o, "Core/Renderer/SVG/SVGElement.js", [o["Core/Animation/AnimationUtilities.js"], o["Core/Renderer/HTML/AST.js"], o["Core/Color/Color.js"], o["Core/Globals.js"], o["Core/Utilities.js"]], function(y, N, D, U, H) {
- var V = y.animate, G = y.animObject, R = y.stop, B = U.deg2rad, S = U.doc, x = U.noop, f = U.svg, d = U.SVG_NS, T = U.win, O = H.addEvent, j = H.attr, k = H.createElement, b = H.css, w = H.defined, v = H.erase, l = H.extend, h = H.fireEvent, u = H.isArray, i = H.isFunction, c = H.isNumber, a = H.isString, t = H.merge, s = H.objectEach, n = H.pick, P = H.pInt, _ = H.syncTimeout, I = H.uniqueKey;
- return y = function() {
- function W() {
- this.element = void 0, this.onEvents = {}, this.opacity = 1, this.renderer = void 0, this.SVG_NS = d, this.symbolCustomAttribs = "x y width height r start end innerR anchorX anchorY rounded".split(" ");
- }
- return W.prototype._defaultGetter = function(E) {
- return E = n(this[E + "Value"], this[E], this.element ? this.element.getAttribute(E) : null, 0), /^[\-0-9\.]+$/.test(E) && (E = parseFloat(E)), E;
- }, W.prototype._defaultSetter = function(E, X, g) {
- g.setAttribute(X, E);
- }, W.prototype.add = function(E) {
- var X = this.renderer, g = this.element;
- if (E && (this.parentGroup = E), this.parentInverted = E && E.inverted, typeof this.textStr < "u" && this.element.nodeName === "text" && X.buildText(this), this.added = !0, !E || E.handleZ || this.zIndex)
- var m = this.zIndexSetter();
- return m || (E ? E.element : X.box).appendChild(g), this.onAdd && this.onAdd(), this;
- }, W.prototype.addClass = function(E, X) {
- var g = X ? "" : this.attr("class") || "";
- return E = (E || "").split(/ /g).reduce(function(m, L) {
- return g.indexOf(L) === -1 && m.push(L), m;
- }, g ? [g] : []).join(" "), E !== g && this.attr("class", E), this;
- }, W.prototype.afterSetters = function() {
- this.doTransform && (this.updateTransform(), this.doTransform = !1);
- }, W.prototype.align = function(E, X, g) {
- var m = {}, L = this.renderer, z = L.alignedObjects, $, Q, A;
- E ? (this.alignOptions = E, this.alignByTranslate = X, (!g || a(g)) && (this.alignTo = $ = g || "renderer", v(z, this), z.push(this), g = void 0)) : (E = this.alignOptions, X = this.alignByTranslate, $ = this.alignTo), g = n(g, L[$], $ === "scrollablePlotBox" ? L.plotBox : void 0, L), $ = E.align;
- var F = E.verticalAlign;
- return L = (g.x || 0) + (E.x || 0), z = (g.y || 0) + (E.y || 0), $ === "right" ? Q = 1 : $ === "center" && (Q = 2), Q && (L += (g.width - (E.width || 0)) / Q), m[X ? "translateX" : "x"] = Math.round(L), F === "bottom" ? A = 1 : F === "middle" && (A = 2), A && (z += (g.height - (E.height || 0)) / A), m[X ? "translateY" : "y"] = Math.round(z), this[this.placed ? "animate" : "attr"](m), this.placed = !0, this.alignAttr = m, this;
- }, W.prototype.alignSetter = function(E) {
- var X = { left: "start", center: "middle", right: "end" };
- X[E] && (this.alignValue = E, this.element.setAttribute(
- "text-anchor",
- X[E]
- ));
- }, W.prototype.animate = function(E, X, g) {
- var m = this, L = G(n(X, this.renderer.globalAnimation, !0));
- return X = L.defer, n(S.hidden, S.msHidden, S.webkitHidden, !1) && (L.duration = 0), L.duration !== 0 ? (g && (L.complete = g), _(function() {
- m.element && V(m, E, L);
- }, X)) : (this.attr(E, void 0, g), s(E, function(z, $) {
- L.step && L.step.call(this, z, { prop: $, pos: 1, elem: this });
- }, this)), this;
- }, W.prototype.applyTextOutline = function(E) {
- var X = this.element;
- E.indexOf("contrast") !== -1 && (E = E.replace(/contrast/g, this.renderer.getContrast(X.style.fill)));
- var g = E.split(" ");
- if (E = g[g.length - 1], (g = g[0]) && g !== "none" && U.svg) {
- this.fakeTS = !0, this.ySetter = this.xSetter, g = g.replace(/(^[\d\.]+)(.*?)$/g, function(z, $, Q) {
- return 2 * Number($) + Q;
- }), this.removeTextOutline();
- var m = S.createElementNS(d, "tspan");
- j(m, { class: "highcharts-text-outline", fill: E, stroke: E, "stroke-width": g, "stroke-linejoin": "round" }), [].forEach.call(X.childNodes, function(z) {
- var $ = z.cloneNode(!0);
- $.removeAttribute && ["fill", "stroke", "stroke-width", "stroke"].forEach(function(Q) {
- return $.removeAttribute(Q);
- }), m.appendChild($);
- });
- var L = S.createElementNS(d, "tspan");
- L.textContent = "", ["x", "y"].forEach(function(z) {
- var $ = X.getAttribute(z);
- $ && L.setAttribute(z, $);
- }), m.appendChild(L), X.insertBefore(m, X.firstChild);
- }
- }, W.prototype.attr = function(E, X, g, m) {
- var L = this.element, z = this.symbolCustomAttribs, $, Q = this, A, F;
- if (typeof E == "string" && typeof X < "u") {
- var Y = E;
- E = {}, E[Y] = X;
- }
- return typeof E == "string" ? Q = (this[E + "Getter"] || this._defaultGetter).call(this, E, L) : (s(E, function(Z, q) {
- A = !1, m || R(this, q), this.symbolName && z.indexOf(q) !== -1 && ($ || (this.symbolAttr(E), $ = !0), A = !0), !this.rotation || q !== "x" && q !== "y" || (this.doTransform = !0), A || (F = this[q + "Setter"] || this._defaultSetter, F.call(this, Z, q, L), !this.styledMode && this.shadows && /^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(q) && this.updateShadows(q, Z, F));
- }, this), this.afterSetters()), g && g.call(this), Q;
- }, W.prototype.clip = function(E) {
- return this.attr("clip-path", E ? "url(" + this.renderer.url + "#" + E.id + ")" : "none");
- }, W.prototype.crisp = function(E, X) {
- X = X || E.strokeWidth || 0;
- var g = Math.round(X) % 2 / 2;
- return E.x = Math.floor(E.x || this.x || 0) + g, E.y = Math.floor(E.y || this.y || 0) + g, E.width = Math.floor((E.width || this.width || 0) - 2 * g), E.height = Math.floor((E.height || this.height || 0) - 2 * g), w(E.strokeWidth) && (E.strokeWidth = X), E;
- }, W.prototype.complexColor = function(E, X, g) {
- var m = this.renderer, L, z, $, Q, A, F, Y, Z, q, it, et = [], nt;
- h(this.renderer, "complexColor", { args: arguments }, function() {
- if (E.radialGradient ? z = "radialGradient" : E.linearGradient && (z = "linearGradient"), z) {
- if ($ = E[z], A = m.gradients, F = E.stops, q = g.radialReference, u($) && (E[z] = $ = { x1: $[0], y1: $[1], x2: $[2], y2: $[3], gradientUnits: "userSpaceOnUse" }), z === "radialGradient" && q && !w($.gradientUnits) && (Q = $, $ = t($, m.getRadialAttr(q, Q), { gradientUnits: "userSpaceOnUse" })), s($, function(ct, gt) {
- gt !== "id" && et.push(gt, ct);
- }), s(F, function(ct) {
- et.push(ct);
- }), et = et.join(","), A[et])
- it = A[et].attr("id");
- else {
- $.id = it = I();
- var rt = A[et] = m.createElement(z).attr($).add(m.defs);
- rt.radAttr = Q, rt.stops = [], F.forEach(function(ct) {
- ct[1].indexOf("rgba") === 0 ? (L = D.parse(ct[1]), Y = L.get("rgb"), Z = L.get("a")) : (Y = ct[1], Z = 1), ct = m.createElement("stop").attr({
- offset: ct[0],
- "stop-color": Y,
- "stop-opacity": Z
- }).add(rt), rt.stops.push(ct);
- });
- }
- nt = "url(" + m.url + "#" + it + ")", g.setAttribute(X, nt), g.gradient = et, E.toString = function() {
- return nt;
- };
- }
- });
- }, W.prototype.css = function(E) {
- var X = this.styles, g = {}, m = this.element, L = ["textOutline", "textOverflow", "width"], z = "", $ = !X;
- if (E && E.color && (E.fill = E.color), X && s(E, function(F, Y) {
- X && X[Y] !== F && (g[Y] = F, $ = !0);
- }), $) {
- if (X && (E = l(X, g)), E) {
- if (E.width === null || E.width === "auto")
- delete this.textWidth;
- else if (m.nodeName.toLowerCase() === "text" && E.width)
- var Q = this.textWidth = P(E.width);
- }
- if (this.styles = E, Q && !f && this.renderer.forExport && delete E.width, m.namespaceURI === this.SVG_NS) {
- var A = function(F, Y) {
- return "-" + Y.toLowerCase();
- };
- s(E, function(F, Y) {
- L.indexOf(Y) === -1 && (z += Y.replace(/([A-Z])/g, A) + ":" + F + ";");
- }), z && j(m, "style", z);
- } else
- b(m, E);
- this.added && (this.element.nodeName === "text" && this.renderer.buildText(this), E && E.textOutline && this.applyTextOutline(E.textOutline));
- }
- return this;
- }, W.prototype.dashstyleSetter = function(E) {
- var X = this["stroke-width"];
- if (X === "inherit" && (X = 1), E = E && E.toLowerCase()) {
- var g = E.replace("shortdashdotdot", "3,1,1,1,1,1,").replace("shortdashdot", "3,1,1,1").replace("shortdot", "1,1,").replace("shortdash", "3,1,").replace("longdash", "8,3,").replace(/dot/g, "1,3,").replace("dash", "4,3,").replace(/,$/, "").split(",");
- for (E = g.length; E--; )
- g[E] = "" + P(g[E]) * n(X, NaN);
- E = g.join(",").replace(/NaN/g, "none"), this.element.setAttribute("stroke-dasharray", E);
- }
- }, W.prototype.destroy = function() {
- var E = this, X = E.element || {}, g = E.renderer, m = X.ownerSVGElement, L = g.isSVG && X.nodeName === "SPAN" && E.parentGroup || void 0;
- if (X.onclick = X.onmouseout = X.onmouseover = X.onmousemove = X.point = null, R(E), E.clipPath && m) {
- var z = E.clipPath;
- [].forEach.call(m.querySelectorAll("[clip-path],[CLIP-PATH]"), function($) {
- -1 < $.getAttribute("clip-path").indexOf(z.element.id) && $.removeAttribute("clip-path");
- }), E.clipPath = z.destroy();
- }
- if (E.stops) {
- for (m = 0; m < E.stops.length; m++)
- E.stops[m].destroy();
- E.stops.length = 0, E.stops = void 0;
- }
- for (E.safeRemoveChild(X), g.styledMode || E.destroyShadows(); L && L.div && L.div.childNodes.length === 0; )
- X = L.parentGroup, E.safeRemoveChild(L.div), delete L.div, L = X;
- E.alignTo && v(g.alignedObjects, E), s(E, function($, Q) {
- E[Q] && E[Q].parentGroup === E && E[Q].destroy && E[Q].destroy(), delete E[Q];
- });
- }, W.prototype.destroyShadows = function() {
- (this.shadows || []).forEach(function(E) {
- this.safeRemoveChild(E);
- }, this), this.shadows = void 0;
- }, W.prototype.destroyTextPath = function(E, X) {
- var g = E.getElementsByTagName("text")[0];
- if (g) {
- if (g.removeAttribute("dx"), g.removeAttribute("dy"), X.element.setAttribute("id", ""), this.textPathWrapper && g.getElementsByTagName("textPath").length) {
- for (E = this.textPathWrapper.element.childNodes; E.length; )
- g.appendChild(E[0]);
- g.removeChild(this.textPathWrapper.element);
- }
- } else
- (E.getAttribute("dx") || E.getAttribute("dy")) && (E.removeAttribute("dx"), E.removeAttribute("dy"));
- this.textPathWrapper && (this.textPathWrapper = this.textPathWrapper.destroy());
- }, W.prototype.dSetter = function(E, X, g) {
- u(E) && (typeof E[0] == "string" && (E = this.renderer.pathToSegments(E)), this.pathArray = E, E = E.reduce(function(m, L, z) {
- return L && L.join ? (z ? m + " " : "") + L.join(" ") : (L || "").toString();
- }, "")), /(NaN| {2}|^$)/.test(E) && (E = "M 0 0"), this[X] !== E && (g.setAttribute(X, E), this[X] = E);
- }, W.prototype.fadeOut = function(E) {
- var X = this;
- X.animate({ opacity: 0 }, { duration: n(E, 150), complete: function() {
- X.attr({ y: -9999 }).hide();
- } });
- }, W.prototype.fillSetter = function(E, X, g) {
- typeof E == "string" ? g.setAttribute(X, E) : E && this.complexColor(E, X, g);
- }, W.prototype.getBBox = function(E, X) {
- var g = this.renderer, m = this.element, L = this.styles, z = this.textStr, $ = g.cache, Q = g.cacheKeys, A = m.namespaceURI === this.SVG_NS;
- X = n(X, this.rotation, 0);
- var F = g.styledMode ? m && W.prototype.getStyle.call(m, "font-size") : L && L.fontSize, Y;
- if (w(z)) {
- var Z = z.toString();
- Z.indexOf("<") === -1 && (Z = Z.replace(/[0-9]/g, "0")), Z += ["", X, F, this.textWidth, L && L.textOverflow, L && L.fontWeight].join();
- }
- if (Z && !E && (Y = $[Z]), !Y) {
- if (A || g.forExport) {
- try {
- var q = this.fakeTS && function(it) {
- var et = m.querySelector(".highcharts-text-outline");
- et && b(et, { display: it });
- };
- i(q) && q("none"), Y = m.getBBox ? l({}, m.getBBox()) : { width: m.offsetWidth, height: m.offsetHeight }, i(q) && q("");
- } catch {
- }
- (!Y || 0 > Y.width) && (Y = {
- width: 0,
- height: 0
- });
- } else
- Y = this.htmlGetBBox();
- if (g.isSVG && (E = Y.width, g = Y.height, A && (Y.height = g = { "11px,17": 14, "13px,20": 16 }[(F || "") + "," + Math.round(g)] || g), X && (A = X * B, Y.width = Math.abs(g * Math.sin(A)) + Math.abs(E * Math.cos(A)), Y.height = Math.abs(g * Math.cos(A)) + Math.abs(E * Math.sin(A)))), Z && (z === "" || 0 < Y.height)) {
- for (; 250 < Q.length; )
- delete $[Q.shift()];
- $[Z] || Q.push(Z), $[Z] = Y;
- }
- }
- return Y;
- }, W.prototype.getStyle = function(E) {
- return T.getComputedStyle(this.element || this, "").getPropertyValue(E);
- }, W.prototype.hasClass = function(E) {
- return ("" + this.attr("class")).split(" ").indexOf(E) !== -1;
- }, W.prototype.hide = function(E) {
- return E ? this.attr({ y: -9999 }) : this.attr({ visibility: "hidden" }), this;
- }, W.prototype.htmlGetBBox = function() {
- return { height: 0, width: 0, x: 0, y: 0 };
- }, W.prototype.init = function(E, X) {
- this.element = X === "span" ? k(X) : S.createElementNS(this.SVG_NS, X), this.renderer = E, h(this, "afterInit");
- }, W.prototype.invert = function(E) {
- return this.inverted = E, this.updateTransform(), this;
- }, W.prototype.on = function(E, X) {
- var g = this.onEvents;
- return g[E] && g[E](), g[E] = O(
- this.element,
- E,
- X
- ), this;
- }, W.prototype.opacitySetter = function(E, X, g) {
- this.opacity = E = Number(Number(E).toFixed(3)), g.setAttribute(X, E);
- }, W.prototype.removeClass = function(E) {
- return this.attr("class", ("" + this.attr("class")).replace(a(E) ? new RegExp("(^| )" + E + "( |$)") : E, " ").replace(/ +/g, " ").trim());
- }, W.prototype.removeTextOutline = function() {
- var E = this.element.querySelector("tspan.highcharts-text-outline");
- E && this.safeRemoveChild(E);
- }, W.prototype.safeRemoveChild = function(E) {
- var X = E.parentNode;
- X && X.removeChild(E);
- }, W.prototype.setRadialReference = function(E) {
- var X = this.element.gradient && this.renderer.gradients[this.element.gradient];
- return this.element.radialReference = E, X && X.radAttr && X.animate(this.renderer.getRadialAttr(E, X.radAttr)), this;
- }, W.prototype.setTextPath = function(E, X) {
- var g = this.element, m = this.text ? this.text.element : g, L = { textAnchor: "text-anchor" }, z = !1, $ = this.textPathWrapper, Q = !$;
- X = t(!0, { enabled: !0, attributes: { dy: -5, startOffset: "50%", textAnchor: "middle" } }, X);
- var A = N.filterUserAttributes(X.attributes);
- if (E && X && X.enabled) {
- $ && $.element.parentNode === null ? (Q = !0, $ = $.destroy()) : $ && this.removeTextOutline.call($.parentGroup), this.options && this.options.padding && (A.dx = -this.options.padding), $ || (this.textPathWrapper = $ = this.renderer.createElement("textPath"), z = !0);
- var F = $.element;
- if ((X = E.element.getAttribute("id")) || E.element.setAttribute("id", X = I()), Q)
- for (m.setAttribute("y", 0), c(A.dx) && m.setAttribute("x", -A.dx), E = [].slice.call(m.childNodes), Q = 0; Q < E.length; Q++) {
- var Y = E[Q];
- Y.nodeType !== T.Node.TEXT_NODE && Y.nodeName !== "tspan" || F.appendChild(Y);
- }
- z && $ && $.add({ element: m }), F.setAttributeNS("http://www.w3.org/1999/xlink", "href", this.renderer.url + "#" + X), w(A.dy) && (F.parentNode.setAttribute("dy", A.dy), delete A.dy), w(A.dx) && (F.parentNode.setAttribute("dx", A.dx), delete A.dx), s(A, function(Z, q) {
- F.setAttribute(L[q] || q, Z);
- }), g.removeAttribute("transform"), this.removeTextOutline.call($), this.text && !this.renderer.styledMode && this.attr({ fill: "none", "stroke-width": 0 }), this.applyTextOutline = this.updateTransform = x;
- } else
- $ && (delete this.updateTransform, delete this.applyTextOutline, this.destroyTextPath(g, E), this.updateTransform(), this.options && this.options.rotation && this.applyTextOutline(this.options.style.textOutline));
- return this;
- }, W.prototype.shadow = function(E, X, g) {
- var m = [], L = this.element, z = this.oldShadowOptions, $ = { color: "#000000", offsetX: this.parentInverted ? -1 : 1, offsetY: this.parentInverted ? -1 : 1, opacity: 0.15, width: 3 }, Q = !1, A;
- if (E === !0 ? A = $ : typeof E == "object" && (A = l($, E)), A && (A && z && s(A, function(it, et) {
- it !== z[et] && (Q = !0);
- }), Q && this.destroyShadows(), this.oldShadowOptions = A), !A)
- this.destroyShadows();
- else if (!this.shadows) {
- var F = A.opacity / A.width, Y = this.parentInverted ? "translate(" + A.offsetY + ", " + A.offsetX + ")" : "translate(" + A.offsetX + ", " + A.offsetY + ")";
- for ($ = 1; $ <= A.width; $++) {
- var Z = L.cloneNode(!1), q = 2 * A.width + 1 - 2 * $;
- j(Z, { stroke: E.color || "#000000", "stroke-opacity": F * $, "stroke-width": q, transform: Y, fill: "none" }), Z.setAttribute("class", (Z.getAttribute("class") || "") + " highcharts-shadow"), g && (j(Z, "height", Math.max(j(Z, "height") - q, 0)), Z.cutHeight = q), X ? X.element.appendChild(Z) : L.parentNode && L.parentNode.insertBefore(Z, L), m.push(Z);
- }
- this.shadows = m;
- }
- return this;
- }, W.prototype.show = function(E) {
- return this.attr({ visibility: E ? "inherit" : "visible" });
- }, W.prototype.strokeSetter = function(E, X, g) {
- this[X] = E, this.stroke && this["stroke-width"] ? (W.prototype.fillSetter.call(this, this.stroke, "stroke", g), g.setAttribute("stroke-width", this["stroke-width"]), this.hasStroke = !0) : X === "stroke-width" && E === 0 && this.hasStroke ? (g.removeAttribute("stroke"), this.hasStroke = !1) : this.renderer.styledMode && this["stroke-width"] && (g.setAttribute("stroke-width", this["stroke-width"]), this.hasStroke = !0);
- }, W.prototype.strokeWidth = function() {
- if (!this.renderer.styledMode)
- return this["stroke-width"] || 0;
- var E = this.getStyle("stroke-width"), X = 0;
- if (E.indexOf("px") === E.length - 2)
- X = P(E);
- else if (E !== "") {
- var g = S.createElementNS(d, "rect");
- j(g, { width: E, "stroke-width": 0 }), this.element.parentNode.appendChild(g), X = g.getBBox().width, g.parentNode.removeChild(g);
- }
- return X;
- }, W.prototype.symbolAttr = function(E) {
- var X = this;
- "x y r start end width height innerR anchorX anchorY clockwise".split(" ").forEach(function(g) {
- X[g] = n(E[g], X[g]);
- }), X.attr({ d: X.renderer.symbols[X.symbolName](X.x, X.y, X.width, X.height, X) });
- }, W.prototype.textSetter = function(E) {
- E !== this.textStr && (delete this.textPxLength, this.textStr = E, this.added && this.renderer.buildText(this));
- }, W.prototype.titleSetter = function(E) {
- var X = this.element, g = X.getElementsByTagName("title")[0] || S.createElementNS(this.SVG_NS, "title");
- X.insertBefore ? X.insertBefore(g, X.firstChild) : X.appendChild(g), g.textContent = String(n(E, "")).replace(/<[^>]*>/g, "").replace(/</g, "<").replace(
- />/g,
- ">"
- );
- }, W.prototype.toFront = function() {
- var E = this.element;
- return E.parentNode.appendChild(E), this;
- }, W.prototype.translate = function(E, X) {
- return this.attr({ translateX: E, translateY: X });
- }, W.prototype.updateShadows = function(E, X, g) {
- var m = this.shadows;
- if (m)
- for (var L = m.length; L--; )
- g.call(m[L], E === "height" ? Math.max(X - (m[L].cutHeight || 0), 0) : E === "d" ? this.d : X, E, m[L]);
- }, W.prototype.updateTransform = function() {
- var E = this.scaleX, X = this.scaleY, g = this.inverted, m = this.rotation, L = this.matrix, z = this.element, $ = this.translateX || 0, Q = this.translateY || 0;
- g && ($ += this.width, Q += this.height), $ = ["translate(" + $ + "," + Q + ")"], w(L) && $.push("matrix(" + L.join(",") + ")"), g ? $.push("rotate(90) scale(-1,1)") : m && $.push("rotate(" + m + " " + n(this.rotationOriginX, z.getAttribute("x"), 0) + " " + n(this.rotationOriginY, z.getAttribute("y") || 0) + ")"), (w(E) || w(X)) && $.push("scale(" + n(E, 1) + " " + n(X, 1) + ")"), $.length && z.setAttribute("transform", $.join(" "));
- }, W.prototype.visibilitySetter = function(E, X, g) {
- E === "inherit" ? g.removeAttribute(X) : this[X] !== E && g.setAttribute(
- X,
- E
- ), this[X] = E;
- }, W.prototype.xGetter = function(E) {
- return this.element.nodeName === "circle" && (E === "x" ? E = "cx" : E === "y" && (E = "cy")), this._defaultGetter(E);
- }, W.prototype.zIndexSetter = function(E, X) {
- var g = this.renderer, m = this.parentGroup, L = (m || g).element || g.box, z = this.element;
- g = L === g.box;
- var $ = !1, Q = this.added, A;
- if (w(E) ? (z.setAttribute("data-z-index", E), E = +E, this[X] === E && (Q = !1)) : w(this[X]) && z.removeAttribute("data-z-index"), this[X] = E, Q) {
- for ((E = this.zIndex) && m && (m.handleZ = !0), X = L.childNodes, A = X.length - 1; 0 <= A && !$; A--) {
- m = X[A], Q = m.getAttribute("data-z-index");
- var F = !w(Q);
- m !== z && (0 > E && F && !g && !A ? (L.insertBefore(z, X[A]), $ = !0) : (P(Q) <= E || F && (!w(E) || 0 <= E)) && (L.insertBefore(z, X[A + 1] || null), $ = !0));
- }
- $ || (L.insertBefore(z, X[g ? 3 : 0] || null), $ = !0);
- }
- return $;
- }, W;
- }(), y.prototype["stroke-widthSetter"] = y.prototype.strokeSetter, y.prototype.yGetter = y.prototype.xGetter, y.prototype.matrixSetter = y.prototype.rotationOriginXSetter = y.prototype.rotationOriginYSetter = y.prototype.rotationSetter = y.prototype.scaleXSetter = y.prototype.scaleYSetter = y.prototype.translateXSetter = y.prototype.translateYSetter = y.prototype.verticalAlignSetter = function(W, E) {
- this[E] = W, this.doTransform = !0;
- }, y;
- }), M(o, "Core/Renderer/RendererRegistry.js", [o["Core/Globals.js"]], function(y) {
- var N;
- return function(D) {
- D.rendererTypes = {};
- var U;
- D.getRendererType = function(H) {
- return H === void 0 && (H = U), D.rendererTypes[H] || D.rendererTypes[U];
- }, D.registerRendererType = function(H, V, G) {
- D.rendererTypes[H] = V, (!U || G) && (U = H, y.Renderer = V);
- };
- }(N || (N = {})), N;
- }), M(
- o,
- "Core/Renderer/SVG/SVGLabel.js",
- [o["Core/Renderer/SVG/SVGElement.js"], o["Core/Utilities.js"]],
- function(y, N) {
- var D = this && this.__extends || function() {
- var S = function(x, f) {
- return S = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, T) {
- d.__proto__ = T;
- } || function(d, T) {
- for (var O in T)
- T.hasOwnProperty(O) && (d[O] = T[O]);
- }, S(x, f);
- };
- return function(x, f) {
- function d() {
- this.constructor = x;
- }
- S(x, f), x.prototype = f === null ? Object.create(f) : (d.prototype = f.prototype, new d());
- };
- }(), U = N.defined, H = N.extend, V = N.isNumber, G = N.merge, R = N.pick, B = N.removeEvent;
- return function(S) {
- function x(f, d, T, O, j, k, b, w, v, l) {
- var h = S.call(this) || this;
- h.paddingLeftSetter = h.paddingSetter, h.paddingRightSetter = h.paddingSetter, h.init(f, "g"), h.textStr = d, h.x = T, h.y = O, h.anchorX = k, h.anchorY = b, h.baseline = v, h.className = l, h.addClass(l === "button" ? "highcharts-no-tooltip" : "highcharts-label"), l && h.addClass("highcharts-" + l), h.text = f.text(void 0, 0, 0, w).attr({ zIndex: 1 });
- var u;
- return typeof j == "string" && ((u = /^url\((.*?)\)$/.test(j)) || h.renderer.symbols[j]) && (h.symbolKey = j), h.bBox = x.emptyBBox, h.padding = 3, h.baselineOffset = 0, h.needsBox = f.styledMode || u, h.deferredAttr = {}, h.alignFactor = 0, h;
- }
- return D(x, S), x.prototype.alignSetter = function(f) {
- f = { left: 0, center: 0.5, right: 1 }[f], f !== this.alignFactor && (this.alignFactor = f, this.bBox && V(this.xSetting) && this.attr({ x: this.xSetting }));
- }, x.prototype.anchorXSetter = function(f, d) {
- this.anchorX = f, this.boxAttr(d, Math.round(f) - this.getCrispAdjust() - this.xSetting);
- }, x.prototype.anchorYSetter = function(f, d) {
- this.anchorY = f, this.boxAttr(d, f - this.ySetting);
- }, x.prototype.boxAttr = function(f, d) {
- this.box ? this.box.attr(f, d) : this.deferredAttr[f] = d;
- }, x.prototype.css = function(f) {
- if (f) {
- var d = {};
- f = G(f), x.textProps.forEach(function(O) {
- typeof f[O] < "u" && (d[O] = f[O], delete f[O]);
- }), this.text.css(d);
- var T = "width" in d;
- "fontSize" in d || "fontWeight" in d ? this.updateTextPadding() : T && this.updateBoxSize();
- }
- return y.prototype.css.call(this, f);
- }, x.prototype.destroy = function() {
- B(this.element, "mouseenter"), B(this.element, "mouseleave"), this.text && this.text.destroy(), this.box && (this.box = this.box.destroy()), y.prototype.destroy.call(this);
- }, x.prototype.fillSetter = function(f, d) {
- f && (this.needsBox = !0), this.fill = f, this.boxAttr(d, f);
- }, x.prototype.getBBox = function() {
- this.textStr && this.bBox.width === 0 && this.bBox.height === 0 && this.updateBoxSize();
- var f = this.padding, d = R(this.paddingLeft, f);
- return { width: this.width, height: this.height, x: this.bBox.x - d, y: this.bBox.y - f };
- }, x.prototype.getCrispAdjust = function() {
- return this.renderer.styledMode && this.box ? this.box.strokeWidth() % 2 / 2 : (this["stroke-width"] ? parseInt(
- this["stroke-width"],
- 10
- ) : 0) % 2 / 2;
- }, x.prototype.heightSetter = function(f) {
- this.heightSetting = f;
- }, x.prototype.onAdd = function() {
- var f = this.textStr;
- this.text.add(this), this.attr({ text: U(f) ? f : "", x: this.x, y: this.y }), this.box && U(this.anchorX) && this.attr({ anchorX: this.anchorX, anchorY: this.anchorY });
- }, x.prototype.paddingSetter = function(f, d) {
- V(f) ? f !== this[d] && (this[d] = f, this.updateTextPadding()) : this[d] = void 0;
- }, x.prototype.rSetter = function(f, d) {
- this.boxAttr(d, f);
- }, x.prototype.shadow = function(f) {
- return f && !this.renderer.styledMode && (this.updateBoxSize(), this.box && this.box.shadow(f)), this;
- }, x.prototype.strokeSetter = function(f, d) {
- this.stroke = f, this.boxAttr(d, f);
- }, x.prototype["stroke-widthSetter"] = function(f, d) {
- f && (this.needsBox = !0), this["stroke-width"] = f, this.boxAttr(d, f);
- }, x.prototype["text-alignSetter"] = function(f) {
- this.textAlign = f;
- }, x.prototype.textSetter = function(f) {
- typeof f < "u" && this.text.attr({ text: f }), this.updateTextPadding();
- }, x.prototype.updateBoxSize = function() {
- var f = this.text.element.style, d = {}, T = this.padding, O = this.bBox = V(this.widthSetting) && V(this.heightSetting) && !this.textAlign || !U(this.text.textStr) ? x.emptyBBox : this.text.getBBox();
- this.width = this.getPaddedWidth(), this.height = (this.heightSetting || O.height || 0) + 2 * T, f = this.renderer.fontMetrics(f && f.fontSize, this.text), this.baselineOffset = T + Math.min((this.text.firstLineMetrics || f).b, O.height || 1 / 0), this.heightSetting && (this.baselineOffset += (this.heightSetting - f.h) / 2), this.needsBox && (this.box || (T = this.box = this.symbolKey ? this.renderer.symbol(this.symbolKey) : this.renderer.rect(), T.addClass((this.className === "button" ? "" : "highcharts-label-box") + (this.className ? " highcharts-" + this.className + "-box" : "")), T.add(this)), T = this.getCrispAdjust(), d.x = T, d.y = (this.baseline ? -this.baselineOffset : 0) + T, d.width = Math.round(this.width), d.height = Math.round(this.height), this.box.attr(H(d, this.deferredAttr)), this.deferredAttr = {});
- }, x.prototype.updateTextPadding = function() {
- var f = this.text;
- this.updateBoxSize();
- var d = this.baseline ? 0 : this.baselineOffset, T = R(this.paddingLeft, this.padding);
- U(this.widthSetting) && this.bBox && (this.textAlign === "center" || this.textAlign === "right") && (T += { center: 0.5, right: 1 }[this.textAlign] * (this.widthSetting - this.bBox.width)), (T !== f.x || d !== f.y) && (f.attr("x", T), f.hasBoxWidthChanged && (this.bBox = f.getBBox(!0)), typeof d < "u" && f.attr("y", d)), f.x = T, f.y = d;
- }, x.prototype.widthSetter = function(f) {
- this.widthSetting = V(f) ? f : void 0;
- }, x.prototype.getPaddedWidth = function() {
- var f = this.padding, d = R(this.paddingLeft, f);
- return f = R(this.paddingRight, f), (this.widthSetting || this.bBox.width || 0) + d + f;
- }, x.prototype.xSetter = function(f) {
- this.x = f, this.alignFactor && (f -= this.alignFactor * this.getPaddedWidth(), this["forceAnimate:x"] = !0), this.xSetting = Math.round(f), this.attr("translateX", this.xSetting);
- }, x.prototype.ySetter = function(f) {
- this.ySetting = this.y = Math.round(f), this.attr("translateY", this.ySetting);
- }, x.emptyBBox = { width: 0, height: 0, x: 0, y: 0 }, x.textProps = "color direction fontFamily fontSize fontStyle fontWeight lineHeight textAlign textDecoration textOutline textOverflow width".split(" "), x;
- }(y);
- }
- ), M(
- o,
- "Core/Renderer/SVG/Symbols.js",
- [o["Core/Utilities.js"]],
- function(y) {
- function N(R, B, S, x, f) {
- var d = [];
- if (f) {
- var T = f.start || 0, O = G(f.r, S);
- S = G(f.r, x || S);
- var j = (f.end || 0) - 1e-3;
- x = f.innerR;
- var k = G(f.open, 1e-3 > Math.abs((f.end || 0) - T - 2 * Math.PI)), b = Math.cos(T), w = Math.sin(T), v = Math.cos(j), l = Math.sin(j);
- T = G(f.longArc, 1e-3 > j - T - Math.PI ? 0 : 1), d.push(["M", R + O * b, B + S * w], ["A", O, S, 0, T, G(f.clockwise, 1), R + O * v, B + S * l]), H(x) && d.push(k ? ["M", R + x * v, B + x * l] : ["L", R + x * v, B + x * l], ["A", x, x, 0, T, H(f.clockwise) ? 1 - f.clockwise : 0, R + x * b, B + x * w]), k || d.push(["Z"]);
- }
- return d;
- }
- function D(R, B, S, x, f) {
- return f && f.r ? U(R, B, S, x, f) : [["M", R, B], ["L", R + S, B], ["L", R + S, B + x], ["L", R, B + x], ["Z"]];
- }
- function U(R, B, S, x, f) {
- return f = f && f.r || 0, [["M", R + f, B], ["L", R + S - f, B], ["C", R + S, B, R + S, B, R + S, B + f], ["L", R + S, B + x - f], ["C", R + S, B + x, R + S, B + x, R + S - f, B + x], ["L", R + f, B + x], ["C", R, B + x, R, B + x, R, B + x - f], ["L", R, B + f], ["C", R, B, R, B, R + f, B]];
- }
- var H = y.defined, V = y.isNumber, G = y.pick;
- return { arc: N, callout: function(R, B, S, x, f) {
- var d = Math.min(f && f.r || 0, S, x), T = d + 6, O = f && f.anchorX;
- f = f && f.anchorY || 0;
- var j = U(R, B, S, x, { r: d });
- return V(O) && (R + O >= S ? f > B + T && f < B + x - T ? j.splice(3, 1, ["L", R + S, f - 6], ["L", R + S + 6, f], ["L", R + S, f + 6], ["L", R + S, B + x - d]) : j.splice(3, 1, ["L", R + S, x / 2], ["L", O, f], ["L", R + S, x / 2], ["L", R + S, B + x - d]) : 0 >= R + O ? f > B + T && f < B + x - T ? j.splice(7, 1, ["L", R, f + 6], ["L", R - 6, f], ["L", R, f - 6], ["L", R, B + d]) : j.splice(7, 1, ["L", R, x / 2], ["L", O, f], ["L", R, x / 2], ["L", R, B + d]) : f && f > x && O > R + T && O < R + S - T ? j.splice(5, 1, ["L", O + 6, B + x], ["L", O, B + x + 6], ["L", O - 6, B + x], ["L", R + d, B + x]) : f && 0 > f && O > R + T && O < R + S - T && j.splice(1, 1, ["L", O - 6, B], ["L", O, B - 6], ["L", O + 6, B], ["L", S - d, B])), j;
- }, circle: function(R, B, S, x) {
- return N(R + S / 2, B + x / 2, S / 2, x / 2, { start: 0.5 * Math.PI, end: 2.5 * Math.PI, open: !1 });
- }, diamond: function(R, B, S, x) {
- return [["M", R + S / 2, B], ["L", R + S, B + x / 2], ["L", R + S / 2, B + x], ["L", R, B + x / 2], ["Z"]];
- }, rect: D, roundedRect: U, square: D, triangle: function(R, B, S, x) {
- return [["M", R + S / 2, B], ["L", R + S, B + x], ["L", R, B + x], ["Z"]];
- }, "triangle-down": function(R, B, S, x) {
- return [["M", R, B], ["L", R + S, B], ["L", R + S / 2, B + x], ["Z"]];
- } };
- }
- ), M(o, "Core/Renderer/SVG/TextBuilder.js", [o["Core/Renderer/HTML/AST.js"], o["Core/Globals.js"], o["Core/Utilities.js"]], function(y, N, D) {
- var U = N.doc, H = N.SVG_NS, V = N.win, G = D.attr, R = D.isString, B = D.objectEach, S = D.pick;
- return function() {
- function x(f) {
- var d = f.styles;
- this.renderer = f.renderer, this.svgElement = f, this.width = f.textWidth, this.textLineHeight = d && d.lineHeight, this.textOutline = d && d.textOutline, this.ellipsis = !(!d || d.textOverflow !== "ellipsis"), this.noWrap = !(!d || d.whiteSpace !== "nowrap"), this.fontSize = d && d.fontSize;
- }
- return x.prototype.buildSVG = function() {
- var f = this.svgElement, d = f.element, T = f.renderer, O = S(f.textStr, "").toString(), j = O.indexOf("<") !== -1, k = d.childNodes;
- T = this.width && !f.added && T.box;
- var b = /<br.*?>/g, w = [O, this.ellipsis, this.noWrap, this.textLineHeight, this.textOutline, this.fontSize, this.width].join();
- if (w !== f.textCache) {
- for (f.textCache = w, delete f.actualWidth, w = k.length; w--; )
- d.removeChild(k[w]);
- j || this.ellipsis || this.width || O.indexOf(" ") !== -1 && (!this.noWrap || b.test(O)) ? O !== "" && (T && T.appendChild(d), O = new y(O), this.modifyTree(O.nodes), O.addToDOM(f.element), this.modifyDOM(), this.ellipsis && (d.textContent || "").indexOf("…") !== -1 && f.attr(
- "title",
- this.unescapeEntities(f.textStr || "", ["<", ">"])
- ), T && T.removeChild(d)) : d.appendChild(U.createTextNode(this.unescapeEntities(O))), R(this.textOutline) && f.applyTextOutline && f.applyTextOutline(this.textOutline);
- }
- }, x.prototype.modifyDOM = function() {
- var f = this, d = this.svgElement, T = G(d.element, "x");
- d.firstLineMetrics = void 0;
- for (var O; (O = d.element.firstChild) && /^[\s\u200B]*$/.test(O.textContent || " "); )
- d.element.removeChild(O);
- [].forEach.call(d.element.querySelectorAll("tspan.highcharts-br"), function(w, v) {
- w.nextSibling && w.previousSibling && (v === 0 && w.previousSibling.nodeType === 1 && (d.firstLineMetrics = d.renderer.fontMetrics(void 0, w.previousSibling)), G(w, { dy: f.getLineHeight(w.nextSibling), x: T }));
- });
- var j = this.width || 0;
- if (j) {
- var k = function(w, v) {
- var l = w.textContent || "", h = l.replace(/([^\^])-/g, "$1- ").split(" "), u = !f.noWrap && (1 < h.length || 1 < d.element.childNodes.length), i = f.getLineHeight(v), c = 0, a = d.actualWidth;
- if (f.ellipsis)
- l && f.truncate(w, l, void 0, 0, Math.max(0, j - parseInt(f.fontSize || 12, 10)), function(t, s) {
- return t.substring(
- 0,
- s
- ) + "…";
- });
- else if (u) {
- for (l = [], u = []; v.firstChild && v.firstChild !== w; )
- u.push(v.firstChild), v.removeChild(v.firstChild);
- for (; h.length; )
- h.length && !f.noWrap && 0 < c && (l.push(w.textContent || ""), w.textContent = h.join(" ").replace(/- /g, "-")), f.truncate(w, void 0, h, c === 0 && a || 0, j, function(t, s) {
- return h.slice(0, s).join(" ").replace(/- /g, "-");
- }), a = d.actualWidth, c++;
- u.forEach(function(t) {
- v.insertBefore(t, w);
- }), l.forEach(function(t) {
- v.insertBefore(U.createTextNode(t), w), t = U.createElementNS(H, "tspan"), t.textContent = "", G(t, { dy: i, x: T }), v.insertBefore(t, w);
- });
- }
- }, b = function(w) {
- [].slice.call(w.childNodes).forEach(function(v) {
- v.nodeType === V.Node.TEXT_NODE ? k(v, w) : (v.className.baseVal.indexOf("highcharts-br") !== -1 && (d.actualWidth = 0), b(v));
- });
- };
- b(d.element);
- }
- }, x.prototype.getLineHeight = function(f) {
- var d;
- return f = f.nodeType === V.Node.TEXT_NODE ? f.parentElement : f, this.renderer.styledMode || (d = f && /(px|em)$/.test(f.style.fontSize) ? f.style.fontSize : this.fontSize || this.renderer.style.fontSize || 12), this.textLineHeight ? parseInt(
- this.textLineHeight.toString(),
- 10
- ) : this.renderer.fontMetrics(d, f || this.svgElement.element).h;
- }, x.prototype.modifyTree = function(f) {
- var d = this, T = function(O, j) {
- var k = O.attributes;
- k = k === void 0 ? {} : k;
- var b = O.children, w = O.tagName, v = d.renderer.styledMode;
- w === "b" || w === "strong" ? v ? k.class = "highcharts-strong" : k.style = "font-weight:bold;" + (k.style || "") : (w === "i" || w === "em") && (v ? k.class = "highcharts-emphasized" : k.style = "font-style:italic;" + (k.style || "")), R(k.style) && (k.style = k.style.replace(/(;| |^)color([ :])/, "$1fill$2")), w === "br" ? (k.class = "highcharts-br", O.textContent = "", (j = f[j + 1]) && j.textContent && (j.textContent = j.textContent.replace(/^ +/gm, ""))) : w === "a" && b && b.some(function(l) {
- return l.tagName === "#text";
- }) && (O.children = [{ children: b, tagName: "tspan" }]), w !== "#text" && w !== "a" && (O.tagName = "tspan"), O.attributes = k, b && b.filter(function(l) {
- return l.tagName !== "#text";
- }).forEach(T);
- };
- f.forEach(T);
- }, x.prototype.truncate = function(f, d, T, O, j, k) {
- var b = this.svgElement, w = b.renderer, v = b.rotation, l = [], h = T ? 1 : 0, u = (d || T || "").length, i = u, c, a = function(s, n) {
- n = n || s;
- var P = f.parentNode;
- if (P && typeof l[n] > "u")
- if (P.getSubStringLength)
- try {
- l[n] = O + P.getSubStringLength(0, T ? n + 1 : n);
- } catch {
- }
- else
- w.getSpanWidth && (f.textContent = k(d || T, s), l[n] = O + w.getSpanWidth(b, f));
- return l[n];
- };
- b.rotation = 0;
- var t = a(f.textContent.length);
- if (O + t > j) {
- for (; h <= u; )
- i = Math.ceil((h + u) / 2), T && (c = k(T, i)), t = a(i, c && c.length - 1), h === u ? h = u + 1 : t > j ? u = i - 1 : h = i;
- u === 0 ? f.textContent = "" : d && u === d.length - 1 || (f.textContent = c || k(d || T, i));
- }
- T && T.splice(0, i), b.actualWidth = t, b.rotation = v;
- }, x.prototype.unescapeEntities = function(f, d) {
- return B(this.renderer.escapes, function(T, O) {
- d && d.indexOf(T) !== -1 || (f = f.toString().replace(new RegExp(T, "g"), O));
- }), f;
- }, x;
- }();
- }), M(o, "Core/Renderer/SVG/SVGRenderer.js", [o["Core/Renderer/HTML/AST.js"], o["Core/Color/Color.js"], o["Core/Globals.js"], o["Core/Renderer/RendererRegistry.js"], o["Core/Renderer/SVG/SVGElement.js"], o["Core/Renderer/SVG/SVGLabel.js"], o["Core/Renderer/SVG/Symbols.js"], o["Core/Renderer/SVG/TextBuilder.js"], o["Core/Utilities.js"]], function(y, N, D, U, H, V, G, R, B) {
- var S = D.charts, x = D.deg2rad, f = D.doc, d = D.isFirefox, T = D.isMS, O = D.isWebKit, j = D.noop, k = D.SVG_NS, b = D.symbolSizes, w = D.win, v = B.addEvent, l = B.attr, h = B.createElement, u = B.css, i = B.defined, c = B.destroyObjectProperties, a = B.extend, t = B.isArray, s = B.isNumber, n = B.isObject, P = B.isString, _ = B.merge, I = B.pick, W = B.pInt, E = B.uniqueKey, X;
- return D = function() {
- function g(m, L, z, $, Q, A, F) {
- this.width = this.url = this.style = this.isSVG = this.imgCount = this.height = this.gradients = this.globalAnimation = this.defs = this.chartIndex = this.cacheKeys = this.cache = this.boxWrapper = this.box = this.alignedObjects = void 0, this.init(m, L, z, $, Q, A, F);
- }
- return g.prototype.init = function(m, L, z, $, Q, A, F) {
- var Y = this.createElement("svg").attr({ version: "1.1", class: "highcharts-root" }), Z = Y.element;
- F || Y.css(this.getStyle($)), m.appendChild(Z), l(m, "dir", "ltr"), m.innerHTML.indexOf("xmlns") === -1 && l(Z, "xmlns", this.SVG_NS), this.isSVG = !0, this.box = Z, this.boxWrapper = Y, this.alignedObjects = [], this.url = this.getReferenceURL(), this.createElement("desc").add().element.appendChild(f.createTextNode("Created with Highcharts 9.3.3")), this.defs = this.createElement("defs").add(), this.allowHTML = A, this.forExport = Q, this.styledMode = F, this.gradients = {}, this.cache = {}, this.cacheKeys = [], this.imgCount = 0, this.setSize(L, z, !1);
- var q;
- d && m.getBoundingClientRect && (L = function() {
- u(m, { left: 0, top: 0 }), q = m.getBoundingClientRect(), u(m, { left: Math.ceil(q.left) - q.left + "px", top: Math.ceil(q.top) - q.top + "px" });
- }, L(), this.unSubPixelFix = v(w, "resize", L));
- }, g.prototype.definition = function(m) {
- return new y([m]).addToDOM(this.defs.element);
- }, g.prototype.getReferenceURL = function() {
- if ((d || O) && f.getElementsByTagName("base").length) {
- if (!i(X)) {
- var m = E();
- m = new y([{ tagName: "svg", attributes: { width: 8, height: 8 }, children: [{ tagName: "defs", children: [{ tagName: "clipPath", attributes: { id: m }, children: [{ tagName: "rect", attributes: { width: 4, height: 4 } }] }] }, { tagName: "rect", attributes: { id: "hitme", width: 8, height: 8, "clip-path": "url(#" + m + ")", fill: "rgba(0,0,0,0.001)" } }] }]).addToDOM(f.body), u(m, { position: "fixed", top: 0, left: 0, zIndex: 9e5 });
- var L = f.elementFromPoint(6, 6);
- X = (L && L.id) === "hitme", f.body.removeChild(m);
- }
- if (X)
- return w.location.href.split("#")[0].replace(/<[^>]*>/g, "").replace(/([\('\)])/g, "\\$1").replace(/ /g, "%20");
- }
- return "";
- }, g.prototype.getStyle = function(m) {
- return this.style = a({ fontFamily: '"Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif', fontSize: "12px" }, m);
- }, g.prototype.setStyle = function(m) {
- this.boxWrapper.css(this.getStyle(m));
- }, g.prototype.isHidden = function() {
- return !this.boxWrapper.getBBox().width;
- }, g.prototype.destroy = function() {
- var m = this.defs;
- return this.box = null, this.boxWrapper = this.boxWrapper.destroy(), c(this.gradients || {}), this.gradients = null, m && (this.defs = m.destroy()), this.unSubPixelFix && this.unSubPixelFix(), this.alignedObjects = null;
- }, g.prototype.createElement = function(m) {
- var L = new this.Element();
- return L.init(this, m), L;
- }, g.prototype.getRadialAttr = function(m, L) {
- return { cx: m[0] - m[2] / 2 + (L.cx || 0) * m[2], cy: m[1] - m[2] / 2 + (L.cy || 0) * m[2], r: (L.r || 0) * m[2] };
- }, g.prototype.buildText = function(m) {
- new R(m).buildSVG();
- }, g.prototype.getContrast = function(m) {
- return m = N.parse(m).rgba, m[0] *= 1, m[1] *= 1.2, m[2] *= 0.5, 459 < m[0] + m[1] + m[2] ? "#000000" : "#FFFFFF";
- }, g.prototype.button = function(m, L, z, $, Q, A, F, Y, Z, q) {
- var it = this.label(m, L, z, Z, void 0, void 0, q, void 0, "button"), et = this.styledMode, nt = 0, rt = Q ? _(Q) : {};
- if (m = rt && rt.style || {}, rt = y.filterUserAttributes(rt), it.attr(_({ padding: 8, r: 2 }, rt)), !et) {
- rt = _({ fill: "#f7f7f7", stroke: "#cccccc", "stroke-width": 1, style: { color: "#333333", cursor: "pointer", fontWeight: "normal" } }, { style: m }, rt);
- var ct = rt.style;
- delete rt.style, A = _(rt, { fill: "#e6e6e6" }, y.filterUserAttributes(A || {}));
- var gt = A.style;
- delete A.style, F = _(rt, { fill: "#e6ebf5", style: { color: "#000000", fontWeight: "bold" } }, y.filterUserAttributes(F || {}));
- var dt = F.style;
- delete F.style, Y = _(rt, { style: { color: "#cccccc" } }, y.filterUserAttributes(Y || {}));
- var ht = Y.style;
- delete Y.style;
- }
- return v(it.element, T ? "mouseover" : "mouseenter", function() {
- nt !== 3 && it.setState(1);
- }), v(it.element, T ? "mouseout" : "mouseleave", function() {
- nt !== 3 && it.setState(nt);
- }), it.setState = function(at) {
- at !== 1 && (it.state = nt = at), it.removeClass(/highcharts-button-(normal|hover|pressed|disabled)/).addClass("highcharts-button-" + ["normal", "hover", "pressed", "disabled"][at || 0]), et || it.attr([rt, A, F, Y][at || 0]).css([ct, gt, dt, ht][at || 0]);
- }, et || it.attr(rt).css(a({ cursor: "default" }, ct)), it.on("touchstart", function(at) {
- return at.stopPropagation();
- }).on("click", function(at) {
- nt !== 3 && $.call(it, at);
- });
- }, g.prototype.crispLine = function(m, L, z) {
- z === void 0 && (z = "round");
- var $ = m[0], Q = m[1];
- return i($[1]) && $[1] === Q[1] && ($[1] = Q[1] = Math[z]($[1]) - L % 2 / 2), i($[2]) && $[2] === Q[2] && ($[2] = Q[2] = Math[z]($[2]) + L % 2 / 2), m;
- }, g.prototype.path = function(m) {
- var L = this.styledMode ? {} : { fill: "none" };
- return t(m) ? L.d = m : n(m) && a(L, m), this.createElement("path").attr(L);
- }, g.prototype.circle = function(m, L, z) {
- return m = n(m) ? m : typeof m > "u" ? {} : { x: m, y: L, r: z }, L = this.createElement("circle"), L.xSetter = L.ySetter = function($, Q, A) {
- A.setAttribute("c" + Q, $);
- }, L.attr(m);
- }, g.prototype.arc = function(m, L, z, $, Q, A) {
- return n(m) ? ($ = m, L = $.y, z = $.r, m = $.x) : $ = { innerR: $, start: Q, end: A }, m = this.symbol("arc", m, L, z, z, $), m.r = z, m;
- }, g.prototype.rect = function(m, L, z, $, Q, A) {
- Q = n(m) ? m.r : Q;
- var F = this.createElement("rect");
- return m = n(m) ? m : typeof m > "u" ? {} : { x: m, y: L, width: Math.max(z, 0), height: Math.max($, 0) }, this.styledMode || (typeof A < "u" && (m["stroke-width"] = A, m = F.crisp(m)), m.fill = "none"), Q && (m.r = Q), F.rSetter = function(Y, Z, q) {
- F.r = Y, l(q, { rx: Y, ry: Y });
- }, F.rGetter = function() {
- return F.r || 0;
- }, F.attr(m);
- }, g.prototype.setSize = function(m, L, z) {
- this.width = m, this.height = L, this.boxWrapper.animate({ width: m, height: L }, { step: function() {
- this.attr({ viewBox: "0 0 " + this.attr("width") + " " + this.attr("height") });
- }, duration: I(
- z,
- !0
- ) ? void 0 : 0 }), this.alignElements();
- }, g.prototype.g = function(m) {
- var L = this.createElement("g");
- return m ? L.attr({ class: "highcharts-" + m }) : L;
- }, g.prototype.image = function(m, L, z, $, Q, A) {
- var F = { preserveAspectRatio: "none" }, Y = function(q, it) {
- q.setAttributeNS ? q.setAttributeNS("http://www.w3.org/1999/xlink", "href", it) : q.setAttribute("hc-svg-href", it);
- };
- s(L) && (F.x = L), s(z) && (F.y = z), s($) && (F.width = $), s(Q) && (F.height = Q);
- var Z = this.createElement("image").attr(F);
- return L = function(q) {
- Y(Z.element, m), A.call(Z, q);
- }, A ? (Y(
- Z.element,
- "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="
- ), z = new w.Image(), v(z, "load", L), z.src = m, z.complete && L({})) : Y(Z.element, m), Z;
- }, g.prototype.symbol = function(m, L, z, $, Q, A) {
- var F = this, Y = /^url\((.*?)\)$/, Z = Y.test(m), q = !Z && (this.symbols[m] ? m : "circle"), it = q && this.symbols[q], et;
- if (it) {
- typeof L == "number" && (et = it.call(this.symbols, Math.round(L || 0), Math.round(z || 0), $ || 0, Q || 0, A));
- var nt = this.path(et);
- F.styledMode || nt.attr("fill", "none"), a(nt, { symbolName: q || void 0, x: L, y: z, width: $, height: Q }), A && a(nt, A);
- } else if (Z) {
- var rt = m.match(Y)[1], ct = nt = this.image(rt);
- ct.imgwidth = I(b[rt] && b[rt].width, A && A.width), ct.imgheight = I(b[rt] && b[rt].height, A && A.height);
- var gt = function(dt) {
- return dt.attr({ width: dt.width, height: dt.height });
- };
- ["width", "height"].forEach(function(dt) {
- ct[dt + "Setter"] = function(ht, at) {
- var J = this["img" + at];
- this[at] = ht, i(J) && (A && A.backgroundSize === "within" && this.width && this.height && (J = Math.round(J * Math.min(this.width / this.imgwidth, this.height / this.imgheight))), this.element && this.element.setAttribute(at, J), this.alignByTranslate || (ht = ((this[at] || 0) - J) / 2, this.attr(at === "width" ? { translateX: ht } : { translateY: ht })));
- };
- }), i(L) && ct.attr({ x: L, y: z }), ct.isImg = !0, i(ct.imgwidth) && i(ct.imgheight) ? gt(ct) : (ct.attr({ width: 0, height: 0 }), h("img", { onload: function() {
- var dt = S[F.chartIndex];
- this.width === 0 && (u(this, { position: "absolute", top: "-999em" }), f.body.appendChild(this)), b[rt] = { width: this.width, height: this.height }, ct.imgwidth = this.width, ct.imgheight = this.height, ct.element && gt(ct), this.parentNode && this.parentNode.removeChild(this), F.imgCount--, !F.imgCount && dt && !dt.hasLoaded && dt.onload();
- }, src: rt }), this.imgCount++);
- }
- return nt;
- }, g.prototype.clipRect = function(m, L, z, $) {
- var Q = E() + "-", A = this.createElement("clipPath").attr({ id: Q }).add(this.defs);
- return m = this.rect(m, L, z, $, 0).add(A), m.id = Q, m.clipPath = A, m.count = 0, m;
- }, g.prototype.text = function(m, L, z, $) {
- var Q = {};
- return $ && (this.allowHTML || !this.forExport) ? this.html(m, L, z) : (Q.x = Math.round(L || 0), z && (Q.y = Math.round(z)), i(m) && (Q.text = m), m = this.createElement("text").attr(Q), (!$ || this.forExport && !this.allowHTML) && (m.xSetter = function(A, F, Y) {
- for (var Z = Y.getElementsByTagName("tspan"), q = Y.getAttribute(F), it = 0, et; it < Z.length; it++)
- et = Z[it], et.getAttribute(F) === q && et.setAttribute(F, A);
- Y.setAttribute(F, A);
- }), m);
- }, g.prototype.fontMetrics = function(m, L) {
- return m = !this.styledMode && /px/.test(m) || !w.getComputedStyle ? m || L && L.style && L.style.fontSize || this.style && this.style.fontSize : L && H.prototype.getStyle.call(L, "font-size"), m = /px/.test(m) ? W(m) : 12, L = 24 > m ? m + 3 : Math.round(1.2 * m), { h: L, b: Math.round(0.8 * L), f: m };
- }, g.prototype.rotCorr = function(m, L, z) {
- var $ = m;
- return L && z && ($ = Math.max($ * Math.cos(L * x), 4)), { x: -m / 3 * Math.sin(L * x), y: $ };
- }, g.prototype.pathToSegments = function(m) {
- for (var L = [], z = [], $ = { A: 8, C: 7, H: 2, L: 3, M: 3, Q: 5, S: 5, T: 3, V: 2 }, Q = 0; Q < m.length; Q++)
- P(z[0]) && s(m[Q]) && z.length === $[z[0].toUpperCase()] && m.splice(Q, 0, z[0].replace("M", "L").replace("m", "l")), typeof m[Q] == "string" && (z.length && L.push(z.slice(0)), z.length = 0), z.push(m[Q]);
- return L.push(z.slice(0)), L;
- }, g.prototype.label = function(m, L, z, $, Q, A, F, Y, Z) {
- return new V(this, m, L, z, $, Q, A, F, Y, Z);
- }, g.prototype.alignElements = function() {
- this.alignedObjects.forEach(function(m) {
- return m.align();
- });
- }, g;
- }(), a(D.prototype, { Element: H, SVG_NS: k, escapes: { "&": "&", "<": "<", ">": ">", "'": "'", '"': """ }, symbols: G, draw: j }), U.registerRendererType("svg", D, !0), D;
- }), M(o, "Core/Renderer/HTML/HTMLElement.js", [o["Core/Globals.js"], o["Core/Renderer/SVG/SVGElement.js"], o["Core/Utilities.js"]], function(y, N, D) {
- var U = this && this.__extends || function() {
- var T = function(O, j) {
- return T = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(k, b) {
- k.__proto__ = b;
- } || function(k, b) {
- for (var w in b)
- b.hasOwnProperty(w) && (k[w] = b[w]);
- }, T(O, j);
- };
- return function(O, j) {
- function k() {
- this.constructor = O;
- }
- T(O, j), O.prototype = j === null ? Object.create(j) : (k.prototype = j.prototype, new k());
- };
- }(), H = y.isFirefox, V = y.isMS, G = y.isWebKit, R = y.win, B = D.css, S = D.defined, x = D.extend, f = D.pick, d = D.pInt;
- return function(T) {
- function O() {
- return T !== null && T.apply(this, arguments) || this;
- }
- return U(O, T), O.compose = function(j) {
- if (O.composedClasses.indexOf(j) === -1) {
- O.composedClasses.push(j);
- var k = O.prototype, b = j.prototype;
- b.getSpanCorrection = k.getSpanCorrection, b.htmlCss = k.htmlCss, b.htmlGetBBox = k.htmlGetBBox, b.htmlUpdateTransform = k.htmlUpdateTransform, b.setSpanRotation = k.setSpanRotation;
- }
- return j;
- }, O.prototype.getSpanCorrection = function(j, k, b) {
- this.xCorr = -j * b, this.yCorr = -k;
- }, O.prototype.htmlCss = function(j) {
- var k = this.element.tagName === "SPAN" && j && "width" in j, b = f(k && j.width, void 0);
- if (k) {
- delete j.width, this.textWidth = b;
- var w = !0;
- }
- return j && j.textOverflow === "ellipsis" && (j.whiteSpace = "nowrap", j.overflow = "hidden"), this.styles = x(this.styles, j), B(this.element, j), w && this.htmlUpdateTransform(), this;
- }, O.prototype.htmlGetBBox = function() {
- var j = this.element;
- return { x: j.offsetLeft, y: j.offsetTop, width: j.offsetWidth, height: j.offsetHeight };
- }, O.prototype.htmlUpdateTransform = function() {
- if (this.added) {
- var j = this.renderer, k = this.element, b = this.translateX || 0, w = this.translateY || 0, v = this.x || 0, l = this.y || 0, h = this.textAlign || "left", u = { left: 0, center: 0.5, right: 1 }[h], i = this.styles;
- if (i = i && i.whiteSpace, B(k, { marginLeft: b, marginTop: w }), !j.styledMode && this.shadows && this.shadows.forEach(function(P) {
- B(P, { marginLeft: b + 1, marginTop: w + 1 });
- }), this.inverted && [].forEach.call(k.childNodes, function(P) {
- j.invertChild(P, k);
- }), k.tagName === "SPAN") {
- var c = this.rotation, a = this.textWidth && d(this.textWidth), t = [c, h, k.innerHTML, this.textWidth, this.textAlign].join(), s = void 0;
- if (s = !1, a !== this.oldTextWidth) {
- if (this.textPxLength)
- var n = this.textPxLength;
- else
- B(k, { width: "", whiteSpace: i || "nowrap" }), n = k.offsetWidth;
- (a > this.oldTextWidth || n > a) && (/[ \-]/.test(k.textContent || k.innerText) || k.style.textOverflow === "ellipsis") && (B(k, { width: n > a || c ? a + "px" : "auto", display: "block", whiteSpace: i || "normal" }), this.oldTextWidth = a, s = !0);
- }
- this.hasBoxWidthChanged = s, t !== this.cTT && (s = j.fontMetrics(k.style.fontSize, k).b, !S(c) || c === (this.oldRotation || 0) && h === this.oldAlign || this.setSpanRotation(c, u, s), this.getSpanCorrection(!S(c) && this.textPxLength || k.offsetWidth, s, u, c, h)), B(k, { left: v + (this.xCorr || 0) + "px", top: l + (this.yCorr || 0) + "px" }), this.cTT = t, this.oldRotation = c, this.oldAlign = h;
- }
- } else
- this.alignOnAdd = !0;
- }, O.prototype.setSpanRotation = function(j, k, b) {
- var w = {}, v = V && !/Edge/.test(R.navigator.userAgent) ? "-ms-transform" : G ? "-webkit-transform" : H ? "MozTransform" : R.opera ? "-o-transform" : void 0;
- v && (w[v] = w.transform = "rotate(" + j + "deg)", w[v + (H ? "Origin" : "-origin")] = w.transformOrigin = 100 * k + "% " + b + "px", B(this.element, w));
- }, O.composedClasses = [], O;
- }(N);
- }), M(
- o,
- "Core/Renderer/HTML/HTMLRenderer.js",
- [o["Core/Renderer/HTML/AST.js"], o["Core/Renderer/SVG/SVGElement.js"], o["Core/Renderer/SVG/SVGRenderer.js"], o["Core/Utilities.js"]],
- function(y, N, D, U) {
- var H = this && this.__extends || function() {
- var S = function(x, f) {
- return S = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, T) {
- d.__proto__ = T;
- } || function(d, T) {
- for (var O in T)
- T.hasOwnProperty(O) && (d[O] = T[O]);
- }, S(x, f);
- };
- return function(x, f) {
- function d() {
- this.constructor = x;
- }
- S(x, f), x.prototype = f === null ? Object.create(f) : (d.prototype = f.prototype, new d());
- };
- }(), V = U.attr, G = U.createElement, R = U.extend, B = U.pick;
- return function(S) {
- function x() {
- return S !== null && S.apply(this, arguments) || this;
- }
- return H(x, S), x.compose = function(f) {
- return x.composedClasses.indexOf(f) === -1 && (x.composedClasses.push(f), f.prototype.html = x.prototype.html), f;
- }, x.prototype.html = function(f, d, T) {
- var O = this.createElement("span"), j = O.element, k = O.renderer, b = k.isSVG, w = function(v, l) {
- ["opacity", "visibility"].forEach(function(h) {
- v[h + "Setter"] = function(u, i, c) {
- var a = v.div ? v.div.style : l;
- N.prototype[h + "Setter"].call(this, u, i, c), a && (a[i] = u);
- };
- }), v.addedSetters = !0;
- };
- return O.textSetter = function(v) {
- v !== this.textStr && (delete this.bBox, delete this.oldTextWidth, y.setElementHTML(this.element, B(v, "")), this.textStr = v, O.doTransform = !0);
- }, b && w(O, O.element.style), O.xSetter = O.ySetter = O.alignSetter = O.rotationSetter = function(v, l) {
- l === "align" ? O.alignValue = O.textAlign = v : O[l] = v, O.doTransform = !0;
- }, O.afterSetters = function() {
- this.doTransform && (this.htmlUpdateTransform(), this.doTransform = !1);
- }, O.attr({ text: f, x: Math.round(d), y: Math.round(T) }).css({ position: "absolute" }), k.styledMode || O.css({ fontFamily: this.style.fontFamily, fontSize: this.style.fontSize }), j.style.whiteSpace = "nowrap", O.css = O.htmlCss, b && (O.add = function(v) {
- var l = k.box.parentNode, h = [];
- if (this.parentGroup = v) {
- var u = v.div;
- if (!u) {
- for (; v; )
- h.push(v), v = v.parentGroup;
- h.reverse().forEach(function(i) {
- function c(n, P) {
- i[P] = n, P === "translateX" ? s.left = n + "px" : s.top = n + "px", i.doTransform = !0;
- }
- var a = V(i.element, "class"), t = i.styles || {};
- u = i.div = i.div || G("div", a ? { className: a } : void 0, {
- position: "absolute",
- left: (i.translateX || 0) + "px",
- top: (i.translateY || 0) + "px",
- display: i.display,
- opacity: i.opacity,
- cursor: t.cursor,
- pointerEvents: t.pointerEvents,
- visibility: i.visibility
- }, u || l);
- var s = u.style;
- R(i, { classSetter: function(n) {
- return function(P) {
- this.element.setAttribute("class", P), n.className = P;
- };
- }(u), on: function() {
- return h[0].div && O.on.apply({ element: h[0].div, onEvents: i.onEvents }, arguments), i;
- }, translateXSetter: c, translateYSetter: c }), i.addedSetters || w(i);
- });
- }
- } else
- u = l;
- return u.appendChild(j), O.added = !0, O.alignOnAdd && O.htmlUpdateTransform(), O;
- }), O;
- }, x.composedClasses = [], x;
- }(D);
- }
- ), M(o, "Core/Axis/AxisDefaults.js", [], function() {
- var y;
- return function(N) {
- N.defaultXAxisOptions = { alignTicks: !0, allowDecimals: void 0, panningEnabled: !0, zIndex: 2, zoomEnabled: !0, dateTimeLabelFormats: { millisecond: { main: "%H:%M:%S.%L", range: !1 }, second: { main: "%H:%M:%S", range: !1 }, minute: { main: "%H:%M", range: !1 }, hour: { main: "%H:%M", range: !1 }, day: { main: "%e. %b" }, week: { main: "%e. %b" }, month: { main: "%b '%y" }, year: { main: "%Y" } }, endOnTick: !1, gridLineDashStyle: "Solid", gridZIndex: 1, labels: {
- autoRotation: void 0,
- autoRotationLimit: 80,
- distance: void 0,
- enabled: !0,
- indentation: 10,
- overflow: "justify",
- padding: 5,
- reserveSpace: void 0,
- rotation: void 0,
- staggerLines: 0,
- step: 0,
- useHTML: !1,
- x: 0,
- zIndex: 7,
- style: { color: "#666666", cursor: "default", fontSize: "11px" }
- }, maxPadding: 0.01, minorGridLineDashStyle: "Solid", minorTickLength: 2, minorTickPosition: "outside", minPadding: 0.01, offset: void 0, opposite: !1, reversed: void 0, reversedStacks: !1, showEmpty: !0, showFirstLabel: !0, showLastLabel: !0, startOfWeek: 1, startOnTick: !1, tickLength: 10, tickPixelInterval: 100, tickmarkPlacement: "between", tickPosition: "outside", title: {
- align: "middle",
- rotation: 0,
- useHTML: !1,
- x: 0,
- y: 0,
- style: { color: "#666666" }
- }, type: "linear", uniqueNames: !0, visible: !0, minorGridLineColor: "#f2f2f2", minorGridLineWidth: 1, minorTickColor: "#999999", lineColor: "#ccd6eb", lineWidth: 1, gridLineColor: "#e6e6e6", gridLineWidth: void 0, tickColor: "#ccd6eb" }, N.defaultYAxisOptions = { reversedStacks: !0, endOnTick: !0, maxPadding: 0.05, minPadding: 0.05, tickPixelInterval: 72, showLastLabel: !0, labels: { x: -8 }, startOnTick: !0, title: { rotation: 270, text: "Values" }, stackLabels: {
- animation: {},
- allowOverlap: !1,
- enabled: !1,
- crop: !0,
- overflow: "justify",
- formatter: function() {
- var D = this.axis.chart.numberFormatter;
- return D(this.total, -1);
- },
- style: { color: "#000000", fontSize: "11px", fontWeight: "bold", textOutline: "1px contrast" }
- }, gridLineWidth: 1, lineWidth: 0 }, N.defaultLeftAxisOptions = { labels: { x: -15 }, title: { rotation: 270 } }, N.defaultRightAxisOptions = { labels: { x: 15 }, title: { rotation: 90 } }, N.defaultBottomAxisOptions = { labels: { autoRotation: [-45], x: 0 }, margin: 15, title: { rotation: 0 } }, N.defaultTopAxisOptions = { labels: { autoRotation: [-45], x: 0 }, margin: 15, title: { rotation: 0 } };
- }(y || (y = {})), y;
- }), M(o, "Core/Foundation.js", [o["Core/Utilities.js"]], function(y) {
- var N = y.addEvent, D = y.isFunction, U = y.objectEach, H = y.removeEvent, V;
- return function(G) {
- G.registerEventOptions = function(R, B) {
- R.eventOptions = R.eventOptions || {}, U(B.events, function(S, x) {
- R.eventOptions[x] !== S && (R.eventOptions[x] && (H(R, x, R.eventOptions[x]), delete R.eventOptions[x]), D(S) && (R.eventOptions[x] = S, N(R, x, S)));
- });
- };
- }(V || (V = {})), V;
- }), M(
- o,
- "Core/Axis/Tick.js",
- [o["Core/FormatUtilities.js"], o["Core/Globals.js"], o["Core/Utilities.js"]],
- function(y, N, D) {
- var U = N.deg2rad, H = D.clamp, V = D.correctFloat, G = D.defined, R = D.destroyObjectProperties, B = D.extend, S = D.fireEvent, x = D.isNumber, f = D.merge, d = D.objectEach, T = D.pick;
- return N = function() {
- function O(j, k, b, w, v) {
- this.isNewLabel = this.isNew = !0, this.axis = j, this.pos = k, this.type = b || "", this.parameters = v || {}, this.tickmarkOffset = this.parameters.tickmarkOffset, this.options = this.parameters.options, S(this, "init"), b || w || this.addLabel();
- }
- return O.prototype.addLabel = function() {
- var j = this, k = j.axis, b = k.options, w = k.chart, v = k.categories, l = k.logarithmic, h = k.names, u = j.pos, i = T(j.options && j.options.labels, b.labels), c = k.tickPositions, a = u === c[0], t = u === c[c.length - 1], s = (!i.step || i.step === 1) && k.tickInterval === 1;
- c = c.info;
- var n = j.label, P;
- if (v = this.parameters.category || (v ? T(v[u], h[u], u) : u), l && x(v) && (v = V(l.lin2log(v))), k.dateTime)
- if (c)
- var _ = w.time.resolveDTLFormat(b.dateTimeLabelFormats[!b.grid && c.higherRanks[u] || c.unitName]), I = _.main;
- else
- x(v) && (I = k.dateTime.getXDateFormat(v, b.dateTimeLabelFormats || {}));
- j.isFirst = a, j.isLast = t;
- var W = {
- axis: k,
- chart: w,
- dateTimeLabelFormat: I,
- isFirst: a,
- isLast: t,
- pos: u,
- tick: j,
- tickPositionInfo: c,
- value: v
- };
- S(this, "labelFormat", W);
- var E = function(g) {
- return i.formatter ? i.formatter.call(g, g) : i.format ? (g.text = k.defaultLabelFormatter.call(g), y.format(i.format, g, w)) : k.defaultLabelFormatter.call(g, g);
- };
- b = E.call(W, W);
- var X = _ && _.list;
- j.shortenLabel = X ? function() {
- for (P = 0; P < X.length; P++)
- if (B(W, { dateTimeLabelFormat: X[P] }), n.attr({ text: E.call(W, W) }), n.getBBox().width < k.getSlotWidth(j) - 2 * i.padding)
- return;
- n.attr({ text: "" });
- } : void 0, s && k._addedPlotLB && j.moveLabel(b, i), G(n) || j.movedLabel ? n && n.textStr !== b && !s && (!n.textWidth || i.style.width || n.styles.width || n.css({ width: null }), n.attr({ text: b }), n.textPxLength = n.getBBox().width) : (j.label = n = j.createLabel({ x: 0, y: 0 }, b, i), j.rotation = 0);
- }, O.prototype.createLabel = function(j, k, b) {
- var w = this.axis, v = w.chart;
- return (j = G(k) && b.enabled ? v.renderer.text(k, j.x, j.y, b.useHTML).add(w.labelGroup) : null) && (v.styledMode || j.css(f(b.style)), j.textPxLength = j.getBBox().width), j;
- }, O.prototype.destroy = function() {
- R(
- this,
- this.axis
- );
- }, O.prototype.getPosition = function(j, k, b, w) {
- var v = this.axis, l = v.chart, h = w && l.oldChartHeight || l.chartHeight;
- return j = { x: j ? V(v.translate(k + b, null, null, w) + v.transB) : v.left + v.offset + (v.opposite ? (w && l.oldChartWidth || l.chartWidth) - v.right - v.left : 0), y: j ? h - v.bottom + v.offset - (v.opposite ? v.height : 0) : V(h - v.translate(k + b, null, null, w) - v.transB) }, j.y = H(j.y, -1e5, 1e5), S(this, "afterGetPosition", { pos: j }), j;
- }, O.prototype.getLabelPosition = function(j, k, b, w, v, l, h, u) {
- var i = this.axis, c = i.transA, a = i.isLinked && i.linkedParent ? i.linkedParent.reversed : i.reversed, t = i.staggerLines, s = i.tickRotCorr || { x: 0, y: 0 }, n = w || i.reserveSpaceDefault ? 0 : -i.labelOffset * (i.labelAlign === "center" ? 0.5 : 1), P = {}, _ = v.y;
- return G(_) || (_ = i.side === 0 ? b.rotation ? -8 : -b.getBBox().height : i.side === 2 ? s.y + 8 : Math.cos(b.rotation * U) * (s.y - b.getBBox(!1, 0).height / 2)), j = j + v.x + n + s.x - (l && w ? l * c * (a ? -1 : 1) : 0), k = k + _ - (l && !w ? l * c * (a ? 1 : -1) : 0), t && (b = h / (u || 1) % t, i.opposite && (b = t - b - 1), k += i.labelOffset / t * b), P.x = j, P.y = Math.round(k), S(this, "afterGetLabelPosition", { pos: P, tickmarkOffset: l, index: h }), P;
- }, O.prototype.getLabelSize = function() {
- return this.label ? this.label.getBBox()[this.axis.horiz ? "height" : "width"] : 0;
- }, O.prototype.getMarkPath = function(j, k, b, w, v, l) {
- return l.crispLine([["M", j, k], ["L", j + (v ? 0 : -b), k + (v ? b : 0)]], w);
- }, O.prototype.handleOverflow = function(j) {
- var k = this.axis, b = k.options.labels, w = j.x, v = k.chart.chartWidth, l = k.chart.spacing, h = T(k.labelLeft, Math.min(k.pos, l[3]));
- l = T(k.labelRight, Math.max(k.isRadial ? 0 : k.pos + k.len, v - l[1]));
- var u = this.label, i = this.rotation, c = { left: 0, center: 0.5, right: 1 }[k.labelAlign || u.attr("align")], a = u.getBBox().width, t = k.getSlotWidth(this), s = {}, n = t, P = 1, _;
- i || b.overflow !== "justify" ? 0 > i && w - c * a < h ? _ = Math.round(w / Math.cos(i * U) - h) : 0 < i && w + c * a > l && (_ = Math.round((v - w) / Math.cos(i * U))) : (v = w + (1 - c) * a, w - c * a < h ? n = j.x + n * (1 - c) - h : v > l && (n = l - j.x + n * c, P = -1), n = Math.min(t, n), n < t && k.labelAlign === "center" && (j.x += P * (t - n - c * (t - Math.min(a, n)))), (a > n || k.autoRotation && (u.styles || {}).width) && (_ = n)), _ && (this.shortenLabel ? this.shortenLabel() : (s.width = Math.floor(_) + "px", (b.style || {}).textOverflow || (s.textOverflow = "ellipsis"), u.css(s)));
- }, O.prototype.moveLabel = function(j, k) {
- var b = this, w = b.label, v = b.axis, l = v.reversed, h = !1;
- if (w && w.textStr === j ? (b.movedLabel = w, h = !0, delete b.label) : d(v.ticks, function(i) {
- h || i.isNew || i === b || !i.label || i.label.textStr !== j || (b.movedLabel = i.label, h = !0, i.labelPos = b.movedLabel.xy, delete i.label);
- }), !h && (b.labelPos || w)) {
- var u = b.labelPos || w.xy;
- w = v.horiz ? l ? 0 : v.width + v.left : u.x, v = v.horiz ? u.y : l ? v.width + v.left : 0, b.movedLabel = b.createLabel({ x: w, y: v }, j, k), b.movedLabel && b.movedLabel.attr({ opacity: 0 });
- }
- }, O.prototype.render = function(j, k, b) {
- var w = this.axis, v = w.horiz, l = this.pos, h = T(this.tickmarkOffset, w.tickmarkOffset);
- l = this.getPosition(v, l, h, k), h = l.x;
- var u = l.y;
- w = v && h === w.pos + w.len || !v && u === w.pos ? -1 : 1, v = T(b, this.label && this.label.newOpacity, 1), b = T(b, 1), this.isActive = !0, this.renderGridLine(k, b, w), this.renderMark(l, b, w), this.renderLabel(l, k, v, j), this.isNew = !1, S(this, "afterRender");
- }, O.prototype.renderGridLine = function(j, k, b) {
- var w = this.axis, v = w.options, l = {}, h = this.pos, u = this.type, i = T(
- this.tickmarkOffset,
- w.tickmarkOffset
- ), c = w.chart.renderer, a = this.gridLine, t = v.gridLineWidth, s = v.gridLineColor, n = v.gridLineDashStyle;
- this.type === "minor" && (t = v.minorGridLineWidth, s = v.minorGridLineColor, n = v.minorGridLineDashStyle), a || (w.chart.styledMode || (l.stroke = s, l["stroke-width"] = t || 0, l.dashstyle = n), u || (l.zIndex = 1), j && (k = 0), this.gridLine = a = c.path().attr(l).addClass("highcharts-" + (u ? u + "-" : "") + "grid-line").add(w.gridGroup)), a && (b = w.getPlotLinePath({ value: h + i, lineWidth: a.strokeWidth() * b, force: "pass", old: j })) && a[j || this.isNew ? "attr" : "animate"]({ d: b, opacity: k });
- }, O.prototype.renderMark = function(j, k, b) {
- var w = this.axis, v = w.options, l = w.chart.renderer, h = this.type, u = w.tickSize(h ? h + "Tick" : "tick"), i = j.x;
- j = j.y;
- var c = T(v[h !== "minor" ? "tickWidth" : "minorTickWidth"], !h && w.isXAxis ? 1 : 0);
- v = v[h !== "minor" ? "tickColor" : "minorTickColor"];
- var a = this.mark, t = !a;
- u && (w.opposite && (u[0] = -u[0]), a || (this.mark = a = l.path().addClass("highcharts-" + (h ? h + "-" : "") + "tick").add(w.axisGroup), w.chart.styledMode || a.attr({ stroke: v, "stroke-width": c })), a[t ? "attr" : "animate"]({ d: this.getMarkPath(
- i,
- j,
- u[0],
- a.strokeWidth() * b,
- w.horiz,
- l
- ), opacity: k }));
- }, O.prototype.renderLabel = function(j, k, b, w) {
- var v = this.axis, l = v.horiz, h = v.options, u = this.label, i = h.labels, c = i.step;
- v = T(this.tickmarkOffset, v.tickmarkOffset);
- var a = j.x;
- j = j.y;
- var t = !0;
- u && x(a) && (u.xy = j = this.getLabelPosition(a, j, u, l, i, v, w, c), this.isFirst && !this.isLast && !h.showFirstLabel || this.isLast && !this.isFirst && !h.showLastLabel ? t = !1 : !l || i.step || i.rotation || k || b === 0 || this.handleOverflow(j), c && w % c && (t = !1), t && x(j.y) ? (j.opacity = b, u[this.isNewLabel ? "attr" : "animate"](j), this.isNewLabel = !1) : (u.attr("y", -9999), this.isNewLabel = !0));
- }, O.prototype.replaceMovedLabel = function() {
- var j = this.label, k = this.axis, b = k.reversed;
- if (j && !this.isNew) {
- var w = k.horiz ? b ? k.left : k.width + k.left : j.xy.x;
- b = k.horiz ? j.xy.y : b ? k.width + k.top : k.top, j.animate({ x: w, y: b, opacity: 0 }, void 0, j.destroy), delete this.label;
- }
- k.isDirty = !0, this.label = this.movedLabel, delete this.movedLabel;
- }, O;
- }(), N;
- }
- ), M(o, "Core/Axis/Axis.js", [
- o["Core/Animation/AnimationUtilities.js"],
- o["Core/Axis/AxisDefaults.js"],
- o["Core/Color/Color.js"],
- o["Core/DefaultOptions.js"],
- o["Core/Foundation.js"],
- o["Core/Globals.js"],
- o["Core/Axis/Tick.js"],
- o["Core/Utilities.js"]
- ], function(y, N, D, U, H, V, G, R) {
- var B = y.animObject, S = U.defaultOptions, x = H.registerEventOptions, f = V.deg2rad, d = R.arrayMax, T = R.arrayMin, O = R.clamp, j = R.correctFloat, k = R.defined, b = R.destroyObjectProperties, w = R.erase, v = R.error, l = R.extend, h = R.fireEvent, u = R.getMagnitude, i = R.isArray, c = R.isNumber, a = R.isString, t = R.merge, s = R.normalizeTickInterval, n = R.objectEach, P = R.pick, _ = R.relativeLength, I = R.removeEvent, W = R.splat, E = R.syncTimeout;
- return y = function() {
- function X(g, m) {
- this.zoomEnabled = this.width = this.visible = this.userOptions = this.translationSlope = this.transB = this.transA = this.top = this.ticks = this.tickRotCorr = this.tickPositions = this.tickmarkOffset = this.tickInterval = this.tickAmount = this.side = this.series = this.right = this.positiveValuesOnly = this.pos = this.pointRangePadding = this.pointRange = this.plotLinesAndBandsGroups = this.plotLinesAndBands = this.paddedTicks = this.overlap = this.options = this.offset = this.names = this.minPixelPadding = this.minorTicks = this.minorTickInterval = this.min = this.maxLabelLength = this.max = this.len = this.left = this.labelFormatter = this.labelEdge = this.isLinked = this.height = this.hasVisibleSeries = this.hasNames = this.eventOptions = this.coll = this.closestPointRange = this.chart = this.categories = this.bottom = this.alternateBands = void 0, this.init(g, m);
- }
- return X.prototype.init = function(g, m) {
- var L = m.isX;
- this.chart = g, this.horiz = g.inverted && !this.isZAxis ? !L : L, this.isXAxis = L, this.coll = this.coll || (L ? "xAxis" : "yAxis"), h(this, "init", { userOptions: m }), this.opposite = P(m.opposite, this.opposite), this.side = P(m.side, this.side, this.horiz ? this.opposite ? 0 : 2 : this.opposite ? 1 : 3), this.setOptions(m);
- var z = this.options, $ = z.labels, Q = z.type;
- this.userOptions = m, this.minPixelPadding = 0, this.reversed = P(z.reversed, this.reversed), this.visible = z.visible, this.zoomEnabled = z.zoomEnabled, this.hasNames = Q === "category" || z.categories === !0, this.categories = z.categories || this.hasNames, this.names || (this.names = [], this.names.keys = {}), this.plotLinesAndBandsGroups = {}, this.positiveValuesOnly = !!this.logarithmic, this.isLinked = k(z.linkedTo), this.ticks = {}, this.labelEdge = [], this.minorTicks = {}, this.plotLinesAndBands = [], this.alternateBands = {}, this.len = 0, this.minRange = this.userMinRange = z.minRange || z.maxZoom, this.range = z.range, this.offset = z.offset || 0, this.min = this.max = null, m = P(z.crosshair, W(g.options.tooltip.crosshairs)[L ? 0 : 1]), this.crosshair = m === !0 ? {} : m, g.axes.indexOf(this) === -1 && (L ? g.axes.splice(g.xAxis.length, 0, this) : g.axes.push(this), g[this.coll].push(this)), this.series = this.series || [], g.inverted && !this.isZAxis && L && typeof this.reversed > "u" && (this.reversed = !0), this.labelRotation = c($.rotation) ? $.rotation : void 0, x(this, z), h(this, "afterInit");
- }, X.prototype.setOptions = function(g) {
- this.options = t(N.defaultXAxisOptions, this.coll === "yAxis" && N.defaultYAxisOptions, [N.defaultTopAxisOptions, N.defaultRightAxisOptions, N.defaultBottomAxisOptions, N.defaultLeftAxisOptions][this.side], t(S[this.coll], g)), h(this, "afterSetOptions", { userOptions: g });
- }, X.prototype.defaultLabelFormatter = function(g) {
- var m = this.axis;
- g = this.chart.numberFormatter;
- var L = c(this.value) ? this.value : NaN, z = m.chart.time, $ = this.dateTimeLabelFormat, Q = S.lang, A = Q.numericSymbols;
- Q = Q.numericSymbolMagnitude || 1e3;
- var F = m.logarithmic ? Math.abs(L) : m.tickInterval, Y = A && A.length;
- if (m.categories)
- var Z = "" + this.value;
- else if ($)
- Z = z.dateFormat($, L);
- else if (Y && 1e3 <= F)
- for (; Y-- && typeof Z > "u"; )
- m = Math.pow(Q, Y + 1), F >= m && 10 * L % m === 0 && A[Y] !== null && L !== 0 && (Z = g(L / m, -1) + A[Y]);
- return typeof Z > "u" && (Z = 1e4 <= Math.abs(L) ? g(L, -1) : g(L, -1, void 0, "")), Z;
- }, X.prototype.getSeriesExtremes = function() {
- var g = this, m = g.chart, L;
- h(this, "getSeriesExtremes", null, function() {
- g.hasVisibleSeries = !1, g.dataMin = g.dataMax = g.threshold = null, g.softThreshold = !g.isXAxis, g.stacking && g.stacking.buildStacks(), g.series.forEach(function(z) {
- if (z.visible || !m.options.chart.ignoreHiddenSeries) {
- var $ = z.options, Q = $.threshold;
- if (g.hasVisibleSeries = !0, g.positiveValuesOnly && 0 >= Q && (Q = null), g.isXAxis) {
- if ($ = z.xData, $.length) {
- $ = g.logarithmic ? $.filter(g.validatePositiveValue) : $, L = z.getXExtremes($);
- var A = L.min, F = L.max;
- c(A) || A instanceof Date || ($ = $.filter(c), L = z.getXExtremes($), A = L.min, F = L.max), $.length && (g.dataMin = Math.min(P(g.dataMin, A), A), g.dataMax = Math.max(P(g.dataMax, F), F));
- }
- } else
- z = z.applyExtremes(), c(z.dataMin) && (A = z.dataMin, g.dataMin = Math.min(P(g.dataMin, A), A)), c(z.dataMax) && (F = z.dataMax, g.dataMax = Math.max(P(g.dataMax, F), F)), k(Q) && (g.threshold = Q), (!$.softThreshold || g.positiveValuesOnly) && (g.softThreshold = !1);
- }
- });
- }), h(this, "afterGetSeriesExtremes");
- }, X.prototype.translate = function(g, m, L, z, $, Q) {
- var A = this.linkedParent || this, F = z && A.old ? A.old.min : A.min, Y = A.minPixelPadding;
- $ = (A.isOrdinal || A.brokenAxis && A.brokenAxis.hasBreaks || A.logarithmic && $) && A.lin2val;
- var Z = 1, q = 0;
- return z = z && A.old ? A.old.transA : A.transA, z || (z = A.transA), L && (Z *= -1, q = A.len), A.reversed && (Z *= -1, q -= Z * (A.sector || A.len)), m ? (g = (g * Z + q - Y) / z + F, $ && (g = A.lin2val(g))) : ($ && (g = A.val2lin(g)), g = c(F) ? Z * (g - F) * z + q + Z * Y + (c(Q) ? z * Q : 0) : void 0), g;
- }, X.prototype.toPixels = function(g, m) {
- return this.translate(
- g,
- !1,
- !this.horiz,
- null,
- !0
- ) + (m ? 0 : this.pos);
- }, X.prototype.toValue = function(g, m) {
- return this.translate(g - (m ? 0 : this.pos), !0, !this.horiz, null, !0);
- }, X.prototype.getPlotLinePath = function(g) {
- function m(at, J, tt) {
- return (nt !== "pass" && at < J || at > tt) && (nt ? at = O(at, J, tt) : ht = !0), at;
- }
- var L = this, z = L.chart, $ = L.left, Q = L.top, A = g.old, F = g.value, Y = g.lineWidth, Z = A && z.oldChartHeight || z.chartHeight, q = A && z.oldChartWidth || z.chartWidth, it = L.transB, et = g.translatedValue, nt = g.force, rt, ct, gt, dt, ht;
- return g = {
- value: F,
- lineWidth: Y,
- old: A,
- force: nt,
- acrossPanes: g.acrossPanes,
- translatedValue: et
- }, h(this, "getPlotLinePath", g, function(at) {
- et = P(et, L.translate(F, null, null, A)), et = O(et, -1e5, 1e5), rt = gt = Math.round(et + it), ct = dt = Math.round(Z - et - it), c(et) ? L.horiz ? (ct = Q, dt = Z - L.bottom, rt = gt = m(rt, $, $ + L.width)) : (rt = $, gt = q - L.right, ct = dt = m(ct, Q, Q + L.height)) : (ht = !0, nt = !1), at.path = ht && !nt ? null : z.renderer.crispLine([["M", rt, ct], ["L", gt, dt]], Y || 1);
- }), g.path;
- }, X.prototype.getLinearTickPositions = function(g, m, L) {
- var z = j(Math.floor(m / g) * g);
- L = j(Math.ceil(L / g) * g);
- var $ = [], Q;
- if (j(z + g) === z && (Q = 20), this.single)
- return [m];
- for (m = z; m <= L && ($.push(m), m = j(m + g, Q), m !== A); )
- var A = m;
- return $;
- }, X.prototype.getMinorTickInterval = function() {
- var g = this.options;
- return g.minorTicks === !0 ? P(g.minorTickInterval, "auto") : g.minorTicks === !1 ? null : g.minorTickInterval;
- }, X.prototype.getMinorTickPositions = function() {
- var g = this.options, m = this.tickPositions, L = this.minorTickInterval, z = this.pointRangePadding || 0, $ = this.min - z;
- z = this.max + z;
- var Q = z - $, A = [];
- if (Q && Q / L < this.len / 3) {
- var F = this.logarithmic;
- if (F)
- this.paddedTicks.forEach(function(Y, Z, q) {
- Z && A.push.apply(
- A,
- F.getLogTickPositions(L, q[Z - 1], q[Z], !0)
- );
- });
- else if (this.dateTime && this.getMinorTickInterval() === "auto")
- A = A.concat(this.getTimeTicks(this.dateTime.normalizeTimeTickInterval(L), $, z, g.startOfWeek));
- else
- for (g = $ + (m[0] - $) % L; g <= z && g !== A[0]; g += L)
- A.push(g);
- }
- return A.length !== 0 && this.trimTicks(A), A;
- }, X.prototype.adjustForMinRange = function() {
- var g = this.options, m = this.logarithmic, L = this.min, z = this.max, $ = 0, Q, A, F, Y;
- if (this.isXAxis && typeof this.minRange > "u" && !m && (k(g.min) || k(g.max) || k(g.floor) || k(g.ceiling) ? this.minRange = null : (this.series.forEach(function(et) {
- if (F = et.xData, Y = et.xIncrement ? 1 : F.length - 1, 1 < F.length)
- for (Q = Y; 0 < Q; Q--)
- A = F[Q] - F[Q - 1], (!$ || A < $) && ($ = A);
- }), this.minRange = Math.min(5 * $, this.dataMax - this.dataMin))), z - L < this.minRange) {
- var Z = this.dataMax - this.dataMin >= this.minRange, q = this.minRange, it = (q - z + L) / 2;
- it = [L - it, P(g.min, L - it)], Z && (it[2] = this.logarithmic ? this.logarithmic.log2lin(this.dataMin) : this.dataMin), L = d(it), z = [L + q, P(g.max, L + q)], Z && (z[2] = m ? m.log2lin(this.dataMax) : this.dataMax), z = T(z), z - L < q && (it[0] = z - q, it[1] = P(g.min, z - q), L = d(it));
- }
- this.min = L, this.max = z;
- }, X.prototype.getClosest = function() {
- var g;
- return this.categories ? g = 1 : this.series.forEach(function(m) {
- var L = m.closestPointRange, z = m.visible || !m.chart.options.chart.ignoreHiddenSeries;
- !m.noSharedTooltip && k(L) && z && (g = k(g) ? Math.min(g, L) : L);
- }), g;
- }, X.prototype.nameToX = function(g) {
- var m = i(this.categories), L = m ? this.categories : this.names, z = g.options.x;
- if (g.series.requireSorting = !1, k(z) || (z = this.options.uniqueNames ? m ? L.indexOf(g.name) : P(L.keys[g.name], -1) : g.series.autoIncrement()), z === -1) {
- if (!m)
- var $ = L.length;
- } else
- $ = z;
- return typeof $ < "u" && (this.names[$] = g.name, this.names.keys[g.name] = $), $;
- }, X.prototype.updateNames = function() {
- var g = this, m = this.names;
- 0 < m.length && (Object.keys(m.keys).forEach(function(L) {
- delete m.keys[L];
- }), m.length = 0, this.minRange = this.userMinRange, (this.series || []).forEach(function(L) {
- L.xIncrement = null, (!L.points || L.isDirtyData) && (g.max = Math.max(g.max, L.xData.length - 1), L.processData(), L.generatePoints()), L.data.forEach(function(z, $) {
- if (z && z.options && typeof z.name < "u") {
- var Q = g.nameToX(z);
- typeof Q < "u" && Q !== z.x && (z.x = Q, L.xData[$] = Q);
- }
- });
- }));
- }, X.prototype.setAxisTranslation = function() {
- var g = this, m = g.max - g.min, L = g.linkedParent, z = !!g.categories, $ = g.isXAxis, Q = g.axisPointRange || 0, A = 0, F = 0, Y = g.transA;
- if ($ || z || Q) {
- var Z = g.getClosest();
- L ? (A = L.minPointOffset, F = L.pointRangePadding) : g.series.forEach(function(q) {
- var it = z ? 1 : $ ? P(q.options.pointRange, Z, 0) : g.axisPointRange || 0, et = q.options.pointPlacement;
- Q = Math.max(Q, it), (!g.single || z) && (q = q.is("xrange") ? !$ : $, A = Math.max(A, q && a(et) ? 0 : it / 2), F = Math.max(F, q && et === "on" ? 0 : it));
- }), L = g.ordinal && g.ordinal.slope && Z ? g.ordinal.slope / Z : 1, g.minPointOffset = A *= L, g.pointRangePadding = F *= L, g.pointRange = Math.min(Q, g.single && z ? 1 : m), $ && (g.closestPointRange = Z);
- }
- g.translationSlope = g.transA = Y = g.staticScale || g.len / (m + F || 1), g.transB = g.horiz ? g.left : g.bottom, g.minPixelPadding = Y * A, h(this, "afterSetAxisTranslation");
- }, X.prototype.minFromRange = function() {
- return this.max - this.range;
- }, X.prototype.setTickInterval = function(g) {
- var m = this.chart, L = this.logarithmic, z = this.options, $ = this.isXAxis, Q = this.isLinked, A = z.tickPixelInterval, F = this.categories, Y = this.softThreshold, Z = z.maxPadding, q = z.minPadding, it = c(z.tickInterval) && 0 <= z.tickInterval ? z.tickInterval : void 0, et = c(this.threshold) ? this.threshold : null;
- this.dateTime || F || Q || this.getTickAmount();
- var nt = P(this.userMin, z.min), rt = P(this.userMax, z.max);
- if (Q) {
- this.linkedParent = m[this.coll][z.linkedTo];
- var ct = this.linkedParent.getExtremes();
- this.min = P(ct.min, ct.dataMin), this.max = P(ct.max, ct.dataMax), z.type !== this.linkedParent.options.type && v(11, 1, m);
- } else {
- if (Y && k(et)) {
- if (this.dataMin >= et)
- ct = et, q = 0;
- else if (this.dataMax <= et) {
- var gt = et;
- Z = 0;
- }
- }
- this.min = P(nt, ct, this.dataMin), this.max = P(rt, gt, this.dataMax);
- }
- if (L && (this.positiveValuesOnly && !g && 0 >= Math.min(this.min, P(this.dataMin, this.min)) && v(10, 1, m), this.min = j(L.log2lin(this.min), 16), this.max = j(L.log2lin(this.max), 16)), this.range && k(this.max) && (this.userMin = this.min = nt = Math.max(this.dataMin, this.minFromRange()), this.userMax = rt = this.max, this.range = null), h(this, "foundExtremes"), this.beforePadding && this.beforePadding(), this.adjustForMinRange(), !(F || this.axisPointRange || this.stacking && this.stacking.usePercentage || Q) && k(this.min) && k(this.max) && (m = this.max - this.min) && (!k(nt) && q && (this.min -= m * q), !k(rt) && Z && (this.max += m * Z)), c(this.userMin) || (c(z.softMin) && z.softMin < this.min && (this.min = nt = z.softMin), c(z.floor) && (this.min = Math.max(this.min, z.floor))), c(this.userMax) || (c(z.softMax) && z.softMax > this.max && (this.max = rt = z.softMax), c(z.ceiling) && (this.max = Math.min(this.max, z.ceiling))), Y && k(this.dataMin) && (et = et || 0, !k(nt) && this.min < et && this.dataMin >= et ? this.min = this.options.minRange ? Math.min(et, this.max - this.minRange) : et : !k(rt) && this.max > et && this.dataMax <= et && (this.max = this.options.minRange ? Math.max(et, this.min + this.minRange) : et)), c(this.min) && c(this.max) && !this.chart.polar && this.min > this.max && (k(this.options.min) ? this.max = this.min : k(this.options.max) && (this.min = this.max)), this.tickInterval = this.min === this.max || typeof this.min > "u" || typeof this.max > "u" ? 1 : Q && this.linkedParent && !it && A === this.linkedParent.options.tickPixelInterval ? it = this.linkedParent.tickInterval : P(it, this.tickAmount ? (this.max - this.min) / Math.max(this.tickAmount - 1, 1) : void 0, F ? 1 : (this.max - this.min) * A / Math.max(this.len, A)), $ && !g) {
- var dt = this.min !== (this.old && this.old.min) || this.max !== (this.old && this.old.max);
- this.series.forEach(function(ht) {
- ht.forceCrop = ht.forceCropping && ht.forceCropping(), ht.processData(dt);
- }), h(this, "postProcessData", { hasExtemesChanged: dt });
- }
- this.setAxisTranslation(), h(this, "initialAxisTranslation"), this.pointRange && !it && (this.tickInterval = Math.max(this.pointRange, this.tickInterval)), g = P(z.minTickInterval, this.dateTime && !this.series.some(function(ht) {
- return ht.noSharedTooltip;
- }) ? this.closestPointRange : 0), !it && this.tickInterval < g && (this.tickInterval = g), this.dateTime || this.logarithmic || it || (this.tickInterval = s(this.tickInterval, void 0, u(this.tickInterval), P(z.allowDecimals, 0.5 > this.tickInterval || this.tickAmount !== void 0), !!this.tickAmount)), this.tickAmount || (this.tickInterval = this.unsquish()), this.setTickPositions();
- }, X.prototype.setTickPositions = function() {
- var g = this.options, m = g.tickPositions, L = this.getMinorTickInterval(), z = this.hasVerticalPanning(), $ = this.coll === "colorAxis", Q = ($ || !z) && g.startOnTick;
- z = ($ || !z) && g.endOnTick, $ = g.tickPositioner, this.tickmarkOffset = this.categories && g.tickmarkPlacement === "between" && this.tickInterval === 1 ? 0.5 : 0, this.minorTickInterval = L === "auto" && this.tickInterval ? this.tickInterval / 5 : L, this.single = this.min === this.max && k(this.min) && !this.tickAmount && (parseInt(this.min, 10) === this.min || g.allowDecimals !== !1), this.tickPositions = L = m && m.slice(), !L && (this.ordinal && this.ordinal.positions || !((this.max - this.min) / this.tickInterval > Math.max(2 * this.len, 200)) ? L = this.dateTime ? this.getTimeTicks(this.dateTime.normalizeTimeTickInterval(this.tickInterval, g.units), this.min, this.max, g.startOfWeek, this.ordinal && this.ordinal.positions, this.closestPointRange, !0) : this.logarithmic ? this.logarithmic.getLogTickPositions(this.tickInterval, this.min, this.max) : this.getLinearTickPositions(
- this.tickInterval,
- this.min,
- this.max
- ) : (L = [this.min, this.max], v(19, !1, this.chart)), L.length > this.len && (L = [L[0], L.pop()], L[0] === L[1] && (L.length = 1)), this.tickPositions = L, $ && ($ = $.apply(this, [this.min, this.max]))) && (this.tickPositions = L = $), this.paddedTicks = L.slice(0), this.trimTicks(L, Q, z), this.isLinked || (this.single && 2 > L.length && !this.categories && !this.series.some(function(A) {
- return A.is("heatmap") && A.options.pointPlacement === "between";
- }) && (this.min -= 0.5, this.max += 0.5), m || $ || this.adjustTickAmount()), h(this, "afterSetTickPositions");
- }, X.prototype.trimTicks = function(g, m, L) {
- var z = g[0], $ = g[g.length - 1], Q = !this.isOrdinal && this.minPointOffset || 0;
- if (h(this, "trimTicks"), !this.isLinked) {
- if (m && z !== -1 / 0)
- this.min = z;
- else
- for (; this.min - Q > g[0]; )
- g.shift();
- if (L)
- this.max = $;
- else
- for (; this.max + Q < g[g.length - 1]; )
- g.pop();
- g.length === 0 && k(z) && !this.options.tickPositions && g.push(($ + z) / 2);
- }
- }, X.prototype.alignToOthers = function() {
- var g = {}, m = this.options, L;
- return this.chart.options.chart.alignTicks !== !1 && m.alignTicks && m.startOnTick !== !1 && m.endOnTick !== !1 && !this.logarithmic && this.chart[this.coll].forEach(function(z) {
- var $ = z.options;
- $ = [z.horiz ? $.left : $.top, $.width, $.height, $.pane].join(), z.series.length && (g[$] ? L = !0 : g[$] = 1);
- }), L;
- }, X.prototype.getTickAmount = function() {
- var g = this.options, m = g.tickPixelInterval, L = g.tickAmount;
- !k(g.tickInterval) && !L && this.len < m && !this.isRadial && !this.logarithmic && g.startOnTick && g.endOnTick && (L = 2), !L && this.alignToOthers() && (L = Math.ceil(this.len / m) + 1), 4 > L && (this.finalTickAmt = L, L = 5), this.tickAmount = L;
- }, X.prototype.adjustTickAmount = function() {
- var g = this.options, m = this.tickInterval, L = this.tickPositions, z = this.tickAmount, $ = this.finalTickAmt, Q = L && L.length, A = P(this.threshold, this.softThreshold ? 0 : null);
- if (this.hasData() && c(this.min) && c(this.max)) {
- if (Q < z) {
- for (; L.length < z; )
- L.length % 2 || this.min === A ? L.push(j(L[L.length - 1] + m)) : L.unshift(j(L[0] - m));
- this.transA *= (Q - 1) / (z - 1), this.min = g.startOnTick ? L[0] : Math.min(this.min, L[0]), this.max = g.endOnTick ? L[L.length - 1] : Math.max(this.max, L[L.length - 1]);
- } else
- Q > z && (this.tickInterval *= 2, this.setTickPositions());
- if (k($)) {
- for (m = g = L.length; m--; )
- ($ === 3 && m % 2 === 1 || 2 >= $ && 0 < m && m < g - 1) && L.splice(m, 1);
- this.finalTickAmt = void 0;
- }
- }
- }, X.prototype.setScale = function() {
- var g = !1, m = !1;
- this.series.forEach(function(z) {
- g = g || z.isDirtyData || z.isDirty, m = m || z.xAxis && z.xAxis.isDirty || !1;
- }), this.setAxisSize();
- var L = this.len !== (this.old && this.old.len);
- L || g || m || this.isLinked || this.forceRedraw || this.userMin !== (this.old && this.old.userMin) || this.userMax !== (this.old && this.old.userMax) || this.alignToOthers() ? (this.stacking && this.stacking.resetStacks(), this.forceRedraw = !1, this.getSeriesExtremes(), this.setTickInterval(), this.isDirty || (this.isDirty = L || this.min !== (this.old && this.old.min) || this.max !== (this.old && this.old.max))) : this.stacking && this.stacking.cleanStacks(), g && this.panningState && (this.panningState.isDirty = !0), h(this, "afterSetScale");
- }, X.prototype.setExtremes = function(g, m, L, z, $) {
- var Q = this, A = Q.chart;
- L = P(L, !0), Q.series.forEach(function(F) {
- delete F.kdTree;
- }), $ = l($, { min: g, max: m }), h(Q, "setExtremes", $, function() {
- Q.userMin = g, Q.userMax = m, Q.eventArgs = $, L && A.redraw(z);
- });
- }, X.prototype.zoom = function(g, m) {
- var L = this, z = this.dataMin, $ = this.dataMax, Q = this.options, A = Math.min(z, P(Q.min, z)), F = Math.max($, P(Q.max, $));
- return g = { newMin: g, newMax: m }, h(this, "zoom", g, function(Y) {
- var Z = Y.newMin, q = Y.newMax;
- (Z !== L.min || q !== L.max) && (L.allowZoomOutside || (k(z) && (Z < A && (Z = A), Z > F && (Z = F)), k($) && (q < A && (q = A), q > F && (q = F))), L.displayBtn = typeof Z < "u" || typeof q < "u", L.setExtremes(Z, q, !1, void 0, { trigger: "zoom" })), Y.zoomed = !0;
- }), g.zoomed;
- }, X.prototype.setAxisSize = function() {
- var g = this.chart, m = this.options, L = m.offsets || [0, 0, 0, 0], z = this.horiz, $ = this.width = Math.round(_(P(m.width, g.plotWidth - L[3] + L[1]), g.plotWidth)), Q = this.height = Math.round(_(P(m.height, g.plotHeight - L[0] + L[2]), g.plotHeight)), A = this.top = Math.round(_(P(m.top, g.plotTop + L[0]), g.plotHeight, g.plotTop));
- m = this.left = Math.round(_(P(m.left, g.plotLeft + L[3]), g.plotWidth, g.plotLeft)), this.bottom = g.chartHeight - Q - A, this.right = g.chartWidth - $ - m, this.len = Math.max(z ? $ : Q, 0), this.pos = z ? m : A;
- }, X.prototype.getExtremes = function() {
- var g = this.logarithmic;
- return { min: g ? j(g.lin2log(this.min)) : this.min, max: g ? j(g.lin2log(this.max)) : this.max, dataMin: this.dataMin, dataMax: this.dataMax, userMin: this.userMin, userMax: this.userMax };
- }, X.prototype.getThreshold = function(g) {
- var m = this.logarithmic, L = m ? m.lin2log(this.min) : this.min;
- return m = m ? m.lin2log(this.max) : this.max, g === null || g === -1 / 0 ? g = L : g === 1 / 0 ? g = m : L > g ? g = L : m < g && (g = m), this.translate(g, 0, 1, 0, 1);
- }, X.prototype.autoLabelAlign = function(g) {
- var m = (P(g, 0) - 90 * this.side + 720) % 360;
- return g = { align: "center" }, h(
- this,
- "autoLabelAlign",
- g,
- function(L) {
- 15 < m && 165 > m ? L.align = "right" : 195 < m && 345 > m && (L.align = "left");
- }
- ), g.align;
- }, X.prototype.tickSize = function(g) {
- var m = this.options, L = P(m[g === "tick" ? "tickWidth" : "minorTickWidth"], g === "tick" && this.isXAxis && !this.categories ? 1 : 0), z = m[g === "tick" ? "tickLength" : "minorTickLength"];
- if (L && z) {
- m[g + "Position"] === "inside" && (z = -z);
- var $ = [z, L];
- }
- return g = { tickSize: $ }, h(this, "afterTickSize", g), g.tickSize;
- }, X.prototype.labelMetrics = function() {
- var g = this.tickPositions && this.tickPositions[0] || 0;
- return this.chart.renderer.fontMetrics(
- this.options.labels.style.fontSize,
- this.ticks[g] && this.ticks[g].label
- );
- }, X.prototype.unsquish = function() {
- var g = this.options.labels, m = this.horiz, L = this.tickInterval, z = this.len / (((this.categories ? 1 : 0) + this.max - this.min) / L), $ = g.rotation, Q = this.labelMetrics(), A = Math.max(this.max - this.min, 0), F = function(nt) {
- var rt = nt / (z || 1);
- return rt = 1 < rt ? Math.ceil(rt) : 1, rt * L > A && nt !== 1 / 0 && z !== 1 / 0 && A && (rt = Math.ceil(A / L)), j(rt * L);
- }, Y = L, Z, q, it = Number.MAX_VALUE;
- if (m) {
- if (!g.staggerLines && !g.step)
- if (c($))
- var et = [$];
- else
- z < g.autoRotationLimit && (et = g.autoRotation);
- et && et.forEach(function(nt) {
- if (nt === $ || nt && -90 <= nt && 90 >= nt) {
- q = F(Math.abs(Q.h / Math.sin(f * nt)));
- var rt = q + Math.abs(nt / 360);
- rt < it && (it = rt, Z = nt, Y = q);
- }
- });
- } else
- g.step || (Y = F(Q.h));
- return this.autoRotation = et, this.labelRotation = P(Z, c($) ? $ : 0), Y;
- }, X.prototype.getSlotWidth = function(g) {
- var m = this.chart, L = this.horiz, z = this.options.labels, $ = Math.max(this.tickPositions.length - (this.categories ? 0 : 1), 1), Q = m.margin[3];
- if (g && c(g.slotWidth))
- return g.slotWidth;
- if (L && 2 > z.step)
- return z.rotation ? 0 : (this.staggerLines || 1) * this.len / $;
- if (!L) {
- if (g = z.style.width, g !== void 0)
- return parseInt(String(g), 10);
- if (Q)
- return Q - m.spacing[3];
- }
- return 0.33 * m.chartWidth;
- }, X.prototype.renderUnsquish = function() {
- var g = this.chart, m = g.renderer, L = this.tickPositions, z = this.ticks, $ = this.options.labels, Q = $.style, A = this.horiz, F = this.getSlotWidth(), Y = Math.max(1, Math.round(F - 2 * $.padding)), Z = {}, q = this.labelMetrics(), it = Q.textOverflow, et = 0;
- if (a($.rotation) || (Z.rotation = $.rotation || 0), L.forEach(function(gt) {
- gt = z[gt], gt.movedLabel && gt.replaceMovedLabel(), gt && gt.label && gt.label.textPxLength > et && (et = gt.label.textPxLength);
- }), this.maxLabelLength = et, this.autoRotation)
- et > Y && et > q.h ? Z.rotation = this.labelRotation : this.labelRotation = 0;
- else if (F) {
- var nt = Y;
- if (!it) {
- var rt = "clip";
- for (Y = L.length; !A && Y--; ) {
- var ct = L[Y];
- (ct = z[ct].label) && (ct.styles && ct.styles.textOverflow === "ellipsis" ? ct.css({ textOverflow: "clip" }) : ct.textPxLength > F && ct.css({ width: F + "px" }), ct.getBBox().height > this.len / L.length - (q.h - q.f) && (ct.specificTextOverflow = "ellipsis"));
- }
- }
- }
- Z.rotation && (nt = et > 0.5 * g.chartHeight ? 0.33 * g.chartHeight : et, it || (rt = "ellipsis")), (this.labelAlign = $.align || this.autoLabelAlign(this.labelRotation)) && (Z.align = this.labelAlign), L.forEach(function(gt) {
- var dt = (gt = z[gt]) && gt.label, ht = Q.width, at = {};
- dt && (dt.attr(Z), gt.shortenLabel ? gt.shortenLabel() : nt && !ht && Q.whiteSpace !== "nowrap" && (nt < dt.textPxLength || dt.element.tagName === "SPAN") ? (at.width = nt + "px", it || (at.textOverflow = dt.specificTextOverflow || rt), dt.css(at)) : dt.styles && dt.styles.width && !at.width && !ht && dt.css({ width: null }), delete dt.specificTextOverflow, gt.rotation = Z.rotation);
- }, this), this.tickRotCorr = m.rotCorr(q.b, this.labelRotation || 0, this.side !== 0);
- }, X.prototype.hasData = function() {
- return this.series.some(function(g) {
- return g.hasData();
- }) || this.options.showEmpty && k(this.min) && k(this.max);
- }, X.prototype.addTitle = function(g) {
- var m = this.chart.renderer, L = this.horiz, z = this.opposite, $ = this.options.title, Q = this.chart.styledMode, A;
- this.axisTitle || ((A = $.textAlign) || (A = (L ? { low: "left", middle: "center", high: "right" } : { low: z ? "right" : "left", middle: "center", high: z ? "left" : "right" })[$.align]), this.axisTitle = m.text($.text || "", 0, 0, $.useHTML).attr({ zIndex: 7, rotation: $.rotation, align: A }).addClass("highcharts-axis-title"), Q || this.axisTitle.css(t($.style)), this.axisTitle.add(this.axisGroup), this.axisTitle.isNew = !0), Q || $.style.width || this.isRadial || this.axisTitle.css({ width: this.len + "px" }), this.axisTitle[g ? "show" : "hide"](g);
- }, X.prototype.generateTick = function(g) {
- var m = this.ticks;
- m[g] ? m[g].addLabel() : m[g] = new G(this, g);
- }, X.prototype.getOffset = function() {
- var g = this, m = this, L = m.chart, z = m.horiz, $ = m.options, Q = m.side, A = m.ticks, F = m.tickPositions, Y = m.coll, Z = m.axisParent, q = L.renderer, it = L.inverted && !m.isZAxis ? [1, 0, 3, 2][Q] : Q, et = m.hasData(), nt = $.title, rt = $.labels, ct = L.axisOffset;
- L = L.clipOffset;
- var gt = [
- -1,
- 1,
- 1,
- -1
- ][Q], dt = $.className, ht, at = 0, J = 0, tt = 0;
- if (m.showAxis = ht = et || $.showEmpty, m.staggerLines = m.horiz && rt.staggerLines || void 0, !m.axisGroup) {
- var ot = function(pt, yt, vt) {
- return q.g(pt).attr({ zIndex: vt }).addClass("highcharts-" + Y.toLowerCase() + yt + " " + (g.isRadial ? "highcharts-radial-axis" + yt + " " : "") + (dt || "")).add(Z);
- };
- m.gridGroup = ot("grid", "-grid", $.gridZIndex), m.axisGroup = ot("axis", "", $.zIndex), m.labelGroup = ot("axis-labels", "-labels", rt.zIndex);
- }
- if (et || m.isLinked ? (F.forEach(function(pt) {
- m.generateTick(pt);
- }), m.renderUnsquish(), m.reserveSpaceDefault = Q === 0 || Q === 2 || { 1: "left", 3: "right" }[Q] === m.labelAlign, P(rt.reserveSpace, m.labelAlign === "center" ? !0 : null, m.reserveSpaceDefault) && F.forEach(function(pt) {
- tt = Math.max(A[pt].getLabelSize(), tt);
- }), m.staggerLines && (tt *= m.staggerLines), m.labelOffset = tt * (m.opposite ? -1 : 1)) : n(A, function(pt, yt) {
- pt.destroy(), delete A[yt];
- }), nt && nt.text && nt.enabled !== !1 && (m.addTitle(ht), ht && nt.reserveSpace !== !1)) {
- m.titleOffset = at = m.axisTitle.getBBox()[z ? "height" : "width"];
- var lt = nt.offset;
- J = k(lt) ? 0 : P(nt.margin, z ? 5 : 10);
- }
- m.renderLine(), m.offset = gt * P(
- $.offset,
- ct[Q] ? ct[Q] + ($.margin || 0) : 0
- ), m.tickRotCorr = m.tickRotCorr || { x: 0, y: 0 }, nt = Q === 0 ? -m.labelMetrics().h : Q === 2 ? m.tickRotCorr.y : 0, et = Math.abs(tt) + J, tt && (et = et - nt + gt * (z ? P(rt.y, m.tickRotCorr.y + 8 * gt) : rt.x)), m.axisTitleMargin = P(lt, et), m.getMaxLabelDimensions && (m.maxLabelDimensions = m.getMaxLabelDimensions(A, F)), Y !== "colorAxis" && (z = this.tickSize("tick"), ct[Q] = Math.max(ct[Q], (m.axisTitleMargin || 0) + at + gt * m.offset, et, F && F.length && z ? z[0] + gt * m.offset : 0), $ = !m.axisLine || $.offset ? 0 : 2 * Math.floor(m.axisLine.strokeWidth() / 2), L[it] = Math.max(
- L[it],
- $
- )), h(this, "afterGetOffset");
- }, X.prototype.getLinePath = function(g) {
- var m = this.chart, L = this.opposite, z = this.offset, $ = this.horiz, Q = this.left + (L ? this.width : 0) + z;
- return z = m.chartHeight - this.bottom - (L ? this.height : 0) + z, L && (g *= -1), m.renderer.crispLine([["M", $ ? this.left : Q, $ ? z : this.top], ["L", $ ? m.chartWidth - this.right : Q, $ ? z : m.chartHeight - this.bottom]], g);
- }, X.prototype.renderLine = function() {
- this.axisLine || (this.axisLine = this.chart.renderer.path().addClass("highcharts-axis-line").add(this.axisGroup), this.chart.styledMode || this.axisLine.attr({ stroke: this.options.lineColor, "stroke-width": this.options.lineWidth, zIndex: 7 }));
- }, X.prototype.getTitlePosition = function() {
- var g = this.horiz, m = this.left, L = this.top, z = this.len, $ = this.options.title, Q = g ? m : L, A = this.opposite, F = this.offset, Y = $.x, Z = $.y, q = this.axisTitle, it = this.chart.renderer.fontMetrics($.style.fontSize, q);
- return q = Math.max(q.getBBox(null, 0).height - it.h - 1, 0), z = { low: Q + (g ? 0 : z), middle: Q + z / 2, high: Q + (g ? z : 0) }[$.align], m = (g ? L + this.height : m) + (g ? 1 : -1) * (A ? -1 : 1) * this.axisTitleMargin + [
- -q,
- q,
- it.f,
- -q
- ][this.side], g = { x: g ? z + Y : m + (A ? this.width : 0) + F + Y, y: g ? m + Z - (A ? this.height : 0) + F : z + Z }, h(this, "afterGetTitlePosition", { titlePosition: g }), g;
- }, X.prototype.renderMinorTick = function(g, m) {
- var L = this.minorTicks;
- L[g] || (L[g] = new G(this, g, "minor")), m && L[g].isNew && L[g].render(null, !0), L[g].render(null, !1, 1);
- }, X.prototype.renderTick = function(g, m, L) {
- var z = this.ticks;
- (!this.isLinked || g >= this.min && g <= this.max || this.grid && this.grid.isColumn) && (z[g] || (z[g] = new G(this, g)), L && z[g].isNew && z[g].render(m, !0, -1), z[g].render(m));
- }, X.prototype.render = function() {
- var g = this, m = g.chart, L = g.logarithmic, z = g.options, $ = g.isLinked, Q = g.tickPositions, A = g.axisTitle, F = g.ticks, Y = g.minorTicks, Z = g.alternateBands, q = z.stackLabels, it = z.alternateGridColor, et = g.tickmarkOffset, nt = g.axisLine, rt = g.showAxis, ct = B(m.renderer.globalAnimation), gt, dt;
- if (g.labelEdge.length = 0, g.overlap = !1, [F, Y, Z].forEach(function(at) {
- n(at, function(J) {
- J.isActive = !1;
- });
- }), g.hasData() || $) {
- var ht = g.chart.hasRendered && g.old && c(g.old.min);
- g.minorTickInterval && !g.categories && g.getMinorTickPositions().forEach(function(at) {
- g.renderMinorTick(
- at,
- ht
- );
- }), Q.length && (Q.forEach(function(at, J) {
- g.renderTick(at, J, ht);
- }), et && (g.min === 0 || g.single) && (F[-1] || (F[-1] = new G(g, -1, null, !0)), F[-1].render(-1))), it && Q.forEach(function(at, J) {
- dt = typeof Q[J + 1] < "u" ? Q[J + 1] + et : g.max - et, J % 2 === 0 && at < g.max && dt <= g.max + (m.polar ? -et : et) && (Z[at] || (Z[at] = new V.PlotLineOrBand(g)), gt = at + et, Z[at].options = { from: L ? L.lin2log(gt) : gt, to: L ? L.lin2log(dt) : dt, color: it, className: "highcharts-alternate-grid" }, Z[at].render(), Z[at].isActive = !0);
- }), g._addedPlotLB || (g._addedPlotLB = !0, (z.plotLines || []).concat(z.plotBands || []).forEach(function(at) {
- g.addPlotBandOrLine(at);
- }));
- }
- [F, Y, Z].forEach(function(at) {
- var J = [], tt = ct.duration;
- n(at, function(ot, lt) {
- ot.isActive || (ot.render(lt, !1, 0), ot.isActive = !1, J.push(lt));
- }), E(function() {
- for (var ot = J.length; ot--; )
- at[J[ot]] && !at[J[ot]].isActive && (at[J[ot]].destroy(), delete at[J[ot]]);
- }, at !== Z && m.hasRendered && tt ? tt : 0);
- }), nt && (nt[nt.isPlaced ? "animate" : "attr"]({ d: this.getLinePath(nt.strokeWidth()) }), nt.isPlaced = !0, nt[rt ? "show" : "hide"](rt)), A && rt && (z = g.getTitlePosition(), c(z.y) ? (A[A.isNew ? "attr" : "animate"](z), A.isNew = !1) : (A.attr(
- "y",
- -9999
- ), A.isNew = !0)), q && q.enabled && g.stacking && g.stacking.renderStackTotals(), g.old = { len: g.len, max: g.max, min: g.min, transA: g.transA, userMax: g.userMax, userMin: g.userMin }, g.isDirty = !1, h(this, "afterRender");
- }, X.prototype.redraw = function() {
- this.visible && (this.render(), this.plotLinesAndBands.forEach(function(g) {
- g.render();
- })), this.series.forEach(function(g) {
- g.isDirty = !0;
- });
- }, X.prototype.getKeepProps = function() {
- return this.keepProps || X.keepProps;
- }, X.prototype.destroy = function(g) {
- var m = this, L = m.plotLinesAndBands, z = this.eventOptions;
- if (h(this, "destroy", { keepEvents: g }), g || I(m), [m.ticks, m.minorTicks, m.alternateBands].forEach(function(Q) {
- b(Q);
- }), L)
- for (g = L.length; g--; )
- L[g].destroy();
- "axisLine axisTitle axisGroup gridGroup labelGroup cross scrollbar".split(" ").forEach(function(Q) {
- m[Q] && (m[Q] = m[Q].destroy());
- });
- for (var $ in m.plotLinesAndBandsGroups)
- m.plotLinesAndBandsGroups[$] = m.plotLinesAndBandsGroups[$].destroy();
- n(m, function(Q, A) {
- m.getKeepProps().indexOf(A) === -1 && delete m[A];
- }), this.eventOptions = z;
- }, X.prototype.drawCrosshair = function(g, m) {
- var L = this.crosshair, z = P(L && L.snap, !0), $ = this.chart, Q, A = this.cross;
- if (h(this, "drawCrosshair", { e: g, point: m }), g || (g = this.cross && this.cross.e), L && (k(m) || !z) !== !1) {
- if (z ? k(m) && (Q = P(this.coll !== "colorAxis" ? m.crosshairPos : null, this.isXAxis ? m.plotX : this.len - m.plotY)) : Q = g && (this.horiz ? g.chartX - this.pos : this.len - g.chartY + this.pos), k(Q)) {
- var F = { value: m && (this.isXAxis ? m.x : P(m.stackY, m.y)), translatedValue: Q };
- $.polar && l(F, { isCrosshair: !0, chartX: g && g.chartX, chartY: g && g.chartY, point: m }), F = this.getPlotLinePath(F) || null;
- }
- if (!k(F)) {
- this.hideCrosshair();
- return;
- }
- z = this.categories && !this.isRadial, A || (this.cross = A = $.renderer.path().addClass("highcharts-crosshair highcharts-crosshair-" + (z ? "category " : "thin ") + (L.className || "")).attr({ zIndex: P(L.zIndex, 2) }).add(), $.styledMode || (A.attr({ stroke: L.color || (z ? D.parse("#ccd6eb").setOpacity(0.25).get() : "#cccccc"), "stroke-width": P(L.width, 1) }).css({ "pointer-events": "none" }), L.dashStyle && A.attr({ dashstyle: L.dashStyle }))), A.show().attr({ d: F }), z && !L.width && A.attr({ "stroke-width": this.transA }), this.cross.e = g;
- } else
- this.hideCrosshair();
- h(this, "afterDrawCrosshair", { e: g, point: m });
- }, X.prototype.hideCrosshair = function() {
- this.cross && this.cross.hide(), h(this, "afterHideCrosshair");
- }, X.prototype.hasVerticalPanning = function() {
- var g = this.chart.options.chart.panning;
- return !!(g && g.enabled && /y/.test(g.type));
- }, X.prototype.validatePositiveValue = function(g) {
- return c(g) && 0 < g;
- }, X.prototype.update = function(g, m) {
- var L = this.chart;
- g = t(this.userOptions, g), this.destroy(!0), this.init(L, g), L.isDirtyBox = !0, P(m, !0) && L.redraw();
- }, X.prototype.remove = function(g) {
- for (var m = this.chart, L = this.coll, z = this.series, $ = z.length; $--; )
- z[$] && z[$].remove(!1);
- w(m.axes, this), w(m[L], this), m[L].forEach(function(Q, A) {
- Q.options.index = Q.userOptions.index = A;
- }), this.destroy(), m.isDirtyBox = !0, P(g, !0) && m.redraw();
- }, X.prototype.setTitle = function(g, m) {
- this.update({ title: g }, m);
- }, X.prototype.setCategories = function(g, m) {
- this.update({ categories: g }, m);
- }, X.defaultOptions = N.defaultXAxisOptions, X.keepProps = "extKey hcEvents names series userMax userMin".split(" "), X;
- }(), y;
- }), M(o, "Core/Axis/DateTimeAxis.js", [o["Core/Utilities.js"]], function(y) {
- var N = y.addEvent, D = y.getMagnitude, U = y.normalizeTickInterval, H = y.timeUnits, V;
- return function(G) {
- function R() {
- return this.chart.time.getTimeTicks.apply(this.chart.time, arguments);
- }
- function B(f) {
- f.userOptions.type !== "datetime" ? this.dateTime = void 0 : this.dateTime || (this.dateTime = new x(this));
- }
- var S = [];
- G.compose = function(f) {
- return S.indexOf(f) === -1 && (S.push(f), f.keepProps.push("dateTime"), f.prototype.getTimeTicks = R, N(
- f,
- "init",
- B
- )), f;
- };
- var x = function() {
- function f(d) {
- this.axis = d;
- }
- return f.prototype.normalizeTimeTickInterval = function(d, T) {
- var O = T || [["millisecond", [1, 2, 5, 10, 20, 25, 50, 100, 200, 500]], ["second", [1, 2, 5, 10, 15, 30]], ["minute", [1, 2, 5, 10, 15, 30]], ["hour", [1, 2, 3, 4, 6, 8, 12]], ["day", [1, 2]], ["week", [1, 2]], ["month", [1, 2, 3, 4, 6]], ["year", null]];
- T = O[O.length - 1];
- var j = H[T[0]], k = T[1], b;
- for (b = 0; b < O.length && (T = O[b], j = H[T[0]], k = T[1], !(O[b + 1] && d <= (j * k[k.length - 1] + H[O[b + 1][0]]) / 2)); b++)
- ;
- return j === H.year && d < 5 * j && (k = [1, 2, 5]), d = U(d / j, k, T[0] === "year" ? Math.max(D(d / j), 1) : 1), { unitRange: j, count: d, unitName: T[0] };
- }, f.prototype.getXDateFormat = function(d, T) {
- var O = this.axis;
- return O.closestPointRange ? O.chart.time.getDateFormat(O.closestPointRange, d, O.options.startOfWeek, T) || T.year : T.day;
- }, f;
- }();
- G.Additions = x;
- }(V || (V = {})), V;
- }), M(o, "Core/Axis/LogarithmicAxis.js", [o["Core/Utilities.js"]], function(y) {
- var N = y.addEvent, D = y.getMagnitude, U = y.normalizeTickInterval, H = y.pick, V;
- return function(G) {
- function R(f) {
- var d = this.logarithmic;
- f.userOptions.type !== "logarithmic" ? this.logarithmic = void 0 : d || (this.logarithmic = new x(this));
- }
- function B() {
- var f = this.logarithmic;
- f && (this.lin2val = function(d) {
- return f.lin2log(d);
- }, this.val2lin = function(d) {
- return f.log2lin(d);
- });
- }
- var S = [];
- G.compose = function(f) {
- return S.indexOf(f) === -1 && (S.push(f), f.keepProps.push("logarithmic"), N(f, "init", R), N(f, "afterInit", B)), f;
- };
- var x = function() {
- function f(d) {
- this.axis = d;
- }
- return f.prototype.getLogTickPositions = function(d, T, O, j) {
- var k = this.axis, b = k.len, w = k.options, v = [];
- if (j || (this.minorAutoInterval = void 0), 0.5 <= d)
- d = Math.round(d), v = k.getLinearTickPositions(d, T, O);
- else if (0.08 <= d) {
- var l = Math.floor(T), h, u = w = void 0;
- for (b = 0.3 < d ? [1, 2, 4] : 0.15 < d ? [1, 2, 4, 6, 8] : [1, 2, 3, 4, 5, 6, 7, 8, 9]; l < O + 1 && !u; l++) {
- var i = b.length;
- for (h = 0; h < i && !u; h++) {
- var c = this.log2lin(this.lin2log(l) * b[h]);
- c > T && (!j || w <= O) && typeof w < "u" && v.push(w), w > O && (u = !0), w = c;
- }
- }
- } else
- T = this.lin2log(T), O = this.lin2log(O), d = j ? k.getMinorTickInterval() : w.tickInterval, d = H(d === "auto" ? null : d, this.minorAutoInterval, w.tickPixelInterval / (j ? 5 : 1) * (O - T) / ((j ? b / k.tickPositions.length : b) || 1)), d = U(d, void 0, D(d)), v = k.getLinearTickPositions(d, T, O).map(this.log2lin), j || (this.minorAutoInterval = d / 5);
- return j || (k.tickInterval = d), v;
- }, f.prototype.lin2log = function(d) {
- return Math.pow(10, d);
- }, f.prototype.log2lin = function(d) {
- return Math.log(d) / Math.LN10;
- }, f;
- }();
- G.Additions = x;
- }(V || (V = {})), V;
- }), M(o, "Core/Axis/PlotLineOrBand/PlotLineOrBandAxis.js", [o["Core/Utilities.js"]], function(y) {
- var N = y.erase, D = y.extend, U = y.isNumber, H;
- return function(V) {
- var G = [], R;
- V.compose = function(S, x) {
- return R || (R = S), G.indexOf(x) === -1 && (G.push(x), D(x.prototype, B.prototype)), x;
- };
- var B = function() {
- function S() {
- }
- return S.prototype.getPlotBandPath = function(x, f, d) {
- d === void 0 && (d = this.options);
- var T = this.getPlotLinePath({ value: f, force: !0, acrossPanes: d.acrossPanes }), O = [], j = this.horiz;
- if (f = !U(this.min) || !U(this.max) || x < this.min && f < this.min || x > this.max && f > this.max, x = this.getPlotLinePath({ value: x, force: !0, acrossPanes: d.acrossPanes }), d = 1, x && T) {
- if (f) {
- var k = x.toString() === T.toString();
- d = 0;
- }
- for (f = 0; f < x.length; f += 2) {
- var b = x[f], w = x[f + 1], v = T[f], l = T[f + 1];
- b[0] !== "M" && b[0] !== "L" || w[0] !== "M" && w[0] !== "L" || v[0] !== "M" && v[0] !== "L" || l[0] !== "M" && l[0] !== "L" || (j && v[1] === b[1] ? (v[1] += d, l[1] += d) : j || v[2] !== b[2] || (v[2] += d, l[2] += d), O.push(["M", b[1], b[2]], ["L", w[1], w[2]], ["L", l[1], l[2]], ["L", v[1], v[2]], ["Z"])), O.isFlat = k;
- }
- }
- return O;
- }, S.prototype.addPlotBand = function(x) {
- return this.addPlotBandOrLine(x, "plotBands");
- }, S.prototype.addPlotLine = function(x) {
- return this.addPlotBandOrLine(x, "plotLines");
- }, S.prototype.addPlotBandOrLine = function(x, f) {
- var d = this, T = this.userOptions, O = new R(this, x);
- if (this.visible && (O = O.render()), O) {
- if (this._addedPlotLB || (this._addedPlotLB = !0, (T.plotLines || []).concat(T.plotBands || []).forEach(function(k) {
- d.addPlotBandOrLine(k);
- })), f) {
- var j = T[f] || [];
- j.push(x), T[f] = j;
- }
- this.plotLinesAndBands.push(O);
- }
- return O;
- }, S.prototype.removePlotBandOrLine = function(x) {
- var f = this.plotLinesAndBands, d = this.options, T = this.userOptions;
- if (f) {
- for (var O = f.length; O--; )
- f[O].id === x && f[O].destroy();
- [d.plotLines || [], T.plotLines || [], d.plotBands || [], T.plotBands || []].forEach(function(j) {
- for (O = j.length; O--; )
- (j[O] || {}).id === x && N(j, j[O]);
- });
- }
- }, S.prototype.removePlotBand = function(x) {
- this.removePlotBandOrLine(x);
- }, S.prototype.removePlotLine = function(x) {
- this.removePlotBandOrLine(x);
- }, S;
- }();
- }(H || (H = {})), H;
- }), M(o, "Core/Axis/PlotLineOrBand/PlotLineOrBand.js", [o["Core/Axis/PlotLineOrBand/PlotLineOrBandAxis.js"], o["Core/Utilities.js"]], function(y, N) {
- var D = N.arrayMax, U = N.arrayMin, H = N.defined, V = N.destroyObjectProperties, G = N.erase, R = N.fireEvent, B = N.merge, S = N.objectEach, x = N.pick;
- return N = function() {
- function f(d, T) {
- this.axis = d, T && (this.options = T, this.id = T.id);
- }
- return f.compose = function(d) {
- return y.compose(f, d);
- }, f.prototype.render = function() {
- R(this, "render");
- var d = this, T = d.axis, O = T.horiz, j = T.logarithmic, k = d.options, b = k.color, w = x(k.zIndex, 0), v = k.events, l = {}, h = T.chart.renderer, u = k.label, i = d.label, c = k.to, a = k.from, t = k.value, s = d.svgElem, n = [], P = H(a) && H(c);
- n = H(t);
- var _ = !s, I = { class: "highcharts-plot-" + (P ? "band " : "line ") + (k.className || "") }, W = P ? "bands" : "lines";
- if (j && (a = j.log2lin(a), c = j.log2lin(c), t = j.log2lin(t)), T.chart.styledMode || (n ? (I.stroke = b || "#999999", I["stroke-width"] = x(k.width, 1), k.dashStyle && (I.dashstyle = k.dashStyle)) : P && (I.fill = b || "#e6ebf5", k.borderWidth && (I.stroke = k.borderColor, I["stroke-width"] = k.borderWidth))), l.zIndex = w, W += "-" + w, (j = T.plotLinesAndBandsGroups[W]) || (T.plotLinesAndBandsGroups[W] = j = h.g("plot-" + W).attr(l).add()), _ && (d.svgElem = s = h.path().attr(I).add(j)), n)
- n = T.getPlotLinePath({ value: t, lineWidth: s.strokeWidth(), acrossPanes: k.acrossPanes });
- else if (P)
- n = T.getPlotBandPath(
- a,
- c,
- k
- );
- else
- return;
- return !d.eventsAdded && v && (S(v, function(E, X) {
- s.on(X, function(g) {
- v[X].apply(d, [g]);
- });
- }), d.eventsAdded = !0), (_ || !s.d) && n && n.length ? s.attr({ d: n }) : s && (n ? (s.show(!0), s.animate({ d: n })) : s.d && (s.hide(), i && (d.label = i = i.destroy()))), u && (H(u.text) || H(u.formatter)) && n && n.length && 0 < T.width && 0 < T.height && !n.isFlat ? (u = B({ align: O && P && "center", x: O ? !P && 4 : 10, verticalAlign: !O && P && "middle", y: O ? P ? 16 : 10 : P ? 6 : -4, rotation: O && !P && 90 }, u), this.renderLabel(u, n, P, w)) : i && i.hide(), d;
- }, f.prototype.renderLabel = function(d, T, O, j) {
- var k = this.axis, b = k.chart.renderer, w = this.label;
- w || (this.label = w = b.text(this.getLabelText(d), 0, 0, d.useHTML).attr({ align: d.textAlign || d.align, rotation: d.rotation, class: "highcharts-plot-" + (O ? "band" : "line") + "-label " + (d.className || ""), zIndex: j }).add(), k.chart.styledMode || w.css(B({ textOverflow: "ellipsis" }, d.style))), j = T.xBounds || [T[0][1], T[1][1], O ? T[2][1] : T[0][1]], T = T.yBounds || [T[0][2], T[1][2], O ? T[2][2] : T[0][2]], O = U(j), b = U(T), w.align(d, !1, { x: O, y: b, width: D(j) - O, height: D(T) - b }), w.alignValue && w.alignValue !== "left" || w.css({ width: (w.rotation === 90 ? k.height - (w.alignAttr.y - k.top) : k.width - (w.alignAttr.x - k.left)) + "px" }), w.show(!0);
- }, f.prototype.getLabelText = function(d) {
- return H(d.formatter) ? d.formatter.call(this) : d.text;
- }, f.prototype.destroy = function() {
- G(this.axis.plotLinesAndBands, this), delete this.axis, V(this);
- }, f;
- }(), N;
- }), M(
- o,
- "Core/Tooltip.js",
- [o["Core/FormatUtilities.js"], o["Core/Globals.js"], o["Core/Renderer/RendererUtilities.js"], o["Core/Renderer/RendererRegistry.js"], o["Core/Utilities.js"]],
- function(y, N, D, U, H) {
- var V = y.format, G = N.doc, R = D.distribute, B = H.addEvent, S = H.clamp, x = H.css, f = H.defined, d = H.discardElement, T = H.extend, O = H.fireEvent, j = H.isArray, k = H.isNumber, b = H.isString, w = H.merge, v = H.pick, l = H.splat, h = H.syncTimeout;
- return y = function() {
- function u(i, c) {
- this.allowShared = !0, this.container = void 0, this.crosshairs = [], this.distance = 0, this.isHidden = !0, this.isSticky = !1, this.now = {}, this.options = {}, this.outside = !1, this.chart = i, this.init(i, c);
- }
- return u.prototype.applyFilter = function() {
- var i = this.chart;
- i.renderer.definition({
- tagName: "filter",
- attributes: { id: "drop-shadow-" + i.index, opacity: 0.5 },
- children: [{ tagName: "feGaussianBlur", attributes: { in: "SourceAlpha", stdDeviation: 1 } }, { tagName: "feOffset", attributes: { dx: 1, dy: 1 } }, { tagName: "feComponentTransfer", children: [{ tagName: "feFuncA", attributes: { type: "linear", slope: 0.3 } }] }, { tagName: "feMerge", children: [{ tagName: "feMergeNode" }, { tagName: "feMergeNode", attributes: { in: "SourceGraphic" } }] }]
- });
- }, u.prototype.bodyFormatter = function(i) {
- return i.map(function(c) {
- var a = c.series.tooltipOptions;
- return (a[(c.point.formatPrefix || "point") + "Formatter"] || c.point.tooltipFormatter).call(c.point, a[(c.point.formatPrefix || "point") + "Format"] || "");
- });
- }, u.prototype.cleanSplit = function(i) {
- this.chart.series.forEach(function(c) {
- var a = c && c.tt;
- a && (!a.isActive || i ? c.tt = a.destroy() : a.isActive = !1);
- });
- }, u.prototype.defaultFormatter = function(i) {
- var c = this.points || l(this), a = [i.tooltipFooterHeaderFormatter(c[0])];
- return a = a.concat(i.bodyFormatter(c)), a.push(i.tooltipFooterHeaderFormatter(c[0], !0)), a;
- }, u.prototype.destroy = function() {
- this.label && (this.label = this.label.destroy()), this.split && this.tt && (this.cleanSplit(!0), this.tt = this.tt.destroy()), this.renderer && (this.renderer = this.renderer.destroy(), d(this.container)), H.clearTimeout(this.hideTimer), H.clearTimeout(this.tooltipTimeout);
- }, u.prototype.getAnchor = function(i, c) {
- var a = this.chart, t = a.pointer, s = a.inverted, n = a.plotTop, P = a.plotLeft, _, I, W = 0, E = 0;
- return i = l(i), this.followPointer && c ? (typeof c.chartX > "u" && (c = t.normalize(c)), t = [c.chartX - P, c.chartY - n]) : i[0].tooltipPos ? t = i[0].tooltipPos : (i.forEach(function(X) {
- _ = X.series.yAxis, I = X.series.xAxis, W += X.plotX || 0, E += X.plotLow ? (X.plotLow + (X.plotHigh || 0)) / 2 : X.plotY || 0, I && _ && (s ? (W += n + a.plotHeight - I.len - I.pos, E += P + a.plotWidth - _.len - _.pos) : (W += I.pos - P, E += _.pos - n));
- }), W /= i.length, E /= i.length, t = [s ? a.plotWidth - E : W, s ? a.plotHeight - W : E], this.shared && 1 < i.length && c && (s ? t[0] = c.chartX - P : t[1] = c.chartY - n)), t.map(Math.round);
- }, u.prototype.getLabel = function() {
- var i = this, c = this.chart.styledMode, a = this.options, t = this.split && this.allowShared, s = "tooltip" + (f(a.className) ? " " + a.className : ""), n = a.style.pointerEvents || (!this.followPointer && a.stickOnContact ? "auto" : "none"), P = function() {
- i.inContact = !0;
- }, _ = function(z) {
- var $ = i.chart.hoverSeries;
- i.inContact = i.shouldStickOnContact() && i.chart.pointer.inClass(z.relatedTarget, "highcharts-tooltip"), !i.inContact && $ && $.onMouseOut && $.onMouseOut();
- }, I, W = this.chart.renderer;
- if (i.label) {
- var E = !i.label.hasClass("highcharts-label");
- (t && !E || !t && E) && i.destroy();
- }
- if (!this.label) {
- if (this.outside) {
- E = this.chart.options.chart.style;
- var X = U.getRendererType();
- this.container = I = N.doc.createElement("div"), I.className = "highcharts-tooltip-container", x(I, { position: "absolute", top: "1px", pointerEvents: n, zIndex: Math.max(this.options.style.zIndex || 0, (E && E.zIndex || 0) + 3) }), B(I, "mouseenter", P), B(I, "mouseleave", _), N.doc.body.appendChild(I), this.renderer = W = new X(I, 0, 0, E, void 0, void 0, W.styledMode);
- }
- if (t ? this.label = W.g(s) : (this.label = W.label("", 0, 0, a.shape, void 0, void 0, a.useHTML, void 0, s).attr({ padding: a.padding, r: a.borderRadius }), c || this.label.attr({
- fill: a.backgroundColor,
- "stroke-width": a.borderWidth
- }).css(a.style).css({ pointerEvents: n }).shadow(a.shadow)), c && a.shadow && (this.applyFilter(), this.label.attr({ filter: "url(#drop-shadow-" + this.chart.index + ")" })), i.outside && !i.split) {
- var g = this.label, m = g.xSetter, L = g.ySetter;
- g.xSetter = function(z) {
- m.call(g, i.distance), I.style.left = z + "px";
- }, g.ySetter = function(z) {
- L.call(g, i.distance), I.style.top = z + "px";
- };
- }
- this.label.on("mouseenter", P).on("mouseleave", _).attr({ zIndex: 8 }).add();
- }
- return this.label;
- }, u.prototype.getPosition = function(i, c, a) {
- var t = this.chart, s = this.distance, n = {}, P = t.inverted && a.h || 0, _ = this.outside, I = _ ? G.documentElement.clientWidth - 2 * s : t.chartWidth, W = _ ? Math.max(G.body.scrollHeight, G.documentElement.scrollHeight, G.body.offsetHeight, G.documentElement.offsetHeight, G.documentElement.clientHeight) : t.chartHeight, E = t.pointer.getChartPosition(), X = function(Y) {
- var Z = Y === "x";
- return [Y, Z ? I : W, Z ? i : c].concat(_ ? [Z ? i * E.scaleX : c * E.scaleY, Z ? E.left - s + (a.plotX + t.plotLeft) * E.scaleX : E.top - s + (a.plotY + t.plotTop) * E.scaleY, 0, Z ? I : W] : [Z ? i : c, Z ? a.plotX + t.plotLeft : a.plotY + t.plotTop, Z ? t.plotLeft : t.plotTop, Z ? t.plotLeft + t.plotWidth : t.plotTop + t.plotHeight]);
- }, g = X("y"), m = X("x"), L;
- X = !!a.negative, !t.polar && t.hoverSeries && t.hoverSeries.yAxis && t.hoverSeries.yAxis.reversed && (X = !X);
- var z = !this.followPointer && v(a.ttBelow, !t.inverted === X), $ = function(Y, Z, q, it, et, nt, rt) {
- var ct = _ ? Y === "y" ? s * E.scaleY : s * E.scaleX : s, gt = (q - it) / 2, dt = it < et - s, ht = et + s + it < Z, at = et - ct - q + gt;
- if (et = et + ct - gt, z && ht)
- n[Y] = et;
- else if (!z && dt)
- n[Y] = at;
- else if (dt)
- n[Y] = Math.min(rt - it, 0 > at - P ? at : at - P);
- else if (ht)
- n[Y] = Math.max(nt, et + P + q > Z ? et : et + P);
- else
- return !1;
- }, Q = function(Y, Z, q, it, et) {
- var nt;
- return et < s || et > Z - s ? nt = !1 : n[Y] = et < q / 2 ? 1 : et > Z - it / 2 ? Z - it - 2 : et - q / 2, nt;
- }, A = function(Y) {
- var Z = g;
- g = m, m = Z, L = Y;
- }, F = function() {
- $.apply(0, g) !== !1 ? Q.apply(0, m) !== !1 || L || (A(!0), F()) : L ? n.x = n.y = 0 : (A(!0), F());
- };
- return (t.inverted || 1 < this.len) && A(), F(), n;
- }, u.prototype.hide = function(i) {
- var c = this;
- H.clearTimeout(this.hideTimer), i = v(i, this.options.hideDelay), this.isHidden || (this.hideTimer = h(function() {
- c.getLabel().fadeOut(i && void 0), c.isHidden = !0;
- }, i));
- }, u.prototype.init = function(i, c) {
- this.chart = i, this.options = c, this.crosshairs = [], this.now = { x: 0, y: 0 }, this.isHidden = !0, this.split = c.split && !i.inverted && !i.polar, this.shared = c.shared || this.split, this.outside = v(c.outside, !(!i.scrollablePixelsX && !i.scrollablePixelsY));
- }, u.prototype.shouldStickOnContact = function() {
- return !(this.followPointer || !this.options.stickOnContact);
- }, u.prototype.isStickyOnContact = function() {
- return !(!this.shouldStickOnContact() || !this.inContact);
- }, u.prototype.move = function(i, c, a, t) {
- var s = this, n = s.now, P = s.options.animation !== !1 && !s.isHidden && (1 < Math.abs(i - n.x) || 1 < Math.abs(c - n.y)), _ = s.followPointer || 1 < s.len;
- T(n, { x: P ? (2 * n.x + i) / 3 : i, y: P ? (n.y + c) / 2 : c, anchorX: _ ? void 0 : P ? (2 * n.anchorX + a) / 3 : a, anchorY: _ ? void 0 : P ? (n.anchorY + t) / 2 : t }), s.getLabel().attr(n), s.drawTracker(), P && (H.clearTimeout(this.tooltipTimeout), this.tooltipTimeout = setTimeout(function() {
- s && s.move(i, c, a, t);
- }, 32));
- }, u.prototype.refresh = function(i, c) {
- var a = this.chart, t = this.options, s = l(i), n = s[0], P = [], _ = t.formatter || this.defaultFormatter, I = this.shared, W = a.styledMode, E = {};
- if (t.enabled) {
- H.clearTimeout(this.hideTimer), this.allowShared = !(!j(i) && i.series && i.series.noSharedTooltip), this.followPointer = !this.split && n.series.tooltipOptions.followPointer, i = this.getAnchor(i, c);
- var X = i[0], g = i[1];
- if (I && this.allowShared ? (a.pointer.applyInactiveState(s), s.forEach(function(z) {
- z.setState("hover"), P.push(z.getLabelConfig());
- }), E = { x: n.category, y: n.y }, E.points = P) : E = n.getLabelConfig(), this.len = P.length, _ = _.call(E, this), I = n.series, this.distance = v(I.tooltipOptions.distance, 16), _ === !1)
- this.hide();
- else {
- if (this.split && this.allowShared)
- this.renderSplit(
- _,
- s
- );
- else {
- var m = X, L = g;
- if (c && a.pointer.isDirectTouch && (m = c.chartX - a.plotLeft, L = c.chartY - a.plotTop), a.polar || I.options.clip === !1 || s.some(function(z) {
- return z.series.shouldShowTooltip(m, L);
- }))
- c = this.getLabel(), t.style.width && !W || c.css({ width: this.chart.spacingBox.width + "px" }), c.attr({ text: _ && _.join ? _.join("") : _ }), c.removeClass(/highcharts-color-[\d]+/g).addClass("highcharts-color-" + v(n.colorIndex, I.colorIndex)), W || c.attr({ stroke: t.borderColor || n.color || I.color || "#666666" }), this.updatePosition({
- plotX: X,
- plotY: g,
- negative: n.negative,
- ttBelow: n.ttBelow,
- h: i[2] || 0
- });
- else {
- this.hide();
- return;
- }
- }
- this.isHidden && this.label && this.label.attr({ opacity: 1 }).show(), this.isHidden = !1;
- }
- O(this, "refresh");
- }
- }, u.prototype.renderSplit = function(i, c) {
- function a(ht, at, J, tt, ot) {
- return ot === void 0 && (ot = !0), J ? (at = it ? 0 : ct, ht = S(ht - tt / 2, Y.left, Y.right - tt - (t.outside ? et : 0))) : (at -= nt, ht = ot ? ht - tt - Q : ht + Q, ht = S(ht, ot ? ht : Y.left, Y.right)), { x: ht, y: at };
- }
- var t = this, s = t.chart, n = t.chart, P = n.chartWidth, _ = n.chartHeight, I = n.plotHeight, W = n.plotLeft, E = n.plotTop, X = n.pointer, g = n.scrollablePixelsY;
- g = g === void 0 ? 0 : g;
- var m = n.scrollablePixelsX, L = n.scrollingContainer;
- L = L === void 0 ? { scrollLeft: 0, scrollTop: 0 } : L;
- var z = L.scrollLeft;
- L = L.scrollTop;
- var $ = n.styledMode, Q = t.distance, A = t.options, F = t.options.positioner, Y = t.outside && typeof m != "number" ? G.documentElement.getBoundingClientRect() : { left: z, right: z + P, top: L, bottom: L + _ }, Z = t.getLabel(), q = this.renderer || s.renderer, it = !(!s.xAxis[0] || !s.xAxis[0].opposite);
- s = X.getChartPosition();
- var et = s.left;
- s = s.top;
- var nt = E + L, rt = 0, ct = I - g;
- b(i) && (i = [!1, i]), i = i.slice(0, c.length + 1).reduce(function(ht, at, J) {
- if (at !== !1 && at !== "") {
- J = c[J - 1] || { isHeader: !0, plotX: c[0].plotX, plotY: I, series: {} };
- var tt = J.isHeader, ot = tt ? t : J.series;
- at = at.toString();
- var lt = ot.tt, pt = J.isHeader, yt = J.series, vt = "highcharts-color-" + v(J.colorIndex, yt.colorIndex, "none");
- if (lt || (lt = { padding: A.padding, r: A.borderRadius }, $ || (lt.fill = A.backgroundColor, lt["stroke-width"] = A.borderWidth), lt = q.label("", 0, 0, A[pt ? "headerShape" : "shape"], void 0, void 0, A.useHTML).addClass((pt ? "highcharts-tooltip-header " : "") + "highcharts-tooltip-box " + vt).attr(lt).add(Z)), lt.isActive = !0, lt.attr({ text: at }), $ || lt.css(A.style).shadow(A.shadow).attr({ stroke: A.borderColor || J.color || yt.color || "#333333" }), ot = ot.tt = lt, pt = ot.getBBox(), at = pt.width + ot.strokeWidth(), tt && (rt = pt.height, ct += rt, it && (nt -= rt)), yt = J.plotX, yt = yt === void 0 ? 0 : yt, vt = J.plotY, vt = vt === void 0 ? 0 : vt, lt = J.series, J.isHeader) {
- yt = W + yt;
- var Mt = E + I / 2;
- } else {
- var Pt = lt.xAxis, At = lt.yAxis;
- yt = Pt.pos + S(yt, -Q, Pt.len + Q), lt.shouldShowTooltip(0, At.pos - E + vt, { ignoreX: !0 }) && (Mt = At.pos + vt);
- }
- yt = S(yt, Y.left - Q, Y.right + Q), typeof Mt == "number" ? (pt = pt.height + 1, vt = F ? F.call(t, at, pt, J) : a(
- yt,
- Mt,
- tt,
- at
- ), ht.push({ align: F ? 0 : void 0, anchorX: yt, anchorY: Mt, boxWidth: at, point: J, rank: v(vt.rank, tt ? 1 : 0), size: pt, target: vt.y, tt: ot, x: vt.x })) : ot.isActive = !1;
- }
- return ht;
- }, []), !F && i.some(function(ht) {
- var at = (t.outside ? et : 0) + ht.anchorX;
- return at < Y.left && at + ht.boxWidth < Y.right ? !0 : at < et - Y.left + ht.boxWidth && Y.right - at > at;
- }) && (i = i.map(function(ht) {
- var at = a(ht.anchorX, ht.anchorY, ht.point.isHeader, ht.boxWidth, !1);
- return T(ht, { target: at.y, x: at.x });
- })), t.cleanSplit(), R(i, ct);
- var gt = et, dt = et;
- i.forEach(function(ht) {
- var at = ht.x, J = ht.boxWidth;
- ht = ht.isHeader, ht || (t.outside && et + at < gt && (gt = et + at), !ht && t.outside && gt + J > dt && (dt = et + at));
- }), i.forEach(function(ht) {
- var at = ht.x, J = ht.anchorX, tt = ht.pos, ot = ht.point.isHeader;
- if (tt = { visibility: typeof tt > "u" ? "hidden" : "inherit", x: at, y: tt + nt, anchorX: J, anchorY: ht.anchorY }, t.outside && at < J) {
- var lt = et - gt;
- 0 < lt && (ot || (tt.x = at + lt, tt.anchorX = J + lt), ot && (tt.x = (dt - gt) / 2, tt.anchorX = J + lt));
- }
- ht.tt.attr(tt);
- }), i = t.container, g = t.renderer, t.outside && i && g && (n = Z.getBBox(), g.setSize(n.width + n.x, n.height + n.y, !1), i.style.left = gt + "px", i.style.top = s + "px");
- }, u.prototype.drawTracker = function() {
- if (this.followPointer || !this.options.stickOnContact)
- this.tracker && this.tracker.destroy();
- else {
- var i = this.chart, c = this.label, a = this.shared ? i.hoverPoints : i.hoverPoint;
- if (c && a) {
- var t = { x: 0, y: 0, width: 0, height: 0 };
- a = this.getAnchor(a);
- var s = c.getBBox();
- a[0] += i.plotLeft - c.translateX, a[1] += i.plotTop - c.translateY, t.x = Math.min(0, a[0]), t.y = Math.min(0, a[1]), t.width = 0 > a[0] ? Math.max(Math.abs(a[0]), s.width - a[0]) : Math.max(Math.abs(a[0]), s.width), t.height = 0 > a[1] ? Math.max(Math.abs(a[1]), s.height - Math.abs(a[1])) : Math.max(Math.abs(a[1]), s.height), this.tracker ? this.tracker.attr(t) : (this.tracker = c.renderer.rect(t).addClass("highcharts-tracker").add(c), i.styledMode || this.tracker.attr({ fill: "rgba(0,0,0,0)" }));
- }
- }
- }, u.prototype.styledModeFormat = function(i) {
- return i.replace('style="font-size: 10px"', 'class="highcharts-header"').replace(/style="color:{(point|series)\.color}"/g, 'class="highcharts-color-{$1.colorIndex}"');
- }, u.prototype.tooltipFooterHeaderFormatter = function(i, c) {
- var a = i.series, t = a.tooltipOptions, s = a.xAxis, n = s && s.dateTime;
- s = {
- isFooter: c,
- labelConfig: i
- };
- var P = t.xDateFormat, _ = t[c ? "footerFormat" : "headerFormat"];
- return O(this, "headerFormatter", s, function(I) {
- n && !P && k(i.key) && (P = n.getXDateFormat(i.key, t.dateTimeLabelFormats)), n && P && (i.point && i.point.tooltipDateKeys || ["key"]).forEach(function(W) {
- _ = _.replace("{point." + W + "}", "{point." + W + ":" + P + "}");
- }), a.chart.styledMode && (_ = this.styledModeFormat(_)), I.text = V(_, { point: i, series: a }, this.chart);
- }), s.text;
- }, u.prototype.update = function(i) {
- this.destroy(), w(!0, this.chart.options.tooltip.userOptions, i), this.init(this.chart, w(!0, this.options, i));
- }, u.prototype.updatePosition = function(i) {
- var c = this.chart, a = this.options, t = c.pointer, s = this.getLabel();
- t = t.getChartPosition();
- var n = (a.positioner || this.getPosition).call(this, s.width, s.height, i), P = i.plotX + c.plotLeft;
- i = i.plotY + c.plotTop, this.outside && (a = a.borderWidth + 2 * this.distance, this.renderer.setSize(s.width + a, s.height + a, !1), (t.scaleX !== 1 || t.scaleY !== 1) && (x(this.container, { transform: "scale(" + t.scaleX + ", " + t.scaleY + ")" }), P *= t.scaleX, i *= t.scaleY), P += t.left - n.x, i += t.top - n.y), this.move(Math.round(n.x), Math.round(n.y || 0), P, i);
- }, u;
- }(), y;
- }
- ), M(o, "Core/Series/Point.js", [o["Core/Renderer/HTML/AST.js"], o["Core/Animation/AnimationUtilities.js"], o["Core/DefaultOptions.js"], o["Core/FormatUtilities.js"], o["Core/Utilities.js"]], function(y, N, D, U, H) {
- var V = N.animObject, G = D.defaultOptions, R = U.format, B = H.addEvent, S = H.defined, x = H.erase, f = H.extend, d = H.fireEvent, T = H.getNestedProperty, O = H.isArray, j = H.isFunction, k = H.isNumber, b = H.isObject, w = H.merge, v = H.objectEach, l = H.pick, h = H.syncTimeout, u = H.removeEvent, i = H.uniqueKey;
- return N = function() {
- function c() {
- this.colorIndex = this.category = void 0, this.formatPrefix = "point", this.id = void 0, this.isNull = !1, this.percentage = this.options = this.name = void 0, this.selected = !1, this.total = this.series = void 0, this.visible = !0, this.x = void 0;
- }
- return c.prototype.animateBeforeDestroy = function() {
- var a = this, t = { x: a.startXPos, opacity: 0 }, s = a.getGraphicalProps();
- s.singular.forEach(function(n) {
- a[n] = a[n].animate(n === "dataLabel" ? {
- x: a[n].startXPos,
- y: a[n].startYPos,
- opacity: 0
- } : t);
- }), s.plural.forEach(function(n) {
- a[n].forEach(function(P) {
- P.element && P.animate(f({ x: a.startXPos }, P.startYPos ? { x: P.startXPos, y: P.startYPos } : {}));
- });
- });
- }, c.prototype.applyOptions = function(a, t) {
- var s = this.series, n = s.options.pointValKey || s.pointValKey;
- return a = c.prototype.optionsToObject.call(this, a), f(this, a), this.options = this.options ? f(this.options, a) : a, a.group && delete this.group, a.dataLabels && delete this.dataLabels, n && (this.y = c.prototype.getNestedProperty.call(this, n)), this.formatPrefix = (this.isNull = l(this.isValid && !this.isValid(), this.x === null || !k(this.y))) ? "null" : "point", this.selected && (this.state = "select"), "name" in this && typeof t > "u" && s.xAxis && s.xAxis.hasNames && (this.x = s.xAxis.nameToX(this)), typeof this.x > "u" && s ? this.x = typeof t > "u" ? s.autoIncrement() : t : k(a.x) && s.options.relativeXValue && (this.x = s.autoIncrement(a.x)), this;
- }, c.prototype.destroy = function() {
- function a() {
- (t.graphic || t.dataLabel || t.dataLabels) && (u(t), t.destroyElements());
- for (I in t)
- t[I] = null;
- }
- var t = this, s = t.series, n = s.chart;
- s = s.options.dataSorting;
- var P = n.hoverPoints, _ = V(t.series.chart.renderer.globalAnimation), I;
- t.legendItem && n.legend.destroyItem(t), P && (t.setState(), x(P, t), P.length || (n.hoverPoints = null)), t === n.hoverPoint && t.onMouseOut(), s && s.enabled ? (this.animateBeforeDestroy(), h(a, _.duration)) : a(), n.pointCount--;
- }, c.prototype.destroyElements = function(a) {
- var t = this;
- a = t.getGraphicalProps(a), a.singular.forEach(function(s) {
- t[s] = t[s].destroy();
- }), a.plural.forEach(function(s) {
- t[s].forEach(function(n) {
- n.element && n.destroy();
- }), delete t[s];
- });
- }, c.prototype.firePointEvent = function(a, t, s) {
- var n = this, P = this.series.options;
- (P.point.events[a] || n.options && n.options.events && n.options.events[a]) && n.importEvents(), a === "click" && P.allowPointSelect && (s = function(_) {
- n.select && n.select(null, _.ctrlKey || _.metaKey || _.shiftKey);
- }), d(n, a, t, s);
- }, c.prototype.getClassName = function() {
- return "highcharts-point" + (this.selected ? " highcharts-point-select" : "") + (this.negative ? " highcharts-negative" : "") + (this.isNull ? " highcharts-null-point" : "") + (typeof this.colorIndex < "u" ? " highcharts-color-" + this.colorIndex : "") + (this.options.className ? " " + this.options.className : "") + (this.zone && this.zone.className ? " " + this.zone.className.replace("highcharts-negative", "") : "");
- }, c.prototype.getGraphicalProps = function(a) {
- var t = this, s = [], n = { singular: [], plural: [] }, P;
- for (a = a || { graphic: 1, dataLabel: 1 }, a.graphic && s.push("graphic", "upperGraphic", "shadowGroup"), a.dataLabel && s.push("dataLabel", "dataLabelUpper", "connector"), P = s.length; P--; ) {
- var _ = s[P];
- t[_] && n.singular.push(_);
- }
- return ["dataLabel", "connector"].forEach(function(I) {
- var W = I + "s";
- a[I] && t[W] && n.plural.push(W);
- }), n;
- }, c.prototype.getLabelConfig = function() {
- return { x: this.category, y: this.y, color: this.color, colorIndex: this.colorIndex, key: this.name || this.category, series: this.series, point: this, percentage: this.percentage, total: this.total || this.stackTotal };
- }, c.prototype.getNestedProperty = function(a) {
- if (a)
- return a.indexOf("custom.") === 0 ? T(a, this.options) : this[a];
- }, c.prototype.getZone = function() {
- var a = this.series, t = a.zones;
- a = a.zoneAxis || "y";
- var s, n = 0;
- for (s = t[n]; this[a] >= s.value; )
- s = t[++n];
- return this.nonZonedColor || (this.nonZonedColor = this.color), this.color = s && s.color && !this.options.color ? s.color : this.nonZonedColor, s;
- }, c.prototype.hasNewShapeType = function() {
- return (this.graphic && (this.graphic.symbolName || this.graphic.element.nodeName)) !== this.shapeType;
- }, c.prototype.init = function(a, t, s) {
- return this.series = a, this.applyOptions(t, s), this.id = S(this.id) ? this.id : i(), this.resolveColor(), a.chart.pointCount++, d(this, "afterInit"), this;
- }, c.prototype.optionsToObject = function(a) {
- var t = this.series, s = t.options.keys, n = s || t.pointArrayMap || ["y"], P = n.length, _ = {}, I = 0, W = 0;
- if (k(a) || a === null)
- _[n[0]] = a;
- else if (O(a))
- for (!s && a.length > P && (t = typeof a[0], t === "string" ? _.name = a[0] : t === "number" && (_.x = a[0]), I++); W < P; )
- s && typeof a[I] > "u" || (0 < n[W].indexOf(".") ? c.prototype.setNestedProperty(_, a[I], n[W]) : _[n[W]] = a[I]), I++, W++;
- else
- typeof a == "object" && (_ = a, a.dataLabels && (t._hasPointLabels = !0), a.marker && (t._hasPointMarkers = !0));
- return _;
- }, c.prototype.resolveColor = function() {
- var a = this.series, t = a.chart.styledMode, s = a.chart.options.chart.colorCount;
- if (delete this.nonZonedColor, a.options.colorByPoint) {
- if (!t) {
- s = a.options.colors || a.chart.options.colors;
- var n = s[a.colorCounter];
- s = s.length;
- }
- t = a.colorCounter, a.colorCounter++, a.colorCounter === s && (a.colorCounter = 0);
- } else
- t || (n = a.color), t = a.colorIndex;
- this.colorIndex = l(this.options.colorIndex, t), this.color = l(this.options.color, n);
- }, c.prototype.setNestedProperty = function(a, t, s) {
- return s.split(".").reduce(function(n, P, _, I) {
- return n[P] = I.length - 1 === _ ? t : b(n[P], !0) ? n[P] : {}, n[P];
- }, a), a;
- }, c.prototype.tooltipFormatter = function(a) {
- var t = this.series, s = t.tooltipOptions, n = l(s.valueDecimals, ""), P = s.valuePrefix || "", _ = s.valueSuffix || "";
- return t.chart.styledMode && (a = t.chart.tooltip.styledModeFormat(a)), (t.pointArrayMap || ["y"]).forEach(function(I) {
- I = "{point." + I, (P || _) && (a = a.replace(RegExp(I + "}", "g"), P + I + "}" + _)), a = a.replace(RegExp(I + "}", "g"), I + ":,." + n + "f}");
- }), R(a, { point: this, series: this.series }, t.chart);
- }, c.prototype.update = function(a, t, s, n) {
- function P() {
- _.applyOptions(a);
- var m = W && _.hasDummyGraphic;
- m = _.y === null ? !m : m, W && m && (_.graphic = W.destroy(), delete _.hasDummyGraphic), b(a, !0) && (W && W.element && a && a.marker && typeof a.marker.symbol < "u" && (_.graphic = W.destroy()), a && a.dataLabels && _.dataLabel && (_.dataLabel = _.dataLabel.destroy()), _.connector && (_.connector = _.connector.destroy())), g = _.index, I.updateParallelArrays(_, g), X.data[g] = b(X.data[g], !0) || b(a, !0) ? _.options : l(a, X.data[g]), I.isDirty = I.isDirtyData = !0, !I.fixedBox && I.hasCartesianSeries && (E.isDirtyBox = !0), X.legendType === "point" && (E.isDirtyLegend = !0), t && E.redraw(s);
- }
- var _ = this, I = _.series, W = _.graphic, E = I.chart, X = I.options, g;
- t = l(t, !0), n === !1 ? P() : _.firePointEvent("update", { options: a }, P);
- }, c.prototype.remove = function(a, t) {
- this.series.removePoint(this.series.data.indexOf(this), a, t);
- }, c.prototype.select = function(a, t) {
- var s = this, n = s.series, P = n.chart;
- this.selectedStaging = a = l(a, !s.selected), s.firePointEvent(a ? "select" : "unselect", { accumulate: t }, function() {
- s.selected = s.options.selected = a, n.options.data[n.data.indexOf(s)] = s.options, s.setState(a && "select"), t || P.getSelectedPoints().forEach(function(_) {
- var I = _.series;
- _.selected && _ !== s && (_.selected = _.options.selected = !1, I.options.data[I.data.indexOf(_)] = _.options, _.setState(P.hoverPoints && I.options.inactiveOtherPoints ? "inactive" : ""), _.firePointEvent("unselect"));
- });
- }), delete this.selectedStaging;
- }, c.prototype.onMouseOver = function(a) {
- var t = this.series.chart, s = t.pointer;
- a = a ? s.normalize(a) : s.getChartCoordinatesFromPoint(this, t.inverted), s.runPointActions(
- a,
- this
- );
- }, c.prototype.onMouseOut = function() {
- var a = this.series.chart;
- this.firePointEvent("mouseOut"), this.series.options.inactiveOtherPoints || (a.hoverPoints || []).forEach(function(t) {
- t.setState();
- }), a.hoverPoints = a.hoverPoint = null;
- }, c.prototype.importEvents = function() {
- if (!this.hasImportedEvents) {
- var a = this, t = w(a.series.options.point, a.options).events;
- a.events = t, v(t, function(s, n) {
- j(s) && B(a, n, s);
- }), this.hasImportedEvents = !0;
- }
- }, c.prototype.setState = function(a, t) {
- var s = this.series, n = this.state, P = s.options.states[a || "normal"] || {}, _ = G.plotOptions[s.type].marker && s.options.marker, I = _ && _.enabled === !1, W = _ && _.states && _.states[a || "normal"] || {}, E = W.enabled === !1, X = this.marker || {}, g = s.chart, m = _ && s.markerAttribs, L = s.halo, z, $ = s.stateMarkerGraphic;
- if (a = a || "", !(a === this.state && !t || this.selected && a !== "select" || P.enabled === !1 || a && (E || I && W.enabled === !1) || a && X.states && X.states[a] && X.states[a].enabled === !1)) {
- if (this.state = a, m && (z = s.markerAttribs(this, a)), this.graphic && !this.hasDummyGraphic) {
- if (n && this.graphic.removeClass("highcharts-point-" + n), a && this.graphic.addClass("highcharts-point-" + a), !g.styledMode) {
- var Q = s.pointAttribs(this, a), A = l(g.options.chart.animation, P.animation);
- s.options.inactiveOtherPoints && k(Q.opacity) && ((this.dataLabels || []).forEach(function(F) {
- F && F.animate({ opacity: Q.opacity }, A);
- }), this.connector && this.connector.animate({ opacity: Q.opacity }, A)), this.graphic.animate(Q, A);
- }
- z && this.graphic.animate(z, l(g.options.chart.animation, W.animation, _.animation)), $ && $.hide();
- } else
- a && W && (n = X.symbol || s.symbol, $ && $.currentSymbol !== n && ($ = $.destroy()), z && ($ ? $[t ? "animate" : "attr"]({ x: z.x, y: z.y }) : n && (s.stateMarkerGraphic = $ = g.renderer.symbol(n, z.x, z.y, z.width, z.height).add(s.markerGroup), $.currentSymbol = n)), !g.styledMode && $ && this.state !== "inactive" && $.attr(s.pointAttribs(this, a))), $ && ($[a && this.isInside ? "show" : "hide"](), $.element.point = this, $.addClass(this.getClassName(), !0));
- P = P.halo, z = ($ = this.graphic || $) && $.visibility || "inherit", P && P.size && $ && z !== "hidden" && !this.isCluster ? (L || (s.halo = L = g.renderer.path().add($.parentGroup)), L.show()[t ? "animate" : "attr"]({ d: this.haloPath(P.size) }), L.attr({ class: "highcharts-halo highcharts-color-" + l(this.colorIndex, s.colorIndex) + (this.className ? " " + this.className : ""), visibility: z, zIndex: -1 }), L.point = this, g.styledMode || L.attr(f({ fill: this.color || s.color, "fill-opacity": P.opacity }, y.filterUserAttributes(P.attributes || {})))) : L && L.point && L.point.haloPath && L.animate({ d: L.point.haloPath(0) }, null, L.hide), d(this, "afterSetState", { state: a });
- }
- }, c.prototype.haloPath = function(a) {
- return this.series.chart.renderer.symbols.circle(Math.floor(this.plotX) - a, this.plotY - a, 2 * a, 2 * a);
- }, c;
- }(), N;
- }), M(o, "Core/Pointer.js", [o["Core/Color/Color.js"], o["Core/Globals.js"], o["Core/Tooltip.js"], o["Core/Utilities.js"]], function(y, N, D, U) {
- var H = y.parse, V = N.charts, G = N.noop, R = U.addEvent, B = U.attr, S = U.css, x = U.defined, f = U.extend, d = U.find, T = U.fireEvent, O = U.isNumber, j = U.isObject, k = U.objectEach, b = U.offset, w = U.pick, v = U.splat;
- return y = function() {
- function l(h, u) {
- this.lastValidTouch = {}, this.pinchDown = [], this.runChartClick = !1, this.eventsToUnbind = [], this.chart = h, this.hasDragged = !1, this.options = u, this.init(h, u);
- }
- return l.prototype.applyInactiveState = function(h) {
- var u = [], i;
- (h || []).forEach(function(c) {
- i = c.series, u.push(i), i.linkedParent && u.push(i.linkedParent), i.linkedSeries && (u = u.concat(i.linkedSeries)), i.navigatorSeries && u.push(i.navigatorSeries);
- }), this.chart.series.forEach(function(c) {
- u.indexOf(c) === -1 ? c.setState("inactive", !0) : c.options.inactiveOtherPoints && c.setAllPointsToState("inactive");
- });
- }, l.prototype.destroy = function() {
- var h = this;
- this.eventsToUnbind.forEach(function(u) {
- return u();
- }), this.eventsToUnbind = [], N.chartCount || (l.unbindDocumentMouseUp && (l.unbindDocumentMouseUp = l.unbindDocumentMouseUp()), l.unbindDocumentTouchEnd && (l.unbindDocumentTouchEnd = l.unbindDocumentTouchEnd())), clearInterval(h.tooltipTimeout), k(h, function(u, i) {
- h[i] = void 0;
- });
- }, l.prototype.drag = function(h) {
- var u = this.chart, i = u.options.chart, c = this.zoomHor, a = this.zoomVert, t = u.plotLeft, s = u.plotTop, n = u.plotWidth, P = u.plotHeight, _ = this.mouseDownX || 0, I = this.mouseDownY || 0, W = j(i.panning) ? i.panning && i.panning.enabled : i.panning, E = i.panKey && h[i.panKey + "Key"], X = h.chartX, g = h.chartY, m = this.selectionMarker;
- if ((!m || !m.touch) && (X < t ? X = t : X > t + n && (X = t + n), g < s ? g = s : g > s + P && (g = s + P), this.hasDragged = Math.sqrt(Math.pow(_ - X, 2) + Math.pow(I - g, 2)), 10 < this.hasDragged)) {
- var L = u.isInsidePlot(_ - t, I - s, { visiblePlotOnly: !0 });
- !u.hasCartesianSeries && !u.mapView || !this.zoomX && !this.zoomY || !L || E || m || (this.selectionMarker = m = u.renderer.rect(t, s, c ? 1 : n, a ? 1 : P, 0).attr({ class: "highcharts-selection-marker", zIndex: 7 }).add(), u.styledMode || m.attr({ fill: i.selectionMarkerFill || H("#335cad").setOpacity(0.25).get() })), m && c && (c = X - _, m.attr({ width: Math.abs(c), x: (0 < c ? 0 : c) + _ })), m && a && (c = g - I, m.attr({ height: Math.abs(c), y: (0 < c ? 0 : c) + I })), L && !m && W && u.pan(h, i.panning);
- }
- }, l.prototype.dragStart = function(h) {
- var u = this.chart;
- u.mouseIsDown = h.type, u.cancelClick = !1, u.mouseDownX = this.mouseDownX = h.chartX, u.mouseDownY = this.mouseDownY = h.chartY;
- }, l.prototype.drop = function(h) {
- var u = this, i = this.chart, c = this.hasPinched;
- if (this.selectionMarker) {
- var a = this.selectionMarker, t = a.attr ? a.attr("x") : a.x, s = a.attr ? a.attr("y") : a.y, n = a.attr ? a.attr("width") : a.width, P = a.attr ? a.attr("height") : a.height, _ = { originalEvent: h, xAxis: [], yAxis: [], x: t, y: s, width: n, height: P }, I = !!i.mapView;
- (this.hasDragged || c) && (i.axes.forEach(function(W) {
- if (W.zoomEnabled && x(W.min) && (c || u[{ xAxis: "zoomX", yAxis: "zoomY" }[W.coll]]) && O(t) && O(s)) {
- var E = W.horiz, X = h.type === "touchend" ? W.minPixelPadding : 0, g = W.toValue((E ? t : s) + X);
- E = W.toValue((E ? t + n : s + P) - X), _[W.coll].push({ axis: W, min: Math.min(g, E), max: Math.max(g, E) }), I = !0;
- }
- }), I && T(i, "selection", _, function(W) {
- i.zoom(f(
- W,
- c ? { animation: !1 } : null
- ));
- })), O(i.index) && (this.selectionMarker = this.selectionMarker.destroy()), c && this.scaleGroups();
- }
- i && O(i.index) && (S(i.container, { cursor: i._cursor }), i.cancelClick = 10 < this.hasDragged, i.mouseIsDown = this.hasDragged = this.hasPinched = !1, this.pinchDown = []);
- }, l.prototype.findNearestKDPoint = function(h, u, i) {
- var c = this.chart, a = c.hoverPoint;
- if (c = c.tooltip, a && c && c.isStickyOnContact())
- return a;
- var t;
- return h.forEach(function(s) {
- var n = !(s.noSharedTooltip && u) && 0 > s.options.findNearestPointBy.indexOf("y");
- if (s = s.searchPoint(i, n), (n = j(s, !0) && s.series) && !(n = !j(t, !0))) {
- n = t.distX - s.distX;
- var P = t.dist - s.dist, _ = (s.series.group && s.series.group.zIndex) - (t.series.group && t.series.group.zIndex);
- n = 0 < (n !== 0 && u ? n : P !== 0 ? P : _ !== 0 ? _ : t.series.index > s.series.index ? -1 : 1);
- }
- n && (t = s);
- }), t;
- }, l.prototype.getChartCoordinatesFromPoint = function(h, u) {
- var i = h.series, c = i.xAxis;
- i = i.yAxis;
- var a = h.shapeArgs;
- if (c && i) {
- var t = w(h.clientX, h.plotX), s = h.plotY || 0;
- return h.isNode && a && O(a.x) && O(a.y) && (t = a.x, s = a.y), u ? { chartX: i.len + i.pos - s, chartY: c.len + c.pos - t } : { chartX: t + c.pos, chartY: s + i.pos };
- }
- if (a && a.x && a.y)
- return { chartX: a.x, chartY: a.y };
- }, l.prototype.getChartPosition = function() {
- if (this.chartPosition)
- return this.chartPosition;
- var h = this.chart.container, u = b(h);
- this.chartPosition = { left: u.left, top: u.top, scaleX: 1, scaleY: 1 };
- var i = h.offsetWidth;
- return h = h.offsetHeight, 2 < i && 2 < h && (this.chartPosition.scaleX = u.width / i, this.chartPosition.scaleY = u.height / h), this.chartPosition;
- }, l.prototype.getCoordinates = function(h) {
- var u = { xAxis: [], yAxis: [] };
- return this.chart.axes.forEach(function(i) {
- u[i.isXAxis ? "xAxis" : "yAxis"].push({ axis: i, value: i.toValue(h[i.horiz ? "chartX" : "chartY"]) });
- }), u;
- }, l.prototype.getHoverData = function(h, u, i, c, a, t) {
- var s = [];
- c = !(!c || !h);
- var n = { chartX: t ? t.chartX : void 0, chartY: t ? t.chartY : void 0, shared: a };
- T(this, "beforeGetHoverData", n);
- var P = u && !u.stickyTracking ? [u] : i.filter(function(I) {
- return n.filter ? n.filter(I) : I.visible && !(!a && I.directTouch) && w(I.options.enableMouseTracking, !0) && I.stickyTracking;
- }), _ = c || !t ? h : this.findNearestKDPoint(P, a, t);
- return u = _ && _.series, _ && (a && !u.noSharedTooltip ? (P = i.filter(function(I) {
- return n.filter ? n.filter(I) : I.visible && !(!a && I.directTouch) && w(I.options.enableMouseTracking, !0) && !I.noSharedTooltip;
- }), P.forEach(function(I) {
- var W = d(I.points, function(E) {
- return E.x === _.x && !E.isNull;
- });
- j(W) && (I.chart.isBoosting && (W = I.getPoint(W)), s.push(W));
- })) : s.push(_)), n = { hoverPoint: _ }, T(this, "afterGetHoverData", n), { hoverPoint: n.hoverPoint, hoverSeries: u, hoverPoints: s };
- }, l.prototype.getPointFromEvent = function(h) {
- h = h.target;
- for (var u; h && !u; )
- u = h.point, h = h.parentNode;
- return u;
- }, l.prototype.onTrackerMouseOut = function(h) {
- h = h.relatedTarget || h.toElement;
- var u = this.chart.hoverSeries;
- this.isDirectTouch = !1, !u || !h || u.stickyTracking || this.inClass(h, "highcharts-tooltip") || this.inClass(h, "highcharts-series-" + u.index) && this.inClass(h, "highcharts-tracker") || u.onMouseOut();
- }, l.prototype.inClass = function(h, u) {
- for (var i; h; ) {
- if (i = B(h, "class")) {
- if (i.indexOf(u) !== -1)
- return !0;
- if (i.indexOf("highcharts-container") !== -1)
- return !1;
- }
- h = h.parentNode;
- }
- }, l.prototype.init = function(h, u) {
- this.options = u, this.chart = h, this.runChartClick = !(!u.chart.events || !u.chart.events.click), this.pinchDown = [], this.lastValidTouch = {}, D && (h.tooltip = new D(h, u.tooltip), this.followTouchMove = w(u.tooltip.followTouchMove, !0)), this.setDOMEvents();
- }, l.prototype.normalize = function(h, u) {
- var i = h.touches, c = i ? i.length ? i.item(0) : w(i.changedTouches, h.changedTouches)[0] : h;
- return u || (u = this.getChartPosition()), i = c.pageX - u.left, c = c.pageY - u.top, i /= u.scaleX, c /= u.scaleY, f(h, { chartX: Math.round(i), chartY: Math.round(c) });
- }, l.prototype.onContainerClick = function(h) {
- var u = this.chart, i = u.hoverPoint;
- h = this.normalize(h);
- var c = u.plotLeft, a = u.plotTop;
- u.cancelClick || (i && this.inClass(h.target, "highcharts-tracker") ? (T(i.series, "click", f(h, { point: i })), u.hoverPoint && i.firePointEvent("click", h)) : (f(h, this.getCoordinates(h)), u.isInsidePlot(h.chartX - c, h.chartY - a, { visiblePlotOnly: !0 }) && T(u, "click", h)));
- }, l.prototype.onContainerMouseDown = function(h) {
- var u = ((h.buttons || h.button) & 1) === 1;
- h = this.normalize(h), N.isFirefox && h.button !== 0 && this.onContainerMouseMove(h), (typeof h.button > "u" || u) && (this.zoomOption(h), u && h.preventDefault && h.preventDefault(), this.dragStart(h));
- }, l.prototype.onContainerMouseLeave = function(h) {
- var u = V[w(l.hoverChartIndex, -1)], i = this.chart.tooltip;
- i && i.shouldStickOnContact() && this.inClass(h.relatedTarget, "highcharts-tooltip-container") || (h = this.normalize(h), u && (h.relatedTarget || h.toElement) && (u.pointer.reset(), u.pointer.chartPosition = void 0), i && !i.isHidden && this.reset());
- }, l.prototype.onContainerMouseEnter = function(h) {
- delete this.chartPosition;
- }, l.prototype.onContainerMouseMove = function(h) {
- var u = this.chart;
- h = this.normalize(h), this.setHoverChartIndex(), h.preventDefault || (h.returnValue = !1), (u.mouseIsDown === "mousedown" || this.touchSelect(h)) && this.drag(h), u.openMenu || !this.inClass(h.target, "highcharts-tracker") && !u.isInsidePlot(h.chartX - u.plotLeft, h.chartY - u.plotTop, { visiblePlotOnly: !0 }) || (this.inClass(h.target, "highcharts-no-tooltip") ? this.reset(!1, 0) : this.runPointActions(h));
- }, l.prototype.onDocumentTouchEnd = function(h) {
- var u = V[w(
- l.hoverChartIndex,
- -1
- )];
- u && u.pointer.drop(h);
- }, l.prototype.onContainerTouchMove = function(h) {
- this.touchSelect(h) ? this.onContainerMouseMove(h) : this.touch(h);
- }, l.prototype.onContainerTouchStart = function(h) {
- this.touchSelect(h) ? this.onContainerMouseDown(h) : (this.zoomOption(h), this.touch(h, !0));
- }, l.prototype.onDocumentMouseMove = function(h) {
- var u = this.chart, i = this.chartPosition;
- h = this.normalize(h, i);
- var c = u.tooltip;
- !i || c && c.isStickyOnContact() || u.isInsidePlot(h.chartX - u.plotLeft, h.chartY - u.plotTop, { visiblePlotOnly: !0 }) || this.inClass(h.target, "highcharts-tracker") || this.reset();
- }, l.prototype.onDocumentMouseUp = function(h) {
- var u = V[w(l.hoverChartIndex, -1)];
- u && u.pointer.drop(h);
- }, l.prototype.pinch = function(h) {
- var u = this, i = u.chart, c = u.pinchDown, a = h.touches || [], t = a.length, s = u.lastValidTouch, n = u.hasZoom, P = {}, _ = t === 1 && (u.inClass(h.target, "highcharts-tracker") && i.runTrackerClick || u.runChartClick), I = {}, W = u.selectionMarker;
- 1 < t ? u.initiated = !0 : t === 1 && this.followTouchMove && (u.initiated = !1), n && u.initiated && !_ && h.cancelable !== !1 && h.preventDefault(), [].map.call(a, function(E) {
- return u.normalize(E);
- }), h.type === "touchstart" ? ([].forEach.call(a, function(E, X) {
- c[X] = { chartX: E.chartX, chartY: E.chartY };
- }), s.x = [c[0].chartX, c[1] && c[1].chartX], s.y = [c[0].chartY, c[1] && c[1].chartY], i.axes.forEach(function(E) {
- if (E.zoomEnabled) {
- var X = i.bounds[E.horiz ? "h" : "v"], g = E.minPixelPadding, m = E.toPixels(Math.min(w(E.options.min, E.dataMin), E.dataMin)), L = E.toPixels(Math.max(w(E.options.max, E.dataMax), E.dataMax)), z = Math.max(m, L);
- X.min = Math.min(E.pos, Math.min(
- m,
- L
- ) - g), X.max = Math.max(E.pos + E.len, z + g);
- }
- }), u.res = !0) : u.followTouchMove && t === 1 ? this.runPointActions(u.normalize(h)) : c.length && (T(i, "touchpan", { originalEvent: h }, function() {
- W || (u.selectionMarker = W = f({ destroy: G, touch: !0 }, i.plotBox)), u.pinchTranslate(c, a, P, W, I, s), u.hasPinched = n, u.scaleGroups(P, I);
- }), u.res && (u.res = !1, this.reset(!1, 0)));
- }, l.prototype.pinchTranslate = function(h, u, i, c, a, t) {
- this.zoomHor && this.pinchTranslateDirection(!0, h, u, i, c, a, t), this.zoomVert && this.pinchTranslateDirection(!1, h, u, i, c, a, t);
- }, l.prototype.pinchTranslateDirection = function(h, u, i, c, a, t, s, n) {
- var P = this.chart, _ = h ? "x" : "y", I = h ? "X" : "Y", W = "chart" + I, E = h ? "width" : "height", X = P["plot" + (h ? "Left" : "Top")], g = P.inverted, m = P.bounds[h ? "h" : "v"], L = u.length === 1, z = u[0][W], $ = !L && u[1][W];
- u = function() {
- typeof Z == "number" && 20 < Math.abs(z - $) && (F = n || Math.abs(Y - Z) / Math.abs(z - $)), A = (X - Y) / F + z, Q = P["plot" + (h ? "Width" : "Height")] / F;
- };
- var Q, A, F = n || 1, Y = i[0][W], Z = !L && i[1][W];
- if (u(), i = A, i < m.min) {
- i = m.min;
- var q = !0;
- } else
- i + Q > m.max && (i = m.max - Q, q = !0);
- q ? (Y -= 0.8 * (Y - s[_][0]), typeof Z == "number" && (Z -= 0.8 * (Z - s[_][1])), u()) : s[_] = [Y, Z], g || (t[_] = A - X, t[E] = Q), t = g ? 1 / F : F, a[E] = Q, a[_] = i, c[g ? h ? "scaleY" : "scaleX" : "scale" + I] = F, c["translate" + I] = t * X + (Y - t * z);
- }, l.prototype.reset = function(h, u) {
- var i = this.chart, c = i.hoverSeries, a = i.hoverPoint, t = i.hoverPoints, s = i.tooltip, n = s && s.shared ? t : a;
- h && n && v(n).forEach(function(P) {
- P.series.isCartesian && typeof P.plotX > "u" && (h = !1);
- }), h ? s && n && v(n).length && (s.refresh(n), s.shared && t ? t.forEach(function(P) {
- P.setState(P.state, !0), P.series.isCartesian && (P.series.xAxis.crosshair && P.series.xAxis.drawCrosshair(
- null,
- P
- ), P.series.yAxis.crosshair && P.series.yAxis.drawCrosshair(null, P));
- }) : a && (a.setState(a.state, !0), i.axes.forEach(function(P) {
- P.crosshair && a.series[P.coll] === P && P.drawCrosshair(null, a);
- }))) : (a && a.onMouseOut(), t && t.forEach(function(P) {
- P.setState();
- }), c && c.onMouseOut(), s && s.hide(u), this.unDocMouseMove && (this.unDocMouseMove = this.unDocMouseMove()), i.axes.forEach(function(P) {
- P.hideCrosshair();
- }), this.hoverX = i.hoverPoints = i.hoverPoint = null);
- }, l.prototype.runPointActions = function(h, u) {
- var i = this.chart, c = i.tooltip && i.tooltip.options.enabled ? i.tooltip : void 0, a = c ? c.shared : !1, t = u || i.hoverPoint, s = t && t.series || i.hoverSeries;
- u = this.getHoverData(t, s, i.series, (!h || h.type !== "touchmove") && (!!u || s && s.directTouch && this.isDirectTouch), a, h), t = u.hoverPoint, s = u.hoverSeries;
- var n = u.hoverPoints;
- if (u = s && s.tooltipOptions.followPointer && !s.tooltipOptions.split, a = a && s && !s.noSharedTooltip, t && (t !== i.hoverPoint || c && c.isHidden)) {
- if ((i.hoverPoints || []).forEach(function(P) {
- n.indexOf(P) === -1 && P.setState();
- }), i.hoverSeries !== s && s.onMouseOver(), this.applyInactiveState(n), (n || []).forEach(function(P) {
- P.setState("hover");
- }), i.hoverPoint && i.hoverPoint.firePointEvent("mouseOut"), !t.series)
- return;
- i.hoverPoints = n, i.hoverPoint = t, t.firePointEvent("mouseOver"), c && c.refresh(a ? n : t, h);
- } else
- u && c && !c.isHidden && (t = c.getAnchor([{}], h), i.isInsidePlot(t[0], t[1], { visiblePlotOnly: !0 }) && c.updatePosition({ plotX: t[0], plotY: t[1] }));
- this.unDocMouseMove || (this.unDocMouseMove = R(i.container.ownerDocument, "mousemove", function(P) {
- var _ = V[l.hoverChartIndex];
- _ && _.pointer.onDocumentMouseMove(P);
- }), this.eventsToUnbind.push(this.unDocMouseMove)), i.axes.forEach(function(P) {
- var _ = w((P.crosshair || {}).snap, !0), I;
- _ && ((I = i.hoverPoint) && I.series[P.coll] === P || (I = d(n, function(W) {
- return W.series[P.coll] === P;
- }))), I || !_ ? P.drawCrosshair(h, I) : P.hideCrosshair();
- });
- }, l.prototype.scaleGroups = function(h, u) {
- var i = this.chart;
- i.series.forEach(function(c) {
- var a = h || c.getPlotBox();
- c.group && (c.xAxis && c.xAxis.zoomEnabled || i.mapView) && (c.group.attr(a), c.markerGroup && (c.markerGroup.attr(a), c.markerGroup.clip(u ? i.clipRect : null)), c.dataLabelsGroup && c.dataLabelsGroup.attr(a));
- }), i.clipRect.attr(u || i.clipBox);
- }, l.prototype.setDOMEvents = function() {
- var h = this, u = this.chart.container, i = u.ownerDocument;
- u.onmousedown = this.onContainerMouseDown.bind(this), u.onmousemove = this.onContainerMouseMove.bind(this), u.onclick = this.onContainerClick.bind(this), this.eventsToUnbind.push(R(u, "mouseenter", this.onContainerMouseEnter.bind(this))), this.eventsToUnbind.push(R(u, "mouseleave", this.onContainerMouseLeave.bind(this))), l.unbindDocumentMouseUp || (l.unbindDocumentMouseUp = R(i, "mouseup", this.onDocumentMouseUp.bind(this)));
- for (var c = this.chart.renderTo.parentElement; c && c.tagName !== "BODY"; )
- this.eventsToUnbind.push(R(c, "scroll", function() {
- delete h.chartPosition;
- })), c = c.parentElement;
- N.hasTouch && (this.eventsToUnbind.push(R(u, "touchstart", this.onContainerTouchStart.bind(this), { passive: !1 })), this.eventsToUnbind.push(R(u, "touchmove", this.onContainerTouchMove.bind(this), { passive: !1 })), l.unbindDocumentTouchEnd || (l.unbindDocumentTouchEnd = R(i, "touchend", this.onDocumentTouchEnd.bind(this), { passive: !1 })));
- }, l.prototype.setHoverChartIndex = function() {
- var h = this.chart, u = N.charts[w(l.hoverChartIndex, -1)];
- u && u !== h && u.pointer.onContainerMouseLeave({ relatedTarget: !0 }), u && u.mouseIsDown || (l.hoverChartIndex = h.index);
- }, l.prototype.touch = function(h, u) {
- var i = this.chart;
- if (this.setHoverChartIndex(), h.touches.length === 1)
- if (h = this.normalize(h), i.isInsidePlot(h.chartX - i.plotLeft, h.chartY - i.plotTop, { visiblePlotOnly: !0 }) && !i.openMenu) {
- if (u && this.runPointActions(h), h.type === "touchmove") {
- u = this.pinchDown;
- var c = u[0] ? 4 <= Math.sqrt(Math.pow(u[0].chartX - h.chartX, 2) + Math.pow(u[0].chartY - h.chartY, 2)) : !1;
- }
- w(c, !0) && this.pinch(h);
- } else
- u && this.reset();
- else
- h.touches.length === 2 && this.pinch(h);
- }, l.prototype.touchSelect = function(h) {
- return !(!this.chart.options.chart.zoomBySingleTouch || !h.touches || h.touches.length !== 1);
- }, l.prototype.zoomOption = function(h) {
- var u = this.chart, i = u.options.chart;
- u = u.inverted;
- var c = i.zoomType || "";
- /touch/.test(h.type) && (c = w(i.pinchType, c)), this.zoomX = h = /x/.test(c), this.zoomY = i = /y/.test(c), this.zoomHor = h && !u || i && u, this.zoomVert = i && !u || h && u, this.hasZoom = h || i;
- }, l;
- }(), y;
- }), M(o, "Core/MSPointer.js", [o["Core/Globals.js"], o["Core/Pointer.js"], o["Core/Utilities.js"]], function(y, N, D) {
- function U() {
- var k = [];
- return k.item = function(b) {
- return this[b];
- }, d(O, function(b) {
- k.push({ pageX: b.pageX, pageY: b.pageY, target: b.target });
- }), k;
- }
- function H(k, b, w, v) {
- var l = G[N.hoverChartIndex || NaN];
- k.pointerType !== "touch" && k.pointerType !== k.MSPOINTER_TYPE_TOUCH || !l || (l = l.pointer, v(k), l[b]({ type: w, target: k.currentTarget, preventDefault: B, touches: U() }));
- }
- var V = this && this.__extends || function() {
- var k = function(b, w) {
- return k = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(v, l) {
- v.__proto__ = l;
- } || function(v, l) {
- for (var h in l)
- l.hasOwnProperty(h) && (v[h] = l[h]);
- }, k(b, w);
- };
- return function(b, w) {
- function v() {
- this.constructor = b;
- }
- k(b, w), b.prototype = w === null ? Object.create(w) : (v.prototype = w.prototype, new v());
- };
- }(), G = y.charts, R = y.doc, B = y.noop, S = y.win, x = D.addEvent, f = D.css, d = D.objectEach, T = D.removeEvent, O = {}, j = !!S.PointerEvent;
- return function(k) {
- function b() {
- return k !== null && k.apply(this, arguments) || this;
- }
- return V(b, k), b.isRequired = function() {
- return !(y.hasTouch || !S.PointerEvent && !S.MSPointerEvent);
- }, b.prototype.batchMSEvents = function(w) {
- w(this.chart.container, j ? "pointerdown" : "MSPointerDown", this.onContainerPointerDown), w(this.chart.container, j ? "pointermove" : "MSPointerMove", this.onContainerPointerMove), w(R, j ? "pointerup" : "MSPointerUp", this.onDocumentPointerUp);
- }, b.prototype.destroy = function() {
- this.batchMSEvents(T), k.prototype.destroy.call(this);
- }, b.prototype.init = function(w, v) {
- k.prototype.init.call(this, w, v), this.hasZoom && f(w.container, { "-ms-touch-action": "none", "touch-action": "none" });
- }, b.prototype.onContainerPointerDown = function(w) {
- H(w, "onContainerTouchStart", "touchstart", function(v) {
- O[v.pointerId] = { pageX: v.pageX, pageY: v.pageY, target: v.currentTarget };
- });
- }, b.prototype.onContainerPointerMove = function(w) {
- H(w, "onContainerTouchMove", "touchmove", function(v) {
- O[v.pointerId] = {
- pageX: v.pageX,
- pageY: v.pageY
- }, O[v.pointerId].target || (O[v.pointerId].target = v.currentTarget);
- });
- }, b.prototype.onDocumentPointerUp = function(w) {
- H(w, "onDocumentTouchEnd", "touchend", function(v) {
- delete O[v.pointerId];
- });
- }, b.prototype.setDOMEvents = function() {
- k.prototype.setDOMEvents.call(this), (this.hasZoom || this.followTouchMove) && this.batchMSEvents(x);
- }, b;
- }(N);
- }), M(o, "Core/Legend/Legend.js", [
- o["Core/Animation/AnimationUtilities.js"],
- o["Core/FormatUtilities.js"],
- o["Core/Globals.js"],
- o["Core/Series/Point.js"],
- o["Core/Renderer/RendererUtilities.js"],
- o["Core/Utilities.js"]
- ], function(y, N, D, U, H, V) {
- var G = y.animObject, R = y.setAnimation, B = N.format;
- y = D.isFirefox;
- var S = D.marginNames;
- D = D.win;
- var x = H.distribute, f = V.addEvent, d = V.createElement, T = V.css, O = V.defined, j = V.discardElement, k = V.find, b = V.fireEvent, w = V.isNumber, v = V.merge, l = V.pick, h = V.relativeLength, u = V.stableSort, i = V.syncTimeout;
- return H = V.wrap, V = function() {
- function c(a, t) {
- this.allItems = [], this.contentGroup = this.box = void 0, this.display = !1, this.group = void 0, this.offsetWidth = this.maxLegendWidth = this.maxItemWidth = this.legendWidth = this.legendHeight = this.lastLineHeight = this.lastItemY = this.itemY = this.itemX = this.itemMarginTop = this.itemMarginBottom = this.itemHeight = this.initialItemY = 0, this.options = {}, this.padding = 0, this.pages = [], this.proximate = !1, this.scrollGroup = void 0, this.widthOption = this.totalItemWidth = this.titleHeight = this.symbolWidth = this.symbolHeight = 0, this.chart = a, this.init(a, t);
- }
- return c.prototype.init = function(a, t) {
- this.chart = a, this.setOptions(t), t.enabled && (this.render(), f(this.chart, "endResize", function() {
- this.legend.positionCheckboxes();
- }), this.proximate ? this.unchartrender = f(this.chart, "render", function() {
- this.legend.proximatePositions(), this.legend.positionItems();
- }) : this.unchartrender && this.unchartrender());
- }, c.prototype.setOptions = function(a) {
- var t = l(a.padding, 8);
- this.options = a, this.chart.styledMode || (this.itemStyle = a.itemStyle, this.itemHiddenStyle = v(this.itemStyle, a.itemHiddenStyle)), this.itemMarginTop = a.itemMarginTop || 0, this.itemMarginBottom = a.itemMarginBottom || 0, this.padding = t, this.initialItemY = t - 5, this.symbolWidth = l(
- a.symbolWidth,
- 16
- ), this.pages = [], this.proximate = a.layout === "proximate" && !this.chart.inverted, this.baseline = void 0;
- }, c.prototype.update = function(a, t) {
- var s = this.chart;
- this.setOptions(v(!0, this.options, a)), this.destroy(), s.isDirtyLegend = s.isDirtyBox = !0, l(t, !0) && s.redraw(), b(this, "afterUpdate");
- }, c.prototype.colorizeItem = function(a, t) {
- if (a.legendGroup[t ? "removeClass" : "addClass"]("highcharts-legend-item-hidden"), !this.chart.styledMode) {
- var s = this.options, n = a.legendItem, P = a.legendLine, _ = a.legendSymbol, I = this.itemHiddenStyle.color;
- s = t ? s.itemStyle.color : I;
- var W = t && a.color || I, E = a.options && a.options.marker, X = { fill: W };
- n && n.css({ fill: s, color: s }), P && P.attr({ stroke: W }), _ && (E && _.isMarker && (X = a.pointAttribs(), t || (X.stroke = X.fill = I)), _.attr(X));
- }
- b(this, "afterColorizeItem", { item: a, visible: t });
- }, c.prototype.positionItems = function() {
- this.allItems.forEach(this.positionItem, this), this.chart.isResizing || this.positionCheckboxes();
- }, c.prototype.positionItem = function(a) {
- var t = this, s = this.options, n = s.symbolPadding, P = !s.rtl, _ = a._legendItemPos;
- s = _[0], _ = _[1];
- var I = a.checkbox, W = a.legendGroup;
- W && W.element && (n = { translateX: P ? s : this.legendWidth - s - 2 * n - 4, translateY: _ }, P = function() {
- b(t, "afterPositionItem", { item: a });
- }, O(W.translateY) ? W.animate(n, void 0, P) : (W.attr(n), P())), I && (I.x = s, I.y = _);
- }, c.prototype.destroyItem = function(a) {
- var t = a.checkbox;
- ["legendItem", "legendLine", "legendSymbol", "legendGroup"].forEach(function(s) {
- a[s] && (a[s] = a[s].destroy());
- }), t && j(a.checkbox);
- }, c.prototype.destroy = function() {
- function a(t) {
- this[t] && (this[t] = this[t].destroy());
- }
- this.getAllItems().forEach(function(t) {
- [
- "legendItem",
- "legendGroup"
- ].forEach(a, t);
- }), "clipRect up down pager nav box title group".split(" ").forEach(a, this), this.display = null;
- }, c.prototype.positionCheckboxes = function() {
- var a = this.group && this.group.alignAttr, t = this.clipHeight || this.legendHeight, s = this.titleHeight;
- if (a) {
- var n = a.translateY;
- this.allItems.forEach(function(P) {
- var _ = P.checkbox;
- if (_) {
- var I = n + s + _.y + (this.scrollOffset || 0) + 3;
- T(_, { left: a.translateX + P.checkboxOffset + _.x - 20 + "px", top: I + "px", display: this.proximate || I > n - 6 && I < n + t - 6 ? "" : "none" });
- }
- }, this);
- }
- }, c.prototype.renderTitle = function() {
- var a = this.options, t = this.padding, s = a.title, n = 0;
- s.text && (this.title || (this.title = this.chart.renderer.label(s.text, t - 3, t - 4, null, null, null, a.useHTML, null, "legend-title").attr({ zIndex: 1 }), this.chart.styledMode || this.title.css(s.style), this.title.add(this.group)), s.width || this.title.css({ width: this.maxLegendWidth + "px" }), a = this.title.getBBox(), n = a.height, this.offsetWidth = a.width, this.contentGroup.attr({ translateY: n })), this.titleHeight = n;
- }, c.prototype.setText = function(a) {
- var t = this.options;
- a.legendItem.attr({ text: t.labelFormat ? B(t.labelFormat, a, this.chart) : t.labelFormatter.call(a) });
- }, c.prototype.renderItem = function(a) {
- var t = this.chart, s = t.renderer, n = this.options, P = this.symbolWidth, _ = n.symbolPadding || 0, I = this.itemStyle, W = this.itemHiddenStyle, E = n.layout === "horizontal" ? l(n.itemDistance, 20) : 0, X = !n.rtl, g = !a.series, m = !g && a.series.drawLegendSymbol ? a.series : a, L = m.options, z = this.createCheckboxForItem && L && L.showCheckbox, $ = n.useHTML, Q = a.options.className, A = a.legendItem;
- L = P + _ + E + (z ? 20 : 0), A || (a.legendGroup = s.g("legend-item").addClass("highcharts-" + m.type + "-series highcharts-color-" + a.colorIndex + (Q ? " " + Q : "") + (g ? " highcharts-series-" + a.index : "")).attr({ zIndex: 1 }).add(this.scrollGroup), a.legendItem = A = s.text("", X ? P + _ : -_, this.baseline || 0, $), t.styledMode || A.css(v(a.visible ? I : W)), A.attr({ align: X ? "left" : "right", zIndex: 2 }).add(a.legendGroup), this.baseline || (this.fontMetrics = s.fontMetrics(t.styledMode ? 12 : I.fontSize, A), this.baseline = this.fontMetrics.f + 3 + this.itemMarginTop, A.attr("y", this.baseline), this.symbolHeight = n.symbolHeight || this.fontMetrics.f, n.squareSymbol && (this.symbolWidth = l(n.symbolWidth, Math.max(this.symbolHeight, 16)), L = this.symbolWidth + _ + E + (z ? 20 : 0), X && A.attr("x", this.symbolWidth + _))), m.drawLegendSymbol(this, a), this.setItemEvents && this.setItemEvents(a, A, $)), z && !a.checkbox && this.createCheckboxForItem && this.createCheckboxForItem(a), this.colorizeItem(a, a.visible), !t.styledMode && I.width || A.css({ width: (n.itemWidth || this.widthOption || t.spacingBox.width) - L + "px" }), this.setText(a), t = A.getBBox(), s = this.fontMetrics && this.fontMetrics.h || 0, a.itemWidth = a.checkboxOffset = n.itemWidth || a.legendItemWidth || t.width + L, this.maxItemWidth = Math.max(this.maxItemWidth, a.itemWidth), this.totalItemWidth += a.itemWidth, this.itemHeight = a.itemHeight = Math.round(a.legendItemHeight || (t.height > 1.5 * s ? t.height : s));
- }, c.prototype.layoutItem = function(a) {
- var t = this.options, s = this.padding, n = t.layout === "horizontal", P = a.itemHeight, _ = this.itemMarginBottom, I = this.itemMarginTop, W = n ? l(t.itemDistance, 20) : 0, E = this.maxLegendWidth;
- t = t.alignColumns && this.totalItemWidth > E ? this.maxItemWidth : a.itemWidth, n && this.itemX - s + t > E && (this.itemX = s, this.lastLineHeight && (this.itemY += I + this.lastLineHeight + _), this.lastLineHeight = 0), this.lastItemY = I + this.itemY + _, this.lastLineHeight = Math.max(P, this.lastLineHeight), a._legendItemPos = [this.itemX, this.itemY], n ? this.itemX += t : (this.itemY += I + P + _, this.lastLineHeight = P), this.offsetWidth = this.widthOption || Math.max((n ? this.itemX - s - (a.checkbox ? 0 : W) : t) + s, this.offsetWidth);
- }, c.prototype.getAllItems = function() {
- var a = [];
- return this.chart.series.forEach(function(t) {
- var s = t && t.options;
- t && l(s.showInLegend, O(s.linkedTo) ? !1 : void 0, !0) && (a = a.concat(t.legendItems || (s.legendType === "point" ? t.data : t)));
- }), b(this, "afterGetAllItems", { allItems: a }), a;
- }, c.prototype.getAlignment = function() {
- var a = this.options;
- return this.proximate ? a.align.charAt(0) + "tv" : a.floating ? "" : a.align.charAt(0) + a.verticalAlign.charAt(0) + a.layout.charAt(0);
- }, c.prototype.adjustMargins = function(a, t) {
- var s = this.chart, n = this.options, P = this.getAlignment();
- P && [/(lth|ct|rth)/, /(rtv|rm|rbv)/, /(rbh|cb|lbh)/, /(lbv|lm|ltv)/].forEach(function(_, I) {
- _.test(P) && !O(a[I]) && (s[S[I]] = Math.max(s[S[I]], s.legend[(I + 1) % 2 ? "legendHeight" : "legendWidth"] + [1, -1, -1, 1][I] * n[I % 2 ? "x" : "y"] + l(n.margin, 12) + t[I] + (s.titleOffset[I] || 0)));
- });
- }, c.prototype.proximatePositions = function() {
- var a = this.chart, t = [], s = this.options.align === "left";
- this.allItems.forEach(function(n) {
- var P, _ = s;
- if (n.yAxis) {
- n.xAxis.options.reversed && (_ = !_), n.points && (P = k(_ ? n.points : n.points.slice(0).reverse(), function(W) {
- return w(W.plotY);
- })), _ = this.itemMarginTop + n.legendItem.getBBox().height + this.itemMarginBottom;
- var I = n.yAxis.top - a.plotTop;
- n.visible ? (P = P ? P.plotY : n.yAxis.height, P += I - 0.3 * _) : P = I + n.yAxis.height, t.push({ target: P, size: _, item: n });
- }
- }, this), x(t, a.plotHeight).forEach(function(n) {
- n.item._legendItemPos && (n.item._legendItemPos[1] = a.plotTop - a.spacing[0] + n.pos);
- });
- }, c.prototype.render = function() {
- var a = this.chart, t = a.renderer, s = this.options, n = this.padding, P = this.getAllItems(), _ = this.group, I = this.box;
- this.itemX = n, this.itemY = this.initialItemY, this.lastItemY = this.offsetWidth = 0, this.widthOption = h(s.width, a.spacingBox.width - n);
- var W = a.spacingBox.width - 2 * n - s.x;
- -1 < ["rm", "lm"].indexOf(this.getAlignment().substring(0, 2)) && (W /= 2), this.maxLegendWidth = this.widthOption || W, _ || (this.group = _ = t.g("legend").addClass(s.className || "").attr({ zIndex: 7 }).add(), this.contentGroup = t.g().attr({ zIndex: 1 }).add(_), this.scrollGroup = t.g().add(this.contentGroup)), this.renderTitle(), u(P, function(X, g) {
- return (X.options && X.options.legendIndex || 0) - (g.options && g.options.legendIndex || 0);
- }), s.reversed && P.reverse(), this.allItems = P, this.display = W = !!P.length, this.itemHeight = this.totalItemWidth = this.maxItemWidth = this.lastLineHeight = 0, P.forEach(this.renderItem, this), P.forEach(this.layoutItem, this), P = (this.widthOption || this.offsetWidth) + n;
- var E = this.lastItemY + this.lastLineHeight + this.titleHeight;
- E = this.handleOverflow(E), E += n, I || (this.box = I = t.rect().addClass("highcharts-legend-box").attr({ r: s.borderRadius }).add(_), I.isNew = !0), a.styledMode || I.attr({ stroke: s.borderColor, "stroke-width": s.borderWidth || 0, fill: s.backgroundColor || "none" }).shadow(s.shadow), 0 < P && 0 < E && (I[I.isNew ? "attr" : "animate"](I.crisp.call({}, { x: 0, y: 0, width: P, height: E }, I.strokeWidth())), I.isNew = !1), I[W ? "show" : "hide"](), a.styledMode && _.getStyle("display") === "none" && (P = E = 0), this.legendWidth = P, this.legendHeight = E, W && this.align(), this.proximate || this.positionItems(), b(this, "afterRender");
- }, c.prototype.align = function(a) {
- a === void 0 && (a = this.chart.spacingBox);
- var t = this.chart, s = this.options, n = a.y;
- /(lth|ct|rth)/.test(this.getAlignment()) && 0 < t.titleOffset[0] ? n += t.titleOffset[0] : /(lbh|cb|rbh)/.test(this.getAlignment()) && 0 < t.titleOffset[2] && (n -= t.titleOffset[2]), n !== a.y && (a = v(a, { y: n })), this.group.align(v(s, { width: this.legendWidth, height: this.legendHeight, verticalAlign: this.proximate ? "top" : s.verticalAlign }), !0, a);
- }, c.prototype.handleOverflow = function(a) {
- var t = this, s = this.chart, n = s.renderer, P = this.options, _ = P.y, I = P.verticalAlign === "top", W = this.padding, E = P.maxHeight, X = P.navigation, g = l(X.animation, !0), m = X.arrowSize || 12, L = this.pages, z = this.allItems, $ = function(q) {
- typeof q == "number" ? Z.attr({ height: q }) : Z && (t.clipRect = Z.destroy(), t.contentGroup.clip()), t.contentGroup.div && (t.contentGroup.div.style.clip = q ? "rect(" + W + "px,9999px," + (W + q) + "px,0)" : "auto");
- }, Q = function(q) {
- return t[q] = n.circle(0, 0, 1.3 * m).translate(m / 2, m / 2).add(Y), s.styledMode || t[q].attr("fill", "rgba(0,0,0,0.0001)"), t[q];
- }, A, F;
- _ = s.spacingBox.height + (I ? -_ : _) - W;
- var Y = this.nav, Z = this.clipRect;
- return P.layout !== "horizontal" || P.verticalAlign === "middle" || P.floating || (_ /= 2), E && (_ = Math.min(_, E)), L.length = 0, a && 0 < _ && a > _ && X.enabled !== !1 ? (this.clipHeight = A = Math.max(_ - 20 - this.titleHeight - W, 0), this.currentPage = l(this.currentPage, 1), this.fullHeight = a, z.forEach(function(q, it) {
- var et = q._legendItemPos[1], nt = Math.round(q.legendItem.getBBox().height), rt = L.length;
- (!rt || et - L[rt - 1] > A && (F || et) !== L[rt - 1]) && (L.push(F || et), rt++), q.pageIx = rt - 1, F && (z[it - 1].pageIx = rt - 1), it === z.length - 1 && et + nt - L[rt - 1] > A && nt <= A && (L.push(et), q.pageIx = rt), et !== F && (F = et);
- }), Z || (Z = t.clipRect = n.clipRect(0, W, 9999, 0), t.contentGroup.clip(Z)), $(A), Y || (this.nav = Y = n.g().attr({ zIndex: 1 }).add(this.group), this.up = n.symbol("triangle", 0, 0, m, m).add(Y), Q("upTracker").on(
- "click",
- function() {
- t.scroll(-1, g);
- }
- ), this.pager = n.text("", 15, 10).addClass("highcharts-legend-navigation"), s.styledMode || this.pager.css(X.style), this.pager.add(Y), this.down = n.symbol("triangle-down", 0, 0, m, m).add(Y), Q("downTracker").on("click", function() {
- t.scroll(1, g);
- })), t.scroll(0), a = _) : Y && ($(), this.nav = Y.destroy(), this.scrollGroup.attr({ translateY: 1 }), this.clipHeight = 0), a;
- }, c.prototype.scroll = function(a, t) {
- var s = this, n = this.chart, P = this.pages, _ = P.length, I = this.clipHeight, W = this.options.navigation, E = this.pager, X = this.padding, g = this.currentPage + a;
- g > _ && (g = _), 0 < g && (typeof t < "u" && R(t, n), this.nav.attr({ translateX: X, translateY: I + this.padding + 7 + this.titleHeight, visibility: "visible" }), [this.up, this.upTracker].forEach(function(m) {
- m.attr({ class: g === 1 ? "highcharts-legend-nav-inactive" : "highcharts-legend-nav-active" });
- }), E.attr({ text: g + "/" + _ }), [this.down, this.downTracker].forEach(
- function(m) {
- m.attr({ x: 18 + this.pager.getBBox().width, class: g === _ ? "highcharts-legend-nav-inactive" : "highcharts-legend-nav-active" });
- },
- this
- ), n.styledMode || (this.up.attr({ fill: g === 1 ? W.inactiveColor : W.activeColor }), this.upTracker.css({ cursor: g === 1 ? "default" : "pointer" }), this.down.attr({ fill: g === _ ? W.inactiveColor : W.activeColor }), this.downTracker.css({ cursor: g === _ ? "default" : "pointer" })), this.scrollOffset = -P[g - 1] + this.initialItemY, this.scrollGroup.animate({ translateY: this.scrollOffset }), this.currentPage = g, this.positionCheckboxes(), a = G(l(t, n.renderer.globalAnimation, !0)), i(function() {
- b(s, "afterScroll", { currentPage: g });
- }, a.duration));
- }, c.prototype.setItemEvents = function(a, t, s) {
- var n = this, P = n.chart.renderer.boxWrapper, _ = a instanceof U, I = "highcharts-legend-" + (_ ? "point" : "series") + "-active", W = n.chart.styledMode, E = function(X) {
- n.allItems.forEach(function(g) {
- a !== g && [g].concat(g.linkedSeries || []).forEach(function(m) {
- m.setState(X, !_);
- });
- });
- };
- (s ? [t, a.legendSymbol] : [a.legendGroup]).forEach(function(X) {
- X && X.on("mouseover", function() {
- a.visible && E("inactive"), a.setState("hover"), a.visible && P.addClass(I), W || t.css(n.options.itemHoverStyle);
- }).on("mouseout", function() {
- n.chart.styledMode || t.css(v(a.visible ? n.itemStyle : n.itemHiddenStyle)), E(""), P.removeClass(I), a.setState();
- }).on("click", function(g) {
- var m = function() {
- a.setVisible && a.setVisible(), E(a.visible ? "inactive" : "");
- };
- P.removeClass(I), g = { browserEvent: g }, a.firePointEvent ? a.firePointEvent("legendItemClick", g, m) : b(a, "legendItemClick", g, m);
- });
- });
- }, c.prototype.createCheckboxForItem = function(a) {
- a.checkbox = d(
- "input",
- { type: "checkbox", className: "highcharts-legend-checkbox", checked: a.selected, defaultChecked: a.selected },
- this.options.itemCheckboxStyle,
- this.chart.container
- ), f(a.checkbox, "click", function(t) {
- b(a.series || a, "checkboxClick", { checked: t.target.checked, item: a }, function() {
- a.select();
- });
- });
- }, c;
- }(), (/Trident\/7\.0/.test(D.navigator && D.navigator.userAgent) || y) && H(V.prototype, "positionItem", function(c, a) {
- var t = this, s = function() {
- a._legendItemPos && c.call(t, a);
- };
- s(), t.bubbleLegend || setTimeout(s);
- }), V;
- }), M(
- o,
- "Core/Series/SeriesRegistry.js",
- [o["Core/Globals.js"], o["Core/DefaultOptions.js"], o["Core/Series/Point.js"], o["Core/Utilities.js"]],
- function(y, N, D, U) {
- var H = N.defaultOptions, V = U.error, G = U.extendClass, R = U.merge, B;
- return function(S) {
- function x(f, d) {
- var T = H.plotOptions || {}, O = d.defaultOptions;
- d.prototype.pointClass || (d.prototype.pointClass = D), d.prototype.type = f, O && (T[f] = O), S.seriesTypes[f] = d;
- }
- S.seriesTypes = y.seriesTypes, S.getSeries = function(f, d) {
- d === void 0 && (d = {});
- var T = f.options.chart;
- T = d.type || T.type || T.defaultSeriesType || "";
- var O = S.seriesTypes[T];
- return S || V(17, !0, f, { missingModuleFor: T }), T = new O(), typeof T.init == "function" && T.init(f, d), T;
- }, S.registerSeriesType = x, S.seriesType = function(f, d, T, O, j) {
- var k = H.plotOptions || {};
- return d = d || "", k[f] = R(k[d], T), x(f, G(S.seriesTypes[d] || function() {
- }, O)), S.seriesTypes[f].prototype.type = f, j && (S.seriesTypes[f].prototype.pointClass = G(D, j)), S.seriesTypes[f];
- };
- }(B || (B = {})), B;
- }
- ), M(o, "Core/Chart/Chart.js", [
- o["Core/Animation/AnimationUtilities.js"],
- o["Core/Axis/Axis.js"],
- o["Core/FormatUtilities.js"],
- o["Core/Foundation.js"],
- o["Core/Globals.js"],
- o["Core/Legend/Legend.js"],
- o["Core/MSPointer.js"],
- o["Core/DefaultOptions.js"],
- o["Core/Pointer.js"],
- o["Core/Renderer/RendererRegistry.js"],
- o["Core/Series/SeriesRegistry.js"],
- o["Core/Renderer/SVG/SVGRenderer.js"],
- o["Core/Time.js"],
- o["Core/Utilities.js"],
- o["Core/Renderer/HTML/AST.js"]
- ], function(y, N, D, U, H, V, G, R, B, S, x, f, d, T, O) {
- var j = y.animate, k = y.animObject, b = y.setAnimation, w = D.numberFormat, v = U.registerEventOptions, l = H.charts, h = H.doc, u = H.marginNames, i = H.svg, c = H.win, a = R.defaultOptions, t = R.defaultTime, s = x.seriesTypes, n = T.addEvent, P = T.attr, _ = T.cleanRecursively, I = T.createElement, W = T.css, E = T.defined, X = T.discardElement, g = T.erase, m = T.error, L = T.extend, z = T.find, $ = T.fireEvent, Q = T.getStyle, A = T.isArray, F = T.isNumber, Y = T.isObject, Z = T.isString, q = T.merge, it = T.objectEach, et = T.pick, nt = T.pInt, rt = T.relativeLength, ct = T.removeEvent, gt = T.splat, dt = T.syncTimeout, ht = T.uniqueKey;
- return y = function() {
- function at(J, tt, ot) {
- this.series = this.renderTo = this.renderer = this.pointer = this.pointCount = this.plotWidth = this.plotTop = this.plotLeft = this.plotHeight = this.plotBox = this.options = this.numberFormatter = this.margin = this.legend = this.labelCollectors = this.isResizing = this.index = this.eventOptions = this.container = this.colorCounter = this.clipBox = this.chartWidth = this.chartHeight = this.bounds = this.axisOffset = this.axes = void 0, this.sharedClips = {}, this.yAxis = this.xAxis = this.userOptions = this.titleOffset = this.time = this.symbolCounter = this.spacingBox = this.spacing = void 0, this.getArgs(J, tt, ot);
- }
- return at.chart = function(J, tt, ot) {
- return new at(J, tt, ot);
- }, at.prototype.getArgs = function(J, tt, ot) {
- Z(J) || J.nodeName ? (this.renderTo = J, this.init(tt, ot)) : this.init(J, tt);
- }, at.prototype.init = function(J, tt) {
- var ot = J.plotOptions || {};
- $(this, "init", { args: arguments }, function() {
- var lt = q(a, J), pt = lt.chart;
- it(lt.plotOptions, function(yt, vt) {
- Y(yt) && (yt.tooltip = ot[vt] && q(ot[vt].tooltip) || void 0);
- }), lt.tooltip.userOptions = J.chart && J.chart.forExport && J.tooltip.userOptions || J.tooltip, this.userOptions = J, this.margin = [], this.spacing = [], this.bounds = { h: {}, v: {} }, this.labelCollectors = [], this.callback = tt, this.isResizing = 0, this.options = lt, this.axes = [], this.series = [], this.time = J.time && Object.keys(J.time).length ? new d(J.time) : H.time, this.numberFormatter = pt.numberFormatter || w, this.styledMode = pt.styledMode, this.hasCartesianSeries = pt.showAxes, this.index = l.length, l.push(this), H.chartCount++, v(this, pt), this.xAxis = [], this.yAxis = [], this.pointCount = this.colorCounter = this.symbolCounter = 0, $(this, "afterInit"), this.firstRender();
- });
- }, at.prototype.initSeries = function(J) {
- var tt = this.options.chart;
- tt = J.type || tt.type || tt.defaultSeriesType;
- var ot = s[tt];
- return ot || m(17, !0, this, { missingModuleFor: tt }), tt = new ot(), typeof tt.init == "function" && tt.init(this, J), tt;
- }, at.prototype.setSeriesData = function() {
- this.getSeriesOrderByLinks().forEach(function(J) {
- J.points || J.data || !J.enabledDataSorting || J.setData(J.options.data, !1);
- });
- }, at.prototype.getSeriesOrderByLinks = function() {
- return this.series.concat().sort(function(J, tt) {
- return J.linkedSeries.length || tt.linkedSeries.length ? tt.linkedSeries.length - J.linkedSeries.length : 0;
- });
- }, at.prototype.orderSeries = function(J) {
- var tt = this.series;
- J = J || 0;
- for (var ot = tt.length; J < ot; ++J)
- tt[J] && (tt[J].index = J, tt[J].name = tt[J].getName());
- }, at.prototype.isInsidePlot = function(J, tt, ot) {
- ot === void 0 && (ot = {});
- var lt = this.inverted, pt = this.plotBox, yt = this.plotLeft, vt = this.plotTop, Mt = this.scrollablePlotBox, Pt = 0, At = 0;
- ot.visiblePlotOnly && this.scrollingContainer && (At = this.scrollingContainer, Pt = At.scrollLeft, At = At.scrollTop);
- var St = ot.series;
- if (pt = ot.visiblePlotOnly && Mt || pt, Mt = ot.inverted ? tt : J, tt = ot.inverted ? J : tt, J = { x: Mt, y: tt, isInsidePlot: !0 }, !ot.ignoreX) {
- var Dt = St && (lt ? St.yAxis : St.xAxis) || { pos: yt, len: 1 / 0 };
- Mt = ot.paneCoordinates ? Dt.pos + Mt : yt + Mt, Mt >= Math.max(Pt + yt, Dt.pos) && Mt <= Math.min(Pt + yt + pt.width, Dt.pos + Dt.len) || (J.isInsidePlot = !1);
- }
- return !ot.ignoreY && J.isInsidePlot && (lt = St && (lt ? St.xAxis : St.yAxis) || { pos: vt, len: 1 / 0 }, ot = ot.paneCoordinates ? lt.pos + tt : vt + tt, ot >= Math.max(At + vt, lt.pos) && ot <= Math.min(At + vt + pt.height, lt.pos + lt.len) || (J.isInsidePlot = !1)), $(this, "afterIsInsidePlot", J), J.isInsidePlot;
- }, at.prototype.redraw = function(J) {
- $(this, "beforeRedraw");
- var tt = this.hasCartesianSeries ? this.axes : this.colorAxis || [], ot = this.series, lt = this.pointer, pt = this.legend, yt = this.userOptions.legend, vt = this.renderer, Mt = vt.isHidden(), Pt = [], At = this.isDirtyBox, St = this.isDirtyLegend;
- for (this.setResponsive && this.setResponsive(!1), b(this.hasRendered ? J : !1, this), Mt && this.temporaryDisplay(), this.layOutTitles(), J = ot.length; J--; ) {
- var Dt = ot[J];
- if (Dt.options.stacking || Dt.options.centerInCategory) {
- var _t = !0;
- if (Dt.isDirty) {
- var Nt = !0;
- break;
- }
- }
- }
- if (Nt)
- for (J = ot.length; J--; )
- Dt = ot[J], Dt.options.stacking && (Dt.isDirty = !0);
- ot.forEach(function(Ot) {
- Ot.isDirty && (Ot.options.legendType === "point" ? (typeof Ot.updateTotals == "function" && Ot.updateTotals(), St = !0) : yt && (yt.labelFormatter || yt.labelFormat) && (St = !0)), Ot.isDirtyData && $(Ot, "updatedData");
- }), St && pt && pt.options.enabled && (pt.render(), this.isDirtyLegend = !1), _t && this.getStacks(), tt.forEach(function(Ot) {
- Ot.updateNames(), Ot.setScale();
- }), this.getMargins(), tt.forEach(function(Ot) {
- Ot.isDirty && (At = !0);
- }), tt.forEach(function(Ot) {
- var Kt = Ot.min + "," + Ot.max;
- Ot.extKey !== Kt && (Ot.extKey = Kt, Pt.push(function() {
- $(Ot, "afterSetExtremes", L(Ot.eventArgs, Ot.getExtremes())), delete Ot.eventArgs;
- })), (At || _t) && Ot.redraw();
- }), At && this.drawChartBox(), $(this, "predraw"), ot.forEach(function(Ot) {
- (At || Ot.isDirty) && Ot.visible && Ot.redraw(), Ot.isDirtyData = !1;
- }), lt && lt.reset(!0), vt.draw(), $(this, "redraw"), $(this, "render"), Mt && this.temporaryDisplay(!0), Pt.forEach(function(Ot) {
- Ot.call();
- });
- }, at.prototype.get = function(J) {
- function tt(yt) {
- return yt.id === J || yt.options && yt.options.id === J;
- }
- for (var ot = this.series, lt = z(this.axes, tt) || z(this.series, tt), pt = 0; !lt && pt < ot.length; pt++)
- lt = z(ot[pt].points || [], tt);
- return lt;
- }, at.prototype.getAxes = function() {
- var J = this, tt = this.options, ot = tt.xAxis = gt(tt.xAxis || {});
- tt = tt.yAxis = gt(tt.yAxis || {}), $(this, "getAxes"), ot.forEach(function(lt, pt) {
- lt.index = pt, lt.isX = !0;
- }), tt.forEach(function(lt, pt) {
- lt.index = pt;
- }), ot.concat(tt).forEach(function(lt) {
- new N(J, lt);
- }), $(this, "afterGetAxes");
- }, at.prototype.getSelectedPoints = function() {
- return this.series.reduce(function(J, tt) {
- return tt.getPointsCollection().forEach(function(ot) {
- et(ot.selectedStaging, ot.selected) && J.push(ot);
- }), J;
- }, []);
- }, at.prototype.getSelectedSeries = function() {
- return this.series.filter(function(J) {
- return J.selected;
- });
- }, at.prototype.setTitle = function(J, tt, ot) {
- this.applyDescription("title", J), this.applyDescription("subtitle", tt), this.applyDescription("caption", void 0), this.layOutTitles(ot);
- }, at.prototype.applyDescription = function(J, tt) {
- var ot = this, lt = J === "title" ? { color: "#333333", fontSize: this.options.isStock ? "16px" : "18px" } : { color: "#666666" };
- lt = this.options[J] = q(!this.styledMode && { style: lt }, this.options[J], tt);
- var pt = this[J];
- pt && tt && (this[J] = pt = pt.destroy()), lt && !pt && (pt = this.renderer.text(lt.text, 0, 0, lt.useHTML).attr({ align: lt.align, class: "highcharts-" + J, zIndex: lt.zIndex || 4 }).add(), pt.update = function(yt) {
- ot[{ title: "setTitle", subtitle: "setSubtitle", caption: "setCaption" }[J]](yt);
- }, this.styledMode || pt.css(lt.style), this[J] = pt);
- }, at.prototype.layOutTitles = function(J) {
- var tt = [0, 0, 0], ot = this.renderer, lt = this.spacingBox;
- ["title", "subtitle", "caption"].forEach(function(yt) {
- var vt = this[yt], Mt = this.options[yt], Pt = Mt.verticalAlign || "top";
- yt = yt === "title" ? Pt === "top" ? -3 : 0 : Pt === "top" ? tt[0] + 2 : 0;
- var At;
- if (vt) {
- this.styledMode || (At = Mt.style && Mt.style.fontSize), At = ot.fontMetrics(At, vt).b, vt.css({ width: (Mt.width || lt.width + (Mt.widthAdjust || 0)) + "px" });
- var St = Math.round(vt.getBBox(Mt.useHTML).height);
- vt.align(
- L({ y: Pt === "bottom" ? At : yt + At, height: St }, Mt),
- !1,
- "spacingBox"
- ), Mt.floating || (Pt === "top" ? tt[0] = Math.ceil(tt[0] + St) : Pt === "bottom" && (tt[2] = Math.ceil(tt[2] + St)));
- }
- }, this), tt[0] && (this.options.title.verticalAlign || "top") === "top" && (tt[0] += this.options.title.margin), tt[2] && this.options.caption.verticalAlign === "bottom" && (tt[2] += this.options.caption.margin);
- var pt = !this.titleOffset || this.titleOffset.join(",") !== tt.join(",");
- this.titleOffset = tt, $(this, "afterLayOutTitles"), !this.isDirtyBox && pt && (this.isDirtyBox = this.isDirtyLegend = pt, this.hasRendered && et(J, !0) && this.isDirtyBox && this.redraw());
- }, at.prototype.getChartSize = function() {
- var J = this.options.chart, tt = J.width;
- J = J.height;
- var ot = this.renderTo;
- E(tt) || (this.containerWidth = Q(ot, "width")), E(J) || (this.containerHeight = Q(ot, "height")), this.chartWidth = Math.max(0, tt || this.containerWidth || 600), this.chartHeight = Math.max(0, rt(J, this.chartWidth) || (1 < this.containerHeight ? this.containerHeight : 400));
- }, at.prototype.temporaryDisplay = function(J) {
- var tt = this.renderTo;
- if (J)
- for (; tt && tt.style; )
- tt.hcOrigStyle && (W(tt, tt.hcOrigStyle), delete tt.hcOrigStyle), tt.hcOrigDetached && (h.body.removeChild(tt), tt.hcOrigDetached = !1), tt = tt.parentNode;
- else
- for (; tt && tt.style && (h.body.contains(tt) || tt.parentNode || (tt.hcOrigDetached = !0, h.body.appendChild(tt)), (Q(tt, "display", !1) === "none" || tt.hcOricDetached) && (tt.hcOrigStyle = { display: tt.style.display, height: tt.style.height, overflow: tt.style.overflow }, J = { display: "block", overflow: "hidden" }, tt !== this.renderTo && (J.height = 0), W(tt, J), tt.offsetWidth || tt.style.setProperty("display", "block", "important")), tt = tt.parentNode, tt !== h.body); )
- ;
- }, at.prototype.setClassName = function(J) {
- this.container.className = "highcharts-container " + (J || "");
- }, at.prototype.getContainer = function() {
- var J = this.options, tt = J.chart, ot = ht(), lt, pt = this.renderTo;
- pt || (this.renderTo = pt = tt.renderTo), Z(pt) && (this.renderTo = pt = h.getElementById(pt)), pt || m(13, !0, this);
- var yt = nt(P(pt, "data-highcharts-chart"));
- F(yt) && l[yt] && l[yt].hasRendered && l[yt].destroy(), P(pt, "data-highcharts-chart", this.index), pt.innerHTML = O.emptyHTML, tt.skipClone || pt.offsetWidth || this.temporaryDisplay(), this.getChartSize(), yt = this.chartWidth;
- var vt = this.chartHeight;
- if (W(pt, { overflow: "hidden" }), this.styledMode || (lt = L({ position: "relative", overflow: "hidden", width: yt + "px", height: vt + "px", textAlign: "left", lineHeight: "normal", zIndex: 0, "-webkit-tap-highlight-color": "rgba(0,0,0,0)", userSelect: "none", "touch-action": "manipulation", outline: "none" }, tt.style || {})), this.container = ot = I("div", { id: ot }, lt, pt), this._cursor = ot.style.cursor, this.renderer = new (tt.renderer || !i ? S.getRendererType(tt.renderer) : f)(ot, yt, vt, void 0, tt.forExport, J.exporting && J.exporting.allowHTML, this.styledMode), b(
- void 0,
- this
- ), this.setClassName(tt.className), this.styledMode)
- for (var Mt in J.defs)
- this.renderer.definition(J.defs[Mt]);
- else
- this.renderer.setStyle(tt.style);
- this.renderer.chartIndex = this.index, $(this, "afterGetContainer");
- }, at.prototype.getMargins = function(J) {
- var tt = this.spacing, ot = this.margin, lt = this.titleOffset;
- this.resetMargins(), lt[0] && !E(ot[0]) && (this.plotTop = Math.max(this.plotTop, lt[0] + tt[0])), lt[2] && !E(ot[2]) && (this.marginBottom = Math.max(this.marginBottom, lt[2] + tt[2])), this.legend && this.legend.display && this.legend.adjustMargins(
- ot,
- tt
- ), $(this, "getMargins"), J || this.getAxisMargins();
- }, at.prototype.getAxisMargins = function() {
- var J = this, tt = J.axisOffset = [0, 0, 0, 0], ot = J.colorAxis, lt = J.margin, pt = function(yt) {
- yt.forEach(function(vt) {
- vt.visible && vt.getOffset();
- });
- };
- J.hasCartesianSeries ? pt(J.axes) : ot && ot.length && pt(ot), u.forEach(function(yt, vt) {
- E(lt[vt]) || (J[yt] += tt[vt]);
- }), J.setChartSize();
- }, at.prototype.reflow = function(J) {
- var tt = this, ot = tt.options.chart, lt = tt.renderTo, pt = E(ot.width) && E(ot.height), yt = ot.width || Q(lt, "width");
- ot = ot.height || Q(lt, "height"), lt = J ? J.target : c, delete tt.pointer.chartPosition, !pt && !tt.isPrinting && yt && ot && (lt === c || lt === h) && ((yt !== tt.containerWidth || ot !== tt.containerHeight) && (T.clearTimeout(tt.reflowTimeout), tt.reflowTimeout = dt(function() {
- tt.container && tt.setSize(void 0, void 0, !1);
- }, J ? 100 : 0)), tt.containerWidth = yt, tt.containerHeight = ot);
- }, at.prototype.setReflow = function(J) {
- var tt = this;
- J === !1 || this.unbindReflow ? J === !1 && this.unbindReflow && (this.unbindReflow = this.unbindReflow()) : (this.unbindReflow = n(c, "resize", function(ot) {
- tt.options && tt.reflow(ot);
- }), n(this, "destroy", this.unbindReflow));
- }, at.prototype.setSize = function(J, tt, ot) {
- var lt = this, pt = lt.renderer;
- lt.isResizing += 1, b(ot, lt), ot = pt.globalAnimation, lt.oldChartHeight = lt.chartHeight, lt.oldChartWidth = lt.chartWidth, typeof J < "u" && (lt.options.chart.width = J), typeof tt < "u" && (lt.options.chart.height = tt), lt.getChartSize(), lt.styledMode || (ot ? j : W)(lt.container, { width: lt.chartWidth + "px", height: lt.chartHeight + "px" }, ot), lt.setChartSize(!0), pt.setSize(lt.chartWidth, lt.chartHeight, ot), lt.axes.forEach(function(yt) {
- yt.isDirty = !0, yt.setScale();
- }), lt.isDirtyLegend = !0, lt.isDirtyBox = !0, lt.layOutTitles(), lt.getMargins(), lt.redraw(ot), lt.oldChartHeight = null, $(lt, "resize"), dt(function() {
- lt && $(lt, "endResize", null, function() {
- --lt.isResizing;
- });
- }, k(ot).duration);
- }, at.prototype.setChartSize = function(J) {
- var tt = this.inverted, ot = this.renderer, lt = this.chartWidth, pt = this.chartHeight, yt = this.options.chart, vt = this.spacing, Mt = this.clipOffset, Pt, At, St, Dt;
- this.plotLeft = Pt = Math.round(this.plotLeft), this.plotTop = At = Math.round(this.plotTop), this.plotWidth = St = Math.max(0, Math.round(lt - Pt - this.marginRight)), this.plotHeight = Dt = Math.max(0, Math.round(pt - At - this.marginBottom)), this.plotSizeX = tt ? Dt : St, this.plotSizeY = tt ? St : Dt, this.plotBorderWidth = yt.plotBorderWidth || 0, this.spacingBox = ot.spacingBox = { x: vt[3], y: vt[0], width: lt - vt[3] - vt[1], height: pt - vt[0] - vt[2] }, this.plotBox = ot.plotBox = { x: Pt, y: At, width: St, height: Dt }, tt = 2 * Math.floor(this.plotBorderWidth / 2), lt = Math.ceil(Math.max(tt, Mt[3]) / 2), pt = Math.ceil(Math.max(tt, Mt[0]) / 2), this.clipBox = { x: lt, y: pt, width: Math.floor(this.plotSizeX - Math.max(tt, Mt[1]) / 2 - lt), height: Math.max(0, Math.floor(this.plotSizeY - Math.max(tt, Mt[2]) / 2 - pt)) }, J || (this.axes.forEach(function(_t) {
- _t.setAxisSize(), _t.setAxisTranslation();
- }), ot.alignElements()), $(this, "afterSetChartSize", { skipAxes: J });
- }, at.prototype.resetMargins = function() {
- $(this, "resetMargins");
- var J = this, tt = J.options.chart;
- ["margin", "spacing"].forEach(function(ot) {
- var lt = tt[ot], pt = Y(lt) ? lt : [lt, lt, lt, lt];
- ["Top", "Right", "Bottom", "Left"].forEach(function(yt, vt) {
- J[ot][vt] = et(tt[ot + yt], pt[vt]);
- });
- }), u.forEach(function(ot, lt) {
- J[ot] = et(J.margin[lt], J.spacing[lt]);
- }), J.axisOffset = [0, 0, 0, 0], J.clipOffset = [0, 0, 0, 0];
- }, at.prototype.drawChartBox = function() {
- var J = this.options.chart, tt = this.renderer, ot = this.chartWidth, lt = this.chartHeight, pt = this.styledMode, yt = this.plotBGImage, vt = J.backgroundColor, Mt = J.plotBackgroundColor, Pt = J.plotBackgroundImage, At = this.plotLeft, St = this.plotTop, Dt = this.plotWidth, _t = this.plotHeight, Nt = this.plotBox, Ot = this.clipRect, Kt = this.clipBox, Gt = this.chartBackground, Wt = this.plotBackground, Jt = this.plotBorder, be, Yt = "animate";
- if (Gt || (this.chartBackground = Gt = tt.rect().addClass("highcharts-background").add(), Yt = "attr"), pt)
- var Vt = be = Gt.strokeWidth();
- else
- Vt = J.borderWidth || 0, be = Vt + (J.shadow ? 8 : 0), vt = { fill: vt || "none" }, (Vt || Gt["stroke-width"]) && (vt.stroke = J.borderColor, vt["stroke-width"] = Vt), Gt.attr(vt).shadow(J.shadow);
- Gt[Yt]({ x: be / 2, y: be / 2, width: ot - be - Vt % 2, height: lt - be - Vt % 2, r: J.borderRadius }), Yt = "animate", Wt || (Yt = "attr", this.plotBackground = Wt = tt.rect().addClass("highcharts-plot-background").add()), Wt[Yt](Nt), pt || (Wt.attr({ fill: Mt || "none" }).shadow(J.plotShadow), Pt && (yt ? (Pt !== yt.attr("href") && yt.attr("href", Pt), yt.animate(Nt)) : this.plotBGImage = tt.image(Pt, At, St, Dt, _t).add())), Ot ? Ot.animate({ width: Kt.width, height: Kt.height }) : this.clipRect = tt.clipRect(Kt), Yt = "animate", Jt || (Yt = "attr", this.plotBorder = Jt = tt.rect().addClass("highcharts-plot-border").attr({ zIndex: 1 }).add()), pt || Jt.attr({ stroke: J.plotBorderColor, "stroke-width": J.plotBorderWidth || 0, fill: "none" }), Jt[Yt](Jt.crisp({ x: At, y: St, width: Dt, height: _t }, -Jt.strokeWidth())), this.isDirtyBox = !1, $(this, "afterDrawChartBox");
- }, at.prototype.propFromSeries = function() {
- var J = this, tt = J.options.chart, ot = J.options.series, lt, pt, yt;
- ["inverted", "angular", "polar"].forEach(function(vt) {
- for (pt = s[tt.type || tt.defaultSeriesType], yt = tt[vt] || pt && pt.prototype[vt], lt = ot && ot.length; !yt && lt--; )
- (pt = s[ot[lt].type]) && pt.prototype[vt] && (yt = !0);
- J[vt] = yt;
- });
- }, at.prototype.linkSeries = function() {
- var J = this, tt = J.series;
- tt.forEach(function(ot) {
- ot.linkedSeries.length = 0;
- }), tt.forEach(function(ot) {
- var lt = ot.options.linkedTo;
- Z(lt) && (lt = lt === ":previous" ? J.series[ot.index - 1] : J.get(lt)) && lt.linkedParent !== ot && (lt.linkedSeries.push(ot), ot.linkedParent = lt, lt.enabledDataSorting && ot.setDataSortingOptions(), ot.visible = et(ot.options.visible, lt.options.visible, ot.visible));
- }), $(this, "afterLinkSeries");
- }, at.prototype.renderSeries = function() {
- this.series.forEach(function(J) {
- J.translate(), J.render();
- });
- }, at.prototype.renderLabels = function() {
- var J = this, tt = J.options.labels;
- tt.items && tt.items.forEach(function(ot) {
- var lt = L(tt.style, ot.style), pt = nt(lt.left) + J.plotLeft, yt = nt(lt.top) + J.plotTop + 12;
- delete lt.left, delete lt.top, J.renderer.text(ot.html, pt, yt).attr({ zIndex: 2 }).css(lt).add();
- });
- }, at.prototype.render = function() {
- var J = this.axes, tt = this.colorAxis, ot = this.renderer, lt = this.options, pt = function(At) {
- At.forEach(function(St) {
- St.visible && St.render();
- });
- }, yt = 0;
- this.setTitle(), this.legend = new V(this, lt.legend), this.getStacks && this.getStacks(), this.getMargins(!0), this.setChartSize(), lt = this.plotWidth, J.some(function(At) {
- if (At.horiz && At.visible && At.options.labels.enabled && At.series.length)
- return yt = 21, !0;
- });
- var vt = this.plotHeight = Math.max(this.plotHeight - yt, 0);
- J.forEach(function(At) {
- At.setScale();
- }), this.getAxisMargins();
- var Mt = 1.1 < lt / this.plotWidth, Pt = 1.05 < vt / this.plotHeight;
- (Mt || Pt) && (J.forEach(function(At) {
- (At.horiz && Mt || !At.horiz && Pt) && At.setTickInterval(!0);
- }), this.getMargins()), this.drawChartBox(), this.hasCartesianSeries ? pt(J) : tt && tt.length && pt(tt), this.seriesGroup || (this.seriesGroup = ot.g("series-group").attr({ zIndex: 3 }).add()), this.renderSeries(), this.renderLabels(), this.addCredits(), this.setResponsive && this.setResponsive(), this.hasRendered = !0;
- }, at.prototype.addCredits = function(J) {
- var tt = this, ot = q(!0, this.options.credits, J);
- ot.enabled && !this.credits && (this.credits = this.renderer.text(ot.text + (this.mapCredits || ""), 0, 0).addClass("highcharts-credits").on("click", function() {
- ot.href && (c.location.href = ot.href);
- }).attr({ align: ot.position.align, zIndex: 8 }), tt.styledMode || this.credits.css(ot.style), this.credits.add().align(ot.position), this.credits.update = function(lt) {
- tt.credits = tt.credits.destroy(), tt.addCredits(lt);
- });
- }, at.prototype.destroy = function() {
- var J = this, tt = J.axes, ot = J.series, lt = J.container, pt = lt && lt.parentNode, yt;
- for ($(J, "destroy"), J.renderer.forExport ? g(l, J) : l[J.index] = void 0, H.chartCount--, J.renderTo.removeAttribute("data-highcharts-chart"), ct(J), yt = tt.length; yt--; )
- tt[yt] = tt[yt].destroy();
- for (this.scroller && this.scroller.destroy && this.scroller.destroy(), yt = ot.length; yt--; )
- ot[yt] = ot[yt].destroy();
- "title subtitle chartBackground plotBackground plotBGImage plotBorder seriesGroup clipRect credits pointer rangeSelector legend resetZoomButton tooltip renderer".split(" ").forEach(function(vt) {
- var Mt = J[vt];
- Mt && Mt.destroy && (J[vt] = Mt.destroy());
- }), lt && (lt.innerHTML = O.emptyHTML, ct(lt), pt && X(lt)), it(J, function(vt, Mt) {
- delete J[Mt];
- });
- }, at.prototype.firstRender = function() {
- var J = this, tt = J.options;
- (!J.isReadyToRender || J.isReadyToRender()) && (J.getContainer(), J.resetMargins(), J.setChartSize(), J.propFromSeries(), J.getAxes(), (A(tt.series) ? tt.series : []).forEach(function(ot) {
- J.initSeries(ot);
- }), J.linkSeries(), J.setSeriesData(), $(J, "beforeRender"), B && (G.isRequired() ? J.pointer = new G(J, tt) : J.pointer = new B(J, tt)), J.render(), J.pointer.getChartPosition(), !J.renderer.imgCount && !J.hasLoaded && J.onload(), J.temporaryDisplay(!0));
- }, at.prototype.onload = function() {
- this.callbacks.concat([this.callback]).forEach(function(J) {
- J && typeof this.index < "u" && J.apply(this, [this]);
- }, this), $(this, "load"), $(this, "render"), E(this.index) && this.setReflow(this.options.chart.reflow), this.hasLoaded = !0;
- }, at.prototype.addSeries = function(J, tt, ot) {
- var lt = this, pt;
- return J && (tt = et(tt, !0), $(lt, "addSeries", { options: J }, function() {
- pt = lt.initSeries(J), lt.isDirtyLegend = !0, lt.linkSeries(), pt.enabledDataSorting && pt.setData(J.data, !1), $(lt, "afterAddSeries", { series: pt }), tt && lt.redraw(ot);
- })), pt;
- }, at.prototype.addAxis = function(J, tt, ot, lt) {
- return this.createAxis(tt ? "xAxis" : "yAxis", { axis: J, redraw: ot, animation: lt });
- }, at.prototype.addColorAxis = function(J, tt, ot) {
- return this.createAxis("colorAxis", { axis: J, redraw: tt, animation: ot });
- }, at.prototype.createAxis = function(J, tt) {
- return J = new N(this, q(tt.axis, { index: this[J].length, isX: J === "xAxis" })), et(tt.redraw, !0) && this.redraw(tt.animation), J;
- }, at.prototype.showLoading = function(J) {
- var tt = this, ot = tt.options, lt = ot.loading, pt = function() {
- yt && W(yt, { left: tt.plotLeft + "px", top: tt.plotTop + "px", width: tt.plotWidth + "px", height: tt.plotHeight + "px" });
- }, yt = tt.loadingDiv, vt = tt.loadingSpan;
- yt || (tt.loadingDiv = yt = I("div", { className: "highcharts-loading highcharts-loading-hidden" }, null, tt.container)), vt || (tt.loadingSpan = vt = I(
- "span",
- { className: "highcharts-loading-inner" },
- null,
- yt
- ), n(tt, "redraw", pt)), yt.className = "highcharts-loading", O.setElementHTML(vt, et(J, ot.lang.loading, "")), tt.styledMode || (W(yt, L(lt.style, { zIndex: 10 })), W(vt, lt.labelStyle), tt.loadingShown || (W(yt, { opacity: 0, display: "" }), j(yt, { opacity: lt.style.opacity || 0.5 }, { duration: lt.showDuration || 0 }))), tt.loadingShown = !0, pt();
- }, at.prototype.hideLoading = function() {
- var J = this.options, tt = this.loadingDiv;
- tt && (tt.className = "highcharts-loading highcharts-loading-hidden", this.styledMode || j(tt, { opacity: 0 }, {
- duration: J.loading.hideDuration || 100,
- complete: function() {
- W(tt, { display: "none" });
- }
- })), this.loadingShown = !1;
- }, at.prototype.update = function(J, tt, ot, lt) {
- var pt = this, yt = { credits: "addCredits", title: "setTitle", subtitle: "setSubtitle", caption: "setCaption" }, vt = J.isResponsiveOptions, Mt = [], Pt, At;
- $(pt, "update", { options: J }), vt || pt.setResponsive(!1, !0), J = _(J, pt.options), pt.userOptions = q(pt.userOptions, J);
- var St = J.chart;
- if (St) {
- if (q(!0, pt.options.chart, St), "className" in St && pt.setClassName(St.className), "reflow" in St && pt.setReflow(St.reflow), "inverted" in St || "polar" in St || "type" in St) {
- pt.propFromSeries();
- var Dt = !0;
- }
- "alignTicks" in St && (Dt = !0), "events" in St && v(this, St), it(St, function(_t, Nt) {
- pt.propsRequireUpdateSeries.indexOf("chart." + Nt) !== -1 && (Pt = !0), pt.propsRequireDirtyBox.indexOf(Nt) !== -1 && (pt.isDirtyBox = !0), pt.propsRequireReflow.indexOf(Nt) !== -1 && (vt ? pt.isDirtyBox = !0 : At = !0);
- }), !pt.styledMode && St.style && pt.renderer.setStyle(pt.options.chart.style || {});
- }
- !pt.styledMode && J.colors && (this.options.colors = J.colors), J.time && (this.time === t && (this.time = new d(J.time)), q(!0, pt.options.time, J.time)), it(J, function(_t, Nt) {
- pt[Nt] && typeof pt[Nt].update == "function" ? pt[Nt].update(_t, !1) : typeof pt[yt[Nt]] == "function" ? pt[yt[Nt]](_t) : Nt !== "colors" && pt.collectionsWithUpdate.indexOf(Nt) === -1 && q(!0, pt.options[Nt], J[Nt]), Nt !== "chart" && pt.propsRequireUpdateSeries.indexOf(Nt) !== -1 && (Pt = !0);
- }), this.collectionsWithUpdate.forEach(function(_t) {
- if (J[_t]) {
- var Nt = [];
- pt[_t].forEach(function(Ot, Kt) {
- Ot.options.isInternal || Nt.push(et(Ot.options.index, Kt));
- }), gt(J[_t]).forEach(function(Ot, Kt) {
- var Gt = E(Ot.id), Wt;
- Gt && (Wt = pt.get(Ot.id)), !Wt && pt[_t] && (Wt = pt[_t][Nt ? Nt[Kt] : Kt]) && Gt && E(Wt.options.id) && (Wt = void 0), Wt && Wt.coll === _t && (Wt.update(Ot, !1), ot && (Wt.touched = !0)), !Wt && ot && pt.collectionsWithInit[_t] && (pt.collectionsWithInit[_t][0].apply(pt, [Ot].concat(pt.collectionsWithInit[_t][1] || []).concat([!1])).touched = !0);
- }), ot && pt[_t].forEach(function(Ot) {
- Ot.touched || Ot.options.isInternal ? delete Ot.touched : Mt.push(Ot);
- });
- }
- }), Mt.forEach(function(_t) {
- _t.chart && _t.remove && _t.remove(!1);
- }), Dt && pt.axes.forEach(function(_t) {
- _t.update({}, !1);
- }), Pt && pt.getSeriesOrderByLinks().forEach(function(_t) {
- _t.chart && _t.update({}, !1);
- }, this), Dt = St && St.width, St = St && (Z(St.height) ? rt(St.height, Dt || pt.chartWidth) : St.height), At || F(Dt) && Dt !== pt.chartWidth || F(St) && St !== pt.chartHeight ? pt.setSize(Dt, St, lt) : et(tt, !0) && pt.redraw(lt), $(pt, "afterUpdate", { options: J, redraw: tt, animation: lt });
- }, at.prototype.setSubtitle = function(J, tt) {
- this.applyDescription("subtitle", J), this.layOutTitles(tt);
- }, at.prototype.setCaption = function(J, tt) {
- this.applyDescription("caption", J), this.layOutTitles(tt);
- }, at.prototype.showResetZoom = function() {
- function J() {
- tt.zoomOut();
- }
- var tt = this, ot = a.lang, lt = tt.options.chart.resetZoomButton, pt = lt.theme, yt = pt.states, vt = lt.relativeTo === "chart" || lt.relativeTo === "spacingBox" ? null : "scrollablePlotBox";
- $(this, "beforeShowResetZoom", null, function() {
- tt.resetZoomButton = tt.renderer.button(ot.resetZoom, null, null, J, pt, yt && yt.hover).attr({ align: lt.position.align, title: ot.resetZoomTitle }).addClass("highcharts-reset-zoom").add().align(lt.position, !1, vt);
- }), $(this, "afterShowResetZoom");
- }, at.prototype.zoomOut = function() {
- $(this, "selection", { resetSelection: !0 }, this.zoom);
- }, at.prototype.zoom = function(J) {
- var tt = this, ot = tt.pointer, lt = tt.inverted ? ot.mouseDownX : ot.mouseDownY, pt = !1, yt;
- !J || J.resetSelection ? (tt.axes.forEach(function(Mt) {
- yt = Mt.zoom();
- }), ot.initiated = !1) : J.xAxis.concat(J.yAxis).forEach(function(Mt) {
- var Pt = Mt.axis, At = tt.inverted ? Pt.left : Pt.top, St = tt.inverted ? At + Pt.width : At + Pt.height, Dt = Pt.isXAxis, _t = !1;
- (!Dt && lt >= At && lt <= St || Dt || !E(lt)) && (_t = !0), ot[Dt ? "zoomX" : "zoomY"] && _t && (yt = Pt.zoom(Mt.min, Mt.max), Pt.displayBtn && (pt = !0));
- });
- var vt = tt.resetZoomButton;
- pt && !vt ? tt.showResetZoom() : !pt && Y(vt) && (tt.resetZoomButton = vt.destroy()), yt && tt.redraw(et(
- tt.options.chart.animation,
- J && J.animation,
- 100 > tt.pointCount
- ));
- }, at.prototype.pan = function(J, tt) {
- var ot = this, lt = ot.hoverPoints;
- tt = typeof tt == "object" ? tt : { enabled: tt, type: "x" };
- var pt = ot.options.chart, yt = ot.options.mapNavigation && ot.options.mapNavigation.enabled;
- pt && pt.panning && (pt.panning = tt);
- var vt = tt.type, Mt;
- $(this, "pan", { originalEvent: J }, function() {
- lt && lt.forEach(function(St) {
- St.setState();
- });
- var Pt = ot.xAxis;
- vt === "xy" ? Pt = Pt.concat(ot.yAxis) : vt === "y" && (Pt = ot.yAxis);
- var At = {};
- Pt.forEach(function(St) {
- if (St.options.panningEnabled && !St.options.isInternal) {
- var Dt = St.horiz, _t = J[Dt ? "chartX" : "chartY"];
- Dt = Dt ? "mouseDownX" : "mouseDownY";
- var Nt = ot[Dt], Ot = St.minPointOffset || 0, Kt = St.reversed && !ot.inverted || !St.reversed && ot.inverted ? -1 : 1, Gt = St.getExtremes(), Wt = St.toValue(Nt - _t, !0) + Ot * Kt, Jt = St.toValue(Nt + St.len - _t, !0) - (Ot * Kt || St.isXAxis && St.pointRangePadding || 0), be = Jt < Wt;
- Kt = St.hasVerticalPanning(), Nt = be ? Jt : Wt, Wt = be ? Wt : Jt;
- var Yt = St.panningState;
- !Kt || St.isXAxis || Yt && !Yt.isDirty || St.series.forEach(function(Vt) {
- var Ce = Vt.getProcessedData(!0);
- Ce = Vt.getExtremes(Ce.yData, !0), Yt || (Yt = { startMin: Number.MAX_VALUE, startMax: -Number.MAX_VALUE }), F(Ce.dataMin) && F(Ce.dataMax) && (Yt.startMin = Math.min(et(Vt.options.threshold, 1 / 0), Ce.dataMin, Yt.startMin), Yt.startMax = Math.max(et(Vt.options.threshold, -1 / 0), Ce.dataMax, Yt.startMax));
- }), Kt = Math.min(et(Yt && Yt.startMin, Gt.dataMin), Ot ? Gt.min : St.toValue(St.toPixels(Gt.min) - St.minPixelPadding)), Jt = Math.max(et(Yt && Yt.startMax, Gt.dataMax), Ot ? Gt.max : St.toValue(St.toPixels(Gt.max) + St.minPixelPadding)), St.panningState = Yt, St.isOrdinal || (Ot = Kt - Nt, 0 < Ot && (Wt += Ot, Nt = Kt), Ot = Wt - Jt, 0 < Ot && (Wt = Jt, Nt -= Ot), St.series.length && Nt !== Gt.min && Wt !== Gt.max && Nt >= Kt && Wt <= Jt && (St.setExtremes(Nt, Wt, !1, !1, { trigger: "pan" }), ot.resetZoomButton || yt || Nt === Kt || Wt === Jt || !vt.match("y") || (ot.showResetZoom(), St.displayBtn = !1), Mt = !0), At[Dt] = _t);
- }
- }), it(At, function(St, Dt) {
- ot[Dt] = St;
- }), Mt && ot.redraw(!1), W(ot.container, { cursor: "move" });
- });
- }, at;
- }(), L(y.prototype, {
- callbacks: [],
- collectionsWithInit: { xAxis: [y.prototype.addAxis, [!0]], yAxis: [y.prototype.addAxis, [!1]], series: [y.prototype.addSeries] },
- collectionsWithUpdate: ["xAxis", "yAxis", "series"],
- propsRequireDirtyBox: "backgroundColor borderColor borderWidth borderRadius plotBackgroundColor plotBackgroundImage plotBorderColor plotBorderWidth plotShadow shadow".split(" "),
- propsRequireReflow: "margin marginTop marginRight marginBottom marginLeft spacing spacingTop spacingRight spacingBottom spacingLeft".split(" "),
- propsRequireUpdateSeries: "chart.inverted chart.polar chart.ignoreHiddenSeries chart.type colors plotOptions time tooltip".split(" ")
- }), y;
- }), M(o, "Core/Legend/LegendSymbol.js", [o["Core/Utilities.js"]], function(y) {
- var N = y.merge, D = y.pick, U;
- return function(H) {
- H.drawLineMarker = function(V) {
- var G = this.options, R = V.symbolWidth, B = V.symbolHeight, S = B / 2, x = this.chart.renderer, f = this.legendGroup;
- V = V.baseline - Math.round(0.3 * V.fontMetrics.b);
- var d = {}, T = G.marker;
- this.chart.styledMode || (d = { "stroke-width": G.lineWidth || 0 }, G.dashStyle && (d.dashstyle = G.dashStyle)), this.legendLine = x.path([["M", 0, V], ["L", R, V]]).addClass("highcharts-graph").attr(d).add(f), T && T.enabled !== !1 && R && (G = Math.min(D(T.radius, S), S), this.symbol.indexOf("url") === 0 && (T = N(T, { width: B, height: B }), G = 0), this.legendSymbol = R = x.symbol(this.symbol, R / 2 - G, V - G, 2 * G, 2 * G, T).addClass("highcharts-point").add(f), R.isMarker = !0);
- }, H.drawRectangle = function(V, G) {
- var R = V.symbolHeight, B = V.options.squareSymbol;
- G.legendSymbol = this.chart.renderer.rect(B ? (V.symbolWidth - R) / 2 : 0, V.baseline - R + 1, B ? R : V.symbolWidth, R, D(V.options.symbolRadius, R / 2)).addClass("highcharts-point").attr({ zIndex: 3 }).add(G.legendGroup);
- };
- }(U || (U = {})), U;
- }), M(o, "Core/Series/SeriesDefaults.js", [], function() {
- return { lineWidth: 2, allowPointSelect: !1, crisp: !0, showCheckbox: !1, animation: { duration: 1e3 }, events: {}, marker: { enabledThreshold: 2, lineColor: "#ffffff", lineWidth: 0, radius: 4, states: {
- normal: { animation: !0 },
- hover: { animation: { duration: 50 }, enabled: !0, radiusPlus: 2, lineWidthPlus: 1 },
- select: { fillColor: "#cccccc", lineColor: "#000000", lineWidth: 2 }
- } }, point: { events: {} }, dataLabels: { animation: {}, align: "center", defer: !0, formatter: function() {
- var y = this.series.chart.numberFormatter;
- return typeof this.y != "number" ? "" : y(this.y, -1);
- }, padding: 5, style: { fontSize: "11px", fontWeight: "bold", color: "contrast", textOutline: "1px contrast" }, verticalAlign: "bottom", x: 0, y: 0 }, cropThreshold: 300, opacity: 1, pointRange: 0, softThreshold: !0, states: {
- normal: { animation: !0 },
- hover: { animation: { duration: 50 }, lineWidthPlus: 1, marker: {}, halo: { size: 10, opacity: 0.25 } },
- select: { animation: { duration: 0 } },
- inactive: { animation: { duration: 50 }, opacity: 0.2 }
- }, stickyTracking: !0, turboThreshold: 1e3, findNearestPointBy: "x" };
- }), M(o, "Core/Series/Series.js", [
- o["Core/Animation/AnimationUtilities.js"],
- o["Core/DefaultOptions.js"],
- o["Core/Foundation.js"],
- o["Core/Globals.js"],
- o["Core/Legend/LegendSymbol.js"],
- o["Core/Series/Point.js"],
- o["Core/Series/SeriesDefaults.js"],
- o["Core/Series/SeriesRegistry.js"],
- o["Core/Renderer/SVG/SVGElement.js"],
- o["Core/Utilities.js"]
- ], function(y, N, D, U, H, V, G, R, B, S) {
- var x = y.animObject, f = y.setAnimation, d = N.defaultOptions, T = D.registerEventOptions, O = U.hasTouch, j = U.svg, k = U.win, b = R.seriesTypes, w = S.addEvent, v = S.arrayMax, l = S.arrayMin, h = S.clamp, u = S.cleanRecursively, i = S.correctFloat, c = S.defined, a = S.erase, t = S.error, s = S.extend, n = S.find, P = S.fireEvent, _ = S.getNestedProperty, I = S.isArray, W = S.isNumber, E = S.isString, X = S.merge, g = S.objectEach, m = S.pick, L = S.removeEvent, z = S.splat, $ = S.syncTimeout;
- return y = function() {
- function Q() {
- this.zones = this.yAxis = this.xAxis = this.userOptions = this.tooltipOptions = this.processedYData = this.processedXData = this.points = this.options = this.linkedSeries = this.index = this.eventsToUnbind = this.eventOptions = this.data = this.chart = this._i = void 0;
- }
- return Q.prototype.init = function(A, F) {
- P(this, "init", { options: F });
- var Y = this, Z = A.series;
- this.eventsToUnbind = [], Y.chart = A, Y.options = Y.setOptions(F), F = Y.options, Y.linkedSeries = [], Y.bindAxes(), s(Y, { name: F.name, state: "", visible: F.visible !== !1, selected: F.selected === !0 }), T(this, F);
- var q = F.events;
- (q && q.click || F.point && F.point.events && F.point.events.click || F.allowPointSelect) && (A.runTrackerClick = !0), Y.getColor(), Y.getSymbol(), Y.parallelArrays.forEach(function(et) {
- Y[et + "Data"] || (Y[et + "Data"] = []);
- }), Y.isCartesian && (A.hasCartesianSeries = !0);
- var it;
- Z.length && (it = Z[Z.length - 1]), Y._i = m(it && it._i, -1) + 1, Y.opacity = Y.options.opacity, A.orderSeries(this.insert(Z)), F.dataSorting && F.dataSorting.enabled ? Y.setDataSortingOptions() : Y.points || Y.data || Y.setData(F.data, !1), P(this, "afterInit");
- }, Q.prototype.is = function(A) {
- return b[A] && this instanceof b[A];
- }, Q.prototype.insert = function(A) {
- var F = this.options.index, Y;
- if (W(F)) {
- for (Y = A.length; Y--; )
- if (F >= m(A[Y].options.index, A[Y]._i)) {
- A.splice(Y + 1, 0, this);
- break;
- }
- Y === -1 && A.unshift(this), Y += 1;
- } else
- A.push(this);
- return m(Y, A.length - 1);
- }, Q.prototype.bindAxes = function() {
- var A = this, F = A.options, Y = A.chart, Z;
- P(this, "bindAxes", null, function() {
- (A.axisTypes || []).forEach(function(q) {
- var it = 0;
- Y[q].forEach(function(et) {
- Z = et.options, (F[q] === it && !Z.isInternal || typeof F[q] < "u" && F[q] === Z.id || typeof F[q] > "u" && Z.index === 0) && (A.insert(et.series), A[q] = et, et.isDirty = !0), Z.isInternal || it++;
- }), A[q] || A.optionalAxis === q || t(18, !0, Y);
- });
- }), P(this, "afterBindAxes");
- }, Q.prototype.updateParallelArrays = function(A, F) {
- var Y = A.series, Z = arguments, q = W(F) ? function(it) {
- var et = it === "y" && Y.toYData ? Y.toYData(A) : A[it];
- Y[it + "Data"][F] = et;
- } : function(it) {
- Array.prototype[F].apply(Y[it + "Data"], Array.prototype.slice.call(Z, 2));
- };
- Y.parallelArrays.forEach(q);
- }, Q.prototype.hasData = function() {
- return this.visible && typeof this.dataMax < "u" && typeof this.dataMin < "u" || this.visible && this.yData && 0 < this.yData.length;
- }, Q.prototype.autoIncrement = function(A) {
- var F = this.options, Y = F.pointIntervalUnit, Z = F.relativeXValue, q = this.chart.time, it = this.xIncrement, et;
- return it = m(it, F.pointStart, 0), this.pointInterval = et = m(this.pointInterval, F.pointInterval, 1), Z && W(A) && (et *= A), Y && (F = new q.Date(it), Y === "day" ? q.set("Date", F, q.get("Date", F) + et) : Y === "month" ? q.set("Month", F, q.get("Month", F) + et) : Y === "year" && q.set("FullYear", F, q.get("FullYear", F) + et), et = F.getTime() - it), Z && W(A) ? it + et : (this.xIncrement = it + et, it);
- }, Q.prototype.setDataSortingOptions = function() {
- var A = this.options;
- s(this, { requireSorting: !1, sorted: !1, enabledDataSorting: !0, allowDG: !1 }), c(A.pointRange) || (A.pointRange = 1);
- }, Q.prototype.setOptions = function(A) {
- var F = this.chart, Y = F.options, Z = Y.plotOptions, q = F.userOptions || {};
- A = X(A), F = F.styledMode;
- var it = { plotOptions: Z, userOptions: A };
- P(this, "setOptions", it);
- var et = it.plotOptions[this.type], nt = q.plotOptions || {};
- return this.userOptions = it.userOptions, q = X(et, Z.series, q.plotOptions && q.plotOptions[this.type], A), this.tooltipOptions = X(d.tooltip, d.plotOptions.series && d.plotOptions.series.tooltip, d.plotOptions[this.type].tooltip, Y.tooltip.userOptions, Z.series && Z.series.tooltip, Z[this.type].tooltip, A.tooltip), this.stickyTracking = m(A.stickyTracking, nt[this.type] && nt[this.type].stickyTracking, nt.series && nt.series.stickyTracking, this.tooltipOptions.shared && !this.noSharedTooltip ? !0 : q.stickyTracking), et.marker === null && delete q.marker, this.zoneAxis = q.zoneAxis, Z = this.zones = (q.zones || []).slice(), !q.negativeColor && !q.negativeFillColor || q.zones || (Y = { value: q[this.zoneAxis + "Threshold"] || q.threshold || 0, className: "highcharts-negative" }, F || (Y.color = q.negativeColor, Y.fillColor = q.negativeFillColor), Z.push(Y)), Z.length && c(Z[Z.length - 1].value) && Z.push(F ? {} : { color: this.color, fillColor: this.fillColor }), P(this, "afterSetOptions", { options: q }), q;
- }, Q.prototype.getName = function() {
- return m(this.options.name, "Series " + (this.index + 1));
- }, Q.prototype.getCyclic = function(A, F, Y) {
- var Z = this.chart, q = this.userOptions, it = A + "Index", et = A + "Counter", nt = Y ? Y.length : m(Z.options.chart[A + "Count"], Z[A + "Count"]);
- if (!F) {
- var rt = m(q[it], q["_" + it]);
- c(rt) || (Z.series.length || (Z[et] = 0), q["_" + it] = rt = Z[et] % nt, Z[et] += 1), Y && (F = Y[rt]);
- }
- typeof rt < "u" && (this[it] = rt), this[A] = F;
- }, Q.prototype.getColor = function() {
- this.chart.styledMode ? this.getCyclic("color") : this.options.colorByPoint ? this.color = "#cccccc" : this.getCyclic("color", this.options.color || d.plotOptions[this.type].color, this.chart.options.colors);
- }, Q.prototype.getPointsCollection = function() {
- return (this.hasGroupedData ? this.points : this.data) || [];
- }, Q.prototype.getSymbol = function() {
- this.getCyclic("symbol", this.options.marker.symbol, this.chart.options.symbols);
- }, Q.prototype.findPointIndex = function(A, F) {
- var Y = A.id, Z = A.x, q = this.points, it = this.options.dataSorting, et, nt;
- if (Y)
- it = this.chart.get(Y), it instanceof V && (et = it);
- else if ((this.linkedParent || this.enabledDataSorting || this.options.relativeXValue) && (et = function(ct) {
- return !ct.touched && ct.index === A.index;
- }, it && it.matchByName ? et = function(ct) {
- return !ct.touched && ct.name === A.name;
- } : this.options.relativeXValue && (et = function(ct) {
- return !ct.touched && ct.options.x === A.x;
- }), et = n(q, et), !et))
- return;
- if (et) {
- var rt = et && et.index;
- typeof rt < "u" && (nt = !0);
- }
- return typeof rt > "u" && W(Z) && (rt = this.xData.indexOf(Z, F)), rt !== -1 && typeof rt < "u" && this.cropped && (rt = rt >= this.cropStart ? rt - this.cropStart : rt), !nt && W(rt) && q[rt] && q[rt].touched && (rt = void 0), rt;
- }, Q.prototype.updateData = function(A, F) {
- var Y = this.options, Z = Y.dataSorting, q = this.points, it = [], et = this.requireSorting, nt = A.length === q.length, rt, ct, gt, dt = !0;
- if (this.xIncrement = null, A.forEach(function(ht, at) {
- var J = c(ht) && this.pointClass.prototype.optionsToObject.call({ series: this }, ht) || {}, tt = J.x;
- J.id || W(tt) ? (J = this.findPointIndex(J, gt), J === -1 || typeof J > "u" ? it.push(ht) : q[J] && ht !== Y.data[J] ? (q[J].update(ht, !1, null, !1), q[J].touched = !0, et && (gt = J + 1)) : q[J] && (q[J].touched = !0), (!nt || at !== J || Z && Z.enabled || this.hasDerivedData) && (rt = !0)) : it.push(ht);
- }, this), rt)
- for (A = q.length; A--; )
- (ct = q[A]) && !ct.touched && ct.remove && ct.remove(!1, F);
- else
- !nt || Z && Z.enabled ? dt = !1 : (A.forEach(function(ht, at) {
- ht !== q[at].y && q[at].update && q[at].update(
- ht,
- !1,
- null,
- !1
- );
- }), it.length = 0);
- return q.forEach(function(ht) {
- ht && (ht.touched = !1);
- }), dt ? (it.forEach(function(ht) {
- this.addPoint(ht, !1, null, null, !1);
- }, this), this.xIncrement === null && this.xData && this.xData.length && (this.xIncrement = v(this.xData), this.autoIncrement()), !0) : !1;
- }, Q.prototype.setData = function(A, F, Y, Z) {
- var q = this, it = q.points, et = it && it.length || 0, nt = q.options, rt = q.chart, ct = nt.dataSorting, gt = q.xAxis, dt = nt.turboThreshold, ht = this.xData, at = this.yData, J = q.pointArrayMap;
- J = J && J.length;
- var tt = nt.keys, ot, lt = 0, pt = 1, yt = null;
- A = A || [];
- var vt = A.length;
- if (F = m(F, !0), ct && ct.enabled && (A = this.sortData(A)), Z !== !1 && vt && et && !q.cropped && !q.hasGroupedData && q.visible && !q.isSeriesBoosting && (ot = this.updateData(A, Y)), !ot) {
- if (q.xIncrement = null, q.colorCounter = 0, this.parallelArrays.forEach(function(Mt) {
- q[Mt + "Data"].length = 0;
- }), dt && vt > dt)
- if (yt = q.getFirstValidPoint(A), W(yt))
- for (Y = 0; Y < vt; Y++)
- ht[Y] = this.autoIncrement(), at[Y] = A[Y];
- else if (I(yt))
- if (J)
- if (yt.length === J)
- for (Y = 0; Y < vt; Y++)
- ht[Y] = this.autoIncrement(), at[Y] = A[Y];
- else
- for (Y = 0; Y < vt; Y++)
- Z = A[Y], ht[Y] = Z[0], at[Y] = Z.slice(
- 1,
- J + 1
- );
- else if (tt && (lt = tt.indexOf("x"), pt = tt.indexOf("y"), lt = 0 <= lt ? lt : 0, pt = 0 <= pt ? pt : 1), yt.length === 1 && (pt = 0), lt === pt)
- for (Y = 0; Y < vt; Y++)
- ht[Y] = this.autoIncrement(), at[Y] = A[Y][pt];
- else
- for (Y = 0; Y < vt; Y++)
- Z = A[Y], ht[Y] = Z[lt], at[Y] = Z[pt];
- else
- t(12, !1, rt);
- else
- for (Y = 0; Y < vt; Y++)
- typeof A[Y] < "u" && (Z = { series: q }, q.pointClass.prototype.applyOptions.apply(Z, [A[Y]]), q.updateParallelArrays(Z, Y));
- for (at && E(at[0]) && t(14, !0, rt), q.data = [], q.options.data = q.userOptions.data = A, Y = et; Y--; )
- it[Y] && it[Y].destroy && it[Y].destroy();
- gt && (gt.minRange = gt.userMinRange), q.isDirty = rt.isDirtyBox = !0, q.isDirtyData = !!it, Y = !1;
- }
- nt.legendType === "point" && (this.processData(), this.generatePoints()), F && rt.redraw(Y);
- }, Q.prototype.sortData = function(A) {
- var F = this, Y = F.options.dataSorting.sortKey || "y", Z = function(q, it) {
- return c(it) && q.pointClass.prototype.optionsToObject.call({ series: q }, it) || {};
- };
- return A.forEach(function(q, it) {
- A[it] = Z(F, q), A[it].index = it;
- }, this), A.concat().sort(function(q, it) {
- return q = _(Y, q), it = _(Y, it), it < q ? -1 : it > q ? 1 : 0;
- }).forEach(function(q, it) {
- q.x = it;
- }, this), F.linkedSeries && F.linkedSeries.forEach(function(q) {
- var it = q.options, et = it.data;
- it.dataSorting && it.dataSorting.enabled || !et || (et.forEach(function(nt, rt) {
- et[rt] = Z(q, nt), A[rt] && (et[rt].x = A[rt].x, et[rt].index = rt);
- }), q.setData(et, !1));
- }), A;
- }, Q.prototype.getProcessedData = function(A) {
- var F = this.xAxis, Y = this.options, Z = Y.cropThreshold, q = A || this.getExtremesFromAll || Y.getExtremesFromAll, it = this.isCartesian;
- A = F && F.val2lin, Y = !(!F || !F.logarithmic);
- var et = 0, nt = this.xData, rt = this.yData, ct = this.requireSorting, gt = !1, dt = nt.length;
- if (F) {
- gt = F.getExtremes();
- var ht = gt.min, at = gt.max;
- gt = F.categories && !F.names.length;
- }
- if (it && this.sorted && !q && (!Z || dt > Z || this.forceCrop)) {
- if (nt[dt - 1] < ht || nt[0] > at)
- nt = [], rt = [];
- else if (this.yData && (nt[0] < ht || nt[dt - 1] > at)) {
- var J = this.cropData(this.xData, this.yData, ht, at);
- nt = J.xData, rt = J.yData, et = J.start, J = !0;
- }
- }
- for (Z = nt.length || 1; --Z; )
- if (F = Y ? A(nt[Z]) - A(nt[Z - 1]) : nt[Z] - nt[Z - 1], 0 < F && (typeof tt > "u" || F < tt))
- var tt = F;
- else
- 0 > F && ct && !gt && (t(15, !1, this.chart), ct = !1);
- return { xData: nt, yData: rt, cropped: J, cropStart: et, closestPointRange: tt };
- }, Q.prototype.processData = function(A) {
- var F = this.xAxis;
- if (this.isCartesian && !this.isDirty && !F.isDirty && !this.yAxis.isDirty && !A)
- return !1;
- A = this.getProcessedData(), this.cropped = A.cropped, this.cropStart = A.cropStart, this.processedXData = A.xData, this.processedYData = A.yData, this.closestPointRange = this.basePointRange = A.closestPointRange, P(this, "afterProcessData");
- }, Q.prototype.cropData = function(A, F, Y, Z, q) {
- var it = A.length, et, nt = 0, rt = it;
- for (q = m(q, this.cropShoulder), et = 0; et < it; et++)
- if (A[et] >= Y) {
- nt = Math.max(0, et - q);
- break;
- }
- for (Y = et; Y < it; Y++)
- if (A[Y] > Z) {
- rt = Y + q;
- break;
- }
- return { xData: A.slice(nt, rt), yData: F.slice(
- nt,
- rt
- ), start: nt, end: rt };
- }, Q.prototype.generatePoints = function() {
- var A = this.options, F = A.data, Y = this.processedXData, Z = this.processedYData, q = this.pointClass, it = Y.length, et = this.cropStart || 0, nt = this.hasGroupedData, rt = A.keys, ct = [];
- A = A.dataGrouping && A.dataGrouping.groupAll ? et : 0;
- var gt, dt, ht = this.data;
- if (!ht && !nt) {
- var at = [];
- at.length = F.length, ht = this.data = at;
- }
- for (rt && nt && (this.options.keys = !1), dt = 0; dt < it; dt++) {
- if (at = et + dt, nt) {
- var J = new q().init(this, [Y[dt]].concat(z(Z[dt])));
- J.dataGroup = this.groupMap[A + dt], J.dataGroup.options && (J.options = J.dataGroup.options, s(J, J.dataGroup.options), delete J.dataLabels);
- } else
- (J = ht[at]) || typeof F[at] > "u" || (ht[at] = J = new q().init(this, F[at], Y[dt]));
- J && (J.index = nt ? A + dt : at, ct[dt] = J);
- }
- if (this.options.keys = rt, ht && (it !== (gt = ht.length) || nt))
- for (dt = 0; dt < gt; dt++)
- dt !== et || nt || (dt += it), ht[dt] && (ht[dt].destroyElements(), ht[dt].plotX = void 0);
- this.data = ht, this.points = ct, P(this, "afterGeneratePoints");
- }, Q.prototype.getXExtremes = function(A) {
- return { min: l(A), max: v(A) };
- }, Q.prototype.getExtremes = function(A, F) {
- var Y = this.xAxis, Z = this.yAxis, q = this.processedXData || this.xData, it = [], et = this.requireSorting ? this.cropShoulder : 0;
- Z = Z ? Z.positiveValuesOnly : !1;
- var nt, rt = 0, ct = 0, gt = 0;
- A = A || this.stackedYData || this.processedYData || [];
- var dt = A.length;
- if (Y) {
- var ht = Y.getExtremes();
- rt = ht.min, ct = ht.max;
- }
- for (nt = 0; nt < dt; nt++) {
- var at = q[nt];
- ht = A[nt];
- var J = (W(ht) || I(ht)) && (ht.length || 0 < ht || !Z);
- if (at = F || this.getExtremesFromAll || this.options.getExtremesFromAll || this.cropped || !Y || (q[nt + et] || at) >= rt && (q[nt - et] || at) <= ct, J && at)
- if (J = ht.length)
- for (; J--; )
- W(ht[J]) && (it[gt++] = ht[J]);
- else
- it[gt++] = ht;
- }
- return A = { activeYData: it, dataMin: l(it), dataMax: v(it) }, P(this, "afterGetExtremes", { dataExtremes: A }), A;
- }, Q.prototype.applyExtremes = function() {
- var A = this.getExtremes();
- return this.dataMin = A.dataMin, this.dataMax = A.dataMax, A;
- }, Q.prototype.getFirstValidPoint = function(A) {
- for (var F = A.length, Y = 0, Z = null; Z === null && Y < F; )
- Z = A[Y], Y++;
- return Z;
- }, Q.prototype.translate = function() {
- this.processedXData || this.processData(), this.generatePoints();
- var A = this.options, F = A.stacking, Y = this.xAxis, Z = Y.categories, q = this.enabledDataSorting, it = this.yAxis, et = this.points, nt = et.length, rt = this.pointPlacementToXValue(), ct = !!rt, gt = A.threshold, dt = A.startFromThreshold ? gt : 0, ht = this.zoneAxis || "y", at, J, tt = Number.MAX_VALUE;
- for (at = 0; at < nt; at++) {
- var ot = et[at], lt = ot.x, pt = void 0, yt = void 0, vt = ot.y, Mt = ot.low, Pt = F && it.stacking && it.stacking.stacks[(this.negStacks && vt < (dt ? 0 : gt) ? "-" : "") + this.stackKey];
- if ((it.positiveValuesOnly && !it.validatePositiveValue(vt) || Y.positiveValuesOnly && !Y.validatePositiveValue(lt)) && (ot.isNull = !0), ot.plotX = J = i(h(Y.translate(lt, 0, 0, 0, 1, rt, this.type === "flags"), -1e5, 1e5)), F && this.visible && Pt && Pt[lt]) {
- var At = this.getStackIndicator(
- At,
- lt,
- this.index
- );
- ot.isNull || (pt = Pt[lt], yt = pt.points[At.key]);
- }
- if (I(yt) && (Mt = yt[0], vt = yt[1], Mt === dt && At.key === Pt[lt].base && (Mt = m(W(gt) && gt, it.min)), it.positiveValuesOnly && 0 >= Mt && (Mt = null), ot.total = ot.stackTotal = pt.total, ot.percentage = pt.total && ot.y / pt.total * 100, ot.stackY = vt, this.irregularWidths || pt.setOffset(this.pointXOffset || 0, this.barW || 0)), ot.yBottom = c(Mt) ? h(it.translate(Mt, 0, 1, 0, 1), -1e5, 1e5) : null, this.dataModify && (vt = this.dataModify.modifyValue(vt, at)), ot.plotY = void 0, W(vt) && (pt = it.translate(vt, !1, !0, !1, !0), typeof pt < "u" && (ot.plotY = h(
- pt,
- -1e5,
- 1e5
- ))), ot.isInside = this.isPointInside(ot), ot.clientX = ct ? i(Y.translate(lt, 0, 0, 0, 1, rt)) : J, ot.negative = ot[ht] < (A[ht + "Threshold"] || gt || 0), ot.category = Z && typeof Z[ot.x] < "u" ? Z[ot.x] : ot.x, !ot.isNull && ot.visible !== !1) {
- typeof St < "u" && (tt = Math.min(tt, Math.abs(J - St)));
- var St = J;
- }
- ot.zone = this.zones.length ? ot.getZone() : void 0, !ot.graphic && this.group && q && (ot.isNew = !0);
- }
- this.closestPointRangePx = tt, P(this, "afterTranslate");
- }, Q.prototype.getValidPoints = function(A, F, Y) {
- var Z = this.chart;
- return (A || this.points || []).filter(function(q) {
- return F && !Z.isInsidePlot(q.plotX, q.plotY, { inverted: Z.inverted }) ? !1 : q.visible !== !1 && (Y || !q.isNull);
- });
- }, Q.prototype.getClipBox = function() {
- var A = this.chart, F = this.xAxis, Y = this.yAxis, Z = X(A.clipBox);
- return F && F.len !== A.plotSizeX && (Z.width = F.len), Y && Y.len !== A.plotSizeY && (Z.height = Y.len), Z;
- }, Q.prototype.getSharedClipKey = function() {
- return this.sharedClipKey = (this.options.xAxis || 0) + "," + (this.options.yAxis || 0);
- }, Q.prototype.setClip = function() {
- var A = this.chart, F = this.group, Y = this.markerGroup, Z = A.sharedClips;
- A = A.renderer;
- var q = this.getClipBox(), it = this.getSharedClipKey(), et = Z[it];
- et ? et.animate(q) : Z[it] = et = A.clipRect(q), F && F.clip(this.options.clip === !1 ? void 0 : et), Y && Y.clip();
- }, Q.prototype.animate = function(A) {
- var F = this.chart, Y = this.group, Z = this.markerGroup, q = F.inverted, it = x(this.options.animation), et = [this.getSharedClipKey(), it.duration, it.easing, it.defer].join(), nt = F.sharedClips[et], rt = F.sharedClips[et + "m"];
- if (A && Y)
- it = this.getClipBox(), nt ? nt.attr("height", it.height) : (it.width = 0, q && (it.x = F.plotHeight), nt = F.renderer.clipRect(it), F.sharedClips[et] = nt, rt = F.renderer.clipRect({ x: q ? (F.plotSizeX || 0) + 99 : -99, y: q ? -F.plotLeft : -F.plotTop, width: 99, height: q ? F.chartWidth : F.chartHeight }), F.sharedClips[et + "m"] = rt), Y.clip(nt), Z && Z.clip(rt);
- else if (nt && !nt.hasClass("highcharts-animating")) {
- F = this.getClipBox();
- var ct = it.step;
- Z && Z.element.childNodes.length && (it.step = function(gt, dt) {
- ct && ct.apply(dt, arguments), rt && rt.element && rt.attr(dt.prop, dt.prop === "width" ? gt + 99 : gt);
- }), nt.addClass("highcharts-animating").animate(F, it);
- }
- }, Q.prototype.afterAnimate = function() {
- var A = this;
- this.setClip(), g(
- this.chart.sharedClips,
- function(F, Y, Z) {
- F && !A.chart.container.querySelector('[clip-path="url(#' + F.id + ')"]') && (F.destroy(), delete Z[Y]);
- }
- ), this.finishedAnimating = !0, P(this, "afterAnimate");
- }, Q.prototype.drawPoints = function() {
- var A = this.points, F = this.chart, Y = this.options.marker, Z = this[this.specialGroup] || this.markerGroup, q = this.xAxis, it = m(Y.enabled, !q || q.isRadial ? !0 : null, this.closestPointRangePx >= Y.enabledThreshold * Y.radius), et, nt;
- if (Y.enabled !== !1 || this._hasPointMarkers)
- for (et = 0; et < A.length; et++) {
- var rt = A[et], ct = (nt = rt.graphic) ? "animate" : "attr", gt = rt.marker || {}, dt = !!rt.marker;
- if ((it && typeof gt.enabled > "u" || gt.enabled) && !rt.isNull && rt.visible !== !1) {
- var ht = m(gt.symbol, this.symbol, "rect"), at = this.markerAttribs(rt, rt.selected && "select");
- this.enabledDataSorting && (rt.startXPos = q.reversed ? -(at.width || 0) : q.width);
- var J = rt.isInside !== !1;
- nt ? nt[J ? "show" : "hide"](J).animate(at) : J && (0 < (at.width || 0) || rt.hasImage) && (rt.graphic = nt = F.renderer.symbol(ht, at.x, at.y, at.width, at.height, dt ? gt : Y).add(Z), this.enabledDataSorting && F.hasRendered && (nt.attr({ x: rt.startXPos }), ct = "animate")), nt && ct === "animate" && nt[J ? "show" : "hide"](J).animate(at), nt && !F.styledMode && nt[ct](this.pointAttribs(rt, rt.selected && "select")), nt && nt.addClass(rt.getClassName(), !0);
- } else
- nt && (rt.graphic = nt.destroy());
- }
- }, Q.prototype.markerAttribs = function(A, F) {
- var Y = this.options, Z = Y.marker, q = A.marker || {}, it = q.symbol || Z.symbol, et = m(q.radius, Z.radius);
- return F && (Z = Z.states[F], F = q.states && q.states[F], et = m(F && F.radius, Z && Z.radius, et + (Z && Z.radiusPlus || 0))), A.hasImage = it && it.indexOf("url") === 0, A.hasImage && (et = 0), A = { x: Y.crisp ? Math.floor(A.plotX - et) : A.plotX - et, y: A.plotY - et }, et && (A.width = A.height = 2 * et), A;
- }, Q.prototype.pointAttribs = function(A, F) {
- var Y = this.options.marker, Z = A && A.options, q = Z && Z.marker || {}, it = Z && Z.color, et = A && A.color, nt = A && A.zone && A.zone.color, rt = this.color;
- return A = m(q.lineWidth, Y.lineWidth), Z = 1, rt = it || nt || et || rt, it = q.fillColor || Y.fillColor || rt, et = q.lineColor || Y.lineColor || rt, F = F || "normal", Y = Y.states[F] || {}, F = q.states && q.states[F] || {}, A = m(F.lineWidth, Y.lineWidth, A + m(F.lineWidthPlus, Y.lineWidthPlus, 0)), it = F.fillColor || Y.fillColor || it, et = F.lineColor || Y.lineColor || et, Z = m(F.opacity, Y.opacity, Z), { stroke: et, "stroke-width": A, fill: it, opacity: Z };
- }, Q.prototype.destroy = function(A) {
- var F = this, Y = F.chart, Z = /AppleWebKit\/533/.test(k.navigator.userAgent), q = F.data || [], it, et, nt, rt;
- for (P(F, "destroy"), this.removeEvents(A), (F.axisTypes || []).forEach(function(ct) {
- (rt = F[ct]) && rt.series && (a(rt.series, F), rt.isDirty = rt.forceRedraw = !0);
- }), F.legendItem && F.chart.legend.destroyItem(F), et = q.length; et--; )
- (nt = q[et]) && nt.destroy && nt.destroy();
- F.clips && F.clips.forEach(function(ct) {
- return ct.destroy();
- }), S.clearTimeout(F.animationTimeout), g(F, function(ct, gt) {
- ct instanceof B && !ct.survive && (it = Z && gt === "group" ? "hide" : "destroy", ct[it]());
- }), Y.hoverSeries === F && (Y.hoverSeries = void 0), a(Y.series, F), Y.orderSeries(), g(F, function(ct, gt) {
- A && gt === "hcEvents" || delete F[gt];
- });
- }, Q.prototype.applyZones = function() {
- var A = this, F = this.chart, Y = F.renderer, Z = this.zones, q = this.clips || [], it = this.graph, et = this.area, nt = Math.max(F.chartWidth, F.chartHeight), rt = this[(this.zoneAxis || "y") + "Axis"], ct = F.inverted, gt, dt, ht, at, J, tt, ot, lt, pt = !1;
- if (Z.length && (it || et) && rt && typeof rt.min < "u") {
- var yt = rt.reversed, vt = rt.horiz;
- it && !this.showLine && it.hide(), et && et.hide();
- var Mt = rt.getExtremes();
- Z.forEach(function(Pt, At) {
- gt = yt ? vt ? F.plotWidth : 0 : vt ? 0 : rt.toPixels(Mt.min) || 0, gt = h(m(dt, gt), 0, nt), dt = h(Math.round(rt.toPixels(m(Pt.value, Mt.max), !0) || 0), 0, nt), pt && (gt = dt = rt.toPixels(Mt.max)), at = Math.abs(gt - dt), J = Math.min(gt, dt), tt = Math.max(gt, dt), rt.isXAxis ? (ht = { x: ct ? tt : J, y: 0, width: at, height: nt }, vt || (ht.x = F.plotHeight - ht.x)) : (ht = { x: 0, y: ct ? tt : J, width: nt, height: at }, vt && (ht.y = F.plotWidth - ht.y)), ct && Y.isVML && (ht = rt.isXAxis ? {
- x: 0,
- y: yt ? J : tt,
- height: ht.width,
- width: F.chartWidth
- } : { x: ht.y - F.plotLeft - F.spacingBox.x, y: 0, width: ht.height, height: F.chartHeight }), q[At] ? q[At].animate(ht) : q[At] = Y.clipRect(ht), ot = A["zone-area-" + At], lt = A["zone-graph-" + At], it && lt && lt.clip(q[At]), et && ot && ot.clip(q[At]), pt = Pt.value > Mt.max, A.resetZones && dt === 0 && (dt = void 0);
- }), this.clips = q;
- } else
- A.visible && (it && it.show(!0), et && et.show(!0));
- }, Q.prototype.invertGroups = function(A) {
- function F() {
- ["group", "markerGroup"].forEach(function(q) {
- Y[q] && (Z.renderer.isVML && Y[q].attr({ width: Y.yAxis.len, height: Y.xAxis.len }), Y[q].width = Y.yAxis.len, Y[q].height = Y.xAxis.len, Y[q].invert(Y.isRadialSeries ? !1 : A));
- });
- }
- var Y = this, Z = Y.chart;
- Y.xAxis && (Y.eventsToUnbind.push(w(Z, "resize", F)), F(), Y.invertGroups = F);
- }, Q.prototype.plotGroup = function(A, F, Y, Z, q) {
- var it = this[A], et = !it;
- return Y = { visibility: Y, zIndex: Z || 0.1 }, typeof this.opacity > "u" || this.chart.styledMode || this.state === "inactive" || (Y.opacity = this.opacity), et && (this[A] = it = this.chart.renderer.g().add(q)), it.addClass("highcharts-" + F + " highcharts-series-" + this.index + " highcharts-" + this.type + "-series " + (c(this.colorIndex) ? "highcharts-color-" + this.colorIndex + " " : "") + (this.options.className || "") + (it.hasClass("highcharts-tracker") ? " highcharts-tracker" : ""), !0), it.attr(Y)[et ? "attr" : "animate"](this.getPlotBox()), it;
- }, Q.prototype.getPlotBox = function() {
- var A = this.chart, F = this.xAxis, Y = this.yAxis;
- return A.inverted && (F = Y, Y = this.xAxis), { translateX: F ? F.left : A.plotLeft, translateY: Y ? Y.top : A.plotTop, scaleX: 1, scaleY: 1 };
- }, Q.prototype.removeEvents = function(A) {
- A || L(this), this.eventsToUnbind.length && (this.eventsToUnbind.forEach(function(F) {
- F();
- }), this.eventsToUnbind.length = 0);
- }, Q.prototype.render = function() {
- var A = this, F = A.chart, Y = A.options, Z = x(Y.animation), q = A.visible ? "inherit" : "hidden", it = Y.zIndex, et = A.hasRendered, nt = F.seriesGroup, rt = F.inverted;
- F = !A.finishedAnimating && F.renderer.isSVG ? Z.duration : 0, P(this, "render");
- var ct = A.plotGroup("group", "series", q, it, nt);
- A.markerGroup = A.plotGroup("markerGroup", "markers", q, it, nt), Y.clip !== !1 && A.setClip(), A.animate && F && A.animate(!0), ct.inverted = m(A.invertible, A.isCartesian) ? rt : !1, A.drawGraph && (A.drawGraph(), A.applyZones()), A.visible && A.drawPoints(), A.drawDataLabels && A.drawDataLabels(), A.redrawPoints && A.redrawPoints(), A.drawTracker && A.options.enableMouseTracking !== !1 && A.drawTracker(), A.invertGroups(rt), A.animate && F && A.animate(), et || (F && Z.defer && (F += Z.defer), A.animationTimeout = $(function() {
- A.afterAnimate();
- }, F || 0)), A.isDirty = !1, A.hasRendered = !0, P(A, "afterRender");
- }, Q.prototype.redraw = function() {
- var A = this.chart, F = this.isDirty || this.isDirtyData, Y = this.group, Z = this.xAxis, q = this.yAxis;
- Y && (A.inverted && Y.attr({
- width: A.plotWidth,
- height: A.plotHeight
- }), Y.animate({ translateX: m(Z && Z.left, A.plotLeft), translateY: m(q && q.top, A.plotTop) })), this.translate(), this.render(), F && delete this.kdTree;
- }, Q.prototype.searchPoint = function(A, F) {
- var Y = this.xAxis, Z = this.yAxis, q = this.chart.inverted;
- return this.searchKDTree({ clientX: q ? Y.len - A.chartY + Y.pos : A.chartX - Y.pos, plotY: q ? Z.len - A.chartX + Z.pos : A.chartY - Z.pos }, F, A);
- }, Q.prototype.buildKDTree = function(A) {
- function F(q, it, et) {
- var nt = q && q.length;
- if (nt) {
- var rt = Y.kdAxisArray[it % et];
- return q.sort(function(ct, gt) {
- return ct[rt] - gt[rt];
- }), nt = Math.floor(nt / 2), { point: q[nt], left: F(q.slice(0, nt), it + 1, et), right: F(q.slice(nt + 1), it + 1, et) };
- }
- }
- this.buildingKdTree = !0;
- var Y = this, Z = -1 < Y.options.findNearestPointBy.indexOf("y") ? 2 : 1;
- delete Y.kdTree, $(function() {
- Y.kdTree = F(Y.getValidPoints(null, !Y.directTouch), Z, Z), Y.buildingKdTree = !1;
- }, Y.options.kdNow || A && A.type === "touchstart" ? 0 : 1);
- }, Q.prototype.searchKDTree = function(A, F, Y) {
- function Z(rt, ct, gt, dt) {
- var ht = ct.point, at = q.kdAxisArray[gt % dt], J = ht, tt = c(rt[it]) && c(ht[it]) ? Math.pow(rt[it] - ht[it], 2) : null, ot = c(rt[et]) && c(ht[et]) ? Math.pow(rt[et] - ht[et], 2) : null;
- return ot = (tt || 0) + (ot || 0), ht.dist = c(ot) ? Math.sqrt(ot) : Number.MAX_VALUE, ht.distX = c(tt) ? Math.sqrt(tt) : Number.MAX_VALUE, at = rt[at] - ht[at], ot = 0 > at ? "left" : "right", tt = 0 > at ? "right" : "left", ct[ot] && (ot = Z(rt, ct[ot], gt + 1, dt), J = ot[nt] < J[nt] ? ot : ht), ct[tt] && Math.sqrt(at * at) < J[nt] && (rt = Z(rt, ct[tt], gt + 1, dt), J = rt[nt] < J[nt] ? rt : J), J;
- }
- var q = this, it = this.kdAxisArray[0], et = this.kdAxisArray[1], nt = F ? "distX" : "dist";
- if (F = -1 < q.options.findNearestPointBy.indexOf("y") ? 2 : 1, this.kdTree || this.buildingKdTree || this.buildKDTree(Y), this.kdTree)
- return Z(
- A,
- this.kdTree,
- F,
- F
- );
- }, Q.prototype.pointPlacementToXValue = function() {
- var A = this.options, F = A.pointRange, Y = this.xAxis;
- return A = A.pointPlacement, A === "between" && (A = Y.reversed ? -0.5 : 0.5), W(A) ? A * (F || Y.pointRange) : 0;
- }, Q.prototype.isPointInside = function(A) {
- var F = this.chart, Y = this.xAxis, Z = this.yAxis;
- return typeof A.plotY < "u" && typeof A.plotX < "u" && 0 <= A.plotY && A.plotY <= (Z ? Z.len : F.plotHeight) && 0 <= A.plotX && A.plotX <= (Y ? Y.len : F.plotWidth);
- }, Q.prototype.drawTracker = function() {
- var A = this, F = A.options, Y = F.trackByArea, Z = [].concat(Y ? A.areaPath : A.graphPath), q = A.chart, it = q.pointer, et = q.renderer, nt = q.options.tooltip.snap, rt = A.tracker, ct = function(dt) {
- q.hoverSeries !== A && A.onMouseOver();
- }, gt = "rgba(192,192,192," + (j ? 1e-4 : 2e-3) + ")";
- rt ? rt.attr({ d: Z }) : A.graph && (A.tracker = et.path(Z).attr({ visibility: A.visible ? "visible" : "hidden", zIndex: 2 }).addClass(Y ? "highcharts-tracker-area" : "highcharts-tracker-line").add(A.group), q.styledMode || A.tracker.attr({ "stroke-linecap": "round", "stroke-linejoin": "round", stroke: gt, fill: Y ? gt : "none", "stroke-width": A.graph.strokeWidth() + (Y ? 0 : 2 * nt) }), [A.tracker, A.markerGroup, A.dataLabelsGroup].forEach(function(dt) {
- dt && (dt.addClass("highcharts-tracker").on("mouseover", ct).on("mouseout", function(ht) {
- it.onTrackerMouseOut(ht);
- }), F.cursor && !q.styledMode && dt.css({ cursor: F.cursor }), O) && dt.on("touchstart", ct);
- })), P(this, "afterDrawTracker");
- }, Q.prototype.addPoint = function(A, F, Y, Z, q) {
- var it = this.options, et = this.data, nt = this.chart, rt = this.xAxis;
- rt = rt && rt.hasNames && rt.names;
- var ct = it.data, gt = this.xData, dt;
- F = m(F, !0);
- var ht = { series: this };
- this.pointClass.prototype.applyOptions.apply(
- ht,
- [A]
- );
- var at = ht.x, J = gt.length;
- if (this.requireSorting && at < gt[J - 1])
- for (dt = !0; J && gt[J - 1] > at; )
- J--;
- this.updateParallelArrays(ht, "splice", J, 0, 0), this.updateParallelArrays(ht, J), rt && ht.name && (rt[at] = ht.name), ct.splice(J, 0, A), dt && (this.data.splice(J, 0, null), this.processData()), it.legendType === "point" && this.generatePoints(), Y && (et[0] && et[0].remove ? et[0].remove(!1) : (et.shift(), this.updateParallelArrays(ht, "shift"), ct.shift())), q !== !1 && P(this, "addPoint", { point: ht }), this.isDirtyData = this.isDirty = !0, F && nt.redraw(Z);
- }, Q.prototype.removePoint = function(A, F, Y) {
- var Z = this, q = Z.data, it = q[A], et = Z.points, nt = Z.chart, rt = function() {
- et && et.length === q.length && et.splice(A, 1), q.splice(A, 1), Z.options.data.splice(A, 1), Z.updateParallelArrays(it || { series: Z }, "splice", A, 1), it && it.destroy(), Z.isDirty = !0, Z.isDirtyData = !0, F && nt.redraw();
- };
- f(Y, nt), F = m(F, !0), it ? it.firePointEvent("remove", null, rt) : rt();
- }, Q.prototype.remove = function(A, F, Y, Z) {
- function q() {
- it.destroy(Z), et.isDirtyLegend = et.isDirtyBox = !0, et.linkSeries(), m(A, !0) && et.redraw(F);
- }
- var it = this, et = it.chart;
- Y !== !1 ? P(
- it,
- "remove",
- null,
- q
- ) : q();
- }, Q.prototype.update = function(A, F) {
- A = u(A, this.userOptions), P(this, "update", { options: A });
- var Y = this, Z = Y.chart, q = Y.userOptions, it = Y.initialType || Y.type, et = Z.options.plotOptions, nt = b[it].prototype, rt = Y.finishedAnimating && { animation: !1 }, ct = {}, gt, dt = ["eventOptions", "navigatorSeries", "baseSeries"], ht = A.type || q.type || Z.options.chart.type, at = !(this.hasDerivedData || ht && ht !== this.type || typeof A.pointStart < "u" || typeof A.pointInterval < "u" || typeof A.relativeXValue < "u" || Y.hasOptionChanged("dataGrouping") || Y.hasOptionChanged("pointStart") || Y.hasOptionChanged("pointInterval") || Y.hasOptionChanged("pointIntervalUnit") || Y.hasOptionChanged("keys"));
- if (ht = ht || it, at && (dt.push("data", "isDirtyData", "points", "processedXData", "processedYData", "xIncrement", "cropped", "_hasPointMarkers", "_hasPointLabels", "clips", "nodes", "layout", "mapMap", "mapData", "minY", "maxY", "minX", "maxX"), A.visible !== !1 && dt.push("area", "graph"), Y.parallelArrays.forEach(function(tt) {
- dt.push(tt + "Data");
- }), A.data && (A.dataSorting && s(Y.options.dataSorting, A.dataSorting), this.setData(A.data, !1))), A = X(q, rt, { index: typeof q.index > "u" ? Y.index : q.index, pointStart: m(et && et.series && et.series.pointStart, q.pointStart, Y.xData[0]) }, !at && { data: Y.options.data }, A), at && A.data && (A.data = Y.options.data), dt = ["group", "markerGroup", "dataLabelsGroup", "transformGroup"].concat(dt), dt.forEach(function(tt) {
- dt[tt] = Y[tt], delete Y[tt];
- }), et = !1, b[ht]) {
- if (et = ht !== Y.type, Y.remove(!1, !1, !1, !0), et)
- if (Object.setPrototypeOf)
- Object.setPrototypeOf(Y, b[ht].prototype);
- else {
- rt = Object.hasOwnProperty.call(Y, "hcEvents") && Y.hcEvents;
- for (gt in nt)
- Y[gt] = void 0;
- s(Y, b[ht].prototype), rt ? Y.hcEvents = rt : delete Y.hcEvents;
- }
- } else
- t(17, !0, Z, { missingModuleFor: ht });
- if (dt.forEach(function(tt) {
- Y[tt] = dt[tt];
- }), Y.init(Z, A), at && this.points) {
- var J = Y.options;
- J.visible === !1 ? (ct.graphic = 1, ct.dataLabel = 1) : Y._hasPointLabels || (A = J.marker, nt = J.dataLabels, !A || A.enabled !== !1 && (q.marker && q.marker.symbol) === A.symbol || (ct.graphic = 1), nt && nt.enabled === !1 && (ct.dataLabel = 1)), this.points.forEach(function(tt) {
- tt && tt.series && (tt.resolveColor(), Object.keys(ct).length && tt.destroyElements(ct), J.showInLegend === !1 && tt.legendItem && Z.legend.destroyItem(tt));
- }, this);
- }
- Y.initialType = it, Z.linkSeries(), et && Y.linkedSeries.length && (Y.isDirtyData = !0), P(this, "afterUpdate"), m(F, !0) && Z.redraw(at ? void 0 : !1);
- }, Q.prototype.setName = function(A) {
- this.name = this.options.name = this.userOptions.name = A, this.chart.isDirtyLegend = !0;
- }, Q.prototype.hasOptionChanged = function(A) {
- var F = this.options[A], Y = this.chart.options.plotOptions, Z = this.userOptions[A];
- return Z ? F !== Z : F !== m(
- Y && Y[this.type] && Y[this.type][A],
- Y && Y.series && Y.series[A],
- F
- );
- }, Q.prototype.onMouseOver = function() {
- var A = this.chart, F = A.hoverSeries;
- A.pointer.setHoverChartIndex(), F && F !== this && F.onMouseOut(), this.options.events.mouseOver && P(this, "mouseOver"), this.setState("hover"), A.hoverSeries = this;
- }, Q.prototype.onMouseOut = function() {
- var A = this.options, F = this.chart, Y = F.tooltip, Z = F.hoverPoint;
- F.hoverSeries = null, Z && Z.onMouseOut(), this && A.events.mouseOut && P(this, "mouseOut"), !Y || this.stickyTracking || Y.shared && !this.noSharedTooltip || Y.hide(), F.series.forEach(function(q) {
- q.setState(
- "",
- !0
- );
- });
- }, Q.prototype.setState = function(A, F) {
- var Y = this, Z = Y.options, q = Y.graph, it = Z.inactiveOtherPoints, et = Z.states, nt = m(et[A || "normal"] && et[A || "normal"].animation, Y.chart.options.chart.animation), rt = Z.lineWidth, ct = 0, gt = Z.opacity;
- if (A = A || "", Y.state !== A && ([Y.group, Y.markerGroup, Y.dataLabelsGroup].forEach(function(dt) {
- dt && (Y.state && dt.removeClass("highcharts-series-" + Y.state), A && dt.addClass("highcharts-series-" + A));
- }), Y.state = A, !Y.chart.styledMode)) {
- if (et[A] && et[A].enabled === !1)
- return;
- if (A && (rt = et[A].lineWidth || rt + (et[A].lineWidthPlus || 0), gt = m(et[A].opacity, gt)), q && !q.dashstyle)
- for (Z = { "stroke-width": rt }, q.animate(Z, nt); Y["zone-graph-" + ct]; )
- Y["zone-graph-" + ct].animate(Z, nt), ct += 1;
- it || [Y.group, Y.markerGroup, Y.dataLabelsGroup, Y.labelBySeries].forEach(function(dt) {
- dt && dt.animate({ opacity: gt }, nt);
- });
- }
- F && it && Y.points && Y.setAllPointsToState(A || void 0);
- }, Q.prototype.setAllPointsToState = function(A) {
- this.points.forEach(function(F) {
- F.setState && F.setState(A);
- });
- }, Q.prototype.setVisible = function(A, F) {
- var Y = this, Z = Y.chart, q = Y.legendItem, it = Z.options.chart.ignoreHiddenSeries, et = Y.visible, nt = (Y.visible = A = Y.options.visible = Y.userOptions.visible = typeof A > "u" ? !et : A) ? "show" : "hide";
- ["group", "dataLabelsGroup", "markerGroup", "tracker", "tt"].forEach(function(rt) {
- Y[rt] && Y[rt][nt]();
- }), (Z.hoverSeries === Y || (Z.hoverPoint && Z.hoverPoint.series) === Y) && Y.onMouseOut(), q && Z.legend.colorizeItem(Y, A), Y.isDirty = !0, Y.options.stacking && Z.series.forEach(function(rt) {
- rt.options.stacking && rt.visible && (rt.isDirty = !0);
- }), Y.linkedSeries.forEach(function(rt) {
- rt.setVisible(A, !1);
- }), it && (Z.isDirtyBox = !0), P(Y, nt), F !== !1 && Z.redraw();
- }, Q.prototype.show = function() {
- this.setVisible(!0);
- }, Q.prototype.hide = function() {
- this.setVisible(!1);
- }, Q.prototype.select = function(A) {
- this.selected = A = this.options.selected = typeof A > "u" ? !this.selected : A, this.checkbox && (this.checkbox.checked = A), P(this, A ? "select" : "unselect");
- }, Q.prototype.shouldShowTooltip = function(A, F, Y) {
- return Y === void 0 && (Y = {}), Y.series = this, Y.visiblePlotOnly = !0, this.chart.isInsidePlot(A, F, Y);
- }, Q.defaultOptions = G, Q;
- }(), s(y.prototype, { axisTypes: [
- "xAxis",
- "yAxis"
- ], coll: "series", colorCounter: 0, cropShoulder: 1, directTouch: !1, drawLegendSymbol: H.drawLineMarker, isCartesian: !0, kdAxisArray: ["clientX", "plotY"], parallelArrays: ["x", "y"], pointClass: V, requireSorting: !0, sorted: !0 }), R.series = y, y;
- }), M(o, "Extensions/ScrollablePlotArea.js", [o["Core/Animation/AnimationUtilities.js"], o["Core/Axis/Axis.js"], o["Core/Chart/Chart.js"], o["Core/Series/Series.js"], o["Core/Renderer/RendererRegistry.js"], o["Core/Utilities.js"]], function(y, N, D, U, H, V) {
- var G = y.stop, R = V.addEvent, B = V.createElement, S = V.merge, x = V.pick;
- R(D, "afterSetChartSize", function(f) {
- var d = this.options.chart.scrollablePlotArea, T = d && d.minWidth;
- if (d = d && d.minHeight, !this.renderer.forExport) {
- if (T) {
- if (this.scrollablePixelsX = T = Math.max(0, T - this.chartWidth)) {
- this.scrollablePlotBox = this.renderer.scrollablePlotBox = S(this.plotBox), this.plotBox.width = this.plotWidth += T, this.inverted ? this.clipBox.height += T : this.clipBox.width += T;
- var O = { 1: { name: "right", value: T } };
- }
- } else
- d && (this.scrollablePixelsY = T = Math.max(
- 0,
- d - this.chartHeight
- )) && (this.scrollablePlotBox = this.renderer.scrollablePlotBox = S(this.plotBox), this.plotBox.height = this.plotHeight += T, this.inverted ? this.clipBox.width += T : this.clipBox.height += T, O = { 2: { name: "bottom", value: T } });
- O && !f.skipAxes && this.axes.forEach(function(j) {
- O[j.side] ? j.getPlotLinePath = function() {
- var k = O[j.side].name, b = this[k];
- this[k] = b - O[j.side].value;
- var w = N.prototype.getPlotLinePath.apply(this, arguments);
- return this[k] = b, w;
- } : (j.setAxisSize(), j.setAxisTranslation());
- });
- }
- }), R(D, "render", function() {
- this.scrollablePixelsX || this.scrollablePixelsY ? (this.setUpScrolling && this.setUpScrolling(), this.applyFixed()) : this.fixedDiv && this.applyFixed();
- }), D.prototype.setUpScrolling = function() {
- var f = this, d = { WebkitOverflowScrolling: "touch", overflowX: "hidden", overflowY: "hidden" };
- this.scrollablePixelsX && (d.overflowX = "auto"), this.scrollablePixelsY && (d.overflowY = "auto"), this.scrollingParent = B("div", { className: "highcharts-scrolling-parent" }, { position: "relative" }, this.renderTo), this.scrollingContainer = B(
- "div",
- { className: "highcharts-scrolling" },
- d,
- this.scrollingParent
- ), R(this.scrollingContainer, "scroll", function() {
- f.pointer && delete f.pointer.chartPosition;
- }), this.innerContainer = B("div", { className: "highcharts-inner-container" }, null, this.scrollingContainer), this.innerContainer.appendChild(this.container), this.setUpScrolling = null;
- }, D.prototype.moveFixedElements = function() {
- var f = this.container, d = this.fixedRenderer, T = ".highcharts-contextbutton .highcharts-credits .highcharts-legend .highcharts-legend-checkbox .highcharts-navigator-series .highcharts-navigator-xaxis .highcharts-navigator-yaxis .highcharts-navigator .highcharts-reset-zoom .highcharts-drillup-button .highcharts-scrollbar .highcharts-subtitle .highcharts-title".split(" "), O;
- this.scrollablePixelsX && !this.inverted ? O = ".highcharts-yaxis" : this.scrollablePixelsX && this.inverted || this.scrollablePixelsY && !this.inverted ? O = ".highcharts-xaxis" : this.scrollablePixelsY && this.inverted && (O = ".highcharts-yaxis"), O && T.push(O + ":not(.highcharts-radial-axis)", O + "-labels:not(.highcharts-radial-axis-labels)"), T.forEach(function(j) {
- [].forEach.call(f.querySelectorAll(j), function(k) {
- (k.namespaceURI === d.SVG_NS ? d.box : d.box.parentNode).appendChild(k), k.style.pointerEvents = "auto";
- });
- });
- }, D.prototype.applyFixed = function() {
- var f = !this.fixedDiv, d = this.options.chart, T = d.scrollablePlotArea, O = H.getRendererType();
- f ? (this.fixedDiv = B("div", { className: "highcharts-fixed" }, { position: "absolute", overflow: "hidden", pointerEvents: "none", zIndex: (d.style && d.style.zIndex || 0) + 2, top: 0 }, null, !0), this.scrollingContainer && this.scrollingContainer.parentNode.insertBefore(this.fixedDiv, this.scrollingContainer), this.renderTo.style.overflow = "visible", this.fixedRenderer = d = new O(
- this.fixedDiv,
- this.chartWidth,
- this.chartHeight,
- this.options.chart.style
- ), this.scrollableMask = d.path().attr({ fill: this.options.chart.backgroundColor || "#fff", "fill-opacity": x(T.opacity, 0.85), zIndex: -1 }).addClass("highcharts-scrollable-mask").add(), R(this, "afterShowResetZoom", this.moveFixedElements), R(this, "afterDrilldown", this.moveFixedElements), R(this, "afterLayOutTitles", this.moveFixedElements)) : this.fixedRenderer.setSize(this.chartWidth, this.chartHeight), (this.scrollableDirty || f) && (this.scrollableDirty = !1, this.moveFixedElements()), d = this.chartWidth + (this.scrollablePixelsX || 0), O = this.chartHeight + (this.scrollablePixelsY || 0), G(this.container), this.container.style.width = d + "px", this.container.style.height = O + "px", this.renderer.boxWrapper.attr({ width: d, height: O, viewBox: [0, 0, d, O].join(" ") }), this.chartBackground.attr({ width: d, height: O }), this.scrollingContainer.style.height = this.chartHeight + "px", f && (T.scrollPositionX && (this.scrollingContainer.scrollLeft = this.scrollablePixelsX * T.scrollPositionX), T.scrollPositionY && (this.scrollingContainer.scrollTop = this.scrollablePixelsY * T.scrollPositionY)), O = this.axisOffset, f = this.plotTop - O[0] - 1, T = this.plotLeft - O[3] - 1, d = this.plotTop + this.plotHeight + O[2] + 1, O = this.plotLeft + this.plotWidth + O[1] + 1;
- var j = this.plotLeft + this.plotWidth - (this.scrollablePixelsX || 0), k = this.plotTop + this.plotHeight - (this.scrollablePixelsY || 0);
- f = this.scrollablePixelsX ? [["M", 0, f], ["L", this.plotLeft - 1, f], ["L", this.plotLeft - 1, d], ["L", 0, d], ["Z"], ["M", j, f], ["L", this.chartWidth, f], ["L", this.chartWidth, d], ["L", j, d], ["Z"]] : this.scrollablePixelsY ? [["M", T, 0], ["L", T, this.plotTop - 1], ["L", O, this.plotTop - 1], ["L", O, 0], ["Z"], ["M", T, k], ["L", T, this.chartHeight], ["L", O, this.chartHeight], ["L", O, k], ["Z"]] : [["M", 0, 0]], this.redrawTrigger !== "adjustHeight" && this.scrollableMask.attr({ d: f });
- }, R(N, "afterInit", function() {
- this.chart.scrollableDirty = !0;
- }), R(U, "show", function() {
- this.chart.scrollableDirty = !0;
- });
- }), M(o, "Core/Axis/StackingAxis.js", [o["Core/Animation/AnimationUtilities.js"], o["Core/Axis/Axis.js"], o["Core/Utilities.js"]], function(y, N, D) {
- var U = y.getDeferredAnimation, H = D.addEvent, V = D.destroyObjectProperties, G = D.fireEvent, R = D.isNumber, B = D.objectEach, S;
- return function(x) {
- function f() {
- var j = this.stacking;
- if (j) {
- var k = j.stacks;
- B(k, function(b, w) {
- V(b), k[w] = null;
- }), j && j.stackTotalGroup && j.stackTotalGroup.destroy();
- }
- }
- function d() {
- this.stacking || (this.stacking = new O(this));
- }
- var T = [];
- x.compose = function(j) {
- return T.indexOf(j) === -1 && (T.push(j), H(j, "init", d), H(j, "destroy", f)), j;
- };
- var O = function() {
- function j(k) {
- this.oldStacks = {}, this.stacks = {}, this.stacksTouched = 0, this.axis = k;
- }
- return j.prototype.buildStacks = function() {
- var k = this.axis, b = k.series, w = k.options.reversedStacks, v = b.length, l;
- if (!k.isXAxis) {
- for (this.usePercentage = !1, l = v; l--; ) {
- var h = b[w ? l : v - l - 1];
- h.setStackedPoints(), h.setGroupedPoints();
- }
- for (l = 0; l < v; l++)
- b[l].modifyStacks();
- G(k, "afterBuildStacks");
- }
- }, j.prototype.cleanStacks = function() {
- if (!this.axis.isXAxis) {
- if (this.oldStacks)
- var k = this.stacks = this.oldStacks;
- B(k, function(b) {
- B(b, function(w) {
- w.cumulative = w.total;
- });
- });
- }
- }, j.prototype.resetStacks = function() {
- var k = this, b = k.stacks;
- k.axis.isXAxis || B(b, function(w) {
- B(
- w,
- function(v, l) {
- R(v.touched) && v.touched < k.stacksTouched ? (v.destroy(), delete w[l]) : (v.total = null, v.cumulative = null);
- }
- );
- });
- }, j.prototype.renderStackTotals = function() {
- var k = this.axis, b = k.chart, w = b.renderer, v = this.stacks;
- k = U(b, k.options.stackLabels && k.options.stackLabels.animation || !1);
- var l = this.stackTotalGroup = this.stackTotalGroup || w.g("stack-labels").attr({ visibility: "visible", zIndex: 6, opacity: 0 }).add();
- l.translate(b.plotLeft, b.plotTop), B(v, function(h) {
- B(h, function(u) {
- u.render(l);
- });
- }), l.animate(
- { opacity: 1 },
- k
- );
- }, j;
- }();
- x.Additions = O;
- }(S || (S = {})), S;
- }), M(o, "Extensions/Stacking.js", [o["Core/Axis/Axis.js"], o["Core/Chart/Chart.js"], o["Core/FormatUtilities.js"], o["Core/Globals.js"], o["Core/Series/Series.js"], o["Core/Axis/StackingAxis.js"], o["Core/Utilities.js"]], function(y, N, D, U, H, V, G) {
- var R = D.format, B = G.correctFloat, S = G.defined, x = G.destroyObjectProperties, f = G.isArray, d = G.isNumber, T = G.objectEach, O = G.pick, j = function() {
- function k(b, w, v, l, h) {
- var u = b.chart.inverted;
- this.axis = b, this.isNegative = v, this.options = w = w || {}, this.x = l, this.total = null, this.points = {}, this.hasValidPoints = !1, this.stack = h, this.rightCliff = this.leftCliff = 0, this.alignOptions = { align: w.align || (u ? v ? "left" : "right" : "center"), verticalAlign: w.verticalAlign || (u ? "middle" : v ? "bottom" : "top"), y: w.y, x: w.x }, this.textAlign = w.textAlign || (u ? v ? "right" : "left" : "center");
- }
- return k.prototype.destroy = function() {
- x(this, this.axis);
- }, k.prototype.render = function(b) {
- var w = this.axis.chart, v = this.options, l = v.format;
- l = l ? R(l, this, w) : v.formatter.call(this), this.label ? this.label.attr({
- text: l,
- visibility: "hidden"
- }) : (this.label = w.renderer.label(l, null, null, v.shape, null, null, v.useHTML, !1, "stack-labels"), l = { r: v.borderRadius || 0, text: l, rotation: v.rotation, padding: O(v.padding, 5), visibility: "hidden" }, w.styledMode || (l.fill = v.backgroundColor, l.stroke = v.borderColor, l["stroke-width"] = v.borderWidth, this.label.css(v.style)), this.label.attr(l), this.label.added || this.label.add(b)), this.label.labelrank = w.plotSizeY;
- }, k.prototype.setOffset = function(b, w, v, l, h) {
- var u = this.axis, i = u.chart;
- l = u.translate(u.stacking.usePercentage ? 100 : l || this.total, 0, 0, 0, 1), v = u.translate(v || 0), v = S(l) && Math.abs(l - v), b = O(h, i.xAxis[0].translate(this.x)) + b, u = S(l) && this.getStackBox(i, this, b, l, w, v, u), w = this.label, v = this.isNegative, b = O(this.options.overflow, "justify") === "justify";
- var c = this.textAlign;
- w && u && (h = w.getBBox(), l = w.padding, c = c === "left" ? i.inverted ? -l : l : c === "right" ? h.width : i.inverted && c === "center" ? h.width / 2 : i.inverted ? v ? h.width + l : -l : h.width / 2, v = i.inverted ? h.height / 2 : v ? -l : h.height, this.alignOptions.x = O(this.options.x, 0), this.alignOptions.y = O(this.options.y, 0), u.x -= c, u.y -= v, w.align(this.alignOptions, null, u), i.isInsidePlot(w.alignAttr.x + c - this.alignOptions.x, w.alignAttr.y + v - this.alignOptions.y) ? w.show() : (w.alignAttr.y = -9999, b = !1), b && H.prototype.justifyDataLabel.call(this.axis, w, this.alignOptions, w.alignAttr, h, u), w.attr({ x: w.alignAttr.x, y: w.alignAttr.y }), O(!b && this.options.crop, !0) && ((i = d(w.x) && d(w.y) && i.isInsidePlot(w.x - l + w.width, w.y) && i.isInsidePlot(w.x + l, w.y)) || w.hide()));
- }, k.prototype.getStackBox = function(b, w, v, l, h, u, i) {
- var c = w.axis.reversed, a = b.inverted, t = i.height + i.pos - (a ? b.plotLeft : b.plotTop);
- return w = w.isNegative && !c || !w.isNegative && c, { x: a ? w ? l - i.right : l - u + i.pos - b.plotLeft : v + b.xAxis[0].transB - b.plotLeft, y: a ? i.height - v - h : w ? t - l - u : t - l, width: a ? u : h, height: a ? h : u };
- }, k;
- }();
- return N.prototype.getStacks = function() {
- var k = this, b = k.inverted;
- k.yAxis.forEach(function(w) {
- w.stacking && w.stacking.stacks && w.hasVisibleSeries && (w.stacking.oldStacks = w.stacking.stacks);
- }), k.series.forEach(function(w) {
- var v = w.xAxis && w.xAxis.options || {};
- !w.options.stacking || w.visible !== !0 && k.options.chart.ignoreHiddenSeries !== !1 || (w.stackKey = [w.type, O(w.options.stack, ""), b ? v.top : v.left, b ? v.height : v.width].join());
- });
- }, V.compose(y), H.prototype.setGroupedPoints = function() {
- var k = this.yAxis.stacking;
- this.options.centerInCategory && (this.is("column") || this.is("columnrange")) && !this.options.stacking && 1 < this.chart.series.length ? H.prototype.setStackedPoints.call(this, "group") : k && T(k.stacks, function(b, w) {
- w.slice(-5) === "group" && (T(b, function(v) {
- return v.destroy();
- }), delete k.stacks[w]);
- });
- }, H.prototype.setStackedPoints = function(k) {
- var b = k || this.options.stacking;
- if (b && (this.visible === !0 || this.chart.options.chart.ignoreHiddenSeries === !1)) {
- var w = this.processedXData, v = this.processedYData, l = [], h = v.length, u = this.options, i = u.threshold, c = O(u.startFromThreshold && i, 0);
- u = u.stack, k = k ? this.type + "," + b : this.stackKey;
- var a = "-" + k, t = this.negStacks, s = this.yAxis, n = s.stacking.stacks, P = s.stacking.oldStacks, _, I;
- for (s.stacking.stacksTouched += 1, I = 0; I < h; I++) {
- var W = w[I], E = v[I], X = this.getStackIndicator(
- X,
- W,
- this.index
- ), g = X.key, m = (_ = t && E < (c ? 0 : i)) ? a : k;
- n[m] || (n[m] = {}), n[m][W] || (P[m] && P[m][W] ? (n[m][W] = P[m][W], n[m][W].total = null) : n[m][W] = new j(s, s.options.stackLabels, _, W, u)), m = n[m][W], E !== null ? (m.points[g] = m.points[this.index] = [O(m.cumulative, c)], S(m.cumulative) || (m.base = g), m.touched = s.stacking.stacksTouched, 0 < X.index && this.singleStacks === !1 && (m.points[g][0] = m.points[this.index + "," + W + ",0"][0])) : m.points[g] = m.points[this.index] = null, b === "percent" ? (_ = _ ? k : a, t && n[_] && n[_][W] ? (_ = n[_][W], m.total = _.total = Math.max(_.total, m.total) + Math.abs(E) || 0) : m.total = B(m.total + (Math.abs(E) || 0))) : b === "group" ? (f(E) && (E = E[0]), E !== null && (m.total = (m.total || 0) + 1)) : m.total = B(m.total + (E || 0)), m.cumulative = b === "group" ? (m.total || 1) - 1 : O(m.cumulative, c) + (E || 0), E !== null && (m.points[g].push(m.cumulative), l[I] = m.cumulative, m.hasValidPoints = !0);
- }
- b === "percent" && (s.stacking.usePercentage = !0), b !== "group" && (this.stackedYData = l), s.stacking.oldStacks = {};
- }
- }, H.prototype.modifyStacks = function() {
- var k = this, b = k.stackKey, w = k.yAxis.stacking.stacks, v = k.processedXData, l, h = k.options.stacking;
- k[h + "Stacker"] && [b, "-" + b].forEach(function(u) {
- for (var i = v.length, c, a; i--; )
- c = v[i], l = k.getStackIndicator(l, c, k.index, u), (a = (c = w[u] && w[u][c]) && c.points[l.key]) && k[h + "Stacker"](a, c, i);
- });
- }, H.prototype.percentStacker = function(k, b, w) {
- b = b.total ? 100 / b.total : 0, k[0] = B(k[0] * b), k[1] = B(k[1] * b), this.stackedYData[w] = k[1];
- }, H.prototype.getStackIndicator = function(k, b, w, v) {
- return !S(k) || k.x !== b || v && k.key !== v ? k = { x: b, index: 0, key: v } : k.index++, k.key = [w, b, k.index].join(), k;
- }, U.StackItem = j, U.StackItem;
- }), M(o, "Series/Line/LineSeries.js", [o["Core/Series/Series.js"], o["Core/Series/SeriesRegistry.js"], o["Core/Utilities.js"]], function(y, N, D) {
- var U = this && this.__extends || function() {
- var G = function(R, B) {
- return G = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(S, x) {
- S.__proto__ = x;
- } || function(S, x) {
- for (var f in x)
- x.hasOwnProperty(f) && (S[f] = x[f]);
- }, G(R, B);
- };
- return function(R, B) {
- function S() {
- this.constructor = R;
- }
- G(R, B), R.prototype = B === null ? Object.create(B) : (S.prototype = B.prototype, new S());
- };
- }(), H = D.defined, V = D.merge;
- return D = function(G) {
- function R() {
- var B = G !== null && G.apply(this, arguments) || this;
- return B.data = void 0, B.options = void 0, B.points = void 0, B;
- }
- return U(R, G), R.prototype.drawGraph = function() {
- var B = this, S = this.options, x = (this.gappedPath || this.getGraphPath).call(this), f = this.chart.styledMode, d = [["graph", "highcharts-graph"]];
- f || d[0].push(S.lineColor || this.color || "#cccccc", S.dashStyle), d = B.getZonesGraphs(d), d.forEach(function(T, O) {
- var j = T[0], k = B[j], b = k ? "animate" : "attr";
- k ? (k.endX = B.preventGraphAnimation ? null : x.xMap, k.animate({ d: x })) : x.length && (B[j] = k = B.chart.renderer.path(x).addClass(T[1]).attr({ zIndex: 1 }).add(B.group)), k && !f && (j = { stroke: T[2], "stroke-width": S.lineWidth, fill: B.fillGraph && B.color || "none" }, T[3] ? j.dashstyle = T[3] : S.linecap !== "square" && (j["stroke-linecap"] = j["stroke-linejoin"] = "round"), k[b](j).shadow(2 > O && S.shadow)), k && (k.startX = x.xMap, k.isArea = x.isArea);
- });
- }, R.prototype.getGraphPath = function(B, S, x) {
- var f = this, d = f.options, T = [], O = [], j, k = d.step;
- B = B || f.points;
- var b = B.reversed;
- return b && B.reverse(), (k = { right: 1, center: 2 }[k] || k && 3) && b && (k = 4 - k), B = this.getValidPoints(B, !1, !(d.connectNulls && !S && !x)), B.forEach(function(w, v) {
- var l = w.plotX, h = w.plotY, u = B[v - 1];
- (w.leftCliff || u && u.rightCliff) && !x && (j = !0), w.isNull && !H(S) && 0 < v ? j = !d.connectNulls : w.isNull && !S ? j = !0 : (v === 0 || j ? v = [["M", w.plotX, w.plotY]] : f.getPointSpline ? v = [f.getPointSpline(B, w, v)] : k ? (v = k === 1 ? [["L", u.plotX, h]] : k === 2 ? [["L", (u.plotX + l) / 2, u.plotY], ["L", (u.plotX + l) / 2, h]] : [["L", l, u.plotY]], v.push(["L", l, h])) : v = [["L", l, h]], O.push(w.x), k && (O.push(w.x), k === 2 && O.push(w.x)), T.push.apply(T, v), j = !1);
- }), T.xMap = O, f.graphPath = T;
- }, R.prototype.getZonesGraphs = function(B) {
- return this.zones.forEach(function(S, x) {
- x = ["zone-graph-" + x, "highcharts-graph highcharts-zone-graph-" + x + " " + (S.className || "")], this.chart.styledMode || x.push(S.color || this.color, S.dashStyle || this.options.dashStyle), B.push(x);
- }, this), B;
- }, R.defaultOptions = V(y.defaultOptions, {}), R;
- }(y), N.registerSeriesType("line", D), D;
- }), M(o, "Series/Area/AreaSeries.js", [
- o["Core/Color/Color.js"],
- o["Core/Legend/LegendSymbol.js"],
- o["Core/Series/SeriesRegistry.js"],
- o["Core/Utilities.js"]
- ], function(y, N, D, U) {
- var H = this && this.__extends || function() {
- var x = function(f, d) {
- return x = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(T, O) {
- T.__proto__ = O;
- } || function(T, O) {
- for (var j in O)
- O.hasOwnProperty(j) && (T[j] = O[j]);
- }, x(f, d);
- };
- return function(f, d) {
- function T() {
- this.constructor = f;
- }
- x(f, d), f.prototype = d === null ? Object.create(d) : (T.prototype = d.prototype, new T());
- };
- }(), V = y.parse, G = D.seriesTypes.line;
- y = U.extend;
- var R = U.merge, B = U.objectEach, S = U.pick;
- return U = function(x) {
- function f() {
- var d = x !== null && x.apply(this, arguments) || this;
- return d.data = void 0, d.options = void 0, d.points = void 0, d;
- }
- return H(f, x), f.prototype.drawGraph = function() {
- this.areaPath = [], x.prototype.drawGraph.apply(this);
- var d = this, T = this.areaPath, O = this.options, j = [["area", "highcharts-area", this.color, O.fillColor]];
- this.zones.forEach(function(k, b) {
- j.push(["zone-area-" + b, "highcharts-area highcharts-zone-area-" + b + " " + k.className, k.color || d.color, k.fillColor || O.fillColor]);
- }), j.forEach(function(k) {
- var b = k[0], w = d[b], v = w ? "animate" : "attr", l = {};
- w ? (w.endX = d.preventGraphAnimation ? null : T.xMap, w.animate({ d: T })) : (l.zIndex = 0, w = d[b] = d.chart.renderer.path(T).addClass(k[1]).add(d.group), w.isArea = !0), d.chart.styledMode || (l.fill = S(k[3], V(k[2]).setOpacity(S(O.fillOpacity, 0.75)).get())), w[v](l), w.startX = T.xMap, w.shiftUnit = O.step ? 2 : 1;
- });
- }, f.prototype.getGraphPath = function(d) {
- var T = G.prototype.getGraphPath, O = this.options, j = O.stacking, k = this.yAxis, b, w = [], v = [], l = this.index, h = k.stacking.stacks[this.stackKey], u = O.threshold, i = Math.round(k.getThreshold(O.threshold));
- O = S(O.connectNulls, j === "percent");
- var c = function(n, P, _) {
- var I = d[n];
- n = j && h[I.x].points[l];
- var W = I[_ + "Null"] || 0;
- if (_ = I[_ + "Cliff"] || 0, I = !0, _ || W) {
- var E = (W ? n[0] : n[1]) + _, X = n[0] + _;
- I = !!W;
- } else
- !j && d[P] && d[P].isNull && (E = X = u);
- typeof E < "u" && (v.push({ plotX: t, plotY: E === null ? i : k.getThreshold(E), isNull: I, isCliff: !0 }), w.push({ plotX: t, plotY: X === null ? i : k.getThreshold(X), doCurve: !1 }));
- };
- for (d = d || this.points, j && (d = this.getStackPoints(d)), b = 0; b < d.length; b++) {
- j || (d[b].leftCliff = d[b].rightCliff = d[b].leftNull = d[b].rightNull = void 0);
- var a = d[b].isNull, t = S(d[b].rectPlotX, d[b].plotX), s = j ? S(d[b].yBottom, i) : i;
- (!a || O) && (O || c(b, b - 1, "left"), a && !j && O || (v.push(d[b]), w.push({ x: b, plotX: t, plotY: s })), O || c(b, b + 1, "right"));
- }
- return b = T.call(this, v, !0, !0), w.reversed = !0, a = T.call(this, w, !0, !0), (s = a[0]) && s[0] === "M" && (a[0] = ["L", s[1], s[2]]), a = b.concat(a), a.length && a.push(["Z"]), T = T.call(this, v, !1, O), a.xMap = b.xMap, this.areaPath = a, T;
- }, f.prototype.getStackPoints = function(d) {
- var T = this, O = [], j = [], k = this.xAxis, b = this.yAxis, w = b.stacking.stacks[this.stackKey], v = {}, l = b.series, h = l.length, u = b.options.reversedStacks ? 1 : -1, i = l.indexOf(T);
- if (d = d || this.points, this.options.stacking) {
- for (var c = 0; c < d.length; c++)
- d[c].leftNull = d[c].rightNull = void 0, v[d[c].x] = d[c];
- B(w, function(t, s) {
- t.total !== null && j.push(s);
- }), j.sort(function(t, s) {
- return t - s;
- });
- var a = l.map(function(t) {
- return t.visible;
- });
- j.forEach(function(t, s) {
- var n = 0, P, _;
- if (v[t] && !v[t].isNull)
- O.push(v[t]), [-1, 1].forEach(function(W) {
- var E = W === 1 ? "rightNull" : "leftNull", X = 0, g = w[j[s + W]];
- if (g)
- for (var m = i; 0 <= m && m < h; ) {
- var L = l[m].index;
- P = g.points[L], P || (L === T.index ? v[t][E] = !0 : a[m] && (_ = w[t].points[L]) && (X -= _[1] - _[0])), m += u;
- }
- v[t][W === 1 ? "rightCliff" : "leftCliff"] = X;
- });
- else {
- for (var I = i; 0 <= I && I < h; ) {
- if (P = w[t].points[l[I].index]) {
- n = P[1];
- break;
- }
- I += u;
- }
- n = S(n, 0), n = b.translate(n, 0, 1, 0, 1), O.push({ isNull: !0, plotX: k.translate(t, 0, 0, 0, 1), x: t, plotY: n, yBottom: n });
- }
- });
- }
- return O;
- }, f.defaultOptions = R(G.defaultOptions, { threshold: 0 }), f;
- }(G), y(U.prototype, {
- singleStacks: !1,
- drawLegendSymbol: N.drawRectangle
- }), D.registerSeriesType("area", U), U;
- }), M(o, "Series/Spline/SplineSeries.js", [o["Core/Series/SeriesRegistry.js"], o["Core/Utilities.js"]], function(y, N) {
- var D = this && this.__extends || function() {
- var G = function(R, B) {
- return G = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(S, x) {
- S.__proto__ = x;
- } || function(S, x) {
- for (var f in x)
- x.hasOwnProperty(f) && (S[f] = x[f]);
- }, G(R, B);
- };
- return function(R, B) {
- function S() {
- this.constructor = R;
- }
- G(R, B), R.prototype = B === null ? Object.create(B) : (S.prototype = B.prototype, new S());
- };
- }(), U = y.seriesTypes.line, H = N.merge, V = N.pick;
- return N = function(G) {
- function R() {
- var B = G !== null && G.apply(this, arguments) || this;
- return B.data = void 0, B.options = void 0, B.points = void 0, B;
- }
- return D(R, G), R.prototype.getPointSpline = function(B, S, x) {
- var f = S.plotX || 0, d = S.plotY || 0, T = B[x - 1];
- if (x = B[x + 1], T && !T.isNull && T.doCurve !== !1 && !S.isCliff && x && !x.isNull && x.doCurve !== !1 && !S.isCliff) {
- B = T.plotY || 0;
- var O = x.plotX || 0;
- x = x.plotY || 0;
- var j = 0, k = (1.5 * f + (T.plotX || 0)) / 2.5, b = (1.5 * d + B) / 2.5;
- O = (1.5 * f + O) / 2.5;
- var w = (1.5 * d + x) / 2.5;
- O !== k && (j = (w - b) * (O - f) / (O - k) + d - w), b += j, w += j, b > B && b > d ? (b = Math.max(B, d), w = 2 * d - b) : b < B && b < d && (b = Math.min(B, d), w = 2 * d - b), w > x && w > d ? (w = Math.max(x, d), b = 2 * d - w) : w < x && w < d && (w = Math.min(x, d), b = 2 * d - w), S.rightContX = O, S.rightContY = w;
- }
- return S = ["C", V(T.rightContX, T.plotX, 0), V(T.rightContY, T.plotY, 0), V(k, f, 0), V(b, d, 0), f, d], T.rightContX = T.rightContY = void 0, S;
- }, R.defaultOptions = H(U.defaultOptions), R;
- }(U), y.registerSeriesType("spline", N), N;
- }), M(
- o,
- "Series/AreaSpline/AreaSplineSeries.js",
- [o["Series/Area/AreaSeries.js"], o["Series/Spline/SplineSeries.js"], o["Core/Legend/LegendSymbol.js"], o["Core/Series/SeriesRegistry.js"], o["Core/Utilities.js"]],
- function(y, N, D, U, H) {
- var V = this && this.__extends || function() {
- var S = function(x, f) {
- return S = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, T) {
- d.__proto__ = T;
- } || function(d, T) {
- for (var O in T)
- T.hasOwnProperty(O) && (d[O] = T[O]);
- }, S(x, f);
- };
- return function(x, f) {
- function d() {
- this.constructor = x;
- }
- S(x, f), x.prototype = f === null ? Object.create(f) : (d.prototype = f.prototype, new d());
- };
- }(), G = y.prototype, R = H.extend, B = H.merge;
- return H = function(S) {
- function x() {
- var f = S !== null && S.apply(this, arguments) || this;
- return f.data = void 0, f.points = void 0, f.options = void 0, f;
- }
- return V(x, S), x.defaultOptions = B(N.defaultOptions, y.defaultOptions), x;
- }(N), R(H.prototype, { getGraphPath: G.getGraphPath, getStackPoints: G.getStackPoints, drawGraph: G.drawGraph, drawLegendSymbol: D.drawRectangle }), U.registerSeriesType("areaspline", H), H;
- }
- ), M(o, "Series/Column/ColumnSeries.js", [
- o["Core/Animation/AnimationUtilities.js"],
- o["Core/Color/Color.js"],
- o["Core/Globals.js"],
- o["Core/Legend/LegendSymbol.js"],
- o["Core/Series/Series.js"],
- o["Core/Series/SeriesRegistry.js"],
- o["Core/Utilities.js"]
- ], function(y, N, D, U, H, V, G) {
- var R = this && this.__extends || function() {
- var h = function(u, i) {
- return h = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(c, a) {
- c.__proto__ = a;
- } || function(c, a) {
- for (var t in a)
- a.hasOwnProperty(t) && (c[t] = a[t]);
- }, h(u, i);
- };
- return function(u, i) {
- function c() {
- this.constructor = u;
- }
- h(u, i), u.prototype = i === null ? Object.create(i) : (c.prototype = i.prototype, new c());
- };
- }(), B = y.animObject, S = N.parse, x = D.hasTouch;
- y = D.noop;
- var f = G.clamp, d = G.css, T = G.defined, O = G.extend, j = G.fireEvent, k = G.isArray, b = G.isNumber, w = G.merge, v = G.pick, l = G.objectEach;
- return G = function(h) {
- function u() {
- var i = h !== null && h.apply(this, arguments) || this;
- return i.borderWidth = void 0, i.data = void 0, i.group = void 0, i.options = void 0, i.points = void 0, i;
- }
- return R(u, h), u.prototype.animate = function(i) {
- var c = this, a = this.yAxis, t = c.options, s = this.chart.inverted, n = {}, P = s ? "translateX" : "translateY";
- if (i)
- n.scaleY = 1e-3, i = f(a.toPixels(t.threshold), a.pos, a.pos + a.len), s ? n.translateX = i - a.len : n.translateY = i, c.clipBox && c.setClip(), c.group.attr(n);
- else {
- var _ = Number(c.group.attr(P));
- c.group.animate({ scaleY: 1 }, O(B(c.options.animation), { step: function(I, W) {
- c.group && (n[P] = _ + W.pos * (a.pos - _), c.group.attr(n));
- } }));
- }
- }, u.prototype.init = function(i, c) {
- h.prototype.init.apply(this, arguments);
- var a = this;
- i = a.chart, i.hasRendered && i.series.forEach(function(t) {
- t.type === a.type && (t.isDirty = !0);
- });
- }, u.prototype.getColumnMetrics = function() {
- var i = this, c = i.options, a = i.xAxis, t = i.yAxis, s = a.options.reversedStacks;
- s = a.reversed && !s || !a.reversed && s;
- var n = {}, P, _ = 0;
- c.grouping === !1 ? _ = 1 : i.chart.series.forEach(function(X) {
- var g = X.yAxis, m = X.options;
- if (X.type === i.type && (X.visible || !i.chart.options.chart.ignoreHiddenSeries) && t.len === g.len && t.pos === g.pos) {
- if (m.stacking && m.stacking !== "group") {
- P = X.stackKey, typeof n[P] > "u" && (n[P] = _++);
- var L = n[P];
- } else
- m.grouping !== !1 && (L = _++);
- X.columnIndex = L;
- }
- });
- var I = Math.min(Math.abs(a.transA) * (a.ordinal && a.ordinal.slope || c.pointRange || a.closestPointRange || a.tickInterval || 1), a.len), W = I * c.groupPadding, E = (I - 2 * W) / (_ || 1);
- return c = Math.min(c.maxPointWidth || a.len, v(c.pointWidth, E * (1 - 2 * c.pointPadding))), i.columnMetrics = { width: c, offset: (E - c) / 2 + (W + ((i.columnIndex || 0) + (s ? 1 : 0)) * E - I / 2) * (s ? -1 : 1), paddedWidth: E, columnCount: _ }, i.columnMetrics;
- }, u.prototype.crispCol = function(i, c, a, t) {
- var s = this.chart, n = this.borderWidth, P = -(n % 2 ? 0.5 : 0);
- return n = n % 2 ? 0.5 : 1, s.inverted && s.renderer.isVML && (n += 1), this.options.crisp && (a = Math.round(i + a) + P, i = Math.round(i) + P, a -= i), t = Math.round(c + t) + n, P = 0.5 >= Math.abs(c) && 0.5 < t, c = Math.round(c) + n, t -= c, P && t && (--c, t += 1), { x: i, y: c, width: a, height: t };
- }, u.prototype.adjustForMissingColumns = function(i, c, a, t) {
- var s = this, n = this.options.stacking;
- if (!a.isNull && 1 < t.columnCount) {
- var P = 0, _ = 0;
- l(this.yAxis.stacking && this.yAxis.stacking.stacks, function(I) {
- if (typeof a.x == "number" && (I = I[a.x.toString()])) {
- var W = I.points[s.index], E = I.total;
- n ? (W && (P = _), I.hasValidPoints && _++) : k(W) && (P = W[1], _ = E || 0);
- }
- }), i = (a.plotX || 0) + ((_ - 1) * t.paddedWidth + c) / 2 - c - P * t.paddedWidth;
- }
- return i;
- }, u.prototype.translate = function() {
- var i = this, c = i.chart, a = i.options, t = i.dense = 2 > i.closestPointRange * i.xAxis.transA;
- t = i.borderWidth = v(a.borderWidth, t ? 0 : 1);
- var s = i.xAxis, n = i.yAxis, P = a.threshold, _ = i.translatedThreshold = n.getThreshold(P), I = v(a.minPointLength, 5), W = i.getColumnMetrics(), E = W.width, X = i.pointXOffset = W.offset, g = i.dataMin, m = i.dataMax, L = i.barW = Math.max(E, 1 + 2 * t);
- c.inverted && (_ -= 0.5), a.pointPadding && (L = Math.ceil(L)), H.prototype.translate.apply(i), i.points.forEach(function(z) {
- var $ = v(z.yBottom, _), Q = 999 + Math.abs($), A = z.plotX || 0;
- Q = f(z.plotY, -Q, n.len + Q);
- var F = Math.min(Q, $), Y = Math.max(Q, $) - F, Z = E, q = A + X, it = L;
- I && Math.abs(Y) < I && (Y = I, A = !n.reversed && !z.negative || n.reversed && z.negative, b(P) && b(m) && z.y === P && m <= P && (n.min || 0) < P && (g !== m || (n.max || 0) <= P) && (A = !A), F = Math.abs(F - _) > I ? $ - I : _ - (A ? I : 0)), T(z.options.pointWidth) && (Z = it = Math.ceil(z.options.pointWidth), q -= Math.round((Z - E) / 2)), a.centerInCategory && (q = i.adjustForMissingColumns(q, Z, z, W)), z.barX = q, z.pointWidth = Z, z.tooltipPos = c.inverted ? [f(n.len + n.pos - c.plotLeft - Q, n.pos - c.plotLeft, n.len + n.pos - c.plotLeft), s.len + s.pos - c.plotTop - q - it / 2, Y] : [s.left - c.plotLeft + q + it / 2, f(Q + n.pos - c.plotTop, n.pos - c.plotTop, n.len + n.pos - c.plotTop), Y], z.shapeType = i.pointClass.prototype.shapeType || "rect", z.shapeArgs = i.crispCol.apply(i, z.isNull ? [q, _, it, 0] : [q, F, it, Y]);
- });
- }, u.prototype.drawGraph = function() {
- this.group[this.dense ? "addClass" : "removeClass"]("highcharts-dense-data");
- }, u.prototype.pointAttribs = function(i, c) {
- var a = this.options, t = this.pointAttrToOptions || {}, s = t.stroke || "borderColor", n = t["stroke-width"] || "borderWidth", P = i && i.color || this.color, _ = i && i[s] || a[s] || P;
- t = i && i.options.dashStyle || a.dashStyle;
- var I = i && i[n] || a[n] || this[n] || 0, W = v(i && i.opacity, a.opacity, 1);
- if (i && this.zones.length) {
- var E = i.getZone();
- P = i.options.color || E && (E.color || i.nonZonedColor) || this.color, E && (_ = E.borderColor || _, t = E.dashStyle || t, I = E.borderWidth || I);
- }
- return c && i && (i = w(a.states[c], i.options.states && i.options.states[c] || {}), c = i.brightness, P = i.color || typeof c < "u" && S(P).brighten(i.brightness).get() || P, _ = i[s] || _, I = i[n] || I, t = i.dashStyle || t, W = v(i.opacity, W)), s = { fill: P, stroke: _, "stroke-width": I, opacity: W }, t && (s.dashstyle = t), s;
- }, u.prototype.drawPoints = function() {
- var i = this, c = this.chart, a = i.options, t = c.renderer, s = a.animationLimit || 250, n;
- i.points.forEach(function(P) {
- var _ = P.graphic, I = !!_, W = _ && c.pointCount < s ? "animate" : "attr";
- b(P.plotY) && P.y !== null ? (n = P.shapeArgs, _ && P.hasNewShapeType() && (_ = _.destroy()), i.enabledDataSorting && (P.startXPos = i.xAxis.reversed ? -(n && n.width || 0) : i.xAxis.width), _ || (P.graphic = _ = t[P.shapeType](n).add(P.group || i.group)) && i.enabledDataSorting && c.hasRendered && c.pointCount < s && (_.attr({ x: P.startXPos }), I = !0, W = "animate"), _ && I && _[W](w(n)), a.borderRadius && _[W]({ r: a.borderRadius }), c.styledMode || _[W](i.pointAttribs(P, P.selected && "select")).shadow(P.allowShadow !== !1 && a.shadow, null, a.stacking && !a.borderRadius), _ && (_.addClass(P.getClassName(), !0), _.attr({ visibility: P.visible ? "inherit" : "hidden" }))) : _ && (P.graphic = _.destroy());
- });
- }, u.prototype.drawTracker = function() {
- var i = this, c = i.chart, a = c.pointer, t = function(n) {
- var P = a.getPointFromEvent(n);
- typeof P < "u" && (a.isDirectTouch = !0, P.onMouseOver(n));
- }, s;
- i.points.forEach(function(n) {
- s = k(n.dataLabels) ? n.dataLabels : n.dataLabel ? [n.dataLabel] : [], n.graphic && (n.graphic.element.point = n), s.forEach(function(P) {
- P.div ? P.div.point = n : P.element.point = n;
- });
- }), i._hasTracking || (i.trackerGroups.forEach(function(n) {
- i[n] && (i[n].addClass("highcharts-tracker").on("mouseover", t).on("mouseout", function(P) {
- a.onTrackerMouseOut(P);
- }), x && i[n].on(
- "touchstart",
- t
- ), !c.styledMode && i.options.cursor && i[n].css(d).css({ cursor: i.options.cursor }));
- }), i._hasTracking = !0), j(this, "afterDrawTracker");
- }, u.prototype.remove = function() {
- var i = this, c = i.chart;
- c.hasRendered && c.series.forEach(function(a) {
- a.type === i.type && (a.isDirty = !0);
- }), H.prototype.remove.apply(i, arguments);
- }, u.defaultOptions = w(H.defaultOptions, { borderRadius: 0, centerInCategory: !1, groupPadding: 0.2, marker: null, pointPadding: 0.1, minPointLength: 0, cropThreshold: 50, pointRange: null, states: {
- hover: { halo: !1, brightness: 0.1 },
- select: { color: "#cccccc", borderColor: "#000000" }
- }, dataLabels: { align: void 0, verticalAlign: void 0, y: void 0 }, startFromThreshold: !0, stickyTracking: !1, tooltip: { distance: 6 }, threshold: 0, borderColor: "#ffffff" }), u;
- }(H), O(G.prototype, { cropShoulder: 0, directTouch: !0, drawLegendSymbol: U.drawRectangle, getSymbol: y, negStacks: !0, trackerGroups: ["group", "dataLabelsGroup"] }), V.registerSeriesType("column", G), G;
- }), M(o, "Core/Series/DataLabel.js", [
- o["Core/Animation/AnimationUtilities.js"],
- o["Core/FormatUtilities.js"],
- o["Core/Utilities.js"]
- ], function(y, N, D) {
- var U = y.getDeferredAnimation, H = N.format, V = D.defined, G = D.extend, R = D.fireEvent, B = D.isArray, S = D.merge, x = D.objectEach, f = D.pick, d = D.splat, T;
- return function(O) {
- function j(u, i, c, a, t) {
- var s = this, n = this.chart, P = this.isCartesian && n.inverted, _ = this.enabledDataSorting, I = f(u.dlBox && u.dlBox.centerX, u.plotX, -9999), W = f(u.plotY, -9999), E = i.getBBox(), X = c.rotation, g = c.align, m = n.isInsidePlot(I, Math.round(W), { inverted: P, paneCoordinates: !0, series: s }), L = function(A) {
- _ && s.xAxis && !z && s.setDataLabelStartPos(
- u,
- i,
- t,
- m,
- A
- );
- }, z = f(c.overflow, _ ? "none" : "justify") === "justify", $ = this.visible && u.visible !== !1 && (u.series.forceDL || _ && !z || m || f(c.inside, !!this.options.stacking) && a && n.isInsidePlot(I, P ? a.x + 1 : a.y + a.height - 1, { inverted: P, paneCoordinates: !0, series: s }));
- if ($) {
- var Q = n.renderer.fontMetrics(n.styledMode ? void 0 : c.style.fontSize, i).b;
- a = G({ x: P ? this.yAxis.len - W : I, y: Math.round(P ? this.xAxis.len - I : W), width: 0, height: 0 }, a), G(c, { width: E.width, height: E.height }), X ? (z = !1, I = n.renderer.rotCorr(Q, X), I = { x: a.x + (c.x || 0) + a.width / 2 + I.x, y: a.y + (c.y || 0) + { top: 0, middle: 0.5, bottom: 1 }[c.verticalAlign] * a.height }, L(I), i[t ? "attr" : "animate"](I).attr({ align: g }), L = (X + 720) % 360, L = 180 < L && 360 > L, g === "left" ? I.y -= L ? E.height : 0 : g === "center" ? (I.x -= E.width / 2, I.y -= E.height / 2) : g === "right" && (I.x -= E.width, I.y -= L ? 0 : E.height), i.placed = !0, i.alignAttr = I) : (L(a), i.align(c, void 0, a), I = i.alignAttr), z && 0 <= a.height ? this.justifyDataLabel(i, c, I, E, a, t) : f(c.crop, !0) && ($ = n.isInsidePlot(I.x, I.y, { paneCoordinates: !0, series: s }) && n.isInsidePlot(I.x + E.width, I.y + E.height, {
- paneCoordinates: !0,
- series: s
- })), c.shape && !X && i[t ? "attr" : "animate"]({ anchorX: P ? n.plotWidth - u.plotY : u.plotX, anchorY: P ? n.plotHeight - u.plotX : u.plotY });
- }
- t && _ && (i.placed = !1), $ || _ && !z || (i.hide(!0), i.placed = !1);
- }
- function k(u, i) {
- var c = i.filter;
- return c ? (i = c.operator, u = u[c.property], c = c.value, i === ">" && u > c || i === "<" && u < c || i === ">=" && u >= c || i === "<=" && u <= c || i === "==" && u == c || i === "===" && u === c) : !0;
- }
- function b() {
- var u = this, i = u.chart, c = u.options, a = u.points, t = u.hasRendered || 0, s = i.renderer, n = c.dataLabels, P, _ = n.animation;
- if (_ = n.defer ? U(
- i,
- _,
- u
- ) : { defer: 0, duration: 0 }, n = v(v(i.options.plotOptions && i.options.plotOptions.series && i.options.plotOptions.series.dataLabels, i.options.plotOptions && i.options.plotOptions[u.type] && i.options.plotOptions[u.type].dataLabels), n), R(this, "drawDataLabels"), B(n) || n.enabled || u._hasPointLabels) {
- var I = u.plotGroup("dataLabelsGroup", "data-labels", t ? "inherit" : "hidden", n.zIndex || 6);
- I.attr({ opacity: +t }), !t && (t = u.dataLabelsGroup) && (u.visible && I.show(!0), t[c.animation ? "animate" : "attr"]({ opacity: 1 }, _)), a.forEach(function(W) {
- P = d(v(n, W.dlOptions || W.options && W.options.dataLabels)), P.forEach(function(E, X) {
- var g = E.enabled && (!W.isNull || W.dataLabelOnNull) && k(W, E), m = W.connectors ? W.connectors[X] : W.connector, L = W.dataLabels ? W.dataLabels[X] : W.dataLabel, z = f(E.distance, W.labelDistance), $ = !L;
- if (g) {
- var Q = W.getLabelConfig(), A = f(E[W.formatPrefix + "Format"], E.format);
- Q = V(A) ? H(A, Q, i) : (E[W.formatPrefix + "Formatter"] || E.formatter).call(Q, E), A = E.style;
- var F = E.rotation;
- i.styledMode || (A.color = f(E.color, A.color, u.color, "#000000"), A.color === "contrast" ? (W.contrastColor = s.getContrast(W.color || u.color), A.color = !V(z) && E.inside || 0 > z || c.stacking ? W.contrastColor : "#000000") : delete W.contrastColor, c.cursor && (A.cursor = c.cursor));
- var Y = { r: E.borderRadius || 0, rotation: F, padding: E.padding, zIndex: 1 };
- i.styledMode || (Y.fill = E.backgroundColor, Y.stroke = E.borderColor, Y["stroke-width"] = E.borderWidth), x(Y, function(Z, q) {
- typeof Z > "u" && delete Y[q];
- });
- }
- !L || g && V(Q) && !!L.div == !!E.useHTML || (W.dataLabel = L = W.dataLabel && W.dataLabel.destroy(), W.dataLabels && (W.dataLabels.length === 1 ? delete W.dataLabels : delete W.dataLabels[X]), X || delete W.dataLabel, m && (W.connector = W.connector.destroy(), W.connectors && (W.connectors.length === 1 ? delete W.connectors : delete W.connectors[X]))), g && V(Q) && (L ? Y.text = Q : (W.dataLabels = W.dataLabels || [], L = W.dataLabels[X] = F ? s.text(Q, 0, -9999, E.useHTML).addClass("highcharts-data-label") : s.label(Q, 0, -9999, E.shape, null, null, E.useHTML, null, "data-label"), X || (W.dataLabel = L), L.addClass(" highcharts-data-label-color-" + W.colorIndex + " " + (E.className || "") + (E.useHTML ? " highcharts-tracker" : ""))), L.options = E, L.attr(Y), i.styledMode || L.css(A).shadow(E.shadow), L.added || L.add(I), E.textPath && !E.useHTML && (L.setTextPath(W.getDataLabelPath && W.getDataLabelPath(L) || W.graphic, E.textPath), W.dataLabelPath && !E.textPath.enabled && (W.dataLabelPath = W.dataLabelPath.destroy())), u.alignDataLabel(W, L, E, null, $));
- });
- });
- }
- R(this, "afterDrawDataLabels");
- }
- function w(u, i, c, a, t, s) {
- var n = this.chart, P = i.align, _ = i.verticalAlign, I = u.box ? 0 : u.padding || 0, W = i.x;
- W = W === void 0 ? 0 : W;
- var E = i.y;
- E = E === void 0 ? 0 : E;
- var X = (c.x || 0) + I;
- if (0 > X) {
- P === "right" && 0 <= W ? (i.align = "left", i.inside = !0) : W -= X;
- var g = !0;
- }
- return X = (c.x || 0) + a.width - I, X > n.plotWidth && (P === "left" && 0 >= W ? (i.align = "right", i.inside = !0) : W += n.plotWidth - X, g = !0), X = c.y + I, 0 > X && (_ === "bottom" && 0 <= E ? (i.verticalAlign = "top", i.inside = !0) : E -= X, g = !0), X = (c.y || 0) + a.height - I, X > n.plotHeight && (_ === "top" && 0 >= E ? (i.verticalAlign = "bottom", i.inside = !0) : E += n.plotHeight - X, g = !0), g && (i.x = W, i.y = E, u.placed = !s, u.align(i, void 0, t)), g;
- }
- function v(u, i) {
- var c = [], a;
- if (B(u) && !B(i))
- c = u.map(function(t) {
- return S(t, i);
- });
- else if (B(i) && !B(u))
- c = i.map(function(t) {
- return S(u, t);
- });
- else if (B(u) || B(i))
- for (a = Math.max(u.length, i.length); a--; )
- c[a] = S(u[a], i[a]);
- else
- c = S(u, i);
- return c;
- }
- function l(u, i, c, a, t) {
- var s = this.chart, n = s.inverted, P = this.xAxis, _ = P.reversed, I = n ? i.height / 2 : i.width / 2;
- u = (u = u.pointWidth) ? u / 2 : 0, i.startXPos = n ? t.x : _ ? -I - u : P.width - I + u, i.startYPos = n ? _ ? this.yAxis.height - I + u : -I - u : t.y, a ? i.visibility === "hidden" && (i.show(), i.attr({ opacity: 0 }).animate({ opacity: 1 })) : i.attr({ opacity: 1 }).animate(
- { opacity: 0 },
- void 0,
- i.hide
- ), s.hasRendered && (c && i.attr({ x: i.startXPos, y: i.startYPos }), i.placed = !0);
- }
- var h = [];
- O.compose = function(u) {
- if (h.indexOf(u) === -1) {
- var i = u.prototype;
- h.push(u), i.alignDataLabel = j, i.drawDataLabels = b, i.justifyDataLabel = w, i.setDataLabelStartPos = l;
- }
- };
- }(T || (T = {})), T;
- }), M(o, "Series/Column/ColumnDataLabel.js", [o["Core/Series/DataLabel.js"], o["Core/Series/SeriesRegistry.js"], o["Core/Utilities.js"]], function(y, N, D) {
- var U = N.series, H = D.merge, V = D.pick, G;
- return function(R) {
- function B(x, f, d, T, O) {
- var j = this.chart.inverted, k = x.series, b = (k.xAxis ? k.xAxis.len : this.chart.plotSizeX) || 0;
- k = (k.yAxis ? k.yAxis.len : this.chart.plotSizeY) || 0;
- var w = x.dlBox || x.shapeArgs, v = V(x.below, x.plotY > V(this.translatedThreshold, k)), l = V(d.inside, !!this.options.stacking);
- w && (T = H(w), 0 > T.y && (T.height += T.y, T.y = 0), w = T.y + T.height - k, 0 < w && w < T.height && (T.height -= w), j && (T = { x: k - T.y - T.height, y: b - T.x - T.width, width: T.height, height: T.width }), l || (j ? (T.x += v ? 0 : T.width, T.width = 0) : (T.y += v ? T.height : 0, T.height = 0))), d.align = V(d.align, !j || l ? "center" : v ? "right" : "left"), d.verticalAlign = V(d.verticalAlign, j || l ? "middle" : v ? "top" : "bottom"), U.prototype.alignDataLabel.call(this, x, f, d, T, O), d.inside && x.contrastColor && f.css({ color: x.contrastColor });
- }
- var S = [];
- R.compose = function(x) {
- y.compose(U), S.indexOf(x) === -1 && (S.push(x), x.prototype.alignDataLabel = B);
- };
- }(G || (G = {})), G;
- }), M(o, "Series/Bar/BarSeries.js", [o["Series/Column/ColumnSeries.js"], o["Core/Series/SeriesRegistry.js"], o["Core/Utilities.js"]], function(y, N, D) {
- var U = this && this.__extends || function() {
- var G = function(R, B) {
- return G = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(S, x) {
- S.__proto__ = x;
- } || function(S, x) {
- for (var f in x)
- x.hasOwnProperty(f) && (S[f] = x[f]);
- }, G(R, B);
- };
- return function(R, B) {
- function S() {
- this.constructor = R;
- }
- G(R, B), R.prototype = B === null ? Object.create(B) : (S.prototype = B.prototype, new S());
- };
- }(), H = D.extend, V = D.merge;
- return D = function(G) {
- function R() {
- var B = G !== null && G.apply(this, arguments) || this;
- return B.data = void 0, B.options = void 0, B.points = void 0, B;
- }
- return U(R, G), R.defaultOptions = V(
- y.defaultOptions,
- {}
- ), R;
- }(y), H(D.prototype, { inverted: !0 }), N.registerSeriesType("bar", D), D;
- }), M(o, "Series/Scatter/ScatterSeries.js", [o["Series/Column/ColumnSeries.js"], o["Series/Line/LineSeries.js"], o["Core/Series/SeriesRegistry.js"], o["Core/Utilities.js"]], function(y, N, D, U) {
- var H = this && this.__extends || function() {
- var B = function(S, x) {
- return B = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(f, d) {
- f.__proto__ = d;
- } || function(f, d) {
- for (var T in d)
- d.hasOwnProperty(T) && (f[T] = d[T]);
- }, B(S, x);
- };
- return function(S, x) {
- function f() {
- this.constructor = S;
- }
- B(S, x), S.prototype = x === null ? Object.create(x) : (f.prototype = x.prototype, new f());
- };
- }(), V = U.addEvent, G = U.extend, R = U.merge;
- return U = function(B) {
- function S() {
- var x = B !== null && B.apply(this, arguments) || this;
- return x.data = void 0, x.options = void 0, x.points = void 0, x;
- }
- return H(S, B), S.prototype.applyJitter = function() {
- var x = this, f = this.options.jitter, d = this.points.length;
- f && this.points.forEach(function(T, O) {
- ["x", "y"].forEach(function(j, k) {
- var b = "plot" + j.toUpperCase();
- if (f[j] && !T.isNull) {
- var w = x[j + "Axis"], v = f[j] * w.transA;
- if (w && !w.isLog) {
- var l = Math.max(0, T[b] - v);
- w = Math.min(w.len, T[b] + v), k = 1e4 * Math.sin(O + k * d), T[b] = l + (w - l) * (k - Math.floor(k)), j === "x" && (T.clientX = T.plotX);
- }
- }
- });
- });
- }, S.prototype.drawGraph = function() {
- this.options.lineWidth ? B.prototype.drawGraph.call(this) : this.graph && (this.graph = this.graph.destroy());
- }, S.defaultOptions = R(N.defaultOptions, { lineWidth: 0, findNearestPointBy: "xy", jitter: { x: 0, y: 0 }, marker: { enabled: !0 }, tooltip: {
- headerFormat: '<span style="color:{point.color}">●</span> <span style="font-size: 10px"> {series.name}</span><br/>',
- pointFormat: "x: <b>{point.x}</b><br/>y: <b>{point.y}</b><br/>"
- } }), S;
- }(N), G(U.prototype, { drawTracker: y.prototype.drawTracker, sorted: !1, requireSorting: !1, noSharedTooltip: !0, trackerGroups: ["group", "markerGroup", "dataLabelsGroup"], takeOrdinalPosition: !1 }), V(U, "afterTranslate", function() {
- this.applyJitter();
- }), D.registerSeriesType("scatter", U), U;
- }), M(o, "Series/CenteredUtilities.js", [o["Core/Globals.js"], o["Core/Series/Series.js"], o["Core/Utilities.js"]], function(y, N, D) {
- var U = y.deg2rad, H = D.isNumber, V = D.pick, G = D.relativeLength, R;
- return function(B) {
- B.getCenter = function() {
- var S = this.options, x = this.chart, f = 2 * (S.slicedOffset || 0), d = x.plotWidth - 2 * f, T = x.plotHeight - 2 * f, O = S.center, j = Math.min(d, T), k = S.size, b = S.innerSize || 0;
- for (typeof k == "string" && (k = parseFloat(k)), typeof b == "string" && (b = parseFloat(b)), S = [V(O[0], "50%"), V(O[1], "50%"), V(k && 0 > k ? void 0 : S.size, "100%"), V(b && 0 > b ? void 0 : S.innerSize || 0, "0%")], !x.angular || this instanceof N || (S[3] = 0), O = 0; 4 > O; ++O)
- k = S[O], x = 2 > O || O === 2 && /%$/.test(k), S[O] = G(k, [d, T, j, S[2]][O]) + (x ? f : 0);
- return S[3] > S[2] && (S[3] = S[2]), S;
- }, B.getStartAndEndRadians = function(S, x) {
- return S = H(S) ? S : 0, x = H(x) && x > S && 360 > x - S ? x : S + 360, { start: U * (S + -90), end: U * (x + -90) };
- };
- }(R || (R = {})), R;
- }), M(o, "Series/Pie/PiePoint.js", [o["Core/Animation/AnimationUtilities.js"], o["Core/Series/Point.js"], o["Core/Utilities.js"]], function(y, N, D) {
- var U = this && this.__extends || function() {
- var x = function(f, d) {
- return x = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(T, O) {
- T.__proto__ = O;
- } || function(T, O) {
- for (var j in O)
- O.hasOwnProperty(j) && (T[j] = O[j]);
- }, x(f, d);
- };
- return function(f, d) {
- function T() {
- this.constructor = f;
- }
- x(f, d), f.prototype = d === null ? Object.create(d) : (T.prototype = d.prototype, new T());
- };
- }(), H = y.setAnimation, V = D.addEvent, G = D.defined;
- y = D.extend;
- var R = D.isNumber, B = D.pick, S = D.relativeLength;
- return N = function(x) {
- function f() {
- var d = x !== null && x.apply(this, arguments) || this;
- return d.labelDistance = void 0, d.options = void 0, d.series = void 0, d;
- }
- return U(f, x), f.prototype.getConnectorPath = function() {
- var d = this.labelPosition, T = this.series.options.dataLabels, O = this.connectorShapes, j = T.connectorShape;
- return O[j] && (j = O[j]), j.call(this, { x: d.final.x, y: d.final.y, alignment: d.alignment }, d.connectorPosition, T);
- }, f.prototype.getTranslate = function() {
- return this.sliced ? this.slicedTranslation : { translateX: 0, translateY: 0 };
- }, f.prototype.haloPath = function(d) {
- var T = this.shapeArgs;
- return this.sliced || !this.visible ? [] : this.series.chart.renderer.symbols.arc(T.x, T.y, T.r + d, T.r + d, { innerR: T.r - 1, start: T.start, end: T.end });
- }, f.prototype.init = function() {
- var d = this;
- x.prototype.init.apply(
- this,
- arguments
- ), this.name = B(this.name, "Slice");
- var T = function(O) {
- d.slice(O.type === "select");
- };
- return V(this, "select", T), V(this, "unselect", T), this;
- }, f.prototype.isValid = function() {
- return R(this.y) && 0 <= this.y;
- }, f.prototype.setVisible = function(d, T) {
- var O = this, j = this.series, k = j.chart, b = j.options.ignoreHiddenPoint;
- T = B(T, b), d !== this.visible && (this.visible = this.options.visible = d = typeof d > "u" ? !this.visible : d, j.options.data[j.data.indexOf(this)] = this.options, ["graphic", "dataLabel", "connector", "shadowGroup"].forEach(function(w) {
- O[w] && O[w][d ? "show" : "hide"](d);
- }), this.legendItem && k.legend.colorizeItem(this, d), d || this.state !== "hover" || this.setState(""), b && (j.isDirty = !0), T && k.redraw());
- }, f.prototype.slice = function(d, T, O) {
- var j = this.series;
- H(O, j.chart), B(T, !0), this.sliced = this.options.sliced = G(d) ? d : !this.sliced, j.options.data[j.data.indexOf(this)] = this.options, this.graphic && this.graphic.animate(this.getTranslate()), this.shadowGroup && this.shadowGroup.animate(this.getTranslate());
- }, f;
- }(N), y(N.prototype, { connectorShapes: { fixedOffset: function(x, f, d) {
- var T = f.breakAt;
- return f = f.touchingSliceAt, [["M", x.x, x.y], d.softConnector ? ["C", x.x + (x.alignment === "left" ? -5 : 5), x.y, 2 * T.x - f.x, 2 * T.y - f.y, T.x, T.y] : ["L", T.x, T.y], ["L", f.x, f.y]];
- }, straight: function(x, f) {
- return f = f.touchingSliceAt, [["M", x.x, x.y], ["L", f.x, f.y]];
- }, crookedLine: function(x, f, d) {
- f = f.touchingSliceAt;
- var T = this.series, O = T.center[0], j = T.chart.plotWidth, k = T.chart.plotLeft;
- T = x.alignment;
- var b = this.shapeArgs.r;
- return d = S(d.crookDistance, 1), j = T === "left" ? O + b + (j + k - O - b) * (1 - d) : k + (O - b) * d, d = ["L", j, x.y], O = !0, (T === "left" ? j > x.x || j < f.x : j < x.x || j > f.x) && (O = !1), x = [["M", x.x, x.y]], O && x.push(d), x.push(["L", f.x, f.y]), x;
- } } }), N;
- }), M(o, "Series/Pie/PieSeries.js", [o["Series/CenteredUtilities.js"], o["Series/Column/ColumnSeries.js"], o["Core/Globals.js"], o["Core/Legend/LegendSymbol.js"], o["Series/Pie/PiePoint.js"], o["Core/Series/Series.js"], o["Core/Series/SeriesRegistry.js"], o["Core/Renderer/SVG/Symbols.js"], o["Core/Utilities.js"]], function(y, N, D, U, H, V, G, R, B) {
- var S = this && this.__extends || function() {
- var b = function(w, v) {
- return b = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(l, h) {
- l.__proto__ = h;
- } || function(l, h) {
- for (var u in h)
- h.hasOwnProperty(u) && (l[u] = h[u]);
- }, b(w, v);
- };
- return function(w, v) {
- function l() {
- this.constructor = w;
- }
- b(w, v), w.prototype = v === null ? Object.create(v) : (l.prototype = v.prototype, new l());
- };
- }(), x = y.getStartAndEndRadians;
- D = D.noop;
- var f = B.clamp, d = B.extend, T = B.fireEvent, O = B.merge, j = B.pick, k = B.relativeLength;
- return B = function(b) {
- function w() {
- var v = b !== null && b.apply(this, arguments) || this;
- return v.center = void 0, v.data = void 0, v.maxLabelDistance = void 0, v.options = void 0, v.points = void 0, v;
- }
- return S(w, b), w.prototype.animate = function(v) {
- var l = this, h = l.points, u = l.startAngleRad;
- v || h.forEach(function(i) {
- var c = i.graphic, a = i.shapeArgs;
- c && a && (c.attr({ r: j(i.startR, l.center && l.center[3] / 2), start: u, end: u }), c.animate({ r: a.r, start: a.start, end: a.end }, l.options.animation));
- });
- }, w.prototype.drawEmpty = function() {
- var v = this.startAngleRad, l = this.endAngleRad, h = this.options;
- if (this.total === 0 && this.center) {
- var u = this.center[0], i = this.center[1];
- this.graph || (this.graph = this.chart.renderer.arc(u, i, this.center[1] / 2, 0, v, l).addClass("highcharts-empty-series").add(this.group)), this.graph.attr({ d: R.arc(u, i, this.center[2] / 2, 0, { start: v, end: l, innerR: this.center[3] / 2 }) }), this.chart.styledMode || this.graph.attr({ "stroke-width": h.borderWidth, fill: h.fillColor || "none", stroke: h.color || "#cccccc" });
- } else
- this.graph && (this.graph = this.graph.destroy());
- }, w.prototype.drawPoints = function() {
- var v = this.chart.renderer;
- this.points.forEach(function(l) {
- l.graphic && l.hasNewShapeType() && (l.graphic = l.graphic.destroy()), l.graphic || (l.graphic = v[l.shapeType](l.shapeArgs).add(l.series.group), l.delayedRendering = !0);
- });
- }, w.prototype.generatePoints = function() {
- b.prototype.generatePoints.call(this), this.updateTotals();
- }, w.prototype.getX = function(v, l, h) {
- var u = this.center, i = this.radii ? this.radii[h.index] || 0 : u[2] / 2;
- return v = Math.asin(f((v - u[1]) / (i + h.labelDistance), -1, 1)), u[0] + (l ? -1 : 1) * Math.cos(v) * (i + h.labelDistance) + (0 < h.labelDistance ? (l ? -1 : 1) * this.options.dataLabels.padding : 0);
- }, w.prototype.hasData = function() {
- return !!this.processedXData.length;
- }, w.prototype.redrawPoints = function() {
- var v = this, l = v.chart, h = l.renderer, u = v.options.shadow, i, c, a, t;
- this.drawEmpty(), !u || v.shadowGroup || l.styledMode || (v.shadowGroup = h.g("shadow").attr({ zIndex: -1 }).add(v.group)), v.points.forEach(function(s) {
- var n = {};
- if (c = s.graphic, !s.isNull && c) {
- var P = void 0;
- t = s.shapeArgs, i = s.getTranslate(), l.styledMode || (P = s.shadowGroup, u && !P && (P = s.shadowGroup = h.g("shadow").add(v.shadowGroup)), P && P.attr(i), a = v.pointAttribs(s, s.selected && "select")), s.delayedRendering ? (c.setRadialReference(v.center).attr(t).attr(i), l.styledMode || c.attr(a).attr({ "stroke-linejoin": "round" }).shadow(u, P), s.delayedRendering = !1) : (c.setRadialReference(v.center), l.styledMode || O(!0, n, a), O(!0, n, t, i), c.animate(n)), c.attr({ visibility: s.visible ? "inherit" : "hidden" }), c.addClass(s.getClassName(), !0);
- } else
- c && (s.graphic = c.destroy());
- });
- }, w.prototype.sortByAngle = function(v, l) {
- v.sort(function(h, u) {
- return typeof h.angle < "u" && (u.angle - h.angle) * l;
- });
- }, w.prototype.translate = function(v) {
- this.generatePoints();
- var l = this.options, h = l.slicedOffset, u = h + (l.borderWidth || 0), i = x(l.startAngle, l.endAngle), c = this.startAngleRad = i.start;
- i = (this.endAngleRad = i.end) - c;
- var a = this.points, t = l.dataLabels.distance;
- l = l.ignoreHiddenPoint;
- var s = a.length, n, P = 0;
- for (v || (this.center = v = this.getCenter()), n = 0; n < s; n++) {
- var _ = a[n], I = c + P * i;
- !_.isValid() || l && !_.visible || (P += _.percentage / 100);
- var W = c + P * i, E = { x: v[0], y: v[1], r: v[2] / 2, innerR: v[3] / 2, start: Math.round(1e3 * I) / 1e3, end: Math.round(1e3 * W) / 1e3 };
- _.shapeType = "arc", _.shapeArgs = E, _.labelDistance = j(_.options.dataLabels && _.options.dataLabels.distance, t), _.labelDistance = k(_.labelDistance, E.r), this.maxLabelDistance = Math.max(this.maxLabelDistance || 0, _.labelDistance), W = (W + I) / 2, W > 1.5 * Math.PI ? W -= 2 * Math.PI : W < -Math.PI / 2 && (W += 2 * Math.PI), _.slicedTranslation = { translateX: Math.round(Math.cos(W) * h), translateY: Math.round(Math.sin(W) * h) }, E = Math.cos(W) * v[2] / 2;
- var X = Math.sin(W) * v[2] / 2;
- _.tooltipPos = [v[0] + 0.7 * E, v[1] + 0.7 * X], _.half = W < -Math.PI / 2 || W > Math.PI / 2 ? 1 : 0, _.angle = W, I = Math.min(u, _.labelDistance / 5), _.labelPosition = { natural: { x: v[0] + E + Math.cos(W) * _.labelDistance, y: v[1] + X + Math.sin(W) * _.labelDistance }, final: {}, alignment: 0 > _.labelDistance ? "center" : _.half ? "right" : "left", connectorPosition: { breakAt: { x: v[0] + E + Math.cos(W) * I, y: v[1] + X + Math.sin(W) * I }, touchingSliceAt: { x: v[0] + E, y: v[1] + X } } };
- }
- T(this, "afterTranslate");
- }, w.prototype.updateTotals = function() {
- var v = this.points, l = v.length, h = this.options.ignoreHiddenPoint, u, i = 0;
- for (u = 0; u < l; u++) {
- var c = v[u];
- !c.isValid() || h && !c.visible || (i += c.y);
- }
- for (this.total = i, u = 0; u < l; u++)
- c = v[u], c.percentage = 0 < i && (c.visible || !h) ? c.y / i * 100 : 0, c.total = i;
- }, w.defaultOptions = O(V.defaultOptions, {
- center: [null, null],
- clip: !1,
- colorByPoint: !0,
- dataLabels: { allowOverlap: !0, connectorPadding: 5, connectorShape: "fixedOffset", crookDistance: "70%", distance: 30, enabled: !0, formatter: function() {
- return this.point.isNull ? void 0 : this.point.name;
- }, softConnector: !0, x: 0 },
- fillColor: void 0,
- ignoreHiddenPoint: !0,
- inactiveOtherPoints: !0,
- legendType: "point",
- marker: null,
- size: null,
- showInLegend: !1,
- slicedOffset: 10,
- stickyTracking: !1,
- tooltip: { followPointer: !0 },
- borderColor: "#ffffff",
- borderWidth: 1,
- lineWidth: void 0,
- states: { hover: { brightness: 0.1 } }
- }), w;
- }(V), d(B.prototype, { axisTypes: [], directTouch: !0, drawGraph: void 0, drawLegendSymbol: U.drawRectangle, drawTracker: N.prototype.drawTracker, getCenter: y.getCenter, getSymbol: D, isCartesian: !1, noSharedTooltip: !0, pointAttribs: N.prototype.pointAttribs, pointClass: H, requireSorting: !1, searchPoint: D, trackerGroups: ["group", "dataLabelsGroup"] }), G.registerSeriesType("pie", B), B;
- }), M(o, "Series/Pie/PieDataLabel.js", [
- o["Core/Series/DataLabel.js"],
- o["Core/Globals.js"],
- o["Core/Renderer/RendererUtilities.js"],
- o["Core/Series/SeriesRegistry.js"],
- o["Core/Utilities.js"]
- ], function(y, N, D, U, H) {
- var V = N.noop, G = D.distribute, R = U.series, B = H.arrayMax, S = H.clamp, x = H.defined, f = H.merge, d = H.pick, T = H.relativeLength, O;
- return function(j) {
- function k() {
- var h = this, u = h.data, i = h.chart, c = h.options.dataLabels || {}, a = c.connectorPadding, t = i.plotWidth, s = i.plotHeight, n = i.plotLeft, P = Math.round(i.chartWidth / 3), _ = h.center, I = _[2] / 2, W = _[1], E = [[], []], X = [0, 0, 0, 0], g = h.dataLabelPositioners, m, L, z, $, Q, A, F, Y, Z, q, it, et;
- h.visible && (c.enabled || h._hasPointLabels) && (u.forEach(function(nt) {
- nt.dataLabel && nt.visible && nt.dataLabel.shortened && (nt.dataLabel.attr({ width: "auto" }).css({ width: "auto", textOverflow: "clip" }), nt.dataLabel.shortened = !1);
- }), R.prototype.drawDataLabels.apply(h), u.forEach(function(nt) {
- nt.dataLabel && (nt.visible ? (E[nt.half].push(nt), nt.dataLabel._pos = null, !x(c.style.width) && !x(nt.options.dataLabels && nt.options.dataLabels.style && nt.options.dataLabels.style.width) && nt.dataLabel.getBBox().width > P && (nt.dataLabel.css({ width: Math.round(0.7 * P) + "px" }), nt.dataLabel.shortened = !0)) : (nt.dataLabel = nt.dataLabel.destroy(), nt.dataLabels && nt.dataLabels.length === 1 && delete nt.dataLabels));
- }), E.forEach(function(nt, rt) {
- var ct = nt.length, gt = [], dt;
- if (ct) {
- if (h.sortByAngle(nt, rt - 0.5), 0 < h.maxLabelDistance) {
- var ht = Math.max(0, W - I - h.maxLabelDistance), at = Math.min(W + I + h.maxLabelDistance, i.plotHeight);
- nt.forEach(function(J) {
- 0 < J.labelDistance && J.dataLabel && (J.top = Math.max(0, W - I - J.labelDistance), J.bottom = Math.min(W + I + J.labelDistance, i.plotHeight), dt = J.dataLabel.getBBox().height || 21, J.distributeBox = { target: J.labelPosition.natural.y - J.top + dt / 2, size: dt, rank: J.y }, gt.push(J.distributeBox));
- }), ht = at + dt - ht, G(gt, ht, ht / 5);
- }
- for (it = 0; it < ct; it++) {
- if (m = nt[it], A = m.labelPosition, $ = m.dataLabel, q = m.visible === !1 ? "hidden" : "inherit", Z = ht = A.natural.y, gt && x(m.distributeBox) && (typeof m.distributeBox.pos > "u" ? q = "hidden" : (F = m.distributeBox.size, Z = g.radialDistributionY(m))), delete m.positionIndex, c.justify)
- Y = g.justify(m, I, _);
- else
- switch (c.alignTo) {
- case "connectors":
- Y = g.alignToConnectors(nt, rt, t, n);
- break;
- case "plotEdges":
- Y = g.alignToPlotEdges($, rt, t, n);
- break;
- default:
- Y = g.radialDistributionX(h, m, Z, ht);
- }
- $._attr = { visibility: q, align: A.alignment }, et = m.options.dataLabels || {}, $._pos = { x: Y + d(et.x, c.x) + ({ left: a, right: -a }[A.alignment] || 0), y: Z + d(et.y, c.y) - 10 }, A.final.x = Y, A.final.y = Z, d(c.crop, !0) && (Q = $.getBBox().width, ht = null, Y - Q < a && rt === 1 ? (ht = Math.round(Q - Y + a), X[3] = Math.max(ht, X[3])) : Y + Q > t - a && rt === 0 && (ht = Math.round(Y + Q - t + a), X[1] = Math.max(ht, X[1])), 0 > Z - F / 2 ? X[0] = Math.max(Math.round(-Z + F / 2), X[0]) : Z + F / 2 > s && (X[2] = Math.max(Math.round(Z + F / 2 - s), X[2])), $.sideOverflow = ht);
- }
- }
- }), B(X) === 0 || this.verifyDataLabelOverflow(X)) && (this.placeDataLabels(), this.points.forEach(function(nt) {
- if (et = f(c, nt.options.dataLabels), L = d(et.connectorWidth, 1)) {
- var rt;
- z = nt.connector, ($ = nt.dataLabel) && $._pos && nt.visible && 0 < nt.labelDistance ? (q = $._attr.visibility, (rt = !z) && (nt.connector = z = i.renderer.path().addClass("highcharts-data-label-connector highcharts-color-" + nt.colorIndex + (nt.className ? " " + nt.className : "")).add(h.dataLabelsGroup), i.styledMode || z.attr({ "stroke-width": L, stroke: et.connectorColor || nt.color || "#666666" })), z[rt ? "attr" : "animate"]({ d: nt.getConnectorPath() }), z.attr("visibility", q)) : z && (nt.connector = z.destroy());
- }
- }));
- }
- function b() {
- this.points.forEach(function(h) {
- var u = h.dataLabel, i;
- u && h.visible && ((i = u._pos) ? (u.sideOverflow && (u._attr.width = Math.max(u.getBBox().width - u.sideOverflow, 0), u.css({ width: u._attr.width + "px", textOverflow: (this.options.dataLabels.style || {}).textOverflow || "ellipsis" }), u.shortened = !0), u.attr(u._attr), u[u.moved ? "animate" : "attr"](i), u.moved = !0) : u && u.attr({ y: -9999 })), delete h.distributeBox;
- }, this);
- }
- function w(h) {
- var u = this.center, i = this.options, c = i.center, a = i.minSize || 80, t = i.size !== null;
- if (!t) {
- if (c[0] !== null)
- var s = Math.max(u[2] - Math.max(h[1], h[3]), a);
- else
- s = Math.max(u[2] - h[1] - h[3], a), u[0] += (h[3] - h[1]) / 2;
- c[1] !== null ? s = S(s, a, u[2] - Math.max(h[0], h[2])) : (s = S(s, a, u[2] - h[0] - h[2]), u[1] += (h[0] - h[2]) / 2), s < u[2] ? (u[2] = s, u[3] = Math.min(T(i.innerSize || 0, s), s), this.translate(u), this.drawDataLabels && this.drawDataLabels()) : t = !0;
- }
- return t;
- }
- var v = [], l = { radialDistributionY: function(h) {
- return h.top + h.distributeBox.pos;
- }, radialDistributionX: function(h, u, i, c) {
- return h.getX(i < u.top + 2 || i > u.bottom - 2 ? c : i, u.half, u);
- }, justify: function(h, u, i) {
- return i[0] + (h.half ? -1 : 1) * (u + h.labelDistance);
- }, alignToPlotEdges: function(h, u, i, c) {
- return h = h.getBBox().width, u ? h + c : i - h - c;
- }, alignToConnectors: function(h, u, i, c) {
- var a = 0, t;
- return h.forEach(function(s) {
- t = s.dataLabel.getBBox().width, t > a && (a = t);
- }), u ? a + c : i - a - c;
- } };
- j.compose = function(h) {
- y.compose(R), v.indexOf(h) === -1 && (v.push(h), h = h.prototype, h.dataLabelPositioners = l, h.alignDataLabel = V, h.drawDataLabels = k, h.placeDataLabels = b, h.verifyDataLabelOverflow = w);
- };
- }(O || (O = {})), O;
- }), M(o, "Extensions/OverlappingDataLabels.js", [o["Core/Chart/Chart.js"], o["Core/Utilities.js"]], function(y, N) {
- function D(S, x) {
- var f = !1;
- if (S) {
- var d = S.newOpacity;
- S.oldOpacity !== d && (S.alignAttr && S.placed ? (S[d ? "removeClass" : "addClass"]("highcharts-data-label-hidden"), f = !0, S.alignAttr.opacity = d, S[S.isOld ? "animate" : "attr"](S.alignAttr, null, function() {
- x.styledMode || S.css({ pointerEvents: d ? "auto" : "none" });
- }), H(x, "afterHideOverlappingLabel")) : S.attr({ opacity: d })), S.isOld = !0;
- }
- return f;
- }
- var U = N.addEvent, H = N.fireEvent, V = N.isArray, G = N.isNumber, R = N.objectEach, B = N.pick;
- U(y, "render", function() {
- var S = this, x = [];
- (this.labelCollectors || []).forEach(function(f) {
- x = x.concat(f());
- }), (this.yAxis || []).forEach(function(f) {
- f.stacking && f.options.stackLabels && !f.options.stackLabels.allowOverlap && R(f.stacking.stacks, function(d) {
- R(d, function(T) {
- T.label && T.label.visibility !== "hidden" && x.push(T.label);
- });
- });
- }), (this.series || []).forEach(function(f) {
- var d = f.options.dataLabels;
- f.visible && (d.enabled !== !1 || f._hasPointLabels) && (d = function(T) {
- return T.forEach(function(O) {
- O.visible && (V(O.dataLabels) ? O.dataLabels : O.dataLabel ? [O.dataLabel] : []).forEach(function(j) {
- var k = j.options;
- j.labelrank = B(k.labelrank, O.labelrank, O.shapeArgs && O.shapeArgs.height), k.allowOverlap ? (j.oldOpacity = j.opacity, j.newOpacity = 1, D(j, S)) : x.push(j);
- });
- });
- }, d(f.nodes || []), d(f.points));
- }), this.hideOverlappingLabels(x);
- }), y.prototype.hideOverlappingLabels = function(S) {
- var x = this, f = S.length, d = x.renderer, T, O, j, k = !1, b = function(l) {
- var h, u = l.box ? 0 : l.padding || 0, i = h = 0, c;
- if (l && (!l.alignAttr || l.placed)) {
- var a = l.alignAttr || { x: l.attr("x"), y: l.attr("y") }, t = l.parentGroup;
- l.width || (h = l.getBBox(), l.width = h.width, l.height = h.height, h = d.fontMetrics(null, l.element).h);
- var s = l.width - 2 * u;
- return (c = { left: "0", center: "0.5", right: "1" }[l.alignValue]) ? i = +c * s : G(l.x) && Math.round(l.x) !== l.translateX && (i = l.x - l.translateX), { x: a.x + (t.translateX || 0) + u - (i || 0), y: a.y + (t.translateY || 0) + u - h, width: l.width - 2 * u, height: l.height - 2 * u };
- }
- };
- for (O = 0; O < f; O++)
- (T = S[O]) && (T.oldOpacity = T.opacity, T.newOpacity = 1, T.absoluteBox = b(T));
- for (S.sort(function(l, h) {
- return (h.labelrank || 0) - (l.labelrank || 0);
- }), O = 0; O < f; O++) {
- var w = (b = S[O]) && b.absoluteBox;
- for (T = O + 1; T < f; ++T) {
- var v = (j = S[T]) && j.absoluteBox;
- !w || !v || b === j || b.newOpacity === 0 || j.newOpacity === 0 || v.x >= w.x + w.width || v.x + v.width <= w.x || v.y >= w.y + w.height || v.y + v.height <= w.y || ((b.labelrank < j.labelrank ? b : j).newOpacity = 0);
- }
- }
- S.forEach(function(l) {
- D(l, x) && (k = !0);
- }), k && H(x, "afterHideAllOverlappingLabels");
- };
- }), M(
- o,
- "Core/Responsive.js",
- [o["Core/Utilities.js"]],
- function(y) {
- var N = y.extend, D = y.find, U = y.isArray, H = y.isObject, V = y.merge, G = y.objectEach, R = y.pick, B = y.splat, S = y.uniqueKey, x;
- return function(f) {
- var d = [];
- f.compose = function(O) {
- return d.indexOf(O) === -1 && (d.push(O), N(O.prototype, T.prototype)), O;
- };
- var T = function() {
- function O() {
- }
- return O.prototype.currentOptions = function(j) {
- function k(v, l, h, u) {
- var i;
- G(v, function(c, a) {
- if (!u && -1 < b.collectionsWithUpdate.indexOf(a) && l[a])
- for (c = B(c), h[a] = [], i = 0; i < Math.max(c.length, l[a].length); i++)
- l[a][i] && (c[i] === void 0 ? h[a][i] = l[a][i] : (h[a][i] = {}, k(c[i], l[a][i], h[a][i], u + 1)));
- else
- H(c) ? (h[a] = U(c) ? [] : {}, k(c, l[a] || {}, h[a], u + 1)) : h[a] = typeof l[a] > "u" ? null : l[a];
- });
- }
- var b = this, w = {};
- return k(j, this.options, w, 0), w;
- }, O.prototype.matchResponsiveRule = function(j, k) {
- var b = j.condition;
- (b.callback || function() {
- return this.chartWidth <= R(b.maxWidth, Number.MAX_VALUE) && this.chartHeight <= R(b.maxHeight, Number.MAX_VALUE) && this.chartWidth >= R(b.minWidth, 0) && this.chartHeight >= R(b.minHeight, 0);
- }).call(this) && k.push(j._id);
- }, O.prototype.setResponsive = function(j, k) {
- var b = this, w = this.options.responsive, v = this.currentResponsive, l = [];
- !k && w && w.rules && w.rules.forEach(function(h) {
- typeof h._id > "u" && (h._id = S()), b.matchResponsiveRule(h, l);
- }, this), k = V.apply(void 0, l.map(function(h) {
- return D((w || {}).rules || [], function(u) {
- return u._id === h;
- });
- }).map(function(h) {
- return h && h.chartOptions;
- })), k.isResponsiveOptions = !0, l = l.toString() || void 0, l !== (v && v.ruleIds) && (v && this.update(v.undoOptions, j, !0), l ? (v = this.currentOptions(k), v.isResponsiveOptions = !0, this.currentResponsive = { ruleIds: l, mergedOptions: k, undoOptions: v }, this.update(k, j, !0)) : this.currentResponsive = void 0);
- }, O;
- }();
- }(x || (x = {})), x;
- }
- ), M(o, "masters/highcharts.src.js", [
- o["Core/Globals.js"],
- o["Core/Utilities.js"],
- o["Core/DefaultOptions.js"],
- o["Core/Animation/Fx.js"],
- o["Core/Animation/AnimationUtilities.js"],
- o["Core/Renderer/HTML/AST.js"],
- o["Core/FormatUtilities.js"],
- o["Core/Renderer/RendererUtilities.js"],
- o["Core/Renderer/SVG/SVGElement.js"],
- o["Core/Renderer/SVG/SVGRenderer.js"],
- o["Core/Renderer/HTML/HTMLElement.js"],
- o["Core/Renderer/HTML/HTMLRenderer.js"],
- o["Core/Axis/Axis.js"],
- o["Core/Axis/DateTimeAxis.js"],
- o["Core/Axis/LogarithmicAxis.js"],
- o["Core/Axis/PlotLineOrBand/PlotLineOrBand.js"],
- o["Core/Axis/Tick.js"],
- o["Core/Tooltip.js"],
- o["Core/Series/Point.js"],
- o["Core/Pointer.js"],
- o["Core/MSPointer.js"],
- o["Core/Legend/Legend.js"],
- o["Core/Chart/Chart.js"],
- o["Core/Series/Series.js"],
- o["Core/Series/SeriesRegistry.js"],
- o["Series/Column/ColumnSeries.js"],
- o["Series/Column/ColumnDataLabel.js"],
- o["Series/Pie/PieSeries.js"],
- o["Series/Pie/PieDataLabel.js"],
- o["Core/Series/DataLabel.js"],
- o["Core/Responsive.js"],
- o["Core/Color/Color.js"],
- o["Core/Time.js"]
- ], function(y, N, D, U, H, V, G, R, B, S, x, f, d, T, O, j, k, b, w, v, l, h, u, i, c, a, t, s, n, P, _, I, W) {
- return y.animate = H.animate, y.animObject = H.animObject, y.getDeferredAnimation = H.getDeferredAnimation, y.setAnimation = H.setAnimation, y.stop = H.stop, y.timers = U.timers, y.AST = V, y.Axis = d, y.Chart = u, y.chart = u.chart, y.Fx = U, y.Legend = h, y.PlotLineOrBand = j, y.Point = w, y.Pointer = l.isRequired() ? l : v, y.Series = i, y.SVGElement = B, y.SVGRenderer = S, y.Tick = k, y.Time = W, y.Tooltip = b, y.Color = I, y.color = I.parse, f.compose(S), x.compose(B), y.defaultOptions = D.defaultOptions, y.getOptions = D.getOptions, y.time = D.defaultTime, y.setOptions = D.setOptions, y.dateFormat = G.dateFormat, y.format = G.format, y.numberFormat = G.numberFormat, y.addEvent = N.addEvent, y.arrayMax = N.arrayMax, y.arrayMin = N.arrayMin, y.attr = N.attr, y.clearTimeout = N.clearTimeout, y.correctFloat = N.correctFloat, y.createElement = N.createElement, y.css = N.css, y.defined = N.defined, y.destroyObjectProperties = N.destroyObjectProperties, y.discardElement = N.discardElement, y.distribute = R.distribute, y.erase = N.erase, y.error = N.error, y.extend = N.extend, y.extendClass = N.extendClass, y.find = N.find, y.fireEvent = N.fireEvent, y.getMagnitude = N.getMagnitude, y.getStyle = N.getStyle, y.inArray = N.inArray, y.isArray = N.isArray, y.isClass = N.isClass, y.isDOMElement = N.isDOMElement, y.isFunction = N.isFunction, y.isNumber = N.isNumber, y.isObject = N.isObject, y.isString = N.isString, y.keys = N.keys, y.merge = N.merge, y.normalizeTickInterval = N.normalizeTickInterval, y.objectEach = N.objectEach, y.offset = N.offset, y.pad = N.pad, y.pick = N.pick, y.pInt = N.pInt, y.relativeLength = N.relativeLength, y.removeEvent = N.removeEvent, y.seriesType = c.seriesType, y.splat = N.splat, y.stableSort = N.stableSort, y.syncTimeout = N.syncTimeout, y.timeUnits = N.timeUnits, y.uniqueKey = N.uniqueKey, y.useSerialIds = N.useSerialIds, y.wrap = N.wrap, t.compose(a), P.compose(i), T.compose(d), O.compose(d), n.compose(s), j.compose(d), _.compose(u), y;
- }), M(o, "Core/Axis/OrdinalAxis.js", [
- o["Core/Axis/Axis.js"],
- o["Core/Globals.js"],
- o["Core/Series/Series.js"],
- o["Core/Utilities.js"]
- ], function(y, N, D, U) {
- var H = U.addEvent, V = U.correctFloat, G = U.css, R = U.defined, B = U.error, S = U.pick, x = U.timeUnits, f = [], d;
- return function(T) {
- function O(t, s, n, P, _, I, W) {
- _ === void 0 && (_ = []), I === void 0 && (I = 0);
- var E = {}, X = this.options.tickPixelInterval, g = this.chart.time, m = [], L, z, $ = 0, Q = [], A = -Number.MAX_VALUE;
- if (!this.options.ordinal && !this.options.breaks || !_ || 3 > _.length || typeof s > "u")
- return g.getTimeTicks.apply(g, arguments);
- var F = _.length;
- for (L = 0; L < F; L++) {
- var Y = L && _[L - 1] > n;
- if (_[L] < s && ($ = L), L === F - 1 || _[L + 1] - _[L] > 5 * I || Y) {
- if (_[L] > A) {
- for (z = g.getTimeTicks(t, _[$], _[L], P); z.length && z[0] <= A; )
- z.shift();
- z.length && (A = z[z.length - 1]), m.push(Q.length), Q = Q.concat(z);
- }
- $ = L + 1;
- }
- if (Y)
- break;
- }
- if (z) {
- if (z = z.info, W && z.unitRange <= x.hour) {
- for (L = Q.length - 1, $ = 1; $ < L; $++)
- if (g.dateFormat("%d", Q[$]) !== g.dateFormat("%d", Q[$ - 1])) {
- E[Q[$]] = "day";
- var Z = !0;
- }
- Z && (E[Q[0]] = "day"), z.higherRanks = E;
- }
- z.segmentStarts = m, Q.info = z;
- } else
- B(12, !1, this.chart);
- if (W && R(X)) {
- for (z = Q.length, g = [], $ = [], L = void 0, Z = z; Z--; )
- m = this.translate(Q[Z]), L && ($[Z] = L - m), g[Z] = L = m;
- for ($.sort(), $ = $[Math.floor($.length / 2)], $ < 0.6 * X && ($ = null), Z = Q[z - 1] > n ? z - 1 : z, L = void 0; Z--; )
- m = g[Z], z = Math.abs(L - m), L && z < 0.8 * X && ($ === null || z < 0.8 * $) ? (E[Q[Z]] && !E[Q[Z + 1]] ? (z = Z + 1, L = m) : z = Z, Q.splice(z, 1)) : L = m;
- }
- return Q;
- }
- function j(t) {
- var s = this.ordinal.positions;
- if (!s)
- return t;
- var n = s.length - 1;
- if (0 > t)
- t = s[0];
- else if (t > n)
- t = s[n];
- else {
- n = Math.floor(t);
- var P = t - n;
- }
- return typeof P < "u" && typeof s[n] < "u" ? s[n] + (P ? P * (s[n + 1] - s[n]) : 0) : t;
- }
- function k(t) {
- var s = this.ordinal, n = s.positions;
- if (!n)
- return t;
- var P = (t - (this.old ? this.old.min : this.min)) * (this.old ? this.old.transA : this.transA) + this.minPixelPadding;
- if (0 < P && P < this.left + this.len || (s.extendedOrdinalPositions || (s.extendedOrdinalPositions = s.getExtendedPositions()), n = s.extendedOrdinalPositions), n && n.length) {
- if (t = s.getIndexOfPoint(P, n), s = V(t % 1), 0 <= t && t < n.length - 1)
- return n[Math.floor(t)] + s * (n[Math.ceil(t)] - n[Math.floor(t)]);
- s = n.length, P = n[0], n = n[s - 1];
- var _ = (n - P) / (s - 1);
- return 0 > t ? P + _ * t : n + _ * (t - s);
- }
- return t;
- }
- function b(t, s) {
- var n = T.Additions.findIndexOf(t, s, !0);
- return t[n] === s ? n : n + (s - t[n]) / (t[n + 1] - t[n]);
- }
- function w() {
- this.ordinal || (this.ordinal = new T.Additions(this));
- }
- function v() {
- this.isXAxis && R(this.options.overscroll) && this.max === this.dataMax && (!this.chart.mouseIsDown || this.isInternal) && (!this.eventArgs || this.eventArgs && this.eventArgs.trigger !== "navigator") && (this.max += this.options.overscroll, !this.isInternal && R(this.userMin) && (this.min += this.options.overscroll));
- }
- function l() {
- this.horiz && !this.isDirty && (this.isDirty = this.isOrdinal && this.chart.navigator && !this.chart.navigator.adaptToUpdatedData);
- }
- function h() {
- this.ordinal && (this.ordinal.beforeSetTickPositions(), this.tickInterval = this.ordinal.postProcessTickInterval(this.tickInterval));
- }
- function u(t) {
- var s = this.xAxis[0], n = s.options.overscroll, P = t.originalEvent.chartX, _ = this.options.chart.panning, I = !1;
- if (_ && _.type !== "y" && s.options.ordinal && s.series.length) {
- var W = this.mouseDownX, E = s.getExtremes(), X = E.dataMax, g = E.min, m = E.max, L = this.hoverPoints, z = s.closestPointRange || s.ordinal && s.ordinal.overscrollPointsRange;
- W = (W - P) / (s.translationSlope * (s.ordinal.slope || z)), z = { ordinal: { positions: s.ordinal.getExtendedPositions() } };
- var $ = s.index2val, Q = s.val2lin, A = void 0, F = A = void 0, Y = void 0;
- z.ordinal.positions ? 1 < Math.abs(W) && (L && L.forEach(function(Z) {
- Z.setState();
- }), 0 > W ? (F = z, Y = s.ordinal.positions ? s : z) : (F = s.ordinal.positions ? s : z, Y = z), A = Y.ordinal.positions, X > A[A.length - 1] && A.push(X), this.fixedRange = m - g, A = s.navigatorAxis.toFixedRange(void 0, void 0, $.apply(F, [Q.apply(F, [g, !0]) + W]), $.apply(Y, [Q.apply(Y, [m, !0]) + W])), A.min >= Math.min(
- E.dataMin,
- g
- ) && A.max <= Math.max(X, m) + n && s.setExtremes(A.min, A.max, !0, !1, { trigger: "pan" }), this.mouseDownX = P, G(this.container, { cursor: "move" })) : I = !0;
- } else
- I = !0;
- I || _ && /y/.test(_.type) ? n && (s.max = s.dataMax + n) : t.preventDefault();
- }
- function i() {
- var t = this.xAxis;
- t && t.options.ordinal && (delete t.ordinal.index, delete t.ordinal.extendedOrdinalPositions);
- }
- function c(t, s) {
- var n = this.ordinal, P = n.positions, _ = n.slope, I = n.extendedOrdinalPositions;
- if (!P)
- return t;
- var W = P.length;
- if (P[0] <= t && P[W - 1] >= t)
- t = b(P, t);
- else {
- if (I || (I = n.getExtendedPositions && n.getExtendedPositions(), n.extendedOrdinalPositions = I), !I || !I.length)
- return t;
- W = I.length, _ || (_ = (I[W - 1] - I[0]) / W), P = b(I, P[0]), t >= I[0] && t <= I[W - 1] ? t = b(I, t) - P : t < I[0] ? (t = I[0] - t, t = -P - t / _) : (t -= I[W - 1], t = t / _ + W - P);
- }
- return s ? t : _ * (t || 0) + n.offset;
- }
- T.compose = function(t, s, n) {
- if (f.indexOf(t) === -1) {
- f.push(t);
- var P = t.prototype;
- P.getTimeTicks = O, P.index2val = j, P.lin2val = k, P.val2lin = c, P.ordinal2lin = P.val2lin, H(t, "afterInit", w), H(t, "foundExtremes", v), H(t, "afterSetScale", l), H(t, "initialAxisTranslation", h);
- }
- return f.indexOf(n) === -1 && (f.push(n), H(n, "pan", u)), f.indexOf(s) === -1 && (f.push(s), H(s, "updatedData", i)), t;
- };
- var a = function() {
- function t(s) {
- this.index = {}, this.axis = s;
- }
- return t.prototype.beforeSetTickPositions = function() {
- var s = this.axis, n = s.ordinal, P = s.getExtremes(), _ = P.min, I = P.max, W = s.isXAxis && !!s.options.breaks;
- P = s.options.ordinal;
- var E = s.chart.options.chart.ignoreHiddenSeries, X, g, m = [], L = Number.MAX_VALUE, z = !1;
- if (P || W) {
- s.series.forEach(function(A, F) {
- if (X = [], !(E && A.visible === !1 || A.takeOrdinalPosition === !1 && !W) && (m = m.concat(A.processedXData), $ = m.length, m.sort(function(Y, Z) {
- return Y - Z;
- }), L = Math.min(L, S(A.closestPointRange, L)), $)) {
- for (F = 0; F < $ - 1; )
- m[F] !== m[F + 1] && X.push(m[F + 1]), F++;
- X[0] !== m[0] && X.unshift(m[0]), m = X;
- }
- });
- var $ = m.length;
- if (2 < $) {
- var Q = m[1] - m[0];
- for (g = $ - 1; g-- && !z; )
- m[g + 1] - m[g] !== Q && (z = !0);
- !s.options.keepOrdinalPadding && (m[0] - _ > Q || I - m[m.length - 1] > Q) && (z = !0);
- } else
- s.options.overscroll && ($ === 2 ? L = m[1] - m[0] : $ === 1 ? (L = s.options.overscroll, m = [m[0], m[0] + L]) : L = n.overscrollPointsRange);
- z || s.forceOrdinal ? (s.options.overscroll && (n.overscrollPointsRange = L, m = m.concat(n.getOverscrollPositions())), n.positions = m, Q = s.ordinal2lin(Math.max(_, m[0]), !0), g = Math.max(s.ordinal2lin(Math.min(I, m[m.length - 1]), !0), 1), n.slope = I = (I - _) / (g - Q), n.offset = _ - Q * I) : (n.overscrollPointsRange = S(s.closestPointRange, n.overscrollPointsRange), n.positions = s.ordinal.slope = n.offset = void 0);
- }
- s.isOrdinal = P && z, n.groupIntervalFactor = null;
- }, t.findIndexOf = function(s, n, P) {
- for (var _ = 0, I = s.length - 1, W; _ < I; )
- W = Math.ceil((_ + I) / 2), s[W] <= n ? _ = W : I = W - 1;
- return s[_] === n || P ? _ : -1;
- }, t.prototype.getExtendedPositions = function() {
- var s = this, n = s.axis, P = n.constructor.prototype, _ = n.chart, I = n.series[0].currentDataGrouping, W = I ? I.count + I.unitName : "raw", E = n.options.overscroll, X = n.getExtremes(), g = void 0, m = s.index;
- if (m || (m = s.index = {}), !m[W]) {
- var L = {
- series: [],
- chart: _,
- forceOrdinal: !1,
- getExtremes: function() {
- return { min: X.dataMin, max: X.dataMax + E };
- },
- getGroupPixelWidth: P.getGroupPixelWidth,
- getTimeTicks: P.getTimeTicks,
- options: { ordinal: !0 },
- ordinal: { getGroupIntervalFactor: this.getGroupIntervalFactor },
- ordinal2lin: P.ordinal2lin,
- getIndexOfPoint: P.getIndexOfPoint,
- val2lin: P.val2lin
- };
- L.ordinal.axis = L, n.series.forEach(function(z) {
- g = { xAxis: L, xData: z.xData.slice(), chart: _, destroyGroupedData: N.noop, getProcessedData: D.prototype.getProcessedData, applyGrouping: D.prototype.applyGrouping }, g.xData = g.xData.concat(s.getOverscrollPositions()), g.options = { dataGrouping: I ? { firstAnchor: "firstPoint", anchor: "middle", lastAnchor: "lastPoint", enabled: !0, forced: !0, approximation: "open", units: [[I.unitName, [I.count]]] } : { enabled: !1 } }, L.series.push(g), z.processData.apply(g);
- }), g.closestPointRange !== g.basePointRange && g.currentDataGrouping && (L.forceOrdinal = !0), n.ordinal.beforeSetTickPositions.apply({ axis: L }), m[W] = L.ordinal.positions;
- }
- return m[W];
- }, t.prototype.getGroupIntervalFactor = function(s, n, P) {
- P = P.processedXData;
- var _ = P.length, I = [], W = this.groupIntervalFactor;
- if (!W) {
- for (W = 0; W < _ - 1; W++)
- I[W] = P[W + 1] - P[W];
- I.sort(function(E, X) {
- return E - X;
- }), I = I[Math.floor(_ / 2)], s = Math.max(s, P[0]), n = Math.min(n, P[_ - 1]), this.groupIntervalFactor = W = _ * I / (n - s);
- }
- return W;
- }, t.prototype.getIndexOfPoint = function(s, n) {
- var P = this.axis, _ = this.positions ? this.positions[0] : 0, I = P.series[0].points && P.series[0].points[0] && P.series[0].points[0].plotX || P.minPixelPadding;
- return 1 < P.series.length && P.series.forEach(function(W) {
- W.points && R(W.points[0]) && R(W.points[0].plotX) && W.points[0].plotX < I && (I = W.points[0].plotX);
- }), s = (s - I) / (P.translationSlope * (this.slope || P.closestPointRange || this.overscrollPointsRange)), t.findIndexOf(n, _) + s;
- }, t.prototype.getOverscrollPositions = function() {
- var s = this.axis, n = s.options.overscroll, P = this.overscrollPointsRange, _ = [], I = s.dataMax;
- if (R(P))
- for (; I <= s.dataMax + n; )
- I += P, _.push(I);
- return _;
- }, t.prototype.postProcessTickInterval = function(s) {
- var n = this.axis, P = this.slope;
- return P ? n.options.breaks ? n.closestPointRange || s : s / (P / n.closestPointRange) : s;
- }, t;
- }();
- T.Additions = a;
- }(d || (d = {})), d;
- }), M(o, "Series/DataModifyComposition.js", [o["Core/Axis/Axis.js"], o["Core/Series/Point.js"], o["Core/Series/Series.js"], o["Core/Utilities.js"]], function(y, N, D, U) {
- var H = N.prototype.tooltipFormatter, V = U.addEvent, G = U.arrayMax, R = U.arrayMin, B = U.correctFloat, S = U.defined, x = U.isArray, f = U.isNumber, d = U.isString, T = U.pick, O;
- return function(j) {
- function k(s, n, P) {
- this.isXAxis || (this.series.forEach(function(_) {
- s === "compare" && typeof n != "boolean" ? _.setCompare(n, !1) : s !== "cumulative" || d(n) || _.setCumulative(n, !1);
- }), T(P, !0) && this.chart.redraw());
- }
- function b(s) {
- var n = this, P = n.series.chart.numberFormatter, _ = function(I) {
- s = s.replace("{point." + I + "}", (0 < n[I] && I === "change" ? "+" : "") + P(n[I], T(n.series.tooltipOptions.changeDecimals, 2)));
- };
- return S(n.change) && _("change"), S(n.cumulativeSum) && _("cumulativeSum"), H.apply(this, [s]);
- }
- function w() {
- var s = this.options.compare;
- if (s === "percent" || s === "value" || this.options.cumulative) {
- var n = new t(this);
- s === "percent" || s === "value" ? n.initCompare(s) : n.initCumulative();
- }
- this.dataModify = n;
- }
- function v(s) {
- s = s.dataExtremes;
- var n = s.activeYData;
- if (this.dataModify && s) {
- var P = void 0;
- this.options.compare ? P = [this.dataModify.modifyValue(s.dataMin), this.dataModify.modifyValue(s.dataMax)] : this.options.cumulative && x(n) && 2 <= n.length && (P = t.getCumulativeExtremes(n)), P && (s.dataMin = R(P), s.dataMax = G(P));
- }
- }
- function l(s, n) {
- this.options.compare = this.userOptions.compare = s, this.update({}, T(n, !0)), !this.dataModify || s !== "value" && s !== "percent" ? this.points.forEach(function(P) {
- delete P.change;
- }) : this.dataModify.initCompare(s);
- }
- function h() {
- if (this.xAxis && this.processedYData && this.dataModify) {
- var s = this.processedXData, n = this.processedYData, P = n.length, _ = this.options.compareStart === !0 ? 0 : 1, I = -1, W;
- for (this.pointArrayMap && (I = this.pointArrayMap.indexOf(this.options.pointValKey || this.pointValKey || "y")), W = 0; W < P - _; W++) {
- var E = n[W] && -1 < I ? n[W][I] : n[W];
- if (f(E) && E !== 0 && s[W + _] >= (this.xAxis.min || 0)) {
- this.dataModify.compareValue = E;
- break;
- }
- }
- }
- }
- function u(s, n) {
- this.setModifier("compare", s, n);
- }
- function i(s, n) {
- s = T(s, !1), this.options.cumulative = this.userOptions.cumulative = s, this.update({}, T(n, !0)), this.dataModify ? this.dataModify.initCumulative() : this.points.forEach(function(P) {
- delete P.cumulativeSum;
- });
- }
- function c(s, n) {
- this.setModifier("cumulative", s, n);
- }
- var a = [];
- j.compose = function(s, n, P) {
- if (a.indexOf(s) === -1) {
- a.push(s);
- var _ = s.prototype;
- _.setCompare = l, _.setCumulative = i, V(s, "afterInit", w), V(s, "afterGetExtremes", v), V(s, "afterProcessData", h);
- }
- return a.indexOf(n) === -1 && (a.push(n), n = n.prototype, n.setCompare = u, n.setModifier = k, n.setCumulative = c), a.indexOf(P) === -1 && (a.push(P), P.prototype.tooltipFormatter = b), s;
- };
- var t = function() {
- function s(n) {
- this.series = n;
- }
- return s.prototype.modifyValue = function() {
- return 0;
- }, s.getCumulativeExtremes = function(n) {
- var P = 1 / 0, _ = -1 / 0;
- return n.reduce(function(I, W) {
- return W = I + W, P = Math.min(P, W, I), _ = Math.max(
- _,
- W,
- I
- ), W;
- }), [P, _];
- }, s.prototype.initCompare = function(n) {
- this.modifyValue = function(P, _) {
- P === null && (P = 0);
- var I = this.compareValue;
- return typeof P < "u" && typeof I < "u" ? (P = n === "value" ? P - I : P / I * 100 - (this.series.options.compareBase === 100 ? 0 : 100), typeof _ < "u" && (_ = this.series.points[_]) && (_.change = P), P) : 0;
- };
- }, s.prototype.initCumulative = function() {
- this.modifyValue = function(n, P) {
- if (n === null && (n = 0), n !== void 0 && P !== void 0) {
- var _ = 0 < P ? this.series.points[P - 1] : null;
- return _ && _.cumulativeSum && (n = B(_.cumulativeSum + n)), (P = this.series.points[P]) && (P.cumulativeSum = n), n;
- }
- return 0;
- };
- }, s;
- }();
- j.Additions = t;
- }(O || (O = {})), O;
- }), M(o, "Core/Axis/BrokenAxis.js", [o["Extensions/Stacking.js"], o["Core/Utilities.js"]], function(y, N) {
- var D = N.addEvent, U = N.find, H = N.fireEvent, V = N.isArray, G = N.isNumber, R = N.pick, B;
- return function(S) {
- function x() {
- typeof this.brokenAxis < "u" && this.brokenAxis.setBreaks(this.options.breaks, !1);
- }
- function f() {
- this.brokenAxis && this.brokenAxis.hasBreaks && (this.options.ordinal = !1);
- }
- function d() {
- var l = this.brokenAxis;
- if (l && l.hasBreaks) {
- for (var h = this.tickPositions, u = this.tickPositions.info, i = [], c = 0; c < h.length; c++)
- l.isInAnyBreak(h[c]) || i.push(h[c]);
- this.tickPositions = i, this.tickPositions.info = u;
- }
- }
- function T() {
- this.brokenAxis || (this.brokenAxis = new v(this));
- }
- function O() {
- var l = this.options.connectNulls, h = this.points, u = this.xAxis, i = this.yAxis;
- if (this.isDirty)
- for (var c = h.length; c--; ) {
- var a = h[c], t = !(a.y === null && l === !1) && (u && u.brokenAxis && u.brokenAxis.isInAnyBreak(a.x, !0) || i && i.brokenAxis && i.brokenAxis.isInAnyBreak(a.y, !0));
- a.visible = t ? !1 : a.options.visible !== !1;
- }
- }
- function j() {
- this.drawBreaks(this.xAxis, ["x"]), this.drawBreaks(this.yAxis, R(this.pointArrayMap, ["y"]));
- }
- function k(l, h) {
- var u = this, i = u.points, c, a, t, s;
- if (l && l.brokenAxis && l.brokenAxis.hasBreaks) {
- var n = l.brokenAxis;
- h.forEach(function(P) {
- c = n && n.breakArray || [], a = l.isXAxis ? l.min : R(u.options.threshold, l.min), i.forEach(function(_) {
- s = R(_["stack" + P.toUpperCase()], _[P]), c.forEach(function(I) {
- G(a) && G(s) && (t = !1, a < I.from && s > I.to || a > I.from && s < I.from ? t = "pointBreak" : (a < I.from && s > I.from && s < I.to || a > I.from && s > I.to && s < I.from) && (t = "pointInBreak"), t && H(l, t, { point: _, brk: I }));
- });
- });
- });
- }
- }
- function b() {
- var l = this.currentDataGrouping, h = l && l.gapSize;
- l = this.points.slice();
- var u = this.yAxis, i = this.options.gapSize, c = l.length - 1, a;
- if (i && 0 < c)
- for (this.options.gapUnit !== "value" && (i *= this.basePointRange), h && h > i && h >= this.basePointRange && (i = h), a = void 0; c--; )
- a && a.visible !== !1 || (a = l[c + 1]), h = l[c], a.visible !== !1 && h.visible !== !1 && (a.x - h.x > i && (a = (h.x + a.x) / 2, l.splice(c + 1, 0, { isNull: !0, x: a }), u.stacking && this.options.stacking && (a = u.stacking.stacks[this.stackKey][a] = new y(u, u.options.stackLabels, !1, a, this.stack), a.total = 0)), a = h);
- return this.getGraphPath(l);
- }
- var w = [];
- S.compose = function(l, h) {
- if (w.indexOf(l) === -1 && (w.push(l), l.keepProps.push("brokenAxis"), D(l, "init", T), D(l, "afterInit", x), D(l, "afterSetTickPositions", d), D(l, "afterSetOptions", f)), w.indexOf(h) === -1) {
- w.push(h);
- var u = h.prototype;
- u.drawBreaks = k, u.gappedPath = b, D(h, "afterGeneratePoints", O), D(
- h,
- "afterRender",
- j
- );
- }
- return l;
- };
- var v = function() {
- function l(h) {
- this.hasBreaks = !1, this.axis = h;
- }
- return l.isInBreak = function(h, u) {
- var i = h.repeat || 1 / 0, c = h.from, a = h.to - h.from;
- return u = u >= c ? (u - c) % i : i - (c - u) % i, h.inclusive ? u <= a : u < a && u !== 0;
- }, l.lin2Val = function(h) {
- var u = this.brokenAxis;
- if (u = u && u.breakArray, !u || !G(h))
- return h;
- var i;
- for (i = 0; i < u.length; i++) {
- var c = u[i];
- if (c.from >= h)
- break;
- (c.to < h || l.isInBreak(c, h)) && (h += c.len);
- }
- return h;
- }, l.val2Lin = function(h) {
- var u = this.brokenAxis;
- if (u = u && u.breakArray, !u || !G(h))
- return h;
- var i = h, c;
- for (c = 0; c < u.length; c++) {
- var a = u[c];
- if (a.to <= h)
- i -= a.len;
- else {
- if (a.from >= h)
- break;
- if (l.isInBreak(a, h)) {
- i -= h - a.from;
- break;
- }
- }
- }
- return i;
- }, l.prototype.findBreakAt = function(h, u) {
- return U(u, function(i) {
- return i.from < h && h < i.to;
- });
- }, l.prototype.isInAnyBreak = function(h, u) {
- var i = this.axis, c = i.options.breaks || [], a = c.length, t;
- if (a && G(h)) {
- for (; a--; )
- if (l.isInBreak(c[a], h)) {
- var s = !0;
- t || (t = R(c[a].showPoints, !i.isXAxis));
- }
- var n = s && u ? s && !t : s;
- }
- return n;
- }, l.prototype.setBreaks = function(h, u) {
- var i = this, c = i.axis, a = V(h) && !!h.length;
- c.isDirty = i.hasBreaks !== a, i.hasBreaks = a, c.options.breaks = c.userOptions.breaks = h, c.forceRedraw = !0, c.series.forEach(function(t) {
- t.isDirty = !0;
- }), a || c.val2lin !== l.val2Lin || (delete c.val2lin, delete c.lin2val), a && (c.userOptions.ordinal = !1, c.lin2val = l.lin2Val, c.val2lin = l.val2Lin, c.setExtremes = function(t, s, n, P, _) {
- if (i.hasBreaks) {
- for (var I = this.options.breaks || [], W; W = i.findBreakAt(t, I); )
- t = W.to;
- for (; W = i.findBreakAt(s, I); )
- s = W.from;
- s < t && (s = t);
- }
- c.constructor.prototype.setExtremes.call(this, t, s, n, P, _);
- }, c.setAxisTranslation = function() {
- if (c.constructor.prototype.setAxisTranslation.call(this), i.unitLength = void 0, i.hasBreaks) {
- var t = c.options.breaks || [], s = [], n = [], P = R(c.pointRangePadding, 0), _ = 0, I, W = c.userMin || c.min, E = c.userMax || c.max, X;
- t.forEach(function(L) {
- I = L.repeat || 1 / 0, G(W) && G(E) && (l.isInBreak(L, W) && (W += L.to % I - W % I), l.isInBreak(L, E) && (E -= E % I - L.from % I));
- }), t.forEach(function(L) {
- if (m = L.from, I = L.repeat || 1 / 0, G(W) && G(E)) {
- for (; m - I > W; )
- m -= I;
- for (; m < W; )
- m += I;
- for (X = m; X < E; X += I)
- s.push({ value: X, move: "in" }), s.push({ value: X + L.to - L.from, move: "out", size: L.breakSize });
- }
- }), s.sort(function(L, z) {
- return L.value === z.value ? (L.move === "in" ? 0 : 1) - (z.move === "in" ? 0 : 1) : L.value - z.value;
- });
- var g = 0, m = W;
- s.forEach(function(L) {
- g += L.move === "in" ? 1 : -1, g === 1 && L.move === "in" && (m = L.value), g === 0 && G(m) && (n.push({ from: m, to: L.value, len: L.value - m - (L.size || 0) }), _ += L.value - m - (L.size || 0));
- }), i.breakArray = n, G(W) && G(E) && G(c.min) && (i.unitLength = E - W - _ + P, H(c, "afterBreaks"), c.staticScale ? c.transA = c.staticScale : i.unitLength && (c.transA *= (E - c.min + P) / i.unitLength), P && (c.minPixelPadding = c.transA * (c.minPointOffset || 0)), c.min = W, c.max = E);
- }
- }), R(u, !0) && c.chart.redraw();
- }, l;
- }();
- S.Additions = v;
- }(B || (B = {})), B;
- }), M(o, "masters/modules/broken-axis.src.js", [o["Core/Globals.js"], o["Core/Axis/BrokenAxis.js"]], function(y, N) {
- N.compose(y.Axis, y.Series);
- }), M(o, "Extensions/DataGrouping.js", [
- o["Core/Axis/Axis.js"],
- o["Core/Axis/DateTimeAxis.js"],
- o["Core/FormatUtilities.js"],
- o["Core/Globals.js"],
- o["Core/Series/Point.js"],
- o["Core/Series/Series.js"],
- o["Core/Tooltip.js"],
- o["Core/DefaultOptions.js"],
- o["Core/Utilities.js"]
- ], function(y, N, D, U, H, V, G, R, B) {
- var S = D.format, x = V.prototype;
- D = B.addEvent;
- var f = B.arrayMax, d = B.arrayMin, T = B.correctFloat, O = B.defined, j = B.error, k = B.extend, b = B.isNumber, w = B.merge, v = B.pick, l = U.approximations = {
- sum: function(t) {
- var s = t.length;
- if (!s && t.hasNulls)
- var n = null;
- else if (s)
- for (n = 0; s--; )
- n += t[s];
- return n;
- },
- average: function(t) {
- var s = t.length;
- return t = l.sum(t), b(t) && s && (t = T(t / s)), t;
- },
- averages: function() {
- var t = [];
- return [].forEach.call(arguments, function(s) {
- t.push(l.average(s));
- }), typeof t[0] > "u" ? void 0 : t;
- },
- open: function(t) {
- return t.length ? t[0] : t.hasNulls ? null : void 0;
- },
- high: function(t) {
- return t.length ? f(t) : t.hasNulls ? null : void 0;
- },
- low: function(t) {
- return t.length ? d(t) : t.hasNulls ? null : void 0;
- },
- close: function(t) {
- return t.length ? t[t.length - 1] : t.hasNulls ? null : void 0;
- },
- hlc: function(t, s, n) {
- if (t = l.high(t), s = l.low(s), n = l.close(n), b(t) || b(s) || b(n))
- return [t, s, n];
- },
- ohlc: function(t, s, n, P) {
- if (t = l.open(t), s = l.high(s), n = l.low(n), P = l.close(P), b(t) || b(s) || b(n) || b(P))
- return [t, s, n, P];
- },
- range: function(t, s) {
- if (t = l.low(t), s = l.high(s), b(t) || b(s))
- return [t, s];
- if (t === null && s === null)
- return null;
- }
- };
- B = function(t, s, n, P) {
- var _ = this, I = _.data, W = _.options && _.options.data, E = [], X = [], g = [], m = t.length, L = !!s, z = [], $ = _.pointArrayMap, Q = $ && $.length, A = ["x"].concat($ || ["y"]), F = this.options.dataGrouping && this.options.dataGrouping.groupAll, Y = 0, Z = 0, q;
- P = typeof P == "function" ? P : l[P] ? l[P] : l[_.getDGApproximation && _.getDGApproximation() || "average"], Q ? $.forEach(function() {
- z.push([]);
- }) : z.push([]);
- var it = Q || 1;
- for (q = 0; q <= m && !(t[q] >= n[0]); q++)
- ;
- for (q; q <= m; q++) {
- for (; typeof n[Y + 1] < "u" && t[q] >= n[Y + 1] || q === m; ) {
- var et = n[Y];
- _.dataGroupInfo = { start: F ? Z : _.cropStart + Z, length: z[0].length };
- var nt = P.apply(_, z);
- for (_.pointClass && !O(_.dataGroupInfo.options) && (_.dataGroupInfo.options = w(_.pointClass.prototype.optionsToObject.call({ series: _ }, _.options.data[_.cropStart + Z])), A.forEach(function(ct) {
- delete _.dataGroupInfo.options[ct];
- })), typeof nt < "u" && (E.push(et), X.push(nt), g.push(_.dataGroupInfo)), Z = q, et = 0; et < it; et++)
- z[et].length = 0, z[et].hasNulls = !1;
- if (Y += 1, q === m)
- break;
- }
- if (q === m)
- break;
- if ($) {
- et = _.options.dataGrouping && _.options.dataGrouping.groupAll ? q : _.cropStart + q, nt = I && I[et] || _.pointClass.prototype.applyOptions.apply({ series: _ }, [W[et]]);
- var rt = void 0;
- for (et = 0; et < Q; et++)
- rt = nt[$[et]], b(rt) ? z[et].push(rt) : rt === null && (z[et].hasNulls = !0);
- } else
- et = L ? s[q] : null, b(et) ? z[0].push(et) : et === null && (z[0].hasNulls = !0);
- }
- return { groupedXData: E, groupedYData: X, groupMap: g };
- };
- var h = { approximations: l, groupData: B }, u = x.generatePoints, i = { groupPixelWidth: 2, dateTimeLabelFormats: { millisecond: [
- "%A, %b %e, %H:%M:%S.%L",
- "%A, %b %e, %H:%M:%S.%L",
- "-%H:%M:%S.%L"
- ], second: ["%A, %b %e, %H:%M:%S", "%A, %b %e, %H:%M:%S", "-%H:%M:%S"], minute: ["%A, %b %e, %H:%M", "%A, %b %e, %H:%M", "-%H:%M"], hour: ["%A, %b %e, %H:%M", "%A, %b %e, %H:%M", "-%H:%M"], day: ["%A, %b %e, %Y", "%A, %b %e", "-%A, %b %e, %Y"], week: ["Week from %A, %b %e, %Y", "%A, %b %e", "-%A, %b %e, %Y"], month: ["%B %Y", "%B", "-%B %Y"], year: ["%Y", "%Y", "-%Y"] } }, c = {
- line: {},
- spline: {},
- area: {},
- areaspline: {},
- arearange: {},
- column: { groupPixelWidth: 10 },
- columnrange: { groupPixelWidth: 10 },
- candlestick: { groupPixelWidth: 10 },
- ohlc: { groupPixelWidth: 5 },
- hlc: { groupPixelWidth: 5 },
- heikinashi: { groupPixelWidth: 10 }
- }, a = U.defaultDataGroupingUnits = [["millisecond", [1, 2, 5, 10, 20, 25, 50, 100, 200, 500]], ["second", [1, 2, 5, 10, 15, 30]], ["minute", [1, 2, 5, 10, 15, 30]], ["hour", [1, 2, 3, 4, 6, 8, 12]], ["day", [1]], ["week", [1]], ["month", [1, 3, 6]], ["year", null]];
- return x.getDGApproximation = function() {
- return this.is("arearange") ? "range" : this.is("ohlc") ? "ohlc" : this.is("hlc") ? "hlc" : this.is("column") ? "sum" : "average";
- }, x.groupData = B, x.applyGrouping = function(t) {
- var s = this.chart, n = this.options.dataGrouping, P = this.allowDG !== !1 && n && v(n.enabled, s.options.isStock), _ = this.visible || !s.options.chart.ignoreHiddenSeries, I, W = this.currentDataGrouping, E = !1;
- if (P && !this.requireSorting && (this.requireSorting = E = !0), t = !!(this.isCartesian && !this.isDirty && !this.xAxis.isDirty && !this.yAxis.isDirty && !t) || !P, E && (this.requireSorting = !1), !t) {
- this.destroyGroupedData(), P = n.groupAll ? this.xData : this.processedXData;
- var X = n.groupAll ? this.yData : this.processedYData;
- t = s.plotSizeX, E = this.xAxis;
- var g = E.options.ordinal, m = this.groupPixelWidth;
- if (m && P && P.length) {
- this.isDirty = I = !0, this.points = null;
- var L = E.getExtremes(), z = L.min;
- L = L.max, g = g && E.ordinal && E.ordinal.getGroupIntervalFactor(z, L, this) || 1, t = E.getTimeTicks(N.Additions.prototype.normalizeTimeTickInterval(m * (L - z) / t * g, n.units || a), Math.min(z, P[0]), Math.max(L, P[P.length - 1]), E.options.startOfWeek, P, this.closestPointRange), m = x.groupData.apply(this, [P, X, t, n.approximation]), P = m.groupedXData, X = m.groupedYData, g = 0, n && n.smoothed && P.length && (n.firstAnchor = "firstPoint", n.anchor = "middle", n.lastAnchor = "lastPoint", j(32, !1, s, { "dataGrouping.smoothed": "use dataGrouping.anchor" })), s = P;
- var $ = this.options.dataGrouping;
- if (z = this.currentDataGrouping && this.currentDataGrouping.gapSize, $ && this.xData && z && this.groupMap) {
- var Q = s.length - 1, A = $.anchor, F = v($.firstAnchor, A);
- if ($ = v($.lastAnchor, A), A && A !== "start") {
- var Y = z * { middle: 0.5, end: 1 }[A];
- for (A = s.length - 1; A-- && 0 < A; )
- s[A] += Y;
- }
- if (F && F !== "start" && this.xData[0] >= s[0]) {
- A = this.groupMap[0].start, Y = this.groupMap[0].length;
- var Z = void 0;
- b(A) && b(Y) && (Z = A + (Y - 1)), s[0] = { middle: s[0] + 0.5 * z, end: s[0] + z, firstPoint: this.xData[0], lastPoint: Z && this.xData[Z] }[F];
- }
- $ && $ !== "start" && z && s[Q] >= L - z && (L = this.groupMap[this.groupMap.length - 1].start, s[Q] = { middle: s[Q] + 0.5 * z, end: s[Q] + z, firstPoint: L && this.xData[L], lastPoint: this.xData[this.xData.length - 1] }[$]);
- }
- for (L = 1; L < t.length; L++)
- t.info.segmentStarts && t.info.segmentStarts.indexOf(L) !== -1 || (g = Math.max(t[L] - t[L - 1], g));
- L = t.info, L.gapSize = g, this.closestPointRange = t.info.totalRange, this.groupMap = m.groupMap, _ && (_ = P, O(_[0]) && b(E.min) && b(E.dataMin) && _[0] < E.min && ((!O(E.options.min) && E.min <= E.dataMin || E.min === E.dataMin) && (E.min = Math.min(_[0], E.min)), E.dataMin = Math.min(_[0], E.dataMin)), O(_[_.length - 1]) && b(E.max) && b(E.dataMax) && _[_.length - 1] > E.max && ((!O(E.options.max) && b(E.dataMax) && E.max >= E.dataMax || E.max === E.dataMax) && (E.max = Math.max(_[_.length - 1], E.max)), E.dataMax = Math.max(_[_.length - 1], E.dataMax))), n.groupAll && (this.allGroupedData = X, n = this.cropData(P, X, E.min, E.max, 1), P = n.xData, X = n.yData, this.cropStart = n.start), this.processedXData = P, this.processedYData = X;
- } else
- this.groupMap = null;
- this.hasGroupedData = I, this.currentDataGrouping = L, this.preventGraphAnimation = (W && W.totalRange) !== (L && L.totalRange);
- }
- }, x.destroyGroupedData = function() {
- this.groupedData && (this.groupedData.forEach(function(t, s) {
- t && (this.groupedData[s] = t.destroy ? t.destroy() : null);
- }, this), this.groupedData.length = 0);
- }, x.generatePoints = function() {
- u.apply(this), this.destroyGroupedData(), this.groupedData = this.hasGroupedData ? this.points : null;
- }, y.prototype.applyGrouping = function(t) {
- var s = this;
- s.series.forEach(function(n) {
- n.groupPixelWidth = void 0, n.groupPixelWidth = s.getGroupPixelWidth && s.getGroupPixelWidth(), n.groupPixelWidth && (n.hasProcessed = !0), n.applyGrouping(!!t.hasExtemesChanged);
- });
- }, y.prototype.getGroupPixelWidth = function() {
- var t = this.series, s = t.length, n, P = 0, _ = !1, I;
- for (n = s; n--; )
- (I = t[n].options.dataGrouping) && (P = Math.max(P, v(I.groupPixelWidth, i.groupPixelWidth)));
- for (n = s; n--; )
- (I = t[n].options.dataGrouping) && (s = (t[n].processedXData || t[n].data).length, (t[n].groupPixelWidth || s > this.chart.plotSizeX / P || s && I.forced) && (_ = !0));
- return _ ? P : 0;
- }, y.prototype.setDataGrouping = function(t, s) {
- var n;
- if (s = v(s, !0), t || (t = { forced: !1, units: null }), this instanceof y)
- for (n = this.series.length; n--; )
- this.series[n].update({ dataGrouping: t }, !1);
- else
- this.chart.options.series.forEach(function(P) {
- P.dataGrouping = t;
- }, !1);
- this.ordinal && (this.ordinal.slope = void 0), s && this.chart.redraw();
- }, D(y, "postProcessData", y.prototype.applyGrouping), D(H, "update", function() {
- if (this.dataGroup)
- return j(
- 24,
- !1,
- this.series.chart
- ), !1;
- }), D(G, "headerFormatter", function(t) {
- var s = this.chart, n = s.time, P = t.labelConfig, _ = P.series, I = _.tooltipOptions, W = _.options.dataGrouping, E = I.xDateFormat, X = _.xAxis, g = I[t.isFooter ? "footerFormat" : "headerFormat"];
- if (X && X.options.type === "datetime" && W && b(P.key)) {
- var m = _.currentDataGrouping;
- if (W = W.dateTimeLabelFormats || i.dateTimeLabelFormats, m)
- if (I = W[m.unitName], m.count === 1)
- E = I[0];
- else {
- E = I[1];
- var L = I[2];
- }
- else
- !E && W && X.dateTime && (E = X.dateTime.getXDateFormat(P.x, I.dateTimeLabelFormats));
- E = n.dateFormat(E, P.key), L && (E += n.dateFormat(L, P.key + m.totalRange - 1)), _.chart.styledMode && (g = this.styledModeFormat(g)), t.text = S(g, { point: k(P.point, { key: E }), series: _ }, s), t.preventDefault();
- }
- }), D(V, "destroy", x.destroyGroupedData), D(V, "afterSetOptions", function(t) {
- t = t.options;
- var s = this.type, n = this.chart.options.plotOptions, P = R.defaultOptions.plotOptions[s].dataGrouping, _ = this.useCommonDataGrouping && i;
- if (n && (c[s] || _)) {
- P || (P = w(i, c[s]));
- var I = this.chart.rangeSelector;
- t.dataGrouping = w(
- _,
- P,
- n.series && n.series.dataGrouping,
- n[s].dataGrouping,
- this.userOptions.dataGrouping,
- !t.isInternal && I && b(I.selected) && I.buttonOptions[I.selected].dataGrouping
- );
- }
- }), D(y, "afterSetScale", function() {
- this.series.forEach(function(t) {
- t.hasProcessed = !1;
- });
- }), U.dataGrouping = h, h;
- }), M(o, "Series/HLC/HLCPoint.js", [o["Core/Series/SeriesRegistry.js"]], function(y) {
- var N = this && this.__extends || function() {
- var D = function(U, H) {
- return D = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(V, G) {
- V.__proto__ = G;
- } || function(V, G) {
- for (var R in G)
- G.hasOwnProperty(R) && (V[R] = G[R]);
- }, D(U, H);
- };
- return function(U, H) {
- function V() {
- this.constructor = U;
- }
- D(U, H), U.prototype = H === null ? Object.create(H) : (V.prototype = H.prototype, new V());
- };
- }();
- return function(D) {
- function U() {
- var H = D !== null && D.apply(this, arguments) || this;
- return H.close = void 0, H.high = void 0, H.low = void 0, H.options = void 0, H.plotClose = void 0, H.series = void 0, H;
- }
- return N(U, D), U;
- }(y.seriesTypes.column.prototype.pointClass);
- }), M(
- o,
- "Series/HLC/HLCSeries.js",
- [o["Series/HLC/HLCPoint.js"], o["Core/Series/SeriesRegistry.js"], o["Core/Utilities.js"]],
- function(y, N, D) {
- var U = this && this.__extends || function() {
- var R = function(B, S) {
- return R = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(x, f) {
- x.__proto__ = f;
- } || function(x, f) {
- for (var d in f)
- f.hasOwnProperty(d) && (x[d] = f[d]);
- }, R(B, S);
- };
- return function(B, S) {
- function x() {
- this.constructor = B;
- }
- R(B, S), B.prototype = S === null ? Object.create(S) : (x.prototype = S.prototype, new x());
- };
- }(), H = N.seriesTypes.column, V = D.extend, G = D.merge;
- return D = function(R) {
- function B() {
- var S = R !== null && R.apply(this, arguments) || this;
- return S.data = void 0, S.options = void 0, S.points = void 0, S.yData = void 0, S;
- }
- return U(B, R), B.prototype.extendStem = function(S, x, f) {
- var d = S[0];
- S = S[1], typeof d[2] == "number" && (d[2] = Math.max(f + x, d[2])), typeof S[2] == "number" && (S[2] = Math.min(f - x, S[2]));
- }, B.prototype.getPointPath = function(S, x) {
- x = x.strokeWidth();
- var f = S.series, d = x % 2 / 2, T = Math.round(S.plotX) - d, O = Math.round(S.shapeArgs.width / 2), j = [["M", T, Math.round(S.yBottom)], ["L", T, Math.round(S.plotHigh)]];
- return S.close !== null && (S = Math.round(S.plotClose) + d, j.push(["M", T, S], ["L", T + O, S]), f.extendStem(j, x / 2, S)), j;
- }, B.prototype.drawSinglePoint = function(S) {
- var x = S.series, f = x.chart, d = S.graphic, T = !d;
- typeof S.plotY < "u" && (d || (S.graphic = d = f.renderer.path().add(x.group)), f.styledMode || d.attr(x.pointAttribs(S, S.selected && "select")), x = x.getPointPath(S, d), d[T ? "attr" : "animate"]({ d: x }).addClass(S.getClassName(), !0));
- }, B.prototype.drawPoints = function() {
- this.points.forEach(this.drawSinglePoint);
- }, B.prototype.init = function() {
- R.prototype.init.apply(this, arguments), this.options.stacking = void 0;
- }, B.prototype.pointAttribs = function(S, x) {
- return S = R.prototype.pointAttribs.call(this, S, x), delete S.fill, S;
- }, B.prototype.toYData = function(S) {
- return [S.high, S.low, S.close];
- }, B.prototype.translate = function() {
- var S = this, x = S.yAxis, f = this.pointArrayMap && this.pointArrayMap.slice() || [], d = f.map(function(T) {
- return "plot" + (T.charAt(0).toUpperCase() + T.slice(1));
- });
- d.push("yBottom"), f.push("low"), R.prototype.translate.apply(S), S.points.forEach(function(T) {
- f.forEach(function(O, j) {
- O = T[O], O !== null && (S.dataModify && (O = S.dataModify.modifyValue(O)), T[d[j]] = x.toPixels(O, !0));
- }), T.tooltipPos[1] = T.plotHigh + x.pos - S.chart.plotTop;
- });
- }, B.defaultOptions = G(H.defaultOptions, { lineWidth: 1, tooltip: { pointFormat: '<span style="color:{point.color}">●</span> <b> {series.name}</b><br/>High: {point.high}<br/>Low: {point.low}<br/>Close: {point.close}<br/>' }, threshold: null, states: { hover: { lineWidth: 3 } }, stickyTracking: !0 }), B;
- }(H), V(D.prototype, { animate: null, directTouch: !1, pointArrayMap: ["high", "low", "close"], pointAttrToOptions: {
- stroke: "color",
- "stroke-width": "lineWidth"
- }, pointValKey: "close" }), D.prototype.pointClass = y, N.registerSeriesType("hlc", D), D;
- }
- ), M(o, "Series/OHLC/OHLCPoint.js", [o["Core/Series/SeriesRegistry.js"]], function(y) {
- var N = this && this.__extends || function() {
- var D = function(U, H) {
- return D = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(V, G) {
- V.__proto__ = G;
- } || function(V, G) {
- for (var R in G)
- G.hasOwnProperty(R) && (V[R] = G[R]);
- }, D(U, H);
- };
- return function(U, H) {
- function V() {
- this.constructor = U;
- }
- D(U, H), U.prototype = H === null ? Object.create(H) : (V.prototype = H.prototype, new V());
- };
- }();
- return function(D) {
- function U() {
- var H = D !== null && D.apply(this, arguments) || this;
- return H.open = void 0, H.options = void 0, H.plotOpen = void 0, H.series = void 0, H;
- }
- return N(U, D), U.prototype.getClassName = function() {
- return D.prototype.getClassName.call(this) + (this.open < this.close ? " highcharts-point-up" : " highcharts-point-down");
- }, U.prototype.resolveUpColor = function() {
- this.open < this.close && !this.options.color && this.series.options.upColor && (this.color = this.series.options.upColor);
- }, U.prototype.resolveColor = function() {
- D.prototype.resolveColor.call(this), this.resolveUpColor();
- }, U.prototype.getZone = function() {
- var H = D.prototype.getZone.call(this);
- return this.resolveUpColor(), H;
- }, U.prototype.applyOptions = function() {
- return D.prototype.applyOptions.apply(this, arguments), this.resolveColor && this.resolveColor(), this;
- }, U;
- }(y.seriesTypes.hlc.prototype.pointClass);
- }), M(
- o,
- "Series/OHLC/OHLCSeries.js",
- [o["Series/OHLC/OHLCPoint.js"], o["Core/Series/SeriesRegistry.js"], o["Core/Utilities.js"]],
- function(y, N, D) {
- var U = this && this.__extends || function() {
- var x = function(f, d) {
- return x = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(T, O) {
- T.__proto__ = O;
- } || function(T, O) {
- for (var j in O)
- O.hasOwnProperty(j) && (T[j] = O[j]);
- }, x(f, d);
- };
- return function(f, d) {
- function T() {
- this.constructor = f;
- }
- x(f, d), f.prototype = d === null ? Object.create(d) : (T.prototype = d.prototype, new T());
- };
- }(), H = N.series, V = N.seriesTypes.hlc, G = D.addEvent, R = D.extend, B = D.merge, S = function(x) {
- function f() {
- var d = x !== null && x.apply(this, arguments) || this;
- return d.data = void 0, d.options = void 0, d.points = void 0, d;
- }
- return U(f, x), f.prototype.getPointPath = function(d, T) {
- var O = x.prototype.getPointPath.call(this, d, T);
- T = T.strokeWidth();
- var j = T % 2 / 2, k = Math.round(d.plotX) - j, b = Math.round(d.shapeArgs.width / 2);
- return d.open !== null && (d = Math.round(d.plotOpen) + j, O.push(["M", k, d], ["L", k - b, d]), x.prototype.extendStem.call(this, O, T / 2, d)), O;
- }, f.prototype.pointAttribs = function(d, T) {
- T = x.prototype.pointAttribs.call(this, d, T);
- var O = this.options;
- return delete T.fill, !d.options.color && O.upColor && d.open < d.close && (T.stroke = O.upColor), T;
- }, f.prototype.toYData = function(d) {
- return [d.open, d.high, d.low, d.close];
- }, f.defaultOptions = B(V.defaultOptions, { tooltip: { pointFormat: '<span style="color:{point.color}">●</span> <b> {series.name}</b><br/>Open: {point.open}<br/>High: {point.high}<br/>Low: {point.low}<br/>Close: {point.close}<br/>' } }), f;
- }(V);
- return R(S.prototype, { pointArrayMap: ["open", "high", "low", "close"] }), S.prototype.pointClass = y, N.registerSeriesType("ohlc", S), G(H, "init", function(x) {
- x = x.options, x.useOhlcData && x.id !== "highcharts-navigator-series" && R(this, { pointValKey: S.prototype.pointValKey, pointArrayMap: S.prototype.pointArrayMap, toYData: S.prototype.toYData });
- }), G(H, "afterSetOptions", function(x) {
- x = x.options;
- var f = x.dataGrouping;
- f && x.useOhlcData && x.id !== "highcharts-navigator-series" && (f.approximation = "ohlc");
- }), S;
- }
- ), M(o, "Series/Candlestick/CandlestickSeries.js", [o["Core/DefaultOptions.js"], o["Core/Series/SeriesRegistry.js"], o["Core/Utilities.js"]], function(y, N, D) {
- var U = this && this.__extends || function() {
- var B = function(S, x) {
- return B = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(f, d) {
- f.__proto__ = d;
- } || function(f, d) {
- for (var T in d)
- d.hasOwnProperty(T) && (f[T] = d[T]);
- }, B(S, x);
- };
- return function(S, x) {
- function f() {
- this.constructor = S;
- }
- B(S, x), S.prototype = x === null ? Object.create(x) : (f.prototype = x.prototype, new f());
- };
- }(), H = y.defaultOptions;
- y = N.seriesTypes;
- var V = y.column, G = y.ohlc, R = D.merge;
- return D = function(B) {
- function S() {
- var x = B !== null && B.apply(this, arguments) || this;
- return x.data = void 0, x.options = void 0, x.points = void 0, x;
- }
- return U(S, B), S.prototype.pointAttribs = function(x, f) {
- var d = V.prototype.pointAttribs.call(this, x, f), T = this.options, O = x.open < x.close, j = T.lineColor || this.color, k = x.color || this.color;
- return d["stroke-width"] = T.lineWidth, d.fill = x.options.color || O && T.upColor || k, d.stroke = x.options.lineColor || O && T.upLineColor || j, f && (x = T.states[f], d.fill = x.color || d.fill, d.stroke = x.lineColor || d.stroke, d["stroke-width"] = x.lineWidth || d["stroke-width"]), d;
- }, S.prototype.drawPoints = function() {
- var x = this, f = x.chart, d = x.yAxis.reversed;
- x.points.forEach(function(T) {
- var O = T.graphic, j = !O;
- if (typeof T.plotY < "u") {
- O || (T.graphic = O = f.renderer.path().add(x.group)), x.chart.styledMode || O.attr(x.pointAttribs(T, T.selected && "select")).shadow(x.options.shadow);
- var k = O.strokeWidth() % 2 / 2, b = Math.round(T.plotX) - k, w = T.plotOpen, v = T.plotClose, l = Math.min(w, v);
- w = Math.max(w, v);
- var h = Math.round(T.shapeArgs.width / 2);
- v = d ? w !== T.yBottom : Math.round(l) !== Math.round(T.plotHigh);
- var u = d ? Math.round(l) !== Math.round(T.plotHigh) : w !== T.yBottom;
- l = Math.round(l) + k, w = Math.round(w) + k, k = [], k.push(["M", b - h, w], ["L", b - h, l], ["L", b + h, l], ["L", b + h, w], ["Z"], ["M", b, l], ["L", b, v ? Math.round(d ? T.yBottom : T.plotHigh) : l], ["M", b, w], ["L", b, u ? Math.round(d ? T.plotHigh : T.yBottom) : w]), O[j ? "attr" : "animate"]({ d: k }).addClass(T.getClassName(), !0);
- }
- });
- }, S.defaultOptions = R(G.defaultOptions, H.plotOptions, { states: { hover: { lineWidth: 2 } }, tooltip: H.plotOptions.ohlc.tooltip, threshold: null, lineColor: "#000000", lineWidth: 1, upColor: "#ffffff", stickyTracking: !0 }), S;
- }(G), N.registerSeriesType("candlestick", D), D;
- }), M(o, "Series/Flags/FlagsPoint.js", [o["Core/Series/SeriesRegistry.js"], o["Core/Utilities.js"]], function(y, N) {
- var D = this && this.__extends || function() {
- var H = function(V, G) {
- return H = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(R, B) {
- R.__proto__ = B;
- } || function(R, B) {
- for (var S in B)
- B.hasOwnProperty(S) && (R[S] = B[S]);
- }, H(V, G);
- };
- return function(V, G) {
- function R() {
- this.constructor = V;
- }
- H(V, G), V.prototype = G === null ? Object.create(G) : (R.prototype = G.prototype, new R());
- };
- }(), U = N.isNumber;
- return function(H) {
- function V() {
- var G = H !== null && H.apply(this, arguments) || this;
- return G.options = void 0, G.series = void 0, G;
- }
- return D(V, H), V.prototype.isValid = function() {
- return U(this.y) || typeof this.y > "u";
- }, V.prototype.hasNewShapeType = function() {
- var G = this.options.shape || this.series.options.shape;
- return this.graphic && G && G !== this.graphic.symbolKey;
- }, V;
- }(y.seriesTypes.column.prototype.pointClass);
- }), M(o, "Series/OnSeriesComposition.js", [
- o["Series/Column/ColumnSeries.js"],
- o["Core/Series/Series.js"],
- o["Core/Utilities.js"]
- ], function(y, N, D) {
- var U = y.prototype, H = N.prototype, V = D.defined, G = D.stableSort, R;
- return function(B) {
- function S() {
- return H.getPlotBox.call(this.options.onSeries && this.chart.get(this.options.onSeries) || this);
- }
- function x() {
- U.translate.apply(this);
- var d = this, T = d.options, O = d.chart, j = d.points, k = T.onSeries, b = (k = k && O.get(k)) && k.options.step, w = k && k.points, v = O.inverted, l = d.xAxis, h = d.yAxis;
- O = j.length - 1;
- var u;
- T = T.onKey || "y";
- var i = w && w.length, c = 0, a;
- if (k && k.visible && i) {
- c = (k.pointXOffset || 0) + (k.barW || 0) / 2;
- var t = k.currentDataGrouping, s = w[i - 1].x + (t ? t.totalRange : 0);
- for (G(j, function(_, I) {
- return _.x - I.x;
- }), T = "plot" + T[0].toUpperCase() + T.substr(1); i-- && j[O]; ) {
- var n = w[i];
- if (t = j[O], t.y = n.y, n.x <= t.x && typeof n[T] < "u") {
- if (t.x <= s && (t.plotY = n[T], n.x < t.x && !b && (a = w[i + 1]) && typeof a[T] < "u")) {
- var P = (t.x - n.x) / (a.x - n.x);
- t.plotY += P * (a[T] - n[T]), t.y += P * (a.y - n.y);
- }
- if (O--, i++, 0 > O)
- break;
- }
- }
- }
- j.forEach(function(_, I) {
- if (_.plotX += c, (typeof _.plotY > "u" || v) && (0 <= _.plotX && _.plotX <= l.len ? v ? (_.plotY = l.translate(_.x, 0, 1, 0, 1), _.plotX = V(_.y) ? h.translate(_.y, 0, 0, 0, 1) : 0) : _.plotY = (l.opposite ? 0 : d.yAxis.len) + l.offset : _.shapeArgs = {}), (u = j[I - 1]) && u.plotX === _.plotX) {
- typeof u.stackIndex > "u" && (u.stackIndex = 0);
- var W = u.stackIndex + 1;
- }
- _.stackIndex = W;
- }), this.onSeries = k;
- }
- var f = [];
- B.compose = function(d) {
- if (f.indexOf(d) === -1) {
- f.push(d);
- var T = d.prototype;
- T.getPlotBox = S, T.translate = x;
- }
- return d;
- }, B.getPlotBox = S, B.translate = x;
- }(R || (R = {})), R;
- }), M(
- o,
- "Series/Flags/FlagsSymbols.js",
- [o["Core/Renderer/RendererRegistry.js"], o["Core/Renderer/SVG/SVGRenderer.js"]],
- function(y, N) {
- function D(H) {
- U[H + "pin"] = function(V, G, R, B, S) {
- var x = S && S.anchorX;
- S = S && S.anchorY, H === "circle" && B > R && (V -= Math.round((B - R) / 2), R = B);
- var f = U[H](V, G, R, B);
- if (x && S) {
- var d = x;
- H === "circle" ? d = V + R / 2 : (V = f[0], R = f[1], V[0] === "M" && R[0] === "L" && (d = (V[1] + R[1]) / 2)), f.push(["M", d, G > S ? G : G + B], ["L", x, S]), f = f.concat(U.circle(x - 1, S - 1, 2, 2));
- }
- return f;
- };
- }
- var U = N.prototype.symbols;
- return U.flag = function(H, V, G, R, B) {
- var S = B && B.anchorX || H;
- B = B && B.anchorY || V;
- var x = U.circle(S - 1, B - 1, 2, 2);
- return x.push(["M", S, B], ["L", H, V + R], ["L", H, V], ["L", H + G, V], ["L", H + G, V + R], ["L", H, V + R], ["Z"]), x;
- }, D("circle"), D("square"), y = y.getRendererType(), y !== N && (y.prototype.symbols.circlepin = U.circlepin, y.prototype.symbols.flag = U.flag, y.prototype.symbols.squarepin = U.squarepin), U;
- }
- ), M(o, "Series/Flags/FlagsSeries.js", [
- o["Series/Flags/FlagsPoint.js"],
- o["Core/Globals.js"],
- o["Series/OnSeriesComposition.js"],
- o["Core/Renderer/RendererUtilities.js"],
- o["Core/Series/SeriesRegistry.js"],
- o["Core/Renderer/SVG/SVGElement.js"],
- o["Core/Utilities.js"]
- ], function(y, N, D, U, H, V, G) {
- var R = this && this.__extends || function() {
- var k = function(b, w) {
- return k = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(v, l) {
- v.__proto__ = l;
- } || function(v, l) {
- for (var h in l)
- l.hasOwnProperty(h) && (v[h] = l[h]);
- }, k(b, w);
- };
- return function(b, w) {
- function v() {
- this.constructor = b;
- }
- k(b, w), b.prototype = w === null ? Object.create(w) : (v.prototype = w.prototype, new v());
- };
- }();
- N = N.noop;
- var B = U.distribute, S = H.series, x = H.seriesTypes.column, f = G.addEvent, d = G.defined;
- U = G.extend;
- var T = G.merge, O = G.objectEach, j = G.wrap;
- return G = function(k) {
- function b() {
- var w = k !== null && k.apply(this, arguments) || this;
- return w.data = void 0, w.options = void 0, w.points = void 0, w;
- }
- return R(b, k), b.prototype.animate = function(w) {
- w && this.setClip();
- }, b.prototype.drawPoints = function() {
- var w = this.points, v = this.chart, l = v.renderer, h = v.inverted, u = this.options, i = u.y, c, a = this.yAxis, t = {}, s = [];
- for (c = w.length; c--; ) {
- var n = w[c], P = (h ? n.plotY : n.plotX) > this.xAxis.len, _ = n.plotX, I = n.stackIndex, W = n.options.shape || u.shape, E = n.plotY;
- typeof E < "u" && (E = n.plotY + i - (typeof I < "u" && I * u.stackDistance)), n.anchorX = I ? void 0 : n.plotX;
- var X = I ? void 0 : n.plotY, g = W !== "flag";
- I = n.graphic, typeof E < "u" && 0 <= _ && !P ? (I && n.hasNewShapeType() && (I = I.destroy()), I || (I = n.graphic = l.label("", null, null, W, null, null, u.useHTML).addClass("highcharts-point").add(this.markerGroup), n.graphic.div && (n.graphic.div.point = n), I.isNew = !0), I.attr({
- align: g ? "center" : "left",
- width: u.width,
- height: u.height,
- "text-align": u.textAlign
- }), v.styledMode || I.attr(this.pointAttribs(n)).css(T(u.style, n.style)).shadow(u.shadow), 0 < _ && (_ -= I.strokeWidth() % 2), W = { y: E, anchorY: X }, u.allowOverlapX && (W.x = _, W.anchorX = n.anchorX), I.attr({ text: n.options.title || u.title || "A" })[I.isNew ? "attr" : "animate"](W), u.allowOverlapX || (t[n.plotX] ? t[n.plotX].size = Math.max(t[n.plotX].size, I.width) : t[n.plotX] = { align: g ? 0.5 : 0, size: I.width, target: _, anchorX: _ }), n.tooltipPos = [_, E + a.pos - v.plotTop]) : I && (n.graphic = I.destroy());
- }
- if (!u.allowOverlapX) {
- var m = 100;
- O(t, function(L) {
- L.plotX = L.anchorX, s.push(L), m = Math.max(L.size, m);
- }), B(s, h ? a.len : this.xAxis.len, m), w.forEach(function(L) {
- var z = L.graphic && t[L.plotX];
- z && (L.graphic[L.graphic.isNew ? "attr" : "animate"]({ x: z.pos + z.align * z.size, anchorX: L.anchorX }), d(z.pos) ? L.graphic.isNew = !1 : (L.graphic.attr({ x: -9999, anchorX: -9999 }), L.graphic.isNew = !0));
- });
- }
- u.useHTML && j(this.markerGroup, "on", function(L) {
- return V.prototype.on.apply(L.apply(this, [].slice.call(arguments, 1)), [].slice.call(arguments, 1));
- });
- }, b.prototype.drawTracker = function() {
- var w = this.points;
- k.prototype.drawTracker.call(this), w.forEach(function(v) {
- var l = v.graphic;
- l && (v.unbindMouseOver && v.unbindMouseOver(), v.unbindMouseOver = f(l.element, "mouseover", function() {
- 0 < v.stackIndex && !v.raised && (v._y = l.y, l.attr({ y: v._y - 8 }), v.raised = !0), w.forEach(function(h) {
- h !== v && h.raised && h.graphic && (h.graphic.attr({ y: h._y }), h.raised = !1);
- });
- }));
- });
- }, b.prototype.pointAttribs = function(w, v) {
- var l = this.options, h = w && w.color || this.color, u = l.lineColor, i = w && w.lineWidth;
- return w = w && w.fillColor || l.fillColor, v && (w = l.states[v].fillColor, u = l.states[v].lineColor, i = l.states[v].lineWidth), { fill: w || h, stroke: u || h, "stroke-width": i || l.lineWidth || 0 };
- }, b.prototype.setClip = function() {
- S.prototype.setClip.apply(this, arguments), this.options.clip !== !1 && this.sharedClipKey && this.markerGroup && this.markerGroup.clip(this.chart.sharedClips[this.sharedClipKey]);
- }, b.defaultOptions = T(x.defaultOptions, {
- pointRange: 0,
- allowOverlapX: !1,
- shape: "flag",
- stackDistance: 12,
- textAlign: "center",
- tooltip: { pointFormat: "{point.text}" },
- threshold: null,
- y: -30,
- fillColor: "#ffffff",
- lineWidth: 1,
- states: { hover: { lineColor: "#000000", fillColor: "#ccd6eb" } },
- style: { fontSize: "11px", fontWeight: "bold" }
- }), b;
- }(x), D.compose(G), U(G.prototype, { allowDG: !1, forceCrop: !0, invertible: !1, noSharedTooltip: !0, pointClass: y, sorted: !1, takeOrdinalPosition: !1, trackerGroups: ["markerGroup"], buildKDTree: N, init: S.prototype.init, invertGroups: N }), H.registerSeriesType("flags", G), G;
- }), M(o, "Core/Axis/ScrollbarAxis.js", [o["Core/Utilities.js"]], function(y) {
- var N = y.addEvent, D = y.defined, U = y.pick;
- return function() {
- function H() {
- }
- return H.compose = function(V, G) {
- if (H.composed.indexOf(V) === -1)
- H.composed.push(V);
- else
- return V;
- var R = function(B) {
- var S = U(B.options && B.options.min, B.min), x = U(B.options && B.options.max, B.max);
- return { axisMin: S, axisMax: x, scrollMin: D(B.dataMin) ? Math.min(S, B.min, B.dataMin, U(B.threshold, 1 / 0)) : S, scrollMax: D(B.dataMax) ? Math.max(x, B.max, B.dataMax, U(B.threshold, -1 / 0)) : x };
- };
- return N(V, "afterInit", function() {
- var B = this;
- B.options && B.options.scrollbar && B.options.scrollbar.enabled && (B.options.scrollbar.vertical = !B.horiz, B.options.startOnTick = B.options.endOnTick = !1, B.scrollbar = new G(B.chart.renderer, B.options.scrollbar, B.chart), N(B.scrollbar, "changed", function(S) {
- var x = R(B), f = x.axisMax, d = x.scrollMin, T = x.scrollMax - d;
- D(x.axisMin) && D(f) && (B.horiz && !B.reversed || !B.horiz && B.reversed ? (x = d + T * this.to, d += T * this.from) : (x = d + T * (1 - this.from), d += T * (1 - this.to)), this.shouldUpdateExtremes(S.DOMType) ? B.setExtremes(d, x, !0, S.DOMType !== "mousemove" && S.DOMType !== "touchmove", S) : this.setRange(
- this.from,
- this.to
- ));
- }));
- }), N(V, "afterRender", function() {
- var B = R(this), S = B.scrollMin, x = B.scrollMax;
- B = this.scrollbar;
- var f = this.axisTitleMargin + (this.titleOffset || 0), d = this.chart.scrollbarsOffsets, T = this.options.margin || 0;
- B && (this.horiz ? (this.opposite || (d[1] += f), B.position(this.left, this.top + this.height + 2 + d[1] - (this.opposite ? T : 0), this.width, this.height), this.opposite || (d[1] += T), f = 1) : (this.opposite && (d[0] += f), B.position(
- B.options.opposite ? this.left + this.width + 2 + d[0] - (this.opposite ? 0 : T) : this.opposite ? 0 : T,
- this.top,
- this.width,
- this.height
- ), this.opposite && (d[0] += T), f = 0), d[f] += B.size + B.options.margin, isNaN(S) || isNaN(x) || !D(this.min) || !D(this.max) || this.min === this.max ? B.setRange(0, 1) : (d = (this.min - S) / (x - S), S = (this.max - S) / (x - S), this.horiz && !this.reversed || !this.horiz && this.reversed ? B.setRange(d, S) : B.setRange(1 - S, 1 - d)));
- }), N(V, "afterGetOffset", function() {
- var B = this.scrollbar && !this.scrollbar.options.opposite;
- B = this.horiz ? 2 : B ? 3 : 1;
- var S = this.scrollbar;
- S && (this.chart.scrollbarsOffsets = [0, 0], this.chart.axisOffset[B] += S.size + S.options.margin);
- }), V;
- }, H.composed = [], H;
- }();
- }), M(o, "Core/ScrollbarDefaults.js", [o["Core/Globals.js"]], function(y) {
- return {
- height: y.isTouchDevice ? 20 : 14,
- barBorderRadius: 0,
- buttonBorderRadius: 0,
- liveRedraw: void 0,
- margin: 10,
- minWidth: 6,
- opposite: !0,
- step: 0.2,
- zIndex: 3,
- barBackgroundColor: "#cccccc",
- barBorderWidth: 1,
- barBorderColor: "#cccccc",
- buttonArrowColor: "#333333",
- buttonBackgroundColor: "#e6e6e6",
- buttonBorderColor: "#cccccc",
- buttonBorderWidth: 1,
- rifleColor: "#333333",
- trackBackgroundColor: "#f2f2f2",
- trackBorderColor: "#f2f2f2",
- trackBorderWidth: 1
- };
- }), M(o, "Core/Scrollbar.js", [o["Core/DefaultOptions.js"], o["Core/Globals.js"], o["Core/Axis/ScrollbarAxis.js"], o["Core/ScrollbarDefaults.js"], o["Core/Utilities.js"]], function(y, N, D, U, H) {
- var V = y.defaultOptions, G = H.addEvent, R = H.correctFloat, B = H.defined, S = H.destroyObjectProperties, x = H.fireEvent, f = H.merge, d = H.pick, T = H.removeEvent;
- return y = function() {
- function O(j, k, b) {
- this._events = [], this.chart = void 0, this.from = this.chartY = this.chartX = 0, this.scrollbar = this.renderer = this.options = this.group = void 0, this.scrollbarButtons = [], this.scrollbarGroup = void 0, this.scrollbarLeft = 0, this.scrollbarRifles = void 0, this.scrollbarStrokeWidth = 1, this.to = this.size = this.scrollbarTop = 0, this.track = void 0, this.trackBorderWidth = 1, this.userOptions = void 0, this.y = this.x = 0, this.init(j, k, b);
- }
- return O.compose = function(j) {
- D.compose(j, O);
- }, O.swapXY = function(j, k) {
- return k && j.forEach(function(b) {
- for (var w = b.length, v, l = 0; l < w; l += 2)
- v = b[l + 1], typeof v == "number" && (b[l + 1] = b[l + 2], b[l + 2] = v);
- }), j;
- }, O.prototype.addEvents = function() {
- var j = this.options.inverted ? [1, 0] : [0, 1], k = this.scrollbarButtons, b = this.scrollbarGroup.element, w = this.track.element, v = this.mouseDownHandler.bind(this), l = this.mouseMoveHandler.bind(this), h = this.mouseUpHandler.bind(this);
- j = [[k[j[0]].element, "click", this.buttonToMinClick.bind(this)], [k[j[1]].element, "click", this.buttonToMaxClick.bind(this)], [w, "click", this.trackClick.bind(this)], [b, "mousedown", v], [b.ownerDocument, "mousemove", l], [b.ownerDocument, "mouseup", h]], N.hasTouch && j.push(
- [b, "touchstart", v],
- [b.ownerDocument, "touchmove", l],
- [b.ownerDocument, "touchend", h]
- ), j.forEach(function(u) {
- G.apply(null, u);
- }), this._events = j;
- }, O.prototype.buttonToMaxClick = function(j) {
- var k = (this.to - this.from) * d(this.options.step, 0.2);
- this.updatePosition(this.from + k, this.to + k), x(this, "changed", { from: this.from, to: this.to, trigger: "scrollbar", DOMEvent: j });
- }, O.prototype.buttonToMinClick = function(j) {
- var k = R(this.to - this.from) * d(this.options.step, 0.2);
- this.updatePosition(R(this.from - k), R(this.to - k)), x(this, "changed", {
- from: this.from,
- to: this.to,
- trigger: "scrollbar",
- DOMEvent: j
- });
- }, O.prototype.cursorToScrollbarPosition = function(j) {
- var k = this.options;
- return k = k.minWidth > this.calculatedWidth ? k.minWidth : 0, { chartX: (j.chartX - this.x - this.xOffset) / (this.barWidth - k), chartY: (j.chartY - this.y - this.yOffset) / (this.barWidth - k) };
- }, O.prototype.destroy = function() {
- var j = this, k = j.chart.scroller;
- j.removeEvents(), ["track", "scrollbarRifles", "scrollbar", "scrollbarGroup", "group"].forEach(function(b) {
- j[b] && j[b].destroy && (j[b] = j[b].destroy());
- }), k && j === k.scrollbar && (k.scrollbar = null, S(k.scrollbarButtons));
- }, O.prototype.drawScrollbarButton = function(j) {
- var k = this.renderer, b = this.scrollbarButtons, w = this.options, v = this.size, l = k.g().add(this.group);
- b.push(l), l = k.rect().addClass("highcharts-scrollbar-button").add(l), this.chart.styledMode || l.attr({ stroke: w.buttonBorderColor, "stroke-width": w.buttonBorderWidth, fill: w.buttonBackgroundColor }), l.attr(l.crisp({ x: -0.5, y: -0.5, width: v + 1, height: v + 1, r: w.buttonBorderRadius }, l.strokeWidth())), l = k.path(O.swapXY([["M", v / 2 + (j ? -1 : 1), v / 2 - 3], ["L", v / 2 + (j ? -1 : 1), v / 2 + 3], ["L", v / 2 + (j ? 2 : -2), v / 2]], w.vertical)).addClass("highcharts-scrollbar-arrow").add(b[j]), this.chart.styledMode || l.attr({ fill: w.buttonArrowColor });
- }, O.prototype.init = function(j, k, b) {
- this.scrollbarButtons = [], this.renderer = j, this.userOptions = k, this.options = f(U, V.scrollbar, k), this.chart = b, this.size = d(this.options.size, this.options.height), k.enabled && (this.render(), this.addEvents());
- }, O.prototype.mouseDownHandler = function(j) {
- j = this.chart.pointer.normalize(j), j = this.cursorToScrollbarPosition(j), this.chartX = j.chartX, this.chartY = j.chartY, this.initPositions = [this.from, this.to], this.grabbedCenter = !0;
- }, O.prototype.mouseMoveHandler = function(j) {
- var k = this.chart.pointer.normalize(j), b = this.options.vertical ? "chartY" : "chartX", w = this.initPositions || [];
- !this.grabbedCenter || j.touches && j.touches[0][b] === 0 || (k = this.cursorToScrollbarPosition(k)[b], b = this[b], b = k - b, this.hasDragged = !0, this.updatePosition(w[0] + b, w[1] + b), this.hasDragged && x(this, "changed", { from: this.from, to: this.to, trigger: "scrollbar", DOMType: j.type, DOMEvent: j }));
- }, O.prototype.mouseUpHandler = function(j) {
- this.hasDragged && x(this, "changed", { from: this.from, to: this.to, trigger: "scrollbar", DOMType: j.type, DOMEvent: j }), this.grabbedCenter = this.hasDragged = this.chartX = this.chartY = null;
- }, O.prototype.position = function(j, k, b, w) {
- var v = this.options.vertical, l = this.rendered ? "animate" : "attr", h = 0;
- this.x = j, this.y = k + this.trackBorderWidth, this.width = b, this.xOffset = this.height = w, this.yOffset = h, v ? (this.width = this.yOffset = b = h = this.size, this.xOffset = k = 0, this.barWidth = w - 2 * b, this.x = j += this.options.margin) : (this.height = this.xOffset = w = k = this.size, this.barWidth = b - 2 * w, this.y += this.options.margin), this.group[l]({ translateX: j, translateY: this.y }), this.track[l]({ width: b, height: w }), this.scrollbarButtons[1][l]({ translateX: v ? 0 : b - k, translateY: v ? w - h : 0 });
- }, O.prototype.removeEvents = function() {
- this._events.forEach(function(j) {
- T.apply(null, j);
- }), this._events.length = 0;
- }, O.prototype.render = function() {
- var j = this.renderer, k = this.options, b = this.size, w = this.chart.styledMode, v = j.g("scrollbar").attr({ zIndex: k.zIndex, translateY: -99999 }).add();
- this.group = v, this.track = j.rect().addClass("highcharts-scrollbar-track").attr({ x: 0, r: k.trackBorderRadius || 0, height: b, width: b }).add(v), w || this.track.attr({ fill: k.trackBackgroundColor, stroke: k.trackBorderColor, "stroke-width": k.trackBorderWidth }), this.trackBorderWidth = this.track.strokeWidth(), this.track.attr({ y: -this.trackBorderWidth % 2 / 2 }), this.scrollbarGroup = j.g().add(v), this.scrollbar = j.rect().addClass("highcharts-scrollbar-thumb").attr({ height: b, width: b, r: k.barBorderRadius || 0 }).add(this.scrollbarGroup), this.scrollbarRifles = j.path(O.swapXY([["M", -3, b / 4], ["L", -3, 2 * b / 3], ["M", 0, b / 4], ["L", 0, 2 * b / 3], ["M", 3, b / 4], ["L", 3, 2 * b / 3]], k.vertical)).addClass("highcharts-scrollbar-rifles").add(this.scrollbarGroup), w || (this.scrollbar.attr({ fill: k.barBackgroundColor, stroke: k.barBorderColor, "stroke-width": k.barBorderWidth }), this.scrollbarRifles.attr({ stroke: k.rifleColor, "stroke-width": 1 })), this.scrollbarStrokeWidth = this.scrollbar.strokeWidth(), this.scrollbarGroup.translate(-this.scrollbarStrokeWidth % 2 / 2, -this.scrollbarStrokeWidth % 2 / 2), this.drawScrollbarButton(0), this.drawScrollbarButton(1);
- }, O.prototype.setRange = function(j, k) {
- var b = this.options, w = b.vertical, v = b.minWidth, l = this.barWidth, h = !this.rendered || this.hasDragged || this.chart.navigator && this.chart.navigator.hasDragged ? "attr" : "animate";
- if (B(l)) {
- var u = l * Math.min(k, 1);
- j = Math.max(j, 0);
- var i = Math.ceil(l * j);
- this.calculatedWidth = u = R(u - i), u < v && (i = (l - v + u) * j, u = v), v = Math.floor(i + this.xOffset + this.yOffset), l = u / 2 - 0.5, this.from = j, this.to = k, w ? (this.scrollbarGroup[h]({ translateY: v }), this.scrollbar[h]({ height: u }), this.scrollbarRifles[h]({ translateY: l }), this.scrollbarTop = v, this.scrollbarLeft = 0) : (this.scrollbarGroup[h]({ translateX: v }), this.scrollbar[h]({ width: u }), this.scrollbarRifles[h]({ translateX: l }), this.scrollbarLeft = v, this.scrollbarTop = 0), 12 >= u ? this.scrollbarRifles.hide() : this.scrollbarRifles.show(!0), b.showFull === !1 && (0 >= j && 1 <= k ? this.group.hide() : this.group.show()), this.rendered = !0;
- }
- }, O.prototype.shouldUpdateExtremes = function(j) {
- return d(this.options.liveRedraw, N.svg && !N.isTouchDevice && !this.chart.isBoosting) || j === "mouseup" || j === "touchend" || !B(j);
- }, O.prototype.trackClick = function(j) {
- var k = this.chart.pointer.normalize(j), b = this.to - this.from, w = this.y + this.scrollbarTop, v = this.x + this.scrollbarLeft;
- this.options.vertical && k.chartY > w || !this.options.vertical && k.chartX > v ? this.updatePosition(this.from + b, this.to + b) : this.updatePosition(this.from - b, this.to - b), x(this, "changed", { from: this.from, to: this.to, trigger: "scrollbar", DOMEvent: j });
- }, O.prototype.update = function(j) {
- this.destroy(), this.init(this.chart.renderer, f(
- !0,
- this.options,
- j
- ), this.chart);
- }, O.prototype.updatePosition = function(j, k) {
- 1 < k && (j = R(1 - R(k - j)), k = 1), 0 > j && (k = R(k - j), j = 0), this.from = j, this.to = k;
- }, O.defaultOptions = U, O;
- }(), V.scrollbar = f(!0, y.defaultOptions, V.scrollbar), y;
- }), M(o, "Core/Axis/NavigatorAxis.js", [o["Core/Globals.js"], o["Core/Utilities.js"]], function(y, N) {
- var D = y.isTouchDevice, U = N.addEvent, H = N.correctFloat, V = N.defined, G = N.isNumber, R = N.pick, B = function() {
- function S(x) {
- this.axis = x;
- }
- return S.prototype.destroy = function() {
- this.axis = void 0;
- }, S.prototype.toFixedRange = function(x, f, d, T) {
- var O = this.axis, j = O.chart;
- j = j && j.fixedRange;
- var k = (O.pointRange || 0) / 2;
- return x = R(d, O.translate(x, !0, !O.horiz)), f = R(T, O.translate(f, !0, !O.horiz)), O = j && (f - x) / j, V(d) || (x = H(x + k)), V(T) || (f = H(f - k)), 0.7 < O && 1.3 > O && (T ? x = f - j : f = x + j), G(x) && G(f) || (x = f = void 0), { min: x, max: f };
- }, S;
- }();
- return function() {
- function S() {
- }
- return S.compose = function(x) {
- x.keepProps.push("navigatorAxis"), U(x, "init", function() {
- this.navigatorAxis || (this.navigatorAxis = new B(this));
- }), U(x, "zoom", function(f) {
- var d = this.chart.options, T = d.navigator, O = this.navigatorAxis, j = d.chart.pinchType, k = d.rangeSelector;
- d = d.chart.zoomType, this.isXAxis && (T && T.enabled || k && k.enabled) && (d === "y" ? f.zoomed = !1 : (!D && d === "xy" || D && j === "xy") && this.options.range && (T = O.previousZoom, V(f.newMin) ? O.previousZoom = [this.min, this.max] : T && (f.newMin = T[0], f.newMax = T[1], O.previousZoom = void 0))), typeof f.zoomed < "u" && f.preventDefault();
- });
- }, S.AdditionsClass = B, S;
- }();
- }), M(o, "Core/Navigator.js", [
- o["Core/Axis/Axis.js"],
- o["Core/Chart/Chart.js"],
- o["Core/Color/Color.js"],
- o["Core/Globals.js"],
- o["Core/Axis/NavigatorAxis.js"],
- o["Core/DefaultOptions.js"],
- o["Core/Renderer/RendererRegistry.js"],
- o["Core/Scrollbar.js"],
- o["Core/Series/Series.js"],
- o["Core/Series/SeriesRegistry.js"],
- o["Core/Utilities.js"]
- ], function(y, N, D, U, H, V, G, R, B, S, x) {
- D = D.parse;
- var f = U.hasTouch, d = U.isTouchDevice, T = V.defaultOptions, O = x.addEvent, j = x.clamp, k = x.correctFloat, b = x.defined, w = x.destroyObjectProperties, v = x.erase, l = x.extend, h = x.find, u = x.isArray, i = x.isNumber, c = x.merge, a = x.pick, t = x.removeEvent, s = x.splat, n = function(_) {
- for (var I = [], W = 1; W < arguments.length; W++)
- I[W - 1] = arguments[W];
- if (I = [].filter.call(I, i), I.length)
- return Math[_].apply(0, I);
- };
- V = typeof S.seriesTypes.areaspline > "u" ? "line" : "areaspline", l(T, { navigator: { height: 40, margin: 25, maskInside: !0, handles: { width: 7, height: 15, symbols: ["navigator-handle", "navigator-handle"], enabled: !0, lineWidth: 1, backgroundColor: "#f2f2f2", borderColor: "#999999" }, maskFill: D("#6685c2").setOpacity(0.3).get(), outlineColor: "#cccccc", outlineWidth: 1, series: {
- type: V,
- fillOpacity: 0.05,
- lineWidth: 1,
- compare: null,
- dataGrouping: { approximation: "average", enabled: !0, groupPixelWidth: 2, firstAnchor: "firstPoint", anchor: "middle", lastAnchor: "lastPoint", units: [["millisecond", [1, 2, 5, 10, 20, 25, 50, 100, 200, 500]], ["second", [1, 2, 5, 10, 15, 30]], ["minute", [1, 2, 5, 10, 15, 30]], ["hour", [1, 2, 3, 4, 6, 8, 12]], ["day", [1, 2, 3, 4]], ["week", [1, 2, 3]], ["month", [1, 3, 6]], ["year", null]] },
- dataLabels: { enabled: !1, zIndex: 2 },
- id: "highcharts-navigator-series",
- className: "highcharts-navigator-series",
- lineColor: null,
- marker: { enabled: !1 },
- threshold: null
- }, xAxis: { overscroll: 0, className: "highcharts-navigator-xaxis", tickLength: 0, lineWidth: 0, gridLineColor: "#e6e6e6", gridLineWidth: 1, tickPixelInterval: 200, labels: { align: "left", style: { color: "#999999" }, x: 3, y: -4 }, crosshair: !1 }, yAxis: { className: "highcharts-navigator-yaxis", gridLineWidth: 0, startOnTick: !1, endOnTick: !1, minPadding: 0.1, maxPadding: 0.1, labels: { enabled: !1 }, crosshair: !1, title: { text: null }, tickLength: 0, tickWidth: 0 } } }), G.getRendererType().prototype.symbols["navigator-handle"] = function(_, I, W, E, X) {
- return _ = (X && X.width || 0) / 2, I = Math.round(_ / 3) + 0.5, X = X && X.height || 0, [["M", -_ - 1, 0.5], ["L", _, 0.5], ["L", _, X + 0.5], ["L", -_ - 1, X + 0.5], ["L", -_ - 1, 0.5], ["M", -I, 4], ["L", -I, X - 3], ["M", I - 1, 4], ["L", I - 1, X - 3]];
- };
- var P = function() {
- function _(I) {
- this.zoomedMin = this.zoomedMax = this.yAxis = this.xAxis = this.top = this.size = this.shades = this.rendered = this.range = this.outlineHeight = this.outline = this.opposite = this.navigatorSize = this.navigatorSeries = this.navigatorOptions = this.navigatorGroup = this.navigatorEnabled = this.left = this.height = this.handles = this.chart = this.baseSeries = void 0, this.init(I);
- }
- return _.prototype.drawHandle = function(I, W, E, X) {
- var g = this.navigatorOptions.handles.height;
- this.handles[W][X](E ? { translateX: Math.round(this.left + this.height / 2), translateY: Math.round(this.top + parseInt(I, 10) + 0.5 - g) } : { translateX: Math.round(this.left + parseInt(I, 10)), translateY: Math.round(this.top + this.height / 2 - g / 2 - 1) });
- }, _.prototype.drawOutline = function(I, W, E, X) {
- var g = this.navigatorOptions.maskInside, m = this.outline.strokeWidth(), L = m / 2, z = m % 2 / 2;
- m = this.outlineHeight;
- var $ = this.scrollbarHeight || 0, Q = this.size, A = this.left - $, F = this.top;
- E ? (A -= L, E = F + W + z, W = F + I + z, z = [["M", A + m, F - $ - z], ["L", A + m, E], ["L", A, E], ["L", A, W], ["L", A + m, W], ["L", A + m, F + Q + $]], g && z.push(["M", A + m, E - L], ["L", A + m, W + L])) : (I += A + $ - z, W += A + $ - z, F += L, z = [["M", A, F], ["L", I, F], ["L", I, F + m], ["L", W, F + m], ["L", W, F], ["L", A + Q + 2 * $, F]], g && z.push(["M", I - L, F], ["L", W + L, F])), this.outline[X]({ d: z });
- }, _.prototype.drawMasks = function(I, W, E, X) {
- var g = this.left, m = this.top, L = this.height;
- if (E)
- var z = [g, g, g], $ = [m, m + I, m + W], Q = [L, L, L], A = [I, W - I, this.size - W];
- else
- z = [g, g + I, g + W], $ = [m, m, m], Q = [I, W - I, this.size - W], A = [L, L, L];
- this.shades.forEach(function(F, Y) {
- F[X]({ x: z[Y], y: $[Y], width: Q[Y], height: A[Y] });
- });
- }, _.prototype.renderElements = function() {
- var I = this, W = I.navigatorOptions, E = W.maskInside, X = I.chart, g = X.renderer, m, L = { cursor: X.inverted ? "ns-resize" : "ew-resize" };
- I.navigatorGroup = m = g.g("navigator").attr({ zIndex: 8, visibility: "hidden" }).add(), [!E, E, !E].forEach(function(z, $) {
- I.shades[$] = g.rect().addClass("highcharts-navigator-mask" + ($ === 1 ? "-inside" : "-outside")).add(m), X.styledMode || I.shades[$].attr({ fill: z ? W.maskFill : "rgba(0,0,0,0)" }).css($ === 1 && L);
- }), I.outline = g.path().addClass("highcharts-navigator-outline").add(m), X.styledMode || I.outline.attr({ "stroke-width": W.outlineWidth, stroke: W.outlineColor }), W.handles.enabled && [0, 1].forEach(function(z) {
- if (W.handles.inverted = X.inverted, I.handles[z] = g.symbol(W.handles.symbols[z], -W.handles.width / 2 - 1, 0, W.handles.width, W.handles.height, W.handles), I.handles[z].attr({ zIndex: 7 - z }).addClass("highcharts-navigator-handle highcharts-navigator-handle-" + ["left", "right"][z]).add(m), !X.styledMode) {
- var $ = W.handles;
- I.handles[z].attr({ fill: $.backgroundColor, stroke: $.borderColor, "stroke-width": $.lineWidth }).css(L);
- }
- });
- }, _.prototype.update = function(I) {
- (this.series || []).forEach(function(W) {
- W.baseSeries && delete W.baseSeries.navigatorSeries;
- }), this.destroy(), c(!0, this.chart.options.navigator, this.options, I), this.init(this.chart);
- }, _.prototype.render = function(I, W, E, X) {
- var g = this.chart, m = this.scrollbarHeight, L, z = this.xAxis, $ = z.pointRange || 0, Q = z.navigatorAxis.fake ? g.xAxis[0] : z, A = this.navigatorEnabled, F, Y = this.rendered, Z = g.inverted, q = g.xAxis[0].minRange, it = g.xAxis[0].options.maxRange;
- if (!this.hasDragged || b(E)) {
- if (I = k(I - $ / 2), W = k(W + $ / 2), !i(I) || !i(W))
- if (Y)
- E = 0, X = a(z.width, Q.width);
- else
- return;
- this.left = a(z.left, g.plotLeft + m + (Z ? g.plotWidth : 0)), this.size = F = L = a(z.len, (Z ? g.plotHeight : g.plotWidth) - 2 * m), g = Z ? m : L + 2 * m, E = a(E, z.toPixels(I, !0)), X = a(X, z.toPixels(W, !0)), i(E) && Math.abs(E) !== 1 / 0 || (E = 0, X = g), I = z.toValue(E, !0), W = z.toValue(X, !0);
- var et = Math.abs(k(W - I));
- et < q ? this.grabbedLeft ? E = z.toPixels(W - q - $, !0) : this.grabbedRight && (X = z.toPixels(I + q + $, !0)) : b(it) && k(et - $) > it && (this.grabbedLeft ? E = z.toPixels(W - it - $, !0) : this.grabbedRight && (X = z.toPixels(I + it + $, !0))), this.zoomedMax = j(Math.max(E, X), 0, F), this.zoomedMin = j(this.fixedWidth ? this.zoomedMax - this.fixedWidth : Math.min(E, X), 0, F), this.range = this.zoomedMax - this.zoomedMin, F = Math.round(this.zoomedMax), E = Math.round(this.zoomedMin), A && (this.navigatorGroup.attr({ visibility: "visible" }), Y = Y && !this.hasDragged ? "animate" : "attr", this.drawMasks(E, F, Z, Y), this.drawOutline(E, F, Z, Y), this.navigatorOptions.handles.enabled && (this.drawHandle(E, 0, Z, Y), this.drawHandle(F, 1, Z, Y))), this.scrollbar && (Z ? (Z = this.top - m, Q = this.left - m + (A || !Q.opposite ? 0 : (Q.titleOffset || 0) + Q.axisTitleMargin), m = L + 2 * m) : (Z = this.top + (A ? this.height : -m), Q = this.left - m), this.scrollbar.position(Q, Z, g, m), this.scrollbar.setRange(this.zoomedMin / (L || 1), this.zoomedMax / (L || 1))), this.rendered = !0;
- }
- }, _.prototype.addMouseEvents = function() {
- var I = this, W = I.chart, E = W.container, X = [], g, m;
- I.mouseMoveHandler = g = function(L) {
- I.onMouseMove(L);
- }, I.mouseUpHandler = m = function(L) {
- I.onMouseUp(L);
- }, X = I.getPartsEvents("mousedown"), X.push(O(W.renderTo, "mousemove", g), O(E.ownerDocument, "mouseup", m)), f && (X.push(O(W.renderTo, "touchmove", g), O(E.ownerDocument, "touchend", m)), X.concat(I.getPartsEvents("touchstart"))), I.eventsToUnbind = X, I.series && I.series[0] && X.push(O(I.series[0].xAxis, "foundExtremes", function() {
- W.navigator.modifyNavigatorAxisExtremes();
- }));
- }, _.prototype.getPartsEvents = function(I) {
- var W = this, E = [];
- return ["shades", "handles"].forEach(function(X) {
- W[X].forEach(function(g, m) {
- E.push(O(g.element, I, function(L) {
- W[X + "Mousedown"](L, m);
- }));
- });
- }), E;
- }, _.prototype.shadesMousedown = function(I, W) {
- I = this.chart.pointer.normalize(I);
- var E = this.chart, X = this.xAxis, g = this.zoomedMin, m = this.left, L = this.size, z = this.range, $ = I.chartX;
- if (E.inverted && ($ = I.chartY, m = this.top), W === 1)
- this.grabbedCenter = $, this.fixedWidth = z, this.dragOffset = $ - g;
- else {
- if (I = $ - m - z / 2, W === 0)
- I = Math.max(0, I);
- else if (W === 2 && I + z >= L)
- if (I = L - z, this.reversedExtremes) {
- I -= z;
- var Q = this.getUnionExtremes().dataMin;
- } else
- var A = this.getUnionExtremes().dataMax;
- I !== g && (this.fixedWidth = z, W = X.navigatorAxis.toFixedRange(I, I + z, Q, A), b(W.min) && E.xAxis[0].setExtremes(Math.min(W.min, W.max), Math.max(W.min, W.max), !0, null, { trigger: "navigator" }));
- }
- }, _.prototype.handlesMousedown = function(I, W) {
- this.chart.pointer.normalize(I), I = this.chart;
- var E = I.xAxis[0], X = this.reversedExtremes;
- W === 0 ? (this.grabbedLeft = !0, this.otherHandlePos = this.zoomedMax, this.fixedExtreme = X ? E.min : E.max) : (this.grabbedRight = !0, this.otherHandlePos = this.zoomedMin, this.fixedExtreme = X ? E.max : E.min), I.fixedRange = null;
- }, _.prototype.onMouseMove = function(I) {
- var W = this, E = W.chart, X = W.left, g = W.navigatorSize, m = W.range, L = W.dragOffset, z = E.inverted;
- I.touches && I.touches[0].pageX === 0 || (I = E.pointer.normalize(I), E = I.chartX, z && (X = W.top, E = I.chartY), W.grabbedLeft ? (W.hasDragged = !0, W.render(0, 0, E - X, W.otherHandlePos)) : W.grabbedRight ? (W.hasDragged = !0, W.render(0, 0, W.otherHandlePos, E - X)) : W.grabbedCenter && (W.hasDragged = !0, E < L ? E = L : E > g + L - m && (E = g + L - m), W.render(0, 0, E - L, E - L + m)), W.hasDragged && W.scrollbar && a(W.scrollbar.options.liveRedraw, U.svg && !d && !this.chart.isBoosting) && (I.DOMType = I.type, setTimeout(function() {
- W.onMouseUp(I);
- }, 0)));
- }, _.prototype.onMouseUp = function(I) {
- var W = this.chart, E = this.xAxis, X = this.scrollbar, g = I.DOMEvent || I, m = W.inverted, L = this.rendered && !this.hasDragged ? "animate" : "attr";
- if (this.hasDragged && (!X || !X.hasDragged) || I.trigger === "scrollbar") {
- if (X = this.getUnionExtremes(), this.zoomedMin === this.otherHandlePos)
- var z = this.fixedExtreme;
- else if (this.zoomedMax === this.otherHandlePos)
- var $ = this.fixedExtreme;
- this.zoomedMax === this.size && ($ = this.reversedExtremes ? X.dataMin : X.dataMax), this.zoomedMin === 0 && (z = this.reversedExtremes ? X.dataMax : X.dataMin), E = E.navigatorAxis.toFixedRange(this.zoomedMin, this.zoomedMax, z, $), b(E.min) && W.xAxis[0].setExtremes(Math.min(E.min, E.max), Math.max(E.min, E.max), !0, this.hasDragged ? !1 : null, { trigger: "navigator", triggerOp: "navigator-drag", DOMEvent: g });
- }
- I.DOMType !== "mousemove" && I.DOMType !== "touchmove" && (this.grabbedLeft = this.grabbedRight = this.grabbedCenter = this.fixedWidth = this.fixedExtreme = this.otherHandlePos = this.hasDragged = this.dragOffset = null), this.navigatorEnabled && i(this.zoomedMin) && i(this.zoomedMax) && (W = Math.round(this.zoomedMin), I = Math.round(this.zoomedMax), this.shades && this.drawMasks(W, I, m, L), this.outline && this.drawOutline(W, I, m, L), this.navigatorOptions.handles.enabled && Object.keys(this.handles).length === this.handles.length && (this.drawHandle(W, 0, m, L), this.drawHandle(I, 1, m, L)));
- }, _.prototype.removeEvents = function() {
- this.eventsToUnbind && (this.eventsToUnbind.forEach(function(I) {
- I();
- }), this.eventsToUnbind = void 0), this.removeBaseSeriesEvents();
- }, _.prototype.removeBaseSeriesEvents = function() {
- var I = this.baseSeries || [];
- this.navigatorEnabled && I[0] && (this.navigatorOptions.adaptToUpdatedData !== !1 && I.forEach(function(W) {
- t(W, "updatedData", this.updatedDataHandler);
- }, this), I[0].xAxis && t(I[0].xAxis, "foundExtremes", this.modifyBaseAxisExtremes));
- }, _.prototype.init = function(I) {
- var W = I.options, E = W.navigator, X = E.enabled, g = W.scrollbar, m = g.enabled;
- W = X ? E.height : 0;
- var L = m ? g.height : 0;
- this.handles = [], this.shades = [], this.chart = I, this.setBaseSeries(), this.height = W, this.scrollbarHeight = L, this.scrollbarEnabled = m, this.navigatorEnabled = X, this.navigatorOptions = E, this.scrollbarOptions = g, this.outlineHeight = W + L, this.opposite = a(E.opposite, !(X || !I.inverted));
- var z = this;
- X = z.baseSeries, g = I.xAxis.length, m = I.yAxis.length;
- var $ = X && X[0] && X[0].xAxis || I.xAxis[0] || { options: {} };
- I.isDirtyBox = !0, z.navigatorEnabled ? (z.xAxis = new y(I, c(
- { breaks: $.options.breaks, ordinal: $.options.ordinal },
- E.xAxis,
- { id: "navigator-x-axis", yAxis: "navigator-y-axis", isX: !0, type: "datetime", index: g, isInternal: !0, offset: 0, keepOrdinalPadding: !0, startOnTick: !1, endOnTick: !1, minPadding: 0, maxPadding: 0, zoomEnabled: !1 },
- I.inverted ? { offsets: [L, 0, -L, 0], width: W } : { offsets: [0, -L, 0, L], height: W }
- )), z.yAxis = new y(I, c(E.yAxis, { id: "navigator-y-axis", alignTicks: !1, offset: 0, index: m, isInternal: !0, reversed: a(E.yAxis && E.yAxis.reversed, I.yAxis[0] && I.yAxis[0].reversed, !1), zoomEnabled: !1 }, I.inverted ? { width: W } : { height: W })), X || E.series.data ? z.updateNavigatorSeries(!1) : I.series.length === 0 && (z.unbindRedraw = O(I, "beforeRedraw", function() {
- 0 < I.series.length && !z.series && (z.setBaseSeries(), z.unbindRedraw());
- })), z.reversedExtremes = I.inverted && !z.xAxis.reversed || !I.inverted && z.xAxis.reversed, z.renderElements(), z.addMouseEvents()) : (z.xAxis = {
- chart: I,
- navigatorAxis: { fake: !0 },
- translate: function(Q, A) {
- var F = I.xAxis[0], Y = F.getExtremes(), Z = F.len - 2 * L, q = n("min", F.options.min, Y.dataMin);
- return F = n("max", F.options.max, Y.dataMax) - q, A ? Q * F / Z + q : Z * (Q - q) / F;
- },
- toPixels: function(Q) {
- return this.translate(Q);
- },
- toValue: function(Q) {
- return this.translate(Q, !0);
- }
- }, z.xAxis.navigatorAxis.axis = z.xAxis, z.xAxis.navigatorAxis.toFixedRange = H.AdditionsClass.prototype.toFixedRange.bind(z.xAxis.navigatorAxis)), I.options.scrollbar.enabled && (I.scrollbar = z.scrollbar = new R(I.renderer, c(I.options.scrollbar, { margin: z.navigatorEnabled ? 0 : 10, vertical: I.inverted }), I), O(z.scrollbar, "changed", function(Q) {
- var A = z.size, F = A * this.to;
- A *= this.from, z.hasDragged = z.scrollbar.hasDragged, z.render(0, 0, A, F), this.shouldUpdateExtremes(Q.DOMType) && setTimeout(function() {
- z.onMouseUp(Q);
- });
- })), z.addBaseSeriesEvents(), z.addChartEvents();
- }, _.prototype.getUnionExtremes = function(I) {
- var W = this.chart.xAxis[0], E = this.xAxis, X = E.options, g = W.options, m;
- return I && W.dataMin === null || (m = { dataMin: a(X && X.min, n("min", g.min, W.dataMin, E.dataMin, E.min)), dataMax: a(X && X.max, n("max", g.max, W.dataMax, E.dataMax, E.max)) }), m;
- }, _.prototype.setBaseSeries = function(I, W) {
- var E = this.chart, X = this.baseSeries = [];
- I = I || E.options && E.options.navigator.baseSeries || (E.series.length ? h(
- E.series,
- function(g) {
- return !g.options.isInternal;
- }
- ).index : 0), (E.series || []).forEach(function(g, m) {
- g.options.isInternal || !g.options.showInNavigator && (m !== I && g.options.id !== I || g.options.showInNavigator === !1) || X.push(g);
- }), this.xAxis && !this.xAxis.navigatorAxis.fake && this.updateNavigatorSeries(!0, W);
- }, _.prototype.updateNavigatorSeries = function(I, W) {
- var E = this, X = E.chart, g = E.baseSeries, m, L, z = E.navigatorOptions.series, $, Q = {
- enableMouseTracking: !1,
- index: null,
- linkedTo: null,
- group: "nav",
- padXAxis: !1,
- xAxis: "navigator-x-axis",
- yAxis: "navigator-y-axis",
- showInLegend: !1,
- stacking: void 0,
- isInternal: !0,
- states: { inactive: { opacity: 1 } }
- }, A = E.series = (E.series || []).filter(function(F) {
- var Y = F.baseSeries;
- return 0 > g.indexOf(Y) ? (Y && (t(Y, "updatedData", E.updatedDataHandler), delete Y.navigatorSeries), F.chart && F.destroy(), !1) : !0;
- });
- g && g.length && g.forEach(function(F) {
- var Y = F.navigatorSeries, Z = l({ color: F.color, visible: F.visible }, u(z) ? T.navigator.series : z);
- Y && E.navigatorOptions.adaptToUpdatedData === !1 || (Q.name = "Navigator " + g.length, m = F.options || {}, $ = m.navigatorOptions || {}, Z.dataLabels = s(Z.dataLabels), L = c(m, Q, Z, $), L.pointRange = a(Z.pointRange, $.pointRange, T.plotOptions[L.type || "line"].pointRange), Z = $.data || Z.data, E.hasNavigatorData = E.hasNavigatorData || !!Z, L.data = Z || m.data && m.data.slice(0), Y && Y.options ? Y.update(L, W) : (F.navigatorSeries = X.initSeries(L), F.navigatorSeries.baseSeries = F, A.push(F.navigatorSeries)));
- }), (z.data && (!g || !g.length) || u(z)) && (E.hasNavigatorData = !1, z = s(z), z.forEach(function(F, Y) {
- Q.name = "Navigator " + (A.length + 1), L = c(
- T.navigator.series,
- { color: X.series[Y] && !X.series[Y].options.isInternal && X.series[Y].color || X.options.colors[Y] || X.options.colors[0] },
- Q,
- F
- ), L.data = F.data, L.data && (E.hasNavigatorData = !0, A.push(X.initSeries(L)));
- })), I && this.addBaseSeriesEvents();
- }, _.prototype.addBaseSeriesEvents = function() {
- var I = this, W = I.baseSeries || [];
- W[0] && W[0].xAxis && W[0].eventsToUnbind.push(O(W[0].xAxis, "foundExtremes", this.modifyBaseAxisExtremes)), W.forEach(function(E) {
- E.eventsToUnbind.push(O(E, "show", function() {
- this.navigatorSeries && this.navigatorSeries.setVisible(
- !0,
- !1
- );
- })), E.eventsToUnbind.push(O(E, "hide", function() {
- this.navigatorSeries && this.navigatorSeries.setVisible(!1, !1);
- })), this.navigatorOptions.adaptToUpdatedData !== !1 && E.xAxis && E.eventsToUnbind.push(O(E, "updatedData", this.updatedDataHandler)), E.eventsToUnbind.push(O(E, "remove", function() {
- this.navigatorSeries && (v(I.series, this.navigatorSeries), b(this.navigatorSeries.options) && this.navigatorSeries.remove(!1), delete this.navigatorSeries);
- }));
- }, this);
- }, _.prototype.getBaseSeriesMin = function(I) {
- return this.baseSeries.reduce(function(W, E) {
- return Math.min(W, E.xData ? E.xData[0] : W);
- }, I);
- }, _.prototype.modifyNavigatorAxisExtremes = function() {
- var I = this.xAxis, W;
- typeof I.getExtremes < "u" && (!(W = this.getUnionExtremes(!0)) || W.dataMin === I.min && W.dataMax === I.max || (I.min = W.dataMin, I.max = W.dataMax));
- }, _.prototype.modifyBaseAxisExtremes = function() {
- var I = this.chart.navigator, W = this.getExtremes(), E = W.dataMin, X = W.dataMax;
- W = W.max - W.min;
- var g = I.stickToMin, m = I.stickToMax, L = a(this.options.overscroll, 0), z = I.series && I.series[0], $ = !!this.setExtremes;
- if (!this.eventArgs || this.eventArgs.trigger !== "rangeSelectorButton") {
- if (g)
- var Q = E, A = Q + W;
- m && (A = X + L, g || (Q = Math.max(E, A - W, I.getBaseSeriesMin(z && z.xData ? z.xData[0] : -Number.MAX_VALUE)))), $ && (g || m) && i(Q) && (this.min = this.userMin = Q, this.max = this.userMax = A);
- }
- I.stickToMin = I.stickToMax = null;
- }, _.prototype.updatedDataHandler = function() {
- var I = this.chart.navigator, W = this.navigatorSeries;
- I.stickToMax = I.reversedExtremes ? Math.round(I.zoomedMin) === 0 : Math.round(I.zoomedMax) >= Math.round(I.size), I.stickToMin = I.shouldStickToMin(
- this,
- I
- ), W && !I.hasNavigatorData && (W.options.pointStart = this.xData[0], W.setData(this.options.data, !1, null, !1));
- }, _.prototype.shouldStickToMin = function(I, W) {
- W = W.getBaseSeriesMin(I.xData[0]);
- var E = I.xAxis;
- I = E.max;
- var X = E.min;
- return E = E.options.range, i(I) && i(X) ? E && 0 < I - W ? I - W < E : X <= W : !1;
- }, _.prototype.addChartEvents = function() {
- this.eventsToUnbind || (this.eventsToUnbind = []), this.eventsToUnbind.push(O(this.chart, "redraw", function() {
- var I = this.navigator, W = I && (I.baseSeries && I.baseSeries[0] && I.baseSeries[0].xAxis || this.xAxis[0]);
- W && I.render(W.min, W.max);
- }), O(this.chart, "getMargins", function() {
- var I = this.navigator, W = I.opposite ? "plotTop" : "marginBottom";
- this.inverted && (W = I.opposite ? "marginRight" : "plotLeft"), this[W] = (this[W] || 0) + (I.navigatorEnabled || !this.inverted ? I.outlineHeight : 0) + I.navigatorOptions.margin;
- }));
- }, _.prototype.destroy = function() {
- this.removeEvents(), this.xAxis && (v(this.chart.xAxis, this.xAxis), v(this.chart.axes, this.xAxis)), this.yAxis && (v(this.chart.yAxis, this.yAxis), v(this.chart.axes, this.yAxis)), (this.series || []).forEach(function(I) {
- I.destroy && I.destroy();
- }), "series xAxis yAxis shades outline scrollbarTrack scrollbarRifles scrollbarGroup scrollbar navigatorGroup rendered".split(" ").forEach(function(I) {
- this[I] && this[I].destroy && this[I].destroy(), this[I] = null;
- }, this), [this.handles].forEach(function(I) {
- w(I);
- }, this);
- }, _;
- }();
- return U.Navigator || (U.Navigator = P, H.compose(y), O(N, "beforeShowResetZoom", function() {
- var _ = this.options, I = _.navigator, W = _.rangeSelector;
- if ((I && I.enabled || W && W.enabled) && (!d && _.chart.zoomType === "x" || d && _.chart.pinchType === "x"))
- return !1;
- }), O(N, "beforeRender", function() {
- var _ = this.options;
- (_.navigator.enabled || _.scrollbar.enabled) && (this.scroller = this.navigator = new P(this));
- }), O(N, "afterSetChartSize", function() {
- var _ = this.legend, I = this.navigator;
- if (I) {
- var W = _ && _.options, E = I.xAxis, X = I.yAxis, g = I.scrollbarHeight;
- this.inverted ? (I.left = I.opposite ? this.chartWidth - g - I.height : this.spacing[3] + g, I.top = this.plotTop + g) : (I.left = a(E.left, this.plotLeft + g), I.top = I.navigatorOptions.top || this.chartHeight - I.height - g - this.spacing[2] - (this.rangeSelector && this.extraBottomMargin ? this.rangeSelector.getHeight() : 0) - (W && W.verticalAlign === "bottom" && W.layout !== "proximate" && W.enabled && !W.floating ? _.legendHeight + a(W.margin, 10) : 0) - (this.titleOffset ? this.titleOffset[2] : 0)), E && X && (this.inverted ? E.options.left = X.options.left = I.left : E.options.top = X.options.top = I.top, E.setAxisSize(), X.setAxisSize());
- }
- }), O(N, "update", function(_) {
- var I = _.options.navigator || {}, W = _.options.scrollbar || {};
- this.navigator || this.scroller || !I.enabled && !W.enabled || (c(
- !0,
- this.options.navigator,
- I
- ), c(!0, this.options.scrollbar, W), delete _.options.navigator, delete _.options.scrollbar);
- }), O(N, "afterUpdate", function(_) {
- this.navigator || this.scroller || !this.options.navigator.enabled && !this.options.scrollbar.enabled || (this.scroller = this.navigator = new P(this), a(_.redraw, !0) && this.redraw(_.animation));
- }), O(N, "afterAddSeries", function() {
- this.navigator && this.navigator.setBaseSeries(null, !1);
- }), O(B, "afterUpdate", function() {
- this.chart.navigator && !this.options.isInternal && this.chart.navigator.setBaseSeries(
- null,
- !1
- );
- }), N.prototype.callbacks.push(function(_) {
- var I = _.navigator;
- I && _.xAxis[0] && (_ = _.xAxis[0].getExtremes(), I.render(_.min, _.max));
- })), U.Navigator = P, U.Navigator;
- }), M(o, "Extensions/RangeSelector.js", [o["Core/Axis/Axis.js"], o["Core/Chart/Chart.js"], o["Core/Globals.js"], o["Core/DefaultOptions.js"], o["Core/Renderer/SVG/SVGElement.js"], o["Core/Utilities.js"]], function(y, N, D, U, H, V) {
- function G(s) {
- if (s.indexOf("%L") !== -1)
- return "text";
- var n = "aAdewbBmoyY".split("").some(function(_) {
- return s.indexOf("%" + _) !== -1;
- }), P = "HkIlMS".split("").some(function(_) {
- return s.indexOf("%" + _) !== -1;
- });
- return n && P ? "datetime-local" : n ? "date" : P ? "time" : "text";
- }
- var R = U.defaultOptions, B = V.addEvent, S = V.createElement, x = V.css, f = V.defined, d = V.destroyObjectProperties, T = V.discardElement, O = V.extend, j = V.find, k = V.fireEvent, b = V.isNumber, w = V.merge, v = V.objectEach, l = V.pad, h = V.pick, u = V.pInt, i = V.splat;
- O(R, { rangeSelector: { allButtonsEnabled: !1, buttons: void 0, buttonSpacing: 5, dropdown: "responsive", enabled: void 0, verticalAlign: "top", buttonTheme: {
- width: 28,
- height: 18,
- padding: 2,
- zIndex: 7
- }, floating: !1, x: 0, y: 0, height: void 0, inputBoxBorderColor: "none", inputBoxHeight: 17, inputBoxWidth: void 0, inputDateFormat: "%b %e, %Y", inputDateParser: void 0, inputEditDateFormat: "%Y-%m-%d", inputEnabled: !0, inputPosition: { align: "right", x: 0, y: 0 }, inputSpacing: 5, selected: void 0, buttonPosition: { align: "left", x: 0, y: 0 }, inputStyle: { color: "#335cad", cursor: "pointer" }, labelStyle: { color: "#666666" } } }), O(R.lang, { rangeSelectorZoom: "Zoom", rangeSelectorFrom: "", rangeSelectorTo: "→" });
- var c = function() {
- function s(n) {
- this.buttons = void 0, this.buttonOptions = s.prototype.defaultButtons, this.initialButtonGroupWidth = 0, this.options = void 0, this.chart = n, this.init(n);
- }
- return s.prototype.clickButton = function(n, P) {
- var _ = this.chart, I = this.buttonOptions[n], W = _.xAxis[0], E = _.scroller && _.scroller.getUnionExtremes() || W || {}, X = E.dataMin, g = E.dataMax, m = W && Math.round(Math.min(W.max, h(g, W.max))), L = I.type;
- E = I._range;
- var z, $ = I.dataGrouping;
- if (X !== null && g !== null) {
- if (_.fixedRange = E, this.setSelected(n), $ && (this.forcedDataGrouping = !0, y.prototype.setDataGrouping.call(W || { chart: this.chart }, $, !1), this.frozenStates = I.preserveDataGrouping), L === "month" || L === "year")
- if (W) {
- L = { range: I, max: m, chart: _, dataMin: X, dataMax: g };
- var Q = W.minFromRange.call(L);
- b(L.newMax) && (m = L.newMax);
- } else
- E = I;
- else if (E)
- Q = Math.max(m - E, X), m = Math.min(Q + E, g);
- else if (L === "ytd")
- if (W)
- typeof g > "u" && (X = Number.MAX_VALUE, g = Number.MIN_VALUE, _.series.forEach(function(Z) {
- Z = Z.xData, X = Math.min(Z[0], X), g = Math.max(Z[Z.length - 1], g);
- }), P = !1), m = this.getYTDExtremes(
- g,
- X,
- _.time.useUTC
- ), Q = z = m.min, m = m.max;
- else {
- this.deferredYTDClick = n;
- return;
- }
- else
- L === "all" && W && (_.navigator && _.navigator.baseSeries[0] && (_.navigator.baseSeries[0].xAxis.options.range = void 0), Q = X, m = g);
- if (f(Q) && (Q += I._offsetMin), f(m) && (m += I._offsetMax), this.dropdown && (this.dropdown.selectedIndex = n + 1), W)
- W.setExtremes(Q, m, h(P, !0), void 0, { trigger: "rangeSelectorButton", rangeSelectorButton: I });
- else {
- var A = i(_.options.xAxis)[0], F = A.range;
- A.range = E;
- var Y = A.min;
- A.min = z, B(_, "load", function() {
- A.range = F, A.min = Y;
- });
- }
- k(
- this,
- "afterBtnClick"
- );
- }
- }, s.prototype.setSelected = function(n) {
- this.selected = this.options.selected = n;
- }, s.prototype.init = function(n) {
- var P = this, _ = n.options.rangeSelector, I = _.buttons || P.defaultButtons.slice(), W = _.selected, E = function() {
- var X = P.minInput, g = P.maxInput;
- X && X.blur && k(X, "blur"), g && g.blur && k(g, "blur");
- };
- P.chart = n, P.options = _, P.buttons = [], P.buttonOptions = I, this.eventsToUnbind = [], this.eventsToUnbind.push(B(n.container, "mousedown", E)), this.eventsToUnbind.push(B(n, "resize", E)), I.forEach(P.computeButtonRange), typeof W < "u" && I[W] && this.clickButton(W, !1), this.eventsToUnbind.push(B(n, "load", function() {
- n.xAxis && n.xAxis[0] && B(n.xAxis[0], "setExtremes", function(X) {
- this.max - this.min !== n.fixedRange && X.trigger !== "rangeSelectorButton" && X.trigger !== "updatedData" && P.forcedDataGrouping && !P.frozenStates && this.setDataGrouping(!1, !1);
- });
- }));
- }, s.prototype.updateButtonStates = function() {
- var n = this, P = this.chart, _ = this.dropdown, I = P.xAxis[0], W = Math.round(I.max - I.min), E = !I.hasVisibleSeries, X = P.scroller && P.scroller.getUnionExtremes() || I, g = X.dataMin, m = X.dataMax;
- P = n.getYTDExtremes(m, g, P.time.useUTC);
- var L = P.min, z = P.max, $ = n.selected, Q = b($), A = n.options.allButtonsEnabled, F = n.buttons;
- n.buttonOptions.forEach(function(Y, Z) {
- var q = Y._range, it = Y.type, et = Y.count || 1, nt = F[Z], rt = 0, ct = Y._offsetMax - Y._offsetMin;
- Y = Z === $;
- var gt = q > m - g, dt = q < I.minRange, ht = !1, at = !1;
- q = q === W, (it === "month" || it === "year") && W + 36e5 >= 864e5 * { month: 28, year: 365 }[it] * et - ct && W - 36e5 <= 864e5 * { month: 31, year: 366 }[it] * et + ct ? q = !0 : it === "ytd" ? (q = z - L + ct === W, ht = !Y) : it === "all" && (q = I.max - I.min >= m - g, at = !Y && Q && q), it = !A && (gt || dt || at || E), et = Y && q || q && !Q && !ht || Y && n.frozenStates, it ? rt = 3 : et && (Q = !0, rt = 2), nt.state !== rt && (nt.setState(rt), _ && (_.options[Z + 1].disabled = it, rt === 2 && (_.selectedIndex = Z + 1)), rt === 0 && $ === Z && n.setSelected());
- });
- }, s.prototype.computeButtonRange = function(n) {
- var P = n.type, _ = n.count || 1, I = { millisecond: 1, second: 1e3, minute: 6e4, hour: 36e5, day: 864e5, week: 6048e5 };
- I[P] ? n._range = I[P] * _ : (P === "month" || P === "year") && (n._range = 864e5 * { month: 30, year: 365 }[P] * _), n._offsetMin = h(n.offsetMin, 0), n._offsetMax = h(n.offsetMax, 0), n._range += n._offsetMax - n._offsetMin;
- }, s.prototype.getInputValue = function(n) {
- n = n === "min" ? this.minInput : this.maxInput;
- var P = this.chart.options.rangeSelector, _ = this.chart.time;
- return n ? (n.type === "text" && P.inputDateParser || this.defaultInputDateParser)(n.value, _.useUTC, _) : 0;
- }, s.prototype.setInputValue = function(n, P) {
- var _ = this.options, I = this.chart.time, W = n === "min" ? this.minInput : this.maxInput;
- if (n = n === "min" ? this.minDateBox : this.maxDateBox, W) {
- var E = W.getAttribute("data-hc-time");
- E = f(E) ? Number(E) : void 0, f(P) && (f(E) && W.setAttribute("data-hc-time-previous", E), W.setAttribute("data-hc-time", P), E = P), W.value = I.dateFormat(this.inputTypeFormats[W.type] || _.inputEditDateFormat, E), n && n.attr({ text: I.dateFormat(_.inputDateFormat, E) });
- }
- }, s.prototype.setInputExtremes = function(n, P, _) {
- if (n = n === "min" ? this.minInput : this.maxInput) {
- var I = this.inputTypeFormats[n.type], W = this.chart.time;
- I && (P = W.dateFormat(I, P), n.min !== P && (n.min = P), _ = W.dateFormat(I, _), n.max !== _ && (n.max = _));
- }
- }, s.prototype.showInput = function(n) {
- var P = n === "min" ? this.minDateBox : this.maxDateBox;
- if ((n = n === "min" ? this.minInput : this.maxInput) && P && this.inputGroup) {
- var _ = n.type === "text", I = this.inputGroup, W = I.translateX;
- I = I.translateY;
- var E = this.options.inputBoxWidth;
- x(n, { width: _ ? P.width + (E ? -2 : 20) + "px" : "auto", height: _ ? P.height - 2 + "px" : "auto", border: "2px solid silver" }), _ && E ? x(n, { left: W + P.x + "px", top: I + "px" }) : x(n, { left: Math.min(Math.round(P.x + W - (n.offsetWidth - P.width) / 2), this.chart.chartWidth - n.offsetWidth) + "px", top: I - (n.offsetHeight - P.height) / 2 + "px" });
- }
- }, s.prototype.hideInput = function(n) {
- (n = n === "min" ? this.minInput : this.maxInput) && x(n, { top: "-9999em", border: 0, width: "1px", height: "1px" });
- }, s.prototype.defaultInputDateParser = function(n, P, _) {
- var I = n.split("/").join("-").split(" ").join("T");
- if (I.indexOf("T") === -1 && (I += "T00:00"), P)
- I += "Z";
- else {
- var W;
- (W = D.isSafari) && (W = I, W = !(6 < W.length && (W.lastIndexOf("-") === W.length - 6 || W.lastIndexOf("+") === W.length - 6))), W && (W = new Date(I).getTimezoneOffset() / 60, I += 0 >= W ? "+" + l(-W) + ":00" : "-" + l(W) + ":00");
- }
- return I = Date.parse(I), b(I) || (n = n.split("-"), I = Date.UTC(u(n[0]), u(n[1]) - 1, u(n[2]))), _ && P && b(I) && (I += _.getTimezoneOffset(I)), I;
- }, s.prototype.drawInput = function(n) {
- function P() {
- var A = E.getInputValue(n), F = _.xAxis[0], Y = _.scroller && _.scroller.xAxis ? _.scroller.xAxis : F, Z = Y.dataMin;
- Y = Y.dataMax;
- var q = E.maxInput, it = E.minInput;
- A !== Number($.getAttribute("data-hc-time-previous")) && b(A) && ($.setAttribute("data-hc-time-previous", A), L && q && b(Z) ? A > Number(q.getAttribute("data-hc-time")) ? A = void 0 : A < Z && (A = Z) : it && b(Y) && (A < Number(it.getAttribute("data-hc-time")) ? A = void 0 : A > Y && (A = Y)), typeof A < "u" && F.setExtremes(L ? A : F.min, L ? F.max : A, void 0, void 0, { trigger: "rangeSelectorInput" }));
- }
- var _ = this.chart, I = this.div, W = this.inputGroup, E = this, X = _.renderer.style || {}, g = _.renderer, m = _.options.rangeSelector, L = n === "min", z = R.lang[L ? "rangeSelectorFrom" : "rangeSelectorTo"] || "";
- z = g.label(z, 0).addClass("highcharts-range-label").attr({ padding: z ? 2 : 0, height: z ? m.inputBoxHeight : 0 }).add(W), g = g.label("", 0).addClass("highcharts-range-input").attr({ padding: 2, width: m.inputBoxWidth, height: m.inputBoxHeight, "text-align": "center" }).on(
- "click",
- function() {
- E.showInput(n), E[n + "Input"].focus();
- }
- ), _.styledMode || g.attr({ stroke: m.inputBoxBorderColor, "stroke-width": 1 }), g.add(W);
- var $ = S("input", { name: n, className: "highcharts-range-selector" }, void 0, I);
- $.setAttribute("type", G(m.inputDateFormat || "%b %e, %Y")), _.styledMode || (z.css(w(X, m.labelStyle)), g.css(w({ color: "#333333" }, X, m.inputStyle)), x($, O({
- position: "absolute",
- border: 0,
- boxShadow: "0 0 15px rgba(0,0,0,0.3)",
- width: "1px",
- height: "1px",
- padding: 0,
- textAlign: "center",
- fontSize: X.fontSize,
- fontFamily: X.fontFamily,
- top: "-9999em"
- }, m.inputStyle))), $.onfocus = function() {
- E.showInput(n);
- }, $.onblur = function() {
- $ === D.doc.activeElement && P(), E.hideInput(n), E.setInputValue(n), $.blur();
- };
- var Q = !1;
- return $.onchange = function() {
- Q || (P(), E.hideInput(n), $.blur());
- }, $.onkeypress = function(A) {
- A.keyCode === 13 && P();
- }, $.onkeydown = function(A) {
- Q = !0, A.keyCode !== 38 && A.keyCode !== 40 || P();
- }, $.onkeyup = function() {
- Q = !1;
- }, { dateBox: g, input: $, label: z };
- }, s.prototype.getPosition = function() {
- var n = this.chart, P = n.options.rangeSelector;
- return n = P.verticalAlign === "top" ? n.plotTop - n.axisOffset[0] : 0, { buttonTop: n + P.buttonPosition.y, inputTop: n + P.inputPosition.y - 10 };
- }, s.prototype.getYTDExtremes = function(n, P, _) {
- var I = this.chart.time, W = new I.Date(n), E = I.get("FullYear", W);
- return _ = _ ? I.Date.UTC(E, 0, 1) : +new I.Date(E, 0, 1), P = Math.max(P, _), W = W.getTime(), { max: Math.min(n || W, W), min: P };
- }, s.prototype.render = function(n, P) {
- var _ = this.chart, I = _.renderer, W = _.container, E = _.options, X = E.rangeSelector, g = h(E.chart.style && E.chart.style.zIndex, 0) + 1;
- if (E = X.inputEnabled, X.enabled !== !1) {
- if (this.rendered || (this.group = I.g("range-selector-group").attr({ zIndex: 7 }).add(), this.div = S("div", void 0, { position: "relative", height: 0, zIndex: g }), this.buttonOptions.length && this.renderButtons(), W.parentNode && W.parentNode.insertBefore(this.div, W), E && (this.inputGroup = I.g("input-group").add(this.group), I = this.drawInput("min"), this.minDateBox = I.dateBox, this.minLabel = I.label, this.minInput = I.input, I = this.drawInput("max"), this.maxDateBox = I.dateBox, this.maxLabel = I.label, this.maxInput = I.input)), E && (this.setInputValue(
- "min",
- n
- ), this.setInputValue("max", P), n = _.scroller && _.scroller.getUnionExtremes() || _.xAxis[0] || {}, f(n.dataMin) && f(n.dataMax) && (_ = _.xAxis[0].minRange || 0, this.setInputExtremes("min", n.dataMin, Math.min(n.dataMax, this.getInputValue("max")) - _), this.setInputExtremes("max", Math.max(n.dataMin, this.getInputValue("min")) + _, n.dataMax)), this.inputGroup)) {
- var m = 0;
- [this.minLabel, this.minDateBox, this.maxLabel, this.maxDateBox].forEach(function(L) {
- if (L) {
- var z = L.getBBox().width;
- z && (L.attr({ x: m }), m += z + X.inputSpacing);
- }
- });
- }
- this.alignElements(), this.rendered = !0;
- }
- }, s.prototype.renderButtons = function() {
- var n = this, P = this.buttons, _ = this.options, I = R.lang, W = this.chart.renderer, E = w(_.buttonTheme), X = E && E.states, g = E.width || 28;
- delete E.width, delete E.states, this.buttonGroup = W.g("range-selector-buttons").add(this.group);
- var m = this.dropdown = S("select", void 0, { position: "absolute", width: "1px", height: "1px", padding: 0, border: 0, top: "-9999em", cursor: "pointer", opacity: 1e-4 }, this.div);
- B(m, "touchstart", function() {
- m.style.fontSize = "16px";
- }), [[D.isMS ? "mouseover" : "mouseenter"], [D.isMS ? "mouseout" : "mouseleave"], ["change", "click"]].forEach(function(L) {
- var z = L[0], $ = L[1];
- B(m, z, function() {
- var Q = P[n.currentButtonIndex()];
- Q && k(Q.element, $ || z);
- });
- }), this.zoomText = W.label(I && I.rangeSelectorZoom || "", 0).attr({ padding: _.buttonTheme.padding, height: _.buttonTheme.height, paddingLeft: 0, paddingRight: 0 }).add(this.buttonGroup), this.chart.styledMode || (this.zoomText.css(_.labelStyle), E["stroke-width"] = h(E["stroke-width"], 0)), S(
- "option",
- { textContent: this.zoomText.textStr, disabled: !0 },
- void 0,
- m
- ), this.buttonOptions.forEach(function(L, z) {
- S("option", { textContent: L.title || L.text }, void 0, m), P[z] = W.button(L.text, 0, 0, function($) {
- var Q = L.events && L.events.click, A;
- Q && (A = Q.call(L, $)), A !== !1 && n.clickButton(z), n.isActive = !0;
- }, E, X && X.hover, X && X.select, X && X.disabled).attr({ "text-align": "center", width: g }).add(n.buttonGroup), L.title && P[z].attr("title", L.title);
- });
- }, s.prototype.alignElements = function() {
- var n = this, P = this.buttonGroup, _ = this.buttons, I = this.chart, W = this.group, E = this.inputGroup, X = this.options, g = this.zoomText, m = I.options, L = m.exporting && m.exporting.enabled !== !1 && m.navigation && m.navigation.buttonOptions;
- m = X.buttonPosition;
- var z = X.inputPosition, $ = X.verticalAlign, Q = function(Z, q) {
- return L && n.titleCollision(I) && $ === "top" && q.align === "right" && q.y - Z.getBBox().height - 12 < (L.y || 0) + (L.height || 0) + I.spacing[0] ? -40 : 0;
- }, A = I.plotLeft;
- if (W && m && z) {
- var F = m.x - I.spacing[3];
- if (P) {
- if (this.positionButtons(), !this.initialButtonGroupWidth) {
- var Y = 0;
- g && (Y += g.getBBox().width + 5), _.forEach(function(Z, q) {
- Y += Z.width, q !== _.length - 1 && (Y += X.buttonSpacing);
- }), this.initialButtonGroupWidth = Y;
- }
- A -= I.spacing[3], this.updateButtonStates(), g = Q(P, m), this.alignButtonGroup(g), W.placed = P.placed = I.hasLoaded;
- }
- P = 0, E && (P = Q(E, z), z.align === "left" ? F = A : z.align === "right" && (F = -Math.max(I.axisOffset[1], -P)), E.align({ y: z.y, width: E.getBBox().width, align: z.align, x: z.x + F - 2 }, !0, I.spacingBox), E.placed = I.hasLoaded), this.handleCollision(P), W.align({ verticalAlign: $ }, !0, I.spacingBox), E = W.alignAttr.translateY, P = W.getBBox().height + 20, Q = 0, $ === "bottom" && (Q = (Q = I.legend && I.legend.options) && Q.verticalAlign === "bottom" && Q.enabled && !Q.floating ? I.legend.legendHeight + h(Q.margin, 10) : 0, P = P + Q - 20, Q = E - P - (X.floating ? 0 : X.y) - (I.titleOffset ? I.titleOffset[2] : 0) - 10), $ === "top" ? (X.floating && (Q = 0), I.titleOffset && I.titleOffset[0] && (Q = I.titleOffset[0]), Q += I.margin[0] - I.spacing[0] || 0) : $ === "middle" && (z.y === m.y ? Q = E : (z.y || m.y) && (Q = 0 > z.y || 0 > m.y ? Q - Math.min(z.y, m.y) : E - P)), W.translate(X.x, X.y + Math.floor(Q)), m = this.minInput, z = this.maxInput, E = this.dropdown, X.inputEnabled && m && z && (m.style.marginTop = W.translateY + "px", z.style.marginTop = W.translateY + "px"), E && (E.style.marginTop = W.translateY + "px");
- }
- }, s.prototype.alignButtonGroup = function(n, P) {
- var _ = this.chart, I = this.buttonGroup, W = this.options.buttonPosition, E = _.plotLeft - _.spacing[3], X = W.x - _.spacing[3];
- W.align === "right" ? X += n - E : W.align === "center" && (X -= E / 2), I && I.align({ y: W.y, width: h(P, this.initialButtonGroupWidth), align: W.align, x: X }, !0, _.spacingBox);
- }, s.prototype.positionButtons = function() {
- var n = this.buttons, P = this.chart, _ = this.options, I = this.zoomText, W = P.hasLoaded ? "animate" : "attr", E = _.buttonPosition, X = P.plotLeft, g = X;
- I && I.visibility !== "hidden" && (I[W]({ x: h(X + E.x, X) }), g += E.x + I.getBBox().width + 5), this.buttonOptions.forEach(function(m, L) {
- n[L].visibility !== "hidden" ? (n[L][W]({ x: g }), g += n[L].width + _.buttonSpacing) : n[L][W]({ x: X });
- });
- }, s.prototype.handleCollision = function(n) {
- var P = this, _ = this.chart, I = this.buttonGroup, W = this.inputGroup, E = this.options, X = E.buttonPosition, g = E.dropdown, m = E.inputPosition;
- E = function() {
- var $ = 0;
- return P.buttons.forEach(function(Q) {
- Q = Q.getBBox(), Q.width > $ && ($ = Q.width);
- }), $;
- };
- var L = function($) {
- if (W && I) {
- var Q = W.alignAttr.translateX + W.alignOptions.x - n + W.getBBox().x + 2, A = W.alignOptions.width, F = I.alignAttr.translateX + I.getBBox().x;
- return F + $ > Q && Q + A > F && X.y < m.y + W.getBBox().height;
- }
- return !1;
- }, z = function() {
- W && I && W.attr({ translateX: W.alignAttr.translateX + (_.axisOffset[1] >= -n ? 0 : -n), translateY: W.alignAttr.translateY + I.getBBox().height + 10 });
- };
- if (I) {
- if (g === "always") {
- this.collapseButtons(n), L(E()) && z();
- return;
- }
- g === "never" && this.expandButtons();
- }
- W && I ? m.align === X.align || L(this.initialButtonGroupWidth + 20) ? g === "responsive" ? (this.collapseButtons(n), L(E()) && z()) : z() : g === "responsive" && this.expandButtons() : I && g === "responsive" && (this.initialButtonGroupWidth > _.plotWidth ? this.collapseButtons(n) : this.expandButtons());
- }, s.prototype.collapseButtons = function(n) {
- var P = this.buttons, _ = this.buttonOptions, I = this.chart, W = this.dropdown, E = this.options, X = this.zoomText, g = I.userOptions.rangeSelector && I.userOptions.rangeSelector.buttonTheme || {}, m = function(z) {
- return { text: z ? z + " ▾" : "▾", width: "auto", paddingLeft: h(E.buttonTheme.paddingLeft, g.padding, 8), paddingRight: h(E.buttonTheme.paddingRight, g.padding, 8) };
- };
- X && X.hide();
- var L = !1;
- _.forEach(function(z, $) {
- $ = P[$], $.state !== 2 ? $.hide() : ($.show(), $.attr(m(z.text)), L = !0);
- }), L || (W && (W.selectedIndex = 0), P[0].show(), P[0].attr(m(this.zoomText && this.zoomText.textStr))), _ = E.buttonPosition.align, this.positionButtons(), _ !== "right" && _ !== "center" || this.alignButtonGroup(n, P[this.currentButtonIndex()].getBBox().width), this.showDropdown();
- }, s.prototype.expandButtons = function() {
- var n = this.buttons, P = this.buttonOptions, _ = this.options, I = this.zoomText;
- this.hideDropdown(), I && I.show(), P.forEach(function(W, E) {
- E = n[E], E.show(), E.attr({ text: W.text, width: _.buttonTheme.width || 28, paddingLeft: h(_.buttonTheme.paddingLeft, "unset"), paddingRight: h(_.buttonTheme.paddingRight, "unset") }), 2 > E.state && E.setState(0);
- }), this.positionButtons();
- }, s.prototype.currentButtonIndex = function() {
- var n = this.dropdown;
- return n && 0 < n.selectedIndex ? n.selectedIndex - 1 : 0;
- }, s.prototype.showDropdown = function() {
- var n = this.buttonGroup, P = this.buttons, _ = this.chart, I = this.dropdown;
- if (n && I) {
- var W = n.translateX;
- n = n.translateY, P = P[this.currentButtonIndex()].getBBox(), x(I, { left: _.plotLeft + W + "px", top: n + 0.5 + "px", width: P.width + "px", height: P.height + "px" }), this.hasVisibleDropdown = !0;
- }
- }, s.prototype.hideDropdown = function() {
- var n = this.dropdown;
- n && (x(n, { top: "-9999em", width: "1px", height: "1px" }), this.hasVisibleDropdown = !1);
- }, s.prototype.getHeight = function() {
- var n = this.options, P = this.group, _ = n.y, I = n.buttonPosition.y, W = n.inputPosition.y;
- return n.height ? n.height : (this.alignElements(), n = P ? P.getBBox(!0).height + 13 + _ : 0, P = Math.min(W, I), (0 > W && 0 > I || 0 < W && 0 < I) && (n += Math.abs(P)), n);
- }, s.prototype.titleCollision = function(n) {
- return !(n.options.title.text || n.options.subtitle.text);
- }, s.prototype.update = function(n) {
- var P = this.chart;
- w(!0, P.options.rangeSelector, n), this.destroy(), this.init(P), this.render();
- }, s.prototype.destroy = function() {
- var n = this, P = n.minInput, _ = n.maxInput;
- n.eventsToUnbind && (n.eventsToUnbind.forEach(function(I) {
- return I();
- }), n.eventsToUnbind = void 0), d(n.buttons), P && (P.onfocus = P.onblur = P.onchange = null), _ && (_.onfocus = _.onblur = _.onchange = null), v(n, function(I, W) {
- I && W !== "chart" && (I instanceof H ? I.destroy() : I instanceof window.HTMLElement && T(I)), I !== s.prototype[W] && (n[W] = null);
- }, this);
- }, s;
- }();
- if (c.prototype.defaultButtons = [
- { type: "month", count: 1, text: "1m", title: "View 1 month" },
- { type: "month", count: 3, text: "3m", title: "View 3 months" },
- { type: "month", count: 6, text: "6m", title: "View 6 months" },
- { type: "ytd", text: "YTD", title: "View year to date" },
- { type: "year", count: 1, text: "1y", title: "View 1 year" },
- { type: "all", text: "All", title: "View all" }
- ], c.prototype.inputTypeFormats = { "datetime-local": "%Y-%m-%dT%H:%M:%S", date: "%Y-%m-%d", time: "%H:%M:%S" }, y.prototype.minFromRange = function() {
- var s = this.range, n = s.type, P = this.max, _ = this.chart.time, I = function(g, m) {
- var L = n === "year" ? "FullYear" : "Month", z = new _.Date(g), $ = _.get(L, z);
- return _.set(L, z, $ + m), $ === _.get(L, z) && _.set("Date", z, 0), z.getTime() - g;
- };
- if (b(s))
- var W = P - s, E = s;
- else
- W = P + I(P, -s.count), this.chart && (this.chart.fixedRange = P - W);
- var X = h(this.dataMin, Number.MIN_VALUE);
- return b(W) || (W = X), W <= X && (W = X, typeof E > "u" && (E = I(W, s.count)), this.newMax = Math.min(W + E, this.dataMax)), b(P) || (W = void 0), W;
- }, !D.RangeSelector) {
- var a = [], t = function(s) {
- function n() {
- _ && (P = s.xAxis[0].getExtremes(), I = s.legend, E = _ && _.options.verticalAlign, b(P.min) && _.render(P.min, P.max), I.display && E === "top" && E === I.options.verticalAlign && (W = w(s.spacingBox), W.y = I.options.layout === "vertical" ? s.plotTop : W.y + _.getHeight(), I.group.placed = !1, I.align(W)));
- }
- var P, _ = s.rangeSelector, I, W, E;
- _ && (j(a, function(X) {
- return X[0] === s;
- }) || a.push([s, [B(s.xAxis[0], "afterSetExtremes", function(X) {
- _ && _.render(X.min, X.max);
- }), B(s, "redraw", n)]]), n());
- };
- B(N, "afterGetContainer", function() {
- this.options.rangeSelector && this.options.rangeSelector.enabled && (this.rangeSelector = new c(this));
- }), B(N, "beforeRender", function() {
- var s = this.axes, n = this.rangeSelector;
- n && (b(n.deferredYTDClick) && (n.clickButton(n.deferredYTDClick), delete n.deferredYTDClick), s.forEach(function(P) {
- P.updateNames(), P.setScale();
- }), this.getAxisMargins(), n.render(), s = n.options.verticalAlign, n.options.floating || (s === "bottom" ? this.extraBottomMargin = !0 : s !== "middle" && (this.extraTopMargin = !0)));
- }), B(N, "update", function(s) {
- var n = s.options.rangeSelector;
- s = this.rangeSelector;
- var P = this.extraBottomMargin, _ = this.extraTopMargin;
- n && n.enabled && !f(s) && this.options.rangeSelector && (this.options.rangeSelector.enabled = !0, this.rangeSelector = s = new c(this)), this.extraTopMargin = this.extraBottomMargin = !1, s && (t(this), n = n && n.verticalAlign || s.options && s.options.verticalAlign, s.options.floating || (n === "bottom" ? this.extraBottomMargin = !0 : n !== "middle" && (this.extraTopMargin = !0)), this.extraBottomMargin !== P || this.extraTopMargin !== _) && (this.isDirtyBox = !0);
- }), B(N, "render", function() {
- var s = this.rangeSelector;
- s && !s.options.floating && (s.render(), s = s.options.verticalAlign, s === "bottom" ? this.extraBottomMargin = !0 : s !== "middle" && (this.extraTopMargin = !0));
- }), B(N, "getMargins", function() {
- var s = this.rangeSelector;
- s && (s = s.getHeight(), this.extraTopMargin && (this.plotTop += s), this.extraBottomMargin && (this.marginBottom += s));
- }), N.prototype.callbacks.push(t), B(N, "destroy", function() {
- for (var s = 0; s < a.length; s++) {
- var n = a[s];
- if (n[0] === this) {
- n[1].forEach(function(P) {
- return P();
- }), a.splice(s, 1);
- break;
- }
- }
- }), D.RangeSelector = c;
- }
- return c;
- }), M(
- o,
- "Core/Chart/StockChart.js",
- [o["Core/Animation/AnimationUtilities.js"], o["Core/Axis/Axis.js"], o["Core/Chart/Chart.js"], o["Core/FormatUtilities.js"], o["Core/DefaultOptions.js"], o["Core/Series/Series.js"], o["Core/Renderer/SVG/SVGRenderer.js"], o["Core/Utilities.js"]],
- function(y, N, D, U, H, V, G, R) {
- function B(u, i) {
- return u === "xAxis" ? { minPadding: 0, maxPadding: 0, overscroll: 0, ordinal: !0, title: { text: null }, labels: { overflow: "justify" }, showLastLabel: !0 } : u === "yAxis" ? { labels: { y: -2 }, opposite: l(i.opposite, !0), showLastLabel: !(!i.categories && i.type !== "category"), title: { text: null } } : {};
- }
- function S(u, i) {
- if (u === "xAxis") {
- u = d();
- var c = { type: "datetime", categories: void 0 };
- return l(i.navigator && i.navigator.enabled, u.navigator.enabled, !0) && (c.startOnTick = !1, c.endOnTick = !1), c;
- }
- return {};
- }
- var x = this && this.__extends || function() {
- var u = function(i, c) {
- return u = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(a, t) {
- a.__proto__ = t;
- } || function(a, t) {
- for (var s in t)
- t.hasOwnProperty(s) && (a[s] = t[s]);
- }, u(i, c);
- };
- return function(i, c) {
- function a() {
- this.constructor = i;
- }
- u(i, c), i.prototype = c === null ? Object.create(c) : (a.prototype = c.prototype, new a());
- };
- }(), f = U.format, d = H.getOptions;
- y = R.addEvent;
- var T = R.clamp, O = R.defined, j = R.extend, k = R.find, b = R.isNumber, w = R.isString, v = R.merge, l = R.pick, h = R.splat;
- return R = function(u) {
- function i() {
- return u !== null && u.apply(this, arguments) || this;
- }
- return x(i, u), i.prototype.init = function(c, a) {
- var t = d(), s = c.xAxis, n = c.yAxis, P = l(c.navigator && c.navigator.enabled, t.navigator.enabled, !0);
- c.xAxis = c.yAxis = void 0, P = v({ chart: { panning: { enabled: !0, type: "x" }, pinchType: "x" }, navigator: { enabled: P }, scrollbar: { enabled: l(t.scrollbar && t.scrollbar.enabled, !0) }, rangeSelector: { enabled: l(t.rangeSelector.enabled, !0) }, title: { text: null }, tooltip: { split: l(t.tooltip.split, !0), crosshairs: !0 }, legend: { enabled: !1 } }, c, { isStock: !0 }), c.xAxis = s, c.yAxis = n, P.xAxis = h(c.xAxis || {}).map(function(_, I) {
- return v(B("xAxis", _), t.xAxis, t.xAxis && t.xAxis[I], _, S("xAxis", c));
- }), P.yAxis = h(c.yAxis || {}).map(function(_, I) {
- return v(B("yAxis", _), t.yAxis, t.yAxis && t.yAxis[I], _);
- }), u.prototype.init.call(this, P, a);
- }, i.prototype.createAxis = function(c, a) {
- return a.axis = v(B(c, a.axis), a.axis, S(c, this.userOptions)), u.prototype.createAxis.call(this, c, a);
- }, i;
- }(D), function(u) {
- u.stockChart = function(i, c, a) {
- return new u(i, c, a);
- };
- }(R || (R = {})), y(V, "setOptions", function(u) {
- var i;
- this.chart.options.isStock && (this.is("column") || this.is("columnrange") ? i = { borderWidth: 0, shadow: !1 } : this.is("scatter") || this.is("sma") || (i = { marker: { enabled: !1, radius: 2 } }), i && (u.plotOptions[this.type] = v(u.plotOptions[this.type], i)));
- }), y(N, "autoLabelAlign", function(u) {
- var i = this.chart, c = this.options;
- i = i._labelPanes = i._labelPanes || {};
- var a = this.options.labels;
- this.chart.options.isStock && this.coll === "yAxis" && (c = c.top + "," + c.height, !i[c] && a.enabled && (a.x === 15 && (a.x = 0), typeof a.align > "u" && (a.align = "right"), i[c] = this, u.align = "right", u.preventDefault()));
- }), y(N, "destroy", function() {
- var u = this.chart, i = this.options && this.options.top + "," + this.options.height;
- i && u._labelPanes && u._labelPanes[i] === this && delete u._labelPanes[i];
- }), y(N, "getPlotLinePath", function(u) {
- function i(F) {
- var Y = F === "xAxis" ? "yAxis" : "xAxis";
- return F = c.options[Y], b(F) ? [t[Y][F]] : w(F) ? [t.get(F)] : a.map(function(Z) {
- return Z[Y];
- });
- }
- var c = this, a = this.isLinked && !this.series ? this.linkedParent.series : this.series, t = c.chart, s = t.renderer, n = c.left, P = c.top, _, I, W, E, X = [], g = [], m = u.translatedValue, L = u.value, z = u.force;
- if (t.options.isStock && u.acrossPanes !== !1 && c.coll === "xAxis" || c.coll === "yAxis") {
- u.preventDefault(), g = i(c.coll);
- var $ = c.isXAxis ? t.yAxis : t.xAxis;
- $.forEach(function(F) {
- if (!O(F.options.id) || F.options.id.indexOf("navigator") === -1) {
- var Y = F.isXAxis ? "yAxis" : "xAxis";
- Y = O(F.options[Y]) ? t[Y][F.options[Y]] : t[Y][0], c === Y && g.push(F);
- }
- });
- var Q = g.length ? [] : [c.isXAxis ? t.yAxis[0] : t.xAxis[0]];
- g.forEach(function(F) {
- Q.indexOf(F) !== -1 || k(Q, function(Y) {
- return Y.pos === F.pos && Y.len === F.len;
- }) || Q.push(F);
- });
- var A = l(m, c.translate(L, null, null, u.old));
- b(A) && (c.horiz ? Q.forEach(function(F) {
- var Y;
- I = F.pos, E = I + F.len, _ = W = Math.round(A + c.transB), z !== "pass" && (_ < n || _ > n + c.width) && (z ? _ = W = T(_, n, n + c.width) : Y = !0), Y || X.push(["M", _, I], ["L", W, E]);
- }) : Q.forEach(function(F) {
- var Y;
- _ = F.pos, W = _ + F.len, I = E = Math.round(P + c.height - A), z !== "pass" && (I < P || I > P + c.height) && (z ? I = E = T(I, P, P + c.height) : Y = !0), Y || X.push(["M", _, I], ["L", W, E]);
- })), u.path = 0 < X.length ? s.crispPolyLine(X, u.lineWidth || 1) : null;
- }
- }), G.prototype.crispPolyLine = function(u, i) {
- for (var c = 0; c < u.length; c += 2) {
- var a = u[c], t = u[c + 1];
- a[1] === t[1] && (a[1] = t[1] = Math.round(a[1]) - i % 2 / 2), a[2] === t[2] && (a[2] = t[2] = Math.round(a[2]) + i % 2 / 2);
- }
- return u;
- }, y(N, "afterHideCrosshair", function() {
- this.crossLabel && (this.crossLabel = this.crossLabel.hide());
- }), y(N, "afterDrawCrosshair", function(u) {
- var i, c;
- if (this.crosshair && this.crosshair.label && this.crosshair.label.enabled && this.cross && b(this.min) && b(this.max)) {
- var a = this.chart, t = this.logarithmic, s = this.crosshair.label, n = this.horiz, P = this.opposite, _ = this.left, I = this.top, W = this.crossLabel, E = s.format, X = "", g = this.options.tickPosition === "inside", m = this.crosshair.snap !== !1, L = 0, z = u.e || this.cross && this.cross.e;
- u = u.point;
- var $ = this.min, Q = this.max;
- t && ($ = t.lin2log($), Q = t.lin2log(Q)), t = n ? "center" : P ? this.labelAlign === "right" ? "right" : "left" : this.labelAlign === "left" ? "left" : "center", W || (W = this.crossLabel = a.renderer.label("", 0, void 0, s.shape || "callout").addClass("highcharts-crosshair-label highcharts-color-" + (u ? u.series.colorIndex : this.series[0] && this.series[0].colorIndex)).attr({ align: s.align || t, padding: l(s.padding, 8), r: l(s.borderRadius, 3), zIndex: 2 }).add(this.labelGroup), a.styledMode || W.attr({ fill: s.backgroundColor || u && u.series && u.series.color || "#666666", stroke: s.borderColor || "", "stroke-width": s.borderWidth || 0 }).css(j({ color: "#ffffff", fontWeight: "normal", fontSize: "11px", textAlign: "center" }, s.style || {}))), n ? (t = m ? (u.plotX || 0) + _ : z.chartX, I += P ? 0 : this.height) : (t = P ? this.width + _ : 0, I = m ? (u.plotY || 0) + I : z.chartY), E || s.formatter || (this.dateTime && (X = "%b %d, %Y"), E = "{value" + (X ? ":" + X : "") + "}"), X = m ? this.isXAxis ? u.x : u.y : this.toValue(n ? z.chartX : z.chartY), m = u ? u.series.isPointInside(u) : b(X) && X > $ && X < Q, z = "", E ? z = f(E, { value: X }, a) : s.formatter && b(X) && (z = s.formatter.call(this, X)), W.attr({ text: z, x: t, y: I, visibility: m ? "visible" : "hidden" }), s = W.getBBox(), b(W.y) && (n ? (g && !P || !g && P) && (I = W.y - s.height) : I = W.y - s.height / 2), n ? (i = _ - s.x, c = _ + this.width - s.x) : (i = this.labelAlign === "left" ? _ : 0, c = this.labelAlign === "right" ? _ + this.width : a.chartWidth), W.translateX < i && (L = i - W.translateX), W.translateX + s.width >= c && (L = -(W.translateX + s.width - c)), W.attr({ x: t + L, y: I, anchorX: n ? t : this.opposite ? 0 : a.chartWidth, anchorY: n ? this.opposite ? a.chartHeight : 0 : I + s.height / 2 });
- }
- }), V.prototype.forceCropping = function() {
- var u = this.chart, i = this.options.dataGrouping;
- return this.allowDG !== !1 && i && l(i.enabled, u.options.isStock);
- }, y(D, "update", function(u) {
- u = u.options, "scrollbar" in u && this.navigator && (v(!0, this.options.scrollbar, u.scrollbar), this.navigator.update({}, !1), delete u.scrollbar);
- }), R;
- }
- ), M(o, "masters/modules/stock.src.js", [
- o["Core/Globals.js"],
- o["Core/Axis/OrdinalAxis.js"],
- o["Series/DataModifyComposition.js"],
- o["Core/Scrollbar.js"],
- o["Core/Chart/StockChart.js"]
- ], function(y, N, D, U, H) {
- y.Scrollbar = U, y.StockChart = y.stockChart = H.stockChart, U.compose(y.Axis), N.compose(y.Axis, y.Series, y.Chart), D.compose(y.Series, y.Axis, y.Point);
- }), M(o, "masters/highstock.src.js", [o["masters/highcharts.src.js"]], function(y) {
- return y.product = "Highstock", y;
- }), o["masters/highstock.src.js"]._modules = o, o["masters/highstock.src.js"];
- });
- })(iu);
- var U0 = iu.exports;
- const Vr = /* @__PURE__ */ Cn(U0);
- var ru = { exports: {} };
- (function(r) {
- (function(p, M) {
- r.exports ? (M.default = M, r.exports = p.document ? M(p) : M) : (p.Highcharts && p.Highcharts.error(16, !0), p.Highcharts = M(p));
- })(typeof window < "u" ? window : Gr, function(p) {
- function M(y, N, D, U) {
- y.hasOwnProperty(N) || (y[N] = U.apply(null, D));
- }
- var o = {};
- return M(o, "Core/Globals.js", [], function() {
- var y = typeof p < "u" ? p : typeof window < "u" ? window : {}, N;
- return function(D) {
- D.SVG_NS = "http://www.w3.org/2000/svg", D.product = "Highcharts", D.version = "9.3.3", D.win = y, D.doc = D.win.document, D.svg = D.doc && D.doc.createElementNS && !!D.doc.createElementNS(D.SVG_NS, "svg").createSVGRect, D.userAgent = D.win.navigator && D.win.navigator.userAgent || "", D.isChrome = D.userAgent.indexOf("Chrome") !== -1, D.isFirefox = D.userAgent.indexOf("Firefox") !== -1, D.isMS = /(edge|msie|trident)/i.test(D.userAgent) && !D.win.opera, D.isSafari = !D.isChrome && D.userAgent.indexOf("Safari") !== -1, D.isTouchDevice = /(Mobile|Android|Windows Phone)/.test(D.userAgent), D.isWebKit = D.userAgent.indexOf("AppleWebKit") !== -1, D.deg2rad = 2 * Math.PI / 360, D.hasBidiBug = D.isFirefox && 4 > parseInt(D.userAgent.split("Firefox/")[1], 10), D.hasTouch = !!D.win.TouchEvent, D.marginNames = ["plotTop", "marginRight", "marginBottom", "plotLeft"], D.noop = function() {
- }, D.supportsPassiveEvents = function() {
- var U = !1;
- if (!D.isMS) {
- var H = Object.defineProperty({}, "passive", { get: function() {
- U = !0;
- } });
- D.win.addEventListener && D.win.removeEventListener && (D.win.addEventListener(
- "testPassive",
- D.noop,
- H
- ), D.win.removeEventListener("testPassive", D.noop, H));
- }
- return U;
- }(), D.charts = [], D.dateFormats = {}, D.seriesTypes = {}, D.symbolSizes = {}, D.chartCount = 0;
- }(N || (N = {})), N;
- }), M(o, "Core/Utilities.js", [o["Core/Globals.js"]], function(y) {
- function N(t, s, n, P) {
- var _ = s ? "Highcharts error" : "Highcharts warning";
- t === 32 && (t = _ + ": Deprecated member");
- var I = S(t), W = I ? _ + " #" + t + ": www.highcharts.com/errors/" + t + "/" : t.toString();
- if (typeof P < "u") {
- var E = "";
- I && (W += "?"), b(P, function(X, g) {
- E += `
- - ` + g + ": " + X, I && (W += encodeURI(g) + "=" + encodeURI(X));
- }), W += E;
- }
- v(y, "displayError", { chart: n, code: t, message: W, params: P }, function() {
- if (s)
- throw Error(W);
- u.console && N.messages.indexOf(W) === -1 && console.warn(W);
- }), N.messages.push(W);
- }
- function D(t, s) {
- var n = {};
- return b(t, function(P, _) {
- G(t[_], !0) && !t.nodeType && s[_] ? (P = D(t[_], s[_]), Object.keys(P).length && (n[_] = P)) : (G(t[_]) || t[_] !== s[_]) && (n[_] = t[_]);
- }), n;
- }
- function U(t, s) {
- return parseInt(t, s || 10);
- }
- function H(t) {
- return typeof t == "string";
- }
- function V(t) {
- return t = Object.prototype.toString.call(t), t === "[object Array]" || t === "[object Array Iterator]";
- }
- function G(t, s) {
- return !!t && typeof t == "object" && (!s || !V(t));
- }
- function R(t) {
- return G(t) && typeof t.nodeType == "number";
- }
- function B(t) {
- var s = t && t.constructor;
- return !(!G(t, !0) || R(t) || !s || !s.name || s.name === "Object");
- }
- function S(t) {
- return typeof t == "number" && !isNaN(t) && 1 / 0 > t && -1 / 0 < t;
- }
- function x(t) {
- return typeof t < "u" && t !== null;
- }
- function f(t, s, n) {
- var P;
- return H(s) ? x(n) ? t.setAttribute(s, n) : t && t.getAttribute && ((P = t.getAttribute(s)) || s !== "class" || (P = t.getAttribute(s + "Name"))) : b(s, function(_, I) {
- x(_) ? t.setAttribute(I, _) : t.removeAttribute(I);
- }), P;
- }
- function d(t, s) {
- var n;
- t || (t = {});
- for (n in s)
- t[n] = s[n];
- return t;
- }
- function T() {
- for (var t = arguments, s = t.length, n = 0; n < s; n++) {
- var P = t[n];
- if (typeof P < "u" && P !== null)
- return P;
- }
- }
- function O(t, s) {
- y.isMS && !y.svg && s && typeof s.opacity < "u" && (s.filter = "alpha(opacity=" + 100 * s.opacity + ")"), d(t.style, s);
- }
- function j(t, s) {
- return 1e14 < t ? t : parseFloat(t.toPrecision(s || 14));
- }
- function k(t, s, n) {
- var P = y.getStyle || k;
- if (s === "width")
- return s = Math.min(t.offsetWidth, t.scrollWidth), n = t.getBoundingClientRect && t.getBoundingClientRect().width, n < s && n >= s - 1 && (s = Math.floor(n)), Math.max(0, s - (P(t, "padding-left", !0) || 0) - (P(t, "padding-right", !0) || 0));
- if (s === "height")
- return Math.max(0, Math.min(t.offsetHeight, t.scrollHeight) - (P(t, "padding-top", !0) || 0) - (P(t, "padding-bottom", !0) || 0));
- if (u.getComputedStyle || N(27, !0), t = u.getComputedStyle(t, void 0)) {
- var _ = t.getPropertyValue(s);
- T(n, s !== "opacity") && (_ = U(_));
- }
- return _;
- }
- function b(t, s, n) {
- for (var P in t)
- Object.hasOwnProperty.call(t, P) && s.call(n || t[P], t[P], P, t);
- }
- function w(t, s, n) {
- function P(E, X) {
- var g = t.removeEventListener || y.removeEventListenerPolyfill;
- g && g.call(t, E, X, !1);
- }
- function _(E) {
- var X;
- if (t.nodeName) {
- if (s) {
- var g = {};
- g[s] = !0;
- } else
- g = E;
- b(g, function(m, L) {
- if (E[L])
- for (X = E[L].length; X--; )
- P(L, E[L][X].fn);
- });
- }
- }
- var I = typeof t == "function" && t.prototype || t;
- if (Object.hasOwnProperty.call(I, "hcEvents")) {
- var W = I.hcEvents;
- s ? (I = W[s] || [], n ? (W[s] = I.filter(function(E) {
- return n !== E.fn;
- }), P(s, n)) : (_(W), W[s] = [])) : (_(W), delete I.hcEvents);
- }
- }
- function v(t, s, n, P) {
- if (n = n || {}, h.createEvent && (t.dispatchEvent || t.fireEvent && t !== y)) {
- var _ = h.createEvent("Events");
- _.initEvent(s, !0, !0), n = d(_, n), t.dispatchEvent ? t.dispatchEvent(n) : t.fireEvent(s, n);
- } else if (t.hcEvents) {
- n.target || d(n, { preventDefault: function() {
- n.defaultPrevented = !0;
- }, target: t, type: s }), _ = [];
- for (var I = t, W = !1; I.hcEvents; )
- Object.hasOwnProperty.call(I, "hcEvents") && I.hcEvents[s] && (_.length && (W = !0), _.unshift.apply(_, I.hcEvents[s])), I = Object.getPrototypeOf(I);
- W && _.sort(function(E, X) {
- return E.order - X.order;
- }), _.forEach(function(E) {
- E.fn.call(t, n) === !1 && n.preventDefault();
- });
- }
- P && !n.defaultPrevented && P.call(t, n);
- }
- var l = y.charts, h = y.doc, u = y.win;
- (N || (N = {})).messages = [], Math.easeInOutSine = function(t) {
- return -0.5 * (Math.cos(Math.PI * t) - 1);
- };
- var i = Array.prototype.find ? function(t, s) {
- return t.find(s);
- } : function(t, s) {
- var n, P = t.length;
- for (n = 0; n < P; n++)
- if (s(t[n], n))
- return t[n];
- };
- b({ map: "map", each: "forEach", grep: "filter", reduce: "reduce", some: "some" }, function(t, s) {
- y[s] = function(n) {
- var P;
- return N(32, !1, void 0, (P = {}, P["Highcharts." + s] = "use Array." + t, P)), Array.prototype[t].apply(n, [].slice.call(arguments, 1));
- };
- });
- var c, a = function() {
- var t = Math.random().toString(36).substring(2, 9) + "-", s = 0;
- return function() {
- return "highcharts-" + (c ? "" : t) + s++;
- };
- }();
- return u.jQuery && (u.jQuery.fn.highcharts = function() {
- var t = [].slice.call(arguments);
- if (this[0])
- return t[0] ? (new y[H(t[0]) ? t.shift() : "Chart"](this[0], t[0], t[1]), this) : l[f(this[0], "data-highcharts-chart")];
- }), i = { addEvent: function(t, s, n, P) {
- P === void 0 && (P = {});
- var _ = typeof t == "function" && t.prototype || t;
- Object.hasOwnProperty.call(_, "hcEvents") || (_.hcEvents = {}), _ = _.hcEvents, y.Point && t instanceof y.Point && t.series && t.series.chart && (t.series.chart.runTrackerClick = !0);
- var I = t.addEventListener || y.addEventListenerPolyfill;
- return I && I.call(t, s, n, y.supportsPassiveEvents ? { passive: P.passive === void 0 ? s.indexOf("touch") !== -1 : P.passive, capture: !1 } : !1), _[s] || (_[s] = []), _[s].push({ fn: n, order: typeof P.order == "number" ? P.order : 1 / 0 }), _[s].sort(function(W, E) {
- return W.order - E.order;
- }), function() {
- w(t, s, n);
- };
- }, arrayMax: function(t) {
- for (var s = t.length, n = t[0]; s--; )
- t[s] > n && (n = t[s]);
- return n;
- }, arrayMin: function(t) {
- for (var s = t.length, n = t[0]; s--; )
- t[s] < n && (n = t[s]);
- return n;
- }, attr: f, clamp: function(t, s, n) {
- return t > s ? t < n ? t : n : s;
- }, cleanRecursively: D, clearTimeout: function(t) {
- x(t) && clearTimeout(t);
- }, correctFloat: j, createElement: function(t, s, n, P, _) {
- return t = h.createElement(t), s && d(t, s), _ && O(t, { padding: "0", border: "none", margin: "0" }), n && O(t, n), P && P.appendChild(t), t;
- }, css: O, defined: x, destroyObjectProperties: function(t, s) {
- b(t, function(n, P) {
- n && n !== s && n.destroy && n.destroy(), delete t[P];
- });
- }, discardElement: function(t) {
- t && t.parentElement && t.parentElement.removeChild(t);
- }, erase: function(t, s) {
- for (var n = t.length; n--; )
- if (t[n] === s) {
- t.splice(n, 1);
- break;
- }
- }, error: N, extend: d, extendClass: function(t, s) {
- var n = function() {
- };
- return n.prototype = new t(), d(n.prototype, s), n;
- }, find: i, fireEvent: v, getMagnitude: function(t) {
- return Math.pow(10, Math.floor(Math.log(t) / Math.LN10));
- }, getNestedProperty: function(t, s) {
- for (t = t.split("."); t.length && x(s); ) {
- var n = t.shift();
- if (typeof n > "u" || n === "__proto__" || (s = s[n], !x(s) || typeof s == "function" || typeof s.nodeType == "number" || s === u))
- return;
- }
- return s;
- }, getStyle: k, inArray: function(t, s, n) {
- return N(32, !1, void 0, { "Highcharts.inArray": "use Array.indexOf" }), s.indexOf(t, n);
- }, isArray: V, isClass: B, isDOMElement: R, isFunction: function(t) {
- return typeof t == "function";
- }, isNumber: S, isObject: G, isString: H, keys: function(t) {
- return N(32, !1, void 0, { "Highcharts.keys": "use Object.keys" }), Object.keys(t);
- }, merge: function() {
- var t, s = arguments, n = {}, P = function(I, W) {
- return typeof I != "object" && (I = {}), b(W, function(E, X) {
- X !== "__proto__" && X !== "constructor" && (!G(E, !0) || B(E) || R(E) ? I[X] = W[X] : I[X] = P(I[X] || {}, E));
- }), I;
- };
- s[0] === !0 && (n = s[1], s = Array.prototype.slice.call(s, 2));
- var _ = s.length;
- for (t = 0; t < _; t++)
- n = P(n, s[t]);
- return n;
- }, normalizeTickInterval: function(t, s, n, P, _) {
- var I = t;
- n = T(n, 1);
- var W = t / n;
- for (s || (s = _ ? [1, 1.2, 1.5, 2, 2.5, 3, 4, 5, 6, 8, 10] : [1, 2, 2.5, 5, 10], P === !1 && (n === 1 ? s = s.filter(function(E) {
- return E % 1 === 0;
- }) : 0.1 >= n && (s = [1 / n]))), P = 0; P < s.length && (I = s[P], !(_ && I * n >= t || !_ && W <= (s[P] + (s[P + 1] || s[P])) / 2)); P++)
- ;
- return I = j(I * n, -Math.round(Math.log(1e-3) / Math.LN10));
- }, objectEach: b, offset: function(t) {
- var s = h.documentElement;
- return t = t.parentElement || t.parentNode ? t.getBoundingClientRect() : { top: 0, left: 0, width: 0, height: 0 }, { top: t.top + (u.pageYOffset || s.scrollTop) - (s.clientTop || 0), left: t.left + (u.pageXOffset || s.scrollLeft) - (s.clientLeft || 0), width: t.width, height: t.height };
- }, pad: function(t, s, n) {
- return Array((s || 2) + 1 - String(t).replace("-", "").length).join(n || "0") + t;
- }, pick: T, pInt: U, relativeLength: function(t, s, n) {
- return /%$/.test(t) ? s * parseFloat(t) / 100 + (n || 0) : parseFloat(t);
- }, removeEvent: w, splat: function(t) {
- return V(t) ? t : [t];
- }, stableSort: function(t, s) {
- var n = t.length, P, _;
- for (_ = 0; _ < n; _++)
- t[_].safeI = _;
- for (t.sort(function(I, W) {
- return P = s(I, W), P === 0 ? I.safeI - W.safeI : P;
- }), _ = 0; _ < n; _++)
- delete t[_].safeI;
- }, syncTimeout: function(t, s, n) {
- return 0 < s ? setTimeout(t, s, n) : (t.call(0, n), -1);
- }, timeUnits: {
- millisecond: 1,
- second: 1e3,
- minute: 6e4,
- hour: 36e5,
- day: 864e5,
- week: 6048e5,
- month: 24192e5,
- year: 314496e5
- }, uniqueKey: a, useSerialIds: function(t) {
- return c = T(t, c);
- }, wrap: function(t, s, n) {
- var P = t[s];
- t[s] = function() {
- var _ = Array.prototype.slice.call(arguments), I = arguments, W = this;
- return W.proceed = function() {
- P.apply(W, arguments.length ? arguments : I);
- }, _.unshift(P), _ = n.apply(this, _), W.proceed = null, _;
- };
- } }, i;
- }), M(o, "Core/Chart/ChartDefaults.js", [], function() {
- return { panning: { enabled: !1, type: "x" }, styledMode: !1, borderRadius: 0, colorCount: 10, defaultSeriesType: "line", ignoreHiddenSeries: !0, spacing: [
- 10,
- 10,
- 15,
- 10
- ], resetZoomButton: { theme: { zIndex: 6 }, position: { align: "right", x: -10, y: 10 } }, zoomBySingleTouch: !1, width: null, height: null, borderColor: "#335cad", backgroundColor: "#ffffff", plotBorderColor: "#cccccc" };
- }), M(o, "Core/Color/Color.js", [o["Core/Globals.js"], o["Core/Utilities.js"]], function(y, N) {
- var D = N.isNumber, U = N.merge, H = N.pInt;
- return N = function() {
- function V(G) {
- this.rgba = [NaN, NaN, NaN, NaN], this.input = G;
- var R = y.Color;
- if (R && R !== V)
- return new R(G);
- if (!(this instanceof V))
- return new V(G);
- this.init(G);
- }
- return V.parse = function(G) {
- return G ? new V(G) : V.None;
- }, V.prototype.init = function(G) {
- var R;
- if (typeof G == "object" && typeof G.stops < "u")
- this.stops = G.stops.map(function(f) {
- return new V(f[1]);
- });
- else if (typeof G == "string") {
- if (this.input = G = V.names[G.toLowerCase()] || G, G.charAt(0) === "#") {
- var B = G.length, S = parseInt(G.substr(1), 16);
- B === 7 ? R = [(S & 16711680) >> 16, (S & 65280) >> 8, S & 255, 1] : B === 4 && (R = [(S & 3840) >> 4 | (S & 3840) >> 8, (S & 240) >> 4 | S & 240, (S & 15) << 4 | S & 15, 1]);
- }
- if (!R)
- for (S = V.parsers.length; S-- && !R; ) {
- var x = V.parsers[S];
- (B = x.regex.exec(G)) && (R = x.parse(B));
- }
- }
- R && (this.rgba = R);
- }, V.prototype.get = function(G) {
- var R = this.input, B = this.rgba;
- if (typeof R == "object" && typeof this.stops < "u") {
- var S = U(R);
- return S.stops = [].slice.call(S.stops), this.stops.forEach(function(x, f) {
- S.stops[f] = [S.stops[f][0], x.get(G)];
- }), S;
- }
- return B && D(B[0]) ? G === "rgb" || !G && B[3] === 1 ? "rgb(" + B[0] + "," + B[1] + "," + B[2] + ")" : G === "a" ? "" + B[3] : "rgba(" + B.join(",") + ")" : R;
- }, V.prototype.brighten = function(G) {
- var R = this.rgba;
- if (this.stops)
- this.stops.forEach(function(S) {
- S.brighten(G);
- });
- else if (D(G) && G !== 0)
- for (var B = 0; 3 > B; B++)
- R[B] += H(255 * G), 0 > R[B] && (R[B] = 0), 255 < R[B] && (R[B] = 255);
- return this;
- }, V.prototype.setOpacity = function(G) {
- return this.rgba[3] = G, this;
- }, V.prototype.tweenTo = function(G, R) {
- var B = this.rgba, S = G.rgba;
- return !D(B[0]) || !D(S[0]) ? G.input || "none" : (G = S[3] !== 1 || B[3] !== 1, (G ? "rgba(" : "rgb(") + Math.round(S[0] + (B[0] - S[0]) * (1 - R)) + "," + Math.round(S[1] + (B[1] - S[1]) * (1 - R)) + "," + Math.round(S[2] + (B[2] - S[2]) * (1 - R)) + (G ? "," + (S[3] + (B[3] - S[3]) * (1 - R)) : "") + ")");
- }, V.names = { white: "#ffffff", black: "#000000" }, V.parsers = [{
- regex: /rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/,
- parse: function(G) {
- return [H(G[1]), H(G[2]), H(G[3]), parseFloat(G[4], 10)];
- }
- }, { regex: /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/, parse: function(G) {
- return [H(G[1]), H(G[2]), H(G[3]), 1];
- } }], V.None = new V(""), V;
- }(), N;
- }), M(o, "Core/Color/Palettes.js", [], function() {
- return { colors: "#7cb5ec #434348 #90ed7d #f7a35c #8085e9 #f15c80 #e4d354 #2b908f #f45b5b #91e8e1".split(" ") };
- }), M(o, "Core/Time.js", [o["Core/Globals.js"], o["Core/Utilities.js"]], function(y, N) {
- var D = y.win, U = N.defined, H = N.error, V = N.extend, G = N.isObject, R = N.merge, B = N.objectEach, S = N.pad, x = N.pick, f = N.splat, d = N.timeUnits, T = y.isSafari && D.Intl && D.Intl.DateTimeFormat.prototype.formatRange, O = y.isSafari && D.Intl && !D.Intl.DateTimeFormat.prototype.formatRange;
- return N = function() {
- function j(k) {
- this.options = {}, this.variableTimezone = this.useUTC = !1, this.Date = D.Date, this.getTimezoneOffset = this.timezoneOffsetFunction(), this.update(k);
- }
- return j.prototype.get = function(k, b) {
- if (this.variableTimezone || this.timezoneOffset) {
- var w = b.getTime(), v = w - this.getTimezoneOffset(b);
- return b.setTime(v), k = b["getUTC" + k](), b.setTime(w), k;
- }
- return this.useUTC ? b["getUTC" + k]() : b["get" + k]();
- }, j.prototype.set = function(k, b, w) {
- if (this.variableTimezone || this.timezoneOffset) {
- if (k === "Milliseconds" || k === "Seconds" || k === "Minutes" && this.getTimezoneOffset(b) % 36e5 === 0)
- return b["setUTC" + k](w);
- var v = this.getTimezoneOffset(b);
- return v = b.getTime() - v, b.setTime(v), b["setUTC" + k](w), k = this.getTimezoneOffset(b), v = b.getTime() + k, b.setTime(v);
- }
- return this.useUTC || T && k === "FullYear" ? b["setUTC" + k](w) : b["set" + k](w);
- }, j.prototype.update = function(k) {
- var b = x(k && k.useUTC, !0);
- this.options = k = R(!0, this.options || {}, k), this.Date = k.Date || D.Date || Date, this.timezoneOffset = (this.useUTC = b) && k.timezoneOffset, this.getTimezoneOffset = this.timezoneOffsetFunction(), this.variableTimezone = b && !(!k.getTimezoneOffset && !k.timezone);
- }, j.prototype.makeTime = function(k, b, w, v, l, h) {
- if (this.useUTC) {
- var u = this.Date.UTC.apply(0, arguments), i = this.getTimezoneOffset(u);
- u += i;
- var c = this.getTimezoneOffset(u);
- i !== c ? u += c - i : i - 36e5 !== this.getTimezoneOffset(u - 36e5) || O || (u -= 36e5);
- } else
- u = new this.Date(k, b, x(w, 1), x(v, 0), x(l, 0), x(h, 0)).getTime();
- return u;
- }, j.prototype.timezoneOffsetFunction = function() {
- var k = this, b = this.options, w = b.getTimezoneOffset, v = b.moment || D.moment;
- if (!this.useUTC)
- return function(l) {
- return 6e4 * new Date(l.toString()).getTimezoneOffset();
- };
- if (b.timezone) {
- if (v)
- return function(l) {
- return 6e4 * -v.tz(l, b.timezone).utcOffset();
- };
- H(25);
- }
- return this.useUTC && w ? function(l) {
- return 6e4 * w(l.valueOf());
- } : function() {
- return 6e4 * (k.timezoneOffset || 0);
- };
- }, j.prototype.dateFormat = function(k, b, w) {
- if (!U(b) || isNaN(b))
- return y.defaultOptions.lang && y.defaultOptions.lang.invalidDate || "";
- k = x(k, "%Y-%m-%d %H:%M:%S");
- var v = this, l = new this.Date(b), h = this.get("Hours", l), u = this.get("Day", l), i = this.get("Date", l), c = this.get("Month", l), a = this.get("FullYear", l), t = y.defaultOptions.lang, s = t && t.weekdays, n = t && t.shortWeekdays;
- return l = V({ a: n ? n[u] : s[u].substr(0, 3), A: s[u], d: S(i), e: S(i, 2, " "), w: u, b: t.shortMonths[c], B: t.months[c], m: S(c + 1), o: c + 1, y: a.toString().substr(2, 2), Y: a, H: S(h), k: h, I: S(h % 12 || 12), l: h % 12 || 12, M: S(this.get("Minutes", l)), p: 12 > h ? "AM" : "PM", P: 12 > h ? "am" : "pm", S: S(l.getSeconds()), L: S(Math.floor(b % 1e3), 3) }, y.dateFormats), B(l, function(P, _) {
- for (; k.indexOf("%" + _) !== -1; )
- k = k.replace("%" + _, typeof P == "function" ? P.call(v, b) : P);
- }), w ? k.substr(0, 1).toUpperCase() + k.substr(1) : k;
- }, j.prototype.resolveDTLFormat = function(k) {
- return G(k, !0) ? k : (k = f(k), { main: k[0], from: k[1], to: k[2] });
- }, j.prototype.getTimeTicks = function(k, b, w, v) {
- var l = this, h = [], u = {}, i = new l.Date(b), c = k.unitRange, a = k.count || 1, t;
- if (v = x(v, 1), U(b)) {
- if (l.set(
- "Milliseconds",
- i,
- c >= d.second ? 0 : a * Math.floor(l.get("Milliseconds", i) / a)
- ), c >= d.second && l.set("Seconds", i, c >= d.minute ? 0 : a * Math.floor(l.get("Seconds", i) / a)), c >= d.minute && l.set("Minutes", i, c >= d.hour ? 0 : a * Math.floor(l.get("Minutes", i) / a)), c >= d.hour && l.set("Hours", i, c >= d.day ? 0 : a * Math.floor(l.get("Hours", i) / a)), c >= d.day && l.set("Date", i, c >= d.month ? 1 : Math.max(1, a * Math.floor(l.get("Date", i) / a))), c >= d.month) {
- l.set("Month", i, c >= d.year ? 0 : a * Math.floor(l.get("Month", i) / a));
- var s = l.get("FullYear", i);
- }
- c >= d.year && l.set(
- "FullYear",
- i,
- s - s % a
- ), c === d.week && (s = l.get("Day", i), l.set("Date", i, l.get("Date", i) - s + v + (s < v ? -7 : 0))), s = l.get("FullYear", i), v = l.get("Month", i);
- var n = l.get("Date", i), P = l.get("Hours", i);
- for (b = i.getTime(), !l.variableTimezone && l.useUTC || !U(w) || (t = w - b > 4 * d.month || l.getTimezoneOffset(b) !== l.getTimezoneOffset(w)), b = i.getTime(), i = 1; b < w; )
- h.push(b), b = c === d.year ? l.makeTime(s + i * a, 0) : c === d.month ? l.makeTime(s, v + i * a) : !t || c !== d.day && c !== d.week ? t && c === d.hour && 1 < a ? l.makeTime(s, v, n, P + i * a) : b + c * a : l.makeTime(s, v, n + i * a * (c === d.day ? 1 : 7)), i++;
- h.push(b), c <= d.hour && 1e4 > h.length && h.forEach(function(_) {
- _ % 18e5 === 0 && l.dateFormat("%H%M%S%L", _) === "000000000" && (u[_] = "day");
- });
- }
- return h.info = V(k, { higherRanks: u, totalRange: c * a }), h;
- }, j.prototype.getDateFormat = function(k, b, w, v) {
- var l = this.dateFormat("%m-%d %H:%M:%S.%L", b), h = { millisecond: 15, second: 12, minute: 9, hour: 6, day: 3 }, u = "millisecond";
- for (i in d) {
- if (k === d.week && +this.dateFormat("%w", b) === w && l.substr(6) === "00:00:00.000") {
- var i = "week";
- break;
- }
- if (d[i] > k) {
- i = u;
- break;
- }
- if (h[i] && l.substr(h[i]) !== "01-01 00:00:00.000".substr(h[i]))
- break;
- i !== "week" && (u = i);
- }
- if (i)
- var c = this.resolveDTLFormat(v[i]).main;
- return c;
- }, j;
- }(), N;
- }), M(o, "Core/DefaultOptions.js", [o["Core/Chart/ChartDefaults.js"], o["Core/Color/Color.js"], o["Core/Globals.js"], o["Core/Color/Palettes.js"], o["Core/Time.js"], o["Core/Utilities.js"]], function(y, N, D, U, H, V) {
- N = N.parse;
- var G = V.merge, R = {
- colors: U.colors,
- symbols: ["circle", "diamond", "square", "triangle", "triangle-down"],
- lang: {
- loading: "Loading...",
- months: "January February March April May June July August September October November December".split(" "),
- shortMonths: "Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),
- weekdays: "Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),
- decimalPoint: ".",
- numericSymbols: "kMGTPE".split(""),
- resetZoom: "Reset zoom",
- resetZoomTitle: "Reset zoom level 1:1",
- thousandsSep: " "
- },
- global: {},
- time: { Date: void 0, getTimezoneOffset: void 0, timezone: void 0, timezoneOffset: 0, useUTC: !0 },
- chart: y,
- title: { text: "Chart title", align: "center", margin: 15, widthAdjust: -44 },
- subtitle: { text: "", align: "center", widthAdjust: -44 },
- caption: { margin: 15, text: "", align: "left", verticalAlign: "bottom" },
- plotOptions: {},
- labels: { style: { position: "absolute", color: "#333333" } },
- legend: {
- enabled: !0,
- align: "center",
- alignColumns: !0,
- className: "highcharts-no-tooltip",
- layout: "horizontal",
- labelFormatter: function() {
- return this.name;
- },
- borderColor: "#999999",
- borderRadius: 0,
- navigation: { activeColor: "#003399", inactiveColor: "#cccccc" },
- itemStyle: { color: "#333333", cursor: "pointer", fontSize: "12px", fontWeight: "bold", textOverflow: "ellipsis" },
- itemHoverStyle: { color: "#000000" },
- itemHiddenStyle: { color: "#cccccc" },
- shadow: !1,
- itemCheckboxStyle: { position: "absolute", width: "13px", height: "13px" },
- squareSymbol: !0,
- symbolPadding: 5,
- verticalAlign: "bottom",
- x: 0,
- y: 0,
- title: { style: { fontWeight: "bold" } }
- },
- loading: { labelStyle: { fontWeight: "bold", position: "relative", top: "45%" }, style: { position: "absolute", backgroundColor: "#ffffff", opacity: 0.5, textAlign: "center" } },
- tooltip: {
- enabled: !0,
- animation: D.svg,
- borderRadius: 3,
- dateTimeLabelFormats: {
- millisecond: "%A, %b %e, %H:%M:%S.%L",
- second: "%A, %b %e, %H:%M:%S",
- minute: "%A, %b %e, %H:%M",
- hour: "%A, %b %e, %H:%M",
- day: "%A, %b %e, %Y",
- week: "Week from %A, %b %e, %Y",
- month: "%B %Y",
- year: "%Y"
- },
- footerFormat: "",
- headerShape: "callout",
- hideDelay: 500,
- padding: 8,
- shape: "callout",
- shared: !1,
- snap: D.isTouchDevice ? 25 : 10,
- headerFormat: '<span style="font-size: 10px">{point.key}</span><br/>',
- pointFormat: '<span style="color:{point.color}">●</span> {series.name}: <b>{point.y}</b><br/>',
- backgroundColor: N("#f7f7f7").setOpacity(0.85).get(),
- borderWidth: 1,
- shadow: !0,
- stickOnContact: !1,
- style: { color: "#333333", cursor: "default", fontSize: "12px", whiteSpace: "nowrap" },
- useHTML: !1
- },
- credits: { enabled: !0, href: "https://www.highcharts.com?credits", position: { align: "right", x: -10, verticalAlign: "bottom", y: -5 }, style: { cursor: "pointer", color: "#999999", fontSize: "9px" }, text: "Highcharts.com" }
- };
- R.chart.styledMode = !1;
- var B = new H(G(R.global, R.time));
- return y = { defaultOptions: R, defaultTime: B, getOptions: function() {
- return R;
- }, setOptions: function(S) {
- return G(!0, R, S), (S.time || S.global) && (D.time ? D.time.update(G(
- R.global,
- R.time,
- S.global,
- S.time
- )) : D.time = B), R;
- } }, y;
- }), M(o, "Core/Animation/Fx.js", [o["Core/Color/Color.js"], o["Core/Globals.js"], o["Core/Utilities.js"]], function(y, N, D) {
- var U = y.parse, H = N.win, V = D.isNumber, G = D.objectEach;
- return function() {
- function R(B, S, x) {
- this.pos = NaN, this.options = S, this.elem = B, this.prop = x;
- }
- return R.prototype.dSetter = function() {
- var B = this.paths, S = B && B[0];
- B = B && B[1];
- var x = this.now || 0, f = [];
- if (x !== 1 && S && B)
- if (S.length === B.length && 1 > x)
- for (var d = 0; d < B.length; d++) {
- for (var T = S[d], O = B[d], j = [], k = 0; k < O.length; k++) {
- var b = T[k], w = O[k];
- V(b) && V(w) && (O[0] !== "A" || k !== 4 && k !== 5) ? j[k] = b + x * (w - b) : j[k] = w;
- }
- f.push(j);
- }
- else
- f = B;
- else
- f = this.toD || [];
- this.elem.attr("d", f, void 0, !0);
- }, R.prototype.update = function() {
- var B = this.elem, S = this.prop, x = this.now, f = this.options.step;
- this[S + "Setter"] ? this[S + "Setter"]() : B.attr ? B.element && B.attr(S, x, null, !0) : B.style[S] = x + this.unit, f && f.call(B, x, this);
- }, R.prototype.run = function(B, S, x) {
- var f = this, d = f.options, T = function(k) {
- return T.stopped ? !1 : f.step(k);
- }, O = H.requestAnimationFrame || function(k) {
- setTimeout(
- k,
- 13
- );
- }, j = function() {
- for (var k = 0; k < R.timers.length; k++)
- R.timers[k]() || R.timers.splice(k--, 1);
- R.timers.length && O(j);
- };
- B !== S || this.elem["forceAnimate:" + this.prop] ? (this.startTime = +/* @__PURE__ */ new Date(), this.start = B, this.end = S, this.unit = x, this.now = this.start, this.pos = 0, T.elem = this.elem, T.prop = this.prop, T() && R.timers.push(T) === 1 && O(j)) : (delete d.curAnim[this.prop], d.complete && Object.keys(d.curAnim).length === 0 && d.complete.call(this.elem));
- }, R.prototype.step = function(B) {
- var S = +/* @__PURE__ */ new Date(), x = this.options, f = this.elem, d = x.complete, T = x.duration, O = x.curAnim;
- if (f.attr && !f.element)
- B = !1;
- else if (B || S >= T + this.startTime) {
- this.now = this.end, this.pos = 1, this.update();
- var j = O[this.prop] = !0;
- G(O, function(k) {
- k !== !0 && (j = !1);
- }), j && d && d.call(f), B = !1;
- } else
- this.pos = x.easing((S - this.startTime) / T), this.now = this.start + (this.end - this.start) * this.pos, this.update(), B = !0;
- return B;
- }, R.prototype.initPath = function(B, S, x) {
- function f(l, h) {
- for (; l.length < v; ) {
- var u = l[0], i = h[v - l.length];
- i && u[0] === "M" && (l[0] = i[0] === "C" ? ["C", u[1], u[2], u[1], u[2], u[1], u[2]] : [
- "L",
- u[1],
- u[2]
- ]), l.unshift(u), j && (u = l.pop(), l.push(l[l.length - 1], u));
- }
- }
- function d(l, h) {
- for (; l.length < v; )
- if (h = l[Math.floor(l.length / k) - 1].slice(), h[0] === "C" && (h[1] = h[5], h[2] = h[6]), j) {
- var u = l[Math.floor(l.length / k)].slice();
- l.splice(l.length / 2, 0, h, u);
- } else
- l.push(h);
- }
- var T = B.startX, O = B.endX;
- x = x.slice();
- var j = B.isArea, k = j ? 2 : 1;
- if (S = S && S.slice(), !S)
- return [x, x];
- if (T && O && O.length) {
- for (B = 0; B < T.length; B++)
- if (T[B] === O[0]) {
- var b = B;
- break;
- } else if (T[0] === O[O.length - T.length + B]) {
- b = B;
- var w = !0;
- break;
- } else if (T[T.length - 1] === O[O.length - T.length + B]) {
- b = T.length - B;
- break;
- }
- typeof b > "u" && (S = []);
- }
- if (S.length && V(b)) {
- var v = x.length + b * k;
- w ? (f(S, x), d(x, S)) : (f(x, S), d(S, x));
- }
- return [S, x];
- }, R.prototype.fillSetter = function() {
- R.prototype.strokeSetter.apply(this, arguments);
- }, R.prototype.strokeSetter = function() {
- this.elem.attr(this.prop, U(this.start).tweenTo(U(this.end), this.pos), void 0, !0);
- }, R.timers = [], R;
- }();
- }), M(o, "Core/Animation/AnimationUtilities.js", [o["Core/Animation/Fx.js"], o["Core/Utilities.js"]], function(y, N) {
- function D(d) {
- return B(d) ? S({ duration: 500, defer: 0 }, d) : { duration: d ? 500 : 0, defer: 0 };
- }
- function U(d, T) {
- for (var O = y.timers.length; O--; )
- y.timers[O].elem !== d || T && T !== y.timers[O].prop || (y.timers[O].stopped = !0);
- }
- var H = N.defined, V = N.getStyle, G = N.isArray, R = N.isNumber, B = N.isObject, S = N.merge, x = N.objectEach, f = N.pick;
- return { animate: function(d, T, O) {
- var j, k = "", b, w;
- if (!B(O)) {
- var v = arguments;
- O = { duration: v[2], easing: v[3], complete: v[4] };
- }
- R(O.duration) || (O.duration = 400), O.easing = typeof O.easing == "function" ? O.easing : Math[O.easing] || Math.easeInOutSine, O.curAnim = S(T), x(T, function(l, h) {
- U(d, h), w = new y(d, O, h), b = void 0, h === "d" && G(T.d) ? (w.paths = w.initPath(d, d.pathArray, T.d), w.toD = T.d, j = 0, b = 1) : d.attr ? j = d.attr(h) : (j = parseFloat(V(d, h)) || 0, h !== "opacity" && (k = "px")), b || (b = l), typeof b == "string" && b.match("px") && (b = b.replace(/px/g, "")), w.run(j, b, k);
- });
- }, animObject: D, getDeferredAnimation: function(d, T, O) {
- var j = D(T), k = 0, b = 0;
- return (O ? [O] : d.series).forEach(function(w) {
- w = D(w.options.animation), k = T && H(T.defer) ? j.defer : Math.max(k, w.duration + w.defer), b = Math.min(j.duration, w.duration);
- }), d.renderer.forExport && (k = 0), { defer: Math.max(0, k - b), duration: Math.min(k, b) };
- }, setAnimation: function(d, T) {
- T.renderer.globalAnimation = f(d, T.options.chart.animation, !0);
- }, stop: U };
- }), M(o, "Core/Renderer/HTML/AST.js", [o["Core/Globals.js"], o["Core/Utilities.js"]], function(y, N) {
- var D = y.SVG_NS, U = N.attr, H = N.createElement, V = N.error, G = N.isFunction, R = N.isString, B = N.objectEach, S = N.splat, x = (N = y.win.trustedTypes) && G(N.createPolicy) && N.createPolicy("highcharts", { createHTML: function(T) {
- return T;
- } }), f = x ? x.createHTML("") : "";
- try {
- var d = !!new DOMParser().parseFromString(f, "text/html");
- } catch {
- d = !1;
- }
- return G = function() {
- function T(O) {
- this.nodes = typeof O == "string" ? this.parseMarkup(O) : O;
- }
- return T.filterUserAttributes = function(O) {
- return B(O, function(j, k) {
- var b = !0;
- T.allowedAttributes.indexOf(k) === -1 && (b = !1), ["background", "dynsrc", "href", "lowsrc", "src"].indexOf(k) !== -1 && (b = R(j) && T.allowedReferences.some(function(w) {
- return j.indexOf(w) === 0;
- })), b || (V("Highcharts warning: Invalid attribute '" + k + "' in config"), delete O[k]);
- }), O;
- }, T.setElementHTML = function(O, j) {
- O.innerHTML = T.emptyHTML, j && new T(j).addToDOM(O);
- }, T.prototype.addToDOM = function(O) {
- function j(k, b) {
- var w;
- return S(k).forEach(function(v) {
- var l = v.tagName, h = v.textContent ? y.doc.createTextNode(v.textContent) : void 0;
- if (l)
- if (l === "#text")
- var u = h;
- else if (T.allowedTags.indexOf(l) !== -1) {
- l = y.doc.createElementNS(l === "svg" ? D : b.namespaceURI || D, l);
- var i = v.attributes || {};
- B(v, function(c, a) {
- a !== "tagName" && a !== "attributes" && a !== "children" && a !== "textContent" && (i[a] = c);
- }), U(l, T.filterUserAttributes(i)), h && l.appendChild(h), j(v.children || [], l), u = l;
- } else
- V("Highcharts warning: Invalid tagName " + l + " in config");
- u && b.appendChild(u), w = u;
- }), w;
- }
- return j(this.nodes, O);
- }, T.prototype.parseMarkup = function(O) {
- var j = [];
- if (O = O.trim(), d)
- O = new DOMParser().parseFromString(x ? x.createHTML(O) : O, "text/html");
- else {
- var k = H("div");
- k.innerHTML = O, O = { body: k };
- }
- var b = function(w, v) {
- var l = w.nodeName.toLowerCase(), h = { tagName: l };
- if (l === "#text" && (h.textContent = w.textContent || ""), l = w.attributes) {
- var u = {};
- [].forEach.call(l, function(c) {
- u[c.name] = c.value;
- }), h.attributes = u;
- }
- if (w.childNodes.length) {
- var i = [];
- [].forEach.call(w.childNodes, function(c) {
- b(c, i);
- }), i.length && (h.children = i);
- }
- v.push(h);
- };
- return [].forEach.call(O.body.childNodes, function(w) {
- return b(w, j);
- }), j;
- }, T.allowedAttributes = "aria-controls aria-describedby aria-expanded aria-haspopup aria-hidden aria-label aria-labelledby aria-live aria-pressed aria-readonly aria-roledescription aria-selected class clip-path color colspan cx cy d dx dy disabled fill height href id in markerHeight markerWidth offset opacity orient padding paddingLeft paddingRight patternUnits r refX refY role scope slope src startOffset stdDeviation stroke stroke-linecap stroke-width style tableValues result rowspan summary target tabindex text-align textAnchor textLength title type valign width x x1 x2 y y1 y2 zIndex".split(" "), T.allowedReferences = "https:// http:// mailto: / ../ ./ #".split(" "), T.allowedTags = "a abbr b br button caption circle clipPath code dd defs div dl dt em feComponentTransfer feFuncA feFuncB feFuncG feFuncR feGaussianBlur feOffset feMerge feMergeNode filter h1 h2 h3 h4 h5 h6 hr i img li linearGradient marker ol p path pattern pre rect small span stop strong style sub sup svg table text thead tbody tspan td th tr u ul #text".split(" "), T.emptyHTML = f, T;
- }(), G;
- }), M(
- o,
- "Core/FormatUtilities.js",
- [o["Core/DefaultOptions.js"], o["Core/Utilities.js"]],
- function(y, N) {
- function D(S, x, f, d) {
- S = +S || 0, x = +x;
- var T = U.lang, O = (S.toString().split(".")[1] || "").split("e")[0].length, j = S.toString().split("e"), k = x;
- if (x === -1)
- x = Math.min(O, 20);
- else if (!G(x))
- x = 2;
- else if (x && j[1] && 0 > j[1]) {
- var b = x + +j[1];
- 0 <= b ? (j[0] = (+j[0]).toExponential(b).split("e")[0], x = b) : (j[0] = j[0].split(".")[0] || 0, S = 20 > x ? (j[0] * Math.pow(10, j[1])).toFixed(x) : 0, j[1] = 0);
- }
- b = (Math.abs(j[1] ? j[0] : S) + Math.pow(10, -Math.max(x, O) - 1)).toFixed(x), O = String(B(b));
- var w = 3 < O.length ? O.length % 3 : 0;
- return f = R(f, T.decimalPoint), d = R(d, T.thousandsSep), S = (0 > S ? "-" : "") + (w ? O.substr(0, w) + d : ""), S = 0 > +j[1] && !k ? "0" : S + O.substr(w).replace(/(\d{3})(?=\d)/g, "$1" + d), x && (S += f + b.slice(-x)), j[1] && +S != 0 && (S += "e" + j[1]), S;
- }
- var U = y.defaultOptions, H = y.defaultTime, V = N.getNestedProperty, G = N.isNumber, R = N.pick, B = N.pInt;
- return { dateFormat: function(S, x, f) {
- return H.dateFormat(S, x, f);
- }, format: function(S, x, f) {
- var d = "{", T = !1, O = /f$/, j = /\.([0-9])/, k = U.lang, b = f && f.time || H;
- f = f && f.numberFormatter || D;
- for (var w = []; S; ) {
- var v = S.indexOf(d);
- if (v === -1)
- break;
- var l = S.slice(0, v);
- if (T) {
- if (l = l.split(":"), d = V(l.shift() || "", x), l.length && typeof d == "number")
- if (l = l.join(":"), O.test(l)) {
- var h = parseInt((l.match(j) || ["", "-1"])[1], 10);
- d !== null && (d = f(d, h, k.decimalPoint, -1 < l.indexOf(",") ? k.thousandsSep : ""));
- } else
- d = b.dateFormat(l, d);
- w.push(d);
- } else
- w.push(l);
- S = S.slice(v + 1), d = (T = !T) ? "}" : "{";
- }
- return w.push(S), w.join("");
- }, numberFormat: D };
- }
- ), M(o, "Core/Renderer/RendererUtilities.js", [o["Core/Utilities.js"]], function(y) {
- var N = y.clamp, D = y.pick, U = y.stableSort, H;
- return function(V) {
- function G(R, B, S) {
- var x = R, f = x.reducedLen || B, d = function(w, v) {
- return (v.rank || 0) - (w.rank || 0);
- }, T = function(w, v) {
- return w.target - v.target;
- }, O, j = !0, k = [], b = 0;
- for (O = R.length; O--; )
- b += R[O].size;
- if (b > f) {
- for (U(R, d), b = O = 0; b <= f; )
- b += R[O].size, O++;
- k = R.splice(O - 1, R.length);
- }
- for (U(R, T), R = R.map(function(w) {
- return { size: w.size, targets: [w.target], align: D(w.align, 0.5) };
- }); j; ) {
- for (O = R.length; O--; )
- f = R[O], d = (Math.min.apply(0, f.targets) + Math.max.apply(0, f.targets)) / 2, f.pos = N(
- d - f.size * f.align,
- 0,
- B - f.size
- );
- for (O = R.length, j = !1; O--; )
- 0 < O && R[O - 1].pos + R[O - 1].size > R[O].pos && (R[O - 1].size += R[O].size, R[O - 1].targets = R[O - 1].targets.concat(R[O].targets), R[O - 1].align = 0.5, R[O - 1].pos + R[O - 1].size > B && (R[O - 1].pos = B - R[O - 1].size), R.splice(O, 1), j = !0);
- }
- return x.push.apply(x, k), O = 0, R.some(function(w) {
- var v = 0;
- return (w.targets || []).some(function() {
- return x[O].pos = w.pos + v, typeof S < "u" && Math.abs(x[O].pos - x[O].target) > S ? (x.slice(0, O + 1).forEach(function(l) {
- return delete l.pos;
- }), x.reducedLen = (x.reducedLen || B) - 0.1 * B, x.reducedLen > 0.1 * B && G(x, B, S), !0) : (v += x[O].size, O++, !1);
- });
- }), U(x, T), x;
- }
- V.distribute = G;
- }(H || (H = {})), H;
- }), M(o, "Core/Renderer/SVG/SVGElement.js", [o["Core/Animation/AnimationUtilities.js"], o["Core/Renderer/HTML/AST.js"], o["Core/Color/Color.js"], o["Core/Globals.js"], o["Core/Utilities.js"]], function(y, N, D, U, H) {
- var V = y.animate, G = y.animObject, R = y.stop, B = U.deg2rad, S = U.doc, x = U.noop, f = U.svg, d = U.SVG_NS, T = U.win, O = H.addEvent, j = H.attr, k = H.createElement, b = H.css, w = H.defined, v = H.erase, l = H.extend, h = H.fireEvent, u = H.isArray, i = H.isFunction, c = H.isNumber, a = H.isString, t = H.merge, s = H.objectEach, n = H.pick, P = H.pInt, _ = H.syncTimeout, I = H.uniqueKey;
- return y = function() {
- function W() {
- this.element = void 0, this.onEvents = {}, this.opacity = 1, this.renderer = void 0, this.SVG_NS = d, this.symbolCustomAttribs = "x y width height r start end innerR anchorX anchorY rounded".split(" ");
- }
- return W.prototype._defaultGetter = function(E) {
- return E = n(this[E + "Value"], this[E], this.element ? this.element.getAttribute(E) : null, 0), /^[\-0-9\.]+$/.test(E) && (E = parseFloat(E)), E;
- }, W.prototype._defaultSetter = function(E, X, g) {
- g.setAttribute(X, E);
- }, W.prototype.add = function(E) {
- var X = this.renderer, g = this.element;
- if (E && (this.parentGroup = E), this.parentInverted = E && E.inverted, typeof this.textStr < "u" && this.element.nodeName === "text" && X.buildText(this), this.added = !0, !E || E.handleZ || this.zIndex)
- var m = this.zIndexSetter();
- return m || (E ? E.element : X.box).appendChild(g), this.onAdd && this.onAdd(), this;
- }, W.prototype.addClass = function(E, X) {
- var g = X ? "" : this.attr("class") || "";
- return E = (E || "").split(/ /g).reduce(function(m, L) {
- return g.indexOf(L) === -1 && m.push(L), m;
- }, g ? [g] : []).join(" "), E !== g && this.attr("class", E), this;
- }, W.prototype.afterSetters = function() {
- this.doTransform && (this.updateTransform(), this.doTransform = !1);
- }, W.prototype.align = function(E, X, g) {
- var m = {}, L = this.renderer, z = L.alignedObjects, $, Q, A;
- E ? (this.alignOptions = E, this.alignByTranslate = X, (!g || a(g)) && (this.alignTo = $ = g || "renderer", v(z, this), z.push(this), g = void 0)) : (E = this.alignOptions, X = this.alignByTranslate, $ = this.alignTo), g = n(g, L[$], $ === "scrollablePlotBox" ? L.plotBox : void 0, L), $ = E.align;
- var F = E.verticalAlign;
- return L = (g.x || 0) + (E.x || 0), z = (g.y || 0) + (E.y || 0), $ === "right" ? Q = 1 : $ === "center" && (Q = 2), Q && (L += (g.width - (E.width || 0)) / Q), m[X ? "translateX" : "x"] = Math.round(L), F === "bottom" ? A = 1 : F === "middle" && (A = 2), A && (z += (g.height - (E.height || 0)) / A), m[X ? "translateY" : "y"] = Math.round(z), this[this.placed ? "animate" : "attr"](m), this.placed = !0, this.alignAttr = m, this;
- }, W.prototype.alignSetter = function(E) {
- var X = { left: "start", center: "middle", right: "end" };
- X[E] && (this.alignValue = E, this.element.setAttribute(
- "text-anchor",
- X[E]
- ));
- }, W.prototype.animate = function(E, X, g) {
- var m = this, L = G(n(X, this.renderer.globalAnimation, !0));
- return X = L.defer, n(S.hidden, S.msHidden, S.webkitHidden, !1) && (L.duration = 0), L.duration !== 0 ? (g && (L.complete = g), _(function() {
- m.element && V(m, E, L);
- }, X)) : (this.attr(E, void 0, g), s(E, function(z, $) {
- L.step && L.step.call(this, z, { prop: $, pos: 1, elem: this });
- }, this)), this;
- }, W.prototype.applyTextOutline = function(E) {
- var X = this.element;
- E.indexOf("contrast") !== -1 && (E = E.replace(/contrast/g, this.renderer.getContrast(X.style.fill)));
- var g = E.split(" ");
- if (E = g[g.length - 1], (g = g[0]) && g !== "none" && U.svg) {
- this.fakeTS = !0, this.ySetter = this.xSetter, g = g.replace(/(^[\d\.]+)(.*?)$/g, function(z, $, Q) {
- return 2 * Number($) + Q;
- }), this.removeTextOutline();
- var m = S.createElementNS(d, "tspan");
- j(m, { class: "highcharts-text-outline", fill: E, stroke: E, "stroke-width": g, "stroke-linejoin": "round" }), [].forEach.call(X.childNodes, function(z) {
- var $ = z.cloneNode(!0);
- $.removeAttribute && ["fill", "stroke", "stroke-width", "stroke"].forEach(function(Q) {
- return $.removeAttribute(Q);
- }), m.appendChild($);
- });
- var L = S.createElementNS(d, "tspan");
- L.textContent = "", ["x", "y"].forEach(function(z) {
- var $ = X.getAttribute(z);
- $ && L.setAttribute(z, $);
- }), m.appendChild(L), X.insertBefore(m, X.firstChild);
- }
- }, W.prototype.attr = function(E, X, g, m) {
- var L = this.element, z = this.symbolCustomAttribs, $, Q = this, A, F;
- if (typeof E == "string" && typeof X < "u") {
- var Y = E;
- E = {}, E[Y] = X;
- }
- return typeof E == "string" ? Q = (this[E + "Getter"] || this._defaultGetter).call(this, E, L) : (s(E, function(Z, q) {
- A = !1, m || R(this, q), this.symbolName && z.indexOf(q) !== -1 && ($ || (this.symbolAttr(E), $ = !0), A = !0), !this.rotation || q !== "x" && q !== "y" || (this.doTransform = !0), A || (F = this[q + "Setter"] || this._defaultSetter, F.call(this, Z, q, L), !this.styledMode && this.shadows && /^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(q) && this.updateShadows(q, Z, F));
- }, this), this.afterSetters()), g && g.call(this), Q;
- }, W.prototype.clip = function(E) {
- return this.attr("clip-path", E ? "url(" + this.renderer.url + "#" + E.id + ")" : "none");
- }, W.prototype.crisp = function(E, X) {
- X = X || E.strokeWidth || 0;
- var g = Math.round(X) % 2 / 2;
- return E.x = Math.floor(E.x || this.x || 0) + g, E.y = Math.floor(E.y || this.y || 0) + g, E.width = Math.floor((E.width || this.width || 0) - 2 * g), E.height = Math.floor((E.height || this.height || 0) - 2 * g), w(E.strokeWidth) && (E.strokeWidth = X), E;
- }, W.prototype.complexColor = function(E, X, g) {
- var m = this.renderer, L, z, $, Q, A, F, Y, Z, q, it, et = [], nt;
- h(this.renderer, "complexColor", { args: arguments }, function() {
- if (E.radialGradient ? z = "radialGradient" : E.linearGradient && (z = "linearGradient"), z) {
- if ($ = E[z], A = m.gradients, F = E.stops, q = g.radialReference, u($) && (E[z] = $ = { x1: $[0], y1: $[1], x2: $[2], y2: $[3], gradientUnits: "userSpaceOnUse" }), z === "radialGradient" && q && !w($.gradientUnits) && (Q = $, $ = t($, m.getRadialAttr(q, Q), { gradientUnits: "userSpaceOnUse" })), s($, function(ct, gt) {
- gt !== "id" && et.push(gt, ct);
- }), s(F, function(ct) {
- et.push(ct);
- }), et = et.join(","), A[et])
- it = A[et].attr("id");
- else {
- $.id = it = I();
- var rt = A[et] = m.createElement(z).attr($).add(m.defs);
- rt.radAttr = Q, rt.stops = [], F.forEach(function(ct) {
- ct[1].indexOf("rgba") === 0 ? (L = D.parse(ct[1]), Y = L.get("rgb"), Z = L.get("a")) : (Y = ct[1], Z = 1), ct = m.createElement("stop").attr({
- offset: ct[0],
- "stop-color": Y,
- "stop-opacity": Z
- }).add(rt), rt.stops.push(ct);
- });
- }
- nt = "url(" + m.url + "#" + it + ")", g.setAttribute(X, nt), g.gradient = et, E.toString = function() {
- return nt;
- };
- }
- });
- }, W.prototype.css = function(E) {
- var X = this.styles, g = {}, m = this.element, L = ["textOutline", "textOverflow", "width"], z = "", $ = !X;
- if (E && E.color && (E.fill = E.color), X && s(E, function(F, Y) {
- X && X[Y] !== F && (g[Y] = F, $ = !0);
- }), $) {
- if (X && (E = l(X, g)), E) {
- if (E.width === null || E.width === "auto")
- delete this.textWidth;
- else if (m.nodeName.toLowerCase() === "text" && E.width)
- var Q = this.textWidth = P(E.width);
- }
- if (this.styles = E, Q && !f && this.renderer.forExport && delete E.width, m.namespaceURI === this.SVG_NS) {
- var A = function(F, Y) {
- return "-" + Y.toLowerCase();
- };
- s(E, function(F, Y) {
- L.indexOf(Y) === -1 && (z += Y.replace(/([A-Z])/g, A) + ":" + F + ";");
- }), z && j(m, "style", z);
- } else
- b(m, E);
- this.added && (this.element.nodeName === "text" && this.renderer.buildText(this), E && E.textOutline && this.applyTextOutline(E.textOutline));
- }
- return this;
- }, W.prototype.dashstyleSetter = function(E) {
- var X = this["stroke-width"];
- if (X === "inherit" && (X = 1), E = E && E.toLowerCase()) {
- var g = E.replace("shortdashdotdot", "3,1,1,1,1,1,").replace("shortdashdot", "3,1,1,1").replace("shortdot", "1,1,").replace("shortdash", "3,1,").replace("longdash", "8,3,").replace(/dot/g, "1,3,").replace("dash", "4,3,").replace(/,$/, "").split(",");
- for (E = g.length; E--; )
- g[E] = "" + P(g[E]) * n(X, NaN);
- E = g.join(",").replace(/NaN/g, "none"), this.element.setAttribute("stroke-dasharray", E);
- }
- }, W.prototype.destroy = function() {
- var E = this, X = E.element || {}, g = E.renderer, m = X.ownerSVGElement, L = g.isSVG && X.nodeName === "SPAN" && E.parentGroup || void 0;
- if (X.onclick = X.onmouseout = X.onmouseover = X.onmousemove = X.point = null, R(E), E.clipPath && m) {
- var z = E.clipPath;
- [].forEach.call(m.querySelectorAll("[clip-path],[CLIP-PATH]"), function($) {
- -1 < $.getAttribute("clip-path").indexOf(z.element.id) && $.removeAttribute("clip-path");
- }), E.clipPath = z.destroy();
- }
- if (E.stops) {
- for (m = 0; m < E.stops.length; m++)
- E.stops[m].destroy();
- E.stops.length = 0, E.stops = void 0;
- }
- for (E.safeRemoveChild(X), g.styledMode || E.destroyShadows(); L && L.div && L.div.childNodes.length === 0; )
- X = L.parentGroup, E.safeRemoveChild(L.div), delete L.div, L = X;
- E.alignTo && v(g.alignedObjects, E), s(E, function($, Q) {
- E[Q] && E[Q].parentGroup === E && E[Q].destroy && E[Q].destroy(), delete E[Q];
- });
- }, W.prototype.destroyShadows = function() {
- (this.shadows || []).forEach(function(E) {
- this.safeRemoveChild(E);
- }, this), this.shadows = void 0;
- }, W.prototype.destroyTextPath = function(E, X) {
- var g = E.getElementsByTagName("text")[0];
- if (g) {
- if (g.removeAttribute("dx"), g.removeAttribute("dy"), X.element.setAttribute("id", ""), this.textPathWrapper && g.getElementsByTagName("textPath").length) {
- for (E = this.textPathWrapper.element.childNodes; E.length; )
- g.appendChild(E[0]);
- g.removeChild(this.textPathWrapper.element);
- }
- } else
- (E.getAttribute("dx") || E.getAttribute("dy")) && (E.removeAttribute("dx"), E.removeAttribute("dy"));
- this.textPathWrapper && (this.textPathWrapper = this.textPathWrapper.destroy());
- }, W.prototype.dSetter = function(E, X, g) {
- u(E) && (typeof E[0] == "string" && (E = this.renderer.pathToSegments(E)), this.pathArray = E, E = E.reduce(function(m, L, z) {
- return L && L.join ? (z ? m + " " : "") + L.join(" ") : (L || "").toString();
- }, "")), /(NaN| {2}|^$)/.test(E) && (E = "M 0 0"), this[X] !== E && (g.setAttribute(X, E), this[X] = E);
- }, W.prototype.fadeOut = function(E) {
- var X = this;
- X.animate({ opacity: 0 }, { duration: n(E, 150), complete: function() {
- X.attr({ y: -9999 }).hide();
- } });
- }, W.prototype.fillSetter = function(E, X, g) {
- typeof E == "string" ? g.setAttribute(X, E) : E && this.complexColor(E, X, g);
- }, W.prototype.getBBox = function(E, X) {
- var g = this.renderer, m = this.element, L = this.styles, z = this.textStr, $ = g.cache, Q = g.cacheKeys, A = m.namespaceURI === this.SVG_NS;
- X = n(X, this.rotation, 0);
- var F = g.styledMode ? m && W.prototype.getStyle.call(m, "font-size") : L && L.fontSize, Y;
- if (w(z)) {
- var Z = z.toString();
- Z.indexOf("<") === -1 && (Z = Z.replace(/[0-9]/g, "0")), Z += ["", X, F, this.textWidth, L && L.textOverflow, L && L.fontWeight].join();
- }
- if (Z && !E && (Y = $[Z]), !Y) {
- if (A || g.forExport) {
- try {
- var q = this.fakeTS && function(it) {
- var et = m.querySelector(".highcharts-text-outline");
- et && b(et, { display: it });
- };
- i(q) && q("none"), Y = m.getBBox ? l({}, m.getBBox()) : { width: m.offsetWidth, height: m.offsetHeight }, i(q) && q("");
- } catch {
- }
- (!Y || 0 > Y.width) && (Y = {
- width: 0,
- height: 0
- });
- } else
- Y = this.htmlGetBBox();
- if (g.isSVG && (E = Y.width, g = Y.height, A && (Y.height = g = { "11px,17": 14, "13px,20": 16 }[(F || "") + "," + Math.round(g)] || g), X && (A = X * B, Y.width = Math.abs(g * Math.sin(A)) + Math.abs(E * Math.cos(A)), Y.height = Math.abs(g * Math.cos(A)) + Math.abs(E * Math.sin(A)))), Z && (z === "" || 0 < Y.height)) {
- for (; 250 < Q.length; )
- delete $[Q.shift()];
- $[Z] || Q.push(Z), $[Z] = Y;
- }
- }
- return Y;
- }, W.prototype.getStyle = function(E) {
- return T.getComputedStyle(this.element || this, "").getPropertyValue(E);
- }, W.prototype.hasClass = function(E) {
- return ("" + this.attr("class")).split(" ").indexOf(E) !== -1;
- }, W.prototype.hide = function(E) {
- return E ? this.attr({ y: -9999 }) : this.attr({ visibility: "hidden" }), this;
- }, W.prototype.htmlGetBBox = function() {
- return { height: 0, width: 0, x: 0, y: 0 };
- }, W.prototype.init = function(E, X) {
- this.element = X === "span" ? k(X) : S.createElementNS(this.SVG_NS, X), this.renderer = E, h(this, "afterInit");
- }, W.prototype.invert = function(E) {
- return this.inverted = E, this.updateTransform(), this;
- }, W.prototype.on = function(E, X) {
- var g = this.onEvents;
- return g[E] && g[E](), g[E] = O(
- this.element,
- E,
- X
- ), this;
- }, W.prototype.opacitySetter = function(E, X, g) {
- this.opacity = E = Number(Number(E).toFixed(3)), g.setAttribute(X, E);
- }, W.prototype.removeClass = function(E) {
- return this.attr("class", ("" + this.attr("class")).replace(a(E) ? new RegExp("(^| )" + E + "( |$)") : E, " ").replace(/ +/g, " ").trim());
- }, W.prototype.removeTextOutline = function() {
- var E = this.element.querySelector("tspan.highcharts-text-outline");
- E && this.safeRemoveChild(E);
- }, W.prototype.safeRemoveChild = function(E) {
- var X = E.parentNode;
- X && X.removeChild(E);
- }, W.prototype.setRadialReference = function(E) {
- var X = this.element.gradient && this.renderer.gradients[this.element.gradient];
- return this.element.radialReference = E, X && X.radAttr && X.animate(this.renderer.getRadialAttr(E, X.radAttr)), this;
- }, W.prototype.setTextPath = function(E, X) {
- var g = this.element, m = this.text ? this.text.element : g, L = { textAnchor: "text-anchor" }, z = !1, $ = this.textPathWrapper, Q = !$;
- X = t(!0, { enabled: !0, attributes: { dy: -5, startOffset: "50%", textAnchor: "middle" } }, X);
- var A = N.filterUserAttributes(X.attributes);
- if (E && X && X.enabled) {
- $ && $.element.parentNode === null ? (Q = !0, $ = $.destroy()) : $ && this.removeTextOutline.call($.parentGroup), this.options && this.options.padding && (A.dx = -this.options.padding), $ || (this.textPathWrapper = $ = this.renderer.createElement("textPath"), z = !0);
- var F = $.element;
- if ((X = E.element.getAttribute("id")) || E.element.setAttribute("id", X = I()), Q)
- for (m.setAttribute("y", 0), c(A.dx) && m.setAttribute("x", -A.dx), E = [].slice.call(m.childNodes), Q = 0; Q < E.length; Q++) {
- var Y = E[Q];
- Y.nodeType !== T.Node.TEXT_NODE && Y.nodeName !== "tspan" || F.appendChild(Y);
- }
- z && $ && $.add({ element: m }), F.setAttributeNS("http://www.w3.org/1999/xlink", "href", this.renderer.url + "#" + X), w(A.dy) && (F.parentNode.setAttribute("dy", A.dy), delete A.dy), w(A.dx) && (F.parentNode.setAttribute("dx", A.dx), delete A.dx), s(A, function(Z, q) {
- F.setAttribute(L[q] || q, Z);
- }), g.removeAttribute("transform"), this.removeTextOutline.call($), this.text && !this.renderer.styledMode && this.attr({ fill: "none", "stroke-width": 0 }), this.applyTextOutline = this.updateTransform = x;
- } else
- $ && (delete this.updateTransform, delete this.applyTextOutline, this.destroyTextPath(g, E), this.updateTransform(), this.options && this.options.rotation && this.applyTextOutline(this.options.style.textOutline));
- return this;
- }, W.prototype.shadow = function(E, X, g) {
- var m = [], L = this.element, z = this.oldShadowOptions, $ = { color: "#000000", offsetX: this.parentInverted ? -1 : 1, offsetY: this.parentInverted ? -1 : 1, opacity: 0.15, width: 3 }, Q = !1, A;
- if (E === !0 ? A = $ : typeof E == "object" && (A = l($, E)), A && (A && z && s(A, function(it, et) {
- it !== z[et] && (Q = !0);
- }), Q && this.destroyShadows(), this.oldShadowOptions = A), !A)
- this.destroyShadows();
- else if (!this.shadows) {
- var F = A.opacity / A.width, Y = this.parentInverted ? "translate(" + A.offsetY + ", " + A.offsetX + ")" : "translate(" + A.offsetX + ", " + A.offsetY + ")";
- for ($ = 1; $ <= A.width; $++) {
- var Z = L.cloneNode(!1), q = 2 * A.width + 1 - 2 * $;
- j(Z, { stroke: E.color || "#000000", "stroke-opacity": F * $, "stroke-width": q, transform: Y, fill: "none" }), Z.setAttribute("class", (Z.getAttribute("class") || "") + " highcharts-shadow"), g && (j(Z, "height", Math.max(j(Z, "height") - q, 0)), Z.cutHeight = q), X ? X.element.appendChild(Z) : L.parentNode && L.parentNode.insertBefore(Z, L), m.push(Z);
- }
- this.shadows = m;
- }
- return this;
- }, W.prototype.show = function(E) {
- return this.attr({ visibility: E ? "inherit" : "visible" });
- }, W.prototype.strokeSetter = function(E, X, g) {
- this[X] = E, this.stroke && this["stroke-width"] ? (W.prototype.fillSetter.call(this, this.stroke, "stroke", g), g.setAttribute("stroke-width", this["stroke-width"]), this.hasStroke = !0) : X === "stroke-width" && E === 0 && this.hasStroke ? (g.removeAttribute("stroke"), this.hasStroke = !1) : this.renderer.styledMode && this["stroke-width"] && (g.setAttribute("stroke-width", this["stroke-width"]), this.hasStroke = !0);
- }, W.prototype.strokeWidth = function() {
- if (!this.renderer.styledMode)
- return this["stroke-width"] || 0;
- var E = this.getStyle("stroke-width"), X = 0;
- if (E.indexOf("px") === E.length - 2)
- X = P(E);
- else if (E !== "") {
- var g = S.createElementNS(d, "rect");
- j(g, { width: E, "stroke-width": 0 }), this.element.parentNode.appendChild(g), X = g.getBBox().width, g.parentNode.removeChild(g);
- }
- return X;
- }, W.prototype.symbolAttr = function(E) {
- var X = this;
- "x y r start end width height innerR anchorX anchorY clockwise".split(" ").forEach(function(g) {
- X[g] = n(E[g], X[g]);
- }), X.attr({ d: X.renderer.symbols[X.symbolName](X.x, X.y, X.width, X.height, X) });
- }, W.prototype.textSetter = function(E) {
- E !== this.textStr && (delete this.textPxLength, this.textStr = E, this.added && this.renderer.buildText(this));
- }, W.prototype.titleSetter = function(E) {
- var X = this.element, g = X.getElementsByTagName("title")[0] || S.createElementNS(this.SVG_NS, "title");
- X.insertBefore ? X.insertBefore(g, X.firstChild) : X.appendChild(g), g.textContent = String(n(E, "")).replace(/<[^>]*>/g, "").replace(/</g, "<").replace(
- />/g,
- ">"
- );
- }, W.prototype.toFront = function() {
- var E = this.element;
- return E.parentNode.appendChild(E), this;
- }, W.prototype.translate = function(E, X) {
- return this.attr({ translateX: E, translateY: X });
- }, W.prototype.updateShadows = function(E, X, g) {
- var m = this.shadows;
- if (m)
- for (var L = m.length; L--; )
- g.call(m[L], E === "height" ? Math.max(X - (m[L].cutHeight || 0), 0) : E === "d" ? this.d : X, E, m[L]);
- }, W.prototype.updateTransform = function() {
- var E = this.scaleX, X = this.scaleY, g = this.inverted, m = this.rotation, L = this.matrix, z = this.element, $ = this.translateX || 0, Q = this.translateY || 0;
- g && ($ += this.width, Q += this.height), $ = ["translate(" + $ + "," + Q + ")"], w(L) && $.push("matrix(" + L.join(",") + ")"), g ? $.push("rotate(90) scale(-1,1)") : m && $.push("rotate(" + m + " " + n(this.rotationOriginX, z.getAttribute("x"), 0) + " " + n(this.rotationOriginY, z.getAttribute("y") || 0) + ")"), (w(E) || w(X)) && $.push("scale(" + n(E, 1) + " " + n(X, 1) + ")"), $.length && z.setAttribute("transform", $.join(" "));
- }, W.prototype.visibilitySetter = function(E, X, g) {
- E === "inherit" ? g.removeAttribute(X) : this[X] !== E && g.setAttribute(
- X,
- E
- ), this[X] = E;
- }, W.prototype.xGetter = function(E) {
- return this.element.nodeName === "circle" && (E === "x" ? E = "cx" : E === "y" && (E = "cy")), this._defaultGetter(E);
- }, W.prototype.zIndexSetter = function(E, X) {
- var g = this.renderer, m = this.parentGroup, L = (m || g).element || g.box, z = this.element;
- g = L === g.box;
- var $ = !1, Q = this.added, A;
- if (w(E) ? (z.setAttribute("data-z-index", E), E = +E, this[X] === E && (Q = !1)) : w(this[X]) && z.removeAttribute("data-z-index"), this[X] = E, Q) {
- for ((E = this.zIndex) && m && (m.handleZ = !0), X = L.childNodes, A = X.length - 1; 0 <= A && !$; A--) {
- m = X[A], Q = m.getAttribute("data-z-index");
- var F = !w(Q);
- m !== z && (0 > E && F && !g && !A ? (L.insertBefore(z, X[A]), $ = !0) : (P(Q) <= E || F && (!w(E) || 0 <= E)) && (L.insertBefore(z, X[A + 1] || null), $ = !0));
- }
- $ || (L.insertBefore(z, X[g ? 3 : 0] || null), $ = !0);
- }
- return $;
- }, W;
- }(), y.prototype["stroke-widthSetter"] = y.prototype.strokeSetter, y.prototype.yGetter = y.prototype.xGetter, y.prototype.matrixSetter = y.prototype.rotationOriginXSetter = y.prototype.rotationOriginYSetter = y.prototype.rotationSetter = y.prototype.scaleXSetter = y.prototype.scaleYSetter = y.prototype.translateXSetter = y.prototype.translateYSetter = y.prototype.verticalAlignSetter = function(W, E) {
- this[E] = W, this.doTransform = !0;
- }, y;
- }), M(o, "Core/Renderer/RendererRegistry.js", [o["Core/Globals.js"]], function(y) {
- var N;
- return function(D) {
- D.rendererTypes = {};
- var U;
- D.getRendererType = function(H) {
- return H === void 0 && (H = U), D.rendererTypes[H] || D.rendererTypes[U];
- }, D.registerRendererType = function(H, V, G) {
- D.rendererTypes[H] = V, (!U || G) && (U = H, y.Renderer = V);
- };
- }(N || (N = {})), N;
- }), M(
- o,
- "Core/Renderer/SVG/SVGLabel.js",
- [o["Core/Renderer/SVG/SVGElement.js"], o["Core/Utilities.js"]],
- function(y, N) {
- var D = this && this.__extends || function() {
- var S = function(x, f) {
- return S = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, T) {
- d.__proto__ = T;
- } || function(d, T) {
- for (var O in T)
- T.hasOwnProperty(O) && (d[O] = T[O]);
- }, S(x, f);
- };
- return function(x, f) {
- function d() {
- this.constructor = x;
- }
- S(x, f), x.prototype = f === null ? Object.create(f) : (d.prototype = f.prototype, new d());
- };
- }(), U = N.defined, H = N.extend, V = N.isNumber, G = N.merge, R = N.pick, B = N.removeEvent;
- return function(S) {
- function x(f, d, T, O, j, k, b, w, v, l) {
- var h = S.call(this) || this;
- h.paddingLeftSetter = h.paddingSetter, h.paddingRightSetter = h.paddingSetter, h.init(f, "g"), h.textStr = d, h.x = T, h.y = O, h.anchorX = k, h.anchorY = b, h.baseline = v, h.className = l, h.addClass(l === "button" ? "highcharts-no-tooltip" : "highcharts-label"), l && h.addClass("highcharts-" + l), h.text = f.text(void 0, 0, 0, w).attr({ zIndex: 1 });
- var u;
- return typeof j == "string" && ((u = /^url\((.*?)\)$/.test(j)) || h.renderer.symbols[j]) && (h.symbolKey = j), h.bBox = x.emptyBBox, h.padding = 3, h.baselineOffset = 0, h.needsBox = f.styledMode || u, h.deferredAttr = {}, h.alignFactor = 0, h;
- }
- return D(x, S), x.prototype.alignSetter = function(f) {
- f = { left: 0, center: 0.5, right: 1 }[f], f !== this.alignFactor && (this.alignFactor = f, this.bBox && V(this.xSetting) && this.attr({ x: this.xSetting }));
- }, x.prototype.anchorXSetter = function(f, d) {
- this.anchorX = f, this.boxAttr(d, Math.round(f) - this.getCrispAdjust() - this.xSetting);
- }, x.prototype.anchorYSetter = function(f, d) {
- this.anchorY = f, this.boxAttr(d, f - this.ySetting);
- }, x.prototype.boxAttr = function(f, d) {
- this.box ? this.box.attr(f, d) : this.deferredAttr[f] = d;
- }, x.prototype.css = function(f) {
- if (f) {
- var d = {};
- f = G(f), x.textProps.forEach(function(O) {
- typeof f[O] < "u" && (d[O] = f[O], delete f[O]);
- }), this.text.css(d);
- var T = "width" in d;
- "fontSize" in d || "fontWeight" in d ? this.updateTextPadding() : T && this.updateBoxSize();
- }
- return y.prototype.css.call(this, f);
- }, x.prototype.destroy = function() {
- B(this.element, "mouseenter"), B(this.element, "mouseleave"), this.text && this.text.destroy(), this.box && (this.box = this.box.destroy()), y.prototype.destroy.call(this);
- }, x.prototype.fillSetter = function(f, d) {
- f && (this.needsBox = !0), this.fill = f, this.boxAttr(d, f);
- }, x.prototype.getBBox = function() {
- this.textStr && this.bBox.width === 0 && this.bBox.height === 0 && this.updateBoxSize();
- var f = this.padding, d = R(this.paddingLeft, f);
- return { width: this.width, height: this.height, x: this.bBox.x - d, y: this.bBox.y - f };
- }, x.prototype.getCrispAdjust = function() {
- return this.renderer.styledMode && this.box ? this.box.strokeWidth() % 2 / 2 : (this["stroke-width"] ? parseInt(
- this["stroke-width"],
- 10
- ) : 0) % 2 / 2;
- }, x.prototype.heightSetter = function(f) {
- this.heightSetting = f;
- }, x.prototype.onAdd = function() {
- var f = this.textStr;
- this.text.add(this), this.attr({ text: U(f) ? f : "", x: this.x, y: this.y }), this.box && U(this.anchorX) && this.attr({ anchorX: this.anchorX, anchorY: this.anchorY });
- }, x.prototype.paddingSetter = function(f, d) {
- V(f) ? f !== this[d] && (this[d] = f, this.updateTextPadding()) : this[d] = void 0;
- }, x.prototype.rSetter = function(f, d) {
- this.boxAttr(d, f);
- }, x.prototype.shadow = function(f) {
- return f && !this.renderer.styledMode && (this.updateBoxSize(), this.box && this.box.shadow(f)), this;
- }, x.prototype.strokeSetter = function(f, d) {
- this.stroke = f, this.boxAttr(d, f);
- }, x.prototype["stroke-widthSetter"] = function(f, d) {
- f && (this.needsBox = !0), this["stroke-width"] = f, this.boxAttr(d, f);
- }, x.prototype["text-alignSetter"] = function(f) {
- this.textAlign = f;
- }, x.prototype.textSetter = function(f) {
- typeof f < "u" && this.text.attr({ text: f }), this.updateTextPadding();
- }, x.prototype.updateBoxSize = function() {
- var f = this.text.element.style, d = {}, T = this.padding, O = this.bBox = V(this.widthSetting) && V(this.heightSetting) && !this.textAlign || !U(this.text.textStr) ? x.emptyBBox : this.text.getBBox();
- this.width = this.getPaddedWidth(), this.height = (this.heightSetting || O.height || 0) + 2 * T, f = this.renderer.fontMetrics(f && f.fontSize, this.text), this.baselineOffset = T + Math.min((this.text.firstLineMetrics || f).b, O.height || 1 / 0), this.heightSetting && (this.baselineOffset += (this.heightSetting - f.h) / 2), this.needsBox && (this.box || (T = this.box = this.symbolKey ? this.renderer.symbol(this.symbolKey) : this.renderer.rect(), T.addClass((this.className === "button" ? "" : "highcharts-label-box") + (this.className ? " highcharts-" + this.className + "-box" : "")), T.add(this)), T = this.getCrispAdjust(), d.x = T, d.y = (this.baseline ? -this.baselineOffset : 0) + T, d.width = Math.round(this.width), d.height = Math.round(this.height), this.box.attr(H(d, this.deferredAttr)), this.deferredAttr = {});
- }, x.prototype.updateTextPadding = function() {
- var f = this.text;
- this.updateBoxSize();
- var d = this.baseline ? 0 : this.baselineOffset, T = R(this.paddingLeft, this.padding);
- U(this.widthSetting) && this.bBox && (this.textAlign === "center" || this.textAlign === "right") && (T += { center: 0.5, right: 1 }[this.textAlign] * (this.widthSetting - this.bBox.width)), (T !== f.x || d !== f.y) && (f.attr("x", T), f.hasBoxWidthChanged && (this.bBox = f.getBBox(!0)), typeof d < "u" && f.attr("y", d)), f.x = T, f.y = d;
- }, x.prototype.widthSetter = function(f) {
- this.widthSetting = V(f) ? f : void 0;
- }, x.prototype.getPaddedWidth = function() {
- var f = this.padding, d = R(this.paddingLeft, f);
- return f = R(this.paddingRight, f), (this.widthSetting || this.bBox.width || 0) + d + f;
- }, x.prototype.xSetter = function(f) {
- this.x = f, this.alignFactor && (f -= this.alignFactor * this.getPaddedWidth(), this["forceAnimate:x"] = !0), this.xSetting = Math.round(f), this.attr("translateX", this.xSetting);
- }, x.prototype.ySetter = function(f) {
- this.ySetting = this.y = Math.round(f), this.attr("translateY", this.ySetting);
- }, x.emptyBBox = { width: 0, height: 0, x: 0, y: 0 }, x.textProps = "color direction fontFamily fontSize fontStyle fontWeight lineHeight textAlign textDecoration textOutline textOverflow width".split(" "), x;
- }(y);
- }
- ), M(
- o,
- "Core/Renderer/SVG/Symbols.js",
- [o["Core/Utilities.js"]],
- function(y) {
- function N(R, B, S, x, f) {
- var d = [];
- if (f) {
- var T = f.start || 0, O = G(f.r, S);
- S = G(f.r, x || S);
- var j = (f.end || 0) - 1e-3;
- x = f.innerR;
- var k = G(f.open, 1e-3 > Math.abs((f.end || 0) - T - 2 * Math.PI)), b = Math.cos(T), w = Math.sin(T), v = Math.cos(j), l = Math.sin(j);
- T = G(f.longArc, 1e-3 > j - T - Math.PI ? 0 : 1), d.push(["M", R + O * b, B + S * w], ["A", O, S, 0, T, G(f.clockwise, 1), R + O * v, B + S * l]), H(x) && d.push(k ? ["M", R + x * v, B + x * l] : ["L", R + x * v, B + x * l], ["A", x, x, 0, T, H(f.clockwise) ? 1 - f.clockwise : 0, R + x * b, B + x * w]), k || d.push(["Z"]);
- }
- return d;
- }
- function D(R, B, S, x, f) {
- return f && f.r ? U(R, B, S, x, f) : [["M", R, B], ["L", R + S, B], ["L", R + S, B + x], ["L", R, B + x], ["Z"]];
- }
- function U(R, B, S, x, f) {
- return f = f && f.r || 0, [["M", R + f, B], ["L", R + S - f, B], ["C", R + S, B, R + S, B, R + S, B + f], ["L", R + S, B + x - f], ["C", R + S, B + x, R + S, B + x, R + S - f, B + x], ["L", R + f, B + x], ["C", R, B + x, R, B + x, R, B + x - f], ["L", R, B + f], ["C", R, B, R, B, R + f, B]];
- }
- var H = y.defined, V = y.isNumber, G = y.pick;
- return { arc: N, callout: function(R, B, S, x, f) {
- var d = Math.min(f && f.r || 0, S, x), T = d + 6, O = f && f.anchorX;
- f = f && f.anchorY || 0;
- var j = U(R, B, S, x, { r: d });
- return V(O) && (R + O >= S ? f > B + T && f < B + x - T ? j.splice(3, 1, ["L", R + S, f - 6], ["L", R + S + 6, f], ["L", R + S, f + 6], ["L", R + S, B + x - d]) : j.splice(3, 1, ["L", R + S, x / 2], ["L", O, f], ["L", R + S, x / 2], ["L", R + S, B + x - d]) : 0 >= R + O ? f > B + T && f < B + x - T ? j.splice(7, 1, ["L", R, f + 6], ["L", R - 6, f], ["L", R, f - 6], ["L", R, B + d]) : j.splice(7, 1, ["L", R, x / 2], ["L", O, f], ["L", R, x / 2], ["L", R, B + d]) : f && f > x && O > R + T && O < R + S - T ? j.splice(5, 1, ["L", O + 6, B + x], ["L", O, B + x + 6], ["L", O - 6, B + x], ["L", R + d, B + x]) : f && 0 > f && O > R + T && O < R + S - T && j.splice(1, 1, ["L", O - 6, B], ["L", O, B - 6], ["L", O + 6, B], ["L", S - d, B])), j;
- }, circle: function(R, B, S, x) {
- return N(R + S / 2, B + x / 2, S / 2, x / 2, { start: 0.5 * Math.PI, end: 2.5 * Math.PI, open: !1 });
- }, diamond: function(R, B, S, x) {
- return [["M", R + S / 2, B], ["L", R + S, B + x / 2], ["L", R + S / 2, B + x], ["L", R, B + x / 2], ["Z"]];
- }, rect: D, roundedRect: U, square: D, triangle: function(R, B, S, x) {
- return [["M", R + S / 2, B], ["L", R + S, B + x], ["L", R, B + x], ["Z"]];
- }, "triangle-down": function(R, B, S, x) {
- return [["M", R, B], ["L", R + S, B], ["L", R + S / 2, B + x], ["Z"]];
- } };
- }
- ), M(o, "Core/Renderer/SVG/TextBuilder.js", [o["Core/Renderer/HTML/AST.js"], o["Core/Globals.js"], o["Core/Utilities.js"]], function(y, N, D) {
- var U = N.doc, H = N.SVG_NS, V = N.win, G = D.attr, R = D.isString, B = D.objectEach, S = D.pick;
- return function() {
- function x(f) {
- var d = f.styles;
- this.renderer = f.renderer, this.svgElement = f, this.width = f.textWidth, this.textLineHeight = d && d.lineHeight, this.textOutline = d && d.textOutline, this.ellipsis = !(!d || d.textOverflow !== "ellipsis"), this.noWrap = !(!d || d.whiteSpace !== "nowrap"), this.fontSize = d && d.fontSize;
- }
- return x.prototype.buildSVG = function() {
- var f = this.svgElement, d = f.element, T = f.renderer, O = S(f.textStr, "").toString(), j = O.indexOf("<") !== -1, k = d.childNodes;
- T = this.width && !f.added && T.box;
- var b = /<br.*?>/g, w = [O, this.ellipsis, this.noWrap, this.textLineHeight, this.textOutline, this.fontSize, this.width].join();
- if (w !== f.textCache) {
- for (f.textCache = w, delete f.actualWidth, w = k.length; w--; )
- d.removeChild(k[w]);
- j || this.ellipsis || this.width || O.indexOf(" ") !== -1 && (!this.noWrap || b.test(O)) ? O !== "" && (T && T.appendChild(d), O = new y(O), this.modifyTree(O.nodes), O.addToDOM(f.element), this.modifyDOM(), this.ellipsis && (d.textContent || "").indexOf("…") !== -1 && f.attr(
- "title",
- this.unescapeEntities(f.textStr || "", ["<", ">"])
- ), T && T.removeChild(d)) : d.appendChild(U.createTextNode(this.unescapeEntities(O))), R(this.textOutline) && f.applyTextOutline && f.applyTextOutline(this.textOutline);
- }
- }, x.prototype.modifyDOM = function() {
- var f = this, d = this.svgElement, T = G(d.element, "x");
- d.firstLineMetrics = void 0;
- for (var O; (O = d.element.firstChild) && /^[\s\u200B]*$/.test(O.textContent || " "); )
- d.element.removeChild(O);
- [].forEach.call(d.element.querySelectorAll("tspan.highcharts-br"), function(w, v) {
- w.nextSibling && w.previousSibling && (v === 0 && w.previousSibling.nodeType === 1 && (d.firstLineMetrics = d.renderer.fontMetrics(void 0, w.previousSibling)), G(w, { dy: f.getLineHeight(w.nextSibling), x: T }));
- });
- var j = this.width || 0;
- if (j) {
- var k = function(w, v) {
- var l = w.textContent || "", h = l.replace(/([^\^])-/g, "$1- ").split(" "), u = !f.noWrap && (1 < h.length || 1 < d.element.childNodes.length), i = f.getLineHeight(v), c = 0, a = d.actualWidth;
- if (f.ellipsis)
- l && f.truncate(w, l, void 0, 0, Math.max(0, j - parseInt(f.fontSize || 12, 10)), function(t, s) {
- return t.substring(
- 0,
- s
- ) + "…";
- });
- else if (u) {
- for (l = [], u = []; v.firstChild && v.firstChild !== w; )
- u.push(v.firstChild), v.removeChild(v.firstChild);
- for (; h.length; )
- h.length && !f.noWrap && 0 < c && (l.push(w.textContent || ""), w.textContent = h.join(" ").replace(/- /g, "-")), f.truncate(w, void 0, h, c === 0 && a || 0, j, function(t, s) {
- return h.slice(0, s).join(" ").replace(/- /g, "-");
- }), a = d.actualWidth, c++;
- u.forEach(function(t) {
- v.insertBefore(t, w);
- }), l.forEach(function(t) {
- v.insertBefore(U.createTextNode(t), w), t = U.createElementNS(H, "tspan"), t.textContent = "", G(t, { dy: i, x: T }), v.insertBefore(t, w);
- });
- }
- }, b = function(w) {
- [].slice.call(w.childNodes).forEach(function(v) {
- v.nodeType === V.Node.TEXT_NODE ? k(v, w) : (v.className.baseVal.indexOf("highcharts-br") !== -1 && (d.actualWidth = 0), b(v));
- });
- };
- b(d.element);
- }
- }, x.prototype.getLineHeight = function(f) {
- var d;
- return f = f.nodeType === V.Node.TEXT_NODE ? f.parentElement : f, this.renderer.styledMode || (d = f && /(px|em)$/.test(f.style.fontSize) ? f.style.fontSize : this.fontSize || this.renderer.style.fontSize || 12), this.textLineHeight ? parseInt(
- this.textLineHeight.toString(),
- 10
- ) : this.renderer.fontMetrics(d, f || this.svgElement.element).h;
- }, x.prototype.modifyTree = function(f) {
- var d = this, T = function(O, j) {
- var k = O.attributes;
- k = k === void 0 ? {} : k;
- var b = O.children, w = O.tagName, v = d.renderer.styledMode;
- w === "b" || w === "strong" ? v ? k.class = "highcharts-strong" : k.style = "font-weight:bold;" + (k.style || "") : (w === "i" || w === "em") && (v ? k.class = "highcharts-emphasized" : k.style = "font-style:italic;" + (k.style || "")), R(k.style) && (k.style = k.style.replace(/(;| |^)color([ :])/, "$1fill$2")), w === "br" ? (k.class = "highcharts-br", O.textContent = "", (j = f[j + 1]) && j.textContent && (j.textContent = j.textContent.replace(/^ +/gm, ""))) : w === "a" && b && b.some(function(l) {
- return l.tagName === "#text";
- }) && (O.children = [{ children: b, tagName: "tspan" }]), w !== "#text" && w !== "a" && (O.tagName = "tspan"), O.attributes = k, b && b.filter(function(l) {
- return l.tagName !== "#text";
- }).forEach(T);
- };
- f.forEach(T);
- }, x.prototype.truncate = function(f, d, T, O, j, k) {
- var b = this.svgElement, w = b.renderer, v = b.rotation, l = [], h = T ? 1 : 0, u = (d || T || "").length, i = u, c, a = function(s, n) {
- n = n || s;
- var P = f.parentNode;
- if (P && typeof l[n] > "u")
- if (P.getSubStringLength)
- try {
- l[n] = O + P.getSubStringLength(0, T ? n + 1 : n);
- } catch {
- }
- else
- w.getSpanWidth && (f.textContent = k(d || T, s), l[n] = O + w.getSpanWidth(b, f));
- return l[n];
- };
- b.rotation = 0;
- var t = a(f.textContent.length);
- if (O + t > j) {
- for (; h <= u; )
- i = Math.ceil((h + u) / 2), T && (c = k(T, i)), t = a(i, c && c.length - 1), h === u ? h = u + 1 : t > j ? u = i - 1 : h = i;
- u === 0 ? f.textContent = "" : d && u === d.length - 1 || (f.textContent = c || k(d || T, i));
- }
- T && T.splice(0, i), b.actualWidth = t, b.rotation = v;
- }, x.prototype.unescapeEntities = function(f, d) {
- return B(this.renderer.escapes, function(T, O) {
- d && d.indexOf(T) !== -1 || (f = f.toString().replace(new RegExp(T, "g"), O));
- }), f;
- }, x;
- }();
- }), M(o, "Core/Renderer/SVG/SVGRenderer.js", [o["Core/Renderer/HTML/AST.js"], o["Core/Color/Color.js"], o["Core/Globals.js"], o["Core/Renderer/RendererRegistry.js"], o["Core/Renderer/SVG/SVGElement.js"], o["Core/Renderer/SVG/SVGLabel.js"], o["Core/Renderer/SVG/Symbols.js"], o["Core/Renderer/SVG/TextBuilder.js"], o["Core/Utilities.js"]], function(y, N, D, U, H, V, G, R, B) {
- var S = D.charts, x = D.deg2rad, f = D.doc, d = D.isFirefox, T = D.isMS, O = D.isWebKit, j = D.noop, k = D.SVG_NS, b = D.symbolSizes, w = D.win, v = B.addEvent, l = B.attr, h = B.createElement, u = B.css, i = B.defined, c = B.destroyObjectProperties, a = B.extend, t = B.isArray, s = B.isNumber, n = B.isObject, P = B.isString, _ = B.merge, I = B.pick, W = B.pInt, E = B.uniqueKey, X;
- return D = function() {
- function g(m, L, z, $, Q, A, F) {
- this.width = this.url = this.style = this.isSVG = this.imgCount = this.height = this.gradients = this.globalAnimation = this.defs = this.chartIndex = this.cacheKeys = this.cache = this.boxWrapper = this.box = this.alignedObjects = void 0, this.init(m, L, z, $, Q, A, F);
- }
- return g.prototype.init = function(m, L, z, $, Q, A, F) {
- var Y = this.createElement("svg").attr({ version: "1.1", class: "highcharts-root" }), Z = Y.element;
- F || Y.css(this.getStyle($)), m.appendChild(Z), l(m, "dir", "ltr"), m.innerHTML.indexOf("xmlns") === -1 && l(Z, "xmlns", this.SVG_NS), this.isSVG = !0, this.box = Z, this.boxWrapper = Y, this.alignedObjects = [], this.url = this.getReferenceURL(), this.createElement("desc").add().element.appendChild(f.createTextNode("Created with Highcharts 9.3.3")), this.defs = this.createElement("defs").add(), this.allowHTML = A, this.forExport = Q, this.styledMode = F, this.gradients = {}, this.cache = {}, this.cacheKeys = [], this.imgCount = 0, this.setSize(L, z, !1);
- var q;
- d && m.getBoundingClientRect && (L = function() {
- u(m, { left: 0, top: 0 }), q = m.getBoundingClientRect(), u(m, { left: Math.ceil(q.left) - q.left + "px", top: Math.ceil(q.top) - q.top + "px" });
- }, L(), this.unSubPixelFix = v(w, "resize", L));
- }, g.prototype.definition = function(m) {
- return new y([m]).addToDOM(this.defs.element);
- }, g.prototype.getReferenceURL = function() {
- if ((d || O) && f.getElementsByTagName("base").length) {
- if (!i(X)) {
- var m = E();
- m = new y([{ tagName: "svg", attributes: { width: 8, height: 8 }, children: [{ tagName: "defs", children: [{ tagName: "clipPath", attributes: { id: m }, children: [{ tagName: "rect", attributes: { width: 4, height: 4 } }] }] }, { tagName: "rect", attributes: { id: "hitme", width: 8, height: 8, "clip-path": "url(#" + m + ")", fill: "rgba(0,0,0,0.001)" } }] }]).addToDOM(f.body), u(m, { position: "fixed", top: 0, left: 0, zIndex: 9e5 });
- var L = f.elementFromPoint(6, 6);
- X = (L && L.id) === "hitme", f.body.removeChild(m);
- }
- if (X)
- return w.location.href.split("#")[0].replace(/<[^>]*>/g, "").replace(/([\('\)])/g, "\\$1").replace(/ /g, "%20");
- }
- return "";
- }, g.prototype.getStyle = function(m) {
- return this.style = a({ fontFamily: '"Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif', fontSize: "12px" }, m);
- }, g.prototype.setStyle = function(m) {
- this.boxWrapper.css(this.getStyle(m));
- }, g.prototype.isHidden = function() {
- return !this.boxWrapper.getBBox().width;
- }, g.prototype.destroy = function() {
- var m = this.defs;
- return this.box = null, this.boxWrapper = this.boxWrapper.destroy(), c(this.gradients || {}), this.gradients = null, m && (this.defs = m.destroy()), this.unSubPixelFix && this.unSubPixelFix(), this.alignedObjects = null;
- }, g.prototype.createElement = function(m) {
- var L = new this.Element();
- return L.init(this, m), L;
- }, g.prototype.getRadialAttr = function(m, L) {
- return { cx: m[0] - m[2] / 2 + (L.cx || 0) * m[2], cy: m[1] - m[2] / 2 + (L.cy || 0) * m[2], r: (L.r || 0) * m[2] };
- }, g.prototype.buildText = function(m) {
- new R(m).buildSVG();
- }, g.prototype.getContrast = function(m) {
- return m = N.parse(m).rgba, m[0] *= 1, m[1] *= 1.2, m[2] *= 0.5, 459 < m[0] + m[1] + m[2] ? "#000000" : "#FFFFFF";
- }, g.prototype.button = function(m, L, z, $, Q, A, F, Y, Z, q) {
- var it = this.label(m, L, z, Z, void 0, void 0, q, void 0, "button"), et = this.styledMode, nt = 0, rt = Q ? _(Q) : {};
- if (m = rt && rt.style || {}, rt = y.filterUserAttributes(rt), it.attr(_({ padding: 8, r: 2 }, rt)), !et) {
- rt = _({ fill: "#f7f7f7", stroke: "#cccccc", "stroke-width": 1, style: { color: "#333333", cursor: "pointer", fontWeight: "normal" } }, { style: m }, rt);
- var ct = rt.style;
- delete rt.style, A = _(rt, { fill: "#e6e6e6" }, y.filterUserAttributes(A || {}));
- var gt = A.style;
- delete A.style, F = _(rt, { fill: "#e6ebf5", style: { color: "#000000", fontWeight: "bold" } }, y.filterUserAttributes(F || {}));
- var dt = F.style;
- delete F.style, Y = _(rt, { style: { color: "#cccccc" } }, y.filterUserAttributes(Y || {}));
- var ht = Y.style;
- delete Y.style;
- }
- return v(it.element, T ? "mouseover" : "mouseenter", function() {
- nt !== 3 && it.setState(1);
- }), v(it.element, T ? "mouseout" : "mouseleave", function() {
- nt !== 3 && it.setState(nt);
- }), it.setState = function(at) {
- at !== 1 && (it.state = nt = at), it.removeClass(/highcharts-button-(normal|hover|pressed|disabled)/).addClass("highcharts-button-" + ["normal", "hover", "pressed", "disabled"][at || 0]), et || it.attr([rt, A, F, Y][at || 0]).css([ct, gt, dt, ht][at || 0]);
- }, et || it.attr(rt).css(a({ cursor: "default" }, ct)), it.on("touchstart", function(at) {
- return at.stopPropagation();
- }).on("click", function(at) {
- nt !== 3 && $.call(it, at);
- });
- }, g.prototype.crispLine = function(m, L, z) {
- z === void 0 && (z = "round");
- var $ = m[0], Q = m[1];
- return i($[1]) && $[1] === Q[1] && ($[1] = Q[1] = Math[z]($[1]) - L % 2 / 2), i($[2]) && $[2] === Q[2] && ($[2] = Q[2] = Math[z]($[2]) + L % 2 / 2), m;
- }, g.prototype.path = function(m) {
- var L = this.styledMode ? {} : { fill: "none" };
- return t(m) ? L.d = m : n(m) && a(L, m), this.createElement("path").attr(L);
- }, g.prototype.circle = function(m, L, z) {
- return m = n(m) ? m : typeof m > "u" ? {} : { x: m, y: L, r: z }, L = this.createElement("circle"), L.xSetter = L.ySetter = function($, Q, A) {
- A.setAttribute("c" + Q, $);
- }, L.attr(m);
- }, g.prototype.arc = function(m, L, z, $, Q, A) {
- return n(m) ? ($ = m, L = $.y, z = $.r, m = $.x) : $ = { innerR: $, start: Q, end: A }, m = this.symbol("arc", m, L, z, z, $), m.r = z, m;
- }, g.prototype.rect = function(m, L, z, $, Q, A) {
- Q = n(m) ? m.r : Q;
- var F = this.createElement("rect");
- return m = n(m) ? m : typeof m > "u" ? {} : { x: m, y: L, width: Math.max(z, 0), height: Math.max($, 0) }, this.styledMode || (typeof A < "u" && (m["stroke-width"] = A, m = F.crisp(m)), m.fill = "none"), Q && (m.r = Q), F.rSetter = function(Y, Z, q) {
- F.r = Y, l(q, { rx: Y, ry: Y });
- }, F.rGetter = function() {
- return F.r || 0;
- }, F.attr(m);
- }, g.prototype.setSize = function(m, L, z) {
- this.width = m, this.height = L, this.boxWrapper.animate({ width: m, height: L }, { step: function() {
- this.attr({ viewBox: "0 0 " + this.attr("width") + " " + this.attr("height") });
- }, duration: I(
- z,
- !0
- ) ? void 0 : 0 }), this.alignElements();
- }, g.prototype.g = function(m) {
- var L = this.createElement("g");
- return m ? L.attr({ class: "highcharts-" + m }) : L;
- }, g.prototype.image = function(m, L, z, $, Q, A) {
- var F = { preserveAspectRatio: "none" }, Y = function(q, it) {
- q.setAttributeNS ? q.setAttributeNS("http://www.w3.org/1999/xlink", "href", it) : q.setAttribute("hc-svg-href", it);
- };
- s(L) && (F.x = L), s(z) && (F.y = z), s($) && (F.width = $), s(Q) && (F.height = Q);
- var Z = this.createElement("image").attr(F);
- return L = function(q) {
- Y(Z.element, m), A.call(Z, q);
- }, A ? (Y(
- Z.element,
- "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="
- ), z = new w.Image(), v(z, "load", L), z.src = m, z.complete && L({})) : Y(Z.element, m), Z;
- }, g.prototype.symbol = function(m, L, z, $, Q, A) {
- var F = this, Y = /^url\((.*?)\)$/, Z = Y.test(m), q = !Z && (this.symbols[m] ? m : "circle"), it = q && this.symbols[q], et;
- if (it) {
- typeof L == "number" && (et = it.call(this.symbols, Math.round(L || 0), Math.round(z || 0), $ || 0, Q || 0, A));
- var nt = this.path(et);
- F.styledMode || nt.attr("fill", "none"), a(nt, { symbolName: q || void 0, x: L, y: z, width: $, height: Q }), A && a(nt, A);
- } else if (Z) {
- var rt = m.match(Y)[1], ct = nt = this.image(rt);
- ct.imgwidth = I(b[rt] && b[rt].width, A && A.width), ct.imgheight = I(b[rt] && b[rt].height, A && A.height);
- var gt = function(dt) {
- return dt.attr({ width: dt.width, height: dt.height });
- };
- ["width", "height"].forEach(function(dt) {
- ct[dt + "Setter"] = function(ht, at) {
- var J = this["img" + at];
- this[at] = ht, i(J) && (A && A.backgroundSize === "within" && this.width && this.height && (J = Math.round(J * Math.min(this.width / this.imgwidth, this.height / this.imgheight))), this.element && this.element.setAttribute(at, J), this.alignByTranslate || (ht = ((this[at] || 0) - J) / 2, this.attr(at === "width" ? { translateX: ht } : { translateY: ht })));
- };
- }), i(L) && ct.attr({ x: L, y: z }), ct.isImg = !0, i(ct.imgwidth) && i(ct.imgheight) ? gt(ct) : (ct.attr({ width: 0, height: 0 }), h("img", { onload: function() {
- var dt = S[F.chartIndex];
- this.width === 0 && (u(this, { position: "absolute", top: "-999em" }), f.body.appendChild(this)), b[rt] = { width: this.width, height: this.height }, ct.imgwidth = this.width, ct.imgheight = this.height, ct.element && gt(ct), this.parentNode && this.parentNode.removeChild(this), F.imgCount--, !F.imgCount && dt && !dt.hasLoaded && dt.onload();
- }, src: rt }), this.imgCount++);
- }
- return nt;
- }, g.prototype.clipRect = function(m, L, z, $) {
- var Q = E() + "-", A = this.createElement("clipPath").attr({ id: Q }).add(this.defs);
- return m = this.rect(m, L, z, $, 0).add(A), m.id = Q, m.clipPath = A, m.count = 0, m;
- }, g.prototype.text = function(m, L, z, $) {
- var Q = {};
- return $ && (this.allowHTML || !this.forExport) ? this.html(m, L, z) : (Q.x = Math.round(L || 0), z && (Q.y = Math.round(z)), i(m) && (Q.text = m), m = this.createElement("text").attr(Q), (!$ || this.forExport && !this.allowHTML) && (m.xSetter = function(A, F, Y) {
- for (var Z = Y.getElementsByTagName("tspan"), q = Y.getAttribute(F), it = 0, et; it < Z.length; it++)
- et = Z[it], et.getAttribute(F) === q && et.setAttribute(F, A);
- Y.setAttribute(F, A);
- }), m);
- }, g.prototype.fontMetrics = function(m, L) {
- return m = !this.styledMode && /px/.test(m) || !w.getComputedStyle ? m || L && L.style && L.style.fontSize || this.style && this.style.fontSize : L && H.prototype.getStyle.call(L, "font-size"), m = /px/.test(m) ? W(m) : 12, L = 24 > m ? m + 3 : Math.round(1.2 * m), { h: L, b: Math.round(0.8 * L), f: m };
- }, g.prototype.rotCorr = function(m, L, z) {
- var $ = m;
- return L && z && ($ = Math.max($ * Math.cos(L * x), 4)), { x: -m / 3 * Math.sin(L * x), y: $ };
- }, g.prototype.pathToSegments = function(m) {
- for (var L = [], z = [], $ = { A: 8, C: 7, H: 2, L: 3, M: 3, Q: 5, S: 5, T: 3, V: 2 }, Q = 0; Q < m.length; Q++)
- P(z[0]) && s(m[Q]) && z.length === $[z[0].toUpperCase()] && m.splice(Q, 0, z[0].replace("M", "L").replace("m", "l")), typeof m[Q] == "string" && (z.length && L.push(z.slice(0)), z.length = 0), z.push(m[Q]);
- return L.push(z.slice(0)), L;
- }, g.prototype.label = function(m, L, z, $, Q, A, F, Y, Z) {
- return new V(this, m, L, z, $, Q, A, F, Y, Z);
- }, g.prototype.alignElements = function() {
- this.alignedObjects.forEach(function(m) {
- return m.align();
- });
- }, g;
- }(), a(D.prototype, { Element: H, SVG_NS: k, escapes: { "&": "&", "<": "<", ">": ">", "'": "'", '"': """ }, symbols: G, draw: j }), U.registerRendererType("svg", D, !0), D;
- }), M(o, "Core/Renderer/HTML/HTMLElement.js", [o["Core/Globals.js"], o["Core/Renderer/SVG/SVGElement.js"], o["Core/Utilities.js"]], function(y, N, D) {
- var U = this && this.__extends || function() {
- var T = function(O, j) {
- return T = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(k, b) {
- k.__proto__ = b;
- } || function(k, b) {
- for (var w in b)
- b.hasOwnProperty(w) && (k[w] = b[w]);
- }, T(O, j);
- };
- return function(O, j) {
- function k() {
- this.constructor = O;
- }
- T(O, j), O.prototype = j === null ? Object.create(j) : (k.prototype = j.prototype, new k());
- };
- }(), H = y.isFirefox, V = y.isMS, G = y.isWebKit, R = y.win, B = D.css, S = D.defined, x = D.extend, f = D.pick, d = D.pInt;
- return function(T) {
- function O() {
- return T !== null && T.apply(this, arguments) || this;
- }
- return U(O, T), O.compose = function(j) {
- if (O.composedClasses.indexOf(j) === -1) {
- O.composedClasses.push(j);
- var k = O.prototype, b = j.prototype;
- b.getSpanCorrection = k.getSpanCorrection, b.htmlCss = k.htmlCss, b.htmlGetBBox = k.htmlGetBBox, b.htmlUpdateTransform = k.htmlUpdateTransform, b.setSpanRotation = k.setSpanRotation;
- }
- return j;
- }, O.prototype.getSpanCorrection = function(j, k, b) {
- this.xCorr = -j * b, this.yCorr = -k;
- }, O.prototype.htmlCss = function(j) {
- var k = this.element.tagName === "SPAN" && j && "width" in j, b = f(k && j.width, void 0);
- if (k) {
- delete j.width, this.textWidth = b;
- var w = !0;
- }
- return j && j.textOverflow === "ellipsis" && (j.whiteSpace = "nowrap", j.overflow = "hidden"), this.styles = x(this.styles, j), B(this.element, j), w && this.htmlUpdateTransform(), this;
- }, O.prototype.htmlGetBBox = function() {
- var j = this.element;
- return { x: j.offsetLeft, y: j.offsetTop, width: j.offsetWidth, height: j.offsetHeight };
- }, O.prototype.htmlUpdateTransform = function() {
- if (this.added) {
- var j = this.renderer, k = this.element, b = this.translateX || 0, w = this.translateY || 0, v = this.x || 0, l = this.y || 0, h = this.textAlign || "left", u = { left: 0, center: 0.5, right: 1 }[h], i = this.styles;
- if (i = i && i.whiteSpace, B(k, { marginLeft: b, marginTop: w }), !j.styledMode && this.shadows && this.shadows.forEach(function(P) {
- B(P, { marginLeft: b + 1, marginTop: w + 1 });
- }), this.inverted && [].forEach.call(k.childNodes, function(P) {
- j.invertChild(P, k);
- }), k.tagName === "SPAN") {
- var c = this.rotation, a = this.textWidth && d(this.textWidth), t = [c, h, k.innerHTML, this.textWidth, this.textAlign].join(), s = void 0;
- if (s = !1, a !== this.oldTextWidth) {
- if (this.textPxLength)
- var n = this.textPxLength;
- else
- B(k, { width: "", whiteSpace: i || "nowrap" }), n = k.offsetWidth;
- (a > this.oldTextWidth || n > a) && (/[ \-]/.test(k.textContent || k.innerText) || k.style.textOverflow === "ellipsis") && (B(k, { width: n > a || c ? a + "px" : "auto", display: "block", whiteSpace: i || "normal" }), this.oldTextWidth = a, s = !0);
- }
- this.hasBoxWidthChanged = s, t !== this.cTT && (s = j.fontMetrics(k.style.fontSize, k).b, !S(c) || c === (this.oldRotation || 0) && h === this.oldAlign || this.setSpanRotation(c, u, s), this.getSpanCorrection(!S(c) && this.textPxLength || k.offsetWidth, s, u, c, h)), B(k, { left: v + (this.xCorr || 0) + "px", top: l + (this.yCorr || 0) + "px" }), this.cTT = t, this.oldRotation = c, this.oldAlign = h;
- }
- } else
- this.alignOnAdd = !0;
- }, O.prototype.setSpanRotation = function(j, k, b) {
- var w = {}, v = V && !/Edge/.test(R.navigator.userAgent) ? "-ms-transform" : G ? "-webkit-transform" : H ? "MozTransform" : R.opera ? "-o-transform" : void 0;
- v && (w[v] = w.transform = "rotate(" + j + "deg)", w[v + (H ? "Origin" : "-origin")] = w.transformOrigin = 100 * k + "% " + b + "px", B(this.element, w));
- }, O.composedClasses = [], O;
- }(N);
- }), M(
- o,
- "Core/Renderer/HTML/HTMLRenderer.js",
- [o["Core/Renderer/HTML/AST.js"], o["Core/Renderer/SVG/SVGElement.js"], o["Core/Renderer/SVG/SVGRenderer.js"], o["Core/Utilities.js"]],
- function(y, N, D, U) {
- var H = this && this.__extends || function() {
- var S = function(x, f) {
- return S = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, T) {
- d.__proto__ = T;
- } || function(d, T) {
- for (var O in T)
- T.hasOwnProperty(O) && (d[O] = T[O]);
- }, S(x, f);
- };
- return function(x, f) {
- function d() {
- this.constructor = x;
- }
- S(x, f), x.prototype = f === null ? Object.create(f) : (d.prototype = f.prototype, new d());
- };
- }(), V = U.attr, G = U.createElement, R = U.extend, B = U.pick;
- return function(S) {
- function x() {
- return S !== null && S.apply(this, arguments) || this;
- }
- return H(x, S), x.compose = function(f) {
- return x.composedClasses.indexOf(f) === -1 && (x.composedClasses.push(f), f.prototype.html = x.prototype.html), f;
- }, x.prototype.html = function(f, d, T) {
- var O = this.createElement("span"), j = O.element, k = O.renderer, b = k.isSVG, w = function(v, l) {
- ["opacity", "visibility"].forEach(function(h) {
- v[h + "Setter"] = function(u, i, c) {
- var a = v.div ? v.div.style : l;
- N.prototype[h + "Setter"].call(this, u, i, c), a && (a[i] = u);
- };
- }), v.addedSetters = !0;
- };
- return O.textSetter = function(v) {
- v !== this.textStr && (delete this.bBox, delete this.oldTextWidth, y.setElementHTML(this.element, B(v, "")), this.textStr = v, O.doTransform = !0);
- }, b && w(O, O.element.style), O.xSetter = O.ySetter = O.alignSetter = O.rotationSetter = function(v, l) {
- l === "align" ? O.alignValue = O.textAlign = v : O[l] = v, O.doTransform = !0;
- }, O.afterSetters = function() {
- this.doTransform && (this.htmlUpdateTransform(), this.doTransform = !1);
- }, O.attr({ text: f, x: Math.round(d), y: Math.round(T) }).css({ position: "absolute" }), k.styledMode || O.css({ fontFamily: this.style.fontFamily, fontSize: this.style.fontSize }), j.style.whiteSpace = "nowrap", O.css = O.htmlCss, b && (O.add = function(v) {
- var l = k.box.parentNode, h = [];
- if (this.parentGroup = v) {
- var u = v.div;
- if (!u) {
- for (; v; )
- h.push(v), v = v.parentGroup;
- h.reverse().forEach(function(i) {
- function c(n, P) {
- i[P] = n, P === "translateX" ? s.left = n + "px" : s.top = n + "px", i.doTransform = !0;
- }
- var a = V(i.element, "class"), t = i.styles || {};
- u = i.div = i.div || G("div", a ? { className: a } : void 0, {
- position: "absolute",
- left: (i.translateX || 0) + "px",
- top: (i.translateY || 0) + "px",
- display: i.display,
- opacity: i.opacity,
- cursor: t.cursor,
- pointerEvents: t.pointerEvents,
- visibility: i.visibility
- }, u || l);
- var s = u.style;
- R(i, { classSetter: function(n) {
- return function(P) {
- this.element.setAttribute("class", P), n.className = P;
- };
- }(u), on: function() {
- return h[0].div && O.on.apply({ element: h[0].div, onEvents: i.onEvents }, arguments), i;
- }, translateXSetter: c, translateYSetter: c }), i.addedSetters || w(i);
- });
- }
- } else
- u = l;
- return u.appendChild(j), O.added = !0, O.alignOnAdd && O.htmlUpdateTransform(), O;
- }), O;
- }, x.composedClasses = [], x;
- }(D);
- }
- ), M(o, "Core/Axis/AxisDefaults.js", [], function() {
- var y;
- return function(N) {
- N.defaultXAxisOptions = { alignTicks: !0, allowDecimals: void 0, panningEnabled: !0, zIndex: 2, zoomEnabled: !0, dateTimeLabelFormats: { millisecond: { main: "%H:%M:%S.%L", range: !1 }, second: { main: "%H:%M:%S", range: !1 }, minute: { main: "%H:%M", range: !1 }, hour: { main: "%H:%M", range: !1 }, day: { main: "%e. %b" }, week: { main: "%e. %b" }, month: { main: "%b '%y" }, year: { main: "%Y" } }, endOnTick: !1, gridLineDashStyle: "Solid", gridZIndex: 1, labels: {
- autoRotation: void 0,
- autoRotationLimit: 80,
- distance: void 0,
- enabled: !0,
- indentation: 10,
- overflow: "justify",
- padding: 5,
- reserveSpace: void 0,
- rotation: void 0,
- staggerLines: 0,
- step: 0,
- useHTML: !1,
- x: 0,
- zIndex: 7,
- style: { color: "#666666", cursor: "default", fontSize: "11px" }
- }, maxPadding: 0.01, minorGridLineDashStyle: "Solid", minorTickLength: 2, minorTickPosition: "outside", minPadding: 0.01, offset: void 0, opposite: !1, reversed: void 0, reversedStacks: !1, showEmpty: !0, showFirstLabel: !0, showLastLabel: !0, startOfWeek: 1, startOnTick: !1, tickLength: 10, tickPixelInterval: 100, tickmarkPlacement: "between", tickPosition: "outside", title: {
- align: "middle",
- rotation: 0,
- useHTML: !1,
- x: 0,
- y: 0,
- style: { color: "#666666" }
- }, type: "linear", uniqueNames: !0, visible: !0, minorGridLineColor: "#f2f2f2", minorGridLineWidth: 1, minorTickColor: "#999999", lineColor: "#ccd6eb", lineWidth: 1, gridLineColor: "#e6e6e6", gridLineWidth: void 0, tickColor: "#ccd6eb" }, N.defaultYAxisOptions = { reversedStacks: !0, endOnTick: !0, maxPadding: 0.05, minPadding: 0.05, tickPixelInterval: 72, showLastLabel: !0, labels: { x: -8 }, startOnTick: !0, title: { rotation: 270, text: "Values" }, stackLabels: {
- animation: {},
- allowOverlap: !1,
- enabled: !1,
- crop: !0,
- overflow: "justify",
- formatter: function() {
- var D = this.axis.chart.numberFormatter;
- return D(this.total, -1);
- },
- style: { color: "#000000", fontSize: "11px", fontWeight: "bold", textOutline: "1px contrast" }
- }, gridLineWidth: 1, lineWidth: 0 }, N.defaultLeftAxisOptions = { labels: { x: -15 }, title: { rotation: 270 } }, N.defaultRightAxisOptions = { labels: { x: 15 }, title: { rotation: 90 } }, N.defaultBottomAxisOptions = { labels: { autoRotation: [-45], x: 0 }, margin: 15, title: { rotation: 0 } }, N.defaultTopAxisOptions = { labels: { autoRotation: [-45], x: 0 }, margin: 15, title: { rotation: 0 } };
- }(y || (y = {})), y;
- }), M(o, "Core/Foundation.js", [o["Core/Utilities.js"]], function(y) {
- var N = y.addEvent, D = y.isFunction, U = y.objectEach, H = y.removeEvent, V;
- return function(G) {
- G.registerEventOptions = function(R, B) {
- R.eventOptions = R.eventOptions || {}, U(B.events, function(S, x) {
- R.eventOptions[x] !== S && (R.eventOptions[x] && (H(R, x, R.eventOptions[x]), delete R.eventOptions[x]), D(S) && (R.eventOptions[x] = S, N(R, x, S)));
- });
- };
- }(V || (V = {})), V;
- }), M(
- o,
- "Core/Axis/Tick.js",
- [o["Core/FormatUtilities.js"], o["Core/Globals.js"], o["Core/Utilities.js"]],
- function(y, N, D) {
- var U = N.deg2rad, H = D.clamp, V = D.correctFloat, G = D.defined, R = D.destroyObjectProperties, B = D.extend, S = D.fireEvent, x = D.isNumber, f = D.merge, d = D.objectEach, T = D.pick;
- return N = function() {
- function O(j, k, b, w, v) {
- this.isNewLabel = this.isNew = !0, this.axis = j, this.pos = k, this.type = b || "", this.parameters = v || {}, this.tickmarkOffset = this.parameters.tickmarkOffset, this.options = this.parameters.options, S(this, "init"), b || w || this.addLabel();
- }
- return O.prototype.addLabel = function() {
- var j = this, k = j.axis, b = k.options, w = k.chart, v = k.categories, l = k.logarithmic, h = k.names, u = j.pos, i = T(j.options && j.options.labels, b.labels), c = k.tickPositions, a = u === c[0], t = u === c[c.length - 1], s = (!i.step || i.step === 1) && k.tickInterval === 1;
- c = c.info;
- var n = j.label, P;
- if (v = this.parameters.category || (v ? T(v[u], h[u], u) : u), l && x(v) && (v = V(l.lin2log(v))), k.dateTime)
- if (c)
- var _ = w.time.resolveDTLFormat(b.dateTimeLabelFormats[!b.grid && c.higherRanks[u] || c.unitName]), I = _.main;
- else
- x(v) && (I = k.dateTime.getXDateFormat(v, b.dateTimeLabelFormats || {}));
- j.isFirst = a, j.isLast = t;
- var W = {
- axis: k,
- chart: w,
- dateTimeLabelFormat: I,
- isFirst: a,
- isLast: t,
- pos: u,
- tick: j,
- tickPositionInfo: c,
- value: v
- };
- S(this, "labelFormat", W);
- var E = function(g) {
- return i.formatter ? i.formatter.call(g, g) : i.format ? (g.text = k.defaultLabelFormatter.call(g), y.format(i.format, g, w)) : k.defaultLabelFormatter.call(g, g);
- };
- b = E.call(W, W);
- var X = _ && _.list;
- j.shortenLabel = X ? function() {
- for (P = 0; P < X.length; P++)
- if (B(W, { dateTimeLabelFormat: X[P] }), n.attr({ text: E.call(W, W) }), n.getBBox().width < k.getSlotWidth(j) - 2 * i.padding)
- return;
- n.attr({ text: "" });
- } : void 0, s && k._addedPlotLB && j.moveLabel(b, i), G(n) || j.movedLabel ? n && n.textStr !== b && !s && (!n.textWidth || i.style.width || n.styles.width || n.css({ width: null }), n.attr({ text: b }), n.textPxLength = n.getBBox().width) : (j.label = n = j.createLabel({ x: 0, y: 0 }, b, i), j.rotation = 0);
- }, O.prototype.createLabel = function(j, k, b) {
- var w = this.axis, v = w.chart;
- return (j = G(k) && b.enabled ? v.renderer.text(k, j.x, j.y, b.useHTML).add(w.labelGroup) : null) && (v.styledMode || j.css(f(b.style)), j.textPxLength = j.getBBox().width), j;
- }, O.prototype.destroy = function() {
- R(
- this,
- this.axis
- );
- }, O.prototype.getPosition = function(j, k, b, w) {
- var v = this.axis, l = v.chart, h = w && l.oldChartHeight || l.chartHeight;
- return j = { x: j ? V(v.translate(k + b, null, null, w) + v.transB) : v.left + v.offset + (v.opposite ? (w && l.oldChartWidth || l.chartWidth) - v.right - v.left : 0), y: j ? h - v.bottom + v.offset - (v.opposite ? v.height : 0) : V(h - v.translate(k + b, null, null, w) - v.transB) }, j.y = H(j.y, -1e5, 1e5), S(this, "afterGetPosition", { pos: j }), j;
- }, O.prototype.getLabelPosition = function(j, k, b, w, v, l, h, u) {
- var i = this.axis, c = i.transA, a = i.isLinked && i.linkedParent ? i.linkedParent.reversed : i.reversed, t = i.staggerLines, s = i.tickRotCorr || { x: 0, y: 0 }, n = w || i.reserveSpaceDefault ? 0 : -i.labelOffset * (i.labelAlign === "center" ? 0.5 : 1), P = {}, _ = v.y;
- return G(_) || (_ = i.side === 0 ? b.rotation ? -8 : -b.getBBox().height : i.side === 2 ? s.y + 8 : Math.cos(b.rotation * U) * (s.y - b.getBBox(!1, 0).height / 2)), j = j + v.x + n + s.x - (l && w ? l * c * (a ? -1 : 1) : 0), k = k + _ - (l && !w ? l * c * (a ? 1 : -1) : 0), t && (b = h / (u || 1) % t, i.opposite && (b = t - b - 1), k += i.labelOffset / t * b), P.x = j, P.y = Math.round(k), S(this, "afterGetLabelPosition", { pos: P, tickmarkOffset: l, index: h }), P;
- }, O.prototype.getLabelSize = function() {
- return this.label ? this.label.getBBox()[this.axis.horiz ? "height" : "width"] : 0;
- }, O.prototype.getMarkPath = function(j, k, b, w, v, l) {
- return l.crispLine([["M", j, k], ["L", j + (v ? 0 : -b), k + (v ? b : 0)]], w);
- }, O.prototype.handleOverflow = function(j) {
- var k = this.axis, b = k.options.labels, w = j.x, v = k.chart.chartWidth, l = k.chart.spacing, h = T(k.labelLeft, Math.min(k.pos, l[3]));
- l = T(k.labelRight, Math.max(k.isRadial ? 0 : k.pos + k.len, v - l[1]));
- var u = this.label, i = this.rotation, c = { left: 0, center: 0.5, right: 1 }[k.labelAlign || u.attr("align")], a = u.getBBox().width, t = k.getSlotWidth(this), s = {}, n = t, P = 1, _;
- i || b.overflow !== "justify" ? 0 > i && w - c * a < h ? _ = Math.round(w / Math.cos(i * U) - h) : 0 < i && w + c * a > l && (_ = Math.round((v - w) / Math.cos(i * U))) : (v = w + (1 - c) * a, w - c * a < h ? n = j.x + n * (1 - c) - h : v > l && (n = l - j.x + n * c, P = -1), n = Math.min(t, n), n < t && k.labelAlign === "center" && (j.x += P * (t - n - c * (t - Math.min(a, n)))), (a > n || k.autoRotation && (u.styles || {}).width) && (_ = n)), _ && (this.shortenLabel ? this.shortenLabel() : (s.width = Math.floor(_) + "px", (b.style || {}).textOverflow || (s.textOverflow = "ellipsis"), u.css(s)));
- }, O.prototype.moveLabel = function(j, k) {
- var b = this, w = b.label, v = b.axis, l = v.reversed, h = !1;
- if (w && w.textStr === j ? (b.movedLabel = w, h = !0, delete b.label) : d(v.ticks, function(i) {
- h || i.isNew || i === b || !i.label || i.label.textStr !== j || (b.movedLabel = i.label, h = !0, i.labelPos = b.movedLabel.xy, delete i.label);
- }), !h && (b.labelPos || w)) {
- var u = b.labelPos || w.xy;
- w = v.horiz ? l ? 0 : v.width + v.left : u.x, v = v.horiz ? u.y : l ? v.width + v.left : 0, b.movedLabel = b.createLabel({ x: w, y: v }, j, k), b.movedLabel && b.movedLabel.attr({ opacity: 0 });
- }
- }, O.prototype.render = function(j, k, b) {
- var w = this.axis, v = w.horiz, l = this.pos, h = T(this.tickmarkOffset, w.tickmarkOffset);
- l = this.getPosition(v, l, h, k), h = l.x;
- var u = l.y;
- w = v && h === w.pos + w.len || !v && u === w.pos ? -1 : 1, v = T(b, this.label && this.label.newOpacity, 1), b = T(b, 1), this.isActive = !0, this.renderGridLine(k, b, w), this.renderMark(l, b, w), this.renderLabel(l, k, v, j), this.isNew = !1, S(this, "afterRender");
- }, O.prototype.renderGridLine = function(j, k, b) {
- var w = this.axis, v = w.options, l = {}, h = this.pos, u = this.type, i = T(
- this.tickmarkOffset,
- w.tickmarkOffset
- ), c = w.chart.renderer, a = this.gridLine, t = v.gridLineWidth, s = v.gridLineColor, n = v.gridLineDashStyle;
- this.type === "minor" && (t = v.minorGridLineWidth, s = v.minorGridLineColor, n = v.minorGridLineDashStyle), a || (w.chart.styledMode || (l.stroke = s, l["stroke-width"] = t || 0, l.dashstyle = n), u || (l.zIndex = 1), j && (k = 0), this.gridLine = a = c.path().attr(l).addClass("highcharts-" + (u ? u + "-" : "") + "grid-line").add(w.gridGroup)), a && (b = w.getPlotLinePath({ value: h + i, lineWidth: a.strokeWidth() * b, force: "pass", old: j })) && a[j || this.isNew ? "attr" : "animate"]({ d: b, opacity: k });
- }, O.prototype.renderMark = function(j, k, b) {
- var w = this.axis, v = w.options, l = w.chart.renderer, h = this.type, u = w.tickSize(h ? h + "Tick" : "tick"), i = j.x;
- j = j.y;
- var c = T(v[h !== "minor" ? "tickWidth" : "minorTickWidth"], !h && w.isXAxis ? 1 : 0);
- v = v[h !== "minor" ? "tickColor" : "minorTickColor"];
- var a = this.mark, t = !a;
- u && (w.opposite && (u[0] = -u[0]), a || (this.mark = a = l.path().addClass("highcharts-" + (h ? h + "-" : "") + "tick").add(w.axisGroup), w.chart.styledMode || a.attr({ stroke: v, "stroke-width": c })), a[t ? "attr" : "animate"]({ d: this.getMarkPath(
- i,
- j,
- u[0],
- a.strokeWidth() * b,
- w.horiz,
- l
- ), opacity: k }));
- }, O.prototype.renderLabel = function(j, k, b, w) {
- var v = this.axis, l = v.horiz, h = v.options, u = this.label, i = h.labels, c = i.step;
- v = T(this.tickmarkOffset, v.tickmarkOffset);
- var a = j.x;
- j = j.y;
- var t = !0;
- u && x(a) && (u.xy = j = this.getLabelPosition(a, j, u, l, i, v, w, c), this.isFirst && !this.isLast && !h.showFirstLabel || this.isLast && !this.isFirst && !h.showLastLabel ? t = !1 : !l || i.step || i.rotation || k || b === 0 || this.handleOverflow(j), c && w % c && (t = !1), t && x(j.y) ? (j.opacity = b, u[this.isNewLabel ? "attr" : "animate"](j), this.isNewLabel = !1) : (u.attr("y", -9999), this.isNewLabel = !0));
- }, O.prototype.replaceMovedLabel = function() {
- var j = this.label, k = this.axis, b = k.reversed;
- if (j && !this.isNew) {
- var w = k.horiz ? b ? k.left : k.width + k.left : j.xy.x;
- b = k.horiz ? j.xy.y : b ? k.width + k.top : k.top, j.animate({ x: w, y: b, opacity: 0 }, void 0, j.destroy), delete this.label;
- }
- k.isDirty = !0, this.label = this.movedLabel, delete this.movedLabel;
- }, O;
- }(), N;
- }
- ), M(o, "Core/Axis/Axis.js", [
- o["Core/Animation/AnimationUtilities.js"],
- o["Core/Axis/AxisDefaults.js"],
- o["Core/Color/Color.js"],
- o["Core/DefaultOptions.js"],
- o["Core/Foundation.js"],
- o["Core/Globals.js"],
- o["Core/Axis/Tick.js"],
- o["Core/Utilities.js"]
- ], function(y, N, D, U, H, V, G, R) {
- var B = y.animObject, S = U.defaultOptions, x = H.registerEventOptions, f = V.deg2rad, d = R.arrayMax, T = R.arrayMin, O = R.clamp, j = R.correctFloat, k = R.defined, b = R.destroyObjectProperties, w = R.erase, v = R.error, l = R.extend, h = R.fireEvent, u = R.getMagnitude, i = R.isArray, c = R.isNumber, a = R.isString, t = R.merge, s = R.normalizeTickInterval, n = R.objectEach, P = R.pick, _ = R.relativeLength, I = R.removeEvent, W = R.splat, E = R.syncTimeout;
- return y = function() {
- function X(g, m) {
- this.zoomEnabled = this.width = this.visible = this.userOptions = this.translationSlope = this.transB = this.transA = this.top = this.ticks = this.tickRotCorr = this.tickPositions = this.tickmarkOffset = this.tickInterval = this.tickAmount = this.side = this.series = this.right = this.positiveValuesOnly = this.pos = this.pointRangePadding = this.pointRange = this.plotLinesAndBandsGroups = this.plotLinesAndBands = this.paddedTicks = this.overlap = this.options = this.offset = this.names = this.minPixelPadding = this.minorTicks = this.minorTickInterval = this.min = this.maxLabelLength = this.max = this.len = this.left = this.labelFormatter = this.labelEdge = this.isLinked = this.height = this.hasVisibleSeries = this.hasNames = this.eventOptions = this.coll = this.closestPointRange = this.chart = this.categories = this.bottom = this.alternateBands = void 0, this.init(g, m);
- }
- return X.prototype.init = function(g, m) {
- var L = m.isX;
- this.chart = g, this.horiz = g.inverted && !this.isZAxis ? !L : L, this.isXAxis = L, this.coll = this.coll || (L ? "xAxis" : "yAxis"), h(this, "init", { userOptions: m }), this.opposite = P(m.opposite, this.opposite), this.side = P(m.side, this.side, this.horiz ? this.opposite ? 0 : 2 : this.opposite ? 1 : 3), this.setOptions(m);
- var z = this.options, $ = z.labels, Q = z.type;
- this.userOptions = m, this.minPixelPadding = 0, this.reversed = P(z.reversed, this.reversed), this.visible = z.visible, this.zoomEnabled = z.zoomEnabled, this.hasNames = Q === "category" || z.categories === !0, this.categories = z.categories || this.hasNames, this.names || (this.names = [], this.names.keys = {}), this.plotLinesAndBandsGroups = {}, this.positiveValuesOnly = !!this.logarithmic, this.isLinked = k(z.linkedTo), this.ticks = {}, this.labelEdge = [], this.minorTicks = {}, this.plotLinesAndBands = [], this.alternateBands = {}, this.len = 0, this.minRange = this.userMinRange = z.minRange || z.maxZoom, this.range = z.range, this.offset = z.offset || 0, this.min = this.max = null, m = P(z.crosshair, W(g.options.tooltip.crosshairs)[L ? 0 : 1]), this.crosshair = m === !0 ? {} : m, g.axes.indexOf(this) === -1 && (L ? g.axes.splice(g.xAxis.length, 0, this) : g.axes.push(this), g[this.coll].push(this)), this.series = this.series || [], g.inverted && !this.isZAxis && L && typeof this.reversed > "u" && (this.reversed = !0), this.labelRotation = c($.rotation) ? $.rotation : void 0, x(this, z), h(this, "afterInit");
- }, X.prototype.setOptions = function(g) {
- this.options = t(N.defaultXAxisOptions, this.coll === "yAxis" && N.defaultYAxisOptions, [N.defaultTopAxisOptions, N.defaultRightAxisOptions, N.defaultBottomAxisOptions, N.defaultLeftAxisOptions][this.side], t(S[this.coll], g)), h(this, "afterSetOptions", { userOptions: g });
- }, X.prototype.defaultLabelFormatter = function(g) {
- var m = this.axis;
- g = this.chart.numberFormatter;
- var L = c(this.value) ? this.value : NaN, z = m.chart.time, $ = this.dateTimeLabelFormat, Q = S.lang, A = Q.numericSymbols;
- Q = Q.numericSymbolMagnitude || 1e3;
- var F = m.logarithmic ? Math.abs(L) : m.tickInterval, Y = A && A.length;
- if (m.categories)
- var Z = "" + this.value;
- else if ($)
- Z = z.dateFormat($, L);
- else if (Y && 1e3 <= F)
- for (; Y-- && typeof Z > "u"; )
- m = Math.pow(Q, Y + 1), F >= m && 10 * L % m === 0 && A[Y] !== null && L !== 0 && (Z = g(L / m, -1) + A[Y]);
- return typeof Z > "u" && (Z = 1e4 <= Math.abs(L) ? g(L, -1) : g(L, -1, void 0, "")), Z;
- }, X.prototype.getSeriesExtremes = function() {
- var g = this, m = g.chart, L;
- h(this, "getSeriesExtremes", null, function() {
- g.hasVisibleSeries = !1, g.dataMin = g.dataMax = g.threshold = null, g.softThreshold = !g.isXAxis, g.stacking && g.stacking.buildStacks(), g.series.forEach(function(z) {
- if (z.visible || !m.options.chart.ignoreHiddenSeries) {
- var $ = z.options, Q = $.threshold;
- if (g.hasVisibleSeries = !0, g.positiveValuesOnly && 0 >= Q && (Q = null), g.isXAxis) {
- if ($ = z.xData, $.length) {
- $ = g.logarithmic ? $.filter(g.validatePositiveValue) : $, L = z.getXExtremes($);
- var A = L.min, F = L.max;
- c(A) || A instanceof Date || ($ = $.filter(c), L = z.getXExtremes($), A = L.min, F = L.max), $.length && (g.dataMin = Math.min(P(g.dataMin, A), A), g.dataMax = Math.max(P(g.dataMax, F), F));
- }
- } else
- z = z.applyExtremes(), c(z.dataMin) && (A = z.dataMin, g.dataMin = Math.min(P(g.dataMin, A), A)), c(z.dataMax) && (F = z.dataMax, g.dataMax = Math.max(P(g.dataMax, F), F)), k(Q) && (g.threshold = Q), (!$.softThreshold || g.positiveValuesOnly) && (g.softThreshold = !1);
- }
- });
- }), h(this, "afterGetSeriesExtremes");
- }, X.prototype.translate = function(g, m, L, z, $, Q) {
- var A = this.linkedParent || this, F = z && A.old ? A.old.min : A.min, Y = A.minPixelPadding;
- $ = (A.isOrdinal || A.brokenAxis && A.brokenAxis.hasBreaks || A.logarithmic && $) && A.lin2val;
- var Z = 1, q = 0;
- return z = z && A.old ? A.old.transA : A.transA, z || (z = A.transA), L && (Z *= -1, q = A.len), A.reversed && (Z *= -1, q -= Z * (A.sector || A.len)), m ? (g = (g * Z + q - Y) / z + F, $ && (g = A.lin2val(g))) : ($ && (g = A.val2lin(g)), g = c(F) ? Z * (g - F) * z + q + Z * Y + (c(Q) ? z * Q : 0) : void 0), g;
- }, X.prototype.toPixels = function(g, m) {
- return this.translate(
- g,
- !1,
- !this.horiz,
- null,
- !0
- ) + (m ? 0 : this.pos);
- }, X.prototype.toValue = function(g, m) {
- return this.translate(g - (m ? 0 : this.pos), !0, !this.horiz, null, !0);
- }, X.prototype.getPlotLinePath = function(g) {
- function m(at, J, tt) {
- return (nt !== "pass" && at < J || at > tt) && (nt ? at = O(at, J, tt) : ht = !0), at;
- }
- var L = this, z = L.chart, $ = L.left, Q = L.top, A = g.old, F = g.value, Y = g.lineWidth, Z = A && z.oldChartHeight || z.chartHeight, q = A && z.oldChartWidth || z.chartWidth, it = L.transB, et = g.translatedValue, nt = g.force, rt, ct, gt, dt, ht;
- return g = {
- value: F,
- lineWidth: Y,
- old: A,
- force: nt,
- acrossPanes: g.acrossPanes,
- translatedValue: et
- }, h(this, "getPlotLinePath", g, function(at) {
- et = P(et, L.translate(F, null, null, A)), et = O(et, -1e5, 1e5), rt = gt = Math.round(et + it), ct = dt = Math.round(Z - et - it), c(et) ? L.horiz ? (ct = Q, dt = Z - L.bottom, rt = gt = m(rt, $, $ + L.width)) : (rt = $, gt = q - L.right, ct = dt = m(ct, Q, Q + L.height)) : (ht = !0, nt = !1), at.path = ht && !nt ? null : z.renderer.crispLine([["M", rt, ct], ["L", gt, dt]], Y || 1);
- }), g.path;
- }, X.prototype.getLinearTickPositions = function(g, m, L) {
- var z = j(Math.floor(m / g) * g);
- L = j(Math.ceil(L / g) * g);
- var $ = [], Q;
- if (j(z + g) === z && (Q = 20), this.single)
- return [m];
- for (m = z; m <= L && ($.push(m), m = j(m + g, Q), m !== A); )
- var A = m;
- return $;
- }, X.prototype.getMinorTickInterval = function() {
- var g = this.options;
- return g.minorTicks === !0 ? P(g.minorTickInterval, "auto") : g.minorTicks === !1 ? null : g.minorTickInterval;
- }, X.prototype.getMinorTickPositions = function() {
- var g = this.options, m = this.tickPositions, L = this.minorTickInterval, z = this.pointRangePadding || 0, $ = this.min - z;
- z = this.max + z;
- var Q = z - $, A = [];
- if (Q && Q / L < this.len / 3) {
- var F = this.logarithmic;
- if (F)
- this.paddedTicks.forEach(function(Y, Z, q) {
- Z && A.push.apply(
- A,
- F.getLogTickPositions(L, q[Z - 1], q[Z], !0)
- );
- });
- else if (this.dateTime && this.getMinorTickInterval() === "auto")
- A = A.concat(this.getTimeTicks(this.dateTime.normalizeTimeTickInterval(L), $, z, g.startOfWeek));
- else
- for (g = $ + (m[0] - $) % L; g <= z && g !== A[0]; g += L)
- A.push(g);
- }
- return A.length !== 0 && this.trimTicks(A), A;
- }, X.prototype.adjustForMinRange = function() {
- var g = this.options, m = this.logarithmic, L = this.min, z = this.max, $ = 0, Q, A, F, Y;
- if (this.isXAxis && typeof this.minRange > "u" && !m && (k(g.min) || k(g.max) || k(g.floor) || k(g.ceiling) ? this.minRange = null : (this.series.forEach(function(et) {
- if (F = et.xData, Y = et.xIncrement ? 1 : F.length - 1, 1 < F.length)
- for (Q = Y; 0 < Q; Q--)
- A = F[Q] - F[Q - 1], (!$ || A < $) && ($ = A);
- }), this.minRange = Math.min(5 * $, this.dataMax - this.dataMin))), z - L < this.minRange) {
- var Z = this.dataMax - this.dataMin >= this.minRange, q = this.minRange, it = (q - z + L) / 2;
- it = [L - it, P(g.min, L - it)], Z && (it[2] = this.logarithmic ? this.logarithmic.log2lin(this.dataMin) : this.dataMin), L = d(it), z = [L + q, P(g.max, L + q)], Z && (z[2] = m ? m.log2lin(this.dataMax) : this.dataMax), z = T(z), z - L < q && (it[0] = z - q, it[1] = P(g.min, z - q), L = d(it));
- }
- this.min = L, this.max = z;
- }, X.prototype.getClosest = function() {
- var g;
- return this.categories ? g = 1 : this.series.forEach(function(m) {
- var L = m.closestPointRange, z = m.visible || !m.chart.options.chart.ignoreHiddenSeries;
- !m.noSharedTooltip && k(L) && z && (g = k(g) ? Math.min(g, L) : L);
- }), g;
- }, X.prototype.nameToX = function(g) {
- var m = i(this.categories), L = m ? this.categories : this.names, z = g.options.x;
- if (g.series.requireSorting = !1, k(z) || (z = this.options.uniqueNames ? m ? L.indexOf(g.name) : P(L.keys[g.name], -1) : g.series.autoIncrement()), z === -1) {
- if (!m)
- var $ = L.length;
- } else
- $ = z;
- return typeof $ < "u" && (this.names[$] = g.name, this.names.keys[g.name] = $), $;
- }, X.prototype.updateNames = function() {
- var g = this, m = this.names;
- 0 < m.length && (Object.keys(m.keys).forEach(function(L) {
- delete m.keys[L];
- }), m.length = 0, this.minRange = this.userMinRange, (this.series || []).forEach(function(L) {
- L.xIncrement = null, (!L.points || L.isDirtyData) && (g.max = Math.max(g.max, L.xData.length - 1), L.processData(), L.generatePoints()), L.data.forEach(function(z, $) {
- if (z && z.options && typeof z.name < "u") {
- var Q = g.nameToX(z);
- typeof Q < "u" && Q !== z.x && (z.x = Q, L.xData[$] = Q);
- }
- });
- }));
- }, X.prototype.setAxisTranslation = function() {
- var g = this, m = g.max - g.min, L = g.linkedParent, z = !!g.categories, $ = g.isXAxis, Q = g.axisPointRange || 0, A = 0, F = 0, Y = g.transA;
- if ($ || z || Q) {
- var Z = g.getClosest();
- L ? (A = L.minPointOffset, F = L.pointRangePadding) : g.series.forEach(function(q) {
- var it = z ? 1 : $ ? P(q.options.pointRange, Z, 0) : g.axisPointRange || 0, et = q.options.pointPlacement;
- Q = Math.max(Q, it), (!g.single || z) && (q = q.is("xrange") ? !$ : $, A = Math.max(A, q && a(et) ? 0 : it / 2), F = Math.max(F, q && et === "on" ? 0 : it));
- }), L = g.ordinal && g.ordinal.slope && Z ? g.ordinal.slope / Z : 1, g.minPointOffset = A *= L, g.pointRangePadding = F *= L, g.pointRange = Math.min(Q, g.single && z ? 1 : m), $ && (g.closestPointRange = Z);
- }
- g.translationSlope = g.transA = Y = g.staticScale || g.len / (m + F || 1), g.transB = g.horiz ? g.left : g.bottom, g.minPixelPadding = Y * A, h(this, "afterSetAxisTranslation");
- }, X.prototype.minFromRange = function() {
- return this.max - this.range;
- }, X.prototype.setTickInterval = function(g) {
- var m = this.chart, L = this.logarithmic, z = this.options, $ = this.isXAxis, Q = this.isLinked, A = z.tickPixelInterval, F = this.categories, Y = this.softThreshold, Z = z.maxPadding, q = z.minPadding, it = c(z.tickInterval) && 0 <= z.tickInterval ? z.tickInterval : void 0, et = c(this.threshold) ? this.threshold : null;
- this.dateTime || F || Q || this.getTickAmount();
- var nt = P(this.userMin, z.min), rt = P(this.userMax, z.max);
- if (Q) {
- this.linkedParent = m[this.coll][z.linkedTo];
- var ct = this.linkedParent.getExtremes();
- this.min = P(ct.min, ct.dataMin), this.max = P(ct.max, ct.dataMax), z.type !== this.linkedParent.options.type && v(11, 1, m);
- } else {
- if (Y && k(et)) {
- if (this.dataMin >= et)
- ct = et, q = 0;
- else if (this.dataMax <= et) {
- var gt = et;
- Z = 0;
- }
- }
- this.min = P(nt, ct, this.dataMin), this.max = P(rt, gt, this.dataMax);
- }
- if (L && (this.positiveValuesOnly && !g && 0 >= Math.min(this.min, P(this.dataMin, this.min)) && v(10, 1, m), this.min = j(L.log2lin(this.min), 16), this.max = j(L.log2lin(this.max), 16)), this.range && k(this.max) && (this.userMin = this.min = nt = Math.max(this.dataMin, this.minFromRange()), this.userMax = rt = this.max, this.range = null), h(this, "foundExtremes"), this.beforePadding && this.beforePadding(), this.adjustForMinRange(), !(F || this.axisPointRange || this.stacking && this.stacking.usePercentage || Q) && k(this.min) && k(this.max) && (m = this.max - this.min) && (!k(nt) && q && (this.min -= m * q), !k(rt) && Z && (this.max += m * Z)), c(this.userMin) || (c(z.softMin) && z.softMin < this.min && (this.min = nt = z.softMin), c(z.floor) && (this.min = Math.max(this.min, z.floor))), c(this.userMax) || (c(z.softMax) && z.softMax > this.max && (this.max = rt = z.softMax), c(z.ceiling) && (this.max = Math.min(this.max, z.ceiling))), Y && k(this.dataMin) && (et = et || 0, !k(nt) && this.min < et && this.dataMin >= et ? this.min = this.options.minRange ? Math.min(et, this.max - this.minRange) : et : !k(rt) && this.max > et && this.dataMax <= et && (this.max = this.options.minRange ? Math.max(et, this.min + this.minRange) : et)), c(this.min) && c(this.max) && !this.chart.polar && this.min > this.max && (k(this.options.min) ? this.max = this.min : k(this.options.max) && (this.min = this.max)), this.tickInterval = this.min === this.max || typeof this.min > "u" || typeof this.max > "u" ? 1 : Q && this.linkedParent && !it && A === this.linkedParent.options.tickPixelInterval ? it = this.linkedParent.tickInterval : P(it, this.tickAmount ? (this.max - this.min) / Math.max(this.tickAmount - 1, 1) : void 0, F ? 1 : (this.max - this.min) * A / Math.max(this.len, A)), $ && !g) {
- var dt = this.min !== (this.old && this.old.min) || this.max !== (this.old && this.old.max);
- this.series.forEach(function(ht) {
- ht.forceCrop = ht.forceCropping && ht.forceCropping(), ht.processData(dt);
- }), h(this, "postProcessData", { hasExtemesChanged: dt });
- }
- this.setAxisTranslation(), h(this, "initialAxisTranslation"), this.pointRange && !it && (this.tickInterval = Math.max(this.pointRange, this.tickInterval)), g = P(z.minTickInterval, this.dateTime && !this.series.some(function(ht) {
- return ht.noSharedTooltip;
- }) ? this.closestPointRange : 0), !it && this.tickInterval < g && (this.tickInterval = g), this.dateTime || this.logarithmic || it || (this.tickInterval = s(this.tickInterval, void 0, u(this.tickInterval), P(z.allowDecimals, 0.5 > this.tickInterval || this.tickAmount !== void 0), !!this.tickAmount)), this.tickAmount || (this.tickInterval = this.unsquish()), this.setTickPositions();
- }, X.prototype.setTickPositions = function() {
- var g = this.options, m = g.tickPositions, L = this.getMinorTickInterval(), z = this.hasVerticalPanning(), $ = this.coll === "colorAxis", Q = ($ || !z) && g.startOnTick;
- z = ($ || !z) && g.endOnTick, $ = g.tickPositioner, this.tickmarkOffset = this.categories && g.tickmarkPlacement === "between" && this.tickInterval === 1 ? 0.5 : 0, this.minorTickInterval = L === "auto" && this.tickInterval ? this.tickInterval / 5 : L, this.single = this.min === this.max && k(this.min) && !this.tickAmount && (parseInt(this.min, 10) === this.min || g.allowDecimals !== !1), this.tickPositions = L = m && m.slice(), !L && (this.ordinal && this.ordinal.positions || !((this.max - this.min) / this.tickInterval > Math.max(2 * this.len, 200)) ? L = this.dateTime ? this.getTimeTicks(this.dateTime.normalizeTimeTickInterval(this.tickInterval, g.units), this.min, this.max, g.startOfWeek, this.ordinal && this.ordinal.positions, this.closestPointRange, !0) : this.logarithmic ? this.logarithmic.getLogTickPositions(this.tickInterval, this.min, this.max) : this.getLinearTickPositions(
- this.tickInterval,
- this.min,
- this.max
- ) : (L = [this.min, this.max], v(19, !1, this.chart)), L.length > this.len && (L = [L[0], L.pop()], L[0] === L[1] && (L.length = 1)), this.tickPositions = L, $ && ($ = $.apply(this, [this.min, this.max]))) && (this.tickPositions = L = $), this.paddedTicks = L.slice(0), this.trimTicks(L, Q, z), this.isLinked || (this.single && 2 > L.length && !this.categories && !this.series.some(function(A) {
- return A.is("heatmap") && A.options.pointPlacement === "between";
- }) && (this.min -= 0.5, this.max += 0.5), m || $ || this.adjustTickAmount()), h(this, "afterSetTickPositions");
- }, X.prototype.trimTicks = function(g, m, L) {
- var z = g[0], $ = g[g.length - 1], Q = !this.isOrdinal && this.minPointOffset || 0;
- if (h(this, "trimTicks"), !this.isLinked) {
- if (m && z !== -1 / 0)
- this.min = z;
- else
- for (; this.min - Q > g[0]; )
- g.shift();
- if (L)
- this.max = $;
- else
- for (; this.max + Q < g[g.length - 1]; )
- g.pop();
- g.length === 0 && k(z) && !this.options.tickPositions && g.push(($ + z) / 2);
- }
- }, X.prototype.alignToOthers = function() {
- var g = {}, m = this.options, L;
- return this.chart.options.chart.alignTicks !== !1 && m.alignTicks && m.startOnTick !== !1 && m.endOnTick !== !1 && !this.logarithmic && this.chart[this.coll].forEach(function(z) {
- var $ = z.options;
- $ = [z.horiz ? $.left : $.top, $.width, $.height, $.pane].join(), z.series.length && (g[$] ? L = !0 : g[$] = 1);
- }), L;
- }, X.prototype.getTickAmount = function() {
- var g = this.options, m = g.tickPixelInterval, L = g.tickAmount;
- !k(g.tickInterval) && !L && this.len < m && !this.isRadial && !this.logarithmic && g.startOnTick && g.endOnTick && (L = 2), !L && this.alignToOthers() && (L = Math.ceil(this.len / m) + 1), 4 > L && (this.finalTickAmt = L, L = 5), this.tickAmount = L;
- }, X.prototype.adjustTickAmount = function() {
- var g = this.options, m = this.tickInterval, L = this.tickPositions, z = this.tickAmount, $ = this.finalTickAmt, Q = L && L.length, A = P(this.threshold, this.softThreshold ? 0 : null);
- if (this.hasData() && c(this.min) && c(this.max)) {
- if (Q < z) {
- for (; L.length < z; )
- L.length % 2 || this.min === A ? L.push(j(L[L.length - 1] + m)) : L.unshift(j(L[0] - m));
- this.transA *= (Q - 1) / (z - 1), this.min = g.startOnTick ? L[0] : Math.min(this.min, L[0]), this.max = g.endOnTick ? L[L.length - 1] : Math.max(this.max, L[L.length - 1]);
- } else
- Q > z && (this.tickInterval *= 2, this.setTickPositions());
- if (k($)) {
- for (m = g = L.length; m--; )
- ($ === 3 && m % 2 === 1 || 2 >= $ && 0 < m && m < g - 1) && L.splice(m, 1);
- this.finalTickAmt = void 0;
- }
- }
- }, X.prototype.setScale = function() {
- var g = !1, m = !1;
- this.series.forEach(function(z) {
- g = g || z.isDirtyData || z.isDirty, m = m || z.xAxis && z.xAxis.isDirty || !1;
- }), this.setAxisSize();
- var L = this.len !== (this.old && this.old.len);
- L || g || m || this.isLinked || this.forceRedraw || this.userMin !== (this.old && this.old.userMin) || this.userMax !== (this.old && this.old.userMax) || this.alignToOthers() ? (this.stacking && this.stacking.resetStacks(), this.forceRedraw = !1, this.getSeriesExtremes(), this.setTickInterval(), this.isDirty || (this.isDirty = L || this.min !== (this.old && this.old.min) || this.max !== (this.old && this.old.max))) : this.stacking && this.stacking.cleanStacks(), g && this.panningState && (this.panningState.isDirty = !0), h(this, "afterSetScale");
- }, X.prototype.setExtremes = function(g, m, L, z, $) {
- var Q = this, A = Q.chart;
- L = P(L, !0), Q.series.forEach(function(F) {
- delete F.kdTree;
- }), $ = l($, { min: g, max: m }), h(Q, "setExtremes", $, function() {
- Q.userMin = g, Q.userMax = m, Q.eventArgs = $, L && A.redraw(z);
- });
- }, X.prototype.zoom = function(g, m) {
- var L = this, z = this.dataMin, $ = this.dataMax, Q = this.options, A = Math.min(z, P(Q.min, z)), F = Math.max($, P(Q.max, $));
- return g = { newMin: g, newMax: m }, h(this, "zoom", g, function(Y) {
- var Z = Y.newMin, q = Y.newMax;
- (Z !== L.min || q !== L.max) && (L.allowZoomOutside || (k(z) && (Z < A && (Z = A), Z > F && (Z = F)), k($) && (q < A && (q = A), q > F && (q = F))), L.displayBtn = typeof Z < "u" || typeof q < "u", L.setExtremes(Z, q, !1, void 0, { trigger: "zoom" })), Y.zoomed = !0;
- }), g.zoomed;
- }, X.prototype.setAxisSize = function() {
- var g = this.chart, m = this.options, L = m.offsets || [0, 0, 0, 0], z = this.horiz, $ = this.width = Math.round(_(P(m.width, g.plotWidth - L[3] + L[1]), g.plotWidth)), Q = this.height = Math.round(_(P(m.height, g.plotHeight - L[0] + L[2]), g.plotHeight)), A = this.top = Math.round(_(P(m.top, g.plotTop + L[0]), g.plotHeight, g.plotTop));
- m = this.left = Math.round(_(P(m.left, g.plotLeft + L[3]), g.plotWidth, g.plotLeft)), this.bottom = g.chartHeight - Q - A, this.right = g.chartWidth - $ - m, this.len = Math.max(z ? $ : Q, 0), this.pos = z ? m : A;
- }, X.prototype.getExtremes = function() {
- var g = this.logarithmic;
- return { min: g ? j(g.lin2log(this.min)) : this.min, max: g ? j(g.lin2log(this.max)) : this.max, dataMin: this.dataMin, dataMax: this.dataMax, userMin: this.userMin, userMax: this.userMax };
- }, X.prototype.getThreshold = function(g) {
- var m = this.logarithmic, L = m ? m.lin2log(this.min) : this.min;
- return m = m ? m.lin2log(this.max) : this.max, g === null || g === -1 / 0 ? g = L : g === 1 / 0 ? g = m : L > g ? g = L : m < g && (g = m), this.translate(g, 0, 1, 0, 1);
- }, X.prototype.autoLabelAlign = function(g) {
- var m = (P(g, 0) - 90 * this.side + 720) % 360;
- return g = { align: "center" }, h(
- this,
- "autoLabelAlign",
- g,
- function(L) {
- 15 < m && 165 > m ? L.align = "right" : 195 < m && 345 > m && (L.align = "left");
- }
- ), g.align;
- }, X.prototype.tickSize = function(g) {
- var m = this.options, L = P(m[g === "tick" ? "tickWidth" : "minorTickWidth"], g === "tick" && this.isXAxis && !this.categories ? 1 : 0), z = m[g === "tick" ? "tickLength" : "minorTickLength"];
- if (L && z) {
- m[g + "Position"] === "inside" && (z = -z);
- var $ = [z, L];
- }
- return g = { tickSize: $ }, h(this, "afterTickSize", g), g.tickSize;
- }, X.prototype.labelMetrics = function() {
- var g = this.tickPositions && this.tickPositions[0] || 0;
- return this.chart.renderer.fontMetrics(
- this.options.labels.style.fontSize,
- this.ticks[g] && this.ticks[g].label
- );
- }, X.prototype.unsquish = function() {
- var g = this.options.labels, m = this.horiz, L = this.tickInterval, z = this.len / (((this.categories ? 1 : 0) + this.max - this.min) / L), $ = g.rotation, Q = this.labelMetrics(), A = Math.max(this.max - this.min, 0), F = function(nt) {
- var rt = nt / (z || 1);
- return rt = 1 < rt ? Math.ceil(rt) : 1, rt * L > A && nt !== 1 / 0 && z !== 1 / 0 && A && (rt = Math.ceil(A / L)), j(rt * L);
- }, Y = L, Z, q, it = Number.MAX_VALUE;
- if (m) {
- if (!g.staggerLines && !g.step)
- if (c($))
- var et = [$];
- else
- z < g.autoRotationLimit && (et = g.autoRotation);
- et && et.forEach(function(nt) {
- if (nt === $ || nt && -90 <= nt && 90 >= nt) {
- q = F(Math.abs(Q.h / Math.sin(f * nt)));
- var rt = q + Math.abs(nt / 360);
- rt < it && (it = rt, Z = nt, Y = q);
- }
- });
- } else
- g.step || (Y = F(Q.h));
- return this.autoRotation = et, this.labelRotation = P(Z, c($) ? $ : 0), Y;
- }, X.prototype.getSlotWidth = function(g) {
- var m = this.chart, L = this.horiz, z = this.options.labels, $ = Math.max(this.tickPositions.length - (this.categories ? 0 : 1), 1), Q = m.margin[3];
- if (g && c(g.slotWidth))
- return g.slotWidth;
- if (L && 2 > z.step)
- return z.rotation ? 0 : (this.staggerLines || 1) * this.len / $;
- if (!L) {
- if (g = z.style.width, g !== void 0)
- return parseInt(String(g), 10);
- if (Q)
- return Q - m.spacing[3];
- }
- return 0.33 * m.chartWidth;
- }, X.prototype.renderUnsquish = function() {
- var g = this.chart, m = g.renderer, L = this.tickPositions, z = this.ticks, $ = this.options.labels, Q = $.style, A = this.horiz, F = this.getSlotWidth(), Y = Math.max(1, Math.round(F - 2 * $.padding)), Z = {}, q = this.labelMetrics(), it = Q.textOverflow, et = 0;
- if (a($.rotation) || (Z.rotation = $.rotation || 0), L.forEach(function(gt) {
- gt = z[gt], gt.movedLabel && gt.replaceMovedLabel(), gt && gt.label && gt.label.textPxLength > et && (et = gt.label.textPxLength);
- }), this.maxLabelLength = et, this.autoRotation)
- et > Y && et > q.h ? Z.rotation = this.labelRotation : this.labelRotation = 0;
- else if (F) {
- var nt = Y;
- if (!it) {
- var rt = "clip";
- for (Y = L.length; !A && Y--; ) {
- var ct = L[Y];
- (ct = z[ct].label) && (ct.styles && ct.styles.textOverflow === "ellipsis" ? ct.css({ textOverflow: "clip" }) : ct.textPxLength > F && ct.css({ width: F + "px" }), ct.getBBox().height > this.len / L.length - (q.h - q.f) && (ct.specificTextOverflow = "ellipsis"));
- }
- }
- }
- Z.rotation && (nt = et > 0.5 * g.chartHeight ? 0.33 * g.chartHeight : et, it || (rt = "ellipsis")), (this.labelAlign = $.align || this.autoLabelAlign(this.labelRotation)) && (Z.align = this.labelAlign), L.forEach(function(gt) {
- var dt = (gt = z[gt]) && gt.label, ht = Q.width, at = {};
- dt && (dt.attr(Z), gt.shortenLabel ? gt.shortenLabel() : nt && !ht && Q.whiteSpace !== "nowrap" && (nt < dt.textPxLength || dt.element.tagName === "SPAN") ? (at.width = nt + "px", it || (at.textOverflow = dt.specificTextOverflow || rt), dt.css(at)) : dt.styles && dt.styles.width && !at.width && !ht && dt.css({ width: null }), delete dt.specificTextOverflow, gt.rotation = Z.rotation);
- }, this), this.tickRotCorr = m.rotCorr(q.b, this.labelRotation || 0, this.side !== 0);
- }, X.prototype.hasData = function() {
- return this.series.some(function(g) {
- return g.hasData();
- }) || this.options.showEmpty && k(this.min) && k(this.max);
- }, X.prototype.addTitle = function(g) {
- var m = this.chart.renderer, L = this.horiz, z = this.opposite, $ = this.options.title, Q = this.chart.styledMode, A;
- this.axisTitle || ((A = $.textAlign) || (A = (L ? { low: "left", middle: "center", high: "right" } : { low: z ? "right" : "left", middle: "center", high: z ? "left" : "right" })[$.align]), this.axisTitle = m.text($.text || "", 0, 0, $.useHTML).attr({ zIndex: 7, rotation: $.rotation, align: A }).addClass("highcharts-axis-title"), Q || this.axisTitle.css(t($.style)), this.axisTitle.add(this.axisGroup), this.axisTitle.isNew = !0), Q || $.style.width || this.isRadial || this.axisTitle.css({ width: this.len + "px" }), this.axisTitle[g ? "show" : "hide"](g);
- }, X.prototype.generateTick = function(g) {
- var m = this.ticks;
- m[g] ? m[g].addLabel() : m[g] = new G(this, g);
- }, X.prototype.getOffset = function() {
- var g = this, m = this, L = m.chart, z = m.horiz, $ = m.options, Q = m.side, A = m.ticks, F = m.tickPositions, Y = m.coll, Z = m.axisParent, q = L.renderer, it = L.inverted && !m.isZAxis ? [1, 0, 3, 2][Q] : Q, et = m.hasData(), nt = $.title, rt = $.labels, ct = L.axisOffset;
- L = L.clipOffset;
- var gt = [
- -1,
- 1,
- 1,
- -1
- ][Q], dt = $.className, ht, at = 0, J = 0, tt = 0;
- if (m.showAxis = ht = et || $.showEmpty, m.staggerLines = m.horiz && rt.staggerLines || void 0, !m.axisGroup) {
- var ot = function(pt, yt, vt) {
- return q.g(pt).attr({ zIndex: vt }).addClass("highcharts-" + Y.toLowerCase() + yt + " " + (g.isRadial ? "highcharts-radial-axis" + yt + " " : "") + (dt || "")).add(Z);
- };
- m.gridGroup = ot("grid", "-grid", $.gridZIndex), m.axisGroup = ot("axis", "", $.zIndex), m.labelGroup = ot("axis-labels", "-labels", rt.zIndex);
- }
- if (et || m.isLinked ? (F.forEach(function(pt) {
- m.generateTick(pt);
- }), m.renderUnsquish(), m.reserveSpaceDefault = Q === 0 || Q === 2 || { 1: "left", 3: "right" }[Q] === m.labelAlign, P(rt.reserveSpace, m.labelAlign === "center" ? !0 : null, m.reserveSpaceDefault) && F.forEach(function(pt) {
- tt = Math.max(A[pt].getLabelSize(), tt);
- }), m.staggerLines && (tt *= m.staggerLines), m.labelOffset = tt * (m.opposite ? -1 : 1)) : n(A, function(pt, yt) {
- pt.destroy(), delete A[yt];
- }), nt && nt.text && nt.enabled !== !1 && (m.addTitle(ht), ht && nt.reserveSpace !== !1)) {
- m.titleOffset = at = m.axisTitle.getBBox()[z ? "height" : "width"];
- var lt = nt.offset;
- J = k(lt) ? 0 : P(nt.margin, z ? 5 : 10);
- }
- m.renderLine(), m.offset = gt * P($.offset, ct[Q] ? ct[Q] + ($.margin || 0) : 0), m.tickRotCorr = m.tickRotCorr || { x: 0, y: 0 }, nt = Q === 0 ? -m.labelMetrics().h : Q === 2 ? m.tickRotCorr.y : 0, et = Math.abs(tt) + J, tt && (et = et - nt + gt * (z ? P(rt.y, m.tickRotCorr.y + 8 * gt) : rt.x)), m.axisTitleMargin = P(lt, et), m.getMaxLabelDimensions && (m.maxLabelDimensions = m.getMaxLabelDimensions(A, F)), Y !== "colorAxis" && (z = this.tickSize("tick"), ct[Q] = Math.max(ct[Q], (m.axisTitleMargin || 0) + at + gt * m.offset, et, F && F.length && z ? z[0] + gt * m.offset : 0), $ = !m.axisLine || $.offset ? 0 : 2 * Math.floor(m.axisLine.strokeWidth() / 2), L[it] = Math.max(L[it], $)), h(this, "afterGetOffset");
- }, X.prototype.getLinePath = function(g) {
- var m = this.chart, L = this.opposite, z = this.offset, $ = this.horiz, Q = this.left + (L ? this.width : 0) + z;
- return z = m.chartHeight - this.bottom - (L ? this.height : 0) + z, L && (g *= -1), m.renderer.crispLine([["M", $ ? this.left : Q, $ ? z : this.top], ["L", $ ? m.chartWidth - this.right : Q, $ ? z : m.chartHeight - this.bottom]], g);
- }, X.prototype.renderLine = function() {
- this.axisLine || (this.axisLine = this.chart.renderer.path().addClass("highcharts-axis-line").add(this.axisGroup), this.chart.styledMode || this.axisLine.attr({ stroke: this.options.lineColor, "stroke-width": this.options.lineWidth, zIndex: 7 }));
- }, X.prototype.getTitlePosition = function() {
- var g = this.horiz, m = this.left, L = this.top, z = this.len, $ = this.options.title, Q = g ? m : L, A = this.opposite, F = this.offset, Y = $.x, Z = $.y, q = this.axisTitle, it = this.chart.renderer.fontMetrics($.style.fontSize, q);
- return q = Math.max(q.getBBox(null, 0).height - it.h - 1, 0), z = { low: Q + (g ? 0 : z), middle: Q + z / 2, high: Q + (g ? z : 0) }[$.align], m = (g ? L + this.height : m) + (g ? 1 : -1) * (A ? -1 : 1) * this.axisTitleMargin + [-q, q, it.f, -q][this.side], g = { x: g ? z + Y : m + (A ? this.width : 0) + F + Y, y: g ? m + Z - (A ? this.height : 0) + F : z + Z }, h(this, "afterGetTitlePosition", { titlePosition: g }), g;
- }, X.prototype.renderMinorTick = function(g, m) {
- var L = this.minorTicks;
- L[g] || (L[g] = new G(this, g, "minor")), m && L[g].isNew && L[g].render(null, !0), L[g].render(null, !1, 1);
- }, X.prototype.renderTick = function(g, m, L) {
- var z = this.ticks;
- (!this.isLinked || g >= this.min && g <= this.max || this.grid && this.grid.isColumn) && (z[g] || (z[g] = new G(this, g)), L && z[g].isNew && z[g].render(
- m,
- !0,
- -1
- ), z[g].render(m));
- }, X.prototype.render = function() {
- var g = this, m = g.chart, L = g.logarithmic, z = g.options, $ = g.isLinked, Q = g.tickPositions, A = g.axisTitle, F = g.ticks, Y = g.minorTicks, Z = g.alternateBands, q = z.stackLabels, it = z.alternateGridColor, et = g.tickmarkOffset, nt = g.axisLine, rt = g.showAxis, ct = B(m.renderer.globalAnimation), gt, dt;
- if (g.labelEdge.length = 0, g.overlap = !1, [F, Y, Z].forEach(function(at) {
- n(at, function(J) {
- J.isActive = !1;
- });
- }), g.hasData() || $) {
- var ht = g.chart.hasRendered && g.old && c(g.old.min);
- g.minorTickInterval && !g.categories && g.getMinorTickPositions().forEach(function(at) {
- g.renderMinorTick(at, ht);
- }), Q.length && (Q.forEach(function(at, J) {
- g.renderTick(at, J, ht);
- }), et && (g.min === 0 || g.single) && (F[-1] || (F[-1] = new G(g, -1, null, !0)), F[-1].render(-1))), it && Q.forEach(function(at, J) {
- dt = typeof Q[J + 1] < "u" ? Q[J + 1] + et : g.max - et, J % 2 === 0 && at < g.max && dt <= g.max + (m.polar ? -et : et) && (Z[at] || (Z[at] = new V.PlotLineOrBand(g)), gt = at + et, Z[at].options = { from: L ? L.lin2log(gt) : gt, to: L ? L.lin2log(dt) : dt, color: it, className: "highcharts-alternate-grid" }, Z[at].render(), Z[at].isActive = !0);
- }), g._addedPlotLB || (g._addedPlotLB = !0, (z.plotLines || []).concat(z.plotBands || []).forEach(function(at) {
- g.addPlotBandOrLine(at);
- }));
- }
- [F, Y, Z].forEach(function(at) {
- var J = [], tt = ct.duration;
- n(at, function(ot, lt) {
- ot.isActive || (ot.render(lt, !1, 0), ot.isActive = !1, J.push(lt));
- }), E(function() {
- for (var ot = J.length; ot--; )
- at[J[ot]] && !at[J[ot]].isActive && (at[J[ot]].destroy(), delete at[J[ot]]);
- }, at !== Z && m.hasRendered && tt ? tt : 0);
- }), nt && (nt[nt.isPlaced ? "animate" : "attr"]({ d: this.getLinePath(nt.strokeWidth()) }), nt.isPlaced = !0, nt[rt ? "show" : "hide"](rt)), A && rt && (z = g.getTitlePosition(), c(z.y) ? (A[A.isNew ? "attr" : "animate"](z), A.isNew = !1) : (A.attr("y", -9999), A.isNew = !0)), q && q.enabled && g.stacking && g.stacking.renderStackTotals(), g.old = { len: g.len, max: g.max, min: g.min, transA: g.transA, userMax: g.userMax, userMin: g.userMin }, g.isDirty = !1, h(this, "afterRender");
- }, X.prototype.redraw = function() {
- this.visible && (this.render(), this.plotLinesAndBands.forEach(function(g) {
- g.render();
- })), this.series.forEach(function(g) {
- g.isDirty = !0;
- });
- }, X.prototype.getKeepProps = function() {
- return this.keepProps || X.keepProps;
- }, X.prototype.destroy = function(g) {
- var m = this, L = m.plotLinesAndBands, z = this.eventOptions;
- if (h(this, "destroy", { keepEvents: g }), g || I(m), [m.ticks, m.minorTicks, m.alternateBands].forEach(function(Q) {
- b(Q);
- }), L)
- for (g = L.length; g--; )
- L[g].destroy();
- "axisLine axisTitle axisGroup gridGroup labelGroup cross scrollbar".split(" ").forEach(function(Q) {
- m[Q] && (m[Q] = m[Q].destroy());
- });
- for (var $ in m.plotLinesAndBandsGroups)
- m.plotLinesAndBandsGroups[$] = m.plotLinesAndBandsGroups[$].destroy();
- n(m, function(Q, A) {
- m.getKeepProps().indexOf(A) === -1 && delete m[A];
- }), this.eventOptions = z;
- }, X.prototype.drawCrosshair = function(g, m) {
- var L = this.crosshair, z = P(L && L.snap, !0), $ = this.chart, Q, A = this.cross;
- if (h(this, "drawCrosshair", { e: g, point: m }), g || (g = this.cross && this.cross.e), L && (k(m) || !z) !== !1) {
- if (z ? k(m) && (Q = P(this.coll !== "colorAxis" ? m.crosshairPos : null, this.isXAxis ? m.plotX : this.len - m.plotY)) : Q = g && (this.horiz ? g.chartX - this.pos : this.len - g.chartY + this.pos), k(Q)) {
- var F = { value: m && (this.isXAxis ? m.x : P(m.stackY, m.y)), translatedValue: Q };
- $.polar && l(F, { isCrosshair: !0, chartX: g && g.chartX, chartY: g && g.chartY, point: m }), F = this.getPlotLinePath(F) || null;
- }
- if (!k(F)) {
- this.hideCrosshair();
- return;
- }
- z = this.categories && !this.isRadial, A || (this.cross = A = $.renderer.path().addClass("highcharts-crosshair highcharts-crosshair-" + (z ? "category " : "thin ") + (L.className || "")).attr({ zIndex: P(L.zIndex, 2) }).add(), $.styledMode || (A.attr({ stroke: L.color || (z ? D.parse("#ccd6eb").setOpacity(0.25).get() : "#cccccc"), "stroke-width": P(L.width, 1) }).css({ "pointer-events": "none" }), L.dashStyle && A.attr({ dashstyle: L.dashStyle }))), A.show().attr({ d: F }), z && !L.width && A.attr({ "stroke-width": this.transA }), this.cross.e = g;
- } else
- this.hideCrosshair();
- h(this, "afterDrawCrosshair", { e: g, point: m });
- }, X.prototype.hideCrosshair = function() {
- this.cross && this.cross.hide(), h(this, "afterHideCrosshair");
- }, X.prototype.hasVerticalPanning = function() {
- var g = this.chart.options.chart.panning;
- return !!(g && g.enabled && /y/.test(g.type));
- }, X.prototype.validatePositiveValue = function(g) {
- return c(g) && 0 < g;
- }, X.prototype.update = function(g, m) {
- var L = this.chart;
- g = t(this.userOptions, g), this.destroy(!0), this.init(L, g), L.isDirtyBox = !0, P(m, !0) && L.redraw();
- }, X.prototype.remove = function(g) {
- for (var m = this.chart, L = this.coll, z = this.series, $ = z.length; $--; )
- z[$] && z[$].remove(!1);
- w(m.axes, this), w(m[L], this), m[L].forEach(function(Q, A) {
- Q.options.index = Q.userOptions.index = A;
- }), this.destroy(), m.isDirtyBox = !0, P(g, !0) && m.redraw();
- }, X.prototype.setTitle = function(g, m) {
- this.update({ title: g }, m);
- }, X.prototype.setCategories = function(g, m) {
- this.update(
- { categories: g },
- m
- );
- }, X.defaultOptions = N.defaultXAxisOptions, X.keepProps = "extKey hcEvents names series userMax userMin".split(" "), X;
- }(), y;
- }), M(o, "Core/Axis/DateTimeAxis.js", [o["Core/Utilities.js"]], function(y) {
- var N = y.addEvent, D = y.getMagnitude, U = y.normalizeTickInterval, H = y.timeUnits, V;
- return function(G) {
- function R() {
- return this.chart.time.getTimeTicks.apply(this.chart.time, arguments);
- }
- function B(f) {
- f.userOptions.type !== "datetime" ? this.dateTime = void 0 : this.dateTime || (this.dateTime = new x(this));
- }
- var S = [];
- G.compose = function(f) {
- return S.indexOf(f) === -1 && (S.push(f), f.keepProps.push("dateTime"), f.prototype.getTimeTicks = R, N(f, "init", B)), f;
- };
- var x = function() {
- function f(d) {
- this.axis = d;
- }
- return f.prototype.normalizeTimeTickInterval = function(d, T) {
- var O = T || [["millisecond", [1, 2, 5, 10, 20, 25, 50, 100, 200, 500]], ["second", [1, 2, 5, 10, 15, 30]], ["minute", [1, 2, 5, 10, 15, 30]], ["hour", [1, 2, 3, 4, 6, 8, 12]], ["day", [1, 2]], ["week", [1, 2]], ["month", [1, 2, 3, 4, 6]], ["year", null]];
- T = O[O.length - 1];
- var j = H[T[0]], k = T[1], b;
- for (b = 0; b < O.length && (T = O[b], j = H[T[0]], k = T[1], !(O[b + 1] && d <= (j * k[k.length - 1] + H[O[b + 1][0]]) / 2)); b++)
- ;
- return j === H.year && d < 5 * j && (k = [1, 2, 5]), d = U(d / j, k, T[0] === "year" ? Math.max(D(d / j), 1) : 1), { unitRange: j, count: d, unitName: T[0] };
- }, f.prototype.getXDateFormat = function(d, T) {
- var O = this.axis;
- return O.closestPointRange ? O.chart.time.getDateFormat(O.closestPointRange, d, O.options.startOfWeek, T) || T.year : T.day;
- }, f;
- }();
- G.Additions = x;
- }(V || (V = {})), V;
- }), M(o, "Core/Axis/LogarithmicAxis.js", [o["Core/Utilities.js"]], function(y) {
- var N = y.addEvent, D = y.getMagnitude, U = y.normalizeTickInterval, H = y.pick, V;
- return function(G) {
- function R(f) {
- var d = this.logarithmic;
- f.userOptions.type !== "logarithmic" ? this.logarithmic = void 0 : d || (this.logarithmic = new x(this));
- }
- function B() {
- var f = this.logarithmic;
- f && (this.lin2val = function(d) {
- return f.lin2log(d);
- }, this.val2lin = function(d) {
- return f.log2lin(d);
- });
- }
- var S = [];
- G.compose = function(f) {
- return S.indexOf(f) === -1 && (S.push(f), f.keepProps.push("logarithmic"), N(f, "init", R), N(f, "afterInit", B)), f;
- };
- var x = function() {
- function f(d) {
- this.axis = d;
- }
- return f.prototype.getLogTickPositions = function(d, T, O, j) {
- var k = this.axis, b = k.len, w = k.options, v = [];
- if (j || (this.minorAutoInterval = void 0), 0.5 <= d)
- d = Math.round(d), v = k.getLinearTickPositions(d, T, O);
- else if (0.08 <= d) {
- var l = Math.floor(T), h, u = w = void 0;
- for (b = 0.3 < d ? [1, 2, 4] : 0.15 < d ? [1, 2, 4, 6, 8] : [1, 2, 3, 4, 5, 6, 7, 8, 9]; l < O + 1 && !u; l++) {
- var i = b.length;
- for (h = 0; h < i && !u; h++) {
- var c = this.log2lin(this.lin2log(l) * b[h]);
- c > T && (!j || w <= O) && typeof w < "u" && v.push(w), w > O && (u = !0), w = c;
- }
- }
- } else
- T = this.lin2log(T), O = this.lin2log(O), d = j ? k.getMinorTickInterval() : w.tickInterval, d = H(d === "auto" ? null : d, this.minorAutoInterval, w.tickPixelInterval / (j ? 5 : 1) * (O - T) / ((j ? b / k.tickPositions.length : b) || 1)), d = U(d, void 0, D(d)), v = k.getLinearTickPositions(d, T, O).map(this.log2lin), j || (this.minorAutoInterval = d / 5);
- return j || (k.tickInterval = d), v;
- }, f.prototype.lin2log = function(d) {
- return Math.pow(10, d);
- }, f.prototype.log2lin = function(d) {
- return Math.log(d) / Math.LN10;
- }, f;
- }();
- G.Additions = x;
- }(V || (V = {})), V;
- }), M(o, "Core/Axis/PlotLineOrBand/PlotLineOrBandAxis.js", [o["Core/Utilities.js"]], function(y) {
- var N = y.erase, D = y.extend, U = y.isNumber, H;
- return function(V) {
- var G = [], R;
- V.compose = function(S, x) {
- return R || (R = S), G.indexOf(x) === -1 && (G.push(x), D(x.prototype, B.prototype)), x;
- };
- var B = function() {
- function S() {
- }
- return S.prototype.getPlotBandPath = function(x, f, d) {
- d === void 0 && (d = this.options);
- var T = this.getPlotLinePath({ value: f, force: !0, acrossPanes: d.acrossPanes }), O = [], j = this.horiz;
- if (f = !U(this.min) || !U(this.max) || x < this.min && f < this.min || x > this.max && f > this.max, x = this.getPlotLinePath({ value: x, force: !0, acrossPanes: d.acrossPanes }), d = 1, x && T) {
- if (f) {
- var k = x.toString() === T.toString();
- d = 0;
- }
- for (f = 0; f < x.length; f += 2) {
- var b = x[f], w = x[f + 1], v = T[f], l = T[f + 1];
- b[0] !== "M" && b[0] !== "L" || w[0] !== "M" && w[0] !== "L" || v[0] !== "M" && v[0] !== "L" || l[0] !== "M" && l[0] !== "L" || (j && v[1] === b[1] ? (v[1] += d, l[1] += d) : j || v[2] !== b[2] || (v[2] += d, l[2] += d), O.push(["M", b[1], b[2]], ["L", w[1], w[2]], ["L", l[1], l[2]], ["L", v[1], v[2]], ["Z"])), O.isFlat = k;
- }
- }
- return O;
- }, S.prototype.addPlotBand = function(x) {
- return this.addPlotBandOrLine(x, "plotBands");
- }, S.prototype.addPlotLine = function(x) {
- return this.addPlotBandOrLine(
- x,
- "plotLines"
- );
- }, S.prototype.addPlotBandOrLine = function(x, f) {
- var d = this, T = this.userOptions, O = new R(this, x);
- if (this.visible && (O = O.render()), O) {
- if (this._addedPlotLB || (this._addedPlotLB = !0, (T.plotLines || []).concat(T.plotBands || []).forEach(function(k) {
- d.addPlotBandOrLine(k);
- })), f) {
- var j = T[f] || [];
- j.push(x), T[f] = j;
- }
- this.plotLinesAndBands.push(O);
- }
- return O;
- }, S.prototype.removePlotBandOrLine = function(x) {
- var f = this.plotLinesAndBands, d = this.options, T = this.userOptions;
- if (f) {
- for (var O = f.length; O--; )
- f[O].id === x && f[O].destroy();
- [d.plotLines || [], T.plotLines || [], d.plotBands || [], T.plotBands || []].forEach(function(j) {
- for (O = j.length; O--; )
- (j[O] || {}).id === x && N(j, j[O]);
- });
- }
- }, S.prototype.removePlotBand = function(x) {
- this.removePlotBandOrLine(x);
- }, S.prototype.removePlotLine = function(x) {
- this.removePlotBandOrLine(x);
- }, S;
- }();
- }(H || (H = {})), H;
- }), M(o, "Core/Axis/PlotLineOrBand/PlotLineOrBand.js", [o["Core/Axis/PlotLineOrBand/PlotLineOrBandAxis.js"], o["Core/Utilities.js"]], function(y, N) {
- var D = N.arrayMax, U = N.arrayMin, H = N.defined, V = N.destroyObjectProperties, G = N.erase, R = N.fireEvent, B = N.merge, S = N.objectEach, x = N.pick;
- return N = function() {
- function f(d, T) {
- this.axis = d, T && (this.options = T, this.id = T.id);
- }
- return f.compose = function(d) {
- return y.compose(f, d);
- }, f.prototype.render = function() {
- R(this, "render");
- var d = this, T = d.axis, O = T.horiz, j = T.logarithmic, k = d.options, b = k.color, w = x(k.zIndex, 0), v = k.events, l = {}, h = T.chart.renderer, u = k.label, i = d.label, c = k.to, a = k.from, t = k.value, s = d.svgElem, n = [], P = H(a) && H(c);
- n = H(t);
- var _ = !s, I = { class: "highcharts-plot-" + (P ? "band " : "line ") + (k.className || "") }, W = P ? "bands" : "lines";
- if (j && (a = j.log2lin(a), c = j.log2lin(c), t = j.log2lin(t)), T.chart.styledMode || (n ? (I.stroke = b || "#999999", I["stroke-width"] = x(k.width, 1), k.dashStyle && (I.dashstyle = k.dashStyle)) : P && (I.fill = b || "#e6ebf5", k.borderWidth && (I.stroke = k.borderColor, I["stroke-width"] = k.borderWidth))), l.zIndex = w, W += "-" + w, (j = T.plotLinesAndBandsGroups[W]) || (T.plotLinesAndBandsGroups[W] = j = h.g("plot-" + W).attr(l).add()), _ && (d.svgElem = s = h.path().attr(I).add(j)), n)
- n = T.getPlotLinePath({
- value: t,
- lineWidth: s.strokeWidth(),
- acrossPanes: k.acrossPanes
- });
- else if (P)
- n = T.getPlotBandPath(a, c, k);
- else
- return;
- return !d.eventsAdded && v && (S(v, function(E, X) {
- s.on(X, function(g) {
- v[X].apply(d, [g]);
- });
- }), d.eventsAdded = !0), (_ || !s.d) && n && n.length ? s.attr({ d: n }) : s && (n ? (s.show(!0), s.animate({ d: n })) : s.d && (s.hide(), i && (d.label = i = i.destroy()))), u && (H(u.text) || H(u.formatter)) && n && n.length && 0 < T.width && 0 < T.height && !n.isFlat ? (u = B({ align: O && P && "center", x: O ? !P && 4 : 10, verticalAlign: !O && P && "middle", y: O ? P ? 16 : 10 : P ? 6 : -4, rotation: O && !P && 90 }, u), this.renderLabel(
- u,
- n,
- P,
- w
- )) : i && i.hide(), d;
- }, f.prototype.renderLabel = function(d, T, O, j) {
- var k = this.axis, b = k.chart.renderer, w = this.label;
- w || (this.label = w = b.text(this.getLabelText(d), 0, 0, d.useHTML).attr({ align: d.textAlign || d.align, rotation: d.rotation, class: "highcharts-plot-" + (O ? "band" : "line") + "-label " + (d.className || ""), zIndex: j }).add(), k.chart.styledMode || w.css(B({ textOverflow: "ellipsis" }, d.style))), j = T.xBounds || [T[0][1], T[1][1], O ? T[2][1] : T[0][1]], T = T.yBounds || [T[0][2], T[1][2], O ? T[2][2] : T[0][2]], O = U(j), b = U(T), w.align(
- d,
- !1,
- { x: O, y: b, width: D(j) - O, height: D(T) - b }
- ), w.alignValue && w.alignValue !== "left" || w.css({ width: (w.rotation === 90 ? k.height - (w.alignAttr.y - k.top) : k.width - (w.alignAttr.x - k.left)) + "px" }), w.show(!0);
- }, f.prototype.getLabelText = function(d) {
- return H(d.formatter) ? d.formatter.call(this) : d.text;
- }, f.prototype.destroy = function() {
- G(this.axis.plotLinesAndBands, this), delete this.axis, V(this);
- }, f;
- }(), N;
- }), M(o, "Core/Tooltip.js", [
- o["Core/FormatUtilities.js"],
- o["Core/Globals.js"],
- o["Core/Renderer/RendererUtilities.js"],
- o["Core/Renderer/RendererRegistry.js"],
- o["Core/Utilities.js"]
- ], function(y, N, D, U, H) {
- var V = y.format, G = N.doc, R = D.distribute, B = H.addEvent, S = H.clamp, x = H.css, f = H.defined, d = H.discardElement, T = H.extend, O = H.fireEvent, j = H.isArray, k = H.isNumber, b = H.isString, w = H.merge, v = H.pick, l = H.splat, h = H.syncTimeout;
- return y = function() {
- function u(i, c) {
- this.allowShared = !0, this.container = void 0, this.crosshairs = [], this.distance = 0, this.isHidden = !0, this.isSticky = !1, this.now = {}, this.options = {}, this.outside = !1, this.chart = i, this.init(i, c);
- }
- return u.prototype.applyFilter = function() {
- var i = this.chart;
- i.renderer.definition({ tagName: "filter", attributes: { id: "drop-shadow-" + i.index, opacity: 0.5 }, children: [{ tagName: "feGaussianBlur", attributes: { in: "SourceAlpha", stdDeviation: 1 } }, { tagName: "feOffset", attributes: { dx: 1, dy: 1 } }, { tagName: "feComponentTransfer", children: [{ tagName: "feFuncA", attributes: { type: "linear", slope: 0.3 } }] }, { tagName: "feMerge", children: [{ tagName: "feMergeNode" }, { tagName: "feMergeNode", attributes: { in: "SourceGraphic" } }] }] });
- }, u.prototype.bodyFormatter = function(i) {
- return i.map(function(c) {
- var a = c.series.tooltipOptions;
- return (a[(c.point.formatPrefix || "point") + "Formatter"] || c.point.tooltipFormatter).call(c.point, a[(c.point.formatPrefix || "point") + "Format"] || "");
- });
- }, u.prototype.cleanSplit = function(i) {
- this.chart.series.forEach(function(c) {
- var a = c && c.tt;
- a && (!a.isActive || i ? c.tt = a.destroy() : a.isActive = !1);
- });
- }, u.prototype.defaultFormatter = function(i) {
- var c = this.points || l(this), a = [i.tooltipFooterHeaderFormatter(c[0])];
- return a = a.concat(i.bodyFormatter(c)), a.push(i.tooltipFooterHeaderFormatter(
- c[0],
- !0
- )), a;
- }, u.prototype.destroy = function() {
- this.label && (this.label = this.label.destroy()), this.split && this.tt && (this.cleanSplit(!0), this.tt = this.tt.destroy()), this.renderer && (this.renderer = this.renderer.destroy(), d(this.container)), H.clearTimeout(this.hideTimer), H.clearTimeout(this.tooltipTimeout);
- }, u.prototype.getAnchor = function(i, c) {
- var a = this.chart, t = a.pointer, s = a.inverted, n = a.plotTop, P = a.plotLeft, _, I, W = 0, E = 0;
- return i = l(i), this.followPointer && c ? (typeof c.chartX > "u" && (c = t.normalize(c)), t = [c.chartX - P, c.chartY - n]) : i[0].tooltipPos ? t = i[0].tooltipPos : (i.forEach(function(X) {
- _ = X.series.yAxis, I = X.series.xAxis, W += X.plotX || 0, E += X.plotLow ? (X.plotLow + (X.plotHigh || 0)) / 2 : X.plotY || 0, I && _ && (s ? (W += n + a.plotHeight - I.len - I.pos, E += P + a.plotWidth - _.len - _.pos) : (W += I.pos - P, E += _.pos - n));
- }), W /= i.length, E /= i.length, t = [s ? a.plotWidth - E : W, s ? a.plotHeight - W : E], this.shared && 1 < i.length && c && (s ? t[0] = c.chartX - P : t[1] = c.chartY - n)), t.map(Math.round);
- }, u.prototype.getLabel = function() {
- var i = this, c = this.chart.styledMode, a = this.options, t = this.split && this.allowShared, s = "tooltip" + (f(a.className) ? " " + a.className : ""), n = a.style.pointerEvents || (!this.followPointer && a.stickOnContact ? "auto" : "none"), P = function() {
- i.inContact = !0;
- }, _ = function(z) {
- var $ = i.chart.hoverSeries;
- i.inContact = i.shouldStickOnContact() && i.chart.pointer.inClass(z.relatedTarget, "highcharts-tooltip"), !i.inContact && $ && $.onMouseOut && $.onMouseOut();
- }, I, W = this.chart.renderer;
- if (i.label) {
- var E = !i.label.hasClass("highcharts-label");
- (t && !E || !t && E) && i.destroy();
- }
- if (!this.label) {
- if (this.outside) {
- E = this.chart.options.chart.style;
- var X = U.getRendererType();
- this.container = I = N.doc.createElement("div"), I.className = "highcharts-tooltip-container", x(I, { position: "absolute", top: "1px", pointerEvents: n, zIndex: Math.max(this.options.style.zIndex || 0, (E && E.zIndex || 0) + 3) }), B(I, "mouseenter", P), B(I, "mouseleave", _), N.doc.body.appendChild(I), this.renderer = W = new X(I, 0, 0, E, void 0, void 0, W.styledMode);
- }
- if (t ? this.label = W.g(s) : (this.label = W.label("", 0, 0, a.shape, void 0, void 0, a.useHTML, void 0, s).attr({ padding: a.padding, r: a.borderRadius }), c || this.label.attr({ fill: a.backgroundColor, "stroke-width": a.borderWidth }).css(a.style).css({ pointerEvents: n }).shadow(a.shadow)), c && a.shadow && (this.applyFilter(), this.label.attr({ filter: "url(#drop-shadow-" + this.chart.index + ")" })), i.outside && !i.split) {
- var g = this.label, m = g.xSetter, L = g.ySetter;
- g.xSetter = function(z) {
- m.call(g, i.distance), I.style.left = z + "px";
- }, g.ySetter = function(z) {
- L.call(g, i.distance), I.style.top = z + "px";
- };
- }
- this.label.on("mouseenter", P).on("mouseleave", _).attr({ zIndex: 8 }).add();
- }
- return this.label;
- }, u.prototype.getPosition = function(i, c, a) {
- var t = this.chart, s = this.distance, n = {}, P = t.inverted && a.h || 0, _ = this.outside, I = _ ? G.documentElement.clientWidth - 2 * s : t.chartWidth, W = _ ? Math.max(G.body.scrollHeight, G.documentElement.scrollHeight, G.body.offsetHeight, G.documentElement.offsetHeight, G.documentElement.clientHeight) : t.chartHeight, E = t.pointer.getChartPosition(), X = function(Y) {
- var Z = Y === "x";
- return [Y, Z ? I : W, Z ? i : c].concat(_ ? [Z ? i * E.scaleX : c * E.scaleY, Z ? E.left - s + (a.plotX + t.plotLeft) * E.scaleX : E.top - s + (a.plotY + t.plotTop) * E.scaleY, 0, Z ? I : W] : [Z ? i : c, Z ? a.plotX + t.plotLeft : a.plotY + t.plotTop, Z ? t.plotLeft : t.plotTop, Z ? t.plotLeft + t.plotWidth : t.plotTop + t.plotHeight]);
- }, g = X("y"), m = X("x"), L;
- X = !!a.negative, !t.polar && t.hoverSeries && t.hoverSeries.yAxis && t.hoverSeries.yAxis.reversed && (X = !X);
- var z = !this.followPointer && v(a.ttBelow, !t.inverted === X), $ = function(Y, Z, q, it, et, nt, rt) {
- var ct = _ ? Y === "y" ? s * E.scaleY : s * E.scaleX : s, gt = (q - it) / 2, dt = it < et - s, ht = et + s + it < Z, at = et - ct - q + gt;
- if (et = et + ct - gt, z && ht)
- n[Y] = et;
- else if (!z && dt)
- n[Y] = at;
- else if (dt)
- n[Y] = Math.min(rt - it, 0 > at - P ? at : at - P);
- else if (ht)
- n[Y] = Math.max(nt, et + P + q > Z ? et : et + P);
- else
- return !1;
- }, Q = function(Y, Z, q, it, et) {
- var nt;
- return et < s || et > Z - s ? nt = !1 : n[Y] = et < q / 2 ? 1 : et > Z - it / 2 ? Z - it - 2 : et - q / 2, nt;
- }, A = function(Y) {
- var Z = g;
- g = m, m = Z, L = Y;
- }, F = function() {
- $.apply(0, g) !== !1 ? Q.apply(0, m) !== !1 || L || (A(!0), F()) : L ? n.x = n.y = 0 : (A(!0), F());
- };
- return (t.inverted || 1 < this.len) && A(), F(), n;
- }, u.prototype.hide = function(i) {
- var c = this;
- H.clearTimeout(this.hideTimer), i = v(i, this.options.hideDelay), this.isHidden || (this.hideTimer = h(function() {
- c.getLabel().fadeOut(i && void 0), c.isHidden = !0;
- }, i));
- }, u.prototype.init = function(i, c) {
- this.chart = i, this.options = c, this.crosshairs = [], this.now = { x: 0, y: 0 }, this.isHidden = !0, this.split = c.split && !i.inverted && !i.polar, this.shared = c.shared || this.split, this.outside = v(c.outside, !(!i.scrollablePixelsX && !i.scrollablePixelsY));
- }, u.prototype.shouldStickOnContact = function() {
- return !(this.followPointer || !this.options.stickOnContact);
- }, u.prototype.isStickyOnContact = function() {
- return !(!this.shouldStickOnContact() || !this.inContact);
- }, u.prototype.move = function(i, c, a, t) {
- var s = this, n = s.now, P = s.options.animation !== !1 && !s.isHidden && (1 < Math.abs(i - n.x) || 1 < Math.abs(c - n.y)), _ = s.followPointer || 1 < s.len;
- T(n, { x: P ? (2 * n.x + i) / 3 : i, y: P ? (n.y + c) / 2 : c, anchorX: _ ? void 0 : P ? (2 * n.anchorX + a) / 3 : a, anchorY: _ ? void 0 : P ? (n.anchorY + t) / 2 : t }), s.getLabel().attr(n), s.drawTracker(), P && (H.clearTimeout(this.tooltipTimeout), this.tooltipTimeout = setTimeout(function() {
- s && s.move(i, c, a, t);
- }, 32));
- }, u.prototype.refresh = function(i, c) {
- var a = this.chart, t = this.options, s = l(i), n = s[0], P = [], _ = t.formatter || this.defaultFormatter, I = this.shared, W = a.styledMode, E = {};
- if (t.enabled) {
- H.clearTimeout(this.hideTimer), this.allowShared = !(!j(i) && i.series && i.series.noSharedTooltip), this.followPointer = !this.split && n.series.tooltipOptions.followPointer, i = this.getAnchor(i, c);
- var X = i[0], g = i[1];
- if (I && this.allowShared ? (a.pointer.applyInactiveState(s), s.forEach(function(z) {
- z.setState("hover"), P.push(z.getLabelConfig());
- }), E = { x: n.category, y: n.y }, E.points = P) : E = n.getLabelConfig(), this.len = P.length, _ = _.call(E, this), I = n.series, this.distance = v(
- I.tooltipOptions.distance,
- 16
- ), _ === !1)
- this.hide();
- else {
- if (this.split && this.allowShared)
- this.renderSplit(_, s);
- else {
- var m = X, L = g;
- if (c && a.pointer.isDirectTouch && (m = c.chartX - a.plotLeft, L = c.chartY - a.plotTop), a.polar || I.options.clip === !1 || s.some(function(z) {
- return z.series.shouldShowTooltip(m, L);
- }))
- c = this.getLabel(), t.style.width && !W || c.css({ width: this.chart.spacingBox.width + "px" }), c.attr({ text: _ && _.join ? _.join("") : _ }), c.removeClass(/highcharts-color-[\d]+/g).addClass("highcharts-color-" + v(n.colorIndex, I.colorIndex)), W || c.attr({ stroke: t.borderColor || n.color || I.color || "#666666" }), this.updatePosition({ plotX: X, plotY: g, negative: n.negative, ttBelow: n.ttBelow, h: i[2] || 0 });
- else {
- this.hide();
- return;
- }
- }
- this.isHidden && this.label && this.label.attr({ opacity: 1 }).show(), this.isHidden = !1;
- }
- O(this, "refresh");
- }
- }, u.prototype.renderSplit = function(i, c) {
- function a(ht, at, J, tt, ot) {
- return ot === void 0 && (ot = !0), J ? (at = it ? 0 : ct, ht = S(ht - tt / 2, Y.left, Y.right - tt - (t.outside ? et : 0))) : (at -= nt, ht = ot ? ht - tt - Q : ht + Q, ht = S(ht, ot ? ht : Y.left, Y.right)), { x: ht, y: at };
- }
- var t = this, s = t.chart, n = t.chart, P = n.chartWidth, _ = n.chartHeight, I = n.plotHeight, W = n.plotLeft, E = n.plotTop, X = n.pointer, g = n.scrollablePixelsY;
- g = g === void 0 ? 0 : g;
- var m = n.scrollablePixelsX, L = n.scrollingContainer;
- L = L === void 0 ? { scrollLeft: 0, scrollTop: 0 } : L;
- var z = L.scrollLeft;
- L = L.scrollTop;
- var $ = n.styledMode, Q = t.distance, A = t.options, F = t.options.positioner, Y = t.outside && typeof m != "number" ? G.documentElement.getBoundingClientRect() : { left: z, right: z + P, top: L, bottom: L + _ }, Z = t.getLabel(), q = this.renderer || s.renderer, it = !(!s.xAxis[0] || !s.xAxis[0].opposite);
- s = X.getChartPosition();
- var et = s.left;
- s = s.top;
- var nt = E + L, rt = 0, ct = I - g;
- b(i) && (i = [!1, i]), i = i.slice(0, c.length + 1).reduce(function(ht, at, J) {
- if (at !== !1 && at !== "") {
- J = c[J - 1] || { isHeader: !0, plotX: c[0].plotX, plotY: I, series: {} };
- var tt = J.isHeader, ot = tt ? t : J.series;
- at = at.toString();
- var lt = ot.tt, pt = J.isHeader, yt = J.series, vt = "highcharts-color-" + v(J.colorIndex, yt.colorIndex, "none");
- if (lt || (lt = { padding: A.padding, r: A.borderRadius }, $ || (lt.fill = A.backgroundColor, lt["stroke-width"] = A.borderWidth), lt = q.label("", 0, 0, A[pt ? "headerShape" : "shape"], void 0, void 0, A.useHTML).addClass((pt ? "highcharts-tooltip-header " : "") + "highcharts-tooltip-box " + vt).attr(lt).add(Z)), lt.isActive = !0, lt.attr({ text: at }), $ || lt.css(A.style).shadow(A.shadow).attr({ stroke: A.borderColor || J.color || yt.color || "#333333" }), ot = ot.tt = lt, pt = ot.getBBox(), at = pt.width + ot.strokeWidth(), tt && (rt = pt.height, ct += rt, it && (nt -= rt)), yt = J.plotX, yt = yt === void 0 ? 0 : yt, vt = J.plotY, vt = vt === void 0 ? 0 : vt, lt = J.series, J.isHeader) {
- yt = W + yt;
- var Mt = E + I / 2;
- } else {
- var Pt = lt.xAxis, At = lt.yAxis;
- yt = Pt.pos + S(yt, -Q, Pt.len + Q), lt.shouldShowTooltip(0, At.pos - E + vt, { ignoreX: !0 }) && (Mt = At.pos + vt);
- }
- yt = S(
- yt,
- Y.left - Q,
- Y.right + Q
- ), typeof Mt == "number" ? (pt = pt.height + 1, vt = F ? F.call(t, at, pt, J) : a(yt, Mt, tt, at), ht.push({ align: F ? 0 : void 0, anchorX: yt, anchorY: Mt, boxWidth: at, point: J, rank: v(vt.rank, tt ? 1 : 0), size: pt, target: vt.y, tt: ot, x: vt.x })) : ot.isActive = !1;
- }
- return ht;
- }, []), !F && i.some(function(ht) {
- var at = (t.outside ? et : 0) + ht.anchorX;
- return at < Y.left && at + ht.boxWidth < Y.right ? !0 : at < et - Y.left + ht.boxWidth && Y.right - at > at;
- }) && (i = i.map(function(ht) {
- var at = a(ht.anchorX, ht.anchorY, ht.point.isHeader, ht.boxWidth, !1);
- return T(ht, { target: at.y, x: at.x });
- })), t.cleanSplit(), R(i, ct);
- var gt = et, dt = et;
- i.forEach(function(ht) {
- var at = ht.x, J = ht.boxWidth;
- ht = ht.isHeader, ht || (t.outside && et + at < gt && (gt = et + at), !ht && t.outside && gt + J > dt && (dt = et + at));
- }), i.forEach(function(ht) {
- var at = ht.x, J = ht.anchorX, tt = ht.pos, ot = ht.point.isHeader;
- if (tt = { visibility: typeof tt > "u" ? "hidden" : "inherit", x: at, y: tt + nt, anchorX: J, anchorY: ht.anchorY }, t.outside && at < J) {
- var lt = et - gt;
- 0 < lt && (ot || (tt.x = at + lt, tt.anchorX = J + lt), ot && (tt.x = (dt - gt) / 2, tt.anchorX = J + lt));
- }
- ht.tt.attr(tt);
- }), i = t.container, g = t.renderer, t.outside && i && g && (n = Z.getBBox(), g.setSize(n.width + n.x, n.height + n.y, !1), i.style.left = gt + "px", i.style.top = s + "px");
- }, u.prototype.drawTracker = function() {
- if (this.followPointer || !this.options.stickOnContact)
- this.tracker && this.tracker.destroy();
- else {
- var i = this.chart, c = this.label, a = this.shared ? i.hoverPoints : i.hoverPoint;
- if (c && a) {
- var t = { x: 0, y: 0, width: 0, height: 0 };
- a = this.getAnchor(a);
- var s = c.getBBox();
- a[0] += i.plotLeft - c.translateX, a[1] += i.plotTop - c.translateY, t.x = Math.min(0, a[0]), t.y = Math.min(0, a[1]), t.width = 0 > a[0] ? Math.max(Math.abs(a[0]), s.width - a[0]) : Math.max(
- Math.abs(a[0]),
- s.width
- ), t.height = 0 > a[1] ? Math.max(Math.abs(a[1]), s.height - Math.abs(a[1])) : Math.max(Math.abs(a[1]), s.height), this.tracker ? this.tracker.attr(t) : (this.tracker = c.renderer.rect(t).addClass("highcharts-tracker").add(c), i.styledMode || this.tracker.attr({ fill: "rgba(0,0,0,0)" }));
- }
- }
- }, u.prototype.styledModeFormat = function(i) {
- return i.replace('style="font-size: 10px"', 'class="highcharts-header"').replace(/style="color:{(point|series)\.color}"/g, 'class="highcharts-color-{$1.colorIndex}"');
- }, u.prototype.tooltipFooterHeaderFormatter = function(i, c) {
- var a = i.series, t = a.tooltipOptions, s = a.xAxis, n = s && s.dateTime;
- s = { isFooter: c, labelConfig: i };
- var P = t.xDateFormat, _ = t[c ? "footerFormat" : "headerFormat"];
- return O(this, "headerFormatter", s, function(I) {
- n && !P && k(i.key) && (P = n.getXDateFormat(i.key, t.dateTimeLabelFormats)), n && P && (i.point && i.point.tooltipDateKeys || ["key"]).forEach(function(W) {
- _ = _.replace("{point." + W + "}", "{point." + W + ":" + P + "}");
- }), a.chart.styledMode && (_ = this.styledModeFormat(_)), I.text = V(_, { point: i, series: a }, this.chart);
- }), s.text;
- }, u.prototype.update = function(i) {
- this.destroy(), w(!0, this.chart.options.tooltip.userOptions, i), this.init(this.chart, w(!0, this.options, i));
- }, u.prototype.updatePosition = function(i) {
- var c = this.chart, a = this.options, t = c.pointer, s = this.getLabel();
- t = t.getChartPosition();
- var n = (a.positioner || this.getPosition).call(this, s.width, s.height, i), P = i.plotX + c.plotLeft;
- i = i.plotY + c.plotTop, this.outside && (a = a.borderWidth + 2 * this.distance, this.renderer.setSize(s.width + a, s.height + a, !1), (t.scaleX !== 1 || t.scaleY !== 1) && (x(this.container, { transform: "scale(" + t.scaleX + ", " + t.scaleY + ")" }), P *= t.scaleX, i *= t.scaleY), P += t.left - n.x, i += t.top - n.y), this.move(Math.round(n.x), Math.round(n.y || 0), P, i);
- }, u;
- }(), y;
- }), M(o, "Core/Series/Point.js", [o["Core/Renderer/HTML/AST.js"], o["Core/Animation/AnimationUtilities.js"], o["Core/DefaultOptions.js"], o["Core/FormatUtilities.js"], o["Core/Utilities.js"]], function(y, N, D, U, H) {
- var V = N.animObject, G = D.defaultOptions, R = U.format, B = H.addEvent, S = H.defined, x = H.erase, f = H.extend, d = H.fireEvent, T = H.getNestedProperty, O = H.isArray, j = H.isFunction, k = H.isNumber, b = H.isObject, w = H.merge, v = H.objectEach, l = H.pick, h = H.syncTimeout, u = H.removeEvent, i = H.uniqueKey;
- return N = function() {
- function c() {
- this.colorIndex = this.category = void 0, this.formatPrefix = "point", this.id = void 0, this.isNull = !1, this.percentage = this.options = this.name = void 0, this.selected = !1, this.total = this.series = void 0, this.visible = !0, this.x = void 0;
- }
- return c.prototype.animateBeforeDestroy = function() {
- var a = this, t = { x: a.startXPos, opacity: 0 }, s = a.getGraphicalProps();
- s.singular.forEach(function(n) {
- a[n] = a[n].animate(n === "dataLabel" ? { x: a[n].startXPos, y: a[n].startYPos, opacity: 0 } : t);
- }), s.plural.forEach(function(n) {
- a[n].forEach(function(P) {
- P.element && P.animate(f({ x: a.startXPos }, P.startYPos ? { x: P.startXPos, y: P.startYPos } : {}));
- });
- });
- }, c.prototype.applyOptions = function(a, t) {
- var s = this.series, n = s.options.pointValKey || s.pointValKey;
- return a = c.prototype.optionsToObject.call(this, a), f(this, a), this.options = this.options ? f(this.options, a) : a, a.group && delete this.group, a.dataLabels && delete this.dataLabels, n && (this.y = c.prototype.getNestedProperty.call(
- this,
- n
- )), this.formatPrefix = (this.isNull = l(this.isValid && !this.isValid(), this.x === null || !k(this.y))) ? "null" : "point", this.selected && (this.state = "select"), "name" in this && typeof t > "u" && s.xAxis && s.xAxis.hasNames && (this.x = s.xAxis.nameToX(this)), typeof this.x > "u" && s ? this.x = typeof t > "u" ? s.autoIncrement() : t : k(a.x) && s.options.relativeXValue && (this.x = s.autoIncrement(a.x)), this;
- }, c.prototype.destroy = function() {
- function a() {
- (t.graphic || t.dataLabel || t.dataLabels) && (u(t), t.destroyElements());
- for (I in t)
- t[I] = null;
- }
- var t = this, s = t.series, n = s.chart;
- s = s.options.dataSorting;
- var P = n.hoverPoints, _ = V(t.series.chart.renderer.globalAnimation), I;
- t.legendItem && n.legend.destroyItem(t), P && (t.setState(), x(P, t), P.length || (n.hoverPoints = null)), t === n.hoverPoint && t.onMouseOut(), s && s.enabled ? (this.animateBeforeDestroy(), h(a, _.duration)) : a(), n.pointCount--;
- }, c.prototype.destroyElements = function(a) {
- var t = this;
- a = t.getGraphicalProps(a), a.singular.forEach(function(s) {
- t[s] = t[s].destroy();
- }), a.plural.forEach(function(s) {
- t[s].forEach(function(n) {
- n.element && n.destroy();
- }), delete t[s];
- });
- }, c.prototype.firePointEvent = function(a, t, s) {
- var n = this, P = this.series.options;
- (P.point.events[a] || n.options && n.options.events && n.options.events[a]) && n.importEvents(), a === "click" && P.allowPointSelect && (s = function(_) {
- n.select && n.select(null, _.ctrlKey || _.metaKey || _.shiftKey);
- }), d(n, a, t, s);
- }, c.prototype.getClassName = function() {
- return "highcharts-point" + (this.selected ? " highcharts-point-select" : "") + (this.negative ? " highcharts-negative" : "") + (this.isNull ? " highcharts-null-point" : "") + (typeof this.colorIndex < "u" ? " highcharts-color-" + this.colorIndex : "") + (this.options.className ? " " + this.options.className : "") + (this.zone && this.zone.className ? " " + this.zone.className.replace("highcharts-negative", "") : "");
- }, c.prototype.getGraphicalProps = function(a) {
- var t = this, s = [], n = { singular: [], plural: [] }, P;
- for (a = a || { graphic: 1, dataLabel: 1 }, a.graphic && s.push("graphic", "upperGraphic", "shadowGroup"), a.dataLabel && s.push("dataLabel", "dataLabelUpper", "connector"), P = s.length; P--; ) {
- var _ = s[P];
- t[_] && n.singular.push(_);
- }
- return ["dataLabel", "connector"].forEach(function(I) {
- var W = I + "s";
- a[I] && t[W] && n.plural.push(W);
- }), n;
- }, c.prototype.getLabelConfig = function() {
- return { x: this.category, y: this.y, color: this.color, colorIndex: this.colorIndex, key: this.name || this.category, series: this.series, point: this, percentage: this.percentage, total: this.total || this.stackTotal };
- }, c.prototype.getNestedProperty = function(a) {
- if (a)
- return a.indexOf("custom.") === 0 ? T(a, this.options) : this[a];
- }, c.prototype.getZone = function() {
- var a = this.series, t = a.zones;
- a = a.zoneAxis || "y";
- var s, n = 0;
- for (s = t[n]; this[a] >= s.value; )
- s = t[++n];
- return this.nonZonedColor || (this.nonZonedColor = this.color), this.color = s && s.color && !this.options.color ? s.color : this.nonZonedColor, s;
- }, c.prototype.hasNewShapeType = function() {
- return (this.graphic && (this.graphic.symbolName || this.graphic.element.nodeName)) !== this.shapeType;
- }, c.prototype.init = function(a, t, s) {
- return this.series = a, this.applyOptions(t, s), this.id = S(this.id) ? this.id : i(), this.resolveColor(), a.chart.pointCount++, d(this, "afterInit"), this;
- }, c.prototype.optionsToObject = function(a) {
- var t = this.series, s = t.options.keys, n = s || t.pointArrayMap || ["y"], P = n.length, _ = {}, I = 0, W = 0;
- if (k(a) || a === null)
- _[n[0]] = a;
- else if (O(a))
- for (!s && a.length > P && (t = typeof a[0], t === "string" ? _.name = a[0] : t === "number" && (_.x = a[0]), I++); W < P; )
- s && typeof a[I] > "u" || (0 < n[W].indexOf(".") ? c.prototype.setNestedProperty(_, a[I], n[W]) : _[n[W]] = a[I]), I++, W++;
- else
- typeof a == "object" && (_ = a, a.dataLabels && (t._hasPointLabels = !0), a.marker && (t._hasPointMarkers = !0));
- return _;
- }, c.prototype.resolveColor = function() {
- var a = this.series, t = a.chart.styledMode, s = a.chart.options.chart.colorCount;
- if (delete this.nonZonedColor, a.options.colorByPoint) {
- if (!t) {
- s = a.options.colors || a.chart.options.colors;
- var n = s[a.colorCounter];
- s = s.length;
- }
- t = a.colorCounter, a.colorCounter++, a.colorCounter === s && (a.colorCounter = 0);
- } else
- t || (n = a.color), t = a.colorIndex;
- this.colorIndex = l(this.options.colorIndex, t), this.color = l(this.options.color, n);
- }, c.prototype.setNestedProperty = function(a, t, s) {
- return s.split(".").reduce(function(n, P, _, I) {
- return n[P] = I.length - 1 === _ ? t : b(n[P], !0) ? n[P] : {}, n[P];
- }, a), a;
- }, c.prototype.tooltipFormatter = function(a) {
- var t = this.series, s = t.tooltipOptions, n = l(s.valueDecimals, ""), P = s.valuePrefix || "", _ = s.valueSuffix || "";
- return t.chart.styledMode && (a = t.chart.tooltip.styledModeFormat(a)), (t.pointArrayMap || ["y"]).forEach(function(I) {
- I = "{point." + I, (P || _) && (a = a.replace(RegExp(I + "}", "g"), P + I + "}" + _)), a = a.replace(RegExp(I + "}", "g"), I + ":,." + n + "f}");
- }), R(a, { point: this, series: this.series }, t.chart);
- }, c.prototype.update = function(a, t, s, n) {
- function P() {
- _.applyOptions(a);
- var m = W && _.hasDummyGraphic;
- m = _.y === null ? !m : m, W && m && (_.graphic = W.destroy(), delete _.hasDummyGraphic), b(a, !0) && (W && W.element && a && a.marker && typeof a.marker.symbol < "u" && (_.graphic = W.destroy()), a && a.dataLabels && _.dataLabel && (_.dataLabel = _.dataLabel.destroy()), _.connector && (_.connector = _.connector.destroy())), g = _.index, I.updateParallelArrays(_, g), X.data[g] = b(X.data[g], !0) || b(a, !0) ? _.options : l(a, X.data[g]), I.isDirty = I.isDirtyData = !0, !I.fixedBox && I.hasCartesianSeries && (E.isDirtyBox = !0), X.legendType === "point" && (E.isDirtyLegend = !0), t && E.redraw(s);
- }
- var _ = this, I = _.series, W = _.graphic, E = I.chart, X = I.options, g;
- t = l(t, !0), n === !1 ? P() : _.firePointEvent("update", { options: a }, P);
- }, c.prototype.remove = function(a, t) {
- this.series.removePoint(this.series.data.indexOf(this), a, t);
- }, c.prototype.select = function(a, t) {
- var s = this, n = s.series, P = n.chart;
- this.selectedStaging = a = l(a, !s.selected), s.firePointEvent(a ? "select" : "unselect", { accumulate: t }, function() {
- s.selected = s.options.selected = a, n.options.data[n.data.indexOf(s)] = s.options, s.setState(a && "select"), t || P.getSelectedPoints().forEach(function(_) {
- var I = _.series;
- _.selected && _ !== s && (_.selected = _.options.selected = !1, I.options.data[I.data.indexOf(_)] = _.options, _.setState(P.hoverPoints && I.options.inactiveOtherPoints ? "inactive" : ""), _.firePointEvent("unselect"));
- });
- }), delete this.selectedStaging;
- }, c.prototype.onMouseOver = function(a) {
- var t = this.series.chart, s = t.pointer;
- a = a ? s.normalize(a) : s.getChartCoordinatesFromPoint(this, t.inverted), s.runPointActions(
- a,
- this
- );
- }, c.prototype.onMouseOut = function() {
- var a = this.series.chart;
- this.firePointEvent("mouseOut"), this.series.options.inactiveOtherPoints || (a.hoverPoints || []).forEach(function(t) {
- t.setState();
- }), a.hoverPoints = a.hoverPoint = null;
- }, c.prototype.importEvents = function() {
- if (!this.hasImportedEvents) {
- var a = this, t = w(a.series.options.point, a.options).events;
- a.events = t, v(t, function(s, n) {
- j(s) && B(a, n, s);
- }), this.hasImportedEvents = !0;
- }
- }, c.prototype.setState = function(a, t) {
- var s = this.series, n = this.state, P = s.options.states[a || "normal"] || {}, _ = G.plotOptions[s.type].marker && s.options.marker, I = _ && _.enabled === !1, W = _ && _.states && _.states[a || "normal"] || {}, E = W.enabled === !1, X = this.marker || {}, g = s.chart, m = _ && s.markerAttribs, L = s.halo, z, $ = s.stateMarkerGraphic;
- if (a = a || "", !(a === this.state && !t || this.selected && a !== "select" || P.enabled === !1 || a && (E || I && W.enabled === !1) || a && X.states && X.states[a] && X.states[a].enabled === !1)) {
- if (this.state = a, m && (z = s.markerAttribs(this, a)), this.graphic && !this.hasDummyGraphic) {
- if (n && this.graphic.removeClass("highcharts-point-" + n), a && this.graphic.addClass("highcharts-point-" + a), !g.styledMode) {
- var Q = s.pointAttribs(this, a), A = l(g.options.chart.animation, P.animation);
- s.options.inactiveOtherPoints && k(Q.opacity) && ((this.dataLabels || []).forEach(function(F) {
- F && F.animate({ opacity: Q.opacity }, A);
- }), this.connector && this.connector.animate({ opacity: Q.opacity }, A)), this.graphic.animate(Q, A);
- }
- z && this.graphic.animate(z, l(g.options.chart.animation, W.animation, _.animation)), $ && $.hide();
- } else
- a && W && (n = X.symbol || s.symbol, $ && $.currentSymbol !== n && ($ = $.destroy()), z && ($ ? $[t ? "animate" : "attr"]({ x: z.x, y: z.y }) : n && (s.stateMarkerGraphic = $ = g.renderer.symbol(n, z.x, z.y, z.width, z.height).add(s.markerGroup), $.currentSymbol = n)), !g.styledMode && $ && this.state !== "inactive" && $.attr(s.pointAttribs(this, a))), $ && ($[a && this.isInside ? "show" : "hide"](), $.element.point = this, $.addClass(this.getClassName(), !0));
- P = P.halo, z = ($ = this.graphic || $) && $.visibility || "inherit", P && P.size && $ && z !== "hidden" && !this.isCluster ? (L || (s.halo = L = g.renderer.path().add($.parentGroup)), L.show()[t ? "animate" : "attr"]({ d: this.haloPath(P.size) }), L.attr({ class: "highcharts-halo highcharts-color-" + l(this.colorIndex, s.colorIndex) + (this.className ? " " + this.className : ""), visibility: z, zIndex: -1 }), L.point = this, g.styledMode || L.attr(f({ fill: this.color || s.color, "fill-opacity": P.opacity }, y.filterUserAttributes(P.attributes || {})))) : L && L.point && L.point.haloPath && L.animate({ d: L.point.haloPath(0) }, null, L.hide), d(this, "afterSetState", { state: a });
- }
- }, c.prototype.haloPath = function(a) {
- return this.series.chart.renderer.symbols.circle(Math.floor(this.plotX) - a, this.plotY - a, 2 * a, 2 * a);
- }, c;
- }(), N;
- }), M(o, "Core/Pointer.js", [o["Core/Color/Color.js"], o["Core/Globals.js"], o["Core/Tooltip.js"], o["Core/Utilities.js"]], function(y, N, D, U) {
- var H = y.parse, V = N.charts, G = N.noop, R = U.addEvent, B = U.attr, S = U.css, x = U.defined, f = U.extend, d = U.find, T = U.fireEvent, O = U.isNumber, j = U.isObject, k = U.objectEach, b = U.offset, w = U.pick, v = U.splat;
- return y = function() {
- function l(h, u) {
- this.lastValidTouch = {}, this.pinchDown = [], this.runChartClick = !1, this.eventsToUnbind = [], this.chart = h, this.hasDragged = !1, this.options = u, this.init(h, u);
- }
- return l.prototype.applyInactiveState = function(h) {
- var u = [], i;
- (h || []).forEach(function(c) {
- i = c.series, u.push(i), i.linkedParent && u.push(i.linkedParent), i.linkedSeries && (u = u.concat(i.linkedSeries)), i.navigatorSeries && u.push(i.navigatorSeries);
- }), this.chart.series.forEach(function(c) {
- u.indexOf(c) === -1 ? c.setState("inactive", !0) : c.options.inactiveOtherPoints && c.setAllPointsToState("inactive");
- });
- }, l.prototype.destroy = function() {
- var h = this;
- this.eventsToUnbind.forEach(function(u) {
- return u();
- }), this.eventsToUnbind = [], N.chartCount || (l.unbindDocumentMouseUp && (l.unbindDocumentMouseUp = l.unbindDocumentMouseUp()), l.unbindDocumentTouchEnd && (l.unbindDocumentTouchEnd = l.unbindDocumentTouchEnd())), clearInterval(h.tooltipTimeout), k(h, function(u, i) {
- h[i] = void 0;
- });
- }, l.prototype.drag = function(h) {
- var u = this.chart, i = u.options.chart, c = this.zoomHor, a = this.zoomVert, t = u.plotLeft, s = u.plotTop, n = u.plotWidth, P = u.plotHeight, _ = this.mouseDownX || 0, I = this.mouseDownY || 0, W = j(i.panning) ? i.panning && i.panning.enabled : i.panning, E = i.panKey && h[i.panKey + "Key"], X = h.chartX, g = h.chartY, m = this.selectionMarker;
- if ((!m || !m.touch) && (X < t ? X = t : X > t + n && (X = t + n), g < s ? g = s : g > s + P && (g = s + P), this.hasDragged = Math.sqrt(Math.pow(_ - X, 2) + Math.pow(I - g, 2)), 10 < this.hasDragged)) {
- var L = u.isInsidePlot(_ - t, I - s, { visiblePlotOnly: !0 });
- !u.hasCartesianSeries && !u.mapView || !this.zoomX && !this.zoomY || !L || E || m || (this.selectionMarker = m = u.renderer.rect(t, s, c ? 1 : n, a ? 1 : P, 0).attr({ class: "highcharts-selection-marker", zIndex: 7 }).add(), u.styledMode || m.attr({ fill: i.selectionMarkerFill || H("#335cad").setOpacity(0.25).get() })), m && c && (c = X - _, m.attr({ width: Math.abs(c), x: (0 < c ? 0 : c) + _ })), m && a && (c = g - I, m.attr({ height: Math.abs(c), y: (0 < c ? 0 : c) + I })), L && !m && W && u.pan(h, i.panning);
- }
- }, l.prototype.dragStart = function(h) {
- var u = this.chart;
- u.mouseIsDown = h.type, u.cancelClick = !1, u.mouseDownX = this.mouseDownX = h.chartX, u.mouseDownY = this.mouseDownY = h.chartY;
- }, l.prototype.drop = function(h) {
- var u = this, i = this.chart, c = this.hasPinched;
- if (this.selectionMarker) {
- var a = this.selectionMarker, t = a.attr ? a.attr("x") : a.x, s = a.attr ? a.attr("y") : a.y, n = a.attr ? a.attr("width") : a.width, P = a.attr ? a.attr("height") : a.height, _ = { originalEvent: h, xAxis: [], yAxis: [], x: t, y: s, width: n, height: P }, I = !!i.mapView;
- (this.hasDragged || c) && (i.axes.forEach(function(W) {
- if (W.zoomEnabled && x(W.min) && (c || u[{ xAxis: "zoomX", yAxis: "zoomY" }[W.coll]]) && O(t) && O(s)) {
- var E = W.horiz, X = h.type === "touchend" ? W.minPixelPadding : 0, g = W.toValue((E ? t : s) + X);
- E = W.toValue((E ? t + n : s + P) - X), _[W.coll].push({ axis: W, min: Math.min(g, E), max: Math.max(g, E) }), I = !0;
- }
- }), I && T(i, "selection", _, function(W) {
- i.zoom(f(
- W,
- c ? { animation: !1 } : null
- ));
- })), O(i.index) && (this.selectionMarker = this.selectionMarker.destroy()), c && this.scaleGroups();
- }
- i && O(i.index) && (S(i.container, { cursor: i._cursor }), i.cancelClick = 10 < this.hasDragged, i.mouseIsDown = this.hasDragged = this.hasPinched = !1, this.pinchDown = []);
- }, l.prototype.findNearestKDPoint = function(h, u, i) {
- var c = this.chart, a = c.hoverPoint;
- if (c = c.tooltip, a && c && c.isStickyOnContact())
- return a;
- var t;
- return h.forEach(function(s) {
- var n = !(s.noSharedTooltip && u) && 0 > s.options.findNearestPointBy.indexOf("y");
- if (s = s.searchPoint(i, n), (n = j(s, !0) && s.series) && !(n = !j(t, !0))) {
- n = t.distX - s.distX;
- var P = t.dist - s.dist, _ = (s.series.group && s.series.group.zIndex) - (t.series.group && t.series.group.zIndex);
- n = 0 < (n !== 0 && u ? n : P !== 0 ? P : _ !== 0 ? _ : t.series.index > s.series.index ? -1 : 1);
- }
- n && (t = s);
- }), t;
- }, l.prototype.getChartCoordinatesFromPoint = function(h, u) {
- var i = h.series, c = i.xAxis;
- i = i.yAxis;
- var a = h.shapeArgs;
- if (c && i) {
- var t = w(h.clientX, h.plotX), s = h.plotY || 0;
- return h.isNode && a && O(a.x) && O(a.y) && (t = a.x, s = a.y), u ? { chartX: i.len + i.pos - s, chartY: c.len + c.pos - t } : { chartX: t + c.pos, chartY: s + i.pos };
- }
- if (a && a.x && a.y)
- return { chartX: a.x, chartY: a.y };
- }, l.prototype.getChartPosition = function() {
- if (this.chartPosition)
- return this.chartPosition;
- var h = this.chart.container, u = b(h);
- this.chartPosition = { left: u.left, top: u.top, scaleX: 1, scaleY: 1 };
- var i = h.offsetWidth;
- return h = h.offsetHeight, 2 < i && 2 < h && (this.chartPosition.scaleX = u.width / i, this.chartPosition.scaleY = u.height / h), this.chartPosition;
- }, l.prototype.getCoordinates = function(h) {
- var u = { xAxis: [], yAxis: [] };
- return this.chart.axes.forEach(function(i) {
- u[i.isXAxis ? "xAxis" : "yAxis"].push({ axis: i, value: i.toValue(h[i.horiz ? "chartX" : "chartY"]) });
- }), u;
- }, l.prototype.getHoverData = function(h, u, i, c, a, t) {
- var s = [];
- c = !(!c || !h);
- var n = { chartX: t ? t.chartX : void 0, chartY: t ? t.chartY : void 0, shared: a };
- T(this, "beforeGetHoverData", n);
- var P = u && !u.stickyTracking ? [u] : i.filter(function(I) {
- return n.filter ? n.filter(I) : I.visible && !(!a && I.directTouch) && w(I.options.enableMouseTracking, !0) && I.stickyTracking;
- }), _ = c || !t ? h : this.findNearestKDPoint(P, a, t);
- return u = _ && _.series, _ && (a && !u.noSharedTooltip ? (P = i.filter(function(I) {
- return n.filter ? n.filter(I) : I.visible && !(!a && I.directTouch) && w(I.options.enableMouseTracking, !0) && !I.noSharedTooltip;
- }), P.forEach(function(I) {
- var W = d(I.points, function(E) {
- return E.x === _.x && !E.isNull;
- });
- j(W) && (I.chart.isBoosting && (W = I.getPoint(W)), s.push(W));
- })) : s.push(_)), n = { hoverPoint: _ }, T(this, "afterGetHoverData", n), { hoverPoint: n.hoverPoint, hoverSeries: u, hoverPoints: s };
- }, l.prototype.getPointFromEvent = function(h) {
- h = h.target;
- for (var u; h && !u; )
- u = h.point, h = h.parentNode;
- return u;
- }, l.prototype.onTrackerMouseOut = function(h) {
- h = h.relatedTarget || h.toElement;
- var u = this.chart.hoverSeries;
- this.isDirectTouch = !1, !u || !h || u.stickyTracking || this.inClass(h, "highcharts-tooltip") || this.inClass(h, "highcharts-series-" + u.index) && this.inClass(h, "highcharts-tracker") || u.onMouseOut();
- }, l.prototype.inClass = function(h, u) {
- for (var i; h; ) {
- if (i = B(h, "class")) {
- if (i.indexOf(u) !== -1)
- return !0;
- if (i.indexOf("highcharts-container") !== -1)
- return !1;
- }
- h = h.parentNode;
- }
- }, l.prototype.init = function(h, u) {
- this.options = u, this.chart = h, this.runChartClick = !(!u.chart.events || !u.chart.events.click), this.pinchDown = [], this.lastValidTouch = {}, D && (h.tooltip = new D(h, u.tooltip), this.followTouchMove = w(u.tooltip.followTouchMove, !0)), this.setDOMEvents();
- }, l.prototype.normalize = function(h, u) {
- var i = h.touches, c = i ? i.length ? i.item(0) : w(i.changedTouches, h.changedTouches)[0] : h;
- return u || (u = this.getChartPosition()), i = c.pageX - u.left, c = c.pageY - u.top, i /= u.scaleX, c /= u.scaleY, f(h, { chartX: Math.round(i), chartY: Math.round(c) });
- }, l.prototype.onContainerClick = function(h) {
- var u = this.chart, i = u.hoverPoint;
- h = this.normalize(h);
- var c = u.plotLeft, a = u.plotTop;
- u.cancelClick || (i && this.inClass(h.target, "highcharts-tracker") ? (T(i.series, "click", f(h, { point: i })), u.hoverPoint && i.firePointEvent("click", h)) : (f(h, this.getCoordinates(h)), u.isInsidePlot(h.chartX - c, h.chartY - a, { visiblePlotOnly: !0 }) && T(u, "click", h)));
- }, l.prototype.onContainerMouseDown = function(h) {
- var u = ((h.buttons || h.button) & 1) === 1;
- h = this.normalize(h), N.isFirefox && h.button !== 0 && this.onContainerMouseMove(h), (typeof h.button > "u" || u) && (this.zoomOption(h), u && h.preventDefault && h.preventDefault(), this.dragStart(h));
- }, l.prototype.onContainerMouseLeave = function(h) {
- var u = V[w(l.hoverChartIndex, -1)], i = this.chart.tooltip;
- i && i.shouldStickOnContact() && this.inClass(h.relatedTarget, "highcharts-tooltip-container") || (h = this.normalize(h), u && (h.relatedTarget || h.toElement) && (u.pointer.reset(), u.pointer.chartPosition = void 0), i && !i.isHidden && this.reset());
- }, l.prototype.onContainerMouseEnter = function(h) {
- delete this.chartPosition;
- }, l.prototype.onContainerMouseMove = function(h) {
- var u = this.chart;
- h = this.normalize(h), this.setHoverChartIndex(), h.preventDefault || (h.returnValue = !1), (u.mouseIsDown === "mousedown" || this.touchSelect(h)) && this.drag(h), u.openMenu || !this.inClass(h.target, "highcharts-tracker") && !u.isInsidePlot(h.chartX - u.plotLeft, h.chartY - u.plotTop, { visiblePlotOnly: !0 }) || (this.inClass(h.target, "highcharts-no-tooltip") ? this.reset(!1, 0) : this.runPointActions(h));
- }, l.prototype.onDocumentTouchEnd = function(h) {
- var u = V[w(
- l.hoverChartIndex,
- -1
- )];
- u && u.pointer.drop(h);
- }, l.prototype.onContainerTouchMove = function(h) {
- this.touchSelect(h) ? this.onContainerMouseMove(h) : this.touch(h);
- }, l.prototype.onContainerTouchStart = function(h) {
- this.touchSelect(h) ? this.onContainerMouseDown(h) : (this.zoomOption(h), this.touch(h, !0));
- }, l.prototype.onDocumentMouseMove = function(h) {
- var u = this.chart, i = this.chartPosition;
- h = this.normalize(h, i);
- var c = u.tooltip;
- !i || c && c.isStickyOnContact() || u.isInsidePlot(h.chartX - u.plotLeft, h.chartY - u.plotTop, { visiblePlotOnly: !0 }) || this.inClass(h.target, "highcharts-tracker") || this.reset();
- }, l.prototype.onDocumentMouseUp = function(h) {
- var u = V[w(l.hoverChartIndex, -1)];
- u && u.pointer.drop(h);
- }, l.prototype.pinch = function(h) {
- var u = this, i = u.chart, c = u.pinchDown, a = h.touches || [], t = a.length, s = u.lastValidTouch, n = u.hasZoom, P = {}, _ = t === 1 && (u.inClass(h.target, "highcharts-tracker") && i.runTrackerClick || u.runChartClick), I = {}, W = u.selectionMarker;
- 1 < t ? u.initiated = !0 : t === 1 && this.followTouchMove && (u.initiated = !1), n && u.initiated && !_ && h.cancelable !== !1 && h.preventDefault(), [].map.call(a, function(E) {
- return u.normalize(E);
- }), h.type === "touchstart" ? ([].forEach.call(a, function(E, X) {
- c[X] = { chartX: E.chartX, chartY: E.chartY };
- }), s.x = [c[0].chartX, c[1] && c[1].chartX], s.y = [c[0].chartY, c[1] && c[1].chartY], i.axes.forEach(function(E) {
- if (E.zoomEnabled) {
- var X = i.bounds[E.horiz ? "h" : "v"], g = E.minPixelPadding, m = E.toPixels(Math.min(w(E.options.min, E.dataMin), E.dataMin)), L = E.toPixels(Math.max(w(E.options.max, E.dataMax), E.dataMax)), z = Math.max(m, L);
- X.min = Math.min(E.pos, Math.min(
- m,
- L
- ) - g), X.max = Math.max(E.pos + E.len, z + g);
- }
- }), u.res = !0) : u.followTouchMove && t === 1 ? this.runPointActions(u.normalize(h)) : c.length && (T(i, "touchpan", { originalEvent: h }, function() {
- W || (u.selectionMarker = W = f({ destroy: G, touch: !0 }, i.plotBox)), u.pinchTranslate(c, a, P, W, I, s), u.hasPinched = n, u.scaleGroups(P, I);
- }), u.res && (u.res = !1, this.reset(!1, 0)));
- }, l.prototype.pinchTranslate = function(h, u, i, c, a, t) {
- this.zoomHor && this.pinchTranslateDirection(!0, h, u, i, c, a, t), this.zoomVert && this.pinchTranslateDirection(!1, h, u, i, c, a, t);
- }, l.prototype.pinchTranslateDirection = function(h, u, i, c, a, t, s, n) {
- var P = this.chart, _ = h ? "x" : "y", I = h ? "X" : "Y", W = "chart" + I, E = h ? "width" : "height", X = P["plot" + (h ? "Left" : "Top")], g = P.inverted, m = P.bounds[h ? "h" : "v"], L = u.length === 1, z = u[0][W], $ = !L && u[1][W];
- u = function() {
- typeof Z == "number" && 20 < Math.abs(z - $) && (F = n || Math.abs(Y - Z) / Math.abs(z - $)), A = (X - Y) / F + z, Q = P["plot" + (h ? "Width" : "Height")] / F;
- };
- var Q, A, F = n || 1, Y = i[0][W], Z = !L && i[1][W];
- if (u(), i = A, i < m.min) {
- i = m.min;
- var q = !0;
- } else
- i + Q > m.max && (i = m.max - Q, q = !0);
- q ? (Y -= 0.8 * (Y - s[_][0]), typeof Z == "number" && (Z -= 0.8 * (Z - s[_][1])), u()) : s[_] = [Y, Z], g || (t[_] = A - X, t[E] = Q), t = g ? 1 / F : F, a[E] = Q, a[_] = i, c[g ? h ? "scaleY" : "scaleX" : "scale" + I] = F, c["translate" + I] = t * X + (Y - t * z);
- }, l.prototype.reset = function(h, u) {
- var i = this.chart, c = i.hoverSeries, a = i.hoverPoint, t = i.hoverPoints, s = i.tooltip, n = s && s.shared ? t : a;
- h && n && v(n).forEach(function(P) {
- P.series.isCartesian && typeof P.plotX > "u" && (h = !1);
- }), h ? s && n && v(n).length && (s.refresh(n), s.shared && t ? t.forEach(function(P) {
- P.setState(P.state, !0), P.series.isCartesian && (P.series.xAxis.crosshair && P.series.xAxis.drawCrosshair(
- null,
- P
- ), P.series.yAxis.crosshair && P.series.yAxis.drawCrosshair(null, P));
- }) : a && (a.setState(a.state, !0), i.axes.forEach(function(P) {
- P.crosshair && a.series[P.coll] === P && P.drawCrosshair(null, a);
- }))) : (a && a.onMouseOut(), t && t.forEach(function(P) {
- P.setState();
- }), c && c.onMouseOut(), s && s.hide(u), this.unDocMouseMove && (this.unDocMouseMove = this.unDocMouseMove()), i.axes.forEach(function(P) {
- P.hideCrosshair();
- }), this.hoverX = i.hoverPoints = i.hoverPoint = null);
- }, l.prototype.runPointActions = function(h, u) {
- var i = this.chart, c = i.tooltip && i.tooltip.options.enabled ? i.tooltip : void 0, a = c ? c.shared : !1, t = u || i.hoverPoint, s = t && t.series || i.hoverSeries;
- u = this.getHoverData(t, s, i.series, (!h || h.type !== "touchmove") && (!!u || s && s.directTouch && this.isDirectTouch), a, h), t = u.hoverPoint, s = u.hoverSeries;
- var n = u.hoverPoints;
- if (u = s && s.tooltipOptions.followPointer && !s.tooltipOptions.split, a = a && s && !s.noSharedTooltip, t && (t !== i.hoverPoint || c && c.isHidden)) {
- if ((i.hoverPoints || []).forEach(function(P) {
- n.indexOf(P) === -1 && P.setState();
- }), i.hoverSeries !== s && s.onMouseOver(), this.applyInactiveState(n), (n || []).forEach(function(P) {
- P.setState("hover");
- }), i.hoverPoint && i.hoverPoint.firePointEvent("mouseOut"), !t.series)
- return;
- i.hoverPoints = n, i.hoverPoint = t, t.firePointEvent("mouseOver"), c && c.refresh(a ? n : t, h);
- } else
- u && c && !c.isHidden && (t = c.getAnchor([{}], h), i.isInsidePlot(t[0], t[1], { visiblePlotOnly: !0 }) && c.updatePosition({ plotX: t[0], plotY: t[1] }));
- this.unDocMouseMove || (this.unDocMouseMove = R(i.container.ownerDocument, "mousemove", function(P) {
- var _ = V[l.hoverChartIndex];
- _ && _.pointer.onDocumentMouseMove(P);
- }), this.eventsToUnbind.push(this.unDocMouseMove)), i.axes.forEach(function(P) {
- var _ = w((P.crosshair || {}).snap, !0), I;
- _ && ((I = i.hoverPoint) && I.series[P.coll] === P || (I = d(n, function(W) {
- return W.series[P.coll] === P;
- }))), I || !_ ? P.drawCrosshair(h, I) : P.hideCrosshair();
- });
- }, l.prototype.scaleGroups = function(h, u) {
- var i = this.chart;
- i.series.forEach(function(c) {
- var a = h || c.getPlotBox();
- c.group && (c.xAxis && c.xAxis.zoomEnabled || i.mapView) && (c.group.attr(a), c.markerGroup && (c.markerGroup.attr(a), c.markerGroup.clip(u ? i.clipRect : null)), c.dataLabelsGroup && c.dataLabelsGroup.attr(a));
- }), i.clipRect.attr(u || i.clipBox);
- }, l.prototype.setDOMEvents = function() {
- var h = this, u = this.chart.container, i = u.ownerDocument;
- u.onmousedown = this.onContainerMouseDown.bind(this), u.onmousemove = this.onContainerMouseMove.bind(this), u.onclick = this.onContainerClick.bind(this), this.eventsToUnbind.push(R(u, "mouseenter", this.onContainerMouseEnter.bind(this))), this.eventsToUnbind.push(R(u, "mouseleave", this.onContainerMouseLeave.bind(this))), l.unbindDocumentMouseUp || (l.unbindDocumentMouseUp = R(i, "mouseup", this.onDocumentMouseUp.bind(this)));
- for (var c = this.chart.renderTo.parentElement; c && c.tagName !== "BODY"; )
- this.eventsToUnbind.push(R(c, "scroll", function() {
- delete h.chartPosition;
- })), c = c.parentElement;
- N.hasTouch && (this.eventsToUnbind.push(R(u, "touchstart", this.onContainerTouchStart.bind(this), { passive: !1 })), this.eventsToUnbind.push(R(u, "touchmove", this.onContainerTouchMove.bind(this), { passive: !1 })), l.unbindDocumentTouchEnd || (l.unbindDocumentTouchEnd = R(i, "touchend", this.onDocumentTouchEnd.bind(this), { passive: !1 })));
- }, l.prototype.setHoverChartIndex = function() {
- var h = this.chart, u = N.charts[w(l.hoverChartIndex, -1)];
- u && u !== h && u.pointer.onContainerMouseLeave({ relatedTarget: !0 }), u && u.mouseIsDown || (l.hoverChartIndex = h.index);
- }, l.prototype.touch = function(h, u) {
- var i = this.chart;
- if (this.setHoverChartIndex(), h.touches.length === 1)
- if (h = this.normalize(h), i.isInsidePlot(h.chartX - i.plotLeft, h.chartY - i.plotTop, { visiblePlotOnly: !0 }) && !i.openMenu) {
- if (u && this.runPointActions(h), h.type === "touchmove") {
- u = this.pinchDown;
- var c = u[0] ? 4 <= Math.sqrt(Math.pow(u[0].chartX - h.chartX, 2) + Math.pow(u[0].chartY - h.chartY, 2)) : !1;
- }
- w(c, !0) && this.pinch(h);
- } else
- u && this.reset();
- else
- h.touches.length === 2 && this.pinch(h);
- }, l.prototype.touchSelect = function(h) {
- return !(!this.chart.options.chart.zoomBySingleTouch || !h.touches || h.touches.length !== 1);
- }, l.prototype.zoomOption = function(h) {
- var u = this.chart, i = u.options.chart;
- u = u.inverted;
- var c = i.zoomType || "";
- /touch/.test(h.type) && (c = w(i.pinchType, c)), this.zoomX = h = /x/.test(c), this.zoomY = i = /y/.test(c), this.zoomHor = h && !u || i && u, this.zoomVert = i && !u || h && u, this.hasZoom = h || i;
- }, l;
- }(), y;
- }), M(o, "Core/MSPointer.js", [o["Core/Globals.js"], o["Core/Pointer.js"], o["Core/Utilities.js"]], function(y, N, D) {
- function U() {
- var k = [];
- return k.item = function(b) {
- return this[b];
- }, d(O, function(b) {
- k.push({ pageX: b.pageX, pageY: b.pageY, target: b.target });
- }), k;
- }
- function H(k, b, w, v) {
- var l = G[N.hoverChartIndex || NaN];
- k.pointerType !== "touch" && k.pointerType !== k.MSPOINTER_TYPE_TOUCH || !l || (l = l.pointer, v(k), l[b]({ type: w, target: k.currentTarget, preventDefault: B, touches: U() }));
- }
- var V = this && this.__extends || function() {
- var k = function(b, w) {
- return k = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(v, l) {
- v.__proto__ = l;
- } || function(v, l) {
- for (var h in l)
- l.hasOwnProperty(h) && (v[h] = l[h]);
- }, k(b, w);
- };
- return function(b, w) {
- function v() {
- this.constructor = b;
- }
- k(b, w), b.prototype = w === null ? Object.create(w) : (v.prototype = w.prototype, new v());
- };
- }(), G = y.charts, R = y.doc, B = y.noop, S = y.win, x = D.addEvent, f = D.css, d = D.objectEach, T = D.removeEvent, O = {}, j = !!S.PointerEvent;
- return function(k) {
- function b() {
- return k !== null && k.apply(this, arguments) || this;
- }
- return V(b, k), b.isRequired = function() {
- return !(y.hasTouch || !S.PointerEvent && !S.MSPointerEvent);
- }, b.prototype.batchMSEvents = function(w) {
- w(this.chart.container, j ? "pointerdown" : "MSPointerDown", this.onContainerPointerDown), w(this.chart.container, j ? "pointermove" : "MSPointerMove", this.onContainerPointerMove), w(R, j ? "pointerup" : "MSPointerUp", this.onDocumentPointerUp);
- }, b.prototype.destroy = function() {
- this.batchMSEvents(T), k.prototype.destroy.call(this);
- }, b.prototype.init = function(w, v) {
- k.prototype.init.call(this, w, v), this.hasZoom && f(w.container, { "-ms-touch-action": "none", "touch-action": "none" });
- }, b.prototype.onContainerPointerDown = function(w) {
- H(w, "onContainerTouchStart", "touchstart", function(v) {
- O[v.pointerId] = { pageX: v.pageX, pageY: v.pageY, target: v.currentTarget };
- });
- }, b.prototype.onContainerPointerMove = function(w) {
- H(w, "onContainerTouchMove", "touchmove", function(v) {
- O[v.pointerId] = {
- pageX: v.pageX,
- pageY: v.pageY
- }, O[v.pointerId].target || (O[v.pointerId].target = v.currentTarget);
- });
- }, b.prototype.onDocumentPointerUp = function(w) {
- H(w, "onDocumentTouchEnd", "touchend", function(v) {
- delete O[v.pointerId];
- });
- }, b.prototype.setDOMEvents = function() {
- k.prototype.setDOMEvents.call(this), (this.hasZoom || this.followTouchMove) && this.batchMSEvents(x);
- }, b;
- }(N);
- }), M(o, "Core/Legend/Legend.js", [
- o["Core/Animation/AnimationUtilities.js"],
- o["Core/FormatUtilities.js"],
- o["Core/Globals.js"],
- o["Core/Series/Point.js"],
- o["Core/Renderer/RendererUtilities.js"],
- o["Core/Utilities.js"]
- ], function(y, N, D, U, H, V) {
- var G = y.animObject, R = y.setAnimation, B = N.format;
- y = D.isFirefox;
- var S = D.marginNames;
- D = D.win;
- var x = H.distribute, f = V.addEvent, d = V.createElement, T = V.css, O = V.defined, j = V.discardElement, k = V.find, b = V.fireEvent, w = V.isNumber, v = V.merge, l = V.pick, h = V.relativeLength, u = V.stableSort, i = V.syncTimeout;
- return H = V.wrap, V = function() {
- function c(a, t) {
- this.allItems = [], this.contentGroup = this.box = void 0, this.display = !1, this.group = void 0, this.offsetWidth = this.maxLegendWidth = this.maxItemWidth = this.legendWidth = this.legendHeight = this.lastLineHeight = this.lastItemY = this.itemY = this.itemX = this.itemMarginTop = this.itemMarginBottom = this.itemHeight = this.initialItemY = 0, this.options = {}, this.padding = 0, this.pages = [], this.proximate = !1, this.scrollGroup = void 0, this.widthOption = this.totalItemWidth = this.titleHeight = this.symbolWidth = this.symbolHeight = 0, this.chart = a, this.init(a, t);
- }
- return c.prototype.init = function(a, t) {
- this.chart = a, this.setOptions(t), t.enabled && (this.render(), f(this.chart, "endResize", function() {
- this.legend.positionCheckboxes();
- }), this.proximate ? this.unchartrender = f(this.chart, "render", function() {
- this.legend.proximatePositions(), this.legend.positionItems();
- }) : this.unchartrender && this.unchartrender());
- }, c.prototype.setOptions = function(a) {
- var t = l(a.padding, 8);
- this.options = a, this.chart.styledMode || (this.itemStyle = a.itemStyle, this.itemHiddenStyle = v(this.itemStyle, a.itemHiddenStyle)), this.itemMarginTop = a.itemMarginTop || 0, this.itemMarginBottom = a.itemMarginBottom || 0, this.padding = t, this.initialItemY = t - 5, this.symbolWidth = l(
- a.symbolWidth,
- 16
- ), this.pages = [], this.proximate = a.layout === "proximate" && !this.chart.inverted, this.baseline = void 0;
- }, c.prototype.update = function(a, t) {
- var s = this.chart;
- this.setOptions(v(!0, this.options, a)), this.destroy(), s.isDirtyLegend = s.isDirtyBox = !0, l(t, !0) && s.redraw(), b(this, "afterUpdate");
- }, c.prototype.colorizeItem = function(a, t) {
- if (a.legendGroup[t ? "removeClass" : "addClass"]("highcharts-legend-item-hidden"), !this.chart.styledMode) {
- var s = this.options, n = a.legendItem, P = a.legendLine, _ = a.legendSymbol, I = this.itemHiddenStyle.color;
- s = t ? s.itemStyle.color : I;
- var W = t && a.color || I, E = a.options && a.options.marker, X = { fill: W };
- n && n.css({ fill: s, color: s }), P && P.attr({ stroke: W }), _ && (E && _.isMarker && (X = a.pointAttribs(), t || (X.stroke = X.fill = I)), _.attr(X));
- }
- b(this, "afterColorizeItem", { item: a, visible: t });
- }, c.prototype.positionItems = function() {
- this.allItems.forEach(this.positionItem, this), this.chart.isResizing || this.positionCheckboxes();
- }, c.prototype.positionItem = function(a) {
- var t = this, s = this.options, n = s.symbolPadding, P = !s.rtl, _ = a._legendItemPos;
- s = _[0], _ = _[1];
- var I = a.checkbox, W = a.legendGroup;
- W && W.element && (n = { translateX: P ? s : this.legendWidth - s - 2 * n - 4, translateY: _ }, P = function() {
- b(t, "afterPositionItem", { item: a });
- }, O(W.translateY) ? W.animate(n, void 0, P) : (W.attr(n), P())), I && (I.x = s, I.y = _);
- }, c.prototype.destroyItem = function(a) {
- var t = a.checkbox;
- ["legendItem", "legendLine", "legendSymbol", "legendGroup"].forEach(function(s) {
- a[s] && (a[s] = a[s].destroy());
- }), t && j(a.checkbox);
- }, c.prototype.destroy = function() {
- function a(t) {
- this[t] && (this[t] = this[t].destroy());
- }
- this.getAllItems().forEach(function(t) {
- [
- "legendItem",
- "legendGroup"
- ].forEach(a, t);
- }), "clipRect up down pager nav box title group".split(" ").forEach(a, this), this.display = null;
- }, c.prototype.positionCheckboxes = function() {
- var a = this.group && this.group.alignAttr, t = this.clipHeight || this.legendHeight, s = this.titleHeight;
- if (a) {
- var n = a.translateY;
- this.allItems.forEach(function(P) {
- var _ = P.checkbox;
- if (_) {
- var I = n + s + _.y + (this.scrollOffset || 0) + 3;
- T(_, { left: a.translateX + P.checkboxOffset + _.x - 20 + "px", top: I + "px", display: this.proximate || I > n - 6 && I < n + t - 6 ? "" : "none" });
- }
- }, this);
- }
- }, c.prototype.renderTitle = function() {
- var a = this.options, t = this.padding, s = a.title, n = 0;
- s.text && (this.title || (this.title = this.chart.renderer.label(s.text, t - 3, t - 4, null, null, null, a.useHTML, null, "legend-title").attr({ zIndex: 1 }), this.chart.styledMode || this.title.css(s.style), this.title.add(this.group)), s.width || this.title.css({ width: this.maxLegendWidth + "px" }), a = this.title.getBBox(), n = a.height, this.offsetWidth = a.width, this.contentGroup.attr({ translateY: n })), this.titleHeight = n;
- }, c.prototype.setText = function(a) {
- var t = this.options;
- a.legendItem.attr({ text: t.labelFormat ? B(t.labelFormat, a, this.chart) : t.labelFormatter.call(a) });
- }, c.prototype.renderItem = function(a) {
- var t = this.chart, s = t.renderer, n = this.options, P = this.symbolWidth, _ = n.symbolPadding || 0, I = this.itemStyle, W = this.itemHiddenStyle, E = n.layout === "horizontal" ? l(n.itemDistance, 20) : 0, X = !n.rtl, g = !a.series, m = !g && a.series.drawLegendSymbol ? a.series : a, L = m.options, z = this.createCheckboxForItem && L && L.showCheckbox, $ = n.useHTML, Q = a.options.className, A = a.legendItem;
- L = P + _ + E + (z ? 20 : 0), A || (a.legendGroup = s.g("legend-item").addClass("highcharts-" + m.type + "-series highcharts-color-" + a.colorIndex + (Q ? " " + Q : "") + (g ? " highcharts-series-" + a.index : "")).attr({ zIndex: 1 }).add(this.scrollGroup), a.legendItem = A = s.text("", X ? P + _ : -_, this.baseline || 0, $), t.styledMode || A.css(v(a.visible ? I : W)), A.attr({ align: X ? "left" : "right", zIndex: 2 }).add(a.legendGroup), this.baseline || (this.fontMetrics = s.fontMetrics(t.styledMode ? 12 : I.fontSize, A), this.baseline = this.fontMetrics.f + 3 + this.itemMarginTop, A.attr("y", this.baseline), this.symbolHeight = n.symbolHeight || this.fontMetrics.f, n.squareSymbol && (this.symbolWidth = l(n.symbolWidth, Math.max(this.symbolHeight, 16)), L = this.symbolWidth + _ + E + (z ? 20 : 0), X && A.attr("x", this.symbolWidth + _))), m.drawLegendSymbol(this, a), this.setItemEvents && this.setItemEvents(a, A, $)), z && !a.checkbox && this.createCheckboxForItem && this.createCheckboxForItem(a), this.colorizeItem(a, a.visible), !t.styledMode && I.width || A.css({ width: (n.itemWidth || this.widthOption || t.spacingBox.width) - L + "px" }), this.setText(a), t = A.getBBox(), s = this.fontMetrics && this.fontMetrics.h || 0, a.itemWidth = a.checkboxOffset = n.itemWidth || a.legendItemWidth || t.width + L, this.maxItemWidth = Math.max(this.maxItemWidth, a.itemWidth), this.totalItemWidth += a.itemWidth, this.itemHeight = a.itemHeight = Math.round(a.legendItemHeight || (t.height > 1.5 * s ? t.height : s));
- }, c.prototype.layoutItem = function(a) {
- var t = this.options, s = this.padding, n = t.layout === "horizontal", P = a.itemHeight, _ = this.itemMarginBottom, I = this.itemMarginTop, W = n ? l(t.itemDistance, 20) : 0, E = this.maxLegendWidth;
- t = t.alignColumns && this.totalItemWidth > E ? this.maxItemWidth : a.itemWidth, n && this.itemX - s + t > E && (this.itemX = s, this.lastLineHeight && (this.itemY += I + this.lastLineHeight + _), this.lastLineHeight = 0), this.lastItemY = I + this.itemY + _, this.lastLineHeight = Math.max(P, this.lastLineHeight), a._legendItemPos = [this.itemX, this.itemY], n ? this.itemX += t : (this.itemY += I + P + _, this.lastLineHeight = P), this.offsetWidth = this.widthOption || Math.max((n ? this.itemX - s - (a.checkbox ? 0 : W) : t) + s, this.offsetWidth);
- }, c.prototype.getAllItems = function() {
- var a = [];
- return this.chart.series.forEach(function(t) {
- var s = t && t.options;
- t && l(s.showInLegend, O(s.linkedTo) ? !1 : void 0, !0) && (a = a.concat(t.legendItems || (s.legendType === "point" ? t.data : t)));
- }), b(this, "afterGetAllItems", { allItems: a }), a;
- }, c.prototype.getAlignment = function() {
- var a = this.options;
- return this.proximate ? a.align.charAt(0) + "tv" : a.floating ? "" : a.align.charAt(0) + a.verticalAlign.charAt(0) + a.layout.charAt(0);
- }, c.prototype.adjustMargins = function(a, t) {
- var s = this.chart, n = this.options, P = this.getAlignment();
- P && [/(lth|ct|rth)/, /(rtv|rm|rbv)/, /(rbh|cb|lbh)/, /(lbv|lm|ltv)/].forEach(function(_, I) {
- _.test(P) && !O(a[I]) && (s[S[I]] = Math.max(s[S[I]], s.legend[(I + 1) % 2 ? "legendHeight" : "legendWidth"] + [1, -1, -1, 1][I] * n[I % 2 ? "x" : "y"] + l(n.margin, 12) + t[I] + (s.titleOffset[I] || 0)));
- });
- }, c.prototype.proximatePositions = function() {
- var a = this.chart, t = [], s = this.options.align === "left";
- this.allItems.forEach(function(n) {
- var P, _ = s;
- if (n.yAxis) {
- n.xAxis.options.reversed && (_ = !_), n.points && (P = k(_ ? n.points : n.points.slice(0).reverse(), function(W) {
- return w(W.plotY);
- })), _ = this.itemMarginTop + n.legendItem.getBBox().height + this.itemMarginBottom;
- var I = n.yAxis.top - a.plotTop;
- n.visible ? (P = P ? P.plotY : n.yAxis.height, P += I - 0.3 * _) : P = I + n.yAxis.height, t.push({ target: P, size: _, item: n });
- }
- }, this), x(t, a.plotHeight).forEach(function(n) {
- n.item._legendItemPos && (n.item._legendItemPos[1] = a.plotTop - a.spacing[0] + n.pos);
- });
- }, c.prototype.render = function() {
- var a = this.chart, t = a.renderer, s = this.options, n = this.padding, P = this.getAllItems(), _ = this.group, I = this.box;
- this.itemX = n, this.itemY = this.initialItemY, this.lastItemY = this.offsetWidth = 0, this.widthOption = h(s.width, a.spacingBox.width - n);
- var W = a.spacingBox.width - 2 * n - s.x;
- -1 < ["rm", "lm"].indexOf(this.getAlignment().substring(0, 2)) && (W /= 2), this.maxLegendWidth = this.widthOption || W, _ || (this.group = _ = t.g("legend").addClass(s.className || "").attr({ zIndex: 7 }).add(), this.contentGroup = t.g().attr({ zIndex: 1 }).add(_), this.scrollGroup = t.g().add(this.contentGroup)), this.renderTitle(), u(P, function(X, g) {
- return (X.options && X.options.legendIndex || 0) - (g.options && g.options.legendIndex || 0);
- }), s.reversed && P.reverse(), this.allItems = P, this.display = W = !!P.length, this.itemHeight = this.totalItemWidth = this.maxItemWidth = this.lastLineHeight = 0, P.forEach(this.renderItem, this), P.forEach(this.layoutItem, this), P = (this.widthOption || this.offsetWidth) + n;
- var E = this.lastItemY + this.lastLineHeight + this.titleHeight;
- E = this.handleOverflow(E), E += n, I || (this.box = I = t.rect().addClass("highcharts-legend-box").attr({ r: s.borderRadius }).add(_), I.isNew = !0), a.styledMode || I.attr({ stroke: s.borderColor, "stroke-width": s.borderWidth || 0, fill: s.backgroundColor || "none" }).shadow(s.shadow), 0 < P && 0 < E && (I[I.isNew ? "attr" : "animate"](I.crisp.call({}, { x: 0, y: 0, width: P, height: E }, I.strokeWidth())), I.isNew = !1), I[W ? "show" : "hide"](), a.styledMode && _.getStyle("display") === "none" && (P = E = 0), this.legendWidth = P, this.legendHeight = E, W && this.align(), this.proximate || this.positionItems(), b(this, "afterRender");
- }, c.prototype.align = function(a) {
- a === void 0 && (a = this.chart.spacingBox);
- var t = this.chart, s = this.options, n = a.y;
- /(lth|ct|rth)/.test(this.getAlignment()) && 0 < t.titleOffset[0] ? n += t.titleOffset[0] : /(lbh|cb|rbh)/.test(this.getAlignment()) && 0 < t.titleOffset[2] && (n -= t.titleOffset[2]), n !== a.y && (a = v(a, { y: n })), this.group.align(v(s, { width: this.legendWidth, height: this.legendHeight, verticalAlign: this.proximate ? "top" : s.verticalAlign }), !0, a);
- }, c.prototype.handleOverflow = function(a) {
- var t = this, s = this.chart, n = s.renderer, P = this.options, _ = P.y, I = P.verticalAlign === "top", W = this.padding, E = P.maxHeight, X = P.navigation, g = l(X.animation, !0), m = X.arrowSize || 12, L = this.pages, z = this.allItems, $ = function(q) {
- typeof q == "number" ? Z.attr({ height: q }) : Z && (t.clipRect = Z.destroy(), t.contentGroup.clip()), t.contentGroup.div && (t.contentGroup.div.style.clip = q ? "rect(" + W + "px,9999px," + (W + q) + "px,0)" : "auto");
- }, Q = function(q) {
- return t[q] = n.circle(0, 0, 1.3 * m).translate(m / 2, m / 2).add(Y), s.styledMode || t[q].attr("fill", "rgba(0,0,0,0.0001)"), t[q];
- }, A, F;
- _ = s.spacingBox.height + (I ? -_ : _) - W;
- var Y = this.nav, Z = this.clipRect;
- return P.layout !== "horizontal" || P.verticalAlign === "middle" || P.floating || (_ /= 2), E && (_ = Math.min(_, E)), L.length = 0, a && 0 < _ && a > _ && X.enabled !== !1 ? (this.clipHeight = A = Math.max(_ - 20 - this.titleHeight - W, 0), this.currentPage = l(this.currentPage, 1), this.fullHeight = a, z.forEach(function(q, it) {
- var et = q._legendItemPos[1], nt = Math.round(q.legendItem.getBBox().height), rt = L.length;
- (!rt || et - L[rt - 1] > A && (F || et) !== L[rt - 1]) && (L.push(F || et), rt++), q.pageIx = rt - 1, F && (z[it - 1].pageIx = rt - 1), it === z.length - 1 && et + nt - L[rt - 1] > A && nt <= A && (L.push(et), q.pageIx = rt), et !== F && (F = et);
- }), Z || (Z = t.clipRect = n.clipRect(0, W, 9999, 0), t.contentGroup.clip(Z)), $(A), Y || (this.nav = Y = n.g().attr({ zIndex: 1 }).add(this.group), this.up = n.symbol("triangle", 0, 0, m, m).add(Y), Q("upTracker").on(
- "click",
- function() {
- t.scroll(-1, g);
- }
- ), this.pager = n.text("", 15, 10).addClass("highcharts-legend-navigation"), s.styledMode || this.pager.css(X.style), this.pager.add(Y), this.down = n.symbol("triangle-down", 0, 0, m, m).add(Y), Q("downTracker").on("click", function() {
- t.scroll(1, g);
- })), t.scroll(0), a = _) : Y && ($(), this.nav = Y.destroy(), this.scrollGroup.attr({ translateY: 1 }), this.clipHeight = 0), a;
- }, c.prototype.scroll = function(a, t) {
- var s = this, n = this.chart, P = this.pages, _ = P.length, I = this.clipHeight, W = this.options.navigation, E = this.pager, X = this.padding, g = this.currentPage + a;
- g > _ && (g = _), 0 < g && (typeof t < "u" && R(t, n), this.nav.attr({ translateX: X, translateY: I + this.padding + 7 + this.titleHeight, visibility: "visible" }), [this.up, this.upTracker].forEach(function(m) {
- m.attr({ class: g === 1 ? "highcharts-legend-nav-inactive" : "highcharts-legend-nav-active" });
- }), E.attr({ text: g + "/" + _ }), [this.down, this.downTracker].forEach(
- function(m) {
- m.attr({ x: 18 + this.pager.getBBox().width, class: g === _ ? "highcharts-legend-nav-inactive" : "highcharts-legend-nav-active" });
- },
- this
- ), n.styledMode || (this.up.attr({ fill: g === 1 ? W.inactiveColor : W.activeColor }), this.upTracker.css({ cursor: g === 1 ? "default" : "pointer" }), this.down.attr({ fill: g === _ ? W.inactiveColor : W.activeColor }), this.downTracker.css({ cursor: g === _ ? "default" : "pointer" })), this.scrollOffset = -P[g - 1] + this.initialItemY, this.scrollGroup.animate({ translateY: this.scrollOffset }), this.currentPage = g, this.positionCheckboxes(), a = G(l(t, n.renderer.globalAnimation, !0)), i(function() {
- b(s, "afterScroll", { currentPage: g });
- }, a.duration));
- }, c.prototype.setItemEvents = function(a, t, s) {
- var n = this, P = n.chart.renderer.boxWrapper, _ = a instanceof U, I = "highcharts-legend-" + (_ ? "point" : "series") + "-active", W = n.chart.styledMode, E = function(X) {
- n.allItems.forEach(function(g) {
- a !== g && [g].concat(g.linkedSeries || []).forEach(function(m) {
- m.setState(X, !_);
- });
- });
- };
- (s ? [t, a.legendSymbol] : [a.legendGroup]).forEach(function(X) {
- X && X.on("mouseover", function() {
- a.visible && E("inactive"), a.setState("hover"), a.visible && P.addClass(I), W || t.css(n.options.itemHoverStyle);
- }).on("mouseout", function() {
- n.chart.styledMode || t.css(v(a.visible ? n.itemStyle : n.itemHiddenStyle)), E(""), P.removeClass(I), a.setState();
- }).on("click", function(g) {
- var m = function() {
- a.setVisible && a.setVisible(), E(a.visible ? "inactive" : "");
- };
- P.removeClass(I), g = { browserEvent: g }, a.firePointEvent ? a.firePointEvent("legendItemClick", g, m) : b(a, "legendItemClick", g, m);
- });
- });
- }, c.prototype.createCheckboxForItem = function(a) {
- a.checkbox = d(
- "input",
- { type: "checkbox", className: "highcharts-legend-checkbox", checked: a.selected, defaultChecked: a.selected },
- this.options.itemCheckboxStyle,
- this.chart.container
- ), f(a.checkbox, "click", function(t) {
- b(a.series || a, "checkboxClick", { checked: t.target.checked, item: a }, function() {
- a.select();
- });
- });
- }, c;
- }(), (/Trident\/7\.0/.test(D.navigator && D.navigator.userAgent) || y) && H(V.prototype, "positionItem", function(c, a) {
- var t = this, s = function() {
- a._legendItemPos && c.call(t, a);
- };
- s(), t.bubbleLegend || setTimeout(s);
- }), V;
- }), M(
- o,
- "Core/Series/SeriesRegistry.js",
- [o["Core/Globals.js"], o["Core/DefaultOptions.js"], o["Core/Series/Point.js"], o["Core/Utilities.js"]],
- function(y, N, D, U) {
- var H = N.defaultOptions, V = U.error, G = U.extendClass, R = U.merge, B;
- return function(S) {
- function x(f, d) {
- var T = H.plotOptions || {}, O = d.defaultOptions;
- d.prototype.pointClass || (d.prototype.pointClass = D), d.prototype.type = f, O && (T[f] = O), S.seriesTypes[f] = d;
- }
- S.seriesTypes = y.seriesTypes, S.getSeries = function(f, d) {
- d === void 0 && (d = {});
- var T = f.options.chart;
- T = d.type || T.type || T.defaultSeriesType || "";
- var O = S.seriesTypes[T];
- return S || V(17, !0, f, { missingModuleFor: T }), T = new O(), typeof T.init == "function" && T.init(f, d), T;
- }, S.registerSeriesType = x, S.seriesType = function(f, d, T, O, j) {
- var k = H.plotOptions || {};
- return d = d || "", k[f] = R(k[d], T), x(f, G(S.seriesTypes[d] || function() {
- }, O)), S.seriesTypes[f].prototype.type = f, j && (S.seriesTypes[f].prototype.pointClass = G(D, j)), S.seriesTypes[f];
- };
- }(B || (B = {})), B;
- }
- ), M(o, "Core/Chart/Chart.js", [
- o["Core/Animation/AnimationUtilities.js"],
- o["Core/Axis/Axis.js"],
- o["Core/FormatUtilities.js"],
- o["Core/Foundation.js"],
- o["Core/Globals.js"],
- o["Core/Legend/Legend.js"],
- o["Core/MSPointer.js"],
- o["Core/DefaultOptions.js"],
- o["Core/Pointer.js"],
- o["Core/Renderer/RendererRegistry.js"],
- o["Core/Series/SeriesRegistry.js"],
- o["Core/Renderer/SVG/SVGRenderer.js"],
- o["Core/Time.js"],
- o["Core/Utilities.js"],
- o["Core/Renderer/HTML/AST.js"]
- ], function(y, N, D, U, H, V, G, R, B, S, x, f, d, T, O) {
- var j = y.animate, k = y.animObject, b = y.setAnimation, w = D.numberFormat, v = U.registerEventOptions, l = H.charts, h = H.doc, u = H.marginNames, i = H.svg, c = H.win, a = R.defaultOptions, t = R.defaultTime, s = x.seriesTypes, n = T.addEvent, P = T.attr, _ = T.cleanRecursively, I = T.createElement, W = T.css, E = T.defined, X = T.discardElement, g = T.erase, m = T.error, L = T.extend, z = T.find, $ = T.fireEvent, Q = T.getStyle, A = T.isArray, F = T.isNumber, Y = T.isObject, Z = T.isString, q = T.merge, it = T.objectEach, et = T.pick, nt = T.pInt, rt = T.relativeLength, ct = T.removeEvent, gt = T.splat, dt = T.syncTimeout, ht = T.uniqueKey;
- return y = function() {
- function at(J, tt, ot) {
- this.series = this.renderTo = this.renderer = this.pointer = this.pointCount = this.plotWidth = this.plotTop = this.plotLeft = this.plotHeight = this.plotBox = this.options = this.numberFormatter = this.margin = this.legend = this.labelCollectors = this.isResizing = this.index = this.eventOptions = this.container = this.colorCounter = this.clipBox = this.chartWidth = this.chartHeight = this.bounds = this.axisOffset = this.axes = void 0, this.sharedClips = {}, this.yAxis = this.xAxis = this.userOptions = this.titleOffset = this.time = this.symbolCounter = this.spacingBox = this.spacing = void 0, this.getArgs(J, tt, ot);
- }
- return at.chart = function(J, tt, ot) {
- return new at(J, tt, ot);
- }, at.prototype.getArgs = function(J, tt, ot) {
- Z(J) || J.nodeName ? (this.renderTo = J, this.init(tt, ot)) : this.init(J, tt);
- }, at.prototype.init = function(J, tt) {
- var ot = J.plotOptions || {};
- $(this, "init", { args: arguments }, function() {
- var lt = q(a, J), pt = lt.chart;
- it(lt.plotOptions, function(yt, vt) {
- Y(yt) && (yt.tooltip = ot[vt] && q(ot[vt].tooltip) || void 0);
- }), lt.tooltip.userOptions = J.chart && J.chart.forExport && J.tooltip.userOptions || J.tooltip, this.userOptions = J, this.margin = [], this.spacing = [], this.bounds = { h: {}, v: {} }, this.labelCollectors = [], this.callback = tt, this.isResizing = 0, this.options = lt, this.axes = [], this.series = [], this.time = J.time && Object.keys(J.time).length ? new d(J.time) : H.time, this.numberFormatter = pt.numberFormatter || w, this.styledMode = pt.styledMode, this.hasCartesianSeries = pt.showAxes, this.index = l.length, l.push(this), H.chartCount++, v(this, pt), this.xAxis = [], this.yAxis = [], this.pointCount = this.colorCounter = this.symbolCounter = 0, $(this, "afterInit"), this.firstRender();
- });
- }, at.prototype.initSeries = function(J) {
- var tt = this.options.chart;
- tt = J.type || tt.type || tt.defaultSeriesType;
- var ot = s[tt];
- return ot || m(17, !0, this, { missingModuleFor: tt }), tt = new ot(), typeof tt.init == "function" && tt.init(this, J), tt;
- }, at.prototype.setSeriesData = function() {
- this.getSeriesOrderByLinks().forEach(function(J) {
- J.points || J.data || !J.enabledDataSorting || J.setData(J.options.data, !1);
- });
- }, at.prototype.getSeriesOrderByLinks = function() {
- return this.series.concat().sort(function(J, tt) {
- return J.linkedSeries.length || tt.linkedSeries.length ? tt.linkedSeries.length - J.linkedSeries.length : 0;
- });
- }, at.prototype.orderSeries = function(J) {
- var tt = this.series;
- J = J || 0;
- for (var ot = tt.length; J < ot; ++J)
- tt[J] && (tt[J].index = J, tt[J].name = tt[J].getName());
- }, at.prototype.isInsidePlot = function(J, tt, ot) {
- ot === void 0 && (ot = {});
- var lt = this.inverted, pt = this.plotBox, yt = this.plotLeft, vt = this.plotTop, Mt = this.scrollablePlotBox, Pt = 0, At = 0;
- ot.visiblePlotOnly && this.scrollingContainer && (At = this.scrollingContainer, Pt = At.scrollLeft, At = At.scrollTop);
- var St = ot.series;
- if (pt = ot.visiblePlotOnly && Mt || pt, Mt = ot.inverted ? tt : J, tt = ot.inverted ? J : tt, J = { x: Mt, y: tt, isInsidePlot: !0 }, !ot.ignoreX) {
- var Dt = St && (lt ? St.yAxis : St.xAxis) || { pos: yt, len: 1 / 0 };
- Mt = ot.paneCoordinates ? Dt.pos + Mt : yt + Mt, Mt >= Math.max(Pt + yt, Dt.pos) && Mt <= Math.min(Pt + yt + pt.width, Dt.pos + Dt.len) || (J.isInsidePlot = !1);
- }
- return !ot.ignoreY && J.isInsidePlot && (lt = St && (lt ? St.xAxis : St.yAxis) || { pos: vt, len: 1 / 0 }, ot = ot.paneCoordinates ? lt.pos + tt : vt + tt, ot >= Math.max(At + vt, lt.pos) && ot <= Math.min(At + vt + pt.height, lt.pos + lt.len) || (J.isInsidePlot = !1)), $(this, "afterIsInsidePlot", J), J.isInsidePlot;
- }, at.prototype.redraw = function(J) {
- $(this, "beforeRedraw");
- var tt = this.hasCartesianSeries ? this.axes : this.colorAxis || [], ot = this.series, lt = this.pointer, pt = this.legend, yt = this.userOptions.legend, vt = this.renderer, Mt = vt.isHidden(), Pt = [], At = this.isDirtyBox, St = this.isDirtyLegend;
- for (this.setResponsive && this.setResponsive(!1), b(this.hasRendered ? J : !1, this), Mt && this.temporaryDisplay(), this.layOutTitles(), J = ot.length; J--; ) {
- var Dt = ot[J];
- if (Dt.options.stacking || Dt.options.centerInCategory) {
- var _t = !0;
- if (Dt.isDirty) {
- var Nt = !0;
- break;
- }
- }
- }
- if (Nt)
- for (J = ot.length; J--; )
- Dt = ot[J], Dt.options.stacking && (Dt.isDirty = !0);
- ot.forEach(function(Ot) {
- Ot.isDirty && (Ot.options.legendType === "point" ? (typeof Ot.updateTotals == "function" && Ot.updateTotals(), St = !0) : yt && (yt.labelFormatter || yt.labelFormat) && (St = !0)), Ot.isDirtyData && $(Ot, "updatedData");
- }), St && pt && pt.options.enabled && (pt.render(), this.isDirtyLegend = !1), _t && this.getStacks(), tt.forEach(function(Ot) {
- Ot.updateNames(), Ot.setScale();
- }), this.getMargins(), tt.forEach(function(Ot) {
- Ot.isDirty && (At = !0);
- }), tt.forEach(function(Ot) {
- var Kt = Ot.min + "," + Ot.max;
- Ot.extKey !== Kt && (Ot.extKey = Kt, Pt.push(function() {
- $(Ot, "afterSetExtremes", L(Ot.eventArgs, Ot.getExtremes())), delete Ot.eventArgs;
- })), (At || _t) && Ot.redraw();
- }), At && this.drawChartBox(), $(this, "predraw"), ot.forEach(function(Ot) {
- (At || Ot.isDirty) && Ot.visible && Ot.redraw(), Ot.isDirtyData = !1;
- }), lt && lt.reset(!0), vt.draw(), $(this, "redraw"), $(this, "render"), Mt && this.temporaryDisplay(!0), Pt.forEach(function(Ot) {
- Ot.call();
- });
- }, at.prototype.get = function(J) {
- function tt(yt) {
- return yt.id === J || yt.options && yt.options.id === J;
- }
- for (var ot = this.series, lt = z(this.axes, tt) || z(this.series, tt), pt = 0; !lt && pt < ot.length; pt++)
- lt = z(ot[pt].points || [], tt);
- return lt;
- }, at.prototype.getAxes = function() {
- var J = this, tt = this.options, ot = tt.xAxis = gt(tt.xAxis || {});
- tt = tt.yAxis = gt(tt.yAxis || {}), $(this, "getAxes"), ot.forEach(function(lt, pt) {
- lt.index = pt, lt.isX = !0;
- }), tt.forEach(function(lt, pt) {
- lt.index = pt;
- }), ot.concat(tt).forEach(function(lt) {
- new N(J, lt);
- }), $(this, "afterGetAxes");
- }, at.prototype.getSelectedPoints = function() {
- return this.series.reduce(function(J, tt) {
- return tt.getPointsCollection().forEach(function(ot) {
- et(ot.selectedStaging, ot.selected) && J.push(ot);
- }), J;
- }, []);
- }, at.prototype.getSelectedSeries = function() {
- return this.series.filter(function(J) {
- return J.selected;
- });
- }, at.prototype.setTitle = function(J, tt, ot) {
- this.applyDescription("title", J), this.applyDescription("subtitle", tt), this.applyDescription(
- "caption",
- void 0
- ), this.layOutTitles(ot);
- }, at.prototype.applyDescription = function(J, tt) {
- var ot = this, lt = J === "title" ? { color: "#333333", fontSize: this.options.isStock ? "16px" : "18px" } : { color: "#666666" };
- lt = this.options[J] = q(!this.styledMode && { style: lt }, this.options[J], tt);
- var pt = this[J];
- pt && tt && (this[J] = pt = pt.destroy()), lt && !pt && (pt = this.renderer.text(lt.text, 0, 0, lt.useHTML).attr({ align: lt.align, class: "highcharts-" + J, zIndex: lt.zIndex || 4 }).add(), pt.update = function(yt) {
- ot[{ title: "setTitle", subtitle: "setSubtitle", caption: "setCaption" }[J]](yt);
- }, this.styledMode || pt.css(lt.style), this[J] = pt);
- }, at.prototype.layOutTitles = function(J) {
- var tt = [0, 0, 0], ot = this.renderer, lt = this.spacingBox;
- ["title", "subtitle", "caption"].forEach(function(yt) {
- var vt = this[yt], Mt = this.options[yt], Pt = Mt.verticalAlign || "top";
- yt = yt === "title" ? Pt === "top" ? -3 : 0 : Pt === "top" ? tt[0] + 2 : 0;
- var At;
- if (vt) {
- this.styledMode || (At = Mt.style && Mt.style.fontSize), At = ot.fontMetrics(At, vt).b, vt.css({ width: (Mt.width || lt.width + (Mt.widthAdjust || 0)) + "px" });
- var St = Math.round(vt.getBBox(Mt.useHTML).height);
- vt.align(L({ y: Pt === "bottom" ? At : yt + At, height: St }, Mt), !1, "spacingBox"), Mt.floating || (Pt === "top" ? tt[0] = Math.ceil(tt[0] + St) : Pt === "bottom" && (tt[2] = Math.ceil(tt[2] + St)));
- }
- }, this), tt[0] && (this.options.title.verticalAlign || "top") === "top" && (tt[0] += this.options.title.margin), tt[2] && this.options.caption.verticalAlign === "bottom" && (tt[2] += this.options.caption.margin);
- var pt = !this.titleOffset || this.titleOffset.join(",") !== tt.join(",");
- this.titleOffset = tt, $(this, "afterLayOutTitles"), !this.isDirtyBox && pt && (this.isDirtyBox = this.isDirtyLegend = pt, this.hasRendered && et(J, !0) && this.isDirtyBox && this.redraw());
- }, at.prototype.getChartSize = function() {
- var J = this.options.chart, tt = J.width;
- J = J.height;
- var ot = this.renderTo;
- E(tt) || (this.containerWidth = Q(ot, "width")), E(J) || (this.containerHeight = Q(ot, "height")), this.chartWidth = Math.max(0, tt || this.containerWidth || 600), this.chartHeight = Math.max(0, rt(J, this.chartWidth) || (1 < this.containerHeight ? this.containerHeight : 400));
- }, at.prototype.temporaryDisplay = function(J) {
- var tt = this.renderTo;
- if (J)
- for (; tt && tt.style; )
- tt.hcOrigStyle && (W(tt, tt.hcOrigStyle), delete tt.hcOrigStyle), tt.hcOrigDetached && (h.body.removeChild(tt), tt.hcOrigDetached = !1), tt = tt.parentNode;
- else
- for (; tt && tt.style && (h.body.contains(tt) || tt.parentNode || (tt.hcOrigDetached = !0, h.body.appendChild(tt)), (Q(tt, "display", !1) === "none" || tt.hcOricDetached) && (tt.hcOrigStyle = { display: tt.style.display, height: tt.style.height, overflow: tt.style.overflow }, J = { display: "block", overflow: "hidden" }, tt !== this.renderTo && (J.height = 0), W(tt, J), tt.offsetWidth || tt.style.setProperty("display", "block", "important")), tt = tt.parentNode, tt !== h.body); )
- ;
- }, at.prototype.setClassName = function(J) {
- this.container.className = "highcharts-container " + (J || "");
- }, at.prototype.getContainer = function() {
- var J = this.options, tt = J.chart, ot = ht(), lt, pt = this.renderTo;
- pt || (this.renderTo = pt = tt.renderTo), Z(pt) && (this.renderTo = pt = h.getElementById(pt)), pt || m(13, !0, this);
- var yt = nt(P(pt, "data-highcharts-chart"));
- F(yt) && l[yt] && l[yt].hasRendered && l[yt].destroy(), P(pt, "data-highcharts-chart", this.index), pt.innerHTML = O.emptyHTML, tt.skipClone || pt.offsetWidth || this.temporaryDisplay(), this.getChartSize(), yt = this.chartWidth;
- var vt = this.chartHeight;
- if (W(pt, { overflow: "hidden" }), this.styledMode || (lt = L({ position: "relative", overflow: "hidden", width: yt + "px", height: vt + "px", textAlign: "left", lineHeight: "normal", zIndex: 0, "-webkit-tap-highlight-color": "rgba(0,0,0,0)", userSelect: "none", "touch-action": "manipulation", outline: "none" }, tt.style || {})), this.container = ot = I("div", { id: ot }, lt, pt), this._cursor = ot.style.cursor, this.renderer = new (tt.renderer || !i ? S.getRendererType(tt.renderer) : f)(ot, yt, vt, void 0, tt.forExport, J.exporting && J.exporting.allowHTML, this.styledMode), b(
- void 0,
- this
- ), this.setClassName(tt.className), this.styledMode)
- for (var Mt in J.defs)
- this.renderer.definition(J.defs[Mt]);
- else
- this.renderer.setStyle(tt.style);
- this.renderer.chartIndex = this.index, $(this, "afterGetContainer");
- }, at.prototype.getMargins = function(J) {
- var tt = this.spacing, ot = this.margin, lt = this.titleOffset;
- this.resetMargins(), lt[0] && !E(ot[0]) && (this.plotTop = Math.max(this.plotTop, lt[0] + tt[0])), lt[2] && !E(ot[2]) && (this.marginBottom = Math.max(this.marginBottom, lt[2] + tt[2])), this.legend && this.legend.display && this.legend.adjustMargins(
- ot,
- tt
- ), $(this, "getMargins"), J || this.getAxisMargins();
- }, at.prototype.getAxisMargins = function() {
- var J = this, tt = J.axisOffset = [0, 0, 0, 0], ot = J.colorAxis, lt = J.margin, pt = function(yt) {
- yt.forEach(function(vt) {
- vt.visible && vt.getOffset();
- });
- };
- J.hasCartesianSeries ? pt(J.axes) : ot && ot.length && pt(ot), u.forEach(function(yt, vt) {
- E(lt[vt]) || (J[yt] += tt[vt]);
- }), J.setChartSize();
- }, at.prototype.reflow = function(J) {
- var tt = this, ot = tt.options.chart, lt = tt.renderTo, pt = E(ot.width) && E(ot.height), yt = ot.width || Q(lt, "width");
- ot = ot.height || Q(lt, "height"), lt = J ? J.target : c, delete tt.pointer.chartPosition, !pt && !tt.isPrinting && yt && ot && (lt === c || lt === h) && ((yt !== tt.containerWidth || ot !== tt.containerHeight) && (T.clearTimeout(tt.reflowTimeout), tt.reflowTimeout = dt(function() {
- tt.container && tt.setSize(void 0, void 0, !1);
- }, J ? 100 : 0)), tt.containerWidth = yt, tt.containerHeight = ot);
- }, at.prototype.setReflow = function(J) {
- var tt = this;
- J === !1 || this.unbindReflow ? J === !1 && this.unbindReflow && (this.unbindReflow = this.unbindReflow()) : (this.unbindReflow = n(c, "resize", function(ot) {
- tt.options && tt.reflow(ot);
- }), n(this, "destroy", this.unbindReflow));
- }, at.prototype.setSize = function(J, tt, ot) {
- var lt = this, pt = lt.renderer;
- lt.isResizing += 1, b(ot, lt), ot = pt.globalAnimation, lt.oldChartHeight = lt.chartHeight, lt.oldChartWidth = lt.chartWidth, typeof J < "u" && (lt.options.chart.width = J), typeof tt < "u" && (lt.options.chart.height = tt), lt.getChartSize(), lt.styledMode || (ot ? j : W)(lt.container, { width: lt.chartWidth + "px", height: lt.chartHeight + "px" }, ot), lt.setChartSize(!0), pt.setSize(lt.chartWidth, lt.chartHeight, ot), lt.axes.forEach(function(yt) {
- yt.isDirty = !0, yt.setScale();
- }), lt.isDirtyLegend = !0, lt.isDirtyBox = !0, lt.layOutTitles(), lt.getMargins(), lt.redraw(ot), lt.oldChartHeight = null, $(lt, "resize"), dt(function() {
- lt && $(lt, "endResize", null, function() {
- --lt.isResizing;
- });
- }, k(ot).duration);
- }, at.prototype.setChartSize = function(J) {
- var tt = this.inverted, ot = this.renderer, lt = this.chartWidth, pt = this.chartHeight, yt = this.options.chart, vt = this.spacing, Mt = this.clipOffset, Pt, At, St, Dt;
- this.plotLeft = Pt = Math.round(this.plotLeft), this.plotTop = At = Math.round(this.plotTop), this.plotWidth = St = Math.max(0, Math.round(lt - Pt - this.marginRight)), this.plotHeight = Dt = Math.max(0, Math.round(pt - At - this.marginBottom)), this.plotSizeX = tt ? Dt : St, this.plotSizeY = tt ? St : Dt, this.plotBorderWidth = yt.plotBorderWidth || 0, this.spacingBox = ot.spacingBox = { x: vt[3], y: vt[0], width: lt - vt[3] - vt[1], height: pt - vt[0] - vt[2] }, this.plotBox = ot.plotBox = { x: Pt, y: At, width: St, height: Dt }, tt = 2 * Math.floor(this.plotBorderWidth / 2), lt = Math.ceil(Math.max(tt, Mt[3]) / 2), pt = Math.ceil(Math.max(tt, Mt[0]) / 2), this.clipBox = { x: lt, y: pt, width: Math.floor(this.plotSizeX - Math.max(tt, Mt[1]) / 2 - lt), height: Math.max(0, Math.floor(this.plotSizeY - Math.max(tt, Mt[2]) / 2 - pt)) }, J || (this.axes.forEach(function(_t) {
- _t.setAxisSize(), _t.setAxisTranslation();
- }), ot.alignElements()), $(this, "afterSetChartSize", { skipAxes: J });
- }, at.prototype.resetMargins = function() {
- $(this, "resetMargins");
- var J = this, tt = J.options.chart;
- ["margin", "spacing"].forEach(function(ot) {
- var lt = tt[ot], pt = Y(lt) ? lt : [lt, lt, lt, lt];
- ["Top", "Right", "Bottom", "Left"].forEach(function(yt, vt) {
- J[ot][vt] = et(tt[ot + yt], pt[vt]);
- });
- }), u.forEach(function(ot, lt) {
- J[ot] = et(J.margin[lt], J.spacing[lt]);
- }), J.axisOffset = [0, 0, 0, 0], J.clipOffset = [0, 0, 0, 0];
- }, at.prototype.drawChartBox = function() {
- var J = this.options.chart, tt = this.renderer, ot = this.chartWidth, lt = this.chartHeight, pt = this.styledMode, yt = this.plotBGImage, vt = J.backgroundColor, Mt = J.plotBackgroundColor, Pt = J.plotBackgroundImage, At = this.plotLeft, St = this.plotTop, Dt = this.plotWidth, _t = this.plotHeight, Nt = this.plotBox, Ot = this.clipRect, Kt = this.clipBox, Gt = this.chartBackground, Wt = this.plotBackground, Jt = this.plotBorder, be, Yt = "animate";
- if (Gt || (this.chartBackground = Gt = tt.rect().addClass("highcharts-background").add(), Yt = "attr"), pt)
- var Vt = be = Gt.strokeWidth();
- else
- Vt = J.borderWidth || 0, be = Vt + (J.shadow ? 8 : 0), vt = { fill: vt || "none" }, (Vt || Gt["stroke-width"]) && (vt.stroke = J.borderColor, vt["stroke-width"] = Vt), Gt.attr(vt).shadow(J.shadow);
- Gt[Yt]({ x: be / 2, y: be / 2, width: ot - be - Vt % 2, height: lt - be - Vt % 2, r: J.borderRadius }), Yt = "animate", Wt || (Yt = "attr", this.plotBackground = Wt = tt.rect().addClass("highcharts-plot-background").add()), Wt[Yt](Nt), pt || (Wt.attr({ fill: Mt || "none" }).shadow(J.plotShadow), Pt && (yt ? (Pt !== yt.attr("href") && yt.attr("href", Pt), yt.animate(Nt)) : this.plotBGImage = tt.image(Pt, At, St, Dt, _t).add())), Ot ? Ot.animate({ width: Kt.width, height: Kt.height }) : this.clipRect = tt.clipRect(Kt), Yt = "animate", Jt || (Yt = "attr", this.plotBorder = Jt = tt.rect().addClass("highcharts-plot-border").attr({ zIndex: 1 }).add()), pt || Jt.attr({ stroke: J.plotBorderColor, "stroke-width": J.plotBorderWidth || 0, fill: "none" }), Jt[Yt](Jt.crisp({ x: At, y: St, width: Dt, height: _t }, -Jt.strokeWidth())), this.isDirtyBox = !1, $(this, "afterDrawChartBox");
- }, at.prototype.propFromSeries = function() {
- var J = this, tt = J.options.chart, ot = J.options.series, lt, pt, yt;
- ["inverted", "angular", "polar"].forEach(function(vt) {
- for (pt = s[tt.type || tt.defaultSeriesType], yt = tt[vt] || pt && pt.prototype[vt], lt = ot && ot.length; !yt && lt--; )
- (pt = s[ot[lt].type]) && pt.prototype[vt] && (yt = !0);
- J[vt] = yt;
- });
- }, at.prototype.linkSeries = function() {
- var J = this, tt = J.series;
- tt.forEach(function(ot) {
- ot.linkedSeries.length = 0;
- }), tt.forEach(function(ot) {
- var lt = ot.options.linkedTo;
- Z(lt) && (lt = lt === ":previous" ? J.series[ot.index - 1] : J.get(lt)) && lt.linkedParent !== ot && (lt.linkedSeries.push(ot), ot.linkedParent = lt, lt.enabledDataSorting && ot.setDataSortingOptions(), ot.visible = et(ot.options.visible, lt.options.visible, ot.visible));
- }), $(this, "afterLinkSeries");
- }, at.prototype.renderSeries = function() {
- this.series.forEach(function(J) {
- J.translate(), J.render();
- });
- }, at.prototype.renderLabels = function() {
- var J = this, tt = J.options.labels;
- tt.items && tt.items.forEach(function(ot) {
- var lt = L(tt.style, ot.style), pt = nt(lt.left) + J.plotLeft, yt = nt(lt.top) + J.plotTop + 12;
- delete lt.left, delete lt.top, J.renderer.text(ot.html, pt, yt).attr({ zIndex: 2 }).css(lt).add();
- });
- }, at.prototype.render = function() {
- var J = this.axes, tt = this.colorAxis, ot = this.renderer, lt = this.options, pt = function(At) {
- At.forEach(function(St) {
- St.visible && St.render();
- });
- }, yt = 0;
- this.setTitle(), this.legend = new V(this, lt.legend), this.getStacks && this.getStacks(), this.getMargins(!0), this.setChartSize(), lt = this.plotWidth, J.some(function(At) {
- if (At.horiz && At.visible && At.options.labels.enabled && At.series.length)
- return yt = 21, !0;
- });
- var vt = this.plotHeight = Math.max(this.plotHeight - yt, 0);
- J.forEach(function(At) {
- At.setScale();
- }), this.getAxisMargins();
- var Mt = 1.1 < lt / this.plotWidth, Pt = 1.05 < vt / this.plotHeight;
- (Mt || Pt) && (J.forEach(function(At) {
- (At.horiz && Mt || !At.horiz && Pt) && At.setTickInterval(!0);
- }), this.getMargins()), this.drawChartBox(), this.hasCartesianSeries ? pt(J) : tt && tt.length && pt(tt), this.seriesGroup || (this.seriesGroup = ot.g("series-group").attr({ zIndex: 3 }).add()), this.renderSeries(), this.renderLabels(), this.addCredits(), this.setResponsive && this.setResponsive(), this.hasRendered = !0;
- }, at.prototype.addCredits = function(J) {
- var tt = this, ot = q(!0, this.options.credits, J);
- ot.enabled && !this.credits && (this.credits = this.renderer.text(ot.text + (this.mapCredits || ""), 0, 0).addClass("highcharts-credits").on("click", function() {
- ot.href && (c.location.href = ot.href);
- }).attr({ align: ot.position.align, zIndex: 8 }), tt.styledMode || this.credits.css(ot.style), this.credits.add().align(ot.position), this.credits.update = function(lt) {
- tt.credits = tt.credits.destroy(), tt.addCredits(lt);
- });
- }, at.prototype.destroy = function() {
- var J = this, tt = J.axes, ot = J.series, lt = J.container, pt = lt && lt.parentNode, yt;
- for ($(J, "destroy"), J.renderer.forExport ? g(l, J) : l[J.index] = void 0, H.chartCount--, J.renderTo.removeAttribute("data-highcharts-chart"), ct(J), yt = tt.length; yt--; )
- tt[yt] = tt[yt].destroy();
- for (this.scroller && this.scroller.destroy && this.scroller.destroy(), yt = ot.length; yt--; )
- ot[yt] = ot[yt].destroy();
- "title subtitle chartBackground plotBackground plotBGImage plotBorder seriesGroup clipRect credits pointer rangeSelector legend resetZoomButton tooltip renderer".split(" ").forEach(function(vt) {
- var Mt = J[vt];
- Mt && Mt.destroy && (J[vt] = Mt.destroy());
- }), lt && (lt.innerHTML = O.emptyHTML, ct(lt), pt && X(lt)), it(J, function(vt, Mt) {
- delete J[Mt];
- });
- }, at.prototype.firstRender = function() {
- var J = this, tt = J.options;
- (!J.isReadyToRender || J.isReadyToRender()) && (J.getContainer(), J.resetMargins(), J.setChartSize(), J.propFromSeries(), J.getAxes(), (A(tt.series) ? tt.series : []).forEach(function(ot) {
- J.initSeries(ot);
- }), J.linkSeries(), J.setSeriesData(), $(J, "beforeRender"), B && (G.isRequired() ? J.pointer = new G(J, tt) : J.pointer = new B(J, tt)), J.render(), J.pointer.getChartPosition(), !J.renderer.imgCount && !J.hasLoaded && J.onload(), J.temporaryDisplay(!0));
- }, at.prototype.onload = function() {
- this.callbacks.concat([this.callback]).forEach(function(J) {
- J && typeof this.index < "u" && J.apply(this, [this]);
- }, this), $(this, "load"), $(this, "render"), E(this.index) && this.setReflow(this.options.chart.reflow), this.hasLoaded = !0;
- }, at.prototype.addSeries = function(J, tt, ot) {
- var lt = this, pt;
- return J && (tt = et(tt, !0), $(lt, "addSeries", { options: J }, function() {
- pt = lt.initSeries(J), lt.isDirtyLegend = !0, lt.linkSeries(), pt.enabledDataSorting && pt.setData(J.data, !1), $(lt, "afterAddSeries", { series: pt }), tt && lt.redraw(ot);
- })), pt;
- }, at.prototype.addAxis = function(J, tt, ot, lt) {
- return this.createAxis(tt ? "xAxis" : "yAxis", { axis: J, redraw: ot, animation: lt });
- }, at.prototype.addColorAxis = function(J, tt, ot) {
- return this.createAxis(
- "colorAxis",
- { axis: J, redraw: tt, animation: ot }
- );
- }, at.prototype.createAxis = function(J, tt) {
- return J = new N(this, q(tt.axis, { index: this[J].length, isX: J === "xAxis" })), et(tt.redraw, !0) && this.redraw(tt.animation), J;
- }, at.prototype.showLoading = function(J) {
- var tt = this, ot = tt.options, lt = ot.loading, pt = function() {
- yt && W(yt, { left: tt.plotLeft + "px", top: tt.plotTop + "px", width: tt.plotWidth + "px", height: tt.plotHeight + "px" });
- }, yt = tt.loadingDiv, vt = tt.loadingSpan;
- yt || (tt.loadingDiv = yt = I("div", { className: "highcharts-loading highcharts-loading-hidden" }, null, tt.container)), vt || (tt.loadingSpan = vt = I("span", { className: "highcharts-loading-inner" }, null, yt), n(tt, "redraw", pt)), yt.className = "highcharts-loading", O.setElementHTML(vt, et(J, ot.lang.loading, "")), tt.styledMode || (W(yt, L(lt.style, { zIndex: 10 })), W(vt, lt.labelStyle), tt.loadingShown || (W(yt, { opacity: 0, display: "" }), j(yt, { opacity: lt.style.opacity || 0.5 }, { duration: lt.showDuration || 0 }))), tt.loadingShown = !0, pt();
- }, at.prototype.hideLoading = function() {
- var J = this.options, tt = this.loadingDiv;
- tt && (tt.className = "highcharts-loading highcharts-loading-hidden", this.styledMode || j(tt, { opacity: 0 }, { duration: J.loading.hideDuration || 100, complete: function() {
- W(tt, { display: "none" });
- } })), this.loadingShown = !1;
- }, at.prototype.update = function(J, tt, ot, lt) {
- var pt = this, yt = { credits: "addCredits", title: "setTitle", subtitle: "setSubtitle", caption: "setCaption" }, vt = J.isResponsiveOptions, Mt = [], Pt, At;
- $(pt, "update", { options: J }), vt || pt.setResponsive(!1, !0), J = _(J, pt.options), pt.userOptions = q(pt.userOptions, J);
- var St = J.chart;
- if (St) {
- if (q(!0, pt.options.chart, St), "className" in St && pt.setClassName(St.className), "reflow" in St && pt.setReflow(St.reflow), "inverted" in St || "polar" in St || "type" in St) {
- pt.propFromSeries();
- var Dt = !0;
- }
- "alignTicks" in St && (Dt = !0), "events" in St && v(this, St), it(St, function(_t, Nt) {
- pt.propsRequireUpdateSeries.indexOf("chart." + Nt) !== -1 && (Pt = !0), pt.propsRequireDirtyBox.indexOf(Nt) !== -1 && (pt.isDirtyBox = !0), pt.propsRequireReflow.indexOf(Nt) !== -1 && (vt ? pt.isDirtyBox = !0 : At = !0);
- }), !pt.styledMode && St.style && pt.renderer.setStyle(pt.options.chart.style || {});
- }
- !pt.styledMode && J.colors && (this.options.colors = J.colors), J.time && (this.time === t && (this.time = new d(J.time)), q(
- !0,
- pt.options.time,
- J.time
- )), it(J, function(_t, Nt) {
- pt[Nt] && typeof pt[Nt].update == "function" ? pt[Nt].update(_t, !1) : typeof pt[yt[Nt]] == "function" ? pt[yt[Nt]](_t) : Nt !== "colors" && pt.collectionsWithUpdate.indexOf(Nt) === -1 && q(!0, pt.options[Nt], J[Nt]), Nt !== "chart" && pt.propsRequireUpdateSeries.indexOf(Nt) !== -1 && (Pt = !0);
- }), this.collectionsWithUpdate.forEach(function(_t) {
- if (J[_t]) {
- var Nt = [];
- pt[_t].forEach(function(Ot, Kt) {
- Ot.options.isInternal || Nt.push(et(Ot.options.index, Kt));
- }), gt(J[_t]).forEach(function(Ot, Kt) {
- var Gt = E(Ot.id), Wt;
- Gt && (Wt = pt.get(Ot.id)), !Wt && pt[_t] && (Wt = pt[_t][Nt ? Nt[Kt] : Kt]) && Gt && E(Wt.options.id) && (Wt = void 0), Wt && Wt.coll === _t && (Wt.update(Ot, !1), ot && (Wt.touched = !0)), !Wt && ot && pt.collectionsWithInit[_t] && (pt.collectionsWithInit[_t][0].apply(pt, [Ot].concat(pt.collectionsWithInit[_t][1] || []).concat([!1])).touched = !0);
- }), ot && pt[_t].forEach(function(Ot) {
- Ot.touched || Ot.options.isInternal ? delete Ot.touched : Mt.push(Ot);
- });
- }
- }), Mt.forEach(function(_t) {
- _t.chart && _t.remove && _t.remove(!1);
- }), Dt && pt.axes.forEach(function(_t) {
- _t.update({}, !1);
- }), Pt && pt.getSeriesOrderByLinks().forEach(function(_t) {
- _t.chart && _t.update({}, !1);
- }, this), Dt = St && St.width, St = St && (Z(St.height) ? rt(St.height, Dt || pt.chartWidth) : St.height), At || F(Dt) && Dt !== pt.chartWidth || F(St) && St !== pt.chartHeight ? pt.setSize(Dt, St, lt) : et(tt, !0) && pt.redraw(lt), $(pt, "afterUpdate", { options: J, redraw: tt, animation: lt });
- }, at.prototype.setSubtitle = function(J, tt) {
- this.applyDescription("subtitle", J), this.layOutTitles(tt);
- }, at.prototype.setCaption = function(J, tt) {
- this.applyDescription("caption", J), this.layOutTitles(tt);
- }, at.prototype.showResetZoom = function() {
- function J() {
- tt.zoomOut();
- }
- var tt = this, ot = a.lang, lt = tt.options.chart.resetZoomButton, pt = lt.theme, yt = pt.states, vt = lt.relativeTo === "chart" || lt.relativeTo === "spacingBox" ? null : "scrollablePlotBox";
- $(this, "beforeShowResetZoom", null, function() {
- tt.resetZoomButton = tt.renderer.button(ot.resetZoom, null, null, J, pt, yt && yt.hover).attr({ align: lt.position.align, title: ot.resetZoomTitle }).addClass("highcharts-reset-zoom").add().align(lt.position, !1, vt);
- }), $(this, "afterShowResetZoom");
- }, at.prototype.zoomOut = function() {
- $(this, "selection", { resetSelection: !0 }, this.zoom);
- }, at.prototype.zoom = function(J) {
- var tt = this, ot = tt.pointer, lt = tt.inverted ? ot.mouseDownX : ot.mouseDownY, pt = !1, yt;
- !J || J.resetSelection ? (tt.axes.forEach(function(Mt) {
- yt = Mt.zoom();
- }), ot.initiated = !1) : J.xAxis.concat(J.yAxis).forEach(function(Mt) {
- var Pt = Mt.axis, At = tt.inverted ? Pt.left : Pt.top, St = tt.inverted ? At + Pt.width : At + Pt.height, Dt = Pt.isXAxis, _t = !1;
- (!Dt && lt >= At && lt <= St || Dt || !E(lt)) && (_t = !0), ot[Dt ? "zoomX" : "zoomY"] && _t && (yt = Pt.zoom(Mt.min, Mt.max), Pt.displayBtn && (pt = !0));
- });
- var vt = tt.resetZoomButton;
- pt && !vt ? tt.showResetZoom() : !pt && Y(vt) && (tt.resetZoomButton = vt.destroy()), yt && tt.redraw(et(
- tt.options.chart.animation,
- J && J.animation,
- 100 > tt.pointCount
- ));
- }, at.prototype.pan = function(J, tt) {
- var ot = this, lt = ot.hoverPoints;
- tt = typeof tt == "object" ? tt : { enabled: tt, type: "x" };
- var pt = ot.options.chart, yt = ot.options.mapNavigation && ot.options.mapNavigation.enabled;
- pt && pt.panning && (pt.panning = tt);
- var vt = tt.type, Mt;
- $(this, "pan", { originalEvent: J }, function() {
- lt && lt.forEach(function(St) {
- St.setState();
- });
- var Pt = ot.xAxis;
- vt === "xy" ? Pt = Pt.concat(ot.yAxis) : vt === "y" && (Pt = ot.yAxis);
- var At = {};
- Pt.forEach(function(St) {
- if (St.options.panningEnabled && !St.options.isInternal) {
- var Dt = St.horiz, _t = J[Dt ? "chartX" : "chartY"];
- Dt = Dt ? "mouseDownX" : "mouseDownY";
- var Nt = ot[Dt], Ot = St.minPointOffset || 0, Kt = St.reversed && !ot.inverted || !St.reversed && ot.inverted ? -1 : 1, Gt = St.getExtremes(), Wt = St.toValue(Nt - _t, !0) + Ot * Kt, Jt = St.toValue(Nt + St.len - _t, !0) - (Ot * Kt || St.isXAxis && St.pointRangePadding || 0), be = Jt < Wt;
- Kt = St.hasVerticalPanning(), Nt = be ? Jt : Wt, Wt = be ? Wt : Jt;
- var Yt = St.panningState;
- !Kt || St.isXAxis || Yt && !Yt.isDirty || St.series.forEach(function(Vt) {
- var Ce = Vt.getProcessedData(!0);
- Ce = Vt.getExtremes(Ce.yData, !0), Yt || (Yt = { startMin: Number.MAX_VALUE, startMax: -Number.MAX_VALUE }), F(Ce.dataMin) && F(Ce.dataMax) && (Yt.startMin = Math.min(et(Vt.options.threshold, 1 / 0), Ce.dataMin, Yt.startMin), Yt.startMax = Math.max(et(Vt.options.threshold, -1 / 0), Ce.dataMax, Yt.startMax));
- }), Kt = Math.min(et(Yt && Yt.startMin, Gt.dataMin), Ot ? Gt.min : St.toValue(St.toPixels(Gt.min) - St.minPixelPadding)), Jt = Math.max(et(Yt && Yt.startMax, Gt.dataMax), Ot ? Gt.max : St.toValue(St.toPixels(Gt.max) + St.minPixelPadding)), St.panningState = Yt, St.isOrdinal || (Ot = Kt - Nt, 0 < Ot && (Wt += Ot, Nt = Kt), Ot = Wt - Jt, 0 < Ot && (Wt = Jt, Nt -= Ot), St.series.length && Nt !== Gt.min && Wt !== Gt.max && Nt >= Kt && Wt <= Jt && (St.setExtremes(
- Nt,
- Wt,
- !1,
- !1,
- { trigger: "pan" }
- ), ot.resetZoomButton || yt || Nt === Kt || Wt === Jt || !vt.match("y") || (ot.showResetZoom(), St.displayBtn = !1), Mt = !0), At[Dt] = _t);
- }
- }), it(At, function(St, Dt) {
- ot[Dt] = St;
- }), Mt && ot.redraw(!1), W(ot.container, { cursor: "move" });
- });
- }, at;
- }(), L(y.prototype, {
- callbacks: [],
- collectionsWithInit: { xAxis: [y.prototype.addAxis, [!0]], yAxis: [y.prototype.addAxis, [!1]], series: [y.prototype.addSeries] },
- collectionsWithUpdate: ["xAxis", "yAxis", "series"],
- propsRequireDirtyBox: "backgroundColor borderColor borderWidth borderRadius plotBackgroundColor plotBackgroundImage plotBorderColor plotBorderWidth plotShadow shadow".split(" "),
- propsRequireReflow: "margin marginTop marginRight marginBottom marginLeft spacing spacingTop spacingRight spacingBottom spacingLeft".split(" "),
- propsRequireUpdateSeries: "chart.inverted chart.polar chart.ignoreHiddenSeries chart.type colors plotOptions time tooltip".split(" ")
- }), y;
- }), M(o, "Core/Legend/LegendSymbol.js", [o["Core/Utilities.js"]], function(y) {
- var N = y.merge, D = y.pick, U;
- return function(H) {
- H.drawLineMarker = function(V) {
- var G = this.options, R = V.symbolWidth, B = V.symbolHeight, S = B / 2, x = this.chart.renderer, f = this.legendGroup;
- V = V.baseline - Math.round(0.3 * V.fontMetrics.b);
- var d = {}, T = G.marker;
- this.chart.styledMode || (d = { "stroke-width": G.lineWidth || 0 }, G.dashStyle && (d.dashstyle = G.dashStyle)), this.legendLine = x.path([["M", 0, V], ["L", R, V]]).addClass("highcharts-graph").attr(d).add(f), T && T.enabled !== !1 && R && (G = Math.min(D(T.radius, S), S), this.symbol.indexOf("url") === 0 && (T = N(T, { width: B, height: B }), G = 0), this.legendSymbol = R = x.symbol(this.symbol, R / 2 - G, V - G, 2 * G, 2 * G, T).addClass("highcharts-point").add(f), R.isMarker = !0);
- }, H.drawRectangle = function(V, G) {
- var R = V.symbolHeight, B = V.options.squareSymbol;
- G.legendSymbol = this.chart.renderer.rect(B ? (V.symbolWidth - R) / 2 : 0, V.baseline - R + 1, B ? R : V.symbolWidth, R, D(V.options.symbolRadius, R / 2)).addClass("highcharts-point").attr({ zIndex: 3 }).add(G.legendGroup);
- };
- }(U || (U = {})), U;
- }), M(o, "Core/Series/SeriesDefaults.js", [], function() {
- return { lineWidth: 2, allowPointSelect: !1, crisp: !0, showCheckbox: !1, animation: { duration: 1e3 }, events: {}, marker: { enabledThreshold: 2, lineColor: "#ffffff", lineWidth: 0, radius: 4, states: {
- normal: { animation: !0 },
- hover: { animation: { duration: 50 }, enabled: !0, radiusPlus: 2, lineWidthPlus: 1 },
- select: { fillColor: "#cccccc", lineColor: "#000000", lineWidth: 2 }
- } }, point: { events: {} }, dataLabels: { animation: {}, align: "center", defer: !0, formatter: function() {
- var y = this.series.chart.numberFormatter;
- return typeof this.y != "number" ? "" : y(this.y, -1);
- }, padding: 5, style: { fontSize: "11px", fontWeight: "bold", color: "contrast", textOutline: "1px contrast" }, verticalAlign: "bottom", x: 0, y: 0 }, cropThreshold: 300, opacity: 1, pointRange: 0, softThreshold: !0, states: {
- normal: { animation: !0 },
- hover: { animation: { duration: 50 }, lineWidthPlus: 1, marker: {}, halo: { size: 10, opacity: 0.25 } },
- select: { animation: { duration: 0 } },
- inactive: { animation: { duration: 50 }, opacity: 0.2 }
- }, stickyTracking: !0, turboThreshold: 1e3, findNearestPointBy: "x" };
- }), M(o, "Core/Series/Series.js", [
- o["Core/Animation/AnimationUtilities.js"],
- o["Core/DefaultOptions.js"],
- o["Core/Foundation.js"],
- o["Core/Globals.js"],
- o["Core/Legend/LegendSymbol.js"],
- o["Core/Series/Point.js"],
- o["Core/Series/SeriesDefaults.js"],
- o["Core/Series/SeriesRegistry.js"],
- o["Core/Renderer/SVG/SVGElement.js"],
- o["Core/Utilities.js"]
- ], function(y, N, D, U, H, V, G, R, B, S) {
- var x = y.animObject, f = y.setAnimation, d = N.defaultOptions, T = D.registerEventOptions, O = U.hasTouch, j = U.svg, k = U.win, b = R.seriesTypes, w = S.addEvent, v = S.arrayMax, l = S.arrayMin, h = S.clamp, u = S.cleanRecursively, i = S.correctFloat, c = S.defined, a = S.erase, t = S.error, s = S.extend, n = S.find, P = S.fireEvent, _ = S.getNestedProperty, I = S.isArray, W = S.isNumber, E = S.isString, X = S.merge, g = S.objectEach, m = S.pick, L = S.removeEvent, z = S.splat, $ = S.syncTimeout;
- return y = function() {
- function Q() {
- this.zones = this.yAxis = this.xAxis = this.userOptions = this.tooltipOptions = this.processedYData = this.processedXData = this.points = this.options = this.linkedSeries = this.index = this.eventsToUnbind = this.eventOptions = this.data = this.chart = this._i = void 0;
- }
- return Q.prototype.init = function(A, F) {
- P(this, "init", { options: F });
- var Y = this, Z = A.series;
- this.eventsToUnbind = [], Y.chart = A, Y.options = Y.setOptions(F), F = Y.options, Y.linkedSeries = [], Y.bindAxes(), s(Y, { name: F.name, state: "", visible: F.visible !== !1, selected: F.selected === !0 }), T(this, F);
- var q = F.events;
- (q && q.click || F.point && F.point.events && F.point.events.click || F.allowPointSelect) && (A.runTrackerClick = !0), Y.getColor(), Y.getSymbol(), Y.parallelArrays.forEach(function(et) {
- Y[et + "Data"] || (Y[et + "Data"] = []);
- }), Y.isCartesian && (A.hasCartesianSeries = !0);
- var it;
- Z.length && (it = Z[Z.length - 1]), Y._i = m(it && it._i, -1) + 1, Y.opacity = Y.options.opacity, A.orderSeries(this.insert(Z)), F.dataSorting && F.dataSorting.enabled ? Y.setDataSortingOptions() : Y.points || Y.data || Y.setData(F.data, !1), P(this, "afterInit");
- }, Q.prototype.is = function(A) {
- return b[A] && this instanceof b[A];
- }, Q.prototype.insert = function(A) {
- var F = this.options.index, Y;
- if (W(F)) {
- for (Y = A.length; Y--; )
- if (F >= m(A[Y].options.index, A[Y]._i)) {
- A.splice(Y + 1, 0, this);
- break;
- }
- Y === -1 && A.unshift(this), Y += 1;
- } else
- A.push(this);
- return m(Y, A.length - 1);
- }, Q.prototype.bindAxes = function() {
- var A = this, F = A.options, Y = A.chart, Z;
- P(this, "bindAxes", null, function() {
- (A.axisTypes || []).forEach(function(q) {
- var it = 0;
- Y[q].forEach(function(et) {
- Z = et.options, (F[q] === it && !Z.isInternal || typeof F[q] < "u" && F[q] === Z.id || typeof F[q] > "u" && Z.index === 0) && (A.insert(et.series), A[q] = et, et.isDirty = !0), Z.isInternal || it++;
- }), A[q] || A.optionalAxis === q || t(18, !0, Y);
- });
- }), P(this, "afterBindAxes");
- }, Q.prototype.updateParallelArrays = function(A, F) {
- var Y = A.series, Z = arguments, q = W(F) ? function(it) {
- var et = it === "y" && Y.toYData ? Y.toYData(A) : A[it];
- Y[it + "Data"][F] = et;
- } : function(it) {
- Array.prototype[F].apply(Y[it + "Data"], Array.prototype.slice.call(Z, 2));
- };
- Y.parallelArrays.forEach(q);
- }, Q.prototype.hasData = function() {
- return this.visible && typeof this.dataMax < "u" && typeof this.dataMin < "u" || this.visible && this.yData && 0 < this.yData.length;
- }, Q.prototype.autoIncrement = function(A) {
- var F = this.options, Y = F.pointIntervalUnit, Z = F.relativeXValue, q = this.chart.time, it = this.xIncrement, et;
- return it = m(it, F.pointStart, 0), this.pointInterval = et = m(this.pointInterval, F.pointInterval, 1), Z && W(A) && (et *= A), Y && (F = new q.Date(it), Y === "day" ? q.set("Date", F, q.get("Date", F) + et) : Y === "month" ? q.set("Month", F, q.get("Month", F) + et) : Y === "year" && q.set("FullYear", F, q.get("FullYear", F) + et), et = F.getTime() - it), Z && W(A) ? it + et : (this.xIncrement = it + et, it);
- }, Q.prototype.setDataSortingOptions = function() {
- var A = this.options;
- s(this, { requireSorting: !1, sorted: !1, enabledDataSorting: !0, allowDG: !1 }), c(A.pointRange) || (A.pointRange = 1);
- }, Q.prototype.setOptions = function(A) {
- var F = this.chart, Y = F.options, Z = Y.plotOptions, q = F.userOptions || {};
- A = X(A), F = F.styledMode;
- var it = { plotOptions: Z, userOptions: A };
- P(this, "setOptions", it);
- var et = it.plotOptions[this.type], nt = q.plotOptions || {};
- return this.userOptions = it.userOptions, q = X(et, Z.series, q.plotOptions && q.plotOptions[this.type], A), this.tooltipOptions = X(d.tooltip, d.plotOptions.series && d.plotOptions.series.tooltip, d.plotOptions[this.type].tooltip, Y.tooltip.userOptions, Z.series && Z.series.tooltip, Z[this.type].tooltip, A.tooltip), this.stickyTracking = m(A.stickyTracking, nt[this.type] && nt[this.type].stickyTracking, nt.series && nt.series.stickyTracking, this.tooltipOptions.shared && !this.noSharedTooltip ? !0 : q.stickyTracking), et.marker === null && delete q.marker, this.zoneAxis = q.zoneAxis, Z = this.zones = (q.zones || []).slice(), !q.negativeColor && !q.negativeFillColor || q.zones || (Y = { value: q[this.zoneAxis + "Threshold"] || q.threshold || 0, className: "highcharts-negative" }, F || (Y.color = q.negativeColor, Y.fillColor = q.negativeFillColor), Z.push(Y)), Z.length && c(Z[Z.length - 1].value) && Z.push(F ? {} : { color: this.color, fillColor: this.fillColor }), P(this, "afterSetOptions", { options: q }), q;
- }, Q.prototype.getName = function() {
- return m(this.options.name, "Series " + (this.index + 1));
- }, Q.prototype.getCyclic = function(A, F, Y) {
- var Z = this.chart, q = this.userOptions, it = A + "Index", et = A + "Counter", nt = Y ? Y.length : m(Z.options.chart[A + "Count"], Z[A + "Count"]);
- if (!F) {
- var rt = m(q[it], q["_" + it]);
- c(rt) || (Z.series.length || (Z[et] = 0), q["_" + it] = rt = Z[et] % nt, Z[et] += 1), Y && (F = Y[rt]);
- }
- typeof rt < "u" && (this[it] = rt), this[A] = F;
- }, Q.prototype.getColor = function() {
- this.chart.styledMode ? this.getCyclic("color") : this.options.colorByPoint ? this.color = "#cccccc" : this.getCyclic("color", this.options.color || d.plotOptions[this.type].color, this.chart.options.colors);
- }, Q.prototype.getPointsCollection = function() {
- return (this.hasGroupedData ? this.points : this.data) || [];
- }, Q.prototype.getSymbol = function() {
- this.getCyclic("symbol", this.options.marker.symbol, this.chart.options.symbols);
- }, Q.prototype.findPointIndex = function(A, F) {
- var Y = A.id, Z = A.x, q = this.points, it = this.options.dataSorting, et, nt;
- if (Y)
- it = this.chart.get(Y), it instanceof V && (et = it);
- else if ((this.linkedParent || this.enabledDataSorting || this.options.relativeXValue) && (et = function(ct) {
- return !ct.touched && ct.index === A.index;
- }, it && it.matchByName ? et = function(ct) {
- return !ct.touched && ct.name === A.name;
- } : this.options.relativeXValue && (et = function(ct) {
- return !ct.touched && ct.options.x === A.x;
- }), et = n(q, et), !et))
- return;
- if (et) {
- var rt = et && et.index;
- typeof rt < "u" && (nt = !0);
- }
- return typeof rt > "u" && W(Z) && (rt = this.xData.indexOf(Z, F)), rt !== -1 && typeof rt < "u" && this.cropped && (rt = rt >= this.cropStart ? rt - this.cropStart : rt), !nt && W(rt) && q[rt] && q[rt].touched && (rt = void 0), rt;
- }, Q.prototype.updateData = function(A, F) {
- var Y = this.options, Z = Y.dataSorting, q = this.points, it = [], et = this.requireSorting, nt = A.length === q.length, rt, ct, gt, dt = !0;
- if (this.xIncrement = null, A.forEach(function(ht, at) {
- var J = c(ht) && this.pointClass.prototype.optionsToObject.call({ series: this }, ht) || {}, tt = J.x;
- J.id || W(tt) ? (J = this.findPointIndex(J, gt), J === -1 || typeof J > "u" ? it.push(ht) : q[J] && ht !== Y.data[J] ? (q[J].update(ht, !1, null, !1), q[J].touched = !0, et && (gt = J + 1)) : q[J] && (q[J].touched = !0), (!nt || at !== J || Z && Z.enabled || this.hasDerivedData) && (rt = !0)) : it.push(ht);
- }, this), rt)
- for (A = q.length; A--; )
- (ct = q[A]) && !ct.touched && ct.remove && ct.remove(!1, F);
- else
- !nt || Z && Z.enabled ? dt = !1 : (A.forEach(function(ht, at) {
- ht !== q[at].y && q[at].update && q[at].update(
- ht,
- !1,
- null,
- !1
- );
- }), it.length = 0);
- return q.forEach(function(ht) {
- ht && (ht.touched = !1);
- }), dt ? (it.forEach(function(ht) {
- this.addPoint(ht, !1, null, null, !1);
- }, this), this.xIncrement === null && this.xData && this.xData.length && (this.xIncrement = v(this.xData), this.autoIncrement()), !0) : !1;
- }, Q.prototype.setData = function(A, F, Y, Z) {
- var q = this, it = q.points, et = it && it.length || 0, nt = q.options, rt = q.chart, ct = nt.dataSorting, gt = q.xAxis, dt = nt.turboThreshold, ht = this.xData, at = this.yData, J = q.pointArrayMap;
- J = J && J.length;
- var tt = nt.keys, ot, lt = 0, pt = 1, yt = null;
- A = A || [];
- var vt = A.length;
- if (F = m(F, !0), ct && ct.enabled && (A = this.sortData(A)), Z !== !1 && vt && et && !q.cropped && !q.hasGroupedData && q.visible && !q.isSeriesBoosting && (ot = this.updateData(A, Y)), !ot) {
- if (q.xIncrement = null, q.colorCounter = 0, this.parallelArrays.forEach(function(Mt) {
- q[Mt + "Data"].length = 0;
- }), dt && vt > dt)
- if (yt = q.getFirstValidPoint(A), W(yt))
- for (Y = 0; Y < vt; Y++)
- ht[Y] = this.autoIncrement(), at[Y] = A[Y];
- else if (I(yt))
- if (J)
- if (yt.length === J)
- for (Y = 0; Y < vt; Y++)
- ht[Y] = this.autoIncrement(), at[Y] = A[Y];
- else
- for (Y = 0; Y < vt; Y++)
- Z = A[Y], ht[Y] = Z[0], at[Y] = Z.slice(
- 1,
- J + 1
- );
- else if (tt && (lt = tt.indexOf("x"), pt = tt.indexOf("y"), lt = 0 <= lt ? lt : 0, pt = 0 <= pt ? pt : 1), yt.length === 1 && (pt = 0), lt === pt)
- for (Y = 0; Y < vt; Y++)
- ht[Y] = this.autoIncrement(), at[Y] = A[Y][pt];
- else
- for (Y = 0; Y < vt; Y++)
- Z = A[Y], ht[Y] = Z[lt], at[Y] = Z[pt];
- else
- t(12, !1, rt);
- else
- for (Y = 0; Y < vt; Y++)
- typeof A[Y] < "u" && (Z = { series: q }, q.pointClass.prototype.applyOptions.apply(Z, [A[Y]]), q.updateParallelArrays(Z, Y));
- for (at && E(at[0]) && t(14, !0, rt), q.data = [], q.options.data = q.userOptions.data = A, Y = et; Y--; )
- it[Y] && it[Y].destroy && it[Y].destroy();
- gt && (gt.minRange = gt.userMinRange), q.isDirty = rt.isDirtyBox = !0, q.isDirtyData = !!it, Y = !1;
- }
- nt.legendType === "point" && (this.processData(), this.generatePoints()), F && rt.redraw(Y);
- }, Q.prototype.sortData = function(A) {
- var F = this, Y = F.options.dataSorting.sortKey || "y", Z = function(q, it) {
- return c(it) && q.pointClass.prototype.optionsToObject.call({ series: q }, it) || {};
- };
- return A.forEach(function(q, it) {
- A[it] = Z(F, q), A[it].index = it;
- }, this), A.concat().sort(function(q, it) {
- return q = _(Y, q), it = _(Y, it), it < q ? -1 : it > q ? 1 : 0;
- }).forEach(function(q, it) {
- q.x = it;
- }, this), F.linkedSeries && F.linkedSeries.forEach(function(q) {
- var it = q.options, et = it.data;
- it.dataSorting && it.dataSorting.enabled || !et || (et.forEach(function(nt, rt) {
- et[rt] = Z(q, nt), A[rt] && (et[rt].x = A[rt].x, et[rt].index = rt);
- }), q.setData(et, !1));
- }), A;
- }, Q.prototype.getProcessedData = function(A) {
- var F = this.xAxis, Y = this.options, Z = Y.cropThreshold, q = A || this.getExtremesFromAll || Y.getExtremesFromAll, it = this.isCartesian;
- A = F && F.val2lin, Y = !(!F || !F.logarithmic);
- var et = 0, nt = this.xData, rt = this.yData, ct = this.requireSorting, gt = !1, dt = nt.length;
- if (F) {
- gt = F.getExtremes();
- var ht = gt.min, at = gt.max;
- gt = F.categories && !F.names.length;
- }
- if (it && this.sorted && !q && (!Z || dt > Z || this.forceCrop)) {
- if (nt[dt - 1] < ht || nt[0] > at)
- nt = [], rt = [];
- else if (this.yData && (nt[0] < ht || nt[dt - 1] > at)) {
- var J = this.cropData(this.xData, this.yData, ht, at);
- nt = J.xData, rt = J.yData, et = J.start, J = !0;
- }
- }
- for (Z = nt.length || 1; --Z; )
- if (F = Y ? A(nt[Z]) - A(nt[Z - 1]) : nt[Z] - nt[Z - 1], 0 < F && (typeof tt > "u" || F < tt))
- var tt = F;
- else
- 0 > F && ct && !gt && (t(15, !1, this.chart), ct = !1);
- return { xData: nt, yData: rt, cropped: J, cropStart: et, closestPointRange: tt };
- }, Q.prototype.processData = function(A) {
- var F = this.xAxis;
- if (this.isCartesian && !this.isDirty && !F.isDirty && !this.yAxis.isDirty && !A)
- return !1;
- A = this.getProcessedData(), this.cropped = A.cropped, this.cropStart = A.cropStart, this.processedXData = A.xData, this.processedYData = A.yData, this.closestPointRange = this.basePointRange = A.closestPointRange, P(this, "afterProcessData");
- }, Q.prototype.cropData = function(A, F, Y, Z, q) {
- var it = A.length, et, nt = 0, rt = it;
- for (q = m(q, this.cropShoulder), et = 0; et < it; et++)
- if (A[et] >= Y) {
- nt = Math.max(0, et - q);
- break;
- }
- for (Y = et; Y < it; Y++)
- if (A[Y] > Z) {
- rt = Y + q;
- break;
- }
- return { xData: A.slice(nt, rt), yData: F.slice(
- nt,
- rt
- ), start: nt, end: rt };
- }, Q.prototype.generatePoints = function() {
- var A = this.options, F = A.data, Y = this.processedXData, Z = this.processedYData, q = this.pointClass, it = Y.length, et = this.cropStart || 0, nt = this.hasGroupedData, rt = A.keys, ct = [];
- A = A.dataGrouping && A.dataGrouping.groupAll ? et : 0;
- var gt, dt, ht = this.data;
- if (!ht && !nt) {
- var at = [];
- at.length = F.length, ht = this.data = at;
- }
- for (rt && nt && (this.options.keys = !1), dt = 0; dt < it; dt++) {
- if (at = et + dt, nt) {
- var J = new q().init(this, [Y[dt]].concat(z(Z[dt])));
- J.dataGroup = this.groupMap[A + dt], J.dataGroup.options && (J.options = J.dataGroup.options, s(J, J.dataGroup.options), delete J.dataLabels);
- } else
- (J = ht[at]) || typeof F[at] > "u" || (ht[at] = J = new q().init(this, F[at], Y[dt]));
- J && (J.index = nt ? A + dt : at, ct[dt] = J);
- }
- if (this.options.keys = rt, ht && (it !== (gt = ht.length) || nt))
- for (dt = 0; dt < gt; dt++)
- dt !== et || nt || (dt += it), ht[dt] && (ht[dt].destroyElements(), ht[dt].plotX = void 0);
- this.data = ht, this.points = ct, P(this, "afterGeneratePoints");
- }, Q.prototype.getXExtremes = function(A) {
- return { min: l(A), max: v(A) };
- }, Q.prototype.getExtremes = function(A, F) {
- var Y = this.xAxis, Z = this.yAxis, q = this.processedXData || this.xData, it = [], et = this.requireSorting ? this.cropShoulder : 0;
- Z = Z ? Z.positiveValuesOnly : !1;
- var nt, rt = 0, ct = 0, gt = 0;
- A = A || this.stackedYData || this.processedYData || [];
- var dt = A.length;
- if (Y) {
- var ht = Y.getExtremes();
- rt = ht.min, ct = ht.max;
- }
- for (nt = 0; nt < dt; nt++) {
- var at = q[nt];
- ht = A[nt];
- var J = (W(ht) || I(ht)) && (ht.length || 0 < ht || !Z);
- if (at = F || this.getExtremesFromAll || this.options.getExtremesFromAll || this.cropped || !Y || (q[nt + et] || at) >= rt && (q[nt - et] || at) <= ct, J && at)
- if (J = ht.length)
- for (; J--; )
- W(ht[J]) && (it[gt++] = ht[J]);
- else
- it[gt++] = ht;
- }
- return A = { activeYData: it, dataMin: l(it), dataMax: v(it) }, P(this, "afterGetExtremes", { dataExtremes: A }), A;
- }, Q.prototype.applyExtremes = function() {
- var A = this.getExtremes();
- return this.dataMin = A.dataMin, this.dataMax = A.dataMax, A;
- }, Q.prototype.getFirstValidPoint = function(A) {
- for (var F = A.length, Y = 0, Z = null; Z === null && Y < F; )
- Z = A[Y], Y++;
- return Z;
- }, Q.prototype.translate = function() {
- this.processedXData || this.processData(), this.generatePoints();
- var A = this.options, F = A.stacking, Y = this.xAxis, Z = Y.categories, q = this.enabledDataSorting, it = this.yAxis, et = this.points, nt = et.length, rt = this.pointPlacementToXValue(), ct = !!rt, gt = A.threshold, dt = A.startFromThreshold ? gt : 0, ht = this.zoneAxis || "y", at, J, tt = Number.MAX_VALUE;
- for (at = 0; at < nt; at++) {
- var ot = et[at], lt = ot.x, pt = void 0, yt = void 0, vt = ot.y, Mt = ot.low, Pt = F && it.stacking && it.stacking.stacks[(this.negStacks && vt < (dt ? 0 : gt) ? "-" : "") + this.stackKey];
- if ((it.positiveValuesOnly && !it.validatePositiveValue(vt) || Y.positiveValuesOnly && !Y.validatePositiveValue(lt)) && (ot.isNull = !0), ot.plotX = J = i(h(Y.translate(lt, 0, 0, 0, 1, rt, this.type === "flags"), -1e5, 1e5)), F && this.visible && Pt && Pt[lt]) {
- var At = this.getStackIndicator(
- At,
- lt,
- this.index
- );
- ot.isNull || (pt = Pt[lt], yt = pt.points[At.key]);
- }
- if (I(yt) && (Mt = yt[0], vt = yt[1], Mt === dt && At.key === Pt[lt].base && (Mt = m(W(gt) && gt, it.min)), it.positiveValuesOnly && 0 >= Mt && (Mt = null), ot.total = ot.stackTotal = pt.total, ot.percentage = pt.total && ot.y / pt.total * 100, ot.stackY = vt, this.irregularWidths || pt.setOffset(this.pointXOffset || 0, this.barW || 0)), ot.yBottom = c(Mt) ? h(it.translate(Mt, 0, 1, 0, 1), -1e5, 1e5) : null, this.dataModify && (vt = this.dataModify.modifyValue(vt, at)), ot.plotY = void 0, W(vt) && (pt = it.translate(vt, !1, !0, !1, !0), typeof pt < "u" && (ot.plotY = h(
- pt,
- -1e5,
- 1e5
- ))), ot.isInside = this.isPointInside(ot), ot.clientX = ct ? i(Y.translate(lt, 0, 0, 0, 1, rt)) : J, ot.negative = ot[ht] < (A[ht + "Threshold"] || gt || 0), ot.category = Z && typeof Z[ot.x] < "u" ? Z[ot.x] : ot.x, !ot.isNull && ot.visible !== !1) {
- typeof St < "u" && (tt = Math.min(tt, Math.abs(J - St)));
- var St = J;
- }
- ot.zone = this.zones.length ? ot.getZone() : void 0, !ot.graphic && this.group && q && (ot.isNew = !0);
- }
- this.closestPointRangePx = tt, P(this, "afterTranslate");
- }, Q.prototype.getValidPoints = function(A, F, Y) {
- var Z = this.chart;
- return (A || this.points || []).filter(function(q) {
- return F && !Z.isInsidePlot(q.plotX, q.plotY, { inverted: Z.inverted }) ? !1 : q.visible !== !1 && (Y || !q.isNull);
- });
- }, Q.prototype.getClipBox = function() {
- var A = this.chart, F = this.xAxis, Y = this.yAxis, Z = X(A.clipBox);
- return F && F.len !== A.plotSizeX && (Z.width = F.len), Y && Y.len !== A.plotSizeY && (Z.height = Y.len), Z;
- }, Q.prototype.getSharedClipKey = function() {
- return this.sharedClipKey = (this.options.xAxis || 0) + "," + (this.options.yAxis || 0);
- }, Q.prototype.setClip = function() {
- var A = this.chart, F = this.group, Y = this.markerGroup, Z = A.sharedClips;
- A = A.renderer;
- var q = this.getClipBox(), it = this.getSharedClipKey(), et = Z[it];
- et ? et.animate(q) : Z[it] = et = A.clipRect(q), F && F.clip(this.options.clip === !1 ? void 0 : et), Y && Y.clip();
- }, Q.prototype.animate = function(A) {
- var F = this.chart, Y = this.group, Z = this.markerGroup, q = F.inverted, it = x(this.options.animation), et = [this.getSharedClipKey(), it.duration, it.easing, it.defer].join(), nt = F.sharedClips[et], rt = F.sharedClips[et + "m"];
- if (A && Y)
- it = this.getClipBox(), nt ? nt.attr("height", it.height) : (it.width = 0, q && (it.x = F.plotHeight), nt = F.renderer.clipRect(it), F.sharedClips[et] = nt, rt = F.renderer.clipRect({ x: q ? (F.plotSizeX || 0) + 99 : -99, y: q ? -F.plotLeft : -F.plotTop, width: 99, height: q ? F.chartWidth : F.chartHeight }), F.sharedClips[et + "m"] = rt), Y.clip(nt), Z && Z.clip(rt);
- else if (nt && !nt.hasClass("highcharts-animating")) {
- F = this.getClipBox();
- var ct = it.step;
- Z && Z.element.childNodes.length && (it.step = function(gt, dt) {
- ct && ct.apply(dt, arguments), rt && rt.element && rt.attr(dt.prop, dt.prop === "width" ? gt + 99 : gt);
- }), nt.addClass("highcharts-animating").animate(F, it);
- }
- }, Q.prototype.afterAnimate = function() {
- var A = this;
- this.setClip(), g(
- this.chart.sharedClips,
- function(F, Y, Z) {
- F && !A.chart.container.querySelector('[clip-path="url(#' + F.id + ')"]') && (F.destroy(), delete Z[Y]);
- }
- ), this.finishedAnimating = !0, P(this, "afterAnimate");
- }, Q.prototype.drawPoints = function() {
- var A = this.points, F = this.chart, Y = this.options.marker, Z = this[this.specialGroup] || this.markerGroup, q = this.xAxis, it = m(Y.enabled, !q || q.isRadial ? !0 : null, this.closestPointRangePx >= Y.enabledThreshold * Y.radius), et, nt;
- if (Y.enabled !== !1 || this._hasPointMarkers)
- for (et = 0; et < A.length; et++) {
- var rt = A[et], ct = (nt = rt.graphic) ? "animate" : "attr", gt = rt.marker || {}, dt = !!rt.marker;
- if ((it && typeof gt.enabled > "u" || gt.enabled) && !rt.isNull && rt.visible !== !1) {
- var ht = m(gt.symbol, this.symbol, "rect"), at = this.markerAttribs(rt, rt.selected && "select");
- this.enabledDataSorting && (rt.startXPos = q.reversed ? -(at.width || 0) : q.width);
- var J = rt.isInside !== !1;
- nt ? nt[J ? "show" : "hide"](J).animate(at) : J && (0 < (at.width || 0) || rt.hasImage) && (rt.graphic = nt = F.renderer.symbol(ht, at.x, at.y, at.width, at.height, dt ? gt : Y).add(Z), this.enabledDataSorting && F.hasRendered && (nt.attr({ x: rt.startXPos }), ct = "animate")), nt && ct === "animate" && nt[J ? "show" : "hide"](J).animate(at), nt && !F.styledMode && nt[ct](this.pointAttribs(rt, rt.selected && "select")), nt && nt.addClass(rt.getClassName(), !0);
- } else
- nt && (rt.graphic = nt.destroy());
- }
- }, Q.prototype.markerAttribs = function(A, F) {
- var Y = this.options, Z = Y.marker, q = A.marker || {}, it = q.symbol || Z.symbol, et = m(q.radius, Z.radius);
- return F && (Z = Z.states[F], F = q.states && q.states[F], et = m(F && F.radius, Z && Z.radius, et + (Z && Z.radiusPlus || 0))), A.hasImage = it && it.indexOf("url") === 0, A.hasImage && (et = 0), A = { x: Y.crisp ? Math.floor(A.plotX - et) : A.plotX - et, y: A.plotY - et }, et && (A.width = A.height = 2 * et), A;
- }, Q.prototype.pointAttribs = function(A, F) {
- var Y = this.options.marker, Z = A && A.options, q = Z && Z.marker || {}, it = Z && Z.color, et = A && A.color, nt = A && A.zone && A.zone.color, rt = this.color;
- return A = m(q.lineWidth, Y.lineWidth), Z = 1, rt = it || nt || et || rt, it = q.fillColor || Y.fillColor || rt, et = q.lineColor || Y.lineColor || rt, F = F || "normal", Y = Y.states[F] || {}, F = q.states && q.states[F] || {}, A = m(F.lineWidth, Y.lineWidth, A + m(F.lineWidthPlus, Y.lineWidthPlus, 0)), it = F.fillColor || Y.fillColor || it, et = F.lineColor || Y.lineColor || et, Z = m(F.opacity, Y.opacity, Z), { stroke: et, "stroke-width": A, fill: it, opacity: Z };
- }, Q.prototype.destroy = function(A) {
- var F = this, Y = F.chart, Z = /AppleWebKit\/533/.test(k.navigator.userAgent), q = F.data || [], it, et, nt, rt;
- for (P(F, "destroy"), this.removeEvents(A), (F.axisTypes || []).forEach(function(ct) {
- (rt = F[ct]) && rt.series && (a(rt.series, F), rt.isDirty = rt.forceRedraw = !0);
- }), F.legendItem && F.chart.legend.destroyItem(F), et = q.length; et--; )
- (nt = q[et]) && nt.destroy && nt.destroy();
- F.clips && F.clips.forEach(function(ct) {
- return ct.destroy();
- }), S.clearTimeout(F.animationTimeout), g(F, function(ct, gt) {
- ct instanceof B && !ct.survive && (it = Z && gt === "group" ? "hide" : "destroy", ct[it]());
- }), Y.hoverSeries === F && (Y.hoverSeries = void 0), a(Y.series, F), Y.orderSeries(), g(F, function(ct, gt) {
- A && gt === "hcEvents" || delete F[gt];
- });
- }, Q.prototype.applyZones = function() {
- var A = this, F = this.chart, Y = F.renderer, Z = this.zones, q = this.clips || [], it = this.graph, et = this.area, nt = Math.max(F.chartWidth, F.chartHeight), rt = this[(this.zoneAxis || "y") + "Axis"], ct = F.inverted, gt, dt, ht, at, J, tt, ot, lt, pt = !1;
- if (Z.length && (it || et) && rt && typeof rt.min < "u") {
- var yt = rt.reversed, vt = rt.horiz;
- it && !this.showLine && it.hide(), et && et.hide();
- var Mt = rt.getExtremes();
- Z.forEach(function(Pt, At) {
- gt = yt ? vt ? F.plotWidth : 0 : vt ? 0 : rt.toPixels(Mt.min) || 0, gt = h(m(dt, gt), 0, nt), dt = h(Math.round(rt.toPixels(m(Pt.value, Mt.max), !0) || 0), 0, nt), pt && (gt = dt = rt.toPixels(Mt.max)), at = Math.abs(gt - dt), J = Math.min(gt, dt), tt = Math.max(gt, dt), rt.isXAxis ? (ht = { x: ct ? tt : J, y: 0, width: at, height: nt }, vt || (ht.x = F.plotHeight - ht.x)) : (ht = { x: 0, y: ct ? tt : J, width: nt, height: at }, vt && (ht.y = F.plotWidth - ht.y)), ct && Y.isVML && (ht = rt.isXAxis ? {
- x: 0,
- y: yt ? J : tt,
- height: ht.width,
- width: F.chartWidth
- } : { x: ht.y - F.plotLeft - F.spacingBox.x, y: 0, width: ht.height, height: F.chartHeight }), q[At] ? q[At].animate(ht) : q[At] = Y.clipRect(ht), ot = A["zone-area-" + At], lt = A["zone-graph-" + At], it && lt && lt.clip(q[At]), et && ot && ot.clip(q[At]), pt = Pt.value > Mt.max, A.resetZones && dt === 0 && (dt = void 0);
- }), this.clips = q;
- } else
- A.visible && (it && it.show(!0), et && et.show(!0));
- }, Q.prototype.invertGroups = function(A) {
- function F() {
- ["group", "markerGroup"].forEach(function(q) {
- Y[q] && (Z.renderer.isVML && Y[q].attr({ width: Y.yAxis.len, height: Y.xAxis.len }), Y[q].width = Y.yAxis.len, Y[q].height = Y.xAxis.len, Y[q].invert(Y.isRadialSeries ? !1 : A));
- });
- }
- var Y = this, Z = Y.chart;
- Y.xAxis && (Y.eventsToUnbind.push(w(Z, "resize", F)), F(), Y.invertGroups = F);
- }, Q.prototype.plotGroup = function(A, F, Y, Z, q) {
- var it = this[A], et = !it;
- return Y = { visibility: Y, zIndex: Z || 0.1 }, typeof this.opacity > "u" || this.chart.styledMode || this.state === "inactive" || (Y.opacity = this.opacity), et && (this[A] = it = this.chart.renderer.g().add(q)), it.addClass("highcharts-" + F + " highcharts-series-" + this.index + " highcharts-" + this.type + "-series " + (c(this.colorIndex) ? "highcharts-color-" + this.colorIndex + " " : "") + (this.options.className || "") + (it.hasClass("highcharts-tracker") ? " highcharts-tracker" : ""), !0), it.attr(Y)[et ? "attr" : "animate"](this.getPlotBox()), it;
- }, Q.prototype.getPlotBox = function() {
- var A = this.chart, F = this.xAxis, Y = this.yAxis;
- return A.inverted && (F = Y, Y = this.xAxis), { translateX: F ? F.left : A.plotLeft, translateY: Y ? Y.top : A.plotTop, scaleX: 1, scaleY: 1 };
- }, Q.prototype.removeEvents = function(A) {
- A || L(this), this.eventsToUnbind.length && (this.eventsToUnbind.forEach(function(F) {
- F();
- }), this.eventsToUnbind.length = 0);
- }, Q.prototype.render = function() {
- var A = this, F = A.chart, Y = A.options, Z = x(Y.animation), q = A.visible ? "inherit" : "hidden", it = Y.zIndex, et = A.hasRendered, nt = F.seriesGroup, rt = F.inverted;
- F = !A.finishedAnimating && F.renderer.isSVG ? Z.duration : 0, P(this, "render");
- var ct = A.plotGroup("group", "series", q, it, nt);
- A.markerGroup = A.plotGroup("markerGroup", "markers", q, it, nt), Y.clip !== !1 && A.setClip(), A.animate && F && A.animate(!0), ct.inverted = m(A.invertible, A.isCartesian) ? rt : !1, A.drawGraph && (A.drawGraph(), A.applyZones()), A.visible && A.drawPoints(), A.drawDataLabels && A.drawDataLabels(), A.redrawPoints && A.redrawPoints(), A.drawTracker && A.options.enableMouseTracking !== !1 && A.drawTracker(), A.invertGroups(rt), A.animate && F && A.animate(), et || (F && Z.defer && (F += Z.defer), A.animationTimeout = $(function() {
- A.afterAnimate();
- }, F || 0)), A.isDirty = !1, A.hasRendered = !0, P(A, "afterRender");
- }, Q.prototype.redraw = function() {
- var A = this.chart, F = this.isDirty || this.isDirtyData, Y = this.group, Z = this.xAxis, q = this.yAxis;
- Y && (A.inverted && Y.attr({
- width: A.plotWidth,
- height: A.plotHeight
- }), Y.animate({ translateX: m(Z && Z.left, A.plotLeft), translateY: m(q && q.top, A.plotTop) })), this.translate(), this.render(), F && delete this.kdTree;
- }, Q.prototype.searchPoint = function(A, F) {
- var Y = this.xAxis, Z = this.yAxis, q = this.chart.inverted;
- return this.searchKDTree({ clientX: q ? Y.len - A.chartY + Y.pos : A.chartX - Y.pos, plotY: q ? Z.len - A.chartX + Z.pos : A.chartY - Z.pos }, F, A);
- }, Q.prototype.buildKDTree = function(A) {
- function F(q, it, et) {
- var nt = q && q.length;
- if (nt) {
- var rt = Y.kdAxisArray[it % et];
- return q.sort(function(ct, gt) {
- return ct[rt] - gt[rt];
- }), nt = Math.floor(nt / 2), { point: q[nt], left: F(q.slice(0, nt), it + 1, et), right: F(q.slice(nt + 1), it + 1, et) };
- }
- }
- this.buildingKdTree = !0;
- var Y = this, Z = -1 < Y.options.findNearestPointBy.indexOf("y") ? 2 : 1;
- delete Y.kdTree, $(function() {
- Y.kdTree = F(Y.getValidPoints(null, !Y.directTouch), Z, Z), Y.buildingKdTree = !1;
- }, Y.options.kdNow || A && A.type === "touchstart" ? 0 : 1);
- }, Q.prototype.searchKDTree = function(A, F, Y) {
- function Z(rt, ct, gt, dt) {
- var ht = ct.point, at = q.kdAxisArray[gt % dt], J = ht, tt = c(rt[it]) && c(ht[it]) ? Math.pow(rt[it] - ht[it], 2) : null, ot = c(rt[et]) && c(ht[et]) ? Math.pow(rt[et] - ht[et], 2) : null;
- return ot = (tt || 0) + (ot || 0), ht.dist = c(ot) ? Math.sqrt(ot) : Number.MAX_VALUE, ht.distX = c(tt) ? Math.sqrt(tt) : Number.MAX_VALUE, at = rt[at] - ht[at], ot = 0 > at ? "left" : "right", tt = 0 > at ? "right" : "left", ct[ot] && (ot = Z(rt, ct[ot], gt + 1, dt), J = ot[nt] < J[nt] ? ot : ht), ct[tt] && Math.sqrt(at * at) < J[nt] && (rt = Z(rt, ct[tt], gt + 1, dt), J = rt[nt] < J[nt] ? rt : J), J;
- }
- var q = this, it = this.kdAxisArray[0], et = this.kdAxisArray[1], nt = F ? "distX" : "dist";
- if (F = -1 < q.options.findNearestPointBy.indexOf("y") ? 2 : 1, this.kdTree || this.buildingKdTree || this.buildKDTree(Y), this.kdTree)
- return Z(
- A,
- this.kdTree,
- F,
- F
- );
- }, Q.prototype.pointPlacementToXValue = function() {
- var A = this.options, F = A.pointRange, Y = this.xAxis;
- return A = A.pointPlacement, A === "between" && (A = Y.reversed ? -0.5 : 0.5), W(A) ? A * (F || Y.pointRange) : 0;
- }, Q.prototype.isPointInside = function(A) {
- var F = this.chart, Y = this.xAxis, Z = this.yAxis;
- return typeof A.plotY < "u" && typeof A.plotX < "u" && 0 <= A.plotY && A.plotY <= (Z ? Z.len : F.plotHeight) && 0 <= A.plotX && A.plotX <= (Y ? Y.len : F.plotWidth);
- }, Q.prototype.drawTracker = function() {
- var A = this, F = A.options, Y = F.trackByArea, Z = [].concat(Y ? A.areaPath : A.graphPath), q = A.chart, it = q.pointer, et = q.renderer, nt = q.options.tooltip.snap, rt = A.tracker, ct = function(dt) {
- q.hoverSeries !== A && A.onMouseOver();
- }, gt = "rgba(192,192,192," + (j ? 1e-4 : 2e-3) + ")";
- rt ? rt.attr({ d: Z }) : A.graph && (A.tracker = et.path(Z).attr({ visibility: A.visible ? "visible" : "hidden", zIndex: 2 }).addClass(Y ? "highcharts-tracker-area" : "highcharts-tracker-line").add(A.group), q.styledMode || A.tracker.attr({ "stroke-linecap": "round", "stroke-linejoin": "round", stroke: gt, fill: Y ? gt : "none", "stroke-width": A.graph.strokeWidth() + (Y ? 0 : 2 * nt) }), [A.tracker, A.markerGroup, A.dataLabelsGroup].forEach(function(dt) {
- dt && (dt.addClass("highcharts-tracker").on("mouseover", ct).on("mouseout", function(ht) {
- it.onTrackerMouseOut(ht);
- }), F.cursor && !q.styledMode && dt.css({ cursor: F.cursor }), O) && dt.on("touchstart", ct);
- })), P(this, "afterDrawTracker");
- }, Q.prototype.addPoint = function(A, F, Y, Z, q) {
- var it = this.options, et = this.data, nt = this.chart, rt = this.xAxis;
- rt = rt && rt.hasNames && rt.names;
- var ct = it.data, gt = this.xData, dt;
- F = m(F, !0);
- var ht = { series: this };
- this.pointClass.prototype.applyOptions.apply(
- ht,
- [A]
- );
- var at = ht.x, J = gt.length;
- if (this.requireSorting && at < gt[J - 1])
- for (dt = !0; J && gt[J - 1] > at; )
- J--;
- this.updateParallelArrays(ht, "splice", J, 0, 0), this.updateParallelArrays(ht, J), rt && ht.name && (rt[at] = ht.name), ct.splice(J, 0, A), dt && (this.data.splice(J, 0, null), this.processData()), it.legendType === "point" && this.generatePoints(), Y && (et[0] && et[0].remove ? et[0].remove(!1) : (et.shift(), this.updateParallelArrays(ht, "shift"), ct.shift())), q !== !1 && P(this, "addPoint", { point: ht }), this.isDirtyData = this.isDirty = !0, F && nt.redraw(Z);
- }, Q.prototype.removePoint = function(A, F, Y) {
- var Z = this, q = Z.data, it = q[A], et = Z.points, nt = Z.chart, rt = function() {
- et && et.length === q.length && et.splice(A, 1), q.splice(A, 1), Z.options.data.splice(A, 1), Z.updateParallelArrays(it || { series: Z }, "splice", A, 1), it && it.destroy(), Z.isDirty = !0, Z.isDirtyData = !0, F && nt.redraw();
- };
- f(Y, nt), F = m(F, !0), it ? it.firePointEvent("remove", null, rt) : rt();
- }, Q.prototype.remove = function(A, F, Y, Z) {
- function q() {
- it.destroy(Z), et.isDirtyLegend = et.isDirtyBox = !0, et.linkSeries(), m(A, !0) && et.redraw(F);
- }
- var it = this, et = it.chart;
- Y !== !1 ? P(
- it,
- "remove",
- null,
- q
- ) : q();
- }, Q.prototype.update = function(A, F) {
- A = u(A, this.userOptions), P(this, "update", { options: A });
- var Y = this, Z = Y.chart, q = Y.userOptions, it = Y.initialType || Y.type, et = Z.options.plotOptions, nt = b[it].prototype, rt = Y.finishedAnimating && { animation: !1 }, ct = {}, gt, dt = ["eventOptions", "navigatorSeries", "baseSeries"], ht = A.type || q.type || Z.options.chart.type, at = !(this.hasDerivedData || ht && ht !== this.type || typeof A.pointStart < "u" || typeof A.pointInterval < "u" || typeof A.relativeXValue < "u" || Y.hasOptionChanged("dataGrouping") || Y.hasOptionChanged("pointStart") || Y.hasOptionChanged("pointInterval") || Y.hasOptionChanged("pointIntervalUnit") || Y.hasOptionChanged("keys"));
- if (ht = ht || it, at && (dt.push("data", "isDirtyData", "points", "processedXData", "processedYData", "xIncrement", "cropped", "_hasPointMarkers", "_hasPointLabels", "clips", "nodes", "layout", "mapMap", "mapData", "minY", "maxY", "minX", "maxX"), A.visible !== !1 && dt.push("area", "graph"), Y.parallelArrays.forEach(function(tt) {
- dt.push(tt + "Data");
- }), A.data && (A.dataSorting && s(Y.options.dataSorting, A.dataSorting), this.setData(A.data, !1))), A = X(q, rt, { index: typeof q.index > "u" ? Y.index : q.index, pointStart: m(et && et.series && et.series.pointStart, q.pointStart, Y.xData[0]) }, !at && { data: Y.options.data }, A), at && A.data && (A.data = Y.options.data), dt = ["group", "markerGroup", "dataLabelsGroup", "transformGroup"].concat(dt), dt.forEach(function(tt) {
- dt[tt] = Y[tt], delete Y[tt];
- }), et = !1, b[ht]) {
- if (et = ht !== Y.type, Y.remove(!1, !1, !1, !0), et)
- if (Object.setPrototypeOf)
- Object.setPrototypeOf(Y, b[ht].prototype);
- else {
- rt = Object.hasOwnProperty.call(Y, "hcEvents") && Y.hcEvents;
- for (gt in nt)
- Y[gt] = void 0;
- s(Y, b[ht].prototype), rt ? Y.hcEvents = rt : delete Y.hcEvents;
- }
- } else
- t(17, !0, Z, { missingModuleFor: ht });
- if (dt.forEach(function(tt) {
- Y[tt] = dt[tt];
- }), Y.init(Z, A), at && this.points) {
- var J = Y.options;
- J.visible === !1 ? (ct.graphic = 1, ct.dataLabel = 1) : Y._hasPointLabels || (A = J.marker, nt = J.dataLabels, !A || A.enabled !== !1 && (q.marker && q.marker.symbol) === A.symbol || (ct.graphic = 1), nt && nt.enabled === !1 && (ct.dataLabel = 1)), this.points.forEach(function(tt) {
- tt && tt.series && (tt.resolveColor(), Object.keys(ct).length && tt.destroyElements(ct), J.showInLegend === !1 && tt.legendItem && Z.legend.destroyItem(tt));
- }, this);
- }
- Y.initialType = it, Z.linkSeries(), et && Y.linkedSeries.length && (Y.isDirtyData = !0), P(this, "afterUpdate"), m(F, !0) && Z.redraw(at ? void 0 : !1);
- }, Q.prototype.setName = function(A) {
- this.name = this.options.name = this.userOptions.name = A, this.chart.isDirtyLegend = !0;
- }, Q.prototype.hasOptionChanged = function(A) {
- var F = this.options[A], Y = this.chart.options.plotOptions, Z = this.userOptions[A];
- return Z ? F !== Z : F !== m(
- Y && Y[this.type] && Y[this.type][A],
- Y && Y.series && Y.series[A],
- F
- );
- }, Q.prototype.onMouseOver = function() {
- var A = this.chart, F = A.hoverSeries;
- A.pointer.setHoverChartIndex(), F && F !== this && F.onMouseOut(), this.options.events.mouseOver && P(this, "mouseOver"), this.setState("hover"), A.hoverSeries = this;
- }, Q.prototype.onMouseOut = function() {
- var A = this.options, F = this.chart, Y = F.tooltip, Z = F.hoverPoint;
- F.hoverSeries = null, Z && Z.onMouseOut(), this && A.events.mouseOut && P(this, "mouseOut"), !Y || this.stickyTracking || Y.shared && !this.noSharedTooltip || Y.hide(), F.series.forEach(function(q) {
- q.setState(
- "",
- !0
- );
- });
- }, Q.prototype.setState = function(A, F) {
- var Y = this, Z = Y.options, q = Y.graph, it = Z.inactiveOtherPoints, et = Z.states, nt = m(et[A || "normal"] && et[A || "normal"].animation, Y.chart.options.chart.animation), rt = Z.lineWidth, ct = 0, gt = Z.opacity;
- if (A = A || "", Y.state !== A && ([Y.group, Y.markerGroup, Y.dataLabelsGroup].forEach(function(dt) {
- dt && (Y.state && dt.removeClass("highcharts-series-" + Y.state), A && dt.addClass("highcharts-series-" + A));
- }), Y.state = A, !Y.chart.styledMode)) {
- if (et[A] && et[A].enabled === !1)
- return;
- if (A && (rt = et[A].lineWidth || rt + (et[A].lineWidthPlus || 0), gt = m(et[A].opacity, gt)), q && !q.dashstyle)
- for (Z = { "stroke-width": rt }, q.animate(Z, nt); Y["zone-graph-" + ct]; )
- Y["zone-graph-" + ct].animate(Z, nt), ct += 1;
- it || [Y.group, Y.markerGroup, Y.dataLabelsGroup, Y.labelBySeries].forEach(function(dt) {
- dt && dt.animate({ opacity: gt }, nt);
- });
- }
- F && it && Y.points && Y.setAllPointsToState(A || void 0);
- }, Q.prototype.setAllPointsToState = function(A) {
- this.points.forEach(function(F) {
- F.setState && F.setState(A);
- });
- }, Q.prototype.setVisible = function(A, F) {
- var Y = this, Z = Y.chart, q = Y.legendItem, it = Z.options.chart.ignoreHiddenSeries, et = Y.visible, nt = (Y.visible = A = Y.options.visible = Y.userOptions.visible = typeof A > "u" ? !et : A) ? "show" : "hide";
- ["group", "dataLabelsGroup", "markerGroup", "tracker", "tt"].forEach(function(rt) {
- Y[rt] && Y[rt][nt]();
- }), (Z.hoverSeries === Y || (Z.hoverPoint && Z.hoverPoint.series) === Y) && Y.onMouseOut(), q && Z.legend.colorizeItem(Y, A), Y.isDirty = !0, Y.options.stacking && Z.series.forEach(function(rt) {
- rt.options.stacking && rt.visible && (rt.isDirty = !0);
- }), Y.linkedSeries.forEach(function(rt) {
- rt.setVisible(A, !1);
- }), it && (Z.isDirtyBox = !0), P(Y, nt), F !== !1 && Z.redraw();
- }, Q.prototype.show = function() {
- this.setVisible(!0);
- }, Q.prototype.hide = function() {
- this.setVisible(!1);
- }, Q.prototype.select = function(A) {
- this.selected = A = this.options.selected = typeof A > "u" ? !this.selected : A, this.checkbox && (this.checkbox.checked = A), P(this, A ? "select" : "unselect");
- }, Q.prototype.shouldShowTooltip = function(A, F, Y) {
- return Y === void 0 && (Y = {}), Y.series = this, Y.visiblePlotOnly = !0, this.chart.isInsidePlot(A, F, Y);
- }, Q.defaultOptions = G, Q;
- }(), s(y.prototype, { axisTypes: [
- "xAxis",
- "yAxis"
- ], coll: "series", colorCounter: 0, cropShoulder: 1, directTouch: !1, drawLegendSymbol: H.drawLineMarker, isCartesian: !0, kdAxisArray: ["clientX", "plotY"], parallelArrays: ["x", "y"], pointClass: V, requireSorting: !0, sorted: !0 }), R.series = y, y;
- }), M(o, "Extensions/ScrollablePlotArea.js", [o["Core/Animation/AnimationUtilities.js"], o["Core/Axis/Axis.js"], o["Core/Chart/Chart.js"], o["Core/Series/Series.js"], o["Core/Renderer/RendererRegistry.js"], o["Core/Utilities.js"]], function(y, N, D, U, H, V) {
- var G = y.stop, R = V.addEvent, B = V.createElement, S = V.merge, x = V.pick;
- R(D, "afterSetChartSize", function(f) {
- var d = this.options.chart.scrollablePlotArea, T = d && d.minWidth;
- if (d = d && d.minHeight, !this.renderer.forExport) {
- if (T) {
- if (this.scrollablePixelsX = T = Math.max(0, T - this.chartWidth)) {
- this.scrollablePlotBox = this.renderer.scrollablePlotBox = S(this.plotBox), this.plotBox.width = this.plotWidth += T, this.inverted ? this.clipBox.height += T : this.clipBox.width += T;
- var O = { 1: { name: "right", value: T } };
- }
- } else
- d && (this.scrollablePixelsY = T = Math.max(
- 0,
- d - this.chartHeight
- )) && (this.scrollablePlotBox = this.renderer.scrollablePlotBox = S(this.plotBox), this.plotBox.height = this.plotHeight += T, this.inverted ? this.clipBox.width += T : this.clipBox.height += T, O = { 2: { name: "bottom", value: T } });
- O && !f.skipAxes && this.axes.forEach(function(j) {
- O[j.side] ? j.getPlotLinePath = function() {
- var k = O[j.side].name, b = this[k];
- this[k] = b - O[j.side].value;
- var w = N.prototype.getPlotLinePath.apply(this, arguments);
- return this[k] = b, w;
- } : (j.setAxisSize(), j.setAxisTranslation());
- });
- }
- }), R(D, "render", function() {
- this.scrollablePixelsX || this.scrollablePixelsY ? (this.setUpScrolling && this.setUpScrolling(), this.applyFixed()) : this.fixedDiv && this.applyFixed();
- }), D.prototype.setUpScrolling = function() {
- var f = this, d = { WebkitOverflowScrolling: "touch", overflowX: "hidden", overflowY: "hidden" };
- this.scrollablePixelsX && (d.overflowX = "auto"), this.scrollablePixelsY && (d.overflowY = "auto"), this.scrollingParent = B("div", { className: "highcharts-scrolling-parent" }, { position: "relative" }, this.renderTo), this.scrollingContainer = B(
- "div",
- { className: "highcharts-scrolling" },
- d,
- this.scrollingParent
- ), R(this.scrollingContainer, "scroll", function() {
- f.pointer && delete f.pointer.chartPosition;
- }), this.innerContainer = B("div", { className: "highcharts-inner-container" }, null, this.scrollingContainer), this.innerContainer.appendChild(this.container), this.setUpScrolling = null;
- }, D.prototype.moveFixedElements = function() {
- var f = this.container, d = this.fixedRenderer, T = ".highcharts-contextbutton .highcharts-credits .highcharts-legend .highcharts-legend-checkbox .highcharts-navigator-series .highcharts-navigator-xaxis .highcharts-navigator-yaxis .highcharts-navigator .highcharts-reset-zoom .highcharts-drillup-button .highcharts-scrollbar .highcharts-subtitle .highcharts-title".split(" "), O;
- this.scrollablePixelsX && !this.inverted ? O = ".highcharts-yaxis" : this.scrollablePixelsX && this.inverted || this.scrollablePixelsY && !this.inverted ? O = ".highcharts-xaxis" : this.scrollablePixelsY && this.inverted && (O = ".highcharts-yaxis"), O && T.push(O + ":not(.highcharts-radial-axis)", O + "-labels:not(.highcharts-radial-axis-labels)"), T.forEach(function(j) {
- [].forEach.call(f.querySelectorAll(j), function(k) {
- (k.namespaceURI === d.SVG_NS ? d.box : d.box.parentNode).appendChild(k), k.style.pointerEvents = "auto";
- });
- });
- }, D.prototype.applyFixed = function() {
- var f = !this.fixedDiv, d = this.options.chart, T = d.scrollablePlotArea, O = H.getRendererType();
- f ? (this.fixedDiv = B("div", { className: "highcharts-fixed" }, { position: "absolute", overflow: "hidden", pointerEvents: "none", zIndex: (d.style && d.style.zIndex || 0) + 2, top: 0 }, null, !0), this.scrollingContainer && this.scrollingContainer.parentNode.insertBefore(this.fixedDiv, this.scrollingContainer), this.renderTo.style.overflow = "visible", this.fixedRenderer = d = new O(
- this.fixedDiv,
- this.chartWidth,
- this.chartHeight,
- this.options.chart.style
- ), this.scrollableMask = d.path().attr({ fill: this.options.chart.backgroundColor || "#fff", "fill-opacity": x(T.opacity, 0.85), zIndex: -1 }).addClass("highcharts-scrollable-mask").add(), R(this, "afterShowResetZoom", this.moveFixedElements), R(this, "afterDrilldown", this.moveFixedElements), R(this, "afterLayOutTitles", this.moveFixedElements)) : this.fixedRenderer.setSize(this.chartWidth, this.chartHeight), (this.scrollableDirty || f) && (this.scrollableDirty = !1, this.moveFixedElements()), d = this.chartWidth + (this.scrollablePixelsX || 0), O = this.chartHeight + (this.scrollablePixelsY || 0), G(this.container), this.container.style.width = d + "px", this.container.style.height = O + "px", this.renderer.boxWrapper.attr({ width: d, height: O, viewBox: [0, 0, d, O].join(" ") }), this.chartBackground.attr({ width: d, height: O }), this.scrollingContainer.style.height = this.chartHeight + "px", f && (T.scrollPositionX && (this.scrollingContainer.scrollLeft = this.scrollablePixelsX * T.scrollPositionX), T.scrollPositionY && (this.scrollingContainer.scrollTop = this.scrollablePixelsY * T.scrollPositionY)), O = this.axisOffset, f = this.plotTop - O[0] - 1, T = this.plotLeft - O[3] - 1, d = this.plotTop + this.plotHeight + O[2] + 1, O = this.plotLeft + this.plotWidth + O[1] + 1;
- var j = this.plotLeft + this.plotWidth - (this.scrollablePixelsX || 0), k = this.plotTop + this.plotHeight - (this.scrollablePixelsY || 0);
- f = this.scrollablePixelsX ? [["M", 0, f], ["L", this.plotLeft - 1, f], ["L", this.plotLeft - 1, d], ["L", 0, d], ["Z"], ["M", j, f], ["L", this.chartWidth, f], ["L", this.chartWidth, d], ["L", j, d], ["Z"]] : this.scrollablePixelsY ? [["M", T, 0], ["L", T, this.plotTop - 1], ["L", O, this.plotTop - 1], ["L", O, 0], ["Z"], ["M", T, k], ["L", T, this.chartHeight], ["L", O, this.chartHeight], ["L", O, k], ["Z"]] : [["M", 0, 0]], this.redrawTrigger !== "adjustHeight" && this.scrollableMask.attr({ d: f });
- }, R(N, "afterInit", function() {
- this.chart.scrollableDirty = !0;
- }), R(U, "show", function() {
- this.chart.scrollableDirty = !0;
- });
- }), M(o, "Core/Axis/StackingAxis.js", [o["Core/Animation/AnimationUtilities.js"], o["Core/Axis/Axis.js"], o["Core/Utilities.js"]], function(y, N, D) {
- var U = y.getDeferredAnimation, H = D.addEvent, V = D.destroyObjectProperties, G = D.fireEvent, R = D.isNumber, B = D.objectEach, S;
- return function(x) {
- function f() {
- var j = this.stacking;
- if (j) {
- var k = j.stacks;
- B(k, function(b, w) {
- V(b), k[w] = null;
- }), j && j.stackTotalGroup && j.stackTotalGroup.destroy();
- }
- }
- function d() {
- this.stacking || (this.stacking = new O(this));
- }
- var T = [];
- x.compose = function(j) {
- return T.indexOf(j) === -1 && (T.push(j), H(j, "init", d), H(j, "destroy", f)), j;
- };
- var O = function() {
- function j(k) {
- this.oldStacks = {}, this.stacks = {}, this.stacksTouched = 0, this.axis = k;
- }
- return j.prototype.buildStacks = function() {
- var k = this.axis, b = k.series, w = k.options.reversedStacks, v = b.length, l;
- if (!k.isXAxis) {
- for (this.usePercentage = !1, l = v; l--; ) {
- var h = b[w ? l : v - l - 1];
- h.setStackedPoints(), h.setGroupedPoints();
- }
- for (l = 0; l < v; l++)
- b[l].modifyStacks();
- G(k, "afterBuildStacks");
- }
- }, j.prototype.cleanStacks = function() {
- if (!this.axis.isXAxis) {
- if (this.oldStacks)
- var k = this.stacks = this.oldStacks;
- B(k, function(b) {
- B(b, function(w) {
- w.cumulative = w.total;
- });
- });
- }
- }, j.prototype.resetStacks = function() {
- var k = this, b = k.stacks;
- k.axis.isXAxis || B(b, function(w) {
- B(
- w,
- function(v, l) {
- R(v.touched) && v.touched < k.stacksTouched ? (v.destroy(), delete w[l]) : (v.total = null, v.cumulative = null);
- }
- );
- });
- }, j.prototype.renderStackTotals = function() {
- var k = this.axis, b = k.chart, w = b.renderer, v = this.stacks;
- k = U(b, k.options.stackLabels && k.options.stackLabels.animation || !1);
- var l = this.stackTotalGroup = this.stackTotalGroup || w.g("stack-labels").attr({ visibility: "visible", zIndex: 6, opacity: 0 }).add();
- l.translate(b.plotLeft, b.plotTop), B(v, function(h) {
- B(h, function(u) {
- u.render(l);
- });
- }), l.animate(
- { opacity: 1 },
- k
- );
- }, j;
- }();
- x.Additions = O;
- }(S || (S = {})), S;
- }), M(o, "Extensions/Stacking.js", [o["Core/Axis/Axis.js"], o["Core/Chart/Chart.js"], o["Core/FormatUtilities.js"], o["Core/Globals.js"], o["Core/Series/Series.js"], o["Core/Axis/StackingAxis.js"], o["Core/Utilities.js"]], function(y, N, D, U, H, V, G) {
- var R = D.format, B = G.correctFloat, S = G.defined, x = G.destroyObjectProperties, f = G.isArray, d = G.isNumber, T = G.objectEach, O = G.pick, j = function() {
- function k(b, w, v, l, h) {
- var u = b.chart.inverted;
- this.axis = b, this.isNegative = v, this.options = w = w || {}, this.x = l, this.total = null, this.points = {}, this.hasValidPoints = !1, this.stack = h, this.rightCliff = this.leftCliff = 0, this.alignOptions = { align: w.align || (u ? v ? "left" : "right" : "center"), verticalAlign: w.verticalAlign || (u ? "middle" : v ? "bottom" : "top"), y: w.y, x: w.x }, this.textAlign = w.textAlign || (u ? v ? "right" : "left" : "center");
- }
- return k.prototype.destroy = function() {
- x(this, this.axis);
- }, k.prototype.render = function(b) {
- var w = this.axis.chart, v = this.options, l = v.format;
- l = l ? R(l, this, w) : v.formatter.call(this), this.label ? this.label.attr({
- text: l,
- visibility: "hidden"
- }) : (this.label = w.renderer.label(l, null, null, v.shape, null, null, v.useHTML, !1, "stack-labels"), l = { r: v.borderRadius || 0, text: l, rotation: v.rotation, padding: O(v.padding, 5), visibility: "hidden" }, w.styledMode || (l.fill = v.backgroundColor, l.stroke = v.borderColor, l["stroke-width"] = v.borderWidth, this.label.css(v.style)), this.label.attr(l), this.label.added || this.label.add(b)), this.label.labelrank = w.plotSizeY;
- }, k.prototype.setOffset = function(b, w, v, l, h) {
- var u = this.axis, i = u.chart;
- l = u.translate(u.stacking.usePercentage ? 100 : l || this.total, 0, 0, 0, 1), v = u.translate(v || 0), v = S(l) && Math.abs(l - v), b = O(h, i.xAxis[0].translate(this.x)) + b, u = S(l) && this.getStackBox(i, this, b, l, w, v, u), w = this.label, v = this.isNegative, b = O(this.options.overflow, "justify") === "justify";
- var c = this.textAlign;
- w && u && (h = w.getBBox(), l = w.padding, c = c === "left" ? i.inverted ? -l : l : c === "right" ? h.width : i.inverted && c === "center" ? h.width / 2 : i.inverted ? v ? h.width + l : -l : h.width / 2, v = i.inverted ? h.height / 2 : v ? -l : h.height, this.alignOptions.x = O(this.options.x, 0), this.alignOptions.y = O(this.options.y, 0), u.x -= c, u.y -= v, w.align(this.alignOptions, null, u), i.isInsidePlot(w.alignAttr.x + c - this.alignOptions.x, w.alignAttr.y + v - this.alignOptions.y) ? w.show() : (w.alignAttr.y = -9999, b = !1), b && H.prototype.justifyDataLabel.call(this.axis, w, this.alignOptions, w.alignAttr, h, u), w.attr({ x: w.alignAttr.x, y: w.alignAttr.y }), O(!b && this.options.crop, !0) && ((i = d(w.x) && d(w.y) && i.isInsidePlot(w.x - l + w.width, w.y) && i.isInsidePlot(w.x + l, w.y)) || w.hide()));
- }, k.prototype.getStackBox = function(b, w, v, l, h, u, i) {
- var c = w.axis.reversed, a = b.inverted, t = i.height + i.pos - (a ? b.plotLeft : b.plotTop);
- return w = w.isNegative && !c || !w.isNegative && c, { x: a ? w ? l - i.right : l - u + i.pos - b.plotLeft : v + b.xAxis[0].transB - b.plotLeft, y: a ? i.height - v - h : w ? t - l - u : t - l, width: a ? u : h, height: a ? h : u };
- }, k;
- }();
- return N.prototype.getStacks = function() {
- var k = this, b = k.inverted;
- k.yAxis.forEach(function(w) {
- w.stacking && w.stacking.stacks && w.hasVisibleSeries && (w.stacking.oldStacks = w.stacking.stacks);
- }), k.series.forEach(function(w) {
- var v = w.xAxis && w.xAxis.options || {};
- !w.options.stacking || w.visible !== !0 && k.options.chart.ignoreHiddenSeries !== !1 || (w.stackKey = [w.type, O(w.options.stack, ""), b ? v.top : v.left, b ? v.height : v.width].join());
- });
- }, V.compose(y), H.prototype.setGroupedPoints = function() {
- var k = this.yAxis.stacking;
- this.options.centerInCategory && (this.is("column") || this.is("columnrange")) && !this.options.stacking && 1 < this.chart.series.length ? H.prototype.setStackedPoints.call(this, "group") : k && T(k.stacks, function(b, w) {
- w.slice(-5) === "group" && (T(b, function(v) {
- return v.destroy();
- }), delete k.stacks[w]);
- });
- }, H.prototype.setStackedPoints = function(k) {
- var b = k || this.options.stacking;
- if (b && (this.visible === !0 || this.chart.options.chart.ignoreHiddenSeries === !1)) {
- var w = this.processedXData, v = this.processedYData, l = [], h = v.length, u = this.options, i = u.threshold, c = O(u.startFromThreshold && i, 0);
- u = u.stack, k = k ? this.type + "," + b : this.stackKey;
- var a = "-" + k, t = this.negStacks, s = this.yAxis, n = s.stacking.stacks, P = s.stacking.oldStacks, _, I;
- for (s.stacking.stacksTouched += 1, I = 0; I < h; I++) {
- var W = w[I], E = v[I], X = this.getStackIndicator(
- X,
- W,
- this.index
- ), g = X.key, m = (_ = t && E < (c ? 0 : i)) ? a : k;
- n[m] || (n[m] = {}), n[m][W] || (P[m] && P[m][W] ? (n[m][W] = P[m][W], n[m][W].total = null) : n[m][W] = new j(s, s.options.stackLabels, _, W, u)), m = n[m][W], E !== null ? (m.points[g] = m.points[this.index] = [O(m.cumulative, c)], S(m.cumulative) || (m.base = g), m.touched = s.stacking.stacksTouched, 0 < X.index && this.singleStacks === !1 && (m.points[g][0] = m.points[this.index + "," + W + ",0"][0])) : m.points[g] = m.points[this.index] = null, b === "percent" ? (_ = _ ? k : a, t && n[_] && n[_][W] ? (_ = n[_][W], m.total = _.total = Math.max(_.total, m.total) + Math.abs(E) || 0) : m.total = B(m.total + (Math.abs(E) || 0))) : b === "group" ? (f(E) && (E = E[0]), E !== null && (m.total = (m.total || 0) + 1)) : m.total = B(m.total + (E || 0)), m.cumulative = b === "group" ? (m.total || 1) - 1 : O(m.cumulative, c) + (E || 0), E !== null && (m.points[g].push(m.cumulative), l[I] = m.cumulative, m.hasValidPoints = !0);
- }
- b === "percent" && (s.stacking.usePercentage = !0), b !== "group" && (this.stackedYData = l), s.stacking.oldStacks = {};
- }
- }, H.prototype.modifyStacks = function() {
- var k = this, b = k.stackKey, w = k.yAxis.stacking.stacks, v = k.processedXData, l, h = k.options.stacking;
- k[h + "Stacker"] && [b, "-" + b].forEach(function(u) {
- for (var i = v.length, c, a; i--; )
- c = v[i], l = k.getStackIndicator(l, c, k.index, u), (a = (c = w[u] && w[u][c]) && c.points[l.key]) && k[h + "Stacker"](a, c, i);
- });
- }, H.prototype.percentStacker = function(k, b, w) {
- b = b.total ? 100 / b.total : 0, k[0] = B(k[0] * b), k[1] = B(k[1] * b), this.stackedYData[w] = k[1];
- }, H.prototype.getStackIndicator = function(k, b, w, v) {
- return !S(k) || k.x !== b || v && k.key !== v ? k = { x: b, index: 0, key: v } : k.index++, k.key = [w, b, k.index].join(), k;
- }, U.StackItem = j, U.StackItem;
- }), M(o, "Series/Line/LineSeries.js", [o["Core/Series/Series.js"], o["Core/Series/SeriesRegistry.js"], o["Core/Utilities.js"]], function(y, N, D) {
- var U = this && this.__extends || function() {
- var G = function(R, B) {
- return G = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(S, x) {
- S.__proto__ = x;
- } || function(S, x) {
- for (var f in x)
- x.hasOwnProperty(f) && (S[f] = x[f]);
- }, G(R, B);
- };
- return function(R, B) {
- function S() {
- this.constructor = R;
- }
- G(R, B), R.prototype = B === null ? Object.create(B) : (S.prototype = B.prototype, new S());
- };
- }(), H = D.defined, V = D.merge;
- return D = function(G) {
- function R() {
- var B = G !== null && G.apply(this, arguments) || this;
- return B.data = void 0, B.options = void 0, B.points = void 0, B;
- }
- return U(R, G), R.prototype.drawGraph = function() {
- var B = this, S = this.options, x = (this.gappedPath || this.getGraphPath).call(this), f = this.chart.styledMode, d = [["graph", "highcharts-graph"]];
- f || d[0].push(S.lineColor || this.color || "#cccccc", S.dashStyle), d = B.getZonesGraphs(d), d.forEach(function(T, O) {
- var j = T[0], k = B[j], b = k ? "animate" : "attr";
- k ? (k.endX = B.preventGraphAnimation ? null : x.xMap, k.animate({ d: x })) : x.length && (B[j] = k = B.chart.renderer.path(x).addClass(T[1]).attr({ zIndex: 1 }).add(B.group)), k && !f && (j = { stroke: T[2], "stroke-width": S.lineWidth, fill: B.fillGraph && B.color || "none" }, T[3] ? j.dashstyle = T[3] : S.linecap !== "square" && (j["stroke-linecap"] = j["stroke-linejoin"] = "round"), k[b](j).shadow(2 > O && S.shadow)), k && (k.startX = x.xMap, k.isArea = x.isArea);
- });
- }, R.prototype.getGraphPath = function(B, S, x) {
- var f = this, d = f.options, T = [], O = [], j, k = d.step;
- B = B || f.points;
- var b = B.reversed;
- return b && B.reverse(), (k = { right: 1, center: 2 }[k] || k && 3) && b && (k = 4 - k), B = this.getValidPoints(B, !1, !(d.connectNulls && !S && !x)), B.forEach(function(w, v) {
- var l = w.plotX, h = w.plotY, u = B[v - 1];
- (w.leftCliff || u && u.rightCliff) && !x && (j = !0), w.isNull && !H(S) && 0 < v ? j = !d.connectNulls : w.isNull && !S ? j = !0 : (v === 0 || j ? v = [["M", w.plotX, w.plotY]] : f.getPointSpline ? v = [f.getPointSpline(B, w, v)] : k ? (v = k === 1 ? [["L", u.plotX, h]] : k === 2 ? [["L", (u.plotX + l) / 2, u.plotY], ["L", (u.plotX + l) / 2, h]] : [["L", l, u.plotY]], v.push(["L", l, h])) : v = [["L", l, h]], O.push(w.x), k && (O.push(w.x), k === 2 && O.push(w.x)), T.push.apply(T, v), j = !1);
- }), T.xMap = O, f.graphPath = T;
- }, R.prototype.getZonesGraphs = function(B) {
- return this.zones.forEach(function(S, x) {
- x = ["zone-graph-" + x, "highcharts-graph highcharts-zone-graph-" + x + " " + (S.className || "")], this.chart.styledMode || x.push(S.color || this.color, S.dashStyle || this.options.dashStyle), B.push(x);
- }, this), B;
- }, R.defaultOptions = V(y.defaultOptions, {}), R;
- }(y), N.registerSeriesType("line", D), D;
- }), M(o, "Series/Area/AreaSeries.js", [
- o["Core/Color/Color.js"],
- o["Core/Legend/LegendSymbol.js"],
- o["Core/Series/SeriesRegistry.js"],
- o["Core/Utilities.js"]
- ], function(y, N, D, U) {
- var H = this && this.__extends || function() {
- var x = function(f, d) {
- return x = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(T, O) {
- T.__proto__ = O;
- } || function(T, O) {
- for (var j in O)
- O.hasOwnProperty(j) && (T[j] = O[j]);
- }, x(f, d);
- };
- return function(f, d) {
- function T() {
- this.constructor = f;
- }
- x(f, d), f.prototype = d === null ? Object.create(d) : (T.prototype = d.prototype, new T());
- };
- }(), V = y.parse, G = D.seriesTypes.line;
- y = U.extend;
- var R = U.merge, B = U.objectEach, S = U.pick;
- return U = function(x) {
- function f() {
- var d = x !== null && x.apply(this, arguments) || this;
- return d.data = void 0, d.options = void 0, d.points = void 0, d;
- }
- return H(f, x), f.prototype.drawGraph = function() {
- this.areaPath = [], x.prototype.drawGraph.apply(this);
- var d = this, T = this.areaPath, O = this.options, j = [["area", "highcharts-area", this.color, O.fillColor]];
- this.zones.forEach(function(k, b) {
- j.push(["zone-area-" + b, "highcharts-area highcharts-zone-area-" + b + " " + k.className, k.color || d.color, k.fillColor || O.fillColor]);
- }), j.forEach(function(k) {
- var b = k[0], w = d[b], v = w ? "animate" : "attr", l = {};
- w ? (w.endX = d.preventGraphAnimation ? null : T.xMap, w.animate({ d: T })) : (l.zIndex = 0, w = d[b] = d.chart.renderer.path(T).addClass(k[1]).add(d.group), w.isArea = !0), d.chart.styledMode || (l.fill = S(k[3], V(k[2]).setOpacity(S(O.fillOpacity, 0.75)).get())), w[v](l), w.startX = T.xMap, w.shiftUnit = O.step ? 2 : 1;
- });
- }, f.prototype.getGraphPath = function(d) {
- var T = G.prototype.getGraphPath, O = this.options, j = O.stacking, k = this.yAxis, b, w = [], v = [], l = this.index, h = k.stacking.stacks[this.stackKey], u = O.threshold, i = Math.round(k.getThreshold(O.threshold));
- O = S(O.connectNulls, j === "percent");
- var c = function(n, P, _) {
- var I = d[n];
- n = j && h[I.x].points[l];
- var W = I[_ + "Null"] || 0;
- if (_ = I[_ + "Cliff"] || 0, I = !0, _ || W) {
- var E = (W ? n[0] : n[1]) + _, X = n[0] + _;
- I = !!W;
- } else
- !j && d[P] && d[P].isNull && (E = X = u);
- typeof E < "u" && (v.push({ plotX: t, plotY: E === null ? i : k.getThreshold(E), isNull: I, isCliff: !0 }), w.push({ plotX: t, plotY: X === null ? i : k.getThreshold(X), doCurve: !1 }));
- };
- for (d = d || this.points, j && (d = this.getStackPoints(d)), b = 0; b < d.length; b++) {
- j || (d[b].leftCliff = d[b].rightCliff = d[b].leftNull = d[b].rightNull = void 0);
- var a = d[b].isNull, t = S(d[b].rectPlotX, d[b].plotX), s = j ? S(d[b].yBottom, i) : i;
- (!a || O) && (O || c(b, b - 1, "left"), a && !j && O || (v.push(d[b]), w.push({ x: b, plotX: t, plotY: s })), O || c(b, b + 1, "right"));
- }
- return b = T.call(this, v, !0, !0), w.reversed = !0, a = T.call(this, w, !0, !0), (s = a[0]) && s[0] === "M" && (a[0] = ["L", s[1], s[2]]), a = b.concat(a), a.length && a.push(["Z"]), T = T.call(this, v, !1, O), a.xMap = b.xMap, this.areaPath = a, T;
- }, f.prototype.getStackPoints = function(d) {
- var T = this, O = [], j = [], k = this.xAxis, b = this.yAxis, w = b.stacking.stacks[this.stackKey], v = {}, l = b.series, h = l.length, u = b.options.reversedStacks ? 1 : -1, i = l.indexOf(T);
- if (d = d || this.points, this.options.stacking) {
- for (var c = 0; c < d.length; c++)
- d[c].leftNull = d[c].rightNull = void 0, v[d[c].x] = d[c];
- B(w, function(t, s) {
- t.total !== null && j.push(s);
- }), j.sort(function(t, s) {
- return t - s;
- });
- var a = l.map(function(t) {
- return t.visible;
- });
- j.forEach(function(t, s) {
- var n = 0, P, _;
- if (v[t] && !v[t].isNull)
- O.push(v[t]), [-1, 1].forEach(function(W) {
- var E = W === 1 ? "rightNull" : "leftNull", X = 0, g = w[j[s + W]];
- if (g)
- for (var m = i; 0 <= m && m < h; ) {
- var L = l[m].index;
- P = g.points[L], P || (L === T.index ? v[t][E] = !0 : a[m] && (_ = w[t].points[L]) && (X -= _[1] - _[0])), m += u;
- }
- v[t][W === 1 ? "rightCliff" : "leftCliff"] = X;
- });
- else {
- for (var I = i; 0 <= I && I < h; ) {
- if (P = w[t].points[l[I].index]) {
- n = P[1];
- break;
- }
- I += u;
- }
- n = S(n, 0), n = b.translate(n, 0, 1, 0, 1), O.push({ isNull: !0, plotX: k.translate(t, 0, 0, 0, 1), x: t, plotY: n, yBottom: n });
- }
- });
- }
- return O;
- }, f.defaultOptions = R(G.defaultOptions, { threshold: 0 }), f;
- }(G), y(U.prototype, {
- singleStacks: !1,
- drawLegendSymbol: N.drawRectangle
- }), D.registerSeriesType("area", U), U;
- }), M(o, "Series/Spline/SplineSeries.js", [o["Core/Series/SeriesRegistry.js"], o["Core/Utilities.js"]], function(y, N) {
- var D = this && this.__extends || function() {
- var G = function(R, B) {
- return G = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(S, x) {
- S.__proto__ = x;
- } || function(S, x) {
- for (var f in x)
- x.hasOwnProperty(f) && (S[f] = x[f]);
- }, G(R, B);
- };
- return function(R, B) {
- function S() {
- this.constructor = R;
- }
- G(R, B), R.prototype = B === null ? Object.create(B) : (S.prototype = B.prototype, new S());
- };
- }(), U = y.seriesTypes.line, H = N.merge, V = N.pick;
- return N = function(G) {
- function R() {
- var B = G !== null && G.apply(this, arguments) || this;
- return B.data = void 0, B.options = void 0, B.points = void 0, B;
- }
- return D(R, G), R.prototype.getPointSpline = function(B, S, x) {
- var f = S.plotX || 0, d = S.plotY || 0, T = B[x - 1];
- if (x = B[x + 1], T && !T.isNull && T.doCurve !== !1 && !S.isCliff && x && !x.isNull && x.doCurve !== !1 && !S.isCliff) {
- B = T.plotY || 0;
- var O = x.plotX || 0;
- x = x.plotY || 0;
- var j = 0, k = (1.5 * f + (T.plotX || 0)) / 2.5, b = (1.5 * d + B) / 2.5;
- O = (1.5 * f + O) / 2.5;
- var w = (1.5 * d + x) / 2.5;
- O !== k && (j = (w - b) * (O - f) / (O - k) + d - w), b += j, w += j, b > B && b > d ? (b = Math.max(B, d), w = 2 * d - b) : b < B && b < d && (b = Math.min(B, d), w = 2 * d - b), w > x && w > d ? (w = Math.max(x, d), b = 2 * d - w) : w < x && w < d && (w = Math.min(x, d), b = 2 * d - w), S.rightContX = O, S.rightContY = w;
- }
- return S = ["C", V(T.rightContX, T.plotX, 0), V(T.rightContY, T.plotY, 0), V(k, f, 0), V(b, d, 0), f, d], T.rightContX = T.rightContY = void 0, S;
- }, R.defaultOptions = H(U.defaultOptions), R;
- }(U), y.registerSeriesType("spline", N), N;
- }), M(
- o,
- "Series/AreaSpline/AreaSplineSeries.js",
- [o["Series/Area/AreaSeries.js"], o["Series/Spline/SplineSeries.js"], o["Core/Legend/LegendSymbol.js"], o["Core/Series/SeriesRegistry.js"], o["Core/Utilities.js"]],
- function(y, N, D, U, H) {
- var V = this && this.__extends || function() {
- var S = function(x, f) {
- return S = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, T) {
- d.__proto__ = T;
- } || function(d, T) {
- for (var O in T)
- T.hasOwnProperty(O) && (d[O] = T[O]);
- }, S(x, f);
- };
- return function(x, f) {
- function d() {
- this.constructor = x;
- }
- S(x, f), x.prototype = f === null ? Object.create(f) : (d.prototype = f.prototype, new d());
- };
- }(), G = y.prototype, R = H.extend, B = H.merge;
- return H = function(S) {
- function x() {
- var f = S !== null && S.apply(this, arguments) || this;
- return f.data = void 0, f.points = void 0, f.options = void 0, f;
- }
- return V(x, S), x.defaultOptions = B(N.defaultOptions, y.defaultOptions), x;
- }(N), R(H.prototype, { getGraphPath: G.getGraphPath, getStackPoints: G.getStackPoints, drawGraph: G.drawGraph, drawLegendSymbol: D.drawRectangle }), U.registerSeriesType("areaspline", H), H;
- }
- ), M(o, "Series/Column/ColumnSeries.js", [
- o["Core/Animation/AnimationUtilities.js"],
- o["Core/Color/Color.js"],
- o["Core/Globals.js"],
- o["Core/Legend/LegendSymbol.js"],
- o["Core/Series/Series.js"],
- o["Core/Series/SeriesRegistry.js"],
- o["Core/Utilities.js"]
- ], function(y, N, D, U, H, V, G) {
- var R = this && this.__extends || function() {
- var h = function(u, i) {
- return h = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(c, a) {
- c.__proto__ = a;
- } || function(c, a) {
- for (var t in a)
- a.hasOwnProperty(t) && (c[t] = a[t]);
- }, h(u, i);
- };
- return function(u, i) {
- function c() {
- this.constructor = u;
- }
- h(u, i), u.prototype = i === null ? Object.create(i) : (c.prototype = i.prototype, new c());
- };
- }(), B = y.animObject, S = N.parse, x = D.hasTouch;
- y = D.noop;
- var f = G.clamp, d = G.css, T = G.defined, O = G.extend, j = G.fireEvent, k = G.isArray, b = G.isNumber, w = G.merge, v = G.pick, l = G.objectEach;
- return G = function(h) {
- function u() {
- var i = h !== null && h.apply(this, arguments) || this;
- return i.borderWidth = void 0, i.data = void 0, i.group = void 0, i.options = void 0, i.points = void 0, i;
- }
- return R(u, h), u.prototype.animate = function(i) {
- var c = this, a = this.yAxis, t = c.options, s = this.chart.inverted, n = {}, P = s ? "translateX" : "translateY";
- if (i)
- n.scaleY = 1e-3, i = f(a.toPixels(t.threshold), a.pos, a.pos + a.len), s ? n.translateX = i - a.len : n.translateY = i, c.clipBox && c.setClip(), c.group.attr(n);
- else {
- var _ = Number(c.group.attr(P));
- c.group.animate({ scaleY: 1 }, O(B(c.options.animation), { step: function(I, W) {
- c.group && (n[P] = _ + W.pos * (a.pos - _), c.group.attr(n));
- } }));
- }
- }, u.prototype.init = function(i, c) {
- h.prototype.init.apply(this, arguments);
- var a = this;
- i = a.chart, i.hasRendered && i.series.forEach(function(t) {
- t.type === a.type && (t.isDirty = !0);
- });
- }, u.prototype.getColumnMetrics = function() {
- var i = this, c = i.options, a = i.xAxis, t = i.yAxis, s = a.options.reversedStacks;
- s = a.reversed && !s || !a.reversed && s;
- var n = {}, P, _ = 0;
- c.grouping === !1 ? _ = 1 : i.chart.series.forEach(function(X) {
- var g = X.yAxis, m = X.options;
- if (X.type === i.type && (X.visible || !i.chart.options.chart.ignoreHiddenSeries) && t.len === g.len && t.pos === g.pos) {
- if (m.stacking && m.stacking !== "group") {
- P = X.stackKey, typeof n[P] > "u" && (n[P] = _++);
- var L = n[P];
- } else
- m.grouping !== !1 && (L = _++);
- X.columnIndex = L;
- }
- });
- var I = Math.min(Math.abs(a.transA) * (a.ordinal && a.ordinal.slope || c.pointRange || a.closestPointRange || a.tickInterval || 1), a.len), W = I * c.groupPadding, E = (I - 2 * W) / (_ || 1);
- return c = Math.min(c.maxPointWidth || a.len, v(c.pointWidth, E * (1 - 2 * c.pointPadding))), i.columnMetrics = { width: c, offset: (E - c) / 2 + (W + ((i.columnIndex || 0) + (s ? 1 : 0)) * E - I / 2) * (s ? -1 : 1), paddedWidth: E, columnCount: _ }, i.columnMetrics;
- }, u.prototype.crispCol = function(i, c, a, t) {
- var s = this.chart, n = this.borderWidth, P = -(n % 2 ? 0.5 : 0);
- return n = n % 2 ? 0.5 : 1, s.inverted && s.renderer.isVML && (n += 1), this.options.crisp && (a = Math.round(i + a) + P, i = Math.round(i) + P, a -= i), t = Math.round(c + t) + n, P = 0.5 >= Math.abs(c) && 0.5 < t, c = Math.round(c) + n, t -= c, P && t && (--c, t += 1), { x: i, y: c, width: a, height: t };
- }, u.prototype.adjustForMissingColumns = function(i, c, a, t) {
- var s = this, n = this.options.stacking;
- if (!a.isNull && 1 < t.columnCount) {
- var P = 0, _ = 0;
- l(this.yAxis.stacking && this.yAxis.stacking.stacks, function(I) {
- if (typeof a.x == "number" && (I = I[a.x.toString()])) {
- var W = I.points[s.index], E = I.total;
- n ? (W && (P = _), I.hasValidPoints && _++) : k(W) && (P = W[1], _ = E || 0);
- }
- }), i = (a.plotX || 0) + ((_ - 1) * t.paddedWidth + c) / 2 - c - P * t.paddedWidth;
- }
- return i;
- }, u.prototype.translate = function() {
- var i = this, c = i.chart, a = i.options, t = i.dense = 2 > i.closestPointRange * i.xAxis.transA;
- t = i.borderWidth = v(a.borderWidth, t ? 0 : 1);
- var s = i.xAxis, n = i.yAxis, P = a.threshold, _ = i.translatedThreshold = n.getThreshold(P), I = v(a.minPointLength, 5), W = i.getColumnMetrics(), E = W.width, X = i.pointXOffset = W.offset, g = i.dataMin, m = i.dataMax, L = i.barW = Math.max(E, 1 + 2 * t);
- c.inverted && (_ -= 0.5), a.pointPadding && (L = Math.ceil(L)), H.prototype.translate.apply(i), i.points.forEach(function(z) {
- var $ = v(z.yBottom, _), Q = 999 + Math.abs($), A = z.plotX || 0;
- Q = f(z.plotY, -Q, n.len + Q);
- var F = Math.min(Q, $), Y = Math.max(Q, $) - F, Z = E, q = A + X, it = L;
- I && Math.abs(Y) < I && (Y = I, A = !n.reversed && !z.negative || n.reversed && z.negative, b(P) && b(m) && z.y === P && m <= P && (n.min || 0) < P && (g !== m || (n.max || 0) <= P) && (A = !A), F = Math.abs(F - _) > I ? $ - I : _ - (A ? I : 0)), T(z.options.pointWidth) && (Z = it = Math.ceil(z.options.pointWidth), q -= Math.round((Z - E) / 2)), a.centerInCategory && (q = i.adjustForMissingColumns(q, Z, z, W)), z.barX = q, z.pointWidth = Z, z.tooltipPos = c.inverted ? [f(n.len + n.pos - c.plotLeft - Q, n.pos - c.plotLeft, n.len + n.pos - c.plotLeft), s.len + s.pos - c.plotTop - q - it / 2, Y] : [s.left - c.plotLeft + q + it / 2, f(Q + n.pos - c.plotTop, n.pos - c.plotTop, n.len + n.pos - c.plotTop), Y], z.shapeType = i.pointClass.prototype.shapeType || "rect", z.shapeArgs = i.crispCol.apply(i, z.isNull ? [q, _, it, 0] : [q, F, it, Y]);
- });
- }, u.prototype.drawGraph = function() {
- this.group[this.dense ? "addClass" : "removeClass"]("highcharts-dense-data");
- }, u.prototype.pointAttribs = function(i, c) {
- var a = this.options, t = this.pointAttrToOptions || {}, s = t.stroke || "borderColor", n = t["stroke-width"] || "borderWidth", P = i && i.color || this.color, _ = i && i[s] || a[s] || P;
- t = i && i.options.dashStyle || a.dashStyle;
- var I = i && i[n] || a[n] || this[n] || 0, W = v(i && i.opacity, a.opacity, 1);
- if (i && this.zones.length) {
- var E = i.getZone();
- P = i.options.color || E && (E.color || i.nonZonedColor) || this.color, E && (_ = E.borderColor || _, t = E.dashStyle || t, I = E.borderWidth || I);
- }
- return c && i && (i = w(a.states[c], i.options.states && i.options.states[c] || {}), c = i.brightness, P = i.color || typeof c < "u" && S(P).brighten(i.brightness).get() || P, _ = i[s] || _, I = i[n] || I, t = i.dashStyle || t, W = v(i.opacity, W)), s = { fill: P, stroke: _, "stroke-width": I, opacity: W }, t && (s.dashstyle = t), s;
- }, u.prototype.drawPoints = function() {
- var i = this, c = this.chart, a = i.options, t = c.renderer, s = a.animationLimit || 250, n;
- i.points.forEach(function(P) {
- var _ = P.graphic, I = !!_, W = _ && c.pointCount < s ? "animate" : "attr";
- b(P.plotY) && P.y !== null ? (n = P.shapeArgs, _ && P.hasNewShapeType() && (_ = _.destroy()), i.enabledDataSorting && (P.startXPos = i.xAxis.reversed ? -(n && n.width || 0) : i.xAxis.width), _ || (P.graphic = _ = t[P.shapeType](n).add(P.group || i.group)) && i.enabledDataSorting && c.hasRendered && c.pointCount < s && (_.attr({ x: P.startXPos }), I = !0, W = "animate"), _ && I && _[W](w(n)), a.borderRadius && _[W]({ r: a.borderRadius }), c.styledMode || _[W](i.pointAttribs(P, P.selected && "select")).shadow(P.allowShadow !== !1 && a.shadow, null, a.stacking && !a.borderRadius), _ && (_.addClass(P.getClassName(), !0), _.attr({ visibility: P.visible ? "inherit" : "hidden" }))) : _ && (P.graphic = _.destroy());
- });
- }, u.prototype.drawTracker = function() {
- var i = this, c = i.chart, a = c.pointer, t = function(n) {
- var P = a.getPointFromEvent(n);
- typeof P < "u" && (a.isDirectTouch = !0, P.onMouseOver(n));
- }, s;
- i.points.forEach(function(n) {
- s = k(n.dataLabels) ? n.dataLabels : n.dataLabel ? [n.dataLabel] : [], n.graphic && (n.graphic.element.point = n), s.forEach(function(P) {
- P.div ? P.div.point = n : P.element.point = n;
- });
- }), i._hasTracking || (i.trackerGroups.forEach(function(n) {
- i[n] && (i[n].addClass("highcharts-tracker").on("mouseover", t).on("mouseout", function(P) {
- a.onTrackerMouseOut(P);
- }), x && i[n].on(
- "touchstart",
- t
- ), !c.styledMode && i.options.cursor && i[n].css(d).css({ cursor: i.options.cursor }));
- }), i._hasTracking = !0), j(this, "afterDrawTracker");
- }, u.prototype.remove = function() {
- var i = this, c = i.chart;
- c.hasRendered && c.series.forEach(function(a) {
- a.type === i.type && (a.isDirty = !0);
- }), H.prototype.remove.apply(i, arguments);
- }, u.defaultOptions = w(H.defaultOptions, { borderRadius: 0, centerInCategory: !1, groupPadding: 0.2, marker: null, pointPadding: 0.1, minPointLength: 0, cropThreshold: 50, pointRange: null, states: {
- hover: { halo: !1, brightness: 0.1 },
- select: { color: "#cccccc", borderColor: "#000000" }
- }, dataLabels: { align: void 0, verticalAlign: void 0, y: void 0 }, startFromThreshold: !0, stickyTracking: !1, tooltip: { distance: 6 }, threshold: 0, borderColor: "#ffffff" }), u;
- }(H), O(G.prototype, { cropShoulder: 0, directTouch: !0, drawLegendSymbol: U.drawRectangle, getSymbol: y, negStacks: !0, trackerGroups: ["group", "dataLabelsGroup"] }), V.registerSeriesType("column", G), G;
- }), M(o, "Core/Series/DataLabel.js", [
- o["Core/Animation/AnimationUtilities.js"],
- o["Core/FormatUtilities.js"],
- o["Core/Utilities.js"]
- ], function(y, N, D) {
- var U = y.getDeferredAnimation, H = N.format, V = D.defined, G = D.extend, R = D.fireEvent, B = D.isArray, S = D.merge, x = D.objectEach, f = D.pick, d = D.splat, T;
- return function(O) {
- function j(u, i, c, a, t) {
- var s = this, n = this.chart, P = this.isCartesian && n.inverted, _ = this.enabledDataSorting, I = f(u.dlBox && u.dlBox.centerX, u.plotX, -9999), W = f(u.plotY, -9999), E = i.getBBox(), X = c.rotation, g = c.align, m = n.isInsidePlot(I, Math.round(W), { inverted: P, paneCoordinates: !0, series: s }), L = function(A) {
- _ && s.xAxis && !z && s.setDataLabelStartPos(
- u,
- i,
- t,
- m,
- A
- );
- }, z = f(c.overflow, _ ? "none" : "justify") === "justify", $ = this.visible && u.visible !== !1 && (u.series.forceDL || _ && !z || m || f(c.inside, !!this.options.stacking) && a && n.isInsidePlot(I, P ? a.x + 1 : a.y + a.height - 1, { inverted: P, paneCoordinates: !0, series: s }));
- if ($) {
- var Q = n.renderer.fontMetrics(n.styledMode ? void 0 : c.style.fontSize, i).b;
- a = G({ x: P ? this.yAxis.len - W : I, y: Math.round(P ? this.xAxis.len - I : W), width: 0, height: 0 }, a), G(c, { width: E.width, height: E.height }), X ? (z = !1, I = n.renderer.rotCorr(Q, X), I = { x: a.x + (c.x || 0) + a.width / 2 + I.x, y: a.y + (c.y || 0) + { top: 0, middle: 0.5, bottom: 1 }[c.verticalAlign] * a.height }, L(I), i[t ? "attr" : "animate"](I).attr({ align: g }), L = (X + 720) % 360, L = 180 < L && 360 > L, g === "left" ? I.y -= L ? E.height : 0 : g === "center" ? (I.x -= E.width / 2, I.y -= E.height / 2) : g === "right" && (I.x -= E.width, I.y -= L ? 0 : E.height), i.placed = !0, i.alignAttr = I) : (L(a), i.align(c, void 0, a), I = i.alignAttr), z && 0 <= a.height ? this.justifyDataLabel(i, c, I, E, a, t) : f(c.crop, !0) && ($ = n.isInsidePlot(I.x, I.y, { paneCoordinates: !0, series: s }) && n.isInsidePlot(I.x + E.width, I.y + E.height, {
- paneCoordinates: !0,
- series: s
- })), c.shape && !X && i[t ? "attr" : "animate"]({ anchorX: P ? n.plotWidth - u.plotY : u.plotX, anchorY: P ? n.plotHeight - u.plotX : u.plotY });
- }
- t && _ && (i.placed = !1), $ || _ && !z || (i.hide(!0), i.placed = !1);
- }
- function k(u, i) {
- var c = i.filter;
- return c ? (i = c.operator, u = u[c.property], c = c.value, i === ">" && u > c || i === "<" && u < c || i === ">=" && u >= c || i === "<=" && u <= c || i === "==" && u == c || i === "===" && u === c) : !0;
- }
- function b() {
- var u = this, i = u.chart, c = u.options, a = u.points, t = u.hasRendered || 0, s = i.renderer, n = c.dataLabels, P, _ = n.animation;
- if (_ = n.defer ? U(
- i,
- _,
- u
- ) : { defer: 0, duration: 0 }, n = v(v(i.options.plotOptions && i.options.plotOptions.series && i.options.plotOptions.series.dataLabels, i.options.plotOptions && i.options.plotOptions[u.type] && i.options.plotOptions[u.type].dataLabels), n), R(this, "drawDataLabels"), B(n) || n.enabled || u._hasPointLabels) {
- var I = u.plotGroup("dataLabelsGroup", "data-labels", t ? "inherit" : "hidden", n.zIndex || 6);
- I.attr({ opacity: +t }), !t && (t = u.dataLabelsGroup) && (u.visible && I.show(!0), t[c.animation ? "animate" : "attr"]({ opacity: 1 }, _)), a.forEach(function(W) {
- P = d(v(n, W.dlOptions || W.options && W.options.dataLabels)), P.forEach(function(E, X) {
- var g = E.enabled && (!W.isNull || W.dataLabelOnNull) && k(W, E), m = W.connectors ? W.connectors[X] : W.connector, L = W.dataLabels ? W.dataLabels[X] : W.dataLabel, z = f(E.distance, W.labelDistance), $ = !L;
- if (g) {
- var Q = W.getLabelConfig(), A = f(E[W.formatPrefix + "Format"], E.format);
- Q = V(A) ? H(A, Q, i) : (E[W.formatPrefix + "Formatter"] || E.formatter).call(Q, E), A = E.style;
- var F = E.rotation;
- i.styledMode || (A.color = f(E.color, A.color, u.color, "#000000"), A.color === "contrast" ? (W.contrastColor = s.getContrast(W.color || u.color), A.color = !V(z) && E.inside || 0 > z || c.stacking ? W.contrastColor : "#000000") : delete W.contrastColor, c.cursor && (A.cursor = c.cursor));
- var Y = { r: E.borderRadius || 0, rotation: F, padding: E.padding, zIndex: 1 };
- i.styledMode || (Y.fill = E.backgroundColor, Y.stroke = E.borderColor, Y["stroke-width"] = E.borderWidth), x(Y, function(Z, q) {
- typeof Z > "u" && delete Y[q];
- });
- }
- !L || g && V(Q) && !!L.div == !!E.useHTML || (W.dataLabel = L = W.dataLabel && W.dataLabel.destroy(), W.dataLabels && (W.dataLabels.length === 1 ? delete W.dataLabels : delete W.dataLabels[X]), X || delete W.dataLabel, m && (W.connector = W.connector.destroy(), W.connectors && (W.connectors.length === 1 ? delete W.connectors : delete W.connectors[X]))), g && V(Q) && (L ? Y.text = Q : (W.dataLabels = W.dataLabels || [], L = W.dataLabels[X] = F ? s.text(Q, 0, -9999, E.useHTML).addClass("highcharts-data-label") : s.label(Q, 0, -9999, E.shape, null, null, E.useHTML, null, "data-label"), X || (W.dataLabel = L), L.addClass(" highcharts-data-label-color-" + W.colorIndex + " " + (E.className || "") + (E.useHTML ? " highcharts-tracker" : ""))), L.options = E, L.attr(Y), i.styledMode || L.css(A).shadow(E.shadow), L.added || L.add(I), E.textPath && !E.useHTML && (L.setTextPath(W.getDataLabelPath && W.getDataLabelPath(L) || W.graphic, E.textPath), W.dataLabelPath && !E.textPath.enabled && (W.dataLabelPath = W.dataLabelPath.destroy())), u.alignDataLabel(W, L, E, null, $));
- });
- });
- }
- R(this, "afterDrawDataLabels");
- }
- function w(u, i, c, a, t, s) {
- var n = this.chart, P = i.align, _ = i.verticalAlign, I = u.box ? 0 : u.padding || 0, W = i.x;
- W = W === void 0 ? 0 : W;
- var E = i.y;
- E = E === void 0 ? 0 : E;
- var X = (c.x || 0) + I;
- if (0 > X) {
- P === "right" && 0 <= W ? (i.align = "left", i.inside = !0) : W -= X;
- var g = !0;
- }
- return X = (c.x || 0) + a.width - I, X > n.plotWidth && (P === "left" && 0 >= W ? (i.align = "right", i.inside = !0) : W += n.plotWidth - X, g = !0), X = c.y + I, 0 > X && (_ === "bottom" && 0 <= E ? (i.verticalAlign = "top", i.inside = !0) : E -= X, g = !0), X = (c.y || 0) + a.height - I, X > n.plotHeight && (_ === "top" && 0 >= E ? (i.verticalAlign = "bottom", i.inside = !0) : E += n.plotHeight - X, g = !0), g && (i.x = W, i.y = E, u.placed = !s, u.align(i, void 0, t)), g;
- }
- function v(u, i) {
- var c = [], a;
- if (B(u) && !B(i))
- c = u.map(function(t) {
- return S(t, i);
- });
- else if (B(i) && !B(u))
- c = i.map(function(t) {
- return S(u, t);
- });
- else if (B(u) || B(i))
- for (a = Math.max(u.length, i.length); a--; )
- c[a] = S(u[a], i[a]);
- else
- c = S(u, i);
- return c;
- }
- function l(u, i, c, a, t) {
- var s = this.chart, n = s.inverted, P = this.xAxis, _ = P.reversed, I = n ? i.height / 2 : i.width / 2;
- u = (u = u.pointWidth) ? u / 2 : 0, i.startXPos = n ? t.x : _ ? -I - u : P.width - I + u, i.startYPos = n ? _ ? this.yAxis.height - I + u : -I - u : t.y, a ? i.visibility === "hidden" && (i.show(), i.attr({ opacity: 0 }).animate({ opacity: 1 })) : i.attr({ opacity: 1 }).animate(
- { opacity: 0 },
- void 0,
- i.hide
- ), s.hasRendered && (c && i.attr({ x: i.startXPos, y: i.startYPos }), i.placed = !0);
- }
- var h = [];
- O.compose = function(u) {
- if (h.indexOf(u) === -1) {
- var i = u.prototype;
- h.push(u), i.alignDataLabel = j, i.drawDataLabels = b, i.justifyDataLabel = w, i.setDataLabelStartPos = l;
- }
- };
- }(T || (T = {})), T;
- }), M(o, "Series/Column/ColumnDataLabel.js", [o["Core/Series/DataLabel.js"], o["Core/Series/SeriesRegistry.js"], o["Core/Utilities.js"]], function(y, N, D) {
- var U = N.series, H = D.merge, V = D.pick, G;
- return function(R) {
- function B(x, f, d, T, O) {
- var j = this.chart.inverted, k = x.series, b = (k.xAxis ? k.xAxis.len : this.chart.plotSizeX) || 0;
- k = (k.yAxis ? k.yAxis.len : this.chart.plotSizeY) || 0;
- var w = x.dlBox || x.shapeArgs, v = V(x.below, x.plotY > V(this.translatedThreshold, k)), l = V(d.inside, !!this.options.stacking);
- w && (T = H(w), 0 > T.y && (T.height += T.y, T.y = 0), w = T.y + T.height - k, 0 < w && w < T.height && (T.height -= w), j && (T = { x: k - T.y - T.height, y: b - T.x - T.width, width: T.height, height: T.width }), l || (j ? (T.x += v ? 0 : T.width, T.width = 0) : (T.y += v ? T.height : 0, T.height = 0))), d.align = V(d.align, !j || l ? "center" : v ? "right" : "left"), d.verticalAlign = V(d.verticalAlign, j || l ? "middle" : v ? "top" : "bottom"), U.prototype.alignDataLabel.call(this, x, f, d, T, O), d.inside && x.contrastColor && f.css({ color: x.contrastColor });
- }
- var S = [];
- R.compose = function(x) {
- y.compose(U), S.indexOf(x) === -1 && (S.push(x), x.prototype.alignDataLabel = B);
- };
- }(G || (G = {})), G;
- }), M(o, "Series/Bar/BarSeries.js", [o["Series/Column/ColumnSeries.js"], o["Core/Series/SeriesRegistry.js"], o["Core/Utilities.js"]], function(y, N, D) {
- var U = this && this.__extends || function() {
- var G = function(R, B) {
- return G = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(S, x) {
- S.__proto__ = x;
- } || function(S, x) {
- for (var f in x)
- x.hasOwnProperty(f) && (S[f] = x[f]);
- }, G(R, B);
- };
- return function(R, B) {
- function S() {
- this.constructor = R;
- }
- G(R, B), R.prototype = B === null ? Object.create(B) : (S.prototype = B.prototype, new S());
- };
- }(), H = D.extend, V = D.merge;
- return D = function(G) {
- function R() {
- var B = G !== null && G.apply(this, arguments) || this;
- return B.data = void 0, B.options = void 0, B.points = void 0, B;
- }
- return U(R, G), R.defaultOptions = V(
- y.defaultOptions,
- {}
- ), R;
- }(y), H(D.prototype, { inverted: !0 }), N.registerSeriesType("bar", D), D;
- }), M(o, "Series/Scatter/ScatterSeries.js", [o["Series/Column/ColumnSeries.js"], o["Series/Line/LineSeries.js"], o["Core/Series/SeriesRegistry.js"], o["Core/Utilities.js"]], function(y, N, D, U) {
- var H = this && this.__extends || function() {
- var B = function(S, x) {
- return B = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(f, d) {
- f.__proto__ = d;
- } || function(f, d) {
- for (var T in d)
- d.hasOwnProperty(T) && (f[T] = d[T]);
- }, B(S, x);
- };
- return function(S, x) {
- function f() {
- this.constructor = S;
- }
- B(S, x), S.prototype = x === null ? Object.create(x) : (f.prototype = x.prototype, new f());
- };
- }(), V = U.addEvent, G = U.extend, R = U.merge;
- return U = function(B) {
- function S() {
- var x = B !== null && B.apply(this, arguments) || this;
- return x.data = void 0, x.options = void 0, x.points = void 0, x;
- }
- return H(S, B), S.prototype.applyJitter = function() {
- var x = this, f = this.options.jitter, d = this.points.length;
- f && this.points.forEach(function(T, O) {
- ["x", "y"].forEach(function(j, k) {
- var b = "plot" + j.toUpperCase();
- if (f[j] && !T.isNull) {
- var w = x[j + "Axis"], v = f[j] * w.transA;
- if (w && !w.isLog) {
- var l = Math.max(0, T[b] - v);
- w = Math.min(w.len, T[b] + v), k = 1e4 * Math.sin(O + k * d), T[b] = l + (w - l) * (k - Math.floor(k)), j === "x" && (T.clientX = T.plotX);
- }
- }
- });
- });
- }, S.prototype.drawGraph = function() {
- this.options.lineWidth ? B.prototype.drawGraph.call(this) : this.graph && (this.graph = this.graph.destroy());
- }, S.defaultOptions = R(N.defaultOptions, { lineWidth: 0, findNearestPointBy: "xy", jitter: { x: 0, y: 0 }, marker: { enabled: !0 }, tooltip: {
- headerFormat: '<span style="color:{point.color}">●</span> <span style="font-size: 10px"> {series.name}</span><br/>',
- pointFormat: "x: <b>{point.x}</b><br/>y: <b>{point.y}</b><br/>"
- } }), S;
- }(N), G(U.prototype, { drawTracker: y.prototype.drawTracker, sorted: !1, requireSorting: !1, noSharedTooltip: !0, trackerGroups: ["group", "markerGroup", "dataLabelsGroup"], takeOrdinalPosition: !1 }), V(U, "afterTranslate", function() {
- this.applyJitter();
- }), D.registerSeriesType("scatter", U), U;
- }), M(o, "Series/CenteredUtilities.js", [o["Core/Globals.js"], o["Core/Series/Series.js"], o["Core/Utilities.js"]], function(y, N, D) {
- var U = y.deg2rad, H = D.isNumber, V = D.pick, G = D.relativeLength, R;
- return function(B) {
- B.getCenter = function() {
- var S = this.options, x = this.chart, f = 2 * (S.slicedOffset || 0), d = x.plotWidth - 2 * f, T = x.plotHeight - 2 * f, O = S.center, j = Math.min(d, T), k = S.size, b = S.innerSize || 0;
- for (typeof k == "string" && (k = parseFloat(k)), typeof b == "string" && (b = parseFloat(b)), S = [V(O[0], "50%"), V(O[1], "50%"), V(k && 0 > k ? void 0 : S.size, "100%"), V(b && 0 > b ? void 0 : S.innerSize || 0, "0%")], !x.angular || this instanceof N || (S[3] = 0), O = 0; 4 > O; ++O)
- k = S[O], x = 2 > O || O === 2 && /%$/.test(k), S[O] = G(k, [d, T, j, S[2]][O]) + (x ? f : 0);
- return S[3] > S[2] && (S[3] = S[2]), S;
- }, B.getStartAndEndRadians = function(S, x) {
- return S = H(S) ? S : 0, x = H(x) && x > S && 360 > x - S ? x : S + 360, { start: U * (S + -90), end: U * (x + -90) };
- };
- }(R || (R = {})), R;
- }), M(o, "Series/Pie/PiePoint.js", [o["Core/Animation/AnimationUtilities.js"], o["Core/Series/Point.js"], o["Core/Utilities.js"]], function(y, N, D) {
- var U = this && this.__extends || function() {
- var x = function(f, d) {
- return x = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(T, O) {
- T.__proto__ = O;
- } || function(T, O) {
- for (var j in O)
- O.hasOwnProperty(j) && (T[j] = O[j]);
- }, x(f, d);
- };
- return function(f, d) {
- function T() {
- this.constructor = f;
- }
- x(f, d), f.prototype = d === null ? Object.create(d) : (T.prototype = d.prototype, new T());
- };
- }(), H = y.setAnimation, V = D.addEvent, G = D.defined;
- y = D.extend;
- var R = D.isNumber, B = D.pick, S = D.relativeLength;
- return N = function(x) {
- function f() {
- var d = x !== null && x.apply(this, arguments) || this;
- return d.labelDistance = void 0, d.options = void 0, d.series = void 0, d;
- }
- return U(f, x), f.prototype.getConnectorPath = function() {
- var d = this.labelPosition, T = this.series.options.dataLabels, O = this.connectorShapes, j = T.connectorShape;
- return O[j] && (j = O[j]), j.call(this, { x: d.final.x, y: d.final.y, alignment: d.alignment }, d.connectorPosition, T);
- }, f.prototype.getTranslate = function() {
- return this.sliced ? this.slicedTranslation : { translateX: 0, translateY: 0 };
- }, f.prototype.haloPath = function(d) {
- var T = this.shapeArgs;
- return this.sliced || !this.visible ? [] : this.series.chart.renderer.symbols.arc(T.x, T.y, T.r + d, T.r + d, { innerR: T.r - 1, start: T.start, end: T.end });
- }, f.prototype.init = function() {
- var d = this;
- x.prototype.init.apply(
- this,
- arguments
- ), this.name = B(this.name, "Slice");
- var T = function(O) {
- d.slice(O.type === "select");
- };
- return V(this, "select", T), V(this, "unselect", T), this;
- }, f.prototype.isValid = function() {
- return R(this.y) && 0 <= this.y;
- }, f.prototype.setVisible = function(d, T) {
- var O = this, j = this.series, k = j.chart, b = j.options.ignoreHiddenPoint;
- T = B(T, b), d !== this.visible && (this.visible = this.options.visible = d = typeof d > "u" ? !this.visible : d, j.options.data[j.data.indexOf(this)] = this.options, ["graphic", "dataLabel", "connector", "shadowGroup"].forEach(function(w) {
- O[w] && O[w][d ? "show" : "hide"](d);
- }), this.legendItem && k.legend.colorizeItem(this, d), d || this.state !== "hover" || this.setState(""), b && (j.isDirty = !0), T && k.redraw());
- }, f.prototype.slice = function(d, T, O) {
- var j = this.series;
- H(O, j.chart), B(T, !0), this.sliced = this.options.sliced = G(d) ? d : !this.sliced, j.options.data[j.data.indexOf(this)] = this.options, this.graphic && this.graphic.animate(this.getTranslate()), this.shadowGroup && this.shadowGroup.animate(this.getTranslate());
- }, f;
- }(N), y(N.prototype, { connectorShapes: { fixedOffset: function(x, f, d) {
- var T = f.breakAt;
- return f = f.touchingSliceAt, [["M", x.x, x.y], d.softConnector ? ["C", x.x + (x.alignment === "left" ? -5 : 5), x.y, 2 * T.x - f.x, 2 * T.y - f.y, T.x, T.y] : ["L", T.x, T.y], ["L", f.x, f.y]];
- }, straight: function(x, f) {
- return f = f.touchingSliceAt, [["M", x.x, x.y], ["L", f.x, f.y]];
- }, crookedLine: function(x, f, d) {
- f = f.touchingSliceAt;
- var T = this.series, O = T.center[0], j = T.chart.plotWidth, k = T.chart.plotLeft;
- T = x.alignment;
- var b = this.shapeArgs.r;
- return d = S(d.crookDistance, 1), j = T === "left" ? O + b + (j + k - O - b) * (1 - d) : k + (O - b) * d, d = ["L", j, x.y], O = !0, (T === "left" ? j > x.x || j < f.x : j < x.x || j > f.x) && (O = !1), x = [["M", x.x, x.y]], O && x.push(d), x.push(["L", f.x, f.y]), x;
- } } }), N;
- }), M(o, "Series/Pie/PieSeries.js", [o["Series/CenteredUtilities.js"], o["Series/Column/ColumnSeries.js"], o["Core/Globals.js"], o["Core/Legend/LegendSymbol.js"], o["Series/Pie/PiePoint.js"], o["Core/Series/Series.js"], o["Core/Series/SeriesRegistry.js"], o["Core/Renderer/SVG/Symbols.js"], o["Core/Utilities.js"]], function(y, N, D, U, H, V, G, R, B) {
- var S = this && this.__extends || function() {
- var b = function(w, v) {
- return b = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(l, h) {
- l.__proto__ = h;
- } || function(l, h) {
- for (var u in h)
- h.hasOwnProperty(u) && (l[u] = h[u]);
- }, b(w, v);
- };
- return function(w, v) {
- function l() {
- this.constructor = w;
- }
- b(w, v), w.prototype = v === null ? Object.create(v) : (l.prototype = v.prototype, new l());
- };
- }(), x = y.getStartAndEndRadians;
- D = D.noop;
- var f = B.clamp, d = B.extend, T = B.fireEvent, O = B.merge, j = B.pick, k = B.relativeLength;
- return B = function(b) {
- function w() {
- var v = b !== null && b.apply(this, arguments) || this;
- return v.center = void 0, v.data = void 0, v.maxLabelDistance = void 0, v.options = void 0, v.points = void 0, v;
- }
- return S(w, b), w.prototype.animate = function(v) {
- var l = this, h = l.points, u = l.startAngleRad;
- v || h.forEach(function(i) {
- var c = i.graphic, a = i.shapeArgs;
- c && a && (c.attr({ r: j(i.startR, l.center && l.center[3] / 2), start: u, end: u }), c.animate({ r: a.r, start: a.start, end: a.end }, l.options.animation));
- });
- }, w.prototype.drawEmpty = function() {
- var v = this.startAngleRad, l = this.endAngleRad, h = this.options;
- if (this.total === 0 && this.center) {
- var u = this.center[0], i = this.center[1];
- this.graph || (this.graph = this.chart.renderer.arc(u, i, this.center[1] / 2, 0, v, l).addClass("highcharts-empty-series").add(this.group)), this.graph.attr({ d: R.arc(u, i, this.center[2] / 2, 0, { start: v, end: l, innerR: this.center[3] / 2 }) }), this.chart.styledMode || this.graph.attr({ "stroke-width": h.borderWidth, fill: h.fillColor || "none", stroke: h.color || "#cccccc" });
- } else
- this.graph && (this.graph = this.graph.destroy());
- }, w.prototype.drawPoints = function() {
- var v = this.chart.renderer;
- this.points.forEach(function(l) {
- l.graphic && l.hasNewShapeType() && (l.graphic = l.graphic.destroy()), l.graphic || (l.graphic = v[l.shapeType](l.shapeArgs).add(l.series.group), l.delayedRendering = !0);
- });
- }, w.prototype.generatePoints = function() {
- b.prototype.generatePoints.call(this), this.updateTotals();
- }, w.prototype.getX = function(v, l, h) {
- var u = this.center, i = this.radii ? this.radii[h.index] || 0 : u[2] / 2;
- return v = Math.asin(f((v - u[1]) / (i + h.labelDistance), -1, 1)), u[0] + (l ? -1 : 1) * Math.cos(v) * (i + h.labelDistance) + (0 < h.labelDistance ? (l ? -1 : 1) * this.options.dataLabels.padding : 0);
- }, w.prototype.hasData = function() {
- return !!this.processedXData.length;
- }, w.prototype.redrawPoints = function() {
- var v = this, l = v.chart, h = l.renderer, u = v.options.shadow, i, c, a, t;
- this.drawEmpty(), !u || v.shadowGroup || l.styledMode || (v.shadowGroup = h.g("shadow").attr({ zIndex: -1 }).add(v.group)), v.points.forEach(function(s) {
- var n = {};
- if (c = s.graphic, !s.isNull && c) {
- var P = void 0;
- t = s.shapeArgs, i = s.getTranslate(), l.styledMode || (P = s.shadowGroup, u && !P && (P = s.shadowGroup = h.g("shadow").add(v.shadowGroup)), P && P.attr(i), a = v.pointAttribs(s, s.selected && "select")), s.delayedRendering ? (c.setRadialReference(v.center).attr(t).attr(i), l.styledMode || c.attr(a).attr({ "stroke-linejoin": "round" }).shadow(u, P), s.delayedRendering = !1) : (c.setRadialReference(v.center), l.styledMode || O(!0, n, a), O(!0, n, t, i), c.animate(n)), c.attr({ visibility: s.visible ? "inherit" : "hidden" }), c.addClass(s.getClassName(), !0);
- } else
- c && (s.graphic = c.destroy());
- });
- }, w.prototype.sortByAngle = function(v, l) {
- v.sort(function(h, u) {
- return typeof h.angle < "u" && (u.angle - h.angle) * l;
- });
- }, w.prototype.translate = function(v) {
- this.generatePoints();
- var l = this.options, h = l.slicedOffset, u = h + (l.borderWidth || 0), i = x(l.startAngle, l.endAngle), c = this.startAngleRad = i.start;
- i = (this.endAngleRad = i.end) - c;
- var a = this.points, t = l.dataLabels.distance;
- l = l.ignoreHiddenPoint;
- var s = a.length, n, P = 0;
- for (v || (this.center = v = this.getCenter()), n = 0; n < s; n++) {
- var _ = a[n], I = c + P * i;
- !_.isValid() || l && !_.visible || (P += _.percentage / 100);
- var W = c + P * i, E = { x: v[0], y: v[1], r: v[2] / 2, innerR: v[3] / 2, start: Math.round(1e3 * I) / 1e3, end: Math.round(1e3 * W) / 1e3 };
- _.shapeType = "arc", _.shapeArgs = E, _.labelDistance = j(_.options.dataLabels && _.options.dataLabels.distance, t), _.labelDistance = k(_.labelDistance, E.r), this.maxLabelDistance = Math.max(this.maxLabelDistance || 0, _.labelDistance), W = (W + I) / 2, W > 1.5 * Math.PI ? W -= 2 * Math.PI : W < -Math.PI / 2 && (W += 2 * Math.PI), _.slicedTranslation = { translateX: Math.round(Math.cos(W) * h), translateY: Math.round(Math.sin(W) * h) }, E = Math.cos(W) * v[2] / 2;
- var X = Math.sin(W) * v[2] / 2;
- _.tooltipPos = [v[0] + 0.7 * E, v[1] + 0.7 * X], _.half = W < -Math.PI / 2 || W > Math.PI / 2 ? 1 : 0, _.angle = W, I = Math.min(u, _.labelDistance / 5), _.labelPosition = { natural: { x: v[0] + E + Math.cos(W) * _.labelDistance, y: v[1] + X + Math.sin(W) * _.labelDistance }, final: {}, alignment: 0 > _.labelDistance ? "center" : _.half ? "right" : "left", connectorPosition: { breakAt: { x: v[0] + E + Math.cos(W) * I, y: v[1] + X + Math.sin(W) * I }, touchingSliceAt: { x: v[0] + E, y: v[1] + X } } };
- }
- T(this, "afterTranslate");
- }, w.prototype.updateTotals = function() {
- var v = this.points, l = v.length, h = this.options.ignoreHiddenPoint, u, i = 0;
- for (u = 0; u < l; u++) {
- var c = v[u];
- !c.isValid() || h && !c.visible || (i += c.y);
- }
- for (this.total = i, u = 0; u < l; u++)
- c = v[u], c.percentage = 0 < i && (c.visible || !h) ? c.y / i * 100 : 0, c.total = i;
- }, w.defaultOptions = O(V.defaultOptions, {
- center: [null, null],
- clip: !1,
- colorByPoint: !0,
- dataLabels: { allowOverlap: !0, connectorPadding: 5, connectorShape: "fixedOffset", crookDistance: "70%", distance: 30, enabled: !0, formatter: function() {
- return this.point.isNull ? void 0 : this.point.name;
- }, softConnector: !0, x: 0 },
- fillColor: void 0,
- ignoreHiddenPoint: !0,
- inactiveOtherPoints: !0,
- legendType: "point",
- marker: null,
- size: null,
- showInLegend: !1,
- slicedOffset: 10,
- stickyTracking: !1,
- tooltip: { followPointer: !0 },
- borderColor: "#ffffff",
- borderWidth: 1,
- lineWidth: void 0,
- states: { hover: { brightness: 0.1 } }
- }), w;
- }(V), d(B.prototype, { axisTypes: [], directTouch: !0, drawGraph: void 0, drawLegendSymbol: U.drawRectangle, drawTracker: N.prototype.drawTracker, getCenter: y.getCenter, getSymbol: D, isCartesian: !1, noSharedTooltip: !0, pointAttribs: N.prototype.pointAttribs, pointClass: H, requireSorting: !1, searchPoint: D, trackerGroups: ["group", "dataLabelsGroup"] }), G.registerSeriesType("pie", B), B;
- }), M(o, "Series/Pie/PieDataLabel.js", [
- o["Core/Series/DataLabel.js"],
- o["Core/Globals.js"],
- o["Core/Renderer/RendererUtilities.js"],
- o["Core/Series/SeriesRegistry.js"],
- o["Core/Utilities.js"]
- ], function(y, N, D, U, H) {
- var V = N.noop, G = D.distribute, R = U.series, B = H.arrayMax, S = H.clamp, x = H.defined, f = H.merge, d = H.pick, T = H.relativeLength, O;
- return function(j) {
- function k() {
- var h = this, u = h.data, i = h.chart, c = h.options.dataLabels || {}, a = c.connectorPadding, t = i.plotWidth, s = i.plotHeight, n = i.plotLeft, P = Math.round(i.chartWidth / 3), _ = h.center, I = _[2] / 2, W = _[1], E = [[], []], X = [0, 0, 0, 0], g = h.dataLabelPositioners, m, L, z, $, Q, A, F, Y, Z, q, it, et;
- h.visible && (c.enabled || h._hasPointLabels) && (u.forEach(function(nt) {
- nt.dataLabel && nt.visible && nt.dataLabel.shortened && (nt.dataLabel.attr({ width: "auto" }).css({ width: "auto", textOverflow: "clip" }), nt.dataLabel.shortened = !1);
- }), R.prototype.drawDataLabels.apply(h), u.forEach(function(nt) {
- nt.dataLabel && (nt.visible ? (E[nt.half].push(nt), nt.dataLabel._pos = null, !x(c.style.width) && !x(nt.options.dataLabels && nt.options.dataLabels.style && nt.options.dataLabels.style.width) && nt.dataLabel.getBBox().width > P && (nt.dataLabel.css({ width: Math.round(0.7 * P) + "px" }), nt.dataLabel.shortened = !0)) : (nt.dataLabel = nt.dataLabel.destroy(), nt.dataLabels && nt.dataLabels.length === 1 && delete nt.dataLabels));
- }), E.forEach(function(nt, rt) {
- var ct = nt.length, gt = [], dt;
- if (ct) {
- if (h.sortByAngle(nt, rt - 0.5), 0 < h.maxLabelDistance) {
- var ht = Math.max(0, W - I - h.maxLabelDistance), at = Math.min(W + I + h.maxLabelDistance, i.plotHeight);
- nt.forEach(function(J) {
- 0 < J.labelDistance && J.dataLabel && (J.top = Math.max(0, W - I - J.labelDistance), J.bottom = Math.min(W + I + J.labelDistance, i.plotHeight), dt = J.dataLabel.getBBox().height || 21, J.distributeBox = { target: J.labelPosition.natural.y - J.top + dt / 2, size: dt, rank: J.y }, gt.push(J.distributeBox));
- }), ht = at + dt - ht, G(gt, ht, ht / 5);
- }
- for (it = 0; it < ct; it++) {
- if (m = nt[it], A = m.labelPosition, $ = m.dataLabel, q = m.visible === !1 ? "hidden" : "inherit", Z = ht = A.natural.y, gt && x(m.distributeBox) && (typeof m.distributeBox.pos > "u" ? q = "hidden" : (F = m.distributeBox.size, Z = g.radialDistributionY(m))), delete m.positionIndex, c.justify)
- Y = g.justify(m, I, _);
- else
- switch (c.alignTo) {
- case "connectors":
- Y = g.alignToConnectors(nt, rt, t, n);
- break;
- case "plotEdges":
- Y = g.alignToPlotEdges($, rt, t, n);
- break;
- default:
- Y = g.radialDistributionX(h, m, Z, ht);
- }
- $._attr = { visibility: q, align: A.alignment }, et = m.options.dataLabels || {}, $._pos = { x: Y + d(et.x, c.x) + ({ left: a, right: -a }[A.alignment] || 0), y: Z + d(et.y, c.y) - 10 }, A.final.x = Y, A.final.y = Z, d(c.crop, !0) && (Q = $.getBBox().width, ht = null, Y - Q < a && rt === 1 ? (ht = Math.round(Q - Y + a), X[3] = Math.max(ht, X[3])) : Y + Q > t - a && rt === 0 && (ht = Math.round(Y + Q - t + a), X[1] = Math.max(ht, X[1])), 0 > Z - F / 2 ? X[0] = Math.max(Math.round(-Z + F / 2), X[0]) : Z + F / 2 > s && (X[2] = Math.max(Math.round(Z + F / 2 - s), X[2])), $.sideOverflow = ht);
- }
- }
- }), B(X) === 0 || this.verifyDataLabelOverflow(X)) && (this.placeDataLabels(), this.points.forEach(function(nt) {
- if (et = f(c, nt.options.dataLabels), L = d(et.connectorWidth, 1)) {
- var rt;
- z = nt.connector, ($ = nt.dataLabel) && $._pos && nt.visible && 0 < nt.labelDistance ? (q = $._attr.visibility, (rt = !z) && (nt.connector = z = i.renderer.path().addClass("highcharts-data-label-connector highcharts-color-" + nt.colorIndex + (nt.className ? " " + nt.className : "")).add(h.dataLabelsGroup), i.styledMode || z.attr({ "stroke-width": L, stroke: et.connectorColor || nt.color || "#666666" })), z[rt ? "attr" : "animate"]({ d: nt.getConnectorPath() }), z.attr("visibility", q)) : z && (nt.connector = z.destroy());
- }
- }));
- }
- function b() {
- this.points.forEach(function(h) {
- var u = h.dataLabel, i;
- u && h.visible && ((i = u._pos) ? (u.sideOverflow && (u._attr.width = Math.max(u.getBBox().width - u.sideOverflow, 0), u.css({ width: u._attr.width + "px", textOverflow: (this.options.dataLabels.style || {}).textOverflow || "ellipsis" }), u.shortened = !0), u.attr(u._attr), u[u.moved ? "animate" : "attr"](i), u.moved = !0) : u && u.attr({ y: -9999 })), delete h.distributeBox;
- }, this);
- }
- function w(h) {
- var u = this.center, i = this.options, c = i.center, a = i.minSize || 80, t = i.size !== null;
- if (!t) {
- if (c[0] !== null)
- var s = Math.max(u[2] - Math.max(h[1], h[3]), a);
- else
- s = Math.max(u[2] - h[1] - h[3], a), u[0] += (h[3] - h[1]) / 2;
- c[1] !== null ? s = S(s, a, u[2] - Math.max(h[0], h[2])) : (s = S(s, a, u[2] - h[0] - h[2]), u[1] += (h[0] - h[2]) / 2), s < u[2] ? (u[2] = s, u[3] = Math.min(T(i.innerSize || 0, s), s), this.translate(u), this.drawDataLabels && this.drawDataLabels()) : t = !0;
- }
- return t;
- }
- var v = [], l = { radialDistributionY: function(h) {
- return h.top + h.distributeBox.pos;
- }, radialDistributionX: function(h, u, i, c) {
- return h.getX(i < u.top + 2 || i > u.bottom - 2 ? c : i, u.half, u);
- }, justify: function(h, u, i) {
- return i[0] + (h.half ? -1 : 1) * (u + h.labelDistance);
- }, alignToPlotEdges: function(h, u, i, c) {
- return h = h.getBBox().width, u ? h + c : i - h - c;
- }, alignToConnectors: function(h, u, i, c) {
- var a = 0, t;
- return h.forEach(function(s) {
- t = s.dataLabel.getBBox().width, t > a && (a = t);
- }), u ? a + c : i - a - c;
- } };
- j.compose = function(h) {
- y.compose(R), v.indexOf(h) === -1 && (v.push(h), h = h.prototype, h.dataLabelPositioners = l, h.alignDataLabel = V, h.drawDataLabels = k, h.placeDataLabels = b, h.verifyDataLabelOverflow = w);
- };
- }(O || (O = {})), O;
- }), M(o, "Extensions/OverlappingDataLabels.js", [o["Core/Chart/Chart.js"], o["Core/Utilities.js"]], function(y, N) {
- function D(S, x) {
- var f = !1;
- if (S) {
- var d = S.newOpacity;
- S.oldOpacity !== d && (S.alignAttr && S.placed ? (S[d ? "removeClass" : "addClass"]("highcharts-data-label-hidden"), f = !0, S.alignAttr.opacity = d, S[S.isOld ? "animate" : "attr"](S.alignAttr, null, function() {
- x.styledMode || S.css({ pointerEvents: d ? "auto" : "none" });
- }), H(x, "afterHideOverlappingLabel")) : S.attr({ opacity: d })), S.isOld = !0;
- }
- return f;
- }
- var U = N.addEvent, H = N.fireEvent, V = N.isArray, G = N.isNumber, R = N.objectEach, B = N.pick;
- U(y, "render", function() {
- var S = this, x = [];
- (this.labelCollectors || []).forEach(function(f) {
- x = x.concat(f());
- }), (this.yAxis || []).forEach(function(f) {
- f.stacking && f.options.stackLabels && !f.options.stackLabels.allowOverlap && R(f.stacking.stacks, function(d) {
- R(d, function(T) {
- T.label && T.label.visibility !== "hidden" && x.push(T.label);
- });
- });
- }), (this.series || []).forEach(function(f) {
- var d = f.options.dataLabels;
- f.visible && (d.enabled !== !1 || f._hasPointLabels) && (d = function(T) {
- return T.forEach(function(O) {
- O.visible && (V(O.dataLabels) ? O.dataLabels : O.dataLabel ? [O.dataLabel] : []).forEach(function(j) {
- var k = j.options;
- j.labelrank = B(k.labelrank, O.labelrank, O.shapeArgs && O.shapeArgs.height), k.allowOverlap ? (j.oldOpacity = j.opacity, j.newOpacity = 1, D(j, S)) : x.push(j);
- });
- });
- }, d(f.nodes || []), d(f.points));
- }), this.hideOverlappingLabels(x);
- }), y.prototype.hideOverlappingLabels = function(S) {
- var x = this, f = S.length, d = x.renderer, T, O, j, k = !1, b = function(l) {
- var h, u = l.box ? 0 : l.padding || 0, i = h = 0, c;
- if (l && (!l.alignAttr || l.placed)) {
- var a = l.alignAttr || { x: l.attr("x"), y: l.attr("y") }, t = l.parentGroup;
- l.width || (h = l.getBBox(), l.width = h.width, l.height = h.height, h = d.fontMetrics(null, l.element).h);
- var s = l.width - 2 * u;
- return (c = { left: "0", center: "0.5", right: "1" }[l.alignValue]) ? i = +c * s : G(l.x) && Math.round(l.x) !== l.translateX && (i = l.x - l.translateX), { x: a.x + (t.translateX || 0) + u - (i || 0), y: a.y + (t.translateY || 0) + u - h, width: l.width - 2 * u, height: l.height - 2 * u };
- }
- };
- for (O = 0; O < f; O++)
- (T = S[O]) && (T.oldOpacity = T.opacity, T.newOpacity = 1, T.absoluteBox = b(T));
- for (S.sort(function(l, h) {
- return (h.labelrank || 0) - (l.labelrank || 0);
- }), O = 0; O < f; O++) {
- var w = (b = S[O]) && b.absoluteBox;
- for (T = O + 1; T < f; ++T) {
- var v = (j = S[T]) && j.absoluteBox;
- !w || !v || b === j || b.newOpacity === 0 || j.newOpacity === 0 || v.x >= w.x + w.width || v.x + v.width <= w.x || v.y >= w.y + w.height || v.y + v.height <= w.y || ((b.labelrank < j.labelrank ? b : j).newOpacity = 0);
- }
- }
- S.forEach(function(l) {
- D(l, x) && (k = !0);
- }), k && H(x, "afterHideAllOverlappingLabels");
- };
- }), M(
- o,
- "Core/Responsive.js",
- [o["Core/Utilities.js"]],
- function(y) {
- var N = y.extend, D = y.find, U = y.isArray, H = y.isObject, V = y.merge, G = y.objectEach, R = y.pick, B = y.splat, S = y.uniqueKey, x;
- return function(f) {
- var d = [];
- f.compose = function(O) {
- return d.indexOf(O) === -1 && (d.push(O), N(O.prototype, T.prototype)), O;
- };
- var T = function() {
- function O() {
- }
- return O.prototype.currentOptions = function(j) {
- function k(v, l, h, u) {
- var i;
- G(v, function(c, a) {
- if (!u && -1 < b.collectionsWithUpdate.indexOf(a) && l[a])
- for (c = B(c), h[a] = [], i = 0; i < Math.max(c.length, l[a].length); i++)
- l[a][i] && (c[i] === void 0 ? h[a][i] = l[a][i] : (h[a][i] = {}, k(c[i], l[a][i], h[a][i], u + 1)));
- else
- H(c) ? (h[a] = U(c) ? [] : {}, k(c, l[a] || {}, h[a], u + 1)) : h[a] = typeof l[a] > "u" ? null : l[a];
- });
- }
- var b = this, w = {};
- return k(j, this.options, w, 0), w;
- }, O.prototype.matchResponsiveRule = function(j, k) {
- var b = j.condition;
- (b.callback || function() {
- return this.chartWidth <= R(b.maxWidth, Number.MAX_VALUE) && this.chartHeight <= R(b.maxHeight, Number.MAX_VALUE) && this.chartWidth >= R(b.minWidth, 0) && this.chartHeight >= R(b.minHeight, 0);
- }).call(this) && k.push(j._id);
- }, O.prototype.setResponsive = function(j, k) {
- var b = this, w = this.options.responsive, v = this.currentResponsive, l = [];
- !k && w && w.rules && w.rules.forEach(function(h) {
- typeof h._id > "u" && (h._id = S()), b.matchResponsiveRule(h, l);
- }, this), k = V.apply(void 0, l.map(function(h) {
- return D((w || {}).rules || [], function(u) {
- return u._id === h;
- });
- }).map(function(h) {
- return h && h.chartOptions;
- })), k.isResponsiveOptions = !0, l = l.toString() || void 0, l !== (v && v.ruleIds) && (v && this.update(v.undoOptions, j, !0), l ? (v = this.currentOptions(k), v.isResponsiveOptions = !0, this.currentResponsive = { ruleIds: l, mergedOptions: k, undoOptions: v }, this.update(k, j, !0)) : this.currentResponsive = void 0);
- }, O;
- }();
- }(x || (x = {})), x;
- }
- ), M(o, "masters/highcharts.src.js", [
- o["Core/Globals.js"],
- o["Core/Utilities.js"],
- o["Core/DefaultOptions.js"],
- o["Core/Animation/Fx.js"],
- o["Core/Animation/AnimationUtilities.js"],
- o["Core/Renderer/HTML/AST.js"],
- o["Core/FormatUtilities.js"],
- o["Core/Renderer/RendererUtilities.js"],
- o["Core/Renderer/SVG/SVGElement.js"],
- o["Core/Renderer/SVG/SVGRenderer.js"],
- o["Core/Renderer/HTML/HTMLElement.js"],
- o["Core/Renderer/HTML/HTMLRenderer.js"],
- o["Core/Axis/Axis.js"],
- o["Core/Axis/DateTimeAxis.js"],
- o["Core/Axis/LogarithmicAxis.js"],
- o["Core/Axis/PlotLineOrBand/PlotLineOrBand.js"],
- o["Core/Axis/Tick.js"],
- o["Core/Tooltip.js"],
- o["Core/Series/Point.js"],
- o["Core/Pointer.js"],
- o["Core/MSPointer.js"],
- o["Core/Legend/Legend.js"],
- o["Core/Chart/Chart.js"],
- o["Core/Series/Series.js"],
- o["Core/Series/SeriesRegistry.js"],
- o["Series/Column/ColumnSeries.js"],
- o["Series/Column/ColumnDataLabel.js"],
- o["Series/Pie/PieSeries.js"],
- o["Series/Pie/PieDataLabel.js"],
- o["Core/Series/DataLabel.js"],
- o["Core/Responsive.js"],
- o["Core/Color/Color.js"],
- o["Core/Time.js"]
- ], function(y, N, D, U, H, V, G, R, B, S, x, f, d, T, O, j, k, b, w, v, l, h, u, i, c, a, t, s, n, P, _, I, W) {
- return y.animate = H.animate, y.animObject = H.animObject, y.getDeferredAnimation = H.getDeferredAnimation, y.setAnimation = H.setAnimation, y.stop = H.stop, y.timers = U.timers, y.AST = V, y.Axis = d, y.Chart = u, y.chart = u.chart, y.Fx = U, y.Legend = h, y.PlotLineOrBand = j, y.Point = w, y.Pointer = l.isRequired() ? l : v, y.Series = i, y.SVGElement = B, y.SVGRenderer = S, y.Tick = k, y.Time = W, y.Tooltip = b, y.Color = I, y.color = I.parse, f.compose(S), x.compose(B), y.defaultOptions = D.defaultOptions, y.getOptions = D.getOptions, y.time = D.defaultTime, y.setOptions = D.setOptions, y.dateFormat = G.dateFormat, y.format = G.format, y.numberFormat = G.numberFormat, y.addEvent = N.addEvent, y.arrayMax = N.arrayMax, y.arrayMin = N.arrayMin, y.attr = N.attr, y.clearTimeout = N.clearTimeout, y.correctFloat = N.correctFloat, y.createElement = N.createElement, y.css = N.css, y.defined = N.defined, y.destroyObjectProperties = N.destroyObjectProperties, y.discardElement = N.discardElement, y.distribute = R.distribute, y.erase = N.erase, y.error = N.error, y.extend = N.extend, y.extendClass = N.extendClass, y.find = N.find, y.fireEvent = N.fireEvent, y.getMagnitude = N.getMagnitude, y.getStyle = N.getStyle, y.inArray = N.inArray, y.isArray = N.isArray, y.isClass = N.isClass, y.isDOMElement = N.isDOMElement, y.isFunction = N.isFunction, y.isNumber = N.isNumber, y.isObject = N.isObject, y.isString = N.isString, y.keys = N.keys, y.merge = N.merge, y.normalizeTickInterval = N.normalizeTickInterval, y.objectEach = N.objectEach, y.offset = N.offset, y.pad = N.pad, y.pick = N.pick, y.pInt = N.pInt, y.relativeLength = N.relativeLength, y.removeEvent = N.removeEvent, y.seriesType = c.seriesType, y.splat = N.splat, y.stableSort = N.stableSort, y.syncTimeout = N.syncTimeout, y.timeUnits = N.timeUnits, y.uniqueKey = N.uniqueKey, y.useSerialIds = N.useSerialIds, y.wrap = N.wrap, t.compose(a), P.compose(i), T.compose(d), O.compose(d), n.compose(s), j.compose(d), _.compose(u), y;
- }), o["masters/highcharts.src.js"]._modules = o, o["masters/highcharts.src.js"];
- });
- })(ru);
- var V0 = ru.exports;
- const ts = /* @__PURE__ */ Cn(V0);
- var nu = { exports: {} };
- (function(r) {
- (function(p) {
- r.exports ? (p.default = p, r.exports = p) : p(typeof Highcharts < "u" ? Highcharts : void 0);
- })(function(p) {
- function M(o, y, N, D) {
- o.hasOwnProperty(y) || (o[y] = D.apply(null, N));
- }
- p = p ? p._modules : {}, M(p, "Extensions/Pane.js", [
- p["Core/Chart/Chart.js"],
- p["Series/CenteredUtilities.js"],
- p["Core/Globals.js"],
- p["Core/Pointer.js"],
- p["Core/Utilities.js"]
- ], function(o, y, N, D, U) {
- function H(x, f, d) {
- return Math.sqrt(Math.pow(x - d[0], 2) + Math.pow(f - d[1], 2)) <= d[2] / 2;
- }
- var V = U.addEvent, G = U.extend, R = U.merge, B = U.pick, S = U.splat;
- return o.prototype.collectionsWithUpdate.push("pane"), U = function() {
- function x(f, d) {
- this.options = this.chart = this.center = this.background = void 0, this.coll = "pane", this.defaultOptions = { center: ["50%", "50%"], size: "85%", innerSize: "0%", startAngle: 0 }, this.defaultBackgroundOptions = { shape: "circle", borderWidth: 1, borderColor: "#cccccc", backgroundColor: { linearGradient: {
- x1: 0,
- y1: 0,
- x2: 0,
- y2: 1
- }, stops: [[0, "#ffffff"], [1, "#e6e6e6"]] }, from: -Number.MAX_VALUE, innerRadius: 0, to: Number.MAX_VALUE, outerRadius: "105%" }, this.init(f, d);
- }
- return x.prototype.init = function(f, d) {
- this.chart = d, this.background = [], d.pane.push(this), this.setOptions(f);
- }, x.prototype.setOptions = function(f) {
- this.options = R(this.defaultOptions, this.chart.angular ? { background: {} } : void 0, f);
- }, x.prototype.render = function() {
- var f = this.options, d = this.options.background, T = this.chart.renderer;
- if (this.group || (this.group = T.g("pane-group").attr({ zIndex: f.zIndex || 0 }).add()), this.updateCenter(), d)
- for (d = S(d), f = Math.max(d.length, this.background.length || 0), T = 0; T < f; T++)
- d[T] && this.axis ? this.renderBackground(R(this.defaultBackgroundOptions, d[T]), T) : this.background[T] && (this.background[T] = this.background[T].destroy(), this.background.splice(T, 1));
- }, x.prototype.renderBackground = function(f, d) {
- var T = "animate", O = { class: "highcharts-pane " + (f.className || "") };
- this.chart.styledMode || G(O, { fill: f.backgroundColor, stroke: f.borderColor, "stroke-width": f.borderWidth }), this.background[d] || (this.background[d] = this.chart.renderer.path().add(this.group), T = "attr"), this.background[d][T]({ d: this.axis.getPlotBandPath(f.from, f.to, f) }).attr(O);
- }, x.prototype.updateCenter = function(f) {
- this.center = (f || this.axis || {}).center = y.getCenter.call(this);
- }, x.prototype.update = function(f, d) {
- R(!0, this.options, f), this.setOptions(this.options), this.render(), this.chart.axes.forEach(function(T) {
- T.pane === this && (T.pane = null, T.update({}, d));
- }, this);
- }, x;
- }(), o.prototype.getHoverPane = function(x) {
- var f = this, d;
- return x && f.pane.forEach(function(T) {
- var O = x.chartX - f.plotLeft, j = x.chartY - f.plotTop;
- H(f.inverted ? j : O, f.inverted ? O : j, T.center) && (d = T);
- }), d;
- }, V(o, "afterIsInsidePlot", function(x) {
- this.polar && (x.isInsidePlot = this.pane.some(function(f) {
- return H(x.x, x.y, f.center);
- }));
- }), V(D, "beforeGetHoverData", function(x) {
- var f = this.chart;
- f.polar ? (f.hoverPane = f.getHoverPane(x), x.filter = function(d) {
- return d.visible && !(!x.shared && d.directTouch) && B(d.options.enableMouseTracking, !0) && (!f.hoverPane || d.xAxis.pane === f.hoverPane);
- }) : f.hoverPane = void 0;
- }), V(
- D,
- "afterGetHoverData",
- function(x) {
- var f = this.chart;
- x.hoverPoint && x.hoverPoint.plotX && x.hoverPoint.plotY && f.hoverPane && !H(x.hoverPoint.plotX, x.hoverPoint.plotY, f.hoverPane.center) && (x.hoverPoint = void 0);
- }
- ), N.Pane = U, N.Pane;
- }), M(p, "Core/Axis/RadialAxis.js", [p["Core/Axis/AxisDefaults.js"], p["Core/DefaultOptions.js"], p["Core/Globals.js"], p["Core/Utilities.js"]], function(o, y, N, D) {
- var U = y.defaultOptions, H = N.noop, V = D.addEvent, G = D.correctFloat, R = D.defined, B = D.extend, S = D.fireEvent, x = D.merge, f = D.pick, d = D.relativeLength, T = D.wrap, O;
- return function(j) {
- function k() {
- this.autoConnect = this.isCircular && typeof f(this.userMax, this.options.max) > "u" && G(this.endAngleRad - this.startAngleRad) === G(2 * Math.PI), !this.isCircular && this.chart.inverted && this.max++, this.autoConnect && (this.max += this.categories && 1 || this.pointRange || this.closestPointRange || 0);
- }
- function b() {
- var Z = this;
- return function() {
- if (Z.isRadial && Z.tickPositions && Z.options.labels && Z.options.labels.allowOverlap !== !0)
- return Z.tickPositions.map(function(q) {
- return Z.ticks[q] && Z.ticks[q].label;
- }).filter(function(q) {
- return !!q;
- });
- };
- }
- function w() {
- return H;
- }
- function v(Z, q, it) {
- var et = this.pane.center, nt = Z.value;
- if (this.isCircular) {
- if (R(nt))
- Z.point && (rt = Z.point.shapeArgs || {}, rt.start && (nt = this.chart.inverted ? this.translate(Z.point.rectPlotY, !0) : Z.point.x));
- else {
- var rt = Z.chartX || 0, ct = Z.chartY || 0;
- nt = this.translate(Math.atan2(ct - it, rt - q) - this.startAngleRad, !0);
- }
- Z = this.getPosition(nt), rt = Z.x, ct = Z.y;
- } else
- R(nt) || (rt = Z.chartX, ct = Z.chartY), R(rt) && R(ct) && (it = et[1] + this.chart.plotTop, nt = this.translate(Math.min(Math.sqrt(Math.pow(rt - q, 2) + Math.pow(ct - it, 2)), et[2] / 2) - et[3] / 2, !0));
- return [nt, rt || 0, ct || 0];
- }
- function l(Z, q, it) {
- Z = this.pane.center;
- var et = this.chart, nt = this.left || 0, rt = this.top || 0, ct = f(q, Z[2] / 2 - this.offset);
- return typeof it > "u" && (it = this.horiz ? 0 : this.center && -this.center[3] / 2), it && (ct += it), this.isCircular || typeof q < "u" ? (q = this.chart.renderer.symbols.arc(nt + Z[0], rt + Z[1], ct, ct, { start: this.startAngleRad, end: this.endAngleRad, open: !0, innerR: 0 }), q.xBounds = [nt + Z[0]], q.yBounds = [rt + Z[1] - ct]) : (q = this.postTranslate(this.angleRad, ct), q = [["M", this.center[0] + et.plotLeft, this.center[1] + et.plotTop], ["L", q.x, q.y]]), q;
- }
- function h() {
- this.constructor.prototype.getOffset.call(this), this.chart.axisOffset[this.side] = 0;
- }
- function u(Z, q, it) {
- var et = this.chart, nt = function(yt) {
- if (typeof yt == "string") {
- var vt = parseInt(yt, 10);
- return J.test(yt) && (vt = vt * gt / 100), vt;
- }
- return yt;
- }, rt = this.center, ct = this.startAngleRad, gt = rt[2] / 2, dt = Math.min(this.offset, 0), ht = this.left || 0, at = this.top || 0, J = /%$/, tt = this.isCircular, ot = f(nt(it.outerRadius), gt), lt = nt(it.innerRadius);
- if (nt = f(nt(it.thickness), 10), this.options.gridLineInterpolation === "polygon")
- dt = this.getPlotLinePath({ value: Z }).concat(this.getPlotLinePath({ value: q, reverse: !0 }));
- else {
- if (Z = Math.max(Z, this.min), q = Math.min(q, this.max), Z = this.translate(Z), q = this.translate(q), tt || (ot = Z || 0, lt = q || 0), it.shape !== "circle" && tt)
- it = ct + (Z || 0), ct += q || 0;
- else {
- it = -Math.PI / 2, ct = 1.5 * Math.PI;
- var pt = !0;
- }
- ot -= dt, dt = et.renderer.symbols.arc(ht + rt[0], at + rt[1], ot, ot, { start: Math.min(it, ct), end: Math.max(it, ct), innerR: f(lt, ot - (nt - dt)), open: pt }), tt && (tt = (ct + it) / 2, ht = ht + rt[0] + rt[2] / 2 * Math.cos(tt), dt.xBounds = tt > -Math.PI / 2 && tt < Math.PI / 2 ? [ht, et.plotWidth] : [0, ht], dt.yBounds = [at + rt[1] + rt[2] / 2 * Math.sin(tt)], dt.yBounds[0] += tt > -Math.PI && 0 > tt || tt > Math.PI ? -10 : 10);
- }
- return dt;
- }
- function i(Z) {
- var q = this, it = this.pane.center, et = this.chart, nt = et.inverted, rt = Z.reverse, ct = this.pane.options.background ? this.pane.options.background[0] || this.pane.options.background : {}, gt = ct.innerRadius || "0%", dt = ct.outerRadius || "100%", ht = it[0] + et.plotLeft, at = it[1] + et.plotTop, J = this.height, tt = Z.isCrosshair;
- ct = it[3] / 2;
- var ot = Z.value, lt, pt = this.getPosition(ot), yt = pt.x;
- if (pt = pt.y, tt && (pt = this.getCrosshairPosition(Z, ht, at), ot = pt[0], yt = pt[1], pt = pt[2]), this.isCircular)
- ot = Math.sqrt(Math.pow(yt - ht, 2) + Math.pow(pt - at, 2)), rt = typeof gt == "string" ? d(gt, 1) : gt / ot, et = typeof dt == "string" ? d(dt, 1) : dt / ot, it && ct && (ct /= ot, rt < ct && (rt = ct), et < ct && (et = ct)), it = [["M", ht + rt * (yt - ht), at - rt * (at - pt)], ["L", yt - (1 - et) * (yt - ht), pt + (1 - et) * (at - pt)]];
- else if ((ot = this.translate(ot)) && (0 > ot || ot > J) && (ot = 0), this.options.gridLineInterpolation === "circle")
- it = this.getLinePath(0, ot, ct);
- else if (it = [], et[nt ? "yAxis" : "xAxis"].forEach(function(vt) {
- vt.pane === q.pane && (lt = vt);
- }), lt)
- for (ht = lt.tickPositions, lt.autoConnect && (ht = ht.concat([ht[0]])), rt && (ht = ht.slice().reverse()), ot && (ot += ct), at = 0; at < ht.length; at++)
- ct = lt.getPosition(ht[at], ot), it.push(at ? ["L", ct.x, ct.y] : ["M", ct.x, ct.y]);
- return it;
- }
- function c(Z, q) {
- return Z = this.translate(Z), this.postTranslate(this.isCircular ? Z : this.angleRad, f(this.isCircular ? q : 0 > Z ? 0 : Z, this.center[2] / 2) - this.offset);
- }
- function a() {
- var Z = this.center, q = this.chart, it = this.options.title;
- return { x: q.plotLeft + Z[0] + (it.x || 0), y: q.plotTop + Z[1] - { high: 0.5, middle: 0.25, low: 0 }[it.align] * Z[2] + (it.y || 0) };
- }
- function t(Z) {
- Z.beforeSetTickPositions = k, Z.createLabelCollector = b, Z.getCrosshairPosition = v, Z.getLinePath = l, Z.getOffset = h, Z.getPlotBandPath = u, Z.getPlotLinePath = i, Z.getPosition = c, Z.getTitlePosition = a, Z.postTranslate = X, Z.setAxisSize = m, Z.setAxisTranslation = L, Z.setOptions = z;
- }
- function s() {
- var Z = this.chart, q = this.options, it = this.pane, et = it && it.options;
- Z.angular && this.isXAxis || !it || !Z.angular && !Z.polar || (this.angleRad = (q.angle || 0) * Math.PI / 180, this.startAngleRad = (et.startAngle - 90) * Math.PI / 180, this.endAngleRad = (f(et.endAngle, et.startAngle + 360) - 90) * Math.PI / 180, this.offset = q.offset || 0);
- }
- function n(Z) {
- this.isRadial && (Z.align = void 0, Z.preventDefault());
- }
- function P() {
- if (this.chart && this.chart.labelCollectors) {
- var Z = this.labelCollector ? this.chart.labelCollectors.indexOf(this.labelCollector) : -1;
- 0 <= Z && this.chart.labelCollectors.splice(Z, 1);
- }
- }
- function _(Z) {
- var q = this.chart, it = q.inverted, et = q.angular, nt = q.polar, rt = this.isXAxis, ct = this.coll, gt = et && rt, dt = q.options;
- Z = Z.userOptions.pane || 0, Z = this.pane = q.pane && q.pane[Z];
- var ht;
- ct === "colorAxis" ? this.isRadial = !1 : (et ? (gt ? (this.isHidden = !0, this.createLabelCollector = w, this.getOffset = H, this.render = this.redraw = g, this.setTitle = this.setCategories = this.setScale = H) : t(this), (ht = !rt) && (this.defaultPolarOptions = F)) : nt && (t(this), this.defaultPolarOptions = (ht = this.horiz) ? A : x(ct === "xAxis" ? o.defaultXAxisOptions : o.defaultYAxisOptions, Y), it && ct === "yAxis" && (this.defaultPolarOptions.stackLabels = o.defaultYAxisOptions.stackLabels, this.defaultPolarOptions.reversedStacks = !0)), et || nt ? (this.isRadial = !0, dt.chart.zoomType = null, this.labelCollector || (this.labelCollector = this.createLabelCollector()), this.labelCollector && q.labelCollectors.push(this.labelCollector)) : this.isRadial = !1, Z && ht && (Z.axis = this), this.isCircular = ht);
- }
- function I() {
- this.isRadial && this.beforeSetTickPositions();
- }
- function W(Z) {
- var q = this.label;
- if (q) {
- var it = this.axis, et = q.getBBox(), nt = it.options.labels, rt = (it.translate(this.pos) + it.startAngleRad + Math.PI / 2) / Math.PI * 180 % 360, ct = Math.round(rt), gt = R(nt.y) ? 0 : 0.3 * -et.height, dt = nt.y, ht = 20, at = nt.align, J = "end", tt = 0 > ct ? ct + 360 : ct, ot = tt, lt = 0, pt = 0;
- if (it.isRadial) {
- var yt = it.getPosition(this.pos, it.center[2] / 2 + d(f(nt.distance, -25), it.center[2] / 2, -it.center[2] / 2));
- nt.rotation === "auto" ? q.attr({ rotation: rt }) : R(dt) || (dt = it.chart.renderer.fontMetrics(q.styles && q.styles.fontSize).b - et.height / 2), R(at) || (it.isCircular ? (et.width > it.len * it.tickInterval / (it.max - it.min) && (ht = 0), at = rt > ht && rt < 180 - ht ? "left" : rt > 180 + ht && rt < 360 - ht ? "right" : "center") : at = "center", q.attr({ align: at })), at === "auto" && it.tickPositions.length === 2 && it.isCircular && (90 < tt && 180 > tt ? tt = 180 - tt : 270 < tt && 360 >= tt && (tt = 540 - tt), 180 < ot && 360 >= ot && (ot = 360 - ot), (it.pane.options.startAngle === ct || it.pane.options.startAngle === ct + 360 || it.pane.options.startAngle === ct - 360) && (J = "start"), at = -90 <= ct && 90 >= ct || -360 <= ct && -270 >= ct || 270 <= ct && 360 >= ct ? J === "start" ? "right" : "left" : J === "start" ? "left" : "right", 70 < ot && 110 > ot && (at = "center"), 15 > tt || 180 <= tt && 195 > tt ? lt = 0.3 * et.height : 15 <= tt && 35 >= tt ? lt = J === "start" ? 0 : 0.75 * et.height : 195 <= tt && 215 >= tt ? lt = J === "start" ? 0.75 * et.height : 0 : 35 < tt && 90 >= tt ? lt = J === "start" ? 0.25 * -et.height : et.height : 215 < tt && 270 >= tt && (lt = J === "start" ? et.height : 0.25 * -et.height), 15 > ot ? pt = J === "start" ? 0.15 * -et.height : 0.15 * et.height : 165 < ot && 180 >= ot && (pt = J === "start" ? 0.15 * et.height : 0.15 * -et.height), q.attr({ align: at }), q.translate(
- pt,
- lt + gt
- )), Z.pos.x = yt.x + (nt.x || 0), Z.pos.y = yt.y + (dt || 0);
- }
- }
- }
- function E(Z) {
- this.axis.getPosition && B(Z.pos, this.axis.getPosition(this.pos));
- }
- function X(Z, q) {
- var it = this.chart, et = this.center;
- return Z = this.startAngleRad + Z, { x: it.plotLeft + et[0] + Math.cos(Z) * q, y: it.plotTop + et[1] + Math.sin(Z) * q };
- }
- function g() {
- this.isDirty = !1;
- }
- function m() {
- if (this.constructor.prototype.setAxisSize.call(this), this.isRadial) {
- this.pane.updateCenter(this);
- var Z = this.center = this.pane.center.slice();
- if (this.isCircular)
- this.sector = this.endAngleRad - this.startAngleRad;
- else {
- var q = this.postTranslate(this.angleRad, Z[3] / 2);
- Z[0] = q.x - this.chart.plotLeft, Z[1] = q.y - this.chart.plotTop;
- }
- this.len = this.width = this.height = (Z[2] - Z[3]) * f(this.sector, 1) / 2;
- }
- }
- function L() {
- this.constructor.prototype.setAxisTranslation.call(this), this.center && (this.transA = this.isCircular ? (this.endAngleRad - this.startAngleRad) / (this.max - this.min || 1) : (this.center[2] - this.center[3]) / 2 / (this.max - this.min || 1), this.minPixelPadding = this.isXAxis ? this.transA * this.minPointOffset : 0);
- }
- function z(Z) {
- Z = this.options = x(this.constructor.defaultOptions, this.defaultPolarOptions, U[this.coll], Z), Z.plotBands || (Z.plotBands = []), S(this, "afterSetOptions");
- }
- function $(Z, q, it, et, nt, rt, ct) {
- var gt = this.axis;
- return gt.isRadial ? (Z = gt.getPosition(this.pos, gt.center[2] / 2 + et), q = ["M", q, it, "L", Z.x, Z.y]) : q = Z.call(this, q, it, et, nt, rt, ct), q;
- }
- var Q = [], A = { gridLineWidth: 1, labels: { align: void 0, distance: 15, x: 0, y: void 0, style: { textOverflow: "none" } }, maxPadding: 0, minPadding: 0, showLastLabel: !1, tickLength: 0 }, F = {
- labels: { align: "center", x: 0, y: void 0 },
- minorGridLineWidth: 0,
- minorTickInterval: "auto",
- minorTickLength: 10,
- minorTickPosition: "inside",
- minorTickWidth: 1,
- tickLength: 10,
- tickPosition: "inside",
- tickWidth: 2,
- title: { rotation: 0 },
- zIndex: 2
- }, Y = { gridLineInterpolation: "circle", gridLineWidth: 1, labels: { align: "right", x: -3, y: -2 }, showLastLabel: !1, title: { x: 4, text: null, rotation: 90 } };
- j.compose = function(Z, q) {
- return Q.indexOf(Z) === -1 && (Q.push(Z), V(Z, "afterInit", s), V(Z, "autoLabelAlign", n), V(Z, "destroy", P), V(Z, "init", _), V(Z, "initialAxisTranslation", I)), Q.indexOf(q) === -1 && (Q.push(q), V(
- q,
- "afterGetLabelPosition",
- W
- ), V(q, "afterGetPosition", E), T(q.prototype, "getMarkPath", $)), Z;
- };
- }(O || (O = {})), O;
- }), M(p, "Series/AreaRange/AreaRangePoint.js", [p["Series/Area/AreaSeries.js"], p["Core/Series/Point.js"], p["Core/Utilities.js"]], function(o, y, N) {
- var D = this && this.__extends || function() {
- var G = function(R, B) {
- return G = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(S, x) {
- S.__proto__ = x;
- } || function(S, x) {
- for (var f in x)
- x.hasOwnProperty(f) && (S[f] = x[f]);
- }, G(R, B);
- };
- return function(R, B) {
- function S() {
- this.constructor = R;
- }
- G(R, B), R.prototype = B === null ? Object.create(B) : (S.prototype = B.prototype, new S());
- };
- }(), U = y.prototype, H = N.defined, V = N.isNumber;
- return function(G) {
- function R() {
- var B = G !== null && G.apply(this, arguments) || this;
- return B.high = void 0, B.low = void 0, B.options = void 0, B.plotHigh = void 0, B.plotLow = void 0, B.plotHighX = void 0, B.plotLowX = void 0, B.plotX = void 0, B.series = void 0, B;
- }
- return D(R, G), R.prototype.setState = function() {
- var B = this.state, S = this.series, x = S.chart.polar;
- H(this.plotHigh) || (this.plotHigh = S.yAxis.toPixels(
- this.high,
- !0
- )), H(this.plotLow) || (this.plotLow = this.plotY = S.yAxis.toPixels(this.low, !0)), S.stateMarkerGraphic && (S.lowerStateMarkerGraphic = S.stateMarkerGraphic, S.stateMarkerGraphic = S.upperStateMarkerGraphic), this.graphic = this.upperGraphic, this.plotY = this.plotHigh, x && (this.plotX = this.plotHighX), U.setState.apply(this, arguments), this.state = B, this.plotY = this.plotLow, this.graphic = this.lowerGraphic, x && (this.plotX = this.plotLowX), S.stateMarkerGraphic && (S.upperStateMarkerGraphic = S.stateMarkerGraphic, S.stateMarkerGraphic = S.lowerStateMarkerGraphic, S.lowerStateMarkerGraphic = void 0), U.setState.apply(this, arguments);
- }, R.prototype.haloPath = function() {
- var B = this.series.chart.polar, S = [];
- return this.plotY = this.plotLow, B && (this.plotX = this.plotLowX), this.isInside && (S = U.haloPath.apply(this, arguments)), this.plotY = this.plotHigh, B && (this.plotX = this.plotHighX), this.isTopInside && (S = S.concat(U.haloPath.apply(this, arguments))), S;
- }, R.prototype.isValid = function() {
- return V(this.low) && V(this.high);
- }, R;
- }(o.prototype.pointClass);
- }), M(
- p,
- "Series/AreaRange/AreaRangeSeries.js",
- [p["Series/AreaRange/AreaRangePoint.js"], p["Series/Area/AreaSeries.js"], p["Series/Column/ColumnSeries.js"], p["Core/Globals.js"], p["Core/Series/Series.js"], p["Core/Series/SeriesRegistry.js"], p["Core/Utilities.js"]],
- function(o, y, N, D, U, H, V) {
- var G = this && this.__extends || function() {
- var j = function(k, b) {
- return j = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(w, v) {
- w.__proto__ = v;
- } || function(w, v) {
- for (var l in v)
- v.hasOwnProperty(l) && (w[l] = v[l]);
- }, j(k, b);
- };
- return function(k, b) {
- function w() {
- this.constructor = k;
- }
- j(k, b), k.prototype = b === null ? Object.create(b) : (w.prototype = b.prototype, new w());
- };
- }(), R = y.prototype, B = N.prototype;
- N = D.noop;
- var S = U.prototype, x = V.defined, f = V.extend, d = V.isArray, T = V.pick, O = V.merge;
- return U = function(j) {
- function k() {
- var b = j !== null && j.apply(this, arguments) || this;
- return b.data = void 0, b.options = void 0, b.points = void 0, b.lowerStateMarkerGraphic = void 0, b.xAxis = void 0, b;
- }
- return G(k, j), k.prototype.toYData = function(b) {
- return [b.low, b.high];
- }, k.prototype.highToXY = function(b) {
- var w = this.chart, v = this.xAxis.postTranslate(b.rectPlotX || 0, this.yAxis.len - b.plotHigh);
- b.plotHighX = v.x - w.plotLeft, b.plotHigh = v.y - w.plotTop, b.plotLowX = b.plotX;
- }, k.prototype.translate = function() {
- var b = this, w = b.yAxis;
- R.translate.apply(b), b.points.forEach(function(v) {
- var l = v.high, h = v.plotY;
- v.isNull ? v.plotY = null : (v.plotLow = h, v.plotHigh = w.translate(b.dataModify ? b.dataModify.modifyValue(l) : l, 0, 1, 0, 1), b.dataModify && (v.yBottom = v.plotHigh));
- }), this.chart.polar && this.points.forEach(function(v) {
- b.highToXY(v), v.tooltipPos = [(v.plotHighX + v.plotLowX) / 2, (v.plotHigh + v.plotLow) / 2];
- });
- }, k.prototype.getGraphPath = function(b) {
- var w = [], v = [], l, h = R.getGraphPath, u = this.options, i = this.chart.polar, c = i && u.connectEnds !== !1, a = u.connectNulls, t = u.step;
- for (b = b || this.points, l = b.length; l--; ) {
- var s = b[l], n = i ? { plotX: s.rectPlotX, plotY: s.yBottom, doCurve: !1 } : { plotX: s.plotX, plotY: s.plotY, doCurve: !1 };
- s.isNull || c || a || b[l + 1] && !b[l + 1].isNull || v.push(n);
- var P = { polarPlotY: s.polarPlotY, rectPlotX: s.rectPlotX, yBottom: s.yBottom, plotX: T(
- s.plotHighX,
- s.plotX
- ), plotY: s.plotHigh, isNull: s.isNull };
- v.push(P), w.push(P), s.isNull || c || a || b[l - 1] && !b[l - 1].isNull || v.push(n);
- }
- return b = h.call(this, b), t && (t === !0 && (t = "left"), u.step = { left: "right", center: "center", right: "left" }[t]), w = h.call(this, w), v = h.call(this, v), u.step = t, u = [].concat(b, w), !this.chart.polar && v[0] && v[0][0] === "M" && (v[0] = ["L", v[0][1], v[0][2]]), this.graphPath = u, this.areaPath = b.concat(v), u.isArea = !0, u.xMap = b.xMap, this.areaPath.xMap = b.xMap, u;
- }, k.prototype.drawDataLabels = function() {
- var b = this.points, w = b.length, v, l = [], h = this.options.dataLabels, u, i = this.chart.inverted;
- if (h) {
- if (d(h))
- var c = h[0] || { enabled: !1 }, a = h[1] || { enabled: !1 };
- else
- c = f({}, h), c.x = h.xHigh, c.y = h.yHigh, a = f({}, h), a.x = h.xLow, a.y = h.yLow;
- if (c.enabled || this._hasPointLabels) {
- for (v = w; v--; )
- if (u = b[v]) {
- var t = c.inside ? u.plotHigh < u.plotLow : u.plotHigh > u.plotLow;
- u.y = u.high, u._plotY = u.plotY, u.plotY = u.plotHigh, l[v] = u.dataLabel, u.dataLabel = u.dataLabelUpper, u.below = t, i ? c.align || (c.align = t ? "right" : "left") : c.verticalAlign || (c.verticalAlign = t ? "top" : "bottom");
- }
- for (this.options.dataLabels = c, S.drawDataLabels && S.drawDataLabels.apply(this, arguments), v = w; v--; )
- (u = b[v]) && (u.dataLabelUpper = u.dataLabel, u.dataLabel = l[v], delete u.dataLabels, u.y = u.low, u.plotY = u._plotY);
- }
- if (a.enabled || this._hasPointLabels) {
- for (v = w; v--; )
- (u = b[v]) && (t = a.inside ? u.plotHigh < u.plotLow : u.plotHigh > u.plotLow, u.below = !t, i ? a.align || (a.align = t ? "left" : "right") : a.verticalAlign || (a.verticalAlign = t ? "bottom" : "top"));
- this.options.dataLabels = a, S.drawDataLabels && S.drawDataLabels.apply(this, arguments);
- }
- if (c.enabled)
- for (v = w; v--; )
- (u = b[v]) && (u.dataLabels = [u.dataLabelUpper, u.dataLabel].filter(function(s) {
- return !!s;
- }));
- this.options.dataLabels = h;
- }
- }, k.prototype.alignDataLabel = function() {
- B.alignDataLabel.apply(this, arguments);
- }, k.prototype.drawPoints = function() {
- var b = this.points.length, w;
- for (S.drawPoints.apply(this, arguments), w = 0; w < b; ) {
- var v = this.points[w];
- v.origProps = { plotY: v.plotY, plotX: v.plotX, isInside: v.isInside, negative: v.negative, zone: v.zone, y: v.y }, v.lowerGraphic = v.graphic, v.graphic = v.upperGraphic, v.plotY = v.plotHigh, x(v.plotHighX) && (v.plotX = v.plotHighX), v.y = T(v.high, v.origProps.y), v.negative = v.y < (this.options.threshold || 0), this.zones.length && (v.zone = v.getZone()), this.chart.polar || (v.isInside = v.isTopInside = typeof v.plotY < "u" && 0 <= v.plotY && v.plotY <= this.yAxis.len && 0 <= v.plotX && v.plotX <= this.xAxis.len), w++;
- }
- for (S.drawPoints.apply(this, arguments), w = 0; w < b; )
- v = this.points[w], v.upperGraphic = v.graphic, v.graphic = v.lowerGraphic, v.origProps && (f(v, v.origProps), delete v.origProps), w++;
- }, k.defaultOptions = O(y.defaultOptions, {
- lineWidth: 1,
- threshold: null,
- tooltip: { pointFormat: '<span style="color:{series.color}">●</span> {series.name}: <b>{point.low}</b> - <b>{point.high}</b><br/>' },
- trackByArea: !0,
- dataLabels: { align: void 0, verticalAlign: void 0, xLow: 0, xHigh: 0, yLow: 0, yHigh: 0 }
- }), k;
- }(y), f(U.prototype, { pointArrayMap: ["low", "high"], pointValKey: "low", deferTranslatePolar: !0, pointClass: o, setStackedPoints: N }), H.registerSeriesType("arearange", U), U;
- }
- ), M(p, "Series/AreaSplineRange/AreaSplineRangeSeries.js", [
- p["Series/AreaRange/AreaRangeSeries.js"],
- p["Core/Series/SeriesRegistry.js"],
- p["Core/Utilities.js"]
- ], function(o, y, N) {
- var D = this && this.__extends || function() {
- var G = function(R, B) {
- return G = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(S, x) {
- S.__proto__ = x;
- } || function(S, x) {
- for (var f in x)
- x.hasOwnProperty(f) && (S[f] = x[f]);
- }, G(R, B);
- };
- return function(R, B) {
- function S() {
- this.constructor = R;
- }
- G(R, B), R.prototype = B === null ? Object.create(B) : (S.prototype = B.prototype, new S());
- };
- }(), U = y.seriesTypes.spline, H = N.merge;
- N = N.extend;
- var V = function(G) {
- function R() {
- var B = G !== null && G.apply(this, arguments) || this;
- return B.options = void 0, B.data = void 0, B.points = void 0, B;
- }
- return D(R, G), R.defaultOptions = H(o.defaultOptions), R;
- }(o);
- return N(V.prototype, { getPointSpline: U.prototype.getPointSpline }), y.registerSeriesType("areasplinerange", V), V;
- }), M(p, "Series/BoxPlot/BoxPlotSeries.js", [p["Series/Column/ColumnSeries.js"], p["Core/Globals.js"], p["Core/Series/SeriesRegistry.js"], p["Core/Utilities.js"]], function(o, y, N, D) {
- var U = this && this.__extends || function() {
- var R = function(B, S) {
- return R = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(x, f) {
- x.__proto__ = f;
- } || function(x, f) {
- for (var d in f)
- f.hasOwnProperty(d) && (x[d] = f[d]);
- }, R(B, S);
- };
- return function(B, S) {
- function x() {
- this.constructor = B;
- }
- R(B, S), B.prototype = S === null ? Object.create(S) : (x.prototype = S.prototype, new x());
- };
- }();
- y = y.noop;
- var H = D.extend, V = D.merge, G = D.pick;
- return D = function(R) {
- function B() {
- var S = R !== null && R.apply(this, arguments) || this;
- return S.data = void 0, S.options = void 0, S.points = void 0, S;
- }
- return U(B, R), B.prototype.pointAttribs = function() {
- return {};
- }, B.prototype.translate = function() {
- var S = this.yAxis, x = this.pointArrayMap;
- R.prototype.translate.apply(this), this.points.forEach(function(f) {
- x.forEach(function(d) {
- f[d] !== null && (f[d + "Plot"] = S.translate(f[d], 0, 1, 0, 1));
- }), f.plotHigh = f.highPlot;
- });
- }, B.prototype.drawPoints = function() {
- var S = this, x = S.options, f = S.chart, d = f.renderer, T, O, j, k, b, w, v = 0, l, h, u, i, c = S.doQuartiles !== !1, a, t = S.options.whiskerLength;
- S.points.forEach(function(s) {
- var n = s.graphic, P = n ? "animate" : "attr", _ = s.shapeArgs, I = {}, W = {}, E = {}, X = {}, g = s.color || S.color;
- typeof s.plotY < "u" && (l = Math.round(_.width), h = Math.floor(_.x), u = h + l, i = Math.round(l / 2), T = Math.floor(c ? s.q1Plot : s.lowPlot), O = Math.floor(c ? s.q3Plot : s.lowPlot), j = Math.floor(s.highPlot), k = Math.floor(s.lowPlot), n || (s.graphic = n = d.g("point").add(S.group), s.stem = d.path().addClass("highcharts-boxplot-stem").add(n), t && (s.whiskers = d.path().addClass("highcharts-boxplot-whisker").add(n)), c && (s.box = d.path(void 0).addClass("highcharts-boxplot-box").add(n)), s.medianShape = d.path(void 0).addClass("highcharts-boxplot-median").add(n)), f.styledMode || (W.stroke = s.stemColor || x.stemColor || g, W["stroke-width"] = G(s.stemWidth, x.stemWidth, x.lineWidth), W.dashstyle = s.stemDashStyle || x.stemDashStyle || x.dashStyle, s.stem.attr(W), t && (E.stroke = s.whiskerColor || x.whiskerColor || g, E["stroke-width"] = G(s.whiskerWidth, x.whiskerWidth, x.lineWidth), E.dashstyle = s.whiskerDashStyle || x.whiskerDashStyle || x.dashStyle, s.whiskers.attr(E)), c && (I.fill = s.fillColor || x.fillColor || g, I.stroke = x.lineColor || g, I["stroke-width"] = x.lineWidth || 0, I.dashstyle = s.boxDashStyle || x.boxDashStyle || x.dashStyle, s.box.attr(I)), X.stroke = s.medianColor || x.medianColor || g, X["stroke-width"] = G(s.medianWidth, x.medianWidth, x.lineWidth), X.dashstyle = s.medianDashStyle || x.medianDashStyle || x.dashStyle, s.medianShape.attr(X)), w = s.stem.strokeWidth() % 2 / 2, v = h + i + w, n = [["M", v, O], ["L", v, j], ["M", v, T], ["L", v, k]], s.stem[P]({ d: n }), c && (w = s.box.strokeWidth() % 2 / 2, T = Math.floor(T) + w, O = Math.floor(O) + w, h += w, u += w, n = [["M", h, O], ["L", h, T], ["L", u, T], ["L", u, O], ["L", h, O], ["Z"]], s.box[P]({ d: n })), t && (w = s.whiskers.strokeWidth() % 2 / 2, j += w, k += w, a = /%$/.test(t) ? i * parseFloat(t) / 100 : t / 2, n = [["M", v - a, j], ["L", v + a, j], ["M", v - a, k], ["L", v + a, k]], s.whiskers[P]({ d: n })), b = Math.round(s.medianPlot), w = s.medianShape.strokeWidth() % 2 / 2, b += w, n = [["M", h, b], ["L", u, b]], s.medianShape[P]({ d: n }));
- });
- }, B.prototype.toYData = function(S) {
- return [S.low, S.q1, S.median, S.q3, S.high];
- }, B.defaultOptions = V(o.defaultOptions, {
- threshold: null,
- tooltip: { pointFormat: '<span style="color:{point.color}">●</span> <b> {series.name}</b><br/>Maximum: {point.high}<br/>Upper quartile: {point.q3}<br/>Median: {point.median}<br/>Lower quartile: {point.q1}<br/>Minimum: {point.low}<br/>' },
- whiskerLength: "50%",
- fillColor: "#ffffff",
- lineWidth: 1,
- medianWidth: 2,
- whiskerWidth: 2
- }), B;
- }(o), H(D.prototype, { pointArrayMap: ["low", "q1", "median", "q3", "high"], pointValKey: "high", drawDataLabels: y, setStackedPoints: y }), N.registerSeriesType("boxplot", D), D;
- }), M(p, "Series/Bubble/BubbleLegendDefaults.js", [], function() {
- return { borderColor: void 0, borderWidth: 2, className: void 0, color: void 0, connectorClassName: void 0, connectorColor: void 0, connectorDistance: 60, connectorWidth: 1, enabled: !1, labels: {
- className: void 0,
- allowOverlap: !1,
- format: "",
- formatter: void 0,
- align: "right",
- style: { fontSize: "10px", color: "#000000" },
- x: 0,
- y: 0
- }, maxSize: 60, minSize: 10, legendIndex: 0, ranges: { value: void 0, borderColor: void 0, color: void 0, connectorColor: void 0 }, sizeBy: "area", sizeByAbsoluteValue: !1, zIndex: 1, zThreshold: 0 };
- }), M(p, "Series/Bubble/BubbleLegendItem.js", [p["Core/Color/Color.js"], p["Core/FormatUtilities.js"], p["Core/Globals.js"], p["Core/Utilities.js"]], function(o, y, N, D) {
- var U = o.parse, H = N.noop, V = D.arrayMax, G = D.arrayMin, R = D.isNumber, B = D.merge, S = D.pick, x = D.stableSort;
- return function() {
- function f(d, T) {
- this.options = this.symbols = this.visible = this.selected = this.ranges = this.movementX = this.maxLabel = this.legendSymbol = this.legendItemWidth = this.legendItemHeight = this.legendItem = this.legendGroup = this.legend = this.fontMetrics = this.chart = void 0, this.setState = H, this.init(d, T);
- }
- return f.prototype.init = function(d, T) {
- this.options = d, this.visible = !0, this.chart = T.chart, this.legend = T;
- }, f.prototype.addToLegend = function(d) {
- d.splice(
- this.options.legendIndex,
- 0,
- this
- );
- }, f.prototype.drawLegendSymbol = function(d) {
- var T = this.chart, O = this.options, j = S(d.options.itemDistance, 20), k = O.ranges, b = O.connectorDistance;
- this.fontMetrics = T.renderer.fontMetrics(O.labels.style.fontSize), k && k.length && R(k[0].value) ? (x(k, function(w, v) {
- return v.value - w.value;
- }), this.ranges = k, this.setOptions(), this.render(), d = this.getMaxLabelSize(), k = this.ranges[0].radius, T = 2 * k, b = b - k + d.width, b = 0 < b ? b : 0, this.maxLabel = d, this.movementX = O.labels.align === "left" ? b : 0, this.legendItemWidth = T + b + j, this.legendItemHeight = T + this.fontMetrics.h / 2) : d.options.bubbleLegend.autoRanges = !0;
- }, f.prototype.setOptions = function() {
- var d = this.ranges, T = this.options, O = this.chart.series[T.seriesIndex], j = this.legend.baseline, k = { zIndex: T.zIndex, "stroke-width": T.borderWidth }, b = { zIndex: T.zIndex, "stroke-width": T.connectorWidth }, w = { align: this.legend.options.rtl || T.labels.align === "left" ? "right" : "left", zIndex: T.zIndex }, v = O.options.marker.fillOpacity, l = this.chart.styledMode;
- d.forEach(function(h, u) {
- l || (k.stroke = S(h.borderColor, T.borderColor, O.color), k.fill = S(h.color, T.color, v !== 1 ? U(O.color).setOpacity(v).get("rgba") : O.color), b.stroke = S(h.connectorColor, T.connectorColor, O.color)), d[u].radius = this.getRangeRadius(h.value), d[u] = B(d[u], { center: d[0].radius - d[u].radius + j }), l || B(!0, d[u], { bubbleAttribs: B(k), connectorAttribs: B(b), labelAttribs: w });
- }, this);
- }, f.prototype.getRangeRadius = function(d) {
- var T = this.options;
- return this.chart.series[this.options.seriesIndex].getRadius.call(
- this,
- T.ranges[T.ranges.length - 1].value,
- T.ranges[0].value,
- T.minSize,
- T.maxSize,
- d
- );
- }, f.prototype.render = function() {
- var d = this.chart.renderer, T = this.options.zThreshold;
- this.symbols || (this.symbols = { connectors: [], bubbleItems: [], labels: [] }), this.legendSymbol = d.g("bubble-legend"), this.legendItem = d.g("bubble-legend-item"), this.legendSymbol.translateX = 0, this.legendSymbol.translateY = 0, this.ranges.forEach(function(O) {
- O.value >= T && this.renderRange(O);
- }, this), this.legendSymbol.add(this.legendItem), this.legendItem.add(this.legendGroup), this.hideOverlappingLabels();
- }, f.prototype.renderRange = function(d) {
- var T = this.options, O = T.labels, j = this.chart, k = j.series[T.seriesIndex], b = j.renderer, w = this.symbols;
- j = w.labels;
- var v = d.center, l = Math.abs(d.radius), h = T.connectorDistance || 0, u = O.align, i = T.connectorWidth, c = this.ranges[0].radius || 0, a = v - l - T.borderWidth / 2 + i / 2, t = this.fontMetrics;
- t = t.f / 2 - (t.h - t.f) / 2;
- var s = b.styledMode;
- h = this.legend.options.rtl || u === "left" ? -h : h, u === "center" && (h = 0, T.connectorDistance = 0, d.labelAttribs.align = "center"), u = a + T.labels.y;
- var n = c + h + T.labels.x;
- w.bubbleItems.push(b.circle(
- c,
- v + ((a % 1 ? 1 : 0.5) - (i % 2 ? 0 : 0.5)),
- l
- ).attr(s ? {} : d.bubbleAttribs).addClass((s ? "highcharts-color-" + k.colorIndex + " " : "") + "highcharts-bubble-legend-symbol " + (T.className || "")).add(this.legendSymbol)), w.connectors.push(b.path(b.crispLine([["M", c, a], ["L", c + h, a]], T.connectorWidth)).attr(s ? {} : d.connectorAttribs).addClass((s ? "highcharts-color-" + this.options.seriesIndex + " " : "") + "highcharts-bubble-legend-connectors " + (T.connectorClassName || "")).add(this.legendSymbol)), d = b.text(this.formatLabel(d), n, u + t).attr(s ? {} : d.labelAttribs).css(s ? {} : O.style).addClass("highcharts-bubble-legend-labels " + (T.labels.className || "")).add(this.legendSymbol), j.push(d), d.placed = !0, d.alignAttr = { x: n, y: u + t };
- }, f.prototype.getMaxLabelSize = function() {
- var d, T;
- return this.symbols.labels.forEach(function(O) {
- T = O.getBBox(!0), d = d ? T.width > d.width ? T : d : T;
- }), d || {};
- }, f.prototype.formatLabel = function(d) {
- var T = this.options, O = T.labels.formatter;
- T = T.labels.format;
- var j = this.chart.numberFormatter;
- return T ? y.format(T, d) : O ? O.call(d) : j(d.value, 1);
- }, f.prototype.hideOverlappingLabels = function() {
- var d = this.chart, T = this.symbols;
- !this.options.labels.allowOverlap && T && (d.hideOverlappingLabels(T.labels), T.labels.forEach(function(O, j) {
- O.newOpacity ? O.newOpacity !== O.oldOpacity && T.connectors[j].show() : T.connectors[j].hide();
- }));
- }, f.prototype.getRanges = function() {
- var d = this.legend.bubbleLegend, T = d.options.ranges, O, j = Number.MAX_VALUE, k = -Number.MAX_VALUE;
- d.chart.series.forEach(function(w) {
- w.isBubble && !w.ignoreSeries && (O = w.zData.filter(R), O.length && (j = S(w.options.zMin, Math.min(j, Math.max(
- G(O),
- w.options.displayNegative === !1 ? w.options.zThreshold : -Number.MAX_VALUE
- ))), k = S(w.options.zMax, Math.max(k, V(O)))));
- });
- var b = j === k ? [{ value: k }] : [{ value: j }, { value: (j + k) / 2 }, { value: k, autoRanges: !0 }];
- return T.length && T[0].radius && b.reverse(), b.forEach(function(w, v) {
- T && T[v] && (b[v] = B(T[v], w));
- }), b;
- }, f.prototype.predictBubbleSizes = function() {
- var d = this.chart, T = this.fontMetrics, O = d.legend.options, j = O.floating, k = (O = O.layout === "horizontal") ? d.legend.lastLineHeight : 0, b = d.plotSizeX, w = d.plotSizeY, v = d.series[this.options.seriesIndex], l = v.getPxExtremes();
- d = Math.ceil(l.minPxSize), l = Math.ceil(l.maxPxSize);
- var h = Math.min(w, b);
- return v = v.options.maxSize, j || !/%$/.test(v) ? T = l : (v = parseFloat(v), T = (h + k - T.h / 2) * v / 100 / (v / 100 + 1), (O && w - T >= b || !O && b - T >= w) && (T = l)), [d, Math.ceil(T)];
- }, f.prototype.updateRanges = function(d, T) {
- var O = this.legend.options.bubbleLegend;
- O.minSize = d, O.maxSize = T, O.ranges = this.getRanges();
- }, f.prototype.correctSizes = function() {
- var d = this.legend, T = this.chart.series[this.options.seriesIndex].getPxExtremes();
- 1 < Math.abs(Math.ceil(T.maxPxSize) - this.options.maxSize) && (this.updateRanges(this.options.minSize, T.maxPxSize), d.render());
- }, f;
- }();
- }), M(p, "Series/Bubble/BubbleLegendComposition.js", [p["Series/Bubble/BubbleLegendDefaults.js"], p["Series/Bubble/BubbleLegendItem.js"], p["Core/DefaultOptions.js"], p["Core/Utilities.js"]], function(o, y, N, D) {
- var U = N.setOptions, H = D.addEvent, V = D.objectEach, G = D.wrap, R;
- return function(B) {
- function S(k, b, w) {
- var v = this.legend, l = 0 <= x(this);
- if (v && v.options.enabled && v.bubbleLegend && v.options.bubbleLegend.autoRanges && l) {
- var h = v.bubbleLegend.options;
- l = v.bubbleLegend.predictBubbleSizes(), v.bubbleLegend.updateRanges(l[0], l[1]), h.placed || (v.group.placed = !1, v.allItems.forEach(function(u) {
- u.legendGroup.translateY = null;
- })), v.render(), this.getMargins(), this.axes.forEach(function(u) {
- u.visible && u.render(), h.placed || (u.setScale(), u.updateNames(), V(u.ticks, function(i) {
- i.isNew = !0, i.isNewLabel = !0;
- }));
- }), h.placed = !0, this.getMargins(), k.call(this, b, w), v.bubbleLegend.correctSizes(), O(v, f(v));
- } else
- k.call(this, b, w), v && v.options.enabled && v.bubbleLegend && (v.render(), O(v, f(v)));
- }
- function x(k) {
- k = k.series;
- for (var b = 0; b < k.length; ) {
- if (k[b] && k[b].isBubble && k[b].visible && k[b].zData.length)
- return b;
- b++;
- }
- return -1;
- }
- function f(k) {
- k = k.allItems;
- var b = [], w = k.length, v, l = 0;
- for (v = 0; v < w; v++)
- if (k[v].legendItemHeight && (k[v].itemHeight = k[v].legendItemHeight), k[v] === k[w - 1] || k[v + 1] && k[v]._legendItemPos[1] !== k[v + 1]._legendItemPos[1]) {
- b.push({ height: 0 });
- var h = b[b.length - 1];
- for (l; l <= v; l++)
- k[l].itemHeight > h.height && (h.height = k[l].itemHeight);
- h.step = v;
- }
- return b;
- }
- function d(k) {
- var b = this.bubbleLegend, w = this.options, v = w.bubbleLegend, l = x(this.chart);
- b && b.ranges && b.ranges.length && (v.ranges.length && (v.autoRanges = !!v.ranges[0].autoRanges), this.destroyItem(b)), 0 <= l && w.enabled && v.enabled && (v.seriesIndex = l, this.bubbleLegend = new y(v, this), this.bubbleLegend.addToLegend(k.allItems));
- }
- function T() {
- var k = this.chart, b = this.visible, w = this.chart.legend;
- w && w.bubbleLegend && (this.visible = !b, this.ignoreSeries = b, k = 0 <= x(k), w.bubbleLegend.visible !== k && (w.update({ bubbleLegend: { enabled: k } }), w.bubbleLegend.visible = k), this.visible = b);
- }
- function O(k, b) {
- var w = k.options.rtl, v, l, h, u = 0;
- k.allItems.forEach(function(i, c) {
- v = i.legendGroup.translateX, l = i._legendItemPos[1], ((h = i.movementX) || w && i.ranges) && (h = w ? v - i.options.maxSize / 2 : v + h, i.legendGroup.attr({ translateX: h })), c > b[u].step && u++, i.legendGroup.attr({ translateY: Math.round(l + b[u].height / 2) }), i._legendItemPos[1] = l + b[u].height / 2;
- });
- }
- var j = [];
- B.compose = function(k, b, w) {
- j.indexOf(k) === -1 && (j.push(k), U({ legend: { bubbleLegend: o } }), G(k.prototype, "drawChartBox", S)), j.indexOf(b) === -1 && (j.push(b), H(b, "afterGetAllItems", d)), j.indexOf(w) === -1 && (j.push(w), H(w, "legendItemClick", T));
- };
- }(R || (R = {})), R;
- }), M(p, "Series/Bubble/BubblePoint.js", [p["Core/Series/Point.js"], p["Core/Series/SeriesRegistry.js"], p["Core/Utilities.js"]], function(o, y, N) {
- var D = this && this.__extends || function() {
- var U = function(H, V) {
- return U = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(G, R) {
- G.__proto__ = R;
- } || function(G, R) {
- for (var B in R)
- R.hasOwnProperty(B) && (G[B] = R[B]);
- }, U(H, V);
- };
- return function(H, V) {
- function G() {
- this.constructor = H;
- }
- U(H, V), H.prototype = V === null ? Object.create(V) : (G.prototype = V.prototype, new G());
- };
- }();
- return N = N.extend, y = function(U) {
- function H() {
- var V = U !== null && U.apply(this, arguments) || this;
- return V.options = void 0, V.series = void 0, V;
- }
- return D(H, U), H.prototype.haloPath = function(V) {
- return o.prototype.haloPath.call(this, V === 0 ? 0 : (this.marker && this.marker.radius || 0) + V);
- }, H;
- }(y.seriesTypes.scatter.prototype.pointClass), N(y.prototype, { ttBelow: !1 }), y;
- }), M(p, "Series/Bubble/BubbleSeries.js", [
- p["Core/Axis/Axis.js"],
- p["Series/Bubble/BubbleLegendComposition.js"],
- p["Series/Bubble/BubblePoint.js"],
- p["Core/Color/Color.js"],
- p["Core/Globals.js"],
- p["Core/Series/Series.js"],
- p["Core/Series/SeriesRegistry.js"],
- p["Core/Utilities.js"]
- ], function(o, y, N, D, U, H, V, G) {
- var R = this && this.__extends || function() {
- var w = function(v, l) {
- return w = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(h, u) {
- h.__proto__ = u;
- } || function(h, u) {
- for (var i in u)
- u.hasOwnProperty(i) && (h[i] = u[i]);
- }, w(v, l);
- };
- return function(v, l) {
- function h() {
- this.constructor = v;
- }
- w(v, l), v.prototype = l === null ? Object.create(l) : (h.prototype = l.prototype, new h());
- };
- }(), B = D.parse;
- D = U.noop;
- var S = V.seriesTypes;
- U = S.column;
- var x = S.scatter;
- S = G.addEvent;
- var f = G.arrayMax, d = G.arrayMin, T = G.clamp, O = G.extend, j = G.isNumber, k = G.merge, b = G.pick;
- return G = function(w) {
- function v() {
- var l = w !== null && w.apply(this, arguments) || this;
- return l.data = void 0, l.maxPxSize = void 0, l.minPxSize = void 0, l.options = void 0, l.points = void 0, l.radii = void 0, l.yData = void 0, l.zData = void 0, l;
- }
- return R(v, w), v.prototype.animate = function(l) {
- !l && this.points.length < this.options.animationLimit && this.points.forEach(function(h) {
- var u = h.graphic;
- u && u.width && (this.hasRendered || u.attr({ x: h.plotX, y: h.plotY, width: 1, height: 1 }), u.animate(this.markerAttribs(h), this.options.animation));
- }, this);
- }, v.prototype.getRadii = function() {
- var l = this, h = this.zData, u = this.yData, i = [], c = this.chart.bubbleZExtremes, a = this.getPxExtremes(), t = a.minPxSize, s = a.maxPxSize;
- if (!c) {
- var n = Number.MAX_VALUE, P = -Number.MAX_VALUE, _;
- this.chart.series.forEach(function(E) {
- E.bubblePadding && (E.visible || !l.chart.options.chart.ignoreHiddenSeries) && (E = E.getZExtremes()) && (n = Math.min(n || E.zMin, E.zMin), P = Math.max(P || E.zMax, E.zMax), _ = !0);
- }), _ ? (c = { zMin: n, zMax: P }, this.chart.bubbleZExtremes = c) : c = { zMin: 0, zMax: 0 };
- }
- var I = 0;
- for (a = h.length; I < a; I++) {
- var W = h[I];
- i.push(this.getRadius(c.zMin, c.zMax, t, s, W, u[I]));
- }
- this.radii = i;
- }, v.prototype.getRadius = function(l, h, u, i, c, a) {
- var t = this.options, s = t.sizeBy !== "width", n = t.zThreshold, P = h - l, _ = 0.5;
- if (a === null || c === null)
- return null;
- if (j(c)) {
- if (t.sizeByAbsoluteValue && (c = Math.abs(c - n), P = Math.max(h - n, Math.abs(l - n)), l = 0), c < l)
- return u / 2 - 1;
- 0 < P && (_ = (c - l) / P);
- }
- return s && 0 <= _ && (_ = Math.sqrt(_)), Math.ceil(u + _ * (i - u)) / 2;
- }, v.prototype.hasData = function() {
- return !!this.processedXData.length;
- }, v.prototype.pointAttribs = function(l, h) {
- var u = this.options.marker.fillOpacity;
- return l = H.prototype.pointAttribs.call(this, l, h), u !== 1 && (l.fill = B(l.fill).setOpacity(u).get("rgba")), l;
- }, v.prototype.translate = function() {
- w.prototype.translate.call(this), this.getRadii(), this.translateBubble();
- }, v.prototype.translateBubble = function() {
- for (var l = this.data, h = this.radii, u = this.getPxExtremes().minPxSize, i = l.length; i--; ) {
- var c = l[i], a = h ? h[i] : 0;
- j(a) && a >= u / 2 ? (c.marker = O(c.marker, { radius: a, width: 2 * a, height: 2 * a }), c.dlBox = { x: c.plotX - a, y: c.plotY - a, width: 2 * a, height: 2 * a }) : c.shapeArgs = c.plotY = c.dlBox = void 0;
- }
- }, v.prototype.getPxExtremes = function() {
- var l = Math.min(this.chart.plotWidth, this.chart.plotHeight), h = function(i) {
- if (typeof i == "string") {
- var c = /%$/.test(i);
- i = parseInt(i, 10);
- }
- return c ? l * i / 100 : i;
- }, u = h(b(this.options.minSize, 8));
- return h = Math.max(h(b(this.options.maxSize, "20%")), u), {
- minPxSize: u,
- maxPxSize: h
- };
- }, v.prototype.getZExtremes = function() {
- var l = this.options, h = (this.zData || []).filter(j);
- if (h.length) {
- var u = b(l.zMin, T(d(h), l.displayNegative === !1 ? l.zThreshold || 0 : -Number.MAX_VALUE, Number.MAX_VALUE));
- if (l = b(l.zMax, f(h)), j(u) && j(l))
- return { zMin: u, zMax: l };
- }
- }, v.compose = y.compose, v.defaultOptions = k(x.defaultOptions, { dataLabels: { formatter: function() {
- var l = this.series.chart.numberFormatter, h = this.point.z;
- return j(h) ? l(h, -1) : "";
- }, inside: !0, verticalAlign: "middle" }, animationLimit: 250, marker: {
- lineColor: null,
- lineWidth: 1,
- fillOpacity: 0.5,
- radius: null,
- states: { hover: { radiusPlus: 0 } },
- symbol: "circle"
- }, minSize: 8, maxSize: "20%", softThreshold: !1, states: { hover: { halo: { size: 5 } } }, tooltip: { pointFormat: "({point.x}, {point.y}), Size: {point.z}" }, turboThreshold: 0, zThreshold: 0, zoneAxis: "z" }), v;
- }(x), O(G.prototype, {
- alignDataLabel: U.prototype.alignDataLabel,
- applyZones: D,
- bubblePadding: !0,
- buildKDTree: D,
- directTouch: !0,
- isBubble: !0,
- pointArrayMap: ["y", "z"],
- pointClass: N,
- parallelArrays: ["x", "y", "z"],
- trackerGroups: ["group", "dataLabelsGroup"],
- specialGroup: "group",
- zoneAxis: "z"
- }), S(G, "updatedData", function(w) {
- delete w.target.chart.bubbleZExtremes;
- }), o.prototype.beforePadding = function() {
- var w = this, v = this.len, l = this.chart, h = 0, u = v, i = this.isXAxis, c = i ? "xData" : "yData", a = this.min, t = this.max - a, s = v / t, n;
- this.series.forEach(function(P) {
- if (P.bubblePadding && (P.visible || !l.options.chart.ignoreHiddenSeries)) {
- n = w.allowZoomOutside = !0;
- var _ = P[c];
- if (i && P.getRadii(0, 0, P), 0 < t) {
- for (var I = _.length; I--; )
- if (j(_[I]) && w.dataMin <= _[I] && _[I] <= w.max) {
- var W = P.radii && P.radii[I] || 0;
- h = Math.min((_[I] - a) * s - W, h), u = Math.max((_[I] - a) * s + W, u);
- }
- }
- }
- }), n && 0 < t && !this.logarithmic && (u -= v, s *= (v + Math.max(0, h) - Math.min(u, v)) / v, [["min", "userMin", h], ["max", "userMax", u]].forEach(function(P) {
- typeof b(w.options[P[0]], w[P[1]]) > "u" && (w[P[0]] += P[2] / s);
- }));
- }, V.registerSeriesType("bubble", G), G;
- }), M(p, "Series/ColumnRange/ColumnRangePoint.js", [p["Core/Series/SeriesRegistry.js"], p["Core/Utilities.js"]], function(o, y) {
- var N = this && this.__extends || function() {
- var V = function(G, R) {
- return V = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(B, S) {
- B.__proto__ = S;
- } || function(B, S) {
- for (var x in S)
- S.hasOwnProperty(x) && (B[x] = S[x]);
- }, V(G, R);
- };
- return function(G, R) {
- function B() {
- this.constructor = G;
- }
- V(G, R), G.prototype = R === null ? Object.create(R) : (B.prototype = R.prototype, new B());
- };
- }(), D = o.seriesTypes;
- o = D.column.prototype.pointClass;
- var U = y.extend, H = y.isNumber;
- return y = function(V) {
- function G() {
- var R = V !== null && V.apply(this, arguments) || this;
- return R.series = void 0, R.options = void 0, R.barX = void 0, R.pointWidth = void 0, R.shapeType = void 0, R;
- }
- return N(G, V), G.prototype.isValid = function() {
- return H(this.low);
- }, G;
- }(D.arearange.prototype.pointClass), U(y.prototype, { setState: o.prototype.setState }), y;
- }), M(p, "Series/ColumnRange/ColumnRangeSeries.js", [p["Series/ColumnRange/ColumnRangePoint.js"], p["Core/Globals.js"], p["Core/Series/SeriesRegistry.js"], p["Core/Utilities.js"]], function(o, y, N, D) {
- var U = this && this.__extends || function() {
- var T = function(O, j) {
- return T = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(k, b) {
- k.__proto__ = b;
- } || function(k, b) {
- for (var w in b)
- b.hasOwnProperty(w) && (k[w] = b[w]);
- }, T(O, j);
- };
- return function(O, j) {
- function k() {
- this.constructor = O;
- }
- T(O, j), O.prototype = j === null ? Object.create(j) : (k.prototype = j.prototype, new k());
- };
- }();
- y = y.noop;
- var H = N.seriesTypes, V = H.arearange, G = H.column, R = G.prototype, B = V.prototype, S = D.clamp, x = D.merge, f = D.pick;
- D = D.extend;
- var d = { pointRange: null, marker: null, states: { hover: { halo: !1 } } };
- return H = function(T) {
- function O() {
- var j = T !== null && T.apply(this, arguments) || this;
- return j.data = void 0, j.points = void 0, j.options = void 0, j;
- }
- return U(O, T), O.prototype.setOptions = function() {
- return x(!0, arguments[0], { stacking: void 0 }), B.setOptions.apply(this, arguments);
- }, O.prototype.translate = function() {
- var j = this, k = j.yAxis, b = j.xAxis, w = b.startAngleRad, v, l = j.chart, h = j.xAxis.isRadial, u = Math.max(l.chartWidth, l.chartHeight) + 999, i;
- R.translate.apply(j), j.points.forEach(function(c) {
- var a = c.shapeArgs || {}, t = j.options.minPointLength;
- c.plotHigh = i = S(k.translate(c.high, 0, 1, 0, 1), -u, u), c.plotLow = S(c.plotY, -u, u);
- var s = i, n = f(
- c.rectPlotY,
- c.plotY
- ) - i;
- Math.abs(n) < t ? (t -= n, n += t, s -= t / 2) : 0 > n && (n *= -1, s -= n), h ? (v = c.barX + w, c.shapeType = "arc", c.shapeArgs = j.polarArc(s + n, s, v, v + c.pointWidth)) : (a.height = n, a.y = s, t = a.x, t = t === void 0 ? 0 : t, a = a.width, a = a === void 0 ? 0 : a, c.tooltipPos = l.inverted ? [k.len + k.pos - l.plotLeft - s - n / 2, b.len + b.pos - l.plotTop - t - a / 2, n] : [b.left - l.plotLeft + t + a / 2, k.pos - l.plotTop + s + n / 2, n]);
- });
- }, O.prototype.crispCol = function() {
- return R.crispCol.apply(this, arguments);
- }, O.prototype.drawPoints = function() {
- return R.drawPoints.apply(this, arguments);
- }, O.prototype.drawTracker = function() {
- return R.drawTracker.apply(this, arguments);
- }, O.prototype.getColumnMetrics = function() {
- return R.getColumnMetrics.apply(this, arguments);
- }, O.prototype.pointAttribs = function() {
- return R.pointAttribs.apply(this, arguments);
- }, O.prototype.adjustForMissingColumns = function() {
- return R.adjustForMissingColumns.apply(this, arguments);
- }, O.prototype.animate = function() {
- return R.animate.apply(this, arguments);
- }, O.prototype.translate3dPoints = function() {
- return R.translate3dPoints.apply(this, arguments);
- }, O.prototype.translate3dShapes = function() {
- return R.translate3dShapes.apply(this, arguments);
- }, O.defaultOptions = x(G.defaultOptions, V.defaultOptions, d), O;
- }(V), D(H.prototype, { directTouch: !0, trackerGroups: ["group", "dataLabelsGroup"], drawGraph: y, getSymbol: y, polarArc: function() {
- return R.polarArc.apply(this, arguments);
- }, pointClass: o }), N.registerSeriesType("columnrange", H), H;
- }), M(p, "Series/ColumnPyramid/ColumnPyramidSeries.js", [p["Series/Column/ColumnSeries.js"], p["Core/Series/SeriesRegistry.js"], p["Core/Utilities.js"]], function(o, y, N) {
- var D = this && this.__extends || function() {
- var R = function(B, S) {
- return R = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(x, f) {
- x.__proto__ = f;
- } || function(x, f) {
- for (var d in f)
- f.hasOwnProperty(d) && (x[d] = f[d]);
- }, R(B, S);
- };
- return function(B, S) {
- function x() {
- this.constructor = B;
- }
- R(B, S), B.prototype = S === null ? Object.create(S) : (x.prototype = S.prototype, new x());
- };
- }(), U = o.prototype, H = N.clamp, V = N.merge, G = N.pick;
- return N = function(R) {
- function B() {
- var S = R !== null && R.apply(this, arguments) || this;
- return S.data = void 0, S.options = void 0, S.points = void 0, S;
- }
- return D(B, R), B.prototype.translate = function() {
- var S = this, x = S.chart, f = S.options, d = S.dense = 2 > S.closestPointRange * S.xAxis.transA;
- d = S.borderWidth = G(f.borderWidth, d ? 0 : 1);
- var T = S.yAxis, O = f.threshold, j = S.translatedThreshold = T.getThreshold(O), k = G(f.minPointLength, 5), b = S.getColumnMetrics(), w = b.width, v = S.barW = Math.max(w, 1 + 2 * d), l = S.pointXOffset = b.offset;
- x.inverted && (j -= 0.5), f.pointPadding && (v = Math.ceil(v)), U.translate.apply(S), S.points.forEach(function(h) {
- var u = G(h.yBottom, j), i = 999 + Math.abs(u), c = H(h.plotY, -i, T.len + i);
- i = h.plotX + l;
- var a = v / 2, t = Math.min(c, u);
- u = Math.max(c, u) - t;
- var s;
- h.barX = i, h.pointWidth = w, h.tooltipPos = x.inverted ? [T.len + T.pos - x.plotLeft - c, S.xAxis.len - i - a, u] : [i + a, c + T.pos - x.plotTop, u], c = O + (h.total || h.y), f.stacking === "percent" && (c = O + (0 > h.y) ? -100 : 100), c = T.toPixels(c, !0);
- var n = (s = x.plotHeight - c - (x.plotHeight - j)) ? a * (t - c) / s : 0, P = s ? a * (t + u - c) / s : 0;
- s = i - n + a, n = i + n + a;
- var _ = i + P + a;
- P = i - P + a;
- var I = t - k, W = t + u;
- 0 > h.y && (I = t, W = t + u + k), x.inverted && (_ = T.width - t, s = c - (T.width - j), n = a * (c - _) / s, P = a * (c - (_ - u)) / s, s = i + a + n, n = s - 2 * n, _ = i - P + a, P = i + P + a, I = t, W = t + u - k, 0 > h.y && (W = t + u + k)), h.shapeType = "path", h.shapeArgs = { x: s, y: I, width: n - s, height: u, d: [["M", s, I], ["L", n, I], ["L", _, W], ["L", P, W], ["Z"]] };
- });
- }, B.defaultOptions = V(o.defaultOptions, {}), B;
- }(o), y.registerSeriesType("columnpyramid", N), N;
- }), M(p, "Series/ErrorBar/ErrorBarSeries.js", [p["Series/BoxPlot/BoxPlotSeries.js"], p["Series/Column/ColumnSeries.js"], p["Core/Series/SeriesRegistry.js"], p["Core/Utilities.js"]], function(o, y, N, D) {
- var U = this && this.__extends || function() {
- var R = function(B, S) {
- return R = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(x, f) {
- x.__proto__ = f;
- } || function(x, f) {
- for (var d in f)
- f.hasOwnProperty(d) && (x[d] = f[d]);
- }, R(B, S);
- };
- return function(B, S) {
- function x() {
- this.constructor = B;
- }
- R(B, S), B.prototype = S === null ? Object.create(S) : (x.prototype = S.prototype, new x());
- };
- }(), H = N.seriesTypes.arearange, V = D.merge;
- D = D.extend;
- var G = function(R) {
- function B() {
- var S = R !== null && R.apply(this, arguments) || this;
- return S.data = void 0, S.options = void 0, S.points = void 0, S;
- }
- return U(B, R), B.prototype.getColumnMetrics = function() {
- return this.linkedParent && this.linkedParent.columnMetrics || y.prototype.getColumnMetrics.call(this);
- }, B.prototype.drawDataLabels = function() {
- var S = this.pointValKey;
- H && (H.prototype.drawDataLabels.call(this), this.data.forEach(function(x) {
- x.y = x[S];
- }));
- }, B.prototype.toYData = function(S) {
- return [S.low, S.high];
- }, B.defaultOptions = V(o.defaultOptions, {
- color: "#000000",
- grouping: !1,
- linkedTo: ":previous",
- tooltip: { pointFormat: '<span style="color:{point.color}">●</span> {series.name}: <b>{point.low}</b> - <b>{point.high}</b><br/>' },
- whiskerWidth: null
- }), B;
- }(o);
- return D(G.prototype, { pointArrayMap: ["low", "high"], pointValKey: "high", doQuartiles: !1 }), N.registerSeriesType("errorbar", G), G;
- }), M(p, "Series/Gauge/GaugePoint.js", [p["Core/Series/SeriesRegistry.js"]], function(o) {
- var y = this && this.__extends || function() {
- var N = function(D, U) {
- return N = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(H, V) {
- H.__proto__ = V;
- } || function(H, V) {
- for (var G in V)
- V.hasOwnProperty(G) && (H[G] = V[G]);
- }, N(D, U);
- };
- return function(D, U) {
- function H() {
- this.constructor = D;
- }
- N(D, U), D.prototype = U === null ? Object.create(U) : (H.prototype = U.prototype, new H());
- };
- }();
- return function(N) {
- function D() {
- var U = N !== null && N.apply(this, arguments) || this;
- return U.options = void 0, U.series = void 0, U.shapeArgs = void 0, U;
- }
- return y(D, N), D.prototype.setState = function(U) {
- this.state = U;
- }, D;
- }(o.series.prototype.pointClass);
- }), M(p, "Series/Gauge/GaugeSeries.js", [p["Series/Gauge/GaugePoint.js"], p["Core/Globals.js"], p["Core/Series/SeriesRegistry.js"], p["Core/Utilities.js"]], function(o, y, N, D) {
- var U = this && this.__extends || function() {
- var d = function(T, O) {
- return d = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(j, k) {
- j.__proto__ = k;
- } || function(j, k) {
- for (var b in k)
- k.hasOwnProperty(b) && (j[b] = k[b]);
- }, d(T, O);
- };
- return function(T, O) {
- function j() {
- this.constructor = T;
- }
- d(T, O), T.prototype = O === null ? Object.create(O) : (j.prototype = O.prototype, new j());
- };
- }();
- y = y.noop;
- var H = N.series, V = N.seriesTypes.column, G = D.clamp, R = D.isNumber, B = D.extend, S = D.merge, x = D.pick, f = D.pInt;
- return D = function(d) {
- function T() {
- var O = d !== null && d.apply(this, arguments) || this;
- return O.data = void 0, O.points = void 0, O.options = void 0, O.yAxis = void 0, O;
- }
- return U(T, d), T.prototype.translate = function() {
- var O = this.yAxis, j = this.options, k = O.center;
- this.generatePoints(), this.points.forEach(function(b) {
- var w = S(j.dial, b.dial), v = f(x(w.radius, "80%")) * k[2] / 200, l = f(x(w.baseLength, "70%")) * v / 100, h = f(x(w.rearLength, "10%")) * v / 100, u = w.baseWidth || 3, i = w.topWidth || 1, c = j.overshoot, a = O.startAngleRad + O.translate(b.y, null, null, null, !0);
- (R(c) || j.wrap === !1) && (c = R(c) ? c / 180 * Math.PI : 0, a = G(
- a,
- O.startAngleRad - c,
- O.endAngleRad + c
- )), a = 180 * a / Math.PI, b.shapeType = "path", b.shapeArgs = { d: w.path || [["M", -h, -u / 2], ["L", l, -u / 2], ["L", v, -i / 2], ["L", v, i / 2], ["L", l, u / 2], ["L", -h, u / 2], ["Z"]], translateX: k[0], translateY: k[1], rotation: a }, b.plotX = k[0], b.plotY = k[1];
- });
- }, T.prototype.drawPoints = function() {
- var O = this, j = O.chart, k = O.yAxis.center, b = O.pivot, w = O.options, v = w.pivot, l = j.renderer;
- O.points.forEach(function(h) {
- var u = h.graphic, i = h.shapeArgs, c = i.d, a = S(w.dial, h.dial);
- u ? (u.animate(i), i.d = c) : h.graphic = l[h.shapeType](i).attr({
- rotation: i.rotation,
- zIndex: 1
- }).addClass("highcharts-dial").add(O.group), j.styledMode || h.graphic[u ? "animate" : "attr"]({ stroke: a.borderColor || "none", "stroke-width": a.borderWidth || 0, fill: a.backgroundColor || "#000000" });
- }), b ? b.animate({ translateX: k[0], translateY: k[1] }) : (O.pivot = l.circle(0, 0, x(v.radius, 5)).attr({ zIndex: 2 }).addClass("highcharts-pivot").translate(k[0], k[1]).add(O.group), j.styledMode || O.pivot.attr({ "stroke-width": v.borderWidth || 0, stroke: v.borderColor || "#cccccc", fill: v.backgroundColor || "#000000" }));
- }, T.prototype.animate = function(O) {
- var j = this;
- O || j.points.forEach(function(k) {
- var b = k.graphic;
- b && (b.attr({ rotation: 180 * j.yAxis.startAngleRad / Math.PI }), b.animate({ rotation: k.shapeArgs.rotation }, j.options.animation));
- });
- }, T.prototype.render = function() {
- this.group = this.plotGroup("group", "series", this.visible ? "visible" : "hidden", this.options.zIndex, this.chart.seriesGroup), H.prototype.render.call(this), this.group.clip(this.chart.clipRect);
- }, T.prototype.setData = function(O, j) {
- H.prototype.setData.call(this, O, !1), this.processData(), this.generatePoints(), x(j, !0) && this.chart.redraw();
- }, T.prototype.hasData = function() {
- return !!this.points.length;
- }, T.defaultOptions = S(H.defaultOptions, { dataLabels: { borderColor: "#cccccc", borderRadius: 3, borderWidth: 1, crop: !1, defer: !1, enabled: !0, verticalAlign: "top", y: 15, zIndex: 2 }, dial: {}, pivot: {}, tooltip: { headerFormat: "" }, showInLegend: !1 }), T;
- }(H), B(D.prototype, { angular: !0, directTouch: !0, drawGraph: y, drawTracker: V.prototype.drawTracker, fixedBox: !0, forceDL: !0, noSharedTooltip: !0, pointClass: o, trackerGroups: [
- "group",
- "dataLabelsGroup"
- ] }), N.registerSeriesType("gauge", D), D;
- }), M(p, "Series/PackedBubble/PackedBubblePoint.js", [p["Core/Chart/Chart.js"], p["Core/Series/Point.js"], p["Core/Series/SeriesRegistry.js"]], function(o, y, N) {
- var D = this && this.__extends || function() {
- var U = function(H, V) {
- return U = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(G, R) {
- G.__proto__ = R;
- } || function(G, R) {
- for (var B in R)
- R.hasOwnProperty(B) && (G[B] = R[B]);
- }, U(H, V);
- };
- return function(H, V) {
- function G() {
- this.constructor = H;
- }
- U(H, V), H.prototype = V === null ? Object.create(V) : (G.prototype = V.prototype, new G());
- };
- }();
- return function(U) {
- function H() {
- var V = U !== null && U.apply(this, arguments) || this;
- return V.degree = NaN, V.mass = NaN, V.radius = NaN, V.options = void 0, V.series = void 0, V.value = null, V;
- }
- return D(H, U), H.prototype.destroy = function() {
- return this.series.layout && this.series.layout.removeElementFromCollection(this, this.series.layout.nodes), y.prototype.destroy.apply(this, arguments);
- }, H.prototype.firePointEvent = function() {
- var V = this.series.options;
- if (this.isParentNode && V.parentNode) {
- var G = V.allowPointSelect;
- V.allowPointSelect = V.parentNode.allowPointSelect, y.prototype.firePointEvent.apply(this, arguments), V.allowPointSelect = G;
- } else
- y.prototype.firePointEvent.apply(this, arguments);
- }, H.prototype.select = function() {
- var V = this.series.chart;
- this.isParentNode ? (V.getSelectedPoints = V.getSelectedParentNodes, y.prototype.select.apply(this, arguments), V.getSelectedPoints = o.prototype.getSelectedPoints) : y.prototype.select.apply(this, arguments);
- }, H;
- }(N.seriesTypes.bubble.prototype.pointClass);
- }), M(p, "Series/Networkgraph/DraggableNodes.js", [p["Core/Chart/Chart.js"], p["Core/Globals.js"], p["Core/Utilities.js"]], function(o, y, N) {
- var D = N.addEvent;
- y.dragNodesMixin = { onMouseDown: function(U, H) {
- H = this.chart.pointer.normalize(H), U.fixedPosition = { chartX: H.chartX, chartY: H.chartY, plotX: U.plotX, plotY: U.plotY }, U.inDragMode = !0;
- }, onMouseMove: function(U, H) {
- if (U.fixedPosition && U.inDragMode) {
- var V = this.chart, G = V.pointer.normalize(H);
- H = U.fixedPosition.chartX - G.chartX, G = U.fixedPosition.chartY - G.chartY;
- var R = void 0, B = void 0, S = V.graphLayoutsLookup;
- (5 < Math.abs(H) || 5 < Math.abs(G)) && (R = U.fixedPosition.plotX - H, B = U.fixedPosition.plotY - G, V.isInsidePlot(R, B) && (U.plotX = R, U.plotY = B, U.hasDragged = !0, this.redrawHalo(U), S.forEach(function(x) {
- x.restartSimulation();
- })));
- }
- }, onMouseUp: function(U, H) {
- U.fixedPosition && (U.hasDragged && (this.layout.enableSimulation ? this.layout.start() : this.chart.redraw()), U.inDragMode = U.hasDragged = !1, this.options.fixedDraggable || delete U.fixedPosition);
- }, redrawHalo: function(U) {
- U && this.halo && this.halo.attr({ d: U.haloPath(this.options.states.hover.halo.size) });
- } }, D(o, "load", function() {
- var U = this, H, V, G;
- U.container && (H = D(U.container, "mousedown", function(R) {
- var B = U.hoverPoint;
- B && B.series && B.series.hasDraggableNodes && B.series.options.draggable && (B.series.onMouseDown(B, R), V = D(U.container, "mousemove", function(S) {
- return B && B.series && B.series.onMouseMove(B, S);
- }), G = D(U.container.ownerDocument, "mouseup", function(S) {
- return V(), G(), B && B.series && B.series.onMouseUp(B, S);
- }));
- })), D(U, "destroy", function() {
- H();
- });
- });
- }), M(
- p,
- "Series/Networkgraph/Integrations.js",
- [p["Core/Globals.js"]],
- function(o) {
- o.networkgraphIntegrations = { verlet: { attractiveForceFunction: function(y, N) {
- return (N - y) / y;
- }, repulsiveForceFunction: function(y, N) {
- return (N - y) / y * (N > y ? 1 : 0);
- }, barycenter: function() {
- var y = this.options.gravitationalConstant, N = this.barycenter.xFactor, D = this.barycenter.yFactor;
- N = (N - (this.box.left + this.box.width) / 2) * y, D = (D - (this.box.top + this.box.height) / 2) * y, this.nodes.forEach(function(U) {
- U.fixedPosition || (U.plotX -= N / U.mass / U.degree, U.plotY -= D / U.mass / U.degree);
- });
- }, repulsive: function(y, N, D) {
- N = N * this.diffTemperature / y.mass / y.degree, y.fixedPosition || (y.plotX += D.x * N, y.plotY += D.y * N);
- }, attractive: function(y, N, D) {
- var U = y.getMass(), H = -D.x * N * this.diffTemperature;
- N = -D.y * N * this.diffTemperature, y.fromNode.fixedPosition || (y.fromNode.plotX -= H * U.fromNode / y.fromNode.degree, y.fromNode.plotY -= N * U.fromNode / y.fromNode.degree), y.toNode.fixedPosition || (y.toNode.plotX += H * U.toNode / y.toNode.degree, y.toNode.plotY += N * U.toNode / y.toNode.degree);
- }, integrate: function(y, N) {
- var D = -y.options.friction, U = y.options.maxSpeed, H = (N.plotX + N.dispX - N.prevX) * D;
- D *= N.plotY + N.dispY - N.prevY;
- var V = Math.abs, G = V(H) / (H || 1);
- V = V(D) / (D || 1), H = G * Math.min(U, Math.abs(H)), D = V * Math.min(U, Math.abs(D)), N.prevX = N.plotX + N.dispX, N.prevY = N.plotY + N.dispY, N.plotX += H, N.plotY += D, N.temperature = y.vectorLength({ x: H, y: D });
- }, getK: function(y) {
- return Math.pow(y.box.width * y.box.height / y.nodes.length, 0.5);
- } }, euler: { attractiveForceFunction: function(y, N) {
- return y * y / N;
- }, repulsiveForceFunction: function(y, N) {
- return N * N / y;
- }, barycenter: function() {
- var y = this.options.gravitationalConstant, N = this.barycenter.xFactor, D = this.barycenter.yFactor;
- this.nodes.forEach(function(U) {
- if (!U.fixedPosition) {
- var H = U.getDegree();
- H *= 1 + H / 2, U.dispX += (N - U.plotX) * y * H / U.degree, U.dispY += (D - U.plotY) * y * H / U.degree;
- }
- });
- }, repulsive: function(y, N, D, U) {
- y.dispX += D.x / U * N / y.degree, y.dispY += D.y / U * N / y.degree;
- }, attractive: function(y, N, D, U) {
- var H = y.getMass(), V = D.x / U * N;
- N *= D.y / U, y.fromNode.fixedPosition || (y.fromNode.dispX -= V * H.fromNode / y.fromNode.degree, y.fromNode.dispY -= N * H.fromNode / y.fromNode.degree), y.toNode.fixedPosition || (y.toNode.dispX += V * H.toNode / y.toNode.degree, y.toNode.dispY += N * H.toNode / y.toNode.degree);
- }, integrate: function(y, N) {
- N.dispX += N.dispX * y.options.friction, N.dispY += N.dispY * y.options.friction;
- var D = N.temperature = y.vectorLength({ x: N.dispX, y: N.dispY });
- D !== 0 && (N.plotX += N.dispX / D * Math.min(Math.abs(N.dispX), y.temperature), N.plotY += N.dispY / D * Math.min(Math.abs(N.dispY), y.temperature));
- }, getK: function(y) {
- return Math.pow(y.box.width * y.box.height / y.nodes.length, 0.3);
- } } };
- }
- ), M(
- p,
- "Series/Networkgraph/QuadTree.js",
- [p["Core/Globals.js"], p["Core/Utilities.js"]],
- function(o, y) {
- y = y.extend;
- var N = o.QuadTreeNode = function(D) {
- this.box = D, this.boxSize = Math.min(D.width, D.height), this.nodes = [], this.body = this.isInternal = !1, this.isEmpty = !0;
- };
- y(N.prototype, { insert: function(D, U) {
- this.isInternal ? this.nodes[this.getBoxPosition(D)].insert(D, U - 1) : (this.isEmpty = !1, this.body ? U ? (this.isInternal = !0, this.divideBox(), this.body !== !0 && (this.nodes[this.getBoxPosition(this.body)].insert(this.body, U - 1), this.body = !0), this.nodes[this.getBoxPosition(D)].insert(D, U - 1)) : (U = new N({
- top: D.plotX,
- left: D.plotY,
- width: 0.1,
- height: 0.1
- }), U.body = D, U.isInternal = !1, this.nodes.push(U)) : (this.isInternal = !1, this.body = D));
- }, updateMassAndCenter: function() {
- var D = 0, U = 0, H = 0;
- this.isInternal ? (this.nodes.forEach(function(V) {
- V.isEmpty || (D += V.mass, U += V.plotX * V.mass, H += V.plotY * V.mass);
- }), U /= D, H /= D) : this.body && (D = this.body.mass, U = this.body.plotX, H = this.body.plotY), this.mass = D, this.plotX = U, this.plotY = H;
- }, divideBox: function() {
- var D = this.box.width / 2, U = this.box.height / 2;
- this.nodes[0] = new N({
- left: this.box.left,
- top: this.box.top,
- width: D,
- height: U
- }), this.nodes[1] = new N({ left: this.box.left + D, top: this.box.top, width: D, height: U }), this.nodes[2] = new N({ left: this.box.left + D, top: this.box.top + U, width: D, height: U }), this.nodes[3] = new N({ left: this.box.left, top: this.box.top + U, width: D, height: U });
- }, getBoxPosition: function(D) {
- var U = D.plotY < this.box.top + this.box.height / 2;
- return D.plotX < this.box.left + this.box.width / 2 ? U ? 0 : 3 : U ? 1 : 2;
- } }), o = o.QuadTree = function(D, U, H, V) {
- this.box = { left: D, top: U, width: H, height: V }, this.maxDepth = 25, this.root = new N(
- this.box,
- "0"
- ), this.root.isInternal = !0, this.root.isRoot = !0, this.root.divideBox();
- }, y(o.prototype, { insertNodes: function(D) {
- D.forEach(function(U) {
- this.root.insert(U, this.maxDepth);
- }, this);
- }, visitNodeRecursive: function(D, U, H) {
- var V;
- D || (D = this.root), D === this.root && U && (V = U(D)), V !== !1 && (D.nodes.forEach(function(G) {
- if (G.isInternal) {
- if (U && (V = U(G)), V === !1)
- return;
- this.visitNodeRecursive(G, U, H);
- } else
- G.body && U && U(G.body);
- H && H(G);
- }, this), D === this.root && H && H(D));
- }, calculateMassAndCenter: function() {
- this.visitNodeRecursive(
- null,
- null,
- function(D) {
- D.updateMassAndCenter();
- }
- );
- } });
- }
- ), M(p, "Series/Networkgraph/Layouts.js", [p["Core/Chart/Chart.js"], p["Core/Animation/AnimationUtilities.js"], p["Core/Globals.js"], p["Core/Utilities.js"]], function(o, y, N, D) {
- var U = y.setAnimation;
- y = D.addEvent;
- var H = D.clamp, V = D.defined, G = D.extend, R = D.isFunction, B = D.pick;
- N.layouts = { "reingold-fruchterman": function() {
- } }, G(N.layouts["reingold-fruchterman"].prototype, {
- init: function(S) {
- this.options = S, this.nodes = [], this.links = [], this.series = [], this.box = {
- x: 0,
- y: 0,
- width: 0,
- height: 0
- }, this.setInitialRendering(!0), this.integration = N.networkgraphIntegrations[S.integration], this.enableSimulation = S.enableSimulation, this.attractiveForce = B(S.attractiveForce, this.integration.attractiveForceFunction), this.repulsiveForce = B(S.repulsiveForce, this.integration.repulsiveForceFunction), this.approximation = S.approximation;
- },
- updateSimulation: function(S) {
- this.enableSimulation = B(S, this.options.enableSimulation);
- },
- start: function() {
- var S = this.series, x = this.options;
- this.currentStep = 0, this.forces = S[0] && S[0].forces || [], this.chart = S[0] && S[0].chart, this.initialRendering && (this.initPositions(), S.forEach(function(f) {
- f.finishedAnimating = !0, f.render();
- })), this.setK(), this.resetSimulation(x), this.enableSimulation && this.step();
- },
- step: function() {
- var S = this, x = this.series;
- S.currentStep++, S.approximation === "barnes-hut" && (S.createQuadTree(), S.quadTree.calculateMassAndCenter()), S.forces.forEach(function(f) {
- S[f + "Forces"](S.temperature);
- }), S.applyLimits(S.temperature), S.temperature = S.coolDown(
- S.startTemperature,
- S.diffTemperature,
- S.currentStep
- ), S.prevSystemTemperature = S.systemTemperature, S.systemTemperature = S.getSystemTemperature(), S.enableSimulation && (x.forEach(function(f) {
- f.chart && f.render();
- }), S.maxIterations-- && isFinite(S.temperature) && !S.isStable() ? (S.simulation && N.win.cancelAnimationFrame(S.simulation), S.simulation = N.win.requestAnimationFrame(function() {
- S.step();
- })) : S.simulation = !1);
- },
- stop: function() {
- this.simulation && N.win.cancelAnimationFrame(this.simulation);
- },
- setArea: function(S, x, f, d) {
- this.box = {
- left: S,
- top: x,
- width: f,
- height: d
- };
- },
- setK: function() {
- this.k = this.options.linkLength || this.integration.getK(this);
- },
- addElementsToCollection: function(S, x) {
- S.forEach(function(f) {
- x.indexOf(f) === -1 && x.push(f);
- });
- },
- removeElementFromCollection: function(S, x) {
- S = x.indexOf(S), S !== -1 && x.splice(S, 1);
- },
- clear: function() {
- this.nodes.length = 0, this.links.length = 0, this.series.length = 0, this.resetSimulation();
- },
- resetSimulation: function() {
- this.forcedStop = !1, this.systemTemperature = 0, this.setMaxIterations(), this.setTemperature(), this.setDiffTemperature();
- },
- restartSimulation: function() {
- this.simulation ? this.resetSimulation() : (this.setInitialRendering(!1), this.enableSimulation ? this.start() : this.setMaxIterations(1), this.chart && this.chart.redraw(), this.setInitialRendering(!0));
- },
- setMaxIterations: function(S) {
- this.maxIterations = B(S, this.options.maxIterations);
- },
- setTemperature: function() {
- this.temperature = this.startTemperature = Math.sqrt(this.nodes.length);
- },
- setDiffTemperature: function() {
- this.diffTemperature = this.startTemperature / (this.options.maxIterations + 1);
- },
- setInitialRendering: function(S) {
- this.initialRendering = S;
- },
- createQuadTree: function() {
- this.quadTree = new N.QuadTree(this.box.left, this.box.top, this.box.width, this.box.height), this.quadTree.insertNodes(this.nodes);
- },
- initPositions: function() {
- var S = this.options.initialPositions;
- R(S) ? (S.call(this), this.nodes.forEach(function(x) {
- V(x.prevX) || (x.prevX = x.plotX), V(x.prevY) || (x.prevY = x.plotY), x.dispX = 0, x.dispY = 0;
- })) : S === "circle" ? this.setCircularPositions() : this.setRandomPositions();
- },
- setCircularPositions: function() {
- function S(b) {
- b.linksFrom.forEach(function(w) {
- j[w.toNode.id] || (j[w.toNode.id] = !0, O.push(w.toNode), S(w.toNode));
- });
- }
- var x = this.box, f = this.nodes, d = 2 * Math.PI / (f.length + 1), T = f.filter(function(b) {
- return b.linksTo.length === 0;
- }), O = [], j = {}, k = this.options.initialPositionRadius;
- T.forEach(function(b) {
- O.push(b), S(b);
- }), O.length ? f.forEach(function(b) {
- O.indexOf(b) === -1 && O.push(b);
- }) : O = f, O.forEach(function(b, w) {
- b.plotX = b.prevX = B(b.plotX, x.width / 2 + k * Math.cos(w * d)), b.plotY = b.prevY = B(b.plotY, x.height / 2 + k * Math.sin(w * d)), b.dispX = 0, b.dispY = 0;
- });
- },
- setRandomPositions: function() {
- function S(T) {
- return T = T * T / Math.PI, T -= Math.floor(T);
- }
- var x = this.box, f = this.nodes, d = f.length + 1;
- f.forEach(function(T, O) {
- T.plotX = T.prevX = B(T.plotX, x.width * S(O)), T.plotY = T.prevY = B(T.plotY, x.height * S(d + O)), T.dispX = 0, T.dispY = 0;
- });
- },
- force: function(S) {
- this.integration[S].apply(this, Array.prototype.slice.call(arguments, 1));
- },
- barycenterForces: function() {
- this.getBarycenter(), this.force("barycenter");
- },
- getBarycenter: function() {
- var S = 0, x = 0, f = 0;
- return this.nodes.forEach(function(d) {
- x += d.plotX * d.mass, f += d.plotY * d.mass, S += d.mass;
- }), this.barycenter = { x, y: f, xFactor: x / S, yFactor: f / S };
- },
- barnesHutApproximation: function(S, x) {
- var f = this.getDistXY(S, x), d = this.vectorLength(f);
- if (S !== x && d !== 0)
- if (x.isInternal)
- if (x.boxSize / d < this.options.theta && d !== 0) {
- var T = this.repulsiveForce(d, this.k);
- this.force("repulsive", S, T * x.mass, f, d);
- var O = !1;
- } else
- O = !0;
- else
- T = this.repulsiveForce(d, this.k), this.force("repulsive", S, T * x.mass, f, d);
- return O;
- },
- repulsiveForces: function() {
- var S = this;
- S.approximation === "barnes-hut" ? S.nodes.forEach(function(x) {
- S.quadTree.visitNodeRecursive(
- null,
- function(f) {
- return S.barnesHutApproximation(x, f);
- }
- );
- }) : S.nodes.forEach(function(x) {
- S.nodes.forEach(function(f) {
- if (x !== f && !x.fixedPosition) {
- var d = S.getDistXY(x, f), T = S.vectorLength(d);
- if (T !== 0) {
- var O = S.repulsiveForce(T, S.k);
- S.force("repulsive", x, O * f.mass, d, T);
- }
- }
- });
- });
- },
- attractiveForces: function() {
- var S = this, x, f, d;
- S.links.forEach(function(T) {
- T.fromNode && T.toNode && (x = S.getDistXY(T.fromNode, T.toNode), f = S.vectorLength(x), f !== 0 && (d = S.attractiveForce(f, S.k), S.force("attractive", T, d, x, f)));
- });
- },
- applyLimits: function() {
- var S = this;
- S.nodes.forEach(function(x) {
- x.fixedPosition || (S.integration.integrate(S, x), S.applyLimitBox(x, S.box), x.dispX = 0, x.dispY = 0);
- });
- },
- applyLimitBox: function(S, x) {
- var f = S.radius;
- S.plotX = H(S.plotX, x.left + f, x.width - f), S.plotY = H(S.plotY, x.top + f, x.height - f);
- },
- coolDown: function(S, x, f) {
- return S - x * f;
- },
- isStable: function() {
- return 1e-5 > Math.abs(this.systemTemperature - this.prevSystemTemperature) || 0 >= this.temperature;
- },
- getSystemTemperature: function() {
- return this.nodes.reduce(function(S, x) {
- return S + x.temperature;
- }, 0);
- },
- vectorLength: function(S) {
- return Math.sqrt(S.x * S.x + S.y * S.y);
- },
- getDistR: function(S, x) {
- return S = this.getDistXY(S, x), this.vectorLength(S);
- },
- getDistXY: function(S, x) {
- var f = S.plotX - x.plotX;
- return S = S.plotY - x.plotY, { x: f, y: S, absX: Math.abs(f), absY: Math.abs(S) };
- }
- }), y(o, "predraw", function() {
- this.graphLayoutsLookup && this.graphLayoutsLookup.forEach(function(S) {
- S.stop();
- });
- }), y(o, "render", function() {
- function S(d) {
- d.maxIterations-- && isFinite(d.temperature) && !d.isStable() && !d.enableSimulation && (d.beforeStep && d.beforeStep(), d.step(), f = !1, x = !0);
- }
- var x = !1;
- if (this.graphLayoutsLookup) {
- for (U(!1, this), this.graphLayoutsLookup.forEach(function(d) {
- d.start();
- }); !f; ) {
- var f = !0;
- this.graphLayoutsLookup.forEach(S);
- }
- x && this.series.forEach(function(d) {
- d && d.layout && d.render();
- });
- }
- }), y(o, "beforePrint", function() {
- this.graphLayoutsLookup && (this.graphLayoutsLookup.forEach(function(S) {
- S.updateSimulation(!1);
- }), this.redraw());
- }), y(o, "afterPrint", function() {
- this.graphLayoutsLookup && this.graphLayoutsLookup.forEach(function(S) {
- S.updateSimulation();
- }), this.redraw();
- });
- }), M(p, "Series/PackedBubble/PackedBubbleComposition.js", [p["Core/Chart/Chart.js"], p["Core/Globals.js"], p["Core/Utilities.js"]], function(o, y, N) {
- var D = y.layouts["reingold-fruchterman"], U = N.addEvent, H = N.extendClass, V = N.pick;
- o.prototype.getSelectedParentNodes = function() {
- var G = [];
- return this.series.forEach(function(R) {
- R.parentNode && R.parentNode.selected && G.push(R.parentNode);
- }), G;
- }, y.networkgraphIntegrations.packedbubble = { repulsiveForceFunction: function(G, R, B, S) {
- return Math.min(G, (B.marker.radius + S.marker.radius) / 2);
- }, barycenter: function() {
- var G = this, R = G.options.gravitationalConstant, B = G.box, S = G.nodes, x, f;
- S.forEach(function(d) {
- G.options.splitSeries && !d.isParentNode ? (x = d.series.parentNode.plotX, f = d.series.parentNode.plotY) : (x = B.width / 2, f = B.height / 2), d.fixedPosition || (d.plotX -= (d.plotX - x) * R / (d.mass * Math.sqrt(S.length)), d.plotY -= (d.plotY - f) * R / (d.mass * Math.sqrt(S.length)));
- });
- }, repulsive: function(G, R, B, S) {
- var x = R * this.diffTemperature / G.mass / G.degree;
- R = B.x * x, B = B.y * x, G.fixedPosition || (G.plotX += R, G.plotY += B), S.fixedPosition || (S.plotX -= R, S.plotY -= B);
- }, integrate: y.networkgraphIntegrations.verlet.integrate, getK: y.noop }, y.layouts.packedbubble = H(D, { beforeStep: function() {
- this.options.marker && this.series.forEach(function(G) {
- G && G.calculateParentRadius();
- });
- }, isStable: function() {
- var G = Math.abs(this.prevSystemTemperature - this.systemTemperature);
- return 1 > Math.abs(10 * this.systemTemperature / Math.sqrt(this.nodes.length)) && 1e-5 > G || 0 >= this.temperature;
- }, setCircularPositions: function() {
- var G = this, R = G.box, B = G.nodes, S = 2 * Math.PI / (B.length + 1), x, f, d = G.options.initialPositionRadius;
- B.forEach(function(T, O) {
- G.options.splitSeries && !T.isParentNode ? (x = T.series.parentNode.plotX, f = T.series.parentNode.plotY) : (x = R.width / 2, f = R.height / 2), T.plotX = T.prevX = V(T.plotX, x + d * Math.cos(T.index || O * S)), T.plotY = T.prevY = V(T.plotY, f + d * Math.sin(T.index || O * S)), T.dispX = 0, T.dispY = 0;
- });
- }, repulsiveForces: function() {
- var G = this, R, B, S, x = G.options.bubblePadding;
- G.nodes.forEach(function(f) {
- f.degree = f.mass, f.neighbours = 0, G.nodes.forEach(function(d) {
- R = 0, f === d || f.fixedPosition || !G.options.seriesInteraction && f.series !== d.series || (S = G.getDistXY(f, d), B = G.vectorLength(S) - (f.marker.radius + d.marker.radius + x), 0 > B && (f.degree += 0.01, f.neighbours++, R = G.repulsiveForce(-B / Math.sqrt(f.neighbours), G.k, f, d)), G.force("repulsive", f, R * d.mass, S, d, B));
- });
- });
- }, applyLimitBox: function(G) {
- if (this.options.splitSeries && !G.isParentNode && this.options.parentNodeLimit) {
- var R = this.getDistXY(G, G.series.parentNode), B = G.series.parentNodeRadius - G.marker.radius - this.vectorLength(R);
- 0 > B && B > -2 * G.marker.radius && (G.plotX -= 0.01 * R.x, G.plotY -= 0.01 * R.y);
- }
- D.prototype.applyLimitBox.apply(this, arguments);
- } }), U(o, "beforeRedraw", function() {
- this.allDataPoints && delete this.allDataPoints;
- });
- }), M(p, "Series/PackedBubble/PackedBubbleSeries.js", [p["Core/Color/Color.js"], p["Core/Globals.js"], p["Series/PackedBubble/PackedBubblePoint.js"], p["Core/Series/SeriesRegistry.js"], p["Core/Utilities.js"]], function(o, y, N, D, U) {
- var H = this && this.__extends || function() {
- var w = function(v, l) {
- return w = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(h, u) {
- h.__proto__ = u;
- } || function(h, u) {
- for (var i in u)
- u.hasOwnProperty(i) && (h[i] = u[i]);
- }, w(v, l);
- };
- return function(v, l) {
- function h() {
- this.constructor = v;
- }
- w(v, l), v.prototype = l === null ? Object.create(l) : (h.prototype = l.prototype, new h());
- };
- }(), V = o.parse, G = D.series, R = D.seriesTypes.bubble, B = U.addEvent, S = U.clamp, x = U.defined, f = U.extend, d = U.fireEvent, T = U.isArray, O = U.isNumber, j = U.merge, k = U.pick, b = y.dragNodesMixin;
- return o = function(w) {
- function v() {
- var l = w !== null && w.apply(this, arguments) || this;
- return l.chart = void 0, l.data = void 0, l.layout = void 0, l.options = void 0, l.points = void 0, l.xData = void 0, l;
- }
- return H(v, w), v.prototype.accumulateAllPoints = function(l) {
- var h = l.chart, u = [], i, c;
- for (i = 0; i < h.series.length; i++)
- if (l = h.series[i], l.is("packedbubble") && l.visible || !h.options.chart.ignoreHiddenSeries)
- for (c = 0; c < l.yData.length; c++)
- u.push([null, null, l.yData[c], l.index, c, { id: c, marker: { radius: 0 } }]);
- return u;
- }, v.prototype.addLayout = function() {
- var l = this.options.layoutAlgorithm, h = this.chart.graphLayoutsStorage, u = this.chart.graphLayoutsLookup, i = this.chart.options.chart;
- h || (this.chart.graphLayoutsStorage = h = {}, this.chart.graphLayoutsLookup = u = []);
- var c = h[l.type];
- c || (l.enableSimulation = x(i.forExport) ? !i.forExport : l.enableSimulation, h[l.type] = c = new y.layouts[l.type](), c.init(l), u.splice(c.index, 0, c)), this.layout = c, this.points.forEach(function(a) {
- a.mass = 2, a.degree = 1, a.collisionNmb = 1;
- }), c.setArea(0, 0, this.chart.plotWidth, this.chart.plotHeight), c.addElementsToCollection([this], c.series), c.addElementsToCollection(this.points, c.nodes);
- }, v.prototype.addSeriesLayout = function() {
- var l = this.options.layoutAlgorithm, h = this.chart.graphLayoutsStorage, u = this.chart.graphLayoutsLookup, i = j(l, l.parentNodeOptions, { enableSimulation: this.layout.options.enableSimulation }), c = h[l.type + "-series"];
- c || (h[l.type + "-series"] = c = new y.layouts[l.type](), c.init(i), u.splice(c.index, 0, c)), this.parentNodeLayout = c, this.createParentNodes();
- }, v.prototype.calculateParentRadius = function() {
- var l = this.seriesBox();
- this.parentNodeRadius = S(Math.sqrt(2 * this.parentNodeMass / Math.PI) + 20, 20, l ? Math.max(Math.sqrt(Math.pow(
- l.width,
- 2
- ) + Math.pow(l.height, 2)) / 2 + 20, 20) : Math.sqrt(2 * this.parentNodeMass / Math.PI) + 20), this.parentNode && (this.parentNode.marker.radius = this.parentNode.radius = this.parentNodeRadius);
- }, v.prototype.calculateZExtremes = function() {
- var l = this.options.zMin, h = this.options.zMax, u = 1 / 0, i = -1 / 0;
- return l && h ? [l, h] : (this.chart.series.forEach(function(c) {
- c.yData.forEach(function(a) {
- x(a) && (a > i && (i = a), a < u && (u = a));
- });
- }), l = k(l, u), h = k(h, i), [l, h]);
- }, v.prototype.checkOverlap = function(l, h) {
- var u = l[0] - h[0], i = l[1] - h[1];
- return -1e-3 > Math.sqrt(u * u + i * i) - Math.abs(l[2] + h[2]);
- }, v.prototype.createParentNodes = function() {
- var l = this, h = l.chart, u = l.parentNodeLayout, i, c = l.parentNode, a = l.pointClass, t = l.layout.options, s = { radius: l.parentNodeRadius, lineColor: l.color, fillColor: V(l.color).brighten(0.4).get() };
- t.parentNodeOptions && (s = j(t.parentNodeOptions.marker || {}, s)), l.parentNodeMass = 0, l.points.forEach(function(n) {
- l.parentNodeMass += Math.PI * Math.pow(n.marker.radius, 2);
- }), l.calculateParentRadius(), u.nodes.forEach(function(n) {
- n.seriesIndex === l.index && (i = !0);
- }), u.setArea(0, 0, h.plotWidth, h.plotHeight), i || (c || (c = new a().init(this, { mass: l.parentNodeRadius / 2, marker: s, dataLabels: { inside: !1 }, states: { normal: { marker: s }, hover: { marker: s } }, dataLabelOnNull: !0, degree: l.parentNodeRadius, isParentNode: !0, seriesIndex: l.index })), l.parentNode && (c.plotX = l.parentNode.plotX, c.plotY = l.parentNode.plotY), l.parentNode = c, u.addElementsToCollection([l], u.series), u.addElementsToCollection([c], u.nodes));
- }, v.prototype.deferLayout = function() {
- var l = this.options.layoutAlgorithm;
- this.visible && (this.addLayout(), l.splitSeries && this.addSeriesLayout());
- }, v.prototype.destroy = function() {
- this.chart.graphLayoutsLookup && this.chart.graphLayoutsLookup.forEach(function(l) {
- l.removeElementFromCollection(this, l.series);
- }, this), this.parentNode && this.parentNodeLayout && (this.parentNodeLayout.removeElementFromCollection(this.parentNode, this.parentNodeLayout.nodes), this.parentNode.dataLabel && (this.parentNode.dataLabel = this.parentNode.dataLabel.destroy())), G.prototype.destroy.apply(this, arguments);
- }, v.prototype.drawDataLabels = function() {
- var l = this.options.dataLabels.textPath, h = this.points;
- G.prototype.drawDataLabels.apply(this, arguments), this.parentNode && (this.parentNode.formatPrefix = "parentNode", this.points = [this.parentNode], this.options.dataLabels.textPath = this.options.dataLabels.parentNodeTextPath, G.prototype.drawDataLabels.apply(this, arguments), this.points = h, this.options.dataLabels.textPath = l);
- }, v.prototype.drawGraph = function() {
- if (this.layout && this.layout.options.splitSeries) {
- var l = this.chart, h = this.layout.options.parentNodeOptions.marker, u = { fill: h.fillColor || V(this.color).brighten(0.4).get(), opacity: h.fillOpacity, stroke: h.lineColor || this.color, "stroke-width": k(h.lineWidth, this.options.lineWidth) };
- this.parentNodesGroup || (this.parentNodesGroup = this.plotGroup("parentNodesGroup", "parentNode", this.visible ? "inherit" : "hidden", 0.1, l.seriesGroup), this.group.attr({ zIndex: 2 })), this.calculateParentRadius(), h = j({
- x: this.parentNode.plotX - this.parentNodeRadius,
- y: this.parentNode.plotY - this.parentNodeRadius,
- width: 2 * this.parentNodeRadius,
- height: 2 * this.parentNodeRadius
- }, u), this.parentNode.graphic || (this.graph = this.parentNode.graphic = l.renderer.symbol(u.symbol).add(this.parentNodesGroup)), this.parentNode.graphic.attr(h);
- }
- }, v.prototype.drawTracker = function() {
- var l = this.parentNode;
- if (w.prototype.drawTracker.call(this), l) {
- var h = T(l.dataLabels) ? l.dataLabels : l.dataLabel ? [l.dataLabel] : [];
- l.graphic && (l.graphic.element.point = l), h.forEach(function(u) {
- u.div ? u.div.point = l : u.element.point = l;
- });
- }
- }, v.prototype.getPointRadius = function() {
- var l = this, h = l.chart, u = l.options, i = u.useSimulation, c = Math.min(h.plotWidth, h.plotHeight), a = {}, t = [], s = h.allDataPoints, n, P, _, I;
- ["minSize", "maxSize"].forEach(function(E) {
- var X = parseInt(u[E], 10), g = /%$/.test(u[E]);
- a[E] = g ? c * X / 100 : X * Math.sqrt(s.length);
- }), h.minRadius = n = a.minSize / Math.sqrt(s.length), h.maxRadius = P = a.maxSize / Math.sqrt(s.length);
- var W = i ? l.calculateZExtremes() : [n, P];
- (s || []).forEach(function(E, X) {
- _ = i ? S(E[2], W[0], W[1]) : E[2], I = l.getRadius(W[0], W[1], n, P, _), I === 0 && (I = null), s[X][2] = I, t.push(I);
- }), l.radii = t;
- }, v.prototype.init = function() {
- return G.prototype.init.apply(this, arguments), this.eventsToUnbind.push(B(this, "updatedData", function() {
- this.chart.series.forEach(function(l) {
- l.type === this.type && (l.isDirty = !0);
- }, this);
- })), this;
- }, v.prototype.onMouseUp = function(l) {
- if (l.fixedPosition && !l.removed) {
- var h, u, i = this.layout, c = this.parentNodeLayout;
- c && i.options.dragBetweenSeries && c.nodes.forEach(function(a) {
- l && l.marker && a !== l.series.parentNode && (h = i.getDistXY(l, a), u = i.vectorLength(h) - a.marker.radius - l.marker.radius, 0 > u && (a.series.addPoint(j(l.options, { plotX: l.plotX, plotY: l.plotY }), !1), i.removeElementFromCollection(l, i.nodes), l.remove()));
- }), b.onMouseUp.apply(this, arguments);
- }
- }, v.prototype.placeBubbles = function(l) {
- var h = this.checkOverlap, u = this.positionBubble, i = [], c = 1, a = 0, t = 0, s = [], n;
- if (l = l.sort(function(P, _) {
- return _[2] - P[2];
- }), l.length) {
- if (i.push([[0, 0, l[0][2], l[0][3], l[0][4]]]), 1 < l.length)
- for (i.push([[0, 0 - l[1][2] - l[0][2], l[1][2], l[1][3], l[1][4]]]), n = 2; n < l.length; n++)
- l[n][2] = l[n][2] || 1, s = u(i[c][a], i[c - 1][t], l[n]), h(s, i[c][0]) ? (i.push([]), t = 0, i[c + 1].push(u(i[c][a], i[c][0], l[n])), c++, a = 0) : 1 < c && i[c - 1][t + 1] && h(s, i[c - 1][t + 1]) ? (t++, i[c].push(u(i[c][a], i[c - 1][t], l[n])), a++) : (a++, i[c].push(s));
- this.chart.stages = i, this.chart.rawPositions = [].concat.apply([], i), this.resizeRadius(), s = this.chart.rawPositions;
- }
- return s;
- }, v.prototype.pointAttribs = function(l, h) {
- var u = this.options, i = u.marker;
- return l && l.isParentNode && u.layoutAlgorithm && u.layoutAlgorithm.parentNodeOptions && (i = u.layoutAlgorithm.parentNodeOptions.marker), u = i.fillOpacity, l = G.prototype.pointAttribs.call(this, l, h), u !== 1 && (l["fill-opacity"] = u), l;
- }, v.prototype.positionBubble = function(l, h, u) {
- var i = Math.sqrt, c = Math.asin, a = Math.acos, t = Math.pow, s = Math.abs;
- return i = i(t(l[0] - h[0], 2) + t(l[1] - h[1], 2)), a = a((t(i, 2) + t(u[2] + h[2], 2) - t(u[2] + l[2], 2)) / (2 * (u[2] + h[2]) * i)), c = c(s(l[0] - h[0]) / i), l = (0 > l[1] - h[1] ? 0 : Math.PI) + a + c * (0 > (l[0] - h[0]) * (l[1] - h[1]) ? 1 : -1), [h[0] + (h[2] + u[2]) * Math.sin(l), h[1] - (h[2] + u[2]) * Math.cos(l), u[2], u[3], u[4]];
- }, v.prototype.render = function() {
- var l = [];
- G.prototype.render.apply(this, arguments), this.options.dataLabels.allowOverlap || (this.data.forEach(function(h) {
- T(h.dataLabels) && h.dataLabels.forEach(function(u) {
- l.push(u);
- });
- }), this.options.useSimulation && this.chart.hideOverlappingLabels(l));
- }, v.prototype.resizeRadius = function() {
- var l = this.chart, h = l.rawPositions, u = Math.min, i = Math.max, c = l.plotLeft, a = l.plotTop, t = l.plotHeight, s = l.plotWidth, n, P, _, I = n = Number.POSITIVE_INFINITY, W = P = Number.NEGATIVE_INFINITY;
- for (_ = 0; _ < h.length; _++) {
- var E = h[_][2];
- I = u(
- I,
- h[_][0] - E
- ), W = i(W, h[_][0] + E), n = u(n, h[_][1] - E), P = i(P, h[_][1] + E);
- }
- if (_ = [W - I, P - n], u = u.apply([], [(s - c) / _[0], (t - a) / _[1]]), 1e-10 < Math.abs(u - 1)) {
- for (_ = 0; _ < h.length; _++)
- h[_][2] *= u;
- this.placeBubbles(h);
- } else
- l.diffY = t / 2 + a - n - (P - n) / 2, l.diffX = s / 2 + c - I - (W - I) / 2;
- }, v.prototype.seriesBox = function() {
- var l = this.chart, h = Math.max, u = Math.min, i, c = [l.plotLeft, l.plotLeft + l.plotWidth, l.plotTop, l.plotTop + l.plotHeight];
- return this.data.forEach(function(a) {
- x(a.plotX) && x(a.plotY) && a.marker.radius && (i = a.marker.radius, c[0] = u(c[0], a.plotX - i), c[1] = h(c[1], a.plotX + i), c[2] = u(c[2], a.plotY - i), c[3] = h(c[3], a.plotY + i));
- }), O(c.width / c.height) ? c : null;
- }, v.prototype.setVisible = function() {
- var l = this;
- G.prototype.setVisible.apply(l, arguments), l.parentNodeLayout && l.graph ? l.visible ? (l.graph.show(), l.parentNode.dataLabel && l.parentNode.dataLabel.show()) : (l.graph.hide(), l.parentNodeLayout.removeElementFromCollection(l.parentNode, l.parentNodeLayout.nodes), l.parentNode.dataLabel && l.parentNode.dataLabel.hide()) : l.layout && (l.visible ? l.layout.addElementsToCollection(
- l.points,
- l.layout.nodes
- ) : l.points.forEach(function(h) {
- l.layout.removeElementFromCollection(h, l.layout.nodes);
- }));
- }, v.prototype.translate = function() {
- var l = this.chart, h = this.data, u = this.index, i, c = this.options.useSimulation;
- if (this.processedXData = this.xData, this.generatePoints(), x(l.allDataPoints) || (l.allDataPoints = this.accumulateAllPoints(this), this.getPointRadius()), c)
- var a = l.allDataPoints;
- else
- a = this.placeBubbles(l.allDataPoints), this.options.draggable = !1;
- for (i = 0; i < a.length; i++)
- if (a[i][3] === u) {
- var t = h[a[i][4]], s = k(a[i][2], void 0);
- c || (t.plotX = a[i][0] - l.plotLeft + l.diffX, t.plotY = a[i][1] - l.plotTop + l.diffY), O(s) && (t.marker = f(t.marker, { radius: s, width: 2 * s, height: 2 * s }), t.radius = s);
- }
- c && this.deferLayout(), d(this, "afterTranslate");
- }, v.defaultOptions = j(R.defaultOptions, { minSize: "10%", maxSize: "50%", sizeBy: "area", zoneAxis: "y", crisp: !1, tooltip: { pointFormat: "Value: {point.value}" }, draggable: !0, useSimulation: !0, parentNode: { allowPointSelect: !1 }, dataLabels: { formatter: function() {
- var l = this.series.chart.numberFormatter, h = this.point.value;
- return O(h) ? l(h, -1) : "";
- }, parentNodeFormatter: function() {
- return this.name;
- }, parentNodeTextPath: { enabled: !0 }, padding: 0, style: { transition: "opacity 2000ms" } }, layoutAlgorithm: { initialPositions: "circle", initialPositionRadius: 20, bubblePadding: 5, parentNodeLimit: !1, seriesInteraction: !0, dragBetweenSeries: !1, parentNodeOptions: { maxIterations: 400, gravitationalConstant: 0.03, maxSpeed: 50, initialPositionRadius: 100, seriesInteraction: !0, marker: {
- fillColor: null,
- fillOpacity: 1,
- lineWidth: null,
- lineColor: null,
- symbol: "circle"
- } }, enableSimulation: !0, type: "packedbubble", integration: "packedbubble", maxIterations: 1e3, splitSeries: !1, maxSpeed: 5, gravitationalConstant: 0.01, friction: -0.981 } }), v;
- }(R), f(o.prototype, {
- alignDataLabel: G.prototype.alignDataLabel,
- axisTypes: [],
- directTouch: !0,
- forces: ["barycenter", "repulsive"],
- hasDraggableNodes: !0,
- isCartesian: !1,
- noSharedTooltip: !0,
- onMouseDown: b.onMouseDown,
- onMouseMove: b.onMouseMove,
- pointArrayMap: ["value"],
- pointClass: N,
- pointValKey: "value",
- redrawHalo: b.redrawHalo,
- requireSorting: !1,
- searchPoint: y.noop,
- trackerGroups: ["group", "dataLabelsGroup", "parentNodesGroup"]
- }), D.registerSeriesType("packedbubble", o), o;
- }), M(p, "Series/Polygon/PolygonSeries.js", [p["Core/Globals.js"], p["Core/Legend/LegendSymbol.js"], p["Core/Series/SeriesRegistry.js"], p["Core/Utilities.js"]], function(o, y, N, D) {
- var U = this && this.__extends || function() {
- var x = function(f, d) {
- return x = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(T, O) {
- T.__proto__ = O;
- } || function(T, O) {
- for (var j in O)
- O.hasOwnProperty(j) && (T[j] = O[j]);
- }, x(f, d);
- };
- return function(f, d) {
- function T() {
- this.constructor = f;
- }
- x(f, d), f.prototype = d === null ? Object.create(d) : (T.prototype = d.prototype, new T());
- };
- }();
- o = o.noop;
- var H = N.series, V = N.seriesTypes, G = V.area, R = V.line, B = V.scatter;
- V = D.extend;
- var S = D.merge;
- return D = function(x) {
- function f() {
- var d = x !== null && x.apply(this, arguments) || this;
- return d.data = void 0, d.options = void 0, d.points = void 0, d;
- }
- return U(f, x), f.prototype.getGraphPath = function() {
- for (var d = R.prototype.getGraphPath.call(this), T = d.length + 1; T--; )
- (T === d.length || d[T][0] === "M") && 0 < T && d.splice(T, 0, ["Z"]);
- return this.areaPath = d;
- }, f.prototype.drawGraph = function() {
- this.options.fillColor = this.color, G.prototype.drawGraph.call(this);
- }, f.defaultOptions = S(B.defaultOptions, { marker: { enabled: !1, states: { hover: { enabled: !1 } } }, stickyTracking: !1, tooltip: { followPointer: !0, pointFormat: "" }, trackByArea: !0 }), f;
- }(B), V(D.prototype, { type: "polygon", drawLegendSymbol: y.drawRectangle, drawTracker: H.prototype.drawTracker, setStackedPoints: o }), N.registerSeriesType("polygon", D), D;
- }), M(p, "Core/Axis/WaterfallAxis.js", [p["Extensions/Stacking.js"], p["Core/Utilities.js"]], function(o, y) {
- var N = y.addEvent, D = y.objectEach, U;
- return function(H) {
- function V() {
- var x = this.waterfall.stacks;
- x && (x.changed = !1, delete x.alreadyChanged);
- }
- function G() {
- var x = this.options.stackLabels;
- x && x.enabled && this.waterfall.stacks && this.waterfall.renderStackTotals();
- }
- function R() {
- for (var x = this.axes, f = this.series, d = f.length; d--; )
- f[d].options.stacking && (x.forEach(function(T) {
- T.isXAxis || (T.waterfall.stacks.changed = !0);
- }), d = 0);
- }
- function B() {
- this.waterfall || (this.waterfall = new S(this));
- }
- var S = function() {
- function x(f) {
- this.axis = f, this.stacks = { changed: !1 };
- }
- return x.prototype.renderStackTotals = function() {
- var f = this.axis, d = f.waterfall.stacks, T = f.stacking && f.stacking.stackTotalGroup, O = new o(f, f.options.stackLabels, !1, 0, void 0);
- this.dummyStackItem = O, D(d, function(j) {
- D(j, function(k) {
- O.total = k.stackTotal, k.label && (O.label = k.label), o.prototype.render.call(O, T), k.label = O.label, delete O.label;
- });
- }), O.total = null;
- }, x;
- }();
- H.Composition = S, H.compose = function(x, f) {
- N(x, "init", B), N(x, "afterBuildStacks", V), N(x, "afterRender", G), N(f, "beforeRedraw", R);
- };
- }(U || (U = {})), U;
- }), M(p, "Series/Waterfall/WaterfallPoint.js", [p["Series/Column/ColumnSeries.js"], p["Core/Series/Point.js"], p["Core/Utilities.js"]], function(o, y, N) {
- var D = this && this.__extends || function() {
- var H = function(V, G) {
- return H = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(R, B) {
- R.__proto__ = B;
- } || function(R, B) {
- for (var S in B)
- B.hasOwnProperty(S) && (R[S] = B[S]);
- }, H(V, G);
- };
- return function(V, G) {
- function R() {
- this.constructor = V;
- }
- H(V, G), V.prototype = G === null ? Object.create(G) : (R.prototype = G.prototype, new R());
- };
- }(), U = N.isNumber;
- return function(H) {
- function V() {
- var G = H !== null && H.apply(this, arguments) || this;
- return G.options = void 0, G.series = void 0, G;
- }
- return D(V, H), V.prototype.getClassName = function() {
- var G = y.prototype.getClassName.call(this);
- return this.isSum ? G += " highcharts-sum" : this.isIntermediateSum && (G += " highcharts-intermediate-sum"), G;
- }, V.prototype.isValid = function() {
- return U(this.y) || this.isSum || !!this.isIntermediateSum;
- }, V;
- }(o.prototype.pointClass);
- }), M(p, "Series/Waterfall/WaterfallSeries.js", [p["Core/Axis/Axis.js"], p["Core/Chart/Chart.js"], p["Core/Series/SeriesRegistry.js"], p["Core/Utilities.js"], p["Core/Axis/WaterfallAxis.js"], p["Series/Waterfall/WaterfallPoint.js"]], function(o, y, N, D, U, H) {
- var V = this && this.__extends || function() {
- var k = function(b, w) {
- return k = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(v, l) {
- v.__proto__ = l;
- } || function(v, l) {
- for (var h in l)
- l.hasOwnProperty(h) && (v[h] = l[h]);
- }, k(b, w);
- };
- return function(b, w) {
- function v() {
- this.constructor = b;
- }
- k(b, w), b.prototype = w === null ? Object.create(w) : (v.prototype = w.prototype, new v());
- };
- }(), G = N.seriesTypes, R = G.column, B = G.line, S = D.arrayMax, x = D.arrayMin, f = D.correctFloat;
- G = D.extend;
- var d = D.isNumber, T = D.merge, O = D.objectEach, j = D.pick;
- return D = function(k) {
- function b() {
- var w = k !== null && k.apply(this, arguments) || this;
- return w.chart = void 0, w.data = void 0, w.options = void 0, w.points = void 0, w.stackedYNeg = void 0, w.stackedYPos = void 0, w.stackKey = void 0, w.xData = void 0, w.yAxis = void 0, w.yData = void 0, w;
- }
- return V(b, k), b.prototype.generatePoints = function() {
- var w;
- R.prototype.generatePoints.apply(this);
- var v = 0;
- for (w = this.points.length; v < w; v++) {
- var l = this.points[v], h = this.processedYData[v];
- (l.isIntermediateSum || l.isSum) && (l.y = f(h));
- }
- }, b.prototype.translate = function() {
- var w = this.options, v = this.yAxis, l = j(w.minPointLength, 5), h = l / 2, u = w.threshold || 0, i = u, c = u;
- w = w.stacking;
- var a = v.waterfall.stacks[this.stackKey];
- R.prototype.translate.apply(this);
- for (var t = this.points, s = 0; s < t.length; s++) {
- var n = t[s], P = this.processedYData[s], _ = n.shapeArgs;
- if (_ && d(P)) {
- var I = [0, P], W = n.y;
- if (w) {
- if (a) {
- if (I = a[s], w === "overlap") {
- var E = I.stackState[I.stateIndex--];
- E = 0 <= W ? E : E - W, Object.hasOwnProperty.call(I, "absolutePos") && delete I.absolutePos, Object.hasOwnProperty.call(I, "absoluteNeg") && delete I.absoluteNeg;
- } else
- 0 <= W ? (E = I.threshold + I.posTotal, I.posTotal -= W) : (E = I.threshold + I.negTotal, I.negTotal -= W, E -= W), !I.posTotal && Object.hasOwnProperty.call(I, "absolutePos") && (I.posTotal = I.absolutePos, delete I.absolutePos), !I.negTotal && Object.hasOwnProperty.call(I, "absoluteNeg") && (I.negTotal = I.absoluteNeg, delete I.absoluteNeg);
- n.isSum || (I.connectorThreshold = I.threshold + I.stackTotal), v.reversed ? (P = 0 <= W ? E - W : E + W, W = E) : (P = E, W = E - W), n.below = P <= u, _.y = v.translate(P, !1, !0, !1, !0) || 0, _.height = Math.abs(_.y - (v.translate(W, !1, !0, !1, !0) || 0)), (W = v.waterfall.dummyStackItem) && (W.x = s, W.label = a[s].label, W.setOffset(this.pointXOffset || 0, this.barW || 0, this.stackedYNeg[s], this.stackedYPos[s]));
- }
- } else
- E = Math.max(i, i + W) + I[0], _.y = v.translate(
- E,
- !1,
- !0,
- !1,
- !0
- ) || 0, n.isSum ? (_.y = v.translate(I[1], !1, !0, !1, !0) || 0, _.height = Math.min(v.translate(I[0], !1, !0, !1, !0) || 0, v.len) - _.y, n.below = I[1] <= u) : n.isIntermediateSum ? (0 <= W ? (P = I[1] + c, W = c) : (P = c, W = I[1] + c), v.reversed && (P ^= W, W ^= P, P ^= W), _.y = v.translate(P, !1, !0, !1, !0) || 0, _.height = Math.abs(_.y - Math.min(v.translate(W, !1, !0, !1, !0) || 0, v.len)), c += I[1], n.below = P <= u) : (_.height = 0 < P ? (v.translate(i, !1, !0, !1, !0) || 0) - _.y : (v.translate(i, !1, !0, !1, !0) || 0) - (v.translate(i - P, !1, !0, !1, !0) || 0), i += P, n.below = i < u), 0 > _.height && (_.y += _.height, _.height *= -1);
- n.plotY = _.y = Math.round(_.y || 0) - this.borderWidth % 2 / 2, _.height = Math.max(Math.round(_.height || 0), 1e-3), n.yBottom = _.y + _.height, _.height <= l && !n.isNull ? (_.height = l, _.y -= h, n.plotY = _.y, n.minPointLengthOffset = 0 > n.y ? -h : h) : (n.isNull && (_.width = 0), n.minPointLengthOffset = 0), W = n.plotY + (n.negative ? _.height : 0), n.below && (n.plotY += _.height), n.tooltipPos && (this.chart.inverted ? n.tooltipPos[0] = v.len - W : n.tooltipPos[1] = W);
- }
- }
- }, b.prototype.processData = function(w) {
- var v = this.options, l = this.yData, h = v.data, u = l.length, i = v.threshold || 0, c, a, t, s, n;
- for (n = a = c = t = s = 0; n < u; n++) {
- var P = l[n], _ = h && h[n] ? h[n] : {};
- P === "sum" || _.isSum ? l[n] = f(a) : P === "intermediateSum" || _.isIntermediateSum ? (l[n] = f(c), c = 0) : (a += P, c += P), t = Math.min(a, t), s = Math.max(a, s);
- }
- k.prototype.processData.call(this, w), v.stacking || (this.dataMin = t + i, this.dataMax = s);
- }, b.prototype.toYData = function(w) {
- return w.isSum ? "sum" : w.isIntermediateSum ? "intermediateSum" : w.y;
- }, b.prototype.updateParallelArrays = function(w, v) {
- k.prototype.updateParallelArrays.call(this, w, v), (this.yData[0] === "sum" || this.yData[0] === "intermediateSum") && (this.yData[0] = null);
- }, b.prototype.pointAttribs = function(w, v) {
- var l = this.options.upColor;
- return l && !w.options.color && (w.color = 0 < w.y ? l : null), w = R.prototype.pointAttribs.call(this, w, v), delete w.dashstyle, w;
- }, b.prototype.getGraphPath = function() {
- return [["M", 0, 0]];
- }, b.prototype.getCrispPath = function() {
- var w = this.data, v = this.yAxis, l = w.length, h = Math.round(this.graph.strokeWidth()) % 2 / 2, u = Math.round(this.borderWidth) % 2 / 2, i = this.xAxis.reversed, c = this.yAxis.reversed, a = this.options.stacking, t = [], s;
- for (s = 1; s < l; s++) {
- var n = w[s].shapeArgs, P = w[s - 1], _ = w[s - 1].shapeArgs, I = v.waterfall.stacks[this.stackKey], W = 0 < P.y ? -_.height : 0;
- I && _ && n && (I = I[s - 1], a ? (I = I.connectorThreshold, W = Math.round(v.translate(I, 0, 1, 0, 1) + (c ? W : 0)) - h) : W = _.y + P.minPointLengthOffset + u - h, t.push(["M", (_.x || 0) + (i ? 0 : _.width || 0), W], ["L", (n.x || 0) + (i && n.width || 0), W])), _ && t.length && (!a && 0 > P.y && !c || 0 < P.y && c) && ((P = t[t.length - 2]) && typeof P[2] == "number" && (P[2] += _.height || 0), (P = t[t.length - 1]) && typeof P[2] == "number" && (P[2] += _.height || 0));
- }
- return t;
- }, b.prototype.drawGraph = function() {
- B.prototype.drawGraph.call(this), this.graph.attr({ d: this.getCrispPath() });
- }, b.prototype.setStackedPoints = function() {
- function w($, Q, A, F) {
- if (z)
- for (A; A < z; A++)
- X.stackState[A] += F;
- else
- X.stackState[0] = $, z = X.stackState.length;
- X.stackState.push(X.stackState[z - 1] + Q);
- }
- var v = this.options, l = this.yAxis.waterfall.stacks, h = v.threshold, u = h || 0, i = u, c = this.stackKey, a = this.xData, t = a.length, s, n, P;
- this.yAxis.stacking.usePercentage = !1;
- var _ = n = P = u;
- if (this.visible || !this.chart.options.chart.ignoreHiddenSeries) {
- var I = l.changed;
- (s = l.alreadyChanged) && 0 > s.indexOf(c) && (I = !0), l[c] || (l[c] = {}), s = l[c];
- for (var W = 0; W < t; W++) {
- var E = a[W];
- (!s[E] || I) && (s[E] = { negTotal: 0, posTotal: 0, stackTotal: 0, threshold: 0, stateIndex: 0, stackState: [], label: I && s[E] ? s[E].label : void 0 });
- var X = s[E], g = this.yData[W];
- 0 <= g ? X.posTotal += g : X.negTotal += g;
- var m = v.data[W];
- E = X.absolutePos = X.posTotal;
- var L = X.absoluteNeg = X.negTotal;
- X.stackTotal = E + L;
- var z = X.stackState.length;
- m && m.isIntermediateSum ? (w(P, n, 0, P), P = n, n = h, u ^= i, i ^= u, u ^= i) : m && m.isSum ? (w(h, _, z), u = h) : (w(u, g, 0, _), m && (_ += g, n += g)), X.stateIndex++, X.threshold = u, u += X.stackTotal;
- }
- l.changed = !1, l.alreadyChanged || (l.alreadyChanged = []), l.alreadyChanged.push(c);
- }
- }, b.prototype.getExtremes = function() {
- var w = this.options.stacking;
- if (w) {
- var v = this.yAxis;
- v = v.waterfall.stacks;
- var l = this.stackedYNeg = [], h = this.stackedYPos = [];
- return w === "overlap" ? O(v[this.stackKey], function(u) {
- l.push(x(u.stackState)), h.push(S(u.stackState));
- }) : O(v[this.stackKey], function(u) {
- l.push(u.negTotal + u.threshold), h.push(u.posTotal + u.threshold);
- }), { dataMin: x(l), dataMax: S(h) };
- }
- return { dataMin: this.dataMin, dataMax: this.dataMax };
- }, b.defaultOptions = T(R.defaultOptions, { dataLabels: { inside: !0 }, lineWidth: 1, lineColor: "#333333", dashStyle: "Dot", borderColor: "#333333", states: { hover: { lineWidthPlus: 0 } } }), b;
- }(R), G(D.prototype, { getZonesGraphs: B.prototype.getZonesGraphs, pointValKey: "y", showLine: !0, pointClass: H }), N.registerSeriesType("waterfall", D), U.compose(o, y), D;
- }), M(p, "Extensions/Polar.js", [
- p["Core/Animation/AnimationUtilities.js"],
- p["Core/Chart/Chart.js"],
- p["Core/Globals.js"],
- p["Extensions/Pane.js"],
- p["Core/Pointer.js"],
- p["Core/Series/Series.js"],
- p["Core/Series/SeriesRegistry.js"],
- p["Core/Renderer/SVG/SVGRenderer.js"],
- p["Core/Utilities.js"]
- ], function(o, y, N, D, U, H, V, G, R) {
- var B = o.animObject;
- V = V.seriesTypes;
- var S = R.addEvent, x = R.defined, f = R.find, d = R.isNumber, T = R.pick, O = R.splat, j = R.uniqueKey;
- o = R.wrap;
- var k = H.prototype;
- U = U.prototype, k.searchPointByAngle = function(v) {
- var l = this.chart, h = this.xAxis.pane.center;
- return this.searchKDTree({ clientX: 180 + -180 / Math.PI * Math.atan2(v.chartX - h[0] - l.plotLeft, v.chartY - h[1] - l.plotTop) });
- }, k.getConnectors = function(v, l, h, u) {
- var i = u ? 1 : 0, c = 0 <= l && l <= v.length - 1 ? l : 0 > l ? v.length - 1 + l : 0;
- l = 0 > c - 1 ? v.length - (1 + i) : c - 1, i = c + 1 > v.length - 1 ? i : c + 1;
- var a = v[l];
- i = v[i];
- var t = a.plotX;
- a = a.plotY;
- var s = i.plotX, n = i.plotY;
- i = v[c].plotX, c = v[c].plotY, t = (1.5 * i + t) / 2.5, a = (1.5 * c + a) / 2.5, s = (1.5 * i + s) / 2.5;
- var P = (1.5 * c + n) / 2.5;
- n = Math.sqrt(Math.pow(t - i, 2) + Math.pow(a - c, 2));
- var _ = Math.sqrt(Math.pow(s - i, 2) + Math.pow(P - c, 2));
- return t = Math.atan2(a - c, t - i), P = Math.PI / 2 + (t + Math.atan2(P - c, s - i)) / 2, Math.abs(t - P) > Math.PI / 2 && (P -= Math.PI), t = i + Math.cos(P) * n, a = c + Math.sin(P) * n, s = i + Math.cos(Math.PI + P) * _, P = c + Math.sin(Math.PI + P) * _, i = { rightContX: s, rightContY: P, leftContX: t, leftContY: a, plotX: i, plotY: c }, h && (i.prevPointCont = this.getConnectors(v, l, !1, u)), i;
- }, k.toXY = function(v) {
- var l = this.chart, h = this.xAxis, u = this.yAxis, i = v.plotX, c = v.plotY, a = v.series, t = l.inverted, s = v.y, n = t ? i : u.len - c;
- t && a && !a.isRadialBar && (v.plotY = c = typeof s == "number" && u.translate(s) || 0), v.rectPlotX = i, v.rectPlotY = c, u.center && (n += u.center[3] / 2), d(c) && (u = t ? u.postTranslate(c, n) : h.postTranslate(i, n), v.plotX = v.polarPlotX = u.x - l.plotLeft, v.plotY = v.polarPlotY = u.y - l.plotTop), this.kdByAngle ? (l = (i / Math.PI * 180 + h.pane.options.startAngle) % 360, 0 > l && (l += 360), v.clientX = l) : v.clientX = v.plotX;
- }, V.spline && (o(V.spline.prototype, "getPointSpline", function(v, l, h, u) {
- return this.chart.polar ? u ? (v = this.getConnectors(l, u, !0, this.connectEnds), l = v.prevPointCont && v.prevPointCont.rightContX, h = v.prevPointCont && v.prevPointCont.rightContY, v = ["C", d(l) ? l : v.plotX, d(h) ? h : v.plotY, d(v.leftContX) ? v.leftContX : v.plotX, d(v.leftContY) ? v.leftContY : v.plotY, v.plotX, v.plotY]) : v = ["M", h.plotX, h.plotY] : v = v.call(this, l, h, u), v;
- }), V.areasplinerange && (V.areasplinerange.prototype.getPointSpline = V.spline.prototype.getPointSpline)), S(H, "afterTranslate", function() {
- var v = this.chart;
- if (v.polar && this.xAxis) {
- if ((this.kdByAngle = v.tooltip && v.tooltip.shared) ? this.searchPoint = this.searchPointByAngle : this.options.findNearestPointBy = "xy", !this.preventPostTranslate)
- for (var l = this.points, h = l.length; h--; )
- this.toXY(l[h]), !v.hasParallelCoordinates && !this.yAxis.reversed && l[h].y < this.yAxis.min && (l[h].isNull = !0);
- this.hasClipCircleSetter || (this.hasClipCircleSetter = !!this.eventsToUnbind.push(S(this, "afterRender", function() {
- if (v.polar) {
- var u = this.yAxis.pane.center;
- this.clipCircle ? this.clipCircle.animate({ x: u[0], y: u[1], r: u[2] / 2, innerR: u[3] / 2 }) : this.clipCircle = v.renderer.clipCircle(u[0], u[1], u[2] / 2, u[3] / 2), this.group.clip(this.clipCircle), this.setClip = N.noop;
- }
- })));
- }
- }, { order: 2 }), o(
- V.line.prototype,
- "getGraphPath",
- function(v, l) {
- var h = this, u;
- if (this.chart.polar) {
- for (l = l || this.points, u = 0; u < l.length; u++)
- if (!l[u].isNull) {
- var i = u;
- break;
- }
- if (this.options.connectEnds !== !1 && typeof i < "u") {
- this.connectEnds = !0, l.splice(l.length, 0, l[i]);
- var c = !0;
- }
- l.forEach(function(a) {
- typeof a.polarPlotY > "u" && h.toXY(a);
- });
- }
- return u = v.apply(this, [].slice.call(arguments, 1)), c && l.pop(), u;
- }
- );
- var b = function(v, l) {
- var h = this, u = this.chart, i = this.options.animation, c = this.group, a = this.markerGroup, t = this.xAxis && this.xAxis.center, s = u.plotLeft, n = u.plotTop, P, _, I, W;
- if (u.polar) {
- if (h.isRadialBar)
- l || (h.startAngleRad = T(h.translatedThreshold, h.xAxis.startAngleRad), N.seriesTypes.pie.prototype.animate.call(h, l));
- else if (u.renderer.isSVG)
- if (i = B(i), h.is("column")) {
- if (!l) {
- var E = t[3] / 2;
- h.points.forEach(function(X) {
- P = X.graphic, I = (_ = X.shapeArgs) && _.r, W = _ && _.innerR, P && _ && (P.attr({ r: E, innerR: E }), P.animate({ r: I, innerR: W }, h.options.animation));
- });
- }
- } else
- l ? (v = { translateX: t[0] + s, translateY: t[1] + n, scaleX: 1e-3, scaleY: 1e-3 }, c.attr(v), a && a.attr(v)) : (v = { translateX: s, translateY: n, scaleX: 1, scaleY: 1 }, c.animate(v, i), a && a.animate(v, i));
- } else
- v.call(this, l);
- };
- if (o(k, "animate", b), V.column) {
- var w = V.arearange.prototype;
- V = V.column.prototype, V.polarArc = function(v, l, h, u) {
- var i = this.xAxis.center, c = this.yAxis.len, a = i[3] / 2;
- return l = c - l + a, v = c - T(v, c) + a, this.yAxis.reversed && (0 > l && (l = a), 0 > v && (v = a)), { x: i[0], y: i[1], r: l, innerR: v, start: h, end: u };
- }, o(V, "animate", b), o(V, "translate", function(v) {
- var l = this.options, h = l.stacking, u = this.chart, i = this.xAxis, c = this.yAxis, a = c.reversed, t = c.center, s = i.startAngleRad, n = i.endAngleRad - s;
- if (this.preventPostTranslate = !0, v.call(this), i.isRadial) {
- v = this.points, i = v.length;
- var P = c.translate(c.min), _ = c.translate(c.max);
- if (l = l.threshold || 0, u.inverted && d(l)) {
- var I = c.translate(l);
- x(I) && (0 > I ? I = 0 : I > n && (I = n), this.translatedThreshold = I + s);
- }
- for (; i--; ) {
- l = v[i];
- var W = l.barX, E = l.x, X = l.y;
- if (l.shapeType = "arc", u.inverted) {
- if (l.plotY = c.translate(X), h && c.stacking) {
- if (X = c.stacking.stacks[(0 > X ? "-" : "") + this.stackKey], this.visible && X && X[E] && !l.isNull) {
- var g = X[E].points[this.getStackIndicator(void 0, E, this.index).key], m = c.translate(g[0]);
- g = c.translate(g[1]), x(m) && (m = R.clamp(m, 0, n));
- }
- } else
- m = I, g = l.plotY;
- m > g && (g = [m, m = g][0]), a ? g > P ? g = P : m < _ ? m = _ : (m > P || g < _) && (m = g = n) : m < P ? m = P : g > _ ? g = _ : (g < P || m > _) && (m = g = 0), c.min > c.max && (m = g = a ? n : 0), m += s, g += s, t && (l.barX = W += t[3] / 2), E = Math.max(W, 0), X = Math.max(W + l.pointWidth, 0), l.shapeArgs = { x: t && t[0], y: t && t[1], r: X, innerR: E, start: m, end: g }, l.opacity = m === g ? 0 : void 0, l.plotY = (x(this.translatedThreshold) && (m < this.translatedThreshold ? m : g)) - s;
- } else
- m = W + s, l.shapeArgs = this.polarArc(l.yBottom, l.plotY, m, m + l.pointWidth);
- this.toXY(l), u.inverted ? (W = c.postTranslate(l.rectPlotY, W + l.pointWidth / 2), l.tooltipPos = [W.x - u.plotLeft, W.y - u.plotTop]) : l.tooltipPos = [l.plotX, l.plotY], t && (l.ttBelow = l.plotY > t[1]);
- }
- }
- }), V.findAlignments = function(v, l) {
- return l.align === null && (l.align = 20 < v && 160 > v ? "left" : 200 < v && 340 > v ? "right" : "center"), l.verticalAlign === null && (l.verticalAlign = 45 > v || 315 < v ? "bottom" : 135 < v && 225 > v ? "top" : "middle"), l;
- }, w && (w.findAlignments = V.findAlignments), o(V, "alignDataLabel", function(v, l, h, u, i, c) {
- var a = this.chart, t = T(u.inside, !!this.options.stacking);
- a.polar ? (v = l.rectPlotX / Math.PI * 180, a.inverted ? (this.forceDL = a.isInsidePlot(l.plotX, Math.round(l.plotY)), t && l.shapeArgs ? (i = l.shapeArgs, i = this.yAxis.postTranslate(((i.start || 0) + (i.end || 0)) / 2 - this.xAxis.startAngleRad, l.barX + l.pointWidth / 2), i = { x: i.x - a.plotLeft, y: i.y - a.plotTop }) : l.tooltipPos && (i = { x: l.tooltipPos[0], y: l.tooltipPos[1] }), u.align = T(u.align, "center"), u.verticalAlign = T(
- u.verticalAlign,
- "middle"
- )) : this.findAlignments && (u = this.findAlignments(v, u)), k.alignDataLabel.call(this, l, h, u, i, c), this.isRadialBar && l.shapeArgs && l.shapeArgs.start === l.shapeArgs.end && h.hide(!0)) : v.call(this, l, h, u, i, c);
- });
- }
- o(U, "getCoordinates", function(v, l) {
- var h = this.chart, u = { xAxis: [], yAxis: [] };
- return h.polar ? h.axes.forEach(function(i) {
- var c = i.isXAxis, a = i.center;
- if (i.coll !== "colorAxis") {
- var t = l.chartX - a[0] - h.plotLeft;
- a = l.chartY - a[1] - h.plotTop, u[c ? "xAxis" : "yAxis"].push({ axis: i, value: i.translate(c ? Math.PI - Math.atan2(t, a) : Math.sqrt(Math.pow(
- t,
- 2
- ) + Math.pow(a, 2)), !0) });
- }
- }) : u = v.call(this, l), u;
- }), G.prototype.clipCircle = function(v, l, h, u) {
- var i = j(), c = this.createElement("clipPath").attr({ id: i }).add(this.defs);
- return v = u ? this.arc(v, l, h, u, 0, 2 * Math.PI).add(c) : this.circle(v, l, h).add(c), v.id = i, v.clipPath = c, v;
- }, S(y, "getAxes", function() {
- this.pane || (this.pane = []), this.options.pane = O(this.options.pane), this.options.pane.forEach(function(v) {
- new D(v, this);
- }, this);
- }), S(y, "afterDrawChartBox", function() {
- this.pane.forEach(function(v) {
- v.render();
- });
- }), S(
- H,
- "afterInit",
- function() {
- var v = this.chart;
- v.inverted && v.polar && (this.isRadialSeries = !0, this.is("column") && (this.isRadialBar = !0));
- }
- ), o(y.prototype, "get", function(v, l) {
- return f(this.pane || [], function(h) {
- return h.options.id === l;
- }) || v.call(this, l);
- });
- }), M(p, "masters/highcharts-more.src.js", [p["Core/Globals.js"], p["Core/Axis/RadialAxis.js"], p["Series/Bubble/BubbleSeries.js"]], function(o, y, N) {
- y.compose(o.Axis, o.Tick), N.compose(o.Chart, o.Legend, o.Series);
- });
- });
- })(nu);
- var $0 = nu.exports;
- const Z0 = /* @__PURE__ */ Cn($0);
- var su = { exports: {} };
- (function(r) {
- (function(p) {
- r.exports ? (p.default = p, r.exports = p) : p(typeof Highcharts < "u" ? Highcharts : void 0);
- })(function(p) {
- function M(o, y, N, D) {
- o.hasOwnProperty(y) || (o[y] = D.apply(null, N));
- }
- p = p ? p._modules : {}, M(
- p,
- "Extensions/FullScreen.js",
- [p["Core/Chart/Chart.js"], p["Core/Globals.js"], p["Core/Renderer/HTML/AST.js"], p["Core/Utilities.js"]],
- function(o, y, N, D) {
- var U = D.addEvent;
- return D = function() {
- function H(V) {
- this.chart = V, this.isOpen = !1, V = V.renderTo, this.browserProps || (typeof V.requestFullscreen == "function" ? this.browserProps = { fullscreenChange: "fullscreenchange", requestFullscreen: "requestFullscreen", exitFullscreen: "exitFullscreen" } : V.mozRequestFullScreen ? this.browserProps = { fullscreenChange: "mozfullscreenchange", requestFullscreen: "mozRequestFullScreen", exitFullscreen: "mozCancelFullScreen" } : V.webkitRequestFullScreen ? this.browserProps = {
- fullscreenChange: "webkitfullscreenchange",
- requestFullscreen: "webkitRequestFullScreen",
- exitFullscreen: "webkitExitFullscreen"
- } : V.msRequestFullscreen && (this.browserProps = { fullscreenChange: "MSFullscreenChange", requestFullscreen: "msRequestFullscreen", exitFullscreen: "msExitFullscreen" }));
- }
- return H.prototype.close = function() {
- var V = this.chart, G = V.options.chart;
- this.isOpen && this.browserProps && V.container.ownerDocument instanceof Document && V.container.ownerDocument[this.browserProps.exitFullscreen](), this.unbindFullscreenEvent && (this.unbindFullscreenEvent = this.unbindFullscreenEvent()), V.setSize(this.origWidth, this.origHeight, !1), this.origHeight = this.origWidth = void 0, G.width = this.origWidthOption, G.height = this.origHeightOption, this.origHeightOption = this.origWidthOption = void 0, this.isOpen = !1, this.setButtonText();
- }, H.prototype.open = function() {
- var V = this, G = V.chart, R = G.options.chart;
- if (R && (V.origWidthOption = R.width, V.origHeightOption = R.height), V.origWidth = G.chartWidth, V.origHeight = G.chartHeight, V.browserProps) {
- var B = U(
- G.container.ownerDocument,
- V.browserProps.fullscreenChange,
- function() {
- V.isOpen ? (V.isOpen = !1, V.close()) : (G.setSize(null, null, !1), V.isOpen = !0, V.setButtonText());
- }
- ), S = U(G, "destroy", B);
- V.unbindFullscreenEvent = function() {
- B(), S();
- }, (R = G.renderTo[V.browserProps.requestFullscreen]()) && R.catch(function() {
- alert("Full screen is not supported inside a frame.");
- });
- }
- }, H.prototype.setButtonText = function() {
- var V = this.chart, G = V.exportDivElements, R = V.options.exporting, B = R && R.buttons && R.buttons.contextButton.menuItems;
- V = V.options.lang, R && R.menuItemDefinitions && V && V.exitFullscreen && V.viewFullscreen && B && G && (G = G[B.indexOf("viewFullscreen")]) && N.setElementHTML(G, this.isOpen ? V.exitFullscreen : R.menuItemDefinitions.viewFullscreen.text || V.viewFullscreen);
- }, H.prototype.toggle = function() {
- this.isOpen ? this.close() : this.open();
- }, H;
- }(), y.Fullscreen = D, U(o, "beforeRender", function() {
- this.fullscreen = new y.Fullscreen(this);
- }), y.Fullscreen;
- }
- ), M(p, "Core/Chart/ChartNavigationComposition.js", [], function() {
- var o;
- return function(y) {
- y.compose = function(D) {
- return D.navigation || (D.navigation = new N(D)), D;
- };
- var N = function() {
- function D(U) {
- this.updates = [], this.chart = U;
- }
- return D.prototype.addUpdate = function(U) {
- this.chart.navigation.updates.push(U);
- }, D.prototype.update = function(U, H) {
- var V = this;
- this.updates.forEach(function(G) {
- G.call(V.chart, U, H);
- });
- }, D;
- }();
- y.Additions = N;
- }(o || (o = {})), o;
- }), M(p, "Extensions/Exporting/ExportingDefaults.js", [p["Core/Globals.js"]], function(o) {
- return { exporting: { type: "image/png", url: "https://export.highcharts.com/", printMaxWidth: 780, scale: 2, buttons: { contextButton: {
- className: "highcharts-contextbutton",
- menuClassName: "highcharts-contextmenu",
- symbol: "menu",
- titleKey: "contextButtonTitle",
- menuItems: "viewFullscreen printChart separator downloadPNG downloadJPEG downloadPDF downloadSVG".split(" ")
- } }, menuItemDefinitions: { viewFullscreen: { textKey: "viewFullscreen", onclick: function() {
- this.fullscreen.toggle();
- } }, printChart: { textKey: "printChart", onclick: function() {
- this.print();
- } }, separator: { separator: !0 }, downloadPNG: { textKey: "downloadPNG", onclick: function() {
- this.exportChart();
- } }, downloadJPEG: {
- textKey: "downloadJPEG",
- onclick: function() {
- this.exportChart({ type: "image/jpeg" });
- }
- }, downloadPDF: { textKey: "downloadPDF", onclick: function() {
- this.exportChart({ type: "application/pdf" });
- } }, downloadSVG: { textKey: "downloadSVG", onclick: function() {
- this.exportChart({ type: "image/svg+xml" });
- } } } }, lang: {
- viewFullscreen: "View in full screen",
- exitFullscreen: "Exit from full screen",
- printChart: "Print chart",
- downloadPNG: "Download PNG image",
- downloadJPEG: "Download JPEG image",
- downloadPDF: "Download PDF document",
- downloadSVG: "Download SVG vector image",
- contextButtonTitle: "Chart context menu"
- }, navigation: { buttonOptions: { symbolSize: 14, symbolX: 12.5, symbolY: 10.5, align: "right", buttonSpacing: 3, height: 22, verticalAlign: "top", width: 24, symbolFill: "#666666", symbolStroke: "#666666", symbolStrokeWidth: 3, theme: { padding: 5 } }, menuStyle: { border: "1px solid #999999", background: "#ffffff", padding: "5px 0" }, menuItemStyle: { padding: "0.5em 1em", color: "#333333", background: "none", fontSize: o.isTouchDevice ? "14px" : "11px", transition: "background 250ms, color 250ms" }, menuItemHoverStyle: {
- background: "#335cad",
- color: "#ffffff"
- } } };
- }), M(p, "Extensions/Exporting/ExportingSymbols.js", [], function() {
- var o;
- return function(y) {
- function N(H, V, G, R) {
- return [["M", H, V + 2.5], ["L", H + G, V + 2.5], ["M", H, V + R / 2 + 0.5], ["L", H + G, V + R / 2 + 0.5], ["M", H, V + R - 1.5], ["L", H + G, V + R - 1.5]];
- }
- function D(H, V, G, R) {
- return H = R / 3 - 2, R = [], R = R.concat(this.circle(G - H, V, H, H), this.circle(G - H, V + H + 4, H, H), this.circle(G - H, V + 2 * (H + 4), H, H));
- }
- var U = [];
- y.compose = function(H) {
- U.indexOf(H) === -1 && (U.push(H), H = H.prototype.symbols, H.menu = N, H.menuball = D.bind(H));
- };
- }(o || (o = {})), o;
- }), M(p, "Core/HttpUtilities.js", [p["Core/Globals.js"], p["Core/Utilities.js"]], function(o, y) {
- var N = o.doc, D = y.createElement, U = y.discardElement, H = y.merge, V = y.objectEach, G = { ajax: function(R) {
- var B = H(!0, { url: !1, type: "get", dataType: "json", success: !1, error: !1, data: !1, headers: {} }, R);
- R = { json: "application/json", xml: "application/xml", text: "text/plain", octet: "application/octet-stream" };
- var S = new XMLHttpRequest();
- if (!B.url)
- return !1;
- S.open(B.type.toUpperCase(), B.url, !0), B.headers["Content-Type"] || S.setRequestHeader(
- "Content-Type",
- R[B.dataType] || R.text
- ), V(B.headers, function(x, f) {
- S.setRequestHeader(f, x);
- }), S.onreadystatechange = function() {
- if (S.readyState === 4) {
- if (S.status === 200) {
- var x = S.responseText;
- if (B.dataType === "json")
- try {
- x = JSON.parse(x);
- } catch (f) {
- B.error && B.error(S, f);
- return;
- }
- return B.success && B.success(x);
- }
- B.error && B.error(S, S.responseText);
- }
- };
- try {
- B.data = JSON.stringify(B.data);
- } catch {
- }
- S.send(B.data || !0);
- }, getJSON: function(R, B) {
- G.ajax({ url: R, success: B, dataType: "json", headers: { "Content-Type": "text/plain" } });
- }, post: function(R, B, S) {
- var x = D("form", H({ method: "post", action: R, enctype: "multipart/form-data" }, S), { display: "none" }, N.body);
- V(B, function(f, d) {
- D("input", { type: "hidden", name: d, value: f }, null, x);
- }), x.submit(), U(x);
- } };
- return G;
- }), M(p, "Extensions/Exporting/Exporting.js", [
- p["Core/Renderer/HTML/AST.js"],
- p["Core/Chart/Chart.js"],
- p["Core/Chart/ChartNavigationComposition.js"],
- p["Core/DefaultOptions.js"],
- p["Extensions/Exporting/ExportingDefaults.js"],
- p["Extensions/Exporting/ExportingSymbols.js"],
- p["Core/Globals.js"],
- p["Core/HttpUtilities.js"],
- p["Core/Utilities.js"]
- ], function(o, y, N, D, U, H, V, G, R) {
- y = D.defaultOptions;
- var B = V.doc, S = V.win, x = R.addEvent, f = R.css, d = R.createElement, T = R.discardElement, O = R.extend, j = R.find, k = R.fireEvent, b = R.isObject, w = R.merge, v = R.objectEach, l = R.pick, h = R.removeEvent, u = R.uniqueKey, i;
- return function(c) {
- function a(nt) {
- var rt = this, ct = rt.renderer, gt = w(rt.options.navigation.buttonOptions, nt), dt = gt.onclick, ht = gt.menuItems, at = gt.symbolSize || 12;
- if (rt.btnCount || (rt.btnCount = 0), rt.exportDivElements || (rt.exportDivElements = [], rt.exportSVGElements = []), gt.enabled !== !1 && gt.theme) {
- var J = gt.theme, tt = J.states, ot = tt && tt.hover;
- tt = tt && tt.select;
- var lt;
- rt.styledMode || (J.fill = l(J.fill, "#ffffff"), J.stroke = l(J.stroke, "none")), delete J.states, dt ? lt = function(vt) {
- vt && vt.stopPropagation(), dt.call(rt, vt);
- } : ht && (lt = function(vt) {
- vt && vt.stopPropagation(), rt.contextMenu(pt.menuClassName, ht, pt.translateX, pt.translateY, pt.width, pt.height, pt), pt.setState(2);
- }), gt.text && gt.symbol ? J.paddingLeft = l(J.paddingLeft, 30) : gt.text || O(J, { width: gt.width, height: gt.height, padding: 0 }), rt.styledMode || (J["stroke-linecap"] = "round", J.fill = l(J.fill, "#ffffff"), J.stroke = l(J.stroke, "none"));
- var pt = ct.button(gt.text, 0, 0, lt, J, ot, tt).addClass(nt.className).attr({ title: l(rt.options.lang[gt._titleKey || gt.titleKey], "") });
- if (pt.menuClassName = nt.menuClassName || "highcharts-menu-" + rt.btnCount++, gt.symbol) {
- var yt = ct.symbol(gt.symbol, gt.symbolX - at / 2, gt.symbolY - at / 2, at, at, { width: at, height: at }).addClass("highcharts-button-symbol").attr({ zIndex: 1 }).add(pt);
- rt.styledMode || yt.attr({ stroke: gt.symbolStroke, fill: gt.symbolFill, "stroke-width": gt.symbolStrokeWidth || 1 });
- }
- pt.add(rt.exportingGroup).align(O(
- gt,
- { width: pt.width, x: l(gt.x, rt.buttonOffset) }
- ), !0, "spacingBox"), rt.buttonOffset += (pt.width + gt.buttonSpacing) * (gt.align === "right" ? -1 : 1), rt.exportSVGElements.push(pt, yt);
- }
- }
- function t() {
- if (this.printReverseInfo) {
- var nt = this.printReverseInfo, rt = nt.childNodes, ct = nt.origDisplay;
- nt = nt.resetParams, this.moveContainers(this.renderTo), [].forEach.call(rt, function(gt, dt) {
- gt.nodeType === 1 && (gt.style.display = ct[dt] || "");
- }), this.isPrinting = !1, nt && this.setSize.apply(this, nt), delete this.printReverseInfo, et = void 0, k(this, "afterPrint");
- }
- }
- function s() {
- var nt = B.body, rt = this.options.exporting.printMaxWidth, ct = { childNodes: nt.childNodes, origDisplay: [], resetParams: void 0 };
- this.isPrinting = !0, this.pointer.reset(null, 0), k(this, "beforePrint"), rt && this.chartWidth > rt && (ct.resetParams = [this.options.chart.width, void 0, !1], this.setSize(rt, void 0, !1)), [].forEach.call(ct.childNodes, function(gt, dt) {
- gt.nodeType === 1 && (ct.origDisplay[dt] = gt.style.display, gt.style.display = "none");
- }), this.moveContainers(nt), this.printReverseInfo = ct;
- }
- function n(nt) {
- nt.renderExporting(), x(nt, "redraw", nt.renderExporting), x(nt, "destroy", nt.destroyExport);
- }
- function P(nt, rt, ct, gt, dt, ht, at) {
- var J = this, tt = J.options.navigation, ot = J.chartWidth, lt = J.chartHeight, pt = "cache-" + nt, yt = Math.max(dt, ht), vt = J[pt];
- if (!vt) {
- J.exportContextMenu = J[pt] = vt = d("div", { className: nt }, { position: "absolute", zIndex: 1e3, padding: yt + "px", pointerEvents: "auto" }, J.fixedDiv || J.container);
- var Mt = d("ul", { className: "highcharts-menu" }, { listStyle: "none", margin: 0, padding: 0 }, vt);
- J.styledMode || f(Mt, O(
- { MozBoxShadow: "3px 3px 10px #888", WebkitBoxShadow: "3px 3px 10px #888", boxShadow: "3px 3px 10px #888" },
- tt.menuStyle
- )), vt.hideMenu = function() {
- f(vt, { display: "none" }), at && at.setState(0), J.openMenu = !1, f(J.renderTo, { overflow: "hidden" }), f(J.container, { overflow: "hidden" }), R.clearTimeout(vt.hideTimer), k(J, "exportMenuHidden");
- }, J.exportEvents.push(x(vt, "mouseleave", function() {
- vt.hideTimer = S.setTimeout(vt.hideMenu, 500);
- }), x(vt, "mouseenter", function() {
- R.clearTimeout(vt.hideTimer);
- }), x(B, "mouseup", function(Pt) {
- J.pointer.inClass(Pt.target, nt) || vt.hideMenu();
- }), x(vt, "click", function() {
- J.openMenu && vt.hideMenu();
- })), rt.forEach(function(Pt) {
- if (typeof Pt == "string" && (Pt = J.options.exporting.menuItemDefinitions[Pt]), b(Pt, !0)) {
- var At = void 0;
- Pt.separator ? At = d("hr", void 0, void 0, Mt) : (Pt.textKey === "viewData" && J.isDataTableVisible && (Pt.textKey = "hideData"), At = d("li", { className: "highcharts-menu-item", onclick: function(St) {
- St && St.stopPropagation(), vt.hideMenu(), Pt.onclick && Pt.onclick.apply(J, arguments);
- } }, void 0, Mt), o.setElementHTML(At, Pt.text || J.options.lang[Pt.textKey]), J.styledMode || (At.onmouseover = function() {
- f(this, tt.menuItemHoverStyle);
- }, At.onmouseout = function() {
- f(this, tt.menuItemStyle);
- }, f(At, O({ cursor: "pointer" }, tt.menuItemStyle)))), J.exportDivElements.push(At);
- }
- }), J.exportDivElements.push(Mt, vt), J.exportMenuWidth = vt.offsetWidth, J.exportMenuHeight = vt.offsetHeight;
- }
- rt = { display: "block" }, ct + J.exportMenuWidth > ot ? rt.right = ot - ct - dt - yt + "px" : rt.left = ct - yt + "px", gt + ht + J.exportMenuHeight > lt && at.alignOptions.verticalAlign !== "top" ? rt.bottom = lt - gt - yt + "px" : rt.top = gt + ht - yt + "px", f(vt, rt), f(J.renderTo, { overflow: "" }), f(J.container, { overflow: "" }), J.openMenu = !0, k(J, "exportMenuShown");
- }
- function _(nt) {
- var rt = nt ? nt.target : this, ct = rt.exportSVGElements, gt = rt.exportDivElements;
- nt = rt.exportEvents;
- var dt;
- ct && (ct.forEach(function(ht, at) {
- ht && (ht.onclick = ht.ontouchstart = null, dt = "cache-" + ht.menuClassName, rt[dt] && delete rt[dt], ct[at] = ht.destroy());
- }), ct.length = 0), rt.exportingGroup && (rt.exportingGroup.destroy(), delete rt.exportingGroup), gt && (gt.forEach(function(ht, at) {
- ht && (R.clearTimeout(ht.hideTimer), h(ht, "mouseleave"), gt[at] = ht.onmouseout = ht.onmouseover = ht.ontouchstart = ht.onclick = null, T(ht));
- }), gt.length = 0), nt && (nt.forEach(function(ht) {
- ht();
- }), nt.length = 0);
- }
- function I(nt, rt) {
- rt = this.getSVGForExport(nt, rt), nt = w(this.options.exporting, nt), G.post(nt.url, { filename: nt.filename ? nt.filename.replace(/\//g, "-") : this.getFilename(), type: nt.type, width: nt.width || 0, scale: nt.scale, svg: rt }, nt.formAttributes);
- }
- function W() {
- return this.styledMode && this.inlineStyles(), this.container.innerHTML;
- }
- function E() {
- var nt = this.userOptions.title && this.userOptions.title.text, rt = this.options.exporting.filename;
- return rt ? rt.replace(/\//g, "-") : (typeof nt == "string" && (rt = nt.toLowerCase().replace(/<\/?[^>]+(>|$)/g, "").replace(/[\s_]+/g, "-").replace(
- /[^a-z0-9\-]/g,
- ""
- ).replace(/^[\-]+/g, "").replace(/[\-]+/g, "-").substr(0, 24).replace(/[\-]+$/g, "")), (!rt || 5 > rt.length) && (rt = "chart"), rt);
- }
- function X(nt) {
- var rt, ct = w(this.options, nt);
- ct.plotOptions = w(this.userOptions.plotOptions, nt && nt.plotOptions), ct.time = w(this.userOptions.time, nt && nt.time);
- var gt = d("div", null, { position: "absolute", top: "-9999em", width: this.chartWidth + "px", height: this.chartHeight + "px" }, B.body), dt = this.renderTo.style.width, ht = this.renderTo.style.height;
- dt = ct.exporting.sourceWidth || ct.chart.width || /px$/.test(dt) && parseInt(dt, 10) || (ct.isGantt ? 800 : 600), ht = ct.exporting.sourceHeight || ct.chart.height || /px$/.test(ht) && parseInt(ht, 10) || 400, O(ct.chart, { animation: !1, renderTo: gt, forExport: !0, renderer: "SVGRenderer", width: dt, height: ht }), ct.exporting.enabled = !1, delete ct.data, ct.series = [], this.series.forEach(function(tt) {
- rt = w(tt.userOptions, { animation: !1, enableMouseTracking: !1, showCheckbox: !1, visible: tt.visible }), rt.isInternal || ct.series.push(rt);
- });
- var at = {};
- this.axes.forEach(function(tt) {
- tt.userOptions.internalKey || (tt.userOptions.internalKey = u()), tt.options.isInternal || (at[tt.coll] || (at[tt.coll] = !0, ct[tt.coll] = []), ct[tt.coll].push(w(tt.userOptions, { visible: tt.visible })));
- });
- var J = new this.constructor(ct, this.callback);
- return nt && ["xAxis", "yAxis", "series"].forEach(function(tt) {
- var ot = {};
- nt[tt] && (ot[tt] = nt[tt], J.update(ot));
- }), this.axes.forEach(function(tt) {
- var ot = j(J.axes, function(yt) {
- return yt.options.internalKey === tt.userOptions.internalKey;
- }), lt = tt.getExtremes(), pt = lt.userMin;
- lt = lt.userMax, ot && (typeof pt < "u" && pt !== ot.min || typeof lt < "u" && lt !== ot.max) && ot.setExtremes(
- pt,
- lt,
- !0,
- !1
- );
- }), ht = J.getChartHTML(), k(this, "getSVG", { chartCopy: J }), ht = this.sanitizeSVG(ht, ct), ct = null, J.destroy(), T(gt), ht;
- }
- function g(nt, rt) {
- var ct = this.options.exporting;
- return this.getSVG(w({ chart: { borderRadius: 0 } }, ct.chartOptions, rt, { exporting: { sourceWidth: nt && nt.sourceWidth || ct.sourceWidth, sourceHeight: nt && nt.sourceHeight || ct.sourceHeight } }));
- }
- function m(nt) {
- return nt.replace(/([A-Z])/g, function(rt, ct) {
- return "-" + ct.toLowerCase();
- });
- }
- function L() {
- function nt(J) {
- function tt(St, Dt) {
- if (lt = pt = !1, ct.length) {
- for (yt = ct.length; yt-- && !pt; )
- pt = ct[yt].test(Dt);
- lt = !pt;
- }
- for (Dt === "transform" && St === "none" && (lt = !0), yt = rt.length; yt-- && !lt; )
- lt = rt[yt].test(Dt) || typeof St == "function";
- lt || Mt[Dt] === St && J.nodeName !== "svg" || gt[J.nodeName][Dt] === St || (q && q.indexOf(Dt) === -1 ? ot += m(Dt) + ":" + St + ";" : St && J.setAttribute(m(Dt), St));
- }
- var ot = "", lt, pt, yt;
- if (J.nodeType === 1 && it.indexOf(J.nodeName) === -1) {
- var vt = S.getComputedStyle(J, null), Mt = J.nodeName === "svg" ? {} : S.getComputedStyle(J.parentNode, null);
- if (!gt[J.nodeName]) {
- dt = at.getElementsByTagName("svg")[0];
- var Pt = at.createElementNS(J.namespaceURI, J.nodeName);
- dt.appendChild(Pt), gt[J.nodeName] = w(S.getComputedStyle(Pt, null)), J.nodeName === "text" && delete gt.text.fill, dt.removeChild(Pt);
- }
- if (V.isFirefox || V.isMS)
- for (var At in vt)
- tt(vt[At], At);
- else
- v(vt, tt);
- ot && (vt = J.getAttribute("style"), J.setAttribute("style", (vt ? vt + ";" : "") + ot)), J.nodeName === "svg" && J.setAttribute("stroke-width", "1px"), J.nodeName !== "text" && [].forEach.call(J.children || J.childNodes, nt);
- }
- }
- var rt = Z, ct = c.inlineWhitelist, gt = {}, dt, ht = B.createElement("iframe");
- f(ht, { width: "1px", height: "1px", visibility: "hidden" }), B.body.appendChild(ht);
- var at = ht.contentWindow.document;
- at.open(), at.write('<svg xmlns="http://www.w3.org/2000/svg"></svg>'), at.close(), nt(this.container.querySelector("svg")), dt.parentNode.removeChild(dt), ht.parentNode.removeChild(ht);
- }
- function z(nt) {
- (this.fixedDiv ? [this.fixedDiv, this.scrollingContainer] : [this.container]).forEach(function(rt) {
- nt.appendChild(rt);
- });
- }
- function $() {
- var nt = this;
- nt.exporting = { update: function(rt, ct) {
- nt.isDirtyExporting = !0, w(!0, nt.options.exporting, rt), l(ct, !0) && nt.redraw();
- } }, N.compose(nt).navigation.addUpdate(function(rt, ct) {
- nt.isDirtyExporting = !0, w(!0, nt.options.navigation, rt), l(ct, !0) && nt.redraw();
- });
- }
- function Q() {
- var nt = this;
- nt.isPrinting || (et = nt, V.isSafari || nt.beforePrint(), setTimeout(function() {
- S.focus(), S.print(), V.isSafari || setTimeout(function() {
- nt.afterPrint();
- }, 1e3);
- }, 1));
- }
- function A() {
- var nt = this, rt = nt.options.exporting, ct = rt.buttons, gt = nt.isDirtyExporting || !nt.exportSVGElements;
- nt.buttonOffset = 0, nt.isDirtyExporting && nt.destroyExport(), gt && rt.enabled !== !1 && (nt.exportEvents = [], nt.exportingGroup = nt.exportingGroup || nt.renderer.g("exporting-group").attr({ zIndex: 3 }).add(), v(ct, function(dt) {
- nt.addButton(dt);
- }), nt.isDirtyExporting = !1);
- }
- function F(nt, rt) {
- var ct = nt.indexOf("</svg>") + 6, gt = nt.substr(ct);
- return nt = nt.substr(0, ct), rt && rt.exporting && rt.exporting.allowHTML && gt && (gt = '<foreignObject x="0" y="0" width="' + rt.chart.width + '" height="' + rt.chart.height + '"><body xmlns="http://www.w3.org/1999/xhtml">' + gt.replace(/(<(?:img|br).*?(?=>))>/g, "$1 />") + "</body></foreignObject>", nt = nt.replace("</svg>", gt + "</svg>")), nt = nt.replace(/zIndex="[^"]+"/g, "").replace(/symbolName="[^"]+"/g, "").replace(
- /jQuery[0-9]+="[^"]+"/g,
- ""
- ).replace(/url\(("|")(.*?)("|");?\)/g, "url($2)").replace(/url\([^#]+#/g, "url(#").replace(/<svg /, '<svg xmlns:xlink="http://www.w3.org/1999/xlink" ').replace(/ (|NS[0-9]+:)href=/g, " xlink:href=").replace(/\n/, " ").replace(/(fill|stroke)="rgba\(([ 0-9]+,[ 0-9]+,[ 0-9]+),([ 0-9\.]+)\)"/g, '$1="rgb($2)" $1-opacity="$3"').replace(/ /g, " ").replace(/­/g, ""), this.ieSanitizeSVG && (nt = this.ieSanitizeSVG(nt)), nt;
- }
- var Y = [], Z = [
- /-/,
- /^(clipPath|cssText|d|height|width)$/,
- /^font$/,
- /[lL]ogical(Width|Height)$/,
- /perspective/,
- /TapHighlightColor/,
- /^transition/,
- /^length$/
- ], q = "fill stroke strokeLinecap strokeLinejoin strokeWidth textAnchor x y".split(" ");
- c.inlineWhitelist = [];
- var it = ["clipPath", "defs", "desc"], et;
- c.compose = function(nt, rt) {
- H.compose(rt), Y.indexOf(nt) === -1 && (Y.push(nt), rt = nt.prototype, rt.afterPrint = t, rt.exportChart = I, rt.inlineStyles = L, rt.print = Q, rt.sanitizeSVG = F, rt.getChartHTML = W, rt.getSVG = X, rt.getSVGForExport = g, rt.getFilename = E, rt.moveContainers = z, rt.beforePrint = s, rt.contextMenu = P, rt.addButton = a, rt.destroyExport = _, rt.renderExporting = A, rt.callbacks.push(n), x(nt, "init", $), V.isSafari && V.win.matchMedia("print").addListener(function(ct) {
- et && (ct.matches ? et.beforePrint() : et.afterPrint());
- }));
- };
- }(i || (i = {})), y.exporting = w(U.exporting, y.exporting), y.lang = w(U.lang, y.lang), y.navigation = w(U.navigation, y.navigation), i;
- }), M(p, "masters/modules/exporting.src.js", [p["Core/Globals.js"], p["Extensions/Exporting/Exporting.js"], p["Core/HttpUtilities.js"]], function(o, y, N) {
- o.HttpUtilities = N, o.ajax = N.ajax, o.getJSON = N.getJSON, o.post = N.post, y.compose(o.Chart, o.Renderer);
- });
- });
- })(su);
- var K0 = su.exports;
- const J0 = /* @__PURE__ */ Cn(K0);
- var ou = { exports: {} };
- (function(r) {
- (function(p) {
- r.exports ? (p.default = p, r.exports = p) : p(typeof Highcharts < "u" ? Highcharts : void 0);
- })(function(p) {
- function M(o, y, N, D) {
- o.hasOwnProperty(y) || (o[y] = D.apply(null, N));
- }
- p = p ? p._modules : {}, M(p, "Extensions/Boost/Boostables.js", [], function() {
- return "area arearange column columnrange bar line scatter heatmap bubble treemap".split(" ");
- }), M(p, "Extensions/Boost/BoostableMap.js", [p["Extensions/Boost/Boostables.js"]], function(o) {
- var y = {};
- return o.forEach(function(N) {
- y[N] = 1;
- }), y;
- }), M(p, "Extensions/Boost/WGLShader.js", [p["Core/Utilities.js"]], function(o) {
- var y = o.clamp, N = o.error, D = o.pick;
- return function(U) {
- function H() {
- v.length && N("[highcharts boost] shader error - " + v.join(`
- `));
- }
- function V(h, u) {
- var i = U.createShader(u === "vertex" ? U.VERTEX_SHADER : U.FRAGMENT_SHADER);
- return U.shaderSource(i, h), U.compileShader(i), U.getShaderParameter(i, U.COMPILE_STATUS) ? i : (v.push("when compiling " + u + ` shader:
- ` + U.getShaderInfoLog(i)), !1);
- }
- function G() {
- function h(c) {
- return U.getUniformLocation(S, c);
- }
- var u = V(
- `#version 100
- #define LN10 2.302585092994046
- precision highp float;
- attribute vec4 aVertexPosition;
- attribute vec4 aColor;
- varying highp vec2 position;
- varying highp vec4 vColor;
- uniform mat4 uPMatrix;
- uniform float pSize;
- uniform float translatedThreshold;
- uniform bool hasThreshold;
- uniform bool skipTranslation;
- uniform float xAxisTrans;
- uniform float xAxisMin;
- uniform float xAxisMinPad;
- uniform float xAxisPointRange;
- uniform float xAxisLen;
- uniform bool xAxisPostTranslate;
- uniform float xAxisOrdinalSlope;
- uniform float xAxisOrdinalOffset;
- uniform float xAxisPos;
- uniform bool xAxisCVSCoord;
- uniform bool xAxisIsLog;
- uniform bool xAxisReversed;
- uniform float yAxisTrans;
- uniform float yAxisMin;
- uniform float yAxisMinPad;
- uniform float yAxisPointRange;
- uniform float yAxisLen;
- uniform bool yAxisPostTranslate;
- uniform float yAxisOrdinalSlope;
- uniform float yAxisOrdinalOffset;
- uniform float yAxisPos;
- uniform bool yAxisCVSCoord;
- uniform bool yAxisIsLog;
- uniform bool yAxisReversed;
- uniform bool isBubble;
- uniform bool bubbleSizeByArea;
- uniform float bubbleZMin;
- uniform float bubbleZMax;
- uniform float bubbleZThreshold;
- uniform float bubbleMinSize;
- uniform float bubbleMaxSize;
- uniform bool bubbleSizeAbs;
- uniform bool isInverted;
- float bubbleRadius(){
- float value = aVertexPosition.w;
- float zMax = bubbleZMax;
- float zMin = bubbleZMin;
- float radius = 0.0;
- float pos = 0.0;
- float zRange = zMax - zMin;
- if (bubbleSizeAbs){
- value = value - bubbleZThreshold;
- zMax = max(zMax - bubbleZThreshold, zMin - bubbleZThreshold);
- zMin = 0.0;
- }
- if (value < zMin){
- radius = bubbleZMin / 2.0 - 1.0;
- } else {
- pos = zRange > 0.0 ? (value - zMin) / zRange : 0.5;
- if (bubbleSizeByArea && pos > 0.0){
- pos = sqrt(pos);
- }
- radius = ceil(bubbleMinSize + pos * (bubbleMaxSize - bubbleMinSize)) / 2.0;
- }
- return radius * 2.0;
- }
- float translate(float val,
- float pointPlacement,
- float localA,
- float localMin,
- float minPixelPadding,
- float pointRange,
- float len,
- bool cvsCoord,
- bool isLog,
- bool reversed
- ){
- float sign = 1.0;
- float cvsOffset = 0.0;
- if (cvsCoord) {
- sign *= -1.0;
- cvsOffset = len;
- }
- if (isLog) {
- val = log(val) / LN10;
- }
- if (reversed) {
- sign *= -1.0;
- cvsOffset -= sign * len;
- }
- return sign * (val - localMin) * localA + cvsOffset +
- (sign * minPixelPadding);
- }
- float xToPixels(float value) {
- if (skipTranslation){
- return value;// + xAxisPos;
- }
- return translate(value, 0.0, xAxisTrans, xAxisMin, xAxisMinPad, xAxisPointRange, xAxisLen, xAxisCVSCoord, xAxisIsLog, xAxisReversed);// + xAxisPos;
- }
- float yToPixels(float value, float checkTreshold) {
- float v;
- if (skipTranslation){
- v = value;// + yAxisPos;
- } else {
- v = translate(value, 0.0, yAxisTrans, yAxisMin, yAxisMinPad, yAxisPointRange, yAxisLen, yAxisCVSCoord, yAxisIsLog, yAxisReversed);// + yAxisPos;
- if (v > yAxisLen) {
- v = yAxisLen;
- }
- }
- if (checkTreshold > 0.0 && hasThreshold) {
- v = min(v, translatedThreshold);
- }
- return v;
- }
- void main(void) {
- if (isBubble){
- gl_PointSize = bubbleRadius();
- } else {
- gl_PointSize = pSize;
- }
- vColor = aColor;
- if (skipTranslation && isInverted) {
- gl_Position = uPMatrix * vec4(aVertexPosition.y + yAxisPos, aVertexPosition.x + xAxisPos, 0.0, 1.0);
- } else if (isInverted) {
- gl_Position = uPMatrix * vec4(yToPixels(aVertexPosition.y, aVertexPosition.z) + yAxisPos, xToPixels(aVertexPosition.x) + xAxisPos, 0.0, 1.0);
- } else {
- gl_Position = uPMatrix * vec4(xToPixels(aVertexPosition.x) + xAxisPos, yToPixels(aVertexPosition.y, aVertexPosition.z) + yAxisPos, 0.0, 1.0);
- }
- }`,
- "vertex"
- ), i = V(`precision highp float;
- uniform vec4 fillColor;
- varying highp vec2 position;
- varying highp vec4 vColor;
- uniform sampler2D uSampler;
- uniform bool isCircle;
- uniform bool hasColor;
- void main(void) {
- vec4 col = fillColor;
- vec4 tcol = texture2D(uSampler, gl_PointCoord.st);
- if (hasColor) {
- col = vColor;
- }
- if (isCircle) {
- col *= tcol;
- if (tcol.r < 0.0) {
- discard;
- } else {
- gl_FragColor = col;
- }
- } else {
- gl_FragColor = col;
- }
- }`, "fragment");
- return !u || !i ? (S = !1, H(), !1) : (S = U.createProgram(), U.attachShader(S, u), U.attachShader(S, i), U.linkProgram(S), U.getProgramParameter(S, U.LINK_STATUS) ? (U.useProgram(S), U.bindAttribLocation(S, 0, "aVertexPosition"), x = h("uPMatrix"), f = h("pSize"), d = h("fillColor"), T = h("isBubble"), O = h("bubbleSizeAbs"), j = h("bubbleSizeByArea"), l = h("uSampler"), k = h("skipTranslation"), b = h("isCircle"), w = h("isInverted"), !0) : (v.push(U.getProgramInfoLog(S)), H(), S = !1));
- }
- function R(h, u) {
- U && S && (h = B[h] = B[h] || U.getUniformLocation(S, h), U.uniform1f(h, u));
- }
- var B = {}, S, x, f, d, T, O, j, k, b, w, v = [], l;
- return U && !G() ? !1 : { psUniform: function() {
- return f;
- }, pUniform: function() {
- return x;
- }, fillColorUniform: function() {
- return d;
- }, setBubbleUniforms: function(h, u, i) {
- var c = h.options, a = Number.MAX_VALUE, t = -Number.MAX_VALUE;
- if (U && S && h.is("bubble")) {
- var s = h.getPxExtremes();
- a = D(c.zMin, y(u, c.displayNegative === !1 ? c.zThreshold : -Number.MAX_VALUE, a)), t = D(c.zMax, Math.max(t, i)), U.uniform1i(T, 1), U.uniform1i(b, 1), U.uniform1i(j, h.options.sizeBy !== "width"), U.uniform1i(O, h.options.sizeByAbsoluteValue), R("bubbleZMin", a), R("bubbleZMax", t), R("bubbleZThreshold", h.options.zThreshold), R("bubbleMinSize", s.minPxSize), R("bubbleMaxSize", s.maxPxSize);
- }
- }, bind: function() {
- U && S && U.useProgram(S);
- }, program: function() {
- return S;
- }, create: G, setUniform: R, setPMatrix: function(h) {
- U && S && U.uniformMatrix4fv(x, !1, h);
- }, setColor: function(h) {
- U && S && U.uniform4f(d, h[0] / 255, h[1] / 255, h[2] / 255, h[3]);
- }, setPointSize: function(h) {
- U && S && U.uniform1f(f, h);
- }, setSkipTranslation: function(h) {
- U && S && U.uniform1i(k, h === !0 ? 1 : 0);
- }, setTexture: function(h) {
- U && S && U.uniform1i(l, h);
- }, setDrawAsCircle: function(h) {
- U && S && U.uniform1i(b, h ? 1 : 0);
- }, reset: function() {
- U && S && (U.uniform1i(T, 0), U.uniform1i(b, 0));
- }, setInverted: function(h) {
- U && S && U.uniform1i(w, h);
- }, destroy: function() {
- U && S && (U.deleteProgram(S), S = !1);
- } };
- };
- }), M(p, "Extensions/Boost/WGLVBuffer.js", [], function() {
- return function(o, y, N) {
- function D() {
- U && (o.deleteBuffer(U), H = U = !1), R = 0, V = N || 2, B = [];
- }
- var U = !1, H = !1, V = N || 2, G = !1, R = 0, B;
- return {
- destroy: D,
- bind: function() {
- if (!U)
- return !1;
- o.vertexAttribPointer(H, V, o.FLOAT, !1, 0, 0);
- },
- data: B,
- build: function(S, x, f) {
- var d;
- return B = S || [], B && B.length !== 0 || G ? (V = f || V, U && o.deleteBuffer(U), G || (d = new Float32Array(B)), U = o.createBuffer(), o.bindBuffer(o.ARRAY_BUFFER, U), o.bufferData(o.ARRAY_BUFFER, G || d, o.STATIC_DRAW), H = o.getAttribLocation(y.program(), x), o.enableVertexAttribArray(H), !0) : (D(), !1);
- },
- render: function(S, x, f) {
- var d = G ? G.length : B.length;
- return !U || !d || ((!S || S > d || 0 > S) && (S = 0), (!x || x > d) && (x = d), S >= x) ? !1 : (o.drawArrays(o[(f || "points").toUpperCase()], S / V, (x - S) / V), !0);
- },
- allocate: function(S) {
- R = -1, G = new Float32Array(4 * S);
- },
- push: function(S, x, f, d) {
- G && (G[++R] = S, G[++R] = x, G[++R] = f, G[++R] = d);
- }
- };
- };
- }), M(p, "Extensions/Boost/WGLRenderer.js", [p["Core/Color/Color.js"], p["Extensions/Boost/WGLShader.js"], p["Extensions/Boost/WGLVBuffer.js"], p["Core/Globals.js"], p["Core/Utilities.js"]], function(o, y, N, D, U) {
- var H = o.parse, V = D.doc, G = U.isNumber, R = U.isObject, B = U.merge, S = U.objectEach, x = U.pick;
- return function(f) {
- function d(m) {
- if (m.isSeriesBoosting) {
- var L = !!m.options.stacking, z = m.xData || m.options.xData || m.processedXData;
- return L = (L ? m.data : z || m.options.data).length, m.type === "treemap" ? L *= 12 : m.type === "heatmap" ? L *= 6 : E[m.type] && (L *= 2), L;
- }
- return 0;
- }
- function T() {
- c.clear(c.COLOR_BUFFER_BIT | c.DEPTH_BUFFER_BIT);
- }
- function O(m, L) {
- function z($t) {
- $t && (L.colorData.push($t[0]), L.colorData.push($t[1]), L.colorData.push($t[2]), L.colorData.push($t[3]));
- }
- function $($t, de, ge, Re, De) {
- z(De), g.usePreallocated ? (u.push($t, de, ge ? 1 : 0, Re || 1), i += 4) : (s.push($t), s.push(de), s.push(ge ? 1 : 0), s.push(Re || 1));
- }
- function Q() {
- L.segments.length && (L.segments[L.segments.length - 1].to = s.length || i);
- }
- function A() {
- L.segments.length && L.segments[L.segments.length - 1].from === (s.length || i) || (Q(), L.segments.push({ from: s.length || i }));
- }
- function F($t, de, ge, Re, De) {
- z(De), $($t + ge, de), z(De), $($t, de), z(De), $($t, de + Re), z(De), $($t, de + Re), z(De), $($t + ge, de + Re), z(De), $($t + ge, de);
- }
- function Y($t, de) {
- g.useGPUTranslations || (L.skipTranslation = !0, $t.x = lt.toPixels($t.x, !0), $t.y = ot.toPixels($t.y, !0)), de ? s = [$t.x, $t.y, 0, 2].concat(s) : $($t.x, $t.y, 0, 2);
- }
- var Z = m.pointArrayMap && m.pointArrayMap.join(",") === "low,high", q = m.chart, it = m.options, et = !!it.stacking, nt = it.data, rt = m.xAxis.getExtremes(), ct = rt.min, gt = rt.max;
- rt = m.yAxis.getExtremes();
- var dt = rt.min, ht = rt.max, at = m.xData || it.xData || m.processedXData, J = m.yData || it.yData || m.processedYData, tt = m.zData || it.zData || m.processedZData, ot = m.yAxis, lt = m.xAxis, pt = m.chart.plotWidth, yt = !at || at.length === 0, vt = it.connectNulls;
- rt = m.points || !1;
- var Mt = !1, Pt = !1, At, St, Dt = et ? m.data : at || nt, _t = { x: Number.MAX_VALUE, y: 0 }, Nt = { x: -Number.MAX_VALUE, y: 0 }, Ot = 0, Kt = !1, Gt, Wt, Jt, be, Yt = -1, Vt = !1, Ce = !1, Or, us = typeof q.index > "u", En = !1, On = !1, $e = !1, Ln = E[m.type], _n = !1, Jr = !0, ds = !0, Fo = it.zoneAxis || "y", Lr = it.zones || !1, Xi = !1, fs = it.threshold, Dn = !1;
- if (!(it.boostData && 0 < it.boostData.length)) {
- if (it.gapSize && (Dn = it.gapUnit !== "value" ? it.gapSize * m.closestPointRange : it.gapSize), Lr) {
- var _r = [];
- Lr.forEach(function($t, de) {
- if ($t.color) {
- var ge = H($t.color).rgba;
- ge[0] /= 255, ge[1] /= 255, ge[2] /= 255, _r[de] = ge, Xi || typeof $t.value < "u" || (Xi = ge);
- }
- }), Xi || (at = m.pointAttribs && m.pointAttribs().fill || m.color, Xi = H(at).rgba, Xi[0] /= 255, Xi[1] /= 255, Xi[2] /= 255);
- }
- if (q.inverted && (pt = m.chart.plotHeight), m.closestPointRangePx = Number.MAX_VALUE, A(), rt && 0 < rt.length)
- L.skipTranslation = !0, L.drawMode = "triangles", rt[0].node && rt[0].node.levelDynamic && rt.sort(function($t, de) {
- if ($t.node) {
- if ($t.node.levelDynamic > de.node.levelDynamic)
- return 1;
- if ($t.node.levelDynamic < de.node.levelDynamic)
- return -1;
- }
- return 0;
- }), rt.forEach(function($t) {
- var de = $t.plotY;
- if (typeof de < "u" && !isNaN(de) && $t.y !== null && $t.shapeArgs) {
- var ge = $t.shapeArgs;
- de = ge.x, de = de === void 0 ? 0 : de;
- var Re = ge.y;
- Re = Re === void 0 ? 0 : Re;
- var De = ge.width;
- De = De === void 0 ? 0 : De, ge = ge.height, ge = ge === void 0 ? 0 : ge;
- var qr = q.styledMode ? $t.series.colorAttribs($t) : qr = $t.series.pointAttribs($t);
- $t = qr["stroke-width"] || 0, $e = H(qr.fill).rgba, $e[0] /= 255, $e[1] /= 255, $e[2] /= 255, m.type === "treemap" && ($t = $t || 1, St = H(qr.stroke).rgba, St[0] /= 255, St[1] /= 255, St[2] /= 255, F(de, Re, De, ge, St), $t /= 2), m.type === "heatmap" && q.inverted && (de = lt.len - de, Re = ot.len - Re, De = -De, ge = -ge), F(de + $t, Re + $t, De - 2 * $t, ge - 2 * $t, $e);
- }
- });
- else {
- for (rt = function() {
- if (Jt = Dt[++Yt], typeof Jt > "u")
- return "continue";
- if (us)
- return "break";
- var $t = nt && nt[Yt];
- if (!yt && R($t, !0) && $t.color && ($e = H($t.color).rgba, $e[0] /= 255, $e[1] /= 255, $e[2] /= 255), yt ? (Gt = Jt[0], Wt = Jt[1], Dt[Yt + 1] && (Ce = Dt[Yt + 1][0]), Dt[Yt - 1] && (Vt = Dt[Yt - 1][0]), 3 <= Jt.length && (be = Jt[2], Jt[2] > L.zMax && (L.zMax = Jt[2]), Jt[2] < L.zMin && (L.zMin = Jt[2]))) : (Gt = Jt, Wt = J[Yt], Dt[Yt + 1] && (Ce = Dt[Yt + 1]), Dt[Yt - 1] && (Vt = Dt[Yt - 1]), tt && tt.length && (be = tt[Yt], tt[Yt] > L.zMax && (L.zMax = tt[Yt]), tt[Yt] < L.zMin && (L.zMin = tt[Yt]))), !vt && (Gt === null || Wt === null))
- return A(), "continue";
- if (Ce && Ce >= ct && Ce <= gt && (En = !0), Vt && Vt >= ct && Vt <= gt && (On = !0), Z ? (yt && (Wt = Jt.slice(1, 3)), Or = Wt[0], Wt = Wt[1]) : et && (Gt = Jt.x, Wt = Jt.stackY, Or = Wt - Jt.y), dt !== null && typeof dt < "u" && ht !== null && typeof ht < "u" && (Jr = Wt >= dt && Wt <= ht), Gt > gt && Nt.x < gt && (Nt.x = Gt, Nt.y = Wt), Gt < ct && _t.x > ct && (_t.x = Gt, _t.y = Wt), Wt === null && vt)
- return "continue";
- if (Wt === null || !Jr && !En && !On)
- return A(), "continue";
- if ((Ce >= ct || Gt >= ct) && (Vt <= gt || Gt <= gt) && (_n = !0), !_n && !En && !On)
- return "continue";
- if (Dn && Gt - Vt > Dn && A(), Lr) {
- var de;
- Lr.some(function(ge, Re) {
- var De = Lr[Re - 1];
- return Fo === "x" ? typeof ge.value < "u" && Gt <= ge.value ? (_r[Re] && (!De || Gt >= De.value) && (de = _r[Re]), !0) : !1 : typeof ge.value < "u" && Wt <= ge.value ? (_r[Re] && (!De || Wt >= De.value) && (de = _r[Re]), !0) : !1;
- }), $e = de || Xi || $e;
- }
- if (!g.useGPUTranslations && (L.skipTranslation = !0, Gt = lt.toPixels(Gt, !0), Wt = ot.toPixels(Wt, !0), Gt > pt && L.drawMode === "points"))
- return "continue";
- if (L.hasMarkers && _n && Mt !== !1 && (m.closestPointRangePx = Math.min(m.closestPointRangePx, Math.abs(Gt - Mt))), !g.useGPUTranslations && !g.usePreallocated && Mt && 1 > Math.abs(Gt - Mt) && Pt && 1 > Math.abs(Wt - Pt))
- return g.debug.showSkipSummary && ++Ot, "continue";
- Ln && (At = Or, (Or === !1 || typeof Or > "u") && (At = 0 > Wt ? Wt : 0), Z || et || (At = Math.max(fs === null ? dt : fs, dt)), g.useGPUTranslations || (At = ot.toPixels(At, !0)), $(Gt, At, 0, 0, $e)), it.step && !ds && $(Gt, Pt, 0, 2, $e), $(Gt, Wt, 0, m.type === "bubble" ? be || 1 : 2, $e), Mt = Gt, Pt = Wt, Kt = !0, ds = !1;
- }; Yt < Dt.length - 1 && rt() !== "break"; )
- ;
- g.debug.showSkipSummary && console.log("skipped points:", Ot), Kt || vt === !1 || m.drawMode !== "line_strip" || (_t.x < Number.MAX_VALUE && Y(_t, !0), Nt.x > -Number.MAX_VALUE && Y(Nt));
- }
- Q();
- }
- }
- function j() {
- I = [], P.data = s = [], n = [], u && u.destroy();
- }
- function k(m) {
- h && (h.setUniform("xAxisTrans", m.transA), h.setUniform("xAxisMin", m.min), h.setUniform("xAxisMinPad", m.minPixelPadding), h.setUniform("xAxisPointRange", m.pointRange), h.setUniform("xAxisLen", m.len), h.setUniform(
- "xAxisPos",
- m.pos
- ), h.setUniform("xAxisCVSCoord", !m.horiz), h.setUniform("xAxisIsLog", !!m.logarithmic), h.setUniform("xAxisReversed", !!m.reversed));
- }
- function b(m) {
- h && (h.setUniform("yAxisTrans", m.transA), h.setUniform("yAxisMin", m.min), h.setUniform("yAxisMinPad", m.minPixelPadding), h.setUniform("yAxisPointRange", m.pointRange), h.setUniform("yAxisLen", m.len), h.setUniform("yAxisPos", m.pos), h.setUniform("yAxisCVSCoord", !m.horiz), h.setUniform("yAxisIsLog", !!m.logarithmic), h.setUniform("yAxisReversed", !!m.reversed));
- }
- function w(m, L) {
- h.setUniform("hasThreshold", m), h.setUniform("translatedThreshold", L);
- }
- function v(m) {
- if (m)
- a = m.chartWidth || 800, t = m.chartHeight || 400;
- else
- return !1;
- if (!(c && a && t && h))
- return !1;
- g.debug.timeRendering && console.time("gl rendering"), c.canvas.width = a, c.canvas.height = t, h.bind(), c.viewport(0, 0, a, t), h.setPMatrix([2 / a, 0, 0, 0, 0, -(2 / t), 0, 0, 0, 0, -2, 0, -1, 1, -1, 1]), 1 < g.lineWidth && !D.isMS && c.lineWidth(g.lineWidth), u.build(P.data, "aVertexPosition", 4), u.bind(), h.setInverted(m.inverted), I.forEach(function(L, z) {
- var $ = L.series.options, Q = $.marker, A = typeof $.lineWidth < "u" ? $.lineWidth : 1, F = $.threshold, Y = G(F), Z = L.series.yAxis.getThreshold(F);
- if (F = x($.marker ? $.marker.enabled : null, L.series.xAxis.isRadial ? !0 : null, L.series.closestPointRangePx > 2 * (($.marker ? $.marker.radius : 10) || 10)), Q = W[Q && Q.symbol || L.series.symbol] || W.circle, L.segments.length !== 0 && L.segments[0].from !== L.segments[0].to) {
- if (Q.isReady && (c.bindTexture(c.TEXTURE_2D, Q.handle), h.setTexture(Q.handle)), m.styledMode ? Q = L.series.markerGroup && L.series.markerGroup.getStyle("fill") : (Q = L.drawMode === "points" && L.series.pointAttribs && L.series.pointAttribs().fill || L.series.color, $.colorByPoint && (Q = L.series.chart.options.colors[z])), L.series.fillOpacity && $.fillOpacity && (Q = new o(Q).setOpacity(x($.fillOpacity, 1)).get()), Q = H(Q).rgba, g.useAlpha || (Q[3] = 1), L.drawMode === "lines" && g.useAlpha && 1 > Q[3] && (Q[3] /= 10), $.boostBlending === "add" ? (c.blendFunc(c.SRC_ALPHA, c.ONE), c.blendEquation(c.FUNC_ADD)) : $.boostBlending === "mult" || $.boostBlending === "multiply" ? c.blendFunc(c.DST_COLOR, c.ZERO) : $.boostBlending === "darken" ? (c.blendFunc(c.ONE, c.ONE), c.blendEquation(c.FUNC_MIN)) : c.blendFuncSeparate(c.SRC_ALPHA, c.ONE_MINUS_SRC_ALPHA, c.ONE, c.ONE_MINUS_SRC_ALPHA), h.reset(), 0 < L.colorData.length ? (h.setUniform("hasColor", 1), z = N(c, h), z.build(L.colorData, "aColor", 4), z.bind()) : c.disableVertexAttribArray(c.getAttribLocation(h.program(), "aColor")), h.setColor(Q), k(L.series.xAxis), b(L.series.yAxis), w(Y, Z), L.drawMode === "points" && ($.marker && G($.marker.radius) ? h.setPointSize(2 * $.marker.radius) : h.setPointSize(1)), h.setSkipTranslation(L.skipTranslation), L.series.type === "bubble" && h.setBubbleUniforms(L.series, L.zMin, L.zMax), h.setDrawAsCircle(X[L.series.type] || !1), 0 < A || L.drawMode !== "line_strip")
- for (A = 0; A < L.segments.length; A++)
- u.render(L.segments[A].from, L.segments[A].to, L.drawMode);
- if (L.hasMarkers && F)
- for ($.marker && G($.marker.radius) ? h.setPointSize(2 * $.marker.radius) : h.setPointSize(10), h.setDrawAsCircle(!0), A = 0; A < L.segments.length; A++)
- u.render(L.segments[A].from, L.segments[A].to, "POINTS");
- }
- }), g.debug.timeRendering && console.timeEnd("gl rendering"), f && f(), j();
- }
- function l(m) {
- if (T(), m.renderer.forExport)
- return v(m);
- _ ? v(m) : setTimeout(function() {
- l(m);
- }, 1);
- }
- var h = !1, u = !1, i = 0, c = !1, a = 0, t = 0, s = !1, n = !1, P = {}, _ = !1, I = [], W = {}, E = { column: !0, columnrange: !0, bar: !0, area: !0, arearange: !0 }, X = { scatter: !0, bubble: !0 }, g = { pointSize: 1, lineWidth: 1, fillColor: "#AA00AA", useAlpha: !0, usePreallocated: !1, useGPUTranslations: !1, debug: { timeRendering: !1, timeSeriesProcessing: !1, timeSetup: !1, timeBufferCopy: !1, timeKDTree: !1, showSkipSummary: !1 } };
- return P = { allocateBufferForSingleSeries: function(m) {
- var L = 0;
- g.usePreallocated && (m.isSeriesBoosting && (L = d(m)), u.allocate(L));
- }, pushSeries: function(m) {
- 0 < I.length && I[I.length - 1].hasMarkers && (I[I.length - 1].markerTo = n.length), g.debug.timeSeriesProcessing && console.time("building " + m.type + " series");
- var L = { segments: [], markerFrom: n.length, colorData: [], series: m, zMin: Number.MAX_VALUE, zMax: -Number.MAX_VALUE, hasMarkers: m.options.marker ? m.options.marker.enabled !== !1 : !1, showMarkers: !0, drawMode: {
- area: "lines",
- arearange: "lines",
- areaspline: "line_strip",
- column: "lines",
- columnrange: "lines",
- bar: "lines",
- line: "line_strip",
- scatter: "points",
- heatmap: "triangles",
- treemap: "triangles",
- bubble: "points"
- }[m.type] || "line_strip" };
- m.index >= I.length ? I.push(L) : I[m.index] = L, O(m, L), g.debug.timeSeriesProcessing && console.timeEnd("building " + m.type + " series");
- }, setSize: function(m, L) {
- a === m && t === L || !h || (a = m, t = L, h.bind(), h.setPMatrix([2 / a, 0, 0, 0, 0, -(2 / t), 0, 0, 0, 0, -2, 0, -1, 1, -1, 1]));
- }, inited: function() {
- return _;
- }, setThreshold: w, init: function(m, L) {
- function z(A, F) {
- var Y = { isReady: !1, texture: V.createElement("canvas"), handle: c.createTexture() }, Z = Y.texture.getContext("2d");
- W[A] = Y, Y.texture.width = 512, Y.texture.height = 512, Z.mozImageSmoothingEnabled = !1, Z.webkitImageSmoothingEnabled = !1, Z.msImageSmoothingEnabled = !1, Z.imageSmoothingEnabled = !1, Z.strokeStyle = "rgba(255, 255, 255, 0)", Z.fillStyle = "#FFF", F(Z);
- try {
- c.activeTexture(c.TEXTURE0), c.bindTexture(c.TEXTURE_2D, Y.handle), c.texImage2D(c.TEXTURE_2D, 0, c.RGBA, c.RGBA, c.UNSIGNED_BYTE, Y.texture), c.texParameteri(c.TEXTURE_2D, c.TEXTURE_WRAP_S, c.CLAMP_TO_EDGE), c.texParameteri(
- c.TEXTURE_2D,
- c.TEXTURE_WRAP_T,
- c.CLAMP_TO_EDGE
- ), c.texParameteri(c.TEXTURE_2D, c.TEXTURE_MAG_FILTER, c.LINEAR), c.texParameteri(c.TEXTURE_2D, c.TEXTURE_MIN_FILTER, c.LINEAR), c.bindTexture(c.TEXTURE_2D, null), Y.isReady = !0;
- } catch {
- }
- }
- var $ = 0, Q = ["webgl", "experimental-webgl", "moz-webgl", "webkit-3d"];
- if (_ = !1, !m)
- return !1;
- for (g.debug.timeSetup && console.time("gl setup"); $ < Q.length && !(c = m.getContext(Q[$], {})); $++)
- ;
- if (c)
- L || j();
- else
- return !1;
- return c.enable(c.BLEND), c.blendFunc(c.SRC_ALPHA, c.ONE_MINUS_SRC_ALPHA), c.disable(c.DEPTH_TEST), c.depthFunc(c.LESS), h = y(c), h ? (u = N(c, h), z("circle", function(A) {
- A.beginPath(), A.arc(256, 256, 256, 0, 2 * Math.PI), A.stroke(), A.fill();
- }), z("square", function(A) {
- A.fillRect(0, 0, 512, 512);
- }), z("diamond", function(A) {
- A.beginPath(), A.moveTo(256, 0), A.lineTo(512, 256), A.lineTo(256, 512), A.lineTo(0, 256), A.lineTo(256, 0), A.fill();
- }), z("triangle", function(A) {
- A.beginPath(), A.moveTo(0, 512), A.lineTo(256, 0), A.lineTo(512, 512), A.lineTo(0, 512), A.fill();
- }), z("triangle-down", function(A) {
- A.beginPath(), A.moveTo(0, 0), A.lineTo(256, 512), A.lineTo(
- 512,
- 0
- ), A.lineTo(0, 0), A.fill();
- }), _ = !0, g.debug.timeSetup && console.timeEnd("gl setup"), !0) : !1;
- }, render: l, settings: g, valid: function() {
- return c !== !1;
- }, clear: T, flush: j, setXAxis: k, setYAxis: b, data: s, gl: function() {
- return c;
- }, allocateBuffer: function(m) {
- var L = 0;
- g.usePreallocated && (m.series.forEach(function(z) {
- z.isSeriesBoosting && (L += d(z));
- }), u.allocate(L));
- }, destroy: function() {
- j(), u.destroy(), h.destroy(), c && (S(W, function(m) {
- m.handle && c.deleteTexture(m.handle);
- }), c.canvas.width = 1, c.canvas.height = 1);
- }, setOptions: function(m) {
- B(
- !0,
- g,
- m
- );
- } };
- };
- }), M(p, "Extensions/Boost/BoostAttach.js", [p["Core/Chart/Chart.js"], p["Extensions/Boost/WGLRenderer.js"], p["Core/Globals.js"], p["Core/Utilities.js"]], function(o, y, N, D) {
- var U = N.doc, H = D.error, V;
- return function(G, R) {
- var B = G.chartWidth, S = G.chartHeight, x = G, f = G.seriesGroup || R.group, d = U.implementation.hasFeature("www.http://w3.org/TR/SVG11/feature#Extensibility", "1.1");
- return x = G.isChartSeriesBoosting() ? G : R, d = !1, V || (V = U.createElement("canvas")), x.renderTarget || (x.canvas = V, G.renderer.forExport || !d ? (x.renderTarget = G.renderer.image("", 0, 0, B, S).addClass("highcharts-boost-canvas").add(f), x.boostClear = function() {
- x.renderTarget.attr({ href: "" });
- }, x.boostCopy = function() {
- x.boostResizeTarget(), x.renderTarget.attr({ href: x.canvas.toDataURL("image/png") });
- }) : (x.renderTargetFo = G.renderer.createElement("foreignObject").add(f), x.renderTarget = U.createElement("canvas"), x.renderTargetCtx = x.renderTarget.getContext("2d"), x.renderTargetFo.element.appendChild(x.renderTarget), x.boostClear = function() {
- x.renderTarget.width = x.canvas.width, x.renderTarget.height = x.canvas.height;
- }, x.boostCopy = function() {
- x.renderTarget.width = x.canvas.width, x.renderTarget.height = x.canvas.height, x.renderTargetCtx.drawImage(x.canvas, 0, 0);
- }), x.boostResizeTarget = function() {
- B = G.chartWidth, S = G.chartHeight, (x.renderTargetFo || x.renderTarget).attr({ x: 0, y: 0, width: B, height: S }).css({ pointerEvents: "none", mixedBlendMode: "normal", opacity: 1 }), x instanceof o && x.markerGroup.translate(G.plotLeft, G.plotTop);
- }, x.boostClipRect = G.renderer.clipRect(), (x.renderTargetFo || x.renderTarget).clip(x.boostClipRect), x instanceof o && (x.markerGroup = x.renderer.g().add(f), x.markerGroup.translate(R.xAxis.pos, R.yAxis.pos))), x.canvas.width = B, x.canvas.height = S, x.boostClipRect.attr(G.getBoostClipRect(x)), x.boostResizeTarget(), x.boostClear(), x.ogl || (x.ogl = y(function() {
- x.ogl.settings.debug.timeBufferCopy && console.time("buffer copy"), x.boostCopy(), x.ogl.settings.debug.timeBufferCopy && console.timeEnd("buffer copy");
- }), x.ogl.init(x.canvas) || H("[highcharts boost] - unable to init WebGL renderer"), x.ogl.setOptions(G.options.boost || {}), x instanceof o && x.ogl.allocateBuffer(G)), x.ogl.setSize(B, S), x.ogl;
- };
- }), M(p, "Extensions/Boost/BoostUtils.js", [p["Core/Globals.js"], p["Extensions/Boost/BoostableMap.js"], p["Extensions/Boost/BoostAttach.js"], p["Core/Utilities.js"]], function(o, y, N, D) {
- function U() {
- for (var f = [], d = 0; d < arguments.length; d++)
- f[d] = arguments[d];
- var T = -Number.MAX_VALUE;
- return f.forEach(function(O) {
- if (typeof O < "u" && O !== null && typeof O.length < "u" && 0 < O.length)
- return T = O.length, !0;
- }), T;
- }
- function H(f, d, T) {
- f && d.renderTarget && d.canvas && !(T || d.chart).isChartSeriesBoosting() && f.render(T || d.chart);
- }
- function V(f, d) {
- f && d.renderTarget && d.canvas && !d.chart.isChartSeriesBoosting() && f.allocateBufferForSingleSeries(d);
- }
- function G(f, d, T, O, j, k) {
- j = j || 0, O = O || 3e3;
- for (var b = j + O, w = !0; w && j < b && j < f.length; )
- w = d(f[j], j), ++j;
- w && (j < f.length ? k ? G(f, d, T, O, j, k) : B.requestAnimationFrame ? B.requestAnimationFrame(function() {
- G(f, d, T, O, j);
- }) : setTimeout(function() {
- G(f, d, T, O, j);
- }) : T && T());
- }
- function R() {
- var f = 0, d, T = [
- "webgl",
- "experimental-webgl",
- "moz-webgl",
- "webkit-3d"
- ], O = !1;
- if (typeof B.WebGLRenderingContext < "u")
- for (d = S.createElement("canvas"); f < T.length; f++)
- try {
- if (O = d.getContext(T[f]), typeof O < "u" && O !== null)
- return !0;
- } catch {
- }
- return !1;
- }
- var B = o.win, S = o.doc, x = D.pick;
- return D = { patientMax: U, boostEnabled: function(f) {
- return x(f && f.options && f.options.boost && f.options.boost.enabled, !0);
- }, shouldForceChartSeriesBoosting: function(f) {
- var d = 0, T = 0, O = x(f.options.boost && f.options.boost.allowForce, !0);
- if (typeof f.boostForceChartBoost < "u")
- return f.boostForceChartBoost;
- if (1 < f.series.length)
- for (var j = 0; j < f.series.length; j++) {
- var k = f.series[j];
- k.options.boostThreshold !== 0 && k.visible !== !1 && k.type !== "heatmap" && (y[k.type] && ++T, U(k.processedXData, k.options.data, k.points) >= (k.options.boostThreshold || Number.MAX_VALUE) && ++d);
- }
- return f.boostForceChartBoost = O && (T === f.series.length && 0 < d || 5 < d), f.boostForceChartBoost;
- }, renderIfNotSeriesBoosting: H, allocateIfNotSeriesBoosting: V, eachAsync: G, hasWebGLSupport: R, pointDrawHandler: function(f) {
- var d = !0;
- if (this.chart.options && this.chart.options.boost && (d = typeof this.chart.options.boost.enabled > "u" ? !0 : this.chart.options.boost.enabled), !d || !this.isSeriesBoosting)
- return f.call(this);
- this.chart.isBoosting = !0, (f = N(this.chart, this)) && (V(f, this), f.pushSeries(this)), H(f, this);
- } }, o.hasWebGLSupport = R, D;
- }), M(
- p,
- "Extensions/Boost/BoostInit.js",
- [p["Core/Chart/Chart.js"], p["Core/Globals.js"], p["Core/Series/Series.js"], p["Core/Series/SeriesRegistry.js"], p["Core/Utilities.js"], p["Extensions/Boost/BoostUtils.js"], p["Extensions/Boost/BoostAttach.js"]],
- function(o, y, N, D, U, H, V) {
- var G = y.noop, R = D.seriesTypes, B = U.addEvent, S = U.extend, x = U.fireEvent, f = U.wrap, d = H.eachAsync, T = H.pointDrawHandler, O = H.allocateIfNotSeriesBoosting, j = H.renderIfNotSeriesBoosting, k = H.shouldForceChartSeriesBoosting, b;
- return function() {
- S(N.prototype, { renderCanvas: function() {
- function w(dt, ht) {
- var at = !1, J = typeof i.index > "u", tt = !0;
- if (typeof dt > "u")
- return !0;
- if (!J) {
- if (F)
- var ot = dt[0], lt = dt[1];
- else
- ot = dt, lt = s[ht];
- z ? (F && (lt = dt.slice(1, 3)), at = lt[0], lt = lt[1]) : $ && (ot = dt.x, lt = dt.stackY, at = lt - dt.y), A || (tt = lt >= I && lt <= W), lt !== null && ot >= P && ot <= _ && tt && (dt = c.toPixels(ot, !0), g ? ((typeof q > "u" || dt === X) && (z || (at = lt), (typeof it > "u" || lt > Z) && (Z = lt, it = ht), (typeof q > "u" || at < Y) && (Y = at, q = ht)), dt !== X && (typeof q < "u" && (lt = a.toPixels(Z, !0), L = a.toPixels(Y, !0), rt(dt, lt, it), L !== lt && rt(dt, L, q)), q = it = void 0, X = dt)) : (lt = Math.ceil(a.toPixels(lt, !0)), rt(dt, lt, ht)));
- }
- return !J;
- }
- function v() {
- x(l, "renderedCanvas"), delete l.buildKDTree, l.buildKDTree(), ct.debug.timeKDTree && console.timeEnd("kd tree building");
- }
- var l = this, h = l.options || {}, u = !1, i = l.chart, c = this.xAxis, a = this.yAxis, t = h.xData || l.processedXData, s = h.yData || l.processedYData, n = h.data;
- u = c.getExtremes();
- var P = u.min, _ = u.max;
- u = a.getExtremes();
- var I = u.min, W = u.max, E = {}, X, g = !!l.sampling, m = h.enableMouseTracking !== !1, L = a.getThreshold(h.threshold), z = l.pointArrayMap && l.pointArrayMap.join(",") === "low,high", $ = !!h.stacking, Q = l.cropStart || 0, A = l.requireSorting, F = !t, Y, Z, q, it, et = h.findNearestPointBy === "x", nt = this.xData || this.options.xData || this.processedXData || !1, rt = function(dt, ht, at) {
- dt = Math.ceil(dt), b = et ? dt : dt + "," + ht, m && !E[b] && (E[b] = !0, i.inverted && (dt = c.len - dt, ht = a.len - ht), gt.push({ x: nt ? nt[Q + at] : !1, clientX: dt, plotX: dt, plotY: ht, i: Q + at }));
- };
- u = V(i, l), i.isBoosting = !0;
- var ct = u.settings;
- if (this.visible) {
- (this.points || this.graph) && this.destroyGraphics(), i.isChartSeriesBoosting() ? (this.markerGroup && this.markerGroup !== i.markerGroup && this.markerGroup.destroy(), this.markerGroup = i.markerGroup, this.renderTarget && (this.renderTarget = this.renderTarget.destroy())) : (this.markerGroup === i.markerGroup && (this.markerGroup = void 0), this.markerGroup = l.plotGroup("markerGroup", "markers", !0, 1, i.seriesGroup));
- var gt = this.points = [];
- l.buildKDTree = G, u && (O(u, this), u.pushSeries(l), j(u, this, i)), i.renderer.forExport || (ct.debug.timeKDTree && console.time("kd tree building"), d($ ? l.data : t || n, w, v));
- }
- } }), ["heatmap", "treemap"].forEach(function(w) {
- R[w] && f(R[w].prototype, "drawPoints", T);
- }), R.bubble && (delete R.bubble.prototype.buildKDTree, f(R.bubble.prototype, "markerAttribs", function(w) {
- return this.isSeriesBoosting ? !1 : w.apply(this, [].slice.call(arguments, 1));
- })), R.scatter.prototype.fill = !0, S(R.area.prototype, { fill: !0, fillOpacity: !0, sampling: !0 }), S(R.column.prototype, { fill: !0, sampling: !0 }), o.prototype.propsRequireUpdateSeries.push("boost"), o.prototype.callbacks.push(function(w) {
- B(w, "predraw", function() {
- w.boostForceChartBoost = void 0, w.boostForceChartBoost = k(w), w.isBoosting = !1, !w.isChartSeriesBoosting() && w.didBoost && (w.didBoost = !1), w.boostClear && w.boostClear(), w.canvas && w.ogl && w.isChartSeriesBoosting() && (w.didBoost = !0, w.ogl.allocateBuffer(w)), w.markerGroup && w.xAxis && 0 < w.xAxis.length && w.yAxis && 0 < w.yAxis.length && w.markerGroup.translate(w.xAxis[0].pos, w.yAxis[0].pos);
- }), B(w, "render", function() {
- w.ogl && w.isChartSeriesBoosting() && w.ogl.render(w);
- });
- var v = -1, l = -1;
- B(w.pointer, "afterGetHoverData", function() {
- var h = w.hoverSeries;
- if (w.markerGroup && h) {
- var u = w.inverted ? h.yAxis : h.xAxis;
- h = w.inverted ? h.xAxis : h.yAxis, (u && u.pos !== v || h && h.pos !== l) && (w.markerGroup.translate(u.pos, h.pos), v = u.pos, l = h.pos);
- }
- });
- });
- };
- }
- ), M(
- p,
- "Extensions/BoostCanvas.js",
- [p["Core/Chart/Chart.js"], p["Core/Color/Color.js"], p["Core/Globals.js"], p["Core/Series/Series.js"], p["Core/Series/SeriesRegistry.js"], p["Core/Utilities.js"]],
- function(o, y, N, D, U, H) {
- var V = y.parse, G = N.doc, R = N.noop, B = U.seriesTypes, S = H.addEvent, x = H.extend, f = H.fireEvent, d = H.isNumber, T = H.merge, O = H.pick, j = H.wrap, k;
- return function() {
- N.seriesTypes.heatmap && j(N.seriesTypes.heatmap.prototype, "drawPoints", function() {
- var b = this.chart, w = this.getContext(), v = this.chart.inverted, l = this.xAxis, h = this.yAxis;
- w ? (this.points.forEach(function(u) {
- var i = u.plotY;
- if (typeof i < "u" && !isNaN(i) && u.y !== null && w) {
- var c = u.shapeArgs || {};
- i = c.x, i = i === void 0 ? 0 : i;
- var a = c.y;
- a = a === void 0 ? 0 : a;
- var t = c.width;
- t = t === void 0 ? 0 : t, c = c.height, c = c === void 0 ? 0 : c, u = b.styledMode ? u.series.colorAttribs(u) : u.series.pointAttribs(u), w.fillStyle = u.fill, v ? w.fillRect(h.len - a + l.left, l.len - i + h.top, -c, -t) : w.fillRect(i + l.left, a + h.top, t, c);
- }
- }), this.canvasToSVG()) : this.chart.showLoading("Your browser doesn't support HTML5 canvas, <br>please use a modern browser");
- }), x(D.prototype, { getContext: function() {
- var b = this.chart, w = b.chartWidth, v = b.chartHeight, l = b.seriesGroup || this.group, h = this, u = function(c, a, t, s, n, P, _) {
- c.call(this, t, a, s, n, P, _);
- };
- b.isChartSeriesBoosting() && (h = b, l = b.seriesGroup);
- var i = h.ctx;
- return h.canvas || (h.canvas = G.createElement("canvas"), h.renderTarget = b.renderer.image("", 0, 0, w, v).addClass("highcharts-boost-canvas").add(l), h.ctx = i = h.canvas.getContext("2d"), b.inverted && ["moveTo", "lineTo", "rect", "arc"].forEach(function(c) {
- j(i, c, u);
- }), h.boostCopy = function() {
- h.renderTarget.attr({ href: h.canvas.toDataURL("image/png") });
- }, h.boostClear = function() {
- i.clearRect(0, 0, h.canvas.width, h.canvas.height), h === this && h.renderTarget.attr({ href: "" });
- }, h.boostClipRect = b.renderer.clipRect(), h.renderTarget.clip(h.boostClipRect)), h.canvas.width !== w && (h.canvas.width = w), h.canvas.height !== v && (h.canvas.height = v), h.renderTarget.attr({ x: 0, y: 0, width: w, height: v, style: "pointer-events: none", href: "" }), h.boostClipRect.attr(b.getBoostClipRect(h)), i;
- }, canvasToSVG: function() {
- this.chart.isChartSeriesBoosting() ? this.boostClear && this.boostClear() : (this.boostCopy || this.chart.boostCopy) && (this.boostCopy || this.chart.boostCopy)();
- }, cvsLineTo: function(b, w, v) {
- b.lineTo(w, v);
- }, renderCanvas: function() {
- var b = this, w = b.options, v = b.chart, l = this.xAxis, h = this.yAxis, u = (v.options.boost || {}).timeRendering || !1, i = 0, c = b.processedXData, a = b.processedYData, t = w.data, s = l.getExtremes(), n = s.min, P = s.max;
- s = h.getExtremes();
- var _ = s.min, I = s.max, W = {}, E, X = !!b.sampling, g = w.marker && w.marker.radius, m = this.cvsDrawPoint, L = w.lineWidth ? this.cvsLineTo : void 0, z = g && 1 >= g ? this.cvsMarkerSquare : this.cvsMarkerCircle, $ = this.cvsStrokeBatch || 1e3, Q = w.enableMouseTracking !== !1, A;
- s = w.threshold;
- var F = h.getThreshold(s), Y = d(s), Z = F, q = this.fill, it = b.pointArrayMap && b.pointArrayMap.join(",") === "low,high", et = !!w.stacking, nt = b.cropStart || 0;
- s = v.options.loading;
- var rt = b.requireSorting, ct, gt = w.connectNulls, dt = !c, ht, at, J, tt, ot, lt = et ? b.data : c || t, pt = b.fillOpacity ? y.parse(b.color).setOpacity(O(w.fillOpacity, 0.75)).get() : b.color, yt = function() {
- q ? (Dt.fillStyle = pt, Dt.fill()) : (Dt.strokeStyle = b.color, Dt.lineWidth = w.lineWidth, Dt.stroke());
- }, vt = function(_t, Nt, Ot, Kt) {
- i === 0 && (Dt.beginPath(), L && (Dt.lineJoin = "round")), v.scroller && b.options.className === "highcharts-navigator-series" ? (Nt += v.scroller.top, Ot && (Ot += v.scroller.top)) : Nt += v.plotTop, _t += v.plotLeft, ct ? Dt.moveTo(_t, Nt) : m ? m(Dt, _t, Nt, Ot, A) : L ? L(Dt, _t, Nt) : z && z.call(b, Dt, _t, Nt, g, Kt), i += 1, i === $ && (yt(), i = 0), A = { clientX: _t, plotY: Nt, yBottom: Ot };
- }, Mt = w.findNearestPointBy === "x", Pt = this.xData || this.options.xData || this.processedXData || !1, At = function(_t, Nt, Ot) {
- ot = Mt ? _t : _t + "," + Nt, Q && !W[ot] && (W[ot] = !0, v.inverted && (_t = l.len - _t, Nt = h.len - Nt), St.push({ x: Pt ? Pt[nt + Ot] : !1, clientX: _t, plotX: _t, plotY: Nt, i: nt + Ot }));
- };
- this.renderTarget && this.renderTarget.attr({ href: "" }), (this.points || this.graph) && this.destroyGraphics(), b.plotGroup("group", "series", b.visible ? "visible" : "hidden", w.zIndex, v.seriesGroup), b.markerGroup = b.group, S(b, "destroy", function() {
- b.markerGroup = null;
- });
- var St = this.points = [], Dt = this.getContext();
- b.buildKDTree = R, this.boostClear && this.boostClear(), this.visible && (99999 < t.length && (v.options.loading = T(s, { labelStyle: {
- backgroundColor: V("#ffffff").setOpacity(0.75).get(),
- padding: "1em",
- borderRadius: "0.5em"
- }, style: { backgroundColor: "none", opacity: 1 } }), H.clearTimeout(k), v.showLoading("Drawing..."), v.options.loading = s), u && console.time("canvas rendering"), N.eachAsync(lt, function(_t, Nt) {
- var Ot = !1, Kt = !1, Gt = !1, Wt = !1, Jt = typeof v.index > "u", be = !0;
- if (!Jt) {
- if (dt) {
- var Yt = _t[0], Vt = _t[1];
- lt[Nt + 1] && (Gt = lt[Nt + 1][0]), lt[Nt - 1] && (Wt = lt[Nt - 1][0]);
- } else
- Yt = _t, Vt = a[Nt], lt[Nt + 1] && (Gt = lt[Nt + 1]), lt[Nt - 1] && (Wt = lt[Nt - 1]);
- if (Gt && Gt >= n && Gt <= P && (Ot = !0), Wt && Wt >= n && Wt <= P && (Kt = !0), it) {
- dt && (Vt = _t.slice(1, 3));
- var Ce = Vt[0];
- Vt = Vt[1];
- } else
- et && (Yt = _t.x, Vt = _t.stackY, Ce = Vt - _t.y);
- _t = Vt === null, rt || (be = Vt >= _ && Vt <= I), !_t && (Yt >= n && Yt <= P && be || Ot || Kt) && (Yt = Math.round(l.toPixels(Yt, !0)), X ? ((typeof J > "u" || Yt === E) && (it || (Ce = Vt), (typeof tt > "u" || Vt > at) && (at = Vt, tt = Nt), (typeof J > "u" || Ce < ht) && (ht = Ce, J = Nt)), Yt !== E && (typeof J < "u" && (Vt = h.toPixels(at, !0), F = h.toPixels(ht, !0), vt(Yt, Y ? Math.min(Vt, Z) : Vt, Y ? Math.max(F, Z) : F, Nt), At(Yt, Vt, tt), F !== Vt && At(Yt, F, J)), J = tt = void 0, E = Yt)) : (Vt = Math.round(h.toPixels(Vt, !0)), vt(Yt, Vt, F, Nt), At(Yt, Vt, Nt))), ct = _t && !gt, Nt % 5e4 === 0 && (b.boostCopy || b.chart.boostCopy) && (b.boostCopy || b.chart.boostCopy)();
- }
- return !Jt;
- }, function() {
- var _t = v.loadingDiv, Nt = v.loadingShown;
- yt(), b.canvasToSVG(), u && console.timeEnd("canvas rendering"), f(b, "renderedCanvas"), Nt && (x(_t.style, { transition: "opacity 250ms", opacity: 0 }), v.loadingShown = !1, k = setTimeout(function() {
- _t.parentNode && _t.parentNode.removeChild(_t), v.loadingDiv = v.loadingSpan = null;
- }, 250)), delete b.buildKDTree, b.buildKDTree();
- }, v.renderer.forExport ? Number.MAX_VALUE : void 0));
- } }), B.scatter.prototype.cvsMarkerCircle = function(b, w, v, l) {
- b.moveTo(w, v), b.arc(w, v, l, 0, 2 * Math.PI, !1);
- }, B.scatter.prototype.cvsMarkerSquare = function(b, w, v, l) {
- b.rect(w - l, v - l, 2 * l, 2 * l);
- }, B.scatter.prototype.fill = !0, B.bubble && (B.bubble.prototype.cvsMarkerCircle = function(b, w, v, l, h) {
- b.moveTo(w, v), b.arc(w, v, this.radii && this.radii[h], 0, 2 * Math.PI, !1);
- }, B.bubble.prototype.cvsStrokeBatch = 1), x(B.area.prototype, {
- cvsDrawPoint: function(b, w, v, l, h) {
- h && w !== h.clientX && (b.moveTo(h.clientX, h.yBottom), b.lineTo(h.clientX, h.plotY), b.lineTo(w, v), b.lineTo(w, l));
- },
- fill: !0,
- fillOpacity: !0,
- sampling: !0
- }), x(B.column.prototype, { cvsDrawPoint: function(b, w, v, l) {
- b.rect(w - 1, v, 1, l - v);
- }, fill: !0, sampling: !0 }), o.prototype.callbacks.push(function(b) {
- S(b, "predraw", function() {
- b.renderTarget && b.renderTarget.attr({ href: "" }), b.canvas && b.canvas.getContext("2d").clearRect(0, 0, b.canvas.width, b.canvas.height);
- }), S(b, "render", function() {
- b.boostCopy && b.boostCopy();
- });
- });
- };
- }
- ), M(p, "Extensions/Boost/BoostOverrides.js", [
- p["Core/Chart/Chart.js"],
- p["Core/DefaultOptions.js"],
- p["Core/Series/Point.js"],
- p["Core/Series/Series.js"],
- p["Core/Series/SeriesRegistry.js"],
- p["Core/Utilities.js"],
- p["Extensions/Boost/BoostUtils.js"],
- p["Extensions/Boost/Boostables.js"],
- p["Extensions/Boost/BoostableMap.js"]
- ], function(o, y, N, D, U, H, V, G, R) {
- y = y.getOptions;
- var B = U.seriesTypes;
- U = H.addEvent;
- var S = H.error, x = H.isArray, f = H.isNumber, d = H.pick, T = H.wrap, O = V.boostEnabled, j = V.shouldForceChartSeriesBoosting, k = y().plotOptions;
- o.prototype.isChartSeriesBoosting = function() {
- return d(this.options.boost && this.options.boost.seriesThreshold, 50) <= this.series.length || j(this);
- }, o.prototype.getBoostClipRect = function(b) {
- var w = { x: this.plotLeft, y: this.plotTop, width: this.plotWidth, height: this.plotHeight };
- return b === this && (b = this.inverted ? this.xAxis : this.yAxis, 1 >= b.length ? (w.y = Math.min(b[0].pos, w.y), w.height = b[0].pos - this.plotTop + b[0].len) : w.height = this.plotHeight), w;
- }, D.prototype.getPoint = function(b) {
- var w = b, v = this.xData || this.options.xData || this.processedXData || !1;
- return !b || b instanceof this.pointClass || (w = new this.pointClass().init(this, this.options.data[b.i], v ? v[b.i] : void 0), w.category = d(this.xAxis.categories ? this.xAxis.categories[w.x] : w.x, w.x), w.dist = b.dist, w.distX = b.distX, w.plotX = b.plotX, w.plotY = b.plotY, w.index = b.i, w.isInside = this.isPointInside(b)), w;
- }, T(D.prototype, "searchPoint", function(b) {
- return this.getPoint(b.apply(this, [].slice.call(arguments, 1)));
- }), T(N.prototype, "haloPath", function(b) {
- var w = this.series, v = this.plotX, l = this.plotY, h = w.chart.inverted;
- w.isSeriesBoosting && h && (this.plotX = w.yAxis.len - l, this.plotY = w.xAxis.len - v);
- var u = b.apply(this, Array.prototype.slice.call(
- arguments,
- 1
- ));
- return w.isSeriesBoosting && h && (this.plotX = v, this.plotY = l), u;
- }), T(D.prototype, "markerAttribs", function(b, w) {
- var v = w.plotX, l = w.plotY, h = this.chart.inverted;
- this.isSeriesBoosting && h && (w.plotX = this.yAxis.len - l, w.plotY = this.xAxis.len - v);
- var u = b.apply(this, Array.prototype.slice.call(arguments, 1));
- return this.isSeriesBoosting && h && (w.plotX = v, w.plotY = l), u;
- }), U(D, "destroy", function() {
- var b = this, w = b.chart;
- w.markerGroup === b.markerGroup && (b.markerGroup = null), w.hoverPoints && (w.hoverPoints = w.hoverPoints.filter(function(v) {
- return v.series === b;
- })), w.hoverPoint && w.hoverPoint.series === b && (w.hoverPoint = null);
- }), T(D.prototype, "getExtremes", function(b) {
- return this.isSeriesBoosting && this.hasExtremes && this.hasExtremes() ? {} : b.apply(this, Array.prototype.slice.call(arguments, 1));
- }), ["translate", "generatePoints", "drawTracker", "drawPoints", "render"].forEach(function(b) {
- function w(v) {
- var l = this.options.stacking && (b === "translate" || b === "generatePoints");
- !this.isSeriesBoosting || l || !O(this.chart) || this.type === "heatmap" || this.type === "treemap" || !R[this.type] || this.options.boostThreshold === 0 ? v.call(this) : this[b + "Canvas"] && this[b + "Canvas"]();
- }
- T(D.prototype, b, w), b === "translate" && "column bar arearange columnrange heatmap treemap".split(" ").forEach(function(v) {
- B[v] && T(B[v].prototype, b, w);
- });
- }), T(D.prototype, "processData", function(b) {
- function w(h) {
- return v.forceCrop ? !1 : v.chart.isChartSeriesBoosting() || (h ? h.length : 0) >= (v.options.boostThreshold || Number.MAX_VALUE);
- }
- var v = this, l = this.options.data;
- O(this.chart) && R[this.type] ? (w(l) && this.type !== "heatmap" && this.type !== "treemap" && !this.options.stacking && this.hasExtremes && this.hasExtremes(!0) || (b.apply(this, Array.prototype.slice.call(arguments, 1)), l = this.processedXData), (this.isSeriesBoosting = w(l)) ? (l = void 0, this.options.data && this.options.data.length && (l = this.getFirstValidPoint(this.options.data), f(l) || x(l) || S(12, !1, this.chart)), this.enterBoost()) : this.exitBoost && this.exitBoost()) : b.apply(this, Array.prototype.slice.call(arguments, 1));
- }), U(D, "hide", function() {
- this.canvas && this.renderTarget && (this.ogl && this.ogl.clear(), this.boostClear());
- }), D.prototype.enterBoost = function() {
- this.alteredByBoost = [], ["allowDG", "directTouch", "stickyTracking"].forEach(function(b) {
- this.alteredByBoost.push({ prop: b, val: this[b], own: Object.hasOwnProperty.call(this, b) });
- }, this), this.directTouch = this.allowDG = !1, this.finishedAnimating = this.stickyTracking = !0, this.labelBySeries && (this.labelBySeries = this.labelBySeries.destroy());
- }, D.prototype.exitBoost = function() {
- (this.alteredByBoost || []).forEach(
- function(b) {
- b.own ? this[b.prop] = b.val : delete this[b.prop];
- },
- this
- ), this.boostClear && this.boostClear();
- }, D.prototype.hasExtremes = function(b) {
- var w = this.options, v = this.xAxis && this.xAxis.options, l = this.yAxis && this.yAxis.options, h = this.colorAxis && this.colorAxis.options;
- return w.data.length > (w.boostThreshold || Number.MAX_VALUE) && f(l.min) && f(l.max) && (!b || f(v.min) && f(v.max)) && (!h || f(h.min) && f(h.max));
- }, D.prototype.destroyGraphics = function() {
- var b = this, w = this, v = this.points, l, h;
- if (v)
- for (h = 0; h < v.length; h += 1)
- (l = v[h]) && l.destroyElements && l.destroyElements();
- [
- "graph",
- "area",
- "tracker"
- ].forEach(function(u) {
- w[u] && (w[u] = w[u].destroy());
- }), this.getZonesGraphs && this.getZonesGraphs([["graph", "highcharts-graph"]]).forEach(function(u) {
- var i = b[u[0]];
- i && (b[u[0]] = i.destroy());
- });
- }, G.forEach(function(b) {
- k[b] && (k[b].boostThreshold = 5e3, k[b].boostData = [], B[b].prototype.fillOpacity = !0);
- });
- }), M(p, "Extensions/Boost/NamedColors.js", [p["Core/Color/Color.js"]], function(o) {
- var y = {
- aliceblue: "#f0f8ff",
- antiquewhite: "#faebd7",
- aqua: "#00ffff",
- aquamarine: "#7fffd4",
- azure: "#f0ffff",
- beige: "#f5f5dc",
- bisque: "#ffe4c4",
- black: "#000000",
- blanchedalmond: "#ffebcd",
- blue: "#0000ff",
- blueviolet: "#8a2be2",
- brown: "#a52a2a",
- burlywood: "#deb887",
- cadetblue: "#5f9ea0",
- chartreuse: "#7fff00",
- chocolate: "#d2691e",
- coral: "#ff7f50",
- cornflowerblue: "#6495ed",
- cornsilk: "#fff8dc",
- crimson: "#dc143c",
- cyan: "#00ffff",
- darkblue: "#00008b",
- darkcyan: "#008b8b",
- darkgoldenrod: "#b8860b",
- darkgray: "#a9a9a9",
- darkgreen: "#006400",
- darkkhaki: "#bdb76b",
- darkmagenta: "#8b008b",
- darkolivegreen: "#556b2f",
- darkorange: "#ff8c00",
- darkorchid: "#9932cc",
- darkred: "#8b0000",
- darksalmon: "#e9967a",
- darkseagreen: "#8fbc8f",
- darkslateblue: "#483d8b",
- darkslategray: "#2f4f4f",
- darkturquoise: "#00ced1",
- darkviolet: "#9400d3",
- deeppink: "#ff1493",
- deepskyblue: "#00bfff",
- dimgray: "#696969",
- dodgerblue: "#1e90ff",
- feldspar: "#d19275",
- firebrick: "#b22222",
- floralwhite: "#fffaf0",
- forestgreen: "#228b22",
- fuchsia: "#ff00ff",
- gainsboro: "#dcdcdc",
- ghostwhite: "#f8f8ff",
- gold: "#ffd700",
- goldenrod: "#daa520",
- gray: "#808080",
- green: "#008000",
- greenyellow: "#adff2f",
- honeydew: "#f0fff0",
- hotpink: "#ff69b4",
- indianred: "#cd5c5c",
- indigo: "#4b0082",
- ivory: "#fffff0",
- khaki: "#f0e68c",
- lavender: "#e6e6fa",
- lavenderblush: "#fff0f5",
- lawngreen: "#7cfc00",
- lemonchiffon: "#fffacd",
- lightblue: "#add8e6",
- lightcoral: "#f08080",
- lightcyan: "#e0ffff",
- lightgoldenrodyellow: "#fafad2",
- lightgrey: "#d3d3d3",
- lightgreen: "#90ee90",
- lightpink: "#ffb6c1",
- lightsalmon: "#ffa07a",
- lightseagreen: "#20b2aa",
- lightskyblue: "#87cefa",
- lightslateblue: "#8470ff",
- lightslategray: "#778899",
- lightsteelblue: "#b0c4de",
- lightyellow: "#ffffe0",
- lime: "#00ff00",
- limegreen: "#32cd32",
- linen: "#faf0e6",
- magenta: "#ff00ff",
- maroon: "#800000",
- mediumaquamarine: "#66cdaa",
- mediumblue: "#0000cd",
- mediumorchid: "#ba55d3",
- mediumpurple: "#9370d8",
- mediumseagreen: "#3cb371",
- mediumslateblue: "#7b68ee",
- mediumspringgreen: "#00fa9a",
- mediumturquoise: "#48d1cc",
- mediumvioletred: "#c71585",
- midnightblue: "#191970",
- mintcream: "#f5fffa",
- mistyrose: "#ffe4e1",
- moccasin: "#ffe4b5",
- navajowhite: "#ffdead",
- navy: "#000080",
- oldlace: "#fdf5e6",
- olive: "#808000",
- olivedrab: "#6b8e23",
- orange: "#ffa500",
- orangered: "#ff4500",
- orchid: "#da70d6",
- palegoldenrod: "#eee8aa",
- palegreen: "#98fb98",
- paleturquoise: "#afeeee",
- palevioletred: "#d87093",
- papayawhip: "#ffefd5",
- peachpuff: "#ffdab9",
- peru: "#cd853f",
- pink: "#ffc0cb",
- plum: "#dda0dd",
- powderblue: "#b0e0e6",
- purple: "#800080",
- red: "#ff0000",
- rosybrown: "#bc8f8f",
- royalblue: "#4169e1",
- saddlebrown: "#8b4513",
- salmon: "#fa8072",
- sandybrown: "#f4a460",
- seagreen: "#2e8b57",
- seashell: "#fff5ee",
- sienna: "#a0522d",
- silver: "#c0c0c0",
- skyblue: "#87ceeb",
- slateblue: "#6a5acd",
- slategray: "#708090",
- snow: "#fffafa",
- springgreen: "#00ff7f",
- steelblue: "#4682b4",
- tan: "#d2b48c",
- teal: "#008080",
- thistle: "#d8bfd8",
- tomato: "#ff6347",
- turquoise: "#40e0d0",
- violet: "#ee82ee",
- violetred: "#d02090",
- wheat: "#f5deb3",
- white: "#ffffff",
- whitesmoke: "#f5f5f5",
- yellow: "#ffff00",
- yellowgreen: "#9acd32"
- };
- return o.names = y;
- }), M(p, "Extensions/Boost/Boost.js", [p["Extensions/Boost/BoostUtils.js"], p["Extensions/Boost/BoostInit.js"], p["Extensions/BoostCanvas.js"], p["Core/Utilities.js"]], function(o, y, N, D) {
- D = D.error, o = o.hasWebGLSupport, o() ? y() : typeof N < "u" ? N() : D(26);
- }), M(p, "masters/modules/boost.src.js", [], function() {
- });
- });
- })(ou);
- var q0 = ou.exports;
- const Q0 = /* @__PURE__ */ Cn(q0), t1 = (r) => {
- let p = window.location.protocol;
- /^http(s)?:&/.test(p) || (p = "http:");
- let M = {
- lang: {
- // Highcharts
- contextButtonTitle: "图表导出菜单",
- decimalPoint: ".",
- downloadJPEG: "下载 JPEG 图片",
- downloadPDF: "下载 PDF 文件",
- downloadPNG: "下载 PNG 文件",
- downloadSVG: "下载 SVG 文件",
- downloadXLS: "下载 XLS 文件",
- drillUpText: "◁ 返回 {series.name}",
- exitFullscreen: "退出全屏",
- exportData: {
- categoryDatetimeHeader: "时间",
- categoryHeader: "类别"
- },
- openInCloud: "在 Highcharts Cloud 中打开",
- invalidDate: "无效的时间",
- loading: "加载中...",
- months: [
- "一月",
- "二月",
- "三月",
- "四月",
- "五月",
- "六月",
- "七月",
- "八月",
- "九月",
- "十月",
- "十一月",
- "十二月"
- ],
- navigation: {
- popup: {
- addButton: "新增",
- arrowLine: "直线",
- arrowRay: "射线",
- arrowSegment: "线段",
- background: "背景",
- backgroundColor: "背景颜色",
- backgroundColors: "背景颜色",
- borderColor: "边框颜色",
- borderRadius: "圆角",
- borderWidth: "边框大小",
- circle: "圆",
- color: "颜色",
- connector: "连接",
- crooked3: "Crooked 3 line",
- crooked5: "Crooked 5 line",
- crosshairX: "竖直准星线",
- crosshairY: "水平准星线",
- editButton: "编辑",
- elliott3: "Elliott 3 line",
- elliott5: "Elliott 5 line",
- fibonacci: "斐波纳契",
- fill: "填充颜色",
- flags: "标志",
- fontSize: "字体大小",
- format: "文本",
- height: "高度",
- horizontalLine: "水平线",
- infinityLine: "无限线",
- innerBackground: "内背景",
- label: "文字标签",
- labelOptions: "文字标签配置",
- labels: "文字标签",
- line: "线",
- lines: "线条",
- measure: "Measure",
- measureX: "Measure X",
- measureXY: "Measure XY",
- measureY: "Measure Y",
- name: "名字",
- outerBackground: "外背景",
- padding: "内间距",
- parallelChannel: "并行通道",
- pitchfork: "杈子",
- ray: "射线",
- rectangle: "矩形",
- removeButton: "删除",
- saveButton: "保存",
- segment: "段落",
- series: "数据列",
- shapeOptions: "图形配置",
- shapes: "图形",
- simpleShapes: "简单图形",
- stroke: "线条颜色",
- strokeWidth: "线条粗细",
- style: "样式",
- title: "标题",
- tunnel: "通道",
- typeOptions: "详情",
- verticalArrow: "竖直箭头",
- verticalCounter: "竖直计数器",
- verticalLabel: "竖直标签",
- verticalLine: "竖直线",
- volume: "成交量"
- }
- },
- noData: "暂无数据",
- numericSymbols: null,
- printChart: "打印图表",
- resetZoom: "重置缩放比例",
- resetZoomTitle: "重置为原始大小",
- shortMonths: [
- "一月",
- "二月",
- "三月",
- "四月",
- "五月",
- "六月",
- "七月",
- "八月",
- "九月",
- "十月",
- "十一月",
- "十二月"
- ],
- thousandsSep: ",",
- viewData: "查看数据表格",
- viewFullscreen: "全屏查看",
- weekdays: [
- "星期天",
- "星期一",
- "星期二",
- "星期三",
- "星期四",
- "星期五",
- "星期六"
- ],
- viewData: "查看数据表格",
- // Highstock
- rangeSelectorFrom: "开始时间",
- rangeSelectorTo: "结束时间",
- rangeSelectorZoom: "范围",
- // Highmaps
- zoomIn: "缩小",
- zoomOut: "放大"
- },
- global: {
- // 不使用 UTC时间
- useUTC: !1,
- timezoneOffset: -8 * 60,
- canvasToolsURL: p + "//cdn.hcharts.cn/highcharts/modules/canvas-tools.js",
- VMLRadialGradientURL: p + +"//cdn.hcharts.cn/highcharts/gfx/vml-radial-gradient.png"
- },
- exporting: {
- url: p + "//export.highcharts.com.cn"
- },
- credits: {
- text: "Highcharts.com.cn",
- href: "https://www.highcharts.com.cn"
- },
- /**
- * Highstock
- */
- rangeSelector: {
- inputDateFormat: "%Y-%m-%d",
- buttons: [
- {
- type: "month",
- count: 1,
- text: "月"
- },
- {
- type: "month",
- count: 3,
- text: "季度"
- },
- {
- type: "month",
- count: 6,
- text: "半年"
- },
- {
- type: "ytd",
- text: "YTD"
- },
- {
- type: "year",
- count: 1,
- text: "年"
- },
- {
- type: "all",
- text: "所有"
- }
- ]
- },
- plotOptions: {
- series: {
- dataGrouping: {
- dateTimeLabelFormats: {
- /* millisecond: [
- '%Y-%m-%d %H:%M:%S.%L',
- '%Y-%m-%d %H:%M:%S.%L',
- ' ~ %H:%M:%S.%L',
- ],
- second: ['%Y-%m-%d %H:%M:%S', '%Y-%m-%d %H:%M:%S', ' ~ %H:%M:%S'],
- minute: ['%Y-%m-%d %H:%M', '%Y-%m-%d %H:%M', ' ~ %H:%M'],
- hour: ['%Y-%m-%d %H:%M', '%Y-%m-%d %H:%M', ' ~ %H:%M'], */
- day: ["%Y/%m/%d", "%Y/%m/%d", " ~ %Y/%m/%d"],
- week: ["%Y/%m/%d", "%Y/%m/%d", " ~ %Y/%m/%d"],
- month: ["%Y/%m", "%Y/%m", " ~ %Y/%m"],
- year: ["%Y", "%Y", " ~ %Y"]
- }
- }
- }
- }
- };
- r.setOptions(M);
- };
- //! moment.js
- //! version : 2.30.1
- //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
- //! license : MIT
- //! momentjs.com
- var au;
- function Xt() {
- return au.apply(null, arguments);
- }
- function e1(r) {
- au = r;
- }
- function ji(r) {
- return r instanceof Array || Object.prototype.toString.call(r) === "[object Array]";
- }
- function $r(r) {
- return r != null && Object.prototype.toString.call(r) === "[object Object]";
- }
- function me(r, p) {
- return Object.prototype.hasOwnProperty.call(r, p);
- }
- function Pl(r) {
- if (Object.getOwnPropertyNames)
- return Object.getOwnPropertyNames(r).length === 0;
- var p;
- for (p in r)
- if (me(r, p))
- return !1;
- return !0;
- }
- function li(r) {
- return r === void 0;
- }
- function fr(r) {
- return typeof r == "number" || Object.prototype.toString.call(r) === "[object Number]";
- }
- function as(r) {
- return r instanceof Date || Object.prototype.toString.call(r) === "[object Date]";
- }
- function lu(r, p) {
- var M = [], o, y = r.length;
- for (o = 0; o < y; ++o)
- M.push(p(r[o], o));
- return M;
- }
- function Tr(r, p) {
- for (var M in p)
- me(p, M) && (r[M] = p[M]);
- return me(p, "toString") && (r.toString = p.toString), me(p, "valueOf") && (r.valueOf = p.valueOf), r;
- }
- function Zi(r, p, M, o) {
- return Lu(r, p, M, o, !0).utc();
- }
- function i1() {
- return {
- empty: !1,
- unusedTokens: [],
- unusedInput: [],
- overflow: -2,
- charsLeftOver: 0,
- nullInput: !1,
- invalidEra: null,
- invalidMonth: null,
- invalidFormat: !1,
- userInvalidated: !1,
- iso: !1,
- parsedDateParts: [],
- era: null,
- meridiem: null,
- rfc2822: !1,
- weekdayMismatch: !1
- };
- }
- function oe(r) {
- return r._pf == null && (r._pf = i1()), r._pf;
- }
- var gl;
- Array.prototype.some ? gl = Array.prototype.some : gl = function(r) {
- var p = Object(this), M = p.length >>> 0, o;
- for (o = 0; o < M; o++)
- if (o in p && r.call(this, p[o], o, p))
- return !0;
- return !1;
- };
- function El(r) {
- var p = null, M = !1, o = r._d && !isNaN(r._d.getTime());
- if (o && (p = oe(r), M = gl.call(p.parsedDateParts, function(y) {
- return y != null;
- }), o = p.overflow < 0 && !p.empty && !p.invalidEra && !p.invalidMonth && !p.invalidWeekday && !p.weekdayMismatch && !p.nullInput && !p.invalidFormat && !p.userInvalidated && (!p.meridiem || p.meridiem && M), r._strict && (o = o && p.charsLeftOver === 0 && p.unusedTokens.length === 0 && p.bigHour === void 0)), Object.isFrozen == null || !Object.isFrozen(r))
- r._isValid = o;
- else
- return o;
- return r._isValid;
- }
- function To(r) {
- var p = Zi(NaN);
- return r != null ? Tr(oe(p), r) : oe(p).userInvalidated = !0, p;
- }
- var _p = Xt.momentProperties = [], nl = !1;
- function Ol(r, p) {
- var M, o, y, N = _p.length;
- if (li(p._isAMomentObject) || (r._isAMomentObject = p._isAMomentObject), li(p._i) || (r._i = p._i), li(p._f) || (r._f = p._f), li(p._l) || (r._l = p._l), li(p._strict) || (r._strict = p._strict), li(p._tzm) || (r._tzm = p._tzm), li(p._isUTC) || (r._isUTC = p._isUTC), li(p._offset) || (r._offset = p._offset), li(p._pf) || (r._pf = oe(p)), li(p._locale) || (r._locale = p._locale), N > 0)
- for (M = 0; M < N; M++)
- o = _p[M], y = p[o], li(y) || (r[o] = y);
- return r;
- }
- function ls(r) {
- Ol(this, r), this._d = new Date(r._d != null ? r._d.getTime() : NaN), this.isValid() || (this._d = /* @__PURE__ */ new Date(NaN)), nl === !1 && (nl = !0, Xt.updateOffset(this), nl = !1);
- }
- function Wi(r) {
- return r instanceof ls || r != null && r._isAMomentObject != null;
- }
- function hu(r) {
- Xt.suppressDeprecationWarnings === !1 && typeof console < "u" && console.warn && console.warn("Deprecation warning: " + r);
- }
- function Ei(r, p) {
- var M = !0;
- return Tr(function() {
- if (Xt.deprecationHandler != null && Xt.deprecationHandler(null, r), M) {
- var o = [], y, N, D, U = arguments.length;
- for (N = 0; N < U; N++) {
- if (y = "", typeof arguments[N] == "object") {
- y += `
- [` + N + "] ";
- for (D in arguments[0])
- me(arguments[0], D) && (y += D + ": " + arguments[0][D] + ", ");
- y = y.slice(0, -2);
- } else
- y = arguments[N];
- o.push(y);
- }
- hu(
- r + `
- Arguments: ` + Array.prototype.slice.call(o).join("") + `
- ` + new Error().stack
- ), M = !1;
- }
- return p.apply(this, arguments);
- }, p);
- }
- var Dp = {};
- function cu(r, p) {
- Xt.deprecationHandler != null && Xt.deprecationHandler(r, p), Dp[r] || (hu(p), Dp[r] = !0);
- }
- Xt.suppressDeprecationWarnings = !1;
- Xt.deprecationHandler = null;
- function Ki(r) {
- return typeof Function < "u" && r instanceof Function || Object.prototype.toString.call(r) === "[object Function]";
- }
- function r1(r) {
- var p, M;
- for (M in r)
- me(r, M) && (p = r[M], Ki(p) ? this[M] = p : this["_" + M] = p);
- this._config = r, this._dayOfMonthOrdinalParseLenient = new RegExp(
- (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + "|" + /\d{1,2}/.source
- );
- }
- function ml(r, p) {
- var M = Tr({}, r), o;
- for (o in p)
- me(p, o) && ($r(r[o]) && $r(p[o]) ? (M[o] = {}, Tr(M[o], r[o]), Tr(M[o], p[o])) : p[o] != null ? M[o] = p[o] : delete M[o]);
- for (o in r)
- me(r, o) && !me(p, o) && $r(r[o]) && (M[o] = Tr({}, M[o]));
- return M;
- }
- function Ll(r) {
- r != null && this.set(r);
- }
- var yl;
- Object.keys ? yl = Object.keys : yl = function(r) {
- var p, M = [];
- for (p in r)
- me(r, p) && M.push(p);
- return M;
- };
- var n1 = {
- sameDay: "[Today at] LT",
- nextDay: "[Tomorrow at] LT",
- nextWeek: "dddd [at] LT",
- lastDay: "[Yesterday at] LT",
- lastWeek: "[Last] dddd [at] LT",
- sameElse: "L"
- };
- function s1(r, p, M) {
- var o = this._calendar[r] || this._calendar.sameElse;
- return Ki(o) ? o.call(p, M) : o;
- }
- function $i(r, p, M) {
- var o = "" + Math.abs(r), y = p - o.length, N = r >= 0;
- return (N ? M ? "+" : "" : "-") + Math.pow(10, Math.max(0, y)).toString().substr(1) + o;
- }
- var _l = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g, ro = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g, sl = {}, vn = {};
- function Zt(r, p, M, o) {
- var y = o;
- typeof o == "string" && (y = function() {
- return this[o]();
- }), r && (vn[r] = y), p && (vn[p[0]] = function() {
- return $i(y.apply(this, arguments), p[1], p[2]);
- }), M && (vn[M] = function() {
- return this.localeData().ordinal(
- y.apply(this, arguments),
- r
- );
- });
- }
- function o1(r) {
- return r.match(/\[[\s\S]/) ? r.replace(/^\[|\]$/g, "") : r.replace(/\\/g, "");
- }
- function a1(r) {
- var p = r.match(_l), M, o;
- for (M = 0, o = p.length; M < o; M++)
- vn[p[M]] ? p[M] = vn[p[M]] : p[M] = o1(p[M]);
- return function(y) {
- var N = "", D;
- for (D = 0; D < o; D++)
- N += Ki(p[D]) ? p[D].call(y, r) : p[D];
- return N;
- };
- }
- function oo(r, p) {
- return r.isValid() ? (p = pu(p, r.localeData()), sl[p] = sl[p] || a1(p), sl[p](r)) : r.localeData().invalidDate();
- }
- function pu(r, p) {
- var M = 5;
- function o(y) {
- return p.longDateFormat(y) || y;
- }
- for (ro.lastIndex = 0; M >= 0 && ro.test(r); )
- r = r.replace(
- ro,
- o
- ), ro.lastIndex = 0, M -= 1;
- return r;
- }
- var l1 = {
- LTS: "h:mm:ss A",
- LT: "h:mm A",
- L: "MM/DD/YYYY",
- LL: "MMMM D, YYYY",
- LLL: "MMMM D, YYYY h:mm A",
- LLLL: "dddd, MMMM D, YYYY h:mm A"
- };
- function h1(r) {
- var p = this._longDateFormat[r], M = this._longDateFormat[r.toUpperCase()];
- return p || !M ? p : (this._longDateFormat[r] = M.match(_l).map(function(o) {
- return o === "MMMM" || o === "MM" || o === "DD" || o === "dddd" ? o.slice(1) : o;
- }).join(""), this._longDateFormat[r]);
- }
- var c1 = "Invalid date";
- function p1() {
- return this._invalidDate;
- }
- var u1 = "%d", d1 = /\d{1,2}/;
- function f1(r) {
- return this._ordinal.replace("%d", r);
- }
- var g1 = {
- future: "in %s",
- past: "%s ago",
- s: "a few seconds",
- ss: "%d seconds",
- m: "a minute",
- mm: "%d minutes",
- h: "an hour",
- hh: "%d hours",
- d: "a day",
- dd: "%d days",
- w: "a week",
- ww: "%d weeks",
- M: "a month",
- MM: "%d months",
- y: "a year",
- yy: "%d years"
- };
- function m1(r, p, M, o) {
- var y = this._relativeTime[M];
- return Ki(y) ? y(r, p, M, o) : y.replace(/%d/i, r);
- }
- function y1(r, p) {
- var M = this._relativeTime[r > 0 ? "future" : "past"];
- return Ki(M) ? M(p) : M.replace(/%s/i, p);
- }
- var Ip = {
- D: "date",
- dates: "date",
- date: "date",
- d: "day",
- days: "day",
- day: "day",
- e: "weekday",
- weekdays: "weekday",
- weekday: "weekday",
- E: "isoWeekday",
- isoweekdays: "isoWeekday",
- isoweekday: "isoWeekday",
- DDD: "dayOfYear",
- dayofyears: "dayOfYear",
- dayofyear: "dayOfYear",
- h: "hour",
- hours: "hour",
- hour: "hour",
- ms: "millisecond",
- milliseconds: "millisecond",
- millisecond: "millisecond",
- m: "minute",
- minutes: "minute",
- minute: "minute",
- M: "month",
- months: "month",
- month: "month",
- Q: "quarter",
- quarters: "quarter",
- quarter: "quarter",
- s: "second",
- seconds: "second",
- second: "second",
- gg: "weekYear",
- weekyears: "weekYear",
- weekyear: "weekYear",
- GG: "isoWeekYear",
- isoweekyears: "isoWeekYear",
- isoweekyear: "isoWeekYear",
- w: "week",
- weeks: "week",
- week: "week",
- W: "isoWeek",
- isoweeks: "isoWeek",
- isoweek: "isoWeek",
- y: "year",
- years: "year",
- year: "year"
- };
- function Oi(r) {
- return typeof r == "string" ? Ip[r] || Ip[r.toLowerCase()] : void 0;
- }
- function Dl(r) {
- var p = {}, M, o;
- for (o in r)
- me(r, o) && (M = Oi(o), M && (p[M] = r[o]));
- return p;
- }
- var v1 = {
- date: 9,
- day: 11,
- weekday: 11,
- isoWeekday: 11,
- dayOfYear: 4,
- hour: 13,
- millisecond: 16,
- minute: 14,
- month: 8,
- quarter: 7,
- second: 15,
- weekYear: 1,
- isoWeekYear: 1,
- week: 5,
- isoWeek: 5,
- year: 1
- };
- function x1(r) {
- var p = [], M;
- for (M in r)
- me(r, M) && p.push({ unit: M, priority: v1[M] });
- return p.sort(function(o, y) {
- return o.priority - y.priority;
- }), p;
- }
- var uu = /\d/, yi = /\d\d/, du = /\d{3}/, Il = /\d{4}/, Po = /[+-]?\d{6}/, Pe = /\d\d?/, fu = /\d\d\d\d?/, gu = /\d\d\d\d\d\d?/, Eo = /\d{1,3}/, Rl = /\d{1,4}/, Oo = /[+-]?\d{1,6}/, Mn = /\d+/, Lo = /[+-]?\d+/, b1 = /Z|[+-]\d\d:?\d\d/gi, _o = /Z|[+-]\d\d(?::?\d\d)?/gi, S1 = /[+-]?\d+(\.\d{1,3})?/, hs = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i, kn = /^[1-9]\d?/, Nl = /^([1-9]\d|\d)/, yo;
- yo = {};
- function Ft(r, p, M) {
- yo[r] = Ki(p) ? p : function(o, y) {
- return o && M ? M : p;
- };
- }
- function w1(r, p) {
- return me(yo, r) ? yo[r](p._strict, p._locale) : new RegExp(C1(r));
- }
- function C1(r) {
- return ur(
- r.replace("\\", "").replace(
- /\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,
- function(p, M, o, y, N) {
- return M || o || y || N;
- }
- )
- );
- }
- function ur(r) {
- return r.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&");
- }
- function Ai(r) {
- return r < 0 ? Math.ceil(r) || 0 : Math.floor(r);
- }
- function pe(r) {
- var p = +r, M = 0;
- return p !== 0 && isFinite(p) && (M = Ai(p)), M;
- }
- var vl = {};
- function we(r, p) {
- var M, o = p, y;
- for (typeof r == "string" && (r = [r]), fr(p) && (o = function(N, D) {
- D[p] = pe(N);
- }), y = r.length, M = 0; M < y; M++)
- vl[r[M]] = o;
- }
- function cs(r, p) {
- we(r, function(M, o, y, N) {
- y._w = y._w || {}, p(M, y._w, y, N);
- });
- }
- function M1(r, p, M) {
- p != null && me(vl, r) && vl[r](p, M._a, M, r);
- }
- function Do(r) {
- return r % 4 === 0 && r % 100 !== 0 || r % 400 === 0;
- }
- var ti = 0, cr = 1, Vi = 2, Ge = 3, Ni = 4, pr = 5, Hr = 6, k1 = 7, A1 = 8;
- Zt("Y", 0, 0, function() {
- var r = this.year();
- return r <= 9999 ? $i(r, 4) : "+" + r;
- });
- Zt(0, ["YY", 2], 0, function() {
- return this.year() % 100;
- });
- Zt(0, ["YYYY", 4], 0, "year");
- Zt(0, ["YYYYY", 5], 0, "year");
- Zt(0, ["YYYYYY", 6, !0], 0, "year");
- Ft("Y", Lo);
- Ft("YY", Pe, yi);
- Ft("YYYY", Rl, Il);
- Ft("YYYYY", Oo, Po);
- Ft("YYYYYY", Oo, Po);
- we(["YYYYY", "YYYYYY"], ti);
- we("YYYY", function(r, p) {
- p[ti] = r.length === 2 ? Xt.parseTwoDigitYear(r) : pe(r);
- });
- we("YY", function(r, p) {
- p[ti] = Xt.parseTwoDigitYear(r);
- });
- we("Y", function(r, p) {
- p[ti] = parseInt(r, 10);
- });
- function Qn(r) {
- return Do(r) ? 366 : 365;
- }
- Xt.parseTwoDigitYear = function(r) {
- return pe(r) + (pe(r) > 68 ? 1900 : 2e3);
- };
- var mu = An("FullYear", !0);
- function T1() {
- return Do(this.year());
- }
- function An(r, p) {
- return function(M) {
- return M != null ? (yu(this, r, M), Xt.updateOffset(this, p), this) : es(this, r);
- };
- }
- function es(r, p) {
- if (!r.isValid())
- return NaN;
- var M = r._d, o = r._isUTC;
- switch (p) {
- case "Milliseconds":
- return o ? M.getUTCMilliseconds() : M.getMilliseconds();
- case "Seconds":
- return o ? M.getUTCSeconds() : M.getSeconds();
- case "Minutes":
- return o ? M.getUTCMinutes() : M.getMinutes();
- case "Hours":
- return o ? M.getUTCHours() : M.getHours();
- case "Date":
- return o ? M.getUTCDate() : M.getDate();
- case "Day":
- return o ? M.getUTCDay() : M.getDay();
- case "Month":
- return o ? M.getUTCMonth() : M.getMonth();
- case "FullYear":
- return o ? M.getUTCFullYear() : M.getFullYear();
- default:
- return NaN;
- }
- }
- function yu(r, p, M) {
- var o, y, N, D, U;
- if (!(!r.isValid() || isNaN(M))) {
- switch (o = r._d, y = r._isUTC, p) {
- case "Milliseconds":
- return void (y ? o.setUTCMilliseconds(M) : o.setMilliseconds(M));
- case "Seconds":
- return void (y ? o.setUTCSeconds(M) : o.setSeconds(M));
- case "Minutes":
- return void (y ? o.setUTCMinutes(M) : o.setMinutes(M));
- case "Hours":
- return void (y ? o.setUTCHours(M) : o.setHours(M));
- case "Date":
- return void (y ? o.setUTCDate(M) : o.setDate(M));
- case "FullYear":
- break;
- default:
- return;
- }
- N = M, D = r.month(), U = r.date(), U = U === 29 && D === 1 && !Do(N) ? 28 : U, y ? o.setUTCFullYear(N, D, U) : o.setFullYear(N, D, U);
- }
- }
- function P1(r) {
- return r = Oi(r), Ki(this[r]) ? this[r]() : this;
- }
- function E1(r, p) {
- if (typeof r == "object") {
- r = Dl(r);
- var M = x1(r), o, y = M.length;
- for (o = 0; o < y; o++)
- this[M[o].unit](r[M[o].unit]);
- } else if (r = Oi(r), Ki(this[r]))
- return this[r](p);
- return this;
- }
- function O1(r, p) {
- return (r % p + p) % p;
- }
- var We;
- Array.prototype.indexOf ? We = Array.prototype.indexOf : We = function(r) {
- var p;
- for (p = 0; p < this.length; ++p)
- if (this[p] === r)
- return p;
- return -1;
- };
- function Bl(r, p) {
- if (isNaN(r) || isNaN(p))
- return NaN;
- var M = O1(p, 12);
- return r += (p - M) / 12, M === 1 ? Do(r) ? 29 : 28 : 31 - M % 7 % 2;
- }
- Zt("M", ["MM", 2], "Mo", function() {
- return this.month() + 1;
- });
- Zt("MMM", 0, 0, function(r) {
- return this.localeData().monthsShort(this, r);
- });
- Zt("MMMM", 0, 0, function(r) {
- return this.localeData().months(this, r);
- });
- Ft("M", Pe, kn);
- Ft("MM", Pe, yi);
- Ft("MMM", function(r, p) {
- return p.monthsShortRegex(r);
- });
- Ft("MMMM", function(r, p) {
- return p.monthsRegex(r);
- });
- we(["M", "MM"], function(r, p) {
- p[cr] = pe(r) - 1;
- });
- we(["MMM", "MMMM"], function(r, p, M, o) {
- var y = M._locale.monthsParse(r, o, M._strict);
- y != null ? p[cr] = y : oe(M).invalidMonth = r;
- });
- var L1 = "January_February_March_April_May_June_July_August_September_October_November_December".split(
- "_"
- ), vu = "Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"), xu = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/, _1 = hs, D1 = hs;
- function I1(r, p) {
- return r ? ji(this._months) ? this._months[r.month()] : this._months[(this._months.isFormat || xu).test(p) ? "format" : "standalone"][r.month()] : ji(this._months) ? this._months : this._months.standalone;
- }
- function R1(r, p) {
- return r ? ji(this._monthsShort) ? this._monthsShort[r.month()] : this._monthsShort[xu.test(p) ? "format" : "standalone"][r.month()] : ji(this._monthsShort) ? this._monthsShort : this._monthsShort.standalone;
- }
- function N1(r, p, M) {
- var o, y, N, D = r.toLocaleLowerCase();
- if (!this._monthsParse)
- for (this._monthsParse = [], this._longMonthsParse = [], this._shortMonthsParse = [], o = 0; o < 12; ++o)
- N = Zi([2e3, o]), this._shortMonthsParse[o] = this.monthsShort(
- N,
- ""
- ).toLocaleLowerCase(), this._longMonthsParse[o] = this.months(N, "").toLocaleLowerCase();
- return M ? p === "MMM" ? (y = We.call(this._shortMonthsParse, D), y !== -1 ? y : null) : (y = We.call(this._longMonthsParse, D), y !== -1 ? y : null) : p === "MMM" ? (y = We.call(this._shortMonthsParse, D), y !== -1 ? y : (y = We.call(this._longMonthsParse, D), y !== -1 ? y : null)) : (y = We.call(this._longMonthsParse, D), y !== -1 ? y : (y = We.call(this._shortMonthsParse, D), y !== -1 ? y : null));
- }
- function B1(r, p, M) {
- var o, y, N;
- if (this._monthsParseExact)
- return N1.call(this, r, p, M);
- for (this._monthsParse || (this._monthsParse = [], this._longMonthsParse = [], this._shortMonthsParse = []), o = 0; o < 12; o++) {
- if (y = Zi([2e3, o]), M && !this._longMonthsParse[o] && (this._longMonthsParse[o] = new RegExp(
- "^" + this.months(y, "").replace(".", "") + "$",
- "i"
- ), this._shortMonthsParse[o] = new RegExp(
- "^" + this.monthsShort(y, "").replace(".", "") + "$",
- "i"
- )), !M && !this._monthsParse[o] && (N = "^" + this.months(y, "") + "|^" + this.monthsShort(y, ""), this._monthsParse[o] = new RegExp(N.replace(".", ""), "i")), M && p === "MMMM" && this._longMonthsParse[o].test(r))
- return o;
- if (M && p === "MMM" && this._shortMonthsParse[o].test(r))
- return o;
- if (!M && this._monthsParse[o].test(r))
- return o;
- }
- }
- function bu(r, p) {
- if (!r.isValid())
- return r;
- if (typeof p == "string") {
- if (/^\d+$/.test(p))
- p = pe(p);
- else if (p = r.localeData().monthsParse(p), !fr(p))
- return r;
- }
- var M = p, o = r.date();
- return o = o < 29 ? o : Math.min(o, Bl(r.year(), M)), r._isUTC ? r._d.setUTCMonth(M, o) : r._d.setMonth(M, o), r;
- }
- function Su(r) {
- return r != null ? (bu(this, r), Xt.updateOffset(this, !0), this) : es(this, "Month");
- }
- function j1() {
- return Bl(this.year(), this.month());
- }
- function W1(r) {
- return this._monthsParseExact ? (me(this, "_monthsRegex") || wu.call(this), r ? this._monthsShortStrictRegex : this._monthsShortRegex) : (me(this, "_monthsShortRegex") || (this._monthsShortRegex = _1), this._monthsShortStrictRegex && r ? this._monthsShortStrictRegex : this._monthsShortRegex);
- }
- function Y1(r) {
- return this._monthsParseExact ? (me(this, "_monthsRegex") || wu.call(this), r ? this._monthsStrictRegex : this._monthsRegex) : (me(this, "_monthsRegex") || (this._monthsRegex = D1), this._monthsStrictRegex && r ? this._monthsStrictRegex : this._monthsRegex);
- }
- function wu() {
- function r(H, V) {
- return V.length - H.length;
- }
- var p = [], M = [], o = [], y, N, D, U;
- for (y = 0; y < 12; y++)
- N = Zi([2e3, y]), D = ur(this.monthsShort(N, "")), U = ur(this.months(N, "")), p.push(D), M.push(U), o.push(U), o.push(D);
- p.sort(r), M.sort(r), o.sort(r), this._monthsRegex = new RegExp("^(" + o.join("|") + ")", "i"), this._monthsShortRegex = this._monthsRegex, this._monthsStrictRegex = new RegExp(
- "^(" + M.join("|") + ")",
- "i"
- ), this._monthsShortStrictRegex = new RegExp(
- "^(" + p.join("|") + ")",
- "i"
- );
- }
- function z1(r, p, M, o, y, N, D) {
- var U;
- return r < 100 && r >= 0 ? (U = new Date(r + 400, p, M, o, y, N, D), isFinite(U.getFullYear()) && U.setFullYear(r)) : U = new Date(r, p, M, o, y, N, D), U;
- }
- function is(r) {
- var p, M;
- return r < 100 && r >= 0 ? (M = Array.prototype.slice.call(arguments), M[0] = r + 400, p = new Date(Date.UTC.apply(null, M)), isFinite(p.getUTCFullYear()) && p.setUTCFullYear(r)) : p = new Date(Date.UTC.apply(null, arguments)), p;
- }
- function vo(r, p, M) {
- var o = 7 + p - M, y = (7 + is(r, 0, o).getUTCDay() - p) % 7;
- return -y + o - 1;
- }
- function Cu(r, p, M, o, y) {
- var N = (7 + M - o) % 7, D = vo(r, o, y), U = 1 + 7 * (p - 1) + N + D, H, V;
- return U <= 0 ? (H = r - 1, V = Qn(H) + U) : U > Qn(r) ? (H = r + 1, V = U - Qn(r)) : (H = r, V = U), {
- year: H,
- dayOfYear: V
- };
- }
- function rs(r, p, M) {
- var o = vo(r.year(), p, M), y = Math.floor((r.dayOfYear() - o - 1) / 7) + 1, N, D;
- return y < 1 ? (D = r.year() - 1, N = y + dr(D, p, M)) : y > dr(r.year(), p, M) ? (N = y - dr(r.year(), p, M), D = r.year() + 1) : (D = r.year(), N = y), {
- week: N,
- year: D
- };
- }
- function dr(r, p, M) {
- var o = vo(r, p, M), y = vo(r + 1, p, M);
- return (Qn(r) - o + y) / 7;
- }
- Zt("w", ["ww", 2], "wo", "week");
- Zt("W", ["WW", 2], "Wo", "isoWeek");
- Ft("w", Pe, kn);
- Ft("ww", Pe, yi);
- Ft("W", Pe, kn);
- Ft("WW", Pe, yi);
- cs(
- ["w", "ww", "W", "WW"],
- function(r, p, M, o) {
- p[o.substr(0, 1)] = pe(r);
- }
- );
- function X1(r) {
- return rs(r, this._week.dow, this._week.doy).week;
- }
- var G1 = {
- dow: 0,
- // Sunday is the first day of the week.
- doy: 6
- // The week that contains Jan 6th is the first week of the year.
- };
- function H1() {
- return this._week.dow;
- }
- function F1() {
- return this._week.doy;
- }
- function U1(r) {
- var p = this.localeData().week(this);
- return r == null ? p : this.add((r - p) * 7, "d");
- }
- function V1(r) {
- var p = rs(this, 1, 4).week;
- return r == null ? p : this.add((r - p) * 7, "d");
- }
- Zt("d", 0, "do", "day");
- Zt("dd", 0, 0, function(r) {
- return this.localeData().weekdaysMin(this, r);
- });
- Zt("ddd", 0, 0, function(r) {
- return this.localeData().weekdaysShort(this, r);
- });
- Zt("dddd", 0, 0, function(r) {
- return this.localeData().weekdays(this, r);
- });
- Zt("e", 0, 0, "weekday");
- Zt("E", 0, 0, "isoWeekday");
- Ft("d", Pe);
- Ft("e", Pe);
- Ft("E", Pe);
- Ft("dd", function(r, p) {
- return p.weekdaysMinRegex(r);
- });
- Ft("ddd", function(r, p) {
- return p.weekdaysShortRegex(r);
- });
- Ft("dddd", function(r, p) {
- return p.weekdaysRegex(r);
- });
- cs(["dd", "ddd", "dddd"], function(r, p, M, o) {
- var y = M._locale.weekdaysParse(r, o, M._strict);
- y != null ? p.d = y : oe(M).invalidWeekday = r;
- });
- cs(["d", "e", "E"], function(r, p, M, o) {
- p[o] = pe(r);
- });
- function $1(r, p) {
- return typeof r != "string" ? r : isNaN(r) ? (r = p.weekdaysParse(r), typeof r == "number" ? r : null) : parseInt(r, 10);
- }
- function Z1(r, p) {
- return typeof r == "string" ? p.weekdaysParse(r) % 7 || 7 : isNaN(r) ? null : r;
- }
- function jl(r, p) {
- return r.slice(p, 7).concat(r.slice(0, p));
- }
- var K1 = "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), Mu = "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"), J1 = "Su_Mo_Tu_We_Th_Fr_Sa".split("_"), q1 = hs, Q1 = hs, tb = hs;
- function eb(r, p) {
- var M = ji(this._weekdays) ? this._weekdays : this._weekdays[r && r !== !0 && this._weekdays.isFormat.test(p) ? "format" : "standalone"];
- return r === !0 ? jl(M, this._week.dow) : r ? M[r.day()] : M;
- }
- function ib(r) {
- return r === !0 ? jl(this._weekdaysShort, this._week.dow) : r ? this._weekdaysShort[r.day()] : this._weekdaysShort;
- }
- function rb(r) {
- return r === !0 ? jl(this._weekdaysMin, this._week.dow) : r ? this._weekdaysMin[r.day()] : this._weekdaysMin;
- }
- function nb(r, p, M) {
- var o, y, N, D = r.toLocaleLowerCase();
- if (!this._weekdaysParse)
- for (this._weekdaysParse = [], this._shortWeekdaysParse = [], this._minWeekdaysParse = [], o = 0; o < 7; ++o)
- N = Zi([2e3, 1]).day(o), this._minWeekdaysParse[o] = this.weekdaysMin(
- N,
- ""
- ).toLocaleLowerCase(), this._shortWeekdaysParse[o] = this.weekdaysShort(
- N,
- ""
- ).toLocaleLowerCase(), this._weekdaysParse[o] = this.weekdays(N, "").toLocaleLowerCase();
- return M ? p === "dddd" ? (y = We.call(this._weekdaysParse, D), y !== -1 ? y : null) : p === "ddd" ? (y = We.call(this._shortWeekdaysParse, D), y !== -1 ? y : null) : (y = We.call(this._minWeekdaysParse, D), y !== -1 ? y : null) : p === "dddd" ? (y = We.call(this._weekdaysParse, D), y !== -1 || (y = We.call(this._shortWeekdaysParse, D), y !== -1) ? y : (y = We.call(this._minWeekdaysParse, D), y !== -1 ? y : null)) : p === "ddd" ? (y = We.call(this._shortWeekdaysParse, D), y !== -1 || (y = We.call(this._weekdaysParse, D), y !== -1) ? y : (y = We.call(this._minWeekdaysParse, D), y !== -1 ? y : null)) : (y = We.call(this._minWeekdaysParse, D), y !== -1 || (y = We.call(this._weekdaysParse, D), y !== -1) ? y : (y = We.call(this._shortWeekdaysParse, D), y !== -1 ? y : null));
- }
- function sb(r, p, M) {
- var o, y, N;
- if (this._weekdaysParseExact)
- return nb.call(this, r, p, M);
- for (this._weekdaysParse || (this._weekdaysParse = [], this._minWeekdaysParse = [], this._shortWeekdaysParse = [], this._fullWeekdaysParse = []), o = 0; o < 7; o++) {
- if (y = Zi([2e3, 1]).day(o), M && !this._fullWeekdaysParse[o] && (this._fullWeekdaysParse[o] = new RegExp(
- "^" + this.weekdays(y, "").replace(".", "\\.?") + "$",
- "i"
- ), this._shortWeekdaysParse[o] = new RegExp(
- "^" + this.weekdaysShort(y, "").replace(".", "\\.?") + "$",
- "i"
- ), this._minWeekdaysParse[o] = new RegExp(
- "^" + this.weekdaysMin(y, "").replace(".", "\\.?") + "$",
- "i"
- )), this._weekdaysParse[o] || (N = "^" + this.weekdays(y, "") + "|^" + this.weekdaysShort(y, "") + "|^" + this.weekdaysMin(y, ""), this._weekdaysParse[o] = new RegExp(N.replace(".", ""), "i")), M && p === "dddd" && this._fullWeekdaysParse[o].test(r))
- return o;
- if (M && p === "ddd" && this._shortWeekdaysParse[o].test(r))
- return o;
- if (M && p === "dd" && this._minWeekdaysParse[o].test(r))
- return o;
- if (!M && this._weekdaysParse[o].test(r))
- return o;
- }
- }
- function ob(r) {
- if (!this.isValid())
- return r != null ? this : NaN;
- var p = es(this, "Day");
- return r != null ? (r = $1(r, this.localeData()), this.add(r - p, "d")) : p;
- }
- function ab(r) {
- if (!this.isValid())
- return r != null ? this : NaN;
- var p = (this.day() + 7 - this.localeData()._week.dow) % 7;
- return r == null ? p : this.add(r - p, "d");
- }
- function lb(r) {
- if (!this.isValid())
- return r != null ? this : NaN;
- if (r != null) {
- var p = Z1(r, this.localeData());
- return this.day(this.day() % 7 ? p : p - 7);
- } else
- return this.day() || 7;
- }
- function hb(r) {
- return this._weekdaysParseExact ? (me(this, "_weekdaysRegex") || Wl.call(this), r ? this._weekdaysStrictRegex : this._weekdaysRegex) : (me(this, "_weekdaysRegex") || (this._weekdaysRegex = q1), this._weekdaysStrictRegex && r ? this._weekdaysStrictRegex : this._weekdaysRegex);
- }
- function cb(r) {
- return this._weekdaysParseExact ? (me(this, "_weekdaysRegex") || Wl.call(this), r ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex) : (me(this, "_weekdaysShortRegex") || (this._weekdaysShortRegex = Q1), this._weekdaysShortStrictRegex && r ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex);
- }
- function pb(r) {
- return this._weekdaysParseExact ? (me(this, "_weekdaysRegex") || Wl.call(this), r ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex) : (me(this, "_weekdaysMinRegex") || (this._weekdaysMinRegex = tb), this._weekdaysMinStrictRegex && r ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex);
- }
- function Wl() {
- function r(G, R) {
- return R.length - G.length;
- }
- var p = [], M = [], o = [], y = [], N, D, U, H, V;
- for (N = 0; N < 7; N++)
- D = Zi([2e3, 1]).day(N), U = ur(this.weekdaysMin(D, "")), H = ur(this.weekdaysShort(D, "")), V = ur(this.weekdays(D, "")), p.push(U), M.push(H), o.push(V), y.push(U), y.push(H), y.push(V);
- p.sort(r), M.sort(r), o.sort(r), y.sort(r), this._weekdaysRegex = new RegExp("^(" + y.join("|") + ")", "i"), this._weekdaysShortRegex = this._weekdaysRegex, this._weekdaysMinRegex = this._weekdaysRegex, this._weekdaysStrictRegex = new RegExp(
- "^(" + o.join("|") + ")",
- "i"
- ), this._weekdaysShortStrictRegex = new RegExp(
- "^(" + M.join("|") + ")",
- "i"
- ), this._weekdaysMinStrictRegex = new RegExp(
- "^(" + p.join("|") + ")",
- "i"
- );
- }
- function Yl() {
- return this.hours() % 12 || 12;
- }
- function ub() {
- return this.hours() || 24;
- }
- Zt("H", ["HH", 2], 0, "hour");
- Zt("h", ["hh", 2], 0, Yl);
- Zt("k", ["kk", 2], 0, ub);
- Zt("hmm", 0, 0, function() {
- return "" + Yl.apply(this) + $i(this.minutes(), 2);
- });
- Zt("hmmss", 0, 0, function() {
- return "" + Yl.apply(this) + $i(this.minutes(), 2) + $i(this.seconds(), 2);
- });
- Zt("Hmm", 0, 0, function() {
- return "" + this.hours() + $i(this.minutes(), 2);
- });
- Zt("Hmmss", 0, 0, function() {
- return "" + this.hours() + $i(this.minutes(), 2) + $i(this.seconds(), 2);
- });
- function ku(r, p) {
- Zt(r, 0, 0, function() {
- return this.localeData().meridiem(
- this.hours(),
- this.minutes(),
- p
- );
- });
- }
- ku("a", !0);
- ku("A", !1);
- function Au(r, p) {
- return p._meridiemParse;
- }
- Ft("a", Au);
- Ft("A", Au);
- Ft("H", Pe, Nl);
- Ft("h", Pe, kn);
- Ft("k", Pe, kn);
- Ft("HH", Pe, yi);
- Ft("hh", Pe, yi);
- Ft("kk", Pe, yi);
- Ft("hmm", fu);
- Ft("hmmss", gu);
- Ft("Hmm", fu);
- Ft("Hmmss", gu);
- we(["H", "HH"], Ge);
- we(["k", "kk"], function(r, p, M) {
- var o = pe(r);
- p[Ge] = o === 24 ? 0 : o;
- });
- we(["a", "A"], function(r, p, M) {
- M._isPm = M._locale.isPM(r), M._meridiem = r;
- });
- we(["h", "hh"], function(r, p, M) {
- p[Ge] = pe(r), oe(M).bigHour = !0;
- });
- we("hmm", function(r, p, M) {
- var o = r.length - 2;
- p[Ge] = pe(r.substr(0, o)), p[Ni] = pe(r.substr(o)), oe(M).bigHour = !0;
- });
- we("hmmss", function(r, p, M) {
- var o = r.length - 4, y = r.length - 2;
- p[Ge] = pe(r.substr(0, o)), p[Ni] = pe(r.substr(o, 2)), p[pr] = pe(r.substr(y)), oe(M).bigHour = !0;
- });
- we("Hmm", function(r, p, M) {
- var o = r.length - 2;
- p[Ge] = pe(r.substr(0, o)), p[Ni] = pe(r.substr(o));
- });
- we("Hmmss", function(r, p, M) {
- var o = r.length - 4, y = r.length - 2;
- p[Ge] = pe(r.substr(0, o)), p[Ni] = pe(r.substr(o, 2)), p[pr] = pe(r.substr(y));
- });
- function db(r) {
- return (r + "").toLowerCase().charAt(0) === "p";
- }
- var fb = /[ap]\.?m?\.?/i, gb = An("Hours", !0);
- function mb(r, p, M) {
- return r > 11 ? M ? "pm" : "PM" : M ? "am" : "AM";
- }
- var Tu = {
- calendar: n1,
- longDateFormat: l1,
- invalidDate: c1,
- ordinal: u1,
- dayOfMonthOrdinalParse: d1,
- relativeTime: g1,
- months: L1,
- monthsShort: vu,
- week: G1,
- weekdays: K1,
- weekdaysMin: J1,
- weekdaysShort: Mu,
- meridiemParse: fb
- }, Oe = {}, Zn = {}, ns;
- function yb(r, p) {
- var M, o = Math.min(r.length, p.length);
- for (M = 0; M < o; M += 1)
- if (r[M] !== p[M])
- return M;
- return o;
- }
- function Rp(r) {
- return r && r.toLowerCase().replace("_", "-");
- }
- function vb(r) {
- for (var p = 0, M, o, y, N; p < r.length; ) {
- for (N = Rp(r[p]).split("-"), M = N.length, o = Rp(r[p + 1]), o = o ? o.split("-") : null; M > 0; ) {
- if (y = Io(N.slice(0, M).join("-")), y)
- return y;
- if (o && o.length >= M && yb(N, o) >= M - 1)
- break;
- M--;
- }
- p++;
- }
- return ns;
- }
- function xb(r) {
- return !!(r && r.match("^[^/\\\\]*$"));
- }
- function Io(r) {
- var p = null, M;
- if (Oe[r] === void 0 && typeof module < "u" && module && module.exports && xb(r))
- try {
- p = ns._abbr, M = require, M("./locale/" + r), Er(p);
- } catch {
- Oe[r] = null;
- }
- return Oe[r];
- }
- function Er(r, p) {
- var M;
- return r && (li(p) ? M = mr(r) : M = zl(r, p), M ? ns = M : typeof console < "u" && console.warn && console.warn(
- "Locale " + r + " not found. Did you forget to load it?"
- )), ns._abbr;
- }
- function zl(r, p) {
- if (p !== null) {
- var M, o = Tu;
- if (p.abbr = r, Oe[r] != null)
- cu(
- "defineLocaleOverride",
- "use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."
- ), o = Oe[r]._config;
- else if (p.parentLocale != null)
- if (Oe[p.parentLocale] != null)
- o = Oe[p.parentLocale]._config;
- else if (M = Io(p.parentLocale), M != null)
- o = M._config;
- else
- return Zn[p.parentLocale] || (Zn[p.parentLocale] = []), Zn[p.parentLocale].push({
- name: r,
- config: p
- }), null;
- return Oe[r] = new Ll(ml(o, p)), Zn[r] && Zn[r].forEach(function(y) {
- zl(y.name, y.config);
- }), Er(r), Oe[r];
- } else
- return delete Oe[r], null;
- }
- function bb(r, p) {
- if (p != null) {
- var M, o, y = Tu;
- Oe[r] != null && Oe[r].parentLocale != null ? Oe[r].set(ml(Oe[r]._config, p)) : (o = Io(r), o != null && (y = o._config), p = ml(y, p), o == null && (p.abbr = r), M = new Ll(p), M.parentLocale = Oe[r], Oe[r] = M), Er(r);
- } else
- Oe[r] != null && (Oe[r].parentLocale != null ? (Oe[r] = Oe[r].parentLocale, r === Er() && Er(r)) : Oe[r] != null && delete Oe[r]);
- return Oe[r];
- }
- function mr(r) {
- var p;
- if (r && r._locale && r._locale._abbr && (r = r._locale._abbr), !r)
- return ns;
- if (!ji(r)) {
- if (p = Io(r), p)
- return p;
- r = [r];
- }
- return vb(r);
- }
- function Sb() {
- return yl(Oe);
- }
- function Xl(r) {
- var p, M = r._a;
- return M && oe(r).overflow === -2 && (p = M[cr] < 0 || M[cr] > 11 ? cr : M[Vi] < 1 || M[Vi] > Bl(M[ti], M[cr]) ? Vi : M[Ge] < 0 || M[Ge] > 24 || M[Ge] === 24 && (M[Ni] !== 0 || M[pr] !== 0 || M[Hr] !== 0) ? Ge : M[Ni] < 0 || M[Ni] > 59 ? Ni : M[pr] < 0 || M[pr] > 59 ? pr : M[Hr] < 0 || M[Hr] > 999 ? Hr : -1, oe(r)._overflowDayOfYear && (p < ti || p > Vi) && (p = Vi), oe(r)._overflowWeeks && p === -1 && (p = k1), oe(r)._overflowWeekday && p === -1 && (p = A1), oe(r).overflow = p), r;
- }
- var wb = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, Cb = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, Mb = /Z|[+-]\d\d(?::?\d\d)?/, no = [
- ["YYYYYY-MM-DD", /[+-]\d{6}-\d\d-\d\d/],
- ["YYYY-MM-DD", /\d{4}-\d\d-\d\d/],
- ["GGGG-[W]WW-E", /\d{4}-W\d\d-\d/],
- ["GGGG-[W]WW", /\d{4}-W\d\d/, !1],
- ["YYYY-DDD", /\d{4}-\d{3}/],
- ["YYYY-MM", /\d{4}-\d\d/, !1],
- ["YYYYYYMMDD", /[+-]\d{10}/],
- ["YYYYMMDD", /\d{8}/],
- ["GGGG[W]WWE", /\d{4}W\d{3}/],
- ["GGGG[W]WW", /\d{4}W\d{2}/, !1],
- ["YYYYDDD", /\d{7}/],
- ["YYYYMM", /\d{6}/, !1],
- ["YYYY", /\d{4}/, !1]
- ], ol = [
- ["HH:mm:ss.SSSS", /\d\d:\d\d:\d\d\.\d+/],
- ["HH:mm:ss,SSSS", /\d\d:\d\d:\d\d,\d+/],
- ["HH:mm:ss", /\d\d:\d\d:\d\d/],
- ["HH:mm", /\d\d:\d\d/],
- ["HHmmss.SSSS", /\d\d\d\d\d\d\.\d+/],
- ["HHmmss,SSSS", /\d\d\d\d\d\d,\d+/],
- ["HHmmss", /\d\d\d\d\d\d/],
- ["HHmm", /\d\d\d\d/],
- ["HH", /\d\d/]
- ], kb = /^\/?Date\((-?\d+)/i, Ab = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/, Tb = {
- UT: 0,
- GMT: 0,
- EDT: -4 * 60,
- EST: -5 * 60,
- CDT: -5 * 60,
- CST: -6 * 60,
- MDT: -6 * 60,
- MST: -7 * 60,
- PDT: -7 * 60,
- PST: -8 * 60
- };
- function Pu(r) {
- var p, M, o = r._i, y = wb.exec(o) || Cb.exec(o), N, D, U, H, V = no.length, G = ol.length;
- if (y) {
- for (oe(r).iso = !0, p = 0, M = V; p < M; p++)
- if (no[p][1].exec(y[1])) {
- D = no[p][0], N = no[p][2] !== !1;
- break;
- }
- if (D == null) {
- r._isValid = !1;
- return;
- }
- if (y[3]) {
- for (p = 0, M = G; p < M; p++)
- if (ol[p][1].exec(y[3])) {
- U = (y[2] || " ") + ol[p][0];
- break;
- }
- if (U == null) {
- r._isValid = !1;
- return;
- }
- }
- if (!N && U != null) {
- r._isValid = !1;
- return;
- }
- if (y[4])
- if (Mb.exec(y[4]))
- H = "Z";
- else {
- r._isValid = !1;
- return;
- }
- r._f = D + (U || "") + (H || ""), Hl(r);
- } else
- r._isValid = !1;
- }
- function Pb(r, p, M, o, y, N) {
- var D = [
- Eb(r),
- vu.indexOf(p),
- parseInt(M, 10),
- parseInt(o, 10),
- parseInt(y, 10)
- ];
- return N && D.push(parseInt(N, 10)), D;
- }
- function Eb(r) {
- var p = parseInt(r, 10);
- return p <= 49 ? 2e3 + p : p <= 999 ? 1900 + p : p;
- }
- function Ob(r) {
- return r.replace(/\([^()]*\)|[\n\t]/g, " ").replace(/(\s\s+)/g, " ").replace(/^\s\s*/, "").replace(/\s\s*$/, "");
- }
- function Lb(r, p, M) {
- if (r) {
- var o = Mu.indexOf(r), y = new Date(
- p[0],
- p[1],
- p[2]
- ).getDay();
- if (o !== y)
- return oe(M).weekdayMismatch = !0, M._isValid = !1, !1;
- }
- return !0;
- }
- function _b(r, p, M) {
- if (r)
- return Tb[r];
- if (p)
- return 0;
- var o = parseInt(M, 10), y = o % 100, N = (o - y) / 100;
- return N * 60 + y;
- }
- function Eu(r) {
- var p = Ab.exec(Ob(r._i)), M;
- if (p) {
- if (M = Pb(
- p[4],
- p[3],
- p[2],
- p[5],
- p[6],
- p[7]
- ), !Lb(p[1], M, r))
- return;
- r._a = M, r._tzm = _b(p[8], p[9], p[10]), r._d = is.apply(null, r._a), r._d.setUTCMinutes(r._d.getUTCMinutes() - r._tzm), oe(r).rfc2822 = !0;
- } else
- r._isValid = !1;
- }
- function Db(r) {
- var p = kb.exec(r._i);
- if (p !== null) {
- r._d = /* @__PURE__ */ new Date(+p[1]);
- return;
- }
- if (Pu(r), r._isValid === !1)
- delete r._isValid;
- else
- return;
- if (Eu(r), r._isValid === !1)
- delete r._isValid;
- else
- return;
- r._strict ? r._isValid = !1 : Xt.createFromInputFallback(r);
- }
- Xt.createFromInputFallback = Ei(
- "value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",
- function(r) {
- r._d = /* @__PURE__ */ new Date(r._i + (r._useUTC ? " UTC" : ""));
- }
- );
- function gn(r, p, M) {
- return r ?? p ?? M;
- }
- function Ib(r) {
- var p = new Date(Xt.now());
- return r._useUTC ? [
- p.getUTCFullYear(),
- p.getUTCMonth(),
- p.getUTCDate()
- ] : [p.getFullYear(), p.getMonth(), p.getDate()];
- }
- function Gl(r) {
- var p, M, o = [], y, N, D;
- if (!r._d) {
- for (y = Ib(r), r._w && r._a[Vi] == null && r._a[cr] == null && Rb(r), r._dayOfYear != null && (D = gn(r._a[ti], y[ti]), (r._dayOfYear > Qn(D) || r._dayOfYear === 0) && (oe(r)._overflowDayOfYear = !0), M = is(D, 0, r._dayOfYear), r._a[cr] = M.getUTCMonth(), r._a[Vi] = M.getUTCDate()), p = 0; p < 3 && r._a[p] == null; ++p)
- r._a[p] = o[p] = y[p];
- for (; p < 7; p++)
- r._a[p] = o[p] = r._a[p] == null ? p === 2 ? 1 : 0 : r._a[p];
- r._a[Ge] === 24 && r._a[Ni] === 0 && r._a[pr] === 0 && r._a[Hr] === 0 && (r._nextDay = !0, r._a[Ge] = 0), r._d = (r._useUTC ? is : z1).apply(
- null,
- o
- ), N = r._useUTC ? r._d.getUTCDay() : r._d.getDay(), r._tzm != null && r._d.setUTCMinutes(r._d.getUTCMinutes() - r._tzm), r._nextDay && (r._a[Ge] = 24), r._w && typeof r._w.d < "u" && r._w.d !== N && (oe(r).weekdayMismatch = !0);
- }
- }
- function Rb(r) {
- var p, M, o, y, N, D, U, H, V;
- p = r._w, p.GG != null || p.W != null || p.E != null ? (N = 1, D = 4, M = gn(
- p.GG,
- r._a[ti],
- rs(Te(), 1, 4).year
- ), o = gn(p.W, 1), y = gn(p.E, 1), (y < 1 || y > 7) && (H = !0)) : (N = r._locale._week.dow, D = r._locale._week.doy, V = rs(Te(), N, D), M = gn(p.gg, r._a[ti], V.year), o = gn(p.w, V.week), p.d != null ? (y = p.d, (y < 0 || y > 6) && (H = !0)) : p.e != null ? (y = p.e + N, (p.e < 0 || p.e > 6) && (H = !0)) : y = N), o < 1 || o > dr(M, N, D) ? oe(r)._overflowWeeks = !0 : H != null ? oe(r)._overflowWeekday = !0 : (U = Cu(M, o, y, N, D), r._a[ti] = U.year, r._dayOfYear = U.dayOfYear);
- }
- Xt.ISO_8601 = function() {
- };
- Xt.RFC_2822 = function() {
- };
- function Hl(r) {
- if (r._f === Xt.ISO_8601) {
- Pu(r);
- return;
- }
- if (r._f === Xt.RFC_2822) {
- Eu(r);
- return;
- }
- r._a = [], oe(r).empty = !0;
- var p = "" + r._i, M, o, y, N, D, U = p.length, H = 0, V, G;
- for (y = pu(r._f, r._locale).match(_l) || [], G = y.length, M = 0; M < G; M++)
- N = y[M], o = (p.match(w1(N, r)) || [])[0], o && (D = p.substr(0, p.indexOf(o)), D.length > 0 && oe(r).unusedInput.push(D), p = p.slice(
- p.indexOf(o) + o.length
- ), H += o.length), vn[N] ? (o ? oe(r).empty = !1 : oe(r).unusedTokens.push(N), M1(N, o, r)) : r._strict && !o && oe(r).unusedTokens.push(N);
- oe(r).charsLeftOver = U - H, p.length > 0 && oe(r).unusedInput.push(p), r._a[Ge] <= 12 && oe(r).bigHour === !0 && r._a[Ge] > 0 && (oe(r).bigHour = void 0), oe(r).parsedDateParts = r._a.slice(0), oe(r).meridiem = r._meridiem, r._a[Ge] = Nb(
- r._locale,
- r._a[Ge],
- r._meridiem
- ), V = oe(r).era, V !== null && (r._a[ti] = r._locale.erasConvertYear(V, r._a[ti])), Gl(r), Xl(r);
- }
- function Nb(r, p, M) {
- var o;
- return M == null ? p : r.meridiemHour != null ? r.meridiemHour(p, M) : (r.isPM != null && (o = r.isPM(M), o && p < 12 && (p += 12), !o && p === 12 && (p = 0)), p);
- }
- function Bb(r) {
- var p, M, o, y, N, D, U = !1, H = r._f.length;
- if (H === 0) {
- oe(r).invalidFormat = !0, r._d = /* @__PURE__ */ new Date(NaN);
- return;
- }
- for (y = 0; y < H; y++)
- N = 0, D = !1, p = Ol({}, r), r._useUTC != null && (p._useUTC = r._useUTC), p._f = r._f[y], Hl(p), El(p) && (D = !0), N += oe(p).charsLeftOver, N += oe(p).unusedTokens.length * 10, oe(p).score = N, U ? N < o && (o = N, M = p) : (o == null || N < o || D) && (o = N, M = p, D && (U = !0));
- Tr(r, M || p);
- }
- function jb(r) {
- if (!r._d) {
- var p = Dl(r._i), M = p.day === void 0 ? p.date : p.day;
- r._a = lu(
- [p.year, p.month, M, p.hour, p.minute, p.second, p.millisecond],
- function(o) {
- return o && parseInt(o, 10);
- }
- ), Gl(r);
- }
- }
- function Wb(r) {
- var p = new ls(Xl(Ou(r)));
- return p._nextDay && (p.add(1, "d"), p._nextDay = void 0), p;
- }
- function Ou(r) {
- var p = r._i, M = r._f;
- return r._locale = r._locale || mr(r._l), p === null || M === void 0 && p === "" ? To({ nullInput: !0 }) : (typeof p == "string" && (r._i = p = r._locale.preparse(p)), Wi(p) ? new ls(Xl(p)) : (as(p) ? r._d = p : ji(M) ? Bb(r) : M ? Hl(r) : Yb(r), El(r) || (r._d = null), r));
- }
- function Yb(r) {
- var p = r._i;
- li(p) ? r._d = new Date(Xt.now()) : as(p) ? r._d = new Date(p.valueOf()) : typeof p == "string" ? Db(r) : ji(p) ? (r._a = lu(p.slice(0), function(M) {
- return parseInt(M, 10);
- }), Gl(r)) : $r(p) ? jb(r) : fr(p) ? r._d = new Date(p) : Xt.createFromInputFallback(r);
- }
- function Lu(r, p, M, o, y) {
- var N = {};
- return (p === !0 || p === !1) && (o = p, p = void 0), (M === !0 || M === !1) && (o = M, M = void 0), ($r(r) && Pl(r) || ji(r) && r.length === 0) && (r = void 0), N._isAMomentObject = !0, N._useUTC = N._isUTC = y, N._l = M, N._i = r, N._f = p, N._strict = o, Wb(N);
- }
- function Te(r, p, M, o) {
- return Lu(r, p, M, o, !1);
- }
- var zb = Ei(
- "moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",
- function() {
- var r = Te.apply(null, arguments);
- return this.isValid() && r.isValid() ? r < this ? this : r : To();
- }
- ), Xb = Ei(
- "moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",
- function() {
- var r = Te.apply(null, arguments);
- return this.isValid() && r.isValid() ? r > this ? this : r : To();
- }
- );
- function _u(r, p) {
- var M, o;
- if (p.length === 1 && ji(p[0]) && (p = p[0]), !p.length)
- return Te();
- for (M = p[0], o = 1; o < p.length; ++o)
- (!p[o].isValid() || p[o][r](M)) && (M = p[o]);
- return M;
- }
- function Gb() {
- var r = [].slice.call(arguments, 0);
- return _u("isBefore", r);
- }
- function Hb() {
- var r = [].slice.call(arguments, 0);
- return _u("isAfter", r);
- }
- var Fb = function() {
- return Date.now ? Date.now() : +/* @__PURE__ */ new Date();
- }, Kn = [
- "year",
- "quarter",
- "month",
- "week",
- "day",
- "hour",
- "minute",
- "second",
- "millisecond"
- ];
- function Ub(r) {
- var p, M = !1, o, y = Kn.length;
- for (p in r)
- if (me(r, p) && !(We.call(Kn, p) !== -1 && (r[p] == null || !isNaN(r[p]))))
- return !1;
- for (o = 0; o < y; ++o)
- if (r[Kn[o]]) {
- if (M)
- return !1;
- parseFloat(r[Kn[o]]) !== pe(r[Kn[o]]) && (M = !0);
- }
- return !0;
- }
- function Vb() {
- return this._isValid;
- }
- function $b() {
- return Yi(NaN);
- }
- function Ro(r) {
- var p = Dl(r), M = p.year || 0, o = p.quarter || 0, y = p.month || 0, N = p.week || p.isoWeek || 0, D = p.day || 0, U = p.hour || 0, H = p.minute || 0, V = p.second || 0, G = p.millisecond || 0;
- this._isValid = Ub(p), this._milliseconds = +G + V * 1e3 + // 1000
- H * 6e4 + // 1000 * 60
- U * 1e3 * 60 * 60, this._days = +D + N * 7, this._months = +y + o * 3 + M * 12, this._data = {}, this._locale = mr(), this._bubble();
- }
- function ao(r) {
- return r instanceof Ro;
- }
- function xl(r) {
- return r < 0 ? Math.round(-1 * r) * -1 : Math.round(r);
- }
- function Zb(r, p, M) {
- var o = Math.min(r.length, p.length), y = Math.abs(r.length - p.length), N = 0, D;
- for (D = 0; D < o; D++)
- (M && r[D] !== p[D] || !M && pe(r[D]) !== pe(p[D])) && N++;
- return N + y;
- }
- function Du(r, p) {
- Zt(r, 0, 0, function() {
- var M = this.utcOffset(), o = "+";
- return M < 0 && (M = -M, o = "-"), o + $i(~~(M / 60), 2) + p + $i(~~M % 60, 2);
- });
- }
- Du("Z", ":");
- Du("ZZ", "");
- Ft("Z", _o);
- Ft("ZZ", _o);
- we(["Z", "ZZ"], function(r, p, M) {
- M._useUTC = !0, M._tzm = Fl(_o, r);
- });
- var Kb = /([\+\-]|\d\d)/gi;
- function Fl(r, p) {
- var M = (p || "").match(r), o, y, N;
- return M === null ? null : (o = M[M.length - 1] || [], y = (o + "").match(Kb) || ["-", 0, 0], N = +(y[1] * 60) + pe(y[2]), N === 0 ? 0 : y[0] === "+" ? N : -N);
- }
- function Ul(r, p) {
- var M, o;
- return p._isUTC ? (M = p.clone(), o = (Wi(r) || as(r) ? r.valueOf() : Te(r).valueOf()) - M.valueOf(), M._d.setTime(M._d.valueOf() + o), Xt.updateOffset(M, !1), M) : Te(r).local();
- }
- function bl(r) {
- return -Math.round(r._d.getTimezoneOffset());
- }
- Xt.updateOffset = function() {
- };
- function Jb(r, p, M) {
- var o = this._offset || 0, y;
- if (!this.isValid())
- return r != null ? this : NaN;
- if (r != null) {
- if (typeof r == "string") {
- if (r = Fl(_o, r), r === null)
- return this;
- } else
- Math.abs(r) < 16 && !M && (r = r * 60);
- return !this._isUTC && p && (y = bl(this)), this._offset = r, this._isUTC = !0, y != null && this.add(y, "m"), o !== r && (!p || this._changeInProgress ? Nu(
- this,
- Yi(r - o, "m"),
- 1,
- !1
- ) : this._changeInProgress || (this._changeInProgress = !0, Xt.updateOffset(this, !0), this._changeInProgress = null)), this;
- } else
- return this._isUTC ? o : bl(this);
- }
- function qb(r, p) {
- return r != null ? (typeof r != "string" && (r = -r), this.utcOffset(r, p), this) : -this.utcOffset();
- }
- function Qb(r) {
- return this.utcOffset(0, r);
- }
- function tS(r) {
- return this._isUTC && (this.utcOffset(0, r), this._isUTC = !1, r && this.subtract(bl(this), "m")), this;
- }
- function eS() {
- if (this._tzm != null)
- this.utcOffset(this._tzm, !1, !0);
- else if (typeof this._i == "string") {
- var r = Fl(b1, this._i);
- r != null ? this.utcOffset(r) : this.utcOffset(0, !0);
- }
- return this;
- }
- function iS(r) {
- return this.isValid() ? (r = r ? Te(r).utcOffset() : 0, (this.utcOffset() - r) % 60 === 0) : !1;
- }
- function rS() {
- return this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset();
- }
- function nS() {
- if (!li(this._isDSTShifted))
- return this._isDSTShifted;
- var r = {}, p;
- return Ol(r, this), r = Ou(r), r._a ? (p = r._isUTC ? Zi(r._a) : Te(r._a), this._isDSTShifted = this.isValid() && Zb(r._a, p.toArray()) > 0) : this._isDSTShifted = !1, this._isDSTShifted;
- }
- function sS() {
- return this.isValid() ? !this._isUTC : !1;
- }
- function oS() {
- return this.isValid() ? this._isUTC : !1;
- }
- function Iu() {
- return this.isValid() ? this._isUTC && this._offset === 0 : !1;
- }
- var aS = /^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/, lS = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;
- function Yi(r, p) {
- var M = r, o = null, y, N, D;
- return ao(r) ? M = {
- ms: r._milliseconds,
- d: r._days,
- M: r._months
- } : fr(r) || !isNaN(+r) ? (M = {}, p ? M[p] = +r : M.milliseconds = +r) : (o = aS.exec(r)) ? (y = o[1] === "-" ? -1 : 1, M = {
- y: 0,
- d: pe(o[Vi]) * y,
- h: pe(o[Ge]) * y,
- m: pe(o[Ni]) * y,
- s: pe(o[pr]) * y,
- ms: pe(xl(o[Hr] * 1e3)) * y
- // the millisecond decimal point is included in the match
- }) : (o = lS.exec(r)) ? (y = o[1] === "-" ? -1 : 1, M = {
- y: Xr(o[2], y),
- M: Xr(o[3], y),
- w: Xr(o[4], y),
- d: Xr(o[5], y),
- h: Xr(o[6], y),
- m: Xr(o[7], y),
- s: Xr(o[8], y)
- }) : M == null ? M = {} : typeof M == "object" && ("from" in M || "to" in M) && (D = hS(
- Te(M.from),
- Te(M.to)
- ), M = {}, M.ms = D.milliseconds, M.M = D.months), N = new Ro(M), ao(r) && me(r, "_locale") && (N._locale = r._locale), ao(r) && me(r, "_isValid") && (N._isValid = r._isValid), N;
- }
- Yi.fn = Ro.prototype;
- Yi.invalid = $b;
- function Xr(r, p) {
- var M = r && parseFloat(r.replace(",", "."));
- return (isNaN(M) ? 0 : M) * p;
- }
- function Np(r, p) {
- var M = {};
- return M.months = p.month() - r.month() + (p.year() - r.year()) * 12, r.clone().add(M.months, "M").isAfter(p) && --M.months, M.milliseconds = +p - +r.clone().add(M.months, "M"), M;
- }
- function hS(r, p) {
- var M;
- return r.isValid() && p.isValid() ? (p = Ul(p, r), r.isBefore(p) ? M = Np(r, p) : (M = Np(p, r), M.milliseconds = -M.milliseconds, M.months = -M.months), M) : { milliseconds: 0, months: 0 };
- }
- function Ru(r, p) {
- return function(M, o) {
- var y, N;
- return o !== null && !isNaN(+o) && (cu(
- p,
- "moment()." + p + "(period, number) is deprecated. Please use moment()." + p + "(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."
- ), N = M, M = o, o = N), y = Yi(M, o), Nu(this, y, r), this;
- };
- }
- function Nu(r, p, M, o) {
- var y = p._milliseconds, N = xl(p._days), D = xl(p._months);
- r.isValid() && (o = o ?? !0, D && bu(r, es(r, "Month") + D * M), N && yu(r, "Date", es(r, "Date") + N * M), y && r._d.setTime(r._d.valueOf() + y * M), o && Xt.updateOffset(r, N || D));
- }
- var cS = Ru(1, "add"), pS = Ru(-1, "subtract");
- function Bu(r) {
- return typeof r == "string" || r instanceof String;
- }
- function uS(r) {
- return Wi(r) || as(r) || Bu(r) || fr(r) || fS(r) || dS(r) || r === null || r === void 0;
- }
- function dS(r) {
- var p = $r(r) && !Pl(r), M = !1, o = [
- "years",
- "year",
- "y",
- "months",
- "month",
- "M",
- "days",
- "day",
- "d",
- "dates",
- "date",
- "D",
- "hours",
- "hour",
- "h",
- "minutes",
- "minute",
- "m",
- "seconds",
- "second",
- "s",
- "milliseconds",
- "millisecond",
- "ms"
- ], y, N, D = o.length;
- for (y = 0; y < D; y += 1)
- N = o[y], M = M || me(r, N);
- return p && M;
- }
- function fS(r) {
- var p = ji(r), M = !1;
- return p && (M = r.filter(function(o) {
- return !fr(o) && Bu(r);
- }).length === 0), p && M;
- }
- function gS(r) {
- var p = $r(r) && !Pl(r), M = !1, o = [
- "sameDay",
- "nextDay",
- "lastDay",
- "nextWeek",
- "lastWeek",
- "sameElse"
- ], y, N;
- for (y = 0; y < o.length; y += 1)
- N = o[y], M = M || me(r, N);
- return p && M;
- }
- function mS(r, p) {
- var M = r.diff(p, "days", !0);
- return M < -6 ? "sameElse" : M < -1 ? "lastWeek" : M < 0 ? "lastDay" : M < 1 ? "sameDay" : M < 2 ? "nextDay" : M < 7 ? "nextWeek" : "sameElse";
- }
- function yS(r, p) {
- arguments.length === 1 && (arguments[0] ? uS(arguments[0]) ? (r = arguments[0], p = void 0) : gS(arguments[0]) && (p = arguments[0], r = void 0) : (r = void 0, p = void 0));
- var M = r || Te(), o = Ul(M, this).startOf("day"), y = Xt.calendarFormat(this, o) || "sameElse", N = p && (Ki(p[y]) ? p[y].call(this, M) : p[y]);
- return this.format(
- N || this.localeData().calendar(y, this, Te(M))
- );
- }
- function vS() {
- return new ls(this);
- }
- function xS(r, p) {
- var M = Wi(r) ? r : Te(r);
- return this.isValid() && M.isValid() ? (p = Oi(p) || "millisecond", p === "millisecond" ? this.valueOf() > M.valueOf() : M.valueOf() < this.clone().startOf(p).valueOf()) : !1;
- }
- function bS(r, p) {
- var M = Wi(r) ? r : Te(r);
- return this.isValid() && M.isValid() ? (p = Oi(p) || "millisecond", p === "millisecond" ? this.valueOf() < M.valueOf() : this.clone().endOf(p).valueOf() < M.valueOf()) : !1;
- }
- function SS(r, p, M, o) {
- var y = Wi(r) ? r : Te(r), N = Wi(p) ? p : Te(p);
- return this.isValid() && y.isValid() && N.isValid() ? (o = o || "()", (o[0] === "(" ? this.isAfter(y, M) : !this.isBefore(y, M)) && (o[1] === ")" ? this.isBefore(N, M) : !this.isAfter(N, M))) : !1;
- }
- function wS(r, p) {
- var M = Wi(r) ? r : Te(r), o;
- return this.isValid() && M.isValid() ? (p = Oi(p) || "millisecond", p === "millisecond" ? this.valueOf() === M.valueOf() : (o = M.valueOf(), this.clone().startOf(p).valueOf() <= o && o <= this.clone().endOf(p).valueOf())) : !1;
- }
- function CS(r, p) {
- return this.isSame(r, p) || this.isAfter(r, p);
- }
- function MS(r, p) {
- return this.isSame(r, p) || this.isBefore(r, p);
- }
- function kS(r, p, M) {
- var o, y, N;
- if (!this.isValid())
- return NaN;
- if (o = Ul(r, this), !o.isValid())
- return NaN;
- switch (y = (o.utcOffset() - this.utcOffset()) * 6e4, p = Oi(p), p) {
- case "year":
- N = lo(this, o) / 12;
- break;
- case "month":
- N = lo(this, o);
- break;
- case "quarter":
- N = lo(this, o) / 3;
- break;
- case "second":
- N = (this - o) / 1e3;
- break;
- case "minute":
- N = (this - o) / 6e4;
- break;
- case "hour":
- N = (this - o) / 36e5;
- break;
- case "day":
- N = (this - o - y) / 864e5;
- break;
- case "week":
- N = (this - o - y) / 6048e5;
- break;
- default:
- N = this - o;
- }
- return M ? N : Ai(N);
- }
- function lo(r, p) {
- if (r.date() < p.date())
- return -lo(p, r);
- var M = (p.year() - r.year()) * 12 + (p.month() - r.month()), o = r.clone().add(M, "months"), y, N;
- return p - o < 0 ? (y = r.clone().add(M - 1, "months"), N = (p - o) / (o - y)) : (y = r.clone().add(M + 1, "months"), N = (p - o) / (y - o)), -(M + N) || 0;
- }
- Xt.defaultFormat = "YYYY-MM-DDTHH:mm:ssZ";
- Xt.defaultFormatUtc = "YYYY-MM-DDTHH:mm:ss[Z]";
- function AS() {
- return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ");
- }
- function TS(r) {
- if (!this.isValid())
- return null;
- var p = r !== !0, M = p ? this.clone().utc() : this;
- return M.year() < 0 || M.year() > 9999 ? oo(
- M,
- p ? "YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]" : "YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"
- ) : Ki(Date.prototype.toISOString) ? p ? this.toDate().toISOString() : new Date(this.valueOf() + this.utcOffset() * 60 * 1e3).toISOString().replace("Z", oo(M, "Z")) : oo(
- M,
- p ? "YYYY-MM-DD[T]HH:mm:ss.SSS[Z]" : "YYYY-MM-DD[T]HH:mm:ss.SSSZ"
- );
- }
- function PS() {
- if (!this.isValid())
- return "moment.invalid(/* " + this._i + " */)";
- var r = "moment", p = "", M, o, y, N;
- return this.isLocal() || (r = this.utcOffset() === 0 ? "moment.utc" : "moment.parseZone", p = "Z"), M = "[" + r + '("]', o = 0 <= this.year() && this.year() <= 9999 ? "YYYY" : "YYYYYY", y = "-MM-DD[T]HH:mm:ss.SSS", N = p + '[")]', this.format(M + o + y + N);
- }
- function ES(r) {
- r || (r = this.isUtc() ? Xt.defaultFormatUtc : Xt.defaultFormat);
- var p = oo(this, r);
- return this.localeData().postformat(p);
- }
- function OS(r, p) {
- return this.isValid() && (Wi(r) && r.isValid() || Te(r).isValid()) ? Yi({ to: this, from: r }).locale(this.locale()).humanize(!p) : this.localeData().invalidDate();
- }
- function LS(r) {
- return this.from(Te(), r);
- }
- function _S(r, p) {
- return this.isValid() && (Wi(r) && r.isValid() || Te(r).isValid()) ? Yi({ from: this, to: r }).locale(this.locale()).humanize(!p) : this.localeData().invalidDate();
- }
- function DS(r) {
- return this.to(Te(), r);
- }
- function ju(r) {
- var p;
- return r === void 0 ? this._locale._abbr : (p = mr(r), p != null && (this._locale = p), this);
- }
- var Wu = Ei(
- "moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",
- function(r) {
- return r === void 0 ? this.localeData() : this.locale(r);
- }
- );
- function Yu() {
- return this._locale;
- }
- var xo = 1e3, xn = 60 * xo, bo = 60 * xn, zu = (365 * 400 + 97) * 24 * bo;
- function bn(r, p) {
- return (r % p + p) % p;
- }
- function Xu(r, p, M) {
- return r < 100 && r >= 0 ? new Date(r + 400, p, M) - zu : new Date(r, p, M).valueOf();
- }
- function Gu(r, p, M) {
- return r < 100 && r >= 0 ? Date.UTC(r + 400, p, M) - zu : Date.UTC(r, p, M);
- }
- function IS(r) {
- var p, M;
- if (r = Oi(r), r === void 0 || r === "millisecond" || !this.isValid())
- return this;
- switch (M = this._isUTC ? Gu : Xu, r) {
- case "year":
- p = M(this.year(), 0, 1);
- break;
- case "quarter":
- p = M(
- this.year(),
- this.month() - this.month() % 3,
- 1
- );
- break;
- case "month":
- p = M(this.year(), this.month(), 1);
- break;
- case "week":
- p = M(
- this.year(),
- this.month(),
- this.date() - this.weekday()
- );
- break;
- case "isoWeek":
- p = M(
- this.year(),
- this.month(),
- this.date() - (this.isoWeekday() - 1)
- );
- break;
- case "day":
- case "date":
- p = M(this.year(), this.month(), this.date());
- break;
- case "hour":
- p = this._d.valueOf(), p -= bn(
- p + (this._isUTC ? 0 : this.utcOffset() * xn),
- bo
- );
- break;
- case "minute":
- p = this._d.valueOf(), p -= bn(p, xn);
- break;
- case "second":
- p = this._d.valueOf(), p -= bn(p, xo);
- break;
- }
- return this._d.setTime(p), Xt.updateOffset(this, !0), this;
- }
- function RS(r) {
- var p, M;
- if (r = Oi(r), r === void 0 || r === "millisecond" || !this.isValid())
- return this;
- switch (M = this._isUTC ? Gu : Xu, r) {
- case "year":
- p = M(this.year() + 1, 0, 1) - 1;
- break;
- case "quarter":
- p = M(
- this.year(),
- this.month() - this.month() % 3 + 3,
- 1
- ) - 1;
- break;
- case "month":
- p = M(this.year(), this.month() + 1, 1) - 1;
- break;
- case "week":
- p = M(
- this.year(),
- this.month(),
- this.date() - this.weekday() + 7
- ) - 1;
- break;
- case "isoWeek":
- p = M(
- this.year(),
- this.month(),
- this.date() - (this.isoWeekday() - 1) + 7
- ) - 1;
- break;
- case "day":
- case "date":
- p = M(this.year(), this.month(), this.date() + 1) - 1;
- break;
- case "hour":
- p = this._d.valueOf(), p += bo - bn(
- p + (this._isUTC ? 0 : this.utcOffset() * xn),
- bo
- ) - 1;
- break;
- case "minute":
- p = this._d.valueOf(), p += xn - bn(p, xn) - 1;
- break;
- case "second":
- p = this._d.valueOf(), p += xo - bn(p, xo) - 1;
- break;
- }
- return this._d.setTime(p), Xt.updateOffset(this, !0), this;
- }
- function NS() {
- return this._d.valueOf() - (this._offset || 0) * 6e4;
- }
- function BS() {
- return Math.floor(this.valueOf() / 1e3);
- }
- function jS() {
- return new Date(this.valueOf());
- }
- function WS() {
- var r = this;
- return [
- r.year(),
- r.month(),
- r.date(),
- r.hour(),
- r.minute(),
- r.second(),
- r.millisecond()
- ];
- }
- function YS() {
- var r = this;
- return {
- years: r.year(),
- months: r.month(),
- date: r.date(),
- hours: r.hours(),
- minutes: r.minutes(),
- seconds: r.seconds(),
- milliseconds: r.milliseconds()
- };
- }
- function zS() {
- return this.isValid() ? this.toISOString() : null;
- }
- function XS() {
- return El(this);
- }
- function GS() {
- return Tr({}, oe(this));
- }
- function HS() {
- return oe(this).overflow;
- }
- function FS() {
- return {
- input: this._i,
- format: this._f,
- locale: this._locale,
- isUTC: this._isUTC,
- strict: this._strict
- };
- }
- Zt("N", 0, 0, "eraAbbr");
- Zt("NN", 0, 0, "eraAbbr");
- Zt("NNN", 0, 0, "eraAbbr");
- Zt("NNNN", 0, 0, "eraName");
- Zt("NNNNN", 0, 0, "eraNarrow");
- Zt("y", ["y", 1], "yo", "eraYear");
- Zt("y", ["yy", 2], 0, "eraYear");
- Zt("y", ["yyy", 3], 0, "eraYear");
- Zt("y", ["yyyy", 4], 0, "eraYear");
- Ft("N", Vl);
- Ft("NN", Vl);
- Ft("NNN", Vl);
- Ft("NNNN", iw);
- Ft("NNNNN", rw);
- we(
- ["N", "NN", "NNN", "NNNN", "NNNNN"],
- function(r, p, M, o) {
- var y = M._locale.erasParse(r, o, M._strict);
- y ? oe(M).era = y : oe(M).invalidEra = r;
- }
- );
- Ft("y", Mn);
- Ft("yy", Mn);
- Ft("yyy", Mn);
- Ft("yyyy", Mn);
- Ft("yo", nw);
- we(["y", "yy", "yyy", "yyyy"], ti);
- we(["yo"], function(r, p, M, o) {
- var y;
- M._locale._eraYearOrdinalRegex && (y = r.match(M._locale._eraYearOrdinalRegex)), M._locale.eraYearOrdinalParse ? p[ti] = M._locale.eraYearOrdinalParse(r, y) : p[ti] = parseInt(r, 10);
- });
- function US(r, p) {
- var M, o, y, N = this._eras || mr("en")._eras;
- for (M = 0, o = N.length; M < o; ++M) {
- switch (typeof N[M].since) {
- case "string":
- y = Xt(N[M].since).startOf("day"), N[M].since = y.valueOf();
- break;
- }
- switch (typeof N[M].until) {
- case "undefined":
- N[M].until = 1 / 0;
- break;
- case "string":
- y = Xt(N[M].until).startOf("day").valueOf(), N[M].until = y.valueOf();
- break;
- }
- }
- return N;
- }
- function VS(r, p, M) {
- var o, y, N = this.eras(), D, U, H;
- for (r = r.toUpperCase(), o = 0, y = N.length; o < y; ++o)
- if (D = N[o].name.toUpperCase(), U = N[o].abbr.toUpperCase(), H = N[o].narrow.toUpperCase(), M)
- switch (p) {
- case "N":
- case "NN":
- case "NNN":
- if (U === r)
- return N[o];
- break;
- case "NNNN":
- if (D === r)
- return N[o];
- break;
- case "NNNNN":
- if (H === r)
- return N[o];
- break;
- }
- else if ([D, U, H].indexOf(r) >= 0)
- return N[o];
- }
- function $S(r, p) {
- var M = r.since <= r.until ? 1 : -1;
- return p === void 0 ? Xt(r.since).year() : Xt(r.since).year() + (p - r.offset) * M;
- }
- function ZS() {
- var r, p, M, o = this.localeData().eras();
- for (r = 0, p = o.length; r < p; ++r)
- if (M = this.clone().startOf("day").valueOf(), o[r].since <= M && M <= o[r].until || o[r].until <= M && M <= o[r].since)
- return o[r].name;
- return "";
- }
- function KS() {
- var r, p, M, o = this.localeData().eras();
- for (r = 0, p = o.length; r < p; ++r)
- if (M = this.clone().startOf("day").valueOf(), o[r].since <= M && M <= o[r].until || o[r].until <= M && M <= o[r].since)
- return o[r].narrow;
- return "";
- }
- function JS() {
- var r, p, M, o = this.localeData().eras();
- for (r = 0, p = o.length; r < p; ++r)
- if (M = this.clone().startOf("day").valueOf(), o[r].since <= M && M <= o[r].until || o[r].until <= M && M <= o[r].since)
- return o[r].abbr;
- return "";
- }
- function qS() {
- var r, p, M, o, y = this.localeData().eras();
- for (r = 0, p = y.length; r < p; ++r)
- if (M = y[r].since <= y[r].until ? 1 : -1, o = this.clone().startOf("day").valueOf(), y[r].since <= o && o <= y[r].until || y[r].until <= o && o <= y[r].since)
- return (this.year() - Xt(y[r].since).year()) * M + y[r].offset;
- return this.year();
- }
- function QS(r) {
- return me(this, "_erasNameRegex") || $l.call(this), r ? this._erasNameRegex : this._erasRegex;
- }
- function tw(r) {
- return me(this, "_erasAbbrRegex") || $l.call(this), r ? this._erasAbbrRegex : this._erasRegex;
- }
- function ew(r) {
- return me(this, "_erasNarrowRegex") || $l.call(this), r ? this._erasNarrowRegex : this._erasRegex;
- }
- function Vl(r, p) {
- return p.erasAbbrRegex(r);
- }
- function iw(r, p) {
- return p.erasNameRegex(r);
- }
- function rw(r, p) {
- return p.erasNarrowRegex(r);
- }
- function nw(r, p) {
- return p._eraYearOrdinalRegex || Mn;
- }
- function $l() {
- var r = [], p = [], M = [], o = [], y, N, D, U, H, V = this.eras();
- for (y = 0, N = V.length; y < N; ++y)
- D = ur(V[y].name), U = ur(V[y].abbr), H = ur(V[y].narrow), p.push(D), r.push(U), M.push(H), o.push(D), o.push(U), o.push(H);
- this._erasRegex = new RegExp("^(" + o.join("|") + ")", "i"), this._erasNameRegex = new RegExp("^(" + p.join("|") + ")", "i"), this._erasAbbrRegex = new RegExp("^(" + r.join("|") + ")", "i"), this._erasNarrowRegex = new RegExp(
- "^(" + M.join("|") + ")",
- "i"
- );
- }
- Zt(0, ["gg", 2], 0, function() {
- return this.weekYear() % 100;
- });
- Zt(0, ["GG", 2], 0, function() {
- return this.isoWeekYear() % 100;
- });
- function No(r, p) {
- Zt(0, [r, r.length], 0, p);
- }
- No("gggg", "weekYear");
- No("ggggg", "weekYear");
- No("GGGG", "isoWeekYear");
- No("GGGGG", "isoWeekYear");
- Ft("G", Lo);
- Ft("g", Lo);
- Ft("GG", Pe, yi);
- Ft("gg", Pe, yi);
- Ft("GGGG", Rl, Il);
- Ft("gggg", Rl, Il);
- Ft("GGGGG", Oo, Po);
- Ft("ggggg", Oo, Po);
- cs(
- ["gggg", "ggggg", "GGGG", "GGGGG"],
- function(r, p, M, o) {
- p[o.substr(0, 2)] = pe(r);
- }
- );
- cs(["gg", "GG"], function(r, p, M, o) {
- p[o] = Xt.parseTwoDigitYear(r);
- });
- function sw(r) {
- return Hu.call(
- this,
- r,
- this.week(),
- this.weekday() + this.localeData()._week.dow,
- this.localeData()._week.dow,
- this.localeData()._week.doy
- );
- }
- function ow(r) {
- return Hu.call(
- this,
- r,
- this.isoWeek(),
- this.isoWeekday(),
- 1,
- 4
- );
- }
- function aw() {
- return dr(this.year(), 1, 4);
- }
- function lw() {
- return dr(this.isoWeekYear(), 1, 4);
- }
- function hw() {
- var r = this.localeData()._week;
- return dr(this.year(), r.dow, r.doy);
- }
- function cw() {
- var r = this.localeData()._week;
- return dr(this.weekYear(), r.dow, r.doy);
- }
- function Hu(r, p, M, o, y) {
- var N;
- return r == null ? rs(this, o, y).year : (N = dr(r, o, y), p > N && (p = N), pw.call(this, r, p, M, o, y));
- }
- function pw(r, p, M, o, y) {
- var N = Cu(r, p, M, o, y), D = is(N.year, 0, N.dayOfYear);
- return this.year(D.getUTCFullYear()), this.month(D.getUTCMonth()), this.date(D.getUTCDate()), this;
- }
- Zt("Q", 0, "Qo", "quarter");
- Ft("Q", uu);
- we("Q", function(r, p) {
- p[cr] = (pe(r) - 1) * 3;
- });
- function uw(r) {
- return r == null ? Math.ceil((this.month() + 1) / 3) : this.month((r - 1) * 3 + this.month() % 3);
- }
- Zt("D", ["DD", 2], "Do", "date");
- Ft("D", Pe, kn);
- Ft("DD", Pe, yi);
- Ft("Do", function(r, p) {
- return r ? p._dayOfMonthOrdinalParse || p._ordinalParse : p._dayOfMonthOrdinalParseLenient;
- });
- we(["D", "DD"], Vi);
- we("Do", function(r, p) {
- p[Vi] = pe(r.match(Pe)[0]);
- });
- var Fu = An("Date", !0);
- Zt("DDD", ["DDDD", 3], "DDDo", "dayOfYear");
- Ft("DDD", Eo);
- Ft("DDDD", du);
- we(["DDD", "DDDD"], function(r, p, M) {
- M._dayOfYear = pe(r);
- });
- function dw(r) {
- var p = Math.round(
- (this.clone().startOf("day") - this.clone().startOf("year")) / 864e5
- ) + 1;
- return r == null ? p : this.add(r - p, "d");
- }
- Zt("m", ["mm", 2], 0, "minute");
- Ft("m", Pe, Nl);
- Ft("mm", Pe, yi);
- we(["m", "mm"], Ni);
- var fw = An("Minutes", !1);
- Zt("s", ["ss", 2], 0, "second");
- Ft("s", Pe, Nl);
- Ft("ss", Pe, yi);
- we(["s", "ss"], pr);
- var gw = An("Seconds", !1);
- Zt("S", 0, 0, function() {
- return ~~(this.millisecond() / 100);
- });
- Zt(0, ["SS", 2], 0, function() {
- return ~~(this.millisecond() / 10);
- });
- Zt(0, ["SSS", 3], 0, "millisecond");
- Zt(0, ["SSSS", 4], 0, function() {
- return this.millisecond() * 10;
- });
- Zt(0, ["SSSSS", 5], 0, function() {
- return this.millisecond() * 100;
- });
- Zt(0, ["SSSSSS", 6], 0, function() {
- return this.millisecond() * 1e3;
- });
- Zt(0, ["SSSSSSS", 7], 0, function() {
- return this.millisecond() * 1e4;
- });
- Zt(0, ["SSSSSSSS", 8], 0, function() {
- return this.millisecond() * 1e5;
- });
- Zt(0, ["SSSSSSSSS", 9], 0, function() {
- return this.millisecond() * 1e6;
- });
- Ft("S", Eo, uu);
- Ft("SS", Eo, yi);
- Ft("SSS", Eo, du);
- var Pr, Uu;
- for (Pr = "SSSS"; Pr.length <= 9; Pr += "S")
- Ft(Pr, Mn);
- function mw(r, p) {
- p[Hr] = pe(("0." + r) * 1e3);
- }
- for (Pr = "S"; Pr.length <= 9; Pr += "S")
- we(Pr, mw);
- Uu = An("Milliseconds", !1);
- Zt("z", 0, 0, "zoneAbbr");
- Zt("zz", 0, 0, "zoneName");
- function yw() {
- return this._isUTC ? "UTC" : "";
- }
- function vw() {
- return this._isUTC ? "Coordinated Universal Time" : "";
- }
- var jt = ls.prototype;
- jt.add = cS;
- jt.calendar = yS;
- jt.clone = vS;
- jt.diff = kS;
- jt.endOf = RS;
- jt.format = ES;
- jt.from = OS;
- jt.fromNow = LS;
- jt.to = _S;
- jt.toNow = DS;
- jt.get = P1;
- jt.invalidAt = HS;
- jt.isAfter = xS;
- jt.isBefore = bS;
- jt.isBetween = SS;
- jt.isSame = wS;
- jt.isSameOrAfter = CS;
- jt.isSameOrBefore = MS;
- jt.isValid = XS;
- jt.lang = Wu;
- jt.locale = ju;
- jt.localeData = Yu;
- jt.max = Xb;
- jt.min = zb;
- jt.parsingFlags = GS;
- jt.set = E1;
- jt.startOf = IS;
- jt.subtract = pS;
- jt.toArray = WS;
- jt.toObject = YS;
- jt.toDate = jS;
- jt.toISOString = TS;
- jt.inspect = PS;
- typeof Symbol < "u" && Symbol.for != null && (jt[Symbol.for("nodejs.util.inspect.custom")] = function() {
- return "Moment<" + this.format() + ">";
- });
- jt.toJSON = zS;
- jt.toString = AS;
- jt.unix = BS;
- jt.valueOf = NS;
- jt.creationData = FS;
- jt.eraName = ZS;
- jt.eraNarrow = KS;
- jt.eraAbbr = JS;
- jt.eraYear = qS;
- jt.year = mu;
- jt.isLeapYear = T1;
- jt.weekYear = sw;
- jt.isoWeekYear = ow;
- jt.quarter = jt.quarters = uw;
- jt.month = Su;
- jt.daysInMonth = j1;
- jt.week = jt.weeks = U1;
- jt.isoWeek = jt.isoWeeks = V1;
- jt.weeksInYear = hw;
- jt.weeksInWeekYear = cw;
- jt.isoWeeksInYear = aw;
- jt.isoWeeksInISOWeekYear = lw;
- jt.date = Fu;
- jt.day = jt.days = ob;
- jt.weekday = ab;
- jt.isoWeekday = lb;
- jt.dayOfYear = dw;
- jt.hour = jt.hours = gb;
- jt.minute = jt.minutes = fw;
- jt.second = jt.seconds = gw;
- jt.millisecond = jt.milliseconds = Uu;
- jt.utcOffset = Jb;
- jt.utc = Qb;
- jt.local = tS;
- jt.parseZone = eS;
- jt.hasAlignedHourOffset = iS;
- jt.isDST = rS;
- jt.isLocal = sS;
- jt.isUtcOffset = oS;
- jt.isUtc = Iu;
- jt.isUTC = Iu;
- jt.zoneAbbr = yw;
- jt.zoneName = vw;
- jt.dates = Ei(
- "dates accessor is deprecated. Use date instead.",
- Fu
- );
- jt.months = Ei(
- "months accessor is deprecated. Use month instead",
- Su
- );
- jt.years = Ei(
- "years accessor is deprecated. Use year instead",
- mu
- );
- jt.zone = Ei(
- "moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",
- qb
- );
- jt.isDSTShifted = Ei(
- "isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",
- nS
- );
- function xw(r) {
- return Te(r * 1e3);
- }
- function bw() {
- return Te.apply(null, arguments).parseZone();
- }
- function Vu(r) {
- return r;
- }
- var ye = Ll.prototype;
- ye.calendar = s1;
- ye.longDateFormat = h1;
- ye.invalidDate = p1;
- ye.ordinal = f1;
- ye.preparse = Vu;
- ye.postformat = Vu;
- ye.relativeTime = m1;
- ye.pastFuture = y1;
- ye.set = r1;
- ye.eras = US;
- ye.erasParse = VS;
- ye.erasConvertYear = $S;
- ye.erasAbbrRegex = tw;
- ye.erasNameRegex = QS;
- ye.erasNarrowRegex = ew;
- ye.months = I1;
- ye.monthsShort = R1;
- ye.monthsParse = B1;
- ye.monthsRegex = Y1;
- ye.monthsShortRegex = W1;
- ye.week = X1;
- ye.firstDayOfYear = F1;
- ye.firstDayOfWeek = H1;
- ye.weekdays = eb;
- ye.weekdaysMin = rb;
- ye.weekdaysShort = ib;
- ye.weekdaysParse = sb;
- ye.weekdaysRegex = hb;
- ye.weekdaysShortRegex = cb;
- ye.weekdaysMinRegex = pb;
- ye.isPM = db;
- ye.meridiem = mb;
- function So(r, p, M, o) {
- var y = mr(), N = Zi().set(o, p);
- return y[M](N, r);
- }
- function $u(r, p, M) {
- if (fr(r) && (p = r, r = void 0), r = r || "", p != null)
- return So(r, p, M, "month");
- var o, y = [];
- for (o = 0; o < 12; o++)
- y[o] = So(r, o, M, "month");
- return y;
- }
- function Zl(r, p, M, o) {
- typeof r == "boolean" ? (fr(p) && (M = p, p = void 0), p = p || "") : (p = r, M = p, r = !1, fr(p) && (M = p, p = void 0), p = p || "");
- var y = mr(), N = r ? y._week.dow : 0, D, U = [];
- if (M != null)
- return So(p, (M + N) % 7, o, "day");
- for (D = 0; D < 7; D++)
- U[D] = So(p, (D + N) % 7, o, "day");
- return U;
- }
- function Sw(r, p) {
- return $u(r, p, "months");
- }
- function ww(r, p) {
- return $u(r, p, "monthsShort");
- }
- function Cw(r, p, M) {
- return Zl(r, p, M, "weekdays");
- }
- function Mw(r, p, M) {
- return Zl(r, p, M, "weekdaysShort");
- }
- function kw(r, p, M) {
- return Zl(r, p, M, "weekdaysMin");
- }
- Er("en", {
- eras: [
- {
- since: "0001-01-01",
- until: 1 / 0,
- offset: 1,
- name: "Anno Domini",
- narrow: "AD",
- abbr: "AD"
- },
- {
- since: "0000-12-31",
- until: -1 / 0,
- offset: 1,
- name: "Before Christ",
- narrow: "BC",
- abbr: "BC"
- }
- ],
- dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
- ordinal: function(r) {
- var p = r % 10, M = pe(r % 100 / 10) === 1 ? "th" : p === 1 ? "st" : p === 2 ? "nd" : p === 3 ? "rd" : "th";
- return r + M;
- }
- });
- Xt.lang = Ei(
- "moment.lang is deprecated. Use moment.locale instead.",
- Er
- );
- Xt.langData = Ei(
- "moment.langData is deprecated. Use moment.localeData instead.",
- mr
- );
- var or = Math.abs;
- function Aw() {
- var r = this._data;
- return this._milliseconds = or(this._milliseconds), this._days = or(this._days), this._months = or(this._months), r.milliseconds = or(r.milliseconds), r.seconds = or(r.seconds), r.minutes = or(r.minutes), r.hours = or(r.hours), r.months = or(r.months), r.years = or(r.years), this;
- }
- function Zu(r, p, M, o) {
- var y = Yi(p, M);
- return r._milliseconds += o * y._milliseconds, r._days += o * y._days, r._months += o * y._months, r._bubble();
- }
- function Tw(r, p) {
- return Zu(this, r, p, 1);
- }
- function Pw(r, p) {
- return Zu(this, r, p, -1);
- }
- function Bp(r) {
- return r < 0 ? Math.floor(r) : Math.ceil(r);
- }
- function Ew() {
- var r = this._milliseconds, p = this._days, M = this._months, o = this._data, y, N, D, U, H;
- return r >= 0 && p >= 0 && M >= 0 || r <= 0 && p <= 0 && M <= 0 || (r += Bp(Sl(M) + p) * 864e5, p = 0, M = 0), o.milliseconds = r % 1e3, y = Ai(r / 1e3), o.seconds = y % 60, N = Ai(y / 60), o.minutes = N % 60, D = Ai(N / 60), o.hours = D % 24, p += Ai(D / 24), H = Ai(Ku(p)), M += H, p -= Bp(Sl(H)), U = Ai(M / 12), M %= 12, o.days = p, o.months = M, o.years = U, this;
- }
- function Ku(r) {
- return r * 4800 / 146097;
- }
- function Sl(r) {
- return r * 146097 / 4800;
- }
- function Ow(r) {
- if (!this.isValid())
- return NaN;
- var p, M, o = this._milliseconds;
- if (r = Oi(r), r === "month" || r === "quarter" || r === "year")
- switch (p = this._days + o / 864e5, M = this._months + Ku(p), r) {
- case "month":
- return M;
- case "quarter":
- return M / 3;
- case "year":
- return M / 12;
- }
- else
- switch (p = this._days + Math.round(Sl(this._months)), r) {
- case "week":
- return p / 7 + o / 6048e5;
- case "day":
- return p + o / 864e5;
- case "hour":
- return p * 24 + o / 36e5;
- case "minute":
- return p * 1440 + o / 6e4;
- case "second":
- return p * 86400 + o / 1e3;
- case "millisecond":
- return Math.floor(p * 864e5) + o;
- default:
- throw new Error("Unknown unit " + r);
- }
- }
- function yr(r) {
- return function() {
- return this.as(r);
- };
- }
- var Ju = yr("ms"), Lw = yr("s"), _w = yr("m"), Dw = yr("h"), Iw = yr("d"), Rw = yr("w"), Nw = yr("M"), Bw = yr("Q"), jw = yr("y"), Ww = Ju;
- function Yw() {
- return Yi(this);
- }
- function zw(r) {
- return r = Oi(r), this.isValid() ? this[r + "s"]() : NaN;
- }
- function Kr(r) {
- return function() {
- return this.isValid() ? this._data[r] : NaN;
- };
- }
- var Xw = Kr("milliseconds"), Gw = Kr("seconds"), Hw = Kr("minutes"), Fw = Kr("hours"), Uw = Kr("days"), Vw = Kr("months"), $w = Kr("years");
- function Zw() {
- return Ai(this.days() / 7);
- }
- var ar = Math.round, mn = {
- ss: 44,
- // a few seconds to seconds
- s: 45,
- // seconds to minute
- m: 45,
- // minutes to hour
- h: 22,
- // hours to day
- d: 26,
- // days to month/week
- w: null,
- // weeks to month
- M: 11
- // months to year
- };
- function Kw(r, p, M, o, y) {
- return y.relativeTime(p || 1, !!M, r, o);
- }
- function Jw(r, p, M, o) {
- var y = Yi(r).abs(), N = ar(y.as("s")), D = ar(y.as("m")), U = ar(y.as("h")), H = ar(y.as("d")), V = ar(y.as("M")), G = ar(y.as("w")), R = ar(y.as("y")), B = N <= M.ss && ["s", N] || N < M.s && ["ss", N] || D <= 1 && ["m"] || D < M.m && ["mm", D] || U <= 1 && ["h"] || U < M.h && ["hh", U] || H <= 1 && ["d"] || H < M.d && ["dd", H];
- return M.w != null && (B = B || G <= 1 && ["w"] || G < M.w && ["ww", G]), B = B || V <= 1 && ["M"] || V < M.M && ["MM", V] || R <= 1 && ["y"] || ["yy", R], B[2] = p, B[3] = +r > 0, B[4] = o, Kw.apply(null, B);
- }
- function qw(r) {
- return r === void 0 ? ar : typeof r == "function" ? (ar = r, !0) : !1;
- }
- function Qw(r, p) {
- return mn[r] === void 0 ? !1 : p === void 0 ? mn[r] : (mn[r] = p, r === "s" && (mn.ss = p - 1), !0);
- }
- function tC(r, p) {
- if (!this.isValid())
- return this.localeData().invalidDate();
- var M = !1, o = mn, y, N;
- return typeof r == "object" && (p = r, r = !1), typeof r == "boolean" && (M = r), typeof p == "object" && (o = Object.assign({}, mn, p), p.s != null && p.ss == null && (o.ss = p.s - 1)), y = this.localeData(), N = Jw(this, !M, o, y), M && (N = y.pastFuture(+this, N)), y.postformat(N);
- }
- var al = Math.abs;
- function fn(r) {
- return (r > 0) - (r < 0) || +r;
- }
- function Bo() {
- if (!this.isValid())
- return this.localeData().invalidDate();
- var r = al(this._milliseconds) / 1e3, p = al(this._days), M = al(this._months), o, y, N, D, U = this.asSeconds(), H, V, G, R;
- return U ? (o = Ai(r / 60), y = Ai(o / 60), r %= 60, o %= 60, N = Ai(M / 12), M %= 12, D = r ? r.toFixed(3).replace(/\.?0+$/, "") : "", H = U < 0 ? "-" : "", V = fn(this._months) !== fn(U) ? "-" : "", G = fn(this._days) !== fn(U) ? "-" : "", R = fn(this._milliseconds) !== fn(U) ? "-" : "", H + "P" + (N ? V + N + "Y" : "") + (M ? V + M + "M" : "") + (p ? G + p + "D" : "") + (y || o || r ? "T" : "") + (y ? R + y + "H" : "") + (o ? R + o + "M" : "") + (r ? R + D + "S" : "")) : "P0D";
- }
- var fe = Ro.prototype;
- fe.isValid = Vb;
- fe.abs = Aw;
- fe.add = Tw;
- fe.subtract = Pw;
- fe.as = Ow;
- fe.asMilliseconds = Ju;
- fe.asSeconds = Lw;
- fe.asMinutes = _w;
- fe.asHours = Dw;
- fe.asDays = Iw;
- fe.asWeeks = Rw;
- fe.asMonths = Nw;
- fe.asQuarters = Bw;
- fe.asYears = jw;
- fe.valueOf = Ww;
- fe._bubble = Ew;
- fe.clone = Yw;
- fe.get = zw;
- fe.milliseconds = Xw;
- fe.seconds = Gw;
- fe.minutes = Hw;
- fe.hours = Fw;
- fe.days = Uw;
- fe.weeks = Zw;
- fe.months = Vw;
- fe.years = $w;
- fe.humanize = tC;
- fe.toISOString = Bo;
- fe.toString = Bo;
- fe.toJSON = Bo;
- fe.locale = ju;
- fe.localeData = Yu;
- fe.toIsoString = Ei(
- "toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",
- Bo
- );
- fe.lang = Wu;
- Zt("X", 0, 0, "unix");
- Zt("x", 0, 0, "valueOf");
- Ft("x", Lo);
- Ft("X", S1);
- we("X", function(r, p, M) {
- M._d = new Date(parseFloat(r) * 1e3);
- });
- we("x", function(r, p, M) {
- M._d = new Date(pe(r));
- });
- //! moment.js
- Xt.version = "2.30.1";
- e1(Te);
- Xt.fn = jt;
- Xt.min = Gb;
- Xt.max = Hb;
- Xt.now = Fb;
- Xt.utc = Zi;
- Xt.unix = xw;
- Xt.months = Sw;
- Xt.isDate = as;
- Xt.locale = Er;
- Xt.invalid = To;
- Xt.duration = Yi;
- Xt.isMoment = Wi;
- Xt.weekdays = Cw;
- Xt.parseZone = bw;
- Xt.localeData = mr;
- Xt.isDuration = ao;
- Xt.monthsShort = ww;
- Xt.weekdaysMin = kw;
- Xt.defineLocale = zl;
- Xt.updateLocale = bb;
- Xt.locales = Sb;
- Xt.weekdaysShort = Mw;
- Xt.normalizeUnits = Oi;
- Xt.relativeTimeRounding = qw;
- Xt.relativeTimeThreshold = Qw;
- Xt.calendarFormat = mS;
- Xt.prototype = jt;
- Xt.HTML5_FMT = {
- DATETIME_LOCAL: "YYYY-MM-DDTHH:mm",
- // <input type="datetime-local" />
- DATETIME_LOCAL_SECONDS: "YYYY-MM-DDTHH:mm:ss",
- // <input type="datetime-local" step="1" />
- DATETIME_LOCAL_MS: "YYYY-MM-DDTHH:mm:ss.SSS",
- // <input type="datetime-local" step="0.001" />
- DATE: "YYYY-MM-DD",
- // <input type="date" />
- TIME: "HH:mm",
- // <input type="time" />
- TIME_SECONDS: "HH:mm:ss",
- // <input type="time" step="1" />
- TIME_MS: "HH:mm:ss.SSS",
- // <input type="time" step="0.001" />
- WEEK: "GGGG-[W]WW",
- // <input type="week" />
- MONTH: "YYYY-MM"
- // <input type="month" />
- };
- var wo = { exports: {} };
- /**
- * @license
- * Lodash <https://lodash.com/>
- * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
- * Released under MIT license <https://lodash.com/license>
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- */
- wo.exports;
- (function(r, p) {
- (function() {
- var M, o = "4.17.21", y = 200, N = "Unsupported core-js use. Try https://npms.io/search?q=ponyfill.", D = "Expected a function", U = "Invalid `variable` option passed into `_.template`", H = "__lodash_hash_undefined__", V = 500, G = "__lodash_placeholder__", R = 1, B = 2, S = 4, x = 1, f = 2, d = 1, T = 2, O = 4, j = 8, k = 16, b = 32, w = 64, v = 128, l = 256, h = 512, u = 30, i = "...", c = 800, a = 16, t = 1, s = 2, n = 3, P = 1 / 0, _ = 9007199254740991, I = 17976931348623157e292, W = 0 / 0, E = 4294967295, X = E - 1, g = E >>> 1, m = [
- ["ary", v],
- ["bind", d],
- ["bindKey", T],
- ["curry", j],
- ["curryRight", k],
- ["flip", h],
- ["partial", b],
- ["partialRight", w],
- ["rearg", l]
- ], L = "[object Arguments]", z = "[object Array]", $ = "[object AsyncFunction]", Q = "[object Boolean]", A = "[object Date]", F = "[object DOMException]", Y = "[object Error]", Z = "[object Function]", q = "[object GeneratorFunction]", it = "[object Map]", et = "[object Number]", nt = "[object Null]", rt = "[object Object]", ct = "[object Promise]", gt = "[object Proxy]", dt = "[object RegExp]", ht = "[object Set]", at = "[object String]", J = "[object Symbol]", tt = "[object Undefined]", ot = "[object WeakMap]", lt = "[object WeakSet]", pt = "[object ArrayBuffer]", yt = "[object DataView]", vt = "[object Float32Array]", Mt = "[object Float64Array]", Pt = "[object Int8Array]", At = "[object Int16Array]", St = "[object Int32Array]", Dt = "[object Uint8Array]", _t = "[object Uint8ClampedArray]", Nt = "[object Uint16Array]", Ot = "[object Uint32Array]", Kt = /\b__p \+= '';/g, Gt = /\b(__p \+=) '' \+/g, Wt = /(__e\(.*?\)|\b__t\)) \+\n'';/g, Jt = /&(?:amp|lt|gt|quot|#39);/g, be = /[&<>"']/g, Yt = RegExp(Jt.source), Vt = RegExp(be.source), Ce = /<%-([\s\S]+?)%>/g, Or = /<%([\s\S]+?)%>/g, us = /<%=([\s\S]+?)%>/g, En = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, On = /^\w*$/, $e = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, Ln = /[\\^$.*+?()[\]{}|]/g, _n = RegExp(Ln.source), Jr = /^\s+/, ds = /\s/, Fo = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, Lr = /\{\n\/\* \[wrapped with (.+)\] \*/, Xi = /,? & /, fs = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, Dn = /[()=,{}\[\]\/\s]/, _r = /\\(\\)?/g, $t = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g, de = /\w*$/, ge = /^[-+]0x[0-9a-f]+$/i, Re = /^0b[01]+$/i, De = /^\[object .+?Constructor\]$/, qr = /^0o[0-7]+$/i, Od = /^(?:0|[1-9]\d*)$/, Ld = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, gs = /($^)/, _d = /['\n\r\u2028\u2029\\]/g, ms = "\\ud800-\\udfff", Dd = "\\u0300-\\u036f", Id = "\\ufe20-\\ufe2f", Rd = "\\u20d0-\\u20ff", oh = Dd + Id + Rd, ah = "\\u2700-\\u27bf", lh = "a-z\\xdf-\\xf6\\xf8-\\xff", Nd = "\\xac\\xb1\\xd7\\xf7", Bd = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", jd = "\\u2000-\\u206f", Wd = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", hh = "A-Z\\xc0-\\xd6\\xd8-\\xde", ch = "\\ufe0e\\ufe0f", ph = Nd + Bd + jd + Wd, Uo = "['’]", Yd = "[" + ms + "]", uh = "[" + ph + "]", ys = "[" + oh + "]", dh = "\\d+", zd = "[" + ah + "]", fh = "[" + lh + "]", gh = "[^" + ms + ph + dh + ah + lh + hh + "]", Vo = "\\ud83c[\\udffb-\\udfff]", Xd = "(?:" + ys + "|" + Vo + ")", mh = "[^" + ms + "]", $o = "(?:\\ud83c[\\udde6-\\uddff]){2}", Zo = "[\\ud800-\\udbff][\\udc00-\\udfff]", Qr = "[" + hh + "]", yh = "\\u200d", vh = "(?:" + fh + "|" + gh + ")", Gd = "(?:" + Qr + "|" + gh + ")", xh = "(?:" + Uo + "(?:d|ll|m|re|s|t|ve))?", bh = "(?:" + Uo + "(?:D|LL|M|RE|S|T|VE))?", Sh = Xd + "?", wh = "[" + ch + "]?", Hd = "(?:" + yh + "(?:" + [mh, $o, Zo].join("|") + ")" + wh + Sh + ")*", Fd = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", Ud = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", Ch = wh + Sh + Hd, Vd = "(?:" + [zd, $o, Zo].join("|") + ")" + Ch, $d = "(?:" + [mh + ys + "?", ys, $o, Zo, Yd].join("|") + ")", Zd = RegExp(Uo, "g"), Kd = RegExp(ys, "g"), Ko = RegExp(Vo + "(?=" + Vo + ")|" + $d + Ch, "g"), Jd = RegExp([
- Qr + "?" + fh + "+" + xh + "(?=" + [uh, Qr, "$"].join("|") + ")",
- Gd + "+" + bh + "(?=" + [uh, Qr + vh, "$"].join("|") + ")",
- Qr + "?" + vh + "+" + xh,
- Qr + "+" + bh,
- Ud,
- Fd,
- dh,
- Vd
- ].join("|"), "g"), qd = RegExp("[" + yh + ms + oh + ch + "]"), Qd = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/, tf = [
- "Array",
- "Buffer",
- "DataView",
- "Date",
- "Error",
- "Float32Array",
- "Float64Array",
- "Function",
- "Int8Array",
- "Int16Array",
- "Int32Array",
- "Map",
- "Math",
- "Object",
- "Promise",
- "RegExp",
- "Set",
- "String",
- "Symbol",
- "TypeError",
- "Uint8Array",
- "Uint8ClampedArray",
- "Uint16Array",
- "Uint32Array",
- "WeakMap",
- "_",
- "clearTimeout",
- "isFinite",
- "parseInt",
- "setTimeout"
- ], ef = -1, Ae = {};
- Ae[vt] = Ae[Mt] = Ae[Pt] = Ae[At] = Ae[St] = Ae[Dt] = Ae[_t] = Ae[Nt] = Ae[Ot] = !0, Ae[L] = Ae[z] = Ae[pt] = Ae[Q] = Ae[yt] = Ae[A] = Ae[Y] = Ae[Z] = Ae[it] = Ae[et] = Ae[rt] = Ae[dt] = Ae[ht] = Ae[at] = Ae[ot] = !1;
- var ke = {};
- ke[L] = ke[z] = ke[pt] = ke[yt] = ke[Q] = ke[A] = ke[vt] = ke[Mt] = ke[Pt] = ke[At] = ke[St] = ke[it] = ke[et] = ke[rt] = ke[dt] = ke[ht] = ke[at] = ke[J] = ke[Dt] = ke[_t] = ke[Nt] = ke[Ot] = !0, ke[Y] = ke[Z] = ke[ot] = !1;
- var rf = {
- // Latin-1 Supplement block.
- À: "A",
- Á: "A",
- Â: "A",
- Ã: "A",
- Ä: "A",
- Å: "A",
- à: "a",
- á: "a",
- â: "a",
- ã: "a",
- ä: "a",
- å: "a",
- Ç: "C",
- ç: "c",
- Ð: "D",
- ð: "d",
- È: "E",
- É: "E",
- Ê: "E",
- Ë: "E",
- è: "e",
- é: "e",
- ê: "e",
- ë: "e",
- Ì: "I",
- Í: "I",
- Î: "I",
- Ï: "I",
- ì: "i",
- í: "i",
- î: "i",
- ï: "i",
- Ñ: "N",
- ñ: "n",
- Ò: "O",
- Ó: "O",
- Ô: "O",
- Õ: "O",
- Ö: "O",
- Ø: "O",
- ò: "o",
- ó: "o",
- ô: "o",
- õ: "o",
- ö: "o",
- ø: "o",
- Ù: "U",
- Ú: "U",
- Û: "U",
- Ü: "U",
- ù: "u",
- ú: "u",
- û: "u",
- ü: "u",
- Ý: "Y",
- ý: "y",
- ÿ: "y",
- Æ: "Ae",
- æ: "ae",
- Þ: "Th",
- þ: "th",
- ß: "ss",
- // Latin Extended-A block.
- Ā: "A",
- Ă: "A",
- Ą: "A",
- ā: "a",
- ă: "a",
- ą: "a",
- Ć: "C",
- Ĉ: "C",
- Ċ: "C",
- Č: "C",
- ć: "c",
- ĉ: "c",
- ċ: "c",
- č: "c",
- Ď: "D",
- Đ: "D",
- ď: "d",
- đ: "d",
- Ē: "E",
- Ĕ: "E",
- Ė: "E",
- Ę: "E",
- Ě: "E",
- ē: "e",
- ĕ: "e",
- ė: "e",
- ę: "e",
- ě: "e",
- Ĝ: "G",
- Ğ: "G",
- Ġ: "G",
- Ģ: "G",
- ĝ: "g",
- ğ: "g",
- ġ: "g",
- ģ: "g",
- Ĥ: "H",
- Ħ: "H",
- ĥ: "h",
- ħ: "h",
- Ĩ: "I",
- Ī: "I",
- Ĭ: "I",
- Į: "I",
- İ: "I",
- ĩ: "i",
- ī: "i",
- ĭ: "i",
- į: "i",
- ı: "i",
- Ĵ: "J",
- ĵ: "j",
- Ķ: "K",
- ķ: "k",
- ĸ: "k",
- Ĺ: "L",
- Ļ: "L",
- Ľ: "L",
- Ŀ: "L",
- Ł: "L",
- ĺ: "l",
- ļ: "l",
- ľ: "l",
- ŀ: "l",
- ł: "l",
- Ń: "N",
- Ņ: "N",
- Ň: "N",
- Ŋ: "N",
- ń: "n",
- ņ: "n",
- ň: "n",
- ŋ: "n",
- Ō: "O",
- Ŏ: "O",
- Ő: "O",
- ō: "o",
- ŏ: "o",
- ő: "o",
- Ŕ: "R",
- Ŗ: "R",
- Ř: "R",
- ŕ: "r",
- ŗ: "r",
- ř: "r",
- Ś: "S",
- Ŝ: "S",
- Ş: "S",
- Š: "S",
- ś: "s",
- ŝ: "s",
- ş: "s",
- š: "s",
- Ţ: "T",
- Ť: "T",
- Ŧ: "T",
- ţ: "t",
- ť: "t",
- ŧ: "t",
- Ũ: "U",
- Ū: "U",
- Ŭ: "U",
- Ů: "U",
- Ű: "U",
- Ų: "U",
- ũ: "u",
- ū: "u",
- ŭ: "u",
- ů: "u",
- ű: "u",
- ų: "u",
- Ŵ: "W",
- ŵ: "w",
- Ŷ: "Y",
- ŷ: "y",
- Ÿ: "Y",
- Ź: "Z",
- Ż: "Z",
- Ž: "Z",
- ź: "z",
- ż: "z",
- ž: "z",
- IJ: "IJ",
- ij: "ij",
- Œ: "Oe",
- œ: "oe",
- ʼn: "'n",
- ſ: "s"
- }, nf = {
- "&": "&",
- "<": "<",
- ">": ">",
- '"': """,
- "'": "'"
- }, sf = {
- "&": "&",
- "<": "<",
- ">": ">",
- """: '"',
- "'": "'"
- }, of = {
- "\\": "\\",
- "'": "'",
- "\n": "n",
- "\r": "r",
- "\u2028": "u2028",
- "\u2029": "u2029"
- }, af = parseFloat, lf = parseInt, Mh = typeof Gr == "object" && Gr && Gr.Object === Object && Gr, hf = typeof self == "object" && self && self.Object === Object && self, Ue = Mh || hf || Function("return this")(), Jo = p && !p.nodeType && p, Dr = Jo && !0 && r && !r.nodeType && r, kh = Dr && Dr.exports === Jo, qo = kh && Mh.process, vi = function() {
- try {
- var wt = Dr && Dr.require && Dr.require("util").types;
- return wt || qo && qo.binding && qo.binding("util");
- } catch {
- }
- }(), Ah = vi && vi.isArrayBuffer, Th = vi && vi.isDate, Ph = vi && vi.isMap, Eh = vi && vi.isRegExp, Oh = vi && vi.isSet, Lh = vi && vi.isTypedArray;
- function ci(wt, Lt, Tt) {
- switch (Tt.length) {
- case 0:
- return wt.call(Lt);
- case 1:
- return wt.call(Lt, Tt[0]);
- case 2:
- return wt.call(Lt, Tt[0], Tt[1]);
- case 3:
- return wt.call(Lt, Tt[0], Tt[1], Tt[2]);
- }
- return wt.apply(Lt, Tt);
- }
- function cf(wt, Lt, Tt, Ht) {
- for (var ee = -1, ve = wt == null ? 0 : wt.length; ++ee < ve; ) {
- var ze = wt[ee];
- Lt(Ht, ze, Tt(ze), wt);
- }
- return Ht;
- }
- function xi(wt, Lt) {
- for (var Tt = -1, Ht = wt == null ? 0 : wt.length; ++Tt < Ht && Lt(wt[Tt], Tt, wt) !== !1; )
- ;
- return wt;
- }
- function pf(wt, Lt) {
- for (var Tt = wt == null ? 0 : wt.length; Tt-- && Lt(wt[Tt], Tt, wt) !== !1; )
- ;
- return wt;
- }
- function _h(wt, Lt) {
- for (var Tt = -1, Ht = wt == null ? 0 : wt.length; ++Tt < Ht; )
- if (!Lt(wt[Tt], Tt, wt))
- return !1;
- return !0;
- }
- function vr(wt, Lt) {
- for (var Tt = -1, Ht = wt == null ? 0 : wt.length, ee = 0, ve = []; ++Tt < Ht; ) {
- var ze = wt[Tt];
- Lt(ze, Tt, wt) && (ve[ee++] = ze);
- }
- return ve;
- }
- function vs(wt, Lt) {
- var Tt = wt == null ? 0 : wt.length;
- return !!Tt && tn(wt, Lt, 0) > -1;
- }
- function Qo(wt, Lt, Tt) {
- for (var Ht = -1, ee = wt == null ? 0 : wt.length; ++Ht < ee; )
- if (Tt(Lt, wt[Ht]))
- return !0;
- return !1;
- }
- function Ee(wt, Lt) {
- for (var Tt = -1, Ht = wt == null ? 0 : wt.length, ee = Array(Ht); ++Tt < Ht; )
- ee[Tt] = Lt(wt[Tt], Tt, wt);
- return ee;
- }
- function xr(wt, Lt) {
- for (var Tt = -1, Ht = Lt.length, ee = wt.length; ++Tt < Ht; )
- wt[ee + Tt] = Lt[Tt];
- return wt;
- }
- function ta(wt, Lt, Tt, Ht) {
- var ee = -1, ve = wt == null ? 0 : wt.length;
- for (Ht && ve && (Tt = wt[++ee]); ++ee < ve; )
- Tt = Lt(Tt, wt[ee], ee, wt);
- return Tt;
- }
- function uf(wt, Lt, Tt, Ht) {
- var ee = wt == null ? 0 : wt.length;
- for (Ht && ee && (Tt = wt[--ee]); ee--; )
- Tt = Lt(Tt, wt[ee], ee, wt);
- return Tt;
- }
- function ea(wt, Lt) {
- for (var Tt = -1, Ht = wt == null ? 0 : wt.length; ++Tt < Ht; )
- if (Lt(wt[Tt], Tt, wt))
- return !0;
- return !1;
- }
- var df = ia("length");
- function ff(wt) {
- return wt.split("");
- }
- function gf(wt) {
- return wt.match(fs) || [];
- }
- function Dh(wt, Lt, Tt) {
- var Ht;
- return Tt(wt, function(ee, ve, ze) {
- if (Lt(ee, ve, ze))
- return Ht = ve, !1;
- }), Ht;
- }
- function xs(wt, Lt, Tt, Ht) {
- for (var ee = wt.length, ve = Tt + (Ht ? 1 : -1); Ht ? ve-- : ++ve < ee; )
- if (Lt(wt[ve], ve, wt))
- return ve;
- return -1;
- }
- function tn(wt, Lt, Tt) {
- return Lt === Lt ? Tf(wt, Lt, Tt) : xs(wt, Ih, Tt);
- }
- function mf(wt, Lt, Tt, Ht) {
- for (var ee = Tt - 1, ve = wt.length; ++ee < ve; )
- if (Ht(wt[ee], Lt))
- return ee;
- return -1;
- }
- function Ih(wt) {
- return wt !== wt;
- }
- function Rh(wt, Lt) {
- var Tt = wt == null ? 0 : wt.length;
- return Tt ? na(wt, Lt) / Tt : W;
- }
- function ia(wt) {
- return function(Lt) {
- return Lt == null ? M : Lt[wt];
- };
- }
- function ra(wt) {
- return function(Lt) {
- return wt == null ? M : wt[Lt];
- };
- }
- function Nh(wt, Lt, Tt, Ht, ee) {
- return ee(wt, function(ve, ze, Me) {
- Tt = Ht ? (Ht = !1, ve) : Lt(Tt, ve, ze, Me);
- }), Tt;
- }
- function yf(wt, Lt) {
- var Tt = wt.length;
- for (wt.sort(Lt); Tt--; )
- wt[Tt] = wt[Tt].value;
- return wt;
- }
- function na(wt, Lt) {
- for (var Tt, Ht = -1, ee = wt.length; ++Ht < ee; ) {
- var ve = Lt(wt[Ht]);
- ve !== M && (Tt = Tt === M ? ve : Tt + ve);
- }
- return Tt;
- }
- function sa(wt, Lt) {
- for (var Tt = -1, Ht = Array(wt); ++Tt < wt; )
- Ht[Tt] = Lt(Tt);
- return Ht;
- }
- function vf(wt, Lt) {
- return Ee(Lt, function(Tt) {
- return [Tt, wt[Tt]];
- });
- }
- function Bh(wt) {
- return wt && wt.slice(0, zh(wt) + 1).replace(Jr, "");
- }
- function pi(wt) {
- return function(Lt) {
- return wt(Lt);
- };
- }
- function oa(wt, Lt) {
- return Ee(Lt, function(Tt) {
- return wt[Tt];
- });
- }
- function In(wt, Lt) {
- return wt.has(Lt);
- }
- function jh(wt, Lt) {
- for (var Tt = -1, Ht = wt.length; ++Tt < Ht && tn(Lt, wt[Tt], 0) > -1; )
- ;
- return Tt;
- }
- function Wh(wt, Lt) {
- for (var Tt = wt.length; Tt-- && tn(Lt, wt[Tt], 0) > -1; )
- ;
- return Tt;
- }
- function xf(wt, Lt) {
- for (var Tt = wt.length, Ht = 0; Tt--; )
- wt[Tt] === Lt && ++Ht;
- return Ht;
- }
- var bf = ra(rf), Sf = ra(nf);
- function wf(wt) {
- return "\\" + of[wt];
- }
- function Cf(wt, Lt) {
- return wt == null ? M : wt[Lt];
- }
- function en(wt) {
- return qd.test(wt);
- }
- function Mf(wt) {
- return Qd.test(wt);
- }
- function kf(wt) {
- for (var Lt, Tt = []; !(Lt = wt.next()).done; )
- Tt.push(Lt.value);
- return Tt;
- }
- function aa(wt) {
- var Lt = -1, Tt = Array(wt.size);
- return wt.forEach(function(Ht, ee) {
- Tt[++Lt] = [ee, Ht];
- }), Tt;
- }
- function Yh(wt, Lt) {
- return function(Tt) {
- return wt(Lt(Tt));
- };
- }
- function br(wt, Lt) {
- for (var Tt = -1, Ht = wt.length, ee = 0, ve = []; ++Tt < Ht; ) {
- var ze = wt[Tt];
- (ze === Lt || ze === G) && (wt[Tt] = G, ve[ee++] = Tt);
- }
- return ve;
- }
- function bs(wt) {
- var Lt = -1, Tt = Array(wt.size);
- return wt.forEach(function(Ht) {
- Tt[++Lt] = Ht;
- }), Tt;
- }
- function Af(wt) {
- var Lt = -1, Tt = Array(wt.size);
- return wt.forEach(function(Ht) {
- Tt[++Lt] = [Ht, Ht];
- }), Tt;
- }
- function Tf(wt, Lt, Tt) {
- for (var Ht = Tt - 1, ee = wt.length; ++Ht < ee; )
- if (wt[Ht] === Lt)
- return Ht;
- return -1;
- }
- function Pf(wt, Lt, Tt) {
- for (var Ht = Tt + 1; Ht--; )
- if (wt[Ht] === Lt)
- return Ht;
- return Ht;
- }
- function rn(wt) {
- return en(wt) ? Of(wt) : df(wt);
- }
- function Li(wt) {
- return en(wt) ? Lf(wt) : ff(wt);
- }
- function zh(wt) {
- for (var Lt = wt.length; Lt-- && ds.test(wt.charAt(Lt)); )
- ;
- return Lt;
- }
- var Ef = ra(sf);
- function Of(wt) {
- for (var Lt = Ko.lastIndex = 0; Ko.test(wt); )
- ++Lt;
- return Lt;
- }
- function Lf(wt) {
- return wt.match(Ko) || [];
- }
- function _f(wt) {
- return wt.match(Jd) || [];
- }
- var Df = function wt(Lt) {
- Lt = Lt == null ? Ue : nn.defaults(Ue.Object(), Lt, nn.pick(Ue, tf));
- var Tt = Lt.Array, Ht = Lt.Date, ee = Lt.Error, ve = Lt.Function, ze = Lt.Math, Me = Lt.Object, la = Lt.RegExp, If = Lt.String, bi = Lt.TypeError, Ss = Tt.prototype, Rf = ve.prototype, sn = Me.prototype, ws = Lt["__core-js_shared__"], Cs = Rf.toString, Se = sn.hasOwnProperty, Nf = 0, Xh = function() {
- var e = /[^.]+$/.exec(ws && ws.keys && ws.keys.IE_PROTO || "");
- return e ? "Symbol(src)_1." + e : "";
- }(), Ms = sn.toString, Bf = Cs.call(Me), jf = Ue._, Wf = la(
- "^" + Cs.call(Se).replace(Ln, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
- ), ks = kh ? Lt.Buffer : M, Sr = Lt.Symbol, As = Lt.Uint8Array, Gh = ks ? ks.allocUnsafe : M, Ts = Yh(Me.getPrototypeOf, Me), Hh = Me.create, Fh = sn.propertyIsEnumerable, Ps = Ss.splice, Uh = Sr ? Sr.isConcatSpreadable : M, Rn = Sr ? Sr.iterator : M, Ir = Sr ? Sr.toStringTag : M, Es = function() {
- try {
- var e = Wr(Me, "defineProperty");
- return e({}, "", {}), e;
- } catch {
- }
- }(), Yf = Lt.clearTimeout !== Ue.clearTimeout && Lt.clearTimeout, zf = Ht && Ht.now !== Ue.Date.now && Ht.now, Xf = Lt.setTimeout !== Ue.setTimeout && Lt.setTimeout, Os = ze.ceil, Ls = ze.floor, ha = Me.getOwnPropertySymbols, Gf = ks ? ks.isBuffer : M, Vh = Lt.isFinite, Hf = Ss.join, Ff = Yh(Me.keys, Me), Xe = ze.max, Ze = ze.min, Uf = Ht.now, Vf = Lt.parseInt, $h = ze.random, $f = Ss.reverse, ca = Wr(Lt, "DataView"), Nn = Wr(Lt, "Map"), pa = Wr(Lt, "Promise"), on = Wr(Lt, "Set"), Bn = Wr(Lt, "WeakMap"), jn = Wr(Me, "create"), _s = Bn && new Bn(), an = {}, Zf = Yr(ca), Kf = Yr(Nn), Jf = Yr(pa), qf = Yr(on), Qf = Yr(Bn), Ds = Sr ? Sr.prototype : M, Wn = Ds ? Ds.valueOf : M, Zh = Ds ? Ds.toString : M;
- function ft(e) {
- if (Ne(e) && !ie(e) && !(e instanceof ce)) {
- if (e instanceof Si)
- return e;
- if (Se.call(e, "__wrapped__"))
- return Kc(e);
- }
- return new Si(e);
- }
- var ln = function() {
- function e() {
- }
- return function(C) {
- if (!Ie(C))
- return {};
- if (Hh)
- return Hh(C);
- e.prototype = C;
- var K = new e();
- return e.prototype = M, K;
- };
- }();
- function Is() {
- }
- function Si(e, C) {
- this.__wrapped__ = e, this.__actions__ = [], this.__chain__ = !!C, this.__index__ = 0, this.__values__ = M;
- }
- ft.templateSettings = {
- /**
- * Used to detect `data` property values to be HTML-escaped.
- *
- * @memberOf _.templateSettings
- * @type {RegExp}
- */
- escape: Ce,
- /**
- * Used to detect code to be evaluated.
- *
- * @memberOf _.templateSettings
- * @type {RegExp}
- */
- evaluate: Or,
- /**
- * Used to detect `data` property values to inject.
- *
- * @memberOf _.templateSettings
- * @type {RegExp}
- */
- interpolate: us,
- /**
- * Used to reference the data object in the template text.
- *
- * @memberOf _.templateSettings
- * @type {string}
- */
- variable: "",
- /**
- * Used to import variables into the compiled template.
- *
- * @memberOf _.templateSettings
- * @type {Object}
- */
- imports: {
- /**
- * A reference to the `lodash` function.
- *
- * @memberOf _.templateSettings.imports
- * @type {Function}
- */
- _: ft
- }
- }, ft.prototype = Is.prototype, ft.prototype.constructor = ft, Si.prototype = ln(Is.prototype), Si.prototype.constructor = Si;
- function ce(e) {
- this.__wrapped__ = e, this.__actions__ = [], this.__dir__ = 1, this.__filtered__ = !1, this.__iteratees__ = [], this.__takeCount__ = E, this.__views__ = [];
- }
- function tg() {
- var e = new ce(this.__wrapped__);
- return e.__actions__ = ni(this.__actions__), e.__dir__ = this.__dir__, e.__filtered__ = this.__filtered__, e.__iteratees__ = ni(this.__iteratees__), e.__takeCount__ = this.__takeCount__, e.__views__ = ni(this.__views__), e;
- }
- function eg() {
- if (this.__filtered__) {
- var e = new ce(this);
- e.__dir__ = -1, e.__filtered__ = !0;
- } else
- e = this.clone(), e.__dir__ *= -1;
- return e;
- }
- function ig() {
- var e = this.__wrapped__.value(), C = this.__dir__, K = ie(e), st = C < 0, ut = K ? e.length : 0, mt = fm(0, ut, this.__views__), xt = mt.start, bt = mt.end, Ct = bt - xt, It = st ? bt : xt - 1, Rt = this.__iteratees__, Bt = Rt.length, zt = 0, Ut = Ze(Ct, this.__takeCount__);
- if (!K || !st && ut == Ct && Ut == Ct)
- return xc(e, this.__actions__);
- var Qt = [];
- t:
- for (; Ct-- && zt < Ut; ) {
- It += C;
- for (var ae = -1, te = e[It]; ++ae < Bt; ) {
- var he = Rt[ae], ue = he.iteratee, fi = he.type, ri = ue(te);
- if (fi == s)
- te = ri;
- else if (!ri) {
- if (fi == t)
- continue t;
- break t;
- }
- }
- Qt[zt++] = te;
- }
- return Qt;
- }
- ce.prototype = ln(Is.prototype), ce.prototype.constructor = ce;
- function Rr(e) {
- var C = -1, K = e == null ? 0 : e.length;
- for (this.clear(); ++C < K; ) {
- var st = e[C];
- this.set(st[0], st[1]);
- }
- }
- function rg() {
- this.__data__ = jn ? jn(null) : {}, this.size = 0;
- }
- function ng(e) {
- var C = this.has(e) && delete this.__data__[e];
- return this.size -= C ? 1 : 0, C;
- }
- function sg(e) {
- var C = this.__data__;
- if (jn) {
- var K = C[e];
- return K === H ? M : K;
- }
- return Se.call(C, e) ? C[e] : M;
- }
- function og(e) {
- var C = this.__data__;
- return jn ? C[e] !== M : Se.call(C, e);
- }
- function ag(e, C) {
- var K = this.__data__;
- return this.size += this.has(e) ? 0 : 1, K[e] = jn && C === M ? H : C, this;
- }
- Rr.prototype.clear = rg, Rr.prototype.delete = ng, Rr.prototype.get = sg, Rr.prototype.has = og, Rr.prototype.set = ag;
- function Ji(e) {
- var C = -1, K = e == null ? 0 : e.length;
- for (this.clear(); ++C < K; ) {
- var st = e[C];
- this.set(st[0], st[1]);
- }
- }
- function lg() {
- this.__data__ = [], this.size = 0;
- }
- function hg(e) {
- var C = this.__data__, K = Rs(C, e);
- if (K < 0)
- return !1;
- var st = C.length - 1;
- return K == st ? C.pop() : Ps.call(C, K, 1), --this.size, !0;
- }
- function cg(e) {
- var C = this.__data__, K = Rs(C, e);
- return K < 0 ? M : C[K][1];
- }
- function pg(e) {
- return Rs(this.__data__, e) > -1;
- }
- function ug(e, C) {
- var K = this.__data__, st = Rs(K, e);
- return st < 0 ? (++this.size, K.push([e, C])) : K[st][1] = C, this;
- }
- Ji.prototype.clear = lg, Ji.prototype.delete = hg, Ji.prototype.get = cg, Ji.prototype.has = pg, Ji.prototype.set = ug;
- function qi(e) {
- var C = -1, K = e == null ? 0 : e.length;
- for (this.clear(); ++C < K; ) {
- var st = e[C];
- this.set(st[0], st[1]);
- }
- }
- function dg() {
- this.size = 0, this.__data__ = {
- hash: new Rr(),
- map: new (Nn || Ji)(),
- string: new Rr()
- };
- }
- function fg(e) {
- var C = Vs(this, e).delete(e);
- return this.size -= C ? 1 : 0, C;
- }
- function gg(e) {
- return Vs(this, e).get(e);
- }
- function mg(e) {
- return Vs(this, e).has(e);
- }
- function yg(e, C) {
- var K = Vs(this, e), st = K.size;
- return K.set(e, C), this.size += K.size == st ? 0 : 1, this;
- }
- qi.prototype.clear = dg, qi.prototype.delete = fg, qi.prototype.get = gg, qi.prototype.has = mg, qi.prototype.set = yg;
- function Nr(e) {
- var C = -1, K = e == null ? 0 : e.length;
- for (this.__data__ = new qi(); ++C < K; )
- this.add(e[C]);
- }
- function vg(e) {
- return this.__data__.set(e, H), this;
- }
- function xg(e) {
- return this.__data__.has(e);
- }
- Nr.prototype.add = Nr.prototype.push = vg, Nr.prototype.has = xg;
- function _i(e) {
- var C = this.__data__ = new Ji(e);
- this.size = C.size;
- }
- function bg() {
- this.__data__ = new Ji(), this.size = 0;
- }
- function Sg(e) {
- var C = this.__data__, K = C.delete(e);
- return this.size = C.size, K;
- }
- function wg(e) {
- return this.__data__.get(e);
- }
- function Cg(e) {
- return this.__data__.has(e);
- }
- function Mg(e, C) {
- var K = this.__data__;
- if (K instanceof Ji) {
- var st = K.__data__;
- if (!Nn || st.length < y - 1)
- return st.push([e, C]), this.size = ++K.size, this;
- K = this.__data__ = new qi(st);
- }
- return K.set(e, C), this.size = K.size, this;
- }
- _i.prototype.clear = bg, _i.prototype.delete = Sg, _i.prototype.get = wg, _i.prototype.has = Cg, _i.prototype.set = Mg;
- function Kh(e, C) {
- var K = ie(e), st = !K && zr(e), ut = !K && !st && Ar(e), mt = !K && !st && !ut && un(e), xt = K || st || ut || mt, bt = xt ? sa(e.length, If) : [], Ct = bt.length;
- for (var It in e)
- (C || Se.call(e, It)) && !(xt && // Safari 9 has enumerable `arguments.length` in strict mode.
- (It == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
- ut && (It == "offset" || It == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
- mt && (It == "buffer" || It == "byteLength" || It == "byteOffset") || // Skip index properties.
- ir(It, Ct))) && bt.push(It);
- return bt;
- }
- function Jh(e) {
- var C = e.length;
- return C ? e[wa(0, C - 1)] : M;
- }
- function kg(e, C) {
- return $s(ni(e), Br(C, 0, e.length));
- }
- function Ag(e) {
- return $s(ni(e));
- }
- function ua(e, C, K) {
- (K !== M && !Di(e[C], K) || K === M && !(C in e)) && Qi(e, C, K);
- }
- function Yn(e, C, K) {
- var st = e[C];
- (!(Se.call(e, C) && Di(st, K)) || K === M && !(C in e)) && Qi(e, C, K);
- }
- function Rs(e, C) {
- for (var K = e.length; K--; )
- if (Di(e[K][0], C))
- return K;
- return -1;
- }
- function Tg(e, C, K, st) {
- return wr(e, function(ut, mt, xt) {
- C(st, ut, K(ut), xt);
- }), st;
- }
- function qh(e, C) {
- return e && Hi(C, He(C), e);
- }
- function Pg(e, C) {
- return e && Hi(C, oi(C), e);
- }
- function Qi(e, C, K) {
- C == "__proto__" && Es ? Es(e, C, {
- configurable: !0,
- enumerable: !0,
- value: K,
- writable: !0
- }) : e[C] = K;
- }
- function da(e, C) {
- for (var K = -1, st = C.length, ut = Tt(st), mt = e == null; ++K < st; )
- ut[K] = mt ? M : Va(e, C[K]);
- return ut;
- }
- function Br(e, C, K) {
- return e === e && (K !== M && (e = e <= K ? e : K), C !== M && (e = e >= C ? e : C)), e;
- }
- function wi(e, C, K, st, ut, mt) {
- var xt, bt = C & R, Ct = C & B, It = C & S;
- if (K && (xt = ut ? K(e, st, ut, mt) : K(e)), xt !== M)
- return xt;
- if (!Ie(e))
- return e;
- var Rt = ie(e);
- if (Rt) {
- if (xt = mm(e), !bt)
- return ni(e, xt);
- } else {
- var Bt = Ke(e), zt = Bt == Z || Bt == q;
- if (Ar(e))
- return wc(e, bt);
- if (Bt == rt || Bt == L || zt && !ut) {
- if (xt = Ct || zt ? {} : zc(e), !bt)
- return Ct ? sm(e, Pg(xt, e)) : nm(e, qh(xt, e));
- } else {
- if (!ke[Bt])
- return ut ? e : {};
- xt = ym(e, Bt, bt);
- }
- }
- mt || (mt = new _i());
- var Ut = mt.get(e);
- if (Ut)
- return Ut;
- mt.set(e, xt), mp(e) ? e.forEach(function(te) {
- xt.add(wi(te, C, K, te, e, mt));
- }) : fp(e) && e.forEach(function(te, he) {
- xt.set(he, wi(te, C, K, he, e, mt));
- });
- var Qt = It ? Ct ? Da : _a : Ct ? oi : He, ae = Rt ? M : Qt(e);
- return xi(ae || e, function(te, he) {
- ae && (he = te, te = e[he]), Yn(xt, he, wi(te, C, K, he, e, mt));
- }), xt;
- }
- function Eg(e) {
- var C = He(e);
- return function(K) {
- return Qh(K, e, C);
- };
- }
- function Qh(e, C, K) {
- var st = K.length;
- if (e == null)
- return !st;
- for (e = Me(e); st--; ) {
- var ut = K[st], mt = C[ut], xt = e[ut];
- if (xt === M && !(ut in e) || !mt(xt))
- return !1;
- }
- return !0;
- }
- function tc(e, C, K) {
- if (typeof e != "function")
- throw new bi(D);
- return Vn(function() {
- e.apply(M, K);
- }, C);
- }
- function zn(e, C, K, st) {
- var ut = -1, mt = vs, xt = !0, bt = e.length, Ct = [], It = C.length;
- if (!bt)
- return Ct;
- K && (C = Ee(C, pi(K))), st ? (mt = Qo, xt = !1) : C.length >= y && (mt = In, xt = !1, C = new Nr(C));
- t:
- for (; ++ut < bt; ) {
- var Rt = e[ut], Bt = K == null ? Rt : K(Rt);
- if (Rt = st || Rt !== 0 ? Rt : 0, xt && Bt === Bt) {
- for (var zt = It; zt--; )
- if (C[zt] === Bt)
- continue t;
- Ct.push(Rt);
- } else
- mt(C, Bt, st) || Ct.push(Rt);
- }
- return Ct;
- }
- var wr = Tc(Gi), ec = Tc(ga, !0);
- function Og(e, C) {
- var K = !0;
- return wr(e, function(st, ut, mt) {
- return K = !!C(st, ut, mt), K;
- }), K;
- }
- function Ns(e, C, K) {
- for (var st = -1, ut = e.length; ++st < ut; ) {
- var mt = e[st], xt = C(mt);
- if (xt != null && (bt === M ? xt === xt && !di(xt) : K(xt, bt)))
- var bt = xt, Ct = mt;
- }
- return Ct;
- }
- function Lg(e, C, K, st) {
- var ut = e.length;
- for (K = se(K), K < 0 && (K = -K > ut ? 0 : ut + K), st = st === M || st > ut ? ut : se(st), st < 0 && (st += ut), st = K > st ? 0 : vp(st); K < st; )
- e[K++] = C;
- return e;
- }
- function ic(e, C) {
- var K = [];
- return wr(e, function(st, ut, mt) {
- C(st, ut, mt) && K.push(st);
- }), K;
- }
- function Ve(e, C, K, st, ut) {
- var mt = -1, xt = e.length;
- for (K || (K = xm), ut || (ut = []); ++mt < xt; ) {
- var bt = e[mt];
- C > 0 && K(bt) ? C > 1 ? Ve(bt, C - 1, K, st, ut) : xr(ut, bt) : st || (ut[ut.length] = bt);
- }
- return ut;
- }
- var fa = Pc(), rc = Pc(!0);
- function Gi(e, C) {
- return e && fa(e, C, He);
- }
- function ga(e, C) {
- return e && rc(e, C, He);
- }
- function Bs(e, C) {
- return vr(C, function(K) {
- return rr(e[K]);
- });
- }
- function jr(e, C) {
- C = Mr(C, e);
- for (var K = 0, st = C.length; e != null && K < st; )
- e = e[Fi(C[K++])];
- return K && K == st ? e : M;
- }
- function nc(e, C, K) {
- var st = C(e);
- return ie(e) ? st : xr(st, K(e));
- }
- function ei(e) {
- return e == null ? e === M ? tt : nt : Ir && Ir in Me(e) ? dm(e) : Am(e);
- }
- function ma(e, C) {
- return e > C;
- }
- function _g(e, C) {
- return e != null && Se.call(e, C);
- }
- function Dg(e, C) {
- return e != null && C in Me(e);
- }
- function Ig(e, C, K) {
- return e >= Ze(C, K) && e < Xe(C, K);
- }
- function ya(e, C, K) {
- for (var st = K ? Qo : vs, ut = e[0].length, mt = e.length, xt = mt, bt = Tt(mt), Ct = 1 / 0, It = []; xt--; ) {
- var Rt = e[xt];
- xt && C && (Rt = Ee(Rt, pi(C))), Ct = Ze(Rt.length, Ct), bt[xt] = !K && (C || ut >= 120 && Rt.length >= 120) ? new Nr(xt && Rt) : M;
- }
- Rt = e[0];
- var Bt = -1, zt = bt[0];
- t:
- for (; ++Bt < ut && It.length < Ct; ) {
- var Ut = Rt[Bt], Qt = C ? C(Ut) : Ut;
- if (Ut = K || Ut !== 0 ? Ut : 0, !(zt ? In(zt, Qt) : st(It, Qt, K))) {
- for (xt = mt; --xt; ) {
- var ae = bt[xt];
- if (!(ae ? In(ae, Qt) : st(e[xt], Qt, K)))
- continue t;
- }
- zt && zt.push(Qt), It.push(Ut);
- }
- }
- return It;
- }
- function Rg(e, C, K, st) {
- return Gi(e, function(ut, mt, xt) {
- C(st, K(ut), mt, xt);
- }), st;
- }
- function Xn(e, C, K) {
- C = Mr(C, e), e = Fc(e, C);
- var st = e == null ? e : e[Fi(Mi(C))];
- return st == null ? M : ci(st, e, K);
- }
- function sc(e) {
- return Ne(e) && ei(e) == L;
- }
- function Ng(e) {
- return Ne(e) && ei(e) == pt;
- }
- function Bg(e) {
- return Ne(e) && ei(e) == A;
- }
- function Gn(e, C, K, st, ut) {
- return e === C ? !0 : e == null || C == null || !Ne(e) && !Ne(C) ? e !== e && C !== C : jg(e, C, K, st, Gn, ut);
- }
- function jg(e, C, K, st, ut, mt) {
- var xt = ie(e), bt = ie(C), Ct = xt ? z : Ke(e), It = bt ? z : Ke(C);
- Ct = Ct == L ? rt : Ct, It = It == L ? rt : It;
- var Rt = Ct == rt, Bt = It == rt, zt = Ct == It;
- if (zt && Ar(e)) {
- if (!Ar(C))
- return !1;
- xt = !0, Rt = !1;
- }
- if (zt && !Rt)
- return mt || (mt = new _i()), xt || un(e) ? jc(e, C, K, st, ut, mt) : pm(e, C, Ct, K, st, ut, mt);
- if (!(K & x)) {
- var Ut = Rt && Se.call(e, "__wrapped__"), Qt = Bt && Se.call(C, "__wrapped__");
- if (Ut || Qt) {
- var ae = Ut ? e.value() : e, te = Qt ? C.value() : C;
- return mt || (mt = new _i()), ut(ae, te, K, st, mt);
- }
- }
- return zt ? (mt || (mt = new _i()), um(e, C, K, st, ut, mt)) : !1;
- }
- function Wg(e) {
- return Ne(e) && Ke(e) == it;
- }
- function va(e, C, K, st) {
- var ut = K.length, mt = ut, xt = !st;
- if (e == null)
- return !mt;
- for (e = Me(e); ut--; ) {
- var bt = K[ut];
- if (xt && bt[2] ? bt[1] !== e[bt[0]] : !(bt[0] in e))
- return !1;
- }
- for (; ++ut < mt; ) {
- bt = K[ut];
- var Ct = bt[0], It = e[Ct], Rt = bt[1];
- if (xt && bt[2]) {
- if (It === M && !(Ct in e))
- return !1;
- } else {
- var Bt = new _i();
- if (st)
- var zt = st(It, Rt, Ct, e, C, Bt);
- if (!(zt === M ? Gn(Rt, It, x | f, st, Bt) : zt))
- return !1;
- }
- }
- return !0;
- }
- function oc(e) {
- if (!Ie(e) || Sm(e))
- return !1;
- var C = rr(e) ? Wf : De;
- return C.test(Yr(e));
- }
- function Yg(e) {
- return Ne(e) && ei(e) == dt;
- }
- function zg(e) {
- return Ne(e) && Ke(e) == ht;
- }
- function Xg(e) {
- return Ne(e) && to(e.length) && !!Ae[ei(e)];
- }
- function ac(e) {
- return typeof e == "function" ? e : e == null ? ai : typeof e == "object" ? ie(e) ? cc(e[0], e[1]) : hc(e) : Ep(e);
- }
- function xa(e) {
- if (!Un(e))
- return Ff(e);
- var C = [];
- for (var K in Me(e))
- Se.call(e, K) && K != "constructor" && C.push(K);
- return C;
- }
- function Gg(e) {
- if (!Ie(e))
- return km(e);
- var C = Un(e), K = [];
- for (var st in e)
- st == "constructor" && (C || !Se.call(e, st)) || K.push(st);
- return K;
- }
- function ba(e, C) {
- return e < C;
- }
- function lc(e, C) {
- var K = -1, st = si(e) ? Tt(e.length) : [];
- return wr(e, function(ut, mt, xt) {
- st[++K] = C(ut, mt, xt);
- }), st;
- }
- function hc(e) {
- var C = Ra(e);
- return C.length == 1 && C[0][2] ? Gc(C[0][0], C[0][1]) : function(K) {
- return K === e || va(K, e, C);
- };
- }
- function cc(e, C) {
- return Ba(e) && Xc(C) ? Gc(Fi(e), C) : function(K) {
- var st = Va(K, e);
- return st === M && st === C ? $a(K, e) : Gn(C, st, x | f);
- };
- }
- function js(e, C, K, st, ut) {
- e !== C && fa(C, function(mt, xt) {
- if (ut || (ut = new _i()), Ie(mt))
- Hg(e, C, xt, K, js, st, ut);
- else {
- var bt = st ? st(Wa(e, xt), mt, xt + "", e, C, ut) : M;
- bt === M && (bt = mt), ua(e, xt, bt);
- }
- }, oi);
- }
- function Hg(e, C, K, st, ut, mt, xt) {
- var bt = Wa(e, K), Ct = Wa(C, K), It = xt.get(Ct);
- if (It) {
- ua(e, K, It);
- return;
- }
- var Rt = mt ? mt(bt, Ct, K + "", e, C, xt) : M, Bt = Rt === M;
- if (Bt) {
- var zt = ie(Ct), Ut = !zt && Ar(Ct), Qt = !zt && !Ut && un(Ct);
- Rt = Ct, zt || Ut || Qt ? ie(bt) ? Rt = bt : Be(bt) ? Rt = ni(bt) : Ut ? (Bt = !1, Rt = wc(Ct, !0)) : Qt ? (Bt = !1, Rt = Cc(Ct, !0)) : Rt = [] : $n(Ct) || zr(Ct) ? (Rt = bt, zr(bt) ? Rt = xp(bt) : (!Ie(bt) || rr(bt)) && (Rt = zc(Ct))) : Bt = !1;
- }
- Bt && (xt.set(Ct, Rt), ut(Rt, Ct, st, mt, xt), xt.delete(Ct)), ua(e, K, Rt);
- }
- function pc(e, C) {
- var K = e.length;
- if (K)
- return C += C < 0 ? K : 0, ir(C, K) ? e[C] : M;
- }
- function uc(e, C, K) {
- C.length ? C = Ee(C, function(mt) {
- return ie(mt) ? function(xt) {
- return jr(xt, mt.length === 1 ? mt[0] : mt);
- } : mt;
- }) : C = [ai];
- var st = -1;
- C = Ee(C, pi(qt()));
- var ut = lc(e, function(mt, xt, bt) {
- var Ct = Ee(C, function(It) {
- return It(mt);
- });
- return { criteria: Ct, index: ++st, value: mt };
- });
- return yf(ut, function(mt, xt) {
- return rm(mt, xt, K);
- });
- }
- function Fg(e, C) {
- return dc(e, C, function(K, st) {
- return $a(e, st);
- });
- }
- function dc(e, C, K) {
- for (var st = -1, ut = C.length, mt = {}; ++st < ut; ) {
- var xt = C[st], bt = jr(e, xt);
- K(bt, xt) && Hn(mt, Mr(xt, e), bt);
- }
- return mt;
- }
- function Ug(e) {
- return function(C) {
- return jr(C, e);
- };
- }
- function Sa(e, C, K, st) {
- var ut = st ? mf : tn, mt = -1, xt = C.length, bt = e;
- for (e === C && (C = ni(C)), K && (bt = Ee(e, pi(K))); ++mt < xt; )
- for (var Ct = 0, It = C[mt], Rt = K ? K(It) : It; (Ct = ut(bt, Rt, Ct, st)) > -1; )
- bt !== e && Ps.call(bt, Ct, 1), Ps.call(e, Ct, 1);
- return e;
- }
- function fc(e, C) {
- for (var K = e ? C.length : 0, st = K - 1; K--; ) {
- var ut = C[K];
- if (K == st || ut !== mt) {
- var mt = ut;
- ir(ut) ? Ps.call(e, ut, 1) : ka(e, ut);
- }
- }
- return e;
- }
- function wa(e, C) {
- return e + Ls($h() * (C - e + 1));
- }
- function Vg(e, C, K, st) {
- for (var ut = -1, mt = Xe(Os((C - e) / (K || 1)), 0), xt = Tt(mt); mt--; )
- xt[st ? mt : ++ut] = e, e += K;
- return xt;
- }
- function Ca(e, C) {
- var K = "";
- if (!e || C < 1 || C > _)
- return K;
- do
- C % 2 && (K += e), C = Ls(C / 2), C && (e += e);
- while (C);
- return K;
- }
- function le(e, C) {
- return Ya(Hc(e, C, ai), e + "");
- }
- function $g(e) {
- return Jh(dn(e));
- }
- function Zg(e, C) {
- var K = dn(e);
- return $s(K, Br(C, 0, K.length));
- }
- function Hn(e, C, K, st) {
- if (!Ie(e))
- return e;
- C = Mr(C, e);
- for (var ut = -1, mt = C.length, xt = mt - 1, bt = e; bt != null && ++ut < mt; ) {
- var Ct = Fi(C[ut]), It = K;
- if (Ct === "__proto__" || Ct === "constructor" || Ct === "prototype")
- return e;
- if (ut != xt) {
- var Rt = bt[Ct];
- It = st ? st(Rt, Ct, bt) : M, It === M && (It = Ie(Rt) ? Rt : ir(C[ut + 1]) ? [] : {});
- }
- Yn(bt, Ct, It), bt = bt[Ct];
- }
- return e;
- }
- var gc = _s ? function(e, C) {
- return _s.set(e, C), e;
- } : ai, Kg = Es ? function(e, C) {
- return Es(e, "toString", {
- configurable: !0,
- enumerable: !1,
- value: Ka(C),
- writable: !0
- });
- } : ai;
- function Jg(e) {
- return $s(dn(e));
- }
- function Ci(e, C, K) {
- var st = -1, ut = e.length;
- C < 0 && (C = -C > ut ? 0 : ut + C), K = K > ut ? ut : K, K < 0 && (K += ut), ut = C > K ? 0 : K - C >>> 0, C >>>= 0;
- for (var mt = Tt(ut); ++st < ut; )
- mt[st] = e[st + C];
- return mt;
- }
- function qg(e, C) {
- var K;
- return wr(e, function(st, ut, mt) {
- return K = C(st, ut, mt), !K;
- }), !!K;
- }
- function Ws(e, C, K) {
- var st = 0, ut = e == null ? st : e.length;
- if (typeof C == "number" && C === C && ut <= g) {
- for (; st < ut; ) {
- var mt = st + ut >>> 1, xt = e[mt];
- xt !== null && !di(xt) && (K ? xt <= C : xt < C) ? st = mt + 1 : ut = mt;
- }
- return ut;
- }
- return Ma(e, C, ai, K);
- }
- function Ma(e, C, K, st) {
- var ut = 0, mt = e == null ? 0 : e.length;
- if (mt === 0)
- return 0;
- C = K(C);
- for (var xt = C !== C, bt = C === null, Ct = di(C), It = C === M; ut < mt; ) {
- var Rt = Ls((ut + mt) / 2), Bt = K(e[Rt]), zt = Bt !== M, Ut = Bt === null, Qt = Bt === Bt, ae = di(Bt);
- if (xt)
- var te = st || Qt;
- else
- It ? te = Qt && (st || zt) : bt ? te = Qt && zt && (st || !Ut) : Ct ? te = Qt && zt && !Ut && (st || !ae) : Ut || ae ? te = !1 : te = st ? Bt <= C : Bt < C;
- te ? ut = Rt + 1 : mt = Rt;
- }
- return Ze(mt, X);
- }
- function mc(e, C) {
- for (var K = -1, st = e.length, ut = 0, mt = []; ++K < st; ) {
- var xt = e[K], bt = C ? C(xt) : xt;
- if (!K || !Di(bt, Ct)) {
- var Ct = bt;
- mt[ut++] = xt === 0 ? 0 : xt;
- }
- }
- return mt;
- }
- function yc(e) {
- return typeof e == "number" ? e : di(e) ? W : +e;
- }
- function ui(e) {
- if (typeof e == "string")
- return e;
- if (ie(e))
- return Ee(e, ui) + "";
- if (di(e))
- return Zh ? Zh.call(e) : "";
- var C = e + "";
- return C == "0" && 1 / e == -P ? "-0" : C;
- }
- function Cr(e, C, K) {
- var st = -1, ut = vs, mt = e.length, xt = !0, bt = [], Ct = bt;
- if (K)
- xt = !1, ut = Qo;
- else if (mt >= y) {
- var It = C ? null : hm(e);
- if (It)
- return bs(It);
- xt = !1, ut = In, Ct = new Nr();
- } else
- Ct = C ? [] : bt;
- t:
- for (; ++st < mt; ) {
- var Rt = e[st], Bt = C ? C(Rt) : Rt;
- if (Rt = K || Rt !== 0 ? Rt : 0, xt && Bt === Bt) {
- for (var zt = Ct.length; zt--; )
- if (Ct[zt] === Bt)
- continue t;
- C && Ct.push(Bt), bt.push(Rt);
- } else
- ut(Ct, Bt, K) || (Ct !== bt && Ct.push(Bt), bt.push(Rt));
- }
- return bt;
- }
- function ka(e, C) {
- return C = Mr(C, e), e = Fc(e, C), e == null || delete e[Fi(Mi(C))];
- }
- function vc(e, C, K, st) {
- return Hn(e, C, K(jr(e, C)), st);
- }
- function Ys(e, C, K, st) {
- for (var ut = e.length, mt = st ? ut : -1; (st ? mt-- : ++mt < ut) && C(e[mt], mt, e); )
- ;
- return K ? Ci(e, st ? 0 : mt, st ? mt + 1 : ut) : Ci(e, st ? mt + 1 : 0, st ? ut : mt);
- }
- function xc(e, C) {
- var K = e;
- return K instanceof ce && (K = K.value()), ta(C, function(st, ut) {
- return ut.func.apply(ut.thisArg, xr([st], ut.args));
- }, K);
- }
- function Aa(e, C, K) {
- var st = e.length;
- if (st < 2)
- return st ? Cr(e[0]) : [];
- for (var ut = -1, mt = Tt(st); ++ut < st; )
- for (var xt = e[ut], bt = -1; ++bt < st; )
- bt != ut && (mt[ut] = zn(mt[ut] || xt, e[bt], C, K));
- return Cr(Ve(mt, 1), C, K);
- }
- function bc(e, C, K) {
- for (var st = -1, ut = e.length, mt = C.length, xt = {}; ++st < ut; ) {
- var bt = st < mt ? C[st] : M;
- K(xt, e[st], bt);
- }
- return xt;
- }
- function Ta(e) {
- return Be(e) ? e : [];
- }
- function Pa(e) {
- return typeof e == "function" ? e : ai;
- }
- function Mr(e, C) {
- return ie(e) ? e : Ba(e, C) ? [e] : Zc(xe(e));
- }
- var Qg = le;
- function kr(e, C, K) {
- var st = e.length;
- return K = K === M ? st : K, !C && K >= st ? e : Ci(e, C, K);
- }
- var Sc = Yf || function(e) {
- return Ue.clearTimeout(e);
- };
- function wc(e, C) {
- if (C)
- return e.slice();
- var K = e.length, st = Gh ? Gh(K) : new e.constructor(K);
- return e.copy(st), st;
- }
- function Ea(e) {
- var C = new e.constructor(e.byteLength);
- return new As(C).set(new As(e)), C;
- }
- function tm(e, C) {
- var K = C ? Ea(e.buffer) : e.buffer;
- return new e.constructor(K, e.byteOffset, e.byteLength);
- }
- function em(e) {
- var C = new e.constructor(e.source, de.exec(e));
- return C.lastIndex = e.lastIndex, C;
- }
- function im(e) {
- return Wn ? Me(Wn.call(e)) : {};
- }
- function Cc(e, C) {
- var K = C ? Ea(e.buffer) : e.buffer;
- return new e.constructor(K, e.byteOffset, e.length);
- }
- function Mc(e, C) {
- if (e !== C) {
- var K = e !== M, st = e === null, ut = e === e, mt = di(e), xt = C !== M, bt = C === null, Ct = C === C, It = di(C);
- if (!bt && !It && !mt && e > C || mt && xt && Ct && !bt && !It || st && xt && Ct || !K && Ct || !ut)
- return 1;
- if (!st && !mt && !It && e < C || It && K && ut && !st && !mt || bt && K && ut || !xt && ut || !Ct)
- return -1;
- }
- return 0;
- }
- function rm(e, C, K) {
- for (var st = -1, ut = e.criteria, mt = C.criteria, xt = ut.length, bt = K.length; ++st < xt; ) {
- var Ct = Mc(ut[st], mt[st]);
- if (Ct) {
- if (st >= bt)
- return Ct;
- var It = K[st];
- return Ct * (It == "desc" ? -1 : 1);
- }
- }
- return e.index - C.index;
- }
- function kc(e, C, K, st) {
- for (var ut = -1, mt = e.length, xt = K.length, bt = -1, Ct = C.length, It = Xe(mt - xt, 0), Rt = Tt(Ct + It), Bt = !st; ++bt < Ct; )
- Rt[bt] = C[bt];
- for (; ++ut < xt; )
- (Bt || ut < mt) && (Rt[K[ut]] = e[ut]);
- for (; It--; )
- Rt[bt++] = e[ut++];
- return Rt;
- }
- function Ac(e, C, K, st) {
- for (var ut = -1, mt = e.length, xt = -1, bt = K.length, Ct = -1, It = C.length, Rt = Xe(mt - bt, 0), Bt = Tt(Rt + It), zt = !st; ++ut < Rt; )
- Bt[ut] = e[ut];
- for (var Ut = ut; ++Ct < It; )
- Bt[Ut + Ct] = C[Ct];
- for (; ++xt < bt; )
- (zt || ut < mt) && (Bt[Ut + K[xt]] = e[ut++]);
- return Bt;
- }
- function ni(e, C) {
- var K = -1, st = e.length;
- for (C || (C = Tt(st)); ++K < st; )
- C[K] = e[K];
- return C;
- }
- function Hi(e, C, K, st) {
- var ut = !K;
- K || (K = {});
- for (var mt = -1, xt = C.length; ++mt < xt; ) {
- var bt = C[mt], Ct = st ? st(K[bt], e[bt], bt, K, e) : M;
- Ct === M && (Ct = e[bt]), ut ? Qi(K, bt, Ct) : Yn(K, bt, Ct);
- }
- return K;
- }
- function nm(e, C) {
- return Hi(e, Na(e), C);
- }
- function sm(e, C) {
- return Hi(e, Wc(e), C);
- }
- function zs(e, C) {
- return function(K, st) {
- var ut = ie(K) ? cf : Tg, mt = C ? C() : {};
- return ut(K, e, qt(st, 2), mt);
- };
- }
- function hn(e) {
- return le(function(C, K) {
- var st = -1, ut = K.length, mt = ut > 1 ? K[ut - 1] : M, xt = ut > 2 ? K[2] : M;
- for (mt = e.length > 3 && typeof mt == "function" ? (ut--, mt) : M, xt && ii(K[0], K[1], xt) && (mt = ut < 3 ? M : mt, ut = 1), C = Me(C); ++st < ut; ) {
- var bt = K[st];
- bt && e(C, bt, st, mt);
- }
- return C;
- });
- }
- function Tc(e, C) {
- return function(K, st) {
- if (K == null)
- return K;
- if (!si(K))
- return e(K, st);
- for (var ut = K.length, mt = C ? ut : -1, xt = Me(K); (C ? mt-- : ++mt < ut) && st(xt[mt], mt, xt) !== !1; )
- ;
- return K;
- };
- }
- function Pc(e) {
- return function(C, K, st) {
- for (var ut = -1, mt = Me(C), xt = st(C), bt = xt.length; bt--; ) {
- var Ct = xt[e ? bt : ++ut];
- if (K(mt[Ct], Ct, mt) === !1)
- break;
- }
- return C;
- };
- }
- function om(e, C, K) {
- var st = C & d, ut = Fn(e);
- function mt() {
- var xt = this && this !== Ue && this instanceof mt ? ut : e;
- return xt.apply(st ? K : this, arguments);
- }
- return mt;
- }
- function Ec(e) {
- return function(C) {
- C = xe(C);
- var K = en(C) ? Li(C) : M, st = K ? K[0] : C.charAt(0), ut = K ? kr(K, 1).join("") : C.slice(1);
- return st[e]() + ut;
- };
- }
- function cn(e) {
- return function(C) {
- return ta(Tp(Ap(C).replace(Zd, "")), e, "");
- };
- }
- function Fn(e) {
- return function() {
- var C = arguments;
- switch (C.length) {
- case 0:
- return new e();
- case 1:
- return new e(C[0]);
- case 2:
- return new e(C[0], C[1]);
- case 3:
- return new e(C[0], C[1], C[2]);
- case 4:
- return new e(C[0], C[1], C[2], C[3]);
- case 5:
- return new e(C[0], C[1], C[2], C[3], C[4]);
- case 6:
- return new e(C[0], C[1], C[2], C[3], C[4], C[5]);
- case 7:
- return new e(C[0], C[1], C[2], C[3], C[4], C[5], C[6]);
- }
- var K = ln(e.prototype), st = e.apply(K, C);
- return Ie(st) ? st : K;
- };
- }
- function am(e, C, K) {
- var st = Fn(e);
- function ut() {
- for (var mt = arguments.length, xt = Tt(mt), bt = mt, Ct = pn(ut); bt--; )
- xt[bt] = arguments[bt];
- var It = mt < 3 && xt[0] !== Ct && xt[mt - 1] !== Ct ? [] : br(xt, Ct);
- if (mt -= It.length, mt < K)
- return Ic(
- e,
- C,
- Xs,
- ut.placeholder,
- M,
- xt,
- It,
- M,
- M,
- K - mt
- );
- var Rt = this && this !== Ue && this instanceof ut ? st : e;
- return ci(Rt, this, xt);
- }
- return ut;
- }
- function Oc(e) {
- return function(C, K, st) {
- var ut = Me(C);
- if (!si(C)) {
- var mt = qt(K, 3);
- C = He(C), K = function(bt) {
- return mt(ut[bt], bt, ut);
- };
- }
- var xt = e(C, K, st);
- return xt > -1 ? ut[mt ? C[xt] : xt] : M;
- };
- }
- function Lc(e) {
- return er(function(C) {
- var K = C.length, st = K, ut = Si.prototype.thru;
- for (e && C.reverse(); st--; ) {
- var mt = C[st];
- if (typeof mt != "function")
- throw new bi(D);
- if (ut && !xt && Us(mt) == "wrapper")
- var xt = new Si([], !0);
- }
- for (st = xt ? st : K; ++st < K; ) {
- mt = C[st];
- var bt = Us(mt), Ct = bt == "wrapper" ? Ia(mt) : M;
- Ct && ja(Ct[0]) && Ct[1] == (v | j | b | l) && !Ct[4].length && Ct[9] == 1 ? xt = xt[Us(Ct[0])].apply(xt, Ct[3]) : xt = mt.length == 1 && ja(mt) ? xt[bt]() : xt.thru(mt);
- }
- return function() {
- var It = arguments, Rt = It[0];
- if (xt && It.length == 1 && ie(Rt))
- return xt.plant(Rt).value();
- for (var Bt = 0, zt = K ? C[Bt].apply(this, It) : Rt; ++Bt < K; )
- zt = C[Bt].call(this, zt);
- return zt;
- };
- });
- }
- function Xs(e, C, K, st, ut, mt, xt, bt, Ct, It) {
- var Rt = C & v, Bt = C & d, zt = C & T, Ut = C & (j | k), Qt = C & h, ae = zt ? M : Fn(e);
- function te() {
- for (var he = arguments.length, ue = Tt(he), fi = he; fi--; )
- ue[fi] = arguments[fi];
- if (Ut)
- var ri = pn(te), gi = xf(ue, ri);
- if (st && (ue = kc(ue, st, ut, Ut)), mt && (ue = Ac(ue, mt, xt, Ut)), he -= gi, Ut && he < It) {
- var je = br(ue, ri);
- return Ic(
- e,
- C,
- Xs,
- te.placeholder,
- K,
- ue,
- je,
- bt,
- Ct,
- It - he
- );
- }
- var Ii = Bt ? K : this, sr = zt ? Ii[e] : e;
- return he = ue.length, bt ? ue = Tm(ue, bt) : Qt && he > 1 && ue.reverse(), Rt && Ct < he && (ue.length = Ct), this && this !== Ue && this instanceof te && (sr = ae || Fn(sr)), sr.apply(Ii, ue);
- }
- return te;
- }
- function _c(e, C) {
- return function(K, st) {
- return Rg(K, e, C(st), {});
- };
- }
- function Gs(e, C) {
- return function(K, st) {
- var ut;
- if (K === M && st === M)
- return C;
- if (K !== M && (ut = K), st !== M) {
- if (ut === M)
- return st;
- typeof K == "string" || typeof st == "string" ? (K = ui(K), st = ui(st)) : (K = yc(K), st = yc(st)), ut = e(K, st);
- }
- return ut;
- };
- }
- function Oa(e) {
- return er(function(C) {
- return C = Ee(C, pi(qt())), le(function(K) {
- var st = this;
- return e(C, function(ut) {
- return ci(ut, st, K);
- });
- });
- });
- }
- function Hs(e, C) {
- C = C === M ? " " : ui(C);
- var K = C.length;
- if (K < 2)
- return K ? Ca(C, e) : C;
- var st = Ca(C, Os(e / rn(C)));
- return en(C) ? kr(Li(st), 0, e).join("") : st.slice(0, e);
- }
- function lm(e, C, K, st) {
- var ut = C & d, mt = Fn(e);
- function xt() {
- for (var bt = -1, Ct = arguments.length, It = -1, Rt = st.length, Bt = Tt(Rt + Ct), zt = this && this !== Ue && this instanceof xt ? mt : e; ++It < Rt; )
- Bt[It] = st[It];
- for (; Ct--; )
- Bt[It++] = arguments[++bt];
- return ci(zt, ut ? K : this, Bt);
- }
- return xt;
- }
- function Dc(e) {
- return function(C, K, st) {
- return st && typeof st != "number" && ii(C, K, st) && (K = st = M), C = nr(C), K === M ? (K = C, C = 0) : K = nr(K), st = st === M ? C < K ? 1 : -1 : nr(st), Vg(C, K, st, e);
- };
- }
- function Fs(e) {
- return function(C, K) {
- return typeof C == "string" && typeof K == "string" || (C = ki(C), K = ki(K)), e(C, K);
- };
- }
- function Ic(e, C, K, st, ut, mt, xt, bt, Ct, It) {
- var Rt = C & j, Bt = Rt ? xt : M, zt = Rt ? M : xt, Ut = Rt ? mt : M, Qt = Rt ? M : mt;
- C |= Rt ? b : w, C &= ~(Rt ? w : b), C & O || (C &= ~(d | T));
- var ae = [
- e,
- C,
- ut,
- Ut,
- Bt,
- Qt,
- zt,
- bt,
- Ct,
- It
- ], te = K.apply(M, ae);
- return ja(e) && Uc(te, ae), te.placeholder = st, Vc(te, e, C);
- }
- function La(e) {
- var C = ze[e];
- return function(K, st) {
- if (K = ki(K), st = st == null ? 0 : Ze(se(st), 292), st && Vh(K)) {
- var ut = (xe(K) + "e").split("e"), mt = C(ut[0] + "e" + (+ut[1] + st));
- return ut = (xe(mt) + "e").split("e"), +(ut[0] + "e" + (+ut[1] - st));
- }
- return C(K);
- };
- }
- var hm = on && 1 / bs(new on([, -0]))[1] == P ? function(e) {
- return new on(e);
- } : Qa;
- function Rc(e) {
- return function(C) {
- var K = Ke(C);
- return K == it ? aa(C) : K == ht ? Af(C) : vf(C, e(C));
- };
- }
- function tr(e, C, K, st, ut, mt, xt, bt) {
- var Ct = C & T;
- if (!Ct && typeof e != "function")
- throw new bi(D);
- var It = st ? st.length : 0;
- if (It || (C &= ~(b | w), st = ut = M), xt = xt === M ? xt : Xe(se(xt), 0), bt = bt === M ? bt : se(bt), It -= ut ? ut.length : 0, C & w) {
- var Rt = st, Bt = ut;
- st = ut = M;
- }
- var zt = Ct ? M : Ia(e), Ut = [
- e,
- C,
- K,
- st,
- ut,
- Rt,
- Bt,
- mt,
- xt,
- bt
- ];
- if (zt && Mm(Ut, zt), e = Ut[0], C = Ut[1], K = Ut[2], st = Ut[3], ut = Ut[4], bt = Ut[9] = Ut[9] === M ? Ct ? 0 : e.length : Xe(Ut[9] - It, 0), !bt && C & (j | k) && (C &= ~(j | k)), !C || C == d)
- var Qt = om(e, C, K);
- else
- C == j || C == k ? Qt = am(e, C, bt) : (C == b || C == (d | b)) && !ut.length ? Qt = lm(e, C, K, st) : Qt = Xs.apply(M, Ut);
- var ae = zt ? gc : Uc;
- return Vc(ae(Qt, Ut), e, C);
- }
- function Nc(e, C, K, st) {
- return e === M || Di(e, sn[K]) && !Se.call(st, K) ? C : e;
- }
- function Bc(e, C, K, st, ut, mt) {
- return Ie(e) && Ie(C) && (mt.set(C, e), js(e, C, M, Bc, mt), mt.delete(C)), e;
- }
- function cm(e) {
- return $n(e) ? M : e;
- }
- function jc(e, C, K, st, ut, mt) {
- var xt = K & x, bt = e.length, Ct = C.length;
- if (bt != Ct && !(xt && Ct > bt))
- return !1;
- var It = mt.get(e), Rt = mt.get(C);
- if (It && Rt)
- return It == C && Rt == e;
- var Bt = -1, zt = !0, Ut = K & f ? new Nr() : M;
- for (mt.set(e, C), mt.set(C, e); ++Bt < bt; ) {
- var Qt = e[Bt], ae = C[Bt];
- if (st)
- var te = xt ? st(ae, Qt, Bt, C, e, mt) : st(Qt, ae, Bt, e, C, mt);
- if (te !== M) {
- if (te)
- continue;
- zt = !1;
- break;
- }
- if (Ut) {
- if (!ea(C, function(he, ue) {
- if (!In(Ut, ue) && (Qt === he || ut(Qt, he, K, st, mt)))
- return Ut.push(ue);
- })) {
- zt = !1;
- break;
- }
- } else if (!(Qt === ae || ut(Qt, ae, K, st, mt))) {
- zt = !1;
- break;
- }
- }
- return mt.delete(e), mt.delete(C), zt;
- }
- function pm(e, C, K, st, ut, mt, xt) {
- switch (K) {
- case yt:
- if (e.byteLength != C.byteLength || e.byteOffset != C.byteOffset)
- return !1;
- e = e.buffer, C = C.buffer;
- case pt:
- return !(e.byteLength != C.byteLength || !mt(new As(e), new As(C)));
- case Q:
- case A:
- case et:
- return Di(+e, +C);
- case Y:
- return e.name == C.name && e.message == C.message;
- case dt:
- case at:
- return e == C + "";
- case it:
- var bt = aa;
- case ht:
- var Ct = st & x;
- if (bt || (bt = bs), e.size != C.size && !Ct)
- return !1;
- var It = xt.get(e);
- if (It)
- return It == C;
- st |= f, xt.set(e, C);
- var Rt = jc(bt(e), bt(C), st, ut, mt, xt);
- return xt.delete(e), Rt;
- case J:
- if (Wn)
- return Wn.call(e) == Wn.call(C);
- }
- return !1;
- }
- function um(e, C, K, st, ut, mt) {
- var xt = K & x, bt = _a(e), Ct = bt.length, It = _a(C), Rt = It.length;
- if (Ct != Rt && !xt)
- return !1;
- for (var Bt = Ct; Bt--; ) {
- var zt = bt[Bt];
- if (!(xt ? zt in C : Se.call(C, zt)))
- return !1;
- }
- var Ut = mt.get(e), Qt = mt.get(C);
- if (Ut && Qt)
- return Ut == C && Qt == e;
- var ae = !0;
- mt.set(e, C), mt.set(C, e);
- for (var te = xt; ++Bt < Ct; ) {
- zt = bt[Bt];
- var he = e[zt], ue = C[zt];
- if (st)
- var fi = xt ? st(ue, he, zt, C, e, mt) : st(he, ue, zt, e, C, mt);
- if (!(fi === M ? he === ue || ut(he, ue, K, st, mt) : fi)) {
- ae = !1;
- break;
- }
- te || (te = zt == "constructor");
- }
- if (ae && !te) {
- var ri = e.constructor, gi = C.constructor;
- ri != gi && "constructor" in e && "constructor" in C && !(typeof ri == "function" && ri instanceof ri && typeof gi == "function" && gi instanceof gi) && (ae = !1);
- }
- return mt.delete(e), mt.delete(C), ae;
- }
- function er(e) {
- return Ya(Hc(e, M, Qc), e + "");
- }
- function _a(e) {
- return nc(e, He, Na);
- }
- function Da(e) {
- return nc(e, oi, Wc);
- }
- var Ia = _s ? function(e) {
- return _s.get(e);
- } : Qa;
- function Us(e) {
- for (var C = e.name + "", K = an[C], st = Se.call(an, C) ? K.length : 0; st--; ) {
- var ut = K[st], mt = ut.func;
- if (mt == null || mt == e)
- return ut.name;
- }
- return C;
- }
- function pn(e) {
- var C = Se.call(ft, "placeholder") ? ft : e;
- return C.placeholder;
- }
- function qt() {
- var e = ft.iteratee || Ja;
- return e = e === Ja ? ac : e, arguments.length ? e(arguments[0], arguments[1]) : e;
- }
- function Vs(e, C) {
- var K = e.__data__;
- return bm(C) ? K[typeof C == "string" ? "string" : "hash"] : K.map;
- }
- function Ra(e) {
- for (var C = He(e), K = C.length; K--; ) {
- var st = C[K], ut = e[st];
- C[K] = [st, ut, Xc(ut)];
- }
- return C;
- }
- function Wr(e, C) {
- var K = Cf(e, C);
- return oc(K) ? K : M;
- }
- function dm(e) {
- var C = Se.call(e, Ir), K = e[Ir];
- try {
- e[Ir] = M;
- var st = !0;
- } catch {
- }
- var ut = Ms.call(e);
- return st && (C ? e[Ir] = K : delete e[Ir]), ut;
- }
- var Na = ha ? function(e) {
- return e == null ? [] : (e = Me(e), vr(ha(e), function(C) {
- return Fh.call(e, C);
- }));
- } : tl, Wc = ha ? function(e) {
- for (var C = []; e; )
- xr(C, Na(e)), e = Ts(e);
- return C;
- } : tl, Ke = ei;
- (ca && Ke(new ca(new ArrayBuffer(1))) != yt || Nn && Ke(new Nn()) != it || pa && Ke(pa.resolve()) != ct || on && Ke(new on()) != ht || Bn && Ke(new Bn()) != ot) && (Ke = function(e) {
- var C = ei(e), K = C == rt ? e.constructor : M, st = K ? Yr(K) : "";
- if (st)
- switch (st) {
- case Zf:
- return yt;
- case Kf:
- return it;
- case Jf:
- return ct;
- case qf:
- return ht;
- case Qf:
- return ot;
- }
- return C;
- });
- function fm(e, C, K) {
- for (var st = -1, ut = K.length; ++st < ut; ) {
- var mt = K[st], xt = mt.size;
- switch (mt.type) {
- case "drop":
- e += xt;
- break;
- case "dropRight":
- C -= xt;
- break;
- case "take":
- C = Ze(C, e + xt);
- break;
- case "takeRight":
- e = Xe(e, C - xt);
- break;
- }
- }
- return { start: e, end: C };
- }
- function gm(e) {
- var C = e.match(Lr);
- return C ? C[1].split(Xi) : [];
- }
- function Yc(e, C, K) {
- C = Mr(C, e);
- for (var st = -1, ut = C.length, mt = !1; ++st < ut; ) {
- var xt = Fi(C[st]);
- if (!(mt = e != null && K(e, xt)))
- break;
- e = e[xt];
- }
- return mt || ++st != ut ? mt : (ut = e == null ? 0 : e.length, !!ut && to(ut) && ir(xt, ut) && (ie(e) || zr(e)));
- }
- function mm(e) {
- var C = e.length, K = new e.constructor(C);
- return C && typeof e[0] == "string" && Se.call(e, "index") && (K.index = e.index, K.input = e.input), K;
- }
- function zc(e) {
- return typeof e.constructor == "function" && !Un(e) ? ln(Ts(e)) : {};
- }
- function ym(e, C, K) {
- var st = e.constructor;
- switch (C) {
- case pt:
- return Ea(e);
- case Q:
- case A:
- return new st(+e);
- case yt:
- return tm(e, K);
- case vt:
- case Mt:
- case Pt:
- case At:
- case St:
- case Dt:
- case _t:
- case Nt:
- case Ot:
- return Cc(e, K);
- case it:
- return new st();
- case et:
- case at:
- return new st(e);
- case dt:
- return em(e);
- case ht:
- return new st();
- case J:
- return im(e);
- }
- }
- function vm(e, C) {
- var K = C.length;
- if (!K)
- return e;
- var st = K - 1;
- return C[st] = (K > 1 ? "& " : "") + C[st], C = C.join(K > 2 ? ", " : " "), e.replace(Fo, `{
- /* [wrapped with ` + C + `] */
- `);
- }
- function xm(e) {
- return ie(e) || zr(e) || !!(Uh && e && e[Uh]);
- }
- function ir(e, C) {
- var K = typeof e;
- return C = C ?? _, !!C && (K == "number" || K != "symbol" && Od.test(e)) && e > -1 && e % 1 == 0 && e < C;
- }
- function ii(e, C, K) {
- if (!Ie(K))
- return !1;
- var st = typeof C;
- return (st == "number" ? si(K) && ir(C, K.length) : st == "string" && C in K) ? Di(K[C], e) : !1;
- }
- function Ba(e, C) {
- if (ie(e))
- return !1;
- var K = typeof e;
- return K == "number" || K == "symbol" || K == "boolean" || e == null || di(e) ? !0 : On.test(e) || !En.test(e) || C != null && e in Me(C);
- }
- function bm(e) {
- var C = typeof e;
- return C == "string" || C == "number" || C == "symbol" || C == "boolean" ? e !== "__proto__" : e === null;
- }
- function ja(e) {
- var C = Us(e), K = ft[C];
- if (typeof K != "function" || !(C in ce.prototype))
- return !1;
- if (e === K)
- return !0;
- var st = Ia(K);
- return !!st && e === st[0];
- }
- function Sm(e) {
- return !!Xh && Xh in e;
- }
- var wm = ws ? rr : el;
- function Un(e) {
- var C = e && e.constructor, K = typeof C == "function" && C.prototype || sn;
- return e === K;
- }
- function Xc(e) {
- return e === e && !Ie(e);
- }
- function Gc(e, C) {
- return function(K) {
- return K == null ? !1 : K[e] === C && (C !== M || e in Me(K));
- };
- }
- function Cm(e) {
- var C = qs(e, function(st) {
- return K.size === V && K.clear(), st;
- }), K = C.cache;
- return C;
- }
- function Mm(e, C) {
- var K = e[1], st = C[1], ut = K | st, mt = ut < (d | T | v), xt = st == v && K == j || st == v && K == l && e[7].length <= C[8] || st == (v | l) && C[7].length <= C[8] && K == j;
- if (!(mt || xt))
- return e;
- st & d && (e[2] = C[2], ut |= K & d ? 0 : O);
- var bt = C[3];
- if (bt) {
- var Ct = e[3];
- e[3] = Ct ? kc(Ct, bt, C[4]) : bt, e[4] = Ct ? br(e[3], G) : C[4];
- }
- return bt = C[5], bt && (Ct = e[5], e[5] = Ct ? Ac(Ct, bt, C[6]) : bt, e[6] = Ct ? br(e[5], G) : C[6]), bt = C[7], bt && (e[7] = bt), st & v && (e[8] = e[8] == null ? C[8] : Ze(e[8], C[8])), e[9] == null && (e[9] = C[9]), e[0] = C[0], e[1] = ut, e;
- }
- function km(e) {
- var C = [];
- if (e != null)
- for (var K in Me(e))
- C.push(K);
- return C;
- }
- function Am(e) {
- return Ms.call(e);
- }
- function Hc(e, C, K) {
- return C = Xe(C === M ? e.length - 1 : C, 0), function() {
- for (var st = arguments, ut = -1, mt = Xe(st.length - C, 0), xt = Tt(mt); ++ut < mt; )
- xt[ut] = st[C + ut];
- ut = -1;
- for (var bt = Tt(C + 1); ++ut < C; )
- bt[ut] = st[ut];
- return bt[C] = K(xt), ci(e, this, bt);
- };
- }
- function Fc(e, C) {
- return C.length < 2 ? e : jr(e, Ci(C, 0, -1));
- }
- function Tm(e, C) {
- for (var K = e.length, st = Ze(C.length, K), ut = ni(e); st--; ) {
- var mt = C[st];
- e[st] = ir(mt, K) ? ut[mt] : M;
- }
- return e;
- }
- function Wa(e, C) {
- if (!(C === "constructor" && typeof e[C] == "function") && C != "__proto__")
- return e[C];
- }
- var Uc = $c(gc), Vn = Xf || function(e, C) {
- return Ue.setTimeout(e, C);
- }, Ya = $c(Kg);
- function Vc(e, C, K) {
- var st = C + "";
- return Ya(e, vm(st, Pm(gm(st), K)));
- }
- function $c(e) {
- var C = 0, K = 0;
- return function() {
- var st = Uf(), ut = a - (st - K);
- if (K = st, ut > 0) {
- if (++C >= c)
- return arguments[0];
- } else
- C = 0;
- return e.apply(M, arguments);
- };
- }
- function $s(e, C) {
- var K = -1, st = e.length, ut = st - 1;
- for (C = C === M ? st : C; ++K < C; ) {
- var mt = wa(K, ut), xt = e[mt];
- e[mt] = e[K], e[K] = xt;
- }
- return e.length = C, e;
- }
- var Zc = Cm(function(e) {
- var C = [];
- return e.charCodeAt(0) === 46 && C.push(""), e.replace($e, function(K, st, ut, mt) {
- C.push(ut ? mt.replace(_r, "$1") : st || K);
- }), C;
- });
- function Fi(e) {
- if (typeof e == "string" || di(e))
- return e;
- var C = e + "";
- return C == "0" && 1 / e == -P ? "-0" : C;
- }
- function Yr(e) {
- if (e != null) {
- try {
- return Cs.call(e);
- } catch {
- }
- try {
- return e + "";
- } catch {
- }
- }
- return "";
- }
- function Pm(e, C) {
- return xi(m, function(K) {
- var st = "_." + K[0];
- C & K[1] && !vs(e, st) && e.push(st);
- }), e.sort();
- }
- function Kc(e) {
- if (e instanceof ce)
- return e.clone();
- var C = new Si(e.__wrapped__, e.__chain__);
- return C.__actions__ = ni(e.__actions__), C.__index__ = e.__index__, C.__values__ = e.__values__, C;
- }
- function Em(e, C, K) {
- (K ? ii(e, C, K) : C === M) ? C = 1 : C = Xe(se(C), 0);
- var st = e == null ? 0 : e.length;
- if (!st || C < 1)
- return [];
- for (var ut = 0, mt = 0, xt = Tt(Os(st / C)); ut < st; )
- xt[mt++] = Ci(e, ut, ut += C);
- return xt;
- }
- function Om(e) {
- for (var C = -1, K = e == null ? 0 : e.length, st = 0, ut = []; ++C < K; ) {
- var mt = e[C];
- mt && (ut[st++] = mt);
- }
- return ut;
- }
- function Lm() {
- var e = arguments.length;
- if (!e)
- return [];
- for (var C = Tt(e - 1), K = arguments[0], st = e; st--; )
- C[st - 1] = arguments[st];
- return xr(ie(K) ? ni(K) : [K], Ve(C, 1));
- }
- var _m = le(function(e, C) {
- return Be(e) ? zn(e, Ve(C, 1, Be, !0)) : [];
- }), Dm = le(function(e, C) {
- var K = Mi(C);
- return Be(K) && (K = M), Be(e) ? zn(e, Ve(C, 1, Be, !0), qt(K, 2)) : [];
- }), Im = le(function(e, C) {
- var K = Mi(C);
- return Be(K) && (K = M), Be(e) ? zn(e, Ve(C, 1, Be, !0), M, K) : [];
- });
- function Rm(e, C, K) {
- var st = e == null ? 0 : e.length;
- return st ? (C = K || C === M ? 1 : se(C), Ci(e, C < 0 ? 0 : C, st)) : [];
- }
- function Nm(e, C, K) {
- var st = e == null ? 0 : e.length;
- return st ? (C = K || C === M ? 1 : se(C), C = st - C, Ci(e, 0, C < 0 ? 0 : C)) : [];
- }
- function Bm(e, C) {
- return e && e.length ? Ys(e, qt(C, 3), !0, !0) : [];
- }
- function jm(e, C) {
- return e && e.length ? Ys(e, qt(C, 3), !0) : [];
- }
- function Wm(e, C, K, st) {
- var ut = e == null ? 0 : e.length;
- return ut ? (K && typeof K != "number" && ii(e, C, K) && (K = 0, st = ut), Lg(e, C, K, st)) : [];
- }
- function Jc(e, C, K) {
- var st = e == null ? 0 : e.length;
- if (!st)
- return -1;
- var ut = K == null ? 0 : se(K);
- return ut < 0 && (ut = Xe(st + ut, 0)), xs(e, qt(C, 3), ut);
- }
- function qc(e, C, K) {
- var st = e == null ? 0 : e.length;
- if (!st)
- return -1;
- var ut = st - 1;
- return K !== M && (ut = se(K), ut = K < 0 ? Xe(st + ut, 0) : Ze(ut, st - 1)), xs(e, qt(C, 3), ut, !0);
- }
- function Qc(e) {
- var C = e == null ? 0 : e.length;
- return C ? Ve(e, 1) : [];
- }
- function Ym(e) {
- var C = e == null ? 0 : e.length;
- return C ? Ve(e, P) : [];
- }
- function zm(e, C) {
- var K = e == null ? 0 : e.length;
- return K ? (C = C === M ? 1 : se(C), Ve(e, C)) : [];
- }
- function Xm(e) {
- for (var C = -1, K = e == null ? 0 : e.length, st = {}; ++C < K; ) {
- var ut = e[C];
- st[ut[0]] = ut[1];
- }
- return st;
- }
- function tp(e) {
- return e && e.length ? e[0] : M;
- }
- function Gm(e, C, K) {
- var st = e == null ? 0 : e.length;
- if (!st)
- return -1;
- var ut = K == null ? 0 : se(K);
- return ut < 0 && (ut = Xe(st + ut, 0)), tn(e, C, ut);
- }
- function Hm(e) {
- var C = e == null ? 0 : e.length;
- return C ? Ci(e, 0, -1) : [];
- }
- var Fm = le(function(e) {
- var C = Ee(e, Ta);
- return C.length && C[0] === e[0] ? ya(C) : [];
- }), Um = le(function(e) {
- var C = Mi(e), K = Ee(e, Ta);
- return C === Mi(K) ? C = M : K.pop(), K.length && K[0] === e[0] ? ya(K, qt(C, 2)) : [];
- }), Vm = le(function(e) {
- var C = Mi(e), K = Ee(e, Ta);
- return C = typeof C == "function" ? C : M, C && K.pop(), K.length && K[0] === e[0] ? ya(K, M, C) : [];
- });
- function $m(e, C) {
- return e == null ? "" : Hf.call(e, C);
- }
- function Mi(e) {
- var C = e == null ? 0 : e.length;
- return C ? e[C - 1] : M;
- }
- function Zm(e, C, K) {
- var st = e == null ? 0 : e.length;
- if (!st)
- return -1;
- var ut = st;
- return K !== M && (ut = se(K), ut = ut < 0 ? Xe(st + ut, 0) : Ze(ut, st - 1)), C === C ? Pf(e, C, ut) : xs(e, Ih, ut, !0);
- }
- function Km(e, C) {
- return e && e.length ? pc(e, se(C)) : M;
- }
- var Jm = le(ep);
- function ep(e, C) {
- return e && e.length && C && C.length ? Sa(e, C) : e;
- }
- function qm(e, C, K) {
- return e && e.length && C && C.length ? Sa(e, C, qt(K, 2)) : e;
- }
- function Qm(e, C, K) {
- return e && e.length && C && C.length ? Sa(e, C, M, K) : e;
- }
- var ty = er(function(e, C) {
- var K = e == null ? 0 : e.length, st = da(e, C);
- return fc(e, Ee(C, function(ut) {
- return ir(ut, K) ? +ut : ut;
- }).sort(Mc)), st;
- });
- function ey(e, C) {
- var K = [];
- if (!(e && e.length))
- return K;
- var st = -1, ut = [], mt = e.length;
- for (C = qt(C, 3); ++st < mt; ) {
- var xt = e[st];
- C(xt, st, e) && (K.push(xt), ut.push(st));
- }
- return fc(e, ut), K;
- }
- function za(e) {
- return e == null ? e : $f.call(e);
- }
- function iy(e, C, K) {
- var st = e == null ? 0 : e.length;
- return st ? (K && typeof K != "number" && ii(e, C, K) ? (C = 0, K = st) : (C = C == null ? 0 : se(C), K = K === M ? st : se(K)), Ci(e, C, K)) : [];
- }
- function ry(e, C) {
- return Ws(e, C);
- }
- function ny(e, C, K) {
- return Ma(e, C, qt(K, 2));
- }
- function sy(e, C) {
- var K = e == null ? 0 : e.length;
- if (K) {
- var st = Ws(e, C);
- if (st < K && Di(e[st], C))
- return st;
- }
- return -1;
- }
- function oy(e, C) {
- return Ws(e, C, !0);
- }
- function ay(e, C, K) {
- return Ma(e, C, qt(K, 2), !0);
- }
- function ly(e, C) {
- var K = e == null ? 0 : e.length;
- if (K) {
- var st = Ws(e, C, !0) - 1;
- if (Di(e[st], C))
- return st;
- }
- return -1;
- }
- function hy(e) {
- return e && e.length ? mc(e) : [];
- }
- function cy(e, C) {
- return e && e.length ? mc(e, qt(C, 2)) : [];
- }
- function py(e) {
- var C = e == null ? 0 : e.length;
- return C ? Ci(e, 1, C) : [];
- }
- function uy(e, C, K) {
- return e && e.length ? (C = K || C === M ? 1 : se(C), Ci(e, 0, C < 0 ? 0 : C)) : [];
- }
- function dy(e, C, K) {
- var st = e == null ? 0 : e.length;
- return st ? (C = K || C === M ? 1 : se(C), C = st - C, Ci(e, C < 0 ? 0 : C, st)) : [];
- }
- function fy(e, C) {
- return e && e.length ? Ys(e, qt(C, 3), !1, !0) : [];
- }
- function gy(e, C) {
- return e && e.length ? Ys(e, qt(C, 3)) : [];
- }
- var my = le(function(e) {
- return Cr(Ve(e, 1, Be, !0));
- }), yy = le(function(e) {
- var C = Mi(e);
- return Be(C) && (C = M), Cr(Ve(e, 1, Be, !0), qt(C, 2));
- }), vy = le(function(e) {
- var C = Mi(e);
- return C = typeof C == "function" ? C : M, Cr(Ve(e, 1, Be, !0), M, C);
- });
- function xy(e) {
- return e && e.length ? Cr(e) : [];
- }
- function by(e, C) {
- return e && e.length ? Cr(e, qt(C, 2)) : [];
- }
- function Sy(e, C) {
- return C = typeof C == "function" ? C : M, e && e.length ? Cr(e, M, C) : [];
- }
- function Xa(e) {
- if (!(e && e.length))
- return [];
- var C = 0;
- return e = vr(e, function(K) {
- if (Be(K))
- return C = Xe(K.length, C), !0;
- }), sa(C, function(K) {
- return Ee(e, ia(K));
- });
- }
- function ip(e, C) {
- if (!(e && e.length))
- return [];
- var K = Xa(e);
- return C == null ? K : Ee(K, function(st) {
- return ci(C, M, st);
- });
- }
- var wy = le(function(e, C) {
- return Be(e) ? zn(e, C) : [];
- }), Cy = le(function(e) {
- return Aa(vr(e, Be));
- }), My = le(function(e) {
- var C = Mi(e);
- return Be(C) && (C = M), Aa(vr(e, Be), qt(C, 2));
- }), ky = le(function(e) {
- var C = Mi(e);
- return C = typeof C == "function" ? C : M, Aa(vr(e, Be), M, C);
- }), Ay = le(Xa);
- function Ty(e, C) {
- return bc(e || [], C || [], Yn);
- }
- function Py(e, C) {
- return bc(e || [], C || [], Hn);
- }
- var Ey = le(function(e) {
- var C = e.length, K = C > 1 ? e[C - 1] : M;
- return K = typeof K == "function" ? (e.pop(), K) : M, ip(e, K);
- });
- function rp(e) {
- var C = ft(e);
- return C.__chain__ = !0, C;
- }
- function Oy(e, C) {
- return C(e), e;
- }
- function Zs(e, C) {
- return C(e);
- }
- var Ly = er(function(e) {
- var C = e.length, K = C ? e[0] : 0, st = this.__wrapped__, ut = function(mt) {
- return da(mt, e);
- };
- return C > 1 || this.__actions__.length || !(st instanceof ce) || !ir(K) ? this.thru(ut) : (st = st.slice(K, +K + (C ? 1 : 0)), st.__actions__.push({
- func: Zs,
- args: [ut],
- thisArg: M
- }), new Si(st, this.__chain__).thru(function(mt) {
- return C && !mt.length && mt.push(M), mt;
- }));
- });
- function _y() {
- return rp(this);
- }
- function Dy() {
- return new Si(this.value(), this.__chain__);
- }
- function Iy() {
- this.__values__ === M && (this.__values__ = yp(this.value()));
- var e = this.__index__ >= this.__values__.length, C = e ? M : this.__values__[this.__index__++];
- return { done: e, value: C };
- }
- function Ry() {
- return this;
- }
- function Ny(e) {
- for (var C, K = this; K instanceof Is; ) {
- var st = Kc(K);
- st.__index__ = 0, st.__values__ = M, C ? ut.__wrapped__ = st : C = st;
- var ut = st;
- K = K.__wrapped__;
- }
- return ut.__wrapped__ = e, C;
- }
- function By() {
- var e = this.__wrapped__;
- if (e instanceof ce) {
- var C = e;
- return this.__actions__.length && (C = new ce(this)), C = C.reverse(), C.__actions__.push({
- func: Zs,
- args: [za],
- thisArg: M
- }), new Si(C, this.__chain__);
- }
- return this.thru(za);
- }
- function jy() {
- return xc(this.__wrapped__, this.__actions__);
- }
- var Wy = zs(function(e, C, K) {
- Se.call(e, K) ? ++e[K] : Qi(e, K, 1);
- });
- function Yy(e, C, K) {
- var st = ie(e) ? _h : Og;
- return K && ii(e, C, K) && (C = M), st(e, qt(C, 3));
- }
- function zy(e, C) {
- var K = ie(e) ? vr : ic;
- return K(e, qt(C, 3));
- }
- var Xy = Oc(Jc), Gy = Oc(qc);
- function Hy(e, C) {
- return Ve(Ks(e, C), 1);
- }
- function Fy(e, C) {
- return Ve(Ks(e, C), P);
- }
- function Uy(e, C, K) {
- return K = K === M ? 1 : se(K), Ve(Ks(e, C), K);
- }
- function np(e, C) {
- var K = ie(e) ? xi : wr;
- return K(e, qt(C, 3));
- }
- function sp(e, C) {
- var K = ie(e) ? pf : ec;
- return K(e, qt(C, 3));
- }
- var Vy = zs(function(e, C, K) {
- Se.call(e, K) ? e[K].push(C) : Qi(e, K, [C]);
- });
- function $y(e, C, K, st) {
- e = si(e) ? e : dn(e), K = K && !st ? se(K) : 0;
- var ut = e.length;
- return K < 0 && (K = Xe(ut + K, 0)), eo(e) ? K <= ut && e.indexOf(C, K) > -1 : !!ut && tn(e, C, K) > -1;
- }
- var Zy = le(function(e, C, K) {
- var st = -1, ut = typeof C == "function", mt = si(e) ? Tt(e.length) : [];
- return wr(e, function(xt) {
- mt[++st] = ut ? ci(C, xt, K) : Xn(xt, C, K);
- }), mt;
- }), Ky = zs(function(e, C, K) {
- Qi(e, K, C);
- });
- function Ks(e, C) {
- var K = ie(e) ? Ee : lc;
- return K(e, qt(C, 3));
- }
- function Jy(e, C, K, st) {
- return e == null ? [] : (ie(C) || (C = C == null ? [] : [C]), K = st ? M : K, ie(K) || (K = K == null ? [] : [K]), uc(e, C, K));
- }
- var qy = zs(function(e, C, K) {
- e[K ? 0 : 1].push(C);
- }, function() {
- return [[], []];
- });
- function Qy(e, C, K) {
- var st = ie(e) ? ta : Nh, ut = arguments.length < 3;
- return st(e, qt(C, 4), K, ut, wr);
- }
- function tv(e, C, K) {
- var st = ie(e) ? uf : Nh, ut = arguments.length < 3;
- return st(e, qt(C, 4), K, ut, ec);
- }
- function ev(e, C) {
- var K = ie(e) ? vr : ic;
- return K(e, Qs(qt(C, 3)));
- }
- function iv(e) {
- var C = ie(e) ? Jh : $g;
- return C(e);
- }
- function rv(e, C, K) {
- (K ? ii(e, C, K) : C === M) ? C = 1 : C = se(C);
- var st = ie(e) ? kg : Zg;
- return st(e, C);
- }
- function nv(e) {
- var C = ie(e) ? Ag : Jg;
- return C(e);
- }
- function sv(e) {
- if (e == null)
- return 0;
- if (si(e))
- return eo(e) ? rn(e) : e.length;
- var C = Ke(e);
- return C == it || C == ht ? e.size : xa(e).length;
- }
- function ov(e, C, K) {
- var st = ie(e) ? ea : qg;
- return K && ii(e, C, K) && (C = M), st(e, qt(C, 3));
- }
- var av = le(function(e, C) {
- if (e == null)
- return [];
- var K = C.length;
- return K > 1 && ii(e, C[0], C[1]) ? C = [] : K > 2 && ii(C[0], C[1], C[2]) && (C = [C[0]]), uc(e, Ve(C, 1), []);
- }), Js = zf || function() {
- return Ue.Date.now();
- };
- function lv(e, C) {
- if (typeof C != "function")
- throw new bi(D);
- return e = se(e), function() {
- if (--e < 1)
- return C.apply(this, arguments);
- };
- }
- function op(e, C, K) {
- return C = K ? M : C, C = e && C == null ? e.length : C, tr(e, v, M, M, M, M, C);
- }
- function ap(e, C) {
- var K;
- if (typeof C != "function")
- throw new bi(D);
- return e = se(e), function() {
- return --e > 0 && (K = C.apply(this, arguments)), e <= 1 && (C = M), K;
- };
- }
- var Ga = le(function(e, C, K) {
- var st = d;
- if (K.length) {
- var ut = br(K, pn(Ga));
- st |= b;
- }
- return tr(e, st, C, K, ut);
- }), lp = le(function(e, C, K) {
- var st = d | T;
- if (K.length) {
- var ut = br(K, pn(lp));
- st |= b;
- }
- return tr(C, st, e, K, ut);
- });
- function hp(e, C, K) {
- C = K ? M : C;
- var st = tr(e, j, M, M, M, M, M, C);
- return st.placeholder = hp.placeholder, st;
- }
- function cp(e, C, K) {
- C = K ? M : C;
- var st = tr(e, k, M, M, M, M, M, C);
- return st.placeholder = cp.placeholder, st;
- }
- function pp(e, C, K) {
- var st, ut, mt, xt, bt, Ct, It = 0, Rt = !1, Bt = !1, zt = !0;
- if (typeof e != "function")
- throw new bi(D);
- C = ki(C) || 0, Ie(K) && (Rt = !!K.leading, Bt = "maxWait" in K, mt = Bt ? Xe(ki(K.maxWait) || 0, C) : mt, zt = "trailing" in K ? !!K.trailing : zt);
- function Ut(je) {
- var Ii = st, sr = ut;
- return st = ut = M, It = je, xt = e.apply(sr, Ii), xt;
- }
- function Qt(je) {
- return It = je, bt = Vn(he, C), Rt ? Ut(je) : xt;
- }
- function ae(je) {
- var Ii = je - Ct, sr = je - It, Op = C - Ii;
- return Bt ? Ze(Op, mt - sr) : Op;
- }
- function te(je) {
- var Ii = je - Ct, sr = je - It;
- return Ct === M || Ii >= C || Ii < 0 || Bt && sr >= mt;
- }
- function he() {
- var je = Js();
- if (te(je))
- return ue(je);
- bt = Vn(he, ae(je));
- }
- function ue(je) {
- return bt = M, zt && st ? Ut(je) : (st = ut = M, xt);
- }
- function fi() {
- bt !== M && Sc(bt), It = 0, st = Ct = ut = bt = M;
- }
- function ri() {
- return bt === M ? xt : ue(Js());
- }
- function gi() {
- var je = Js(), Ii = te(je);
- if (st = arguments, ut = this, Ct = je, Ii) {
- if (bt === M)
- return Qt(Ct);
- if (Bt)
- return Sc(bt), bt = Vn(he, C), Ut(Ct);
- }
- return bt === M && (bt = Vn(he, C)), xt;
- }
- return gi.cancel = fi, gi.flush = ri, gi;
- }
- var hv = le(function(e, C) {
- return tc(e, 1, C);
- }), cv = le(function(e, C, K) {
- return tc(e, ki(C) || 0, K);
- });
- function pv(e) {
- return tr(e, h);
- }
- function qs(e, C) {
- if (typeof e != "function" || C != null && typeof C != "function")
- throw new bi(D);
- var K = function() {
- var st = arguments, ut = C ? C.apply(this, st) : st[0], mt = K.cache;
- if (mt.has(ut))
- return mt.get(ut);
- var xt = e.apply(this, st);
- return K.cache = mt.set(ut, xt) || mt, xt;
- };
- return K.cache = new (qs.Cache || qi)(), K;
- }
- qs.Cache = qi;
- function Qs(e) {
- if (typeof e != "function")
- throw new bi(D);
- return function() {
- var C = arguments;
- switch (C.length) {
- case 0:
- return !e.call(this);
- case 1:
- return !e.call(this, C[0]);
- case 2:
- return !e.call(this, C[0], C[1]);
- case 3:
- return !e.call(this, C[0], C[1], C[2]);
- }
- return !e.apply(this, C);
- };
- }
- function uv(e) {
- return ap(2, e);
- }
- var dv = Qg(function(e, C) {
- C = C.length == 1 && ie(C[0]) ? Ee(C[0], pi(qt())) : Ee(Ve(C, 1), pi(qt()));
- var K = C.length;
- return le(function(st) {
- for (var ut = -1, mt = Ze(st.length, K); ++ut < mt; )
- st[ut] = C[ut].call(this, st[ut]);
- return ci(e, this, st);
- });
- }), Ha = le(function(e, C) {
- var K = br(C, pn(Ha));
- return tr(e, b, M, C, K);
- }), up = le(function(e, C) {
- var K = br(C, pn(up));
- return tr(e, w, M, C, K);
- }), fv = er(function(e, C) {
- return tr(e, l, M, M, M, C);
- });
- function gv(e, C) {
- if (typeof e != "function")
- throw new bi(D);
- return C = C === M ? C : se(C), le(e, C);
- }
- function mv(e, C) {
- if (typeof e != "function")
- throw new bi(D);
- return C = C == null ? 0 : Xe(se(C), 0), le(function(K) {
- var st = K[C], ut = kr(K, 0, C);
- return st && xr(ut, st), ci(e, this, ut);
- });
- }
- function yv(e, C, K) {
- var st = !0, ut = !0;
- if (typeof e != "function")
- throw new bi(D);
- return Ie(K) && (st = "leading" in K ? !!K.leading : st, ut = "trailing" in K ? !!K.trailing : ut), pp(e, C, {
- leading: st,
- maxWait: C,
- trailing: ut
- });
- }
- function vv(e) {
- return op(e, 1);
- }
- function xv(e, C) {
- return Ha(Pa(C), e);
- }
- function bv() {
- if (!arguments.length)
- return [];
- var e = arguments[0];
- return ie(e) ? e : [e];
- }
- function Sv(e) {
- return wi(e, S);
- }
- function wv(e, C) {
- return C = typeof C == "function" ? C : M, wi(e, S, C);
- }
- function Cv(e) {
- return wi(e, R | S);
- }
- function Mv(e, C) {
- return C = typeof C == "function" ? C : M, wi(e, R | S, C);
- }
- function kv(e, C) {
- return C == null || Qh(e, C, He(C));
- }
- function Di(e, C) {
- return e === C || e !== e && C !== C;
- }
- var Av = Fs(ma), Tv = Fs(function(e, C) {
- return e >= C;
- }), zr = sc(function() {
- return arguments;
- }()) ? sc : function(e) {
- return Ne(e) && Se.call(e, "callee") && !Fh.call(e, "callee");
- }, ie = Tt.isArray, Pv = Ah ? pi(Ah) : Ng;
- function si(e) {
- return e != null && to(e.length) && !rr(e);
- }
- function Be(e) {
- return Ne(e) && si(e);
- }
- function Ev(e) {
- return e === !0 || e === !1 || Ne(e) && ei(e) == Q;
- }
- var Ar = Gf || el, Ov = Th ? pi(Th) : Bg;
- function Lv(e) {
- return Ne(e) && e.nodeType === 1 && !$n(e);
- }
- function _v(e) {
- if (e == null)
- return !0;
- if (si(e) && (ie(e) || typeof e == "string" || typeof e.splice == "function" || Ar(e) || un(e) || zr(e)))
- return !e.length;
- var C = Ke(e);
- if (C == it || C == ht)
- return !e.size;
- if (Un(e))
- return !xa(e).length;
- for (var K in e)
- if (Se.call(e, K))
- return !1;
- return !0;
- }
- function Dv(e, C) {
- return Gn(e, C);
- }
- function Iv(e, C, K) {
- K = typeof K == "function" ? K : M;
- var st = K ? K(e, C) : M;
- return st === M ? Gn(e, C, M, K) : !!st;
- }
- function Fa(e) {
- if (!Ne(e))
- return !1;
- var C = ei(e);
- return C == Y || C == F || typeof e.message == "string" && typeof e.name == "string" && !$n(e);
- }
- function Rv(e) {
- return typeof e == "number" && Vh(e);
- }
- function rr(e) {
- if (!Ie(e))
- return !1;
- var C = ei(e);
- return C == Z || C == q || C == $ || C == gt;
- }
- function dp(e) {
- return typeof e == "number" && e == se(e);
- }
- function to(e) {
- return typeof e == "number" && e > -1 && e % 1 == 0 && e <= _;
- }
- function Ie(e) {
- var C = typeof e;
- return e != null && (C == "object" || C == "function");
- }
- function Ne(e) {
- return e != null && typeof e == "object";
- }
- var fp = Ph ? pi(Ph) : Wg;
- function Nv(e, C) {
- return e === C || va(e, C, Ra(C));
- }
- function Bv(e, C, K) {
- return K = typeof K == "function" ? K : M, va(e, C, Ra(C), K);
- }
- function jv(e) {
- return gp(e) && e != +e;
- }
- function Wv(e) {
- if (wm(e))
- throw new ee(N);
- return oc(e);
- }
- function Yv(e) {
- return e === null;
- }
- function zv(e) {
- return e == null;
- }
- function gp(e) {
- return typeof e == "number" || Ne(e) && ei(e) == et;
- }
- function $n(e) {
- if (!Ne(e) || ei(e) != rt)
- return !1;
- var C = Ts(e);
- if (C === null)
- return !0;
- var K = Se.call(C, "constructor") && C.constructor;
- return typeof K == "function" && K instanceof K && Cs.call(K) == Bf;
- }
- var Ua = Eh ? pi(Eh) : Yg;
- function Xv(e) {
- return dp(e) && e >= -_ && e <= _;
- }
- var mp = Oh ? pi(Oh) : zg;
- function eo(e) {
- return typeof e == "string" || !ie(e) && Ne(e) && ei(e) == at;
- }
- function di(e) {
- return typeof e == "symbol" || Ne(e) && ei(e) == J;
- }
- var un = Lh ? pi(Lh) : Xg;
- function Gv(e) {
- return e === M;
- }
- function Hv(e) {
- return Ne(e) && Ke(e) == ot;
- }
- function Fv(e) {
- return Ne(e) && ei(e) == lt;
- }
- var Uv = Fs(ba), Vv = Fs(function(e, C) {
- return e <= C;
- });
- function yp(e) {
- if (!e)
- return [];
- if (si(e))
- return eo(e) ? Li(e) : ni(e);
- if (Rn && e[Rn])
- return kf(e[Rn]());
- var C = Ke(e), K = C == it ? aa : C == ht ? bs : dn;
- return K(e);
- }
- function nr(e) {
- if (!e)
- return e === 0 ? e : 0;
- if (e = ki(e), e === P || e === -P) {
- var C = e < 0 ? -1 : 1;
- return C * I;
- }
- return e === e ? e : 0;
- }
- function se(e) {
- var C = nr(e), K = C % 1;
- return C === C ? K ? C - K : C : 0;
- }
- function vp(e) {
- return e ? Br(se(e), 0, E) : 0;
- }
- function ki(e) {
- if (typeof e == "number")
- return e;
- if (di(e))
- return W;
- if (Ie(e)) {
- var C = typeof e.valueOf == "function" ? e.valueOf() : e;
- e = Ie(C) ? C + "" : C;
- }
- if (typeof e != "string")
- return e === 0 ? e : +e;
- e = Bh(e);
- var K = Re.test(e);
- return K || qr.test(e) ? lf(e.slice(2), K ? 2 : 8) : ge.test(e) ? W : +e;
- }
- function xp(e) {
- return Hi(e, oi(e));
- }
- function $v(e) {
- return e ? Br(se(e), -_, _) : e === 0 ? e : 0;
- }
- function xe(e) {
- return e == null ? "" : ui(e);
- }
- var Zv = hn(function(e, C) {
- if (Un(C) || si(C)) {
- Hi(C, He(C), e);
- return;
- }
- for (var K in C)
- Se.call(C, K) && Yn(e, K, C[K]);
- }), bp = hn(function(e, C) {
- Hi(C, oi(C), e);
- }), io = hn(function(e, C, K, st) {
- Hi(C, oi(C), e, st);
- }), Kv = hn(function(e, C, K, st) {
- Hi(C, He(C), e, st);
- }), Jv = er(da);
- function qv(e, C) {
- var K = ln(e);
- return C == null ? K : qh(K, C);
- }
- var Qv = le(function(e, C) {
- e = Me(e);
- var K = -1, st = C.length, ut = st > 2 ? C[2] : M;
- for (ut && ii(C[0], C[1], ut) && (st = 1); ++K < st; )
- for (var mt = C[K], xt = oi(mt), bt = -1, Ct = xt.length; ++bt < Ct; ) {
- var It = xt[bt], Rt = e[It];
- (Rt === M || Di(Rt, sn[It]) && !Se.call(e, It)) && (e[It] = mt[It]);
- }
- return e;
- }), tx = le(function(e) {
- return e.push(M, Bc), ci(Sp, M, e);
- });
- function ex(e, C) {
- return Dh(e, qt(C, 3), Gi);
- }
- function ix(e, C) {
- return Dh(e, qt(C, 3), ga);
- }
- function rx(e, C) {
- return e == null ? e : fa(e, qt(C, 3), oi);
- }
- function nx(e, C) {
- return e == null ? e : rc(e, qt(C, 3), oi);
- }
- function sx(e, C) {
- return e && Gi(e, qt(C, 3));
- }
- function ox(e, C) {
- return e && ga(e, qt(C, 3));
- }
- function ax(e) {
- return e == null ? [] : Bs(e, He(e));
- }
- function lx(e) {
- return e == null ? [] : Bs(e, oi(e));
- }
- function Va(e, C, K) {
- var st = e == null ? M : jr(e, C);
- return st === M ? K : st;
- }
- function hx(e, C) {
- return e != null && Yc(e, C, _g);
- }
- function $a(e, C) {
- return e != null && Yc(e, C, Dg);
- }
- var cx = _c(function(e, C, K) {
- C != null && typeof C.toString != "function" && (C = Ms.call(C)), e[C] = K;
- }, Ka(ai)), px = _c(function(e, C, K) {
- C != null && typeof C.toString != "function" && (C = Ms.call(C)), Se.call(e, C) ? e[C].push(K) : e[C] = [K];
- }, qt), ux = le(Xn);
- function He(e) {
- return si(e) ? Kh(e) : xa(e);
- }
- function oi(e) {
- return si(e) ? Kh(e, !0) : Gg(e);
- }
- function dx(e, C) {
- var K = {};
- return C = qt(C, 3), Gi(e, function(st, ut, mt) {
- Qi(K, C(st, ut, mt), st);
- }), K;
- }
- function fx(e, C) {
- var K = {};
- return C = qt(C, 3), Gi(e, function(st, ut, mt) {
- Qi(K, ut, C(st, ut, mt));
- }), K;
- }
- var gx = hn(function(e, C, K) {
- js(e, C, K);
- }), Sp = hn(function(e, C, K, st) {
- js(e, C, K, st);
- }), mx = er(function(e, C) {
- var K = {};
- if (e == null)
- return K;
- var st = !1;
- C = Ee(C, function(mt) {
- return mt = Mr(mt, e), st || (st = mt.length > 1), mt;
- }), Hi(e, Da(e), K), st && (K = wi(K, R | B | S, cm));
- for (var ut = C.length; ut--; )
- ka(K, C[ut]);
- return K;
- });
- function yx(e, C) {
- return wp(e, Qs(qt(C)));
- }
- var vx = er(function(e, C) {
- return e == null ? {} : Fg(e, C);
- });
- function wp(e, C) {
- if (e == null)
- return {};
- var K = Ee(Da(e), function(st) {
- return [st];
- });
- return C = qt(C), dc(e, K, function(st, ut) {
- return C(st, ut[0]);
- });
- }
- function xx(e, C, K) {
- C = Mr(C, e);
- var st = -1, ut = C.length;
- for (ut || (ut = 1, e = M); ++st < ut; ) {
- var mt = e == null ? M : e[Fi(C[st])];
- mt === M && (st = ut, mt = K), e = rr(mt) ? mt.call(e) : mt;
- }
- return e;
- }
- function bx(e, C, K) {
- return e == null ? e : Hn(e, C, K);
- }
- function Sx(e, C, K, st) {
- return st = typeof st == "function" ? st : M, e == null ? e : Hn(e, C, K, st);
- }
- var Cp = Rc(He), Mp = Rc(oi);
- function wx(e, C, K) {
- var st = ie(e), ut = st || Ar(e) || un(e);
- if (C = qt(C, 4), K == null) {
- var mt = e && e.constructor;
- ut ? K = st ? new mt() : [] : Ie(e) ? K = rr(mt) ? ln(Ts(e)) : {} : K = {};
- }
- return (ut ? xi : Gi)(e, function(xt, bt, Ct) {
- return C(K, xt, bt, Ct);
- }), K;
- }
- function Cx(e, C) {
- return e == null ? !0 : ka(e, C);
- }
- function Mx(e, C, K) {
- return e == null ? e : vc(e, C, Pa(K));
- }
- function kx(e, C, K, st) {
- return st = typeof st == "function" ? st : M, e == null ? e : vc(e, C, Pa(K), st);
- }
- function dn(e) {
- return e == null ? [] : oa(e, He(e));
- }
- function Ax(e) {
- return e == null ? [] : oa(e, oi(e));
- }
- function Tx(e, C, K) {
- return K === M && (K = C, C = M), K !== M && (K = ki(K), K = K === K ? K : 0), C !== M && (C = ki(C), C = C === C ? C : 0), Br(ki(e), C, K);
- }
- function Px(e, C, K) {
- return C = nr(C), K === M ? (K = C, C = 0) : K = nr(K), e = ki(e), Ig(e, C, K);
- }
- function Ex(e, C, K) {
- if (K && typeof K != "boolean" && ii(e, C, K) && (C = K = M), K === M && (typeof C == "boolean" ? (K = C, C = M) : typeof e == "boolean" && (K = e, e = M)), e === M && C === M ? (e = 0, C = 1) : (e = nr(e), C === M ? (C = e, e = 0) : C = nr(C)), e > C) {
- var st = e;
- e = C, C = st;
- }
- if (K || e % 1 || C % 1) {
- var ut = $h();
- return Ze(e + ut * (C - e + af("1e-" + ((ut + "").length - 1))), C);
- }
- return wa(e, C);
- }
- var Ox = cn(function(e, C, K) {
- return C = C.toLowerCase(), e + (K ? kp(C) : C);
- });
- function kp(e) {
- return Za(xe(e).toLowerCase());
- }
- function Ap(e) {
- return e = xe(e), e && e.replace(Ld, bf).replace(Kd, "");
- }
- function Lx(e, C, K) {
- e = xe(e), C = ui(C);
- var st = e.length;
- K = K === M ? st : Br(se(K), 0, st);
- var ut = K;
- return K -= C.length, K >= 0 && e.slice(K, ut) == C;
- }
- function _x(e) {
- return e = xe(e), e && Vt.test(e) ? e.replace(be, Sf) : e;
- }
- function Dx(e) {
- return e = xe(e), e && _n.test(e) ? e.replace(Ln, "\\$&") : e;
- }
- var Ix = cn(function(e, C, K) {
- return e + (K ? "-" : "") + C.toLowerCase();
- }), Rx = cn(function(e, C, K) {
- return e + (K ? " " : "") + C.toLowerCase();
- }), Nx = Ec("toLowerCase");
- function Bx(e, C, K) {
- e = xe(e), C = se(C);
- var st = C ? rn(e) : 0;
- if (!C || st >= C)
- return e;
- var ut = (C - st) / 2;
- return Hs(Ls(ut), K) + e + Hs(Os(ut), K);
- }
- function jx(e, C, K) {
- e = xe(e), C = se(C);
- var st = C ? rn(e) : 0;
- return C && st < C ? e + Hs(C - st, K) : e;
- }
- function Wx(e, C, K) {
- e = xe(e), C = se(C);
- var st = C ? rn(e) : 0;
- return C && st < C ? Hs(C - st, K) + e : e;
- }
- function Yx(e, C, K) {
- return K || C == null ? C = 0 : C && (C = +C), Vf(xe(e).replace(Jr, ""), C || 0);
- }
- function zx(e, C, K) {
- return (K ? ii(e, C, K) : C === M) ? C = 1 : C = se(C), Ca(xe(e), C);
- }
- function Xx() {
- var e = arguments, C = xe(e[0]);
- return e.length < 3 ? C : C.replace(e[1], e[2]);
- }
- var Gx = cn(function(e, C, K) {
- return e + (K ? "_" : "") + C.toLowerCase();
- });
- function Hx(e, C, K) {
- return K && typeof K != "number" && ii(e, C, K) && (C = K = M), K = K === M ? E : K >>> 0, K ? (e = xe(e), e && (typeof C == "string" || C != null && !Ua(C)) && (C = ui(C), !C && en(e)) ? kr(Li(e), 0, K) : e.split(C, K)) : [];
- }
- var Fx = cn(function(e, C, K) {
- return e + (K ? " " : "") + Za(C);
- });
- function Ux(e, C, K) {
- return e = xe(e), K = K == null ? 0 : Br(se(K), 0, e.length), C = ui(C), e.slice(K, K + C.length) == C;
- }
- function Vx(e, C, K) {
- var st = ft.templateSettings;
- K && ii(e, C, K) && (C = M), e = xe(e), C = io({}, C, st, Nc);
- var ut = io({}, C.imports, st.imports, Nc), mt = He(ut), xt = oa(ut, mt), bt, Ct, It = 0, Rt = C.interpolate || gs, Bt = "__p += '", zt = la(
- (C.escape || gs).source + "|" + Rt.source + "|" + (Rt === us ? $t : gs).source + "|" + (C.evaluate || gs).source + "|$",
- "g"
- ), Ut = "//# sourceURL=" + (Se.call(C, "sourceURL") ? (C.sourceURL + "").replace(/\s/g, " ") : "lodash.templateSources[" + ++ef + "]") + `
- `;
- e.replace(zt, function(te, he, ue, fi, ri, gi) {
- return ue || (ue = fi), Bt += e.slice(It, gi).replace(_d, wf), he && (bt = !0, Bt += `' +
- __e(` + he + `) +
- '`), ri && (Ct = !0, Bt += `';
- ` + ri + `;
- __p += '`), ue && (Bt += `' +
- ((__t = (` + ue + `)) == null ? '' : __t) +
- '`), It = gi + te.length, te;
- }), Bt += `';
- `;
- var Qt = Se.call(C, "variable") && C.variable;
- if (!Qt)
- Bt = `with (obj) {
- ` + Bt + `
- }
- `;
- else if (Dn.test(Qt))
- throw new ee(U);
- Bt = (Ct ? Bt.replace(Kt, "") : Bt).replace(Gt, "$1").replace(Wt, "$1;"), Bt = "function(" + (Qt || "obj") + `) {
- ` + (Qt ? "" : `obj || (obj = {});
- `) + "var __t, __p = ''" + (bt ? ", __e = _.escape" : "") + (Ct ? `, __j = Array.prototype.join;
- function print() { __p += __j.call(arguments, '') }
- ` : `;
- `) + Bt + `return __p
- }`;
- var ae = Pp(function() {
- return ve(mt, Ut + "return " + Bt).apply(M, xt);
- });
- if (ae.source = Bt, Fa(ae))
- throw ae;
- return ae;
- }
- function $x(e) {
- return xe(e).toLowerCase();
- }
- function Zx(e) {
- return xe(e).toUpperCase();
- }
- function Kx(e, C, K) {
- if (e = xe(e), e && (K || C === M))
- return Bh(e);
- if (!e || !(C = ui(C)))
- return e;
- var st = Li(e), ut = Li(C), mt = jh(st, ut), xt = Wh(st, ut) + 1;
- return kr(st, mt, xt).join("");
- }
- function Jx(e, C, K) {
- if (e = xe(e), e && (K || C === M))
- return e.slice(0, zh(e) + 1);
- if (!e || !(C = ui(C)))
- return e;
- var st = Li(e), ut = Wh(st, Li(C)) + 1;
- return kr(st, 0, ut).join("");
- }
- function qx(e, C, K) {
- if (e = xe(e), e && (K || C === M))
- return e.replace(Jr, "");
- if (!e || !(C = ui(C)))
- return e;
- var st = Li(e), ut = jh(st, Li(C));
- return kr(st, ut).join("");
- }
- function Qx(e, C) {
- var K = u, st = i;
- if (Ie(C)) {
- var ut = "separator" in C ? C.separator : ut;
- K = "length" in C ? se(C.length) : K, st = "omission" in C ? ui(C.omission) : st;
- }
- e = xe(e);
- var mt = e.length;
- if (en(e)) {
- var xt = Li(e);
- mt = xt.length;
- }
- if (K >= mt)
- return e;
- var bt = K - rn(st);
- if (bt < 1)
- return st;
- var Ct = xt ? kr(xt, 0, bt).join("") : e.slice(0, bt);
- if (ut === M)
- return Ct + st;
- if (xt && (bt += Ct.length - bt), Ua(ut)) {
- if (e.slice(bt).search(ut)) {
- var It, Rt = Ct;
- for (ut.global || (ut = la(ut.source, xe(de.exec(ut)) + "g")), ut.lastIndex = 0; It = ut.exec(Rt); )
- var Bt = It.index;
- Ct = Ct.slice(0, Bt === M ? bt : Bt);
- }
- } else if (e.indexOf(ui(ut), bt) != bt) {
- var zt = Ct.lastIndexOf(ut);
- zt > -1 && (Ct = Ct.slice(0, zt));
- }
- return Ct + st;
- }
- function t0(e) {
- return e = xe(e), e && Yt.test(e) ? e.replace(Jt, Ef) : e;
- }
- var e0 = cn(function(e, C, K) {
- return e + (K ? " " : "") + C.toUpperCase();
- }), Za = Ec("toUpperCase");
- function Tp(e, C, K) {
- return e = xe(e), C = K ? M : C, C === M ? Mf(e) ? _f(e) : gf(e) : e.match(C) || [];
- }
- var Pp = le(function(e, C) {
- try {
- return ci(e, M, C);
- } catch (K) {
- return Fa(K) ? K : new ee(K);
- }
- }), i0 = er(function(e, C) {
- return xi(C, function(K) {
- K = Fi(K), Qi(e, K, Ga(e[K], e));
- }), e;
- });
- function r0(e) {
- var C = e == null ? 0 : e.length, K = qt();
- return e = C ? Ee(e, function(st) {
- if (typeof st[1] != "function")
- throw new bi(D);
- return [K(st[0]), st[1]];
- }) : [], le(function(st) {
- for (var ut = -1; ++ut < C; ) {
- var mt = e[ut];
- if (ci(mt[0], this, st))
- return ci(mt[1], this, st);
- }
- });
- }
- function n0(e) {
- return Eg(wi(e, R));
- }
- function Ka(e) {
- return function() {
- return e;
- };
- }
- function s0(e, C) {
- return e == null || e !== e ? C : e;
- }
- var o0 = Lc(), a0 = Lc(!0);
- function ai(e) {
- return e;
- }
- function Ja(e) {
- return ac(typeof e == "function" ? e : wi(e, R));
- }
- function l0(e) {
- return hc(wi(e, R));
- }
- function h0(e, C) {
- return cc(e, wi(C, R));
- }
- var c0 = le(function(e, C) {
- return function(K) {
- return Xn(K, e, C);
- };
- }), p0 = le(function(e, C) {
- return function(K) {
- return Xn(e, K, C);
- };
- });
- function qa(e, C, K) {
- var st = He(C), ut = Bs(C, st);
- K == null && !(Ie(C) && (ut.length || !st.length)) && (K = C, C = e, e = this, ut = Bs(C, He(C)));
- var mt = !(Ie(K) && "chain" in K) || !!K.chain, xt = rr(e);
- return xi(ut, function(bt) {
- var Ct = C[bt];
- e[bt] = Ct, xt && (e.prototype[bt] = function() {
- var It = this.__chain__;
- if (mt || It) {
- var Rt = e(this.__wrapped__), Bt = Rt.__actions__ = ni(this.__actions__);
- return Bt.push({ func: Ct, args: arguments, thisArg: e }), Rt.__chain__ = It, Rt;
- }
- return Ct.apply(e, xr([this.value()], arguments));
- });
- }), e;
- }
- function u0() {
- return Ue._ === this && (Ue._ = jf), this;
- }
- function Qa() {
- }
- function d0(e) {
- return e = se(e), le(function(C) {
- return pc(C, e);
- });
- }
- var f0 = Oa(Ee), g0 = Oa(_h), m0 = Oa(ea);
- function Ep(e) {
- return Ba(e) ? ia(Fi(e)) : Ug(e);
- }
- function y0(e) {
- return function(C) {
- return e == null ? M : jr(e, C);
- };
- }
- var v0 = Dc(), x0 = Dc(!0);
- function tl() {
- return [];
- }
- function el() {
- return !1;
- }
- function b0() {
- return {};
- }
- function S0() {
- return "";
- }
- function w0() {
- return !0;
- }
- function C0(e, C) {
- if (e = se(e), e < 1 || e > _)
- return [];
- var K = E, st = Ze(e, E);
- C = qt(C), e -= E;
- for (var ut = sa(st, C); ++K < e; )
- C(K);
- return ut;
- }
- function M0(e) {
- return ie(e) ? Ee(e, Fi) : di(e) ? [e] : ni(Zc(xe(e)));
- }
- function k0(e) {
- var C = ++Nf;
- return xe(e) + C;
- }
- var A0 = Gs(function(e, C) {
- return e + C;
- }, 0), T0 = La("ceil"), P0 = Gs(function(e, C) {
- return e / C;
- }, 1), E0 = La("floor");
- function O0(e) {
- return e && e.length ? Ns(e, ai, ma) : M;
- }
- function L0(e, C) {
- return e && e.length ? Ns(e, qt(C, 2), ma) : M;
- }
- function _0(e) {
- return Rh(e, ai);
- }
- function D0(e, C) {
- return Rh(e, qt(C, 2));
- }
- function I0(e) {
- return e && e.length ? Ns(e, ai, ba) : M;
- }
- function R0(e, C) {
- return e && e.length ? Ns(e, qt(C, 2), ba) : M;
- }
- var N0 = Gs(function(e, C) {
- return e * C;
- }, 1), B0 = La("round"), j0 = Gs(function(e, C) {
- return e - C;
- }, 0);
- function W0(e) {
- return e && e.length ? na(e, ai) : 0;
- }
- function Y0(e, C) {
- return e && e.length ? na(e, qt(C, 2)) : 0;
- }
- return ft.after = lv, ft.ary = op, ft.assign = Zv, ft.assignIn = bp, ft.assignInWith = io, ft.assignWith = Kv, ft.at = Jv, ft.before = ap, ft.bind = Ga, ft.bindAll = i0, ft.bindKey = lp, ft.castArray = bv, ft.chain = rp, ft.chunk = Em, ft.compact = Om, ft.concat = Lm, ft.cond = r0, ft.conforms = n0, ft.constant = Ka, ft.countBy = Wy, ft.create = qv, ft.curry = hp, ft.curryRight = cp, ft.debounce = pp, ft.defaults = Qv, ft.defaultsDeep = tx, ft.defer = hv, ft.delay = cv, ft.difference = _m, ft.differenceBy = Dm, ft.differenceWith = Im, ft.drop = Rm, ft.dropRight = Nm, ft.dropRightWhile = Bm, ft.dropWhile = jm, ft.fill = Wm, ft.filter = zy, ft.flatMap = Hy, ft.flatMapDeep = Fy, ft.flatMapDepth = Uy, ft.flatten = Qc, ft.flattenDeep = Ym, ft.flattenDepth = zm, ft.flip = pv, ft.flow = o0, ft.flowRight = a0, ft.fromPairs = Xm, ft.functions = ax, ft.functionsIn = lx, ft.groupBy = Vy, ft.initial = Hm, ft.intersection = Fm, ft.intersectionBy = Um, ft.intersectionWith = Vm, ft.invert = cx, ft.invertBy = px, ft.invokeMap = Zy, ft.iteratee = Ja, ft.keyBy = Ky, ft.keys = He, ft.keysIn = oi, ft.map = Ks, ft.mapKeys = dx, ft.mapValues = fx, ft.matches = l0, ft.matchesProperty = h0, ft.memoize = qs, ft.merge = gx, ft.mergeWith = Sp, ft.method = c0, ft.methodOf = p0, ft.mixin = qa, ft.negate = Qs, ft.nthArg = d0, ft.omit = mx, ft.omitBy = yx, ft.once = uv, ft.orderBy = Jy, ft.over = f0, ft.overArgs = dv, ft.overEvery = g0, ft.overSome = m0, ft.partial = Ha, ft.partialRight = up, ft.partition = qy, ft.pick = vx, ft.pickBy = wp, ft.property = Ep, ft.propertyOf = y0, ft.pull = Jm, ft.pullAll = ep, ft.pullAllBy = qm, ft.pullAllWith = Qm, ft.pullAt = ty, ft.range = v0, ft.rangeRight = x0, ft.rearg = fv, ft.reject = ev, ft.remove = ey, ft.rest = gv, ft.reverse = za, ft.sampleSize = rv, ft.set = bx, ft.setWith = Sx, ft.shuffle = nv, ft.slice = iy, ft.sortBy = av, ft.sortedUniq = hy, ft.sortedUniqBy = cy, ft.split = Hx, ft.spread = mv, ft.tail = py, ft.take = uy, ft.takeRight = dy, ft.takeRightWhile = fy, ft.takeWhile = gy, ft.tap = Oy, ft.throttle = yv, ft.thru = Zs, ft.toArray = yp, ft.toPairs = Cp, ft.toPairsIn = Mp, ft.toPath = M0, ft.toPlainObject = xp, ft.transform = wx, ft.unary = vv, ft.union = my, ft.unionBy = yy, ft.unionWith = vy, ft.uniq = xy, ft.uniqBy = by, ft.uniqWith = Sy, ft.unset = Cx, ft.unzip = Xa, ft.unzipWith = ip, ft.update = Mx, ft.updateWith = kx, ft.values = dn, ft.valuesIn = Ax, ft.without = wy, ft.words = Tp, ft.wrap = xv, ft.xor = Cy, ft.xorBy = My, ft.xorWith = ky, ft.zip = Ay, ft.zipObject = Ty, ft.zipObjectDeep = Py, ft.zipWith = Ey, ft.entries = Cp, ft.entriesIn = Mp, ft.extend = bp, ft.extendWith = io, qa(ft, ft), ft.add = A0, ft.attempt = Pp, ft.camelCase = Ox, ft.capitalize = kp, ft.ceil = T0, ft.clamp = Tx, ft.clone = Sv, ft.cloneDeep = Cv, ft.cloneDeepWith = Mv, ft.cloneWith = wv, ft.conformsTo = kv, ft.deburr = Ap, ft.defaultTo = s0, ft.divide = P0, ft.endsWith = Lx, ft.eq = Di, ft.escape = _x, ft.escapeRegExp = Dx, ft.every = Yy, ft.find = Xy, ft.findIndex = Jc, ft.findKey = ex, ft.findLast = Gy, ft.findLastIndex = qc, ft.findLastKey = ix, ft.floor = E0, ft.forEach = np, ft.forEachRight = sp, ft.forIn = rx, ft.forInRight = nx, ft.forOwn = sx, ft.forOwnRight = ox, ft.get = Va, ft.gt = Av, ft.gte = Tv, ft.has = hx, ft.hasIn = $a, ft.head = tp, ft.identity = ai, ft.includes = $y, ft.indexOf = Gm, ft.inRange = Px, ft.invoke = ux, ft.isArguments = zr, ft.isArray = ie, ft.isArrayBuffer = Pv, ft.isArrayLike = si, ft.isArrayLikeObject = Be, ft.isBoolean = Ev, ft.isBuffer = Ar, ft.isDate = Ov, ft.isElement = Lv, ft.isEmpty = _v, ft.isEqual = Dv, ft.isEqualWith = Iv, ft.isError = Fa, ft.isFinite = Rv, ft.isFunction = rr, ft.isInteger = dp, ft.isLength = to, ft.isMap = fp, ft.isMatch = Nv, ft.isMatchWith = Bv, ft.isNaN = jv, ft.isNative = Wv, ft.isNil = zv, ft.isNull = Yv, ft.isNumber = gp, ft.isObject = Ie, ft.isObjectLike = Ne, ft.isPlainObject = $n, ft.isRegExp = Ua, ft.isSafeInteger = Xv, ft.isSet = mp, ft.isString = eo, ft.isSymbol = di, ft.isTypedArray = un, ft.isUndefined = Gv, ft.isWeakMap = Hv, ft.isWeakSet = Fv, ft.join = $m, ft.kebabCase = Ix, ft.last = Mi, ft.lastIndexOf = Zm, ft.lowerCase = Rx, ft.lowerFirst = Nx, ft.lt = Uv, ft.lte = Vv, ft.max = O0, ft.maxBy = L0, ft.mean = _0, ft.meanBy = D0, ft.min = I0, ft.minBy = R0, ft.stubArray = tl, ft.stubFalse = el, ft.stubObject = b0, ft.stubString = S0, ft.stubTrue = w0, ft.multiply = N0, ft.nth = Km, ft.noConflict = u0, ft.noop = Qa, ft.now = Js, ft.pad = Bx, ft.padEnd = jx, ft.padStart = Wx, ft.parseInt = Yx, ft.random = Ex, ft.reduce = Qy, ft.reduceRight = tv, ft.repeat = zx, ft.replace = Xx, ft.result = xx, ft.round = B0, ft.runInContext = wt, ft.sample = iv, ft.size = sv, ft.snakeCase = Gx, ft.some = ov, ft.sortedIndex = ry, ft.sortedIndexBy = ny, ft.sortedIndexOf = sy, ft.sortedLastIndex = oy, ft.sortedLastIndexBy = ay, ft.sortedLastIndexOf = ly, ft.startCase = Fx, ft.startsWith = Ux, ft.subtract = j0, ft.sum = W0, ft.sumBy = Y0, ft.template = Vx, ft.times = C0, ft.toFinite = nr, ft.toInteger = se, ft.toLength = vp, ft.toLower = $x, ft.toNumber = ki, ft.toSafeInteger = $v, ft.toString = xe, ft.toUpper = Zx, ft.trim = Kx, ft.trimEnd = Jx, ft.trimStart = qx, ft.truncate = Qx, ft.unescape = t0, ft.uniqueId = k0, ft.upperCase = e0, ft.upperFirst = Za, ft.each = np, ft.eachRight = sp, ft.first = tp, qa(ft, function() {
- var e = {};
- return Gi(ft, function(C, K) {
- Se.call(ft.prototype, K) || (e[K] = C);
- }), e;
- }(), { chain: !1 }), ft.VERSION = o, xi(["bind", "bindKey", "curry", "curryRight", "partial", "partialRight"], function(e) {
- ft[e].placeholder = ft;
- }), xi(["drop", "take"], function(e, C) {
- ce.prototype[e] = function(K) {
- K = K === M ? 1 : Xe(se(K), 0);
- var st = this.__filtered__ && !C ? new ce(this) : this.clone();
- return st.__filtered__ ? st.__takeCount__ = Ze(K, st.__takeCount__) : st.__views__.push({
- size: Ze(K, E),
- type: e + (st.__dir__ < 0 ? "Right" : "")
- }), st;
- }, ce.prototype[e + "Right"] = function(K) {
- return this.reverse()[e](K).reverse();
- };
- }), xi(["filter", "map", "takeWhile"], function(e, C) {
- var K = C + 1, st = K == t || K == n;
- ce.prototype[e] = function(ut) {
- var mt = this.clone();
- return mt.__iteratees__.push({
- iteratee: qt(ut, 3),
- type: K
- }), mt.__filtered__ = mt.__filtered__ || st, mt;
- };
- }), xi(["head", "last"], function(e, C) {
- var K = "take" + (C ? "Right" : "");
- ce.prototype[e] = function() {
- return this[K](1).value()[0];
- };
- }), xi(["initial", "tail"], function(e, C) {
- var K = "drop" + (C ? "" : "Right");
- ce.prototype[e] = function() {
- return this.__filtered__ ? new ce(this) : this[K](1);
- };
- }), ce.prototype.compact = function() {
- return this.filter(ai);
- }, ce.prototype.find = function(e) {
- return this.filter(e).head();
- }, ce.prototype.findLast = function(e) {
- return this.reverse().find(e);
- }, ce.prototype.invokeMap = le(function(e, C) {
- return typeof e == "function" ? new ce(this) : this.map(function(K) {
- return Xn(K, e, C);
- });
- }), ce.prototype.reject = function(e) {
- return this.filter(Qs(qt(e)));
- }, ce.prototype.slice = function(e, C) {
- e = se(e);
- var K = this;
- return K.__filtered__ && (e > 0 || C < 0) ? new ce(K) : (e < 0 ? K = K.takeRight(-e) : e && (K = K.drop(e)), C !== M && (C = se(C), K = C < 0 ? K.dropRight(-C) : K.take(C - e)), K);
- }, ce.prototype.takeRightWhile = function(e) {
- return this.reverse().takeWhile(e).reverse();
- }, ce.prototype.toArray = function() {
- return this.take(E);
- }, Gi(ce.prototype, function(e, C) {
- var K = /^(?:filter|find|map|reject)|While$/.test(C), st = /^(?:head|last)$/.test(C), ut = ft[st ? "take" + (C == "last" ? "Right" : "") : C], mt = st || /^find/.test(C);
- ut && (ft.prototype[C] = function() {
- var xt = this.__wrapped__, bt = st ? [1] : arguments, Ct = xt instanceof ce, It = bt[0], Rt = Ct || ie(xt), Bt = function(he) {
- var ue = ut.apply(ft, xr([he], bt));
- return st && zt ? ue[0] : ue;
- };
- Rt && K && typeof It == "function" && It.length != 1 && (Ct = Rt = !1);
- var zt = this.__chain__, Ut = !!this.__actions__.length, Qt = mt && !zt, ae = Ct && !Ut;
- if (!mt && Rt) {
- xt = ae ? xt : new ce(this);
- var te = e.apply(xt, bt);
- return te.__actions__.push({ func: Zs, args: [Bt], thisArg: M }), new Si(te, zt);
- }
- return Qt && ae ? e.apply(this, bt) : (te = this.thru(Bt), Qt ? st ? te.value()[0] : te.value() : te);
- });
- }), xi(["pop", "push", "shift", "sort", "splice", "unshift"], function(e) {
- var C = Ss[e], K = /^(?:push|sort|unshift)$/.test(e) ? "tap" : "thru", st = /^(?:pop|shift)$/.test(e);
- ft.prototype[e] = function() {
- var ut = arguments;
- if (st && !this.__chain__) {
- var mt = this.value();
- return C.apply(ie(mt) ? mt : [], ut);
- }
- return this[K](function(xt) {
- return C.apply(ie(xt) ? xt : [], ut);
- });
- };
- }), Gi(ce.prototype, function(e, C) {
- var K = ft[C];
- if (K) {
- var st = K.name + "";
- Se.call(an, st) || (an[st] = []), an[st].push({ name: C, func: K });
- }
- }), an[Xs(M, T).name] = [{
- name: "wrapper",
- func: M
- }], ce.prototype.clone = tg, ce.prototype.reverse = eg, ce.prototype.value = ig, ft.prototype.at = Ly, ft.prototype.chain = _y, ft.prototype.commit = Dy, ft.prototype.next = Iy, ft.prototype.plant = Ny, ft.prototype.reverse = By, ft.prototype.toJSON = ft.prototype.valueOf = ft.prototype.value = jy, ft.prototype.first = ft.prototype.head, Rn && (ft.prototype[Rn] = Ry), ft;
- }, nn = Df();
- Dr ? ((Dr.exports = nn)._ = nn, Jo._ = nn) : Ue._ = nn;
- }).call(Gr);
- })(wo, wo.exports);
- var eC = wo.exports;
- const ss = /* @__PURE__ */ Cn(eC);
- t1(Vr);
- J0(Vr);
- Z0(Vr);
- Q0(Vr);
- let ho = null, _e = Le(null), Fe = Le("zh"), ll = Le(""), re = Le(null);
- const kt = z0({
- //极值数据
- leftIndex: -1,
- //左侧上下限对应下标
- rightIndex: -1,
- //右侧上下限对应下标
- rightTwoIndex: -1,
- //右2上下限对应下标
- hasLeftAxis: !1,
- hasRightAxis: !1,
- hasRightTwoAxis: !1,
- hasXAxis: !1,
- leftMin: 0,
- leftMax: 0,
- rightMin: 0,
- rightMax: 0,
- rightTwoMin: 0,
- rightTwoMax: 0,
- xMin: 0,
- xMax: 0
- });
- let hi = !1, qu = Le(!1);
- const Kl = Le(document.body.clientWidth < 1200 ? "phone" : "pc");
- function iC() {
- return {
- options: re,
- axisLimitState: kt,
- chartRender: rC,
- setLimitData: MC,
- isUseSelfLimit: qu
- };
- }
- function rC({ data: r, renderId: p, lang: M = "zh", changeLangIsCheck: o, showChartTitle: y = !0, shouldUseSelfLimit: N = !1 }) {
- kt.leftIndex = -1, kt.rightIndex = -1, kt.rightTwoIndex = -1, kt.hasLeftAxis = !1, kt.hasRightAxis = !1, kt.hasRightTwoAxis = !1, kt.hasXAxis = !1, qu.value || (kt.leftMin = 0, kt.leftMax = 0, kt.rightMin = 0, kt.rightMax = 0, kt.rightTwoMin = 0, kt.rightTwoMax = 0, kt.xMin = 0, kt.xMax = 0);
- let D = {};
- Fe.value = M, ll.value = p, _e.value = r, hi = N, [1, 11, 12].includes(r.ChartInfo.Source) ? D = {
- 1: jp,
- 2: pC,
- 3: cl,
- 4: cl,
- 5: uC,
- 6: cl,
- 7: gC,
- 10: bC,
- 11: wC,
- 14: hC
- }[r.ChartInfo.ChartType](r) : [2, 5].includes(r.ChartInfo.Source) ? D = vC(r) : [3].includes(r.ChartInfo.Source) ? D = xC(r) : [4, 6, 7, 8].includes(r.ChartInfo.Source) ? D = jp(r) : [9].includes(r.ChartInfo.Source) ? D = cC(r) : r.ChartInfo.Source === 10 && (kt.hasLeftAxis = !0, kt.leftMin = r.ChartInfo.LeftMin ? Number(r.ChartInfo.LeftMin) : Number(r.DataResp.YMinValue), kt.leftMax = r.ChartInfo.LeftMax ? Number(r.ChartInfo.LeftMax) : Number(r.DataResp.YMaxValue), kt.hasXAxis = !0, kt.xMin = r.ChartInfo.XMin ? Number(r.ChartInfo.XMin) : Number(r.DataResp.XMinValue), kt.xMax = r.ChartInfo.XMax ? Number(r.ChartInfo.XMax) : Number(r.DataResp.XMaxValue), D = SC(r));
- let U = nC();
- return re.value = { ...mo, ...U, ...D }, lC(y), aC(o), Vr.setOptions({ global: { useUTC: r.ChartInfo.ChartType == 2 } }), (D.series ? D.series.some((V) => V.chartType === "linear") : !1) ? ho = Vr.chart(ll.value, re.value) : ho = Vr.stockChart(ll.value, re.value), ho;
- }
- function nC() {
- if (!_e.value.ChartInfo.ChartThemeStyle)
- return {};
- let r = JSON.parse(_e.value.ChartInfo.ChartThemeStyle);
- return {
- legend: {
- ...mo.legend,
- ...r.legendOptions
- },
- chart: {
- ...mo.chart,
- ...r.drawOption
- },
- colors: r.colorsOptions
- };
- }
- function Ti(r, p) {
- const { MarkersLines: M, ChartType: o } = _e.value.ChartInfo, { EdbInfoList: y } = _e.value;
- return M ? JSON.parse(M).filter((H) => H.isShow && H.axis === r).map((H) => {
- let V = r === 3 && p === "datetime", G;
- if (V) {
- let R = o === 2 ? new Date(y[0].DataList[1].DataList[0].DataTimestamp).getFullYear() : "";
- G = o === 2 ? (/* @__PURE__ */ new Date(`${R}-${H.value}`)).getTime() : new Date(H.value).getTime();
- } else
- G = Number(H.value);
- return {
- value: G,
- dashStyle: H.dashStyle,
- width: Number(H.lineWidth),
- color: H.color,
- label: {
- text: H.text || "",
- verticalAlign: H.textPosition,
- style: {
- color: H.textColor,
- fontSize: H.textFontSize
- }
- }
- };
- }) : [];
- }
- function Pi(r, p) {
- const { MarkersAreas: M, ChartType: o } = _e.value.ChartInfo, { EdbInfoList: y } = _e.value;
- return M ? JSON.parse(M).filter((H) => H.isShow && H.axis === r).map((H) => {
- let V = r === 3 && p === "datetime", G, R;
- if (V) {
- let S = o === 2 ? new Date(y[0].DataList[1].DataList[0].DataTimestamp).getFullYear() : "";
- G = o === 2 ? (/* @__PURE__ */ new Date(`${S}-${H.fromValue}`)).getTime() : new Date(H.fromValue).getTime(), R = o === 2 ? (/* @__PURE__ */ new Date(`${S}-${H.toValue}`)).getTime() : new Date(H.toValue).getTime();
- } else
- G = Number(H.fromValue), R = Number(H.toValue);
- let B = {
- top: 12,
- middle: 0,
- bottom: -10
- };
- return {
- from: G,
- to: R,
- color: H.color,
- label: {
- text: H.text || "",
- verticalAlign: H.textPosition,
- y: B[H.textPosition],
- style: {
- color: H.textColor,
- fontSize: H.textFontSize
- }
- }
- };
- }) : [];
- }
- function Qu({ LatestDate: r, PredictChartColor: p }) {
- return {
- zoneAxis: "x",
- zones: [{
- value: new Date(r).getTime() + 1
- }, {
- dashStyle: "ShortDot",
- color: p
- }]
- };
- }
- function sC(r) {
- return r ? {
- zoneAxis: "x",
- zones: [{
- value: new Date(r).getTime() + 1
- }, {
- dashStyle: "ShortDot"
- }]
- } : {};
- }
- function td(r, p, M) {
- let o = Xt(p).diff(Xt(r), "years", !0);
- return !!([5, 6].includes(M) && o <= 1);
- }
- function hl(r, p) {
- const { IsAxis: M, IsOrder: o, EdbInfoType: y, LeadValue: N, LeadUnit: D } = r, U = p == "zh" ? {
- 0: "右轴",
- 2: "右2轴"
- } : {
- 0: "RHS",
- 2: "2-RHS"
- }, H = p == "zh" ? {
- 1: "逆序"
- } : {
- 1: "REV"
- }, V = p == "zh" ? {
- 0: "领先"
- } : {
- 0: "Lead"
- }, G = p === "zh" ? D : F0[D];
- let R = U[M] || "", B = H[Number(o)] ? `${R ? "," : ""}${H[Number(o)]}` : "", S = V[y] ? `${R || B ? "," : ""}${V[y]}${N}${G}` : "";
- return R || B || S ? `(${R}${B}${S})` : "";
- }
- function Co(r, p, M = "zh") {
- let o = "";
- const y = r.EdbNameEn ? `${r.EdbNameEn}${hl(r, "en")}` : "", N = p.length > 1 ? `${r.EdbAliasName || r.EdbName}(${r.SourceName})${hl(r, "zh")}` : `${r.EdbAliasName || r.EdbName}${hl(r, "zh")}`;
- if (o = M == "zh" ? N : y || N, o.length > 20) {
- let D = [];
- for (let U = 0; U < o.length / 20; U++)
- D.push(o.slice(U * 20, U * 20 + 20));
- o = D.join("<br>");
- }
- return o;
- }
- function Jl(r) {
- let p = r.filter((y) => y.IsAxis === 1), M = r.filter((y) => !y.IsAxis), o = r.filter((y) => y.IsAxis === 2);
- return [p, M, o].flat(1 / 0);
- }
- function oC() {
- let r = !0;
- return _e.value.ChartInfo.ChartNameEn || (r = !1), _e.value.EdbInfoList.forEach((p) => {
- p.EdbNameEn || (r = !1), _e.value.ChartInfo.ChartType !== 10 && p.Unit && !p.UnitEn && (r = !1);
- }), r;
- }
- function aC(r) {
- if (r && !oC())
- return;
- const { ChartType: p, Source: M } = _e.value.ChartInfo;
- M == 1 && (p == 5 ? (re.value.yAxis.title.text = Fe.value == "zh" ? re.value.yAxis.title.textZh : re.value.yAxis.title.textEn, re.value.xAxis.title.text = Fe.value == "zh" ? re.value.xAxis.title.textZh : re.value.xAxis.title.textEn, re.value.series.forEach((o) => {
- o.name = Fe.value == "zh" ? o.nameZh : o.nameEn;
- }), re.value.tooltip.formatter = Fe.value == "zh" ? re.value.tooltip.formatterZh : re.value.tooltip.formatterEn) : (re.value.yAxis.forEach((o) => {
- o.title.text = Fe.value == "zh" ? o.title.textZh : o.title.textEn;
- }), p != 2 && re.value.series.forEach((o) => {
- o.name = Fe.value == "zh" ? o.nameZh : o.nameEn != "无英文名称" ? o.nameEn : `<span style="color:#999">${o.nameEn}</span>`;
- }), p === 10 && (re.value.xAxis.title.text = Fe.value == "zh" ? re.value.xAxis.title.textZh : re.value.xAxis.title.textEn, re.value.tooltip.formatter = Fe.value == "zh" ? re.value.tooltip.formatterCh : re.value.tooltip.formatterEn, re.value.series.forEach((o) => {
- o.linkedTo || o.data.forEach((y) => {
- y.dataLabels.format = Fe.value == "zh" ? y.dataLabels.formatZh : y.dataLabels.formatEn || "无英文标签", y.dataLabels.color = Fe.value === "en" && !y.dataLabels.formatEn ? "#999" : "#333";
- });
- })), [7, 11].includes(p) && (re.value.xAxis.categories = _e.value.XEdbIdValue.map((o) => Fe.value == "zh" ? _e.value.EdbInfoList.find((y) => y.EdbInfoId === o).EdbAliasName || _e.value.EdbInfoList.find((y) => y.EdbInfoId === o).EdbName : _e.value.EdbInfoList.find((y) => y.EdbInfoId === o).EdbNameEn)))), [2, 3, 4].includes(M) && (re.value.yAxis.forEach((o) => {
- o.title.text = Fe.value == "zh" ? o.title.textZh : o.title.textEn || o.title.textZh;
- }), re.value.series.forEach((o) => {
- o.name = Fe.value == "en" && o.nameEn || o.nameZh;
- }), re.value.tooltip.formatter = Fe.value == "en" ? re.value.tooltip.formatterEn : re.value.tooltip.formatterZh, M == 2 && (re.value.xAxis.categories = Fr.value.filter((o) => o.IsHide === 0).map((o) => Fe.value == "en" ? o.NameEn : o.Name)), [3].includes(M) && (re.value.xAxis.title.text = Fe.value == "en" && re.value.xAxis.title.textEn || re.value.xAxis.title.textZh));
- }
- function lC(r) {
- if (r) {
- const p = _e.value.ChartInfo;
- re.value.title.textZh = p.ChartName, re.value.title.textEn = p.ChartNameEn, re.value.title.text = Fe.value == "zh" ? re.value.title.textZh : re.value.title.textEn || re.value.title.textZh;
- } else
- re.value.title.text = "";
- }
- function hC(r) {
- const p = r.ChartInfo.ChartThemeStyle ? JSON.parse(r.ChartInfo.ChartThemeStyle) : null, { XDataList: M, UnitList: o, SeriesList: y, IsHeap: N } = r.DataResp;
- kt.leftIndex = y.findIndex((R) => R.IsAxis === 1), kt.rightIndex = y.findIndex((R) => !R.IsAxis), kt.rightTwoIndex = y.findIndex((R) => R.IsAxis === 2), kt.leftIndex != -1 && (kt.hasLeftAxis = !0), kt.rightIndex != -1 && (kt.hasRightAxis = !0), kt.rightTwoIndex != -1 && (kt.hasRightTwoAxis = !0);
- const D = {
- categories: M.map((R) => this.currentLang == "en" ? R.NameEn : R.Name),
- tickWidth: 1,
- labels: {
- style: {
- ...p && p.xAxisOptions.style
- }
- },
- plotBands: Pi(3),
- plotLines: Ti(3)
- };
- let U = [], H = [];
- const V = y.some((R) => R.IsAxis === 2) ? Jl(y) : ss.cloneDeep(y);
- return V.forEach((R, B) => {
- const S = V.findIndex(
- (v) => v.IsAxis === R.IsAxis
- ), x = {
- 1: ["LeftName", "LeftNameEn"],
- 0: ["RightName", "RightNameEn"],
- 2: ["RightTwoName", "RightTwoNameEn"]
- };
- let f = 0, d = 0;
- const T = {
- 0: ["rightMin", "rightMax"],
- 1: ["leftMin", "leftMax"],
- 2: ["rightTwoMin", "rightTwoMax"]
- };
- T[R.IsAxis] && (f = kt[`${T[R.IsAxis][0]}`] || 0, d = kt[`${T[R.IsAxis][1]}`] || 0);
- let O = {
- ...gr,
- title: {
- text: o[x[R.IsAxis][0]],
- textCh: o[x[R.IsAxis][0]],
- // 中文
- // 中文不存在,无论英文有无都显示空
- textEn: o[x[R.IsAxis][0]] ? o[x[R.IsAxis][1]] : "",
- // 英文
- style: {
- ...p && p.yAxisOptions.style
- },
- align: "high",
- rotation: 0,
- y: -12,
- // x: (item.IsAxis===0 && this.rightTwoIndex>-1) ? -chartData[this.rightTwoIndex].Unit.length*12 : 0,
- textAlign: R.IsAxis === 1 ? "left" : "right",
- reserveSpace: !1
- },
- labels: {
- formatter: function(v) {
- return v.value;
- },
- align: "center",
- x: [0, 2].includes(R.IsAxis) ? 5 : -5,
- style: {
- ...p && p.yAxisOptions.style
- }
- },
- opposite: [0, 2].includes(R.IsAxis),
- min: Number(f),
- max: Number(d),
- tickWidth: 1,
- visible: S === B,
- plotBands: Pi(R.IsAxis),
- plotLines: Ti(R.IsAxis)
- }, j = B;
- N == 1 && (j = 0);
- let k = R.DataList || [];
- k.forEach((v, l) => {
- R.NoDataEdbIndex.includes(l) && (k[l] = null);
- });
- const b = p ? B % p.lineOptionList.length : B;
- let w = {
- data: k,
- type: R.ChartStyle || "",
- dashStyle: p && p.lineOptionList[b].dashStyle || "Solid",
- chartType: "linear",
- yAxis: j,
- name: R.SeriesName,
- nameZh: R.SeriesName,
- nameEn: R.SeriesNameEn,
- unitName: o[x[R.IsAxis][0]],
- unitNameCh: o[x[R.IsAxis][0]],
- unitNameEn: o[x[R.IsAxis][0]] ? o[x[R.IsAxis][1]] : "",
- color: R.ChartColor,
- lineWidth: Number(R.ChartWidth) || p && p.lineOptionList[b].lineWidth,
- borderWidth: 1,
- borderColor: R.ChartColor,
- marker: {
- //展示数据点
- enabled: !!(R.ChartStyle != "column" && R.IsPoint),
- radius: p && p.lineOptionList[b].radius || 5
- },
- dataLabels: {
- //展示数值
- enabled: !!R.IsNumber,
- align: R.ChartStyle == "column" ? "center" : void 0,
- y: R.ChartStyle == "column" ? -20 : 0,
- inside: R.ChartStyle == "column" ? !1 : void 0,
- crop: R.ChartStyle != "column"
- },
- stacking: N == 1 ? "normal" : void 0,
- zIndex: ["line", "spline"].includes(R.ChartStyle) ? 1 : 0
- //防止组合图曲线被遮住
- };
- U.push(O), H.push(w);
- }), {
- title: {
- text: ""
- },
- tooltip: {
- formatter: function() {
- let R = `<b>${this.points[0].x}</b>`;
- return this.points.forEach((B) => {
- const S = H.find((x) => x.name === B.series.name);
- R = R + `<br><span style="color:${B.color}">●</span>${S.name}:${B.y} ${S.unitNameCh}`;
- }), R;
- },
- formatterCh: function() {
- let R = `<b>${this.points[0].x}</b>`;
- return this.points.forEach((B) => {
- const S = H.find((x) => x.name === B.series.name);
- R = R + `<br><span style="color:${B.color}">●</span>${S.nameCh}:${B.y} ${S.unitNameCh}`;
- }), R;
- },
- formatterEn: function() {
- let R = `<b>${this.points[0].x}</b>`;
- return this.points.forEach((B) => {
- const S = H.find((x) => x.name === B.series.name);
- R = R + `<br><span style="color:${B.color}">●</span>${S.nameEn}:${B.y} ${S.unitNameEn}`;
- }), R;
- },
- shared: !0
- },
- series: H,
- yAxis: U,
- xAxis: D
- };
- }
- function cC(r) {
- kt.leftIndex = -1, kt.rightIndex = -1, kt.rightTwoIndex = -1;
- const p = r.ChartInfo.ChartThemeStyle ? JSON.parse(r.ChartInfo.ChartThemeStyle) : null, { DataList: M, LeftMaxValue: o, LeftMinValue: y, RightMaxValue: N, RightMinValue: D } = r.DataResp, U = {
- ...wn,
- tickWidth: 1,
- labels: {
- style: {
- ...p && p.xAxisOptions.style
- }
- }
- };
- let H = [], V = [];
- return M.forEach((R, B) => {
- let S = {
- ...gr,
- title: {
- text: R.Unit,
- textCh: R.Unit,
- // 中文
- textEn: R.UnitEn || R.Unit,
- align: "high",
- rotation: 0,
- y: -15,
- reserveSpace: !1,
- style: {
- ...p && p.yAxisOptions.style
- }
- },
- labels: {
- style: {
- ...p && p.yAxisOptions.style
- }
- },
- opposite: R.IsAxis !== 1,
- min: Number(B === 0 ? y : D),
- max: Number(B === 0 ? o : N),
- tickWidth: 1
- };
- const x = p ? B % p.lineOptionList.length : B;
- let f = {
- data: R.Value.map((d) => [d.X, d.Y]),
- dashStyle: p && p.lineOptionList[x].dashStyle || "Solid",
- type: p && p.lineOptionList[x].lineType || "spline",
- yAxis: B,
- name: R.Name,
- nameZh: R.Name,
- nameEn: R.NameEn || R.Name,
- color: R.Color,
- lineWidth: p && p.lineOptionList[x].lineWidth || 3,
- chartType: "linear",
- zIndex: 1
- };
- V.push(f), H.push(S);
- }), {
- title: {
- text: ""
- },
- tooltip: {
- formatter: function() {
- let R = M[0].Value.map((f) => f.X), B = R[1] - R[0], x = `<b>${`[${this.x},${this.x + B}]`}</b>`;
- return this.points.forEach((f) => {
- x += `<br><span style="color:${f.color}">●</span>${f.series.name}: ${f.y}%<br>`;
- }), x;
- },
- shared: !0
- },
- series: V,
- yAxis: H,
- xAxis: U
- };
- }
- function jp(r) {
- const p = r.ChartInfo.Source === 1, M = [4, 6, 7, 8].includes(r.ChartInfo.Source) ? [r.DataResp] : r.EdbInfoList;
- let o = [], y = [], N = {}, D = M.findIndex((f) => f.IsAxis === 1), U = M.findIndex((f) => !f.IsAxis), H = M.findIndex((f) => f.IsAxis === 2);
- kt.leftIndex = D, kt.rightIndex = U, kt.rightTwoIndex = H;
- const V = r.ChartInfo.ChartThemeStyle ? JSON.parse(r.ChartInfo.ChartThemeStyle) : null;
- let G = [], R = M.some((f) => f.IsAxis === 2) ? Jl(M) : M;
- R.forEach((f, d) => {
- let T = R.findIndex((t) => t.IsAxis === f.IsAxis), O = f.EdbName, j = R.filter(
- (t) => O === t.EdbName
- ), k = Co(f, j, "zh"), b = Co(f, j, "en"), w = f.EdbInfoCategoryType === 1 ? Qu(f) : {};
- const v = V ? d % V.lineOptionList.length : d;
- let l = {
- data: [],
- dataGrouping: {
- enabled: !1
- },
- type: V && V.lineOptionList[v].lineType || "spline",
- dashStyle: V && V.lineOptionList[v].dashStyle || "Solid",
- yAxis: d,
- name: k,
- nameZh: k,
- nameEn: b,
- color: f.ChartColor,
- lineWidth: Number(f.ChartWidth) || V && V.lineOptionList[v].lineWidth || 1,
- visible: !0,
- LatestDate: f.LatestDate,
- LatestValue: f.LatestValue,
- marker: V && V.lineOptionList[v].dataMark && V.lineOptionList[v].dataMark != "none" ? {
- enabled: !0,
- symbol: V.lineOptionList[v].markType || "circle",
- fillColor: V.lineOptionList[v].markColor,
- radius: V.lineOptionList[v].markSize
- } : {},
- ...w
- };
- f.DataList = f.DataList || [];
- for (let t of f.DataList)
- l.data.push([t.DataTimestamp, t.Value]);
- o.push(l), f.IsAxis, console.log("useSelfLimit", hi);
- let h = 0, u = 0;
- if ((!hi || !p) && (h = f.MinData, u = f.MaxData), hi && p) {
- const t = {
- 0: ["rightMin", "rightMax"],
- 1: ["leftMin", "leftMax"],
- 2: ["rightTwoMin", "rightTwoMax"]
- };
- t[f.IsAxis] && (h = kt[`${t[f.IsAxis][0]}`] || 0, u = kt[`${t[f.IsAxis][1]}`] || 0);
- }
- const i = r.ChartInfo.Source === 12 ? f.ConvertUnit : f.ConvertUnit || f.Unit, c = r.ChartInfo.Source === 12 ? f.ConvertEnUnit : f.ConvertEnUnit || f.UnitEn || f.ConvertUnit || f.Unit;
- let a = {
- ...gr,
- IsAxis: f.IsAxis,
- labels: {
- formatter: function(t) {
- return T !== d ? "" : t.value;
- },
- align: "center",
- x: [0, 2].includes(f.IsAxis) ? 5 : -5,
- style: {
- ...V && V.yAxisOptions.style
- }
- },
- tickWidth: T !== d ? 0 : 1,
- title: {
- text: T !== d ? "" : `${i}`,
- textZh: i,
- //中文单位
- textEn: i ? c : "",
- //英文单位,但如果无中文单位则不显示
- align: "high",
- rotation: 0,
- y: -15,
- x: f.IsAxis === 0 && H > -1 ? -R[H].Unit.length * 12 : 0,
- textAlign: f.IsAxis === 1 ? "left" : "right",
- reserveSpace: !1,
- style: {
- ...V && V.yAxisOptions.style
- }
- },
- opposite: [0, 2].includes(f.IsAxis),
- reversed: f.IsOrder,
- min: Number(h),
- max: Number(u),
- visible: T === d,
- chartEdbInfo: f,
- //指标数据用于在保存时读取指标数据
- plotBands: Pi(f.IsAxis),
- plotLines: Ti(f.IsAxis)
- };
- y.push(a), f.DataList.length > 0 && (G.push(f.DataList[0].DataTimestamp), G.push(f.DataList[f.DataList.length - 1].DataTimestamp));
- });
- let B = Math.min.apply(null, G), S = Math.max.apply(null, G);
- const x = td(B, S, r.ChartInfo.DateType);
- return N = {
- ...eu,
- labels: {
- formatter: function(f) {
- return x ? ts.dateFormat("%m/%d", f.value) : ts.dateFormat("%y/%m", f.value);
- },
- style: {
- ...V && V.xAxisOptions.style
- }
- },
- tickInterval: Kl.value === "phone" ? (S - B) / 6 / (24 * 3600 * 1e3) > 30 ? (S - B) / 6 : 24 * 3600 * 1e3 * 30 : void 0,
- plotBands: Pi(3, "datetime"),
- plotLines: Ti(3, "datetime")
- }, y.forEach((f) => {
- f.IsAxis === 1 ? (kt.hasLeftAxis = !0, (!hi || !p) && (kt.leftMin = M[D].MinData, kt.leftMax = M[D].MaxData, f.min = M[D].MinData, f.max = M[D].MaxData)) : f.IsAxis === 2 ? (kt.hasRightTwoAxis = !0, (!hi || !p) && (kt.rightTwoMin = M[H].MinData, kt.rightTwoMax = M[H].MaxData, f.min = M[H].MinData, f.max = M[H].MaxData)) : (kt.hasRightAxis = !0, (!hi || !p) && (kt.rightMin = M[U].MinData, kt.rightMax = M[U].MaxData, f.min = M[U].MinData, f.max = M[U].MaxData));
- }), {
- series: o,
- xAxis: [N],
- yAxis: y,
- rangeSelector: { enabled: !1 }
- };
- }
- function pC(r) {
- var b;
- kt.leftIndex = 0;
- const { RightAxis: p = {} } = r.DataResp || {};
- kt.rightIndex = p.IsShow ? 1 : -1, kt.rightTwoIndex = -1;
- const M = r.ChartInfo.ChartThemeStyle ? JSON.parse(r.ChartInfo.ChartThemeStyle) : null;
- let o = {};
- const y = r.EdbInfoList[0], N = r.ChartInfo.Calendar || "公历", D = M && M.colorsOptions.reverse();
- let U = [], H = [];
- const V = N === "农历" ? y.DataList.filter((w, v) => v > 0) : y.DataList;
- M && (M.lineOptionList = M.lineOptionList.reverse().slice(-V.length));
- let G = 0;
- V.forEach((w, v) => {
- let l = y.EdbInfoCategoryType === 1 ? sC(w.CuttingDataTimestamp) : {};
- const h = M ? v % M.lineOptionList.length : v;
- let u = {
- data: [],
- dataGrouping: {
- enabled: !1
- },
- type: M && M.lineOptionList[h].lineType || y.ChartStyle,
- dashStyle: M && M.lineOptionList[h].dashStyle || "Solid",
- yAxis: 0,
- name: w.ChartLegend,
- lineWidth: M && M.lineOptionList[h].lineWidth || 1,
- // color:colorsArr.slice(-chartDataHandle.length)[lineIndex], //与PC端的配置不同步,导致两边 十条之后的线条颜色不对应
- visible: !0,
- marker: M && M.lineOptionList[h].dataMark && M.lineOptionList[h].dataMark != "none" ? {
- enabled: !0,
- symbol: M.lineOptionList[h].markType || "circle",
- fillColor: M.lineOptionList[h].markColor,
- radius: M.lineOptionList[h].markSize
- } : {},
- ...l
- };
- if (w.DataList = w.DataList || [], (w.DataList || []).length > 0) {
- let c = w.DataList[w.DataList.length - 1].DataTimestamp - w.DataList[0].DataTimestamp;
- G = Math.max(G, c);
- }
- for (let c of w.DataList)
- u.data.push([c.DataTimestamp, c.Value]);
- U.push(u);
- }), o.colors = D.slice(-V.length);
- const { MaxMinLimits: R = {}, SamePeriodAverage: B = {}, SamePeriodStandardDeviation: S = {} } = r.DataResp || {};
- if (R.IsShow && R.List && R.List.length) {
- let w = {
- type: "arearange",
- //上下限是一个范围
- data: [],
- name: R.Legend || "同期上下限",
- color: R.Color || "#075EEE",
- fillOpacity: so(R.Color || "") > 0.75 ? 0.75 : so(R.Color || "")
- //透明度最高0.75
- };
- R.List.forEach((v) => {
- w.data.push([v.DataTimestamp, v.MinValue, v.MaxValue]);
- }), U.push(w);
- }
- if (B.IsShow && B.List) {
- let w = {
- type: "line",
- data: [],
- lineWidth: B.LineWidth,
- dashStyle: B.LineType,
- name: B.Legend || "同期均值",
- color: B.Color || "#075EEE"
- };
- B.List.forEach((v) => {
- w.data.push([v.DataTimestamp, v.Value]);
- }), U.push(w);
- }
- if (S.IsShow && S.List) {
- let w = {
- type: "arearange",
- //标准差也是一个范围
- data: [],
- name: S.Legend || "同期标准差",
- color: S.Color || "#075EEE",
- fillOpacity: so(S.Color || "") > 0.75 ? 0.75 : so(S.Color || "")
- };
- S.List.forEach((v) => {
- w.data.push([v.DataTimestamp, v.MinValue, v.MaxValue]);
- }), U.push(w);
- }
- if (p.IsShow) {
- let v = {
- ...p.Style === "column" ? {
- //柱形
- type: "column",
- color: p.ChartColor
- } : {
- //标记点
- type: "spline",
- lineWidth: p.LineWidth,
- dashStyle: p.LineStyle,
- color: p.IsConnected ? p.LineColor : "rgba(255, 255, 255, 0)",
- //没有连线颜色设置为透明
- marker: {
- enabled: !0,
- symbol: p.Shape,
- fillColor: p.ChartColor,
- radius: p.Size
- }
- },
- name: p.Legend || "",
- data: [],
- yAxis: 1
- };
- ((p.IndicatorType === 1 ? p.EdbInfoList[0].DataList : (b = r.EdbInfoList[1]) == null ? void 0 : b.DataList) || []).forEach((h) => {
- v.data.push([h.DataTimestamp, h.Value]);
- }), U.push(v);
- }
- let x = 0, f = 0, d = 0, T = 0;
- hi ? (x = kt.leftMin || 0, f = kt.leftMax || 0, kt.rightIndex !== -1 && (d = kt.rightMin || 0, T = kt.rightMax || 0)) : (x = y.MinData, f = y.MaxData);
- const O = y.ConvertUnit || y.Unit, j = y.ConvertEnUnit || y.UnitEn || y.ConvertUnit || y.Unit;
- if (H = [{
- IsAxis: y.IsAxis,
- labels: {
- align: "center",
- y: 5,
- style: {
- ...M && M.yAxisOptions.style
- }
- },
- title: {
- text: `${O}`,
- textZh: O,
- // 中文
- // 中文不存在,无论英文有无都显示空
- textEn: O ? j || "英文单位" : "",
- // 英文
- align: "high",
- rotation: 0,
- y: -5,
- x: 0,
- textAlign: "left",
- reserveSpace: !1,
- style: {
- ...M && M.yAxisOptions.style
- }
- },
- max: Number(f),
- min: Number(x),
- plotBands: Pi(1),
- plotLines: Ti(1),
- lineWidth: 1,
- lineColor: "#bfbfbf",
- tickColor: "#bfbfbf",
- offset: 0,
- opposite: !1,
- reversed: !1,
- visible: !0,
- gridLineWidth: 0,
- tickWidth: 1,
- tickLength: 5,
- tickPosition: "inside",
- endOnTick: !1,
- startOnTick: !1,
- showLastLabel: !0,
- //显示最后刻度值
- tickPixelInterval: 50
- // chartEdbInfo:item//指标数据
- }], p.IsShow) {
- const w = (p.IndicatorType === 1 ? p.EdbInfoList[0] : r.EdbInfoList[1]) || { Unit: "" };
- p.IndicatorType === 1 ? w.Unit = p.NumFormat === 1 ? "%" : "" : w.Unit = r.EdbInfoList[1] && (r.EdbInfoList[1].ConvertUnit || r.EdbInfoList[1].Unit) || "", H.push({
- ...H0.yAxis,
- opposite: !0,
- //右轴
- labels: {
- align: "center",
- y: 5,
- style: {
- ...M && M.yAxisOptions.style
- }
- },
- title: {
- text: w.Unit || "",
- style: {
- ...M && M.yAxisOptions.style
- },
- align: "high",
- rotation: 0,
- y: -5,
- x: 0,
- textAlign: "right",
- reserveSpace: !1
- },
- max: Number(T),
- min: Number(d)
- });
- }
- o.series = U, o.yAxis = H, kt.hasLeftAxis = !0, hi || (kt.leftMin = Number(y.MinData), kt.leftMax = Number(y.MaxData));
- let k = {
- tickPosition: "inside",
- lineColor: "#bfbfbf",
- tickColor: "#bfbfbf",
- tickLength: 5,
- type: "datetime",
- ordinal: !1,
- dateTimeLabelFormats: {
- day: "%y/%m",
- week: "%y/%m",
- month: "%y/%m",
- year: "%y/%m"
- },
- labels: {
- formatter: (w) => ts.dateFormat("%m/%d", w.value),
- style: {
- ...M && M.xAxisOptions.style
- }
- },
- tickInterval: Kl.value === "phone" ? G / 6 : void 0,
- //季节图
- plotBands: Pi(3, "datetime"),
- plotLines: Ti(3, "datetime")
- };
- return o.xAxis = [k], o.tooltip = {
- split: !1,
- shared: !0,
- dateTimeLabelFormats: {
- // 时间格式化字符
- day: "%m/%d",
- week: "%m/%d",
- month: "%m/%d",
- year: "%m/%d"
- },
- xDateFormat: "%m/%d"
- }, {
- ...o
- // title: {
- // enabled: true,
- // text:e.ChartInfo.ChartName
- // },
- // legend:{
- // enabled:true,
- // verticalAlign: 'top',
- // y:-10,
- // x:(10 * data.Unit.length)/2
- // }
- };
- }
- function cl(r) {
- const p = r.EdbInfoList;
- let o = {
- 3: "areaspline",
- 4: "column",
- 6: ""
- }[r.ChartInfo.ChartType];
- const y = r.ChartInfo.ChartThemeStyle ? JSON.parse(r.ChartInfo.ChartThemeStyle) : null;
- let N = [], D = [], U = {}, H = {}, V, G, R, B = [], S = p.some((O) => O.IsAxis === 2) ? Jl(p) : p;
- r.ChartInfo.ChartType === 3 && r.ChartInfo.ExtraConfig && (H = JSON.parse(r.ChartInfo.ExtraConfig)), S.forEach((O, j) => {
- let k = S.findIndex((_) => _.IsAxis === O.IsAxis), b = j;
- [4].includes(r.ChartInfo.ChartType) || r.ChartInfo.ChartType === 3 && H.IsHeap == 1 ? b = 0 : r.ChartInfo.ChartType === 6 && ["areaspline", "column"].includes(O.ChartStyle) && (b = S.findIndex((_) => _.ChartStyle === O.ChartStyle)), O.IsAxis = b === j ? O.IsAxis : S[b].IsAxis, O.IsOrder = b === j ? O.IsOrder : S[b].IsOrder, V = [4].includes(r.ChartInfo.ChartType) ? S[b].IsAxis ? b : -1 : p.findIndex((_) => _.IsAxis === 1), G = [4].includes(r.ChartInfo.ChartType) ? S[b].IsAxis ? -1 : b : p.findIndex((_) => !_.IsAxis), R = [4].includes(r.ChartInfo.ChartType) ? -1 : p.findIndex((_) => _.IsAxis === 2), kt.leftIndex = V, kt.rightIndex = G, kt.rightTwoIndex = R;
- let w = O.EdbName, v = S.filter(
- (_) => w === _.EdbName
- ), l = Co(O, v, "zh"), h = Co(O, v, "en"), u = O.EdbInfoCategoryType === 1 ? Qu(O) : {};
- const i = y ? j % y.lineOptionList.length : j;
- let c = {
- data: [],
- dataGrouping: {
- enabled: !1
- },
- type: r.ChartInfo.ChartType !== 3 ? o || O.ChartStyle : H.IsHeap == 1 ? "area" : y && y.lineOptionList[i].lineType || O.ChartStyle,
- yAxis: b,
- name: l,
- nameZh: l,
- nameEn: h,
- color: O.ChartColor,
- lineWidth: Number(O.ChartWidth) || y && y.lineOptionList[i].lineWidth || 1,
- fillColor: r.ChartInfo.ChartType === 3 || r.ChartInfo.ChartType === 6 && O.ChartStyle === "areaspline" ? O.ChartColor : void 0,
- visible: !0,
- LatestDate: O.LatestDate,
- LatestValue: O.LatestValue,
- ...u,
- stacking: r.ChartInfo.ChartType == 6 ? r.DataResp.IsHeap ? "normal" : void 0 : r.ChartInfo.ChartType == 3 && H.IsHeap == 1 ? H.HeapWay == 1 ? "normal" : "percent" : void 0,
- threshold: r.ChartInfo.ChartType == 3 ? O.ChartScale ? Number(O.ChartScale) : 0 : null
- };
- O.DataList = O.DataList || [];
- for (let _ of O.DataList)
- c.data.push([_.DataTimestamp, _.Value]);
- N.push(c);
- let a = 0, t = 0;
- if (!hi)
- a = S[k].MinData, t = S[k].MaxData;
- else {
- const _ = {
- 0: ["rightMin", "rightMax"],
- 1: ["leftMin", "leftMax"],
- 2: ["rightTwoMin", "rightTwoMax"]
- };
- _[O.IsAxis] && (a = kt[`${_[O.IsAxis][0]}`] || 0, t = kt[`${_[O.IsAxis][1]}`] || 0);
- }
- O.IsAxis;
- const s = O.ConvertUnit || O.Unit, n = O.ConvertEnUnit || O.UnitEn || O.ConvertUnit || O.Unit;
- let P = {
- ...gr,
- IsAxis: O.IsAxis,
- labels: {
- formatter: (_) => k !== j ? "" : r.ChartInfo.ChartType === 3 && H.HeapWay == 2 ? _.value + "%" : _.value,
- align: "center",
- x: [0, 2].includes(O.IsAxis) ? 5 : -5,
- style: {
- ...y && y.yAxisOptions.style
- }
- },
- title: {
- // text: sameSideIndex !== index ? '' : `${item.Unit}`,
- text: s,
- textZh: s,
- // 中文
- // 中文不存在,无论英文有无都显示空
- textEn: s ? n || "英文单位" : "",
- // 英文
- align: "high",
- rotation: 0,
- y: -15,
- x: O.IsAxis === 0 && R > -1 ? -S[R].Unit.length * 12 : 0,
- textAlign: O.IsAxis === 1 ? "left" : "right",
- reserveSpace: !1,
- style: {
- ...y && y.yAxisOptions.style
- }
- },
- opposite: [0, 2].includes(O.IsAxis),
- reversed: O.IsOrder,
- min: r.ChartInfo.ChartType === 3 && H.HeapWay == 2 ? null : Number(a),
- max: r.ChartInfo.ChartType === 3 && H.HeapWay == 2 ? null : Number(t),
- tickWidth: k !== j ? 0 : 1,
- visible: b === j && k === j,
- plotBands: Pi(O.IsAxis),
- plotLines: Ti(O.IsAxis),
- chartEdbInfo: O
- //指标数据用于在保存时读取指标数据
- };
- D.push(P), O.DataList.length > 0 && (B.push(O.DataList[0].DataTimestamp), B.push(O.DataList[O.DataList.length - 1].DataTimestamp));
- });
- let x = Math.min.apply(null, B), f = Math.max.apply(null, B);
- const d = td(x, f, r.ChartInfo.DateType);
- U = {
- ...eu,
- labels: {
- formatter: function(O) {
- return d ? ts.dateFormat("%m/%d", O.value) : ts.dateFormat("%y/%m", O.value);
- },
- style: {
- ...y && y.xAxisOptions.style
- }
- },
- tickInterval: Kl.value === "phone" ? (f - x) / 6 / (24 * 3600 * 1e3) > 30 ? (f - x) / 6 : 24 * 3600 * 1e3 * 30 : void 0,
- plotBands: Pi(3, "datetime"),
- plotLines: Ti(3, "datetime")
- }, D.forEach((O) => {
- O.IsAxis === 1 ? (kt.hasLeftAxis = !0, hi || (kt.leftMin = p[V].MinData, kt.leftMax = p[V].MaxData, O.min = p[V].MinData, O.max = p[V].MaxData)) : O.IsAxis === 2 ? (kt.hasRightTwoAxis = !0, hi || (kt.rightTwoMin = p[R].MinData, kt.rightTwoMax = p[R].MaxData, O.min = p[R].MinData, O.max = p[R].MaxData)) : (kt.hasRightAxis = !0, hi || (kt.rightMin = p[G].MinData, kt.rightMax = p[G].MaxData, O.min = p[G].MinData, O.max = p[G].MaxData));
- });
- let T = {
- series: N,
- xAxis: U,
- yAxis: D,
- rangeSelector: { enabled: !1 }
- };
- return r.ChartInfo.ChartType === 3 && H.HeapWay == 2 && (T.tooltip = {
- split: !1,
- shared: !0,
- dateTimeLabelFormats: {
- // 时间格式化字符
- day: "%Y/%m/%d",
- week: "%Y/%m",
- month: "%Y/%m",
- year: "%Y/%m"
- },
- xDateFormat: "%Y/%m/%d",
- className: "chart-tooltips-box",
- pointFormat: '<span style="color:{point.color}">●</span><span>{series.name}</span>:<b>{point.percentage:.1f}%</b> ({point.y:,.1f})<br/>'
- }), T;
- }
- function uC(r) {
- kt.leftIndex = 1, kt.rightIndex = -1, kt.rightTwoIndex = -1;
- const p = r.EdbInfoList, { ChartInfo: M } = r, o = M.ChartThemeStyle ? JSON.parse(M.ChartThemeStyle) : null;
- kt.hasLeftAxis = !0;
- const y = [];
- let N = {}, D = ss.cloneDeep(p)[0].DataList || [], U = ss.cloneDeep(p)[1].DataList || [];
- D.forEach((j) => {
- U.forEach((k) => {
- if (j.DataTimestamp === k.DataTimestamp) {
- let b = j.Value + "_" + k.Value;
- N[b] ? N[b].push(Xt(j.DataTimestamp).format("YYYY/MM/DD")) : N[b] = [Xt(j.DataTimestamp).format("YYYY/MM/DD")], y.push({
- x: j.Value,
- y: k.Value
- });
- }
- });
- }), y.sort((j, k) => j - k);
- let H = {
- formatter: function() {
- return `<strong>${N[this.x + "_" + this.y].length > 4 ? N[this.x + "_" + this.y].slice(0, 4).join() + "..." : N[this.x + "_" + this.y].join()}</strong><br>
- ${p[0].EdbName}: <span style="font-weight: 600"> ${this.x}</span><br>
- ${p[1].EdbName}: <span style="font-weight: 600"> ${this.y}</span>
- `;
- },
- // 中文
- formatterCh: function() {
- return `<strong>${N[this.x + "_" + this.y].length > 4 ? N[this.x + "_" + this.y].slice(0, 4).join() + "..." : N[this.x + "_" + this.y].join()}</strong><br>
- ${p[0].EdbName}: <span style="font-weight: 600"> ${this.x}</span><br>
- ${p[1].EdbName}: <span style="font-weight: 600"> ${this.y}</span>
- `;
- },
- // 英文
- formatterEn: function() {
- let j = `${p[0].EdbNameEn}`, k = `${p[1].EdbNameEn}`;
- return `<strong>${N[this.x + "_" + this.y].length > 4 ? N[this.x + "_" + this.y].slice(0, 4).join() + "..." : N[this.x + "_" + this.y].join()}</strong><br>
- ${j}: <span style="font-weight: 600"> ${this.x}</span><br>
- ${k}: <span style="font-weight: 600"> ${this.y}</span>
- `;
- }
- };
- const { IsOrder: V, ChartColor: G } = p[0];
- let R = 0, B = 0;
- hi ? (R = kt.leftMin || 0, B = kt.leftMax || 0) : (R = r.ChartInfo.LeftMin || 0, B = r.ChartInfo.LeftMax || 0), console.log("check limit", R, B);
- const S = p[1].ConvertUnit || p[1].Unit, x = p[1].ConvertEnUnit || p[1].UnitEn || p[1].ConvertUnit || p[1].Unit;
- let f = {
- title: {
- text: `${S}`,
- textZh: S,
- textEn: S ? x : "",
- align: "high",
- rotation: 0,
- y: -15,
- x: 0,
- textAlign: "left",
- reserveSpace: !1,
- style: {
- ...o && o.yAxisOptions.style
- }
- },
- labels: {
- formatter: function(j) {
- return j.value;
- },
- align: "center",
- style: {
- ...o && o.yAxisOptions.style
- }
- },
- opposite: !1,
- reversed: V,
- min: Number(R),
- max: Number(B),
- tickWidth: 1,
- tickLength: 5,
- lineWidth: 1,
- lineColor: "#bfbfbf",
- tickColor: "#bfbfbf",
- offset: 0,
- visible: !0,
- gridLineWidth: 0,
- tickPosition: "inside",
- endOnTick: !1,
- startOnTick: !1,
- showLastLabel: !0,
- tickPixelInterval: 50,
- plotBands: Pi(1),
- plotLines: Ti(1)
- }, d = {
- data: [],
- type: "scatter",
- name: `${M.ChartName}${V ? "(逆序)" : ""}`,
- nameZh: `${M.ChartName}${V ? "(逆序)" : ""}`,
- nameEn: M.ChartNameEn ? `${M.ChartNameEn}${V ? "(reverse)" : ""}` : "",
- color: G,
- visible: !0,
- chartType: "linear",
- marker: {
- radius: o && o.lineOptionList[0].radius || 5
- }
- };
- y.forEach((j) => {
- d.data.push([j.x, j.y]);
- });
- const T = p[0].ConvertUnit || p[0].Unit, O = p[0].ConvertEnUnit || p[0].UnitEn || p[0].ConvertUnit || p[0].Unit;
- return {
- title: {
- text: ""
- },
- series: [d],
- yAxis: f,
- xAxis: {
- ...wn,
- title: {
- text: `${T}`,
- textZh: T,
- textEn: T ? O : "",
- align: "high",
- rotation: 0,
- x: 0,
- offset: 20,
- style: {
- ...o && o.xAxisOptions.style
- }
- },
- labels: {
- style: {
- ...o && o.xAxisOptions.style
- }
- }
- },
- tooltip: H
- };
- }
- const ed = Le([]), id = Le([]), dC = Le([]);
- function fC(r) {
- var G, R, B;
- let p = [];
- const M = ss.cloneDeep(ed.value), o = r.ChartInfo.ChartThemeStyle ? JSON.parse(r.ChartInfo.ChartThemeStyle) : null;
- let y = {
- ...wn,
- categories: id.value,
- tickWidth: 1,
- labels: {
- style: {
- ...o && o.xAxisOptions.style
- }
- }
- };
- const { leftMin: N, leftMax: D } = kt, U = (G = r.ChartInfo) == null ? void 0 : G.Unit, H = ((R = r.ChartInfo) == null ? void 0 : R.UnitEn) || ((B = r.ChartInfo) == null ? void 0 : B.Unit);
- let V = {
- ...gr,
- title: {
- text: U,
- textZh: U,
- textEn: H,
- align: "high",
- rotation: 0,
- y: -12,
- x: 0,
- textAlign: "left",
- reserveSpace: !1,
- style: {
- ...o && o.yAxisOptions.style
- }
- },
- labels: {
- formatter: function(S) {
- return S.value;
- },
- align: "center",
- style: {
- ...o && o.yAxisOptions.style
- }
- },
- min: Number(N),
- max: Number(D),
- opposite: !1,
- tickWidth: 1,
- plotBands: Pi(1),
- plotLines: Ti(1)
- };
- return M.forEach((S) => {
- let x = {
- data: S.Value,
- type: "column",
- yAxis: 0,
- name: S.Name || S.Date,
- nameZh: S.Name || S.Date,
- nameEn: S.Date,
- color: S.Color,
- chartType: "linear",
- visible: !0
- };
- p.push(x);
- }), {
- title: {
- text: ""
- },
- plotOptions: {
- column: {
- stacking: null
- }
- },
- series: p,
- yAxis: [V],
- xAxis: y
- };
- }
- function gC(r) {
- const { XEdbIdValue: p, YDataList: M, EdbInfoList: o, ChartInfo: y } = r;
- let N = p.map((D) => o.find((U) => U.EdbInfoId === D).EdbAliasName);
- return kt.leftIndex = -1, kt.rightIndex = -1, kt.rightTwoIndex = -1, ed.value = M, id.value = N, dC.value = o, kt.hasLeftAxis = !0, kt.leftMin = Number(y.LeftMin), kt.leftMax = Number(y.LeftMax), fC(r);
- }
- const rd = Le([]), Fr = Le([]), Ri = Le([]), mC = (r, p) => {
- kt.leftIndex = -1, kt.rightIndex = -1, kt.rightTwoIndex = -1;
- const M = _e.value.ChartInfo.ChartThemeStyle ? JSON.parse(_e.value.ChartInfo.ChartThemeStyle) : null;
- let o = [];
- const y = ss.cloneDeep(rd.value);
- console.log(y);
- let N = {
- ...wn,
- categories: Fr.value.filter((H) => H.IsHide === 0).map((H) => H.Name),
- tickWidth: 1,
- labels: {
- style: {
- ...M && M.xAxisOptions.style
- }
- }
- }, D = {
- ...gr,
- title: {
- text: Ri.value[0].Unit,
- textZh: Ri.value[0].Unit,
- textEn: Ri.value[0].Unit ? Ri.value[0].UnitEn || "英文单位" : "",
- align: "high",
- rotation: 0,
- y: -15,
- textAlign: "left",
- reserveSpace: !1,
- style: {
- ...M && M.yAxisOptions.style
- }
- },
- labels: {
- formatter: function(H) {
- return H.value;
- },
- align: "center",
- style: {
- ...M && M.yAxisOptions.style
- }
- },
- min: Number(r),
- max: Number(p),
- opposite: !1,
- tickWidth: 1
- };
- return y.forEach((H, V) => {
- let G = yC(H);
- const R = M ? V % M.lineOptionList.length : V;
- let B = {
- data: G,
- type: M && M.lineOptionList[R].lineType || "spline",
- dashStyle: M && M.lineOptionList[R].dashStyle || "Solid",
- yAxis: 0,
- name: H.Name,
- nameZh: H.Name,
- nameEn: H.NameEn,
- color: H.Color,
- chartType: "linear",
- lineWidth: M && M.lineOptionList[R].lineWidth || 3,
- visible: !0,
- marker: {
- enabled: !1
- }
- };
- o.push(B);
- }), {
- title: {
- text: ""
- },
- series: o,
- yAxis: [D],
- xAxis: N,
- tooltip: {
- formatter: function() {
- const H = this;
- let V = "";
- return H.points.forEach((G) => {
- let R = y.find((x) => x.Name === G.series.name), B = Fr.value.findIndex((x) => x.Name === H.x);
- const S = R.XEdbInfoIdList[B];
- if (S) {
- const x = Ri.value.some((d) => d.EdbInfoId === S);
- let f = _e.value.ChartInfo.Source === 5 ? x ? R.NameList[B] : `${_e.value.DataResp.ProfitName}(${R.NameList[B]})` : Ri.value.find((d) => d.EdbInfoId === R.XEdbInfoIdList[B]).EdbName;
- V += `<b>${f}</b>`, R.NoDataEdbList.includes(R.XEdbInfoIdList[B]) ? V += `<br><span style="color:${G.color}">●</span>${R.Date}: 无<br>` : V += `<br><span style="color:${G.color}">●</span>${R.Date}: ${G.y}<br>`;
- }
- }), V || "无合约";
- },
- formatterCh: function() {
- const H = this;
- let V = "";
- return H.points.forEach((G) => {
- let R = y.find((x) => x.Name === G.series.name), B = Fr.value.findIndex((x) => x.Name === H.x);
- const S = R.XEdbInfoIdList[B];
- if (S) {
- const x = Ri.value.some((d) => d.EdbInfoId === S);
- let f = _e.value.ChartInfo.Source === 5 ? x ? R.NameList[B] : `${_e.value.DataResp.ProfitName}(${R.NameList[B]})` : Ri.value.find((d) => d.EdbInfoId === R.XEdbInfoIdList[B]).EdbName;
- V += `<b>${f}</b>`, R.NoDataEdbList.includes(R.XEdbInfoIdList[B]) ? V += `<br><span style="color:${G.color}">●</span>${R.Date}: 无<br>` : V += `<br><span style="color:${G.color}">●</span>${R.Date}: ${G.y}<br>`;
- }
- }), V || "无合约";
- },
- formatterEn: function() {
- const H = this;
- let V = "";
- return H.points.forEach((G) => {
- let R = y.find((x) => x.NameEn === G.series.name), B = Fr.value.findIndex((x) => x.NameEn === H.x);
- const S = R.XEdbInfoIdList[B];
- if (S) {
- const x = Ri.value.some((d) => d.EdbInfoId === S);
- let f = _e.value.ChartInfo.Source === 5 ? x ? R.NameList[B] : `${_e.value.DataResp.ProfitNameEn}(${R.NameList[B]})` : Ri.value.find((d) => d.EdbInfoId === R.XEdbInfoIdList[B]).EdbNameEn;
- V += `<b>${f}</b>`, R.NoDataEdbList.includes(R.XEdbInfoIdList[B]) ? V += `<br><span style="color:${G.color}">●</span>${R.Date}: 无<br>` : V += `<br><span style="color:${G.color}">●</span>${R.Date}: ${G.y}<br>`;
- }
- }), V || "无合约";
- },
- shared: !0
- }
- };
- };
- function yC(r) {
- let p = r.XEdbInfoIdList.filter((D) => !r.NoDataEdbList.includes(D)), M = r.XEdbInfoIdList.findIndex((D) => D === p[0]), o = r.XEdbInfoIdList.findIndex((D) => D === p[p.length - 1]), y = r.Value.map((D, U) => U < M || U > o ? null : D), N = [];
- return Fr.value.forEach((D, U) => {
- D.IsHide !== 1 && N.push(y[U]);
- }), N;
- }
- function vC(r) {
- const { XDataList: p, YDataList: M, EdbInfoList: o, ChartInfo: y, DataResp: N } = r;
- return Ri.value = o, rd.value = y.Source === 5 ? N.YDataList : M, Fr.value = y.Source === 5 ? N.XDataList : p, kt.hasLeftAxis = !0, kt.leftMin = Number(y.LeftMin), kt.leftMax = Number(y.LeftMax), mC(y.LeftMin, y.LeftMax);
- }
- function xC(r) {
- const p = r.ChartInfo.ChartThemeStyle ? JSON.parse(r.ChartInfo.ChartThemeStyle) : null;
- kt.leftIndex = -1, kt.rightIndex = -1, kt.rightTwoIndex = -1;
- let M = {
- categories: r.ChartInfo.Source === 3 ? r.XEdbIdValue : r.DataResp.XDateTimeValue,
- tickWidth: 1,
- title: {
- text: r.ChartInfo.Source === 3 ? `期数(${r.CorrelationChartInfo.LeadUnit})` : null,
- textZh: r.ChartInfo.Source === 3 ? `期数(${r.CorrelationChartInfo.LeadUnit})` : null,
- textEn: r.ChartInfo.Source === 3 ? `stage(${Lp[r.CorrelationChartInfo.LeadUnit]})` : null,
- align: "high",
- rotation: 0,
- x: 0,
- y: 10,
- offset: 20,
- style: {
- ...p && p.xAxisOptions.style
- }
- },
- labels: {
- style: {
- ...p && p.xAxisOptions.style
- }
- },
- tickInterval: 1,
- offset: 0,
- tickmarkPlacement: "on"
- }, o = {
- ...gr,
- title: {
- text: "相关性系数",
- textZh: "相关性系数",
- textEn: "Correlation coefficient",
- align: "high",
- rotation: 0,
- y: -15,
- textAlign: "left",
- reserveSpace: !1,
- style: {
- ...p && p.yAxisOptions.style
- }
- },
- labels: {
- formatter: function(V) {
- return V.value;
- },
- align: "center",
- style: {
- ...p && p.yAxisOptions.style
- }
- },
- opposite: !1,
- tickWidth: 1
- }, y = [];
- r.YDataList.forEach((V, G) => {
- const R = p ? G % p.lineOptionList.length : G;
- let B = {
- data: V.Value,
- type: p && p.lineOptionList[R].lineType || "spline",
- dashStyle: p && p.lineOptionList[R].dashStyle || "Solid",
- yAxis: 0,
- name: V.Name || r.ChartInfo.ChartName,
- nameZh: V.Name || r.ChartInfo.ChartName,
- nameEn: V.NameEn || r.ChartInfo.ChartNameEn,
- color: V.Color,
- chartType: "linear",
- lineWidth: p && p.lineOptionList[R].lineWidth || 3,
- visible: !0,
- marker: {
- enabled: !1
- }
- };
- y.push(B);
- });
- const { LeadValue: N, LeadUnit: D } = r.CorrelationChartInfo, { Source: U } = r.ChartInfo;
- let H = {
- formatter: function() {
- return `<p>相关性系数:${this.y.toFixed(4)}</p><br><p>领先${U === 3 ? this.x + "期" : N + D}</p>`;
- },
- formatterCh: function() {
- return `<p>相关性系数:${this.y.toFixed(4)}</p><br><p>领先${U === 3 ? this.x + "期" : N + D}</p>`;
- },
- formatterEn: function() {
- return `<p>Correlation coefficient:${this.y.toFixed(4)}</p><br><p>lead${U === 3 ? this.x + "stage" : N + Lp[D]}</p>`;
- }
- };
- return go(() => {
- re.value = {
- isRelevanceChart: r.ChartInfo.Source === 3,
- title: {
- text: ""
- },
- series: y,
- yAxis: [o],
- xAxis: M,
- tooltip: H
- }, ho.update(re.value, !0);
- }), {
- isRelevanceChart: !0,
- title: {
- text: ""
- },
- series: y,
- yAxis: [o],
- xAxis: M,
- tooltip: H
- };
- }
- function bC({ DataResp: r, ChartInfo: p }) {
- kt.leftIndex = -1, kt.rightIndex = -1, kt.rightTwoIndex = -1;
- const M = p.ChartThemeStyle ? JSON.parse(p.ChartThemeStyle) : null, { DataList: o, XName: y, XNameEn: N, XUnitName: D, XUnitNameEn: U, YName: H, YNameEn: V, YUnitName: G, YUnitNameEn: R } = r, B = Number(r.YMinValue), S = Number(r.YMaxValue), x = Number(r.XMinValue), f = Number(r.XMaxValue);
- kt.hasLeftAxis = !0, kt.hasXAxis = !0, kt.leftMin = B, kt.leftMax = S, kt.xMin = x, kt.xMax = f;
- let d = {
- ...gr,
- title: {
- text: H,
- textZh: H,
- // 中文
- textEn: V || "",
- style: {
- ...M && M.yAxisOptions.style
- },
- align: "middle"
- },
- labels: {
- style: {
- ...M && M.yAxisOptions.style
- }
- },
- opposite: !1,
- reversed: !1,
- min: Number(B),
- max: Number(S),
- tickWidth: 1,
- plotBands: Pi(1),
- plotLines: Ti(1)
- }, T = {
- ...wn,
- title: {
- text: y,
- textZh: y,
- // 中文
- textEn: N || "",
- style: {
- ...M && M.xAxisOptions.style
- },
- align: "middle"
- },
- labels: {
- style: {
- ...M && M.xAxisOptions.style
- }
- },
- min: Number(x),
- max: Number(f),
- plotBands: Pi(3),
- plotLines: Ti(3)
- }, O = [];
- return o.forEach((k, b) => {
- const w = M ? b % M.lineOptionList.length : b;
- let v = {
- data: [],
- type: "scatter",
- name: k.Name,
- nameZh: k.Name,
- nameEn: k.NameEn,
- color: k.Color,
- lineWidth: 0,
- chartType: "linear",
- zIndex: 1,
- visible: !0,
- marker: {
- radius: M && M.lineOptionList[w].radius || 5
- }
- };
- if (k.EdbInfoList.forEach((l) => {
- v.data.push({
- x: l.XValue,
- y: l.YValue,
- dataLabels: {
- enabled: l.IsShow,
- allowOverlap: !0,
- align: "left",
- format: l.Name,
- formatZh: l.Name,
- formatEn: l.NameEn
- }
- });
- }), O.push(v), k.ShowTrendLine) {
- let h = {
- data: k.TrendLimitData.map((u, i) => i === k.TrendLimitData.length - 1 ? {
- x: u.X,
- y: u.Y,
- dataLabels: {
- enabled: k.ShowRSquare || k.ShowFitEquation,
- align: "left",
- color: k.Color,
- x: 20,
- y: 30,
- zIndex: 9,
- allowOverlap: !0,
- formatter: function() {
- let c = "";
- return k.ShowRSquare && k.ShowFitEquation ? c = `<span>${k.TrendLine}</span><br><span>R²=${k.RSquare}</span>` : k.ShowRSquare && !k.ShowFitEquation ? c = `<span>R²=${k.RSquare}</span>` : k.ShowFitEquation && !k.ShowRSquare && (c = `<span>${k.TrendLine}</span>`), c;
- }
- }
- } : {
- x: u.X,
- y: u.Y
- }),
- type: "spline",
- linkedTo: ":previous",
- color: k.Color,
- lineWidth: 1,
- chartType: "linear",
- enableMouseTracking: !1,
- dashStyle: "Dash",
- zIndex: 2,
- visible: !0,
- marker: {
- enabled: !1
- }
- };
- O.push(h);
- }
- }), {
- title: {
- text: ""
- },
- series: O,
- yAxis: [d],
- xAxis: T,
- tooltip: {
- formatter: function() {
- let b = o.find((v) => v.Name === this.series.name).EdbInfoList.find((v) => v.XValue === this.x && v.YValue === this.y), w = `<b>${b.Name}</b>`;
- return w += `<br><span style="color:${this.color}">●</span>${b.XName}: ${this.x} ${b.XDate}<br>`, w += `<span style="color:${this.color}">●</span>${b.YName}: ${this.y} (${b.YDate})`, w;
- },
- formatterCh: function() {
- let b = o.find((v) => v.Name === this.series.name).EdbInfoList.find((v) => v.XValue === this.x && v.YValue === this.y), w = `<b>${b.Name}</b>`;
- return w += `<br><span style="color:${this.color}">●</span>${b.XName}: ${this.x} ${b.XDate}<br>`, w += `<span style="color:${this.color}">●</span>${b.YName}: ${this.y} (${b.YDate})`, w;
- },
- formatterEn: function() {
- let b = o.find((v) => v.NameEn === this.series.name).EdbInfoList.find((v) => v.XValue === this.x && v.YValue === this.y), w = `<b>${b.NameEn}</b>`;
- return w += `<br><span style="color:${this.color}">●</span>${b.XNameEn}: ${this.x} ${b.XDate}<br>`, w += `<span style="color:${this.color}">●</span>${b.YNameEn}: ${this.y} ${b.YDate}`, w;
- }
- }
- };
- }
- function SC({ DataResp: r, EdbInfoList: p, ChartInfo: M }) {
- kt.leftIndex = -1, kt.rightIndex = -1, kt.rightTwoIndex = -1;
- const o = M.ChartThemeStyle ? JSON.parse(M.ChartThemeStyle) : null, { DataList: y, XName: N, YName: D, XNameEn: U, YNameEn: H, XMaxValue: V, XMinValue: G, YMaxValue: R, YMinValue: B } = r, { leftMin: S, leftMax: x, xMin: f, xMax: d } = kt;
- let T = {
- ...gr,
- title: {
- text: D,
- textCh: D,
- // 中文
- textEn: H || D,
- align: "middle",
- style: {
- ...o && o.xAxisOptions.style
- }
- },
- labels: {
- style: {
- ...o && o.xAxisOptions.style
- }
- },
- opposite: !1,
- reversed: !1,
- min: Number(S),
- max: Number(x),
- tickWidth: 1
- }, O = {
- ...wn,
- title: {
- text: N,
- textCh: N,
- // 中文
- textEn: U || N,
- align: "middle",
- style: {
- ...o && o.xAxisOptions.style
- }
- },
- labels: {
- style: {
- ...o && o.xAxisOptions.style
- }
- },
- min: Number(f),
- max: Number(d)
- }, j = [];
- const k = {
- //标签对应文字
- 1: "最新",
- 3: "Fix"
- };
- return y.forEach((w) => {
- let v = {
- data: [],
- type: "scatter",
- name: w.Name,
- nameZh: w.Name,
- nameEn: w.NameEn || w.Name,
- color: w.Color,
- lineWidth: 0,
- chartType: "linear",
- zIndex: 1
- };
- w.CoordinatePointData.forEach((l) => {
- v.data.push({
- x: l.X,
- y: l.Y,
- dataLabels: {
- enabled: l.ShowTips === 1,
- allowOverlap: !0,
- align: "left",
- format: k[l.DateType] || `-${l.DaysAgo}D`
- }
- });
- }), j.push(v);
- }), {
- title: {
- text: ""
- },
- series: j,
- yAxis: [T],
- xAxis: O,
- tooltip: {
- formatter: function() {
- let v = y.find((i) => i.Name === this.series.name).CoordinatePointData.find((i) => i.X === this.x && i.Y === this.y), l = p.find((i) => i.EdbInfoId === v.XEdbInfoId), h = p.find((i) => i.EdbInfoId === v.YEdbInfoId), u = `<b>${this.series.name}</b>`;
- return u += `<br><span style="color:${this.color}">●</span>${l.EdbName}: ${this.x} ${v.XDate}<br>`, u += `<span style="color:${this.color}">●</span>${h.EdbName}: ${this.y} ${v.YDate}`, u;
- },
- formatterCh: function() {
- let v = y.find((i) => i.Name === this.series.name).CoordinatePointData.find((i) => i.X === this.x && i.Y === this.y), l = p.find((i) => i.EdbInfoId === v.XEdbInfoId), h = p.find((i) => i.EdbInfoId === v.YEdbInfoId), u = `<b>${this.series.name}</b>`;
- return u += `<br><span style="color:${this.color}">●</span>${l.EdbName}: ${this.x} ${v.XDate}<br>`, u += `<span style="color:${this.color}">●</span>${h.EdbName}: ${this.y} ${v.YDate}`, u;
- },
- formatterEn: function() {
- let v = y.find((i) => i.NameEn === this.series.name).CoordinatePointData.find((i) => i.X === this.x && i.Y === this.y), l = p.find((i) => i.EdbInfoId === v.XEdbInfoId), h = p.find((i) => i.EdbInfoId === v.YEdbInfoId), u = `<b>${this.series.name}</b>`;
- return u += `<br><span style="color:${this.color}">●</span>${l.EdbNameEn}: ${this.x} ${v.XDate}<br>`, u += `<span style="color:${this.color}">●</span>${h.EdbNameEn}: ${this.y} ${v.YDate}`, u;
- }
- }
- };
- }
- function wC({ DataResp: r, EdbInfoList: p, ChartInfo: M }) {
- kt.leftIndex = -1, kt.rightIndex = -1, kt.rightTwoIndex = -1;
- const { YDataList: o, XEdbIdValue: y } = r;
- let N = p.filter((G) => y.includes(G.EdbInfoId));
- kt.hasLeftAxis = !0, kt.leftMin = Number(M.LeftMin), kt.leftMax = Number(M.LeftMax);
- const D = M.ChartThemeStyle ? JSON.parse(M.ChartThemeStyle) : null;
- let U = {
- lineWidth: 0,
- tickLength: 0,
- tickmarkPlacement: "on",
- categories: N.map((G) => G.EdbAliasName || G.EdbName),
- labels: {
- allowOverlap: !0,
- autoRotationLimit: 40,
- style: {
- ...D && D.xAxisOptions.style
- }
- }
- }, H = [{
- gridLineInterpolation: "polygon",
- gridLineWidth: 1,
- lineWidth: 0,
- endOnTick: !1,
- startOnTick: !1,
- showLastLabel: !0,
- // tickAmount:4,
- title: {
- text: M.Unit,
- textCh: M.Unit,
- textEn: M.UnitEn,
- align: "high",
- rotation: 0,
- y: 5,
- x: 10,
- textAlign: "left",
- reserveSpace: !1,
- style: {
- ...D && D.yAxisOptions.style
- }
- },
- labels: {
- allowOverlap: !0,
- style: {
- ...D && D.yAxisOptions.style
- }
- },
- min: Number(M.LeftMin),
- max: Number(M.LeftMax)
- }], V = [];
- return o.forEach((G, R) => {
- const B = D ? R % D.lineOptionList.length : R;
- let S = {
- name: G.Name || G.Date,
- nameZh: G.Name || G.Date,
- nameEn: G.Date,
- data: G.Value,
- pointPlacement: "on",
- type: D && D.lineOptionList[B].lineType || "line",
- dashStyle: D && D.lineOptionList[B].dashStyle || "Solid",
- yAxis: 0,
- color: G.Color,
- lineWidth: D && D.lineOptionList[B].lineWidth || 1,
- chartType: "linear"
- };
- V.push(S);
- }), {
- chart: {
- ...mo.chart,
- ...D == null ? void 0 : D.drawOption,
- spacing: [2, 10, 2, 10],
- polar: !0
- },
- title: {
- text: ""
- },
- pane: {
- size: "85%"
- },
- series: V,
- yAxis: H,
- xAxis: U
- };
- }
- function so(r = "rgba(51, 51, 51, 1)") {
- const p = r.match(/(\d(\.\d+)?)+/g) || ["", "", "", 1];
- return parseFloat(p[3] || 1);
- }
- function CC(r = [], p, M = {}) {
- if (p.ChartType === 5) {
- r[1] && (kt.leftMin = r[1].MinData, kt.leftMax = r[1].MaxData);
- return;
- }
- const o = r.filter((D) => D.IsAxis === 1).map((D) => [Number(D.MinData), Number(D.MaxData)]), y = r.filter((D) => !D.IsAxis).map((D) => [Number(D.MinData), Number(D.MaxData)]), N = r.filter((D) => D.IsAxis === 2).map((D) => [Number(D.MinData), Number(D.MaxData)]);
- if (o.length) {
- const {
- Max: D,
- Min: U
- } = Sn(o.flat());
- kt.leftMin = U, kt.leftMax = D;
- }
- if (y.length) {
- const {
- Max: D,
- Min: U
- } = Sn(y.flat());
- kt.rightMin = U, kt.rightMax = D;
- }
- if (N.length) {
- const {
- Max: D,
- Min: U
- } = Sn(N.flat());
- kt.rightTwoMin = U, kt.rightTwoMax = D;
- }
- p.ChartType === 2 && M.RightAxis && M.RightAxis.IsAdd && M.RightAxis.IsShow && (M.RightAxis.IndicatorType === 1 ? (kt.rightMin = M.RightAxis.EdbInfoList[0].MinData || 0, kt.rightMax = M.RightAxis.EdbInfoList[0].MaxData || 0) : (kt.rightMin = r[1].MinData || 0, kt.rightMax = r[1].MaxData || 0));
- }
- function Sn(r) {
- return {
- Max: Math.max(...r),
- Min: Math.min(...r)
- };
- }
- function MC({ EdbInfoList: r, ChartInfo: p, DataResp: M }) {
- const {
- //左右轴极值字段
- LeftMin: o = 0,
- LeftMax: y = 0,
- RightMin: N = 0,
- RightMax: D = 0,
- Right2Min: U = 0,
- Right2Max: H = 0,
- MinMaxSave: V
- } = p;
- V ? (kt.leftMin = Number(o), kt.leftMax = Number(y), kt.rightMin = Number(N), kt.rightMax = Number(D), kt.rightTwoMin = Number(U), kt.rightTwoMax = Number(H), kC(r, p), console.log("check", kt.leftMin, kt.leftMax)) : CC(r, p, M || {});
- }
- function kC(r = [], p) {
- if (p.ChartType === 5) {
- r[1] && Number(kt.leftMin) === 0 && Number(kt.leftMax) === 0 && (kt.leftMin = r[1].MinData, kt.leftMax = r[1].MaxData);
- return;
- }
- if (Number(kt.leftMin) === 0 && Number(kt.leftMax) === 0) {
- const M = r.filter((o) => o.IsAxis === 1).map((o) => [Number(o.MinData), Number(o.MaxData)]);
- if (M.length) {
- const { Max: o, Min: y } = Sn(M.flat());
- kt.leftMin = y, kt.leftMax = o;
- }
- }
- if (Number(kt.rightMin) === 0 && Number(kt.rightMax) === 0) {
- const M = r.filter((o) => !o.IsAxis).map((o) => [Number(o.MinData), Number(o.MaxData)]);
- if (M.length) {
- const { Max: o, Min: y } = Sn(M.flat());
- kt.rightMin = y, kt.rightMax = o;
- }
- }
- if (Number(kt.rightTwoMin) === 0 && Number(kt.rightTwoMax) === 0) {
- const M = r.filter((o) => o.IsAxis === 2).map((o) => [Number(o.MinData), Number(o.MaxData)]);
- if (M.length) {
- const { Max: o, Min: y } = Sn(M.flat());
- kt.rightTwoMin = y, kt.rightTwoMax = o;
- }
- }
- }
- function nd(r, p) {
- return function() {
- return r.apply(p, arguments);
- };
- }
- const { toString: AC } = Object.prototype, { getPrototypeOf: ql } = Object, jo = ((r) => (p) => {
- const M = AC.call(p);
- return r[M] || (r[M] = M.slice(8, -1).toLowerCase());
- })(/* @__PURE__ */ Object.create(null)), zi = (r) => (r = r.toLowerCase(), (p) => jo(p) === r), Wo = (r) => (p) => typeof p === r, { isArray: Tn } = Array, os = Wo("undefined");
- function TC(r) {
- return r !== null && !os(r) && r.constructor !== null && !os(r.constructor) && mi(r.constructor.isBuffer) && r.constructor.isBuffer(r);
- }
- const sd = zi("ArrayBuffer");
- function PC(r) {
- let p;
- return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? p = ArrayBuffer.isView(r) : p = r && r.buffer && sd(r.buffer), p;
- }
- const EC = Wo("string"), mi = Wo("function"), od = Wo("number"), Yo = (r) => r !== null && typeof r == "object", OC = (r) => r === !0 || r === !1, co = (r) => {
- if (jo(r) !== "object")
- return !1;
- const p = ql(r);
- return (p === null || p === Object.prototype || Object.getPrototypeOf(p) === null) && !(Symbol.toStringTag in r) && !(Symbol.iterator in r);
- }, LC = zi("Date"), _C = zi("File"), DC = zi("Blob"), IC = zi("FileList"), RC = (r) => Yo(r) && mi(r.pipe), NC = (r) => {
- let p;
- return r && (typeof FormData == "function" && r instanceof FormData || mi(r.append) && ((p = jo(r)) === "formdata" || // detect form-data instance
- p === "object" && mi(r.toString) && r.toString() === "[object FormData]"));
- }, BC = zi("URLSearchParams"), [jC, WC, YC, zC] = ["ReadableStream", "Request", "Response", "Headers"].map(zi), XC = (r) => r.trim ? r.trim() : r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
- function ps(r, p, { allOwnKeys: M = !1 } = {}) {
- if (r === null || typeof r > "u")
- return;
- let o, y;
- if (typeof r != "object" && (r = [r]), Tn(r))
- for (o = 0, y = r.length; o < y; o++)
- p.call(null, r[o], o, r);
- else {
- const N = M ? Object.getOwnPropertyNames(r) : Object.keys(r), D = N.length;
- let U;
- for (o = 0; o < D; o++)
- U = N[o], p.call(null, r[U], U, r);
- }
- }
- function ad(r, p) {
- p = p.toLowerCase();
- const M = Object.keys(r);
- let o = M.length, y;
- for (; o-- > 0; )
- if (y = M[o], p === y.toLowerCase())
- return y;
- return null;
- }
- const Ur = (() => typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global)(), ld = (r) => !os(r) && r !== Ur;
- function wl() {
- const { caseless: r } = ld(this) && this || {}, p = {}, M = (o, y) => {
- const N = r && ad(p, y) || y;
- co(p[N]) && co(o) ? p[N] = wl(p[N], o) : co(o) ? p[N] = wl({}, o) : Tn(o) ? p[N] = o.slice() : p[N] = o;
- };
- for (let o = 0, y = arguments.length; o < y; o++)
- arguments[o] && ps(arguments[o], M);
- return p;
- }
- const GC = (r, p, M, { allOwnKeys: o } = {}) => (ps(p, (y, N) => {
- M && mi(y) ? r[N] = nd(y, M) : r[N] = y;
- }, { allOwnKeys: o }), r), HC = (r) => (r.charCodeAt(0) === 65279 && (r = r.slice(1)), r), FC = (r, p, M, o) => {
- r.prototype = Object.create(p.prototype, o), r.prototype.constructor = r, Object.defineProperty(r, "super", {
- value: p.prototype
- }), M && Object.assign(r.prototype, M);
- }, UC = (r, p, M, o) => {
- let y, N, D;
- const U = {};
- if (p = p || {}, r == null)
- return p;
- do {
- for (y = Object.getOwnPropertyNames(r), N = y.length; N-- > 0; )
- D = y[N], (!o || o(D, r, p)) && !U[D] && (p[D] = r[D], U[D] = !0);
- r = M !== !1 && ql(r);
- } while (r && (!M || M(r, p)) && r !== Object.prototype);
- return p;
- }, VC = (r, p, M) => {
- r = String(r), (M === void 0 || M > r.length) && (M = r.length), M -= p.length;
- const o = r.indexOf(p, M);
- return o !== -1 && o === M;
- }, $C = (r) => {
- if (!r)
- return null;
- if (Tn(r))
- return r;
- let p = r.length;
- if (!od(p))
- return null;
- const M = new Array(p);
- for (; p-- > 0; )
- M[p] = r[p];
- return M;
- }, ZC = ((r) => (p) => r && p instanceof r)(typeof Uint8Array < "u" && ql(Uint8Array)), KC = (r, p) => {
- const o = (r && r[Symbol.iterator]).call(r);
- let y;
- for (; (y = o.next()) && !y.done; ) {
- const N = y.value;
- p.call(r, N[0], N[1]);
- }
- }, JC = (r, p) => {
- let M;
- const o = [];
- for (; (M = r.exec(p)) !== null; )
- o.push(M);
- return o;
- }, qC = zi("HTMLFormElement"), QC = (r) => r.toLowerCase().replace(
- /[-_\s]([a-z\d])(\w*)/g,
- function(M, o, y) {
- return o.toUpperCase() + y;
- }
- ), Wp = (({ hasOwnProperty: r }) => (p, M) => r.call(p, M))(Object.prototype), tM = zi("RegExp"), hd = (r, p) => {
- const M = Object.getOwnPropertyDescriptors(r), o = {};
- ps(M, (y, N) => {
- let D;
- (D = p(y, N, r)) !== !1 && (o[N] = D || y);
- }), Object.defineProperties(r, o);
- }, eM = (r) => {
- hd(r, (p, M) => {
- if (mi(r) && ["arguments", "caller", "callee"].indexOf(M) !== -1)
- return !1;
- const o = r[M];
- if (mi(o)) {
- if (p.enumerable = !1, "writable" in p) {
- p.writable = !1;
- return;
- }
- p.set || (p.set = () => {
- throw Error("Can not rewrite read-only method '" + M + "'");
- });
- }
- });
- }, iM = (r, p) => {
- const M = {}, o = (y) => {
- y.forEach((N) => {
- M[N] = !0;
- });
- };
- return Tn(r) ? o(r) : o(String(r).split(p)), M;
- }, rM = () => {
- }, nM = (r, p) => r != null && Number.isFinite(r = +r) ? r : p, pl = "abcdefghijklmnopqrstuvwxyz", Yp = "0123456789", cd = {
- DIGIT: Yp,
- ALPHA: pl,
- ALPHA_DIGIT: pl + pl.toUpperCase() + Yp
- }, sM = (r = 16, p = cd.ALPHA_DIGIT) => {
- let M = "";
- const { length: o } = p;
- for (; r--; )
- M += p[Math.random() * o | 0];
- return M;
- };
- function oM(r) {
- return !!(r && mi(r.append) && r[Symbol.toStringTag] === "FormData" && r[Symbol.iterator]);
- }
- const aM = (r) => {
- const p = new Array(10), M = (o, y) => {
- if (Yo(o)) {
- if (p.indexOf(o) >= 0)
- return;
- if (!("toJSON" in o)) {
- p[y] = o;
- const N = Tn(o) ? [] : {};
- return ps(o, (D, U) => {
- const H = M(D, y + 1);
- !os(H) && (N[U] = H);
- }), p[y] = void 0, N;
- }
- }
- return o;
- };
- return M(r, 0);
- }, lM = zi("AsyncFunction"), hM = (r) => r && (Yo(r) || mi(r)) && mi(r.then) && mi(r.catch), pd = ((r, p) => r ? setImmediate : p ? ((M, o) => (Ur.addEventListener("message", ({ source: y, data: N }) => {
- y === Ur && N === M && o.length && o.shift()();
- }, !1), (y) => {
- o.push(y), Ur.postMessage(M, "*");
- }))(`axios@${Math.random()}`, []) : (M) => setTimeout(M))(
- typeof setImmediate == "function",
- mi(Ur.postMessage)
- ), cM = typeof queueMicrotask < "u" ? queueMicrotask.bind(Ur) : typeof process < "u" && process.nextTick || pd, Et = {
- isArray: Tn,
- isArrayBuffer: sd,
- isBuffer: TC,
- isFormData: NC,
- isArrayBufferView: PC,
- isString: EC,
- isNumber: od,
- isBoolean: OC,
- isObject: Yo,
- isPlainObject: co,
- isReadableStream: jC,
- isRequest: WC,
- isResponse: YC,
- isHeaders: zC,
- isUndefined: os,
- isDate: LC,
- isFile: _C,
- isBlob: DC,
- isRegExp: tM,
- isFunction: mi,
- isStream: RC,
- isURLSearchParams: BC,
- isTypedArray: ZC,
- isFileList: IC,
- forEach: ps,
- merge: wl,
- extend: GC,
- trim: XC,
- stripBOM: HC,
- inherits: FC,
- toFlatObject: UC,
- kindOf: jo,
- kindOfTest: zi,
- endsWith: VC,
- toArray: $C,
- forEachEntry: KC,
- matchAll: JC,
- isHTMLForm: qC,
- hasOwnProperty: Wp,
- hasOwnProp: Wp,
- // an alias to avoid ESLint no-prototype-builtins detection
- reduceDescriptors: hd,
- freezeMethods: eM,
- toObjectSet: iM,
- toCamelCase: QC,
- noop: rM,
- toFiniteNumber: nM,
- findKey: ad,
- global: Ur,
- isContextDefined: ld,
- ALPHABET: cd,
- generateString: sM,
- isSpecCompliantForm: oM,
- toJSONObject: aM,
- isAsyncFn: lM,
- isThenable: hM,
- setImmediate: pd,
- asap: cM
- };
- function ne(r, p, M, o, y) {
- Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = r, this.name = "AxiosError", p && (this.code = p), M && (this.config = M), o && (this.request = o), y && (this.response = y, this.status = y.status ? y.status : null);
- }
- Et.inherits(ne, Error, {
- toJSON: function() {
- return {
- // Standard
- message: this.message,
- name: this.name,
- // Microsoft
- description: this.description,
- number: this.number,
- // Mozilla
- fileName: this.fileName,
- lineNumber: this.lineNumber,
- columnNumber: this.columnNumber,
- stack: this.stack,
- // Axios
- config: Et.toJSONObject(this.config),
- code: this.code,
- status: this.status
- };
- }
- });
- const ud = ne.prototype, dd = {};
- [
- "ERR_BAD_OPTION_VALUE",
- "ERR_BAD_OPTION",
- "ECONNABORTED",
- "ETIMEDOUT",
- "ERR_NETWORK",
- "ERR_FR_TOO_MANY_REDIRECTS",
- "ERR_DEPRECATED",
- "ERR_BAD_RESPONSE",
- "ERR_BAD_REQUEST",
- "ERR_CANCELED",
- "ERR_NOT_SUPPORT",
- "ERR_INVALID_URL"
- // eslint-disable-next-line func-names
- ].forEach((r) => {
- dd[r] = { value: r };
- });
- Object.defineProperties(ne, dd);
- Object.defineProperty(ud, "isAxiosError", { value: !0 });
- ne.from = (r, p, M, o, y, N) => {
- const D = Object.create(ud);
- return Et.toFlatObject(r, D, function(H) {
- return H !== Error.prototype;
- }, (U) => U !== "isAxiosError"), ne.call(D, r.message, p, M, o, y), D.cause = r, D.name = r.name, N && Object.assign(D, N), D;
- };
- const pM = null;
- function Cl(r) {
- return Et.isPlainObject(r) || Et.isArray(r);
- }
- function fd(r) {
- return Et.endsWith(r, "[]") ? r.slice(0, -2) : r;
- }
- function zp(r, p, M) {
- return r ? r.concat(p).map(function(y, N) {
- return y = fd(y), !M && N ? "[" + y + "]" : y;
- }).join(M ? "." : "") : p;
- }
- function uM(r) {
- return Et.isArray(r) && !r.some(Cl);
- }
- const dM = Et.toFlatObject(Et, {}, null, function(p) {
- return /^is[A-Z]/.test(p);
- });
- function zo(r, p, M) {
- if (!Et.isObject(r))
- throw new TypeError("target must be an object");
- p = p || new FormData(), M = Et.toFlatObject(M, {
- metaTokens: !0,
- dots: !1,
- indexes: !1
- }, !1, function(f, d) {
- return !Et.isUndefined(d[f]);
- });
- const o = M.metaTokens, y = M.visitor || G, N = M.dots, D = M.indexes, H = (M.Blob || typeof Blob < "u" && Blob) && Et.isSpecCompliantForm(p);
- if (!Et.isFunction(y))
- throw new TypeError("visitor must be a function");
- function V(x) {
- if (x === null)
- return "";
- if (Et.isDate(x))
- return x.toISOString();
- if (!H && Et.isBlob(x))
- throw new ne("Blob is not supported. Use a Buffer instead.");
- return Et.isArrayBuffer(x) || Et.isTypedArray(x) ? H && typeof Blob == "function" ? new Blob([x]) : Buffer.from(x) : x;
- }
- function G(x, f, d) {
- let T = x;
- if (x && !d && typeof x == "object") {
- if (Et.endsWith(f, "{}"))
- f = o ? f : f.slice(0, -2), x = JSON.stringify(x);
- else if (Et.isArray(x) && uM(x) || (Et.isFileList(x) || Et.endsWith(f, "[]")) && (T = Et.toArray(x)))
- return f = fd(f), T.forEach(function(j, k) {
- !(Et.isUndefined(j) || j === null) && p.append(
- // eslint-disable-next-line no-nested-ternary
- D === !0 ? zp([f], k, N) : D === null ? f : f + "[]",
- V(j)
- );
- }), !1;
- }
- return Cl(x) ? !0 : (p.append(zp(d, f, N), V(x)), !1);
- }
- const R = [], B = Object.assign(dM, {
- defaultVisitor: G,
- convertValue: V,
- isVisitable: Cl
- });
- function S(x, f) {
- if (!Et.isUndefined(x)) {
- if (R.indexOf(x) !== -1)
- throw Error("Circular reference detected in " + f.join("."));
- R.push(x), Et.forEach(x, function(T, O) {
- (!(Et.isUndefined(T) || T === null) && y.call(
- p,
- T,
- Et.isString(O) ? O.trim() : O,
- f,
- B
- )) === !0 && S(T, f ? f.concat(O) : [O]);
- }), R.pop();
- }
- }
- if (!Et.isObject(r))
- throw new TypeError("data must be an object");
- return S(r), p;
- }
- function Xp(r) {
- const p = {
- "!": "%21",
- "'": "%27",
- "(": "%28",
- ")": "%29",
- "~": "%7E",
- "%20": "+",
- "%00": "\0"
- };
- return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g, function(o) {
- return p[o];
- });
- }
- function Ql(r, p) {
- this._pairs = [], r && zo(r, this, p);
- }
- const gd = Ql.prototype;
- gd.append = function(p, M) {
- this._pairs.push([p, M]);
- };
- gd.toString = function(p) {
- const M = p ? function(o) {
- return p.call(this, o, Xp);
- } : Xp;
- return this._pairs.map(function(y) {
- return M(y[0]) + "=" + M(y[1]);
- }, "").join("&");
- };
- function fM(r) {
- return encodeURIComponent(r).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
- }
- function md(r, p, M) {
- if (!p)
- return r;
- const o = M && M.encode || fM;
- Et.isFunction(M) && (M = {
- serialize: M
- });
- const y = M && M.serialize;
- let N;
- if (y ? N = y(p, M) : N = Et.isURLSearchParams(p) ? p.toString() : new Ql(p, M).toString(o), N) {
- const D = r.indexOf("#");
- D !== -1 && (r = r.slice(0, D)), r += (r.indexOf("?") === -1 ? "?" : "&") + N;
- }
- return r;
- }
- class gM {
- constructor() {
- this.handlers = [];
- }
- /**
- * Add a new interceptor to the stack
- *
- * @param {Function} fulfilled The function to handle `then` for a `Promise`
- * @param {Function} rejected The function to handle `reject` for a `Promise`
- *
- * @return {Number} An ID used to remove interceptor later
- */
- use(p, M, o) {
- return this.handlers.push({
- fulfilled: p,
- rejected: M,
- synchronous: o ? o.synchronous : !1,
- runWhen: o ? o.runWhen : null
- }), this.handlers.length - 1;
- }
- /**
- * Remove an interceptor from the stack
- *
- * @param {Number} id The ID that was returned by `use`
- *
- * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
- */
- eject(p) {
- this.handlers[p] && (this.handlers[p] = null);
- }
- /**
- * Clear all interceptors from the stack
- *
- * @returns {void}
- */
- clear() {
- this.handlers && (this.handlers = []);
- }
- /**
- * Iterate over all the registered interceptors
- *
- * This method is particularly useful for skipping over any
- * interceptors that may have become `null` calling `eject`.
- *
- * @param {Function} fn The function to call for each interceptor
- *
- * @returns {void}
- */
- forEach(p) {
- Et.forEach(this.handlers, function(o) {
- o !== null && p(o);
- });
- }
- }
- const Gp = gM, yd = {
- silentJSONParsing: !0,
- forcedJSONParsing: !0,
- clarifyTimeoutError: !1
- }, mM = typeof URLSearchParams < "u" ? URLSearchParams : Ql, yM = typeof FormData < "u" ? FormData : null, vM = typeof Blob < "u" ? Blob : null, xM = {
- isBrowser: !0,
- classes: {
- URLSearchParams: mM,
- FormData: yM,
- Blob: vM
- },
- protocols: ["http", "https", "file", "blob", "url", "data"]
- }, th = typeof window < "u" && typeof document < "u", Ml = typeof navigator == "object" && navigator || void 0, bM = th && (!Ml || ["ReactNative", "NativeScript", "NS"].indexOf(Ml.product) < 0), SM = (() => typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
- self instanceof WorkerGlobalScope && typeof self.importScripts == "function")(), wM = th && window.location.href || "http://localhost", CM = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
- __proto__: null,
- hasBrowserEnv: th,
- hasStandardBrowserEnv: bM,
- hasStandardBrowserWebWorkerEnv: SM,
- navigator: Ml,
- origin: wM
- }, Symbol.toStringTag, { value: "Module" })), Qe = {
- ...CM,
- ...xM
- };
- function MM(r, p) {
- return zo(r, new Qe.classes.URLSearchParams(), Object.assign({
- visitor: function(M, o, y, N) {
- return Qe.isNode && Et.isBuffer(M) ? (this.append(o, M.toString("base64")), !1) : N.defaultVisitor.apply(this, arguments);
- }
- }, p));
- }
- function kM(r) {
- return Et.matchAll(/\w+|\[(\w*)]/g, r).map((p) => p[0] === "[]" ? "" : p[1] || p[0]);
- }
- function AM(r) {
- const p = {}, M = Object.keys(r);
- let o;
- const y = M.length;
- let N;
- for (o = 0; o < y; o++)
- N = M[o], p[N] = r[N];
- return p;
- }
- function vd(r) {
- function p(M, o, y, N) {
- let D = M[N++];
- if (D === "__proto__")
- return !0;
- const U = Number.isFinite(+D), H = N >= M.length;
- return D = !D && Et.isArray(y) ? y.length : D, H ? (Et.hasOwnProp(y, D) ? y[D] = [y[D], o] : y[D] = o, !U) : ((!y[D] || !Et.isObject(y[D])) && (y[D] = []), p(M, o, y[D], N) && Et.isArray(y[D]) && (y[D] = AM(y[D])), !U);
- }
- if (Et.isFormData(r) && Et.isFunction(r.entries)) {
- const M = {};
- return Et.forEachEntry(r, (o, y) => {
- p(kM(o), y, M, 0);
- }), M;
- }
- return null;
- }
- function TM(r, p, M) {
- if (Et.isString(r))
- try {
- return (p || JSON.parse)(r), Et.trim(r);
- } catch (o) {
- if (o.name !== "SyntaxError")
- throw o;
- }
- return (M || JSON.stringify)(r);
- }
- const eh = {
- transitional: yd,
- adapter: ["xhr", "http", "fetch"],
- transformRequest: [function(p, M) {
- const o = M.getContentType() || "", y = o.indexOf("application/json") > -1, N = Et.isObject(p);
- if (N && Et.isHTMLForm(p) && (p = new FormData(p)), Et.isFormData(p))
- return y ? JSON.stringify(vd(p)) : p;
- if (Et.isArrayBuffer(p) || Et.isBuffer(p) || Et.isStream(p) || Et.isFile(p) || Et.isBlob(p) || Et.isReadableStream(p))
- return p;
- if (Et.isArrayBufferView(p))
- return p.buffer;
- if (Et.isURLSearchParams(p))
- return M.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), p.toString();
- let U;
- if (N) {
- if (o.indexOf("application/x-www-form-urlencoded") > -1)
- return MM(p, this.formSerializer).toString();
- if ((U = Et.isFileList(p)) || o.indexOf("multipart/form-data") > -1) {
- const H = this.env && this.env.FormData;
- return zo(
- U ? { "files[]": p } : p,
- H && new H(),
- this.formSerializer
- );
- }
- }
- return N || y ? (M.setContentType("application/json", !1), TM(p)) : p;
- }],
- transformResponse: [function(p) {
- const M = this.transitional || eh.transitional, o = M && M.forcedJSONParsing, y = this.responseType === "json";
- if (Et.isResponse(p) || Et.isReadableStream(p))
- return p;
- if (p && Et.isString(p) && (o && !this.responseType || y)) {
- const D = !(M && M.silentJSONParsing) && y;
- try {
- return JSON.parse(p);
- } catch (U) {
- if (D)
- throw U.name === "SyntaxError" ? ne.from(U, ne.ERR_BAD_RESPONSE, this, null, this.response) : U;
- }
- }
- return p;
- }],
- /**
- * A timeout in milliseconds to abort a request. If set to 0 (default) a
- * timeout is not created.
- */
- timeout: 0,
- xsrfCookieName: "XSRF-TOKEN",
- xsrfHeaderName: "X-XSRF-TOKEN",
- maxContentLength: -1,
- maxBodyLength: -1,
- env: {
- FormData: Qe.classes.FormData,
- Blob: Qe.classes.Blob
- },
- validateStatus: function(p) {
- return p >= 200 && p < 300;
- },
- headers: {
- common: {
- Accept: "application/json, text/plain, */*",
- "Content-Type": void 0
- }
- }
- };
- Et.forEach(["delete", "get", "head", "post", "put", "patch"], (r) => {
- eh.headers[r] = {};
- });
- const ih = eh, PM = Et.toObjectSet([
- "age",
- "authorization",
- "content-length",
- "content-type",
- "etag",
- "expires",
- "from",
- "host",
- "if-modified-since",
- "if-unmodified-since",
- "last-modified",
- "location",
- "max-forwards",
- "proxy-authorization",
- "referer",
- "retry-after",
- "user-agent"
- ]), EM = (r) => {
- const p = {};
- let M, o, y;
- return r && r.split(`
- `).forEach(function(D) {
- y = D.indexOf(":"), M = D.substring(0, y).trim().toLowerCase(), o = D.substring(y + 1).trim(), !(!M || p[M] && PM[M]) && (M === "set-cookie" ? p[M] ? p[M].push(o) : p[M] = [o] : p[M] = p[M] ? p[M] + ", " + o : o);
- }), p;
- }, Hp = Symbol("internals");
- function Jn(r) {
- return r && String(r).trim().toLowerCase();
- }
- function po(r) {
- return r === !1 || r == null ? r : Et.isArray(r) ? r.map(po) : String(r);
- }
- function OM(r) {
- const p = /* @__PURE__ */ Object.create(null), M = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
- let o;
- for (; o = M.exec(r); )
- p[o[1]] = o[2];
- return p;
- }
- const LM = (r) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(r.trim());
- function ul(r, p, M, o, y) {
- if (Et.isFunction(o))
- return o.call(this, p, M);
- if (y && (p = M), !!Et.isString(p)) {
- if (Et.isString(o))
- return p.indexOf(o) !== -1;
- if (Et.isRegExp(o))
- return o.test(p);
- }
- }
- function _M(r) {
- return r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (p, M, o) => M.toUpperCase() + o);
- }
- function DM(r, p) {
- const M = Et.toCamelCase(" " + p);
- ["get", "set", "has"].forEach((o) => {
- Object.defineProperty(r, o + M, {
- value: function(y, N, D) {
- return this[o].call(this, p, y, N, D);
- },
- configurable: !0
- });
- });
- }
- class Xo {
- constructor(p) {
- p && this.set(p);
- }
- set(p, M, o) {
- const y = this;
- function N(U, H, V) {
- const G = Jn(H);
- if (!G)
- throw new Error("header name must be a non-empty string");
- const R = Et.findKey(y, G);
- (!R || y[R] === void 0 || V === !0 || V === void 0 && y[R] !== !1) && (y[R || H] = po(U));
- }
- const D = (U, H) => Et.forEach(U, (V, G) => N(V, G, H));
- if (Et.isPlainObject(p) || p instanceof this.constructor)
- D(p, M);
- else if (Et.isString(p) && (p = p.trim()) && !LM(p))
- D(EM(p), M);
- else if (Et.isHeaders(p))
- for (const [U, H] of p.entries())
- N(H, U, o);
- else
- p != null && N(M, p, o);
- return this;
- }
- get(p, M) {
- if (p = Jn(p), p) {
- const o = Et.findKey(this, p);
- if (o) {
- const y = this[o];
- if (!M)
- return y;
- if (M === !0)
- return OM(y);
- if (Et.isFunction(M))
- return M.call(this, y, o);
- if (Et.isRegExp(M))
- return M.exec(y);
- throw new TypeError("parser must be boolean|regexp|function");
- }
- }
- }
- has(p, M) {
- if (p = Jn(p), p) {
- const o = Et.findKey(this, p);
- return !!(o && this[o] !== void 0 && (!M || ul(this, this[o], o, M)));
- }
- return !1;
- }
- delete(p, M) {
- const o = this;
- let y = !1;
- function N(D) {
- if (D = Jn(D), D) {
- const U = Et.findKey(o, D);
- U && (!M || ul(o, o[U], U, M)) && (delete o[U], y = !0);
- }
- }
- return Et.isArray(p) ? p.forEach(N) : N(p), y;
- }
- clear(p) {
- const M = Object.keys(this);
- let o = M.length, y = !1;
- for (; o--; ) {
- const N = M[o];
- (!p || ul(this, this[N], N, p, !0)) && (delete this[N], y = !0);
- }
- return y;
- }
- normalize(p) {
- const M = this, o = {};
- return Et.forEach(this, (y, N) => {
- const D = Et.findKey(o, N);
- if (D) {
- M[D] = po(y), delete M[N];
- return;
- }
- const U = p ? _M(N) : String(N).trim();
- U !== N && delete M[N], M[U] = po(y), o[U] = !0;
- }), this;
- }
- concat(...p) {
- return this.constructor.concat(this, ...p);
- }
- toJSON(p) {
- const M = /* @__PURE__ */ Object.create(null);
- return Et.forEach(this, (o, y) => {
- o != null && o !== !1 && (M[y] = p && Et.isArray(o) ? o.join(", ") : o);
- }), M;
- }
- [Symbol.iterator]() {
- return Object.entries(this.toJSON())[Symbol.iterator]();
- }
- toString() {
- return Object.entries(this.toJSON()).map(([p, M]) => p + ": " + M).join(`
- `);
- }
- get [Symbol.toStringTag]() {
- return "AxiosHeaders";
- }
- static from(p) {
- return p instanceof this ? p : new this(p);
- }
- static concat(p, ...M) {
- const o = new this(p);
- return M.forEach((y) => o.set(y)), o;
- }
- static accessor(p) {
- const o = (this[Hp] = this[Hp] = {
- accessors: {}
- }).accessors, y = this.prototype;
- function N(D) {
- const U = Jn(D);
- o[U] || (DM(y, D), o[U] = !0);
- }
- return Et.isArray(p) ? p.forEach(N) : N(p), this;
- }
- }
- Xo.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
- Et.reduceDescriptors(Xo.prototype, ({ value: r }, p) => {
- let M = p[0].toUpperCase() + p.slice(1);
- return {
- get: () => r,
- set(o) {
- this[M] = o;
- }
- };
- });
- Et.freezeMethods(Xo);
- const Bi = Xo;
- function dl(r, p) {
- const M = this || ih, o = p || M, y = Bi.from(o.headers);
- let N = o.data;
- return Et.forEach(r, function(U) {
- N = U.call(M, N, y.normalize(), p ? p.status : void 0);
- }), y.normalize(), N;
- }
- function xd(r) {
- return !!(r && r.__CANCEL__);
- }
- function Pn(r, p, M) {
- ne.call(this, r ?? "canceled", ne.ERR_CANCELED, p, M), this.name = "CanceledError";
- }
- Et.inherits(Pn, ne, {
- __CANCEL__: !0
- });
- function bd(r, p, M) {
- const o = M.config.validateStatus;
- !M.status || !o || o(M.status) ? r(M) : p(new ne(
- "Request failed with status code " + M.status,
- [ne.ERR_BAD_REQUEST, ne.ERR_BAD_RESPONSE][Math.floor(M.status / 100) - 4],
- M.config,
- M.request,
- M
- ));
- }
- function IM(r) {
- const p = /^([-+\w]{1,25})(:?\/\/|:)/.exec(r);
- return p && p[1] || "";
- }
- function RM(r, p) {
- r = r || 10;
- const M = new Array(r), o = new Array(r);
- let y = 0, N = 0, D;
- return p = p !== void 0 ? p : 1e3, function(H) {
- const V = Date.now(), G = o[N];
- D || (D = V), M[y] = H, o[y] = V;
- let R = N, B = 0;
- for (; R !== y; )
- B += M[R++], R = R % r;
- if (y = (y + 1) % r, y === N && (N = (N + 1) % r), V - D < p)
- return;
- const S = G && V - G;
- return S ? Math.round(B * 1e3 / S) : void 0;
- };
- }
- function NM(r, p) {
- let M = 0, o = 1e3 / p, y, N;
- const D = (V, G = Date.now()) => {
- M = G, y = null, N && (clearTimeout(N), N = null), r.apply(null, V);
- };
- return [(...V) => {
- const G = Date.now(), R = G - M;
- R >= o ? D(V, G) : (y = V, N || (N = setTimeout(() => {
- N = null, D(y);
- }, o - R)));
- }, () => y && D(y)];
- }
- const Mo = (r, p, M = 3) => {
- let o = 0;
- const y = RM(50, 250);
- return NM((N) => {
- const D = N.loaded, U = N.lengthComputable ? N.total : void 0, H = D - o, V = y(H), G = D <= U;
- o = D;
- const R = {
- loaded: D,
- total: U,
- progress: U ? D / U : void 0,
- bytes: H,
- rate: V || void 0,
- estimated: V && U && G ? (U - D) / V : void 0,
- event: N,
- lengthComputable: U != null,
- [p ? "download" : "upload"]: !0
- };
- r(R);
- }, M);
- }, Fp = (r, p) => {
- const M = r != null;
- return [(o) => p[0]({
- lengthComputable: M,
- total: r,
- loaded: o
- }), p[1]];
- }, Up = (r) => (...p) => Et.asap(() => r(...p)), BM = Qe.hasStandardBrowserEnv ? ((r, p) => (M) => (M = new URL(M, Qe.origin), r.protocol === M.protocol && r.host === M.host && (p || r.port === M.port)))(
- new URL(Qe.origin),
- Qe.navigator && /(msie|trident)/i.test(Qe.navigator.userAgent)
- ) : () => !0, jM = Qe.hasStandardBrowserEnv ? (
- // Standard browser envs support document.cookie
- {
- write(r, p, M, o, y, N) {
- const D = [r + "=" + encodeURIComponent(p)];
- Et.isNumber(M) && D.push("expires=" + new Date(M).toGMTString()), Et.isString(o) && D.push("path=" + o), Et.isString(y) && D.push("domain=" + y), N === !0 && D.push("secure"), document.cookie = D.join("; ");
- },
- read(r) {
- const p = document.cookie.match(new RegExp("(^|;\\s*)(" + r + ")=([^;]*)"));
- return p ? decodeURIComponent(p[3]) : null;
- },
- remove(r) {
- this.write(r, "", Date.now() - 864e5);
- }
- }
- ) : (
- // Non-standard browser env (web workers, react-native) lack needed support.
- {
- write() {
- },
- read() {
- return null;
- },
- remove() {
- }
- }
- );
- function WM(r) {
- return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(r);
- }
- function YM(r, p) {
- return p ? r.replace(/\/?\/$/, "") + "/" + p.replace(/^\/+/, "") : r;
- }
- function Sd(r, p) {
- return r && !WM(p) ? YM(r, p) : p;
- }
- const Vp = (r) => r instanceof Bi ? { ...r } : r;
- function Zr(r, p) {
- p = p || {};
- const M = {};
- function o(V, G, R, B) {
- return Et.isPlainObject(V) && Et.isPlainObject(G) ? Et.merge.call({ caseless: B }, V, G) : Et.isPlainObject(G) ? Et.merge({}, G) : Et.isArray(G) ? G.slice() : G;
- }
- function y(V, G, R, B) {
- if (Et.isUndefined(G)) {
- if (!Et.isUndefined(V))
- return o(void 0, V, R, B);
- } else
- return o(V, G, R, B);
- }
- function N(V, G) {
- if (!Et.isUndefined(G))
- return o(void 0, G);
- }
- function D(V, G) {
- if (Et.isUndefined(G)) {
- if (!Et.isUndefined(V))
- return o(void 0, V);
- } else
- return o(void 0, G);
- }
- function U(V, G, R) {
- if (R in p)
- return o(V, G);
- if (R in r)
- return o(void 0, V);
- }
- const H = {
- url: N,
- method: N,
- data: N,
- baseURL: D,
- transformRequest: D,
- transformResponse: D,
- paramsSerializer: D,
- timeout: D,
- timeoutMessage: D,
- withCredentials: D,
- withXSRFToken: D,
- adapter: D,
- responseType: D,
- xsrfCookieName: D,
- xsrfHeaderName: D,
- onUploadProgress: D,
- onDownloadProgress: D,
- decompress: D,
- maxContentLength: D,
- maxBodyLength: D,
- beforeRedirect: D,
- transport: D,
- httpAgent: D,
- httpsAgent: D,
- cancelToken: D,
- socketPath: D,
- responseEncoding: D,
- validateStatus: U,
- headers: (V, G, R) => y(Vp(V), Vp(G), R, !0)
- };
- return Et.forEach(Object.keys(Object.assign({}, r, p)), function(G) {
- const R = H[G] || y, B = R(r[G], p[G], G);
- Et.isUndefined(B) && R !== U || (M[G] = B);
- }), M;
- }
- const wd = (r) => {
- const p = Zr({}, r);
- let { data: M, withXSRFToken: o, xsrfHeaderName: y, xsrfCookieName: N, headers: D, auth: U } = p;
- p.headers = D = Bi.from(D), p.url = md(Sd(p.baseURL, p.url), r.params, r.paramsSerializer), U && D.set(
- "Authorization",
- "Basic " + btoa((U.username || "") + ":" + (U.password ? unescape(encodeURIComponent(U.password)) : ""))
- );
- let H;
- if (Et.isFormData(M)) {
- if (Qe.hasStandardBrowserEnv || Qe.hasStandardBrowserWebWorkerEnv)
- D.setContentType(void 0);
- else if ((H = D.getContentType()) !== !1) {
- const [V, ...G] = H ? H.split(";").map((R) => R.trim()).filter(Boolean) : [];
- D.setContentType([V || "multipart/form-data", ...G].join("; "));
- }
- }
- if (Qe.hasStandardBrowserEnv && (o && Et.isFunction(o) && (o = o(p)), o || o !== !1 && BM(p.url))) {
- const V = y && N && jM.read(N);
- V && D.set(y, V);
- }
- return p;
- }, zM = typeof XMLHttpRequest < "u", XM = zM && function(r) {
- return new Promise(function(M, o) {
- const y = wd(r);
- let N = y.data;
- const D = Bi.from(y.headers).normalize();
- let { responseType: U, onUploadProgress: H, onDownloadProgress: V } = y, G, R, B, S, x;
- function f() {
- S && S(), x && x(), y.cancelToken && y.cancelToken.unsubscribe(G), y.signal && y.signal.removeEventListener("abort", G);
- }
- let d = new XMLHttpRequest();
- d.open(y.method.toUpperCase(), y.url, !0), d.timeout = y.timeout;
- function T() {
- if (!d)
- return;
- const j = Bi.from(
- "getAllResponseHeaders" in d && d.getAllResponseHeaders()
- ), b = {
- data: !U || U === "text" || U === "json" ? d.responseText : d.response,
- status: d.status,
- statusText: d.statusText,
- headers: j,
- config: r,
- request: d
- };
- bd(function(v) {
- M(v), f();
- }, function(v) {
- o(v), f();
- }, b), d = null;
- }
- "onloadend" in d ? d.onloadend = T : d.onreadystatechange = function() {
- !d || d.readyState !== 4 || d.status === 0 && !(d.responseURL && d.responseURL.indexOf("file:") === 0) || setTimeout(T);
- }, d.onabort = function() {
- d && (o(new ne("Request aborted", ne.ECONNABORTED, r, d)), d = null);
- }, d.onerror = function() {
- o(new ne("Network Error", ne.ERR_NETWORK, r, d)), d = null;
- }, d.ontimeout = function() {
- let k = y.timeout ? "timeout of " + y.timeout + "ms exceeded" : "timeout exceeded";
- const b = y.transitional || yd;
- y.timeoutErrorMessage && (k = y.timeoutErrorMessage), o(new ne(
- k,
- b.clarifyTimeoutError ? ne.ETIMEDOUT : ne.ECONNABORTED,
- r,
- d
- )), d = null;
- }, N === void 0 && D.setContentType(null), "setRequestHeader" in d && Et.forEach(D.toJSON(), function(k, b) {
- d.setRequestHeader(b, k);
- }), Et.isUndefined(y.withCredentials) || (d.withCredentials = !!y.withCredentials), U && U !== "json" && (d.responseType = y.responseType), V && ([B, x] = Mo(V, !0), d.addEventListener("progress", B)), H && d.upload && ([R, S] = Mo(H), d.upload.addEventListener("progress", R), d.upload.addEventListener("loadend", S)), (y.cancelToken || y.signal) && (G = (j) => {
- d && (o(!j || j.type ? new Pn(null, r, d) : j), d.abort(), d = null);
- }, y.cancelToken && y.cancelToken.subscribe(G), y.signal && (y.signal.aborted ? G() : y.signal.addEventListener("abort", G)));
- const O = IM(y.url);
- if (O && Qe.protocols.indexOf(O) === -1) {
- o(new ne("Unsupported protocol " + O + ":", ne.ERR_BAD_REQUEST, r));
- return;
- }
- d.send(N || null);
- });
- }, GM = (r, p) => {
- const { length: M } = r = r ? r.filter(Boolean) : [];
- if (p || M) {
- let o = new AbortController(), y;
- const N = function(V) {
- if (!y) {
- y = !0, U();
- const G = V instanceof Error ? V : this.reason;
- o.abort(G instanceof ne ? G : new Pn(G instanceof Error ? G.message : G));
- }
- };
- let D = p && setTimeout(() => {
- D = null, N(new ne(`timeout ${p} of ms exceeded`, ne.ETIMEDOUT));
- }, p);
- const U = () => {
- r && (D && clearTimeout(D), D = null, r.forEach((V) => {
- V.unsubscribe ? V.unsubscribe(N) : V.removeEventListener("abort", N);
- }), r = null);
- };
- r.forEach((V) => V.addEventListener("abort", N));
- const { signal: H } = o;
- return H.unsubscribe = () => Et.asap(U), H;
- }
- }, HM = GM, FM = function* (r, p) {
- let M = r.byteLength;
- if (!p || M < p) {
- yield r;
- return;
- }
- let o = 0, y;
- for (; o < M; )
- y = o + p, yield r.slice(o, y), o = y;
- }, UM = async function* (r, p) {
- for await (const M of VM(r))
- yield* FM(M, p);
- }, VM = async function* (r) {
- if (r[Symbol.asyncIterator]) {
- yield* r;
- return;
- }
- const p = r.getReader();
- try {
- for (; ; ) {
- const { done: M, value: o } = await p.read();
- if (M)
- break;
- yield o;
- }
- } finally {
- await p.cancel();
- }
- }, $p = (r, p, M, o) => {
- const y = UM(r, p);
- let N = 0, D, U = (H) => {
- D || (D = !0, o && o(H));
- };
- return new ReadableStream({
- async pull(H) {
- try {
- const { done: V, value: G } = await y.next();
- if (V) {
- U(), H.close();
- return;
- }
- let R = G.byteLength;
- if (M) {
- let B = N += R;
- M(B);
- }
- H.enqueue(new Uint8Array(G));
- } catch (V) {
- throw U(V), V;
- }
- },
- cancel(H) {
- return U(H), y.return();
- }
- }, {
- highWaterMark: 2
- });
- }, Go = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Cd = Go && typeof ReadableStream == "function", $M = Go && (typeof TextEncoder == "function" ? ((r) => (p) => r.encode(p))(new TextEncoder()) : async (r) => new Uint8Array(await new Response(r).arrayBuffer())), Md = (r, ...p) => {
- try {
- return !!r(...p);
- } catch {
- return !1;
- }
- }, ZM = Cd && Md(() => {
- let r = !1;
- const p = new Request(Qe.origin, {
- body: new ReadableStream(),
- method: "POST",
- get duplex() {
- return r = !0, "half";
- }
- }).headers.has("Content-Type");
- return r && !p;
- }), Zp = 64 * 1024, kl = Cd && Md(() => Et.isReadableStream(new Response("").body)), ko = {
- stream: kl && ((r) => r.body)
- };
- Go && ((r) => {
- ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((p) => {
- !ko[p] && (ko[p] = Et.isFunction(r[p]) ? (M) => M[p]() : (M, o) => {
- throw new ne(`Response type '${p}' is not supported`, ne.ERR_NOT_SUPPORT, o);
- });
- });
- })(new Response());
- const KM = async (r) => {
- if (r == null)
- return 0;
- if (Et.isBlob(r))
- return r.size;
- if (Et.isSpecCompliantForm(r))
- return (await new Request(Qe.origin, {
- method: "POST",
- body: r
- }).arrayBuffer()).byteLength;
- if (Et.isArrayBufferView(r) || Et.isArrayBuffer(r))
- return r.byteLength;
- if (Et.isURLSearchParams(r) && (r = r + ""), Et.isString(r))
- return (await $M(r)).byteLength;
- }, JM = async (r, p) => {
- const M = Et.toFiniteNumber(r.getContentLength());
- return M ?? KM(p);
- }, qM = Go && (async (r) => {
- let {
- url: p,
- method: M,
- data: o,
- signal: y,
- cancelToken: N,
- timeout: D,
- onDownloadProgress: U,
- onUploadProgress: H,
- responseType: V,
- headers: G,
- withCredentials: R = "same-origin",
- fetchOptions: B
- } = wd(r);
- V = V ? (V + "").toLowerCase() : "text";
- let S = HM([y, N && N.toAbortSignal()], D), x;
- const f = S && S.unsubscribe && (() => {
- S.unsubscribe();
- });
- let d;
- try {
- if (H && ZM && M !== "get" && M !== "head" && (d = await JM(G, o)) !== 0) {
- let b = new Request(p, {
- method: "POST",
- body: o,
- duplex: "half"
- }), w;
- if (Et.isFormData(o) && (w = b.headers.get("content-type")) && G.setContentType(w), b.body) {
- const [v, l] = Fp(
- d,
- Mo(Up(H))
- );
- o = $p(b.body, Zp, v, l);
- }
- }
- Et.isString(R) || (R = R ? "include" : "omit");
- const T = "credentials" in Request.prototype;
- x = new Request(p, {
- ...B,
- signal: S,
- method: M.toUpperCase(),
- headers: G.normalize().toJSON(),
- body: o,
- duplex: "half",
- credentials: T ? R : void 0
- });
- let O = await fetch(x);
- const j = kl && (V === "stream" || V === "response");
- if (kl && (U || j && f)) {
- const b = {};
- ["status", "statusText", "headers"].forEach((h) => {
- b[h] = O[h];
- });
- const w = Et.toFiniteNumber(O.headers.get("content-length")), [v, l] = U && Fp(
- w,
- Mo(Up(U), !0)
- ) || [];
- O = new Response(
- $p(O.body, Zp, v, () => {
- l && l(), f && f();
- }),
- b
- );
- }
- V = V || "text";
- let k = await ko[Et.findKey(ko, V) || "text"](O, r);
- return !j && f && f(), await new Promise((b, w) => {
- bd(b, w, {
- data: k,
- headers: Bi.from(O.headers),
- status: O.status,
- statusText: O.statusText,
- config: r,
- request: x
- });
- });
- } catch (T) {
- throw f && f(), T && T.name === "TypeError" && /fetch/i.test(T.message) ? Object.assign(
- new ne("Network Error", ne.ERR_NETWORK, r, x),
- {
- cause: T.cause || T
- }
- ) : ne.from(T, T && T.code, r, x);
- }
- }), Al = {
- http: pM,
- xhr: XM,
- fetch: qM
- };
- Et.forEach(Al, (r, p) => {
- if (r) {
- try {
- Object.defineProperty(r, "name", { value: p });
- } catch {
- }
- Object.defineProperty(r, "adapterName", { value: p });
- }
- });
- const Kp = (r) => `- ${r}`, QM = (r) => Et.isFunction(r) || r === null || r === !1, kd = {
- getAdapter: (r) => {
- r = Et.isArray(r) ? r : [r];
- const { length: p } = r;
- let M, o;
- const y = {};
- for (let N = 0; N < p; N++) {
- M = r[N];
- let D;
- if (o = M, !QM(M) && (o = Al[(D = String(M)).toLowerCase()], o === void 0))
- throw new ne(`Unknown adapter '${D}'`);
- if (o)
- break;
- y[D || "#" + N] = o;
- }
- if (!o) {
- const N = Object.entries(y).map(
- ([U, H]) => `adapter ${U} ` + (H === !1 ? "is not supported by the environment" : "is not available in the build")
- );
- let D = p ? N.length > 1 ? `since :
- ` + N.map(Kp).join(`
- `) : " " + Kp(N[0]) : "as no adapter specified";
- throw new ne(
- "There is no suitable adapter to dispatch the request " + D,
- "ERR_NOT_SUPPORT"
- );
- }
- return o;
- },
- adapters: Al
- };
- function fl(r) {
- if (r.cancelToken && r.cancelToken.throwIfRequested(), r.signal && r.signal.aborted)
- throw new Pn(null, r);
- }
- function Jp(r) {
- return fl(r), r.headers = Bi.from(r.headers), r.data = dl.call(
- r,
- r.transformRequest
- ), ["post", "put", "patch"].indexOf(r.method) !== -1 && r.headers.setContentType("application/x-www-form-urlencoded", !1), kd.getAdapter(r.adapter || ih.adapter)(r).then(function(o) {
- return fl(r), o.data = dl.call(
- r,
- r.transformResponse,
- o
- ), o.headers = Bi.from(o.headers), o;
- }, function(o) {
- return xd(o) || (fl(r), o && o.response && (o.response.data = dl.call(
- r,
- r.transformResponse,
- o.response
- ), o.response.headers = Bi.from(o.response.headers))), Promise.reject(o);
- });
- }
- const Ad = "1.7.9", Ho = {};
- ["object", "boolean", "number", "function", "string", "symbol"].forEach((r, p) => {
- Ho[r] = function(o) {
- return typeof o === r || "a" + (p < 1 ? "n " : " ") + r;
- };
- });
- const qp = {};
- Ho.transitional = function(p, M, o) {
- function y(N, D) {
- return "[Axios v" + Ad + "] Transitional option '" + N + "'" + D + (o ? ". " + o : "");
- }
- return (N, D, U) => {
- if (p === !1)
- throw new ne(
- y(D, " has been removed" + (M ? " in " + M : "")),
- ne.ERR_DEPRECATED
- );
- return M && !qp[D] && (qp[D] = !0, console.warn(
- y(
- D,
- " has been deprecated since v" + M + " and will be removed in the near future"
- )
- )), p ? p(N, D, U) : !0;
- };
- };
- Ho.spelling = function(p) {
- return (M, o) => (console.warn(`${o} is likely a misspelling of ${p}`), !0);
- };
- function tk(r, p, M) {
- if (typeof r != "object")
- throw new ne("options must be an object", ne.ERR_BAD_OPTION_VALUE);
- const o = Object.keys(r);
- let y = o.length;
- for (; y-- > 0; ) {
- const N = o[y], D = p[N];
- if (D) {
- const U = r[N], H = U === void 0 || D(U, N, r);
- if (H !== !0)
- throw new ne("option " + N + " must be " + H, ne.ERR_BAD_OPTION_VALUE);
- continue;
- }
- if (M !== !0)
- throw new ne("Unknown option " + N, ne.ERR_BAD_OPTION);
- }
- }
- const uo = {
- assertOptions: tk,
- validators: Ho
- }, Ui = uo.validators;
- class Ao {
- constructor(p) {
- this.defaults = p, this.interceptors = {
- request: new Gp(),
- response: new Gp()
- };
- }
- /**
- * Dispatch a request
- *
- * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
- * @param {?Object} config
- *
- * @returns {Promise} The Promise to be fulfilled
- */
- async request(p, M) {
- try {
- return await this._request(p, M);
- } catch (o) {
- if (o instanceof Error) {
- let y = {};
- Error.captureStackTrace ? Error.captureStackTrace(y) : y = new Error();
- const N = y.stack ? y.stack.replace(/^.+\n/, "") : "";
- try {
- o.stack ? N && !String(o.stack).endsWith(N.replace(/^.+\n.+\n/, "")) && (o.stack += `
- ` + N) : o.stack = N;
- } catch {
- }
- }
- throw o;
- }
- }
- _request(p, M) {
- typeof p == "string" ? (M = M || {}, M.url = p) : M = p || {}, M = Zr(this.defaults, M);
- const { transitional: o, paramsSerializer: y, headers: N } = M;
- o !== void 0 && uo.assertOptions(o, {
- silentJSONParsing: Ui.transitional(Ui.boolean),
- forcedJSONParsing: Ui.transitional(Ui.boolean),
- clarifyTimeoutError: Ui.transitional(Ui.boolean)
- }, !1), y != null && (Et.isFunction(y) ? M.paramsSerializer = {
- serialize: y
- } : uo.assertOptions(y, {
- encode: Ui.function,
- serialize: Ui.function
- }, !0)), uo.assertOptions(M, {
- baseUrl: Ui.spelling("baseURL"),
- withXsrfToken: Ui.spelling("withXSRFToken")
- }, !0), M.method = (M.method || this.defaults.method || "get").toLowerCase();
- let D = N && Et.merge(
- N.common,
- N[M.method]
- );
- N && Et.forEach(
- ["delete", "get", "head", "post", "put", "patch", "common"],
- (x) => {
- delete N[x];
- }
- ), M.headers = Bi.concat(D, N);
- const U = [];
- let H = !0;
- this.interceptors.request.forEach(function(f) {
- typeof f.runWhen == "function" && f.runWhen(M) === !1 || (H = H && f.synchronous, U.unshift(f.fulfilled, f.rejected));
- });
- const V = [];
- this.interceptors.response.forEach(function(f) {
- V.push(f.fulfilled, f.rejected);
- });
- let G, R = 0, B;
- if (!H) {
- const x = [Jp.bind(this), void 0];
- for (x.unshift.apply(x, U), x.push.apply(x, V), B = x.length, G = Promise.resolve(M); R < B; )
- G = G.then(x[R++], x[R++]);
- return G;
- }
- B = U.length;
- let S = M;
- for (R = 0; R < B; ) {
- const x = U[R++], f = U[R++];
- try {
- S = x(S);
- } catch (d) {
- f.call(this, d);
- break;
- }
- }
- try {
- G = Jp.call(this, S);
- } catch (x) {
- return Promise.reject(x);
- }
- for (R = 0, B = V.length; R < B; )
- G = G.then(V[R++], V[R++]);
- return G;
- }
- getUri(p) {
- p = Zr(this.defaults, p);
- const M = Sd(p.baseURL, p.url);
- return md(M, p.params, p.paramsSerializer);
- }
- }
- Et.forEach(["delete", "get", "head", "options"], function(p) {
- Ao.prototype[p] = function(M, o) {
- return this.request(Zr(o || {}, {
- method: p,
- url: M,
- data: (o || {}).data
- }));
- };
- });
- Et.forEach(["post", "put", "patch"], function(p) {
- function M(o) {
- return function(N, D, U) {
- return this.request(Zr(U || {}, {
- method: p,
- headers: o ? {
- "Content-Type": "multipart/form-data"
- } : {},
- url: N,
- data: D
- }));
- };
- }
- Ao.prototype[p] = M(), Ao.prototype[p + "Form"] = M(!0);
- });
- const fo = Ao;
- class rh {
- constructor(p) {
- if (typeof p != "function")
- throw new TypeError("executor must be a function.");
- let M;
- this.promise = new Promise(function(N) {
- M = N;
- });
- const o = this;
- this.promise.then((y) => {
- if (!o._listeners)
- return;
- let N = o._listeners.length;
- for (; N-- > 0; )
- o._listeners[N](y);
- o._listeners = null;
- }), this.promise.then = (y) => {
- let N;
- const D = new Promise((U) => {
- o.subscribe(U), N = U;
- }).then(y);
- return D.cancel = function() {
- o.unsubscribe(N);
- }, D;
- }, p(function(N, D, U) {
- o.reason || (o.reason = new Pn(N, D, U), M(o.reason));
- });
- }
- /**
- * Throws a `CanceledError` if cancellation has been requested.
- */
- throwIfRequested() {
- if (this.reason)
- throw this.reason;
- }
- /**
- * Subscribe to the cancel signal
- */
- subscribe(p) {
- if (this.reason) {
- p(this.reason);
- return;
- }
- this._listeners ? this._listeners.push(p) : this._listeners = [p];
- }
- /**
- * Unsubscribe from the cancel signal
- */
- unsubscribe(p) {
- if (!this._listeners)
- return;
- const M = this._listeners.indexOf(p);
- M !== -1 && this._listeners.splice(M, 1);
- }
- toAbortSignal() {
- const p = new AbortController(), M = (o) => {
- p.abort(o);
- };
- return this.subscribe(M), p.signal.unsubscribe = () => this.unsubscribe(M), p.signal;
- }
- /**
- * Returns an object that contains a new `CancelToken` and a function that, when called,
- * cancels the `CancelToken`.
- */
- static source() {
- let p;
- return {
- token: new rh(function(y) {
- p = y;
- }),
- cancel: p
- };
- }
- }
- const ek = rh;
- function ik(r) {
- return function(M) {
- return r.apply(null, M);
- };
- }
- function rk(r) {
- return Et.isObject(r) && r.isAxiosError === !0;
- }
- const Tl = {
- Continue: 100,
- SwitchingProtocols: 101,
- Processing: 102,
- EarlyHints: 103,
- Ok: 200,
- Created: 201,
- Accepted: 202,
- NonAuthoritativeInformation: 203,
- NoContent: 204,
- ResetContent: 205,
- PartialContent: 206,
- MultiStatus: 207,
- AlreadyReported: 208,
- ImUsed: 226,
- MultipleChoices: 300,
- MovedPermanently: 301,
- Found: 302,
- SeeOther: 303,
- NotModified: 304,
- UseProxy: 305,
- Unused: 306,
- TemporaryRedirect: 307,
- PermanentRedirect: 308,
- BadRequest: 400,
- Unauthorized: 401,
- PaymentRequired: 402,
- Forbidden: 403,
- NotFound: 404,
- MethodNotAllowed: 405,
- NotAcceptable: 406,
- ProxyAuthenticationRequired: 407,
- RequestTimeout: 408,
- Conflict: 409,
- Gone: 410,
- LengthRequired: 411,
- PreconditionFailed: 412,
- PayloadTooLarge: 413,
- UriTooLong: 414,
- UnsupportedMediaType: 415,
- RangeNotSatisfiable: 416,
- ExpectationFailed: 417,
- ImATeapot: 418,
- MisdirectedRequest: 421,
- UnprocessableEntity: 422,
- Locked: 423,
- FailedDependency: 424,
- TooEarly: 425,
- UpgradeRequired: 426,
- PreconditionRequired: 428,
- TooManyRequests: 429,
- RequestHeaderFieldsTooLarge: 431,
- UnavailableForLegalReasons: 451,
- InternalServerError: 500,
- NotImplemented: 501,
- BadGateway: 502,
- ServiceUnavailable: 503,
- GatewayTimeout: 504,
- HttpVersionNotSupported: 505,
- VariantAlsoNegotiates: 506,
- InsufficientStorage: 507,
- LoopDetected: 508,
- NotExtended: 510,
- NetworkAuthenticationRequired: 511
- };
- Object.entries(Tl).forEach(([r, p]) => {
- Tl[p] = r;
- });
- const nk = Tl;
- function Td(r) {
- const p = new fo(r), M = nd(fo.prototype.request, p);
- return Et.extend(M, fo.prototype, p, { allOwnKeys: !0 }), Et.extend(M, p, null, { allOwnKeys: !0 }), M.create = function(y) {
- return Td(Zr(r, y));
- }, M;
- }
- const Ye = Td(ih);
- Ye.Axios = fo;
- Ye.CanceledError = Pn;
- Ye.CancelToken = ek;
- Ye.isCancel = xd;
- Ye.VERSION = Ad;
- Ye.toFormData = zo;
- Ye.AxiosError = ne;
- Ye.Cancel = Ye.CanceledError;
- Ye.all = function(p) {
- return Promise.all(p);
- };
- Ye.spread = ik;
- Ye.isAxiosError = rk;
- Ye.mergeConfig = Zr;
- Ye.AxiosHeaders = Bi;
- Ye.formToJSON = (r) => vd(Et.isHTMLForm(r) ? new FormData(r) : r);
- Ye.getAdapter = kd.getAdapter;
- Ye.HttpStatusCode = nk;
- Ye.default = Ye;
- const sk = Ye;
- let ok = {
- baseURL: "/api",
- timeout: 10 * 60 * 1e3
- };
- const nh = sk.create(ok);
- nh.interceptors.request.use(
- function(r) {
- return r;
- },
- function(r) {
- return console.error(r), Promise.reject(r);
- }
- );
- nh.interceptors.response.use(
- function(r) {
- let p = r.data;
- return r.status !== 200 && console.error("网络异常"), p || console.error("服务器开了个小差"), p.Ret === 408 && console.error(p.Msg), p.Ret === 403 && console.error(p.Msg || "网络异常"), p;
- },
- function(r) {
- return console.error(r), Promise.reject(r);
- }
- );
- const sh = (r, p) => nh.post(r, p), ak = (r) => sh("/chart/detail", r), lk = (r) => sh("/eta_forum/chart/detail", r), hk = (r) => sh("/excel/detail", r);
- function Pd(r) {
- if (r.indexOf("?") === -1)
- return {};
- const M = r.split("?")[1].split("&"), o = {};
- return M.forEach((y) => {
- const [N, D] = y.split("=");
- o[N] = decodeURIComponent(D);
- }), o;
- }
- const ck = `@charset "UTF-8";div[data-v-4a9f0e4d]{box-sizing:border-box}.hz-chart-wrap[data-v-4a9f0e4d]{font:initial;page-break-inside:avoid;max-width:1200PX;height:100%;overflow:hidden;position:relative;margin:0 auto;border:1PX solid rgba(0,0,0,.125)!important;background:#fff;border-radius:5PX;display:flex;flex-direction:column;font-family:PingFangSC-Regular,微软雅黑,宋体!important}.hz-chart-wrap .hz-chart-head[data-v-4a9f0e4d]{box-sizing:border-box;background-color:#f2f2f2;border-bottom:1px solid rgba(0,0,0,.125);cursor:pointer;min-height:40PX;display:flex;align-items:center;padding:2PX 10PX}.hz-chart-wrap .hz-chart-head .chart-title[data-v-4a9f0e4d]{width:100%}.hz-chart-wrap .chart-wrapper[data-v-4a9f0e4d]{position:relative;display:flex;height:100%;width:100%}.hz-chart-wrap .chart-wrapper .hz-chart-content[data-v-4a9f0e4d]{width:100%;flex:1}.hz-chart-wrap .chart-wrapper .mark[data-v-4a9f0e4d]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);background-image:none;background-position:center center;background-repeat:no-repeat;background-size:contain;pointer-events:none;width:80%;height:80%}.hz-chart-wrap .notfound[data-v-4a9f0e4d]{flex:1;overflow:hidden;padding:10PX;color:#777;text-align:center}.hz-chart-wrap .chart-bottom-info[data-v-4a9f0e4d]{padding-right:10PX;padding-bottom:0;padding-left:25PX;display:flex}.hz-chart-wrap .chart-bottom-info .chart-instruction[data-v-4a9f0e4d]{max-width:80%;flex:1;text-align:right;margin-left:auto}.hz-chart-wrap .hz-chart-footer[data-v-4a9f0e4d]{padding-left:25PX;padding-right:10PX;padding-bottom:10PX;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:1px}.hz-chart-wrap .text_oneLine[data-v-4a9f0e4d]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
- `, Ed = (r, p) => {
- const M = r.__vccOpts || r;
- for (const [o, y] of p)
- M[o] = y;
- return M;
- }, pk = { class: "hz-chart-head" }, uk = {
- key: 0,
- class: "chart-wrapper"
- }, dk = ["id"], fk = {
- key: 1,
- class: "notfound"
- }, gk = {
- key: 2,
- class: "chart-bottom-info bootom-source"
- }, mk = ["textContent"], yk = {
- __name: "EtaChart.ce",
- props: {
- src: "",
- width: "",
- height: "",
- style: ""
- },
- setup(r) {
- const { chartRender: p, setLimitData: M, isUseSelfLimit: o } = iC(), y = r, N = Pd(y.src), D = Le(null), U = Le(""), H = Le(null), V = Le(null), G = Le(!1), R = Le(null), B = Le(null), S = Le(null);
- async function x() {
- if (!N.code) {
- G.value = !1;
- return;
- }
- try {
- const d = N.isETAForumChart && N.isETAForumChart == "true" ? await lk({
- UniqueCode: N.code,
- IsReplace: 1
- }) : await ak({
- UniqueCode: N.code,
- IsReplace: 1
- });
- if (d.Ret !== 200)
- return;
- H.value = d.Data.ChartInfo, V.value = d.Data.ChartInfo.Source === 1 ? d.Data.EdbInfoList : [d.Data.EdbInfoList[0]], U.value = `hz-chart_${N.code}_${(/* @__PURE__ */ new Date()).getTime()}`, f(), G.value = !0, d.Data.ChartInfo.Source === 1 && ![7, 10, 11].includes(d.Data.ChartInfo.ChartType) ? (o.value = !0, M(d.Data)) : o.value = !1, go(() => {
- p({
- data: d.Data,
- renderId: D.value,
- lang: N.language,
- changeLangIsCheck: !1,
- showChartTitle: !1,
- shouldUseSelfLimit: !0
- }), d.Data.WaterMark && (R.value.style.backgroundImage = `url(${d.Data.WaterMark})`);
- }), go(() => {
- var T;
- S.value && (S.value.style.maxWidth = ((T = B.value) == null ? void 0 : T.clientWidth) + "px");
- });
- } catch {
- G.value = !1;
- }
- }
- const f = () => {
- N.language = N.fromPage || N.lang || "zh";
- };
- return x(), (d, T) => {
- var O, j, k, b;
- return Je(), qe("div", {
- class: "hz-chart-wrap",
- ref_key: "chartContainer",
- ref: B,
- style: lr([y.style + ";height:" + y.height + "px", { margin: "0 0 10px 0" }])
- }, [
- hr("header", pk, [
- H.value ? (Je(), qe("span", {
- key: 0,
- class: "chart-title",
- style: lr(H.value.ChartThemeStyle ? `
- text-align:${JSON.parse(H.value.ChartThemeStyle).titleOptions.align};
- font-size:${JSON.parse(H.value.ChartThemeStyle).titleOptions.style.fontSize}px;
- color:${JSON.parse(H.value.ChartThemeStyle).titleOptions.style.color}
- ` : "")
- }, yn(X0(N).language === "en" ? H.value.ChartNameEn : H.value.ChartName), 5)) : qn("", !0)
- ]),
- G.value ? (Je(), qe("div", uk, [
- hr("div", {
- id: U.value,
- ref_key: "chartContentEl",
- ref: D,
- class: "hz-chart-content"
- }, null, 8, dk),
- hr("div", {
- class: "mark",
- ref_key: "markDom",
- ref: R
- }, null, 512)
- ])) : (Je(), qe("div", fk, " 哎吆,你的图飞了,赶快去找管理员救命吧~ ")),
- (O = H.value) != null && O.Instructions && JSON.parse((j = H.value) == null ? void 0 : j.Instructions).isShow ? (Je(), qe("div", gk, [
- hr("div", {
- class: "chart-instruction text_oneLine",
- textContent: yn(JSON.parse(H.value.Instructions).text),
- style: lr(`
- color: ${JSON.parse(H.value.Instructions).color};
- font-size: ${JSON.parse(H.value.Instructions).fontSize}px
- `)
- }, null, 12, mk)
- ])) : qn("", !0),
- (k = H.value) != null && k.SourcesFrom && ((b = JSON.parse(H.value.SourcesFrom)) != null && b.isShow) ? (Je(), qe("div", {
- key: 3,
- class: "hz-chart-footer",
- ref_key: "chartFooter",
- ref: S,
- style: lr(`
- color: ${JSON.parse(H.value.SourcesFrom).color};
- font-size: ${JSON.parse(H.value.SourcesFrom).fontSize}px;
- `)
- }, [
- T[0] || (T[0] = Qp(" source:")),
- hr("em", null, yn(JSON.parse(H.value.SourcesFrom).text), 1)
- ], 4)) : qn("", !0)
- ], 4);
- };
- }
- }, vk = /* @__PURE__ */ Ed(yk, [["styles", [ck]], ["__scopeId", "data-v-4a9f0e4d"]]), xk = `@charset "UTF-8";.sheet-show-wrapper[data-v-21c79782]{max-width:1200PX;overflow:hidden;position:relative;margin:0 auto;background:#fff;font-family:PingFangSC-Regular,微软雅黑,宋体!important}.sheet-show-wrapper .title[data-v-21c79782]{font-size:17PX;font-weight:400;padding:0 10PX;margin:0 0 8PX}.sheet-show-wrapper .table-wrapper[data-v-21c79782]{max-width:calc(100vw - 20PX);margin:0 auto;overflow:auto}.sheet-show-wrapper .table-wrapper table[data-v-21c79782]{width:100%;font-size:14PX;color:#333;table-layout:auto}.sheet-show-wrapper .table-wrapper table td[data-v-21c79782],.sheet-show-wrapper .table-wrapper table th[data-v-21c79782]{width:auto;height:auto;padding:.4em 0;word-break:break-all;word-wrap:break-word;line-height:1.2em;border:1PX solid #dcdfe6;text-align:center;background-color:#fff;border-left:none;border-top:none}.sheet-show-wrapper .table-wrapper table td[data-v-21c79782]:first-child,.sheet-show-wrapper .table-wrapper table th[data-v-21c79782]:first-child{border-left:1PX solid #dcdfe6}.sheet-show-wrapper .table-wrapper table .data-cell[data-v-21c79782]{color:#333}.sheet-show-wrapper .table-wrapper table .data-cell.one-bg[data-v-21c79782]{background-color:#efeef1}.sheet-show-wrapper .table-wrapper table .data-cell.two-bg[data-v-21c79782]{background-color:#fff}.sheet-show-wrapper .table-wrapper table .thead-sticky[data-v-21c79782]{position:sticky;top:0}.sheet-show-wrapper .table-wrapper table .head-column[data-v-21c79782]{background-color:#505b78;color:#fff}.sheet-show-wrapper .table-wrapper table .split-word span[data-v-21c79782]{display:inline}.sheet-show-wrapper .sheet-source[data-v-21c79782]{margin-top:5PX;min-width:150PX;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
- `, bk = { class: "table-wrapper" }, Sk = ["colspan", "rowspan"], wk = {
- key: 0,
- class: "split-word"
- }, Ck = { key: 1 }, Mk = {
- __name: "EtaTable.ce",
- props: {
- src: "",
- width: "",
- height: "",
- style: ""
- },
- setup(r) {
- const M = Pd(r.src), o = Le({}), y = Le(!1), N = Le(null), D = Le(null), U = (G) => JSON.stringify({
- isShow: !0,
- text: G,
- color: "#606266",
- fontSize: 9
- });
- async function H() {
- const G = await hk({
- UniqueCode: M.code,
- FromScene: Number(M.fromScene || ""),
- ReferencedId: Number(M.sourceId || ""),
- Uuid: M.uid || ""
- });
- G.Ret === 200 && (o.value = G.Data, o.value.SourcesFrom || (o.value.SourcesFrom = G.Data.ExcelSource ? U(G.Data.ExcelSource || "") : ""), y.value = !0, go(() => {
- var R;
- console.log(N.value.clientWidth), D.value && (D.value.style.maxWidth = ((R = N.value) == null ? void 0 : R.clientWidth) + "px");
- }));
- }
- H();
- function V(G, R) {
- const { HeightList: B, WidthList: S } = o.value.ReferencedExcelConfig;
- if (S && B) {
- let x = S.split(",").map((d) => Number(d)), f = B.split(",").map((d) => Number(d));
- return R === "height" ? f[G] ? `height:${f[G]}px` : "" : x[G] ? `width:${x[G]}px` : "";
- } else
- return "";
- }
- return (G, R) => {
- var B, S;
- return y.value ? (Je(), qe("div", {
- key: 0,
- class: "sheet-show-wrapper",
- ref_key: "sheetRef",
- ref: N
- }, [
- hr("div", bk, [
- hr("table", {
- cellpadding: "0",
- cellspacing: "0",
- style: lr(`font-size: ${((B = o.value.Config) == null ? void 0 : B.FontSize) || 12}PX`)
- }, [
- hr("tbody", null, [
- (Je(!0), qe(il, null, rl((S = o.value.TableInfo) == null ? void 0 : S.TableDataList, (x, f) => (Je(), qe("tr", {
- key: f,
- style: lr(`${V(f, "height")}`)
- }, [
- (Je(!0), qe(il, null, rl(x, (d, T) => {
- var O;
- return Je(), qe("td", {
- class: G0(["data-cell", {
- "one-bg": (f + 1) % 2 && f > 0,
- "tow-bg": (f + 1) % 2 !== 0 && f > 0,
- "head-column": f === 0
- }]),
- key: T,
- colspan: d.mc.cs || 1,
- rowspan: d.mc.rs || 1,
- style: lr(`
- color: ${d.fc};
- font-weight: ${d.bl ? "bold" : "normal"};
- font-style: ${d.it ? "italic" : "normal"};
- background: ${d.bg};
- font-size: ${d.fs || ((O = o.value.Config) == null ? void 0 : O.FontSize) || 12}px;
- ${V(T, "width")}
- `)
- }, [
- d.ct.s ? (Je(), qe("div", wk, [
- (Je(!0), qe(il, null, rl(d.ct.s, (j, k) => (Je(), qe("span", {
- key: `${f}_${T}_${k}`,
- style: lr(`
- color: ${j.fc};
- font-weight: ${j.bl ? "bold" : "normal"};
- font-style: ${j.it ? "italic" : "normal"};
- `)
- }, yn(j.v), 5))), 128))
- ])) : (Je(), qe("div", Ck, yn(d.m), 1))
- ], 14, Sk);
- }), 128))
- ], 4))), 128))
- ])
- ], 4)
- ]),
- o.value.SourcesFrom && JSON.parse(o.value.SourcesFrom).isShow ? (Je(), qe("div", {
- key: 0,
- class: "sheet-source",
- ref_key: "sheetFooter",
- ref: D,
- style: lr(`
- color: ${JSON.parse(o.value.SourcesFrom).color};
- font-size: ${JSON.parse(o.value.SourcesFrom).fontSize}px;
- `)
- }, [
- R[0] || (R[0] = Qp(" source:")),
- hr("em", null, yn(JSON.parse(o.value.SourcesFrom).text), 1)
- ], 4)) : qn("", !0)
- ], 512)) : qn("", !0);
- };
- }
- }, kk = /* @__PURE__ */ Ed(Mk, [["styles", [xk]], ["__scopeId", "data-v-21c79782"]]), Ak = tu(vk), Tk = tu(kk);
- function Ek() {
- customElements.define("eta-chart", Ak), customElements.define("eta-table", Tk);
- }
- export {
- Ek as registerEtaComp
- };
|