123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034260352603626037260382603926040260412604226043260442604526046260472604826049260502605126052260532605426055260562605726058260592606026061260622606326064260652606626067260682606926070260712607226073260742607526076260772607826079260802608126082260832608426085260862608726088260892609026091260922609326094260952609626097260982609926100261012610226103261042610526106261072610826109261102611126112261132611426115261162611726118261192612026121261222612326124261252612626127261282612926130261312613226133261342613526136261372613826139261402614126142261432614426145261462614726148261492615026151261522615326154261552615626157261582615926160261612616226163261642616526166261672616826169261702617126172261732617426175261762617726178261792618026181261822618326184261852618626187261882618926190261912619226193261942619526196261972619826199262002620126202262032620426205262062620726208262092621026211262122621326214262152621626217262182621926220262212622226223262242622526226262272622826229262302623126232262332623426235262362623726238262392624026241262422624326244262452624626247262482624926250262512625226253262542625526256262572625826259262602626126262262632626426265262662626726268262692627026271262722627326274262752627626277262782627926280262812628226283262842628526286262872628826289262902629126292262932629426295262962629726298262992630026301263022630326304263052630626307263082630926310263112631226313263142631526316263172631826319263202632126322263232632426325263262632726328263292633026331263322633326334263352633626337263382633926340263412634226343263442634526346263472634826349263502635126352263532635426355263562635726358263592636026361263622636326364263652636626367263682636926370263712637226373263742637526376263772637826379263802638126382263832638426385263862638726388263892639026391263922639326394263952639626397263982639926400264012640226403264042640526406264072640826409264102641126412264132641426415264162641726418264192642026421264222642326424264252642626427264282642926430264312643226433264342643526436264372643826439264402644126442264432644426445264462644726448264492645026451264522645326454264552645626457264582645926460264612646226463264642646526466264672646826469264702647126472264732647426475264762647726478264792648026481264822648326484264852648626487264882648926490264912649226493264942649526496264972649826499265002650126502265032650426505265062650726508265092651026511265122651326514265152651626517265182651926520265212652226523265242652526526265272652826529265302653126532265332653426535265362653726538265392654026541265422654326544265452654626547265482654926550265512655226553265542655526556265572655826559265602656126562265632656426565265662656726568265692657026571265722657326574265752657626577265782657926580265812658226583265842658526586265872658826589265902659126592265932659426595265962659726598265992660026601266022660326604266052660626607266082660926610266112661226613266142661526616266172661826619266202662126622266232662426625266262662726628266292663026631266322663326634266352663626637266382663926640266412664226643266442664526646266472664826649266502665126652266532665426655266562665726658266592666026661266622666326664266652666626667266682666926670266712667226673266742667526676266772667826679266802668126682266832668426685266862668726688266892669026691266922669326694266952669626697266982669926700267012670226703267042670526706267072670826709267102671126712267132671426715267162671726718267192672026721267222672326724267252672626727267282672926730267312673226733267342673526736267372673826739267402674126742267432674426745267462674726748267492675026751267522675326754267552675626757267582675926760267612676226763267642676526766267672676826769267702677126772267732677426775267762677726778267792678026781267822678326784267852678626787267882678926790267912679226793267942679526796267972679826799268002680126802268032680426805268062680726808268092681026811268122681326814268152681626817268182681926820268212682226823268242682526826268272682826829268302683126832268332683426835268362683726838268392684026841268422684326844268452684626847268482684926850268512685226853268542685526856268572685826859268602686126862268632686426865268662686726868268692687026871268722687326874268752687626877268782687926880268812688226883268842688526886268872688826889268902689126892268932689426895268962689726898268992690026901269022690326904269052690626907269082690926910269112691226913269142691526916269172691826919269202692126922269232692426925269262692726928269292693026931269322693326934269352693626937269382693926940269412694226943269442694526946269472694826949269502695126952269532695426955269562695726958269592696026961269622696326964269652696626967269682696926970269712697226973269742697526976269772697826979269802698126982269832698426985269862698726988269892699026991269922699326994269952699626997269982699927000270012700227003270042700527006270072700827009270102701127012270132701427015270162701727018270192702027021270222702327024270252702627027270282702927030270312703227033270342703527036270372703827039270402704127042270432704427045270462704727048270492705027051270522705327054270552705627057270582705927060270612706227063270642706527066270672706827069270702707127072270732707427075270762707727078270792708027081270822708327084270852708627087270882708927090270912709227093270942709527096 |
- import { ref as Le, reactive as k0, nextTick as gs, openBlock as Je, createElementBlock as qe, normalizeStyle as hr, createElementVNode as cr, toDisplayString as yn, unref as A0, createCommentVNode as Jn, createTextVNode as Xp, Fragment as el, renderList as il, normalizeClass as T0, defineCustomElement as Gp } from "vue";
- const ms = {
- //图表配置
- 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
- }
- }, P0 = {
- //默认颜色配置
- 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
- }
- }, Cn = {
- tickPosition: "inside",
- lineColor: "#bfbfbf",
- tickColor: "#bfbfbf",
- tickLength: 5,
- ordinal: !1,
- type: "linear"
- }, mr = {
- 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
- }, Hp = {
- 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"
- }, E0 = {
- 年: "Y",
- 季: "Q",
- 月: "M",
- 周: "W",
- 天: "D"
- }, kp = {
- 年: "Year",
- 季: "Season",
- 月: "Month",
- 周: "Week",
- 天: "Day"
- };
- var Fr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
- function Mn(r) {
- return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
- }
- var Fp = { exports: {} };
- (function(r) {
- (function(d, T) {
- r.exports ? (T.default = T, r.exports = d.document ? T(d) : T) : (d.Highcharts && d.Highcharts.error(16, !0), d.Highcharts = T(d));
- })(typeof window < "u" ? window : Fr, function(d) {
- function T(y, j, I, Z) {
- y.hasOwnProperty(j) || (y[j] = Z.apply(null, I));
- }
- var l = {};
- return T(l, "Core/Globals.js", [], function() {
- var y = typeof d < "u" ? d : typeof window < "u" ? window : {}, j;
- return function(I) {
- I.SVG_NS = "http://www.w3.org/2000/svg", I.product = "Highcharts", I.version = "9.3.3", I.win = y, I.doc = I.win.document, I.svg = I.doc && I.doc.createElementNS && !!I.doc.createElementNS(I.SVG_NS, "svg").createSVGRect, I.userAgent = I.win.navigator && I.win.navigator.userAgent || "", I.isChrome = I.userAgent.indexOf("Chrome") !== -1, I.isFirefox = I.userAgent.indexOf("Firefox") !== -1, I.isMS = /(edge|msie|trident)/i.test(I.userAgent) && !I.win.opera, I.isSafari = !I.isChrome && I.userAgent.indexOf("Safari") !== -1, I.isTouchDevice = /(Mobile|Android|Windows Phone)/.test(I.userAgent), I.isWebKit = I.userAgent.indexOf("AppleWebKit") !== -1, I.deg2rad = 2 * Math.PI / 360, I.hasBidiBug = I.isFirefox && 4 > parseInt(I.userAgent.split("Firefox/")[1], 10), I.hasTouch = !!I.win.TouchEvent, I.marginNames = ["plotTop", "marginRight", "marginBottom", "plotLeft"], I.noop = function() {
- }, I.supportsPassiveEvents = function() {
- var Z = !1;
- if (!I.isMS) {
- var H = Object.defineProperty({}, "passive", { get: function() {
- Z = !0;
- } });
- I.win.addEventListener && I.win.removeEventListener && (I.win.addEventListener(
- "testPassive",
- I.noop,
- H
- ), I.win.removeEventListener("testPassive", I.noop, H));
- }
- return Z;
- }(), I.charts = [], I.dateFormats = {}, I.seriesTypes = {}, I.symbolSizes = {}, I.chartCount = 0;
- }(j || (j = {})), j;
- }), T(l, "Core/Utilities.js", [l["Core/Globals.js"]], function(y) {
- function j(t, o, n, A) {
- var _ = o ? "Highcharts error" : "Highcharts warning";
- t === 32 && (t = _ + ": Deprecated member");
- var D = b(t), W = D ? _ + " #" + t + ": www.highcharts.com/errors/" + t + "/" : t.toString();
- if (typeof A < "u") {
- var P = "";
- D && (W += "?"), S(A, function(X, g) {
- P += `
- - ` + g + ": " + X, D && (W += encodeURI(g) + "=" + encodeURI(X));
- }), W += P;
- }
- v(y, "displayError", { chart: n, code: t, message: W, params: A }, function() {
- if (o)
- throw Error(W);
- p.console && j.messages.indexOf(W) === -1 && console.warn(W);
- }), j.messages.push(W);
- }
- function I(t, o) {
- var n = {};
- return S(t, function(A, _) {
- F(t[_], !0) && !t.nodeType && o[_] ? (A = I(t[_], o[_]), Object.keys(A).length && (n[_] = A)) : (F(t[_]) || t[_] !== o[_]) && (n[_] = t[_]);
- }), n;
- }
- function Z(t, o) {
- return parseInt(t, o || 10);
- }
- function H(t) {
- return typeof t == "string";
- }
- function U(t) {
- return t = Object.prototype.toString.call(t), t === "[object Array]" || t === "[object Array Iterator]";
- }
- function F(t, o) {
- return !!t && typeof t == "object" && (!o || !U(t));
- }
- function R(t) {
- return F(t) && typeof t.nodeType == "number";
- }
- function N(t) {
- var o = t && t.constructor;
- return !(!F(t, !0) || R(t) || !o || !o.name || o.name === "Object");
- }
- function b(t) {
- return typeof t == "number" && !isNaN(t) && 1 / 0 > t && -1 / 0 < t;
- }
- function x(t) {
- return typeof t < "u" && t !== null;
- }
- function u(t, o, n) {
- var A;
- return H(o) ? x(n) ? t.setAttribute(o, n) : t && t.getAttribute && ((A = t.getAttribute(o)) || o !== "class" || (A = t.getAttribute(o + "Name"))) : S(o, function(_, D) {
- x(_) ? t.setAttribute(D, _) : t.removeAttribute(D);
- }), A;
- }
- function f(t, o) {
- var n;
- t || (t = {});
- for (n in o)
- t[n] = o[n];
- return t;
- }
- function E() {
- for (var t = arguments, o = t.length, n = 0; n < o; n++) {
- var A = t[n];
- if (typeof A < "u" && A !== null)
- return A;
- }
- }
- function O(t, o) {
- y.isMS && !y.svg && o && typeof o.opacity < "u" && (o.filter = "alpha(opacity=" + 100 * o.opacity + ")"), f(t.style, o);
- }
- function B(t, o) {
- return 1e14 < t ? t : parseFloat(t.toPrecision(o || 14));
- }
- function M(t, o, n) {
- var A = y.getStyle || M;
- if (o === "width")
- return o = Math.min(t.offsetWidth, t.scrollWidth), n = t.getBoundingClientRect && t.getBoundingClientRect().width, n < o && n >= o - 1 && (o = Math.floor(n)), Math.max(0, o - (A(t, "padding-left", !0) || 0) - (A(t, "padding-right", !0) || 0));
- if (o === "height")
- return Math.max(0, Math.min(t.offsetHeight, t.scrollHeight) - (A(t, "padding-top", !0) || 0) - (A(t, "padding-bottom", !0) || 0));
- if (p.getComputedStyle || j(27, !0), t = p.getComputedStyle(t, void 0)) {
- var _ = t.getPropertyValue(o);
- E(n, o !== "opacity") && (_ = Z(_));
- }
- return _;
- }
- function S(t, o, n) {
- for (var A in t)
- Object.hasOwnProperty.call(t, A) && o.call(n || t[A], t[A], A, t);
- }
- function w(t, o, n) {
- function A(P, X) {
- var g = t.removeEventListener || y.removeEventListenerPolyfill;
- g && g.call(t, P, X, !1);
- }
- function _(P) {
- var X;
- if (t.nodeName) {
- if (o) {
- var g = {};
- g[o] = !0;
- } else
- g = P;
- S(g, function(m, L) {
- if (P[L])
- for (X = P[L].length; X--; )
- A(L, P[L][X].fn);
- });
- }
- }
- var D = typeof t == "function" && t.prototype || t;
- if (Object.hasOwnProperty.call(D, "hcEvents")) {
- var W = D.hcEvents;
- o ? (D = W[o] || [], n ? (W[o] = D.filter(function(P) {
- return n !== P.fn;
- }), A(o, n)) : (_(W), W[o] = [])) : (_(W), delete D.hcEvents);
- }
- }
- function v(t, o, n, A) {
- if (n = n || {}, c.createEvent && (t.dispatchEvent || t.fireEvent && t !== y)) {
- var _ = c.createEvent("Events");
- _.initEvent(o, !0, !0), n = f(_, n), t.dispatchEvent ? t.dispatchEvent(n) : t.fireEvent(o, n);
- } else if (t.hcEvents) {
- n.target || f(n, { preventDefault: function() {
- n.defaultPrevented = !0;
- }, target: t, type: o }), _ = [];
- for (var D = t, W = !1; D.hcEvents; )
- Object.hasOwnProperty.call(D, "hcEvents") && D.hcEvents[o] && (_.length && (W = !0), _.unshift.apply(_, D.hcEvents[o])), D = Object.getPrototypeOf(D);
- W && _.sort(function(P, X) {
- return P.order - X.order;
- }), _.forEach(function(P) {
- P.fn.call(t, n) === !1 && n.preventDefault();
- });
- }
- A && !n.defaultPrevented && A.call(t, n);
- }
- var a = y.charts, c = y.doc, p = y.win;
- (j || (j = {})).messages = [], Math.easeInOutSine = function(t) {
- return -0.5 * (Math.cos(Math.PI * t) - 1);
- };
- var i = Array.prototype.find ? function(t, o) {
- return t.find(o);
- } : function(t, o) {
- var n, A = t.length;
- for (n = 0; n < A; n++)
- if (o(t[n], n))
- return t[n];
- };
- S({ map: "map", each: "forEach", grep: "filter", reduce: "reduce", some: "some" }, function(t, o) {
- y[o] = function(n) {
- var A;
- return j(32, !1, void 0, (A = {}, A["Highcharts." + o] = "use Array." + t, A)), Array.prototype[t].apply(n, [].slice.call(arguments, 1));
- };
- });
- var h, s = function() {
- var t = Math.random().toString(36).substring(2, 9) + "-", o = 0;
- return function() {
- return "highcharts-" + (h ? "" : t) + o++;
- };
- }();
- return p.jQuery && (p.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) : a[u(this[0], "data-highcharts-chart")];
- }), i = { addEvent: function(t, o, n, A) {
- A === void 0 && (A = {});
- 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 D = t.addEventListener || y.addEventListenerPolyfill;
- return D && D.call(t, o, n, y.supportsPassiveEvents ? { passive: A.passive === void 0 ? o.indexOf("touch") !== -1 : A.passive, capture: !1 } : !1), _[o] || (_[o] = []), _[o].push({ fn: n, order: typeof A.order == "number" ? A.order : 1 / 0 }), _[o].sort(function(W, P) {
- return W.order - P.order;
- }), function() {
- w(t, o, n);
- };
- }, arrayMax: function(t) {
- for (var o = t.length, n = t[0]; o--; )
- t[o] > n && (n = t[o]);
- return n;
- }, arrayMin: function(t) {
- for (var o = t.length, n = t[0]; o--; )
- t[o] < n && (n = t[o]);
- return n;
- }, attr: u, clamp: function(t, o, n) {
- return t > o ? t < n ? t : n : o;
- }, cleanRecursively: I, clearTimeout: function(t) {
- x(t) && clearTimeout(t);
- }, correctFloat: B, createElement: function(t, o, n, A, _) {
- return t = c.createElement(t), o && f(t, o), _ && O(t, { padding: "0", border: "none", margin: "0" }), n && O(t, n), A && A.appendChild(t), t;
- }, css: O, defined: x, destroyObjectProperties: function(t, o) {
- S(t, function(n, A) {
- n && n !== o && n.destroy && n.destroy(), delete t[A];
- });
- }, discardElement: function(t) {
- t && t.parentElement && t.parentElement.removeChild(t);
- }, erase: function(t, o) {
- for (var n = t.length; n--; )
- if (t[n] === o) {
- t.splice(n, 1);
- break;
- }
- }, error: j, extend: f, extendClass: function(t, o) {
- var n = function() {
- };
- return n.prototype = new t(), f(n.prototype, o), n;
- }, find: i, fireEvent: v, getMagnitude: function(t) {
- return Math.pow(10, Math.floor(Math.log(t) / Math.LN10));
- }, getNestedProperty: function(t, o) {
- for (t = t.split("."); t.length && x(o); ) {
- var n = t.shift();
- if (typeof n > "u" || n === "__proto__" || (o = o[n], !x(o) || typeof o == "function" || typeof o.nodeType == "number" || o === p))
- return;
- }
- return o;
- }, getStyle: M, inArray: function(t, o, n) {
- return j(32, !1, void 0, { "Highcharts.inArray": "use Array.indexOf" }), o.indexOf(t, n);
- }, isArray: U, isClass: N, isDOMElement: R, isFunction: function(t) {
- return typeof t == "function";
- }, isNumber: b, isObject: F, isString: H, keys: function(t) {
- return j(32, !1, void 0, { "Highcharts.keys": "use Object.keys" }), Object.keys(t);
- }, merge: function() {
- var t, o = arguments, n = {}, A = function(D, W) {
- return typeof D != "object" && (D = {}), S(W, function(P, X) {
- X !== "__proto__" && X !== "constructor" && (!F(P, !0) || N(P) || R(P) ? D[X] = W[X] : D[X] = A(D[X] || {}, P));
- }), D;
- };
- o[0] === !0 && (n = o[1], o = Array.prototype.slice.call(o, 2));
- var _ = o.length;
- for (t = 0; t < _; t++)
- n = A(n, o[t]);
- return n;
- }, normalizeTickInterval: function(t, o, n, A, _) {
- var D = t;
- n = E(n, 1);
- var W = t / n;
- for (o || (o = _ ? [1, 1.2, 1.5, 2, 2.5, 3, 4, 5, 6, 8, 10] : [1, 2, 2.5, 5, 10], A === !1 && (n === 1 ? o = o.filter(function(P) {
- return P % 1 === 0;
- }) : 0.1 >= n && (o = [1 / n]))), A = 0; A < o.length && (D = o[A], !(_ && D * n >= t || !_ && W <= (o[A] + (o[A + 1] || o[A])) / 2)); A++)
- ;
- return D = B(D * n, -Math.round(Math.log(1e-3) / Math.LN10));
- }, objectEach: S, offset: function(t) {
- var o = c.documentElement;
- return t = t.parentElement || t.parentNode ? t.getBoundingClientRect() : { top: 0, left: 0, width: 0, height: 0 }, { top: t.top + (p.pageYOffset || o.scrollTop) - (o.clientTop || 0), left: t.left + (p.pageXOffset || o.scrollLeft) - (o.clientLeft || 0), width: t.width, height: t.height };
- }, pad: function(t, o, n) {
- return Array((o || 2) + 1 - String(t).replace("-", "").length).join(n || "0") + t;
- }, pick: E, pInt: Z, relativeLength: function(t, o, n) {
- return /%$/.test(t) ? o * parseFloat(t) / 100 + (n || 0) : parseFloat(t);
- }, removeEvent: w, splat: function(t) {
- return U(t) ? t : [t];
- }, stableSort: function(t, o) {
- var n = t.length, A, _;
- for (_ = 0; _ < n; _++)
- t[_].safeI = _;
- for (t.sort(function(D, W) {
- return A = o(D, W), A === 0 ? D.safeI - W.safeI : A;
- }), _ = 0; _ < n; _++)
- delete t[_].safeI;
- }, syncTimeout: function(t, o, n) {
- return 0 < o ? setTimeout(t, o, n) : (t.call(0, n), -1);
- }, timeUnits: {
- millisecond: 1,
- second: 1e3,
- minute: 6e4,
- hour: 36e5,
- day: 864e5,
- week: 6048e5,
- month: 24192e5,
- year: 314496e5
- }, uniqueKey: s, useSerialIds: function(t) {
- return h = E(t, h);
- }, wrap: function(t, o, n) {
- var A = t[o];
- t[o] = function() {
- var _ = Array.prototype.slice.call(arguments), D = arguments, W = this;
- return W.proceed = function() {
- A.apply(W, arguments.length ? arguments : D);
- }, _.unshift(A), _ = n.apply(this, _), W.proceed = null, _;
- };
- } }, i;
- }), T(l, "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" };
- }), T(l, "Core/Color/Color.js", [l["Core/Globals.js"], l["Core/Utilities.js"]], function(y, j) {
- var I = j.isNumber, Z = j.merge, H = j.pInt;
- return j = function() {
- function U(F) {
- this.rgba = [NaN, NaN, NaN, NaN], this.input = F;
- var R = y.Color;
- if (R && R !== U)
- return new R(F);
- if (!(this instanceof U))
- return new U(F);
- this.init(F);
- }
- return U.parse = function(F) {
- return F ? new U(F) : U.None;
- }, U.prototype.init = function(F) {
- var R;
- if (typeof F == "object" && typeof F.stops < "u")
- this.stops = F.stops.map(function(u) {
- return new U(u[1]);
- });
- else if (typeof F == "string") {
- if (this.input = F = U.names[F.toLowerCase()] || F, F.charAt(0) === "#") {
- var N = F.length, b = parseInt(F.substr(1), 16);
- N === 7 ? R = [(b & 16711680) >> 16, (b & 65280) >> 8, b & 255, 1] : N === 4 && (R = [(b & 3840) >> 4 | (b & 3840) >> 8, (b & 240) >> 4 | b & 240, (b & 15) << 4 | b & 15, 1]);
- }
- if (!R)
- for (b = U.parsers.length; b-- && !R; ) {
- var x = U.parsers[b];
- (N = x.regex.exec(F)) && (R = x.parse(N));
- }
- }
- R && (this.rgba = R);
- }, U.prototype.get = function(F) {
- var R = this.input, N = this.rgba;
- if (typeof R == "object" && typeof this.stops < "u") {
- var b = Z(R);
- return b.stops = [].slice.call(b.stops), this.stops.forEach(function(x, u) {
- b.stops[u] = [b.stops[u][0], x.get(F)];
- }), b;
- }
- return N && I(N[0]) ? F === "rgb" || !F && N[3] === 1 ? "rgb(" + N[0] + "," + N[1] + "," + N[2] + ")" : F === "a" ? "" + N[3] : "rgba(" + N.join(",") + ")" : R;
- }, U.prototype.brighten = function(F) {
- var R = this.rgba;
- if (this.stops)
- this.stops.forEach(function(b) {
- b.brighten(F);
- });
- else if (I(F) && F !== 0)
- for (var N = 0; 3 > N; N++)
- R[N] += H(255 * F), 0 > R[N] && (R[N] = 0), 255 < R[N] && (R[N] = 255);
- return this;
- }, U.prototype.setOpacity = function(F) {
- return this.rgba[3] = F, this;
- }, U.prototype.tweenTo = function(F, R) {
- var N = this.rgba, b = F.rgba;
- return !I(N[0]) || !I(b[0]) ? F.input || "none" : (F = b[3] !== 1 || N[3] !== 1, (F ? "rgba(" : "rgb(") + Math.round(b[0] + (N[0] - b[0]) * (1 - R)) + "," + Math.round(b[1] + (N[1] - b[1]) * (1 - R)) + "," + Math.round(b[2] + (N[2] - b[2]) * (1 - R)) + (F ? "," + (b[3] + (N[3] - b[3]) * (1 - R)) : "") + ")");
- }, U.names = { white: "#ffffff", black: "#000000" }, U.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(F) {
- return [H(F[1]), H(F[2]), H(F[3]), parseFloat(F[4], 10)];
- }
- }, { regex: /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/, parse: function(F) {
- return [H(F[1]), H(F[2]), H(F[3]), 1];
- } }], U.None = new U(""), U;
- }(), j;
- }), T(l, "Core/Color/Palettes.js", [], function() {
- return { colors: "#7cb5ec #434348 #90ed7d #f7a35c #8085e9 #f15c80 #e4d354 #2b908f #f45b5b #91e8e1".split(" ") };
- }), T(l, "Core/Time.js", [l["Core/Globals.js"], l["Core/Utilities.js"]], function(y, j) {
- var I = y.win, Z = j.defined, H = j.error, U = j.extend, F = j.isObject, R = j.merge, N = j.objectEach, b = j.pad, x = j.pick, u = j.splat, f = j.timeUnits, E = y.isSafari && I.Intl && I.Intl.DateTimeFormat.prototype.formatRange, O = y.isSafari && I.Intl && !I.Intl.DateTimeFormat.prototype.formatRange;
- return j = function() {
- function B(M) {
- this.options = {}, this.variableTimezone = this.useUTC = !1, this.Date = I.Date, this.getTimezoneOffset = this.timezoneOffsetFunction(), this.update(M);
- }
- return B.prototype.get = function(M, S) {
- if (this.variableTimezone || this.timezoneOffset) {
- var w = S.getTime(), v = w - this.getTimezoneOffset(S);
- return S.setTime(v), M = S["getUTC" + M](), S.setTime(w), M;
- }
- return this.useUTC ? S["getUTC" + M]() : S["get" + M]();
- }, B.prototype.set = function(M, S, w) {
- if (this.variableTimezone || this.timezoneOffset) {
- if (M === "Milliseconds" || M === "Seconds" || M === "Minutes" && this.getTimezoneOffset(S) % 36e5 === 0)
- return S["setUTC" + M](w);
- var v = this.getTimezoneOffset(S);
- return v = S.getTime() - v, S.setTime(v), S["setUTC" + M](w), M = this.getTimezoneOffset(S), v = S.getTime() + M, S.setTime(v);
- }
- return this.useUTC || E && M === "FullYear" ? S["setUTC" + M](w) : S["set" + M](w);
- }, B.prototype.update = function(M) {
- var S = x(M && M.useUTC, !0);
- this.options = M = R(!0, this.options || {}, M), this.Date = M.Date || I.Date || Date, this.timezoneOffset = (this.useUTC = S) && M.timezoneOffset, this.getTimezoneOffset = this.timezoneOffsetFunction(), this.variableTimezone = S && !(!M.getTimezoneOffset && !M.timezone);
- }, B.prototype.makeTime = function(M, S, w, v, a, c) {
- if (this.useUTC) {
- var p = this.Date.UTC.apply(0, arguments), i = this.getTimezoneOffset(p);
- p += i;
- var h = this.getTimezoneOffset(p);
- i !== h ? p += h - i : i - 36e5 !== this.getTimezoneOffset(p - 36e5) || O || (p -= 36e5);
- } else
- p = new this.Date(M, S, x(w, 1), x(v, 0), x(a, 0), x(c, 0)).getTime();
- return p;
- }, B.prototype.timezoneOffsetFunction = function() {
- var M = this, S = this.options, w = S.getTimezoneOffset, v = S.moment || I.moment;
- if (!this.useUTC)
- return function(a) {
- return 6e4 * new Date(a.toString()).getTimezoneOffset();
- };
- if (S.timezone) {
- if (v)
- return function(a) {
- return 6e4 * -v.tz(a, S.timezone).utcOffset();
- };
- H(25);
- }
- return this.useUTC && w ? function(a) {
- return 6e4 * w(a.valueOf());
- } : function() {
- return 6e4 * (M.timezoneOffset || 0);
- };
- }, B.prototype.dateFormat = function(M, S, w) {
- if (!Z(S) || isNaN(S))
- return y.defaultOptions.lang && y.defaultOptions.lang.invalidDate || "";
- M = x(M, "%Y-%m-%d %H:%M:%S");
- var v = this, a = new this.Date(S), c = this.get("Hours", a), p = this.get("Day", a), i = this.get("Date", a), h = this.get("Month", a), s = this.get("FullYear", a), t = y.defaultOptions.lang, o = t && t.weekdays, n = t && t.shortWeekdays;
- return a = U({ a: n ? n[p] : o[p].substr(0, 3), A: o[p], d: b(i), e: b(i, 2, " "), w: p, b: t.shortMonths[h], B: t.months[h], m: b(h + 1), o: h + 1, y: s.toString().substr(2, 2), Y: s, H: b(c), k: c, I: b(c % 12 || 12), l: c % 12 || 12, M: b(this.get("Minutes", a)), p: 12 > c ? "AM" : "PM", P: 12 > c ? "am" : "pm", S: b(a.getSeconds()), L: b(Math.floor(S % 1e3), 3) }, y.dateFormats), N(a, function(A, _) {
- for (; M.indexOf("%" + _) !== -1; )
- M = M.replace("%" + _, typeof A == "function" ? A.call(v, S) : A);
- }), w ? M.substr(0, 1).toUpperCase() + M.substr(1) : M;
- }, B.prototype.resolveDTLFormat = function(M) {
- return F(M, !0) ? M : (M = u(M), { main: M[0], from: M[1], to: M[2] });
- }, B.prototype.getTimeTicks = function(M, S, w, v) {
- var a = this, c = [], p = {}, i = new a.Date(S), h = M.unitRange, s = M.count || 1, t;
- if (v = x(v, 1), Z(S)) {
- if (a.set(
- "Milliseconds",
- i,
- h >= f.second ? 0 : s * Math.floor(a.get("Milliseconds", i) / s)
- ), h >= f.second && a.set("Seconds", i, h >= f.minute ? 0 : s * Math.floor(a.get("Seconds", i) / s)), h >= f.minute && a.set("Minutes", i, h >= f.hour ? 0 : s * Math.floor(a.get("Minutes", i) / s)), h >= f.hour && a.set("Hours", i, h >= f.day ? 0 : s * Math.floor(a.get("Hours", i) / s)), h >= f.day && a.set("Date", i, h >= f.month ? 1 : Math.max(1, s * Math.floor(a.get("Date", i) / s))), h >= f.month) {
- a.set("Month", i, h >= f.year ? 0 : s * Math.floor(a.get("Month", i) / s));
- var o = a.get("FullYear", i);
- }
- h >= f.year && a.set(
- "FullYear",
- i,
- o - o % s
- ), h === f.week && (o = a.get("Day", i), a.set("Date", i, a.get("Date", i) - o + v + (o < v ? -7 : 0))), o = a.get("FullYear", i), v = a.get("Month", i);
- var n = a.get("Date", i), A = a.get("Hours", i);
- for (S = i.getTime(), !a.variableTimezone && a.useUTC || !Z(w) || (t = w - S > 4 * f.month || a.getTimezoneOffset(S) !== a.getTimezoneOffset(w)), S = i.getTime(), i = 1; S < w; )
- c.push(S), S = h === f.year ? a.makeTime(o + i * s, 0) : h === f.month ? a.makeTime(o, v + i * s) : !t || h !== f.day && h !== f.week ? t && h === f.hour && 1 < s ? a.makeTime(o, v, n, A + i * s) : S + h * s : a.makeTime(o, v, n + i * s * (h === f.day ? 1 : 7)), i++;
- c.push(S), h <= f.hour && 1e4 > c.length && c.forEach(function(_) {
- _ % 18e5 === 0 && a.dateFormat("%H%M%S%L", _) === "000000000" && (p[_] = "day");
- });
- }
- return c.info = U(M, { higherRanks: p, totalRange: h * s }), c;
- }, B.prototype.getDateFormat = function(M, S, w, v) {
- var a = this.dateFormat("%m-%d %H:%M:%S.%L", S), c = { millisecond: 15, second: 12, minute: 9, hour: 6, day: 3 }, p = "millisecond";
- for (i in f) {
- if (M === f.week && +this.dateFormat("%w", S) === w && a.substr(6) === "00:00:00.000") {
- var i = "week";
- break;
- }
- if (f[i] > M) {
- i = p;
- break;
- }
- if (c[i] && a.substr(c[i]) !== "01-01 00:00:00.000".substr(c[i]))
- break;
- i !== "week" && (p = i);
- }
- if (i)
- var h = this.resolveDTLFormat(v[i]).main;
- return h;
- }, B;
- }(), j;
- }), T(l, "Core/DefaultOptions.js", [l["Core/Chart/ChartDefaults.js"], l["Core/Color/Color.js"], l["Core/Globals.js"], l["Core/Color/Palettes.js"], l["Core/Time.js"], l["Core/Utilities.js"]], function(y, j, I, Z, H, U) {
- j = j.parse;
- var F = U.merge, R = {
- colors: Z.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: I.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: I.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: j("#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 N = new H(F(R.global, R.time));
- return y = { defaultOptions: R, defaultTime: N, getOptions: function() {
- return R;
- }, setOptions: function(b) {
- return F(!0, R, b), (b.time || b.global) && (I.time ? I.time.update(F(
- R.global,
- R.time,
- b.global,
- b.time
- )) : I.time = N), R;
- } }, y;
- }), T(l, "Core/Animation/Fx.js", [l["Core/Color/Color.js"], l["Core/Globals.js"], l["Core/Utilities.js"]], function(y, j, I) {
- var Z = y.parse, H = j.win, U = I.isNumber, F = I.objectEach;
- return function() {
- function R(N, b, x) {
- this.pos = NaN, this.options = b, this.elem = N, this.prop = x;
- }
- return R.prototype.dSetter = function() {
- var N = this.paths, b = N && N[0];
- N = N && N[1];
- var x = this.now || 0, u = [];
- if (x !== 1 && b && N)
- if (b.length === N.length && 1 > x)
- for (var f = 0; f < N.length; f++) {
- for (var E = b[f], O = N[f], B = [], M = 0; M < O.length; M++) {
- var S = E[M], w = O[M];
- U(S) && U(w) && (O[0] !== "A" || M !== 4 && M !== 5) ? B[M] = S + x * (w - S) : B[M] = w;
- }
- u.push(B);
- }
- else
- u = N;
- else
- u = this.toD || [];
- this.elem.attr("d", u, void 0, !0);
- }, R.prototype.update = function() {
- var N = this.elem, b = this.prop, x = this.now, u = this.options.step;
- this[b + "Setter"] ? this[b + "Setter"]() : N.attr ? N.element && N.attr(b, x, null, !0) : N.style[b] = x + this.unit, u && u.call(N, x, this);
- }, R.prototype.run = function(N, b, x) {
- var u = this, f = u.options, E = function(M) {
- return E.stopped ? !1 : u.step(M);
- }, O = H.requestAnimationFrame || function(M) {
- setTimeout(
- M,
- 13
- );
- }, B = function() {
- for (var M = 0; M < R.timers.length; M++)
- R.timers[M]() || R.timers.splice(M--, 1);
- R.timers.length && O(B);
- };
- N !== b || this.elem["forceAnimate:" + this.prop] ? (this.startTime = +/* @__PURE__ */ new Date(), this.start = N, this.end = b, this.unit = x, this.now = this.start, this.pos = 0, E.elem = this.elem, E.prop = this.prop, E() && R.timers.push(E) === 1 && O(B)) : (delete f.curAnim[this.prop], f.complete && Object.keys(f.curAnim).length === 0 && f.complete.call(this.elem));
- }, R.prototype.step = function(N) {
- var b = +/* @__PURE__ */ new Date(), x = this.options, u = this.elem, f = x.complete, E = x.duration, O = x.curAnim;
- if (u.attr && !u.element)
- N = !1;
- else if (N || b >= E + this.startTime) {
- this.now = this.end, this.pos = 1, this.update();
- var B = O[this.prop] = !0;
- F(O, function(M) {
- M !== !0 && (B = !1);
- }), B && f && f.call(u), N = !1;
- } else
- this.pos = x.easing((b - this.startTime) / E), this.now = this.start + (this.end - this.start) * this.pos, this.update(), N = !0;
- return N;
- }, R.prototype.initPath = function(N, b, x) {
- function u(a, c) {
- for (; a.length < v; ) {
- var p = a[0], i = c[v - a.length];
- i && p[0] === "M" && (a[0] = i[0] === "C" ? ["C", p[1], p[2], p[1], p[2], p[1], p[2]] : [
- "L",
- p[1],
- p[2]
- ]), a.unshift(p), B && (p = a.pop(), a.push(a[a.length - 1], p));
- }
- }
- function f(a, c) {
- for (; a.length < v; )
- if (c = a[Math.floor(a.length / M) - 1].slice(), c[0] === "C" && (c[1] = c[5], c[2] = c[6]), B) {
- var p = a[Math.floor(a.length / M)].slice();
- a.splice(a.length / 2, 0, c, p);
- } else
- a.push(c);
- }
- var E = N.startX, O = N.endX;
- x = x.slice();
- var B = N.isArea, M = B ? 2 : 1;
- if (b = b && b.slice(), !b)
- return [x, x];
- if (E && O && O.length) {
- for (N = 0; N < E.length; N++)
- if (E[N] === O[0]) {
- var S = N;
- break;
- } else if (E[0] === O[O.length - E.length + N]) {
- S = N;
- var w = !0;
- break;
- } else if (E[E.length - 1] === O[O.length - E.length + N]) {
- S = E.length - N;
- break;
- }
- typeof S > "u" && (b = []);
- }
- if (b.length && U(S)) {
- var v = x.length + S * M;
- w ? (u(b, x), f(x, b)) : (u(x, b), f(b, x));
- }
- return [b, x];
- }, R.prototype.fillSetter = function() {
- R.prototype.strokeSetter.apply(this, arguments);
- }, R.prototype.strokeSetter = function() {
- this.elem.attr(this.prop, Z(this.start).tweenTo(Z(this.end), this.pos), void 0, !0);
- }, R.timers = [], R;
- }();
- }), T(l, "Core/Animation/AnimationUtilities.js", [l["Core/Animation/Fx.js"], l["Core/Utilities.js"]], function(y, j) {
- function I(f) {
- return N(f) ? b({ duration: 500, defer: 0 }, f) : { duration: f ? 500 : 0, defer: 0 };
- }
- function Z(f, E) {
- for (var O = y.timers.length; O--; )
- y.timers[O].elem !== f || E && E !== y.timers[O].prop || (y.timers[O].stopped = !0);
- }
- var H = j.defined, U = j.getStyle, F = j.isArray, R = j.isNumber, N = j.isObject, b = j.merge, x = j.objectEach, u = j.pick;
- return { animate: function(f, E, O) {
- var B, M = "", S, w;
- if (!N(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 = b(E), x(E, function(a, c) {
- Z(f, c), w = new y(f, O, c), S = void 0, c === "d" && F(E.d) ? (w.paths = w.initPath(f, f.pathArray, E.d), w.toD = E.d, B = 0, S = 1) : f.attr ? B = f.attr(c) : (B = parseFloat(U(f, c)) || 0, c !== "opacity" && (M = "px")), S || (S = a), typeof S == "string" && S.match("px") && (S = S.replace(/px/g, "")), w.run(B, S, M);
- });
- }, animObject: I, getDeferredAnimation: function(f, E, O) {
- var B = I(E), M = 0, S = 0;
- return (O ? [O] : f.series).forEach(function(w) {
- w = I(w.options.animation), M = E && H(E.defer) ? B.defer : Math.max(M, w.duration + w.defer), S = Math.min(B.duration, w.duration);
- }), f.renderer.forExport && (M = 0), { defer: Math.max(0, M - S), duration: Math.min(M, S) };
- }, setAnimation: function(f, E) {
- E.renderer.globalAnimation = u(f, E.options.chart.animation, !0);
- }, stop: Z };
- }), T(l, "Core/Renderer/HTML/AST.js", [l["Core/Globals.js"], l["Core/Utilities.js"]], function(y, j) {
- var I = y.SVG_NS, Z = j.attr, H = j.createElement, U = j.error, F = j.isFunction, R = j.isString, N = j.objectEach, b = j.splat, x = (j = y.win.trustedTypes) && F(j.createPolicy) && j.createPolicy("highcharts", { createHTML: function(E) {
- return E;
- } }), u = x ? x.createHTML("") : "";
- try {
- var f = !!new DOMParser().parseFromString(u, "text/html");
- } catch {
- f = !1;
- }
- return F = function() {
- function E(O) {
- this.nodes = typeof O == "string" ? this.parseMarkup(O) : O;
- }
- return E.filterUserAttributes = function(O) {
- return N(O, function(B, M) {
- var S = !0;
- E.allowedAttributes.indexOf(M) === -1 && (S = !1), ["background", "dynsrc", "href", "lowsrc", "src"].indexOf(M) !== -1 && (S = R(B) && E.allowedReferences.some(function(w) {
- return B.indexOf(w) === 0;
- })), S || (U("Highcharts warning: Invalid attribute '" + M + "' in config"), delete O[M]);
- }), O;
- }, E.setElementHTML = function(O, B) {
- O.innerHTML = E.emptyHTML, B && new E(B).addToDOM(O);
- }, E.prototype.addToDOM = function(O) {
- function B(M, S) {
- var w;
- return b(M).forEach(function(v) {
- var a = v.tagName, c = v.textContent ? y.doc.createTextNode(v.textContent) : void 0;
- if (a)
- if (a === "#text")
- var p = c;
- else if (E.allowedTags.indexOf(a) !== -1) {
- a = y.doc.createElementNS(a === "svg" ? I : S.namespaceURI || I, a);
- var i = v.attributes || {};
- N(v, function(h, s) {
- s !== "tagName" && s !== "attributes" && s !== "children" && s !== "textContent" && (i[s] = h);
- }), Z(a, E.filterUserAttributes(i)), c && a.appendChild(c), B(v.children || [], a), p = a;
- } else
- U("Highcharts warning: Invalid tagName " + a + " in config");
- p && S.appendChild(p), w = p;
- }), w;
- }
- return B(this.nodes, O);
- }, E.prototype.parseMarkup = function(O) {
- var B = [];
- if (O = O.trim(), f)
- O = new DOMParser().parseFromString(x ? x.createHTML(O) : O, "text/html");
- else {
- var M = H("div");
- M.innerHTML = O, O = { body: M };
- }
- var S = function(w, v) {
- var a = w.nodeName.toLowerCase(), c = { tagName: a };
- if (a === "#text" && (c.textContent = w.textContent || ""), a = w.attributes) {
- var p = {};
- [].forEach.call(a, function(h) {
- p[h.name] = h.value;
- }), c.attributes = p;
- }
- if (w.childNodes.length) {
- var i = [];
- [].forEach.call(w.childNodes, function(h) {
- S(h, i);
- }), i.length && (c.children = i);
- }
- v.push(c);
- };
- return [].forEach.call(O.body.childNodes, function(w) {
- return S(w, B);
- }), B;
- }, E.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(" "), E.allowedReferences = "https:// http:// mailto: / ../ ./ #".split(" "), E.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(" "), E.emptyHTML = u, E;
- }(), F;
- }), T(
- l,
- "Core/FormatUtilities.js",
- [l["Core/DefaultOptions.js"], l["Core/Utilities.js"]],
- function(y, j) {
- function I(b, x, u, f) {
- b = +b || 0, x = +x;
- var E = Z.lang, O = (b.toString().split(".")[1] || "").split("e")[0].length, B = b.toString().split("e"), M = x;
- if (x === -1)
- x = Math.min(O, 20);
- else if (!F(x))
- x = 2;
- else if (x && B[1] && 0 > B[1]) {
- var S = x + +B[1];
- 0 <= S ? (B[0] = (+B[0]).toExponential(S).split("e")[0], x = S) : (B[0] = B[0].split(".")[0] || 0, b = 20 > x ? (B[0] * Math.pow(10, B[1])).toFixed(x) : 0, B[1] = 0);
- }
- S = (Math.abs(B[1] ? B[0] : b) + Math.pow(10, -Math.max(x, O) - 1)).toFixed(x), O = String(N(S));
- var w = 3 < O.length ? O.length % 3 : 0;
- return u = R(u, E.decimalPoint), f = R(f, E.thousandsSep), b = (0 > b ? "-" : "") + (w ? O.substr(0, w) + f : ""), b = 0 > +B[1] && !M ? "0" : b + O.substr(w).replace(/(\d{3})(?=\d)/g, "$1" + f), x && (b += u + S.slice(-x)), B[1] && +b != 0 && (b += "e" + B[1]), b;
- }
- var Z = y.defaultOptions, H = y.defaultTime, U = j.getNestedProperty, F = j.isNumber, R = j.pick, N = j.pInt;
- return { dateFormat: function(b, x, u) {
- return H.dateFormat(b, x, u);
- }, format: function(b, x, u) {
- var f = "{", E = !1, O = /f$/, B = /\.([0-9])/, M = Z.lang, S = u && u.time || H;
- u = u && u.numberFormatter || I;
- for (var w = []; b; ) {
- var v = b.indexOf(f);
- if (v === -1)
- break;
- var a = b.slice(0, v);
- if (E) {
- if (a = a.split(":"), f = U(a.shift() || "", x), a.length && typeof f == "number")
- if (a = a.join(":"), O.test(a)) {
- var c = parseInt((a.match(B) || ["", "-1"])[1], 10);
- f !== null && (f = u(f, c, M.decimalPoint, -1 < a.indexOf(",") ? M.thousandsSep : ""));
- } else
- f = S.dateFormat(a, f);
- w.push(f);
- } else
- w.push(a);
- b = b.slice(v + 1), f = (E = !E) ? "}" : "{";
- }
- return w.push(b), w.join("");
- }, numberFormat: I };
- }
- ), T(l, "Core/Renderer/RendererUtilities.js", [l["Core/Utilities.js"]], function(y) {
- var j = y.clamp, I = y.pick, Z = y.stableSort, H;
- return function(U) {
- function F(R, N, b) {
- var x = R, u = x.reducedLen || N, f = function(w, v) {
- return (v.rank || 0) - (w.rank || 0);
- }, E = function(w, v) {
- return w.target - v.target;
- }, O, B = !0, M = [], S = 0;
- for (O = R.length; O--; )
- S += R[O].size;
- if (S > u) {
- for (Z(R, f), S = O = 0; S <= u; )
- S += R[O].size, O++;
- M = R.splice(O - 1, R.length);
- }
- for (Z(R, E), R = R.map(function(w) {
- return { size: w.size, targets: [w.target], align: I(w.align, 0.5) };
- }); B; ) {
- for (O = R.length; O--; )
- u = R[O], f = (Math.min.apply(0, u.targets) + Math.max.apply(0, u.targets)) / 2, u.pos = j(
- f - u.size * u.align,
- 0,
- N - u.size
- );
- for (O = R.length, B = !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 > N && (R[O - 1].pos = N - R[O - 1].size), R.splice(O, 1), B = !0);
- }
- return x.push.apply(x, M), O = 0, R.some(function(w) {
- var v = 0;
- return (w.targets || []).some(function() {
- return x[O].pos = w.pos + v, typeof b < "u" && Math.abs(x[O].pos - x[O].target) > b ? (x.slice(0, O + 1).forEach(function(a) {
- return delete a.pos;
- }), x.reducedLen = (x.reducedLen || N) - 0.1 * N, x.reducedLen > 0.1 * N && F(x, N, b), !0) : (v += x[O].size, O++, !1);
- });
- }), Z(x, E), x;
- }
- U.distribute = F;
- }(H || (H = {})), H;
- }), T(l, "Core/Renderer/SVG/SVGElement.js", [l["Core/Animation/AnimationUtilities.js"], l["Core/Renderer/HTML/AST.js"], l["Core/Color/Color.js"], l["Core/Globals.js"], l["Core/Utilities.js"]], function(y, j, I, Z, H) {
- var U = y.animate, F = y.animObject, R = y.stop, N = Z.deg2rad, b = Z.doc, x = Z.noop, u = Z.svg, f = Z.SVG_NS, E = Z.win, O = H.addEvent, B = H.attr, M = H.createElement, S = H.css, w = H.defined, v = H.erase, a = H.extend, c = H.fireEvent, p = H.isArray, i = H.isFunction, h = H.isNumber, s = H.isString, t = H.merge, o = H.objectEach, n = H.pick, A = H.pInt, _ = H.syncTimeout, D = H.uniqueKey;
- return y = function() {
- function W() {
- this.element = void 0, this.onEvents = {}, this.opacity = 1, this.renderer = void 0, this.SVG_NS = f, this.symbolCustomAttribs = "x y width height r start end innerR anchorX anchorY rounded".split(" ");
- }
- return W.prototype._defaultGetter = function(P) {
- return P = n(this[P + "Value"], this[P], this.element ? this.element.getAttribute(P) : null, 0), /^[\-0-9\.]+$/.test(P) && (P = parseFloat(P)), P;
- }, W.prototype._defaultSetter = function(P, X, g) {
- g.setAttribute(X, P);
- }, W.prototype.add = function(P) {
- var X = this.renderer, g = this.element;
- if (P && (this.parentGroup = P), this.parentInverted = P && P.inverted, typeof this.textStr < "u" && this.element.nodeName === "text" && X.buildText(this), this.added = !0, !P || P.handleZ || this.zIndex)
- var m = this.zIndexSetter();
- return m || (P ? P.element : X.box).appendChild(g), this.onAdd && this.onAdd(), this;
- }, W.prototype.addClass = function(P, X) {
- var g = X ? "" : this.attr("class") || "";
- return P = (P || "").split(/ /g).reduce(function(m, L) {
- return g.indexOf(L) === -1 && m.push(L), m;
- }, g ? [g] : []).join(" "), P !== g && this.attr("class", P), this;
- }, W.prototype.afterSetters = function() {
- this.doTransform && (this.updateTransform(), this.doTransform = !1);
- }, W.prototype.align = function(P, X, g) {
- var m = {}, L = this.renderer, Y = L.alignedObjects, V, Q, k;
- P ? (this.alignOptions = P, this.alignByTranslate = X, (!g || s(g)) && (this.alignTo = V = g || "renderer", v(Y, this), Y.push(this), g = void 0)) : (P = this.alignOptions, X = this.alignByTranslate, V = this.alignTo), g = n(g, L[V], V === "scrollablePlotBox" ? L.plotBox : void 0, L), V = P.align;
- var G = P.verticalAlign;
- return L = (g.x || 0) + (P.x || 0), Y = (g.y || 0) + (P.y || 0), V === "right" ? Q = 1 : V === "center" && (Q = 2), Q && (L += (g.width - (P.width || 0)) / Q), m[X ? "translateX" : "x"] = Math.round(L), G === "bottom" ? k = 1 : G === "middle" && (k = 2), k && (Y += (g.height - (P.height || 0)) / k), m[X ? "translateY" : "y"] = Math.round(Y), this[this.placed ? "animate" : "attr"](m), this.placed = !0, this.alignAttr = m, this;
- }, W.prototype.alignSetter = function(P) {
- var X = { left: "start", center: "middle", right: "end" };
- X[P] && (this.alignValue = P, this.element.setAttribute(
- "text-anchor",
- X[P]
- ));
- }, W.prototype.animate = function(P, X, g) {
- var m = this, L = F(n(X, this.renderer.globalAnimation, !0));
- return X = L.defer, n(b.hidden, b.msHidden, b.webkitHidden, !1) && (L.duration = 0), L.duration !== 0 ? (g && (L.complete = g), _(function() {
- m.element && U(m, P, L);
- }, X)) : (this.attr(P, void 0, g), o(P, function(Y, V) {
- L.step && L.step.call(this, Y, { prop: V, pos: 1, elem: this });
- }, this)), this;
- }, W.prototype.applyTextOutline = function(P) {
- var X = this.element;
- P.indexOf("contrast") !== -1 && (P = P.replace(/contrast/g, this.renderer.getContrast(X.style.fill)));
- var g = P.split(" ");
- if (P = g[g.length - 1], (g = g[0]) && g !== "none" && Z.svg) {
- this.fakeTS = !0, this.ySetter = this.xSetter, g = g.replace(/(^[\d\.]+)(.*?)$/g, function(Y, V, Q) {
- return 2 * Number(V) + Q;
- }), this.removeTextOutline();
- var m = b.createElementNS(f, "tspan");
- B(m, { class: "highcharts-text-outline", fill: P, stroke: P, "stroke-width": g, "stroke-linejoin": "round" }), [].forEach.call(X.childNodes, function(Y) {
- var V = Y.cloneNode(!0);
- V.removeAttribute && ["fill", "stroke", "stroke-width", "stroke"].forEach(function(Q) {
- return V.removeAttribute(Q);
- }), m.appendChild(V);
- });
- var L = b.createElementNS(f, "tspan");
- L.textContent = "", ["x", "y"].forEach(function(Y) {
- var V = X.getAttribute(Y);
- V && L.setAttribute(Y, V);
- }), m.appendChild(L), X.insertBefore(m, X.firstChild);
- }
- }, W.prototype.attr = function(P, X, g, m) {
- var L = this.element, Y = this.symbolCustomAttribs, V, Q = this, k, G;
- if (typeof P == "string" && typeof X < "u") {
- var z = P;
- P = {}, P[z] = X;
- }
- return typeof P == "string" ? Q = (this[P + "Getter"] || this._defaultGetter).call(this, P, L) : (o(P, function($, q) {
- k = !1, m || R(this, q), this.symbolName && Y.indexOf(q) !== -1 && (V || (this.symbolAttr(P), V = !0), k = !0), !this.rotation || q !== "x" && q !== "y" || (this.doTransform = !0), k || (G = this[q + "Setter"] || this._defaultSetter, G.call(this, $, q, L), !this.styledMode && this.shadows && /^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(q) && this.updateShadows(q, $, G));
- }, this), this.afterSetters()), g && g.call(this), Q;
- }, W.prototype.clip = function(P) {
- return this.attr("clip-path", P ? "url(" + this.renderer.url + "#" + P.id + ")" : "none");
- }, W.prototype.crisp = function(P, X) {
- X = X || P.strokeWidth || 0;
- var g = Math.round(X) % 2 / 2;
- return P.x = Math.floor(P.x || this.x || 0) + g, P.y = Math.floor(P.y || this.y || 0) + g, P.width = Math.floor((P.width || this.width || 0) - 2 * g), P.height = Math.floor((P.height || this.height || 0) - 2 * g), w(P.strokeWidth) && (P.strokeWidth = X), P;
- }, W.prototype.complexColor = function(P, X, g) {
- var m = this.renderer, L, Y, V, Q, k, G, z, $, q, it, et = [], nt;
- c(this.renderer, "complexColor", { args: arguments }, function() {
- if (P.radialGradient ? Y = "radialGradient" : P.linearGradient && (Y = "linearGradient"), Y) {
- if (V = P[Y], k = m.gradients, G = P.stops, q = g.radialReference, p(V) && (P[Y] = V = { x1: V[0], y1: V[1], x2: V[2], y2: V[3], gradientUnits: "userSpaceOnUse" }), Y === "radialGradient" && q && !w(V.gradientUnits) && (Q = V, V = t(V, m.getRadialAttr(q, Q), { gradientUnits: "userSpaceOnUse" })), o(V, function(ct, gt) {
- gt !== "id" && et.push(gt, ct);
- }), o(G, function(ct) {
- et.push(ct);
- }), et = et.join(","), k[et])
- it = k[et].attr("id");
- else {
- V.id = it = D();
- var rt = k[et] = m.createElement(Y).attr(V).add(m.defs);
- rt.radAttr = Q, rt.stops = [], G.forEach(function(ct) {
- ct[1].indexOf("rgba") === 0 ? (L = I.parse(ct[1]), z = L.get("rgb"), $ = L.get("a")) : (z = ct[1], $ = 1), ct = m.createElement("stop").attr({
- offset: ct[0],
- "stop-color": z,
- "stop-opacity": $
- }).add(rt), rt.stops.push(ct);
- });
- }
- nt = "url(" + m.url + "#" + it + ")", g.setAttribute(X, nt), g.gradient = et, P.toString = function() {
- return nt;
- };
- }
- });
- }, W.prototype.css = function(P) {
- var X = this.styles, g = {}, m = this.element, L = ["textOutline", "textOverflow", "width"], Y = "", V = !X;
- if (P && P.color && (P.fill = P.color), X && o(P, function(G, z) {
- X && X[z] !== G && (g[z] = G, V = !0);
- }), V) {
- if (X && (P = a(X, g)), P) {
- if (P.width === null || P.width === "auto")
- delete this.textWidth;
- else if (m.nodeName.toLowerCase() === "text" && P.width)
- var Q = this.textWidth = A(P.width);
- }
- if (this.styles = P, Q && !u && this.renderer.forExport && delete P.width, m.namespaceURI === this.SVG_NS) {
- var k = function(G, z) {
- return "-" + z.toLowerCase();
- };
- o(P, function(G, z) {
- L.indexOf(z) === -1 && (Y += z.replace(/([A-Z])/g, k) + ":" + G + ";");
- }), Y && B(m, "style", Y);
- } else
- S(m, P);
- this.added && (this.element.nodeName === "text" && this.renderer.buildText(this), P && P.textOutline && this.applyTextOutline(P.textOutline));
- }
- return this;
- }, W.prototype.dashstyleSetter = function(P) {
- var X = this["stroke-width"];
- if (X === "inherit" && (X = 1), P = P && P.toLowerCase()) {
- var g = P.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 (P = g.length; P--; )
- g[P] = "" + A(g[P]) * n(X, NaN);
- P = g.join(",").replace(/NaN/g, "none"), this.element.setAttribute("stroke-dasharray", P);
- }
- }, W.prototype.destroy = function() {
- var P = this, X = P.element || {}, g = P.renderer, m = X.ownerSVGElement, L = g.isSVG && X.nodeName === "SPAN" && P.parentGroup || void 0;
- if (X.onclick = X.onmouseout = X.onmouseover = X.onmousemove = X.point = null, R(P), P.clipPath && m) {
- var Y = P.clipPath;
- [].forEach.call(m.querySelectorAll("[clip-path],[CLIP-PATH]"), function(V) {
- -1 < V.getAttribute("clip-path").indexOf(Y.element.id) && V.removeAttribute("clip-path");
- }), P.clipPath = Y.destroy();
- }
- if (P.stops) {
- for (m = 0; m < P.stops.length; m++)
- P.stops[m].destroy();
- P.stops.length = 0, P.stops = void 0;
- }
- for (P.safeRemoveChild(X), g.styledMode || P.destroyShadows(); L && L.div && L.div.childNodes.length === 0; )
- X = L.parentGroup, P.safeRemoveChild(L.div), delete L.div, L = X;
- P.alignTo && v(g.alignedObjects, P), o(P, function(V, Q) {
- P[Q] && P[Q].parentGroup === P && P[Q].destroy && P[Q].destroy(), delete P[Q];
- });
- }, W.prototype.destroyShadows = function() {
- (this.shadows || []).forEach(function(P) {
- this.safeRemoveChild(P);
- }, this), this.shadows = void 0;
- }, W.prototype.destroyTextPath = function(P, X) {
- var g = P.getElementsByTagName("text")[0];
- if (g) {
- if (g.removeAttribute("dx"), g.removeAttribute("dy"), X.element.setAttribute("id", ""), this.textPathWrapper && g.getElementsByTagName("textPath").length) {
- for (P = this.textPathWrapper.element.childNodes; P.length; )
- g.appendChild(P[0]);
- g.removeChild(this.textPathWrapper.element);
- }
- } else
- (P.getAttribute("dx") || P.getAttribute("dy")) && (P.removeAttribute("dx"), P.removeAttribute("dy"));
- this.textPathWrapper && (this.textPathWrapper = this.textPathWrapper.destroy());
- }, W.prototype.dSetter = function(P, X, g) {
- p(P) && (typeof P[0] == "string" && (P = this.renderer.pathToSegments(P)), this.pathArray = P, P = P.reduce(function(m, L, Y) {
- return L && L.join ? (Y ? m + " " : "") + L.join(" ") : (L || "").toString();
- }, "")), /(NaN| {2}|^$)/.test(P) && (P = "M 0 0"), this[X] !== P && (g.setAttribute(X, P), this[X] = P);
- }, W.prototype.fadeOut = function(P) {
- var X = this;
- X.animate({ opacity: 0 }, { duration: n(P, 150), complete: function() {
- X.attr({ y: -9999 }).hide();
- } });
- }, W.prototype.fillSetter = function(P, X, g) {
- typeof P == "string" ? g.setAttribute(X, P) : P && this.complexColor(P, X, g);
- }, W.prototype.getBBox = function(P, X) {
- var g = this.renderer, m = this.element, L = this.styles, Y = this.textStr, V = g.cache, Q = g.cacheKeys, k = m.namespaceURI === this.SVG_NS;
- X = n(X, this.rotation, 0);
- var G = g.styledMode ? m && W.prototype.getStyle.call(m, "font-size") : L && L.fontSize, z;
- if (w(Y)) {
- var $ = Y.toString();
- $.indexOf("<") === -1 && ($ = $.replace(/[0-9]/g, "0")), $ += ["", X, G, this.textWidth, L && L.textOverflow, L && L.fontWeight].join();
- }
- if ($ && !P && (z = V[$]), !z) {
- if (k || g.forExport) {
- try {
- var q = this.fakeTS && function(it) {
- var et = m.querySelector(".highcharts-text-outline");
- et && S(et, { display: it });
- };
- i(q) && q("none"), z = m.getBBox ? a({}, m.getBBox()) : { width: m.offsetWidth, height: m.offsetHeight }, i(q) && q("");
- } catch {
- }
- (!z || 0 > z.width) && (z = {
- width: 0,
- height: 0
- });
- } else
- z = this.htmlGetBBox();
- if (g.isSVG && (P = z.width, g = z.height, k && (z.height = g = { "11px,17": 14, "13px,20": 16 }[(G || "") + "," + Math.round(g)] || g), X && (k = X * N, z.width = Math.abs(g * Math.sin(k)) + Math.abs(P * Math.cos(k)), z.height = Math.abs(g * Math.cos(k)) + Math.abs(P * Math.sin(k)))), $ && (Y === "" || 0 < z.height)) {
- for (; 250 < Q.length; )
- delete V[Q.shift()];
- V[$] || Q.push($), V[$] = z;
- }
- }
- return z;
- }, W.prototype.getStyle = function(P) {
- return E.getComputedStyle(this.element || this, "").getPropertyValue(P);
- }, W.prototype.hasClass = function(P) {
- return ("" + this.attr("class")).split(" ").indexOf(P) !== -1;
- }, W.prototype.hide = function(P) {
- return P ? 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(P, X) {
- this.element = X === "span" ? M(X) : b.createElementNS(this.SVG_NS, X), this.renderer = P, c(this, "afterInit");
- }, W.prototype.invert = function(P) {
- return this.inverted = P, this.updateTransform(), this;
- }, W.prototype.on = function(P, X) {
- var g = this.onEvents;
- return g[P] && g[P](), g[P] = O(
- this.element,
- P,
- X
- ), this;
- }, W.prototype.opacitySetter = function(P, X, g) {
- this.opacity = P = Number(Number(P).toFixed(3)), g.setAttribute(X, P);
- }, W.prototype.removeClass = function(P) {
- return this.attr("class", ("" + this.attr("class")).replace(s(P) ? new RegExp("(^| )" + P + "( |$)") : P, " ").replace(/ +/g, " ").trim());
- }, W.prototype.removeTextOutline = function() {
- var P = this.element.querySelector("tspan.highcharts-text-outline");
- P && this.safeRemoveChild(P);
- }, W.prototype.safeRemoveChild = function(P) {
- var X = P.parentNode;
- X && X.removeChild(P);
- }, W.prototype.setRadialReference = function(P) {
- var X = this.element.gradient && this.renderer.gradients[this.element.gradient];
- return this.element.radialReference = P, X && X.radAttr && X.animate(this.renderer.getRadialAttr(P, X.radAttr)), this;
- }, W.prototype.setTextPath = function(P, X) {
- var g = this.element, m = this.text ? this.text.element : g, L = { textAnchor: "text-anchor" }, Y = !1, V = this.textPathWrapper, Q = !V;
- X = t(!0, { enabled: !0, attributes: { dy: -5, startOffset: "50%", textAnchor: "middle" } }, X);
- var k = j.filterUserAttributes(X.attributes);
- if (P && X && X.enabled) {
- V && V.element.parentNode === null ? (Q = !0, V = V.destroy()) : V && this.removeTextOutline.call(V.parentGroup), this.options && this.options.padding && (k.dx = -this.options.padding), V || (this.textPathWrapper = V = this.renderer.createElement("textPath"), Y = !0);
- var G = V.element;
- if ((X = P.element.getAttribute("id")) || P.element.setAttribute("id", X = D()), Q)
- for (m.setAttribute("y", 0), h(k.dx) && m.setAttribute("x", -k.dx), P = [].slice.call(m.childNodes), Q = 0; Q < P.length; Q++) {
- var z = P[Q];
- z.nodeType !== E.Node.TEXT_NODE && z.nodeName !== "tspan" || G.appendChild(z);
- }
- Y && V && V.add({ element: m }), G.setAttributeNS("http://www.w3.org/1999/xlink", "href", this.renderer.url + "#" + X), w(k.dy) && (G.parentNode.setAttribute("dy", k.dy), delete k.dy), w(k.dx) && (G.parentNode.setAttribute("dx", k.dx), delete k.dx), o(k, function($, q) {
- G.setAttribute(L[q] || q, $);
- }), g.removeAttribute("transform"), this.removeTextOutline.call(V), this.text && !this.renderer.styledMode && this.attr({ fill: "none", "stroke-width": 0 }), this.applyTextOutline = this.updateTransform = x;
- } else
- V && (delete this.updateTransform, delete this.applyTextOutline, this.destroyTextPath(g, P), this.updateTransform(), this.options && this.options.rotation && this.applyTextOutline(this.options.style.textOutline));
- return this;
- }, W.prototype.shadow = function(P, X, g) {
- var m = [], L = this.element, Y = this.oldShadowOptions, V = { color: "#000000", offsetX: this.parentInverted ? -1 : 1, offsetY: this.parentInverted ? -1 : 1, opacity: 0.15, width: 3 }, Q = !1, k;
- if (P === !0 ? k = V : typeof P == "object" && (k = a(V, P)), k && (k && Y && o(k, function(it, et) {
- it !== Y[et] && (Q = !0);
- }), Q && this.destroyShadows(), this.oldShadowOptions = k), !k)
- this.destroyShadows();
- else if (!this.shadows) {
- var G = k.opacity / k.width, z = this.parentInverted ? "translate(" + k.offsetY + ", " + k.offsetX + ")" : "translate(" + k.offsetX + ", " + k.offsetY + ")";
- for (V = 1; V <= k.width; V++) {
- var $ = L.cloneNode(!1), q = 2 * k.width + 1 - 2 * V;
- B($, { stroke: P.color || "#000000", "stroke-opacity": G * V, "stroke-width": q, transform: z, fill: "none" }), $.setAttribute("class", ($.getAttribute("class") || "") + " highcharts-shadow"), g && (B($, "height", Math.max(B($, "height") - q, 0)), $.cutHeight = q), X ? X.element.appendChild($) : L.parentNode && L.parentNode.insertBefore($, L), m.push($);
- }
- this.shadows = m;
- }
- return this;
- }, W.prototype.show = function(P) {
- return this.attr({ visibility: P ? "inherit" : "visible" });
- }, W.prototype.strokeSetter = function(P, X, g) {
- this[X] = P, 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" && P === 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 P = this.getStyle("stroke-width"), X = 0;
- if (P.indexOf("px") === P.length - 2)
- X = A(P);
- else if (P !== "") {
- var g = b.createElementNS(f, "rect");
- B(g, { width: P, "stroke-width": 0 }), this.element.parentNode.appendChild(g), X = g.getBBox().width, g.parentNode.removeChild(g);
- }
- return X;
- }, W.prototype.symbolAttr = function(P) {
- var X = this;
- "x y r start end width height innerR anchorX anchorY clockwise".split(" ").forEach(function(g) {
- X[g] = n(P[g], X[g]);
- }), X.attr({ d: X.renderer.symbols[X.symbolName](X.x, X.y, X.width, X.height, X) });
- }, W.prototype.textSetter = function(P) {
- P !== this.textStr && (delete this.textPxLength, this.textStr = P, this.added && this.renderer.buildText(this));
- }, W.prototype.titleSetter = function(P) {
- var X = this.element, g = X.getElementsByTagName("title")[0] || b.createElementNS(this.SVG_NS, "title");
- X.insertBefore ? X.insertBefore(g, X.firstChild) : X.appendChild(g), g.textContent = String(n(P, "")).replace(/<[^>]*>/g, "").replace(/</g, "<").replace(
- />/g,
- ">"
- );
- }, W.prototype.toFront = function() {
- var P = this.element;
- return P.parentNode.appendChild(P), this;
- }, W.prototype.translate = function(P, X) {
- return this.attr({ translateX: P, translateY: X });
- }, W.prototype.updateShadows = function(P, X, g) {
- var m = this.shadows;
- if (m)
- for (var L = m.length; L--; )
- g.call(m[L], P === "height" ? Math.max(X - (m[L].cutHeight || 0), 0) : P === "d" ? this.d : X, P, m[L]);
- }, W.prototype.updateTransform = function() {
- var P = this.scaleX, X = this.scaleY, g = this.inverted, m = this.rotation, L = this.matrix, Y = this.element, V = this.translateX || 0, Q = this.translateY || 0;
- g && (V += this.width, Q += this.height), V = ["translate(" + V + "," + Q + ")"], w(L) && V.push("matrix(" + L.join(",") + ")"), g ? V.push("rotate(90) scale(-1,1)") : m && V.push("rotate(" + m + " " + n(this.rotationOriginX, Y.getAttribute("x"), 0) + " " + n(this.rotationOriginY, Y.getAttribute("y") || 0) + ")"), (w(P) || w(X)) && V.push("scale(" + n(P, 1) + " " + n(X, 1) + ")"), V.length && Y.setAttribute("transform", V.join(" "));
- }, W.prototype.visibilitySetter = function(P, X, g) {
- P === "inherit" ? g.removeAttribute(X) : this[X] !== P && g.setAttribute(
- X,
- P
- ), this[X] = P;
- }, W.prototype.xGetter = function(P) {
- return this.element.nodeName === "circle" && (P === "x" ? P = "cx" : P === "y" && (P = "cy")), this._defaultGetter(P);
- }, W.prototype.zIndexSetter = function(P, X) {
- var g = this.renderer, m = this.parentGroup, L = (m || g).element || g.box, Y = this.element;
- g = L === g.box;
- var V = !1, Q = this.added, k;
- if (w(P) ? (Y.setAttribute("data-z-index", P), P = +P, this[X] === P && (Q = !1)) : w(this[X]) && Y.removeAttribute("data-z-index"), this[X] = P, Q) {
- for ((P = this.zIndex) && m && (m.handleZ = !0), X = L.childNodes, k = X.length - 1; 0 <= k && !V; k--) {
- m = X[k], Q = m.getAttribute("data-z-index");
- var G = !w(Q);
- m !== Y && (0 > P && G && !g && !k ? (L.insertBefore(Y, X[k]), V = !0) : (A(Q) <= P || G && (!w(P) || 0 <= P)) && (L.insertBefore(Y, X[k + 1] || null), V = !0));
- }
- V || (L.insertBefore(Y, X[g ? 3 : 0] || null), V = !0);
- }
- return V;
- }, 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, P) {
- this[P] = W, this.doTransform = !0;
- }, y;
- }), T(l, "Core/Renderer/RendererRegistry.js", [l["Core/Globals.js"]], function(y) {
- var j;
- return function(I) {
- I.rendererTypes = {};
- var Z;
- I.getRendererType = function(H) {
- return H === void 0 && (H = Z), I.rendererTypes[H] || I.rendererTypes[Z];
- }, I.registerRendererType = function(H, U, F) {
- I.rendererTypes[H] = U, (!Z || F) && (Z = H, y.Renderer = U);
- };
- }(j || (j = {})), j;
- }), T(
- l,
- "Core/Renderer/SVG/SVGLabel.js",
- [l["Core/Renderer/SVG/SVGElement.js"], l["Core/Utilities.js"]],
- function(y, j) {
- var I = this && this.__extends || function() {
- var b = function(x, u) {
- return b = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(f, E) {
- f.__proto__ = E;
- } || function(f, E) {
- for (var O in E)
- E.hasOwnProperty(O) && (f[O] = E[O]);
- }, b(x, u);
- };
- return function(x, u) {
- function f() {
- this.constructor = x;
- }
- b(x, u), x.prototype = u === null ? Object.create(u) : (f.prototype = u.prototype, new f());
- };
- }(), Z = j.defined, H = j.extend, U = j.isNumber, F = j.merge, R = j.pick, N = j.removeEvent;
- return function(b) {
- function x(u, f, E, O, B, M, S, w, v, a) {
- var c = b.call(this) || this;
- c.paddingLeftSetter = c.paddingSetter, c.paddingRightSetter = c.paddingSetter, c.init(u, "g"), c.textStr = f, c.x = E, c.y = O, c.anchorX = M, c.anchorY = S, c.baseline = v, c.className = a, c.addClass(a === "button" ? "highcharts-no-tooltip" : "highcharts-label"), a && c.addClass("highcharts-" + a), c.text = u.text(void 0, 0, 0, w).attr({ zIndex: 1 });
- var p;
- return typeof B == "string" && ((p = /^url\((.*?)\)$/.test(B)) || c.renderer.symbols[B]) && (c.symbolKey = B), c.bBox = x.emptyBBox, c.padding = 3, c.baselineOffset = 0, c.needsBox = u.styledMode || p, c.deferredAttr = {}, c.alignFactor = 0, c;
- }
- return I(x, b), x.prototype.alignSetter = function(u) {
- u = { left: 0, center: 0.5, right: 1 }[u], u !== this.alignFactor && (this.alignFactor = u, this.bBox && U(this.xSetting) && this.attr({ x: this.xSetting }));
- }, x.prototype.anchorXSetter = function(u, f) {
- this.anchorX = u, this.boxAttr(f, Math.round(u) - this.getCrispAdjust() - this.xSetting);
- }, x.prototype.anchorYSetter = function(u, f) {
- this.anchorY = u, this.boxAttr(f, u - this.ySetting);
- }, x.prototype.boxAttr = function(u, f) {
- this.box ? this.box.attr(u, f) : this.deferredAttr[u] = f;
- }, x.prototype.css = function(u) {
- if (u) {
- var f = {};
- u = F(u), x.textProps.forEach(function(O) {
- typeof u[O] < "u" && (f[O] = u[O], delete u[O]);
- }), this.text.css(f);
- var E = "width" in f;
- "fontSize" in f || "fontWeight" in f ? this.updateTextPadding() : E && this.updateBoxSize();
- }
- return y.prototype.css.call(this, u);
- }, x.prototype.destroy = function() {
- N(this.element, "mouseenter"), N(this.element, "mouseleave"), this.text && this.text.destroy(), this.box && (this.box = this.box.destroy()), y.prototype.destroy.call(this);
- }, x.prototype.fillSetter = function(u, f) {
- u && (this.needsBox = !0), this.fill = u, this.boxAttr(f, u);
- }, x.prototype.getBBox = function() {
- this.textStr && this.bBox.width === 0 && this.bBox.height === 0 && this.updateBoxSize();
- var u = this.padding, f = R(this.paddingLeft, u);
- return { width: this.width, height: this.height, x: this.bBox.x - f, y: this.bBox.y - u };
- }, 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(u) {
- this.heightSetting = u;
- }, x.prototype.onAdd = function() {
- var u = this.textStr;
- this.text.add(this), this.attr({ text: Z(u) ? u : "", x: this.x, y: this.y }), this.box && Z(this.anchorX) && this.attr({ anchorX: this.anchorX, anchorY: this.anchorY });
- }, x.prototype.paddingSetter = function(u, f) {
- U(u) ? u !== this[f] && (this[f] = u, this.updateTextPadding()) : this[f] = void 0;
- }, x.prototype.rSetter = function(u, f) {
- this.boxAttr(f, u);
- }, x.prototype.shadow = function(u) {
- return u && !this.renderer.styledMode && (this.updateBoxSize(), this.box && this.box.shadow(u)), this;
- }, x.prototype.strokeSetter = function(u, f) {
- this.stroke = u, this.boxAttr(f, u);
- }, x.prototype["stroke-widthSetter"] = function(u, f) {
- u && (this.needsBox = !0), this["stroke-width"] = u, this.boxAttr(f, u);
- }, x.prototype["text-alignSetter"] = function(u) {
- this.textAlign = u;
- }, x.prototype.textSetter = function(u) {
- typeof u < "u" && this.text.attr({ text: u }), this.updateTextPadding();
- }, x.prototype.updateBoxSize = function() {
- var u = this.text.element.style, f = {}, E = this.padding, O = this.bBox = U(this.widthSetting) && U(this.heightSetting) && !this.textAlign || !Z(this.text.textStr) ? x.emptyBBox : this.text.getBBox();
- this.width = this.getPaddedWidth(), this.height = (this.heightSetting || O.height || 0) + 2 * E, u = this.renderer.fontMetrics(u && u.fontSize, this.text), this.baselineOffset = E + Math.min((this.text.firstLineMetrics || u).b, O.height || 1 / 0), this.heightSetting && (this.baselineOffset += (this.heightSetting - u.h) / 2), this.needsBox && (this.box || (E = this.box = this.symbolKey ? this.renderer.symbol(this.symbolKey) : this.renderer.rect(), E.addClass((this.className === "button" ? "" : "highcharts-label-box") + (this.className ? " highcharts-" + this.className + "-box" : "")), E.add(this)), E = this.getCrispAdjust(), f.x = E, f.y = (this.baseline ? -this.baselineOffset : 0) + E, f.width = Math.round(this.width), f.height = Math.round(this.height), this.box.attr(H(f, this.deferredAttr)), this.deferredAttr = {});
- }, x.prototype.updateTextPadding = function() {
- var u = this.text;
- this.updateBoxSize();
- var f = this.baseline ? 0 : this.baselineOffset, E = R(this.paddingLeft, this.padding);
- Z(this.widthSetting) && this.bBox && (this.textAlign === "center" || this.textAlign === "right") && (E += { center: 0.5, right: 1 }[this.textAlign] * (this.widthSetting - this.bBox.width)), (E !== u.x || f !== u.y) && (u.attr("x", E), u.hasBoxWidthChanged && (this.bBox = u.getBBox(!0)), typeof f < "u" && u.attr("y", f)), u.x = E, u.y = f;
- }, x.prototype.widthSetter = function(u) {
- this.widthSetting = U(u) ? u : void 0;
- }, x.prototype.getPaddedWidth = function() {
- var u = this.padding, f = R(this.paddingLeft, u);
- return u = R(this.paddingRight, u), (this.widthSetting || this.bBox.width || 0) + f + u;
- }, x.prototype.xSetter = function(u) {
- this.x = u, this.alignFactor && (u -= this.alignFactor * this.getPaddedWidth(), this["forceAnimate:x"] = !0), this.xSetting = Math.round(u), this.attr("translateX", this.xSetting);
- }, x.prototype.ySetter = function(u) {
- this.ySetting = this.y = Math.round(u), 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);
- }
- ), T(
- l,
- "Core/Renderer/SVG/Symbols.js",
- [l["Core/Utilities.js"]],
- function(y) {
- function j(R, N, b, x, u) {
- var f = [];
- if (u) {
- var E = u.start || 0, O = F(u.r, b);
- b = F(u.r, x || b);
- var B = (u.end || 0) - 1e-3;
- x = u.innerR;
- var M = F(u.open, 1e-3 > Math.abs((u.end || 0) - E - 2 * Math.PI)), S = Math.cos(E), w = Math.sin(E), v = Math.cos(B), a = Math.sin(B);
- E = F(u.longArc, 1e-3 > B - E - Math.PI ? 0 : 1), f.push(["M", R + O * S, N + b * w], ["A", O, b, 0, E, F(u.clockwise, 1), R + O * v, N + b * a]), H(x) && f.push(M ? ["M", R + x * v, N + x * a] : ["L", R + x * v, N + x * a], ["A", x, x, 0, E, H(u.clockwise) ? 1 - u.clockwise : 0, R + x * S, N + x * w]), M || f.push(["Z"]);
- }
- return f;
- }
- function I(R, N, b, x, u) {
- return u && u.r ? Z(R, N, b, x, u) : [["M", R, N], ["L", R + b, N], ["L", R + b, N + x], ["L", R, N + x], ["Z"]];
- }
- function Z(R, N, b, x, u) {
- return u = u && u.r || 0, [["M", R + u, N], ["L", R + b - u, N], ["C", R + b, N, R + b, N, R + b, N + u], ["L", R + b, N + x - u], ["C", R + b, N + x, R + b, N + x, R + b - u, N + x], ["L", R + u, N + x], ["C", R, N + x, R, N + x, R, N + x - u], ["L", R, N + u], ["C", R, N, R, N, R + u, N]];
- }
- var H = y.defined, U = y.isNumber, F = y.pick;
- return { arc: j, callout: function(R, N, b, x, u) {
- var f = Math.min(u && u.r || 0, b, x), E = f + 6, O = u && u.anchorX;
- u = u && u.anchorY || 0;
- var B = Z(R, N, b, x, { r: f });
- return U(O) && (R + O >= b ? u > N + E && u < N + x - E ? B.splice(3, 1, ["L", R + b, u - 6], ["L", R + b + 6, u], ["L", R + b, u + 6], ["L", R + b, N + x - f]) : B.splice(3, 1, ["L", R + b, x / 2], ["L", O, u], ["L", R + b, x / 2], ["L", R + b, N + x - f]) : 0 >= R + O ? u > N + E && u < N + x - E ? B.splice(7, 1, ["L", R, u + 6], ["L", R - 6, u], ["L", R, u - 6], ["L", R, N + f]) : B.splice(7, 1, ["L", R, x / 2], ["L", O, u], ["L", R, x / 2], ["L", R, N + f]) : u && u > x && O > R + E && O < R + b - E ? B.splice(5, 1, ["L", O + 6, N + x], ["L", O, N + x + 6], ["L", O - 6, N + x], ["L", R + f, N + x]) : u && 0 > u && O > R + E && O < R + b - E && B.splice(1, 1, ["L", O - 6, N], ["L", O, N - 6], ["L", O + 6, N], ["L", b - f, N])), B;
- }, circle: function(R, N, b, x) {
- return j(R + b / 2, N + x / 2, b / 2, x / 2, { start: 0.5 * Math.PI, end: 2.5 * Math.PI, open: !1 });
- }, diamond: function(R, N, b, x) {
- return [["M", R + b / 2, N], ["L", R + b, N + x / 2], ["L", R + b / 2, N + x], ["L", R, N + x / 2], ["Z"]];
- }, rect: I, roundedRect: Z, square: I, triangle: function(R, N, b, x) {
- return [["M", R + b / 2, N], ["L", R + b, N + x], ["L", R, N + x], ["Z"]];
- }, "triangle-down": function(R, N, b, x) {
- return [["M", R, N], ["L", R + b, N], ["L", R + b / 2, N + x], ["Z"]];
- } };
- }
- ), T(l, "Core/Renderer/SVG/TextBuilder.js", [l["Core/Renderer/HTML/AST.js"], l["Core/Globals.js"], l["Core/Utilities.js"]], function(y, j, I) {
- var Z = j.doc, H = j.SVG_NS, U = j.win, F = I.attr, R = I.isString, N = I.objectEach, b = I.pick;
- return function() {
- function x(u) {
- var f = u.styles;
- this.renderer = u.renderer, this.svgElement = u, this.width = u.textWidth, this.textLineHeight = f && f.lineHeight, this.textOutline = f && f.textOutline, this.ellipsis = !(!f || f.textOverflow !== "ellipsis"), this.noWrap = !(!f || f.whiteSpace !== "nowrap"), this.fontSize = f && f.fontSize;
- }
- return x.prototype.buildSVG = function() {
- var u = this.svgElement, f = u.element, E = u.renderer, O = b(u.textStr, "").toString(), B = O.indexOf("<") !== -1, M = f.childNodes;
- E = this.width && !u.added && E.box;
- var S = /<br.*?>/g, w = [O, this.ellipsis, this.noWrap, this.textLineHeight, this.textOutline, this.fontSize, this.width].join();
- if (w !== u.textCache) {
- for (u.textCache = w, delete u.actualWidth, w = M.length; w--; )
- f.removeChild(M[w]);
- B || this.ellipsis || this.width || O.indexOf(" ") !== -1 && (!this.noWrap || S.test(O)) ? O !== "" && (E && E.appendChild(f), O = new y(O), this.modifyTree(O.nodes), O.addToDOM(u.element), this.modifyDOM(), this.ellipsis && (f.textContent || "").indexOf("…") !== -1 && u.attr(
- "title",
- this.unescapeEntities(u.textStr || "", ["<", ">"])
- ), E && E.removeChild(f)) : f.appendChild(Z.createTextNode(this.unescapeEntities(O))), R(this.textOutline) && u.applyTextOutline && u.applyTextOutline(this.textOutline);
- }
- }, x.prototype.modifyDOM = function() {
- var u = this, f = this.svgElement, E = F(f.element, "x");
- f.firstLineMetrics = void 0;
- for (var O; (O = f.element.firstChild) && /^[\s\u200B]*$/.test(O.textContent || " "); )
- f.element.removeChild(O);
- [].forEach.call(f.element.querySelectorAll("tspan.highcharts-br"), function(w, v) {
- w.nextSibling && w.previousSibling && (v === 0 && w.previousSibling.nodeType === 1 && (f.firstLineMetrics = f.renderer.fontMetrics(void 0, w.previousSibling)), F(w, { dy: u.getLineHeight(w.nextSibling), x: E }));
- });
- var B = this.width || 0;
- if (B) {
- var M = function(w, v) {
- var a = w.textContent || "", c = a.replace(/([^\^])-/g, "$1- ").split(" "), p = !u.noWrap && (1 < c.length || 1 < f.element.childNodes.length), i = u.getLineHeight(v), h = 0, s = f.actualWidth;
- if (u.ellipsis)
- a && u.truncate(w, a, void 0, 0, Math.max(0, B - parseInt(u.fontSize || 12, 10)), function(t, o) {
- return t.substring(
- 0,
- o
- ) + "…";
- });
- else if (p) {
- for (a = [], p = []; v.firstChild && v.firstChild !== w; )
- p.push(v.firstChild), v.removeChild(v.firstChild);
- for (; c.length; )
- c.length && !u.noWrap && 0 < h && (a.push(w.textContent || ""), w.textContent = c.join(" ").replace(/- /g, "-")), u.truncate(w, void 0, c, h === 0 && s || 0, B, function(t, o) {
- return c.slice(0, o).join(" ").replace(/- /g, "-");
- }), s = f.actualWidth, h++;
- p.forEach(function(t) {
- v.insertBefore(t, w);
- }), a.forEach(function(t) {
- v.insertBefore(Z.createTextNode(t), w), t = Z.createElementNS(H, "tspan"), t.textContent = "", F(t, { dy: i, x: E }), v.insertBefore(t, w);
- });
- }
- }, S = function(w) {
- [].slice.call(w.childNodes).forEach(function(v) {
- v.nodeType === U.Node.TEXT_NODE ? M(v, w) : (v.className.baseVal.indexOf("highcharts-br") !== -1 && (f.actualWidth = 0), S(v));
- });
- };
- S(f.element);
- }
- }, x.prototype.getLineHeight = function(u) {
- var f;
- return u = u.nodeType === U.Node.TEXT_NODE ? u.parentElement : u, this.renderer.styledMode || (f = u && /(px|em)$/.test(u.style.fontSize) ? u.style.fontSize : this.fontSize || this.renderer.style.fontSize || 12), this.textLineHeight ? parseInt(
- this.textLineHeight.toString(),
- 10
- ) : this.renderer.fontMetrics(f, u || this.svgElement.element).h;
- }, x.prototype.modifyTree = function(u) {
- var f = this, E = function(O, B) {
- var M = O.attributes;
- M = M === void 0 ? {} : M;
- var S = O.children, w = O.tagName, v = f.renderer.styledMode;
- w === "b" || w === "strong" ? v ? M.class = "highcharts-strong" : M.style = "font-weight:bold;" + (M.style || "") : (w === "i" || w === "em") && (v ? M.class = "highcharts-emphasized" : M.style = "font-style:italic;" + (M.style || "")), R(M.style) && (M.style = M.style.replace(/(;| |^)color([ :])/, "$1fill$2")), w === "br" ? (M.class = "highcharts-br", O.textContent = "", (B = u[B + 1]) && B.textContent && (B.textContent = B.textContent.replace(/^ +/gm, ""))) : w === "a" && S && S.some(function(a) {
- return a.tagName === "#text";
- }) && (O.children = [{ children: S, tagName: "tspan" }]), w !== "#text" && w !== "a" && (O.tagName = "tspan"), O.attributes = M, S && S.filter(function(a) {
- return a.tagName !== "#text";
- }).forEach(E);
- };
- u.forEach(E);
- }, x.prototype.truncate = function(u, f, E, O, B, M) {
- var S = this.svgElement, w = S.renderer, v = S.rotation, a = [], c = E ? 1 : 0, p = (f || E || "").length, i = p, h, s = function(o, n) {
- n = n || o;
- var A = u.parentNode;
- if (A && typeof a[n] > "u")
- if (A.getSubStringLength)
- try {
- a[n] = O + A.getSubStringLength(0, E ? n + 1 : n);
- } catch {
- }
- else
- w.getSpanWidth && (u.textContent = M(f || E, o), a[n] = O + w.getSpanWidth(S, u));
- return a[n];
- };
- S.rotation = 0;
- var t = s(u.textContent.length);
- if (O + t > B) {
- for (; c <= p; )
- i = Math.ceil((c + p) / 2), E && (h = M(E, i)), t = s(i, h && h.length - 1), c === p ? c = p + 1 : t > B ? p = i - 1 : c = i;
- p === 0 ? u.textContent = "" : f && p === f.length - 1 || (u.textContent = h || M(f || E, i));
- }
- E && E.splice(0, i), S.actualWidth = t, S.rotation = v;
- }, x.prototype.unescapeEntities = function(u, f) {
- return N(this.renderer.escapes, function(E, O) {
- f && f.indexOf(E) !== -1 || (u = u.toString().replace(new RegExp(E, "g"), O));
- }), u;
- }, x;
- }();
- }), T(l, "Core/Renderer/SVG/SVGRenderer.js", [l["Core/Renderer/HTML/AST.js"], l["Core/Color/Color.js"], l["Core/Globals.js"], l["Core/Renderer/RendererRegistry.js"], l["Core/Renderer/SVG/SVGElement.js"], l["Core/Renderer/SVG/SVGLabel.js"], l["Core/Renderer/SVG/Symbols.js"], l["Core/Renderer/SVG/TextBuilder.js"], l["Core/Utilities.js"]], function(y, j, I, Z, H, U, F, R, N) {
- var b = I.charts, x = I.deg2rad, u = I.doc, f = I.isFirefox, E = I.isMS, O = I.isWebKit, B = I.noop, M = I.SVG_NS, S = I.symbolSizes, w = I.win, v = N.addEvent, a = N.attr, c = N.createElement, p = N.css, i = N.defined, h = N.destroyObjectProperties, s = N.extend, t = N.isArray, o = N.isNumber, n = N.isObject, A = N.isString, _ = N.merge, D = N.pick, W = N.pInt, P = N.uniqueKey, X;
- return I = function() {
- function g(m, L, Y, V, Q, k, G) {
- 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, Y, V, Q, k, G);
- }
- return g.prototype.init = function(m, L, Y, V, Q, k, G) {
- var z = this.createElement("svg").attr({ version: "1.1", class: "highcharts-root" }), $ = z.element;
- G || z.css(this.getStyle(V)), m.appendChild($), a(m, "dir", "ltr"), m.innerHTML.indexOf("xmlns") === -1 && a($, "xmlns", this.SVG_NS), this.isSVG = !0, this.box = $, this.boxWrapper = z, this.alignedObjects = [], this.url = this.getReferenceURL(), this.createElement("desc").add().element.appendChild(u.createTextNode("Created with Highcharts 9.3.3")), this.defs = this.createElement("defs").add(), this.allowHTML = k, this.forExport = Q, this.styledMode = G, this.gradients = {}, this.cache = {}, this.cacheKeys = [], this.imgCount = 0, this.setSize(L, Y, !1);
- var q;
- f && m.getBoundingClientRect && (L = function() {
- p(m, { left: 0, top: 0 }), q = m.getBoundingClientRect(), p(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 ((f || O) && u.getElementsByTagName("base").length) {
- if (!i(X)) {
- var m = P();
- 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(u.body), p(m, { position: "fixed", top: 0, left: 0, zIndex: 9e5 });
- var L = u.elementFromPoint(6, 6);
- X = (L && L.id) === "hitme", u.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 = s({ 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(), h(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 = j.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, Y, V, Q, k, G, z, $, q) {
- var it = this.label(m, L, Y, $, 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, k = _(rt, { fill: "#e6e6e6" }, y.filterUserAttributes(k || {}));
- var gt = k.style;
- delete k.style, G = _(rt, { fill: "#e6ebf5", style: { color: "#000000", fontWeight: "bold" } }, y.filterUserAttributes(G || {}));
- var dt = G.style;
- delete G.style, z = _(rt, { style: { color: "#cccccc" } }, y.filterUserAttributes(z || {}));
- var ht = z.style;
- delete z.style;
- }
- return v(it.element, E ? "mouseover" : "mouseenter", function() {
- nt !== 3 && it.setState(1);
- }), v(it.element, E ? "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, k, G, z][at || 0]).css([ct, gt, dt, ht][at || 0]);
- }, et || it.attr(rt).css(s({ cursor: "default" }, ct)), it.on("touchstart", function(at) {
- return at.stopPropagation();
- }).on("click", function(at) {
- nt !== 3 && V.call(it, at);
- });
- }, g.prototype.crispLine = function(m, L, Y) {
- Y === void 0 && (Y = "round");
- var V = m[0], Q = m[1];
- return i(V[1]) && V[1] === Q[1] && (V[1] = Q[1] = Math[Y](V[1]) - L % 2 / 2), i(V[2]) && V[2] === Q[2] && (V[2] = Q[2] = Math[Y](V[2]) + L % 2 / 2), m;
- }, g.prototype.path = function(m) {
- var L = this.styledMode ? {} : { fill: "none" };
- return t(m) ? L.d = m : n(m) && s(L, m), this.createElement("path").attr(L);
- }, g.prototype.circle = function(m, L, Y) {
- return m = n(m) ? m : typeof m > "u" ? {} : { x: m, y: L, r: Y }, L = this.createElement("circle"), L.xSetter = L.ySetter = function(V, Q, k) {
- k.setAttribute("c" + Q, V);
- }, L.attr(m);
- }, g.prototype.arc = function(m, L, Y, V, Q, k) {
- return n(m) ? (V = m, L = V.y, Y = V.r, m = V.x) : V = { innerR: V, start: Q, end: k }, m = this.symbol("arc", m, L, Y, Y, V), m.r = Y, m;
- }, g.prototype.rect = function(m, L, Y, V, Q, k) {
- Q = n(m) ? m.r : Q;
- var G = this.createElement("rect");
- return m = n(m) ? m : typeof m > "u" ? {} : { x: m, y: L, width: Math.max(Y, 0), height: Math.max(V, 0) }, this.styledMode || (typeof k < "u" && (m["stroke-width"] = k, m = G.crisp(m)), m.fill = "none"), Q && (m.r = Q), G.rSetter = function(z, $, q) {
- G.r = z, a(q, { rx: z, ry: z });
- }, G.rGetter = function() {
- return G.r || 0;
- }, G.attr(m);
- }, g.prototype.setSize = function(m, L, Y) {
- 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: D(
- Y,
- !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, Y, V, Q, k) {
- var G = { preserveAspectRatio: "none" }, z = function(q, it) {
- q.setAttributeNS ? q.setAttributeNS("http://www.w3.org/1999/xlink", "href", it) : q.setAttribute("hc-svg-href", it);
- };
- o(L) && (G.x = L), o(Y) && (G.y = Y), o(V) && (G.width = V), o(Q) && (G.height = Q);
- var $ = this.createElement("image").attr(G);
- return L = function(q) {
- z($.element, m), k.call($, q);
- }, k ? (z(
- $.element,
- "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="
- ), Y = new w.Image(), v(Y, "load", L), Y.src = m, Y.complete && L({})) : z($.element, m), $;
- }, g.prototype.symbol = function(m, L, Y, V, Q, k) {
- var G = this, z = /^url\((.*?)\)$/, $ = z.test(m), q = !$ && (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(Y || 0), V || 0, Q || 0, k));
- var nt = this.path(et);
- G.styledMode || nt.attr("fill", "none"), s(nt, { symbolName: q || void 0, x: L, y: Y, width: V, height: Q }), k && s(nt, k);
- } else if ($) {
- var rt = m.match(z)[1], ct = nt = this.image(rt);
- ct.imgwidth = D(S[rt] && S[rt].width, k && k.width), ct.imgheight = D(S[rt] && S[rt].height, k && k.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) && (k && k.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: Y }), ct.isImg = !0, i(ct.imgwidth) && i(ct.imgheight) ? gt(ct) : (ct.attr({ width: 0, height: 0 }), c("img", { onload: function() {
- var dt = b[G.chartIndex];
- this.width === 0 && (p(this, { position: "absolute", top: "-999em" }), u.body.appendChild(this)), S[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), G.imgCount--, !G.imgCount && dt && !dt.hasLoaded && dt.onload();
- }, src: rt }), this.imgCount++);
- }
- return nt;
- }, g.prototype.clipRect = function(m, L, Y, V) {
- var Q = P() + "-", k = this.createElement("clipPath").attr({ id: Q }).add(this.defs);
- return m = this.rect(m, L, Y, V, 0).add(k), m.id = Q, m.clipPath = k, m.count = 0, m;
- }, g.prototype.text = function(m, L, Y, V) {
- var Q = {};
- return V && (this.allowHTML || !this.forExport) ? this.html(m, L, Y) : (Q.x = Math.round(L || 0), Y && (Q.y = Math.round(Y)), i(m) && (Q.text = m), m = this.createElement("text").attr(Q), (!V || this.forExport && !this.allowHTML) && (m.xSetter = function(k, G, z) {
- for (var $ = z.getElementsByTagName("tspan"), q = z.getAttribute(G), it = 0, et; it < $.length; it++)
- et = $[it], et.getAttribute(G) === q && et.setAttribute(G, k);
- z.setAttribute(G, k);
- }), 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, Y) {
- var V = m;
- return L && Y && (V = Math.max(V * Math.cos(L * x), 4)), { x: -m / 3 * Math.sin(L * x), y: V };
- }, g.prototype.pathToSegments = function(m) {
- for (var L = [], Y = [], V = { A: 8, C: 7, H: 2, L: 3, M: 3, Q: 5, S: 5, T: 3, V: 2 }, Q = 0; Q < m.length; Q++)
- A(Y[0]) && o(m[Q]) && Y.length === V[Y[0].toUpperCase()] && m.splice(Q, 0, Y[0].replace("M", "L").replace("m", "l")), typeof m[Q] == "string" && (Y.length && L.push(Y.slice(0)), Y.length = 0), Y.push(m[Q]);
- return L.push(Y.slice(0)), L;
- }, g.prototype.label = function(m, L, Y, V, Q, k, G, z, $) {
- return new U(this, m, L, Y, V, Q, k, G, z, $);
- }, g.prototype.alignElements = function() {
- this.alignedObjects.forEach(function(m) {
- return m.align();
- });
- }, g;
- }(), s(I.prototype, { Element: H, SVG_NS: M, escapes: { "&": "&", "<": "<", ">": ">", "'": "'", '"': """ }, symbols: F, draw: B }), Z.registerRendererType("svg", I, !0), I;
- }), T(l, "Core/Renderer/HTML/HTMLElement.js", [l["Core/Globals.js"], l["Core/Renderer/SVG/SVGElement.js"], l["Core/Utilities.js"]], function(y, j, I) {
- var Z = this && this.__extends || function() {
- var E = function(O, B) {
- return E = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(M, S) {
- M.__proto__ = S;
- } || function(M, S) {
- for (var w in S)
- S.hasOwnProperty(w) && (M[w] = S[w]);
- }, E(O, B);
- };
- return function(O, B) {
- function M() {
- this.constructor = O;
- }
- E(O, B), O.prototype = B === null ? Object.create(B) : (M.prototype = B.prototype, new M());
- };
- }(), H = y.isFirefox, U = y.isMS, F = y.isWebKit, R = y.win, N = I.css, b = I.defined, x = I.extend, u = I.pick, f = I.pInt;
- return function(E) {
- function O() {
- return E !== null && E.apply(this, arguments) || this;
- }
- return Z(O, E), O.compose = function(B) {
- if (O.composedClasses.indexOf(B) === -1) {
- O.composedClasses.push(B);
- var M = O.prototype, S = B.prototype;
- S.getSpanCorrection = M.getSpanCorrection, S.htmlCss = M.htmlCss, S.htmlGetBBox = M.htmlGetBBox, S.htmlUpdateTransform = M.htmlUpdateTransform, S.setSpanRotation = M.setSpanRotation;
- }
- return B;
- }, O.prototype.getSpanCorrection = function(B, M, S) {
- this.xCorr = -B * S, this.yCorr = -M;
- }, O.prototype.htmlCss = function(B) {
- var M = this.element.tagName === "SPAN" && B && "width" in B, S = u(M && B.width, void 0);
- if (M) {
- delete B.width, this.textWidth = S;
- var w = !0;
- }
- return B && B.textOverflow === "ellipsis" && (B.whiteSpace = "nowrap", B.overflow = "hidden"), this.styles = x(this.styles, B), N(this.element, B), w && this.htmlUpdateTransform(), this;
- }, O.prototype.htmlGetBBox = function() {
- var B = this.element;
- return { x: B.offsetLeft, y: B.offsetTop, width: B.offsetWidth, height: B.offsetHeight };
- }, O.prototype.htmlUpdateTransform = function() {
- if (this.added) {
- var B = this.renderer, M = this.element, S = this.translateX || 0, w = this.translateY || 0, v = this.x || 0, a = this.y || 0, c = this.textAlign || "left", p = { left: 0, center: 0.5, right: 1 }[c], i = this.styles;
- if (i = i && i.whiteSpace, N(M, { marginLeft: S, marginTop: w }), !B.styledMode && this.shadows && this.shadows.forEach(function(A) {
- N(A, { marginLeft: S + 1, marginTop: w + 1 });
- }), this.inverted && [].forEach.call(M.childNodes, function(A) {
- B.invertChild(A, M);
- }), M.tagName === "SPAN") {
- var h = this.rotation, s = this.textWidth && f(this.textWidth), t = [h, c, M.innerHTML, this.textWidth, this.textAlign].join(), o = void 0;
- if (o = !1, s !== this.oldTextWidth) {
- if (this.textPxLength)
- var n = this.textPxLength;
- else
- N(M, { width: "", whiteSpace: i || "nowrap" }), n = M.offsetWidth;
- (s > this.oldTextWidth || n > s) && (/[ \-]/.test(M.textContent || M.innerText) || M.style.textOverflow === "ellipsis") && (N(M, { width: n > s || h ? s + "px" : "auto", display: "block", whiteSpace: i || "normal" }), this.oldTextWidth = s, o = !0);
- }
- this.hasBoxWidthChanged = o, t !== this.cTT && (o = B.fontMetrics(M.style.fontSize, M).b, !b(h) || h === (this.oldRotation || 0) && c === this.oldAlign || this.setSpanRotation(h, p, o), this.getSpanCorrection(!b(h) && this.textPxLength || M.offsetWidth, o, p, h, c)), N(M, { left: v + (this.xCorr || 0) + "px", top: a + (this.yCorr || 0) + "px" }), this.cTT = t, this.oldRotation = h, this.oldAlign = c;
- }
- } else
- this.alignOnAdd = !0;
- }, O.prototype.setSpanRotation = function(B, M, S) {
- var w = {}, v = U && !/Edge/.test(R.navigator.userAgent) ? "-ms-transform" : F ? "-webkit-transform" : H ? "MozTransform" : R.opera ? "-o-transform" : void 0;
- v && (w[v] = w.transform = "rotate(" + B + "deg)", w[v + (H ? "Origin" : "-origin")] = w.transformOrigin = 100 * M + "% " + S + "px", N(this.element, w));
- }, O.composedClasses = [], O;
- }(j);
- }), T(
- l,
- "Core/Renderer/HTML/HTMLRenderer.js",
- [l["Core/Renderer/HTML/AST.js"], l["Core/Renderer/SVG/SVGElement.js"], l["Core/Renderer/SVG/SVGRenderer.js"], l["Core/Utilities.js"]],
- function(y, j, I, Z) {
- var H = this && this.__extends || function() {
- var b = function(x, u) {
- return b = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(f, E) {
- f.__proto__ = E;
- } || function(f, E) {
- for (var O in E)
- E.hasOwnProperty(O) && (f[O] = E[O]);
- }, b(x, u);
- };
- return function(x, u) {
- function f() {
- this.constructor = x;
- }
- b(x, u), x.prototype = u === null ? Object.create(u) : (f.prototype = u.prototype, new f());
- };
- }(), U = Z.attr, F = Z.createElement, R = Z.extend, N = Z.pick;
- return function(b) {
- function x() {
- return b !== null && b.apply(this, arguments) || this;
- }
- return H(x, b), x.compose = function(u) {
- return x.composedClasses.indexOf(u) === -1 && (x.composedClasses.push(u), u.prototype.html = x.prototype.html), u;
- }, x.prototype.html = function(u, f, E) {
- var O = this.createElement("span"), B = O.element, M = O.renderer, S = M.isSVG, w = function(v, a) {
- ["opacity", "visibility"].forEach(function(c) {
- v[c + "Setter"] = function(p, i, h) {
- var s = v.div ? v.div.style : a;
- j.prototype[c + "Setter"].call(this, p, i, h), s && (s[i] = p);
- };
- }), v.addedSetters = !0;
- };
- return O.textSetter = function(v) {
- v !== this.textStr && (delete this.bBox, delete this.oldTextWidth, y.setElementHTML(this.element, N(v, "")), this.textStr = v, O.doTransform = !0);
- }, S && w(O, O.element.style), O.xSetter = O.ySetter = O.alignSetter = O.rotationSetter = function(v, a) {
- a === "align" ? O.alignValue = O.textAlign = v : O[a] = v, O.doTransform = !0;
- }, O.afterSetters = function() {
- this.doTransform && (this.htmlUpdateTransform(), this.doTransform = !1);
- }, O.attr({ text: u, x: Math.round(f), y: Math.round(E) }).css({ position: "absolute" }), M.styledMode || O.css({ fontFamily: this.style.fontFamily, fontSize: this.style.fontSize }), B.style.whiteSpace = "nowrap", O.css = O.htmlCss, S && (O.add = function(v) {
- var a = M.box.parentNode, c = [];
- if (this.parentGroup = v) {
- var p = v.div;
- if (!p) {
- for (; v; )
- c.push(v), v = v.parentGroup;
- c.reverse().forEach(function(i) {
- function h(n, A) {
- i[A] = n, A === "translateX" ? o.left = n + "px" : o.top = n + "px", i.doTransform = !0;
- }
- var s = U(i.element, "class"), t = i.styles || {};
- p = i.div = i.div || F("div", s ? { className: s } : 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
- }, p || a);
- var o = p.style;
- R(i, { classSetter: function(n) {
- return function(A) {
- this.element.setAttribute("class", A), n.className = A;
- };
- }(p), on: function() {
- return c[0].div && O.on.apply({ element: c[0].div, onEvents: i.onEvents }, arguments), i;
- }, translateXSetter: h, translateYSetter: h }), i.addedSetters || w(i);
- });
- }
- } else
- p = a;
- return p.appendChild(B), O.added = !0, O.alignOnAdd && O.htmlUpdateTransform(), O;
- }), O;
- }, x.composedClasses = [], x;
- }(I);
- }
- ), T(l, "Core/Axis/AxisDefaults.js", [], function() {
- var y;
- return function(j) {
- j.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" }, j.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 I = this.axis.chart.numberFormatter;
- return I(this.total, -1);
- },
- style: { color: "#000000", fontSize: "11px", fontWeight: "bold", textOutline: "1px contrast" }
- }, gridLineWidth: 1, lineWidth: 0 }, j.defaultLeftAxisOptions = { labels: { x: -15 }, title: { rotation: 270 } }, j.defaultRightAxisOptions = { labels: { x: 15 }, title: { rotation: 90 } }, j.defaultBottomAxisOptions = { labels: { autoRotation: [-45], x: 0 }, margin: 15, title: { rotation: 0 } }, j.defaultTopAxisOptions = { labels: { autoRotation: [-45], x: 0 }, margin: 15, title: { rotation: 0 } };
- }(y || (y = {})), y;
- }), T(l, "Core/Foundation.js", [l["Core/Utilities.js"]], function(y) {
- var j = y.addEvent, I = y.isFunction, Z = y.objectEach, H = y.removeEvent, U;
- return function(F) {
- F.registerEventOptions = function(R, N) {
- R.eventOptions = R.eventOptions || {}, Z(N.events, function(b, x) {
- R.eventOptions[x] !== b && (R.eventOptions[x] && (H(R, x, R.eventOptions[x]), delete R.eventOptions[x]), I(b) && (R.eventOptions[x] = b, j(R, x, b)));
- });
- };
- }(U || (U = {})), U;
- }), T(
- l,
- "Core/Axis/Tick.js",
- [l["Core/FormatUtilities.js"], l["Core/Globals.js"], l["Core/Utilities.js"]],
- function(y, j, I) {
- var Z = j.deg2rad, H = I.clamp, U = I.correctFloat, F = I.defined, R = I.destroyObjectProperties, N = I.extend, b = I.fireEvent, x = I.isNumber, u = I.merge, f = I.objectEach, E = I.pick;
- return j = function() {
- function O(B, M, S, w, v) {
- this.isNewLabel = this.isNew = !0, this.axis = B, this.pos = M, this.type = S || "", this.parameters = v || {}, this.tickmarkOffset = this.parameters.tickmarkOffset, this.options = this.parameters.options, b(this, "init"), S || w || this.addLabel();
- }
- return O.prototype.addLabel = function() {
- var B = this, M = B.axis, S = M.options, w = M.chart, v = M.categories, a = M.logarithmic, c = M.names, p = B.pos, i = E(B.options && B.options.labels, S.labels), h = M.tickPositions, s = p === h[0], t = p === h[h.length - 1], o = (!i.step || i.step === 1) && M.tickInterval === 1;
- h = h.info;
- var n = B.label, A;
- if (v = this.parameters.category || (v ? E(v[p], c[p], p) : p), a && x(v) && (v = U(a.lin2log(v))), M.dateTime)
- if (h)
- var _ = w.time.resolveDTLFormat(S.dateTimeLabelFormats[!S.grid && h.higherRanks[p] || h.unitName]), D = _.main;
- else
- x(v) && (D = M.dateTime.getXDateFormat(v, S.dateTimeLabelFormats || {}));
- B.isFirst = s, B.isLast = t;
- var W = {
- axis: M,
- chart: w,
- dateTimeLabelFormat: D,
- isFirst: s,
- isLast: t,
- pos: p,
- tick: B,
- tickPositionInfo: h,
- value: v
- };
- b(this, "labelFormat", W);
- var P = function(g) {
- return i.formatter ? i.formatter.call(g, g) : i.format ? (g.text = M.defaultLabelFormatter.call(g), y.format(i.format, g, w)) : M.defaultLabelFormatter.call(g, g);
- };
- S = P.call(W, W);
- var X = _ && _.list;
- B.shortenLabel = X ? function() {
- for (A = 0; A < X.length; A++)
- if (N(W, { dateTimeLabelFormat: X[A] }), n.attr({ text: P.call(W, W) }), n.getBBox().width < M.getSlotWidth(B) - 2 * i.padding)
- return;
- n.attr({ text: "" });
- } : void 0, o && M._addedPlotLB && B.moveLabel(S, i), F(n) || B.movedLabel ? n && n.textStr !== S && !o && (!n.textWidth || i.style.width || n.styles.width || n.css({ width: null }), n.attr({ text: S }), n.textPxLength = n.getBBox().width) : (B.label = n = B.createLabel({ x: 0, y: 0 }, S, i), B.rotation = 0);
- }, O.prototype.createLabel = function(B, M, S) {
- var w = this.axis, v = w.chart;
- return (B = F(M) && S.enabled ? v.renderer.text(M, B.x, B.y, S.useHTML).add(w.labelGroup) : null) && (v.styledMode || B.css(u(S.style)), B.textPxLength = B.getBBox().width), B;
- }, O.prototype.destroy = function() {
- R(
- this,
- this.axis
- );
- }, O.prototype.getPosition = function(B, M, S, w) {
- var v = this.axis, a = v.chart, c = w && a.oldChartHeight || a.chartHeight;
- return B = { x: B ? U(v.translate(M + S, null, null, w) + v.transB) : v.left + v.offset + (v.opposite ? (w && a.oldChartWidth || a.chartWidth) - v.right - v.left : 0), y: B ? c - v.bottom + v.offset - (v.opposite ? v.height : 0) : U(c - v.translate(M + S, null, null, w) - v.transB) }, B.y = H(B.y, -1e5, 1e5), b(this, "afterGetPosition", { pos: B }), B;
- }, O.prototype.getLabelPosition = function(B, M, S, w, v, a, c, p) {
- var i = this.axis, h = i.transA, s = i.isLinked && i.linkedParent ? i.linkedParent.reversed : i.reversed, t = i.staggerLines, o = i.tickRotCorr || { x: 0, y: 0 }, n = w || i.reserveSpaceDefault ? 0 : -i.labelOffset * (i.labelAlign === "center" ? 0.5 : 1), A = {}, _ = v.y;
- return F(_) || (_ = i.side === 0 ? S.rotation ? -8 : -S.getBBox().height : i.side === 2 ? o.y + 8 : Math.cos(S.rotation * Z) * (o.y - S.getBBox(!1, 0).height / 2)), B = B + v.x + n + o.x - (a && w ? a * h * (s ? -1 : 1) : 0), M = M + _ - (a && !w ? a * h * (s ? 1 : -1) : 0), t && (S = c / (p || 1) % t, i.opposite && (S = t - S - 1), M += i.labelOffset / t * S), A.x = B, A.y = Math.round(M), b(this, "afterGetLabelPosition", { pos: A, tickmarkOffset: a, index: c }), A;
- }, O.prototype.getLabelSize = function() {
- return this.label ? this.label.getBBox()[this.axis.horiz ? "height" : "width"] : 0;
- }, O.prototype.getMarkPath = function(B, M, S, w, v, a) {
- return a.crispLine([["M", B, M], ["L", B + (v ? 0 : -S), M + (v ? S : 0)]], w);
- }, O.prototype.handleOverflow = function(B) {
- var M = this.axis, S = M.options.labels, w = B.x, v = M.chart.chartWidth, a = M.chart.spacing, c = E(M.labelLeft, Math.min(M.pos, a[3]));
- a = E(M.labelRight, Math.max(M.isRadial ? 0 : M.pos + M.len, v - a[1]));
- var p = this.label, i = this.rotation, h = { left: 0, center: 0.5, right: 1 }[M.labelAlign || p.attr("align")], s = p.getBBox().width, t = M.getSlotWidth(this), o = {}, n = t, A = 1, _;
- i || S.overflow !== "justify" ? 0 > i && w - h * s < c ? _ = Math.round(w / Math.cos(i * Z) - c) : 0 < i && w + h * s > a && (_ = Math.round((v - w) / Math.cos(i * Z))) : (v = w + (1 - h) * s, w - h * s < c ? n = B.x + n * (1 - h) - c : v > a && (n = a - B.x + n * h, A = -1), n = Math.min(t, n), n < t && M.labelAlign === "center" && (B.x += A * (t - n - h * (t - Math.min(s, n)))), (s > n || M.autoRotation && (p.styles || {}).width) && (_ = n)), _ && (this.shortenLabel ? this.shortenLabel() : (o.width = Math.floor(_) + "px", (S.style || {}).textOverflow || (o.textOverflow = "ellipsis"), p.css(o)));
- }, O.prototype.moveLabel = function(B, M) {
- var S = this, w = S.label, v = S.axis, a = v.reversed, c = !1;
- if (w && w.textStr === B ? (S.movedLabel = w, c = !0, delete S.label) : f(v.ticks, function(i) {
- c || i.isNew || i === S || !i.label || i.label.textStr !== B || (S.movedLabel = i.label, c = !0, i.labelPos = S.movedLabel.xy, delete i.label);
- }), !c && (S.labelPos || w)) {
- var p = S.labelPos || w.xy;
- w = v.horiz ? a ? 0 : v.width + v.left : p.x, v = v.horiz ? p.y : a ? v.width + v.left : 0, S.movedLabel = S.createLabel({ x: w, y: v }, B, M), S.movedLabel && S.movedLabel.attr({ opacity: 0 });
- }
- }, O.prototype.render = function(B, M, S) {
- var w = this.axis, v = w.horiz, a = this.pos, c = E(this.tickmarkOffset, w.tickmarkOffset);
- a = this.getPosition(v, a, c, M), c = a.x;
- var p = a.y;
- w = v && c === w.pos + w.len || !v && p === w.pos ? -1 : 1, v = E(S, this.label && this.label.newOpacity, 1), S = E(S, 1), this.isActive = !0, this.renderGridLine(M, S, w), this.renderMark(a, S, w), this.renderLabel(a, M, v, B), this.isNew = !1, b(this, "afterRender");
- }, O.prototype.renderGridLine = function(B, M, S) {
- var w = this.axis, v = w.options, a = {}, c = this.pos, p = this.type, i = E(
- this.tickmarkOffset,
- w.tickmarkOffset
- ), h = w.chart.renderer, s = this.gridLine, t = v.gridLineWidth, o = v.gridLineColor, n = v.gridLineDashStyle;
- this.type === "minor" && (t = v.minorGridLineWidth, o = v.minorGridLineColor, n = v.minorGridLineDashStyle), s || (w.chart.styledMode || (a.stroke = o, a["stroke-width"] = t || 0, a.dashstyle = n), p || (a.zIndex = 1), B && (M = 0), this.gridLine = s = h.path().attr(a).addClass("highcharts-" + (p ? p + "-" : "") + "grid-line").add(w.gridGroup)), s && (S = w.getPlotLinePath({ value: c + i, lineWidth: s.strokeWidth() * S, force: "pass", old: B })) && s[B || this.isNew ? "attr" : "animate"]({ d: S, opacity: M });
- }, O.prototype.renderMark = function(B, M, S) {
- var w = this.axis, v = w.options, a = w.chart.renderer, c = this.type, p = w.tickSize(c ? c + "Tick" : "tick"), i = B.x;
- B = B.y;
- var h = E(v[c !== "minor" ? "tickWidth" : "minorTickWidth"], !c && w.isXAxis ? 1 : 0);
- v = v[c !== "minor" ? "tickColor" : "minorTickColor"];
- var s = this.mark, t = !s;
- p && (w.opposite && (p[0] = -p[0]), s || (this.mark = s = a.path().addClass("highcharts-" + (c ? c + "-" : "") + "tick").add(w.axisGroup), w.chart.styledMode || s.attr({ stroke: v, "stroke-width": h })), s[t ? "attr" : "animate"]({ d: this.getMarkPath(
- i,
- B,
- p[0],
- s.strokeWidth() * S,
- w.horiz,
- a
- ), opacity: M }));
- }, O.prototype.renderLabel = function(B, M, S, w) {
- var v = this.axis, a = v.horiz, c = v.options, p = this.label, i = c.labels, h = i.step;
- v = E(this.tickmarkOffset, v.tickmarkOffset);
- var s = B.x;
- B = B.y;
- var t = !0;
- p && x(s) && (p.xy = B = this.getLabelPosition(s, B, p, a, i, v, w, h), this.isFirst && !this.isLast && !c.showFirstLabel || this.isLast && !this.isFirst && !c.showLastLabel ? t = !1 : !a || i.step || i.rotation || M || S === 0 || this.handleOverflow(B), h && w % h && (t = !1), t && x(B.y) ? (B.opacity = S, p[this.isNewLabel ? "attr" : "animate"](B), this.isNewLabel = !1) : (p.attr("y", -9999), this.isNewLabel = !0));
- }, O.prototype.replaceMovedLabel = function() {
- var B = this.label, M = this.axis, S = M.reversed;
- if (B && !this.isNew) {
- var w = M.horiz ? S ? M.left : M.width + M.left : B.xy.x;
- S = M.horiz ? B.xy.y : S ? M.width + M.top : M.top, B.animate({ x: w, y: S, opacity: 0 }, void 0, B.destroy), delete this.label;
- }
- M.isDirty = !0, this.label = this.movedLabel, delete this.movedLabel;
- }, O;
- }(), j;
- }
- ), T(l, "Core/Axis/Axis.js", [
- l["Core/Animation/AnimationUtilities.js"],
- l["Core/Axis/AxisDefaults.js"],
- l["Core/Color/Color.js"],
- l["Core/DefaultOptions.js"],
- l["Core/Foundation.js"],
- l["Core/Globals.js"],
- l["Core/Axis/Tick.js"],
- l["Core/Utilities.js"]
- ], function(y, j, I, Z, H, U, F, R) {
- var N = y.animObject, b = Z.defaultOptions, x = H.registerEventOptions, u = U.deg2rad, f = R.arrayMax, E = R.arrayMin, O = R.clamp, B = R.correctFloat, M = R.defined, S = R.destroyObjectProperties, w = R.erase, v = R.error, a = R.extend, c = R.fireEvent, p = R.getMagnitude, i = R.isArray, h = R.isNumber, s = R.isString, t = R.merge, o = R.normalizeTickInterval, n = R.objectEach, A = R.pick, _ = R.relativeLength, D = R.removeEvent, W = R.splat, P = 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"), c(this, "init", { userOptions: m }), this.opposite = A(m.opposite, this.opposite), this.side = A(m.side, this.side, this.horiz ? this.opposite ? 0 : 2 : this.opposite ? 1 : 3), this.setOptions(m);
- var Y = this.options, V = Y.labels, Q = Y.type;
- this.userOptions = m, this.minPixelPadding = 0, this.reversed = A(Y.reversed, this.reversed), this.visible = Y.visible, this.zoomEnabled = Y.zoomEnabled, this.hasNames = Q === "category" || Y.categories === !0, this.categories = Y.categories || this.hasNames, this.names || (this.names = [], this.names.keys = {}), this.plotLinesAndBandsGroups = {}, this.positiveValuesOnly = !!this.logarithmic, this.isLinked = M(Y.linkedTo), this.ticks = {}, this.labelEdge = [], this.minorTicks = {}, this.plotLinesAndBands = [], this.alternateBands = {}, this.len = 0, this.minRange = this.userMinRange = Y.minRange || Y.maxZoom, this.range = Y.range, this.offset = Y.offset || 0, this.min = this.max = null, m = A(Y.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 = h(V.rotation) ? V.rotation : void 0, x(this, Y), c(this, "afterInit");
- }, X.prototype.setOptions = function(g) {
- this.options = t(j.defaultXAxisOptions, this.coll === "yAxis" && j.defaultYAxisOptions, [j.defaultTopAxisOptions, j.defaultRightAxisOptions, j.defaultBottomAxisOptions, j.defaultLeftAxisOptions][this.side], t(b[this.coll], g)), c(this, "afterSetOptions", { userOptions: g });
- }, X.prototype.defaultLabelFormatter = function(g) {
- var m = this.axis;
- g = this.chart.numberFormatter;
- var L = h(this.value) ? this.value : NaN, Y = m.chart.time, V = this.dateTimeLabelFormat, Q = b.lang, k = Q.numericSymbols;
- Q = Q.numericSymbolMagnitude || 1e3;
- var G = m.logarithmic ? Math.abs(L) : m.tickInterval, z = k && k.length;
- if (m.categories)
- var $ = "" + this.value;
- else if (V)
- $ = Y.dateFormat(V, L);
- else if (z && 1e3 <= G)
- for (; z-- && typeof $ > "u"; )
- m = Math.pow(Q, z + 1), G >= m && 10 * L % m === 0 && k[z] !== null && L !== 0 && ($ = g(L / m, -1) + k[z]);
- return typeof $ > "u" && ($ = 1e4 <= Math.abs(L) ? g(L, -1) : g(L, -1, void 0, "")), $;
- }, X.prototype.getSeriesExtremes = function() {
- var g = this, m = g.chart, L;
- c(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(Y) {
- if (Y.visible || !m.options.chart.ignoreHiddenSeries) {
- var V = Y.options, Q = V.threshold;
- if (g.hasVisibleSeries = !0, g.positiveValuesOnly && 0 >= Q && (Q = null), g.isXAxis) {
- if (V = Y.xData, V.length) {
- V = g.logarithmic ? V.filter(g.validatePositiveValue) : V, L = Y.getXExtremes(V);
- var k = L.min, G = L.max;
- h(k) || k instanceof Date || (V = V.filter(h), L = Y.getXExtremes(V), k = L.min, G = L.max), V.length && (g.dataMin = Math.min(A(g.dataMin, k), k), g.dataMax = Math.max(A(g.dataMax, G), G));
- }
- } else
- Y = Y.applyExtremes(), h(Y.dataMin) && (k = Y.dataMin, g.dataMin = Math.min(A(g.dataMin, k), k)), h(Y.dataMax) && (G = Y.dataMax, g.dataMax = Math.max(A(g.dataMax, G), G)), M(Q) && (g.threshold = Q), (!V.softThreshold || g.positiveValuesOnly) && (g.softThreshold = !1);
- }
- });
- }), c(this, "afterGetSeriesExtremes");
- }, X.prototype.translate = function(g, m, L, Y, V, Q) {
- var k = this.linkedParent || this, G = Y && k.old ? k.old.min : k.min, z = k.minPixelPadding;
- V = (k.isOrdinal || k.brokenAxis && k.brokenAxis.hasBreaks || k.logarithmic && V) && k.lin2val;
- var $ = 1, q = 0;
- return Y = Y && k.old ? k.old.transA : k.transA, Y || (Y = k.transA), L && ($ *= -1, q = k.len), k.reversed && ($ *= -1, q -= $ * (k.sector || k.len)), m ? (g = (g * $ + q - z) / Y + G, V && (g = k.lin2val(g))) : (V && (g = k.val2lin(g)), g = h(G) ? $ * (g - G) * Y + q + $ * z + (h(Q) ? Y * 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, Y = L.chart, V = L.left, Q = L.top, k = g.old, G = g.value, z = g.lineWidth, $ = k && Y.oldChartHeight || Y.chartHeight, q = k && Y.oldChartWidth || Y.chartWidth, it = L.transB, et = g.translatedValue, nt = g.force, rt, ct, gt, dt, ht;
- return g = {
- value: G,
- lineWidth: z,
- old: k,
- force: nt,
- acrossPanes: g.acrossPanes,
- translatedValue: et
- }, c(this, "getPlotLinePath", g, function(at) {
- et = A(et, L.translate(G, null, null, k)), et = O(et, -1e5, 1e5), rt = gt = Math.round(et + it), ct = dt = Math.round($ - et - it), h(et) ? L.horiz ? (ct = Q, dt = $ - L.bottom, rt = gt = m(rt, V, V + L.width)) : (rt = V, gt = q - L.right, ct = dt = m(ct, Q, Q + L.height)) : (ht = !0, nt = !1), at.path = ht && !nt ? null : Y.renderer.crispLine([["M", rt, ct], ["L", gt, dt]], z || 1);
- }), g.path;
- }, X.prototype.getLinearTickPositions = function(g, m, L) {
- var Y = B(Math.floor(m / g) * g);
- L = B(Math.ceil(L / g) * g);
- var V = [], Q;
- if (B(Y + g) === Y && (Q = 20), this.single)
- return [m];
- for (m = Y; m <= L && (V.push(m), m = B(m + g, Q), m !== k); )
- var k = m;
- return V;
- }, X.prototype.getMinorTickInterval = function() {
- var g = this.options;
- return g.minorTicks === !0 ? A(g.minorTickInterval, "auto") : g.minorTicks === !1 ? null : g.minorTickInterval;
- }, X.prototype.getMinorTickPositions = function() {
- var g = this.options, m = this.tickPositions, L = this.minorTickInterval, Y = this.pointRangePadding || 0, V = this.min - Y;
- Y = this.max + Y;
- var Q = Y - V, k = [];
- if (Q && Q / L < this.len / 3) {
- var G = this.logarithmic;
- if (G)
- this.paddedTicks.forEach(function(z, $, q) {
- $ && k.push.apply(
- k,
- G.getLogTickPositions(L, q[$ - 1], q[$], !0)
- );
- });
- else if (this.dateTime && this.getMinorTickInterval() === "auto")
- k = k.concat(this.getTimeTicks(this.dateTime.normalizeTimeTickInterval(L), V, Y, g.startOfWeek));
- else
- for (g = V + (m[0] - V) % L; g <= Y && g !== k[0]; g += L)
- k.push(g);
- }
- return k.length !== 0 && this.trimTicks(k), k;
- }, X.prototype.adjustForMinRange = function() {
- var g = this.options, m = this.logarithmic, L = this.min, Y = this.max, V = 0, Q, k, G, z;
- if (this.isXAxis && typeof this.minRange > "u" && !m && (M(g.min) || M(g.max) || M(g.floor) || M(g.ceiling) ? this.minRange = null : (this.series.forEach(function(et) {
- if (G = et.xData, z = et.xIncrement ? 1 : G.length - 1, 1 < G.length)
- for (Q = z; 0 < Q; Q--)
- k = G[Q] - G[Q - 1], (!V || k < V) && (V = k);
- }), this.minRange = Math.min(5 * V, this.dataMax - this.dataMin))), Y - L < this.minRange) {
- var $ = this.dataMax - this.dataMin >= this.minRange, q = this.minRange, it = (q - Y + L) / 2;
- it = [L - it, A(g.min, L - it)], $ && (it[2] = this.logarithmic ? this.logarithmic.log2lin(this.dataMin) : this.dataMin), L = f(it), Y = [L + q, A(g.max, L + q)], $ && (Y[2] = m ? m.log2lin(this.dataMax) : this.dataMax), Y = E(Y), Y - L < q && (it[0] = Y - q, it[1] = A(g.min, Y - q), L = f(it));
- }
- this.min = L, this.max = Y;
- }, X.prototype.getClosest = function() {
- var g;
- return this.categories ? g = 1 : this.series.forEach(function(m) {
- var L = m.closestPointRange, Y = m.visible || !m.chart.options.chart.ignoreHiddenSeries;
- !m.noSharedTooltip && M(L) && Y && (g = M(g) ? Math.min(g, L) : L);
- }), g;
- }, X.prototype.nameToX = function(g) {
- var m = i(this.categories), L = m ? this.categories : this.names, Y = g.options.x;
- if (g.series.requireSorting = !1, M(Y) || (Y = this.options.uniqueNames ? m ? L.indexOf(g.name) : A(L.keys[g.name], -1) : g.series.autoIncrement()), Y === -1) {
- if (!m)
- var V = L.length;
- } else
- V = Y;
- return typeof V < "u" && (this.names[V] = g.name, this.names.keys[g.name] = V), V;
- }, 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(Y, V) {
- if (Y && Y.options && typeof Y.name < "u") {
- var Q = g.nameToX(Y);
- typeof Q < "u" && Q !== Y.x && (Y.x = Q, L.xData[V] = Q);
- }
- });
- }));
- }, X.prototype.setAxisTranslation = function() {
- var g = this, m = g.max - g.min, L = g.linkedParent, Y = !!g.categories, V = g.isXAxis, Q = g.axisPointRange || 0, k = 0, G = 0, z = g.transA;
- if (V || Y || Q) {
- var $ = g.getClosest();
- L ? (k = L.minPointOffset, G = L.pointRangePadding) : g.series.forEach(function(q) {
- var it = Y ? 1 : V ? A(q.options.pointRange, $, 0) : g.axisPointRange || 0, et = q.options.pointPlacement;
- Q = Math.max(Q, it), (!g.single || Y) && (q = q.is("xrange") ? !V : V, k = Math.max(k, q && s(et) ? 0 : it / 2), G = Math.max(G, q && et === "on" ? 0 : it));
- }), L = g.ordinal && g.ordinal.slope && $ ? g.ordinal.slope / $ : 1, g.minPointOffset = k *= L, g.pointRangePadding = G *= L, g.pointRange = Math.min(Q, g.single && Y ? 1 : m), V && (g.closestPointRange = $);
- }
- g.translationSlope = g.transA = z = g.staticScale || g.len / (m + G || 1), g.transB = g.horiz ? g.left : g.bottom, g.minPixelPadding = z * k, c(this, "afterSetAxisTranslation");
- }, X.prototype.minFromRange = function() {
- return this.max - this.range;
- }, X.prototype.setTickInterval = function(g) {
- var m = this.chart, L = this.logarithmic, Y = this.options, V = this.isXAxis, Q = this.isLinked, k = Y.tickPixelInterval, G = this.categories, z = this.softThreshold, $ = Y.maxPadding, q = Y.minPadding, it = h(Y.tickInterval) && 0 <= Y.tickInterval ? Y.tickInterval : void 0, et = h(this.threshold) ? this.threshold : null;
- this.dateTime || G || Q || this.getTickAmount();
- var nt = A(this.userMin, Y.min), rt = A(this.userMax, Y.max);
- if (Q) {
- this.linkedParent = m[this.coll][Y.linkedTo];
- var ct = this.linkedParent.getExtremes();
- this.min = A(ct.min, ct.dataMin), this.max = A(ct.max, ct.dataMax), Y.type !== this.linkedParent.options.type && v(11, 1, m);
- } else {
- if (z && M(et)) {
- if (this.dataMin >= et)
- ct = et, q = 0;
- else if (this.dataMax <= et) {
- var gt = et;
- $ = 0;
- }
- }
- this.min = A(nt, ct, this.dataMin), this.max = A(rt, gt, this.dataMax);
- }
- if (L && (this.positiveValuesOnly && !g && 0 >= Math.min(this.min, A(this.dataMin, this.min)) && v(10, 1, m), this.min = B(L.log2lin(this.min), 16), this.max = B(L.log2lin(this.max), 16)), this.range && M(this.max) && (this.userMin = this.min = nt = Math.max(this.dataMin, this.minFromRange()), this.userMax = rt = this.max, this.range = null), c(this, "foundExtremes"), this.beforePadding && this.beforePadding(), this.adjustForMinRange(), !(G || this.axisPointRange || this.stacking && this.stacking.usePercentage || Q) && M(this.min) && M(this.max) && (m = this.max - this.min) && (!M(nt) && q && (this.min -= m * q), !M(rt) && $ && (this.max += m * $)), h(this.userMin) || (h(Y.softMin) && Y.softMin < this.min && (this.min = nt = Y.softMin), h(Y.floor) && (this.min = Math.max(this.min, Y.floor))), h(this.userMax) || (h(Y.softMax) && Y.softMax > this.max && (this.max = rt = Y.softMax), h(Y.ceiling) && (this.max = Math.min(this.max, Y.ceiling))), z && M(this.dataMin) && (et = et || 0, !M(nt) && this.min < et && this.dataMin >= et ? this.min = this.options.minRange ? Math.min(et, this.max - this.minRange) : et : !M(rt) && this.max > et && this.dataMax <= et && (this.max = this.options.minRange ? Math.max(et, this.min + this.minRange) : et)), h(this.min) && h(this.max) && !this.chart.polar && this.min > this.max && (M(this.options.min) ? this.max = this.min : M(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 && k === this.linkedParent.options.tickPixelInterval ? it = this.linkedParent.tickInterval : A(it, this.tickAmount ? (this.max - this.min) / Math.max(this.tickAmount - 1, 1) : void 0, G ? 1 : (this.max - this.min) * k / Math.max(this.len, k)), V && !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);
- }), c(this, "postProcessData", { hasExtemesChanged: dt });
- }
- this.setAxisTranslation(), c(this, "initialAxisTranslation"), this.pointRange && !it && (this.tickInterval = Math.max(this.pointRange, this.tickInterval)), g = A(Y.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 = o(this.tickInterval, void 0, p(this.tickInterval), A(Y.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(), Y = this.hasVerticalPanning(), V = this.coll === "colorAxis", Q = (V || !Y) && g.startOnTick;
- Y = (V || !Y) && g.endOnTick, V = 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 && M(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, V && (V = V.apply(this, [this.min, this.max]))) && (this.tickPositions = L = V), this.paddedTicks = L.slice(0), this.trimTicks(L, Q, Y), this.isLinked || (this.single && 2 > L.length && !this.categories && !this.series.some(function(k) {
- return k.is("heatmap") && k.options.pointPlacement === "between";
- }) && (this.min -= 0.5, this.max += 0.5), m || V || this.adjustTickAmount()), c(this, "afterSetTickPositions");
- }, X.prototype.trimTicks = function(g, m, L) {
- var Y = g[0], V = g[g.length - 1], Q = !this.isOrdinal && this.minPointOffset || 0;
- if (c(this, "trimTicks"), !this.isLinked) {
- if (m && Y !== -1 / 0)
- this.min = Y;
- else
- for (; this.min - Q > g[0]; )
- g.shift();
- if (L)
- this.max = V;
- else
- for (; this.max + Q < g[g.length - 1]; )
- g.pop();
- g.length === 0 && M(Y) && !this.options.tickPositions && g.push((V + Y) / 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(Y) {
- var V = Y.options;
- V = [Y.horiz ? V.left : V.top, V.width, V.height, V.pane].join(), Y.series.length && (g[V] ? L = !0 : g[V] = 1);
- }), L;
- }, X.prototype.getTickAmount = function() {
- var g = this.options, m = g.tickPixelInterval, L = g.tickAmount;
- !M(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, Y = this.tickAmount, V = this.finalTickAmt, Q = L && L.length, k = A(this.threshold, this.softThreshold ? 0 : null);
- if (this.hasData() && h(this.min) && h(this.max)) {
- if (Q < Y) {
- for (; L.length < Y; )
- L.length % 2 || this.min === k ? L.push(B(L[L.length - 1] + m)) : L.unshift(B(L[0] - m));
- this.transA *= (Q - 1) / (Y - 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 > Y && (this.tickInterval *= 2, this.setTickPositions());
- if (M(V)) {
- for (m = g = L.length; m--; )
- (V === 3 && m % 2 === 1 || 2 >= V && 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(Y) {
- g = g || Y.isDirtyData || Y.isDirty, m = m || Y.xAxis && Y.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), c(this, "afterSetScale");
- }, X.prototype.setExtremes = function(g, m, L, Y, V) {
- var Q = this, k = Q.chart;
- L = A(L, !0), Q.series.forEach(function(G) {
- delete G.kdTree;
- }), V = a(V, { min: g, max: m }), c(Q, "setExtremes", V, function() {
- Q.userMin = g, Q.userMax = m, Q.eventArgs = V, L && k.redraw(Y);
- });
- }, X.prototype.zoom = function(g, m) {
- var L = this, Y = this.dataMin, V = this.dataMax, Q = this.options, k = Math.min(Y, A(Q.min, Y)), G = Math.max(V, A(Q.max, V));
- return g = { newMin: g, newMax: m }, c(this, "zoom", g, function(z) {
- var $ = z.newMin, q = z.newMax;
- ($ !== L.min || q !== L.max) && (L.allowZoomOutside || (M(Y) && ($ < k && ($ = k), $ > G && ($ = G)), M(V) && (q < k && (q = k), q > G && (q = G))), L.displayBtn = typeof $ < "u" || typeof q < "u", L.setExtremes($, q, !1, void 0, { trigger: "zoom" })), z.zoomed = !0;
- }), g.zoomed;
- }, X.prototype.setAxisSize = function() {
- var g = this.chart, m = this.options, L = m.offsets || [0, 0, 0, 0], Y = this.horiz, V = this.width = Math.round(_(A(m.width, g.plotWidth - L[3] + L[1]), g.plotWidth)), Q = this.height = Math.round(_(A(m.height, g.plotHeight - L[0] + L[2]), g.plotHeight)), k = this.top = Math.round(_(A(m.top, g.plotTop + L[0]), g.plotHeight, g.plotTop));
- m = this.left = Math.round(_(A(m.left, g.plotLeft + L[3]), g.plotWidth, g.plotLeft)), this.bottom = g.chartHeight - Q - k, this.right = g.chartWidth - V - m, this.len = Math.max(Y ? V : Q, 0), this.pos = Y ? m : k;
- }, X.prototype.getExtremes = function() {
- var g = this.logarithmic;
- return { min: g ? B(g.lin2log(this.min)) : this.min, max: g ? B(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 = (A(g, 0) - 90 * this.side + 720) % 360;
- return g = { align: "center" }, c(
- 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 = A(m[g === "tick" ? "tickWidth" : "minorTickWidth"], g === "tick" && this.isXAxis && !this.categories ? 1 : 0), Y = m[g === "tick" ? "tickLength" : "minorTickLength"];
- if (L && Y) {
- m[g + "Position"] === "inside" && (Y = -Y);
- var V = [Y, L];
- }
- return g = { tickSize: V }, c(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, Y = this.len / (((this.categories ? 1 : 0) + this.max - this.min) / L), V = g.rotation, Q = this.labelMetrics(), k = Math.max(this.max - this.min, 0), G = function(nt) {
- var rt = nt / (Y || 1);
- return rt = 1 < rt ? Math.ceil(rt) : 1, rt * L > k && nt !== 1 / 0 && Y !== 1 / 0 && k && (rt = Math.ceil(k / L)), B(rt * L);
- }, z = L, $, q, it = Number.MAX_VALUE;
- if (m) {
- if (!g.staggerLines && !g.step)
- if (h(V))
- var et = [V];
- else
- Y < g.autoRotationLimit && (et = g.autoRotation);
- et && et.forEach(function(nt) {
- if (nt === V || nt && -90 <= nt && 90 >= nt) {
- q = G(Math.abs(Q.h / Math.sin(u * nt)));
- var rt = q + Math.abs(nt / 360);
- rt < it && (it = rt, $ = nt, z = q);
- }
- });
- } else
- g.step || (z = G(Q.h));
- return this.autoRotation = et, this.labelRotation = A($, h(V) ? V : 0), z;
- }, X.prototype.getSlotWidth = function(g) {
- var m = this.chart, L = this.horiz, Y = this.options.labels, V = Math.max(this.tickPositions.length - (this.categories ? 0 : 1), 1), Q = m.margin[3];
- if (g && h(g.slotWidth))
- return g.slotWidth;
- if (L && 2 > Y.step)
- return Y.rotation ? 0 : (this.staggerLines || 1) * this.len / V;
- if (!L) {
- if (g = Y.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, Y = this.ticks, V = this.options.labels, Q = V.style, k = this.horiz, G = this.getSlotWidth(), z = Math.max(1, Math.round(G - 2 * V.padding)), $ = {}, q = this.labelMetrics(), it = Q.textOverflow, et = 0;
- if (s(V.rotation) || ($.rotation = V.rotation || 0), L.forEach(function(gt) {
- gt = Y[gt], gt.movedLabel && gt.replaceMovedLabel(), gt && gt.label && gt.label.textPxLength > et && (et = gt.label.textPxLength);
- }), this.maxLabelLength = et, this.autoRotation)
- et > z && et > q.h ? $.rotation = this.labelRotation : this.labelRotation = 0;
- else if (G) {
- var nt = z;
- if (!it) {
- var rt = "clip";
- for (z = L.length; !k && z--; ) {
- var ct = L[z];
- (ct = Y[ct].label) && (ct.styles && ct.styles.textOverflow === "ellipsis" ? ct.css({ textOverflow: "clip" }) : ct.textPxLength > G && ct.css({ width: G + "px" }), ct.getBBox().height > this.len / L.length - (q.h - q.f) && (ct.specificTextOverflow = "ellipsis"));
- }
- }
- }
- $.rotation && (nt = et > 0.5 * g.chartHeight ? 0.33 * g.chartHeight : et, it || (rt = "ellipsis")), (this.labelAlign = V.align || this.autoLabelAlign(this.labelRotation)) && ($.align = this.labelAlign), L.forEach(function(gt) {
- var dt = (gt = Y[gt]) && gt.label, ht = Q.width, at = {};
- dt && (dt.attr($), 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 = $.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 && M(this.min) && M(this.max);
- }, X.prototype.addTitle = function(g) {
- var m = this.chart.renderer, L = this.horiz, Y = this.opposite, V = this.options.title, Q = this.chart.styledMode, k;
- this.axisTitle || ((k = V.textAlign) || (k = (L ? { low: "left", middle: "center", high: "right" } : { low: Y ? "right" : "left", middle: "center", high: Y ? "left" : "right" })[V.align]), this.axisTitle = m.text(V.text || "", 0, 0, V.useHTML).attr({ zIndex: 7, rotation: V.rotation, align: k }).addClass("highcharts-axis-title"), Q || this.axisTitle.css(t(V.style)), this.axisTitle.add(this.axisGroup), this.axisTitle.isNew = !0), Q || V.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 F(this, g);
- }, X.prototype.getOffset = function() {
- var g = this, m = this, L = m.chart, Y = m.horiz, V = m.options, Q = m.side, k = m.ticks, G = m.tickPositions, z = m.coll, $ = m.axisParent, q = L.renderer, it = L.inverted && !m.isZAxis ? [1, 0, 3, 2][Q] : Q, et = m.hasData(), nt = V.title, rt = V.labels, ct = L.axisOffset;
- L = L.clipOffset;
- var gt = [
- -1,
- 1,
- 1,
- -1
- ][Q], dt = V.className, ht, at = 0, J = 0, tt = 0;
- if (m.showAxis = ht = et || V.showEmpty, m.staggerLines = m.horiz && rt.staggerLines || void 0, !m.axisGroup) {
- var st = function(pt, yt, vt) {
- return q.g(pt).attr({ zIndex: vt }).addClass("highcharts-" + z.toLowerCase() + yt + " " + (g.isRadial ? "highcharts-radial-axis" + yt + " " : "") + (dt || "")).add($);
- };
- m.gridGroup = st("grid", "-grid", V.gridZIndex), m.axisGroup = st("axis", "", V.zIndex), m.labelGroup = st("axis-labels", "-labels", rt.zIndex);
- }
- if (et || m.isLinked ? (G.forEach(function(pt) {
- m.generateTick(pt);
- }), m.renderUnsquish(), m.reserveSpaceDefault = Q === 0 || Q === 2 || { 1: "left", 3: "right" }[Q] === m.labelAlign, A(rt.reserveSpace, m.labelAlign === "center" ? !0 : null, m.reserveSpaceDefault) && G.forEach(function(pt) {
- tt = Math.max(k[pt].getLabelSize(), tt);
- }), m.staggerLines && (tt *= m.staggerLines), m.labelOffset = tt * (m.opposite ? -1 : 1)) : n(k, function(pt, yt) {
- pt.destroy(), delete k[yt];
- }), nt && nt.text && nt.enabled !== !1 && (m.addTitle(ht), ht && nt.reserveSpace !== !1)) {
- m.titleOffset = at = m.axisTitle.getBBox()[Y ? "height" : "width"];
- var lt = nt.offset;
- J = M(lt) ? 0 : A(nt.margin, Y ? 5 : 10);
- }
- m.renderLine(), m.offset = gt * A(
- V.offset,
- ct[Q] ? ct[Q] + (V.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 * (Y ? A(rt.y, m.tickRotCorr.y + 8 * gt) : rt.x)), m.axisTitleMargin = A(lt, et), m.getMaxLabelDimensions && (m.maxLabelDimensions = m.getMaxLabelDimensions(k, G)), z !== "colorAxis" && (Y = this.tickSize("tick"), ct[Q] = Math.max(ct[Q], (m.axisTitleMargin || 0) + at + gt * m.offset, et, G && G.length && Y ? Y[0] + gt * m.offset : 0), V = !m.axisLine || V.offset ? 0 : 2 * Math.floor(m.axisLine.strokeWidth() / 2), L[it] = Math.max(
- L[it],
- V
- )), c(this, "afterGetOffset");
- }, X.prototype.getLinePath = function(g) {
- var m = this.chart, L = this.opposite, Y = this.offset, V = this.horiz, Q = this.left + (L ? this.width : 0) + Y;
- return Y = m.chartHeight - this.bottom - (L ? this.height : 0) + Y, L && (g *= -1), m.renderer.crispLine([["M", V ? this.left : Q, V ? Y : this.top], ["L", V ? m.chartWidth - this.right : Q, V ? Y : 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, Y = this.len, V = this.options.title, Q = g ? m : L, k = this.opposite, G = this.offset, z = V.x, $ = V.y, q = this.axisTitle, it = this.chart.renderer.fontMetrics(V.style.fontSize, q);
- return q = Math.max(q.getBBox(null, 0).height - it.h - 1, 0), Y = { low: Q + (g ? 0 : Y), middle: Q + Y / 2, high: Q + (g ? Y : 0) }[V.align], m = (g ? L + this.height : m) + (g ? 1 : -1) * (k ? -1 : 1) * this.axisTitleMargin + [
- -q,
- q,
- it.f,
- -q
- ][this.side], g = { x: g ? Y + z : m + (k ? this.width : 0) + G + z, y: g ? m + $ - (k ? this.height : 0) + G : Y + $ }, c(this, "afterGetTitlePosition", { titlePosition: g }), g;
- }, X.prototype.renderMinorTick = function(g, m) {
- var L = this.minorTicks;
- L[g] || (L[g] = new F(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 Y = this.ticks;
- (!this.isLinked || g >= this.min && g <= this.max || this.grid && this.grid.isColumn) && (Y[g] || (Y[g] = new F(this, g)), L && Y[g].isNew && Y[g].render(m, !0, -1), Y[g].render(m));
- }, X.prototype.render = function() {
- var g = this, m = g.chart, L = g.logarithmic, Y = g.options, V = g.isLinked, Q = g.tickPositions, k = g.axisTitle, G = g.ticks, z = g.minorTicks, $ = g.alternateBands, q = Y.stackLabels, it = Y.alternateGridColor, et = g.tickmarkOffset, nt = g.axisLine, rt = g.showAxis, ct = N(m.renderer.globalAnimation), gt, dt;
- if (g.labelEdge.length = 0, g.overlap = !1, [G, z, $].forEach(function(at) {
- n(at, function(J) {
- J.isActive = !1;
- });
- }), g.hasData() || V) {
- var ht = g.chart.hasRendered && g.old && h(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) && (G[-1] || (G[-1] = new F(g, -1, null, !0)), G[-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) && ($[at] || ($[at] = new U.PlotLineOrBand(g)), gt = at + et, $[at].options = { from: L ? L.lin2log(gt) : gt, to: L ? L.lin2log(dt) : dt, color: it, className: "highcharts-alternate-grid" }, $[at].render(), $[at].isActive = !0);
- }), g._addedPlotLB || (g._addedPlotLB = !0, (Y.plotLines || []).concat(Y.plotBands || []).forEach(function(at) {
- g.addPlotBandOrLine(at);
- }));
- }
- [G, z, $].forEach(function(at) {
- var J = [], tt = ct.duration;
- n(at, function(st, lt) {
- st.isActive || (st.render(lt, !1, 0), st.isActive = !1, J.push(lt));
- }), P(function() {
- for (var st = J.length; st--; )
- at[J[st]] && !at[J[st]].isActive && (at[J[st]].destroy(), delete at[J[st]]);
- }, at !== $ && m.hasRendered && tt ? tt : 0);
- }), nt && (nt[nt.isPlaced ? "animate" : "attr"]({ d: this.getLinePath(nt.strokeWidth()) }), nt.isPlaced = !0, nt[rt ? "show" : "hide"](rt)), k && rt && (Y = g.getTitlePosition(), h(Y.y) ? (k[k.isNew ? "attr" : "animate"](Y), k.isNew = !1) : (k.attr(
- "y",
- -9999
- ), k.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, c(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, Y = this.eventOptions;
- if (c(this, "destroy", { keepEvents: g }), g || D(m), [m.ticks, m.minorTicks, m.alternateBands].forEach(function(Q) {
- S(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 V in m.plotLinesAndBandsGroups)
- m.plotLinesAndBandsGroups[V] = m.plotLinesAndBandsGroups[V].destroy();
- n(m, function(Q, k) {
- m.getKeepProps().indexOf(k) === -1 && delete m[k];
- }), this.eventOptions = Y;
- }, X.prototype.drawCrosshair = function(g, m) {
- var L = this.crosshair, Y = A(L && L.snap, !0), V = this.chart, Q, k = this.cross;
- if (c(this, "drawCrosshair", { e: g, point: m }), g || (g = this.cross && this.cross.e), L && (M(m) || !Y) !== !1) {
- if (Y ? M(m) && (Q = A(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), M(Q)) {
- var G = { value: m && (this.isXAxis ? m.x : A(m.stackY, m.y)), translatedValue: Q };
- V.polar && a(G, { isCrosshair: !0, chartX: g && g.chartX, chartY: g && g.chartY, point: m }), G = this.getPlotLinePath(G) || null;
- }
- if (!M(G)) {
- this.hideCrosshair();
- return;
- }
- Y = this.categories && !this.isRadial, k || (this.cross = k = V.renderer.path().addClass("highcharts-crosshair highcharts-crosshair-" + (Y ? "category " : "thin ") + (L.className || "")).attr({ zIndex: A(L.zIndex, 2) }).add(), V.styledMode || (k.attr({ stroke: L.color || (Y ? I.parse("#ccd6eb").setOpacity(0.25).get() : "#cccccc"), "stroke-width": A(L.width, 1) }).css({ "pointer-events": "none" }), L.dashStyle && k.attr({ dashstyle: L.dashStyle }))), k.show().attr({ d: G }), Y && !L.width && k.attr({ "stroke-width": this.transA }), this.cross.e = g;
- } else
- this.hideCrosshair();
- c(this, "afterDrawCrosshair", { e: g, point: m });
- }, X.prototype.hideCrosshair = function() {
- this.cross && this.cross.hide(), c(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 h(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, A(m, !0) && L.redraw();
- }, X.prototype.remove = function(g) {
- for (var m = this.chart, L = this.coll, Y = this.series, V = Y.length; V--; )
- Y[V] && Y[V].remove(!1);
- w(m.axes, this), w(m[L], this), m[L].forEach(function(Q, k) {
- Q.options.index = Q.userOptions.index = k;
- }), this.destroy(), m.isDirtyBox = !0, A(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 = j.defaultXAxisOptions, X.keepProps = "extKey hcEvents names series userMax userMin".split(" "), X;
- }(), y;
- }), T(l, "Core/Axis/DateTimeAxis.js", [l["Core/Utilities.js"]], function(y) {
- var j = y.addEvent, I = y.getMagnitude, Z = y.normalizeTickInterval, H = y.timeUnits, U;
- return function(F) {
- function R() {
- return this.chart.time.getTimeTicks.apply(this.chart.time, arguments);
- }
- function N(u) {
- u.userOptions.type !== "datetime" ? this.dateTime = void 0 : this.dateTime || (this.dateTime = new x(this));
- }
- var b = [];
- F.compose = function(u) {
- return b.indexOf(u) === -1 && (b.push(u), u.keepProps.push("dateTime"), u.prototype.getTimeTicks = R, j(
- u,
- "init",
- N
- )), u;
- };
- var x = function() {
- function u(f) {
- this.axis = f;
- }
- return u.prototype.normalizeTimeTickInterval = function(f, E) {
- var O = E || [["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]];
- E = O[O.length - 1];
- var B = H[E[0]], M = E[1], S;
- for (S = 0; S < O.length && (E = O[S], B = H[E[0]], M = E[1], !(O[S + 1] && f <= (B * M[M.length - 1] + H[O[S + 1][0]]) / 2)); S++)
- ;
- return B === H.year && f < 5 * B && (M = [1, 2, 5]), f = Z(f / B, M, E[0] === "year" ? Math.max(I(f / B), 1) : 1), { unitRange: B, count: f, unitName: E[0] };
- }, u.prototype.getXDateFormat = function(f, E) {
- var O = this.axis;
- return O.closestPointRange ? O.chart.time.getDateFormat(O.closestPointRange, f, O.options.startOfWeek, E) || E.year : E.day;
- }, u;
- }();
- F.Additions = x;
- }(U || (U = {})), U;
- }), T(l, "Core/Axis/LogarithmicAxis.js", [l["Core/Utilities.js"]], function(y) {
- var j = y.addEvent, I = y.getMagnitude, Z = y.normalizeTickInterval, H = y.pick, U;
- return function(F) {
- function R(u) {
- var f = this.logarithmic;
- u.userOptions.type !== "logarithmic" ? this.logarithmic = void 0 : f || (this.logarithmic = new x(this));
- }
- function N() {
- var u = this.logarithmic;
- u && (this.lin2val = function(f) {
- return u.lin2log(f);
- }, this.val2lin = function(f) {
- return u.log2lin(f);
- });
- }
- var b = [];
- F.compose = function(u) {
- return b.indexOf(u) === -1 && (b.push(u), u.keepProps.push("logarithmic"), j(u, "init", R), j(u, "afterInit", N)), u;
- };
- var x = function() {
- function u(f) {
- this.axis = f;
- }
- return u.prototype.getLogTickPositions = function(f, E, O, B) {
- var M = this.axis, S = M.len, w = M.options, v = [];
- if (B || (this.minorAutoInterval = void 0), 0.5 <= f)
- f = Math.round(f), v = M.getLinearTickPositions(f, E, O);
- else if (0.08 <= f) {
- var a = Math.floor(E), c, p = w = void 0;
- for (S = 0.3 < f ? [1, 2, 4] : 0.15 < f ? [1, 2, 4, 6, 8] : [1, 2, 3, 4, 5, 6, 7, 8, 9]; a < O + 1 && !p; a++) {
- var i = S.length;
- for (c = 0; c < i && !p; c++) {
- var h = this.log2lin(this.lin2log(a) * S[c]);
- h > E && (!B || w <= O) && typeof w < "u" && v.push(w), w > O && (p = !0), w = h;
- }
- }
- } else
- E = this.lin2log(E), O = this.lin2log(O), f = B ? M.getMinorTickInterval() : w.tickInterval, f = H(f === "auto" ? null : f, this.minorAutoInterval, w.tickPixelInterval / (B ? 5 : 1) * (O - E) / ((B ? S / M.tickPositions.length : S) || 1)), f = Z(f, void 0, I(f)), v = M.getLinearTickPositions(f, E, O).map(this.log2lin), B || (this.minorAutoInterval = f / 5);
- return B || (M.tickInterval = f), v;
- }, u.prototype.lin2log = function(f) {
- return Math.pow(10, f);
- }, u.prototype.log2lin = function(f) {
- return Math.log(f) / Math.LN10;
- }, u;
- }();
- F.Additions = x;
- }(U || (U = {})), U;
- }), T(l, "Core/Axis/PlotLineOrBand/PlotLineOrBandAxis.js", [l["Core/Utilities.js"]], function(y) {
- var j = y.erase, I = y.extend, Z = y.isNumber, H;
- return function(U) {
- var F = [], R;
- U.compose = function(b, x) {
- return R || (R = b), F.indexOf(x) === -1 && (F.push(x), I(x.prototype, N.prototype)), x;
- };
- var N = function() {
- function b() {
- }
- return b.prototype.getPlotBandPath = function(x, u, f) {
- f === void 0 && (f = this.options);
- var E = this.getPlotLinePath({ value: u, force: !0, acrossPanes: f.acrossPanes }), O = [], B = this.horiz;
- if (u = !Z(this.min) || !Z(this.max) || x < this.min && u < this.min || x > this.max && u > this.max, x = this.getPlotLinePath({ value: x, force: !0, acrossPanes: f.acrossPanes }), f = 1, x && E) {
- if (u) {
- var M = x.toString() === E.toString();
- f = 0;
- }
- for (u = 0; u < x.length; u += 2) {
- var S = x[u], w = x[u + 1], v = E[u], a = E[u + 1];
- S[0] !== "M" && S[0] !== "L" || w[0] !== "M" && w[0] !== "L" || v[0] !== "M" && v[0] !== "L" || a[0] !== "M" && a[0] !== "L" || (B && v[1] === S[1] ? (v[1] += f, a[1] += f) : B || v[2] !== S[2] || (v[2] += f, a[2] += f), O.push(["M", S[1], S[2]], ["L", w[1], w[2]], ["L", a[1], a[2]], ["L", v[1], v[2]], ["Z"])), O.isFlat = M;
- }
- }
- return O;
- }, b.prototype.addPlotBand = function(x) {
- return this.addPlotBandOrLine(x, "plotBands");
- }, b.prototype.addPlotLine = function(x) {
- return this.addPlotBandOrLine(x, "plotLines");
- }, b.prototype.addPlotBandOrLine = function(x, u) {
- var f = this, E = this.userOptions, O = new R(this, x);
- if (this.visible && (O = O.render()), O) {
- if (this._addedPlotLB || (this._addedPlotLB = !0, (E.plotLines || []).concat(E.plotBands || []).forEach(function(M) {
- f.addPlotBandOrLine(M);
- })), u) {
- var B = E[u] || [];
- B.push(x), E[u] = B;
- }
- this.plotLinesAndBands.push(O);
- }
- return O;
- }, b.prototype.removePlotBandOrLine = function(x) {
- var u = this.plotLinesAndBands, f = this.options, E = this.userOptions;
- if (u) {
- for (var O = u.length; O--; )
- u[O].id === x && u[O].destroy();
- [f.plotLines || [], E.plotLines || [], f.plotBands || [], E.plotBands || []].forEach(function(B) {
- for (O = B.length; O--; )
- (B[O] || {}).id === x && j(B, B[O]);
- });
- }
- }, b.prototype.removePlotBand = function(x) {
- this.removePlotBandOrLine(x);
- }, b.prototype.removePlotLine = function(x) {
- this.removePlotBandOrLine(x);
- }, b;
- }();
- }(H || (H = {})), H;
- }), T(l, "Core/Axis/PlotLineOrBand/PlotLineOrBand.js", [l["Core/Axis/PlotLineOrBand/PlotLineOrBandAxis.js"], l["Core/Utilities.js"]], function(y, j) {
- var I = j.arrayMax, Z = j.arrayMin, H = j.defined, U = j.destroyObjectProperties, F = j.erase, R = j.fireEvent, N = j.merge, b = j.objectEach, x = j.pick;
- return j = function() {
- function u(f, E) {
- this.axis = f, E && (this.options = E, this.id = E.id);
- }
- return u.compose = function(f) {
- return y.compose(u, f);
- }, u.prototype.render = function() {
- R(this, "render");
- var f = this, E = f.axis, O = E.horiz, B = E.logarithmic, M = f.options, S = M.color, w = x(M.zIndex, 0), v = M.events, a = {}, c = E.chart.renderer, p = M.label, i = f.label, h = M.to, s = M.from, t = M.value, o = f.svgElem, n = [], A = H(s) && H(h);
- n = H(t);
- var _ = !o, D = { class: "highcharts-plot-" + (A ? "band " : "line ") + (M.className || "") }, W = A ? "bands" : "lines";
- if (B && (s = B.log2lin(s), h = B.log2lin(h), t = B.log2lin(t)), E.chart.styledMode || (n ? (D.stroke = S || "#999999", D["stroke-width"] = x(M.width, 1), M.dashStyle && (D.dashstyle = M.dashStyle)) : A && (D.fill = S || "#e6ebf5", M.borderWidth && (D.stroke = M.borderColor, D["stroke-width"] = M.borderWidth))), a.zIndex = w, W += "-" + w, (B = E.plotLinesAndBandsGroups[W]) || (E.plotLinesAndBandsGroups[W] = B = c.g("plot-" + W).attr(a).add()), _ && (f.svgElem = o = c.path().attr(D).add(B)), n)
- n = E.getPlotLinePath({ value: t, lineWidth: o.strokeWidth(), acrossPanes: M.acrossPanes });
- else if (A)
- n = E.getPlotBandPath(
- s,
- h,
- M
- );
- else
- return;
- return !f.eventsAdded && v && (b(v, function(P, X) {
- o.on(X, function(g) {
- v[X].apply(f, [g]);
- });
- }), f.eventsAdded = !0), (_ || !o.d) && n && n.length ? o.attr({ d: n }) : o && (n ? (o.show(!0), o.animate({ d: n })) : o.d && (o.hide(), i && (f.label = i = i.destroy()))), p && (H(p.text) || H(p.formatter)) && n && n.length && 0 < E.width && 0 < E.height && !n.isFlat ? (p = N({ align: O && A && "center", x: O ? !A && 4 : 10, verticalAlign: !O && A && "middle", y: O ? A ? 16 : 10 : A ? 6 : -4, rotation: O && !A && 90 }, p), this.renderLabel(p, n, A, w)) : i && i.hide(), f;
- }, u.prototype.renderLabel = function(f, E, O, B) {
- var M = this.axis, S = M.chart.renderer, w = this.label;
- w || (this.label = w = S.text(this.getLabelText(f), 0, 0, f.useHTML).attr({ align: f.textAlign || f.align, rotation: f.rotation, class: "highcharts-plot-" + (O ? "band" : "line") + "-label " + (f.className || ""), zIndex: B }).add(), M.chart.styledMode || w.css(N({ textOverflow: "ellipsis" }, f.style))), B = E.xBounds || [E[0][1], E[1][1], O ? E[2][1] : E[0][1]], E = E.yBounds || [E[0][2], E[1][2], O ? E[2][2] : E[0][2]], O = Z(B), S = Z(E), w.align(f, !1, { x: O, y: S, width: I(B) - O, height: I(E) - S }), w.alignValue && w.alignValue !== "left" || w.css({ width: (w.rotation === 90 ? M.height - (w.alignAttr.y - M.top) : M.width - (w.alignAttr.x - M.left)) + "px" }), w.show(!0);
- }, u.prototype.getLabelText = function(f) {
- return H(f.formatter) ? f.formatter.call(this) : f.text;
- }, u.prototype.destroy = function() {
- F(this.axis.plotLinesAndBands, this), delete this.axis, U(this);
- }, u;
- }(), j;
- }), T(
- l,
- "Core/Tooltip.js",
- [l["Core/FormatUtilities.js"], l["Core/Globals.js"], l["Core/Renderer/RendererUtilities.js"], l["Core/Renderer/RendererRegistry.js"], l["Core/Utilities.js"]],
- function(y, j, I, Z, H) {
- var U = y.format, F = j.doc, R = I.distribute, N = H.addEvent, b = H.clamp, x = H.css, u = H.defined, f = H.discardElement, E = H.extend, O = H.fireEvent, B = H.isArray, M = H.isNumber, S = H.isString, w = H.merge, v = H.pick, a = H.splat, c = H.syncTimeout;
- return y = function() {
- function p(i, h) {
- 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, h);
- }
- return p.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" } }] }]
- });
- }, p.prototype.bodyFormatter = function(i) {
- return i.map(function(h) {
- var s = h.series.tooltipOptions;
- return (s[(h.point.formatPrefix || "point") + "Formatter"] || h.point.tooltipFormatter).call(h.point, s[(h.point.formatPrefix || "point") + "Format"] || "");
- });
- }, p.prototype.cleanSplit = function(i) {
- this.chart.series.forEach(function(h) {
- var s = h && h.tt;
- s && (!s.isActive || i ? h.tt = s.destroy() : s.isActive = !1);
- });
- }, p.prototype.defaultFormatter = function(i) {
- var h = this.points || a(this), s = [i.tooltipFooterHeaderFormatter(h[0])];
- return s = s.concat(i.bodyFormatter(h)), s.push(i.tooltipFooterHeaderFormatter(h[0], !0)), s;
- }, p.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(), f(this.container)), H.clearTimeout(this.hideTimer), H.clearTimeout(this.tooltipTimeout);
- }, p.prototype.getAnchor = function(i, h) {
- var s = this.chart, t = s.pointer, o = s.inverted, n = s.plotTop, A = s.plotLeft, _, D, W = 0, P = 0;
- return i = a(i), this.followPointer && h ? (typeof h.chartX > "u" && (h = t.normalize(h)), t = [h.chartX - A, h.chartY - n]) : i[0].tooltipPos ? t = i[0].tooltipPos : (i.forEach(function(X) {
- _ = X.series.yAxis, D = X.series.xAxis, W += X.plotX || 0, P += X.plotLow ? (X.plotLow + (X.plotHigh || 0)) / 2 : X.plotY || 0, D && _ && (o ? (W += n + s.plotHeight - D.len - D.pos, P += A + s.plotWidth - _.len - _.pos) : (W += D.pos - A, P += _.pos - n));
- }), W /= i.length, P /= i.length, t = [o ? s.plotWidth - P : W, o ? s.plotHeight - W : P], this.shared && 1 < i.length && h && (o ? t[0] = h.chartX - A : t[1] = h.chartY - n)), t.map(Math.round);
- }, p.prototype.getLabel = function() {
- var i = this, h = this.chart.styledMode, s = this.options, t = this.split && this.allowShared, o = "tooltip" + (u(s.className) ? " " + s.className : ""), n = s.style.pointerEvents || (!this.followPointer && s.stickOnContact ? "auto" : "none"), A = function() {
- i.inContact = !0;
- }, _ = function(Y) {
- var V = i.chart.hoverSeries;
- i.inContact = i.shouldStickOnContact() && i.chart.pointer.inClass(Y.relatedTarget, "highcharts-tooltip"), !i.inContact && V && V.onMouseOut && V.onMouseOut();
- }, D, W = this.chart.renderer;
- if (i.label) {
- var P = !i.label.hasClass("highcharts-label");
- (t && !P || !t && P) && i.destroy();
- }
- if (!this.label) {
- if (this.outside) {
- P = this.chart.options.chart.style;
- var X = Z.getRendererType();
- this.container = D = j.doc.createElement("div"), D.className = "highcharts-tooltip-container", x(D, { position: "absolute", top: "1px", pointerEvents: n, zIndex: Math.max(this.options.style.zIndex || 0, (P && P.zIndex || 0) + 3) }), N(D, "mouseenter", A), N(D, "mouseleave", _), j.doc.body.appendChild(D), this.renderer = W = new X(D, 0, 0, P, void 0, void 0, W.styledMode);
- }
- if (t ? this.label = W.g(o) : (this.label = W.label("", 0, 0, s.shape, void 0, void 0, s.useHTML, void 0, o).attr({ padding: s.padding, r: s.borderRadius }), h || this.label.attr({
- fill: s.backgroundColor,
- "stroke-width": s.borderWidth
- }).css(s.style).css({ pointerEvents: n }).shadow(s.shadow)), h && s.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(Y) {
- m.call(g, i.distance), D.style.left = Y + "px";
- }, g.ySetter = function(Y) {
- L.call(g, i.distance), D.style.top = Y + "px";
- };
- }
- this.label.on("mouseenter", A).on("mouseleave", _).attr({ zIndex: 8 }).add();
- }
- return this.label;
- }, p.prototype.getPosition = function(i, h, s) {
- var t = this.chart, o = this.distance, n = {}, A = t.inverted && s.h || 0, _ = this.outside, D = _ ? F.documentElement.clientWidth - 2 * o : t.chartWidth, W = _ ? Math.max(F.body.scrollHeight, F.documentElement.scrollHeight, F.body.offsetHeight, F.documentElement.offsetHeight, F.documentElement.clientHeight) : t.chartHeight, P = t.pointer.getChartPosition(), X = function(z) {
- var $ = z === "x";
- return [z, $ ? D : W, $ ? i : h].concat(_ ? [$ ? i * P.scaleX : h * P.scaleY, $ ? P.left - o + (s.plotX + t.plotLeft) * P.scaleX : P.top - o + (s.plotY + t.plotTop) * P.scaleY, 0, $ ? D : W] : [$ ? i : h, $ ? s.plotX + t.plotLeft : s.plotY + t.plotTop, $ ? t.plotLeft : t.plotTop, $ ? t.plotLeft + t.plotWidth : t.plotTop + t.plotHeight]);
- }, g = X("y"), m = X("x"), L;
- X = !!s.negative, !t.polar && t.hoverSeries && t.hoverSeries.yAxis && t.hoverSeries.yAxis.reversed && (X = !X);
- var Y = !this.followPointer && v(s.ttBelow, !t.inverted === X), V = function(z, $, q, it, et, nt, rt) {
- var ct = _ ? z === "y" ? o * P.scaleY : o * P.scaleX : o, gt = (q - it) / 2, dt = it < et - o, ht = et + o + it < $, at = et - ct - q + gt;
- if (et = et + ct - gt, Y && ht)
- n[z] = et;
- else if (!Y && dt)
- n[z] = at;
- else if (dt)
- n[z] = Math.min(rt - it, 0 > at - A ? at : at - A);
- else if (ht)
- n[z] = Math.max(nt, et + A + q > $ ? et : et + A);
- else
- return !1;
- }, Q = function(z, $, q, it, et) {
- var nt;
- return et < o || et > $ - o ? nt = !1 : n[z] = et < q / 2 ? 1 : et > $ - it / 2 ? $ - it - 2 : et - q / 2, nt;
- }, k = function(z) {
- var $ = g;
- g = m, m = $, L = z;
- }, G = function() {
- V.apply(0, g) !== !1 ? Q.apply(0, m) !== !1 || L || (k(!0), G()) : L ? n.x = n.y = 0 : (k(!0), G());
- };
- return (t.inverted || 1 < this.len) && k(), G(), n;
- }, p.prototype.hide = function(i) {
- var h = this;
- H.clearTimeout(this.hideTimer), i = v(i, this.options.hideDelay), this.isHidden || (this.hideTimer = c(function() {
- h.getLabel().fadeOut(i && void 0), h.isHidden = !0;
- }, i));
- }, p.prototype.init = function(i, h) {
- this.chart = i, this.options = h, this.crosshairs = [], this.now = { x: 0, y: 0 }, this.isHidden = !0, this.split = h.split && !i.inverted && !i.polar, this.shared = h.shared || this.split, this.outside = v(h.outside, !(!i.scrollablePixelsX && !i.scrollablePixelsY));
- }, p.prototype.shouldStickOnContact = function() {
- return !(this.followPointer || !this.options.stickOnContact);
- }, p.prototype.isStickyOnContact = function() {
- return !(!this.shouldStickOnContact() || !this.inContact);
- }, p.prototype.move = function(i, h, s, t) {
- var o = this, n = o.now, A = o.options.animation !== !1 && !o.isHidden && (1 < Math.abs(i - n.x) || 1 < Math.abs(h - n.y)), _ = o.followPointer || 1 < o.len;
- E(n, { x: A ? (2 * n.x + i) / 3 : i, y: A ? (n.y + h) / 2 : h, anchorX: _ ? void 0 : A ? (2 * n.anchorX + s) / 3 : s, anchorY: _ ? void 0 : A ? (n.anchorY + t) / 2 : t }), o.getLabel().attr(n), o.drawTracker(), A && (H.clearTimeout(this.tooltipTimeout), this.tooltipTimeout = setTimeout(function() {
- o && o.move(i, h, s, t);
- }, 32));
- }, p.prototype.refresh = function(i, h) {
- var s = this.chart, t = this.options, o = a(i), n = o[0], A = [], _ = t.formatter || this.defaultFormatter, D = this.shared, W = s.styledMode, P = {};
- if (t.enabled) {
- H.clearTimeout(this.hideTimer), this.allowShared = !(!B(i) && i.series && i.series.noSharedTooltip), this.followPointer = !this.split && n.series.tooltipOptions.followPointer, i = this.getAnchor(i, h);
- var X = i[0], g = i[1];
- if (D && this.allowShared ? (s.pointer.applyInactiveState(o), o.forEach(function(Y) {
- Y.setState("hover"), A.push(Y.getLabelConfig());
- }), P = { x: n.category, y: n.y }, P.points = A) : P = n.getLabelConfig(), this.len = A.length, _ = _.call(P, this), D = n.series, this.distance = v(D.tooltipOptions.distance, 16), _ === !1)
- this.hide();
- else {
- if (this.split && this.allowShared)
- this.renderSplit(
- _,
- o
- );
- else {
- var m = X, L = g;
- if (h && s.pointer.isDirectTouch && (m = h.chartX - s.plotLeft, L = h.chartY - s.plotTop), s.polar || D.options.clip === !1 || o.some(function(Y) {
- return Y.series.shouldShowTooltip(m, L);
- }))
- h = this.getLabel(), t.style.width && !W || h.css({ width: this.chart.spacingBox.width + "px" }), h.attr({ text: _ && _.join ? _.join("") : _ }), h.removeClass(/highcharts-color-[\d]+/g).addClass("highcharts-color-" + v(n.colorIndex, D.colorIndex)), W || h.attr({ stroke: t.borderColor || n.color || D.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");
- }
- }, p.prototype.renderSplit = function(i, h) {
- function s(ht, at, J, tt, st) {
- return st === void 0 && (st = !0), J ? (at = it ? 0 : ct, ht = b(ht - tt / 2, z.left, z.right - tt - (t.outside ? et : 0))) : (at -= nt, ht = st ? ht - tt - Q : ht + Q, ht = b(ht, st ? ht : z.left, z.right)), { x: ht, y: at };
- }
- var t = this, o = t.chart, n = t.chart, A = n.chartWidth, _ = n.chartHeight, D = n.plotHeight, W = n.plotLeft, P = 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 Y = L.scrollLeft;
- L = L.scrollTop;
- var V = n.styledMode, Q = t.distance, k = t.options, G = t.options.positioner, z = t.outside && typeof m != "number" ? F.documentElement.getBoundingClientRect() : { left: Y, right: Y + A, top: L, bottom: L + _ }, $ = t.getLabel(), q = this.renderer || o.renderer, it = !(!o.xAxis[0] || !o.xAxis[0].opposite);
- o = X.getChartPosition();
- var et = o.left;
- o = o.top;
- var nt = P + L, rt = 0, ct = D - g;
- S(i) && (i = [!1, i]), i = i.slice(0, h.length + 1).reduce(function(ht, at, J) {
- if (at !== !1 && at !== "") {
- J = h[J - 1] || { isHeader: !0, plotX: h[0].plotX, plotY: D, series: {} };
- var tt = J.isHeader, st = tt ? t : J.series;
- at = at.toString();
- var lt = st.tt, pt = J.isHeader, yt = J.series, vt = "highcharts-color-" + v(J.colorIndex, yt.colorIndex, "none");
- if (lt || (lt = { padding: k.padding, r: k.borderRadius }, V || (lt.fill = k.backgroundColor, lt["stroke-width"] = k.borderWidth), lt = q.label("", 0, 0, k[pt ? "headerShape" : "shape"], void 0, void 0, k.useHTML).addClass((pt ? "highcharts-tooltip-header " : "") + "highcharts-tooltip-box " + vt).attr(lt).add($)), lt.isActive = !0, lt.attr({ text: at }), V || lt.css(k.style).shadow(k.shadow).attr({ stroke: k.borderColor || J.color || yt.color || "#333333" }), st = st.tt = lt, pt = st.getBBox(), at = pt.width + st.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 = P + D / 2;
- } else {
- var Pt = lt.xAxis, At = lt.yAxis;
- yt = Pt.pos + b(yt, -Q, Pt.len + Q), lt.shouldShowTooltip(0, At.pos - P + vt, { ignoreX: !0 }) && (Mt = At.pos + vt);
- }
- yt = b(yt, z.left - Q, z.right + Q), typeof Mt == "number" ? (pt = pt.height + 1, vt = G ? G.call(t, at, pt, J) : s(
- yt,
- Mt,
- tt,
- at
- ), ht.push({ align: G ? 0 : void 0, anchorX: yt, anchorY: Mt, boxWidth: at, point: J, rank: v(vt.rank, tt ? 1 : 0), size: pt, target: vt.y, tt: st, x: vt.x })) : st.isActive = !1;
- }
- return ht;
- }, []), !G && i.some(function(ht) {
- var at = (t.outside ? et : 0) + ht.anchorX;
- return at < z.left && at + ht.boxWidth < z.right ? !0 : at < et - z.left + ht.boxWidth && z.right - at > at;
- }) && (i = i.map(function(ht) {
- var at = s(ht.anchorX, ht.anchorY, ht.point.isHeader, ht.boxWidth, !1);
- return E(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, st = 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 && (st || (tt.x = at + lt, tt.anchorX = J + lt), st && (tt.x = (dt - gt) / 2, tt.anchorX = J + lt));
- }
- ht.tt.attr(tt);
- }), i = t.container, g = t.renderer, t.outside && i && g && (n = $.getBBox(), g.setSize(n.width + n.x, n.height + n.y, !1), i.style.left = gt + "px", i.style.top = o + "px");
- }, p.prototype.drawTracker = function() {
- if (this.followPointer || !this.options.stickOnContact)
- this.tracker && this.tracker.destroy();
- else {
- var i = this.chart, h = this.label, s = this.shared ? i.hoverPoints : i.hoverPoint;
- if (h && s) {
- var t = { x: 0, y: 0, width: 0, height: 0 };
- s = this.getAnchor(s);
- var o = h.getBBox();
- s[0] += i.plotLeft - h.translateX, s[1] += i.plotTop - h.translateY, t.x = Math.min(0, s[0]), t.y = Math.min(0, s[1]), t.width = 0 > s[0] ? Math.max(Math.abs(s[0]), o.width - s[0]) : Math.max(Math.abs(s[0]), o.width), t.height = 0 > s[1] ? Math.max(Math.abs(s[1]), o.height - Math.abs(s[1])) : Math.max(Math.abs(s[1]), o.height), this.tracker ? this.tracker.attr(t) : (this.tracker = h.renderer.rect(t).addClass("highcharts-tracker").add(h), i.styledMode || this.tracker.attr({ fill: "rgba(0,0,0,0)" }));
- }
- }
- }, p.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}"');
- }, p.prototype.tooltipFooterHeaderFormatter = function(i, h) {
- var s = i.series, t = s.tooltipOptions, o = s.xAxis, n = o && o.dateTime;
- o = {
- isFooter: h,
- labelConfig: i
- };
- var A = t.xDateFormat, _ = t[h ? "footerFormat" : "headerFormat"];
- return O(this, "headerFormatter", o, function(D) {
- n && !A && M(i.key) && (A = n.getXDateFormat(i.key, t.dateTimeLabelFormats)), n && A && (i.point && i.point.tooltipDateKeys || ["key"]).forEach(function(W) {
- _ = _.replace("{point." + W + "}", "{point." + W + ":" + A + "}");
- }), s.chart.styledMode && (_ = this.styledModeFormat(_)), D.text = U(_, { point: i, series: s }, this.chart);
- }), o.text;
- }, p.prototype.update = function(i) {
- this.destroy(), w(!0, this.chart.options.tooltip.userOptions, i), this.init(this.chart, w(!0, this.options, i));
- }, p.prototype.updatePosition = function(i) {
- var h = this.chart, s = this.options, t = h.pointer, o = this.getLabel();
- t = t.getChartPosition();
- var n = (s.positioner || this.getPosition).call(this, o.width, o.height, i), A = i.plotX + h.plotLeft;
- i = i.plotY + h.plotTop, this.outside && (s = s.borderWidth + 2 * this.distance, this.renderer.setSize(o.width + s, o.height + s, !1), (t.scaleX !== 1 || t.scaleY !== 1) && (x(this.container, { transform: "scale(" + t.scaleX + ", " + t.scaleY + ")" }), A *= t.scaleX, i *= t.scaleY), A += t.left - n.x, i += t.top - n.y), this.move(Math.round(n.x), Math.round(n.y || 0), A, i);
- }, p;
- }(), y;
- }
- ), T(l, "Core/Series/Point.js", [l["Core/Renderer/HTML/AST.js"], l["Core/Animation/AnimationUtilities.js"], l["Core/DefaultOptions.js"], l["Core/FormatUtilities.js"], l["Core/Utilities.js"]], function(y, j, I, Z, H) {
- var U = j.animObject, F = I.defaultOptions, R = Z.format, N = H.addEvent, b = H.defined, x = H.erase, u = H.extend, f = H.fireEvent, E = H.getNestedProperty, O = H.isArray, B = H.isFunction, M = H.isNumber, S = H.isObject, w = H.merge, v = H.objectEach, a = H.pick, c = H.syncTimeout, p = H.removeEvent, i = H.uniqueKey;
- return j = function() {
- function h() {
- 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 h.prototype.animateBeforeDestroy = function() {
- var s = this, t = { x: s.startXPos, opacity: 0 }, o = s.getGraphicalProps();
- o.singular.forEach(function(n) {
- s[n] = s[n].animate(n === "dataLabel" ? {
- x: s[n].startXPos,
- y: s[n].startYPos,
- opacity: 0
- } : t);
- }), o.plural.forEach(function(n) {
- s[n].forEach(function(A) {
- A.element && A.animate(u({ x: s.startXPos }, A.startYPos ? { x: A.startXPos, y: A.startYPos } : {}));
- });
- });
- }, h.prototype.applyOptions = function(s, t) {
- var o = this.series, n = o.options.pointValKey || o.pointValKey;
- return s = h.prototype.optionsToObject.call(this, s), u(this, s), this.options = this.options ? u(this.options, s) : s, s.group && delete this.group, s.dataLabels && delete this.dataLabels, n && (this.y = h.prototype.getNestedProperty.call(this, n)), this.formatPrefix = (this.isNull = a(this.isValid && !this.isValid(), this.x === null || !M(this.y))) ? "null" : "point", this.selected && (this.state = "select"), "name" in this && typeof t > "u" && o.xAxis && o.xAxis.hasNames && (this.x = o.xAxis.nameToX(this)), typeof this.x > "u" && o ? this.x = typeof t > "u" ? o.autoIncrement() : t : M(s.x) && o.options.relativeXValue && (this.x = o.autoIncrement(s.x)), this;
- }, h.prototype.destroy = function() {
- function s() {
- (t.graphic || t.dataLabel || t.dataLabels) && (p(t), t.destroyElements());
- for (D in t)
- t[D] = null;
- }
- var t = this, o = t.series, n = o.chart;
- o = o.options.dataSorting;
- var A = n.hoverPoints, _ = U(t.series.chart.renderer.globalAnimation), D;
- t.legendItem && n.legend.destroyItem(t), A && (t.setState(), x(A, t), A.length || (n.hoverPoints = null)), t === n.hoverPoint && t.onMouseOut(), o && o.enabled ? (this.animateBeforeDestroy(), c(s, _.duration)) : s(), n.pointCount--;
- }, h.prototype.destroyElements = function(s) {
- var t = this;
- s = t.getGraphicalProps(s), s.singular.forEach(function(o) {
- t[o] = t[o].destroy();
- }), s.plural.forEach(function(o) {
- t[o].forEach(function(n) {
- n.element && n.destroy();
- }), delete t[o];
- });
- }, h.prototype.firePointEvent = function(s, t, o) {
- var n = this, A = this.series.options;
- (A.point.events[s] || n.options && n.options.events && n.options.events[s]) && n.importEvents(), s === "click" && A.allowPointSelect && (o = function(_) {
- n.select && n.select(null, _.ctrlKey || _.metaKey || _.shiftKey);
- }), f(n, s, t, o);
- }, h.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", "") : "");
- }, h.prototype.getGraphicalProps = function(s) {
- var t = this, o = [], n = { singular: [], plural: [] }, A;
- for (s = s || { graphic: 1, dataLabel: 1 }, s.graphic && o.push("graphic", "upperGraphic", "shadowGroup"), s.dataLabel && o.push("dataLabel", "dataLabelUpper", "connector"), A = o.length; A--; ) {
- var _ = o[A];
- t[_] && n.singular.push(_);
- }
- return ["dataLabel", "connector"].forEach(function(D) {
- var W = D + "s";
- s[D] && t[W] && n.plural.push(W);
- }), n;
- }, h.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 };
- }, h.prototype.getNestedProperty = function(s) {
- if (s)
- return s.indexOf("custom.") === 0 ? E(s, this.options) : this[s];
- }, h.prototype.getZone = function() {
- var s = this.series, t = s.zones;
- s = s.zoneAxis || "y";
- var o, n = 0;
- for (o = t[n]; this[s] >= o.value; )
- o = t[++n];
- return this.nonZonedColor || (this.nonZonedColor = this.color), this.color = o && o.color && !this.options.color ? o.color : this.nonZonedColor, o;
- }, h.prototype.hasNewShapeType = function() {
- return (this.graphic && (this.graphic.symbolName || this.graphic.element.nodeName)) !== this.shapeType;
- }, h.prototype.init = function(s, t, o) {
- return this.series = s, this.applyOptions(t, o), this.id = b(this.id) ? this.id : i(), this.resolveColor(), s.chart.pointCount++, f(this, "afterInit"), this;
- }, h.prototype.optionsToObject = function(s) {
- var t = this.series, o = t.options.keys, n = o || t.pointArrayMap || ["y"], A = n.length, _ = {}, D = 0, W = 0;
- if (M(s) || s === null)
- _[n[0]] = s;
- else if (O(s))
- for (!o && s.length > A && (t = typeof s[0], t === "string" ? _.name = s[0] : t === "number" && (_.x = s[0]), D++); W < A; )
- o && typeof s[D] > "u" || (0 < n[W].indexOf(".") ? h.prototype.setNestedProperty(_, s[D], n[W]) : _[n[W]] = s[D]), D++, W++;
- else
- typeof s == "object" && (_ = s, s.dataLabels && (t._hasPointLabels = !0), s.marker && (t._hasPointMarkers = !0));
- return _;
- }, h.prototype.resolveColor = function() {
- var s = this.series, t = s.chart.styledMode, o = s.chart.options.chart.colorCount;
- if (delete this.nonZonedColor, s.options.colorByPoint) {
- if (!t) {
- o = s.options.colors || s.chart.options.colors;
- var n = o[s.colorCounter];
- o = o.length;
- }
- t = s.colorCounter, s.colorCounter++, s.colorCounter === o && (s.colorCounter = 0);
- } else
- t || (n = s.color), t = s.colorIndex;
- this.colorIndex = a(this.options.colorIndex, t), this.color = a(this.options.color, n);
- }, h.prototype.setNestedProperty = function(s, t, o) {
- return o.split(".").reduce(function(n, A, _, D) {
- return n[A] = D.length - 1 === _ ? t : S(n[A], !0) ? n[A] : {}, n[A];
- }, s), s;
- }, h.prototype.tooltipFormatter = function(s) {
- var t = this.series, o = t.tooltipOptions, n = a(o.valueDecimals, ""), A = o.valuePrefix || "", _ = o.valueSuffix || "";
- return t.chart.styledMode && (s = t.chart.tooltip.styledModeFormat(s)), (t.pointArrayMap || ["y"]).forEach(function(D) {
- D = "{point." + D, (A || _) && (s = s.replace(RegExp(D + "}", "g"), A + D + "}" + _)), s = s.replace(RegExp(D + "}", "g"), D + ":,." + n + "f}");
- }), R(s, { point: this, series: this.series }, t.chart);
- }, h.prototype.update = function(s, t, o, n) {
- function A() {
- _.applyOptions(s);
- var m = W && _.hasDummyGraphic;
- m = _.y === null ? !m : m, W && m && (_.graphic = W.destroy(), delete _.hasDummyGraphic), S(s, !0) && (W && W.element && s && s.marker && typeof s.marker.symbol < "u" && (_.graphic = W.destroy()), s && s.dataLabels && _.dataLabel && (_.dataLabel = _.dataLabel.destroy()), _.connector && (_.connector = _.connector.destroy())), g = _.index, D.updateParallelArrays(_, g), X.data[g] = S(X.data[g], !0) || S(s, !0) ? _.options : a(s, X.data[g]), D.isDirty = D.isDirtyData = !0, !D.fixedBox && D.hasCartesianSeries && (P.isDirtyBox = !0), X.legendType === "point" && (P.isDirtyLegend = !0), t && P.redraw(o);
- }
- var _ = this, D = _.series, W = _.graphic, P = D.chart, X = D.options, g;
- t = a(t, !0), n === !1 ? A() : _.firePointEvent("update", { options: s }, A);
- }, h.prototype.remove = function(s, t) {
- this.series.removePoint(this.series.data.indexOf(this), s, t);
- }, h.prototype.select = function(s, t) {
- var o = this, n = o.series, A = n.chart;
- this.selectedStaging = s = a(s, !o.selected), o.firePointEvent(s ? "select" : "unselect", { accumulate: t }, function() {
- o.selected = o.options.selected = s, n.options.data[n.data.indexOf(o)] = o.options, o.setState(s && "select"), t || A.getSelectedPoints().forEach(function(_) {
- var D = _.series;
- _.selected && _ !== o && (_.selected = _.options.selected = !1, D.options.data[D.data.indexOf(_)] = _.options, _.setState(A.hoverPoints && D.options.inactiveOtherPoints ? "inactive" : ""), _.firePointEvent("unselect"));
- });
- }), delete this.selectedStaging;
- }, h.prototype.onMouseOver = function(s) {
- var t = this.series.chart, o = t.pointer;
- s = s ? o.normalize(s) : o.getChartCoordinatesFromPoint(this, t.inverted), o.runPointActions(
- s,
- this
- );
- }, h.prototype.onMouseOut = function() {
- var s = this.series.chart;
- this.firePointEvent("mouseOut"), this.series.options.inactiveOtherPoints || (s.hoverPoints || []).forEach(function(t) {
- t.setState();
- }), s.hoverPoints = s.hoverPoint = null;
- }, h.prototype.importEvents = function() {
- if (!this.hasImportedEvents) {
- var s = this, t = w(s.series.options.point, s.options).events;
- s.events = t, v(t, function(o, n) {
- B(o) && N(s, n, o);
- }), this.hasImportedEvents = !0;
- }
- }, h.prototype.setState = function(s, t) {
- var o = this.series, n = this.state, A = o.options.states[s || "normal"] || {}, _ = F.plotOptions[o.type].marker && o.options.marker, D = _ && _.enabled === !1, W = _ && _.states && _.states[s || "normal"] || {}, P = W.enabled === !1, X = this.marker || {}, g = o.chart, m = _ && o.markerAttribs, L = o.halo, Y, V = o.stateMarkerGraphic;
- if (s = s || "", !(s === this.state && !t || this.selected && s !== "select" || A.enabled === !1 || s && (P || D && W.enabled === !1) || s && X.states && X.states[s] && X.states[s].enabled === !1)) {
- if (this.state = s, m && (Y = o.markerAttribs(this, s)), this.graphic && !this.hasDummyGraphic) {
- if (n && this.graphic.removeClass("highcharts-point-" + n), s && this.graphic.addClass("highcharts-point-" + s), !g.styledMode) {
- var Q = o.pointAttribs(this, s), k = a(g.options.chart.animation, A.animation);
- o.options.inactiveOtherPoints && M(Q.opacity) && ((this.dataLabels || []).forEach(function(G) {
- G && G.animate({ opacity: Q.opacity }, k);
- }), this.connector && this.connector.animate({ opacity: Q.opacity }, k)), this.graphic.animate(Q, k);
- }
- Y && this.graphic.animate(Y, a(g.options.chart.animation, W.animation, _.animation)), V && V.hide();
- } else
- s && W && (n = X.symbol || o.symbol, V && V.currentSymbol !== n && (V = V.destroy()), Y && (V ? V[t ? "animate" : "attr"]({ x: Y.x, y: Y.y }) : n && (o.stateMarkerGraphic = V = g.renderer.symbol(n, Y.x, Y.y, Y.width, Y.height).add(o.markerGroup), V.currentSymbol = n)), !g.styledMode && V && this.state !== "inactive" && V.attr(o.pointAttribs(this, s))), V && (V[s && this.isInside ? "show" : "hide"](), V.element.point = this, V.addClass(this.getClassName(), !0));
- A = A.halo, Y = (V = this.graphic || V) && V.visibility || "inherit", A && A.size && V && Y !== "hidden" && !this.isCluster ? (L || (o.halo = L = g.renderer.path().add(V.parentGroup)), L.show()[t ? "animate" : "attr"]({ d: this.haloPath(A.size) }), L.attr({ class: "highcharts-halo highcharts-color-" + a(this.colorIndex, o.colorIndex) + (this.className ? " " + this.className : ""), visibility: Y, zIndex: -1 }), L.point = this, g.styledMode || L.attr(u({ fill: this.color || o.color, "fill-opacity": A.opacity }, y.filterUserAttributes(A.attributes || {})))) : L && L.point && L.point.haloPath && L.animate({ d: L.point.haloPath(0) }, null, L.hide), f(this, "afterSetState", { state: s });
- }
- }, h.prototype.haloPath = function(s) {
- return this.series.chart.renderer.symbols.circle(Math.floor(this.plotX) - s, this.plotY - s, 2 * s, 2 * s);
- }, h;
- }(), j;
- }), T(l, "Core/Pointer.js", [l["Core/Color/Color.js"], l["Core/Globals.js"], l["Core/Tooltip.js"], l["Core/Utilities.js"]], function(y, j, I, Z) {
- var H = y.parse, U = j.charts, F = j.noop, R = Z.addEvent, N = Z.attr, b = Z.css, x = Z.defined, u = Z.extend, f = Z.find, E = Z.fireEvent, O = Z.isNumber, B = Z.isObject, M = Z.objectEach, S = Z.offset, w = Z.pick, v = Z.splat;
- return y = function() {
- function a(c, p) {
- this.lastValidTouch = {}, this.pinchDown = [], this.runChartClick = !1, this.eventsToUnbind = [], this.chart = c, this.hasDragged = !1, this.options = p, this.init(c, p);
- }
- return a.prototype.applyInactiveState = function(c) {
- var p = [], i;
- (c || []).forEach(function(h) {
- i = h.series, p.push(i), i.linkedParent && p.push(i.linkedParent), i.linkedSeries && (p = p.concat(i.linkedSeries)), i.navigatorSeries && p.push(i.navigatorSeries);
- }), this.chart.series.forEach(function(h) {
- p.indexOf(h) === -1 ? h.setState("inactive", !0) : h.options.inactiveOtherPoints && h.setAllPointsToState("inactive");
- });
- }, a.prototype.destroy = function() {
- var c = this;
- this.eventsToUnbind.forEach(function(p) {
- return p();
- }), this.eventsToUnbind = [], j.chartCount || (a.unbindDocumentMouseUp && (a.unbindDocumentMouseUp = a.unbindDocumentMouseUp()), a.unbindDocumentTouchEnd && (a.unbindDocumentTouchEnd = a.unbindDocumentTouchEnd())), clearInterval(c.tooltipTimeout), M(c, function(p, i) {
- c[i] = void 0;
- });
- }, a.prototype.drag = function(c) {
- var p = this.chart, i = p.options.chart, h = this.zoomHor, s = this.zoomVert, t = p.plotLeft, o = p.plotTop, n = p.plotWidth, A = p.plotHeight, _ = this.mouseDownX || 0, D = this.mouseDownY || 0, W = B(i.panning) ? i.panning && i.panning.enabled : i.panning, P = i.panKey && c[i.panKey + "Key"], X = c.chartX, g = c.chartY, m = this.selectionMarker;
- if ((!m || !m.touch) && (X < t ? X = t : X > t + n && (X = t + n), g < o ? g = o : g > o + A && (g = o + A), this.hasDragged = Math.sqrt(Math.pow(_ - X, 2) + Math.pow(D - g, 2)), 10 < this.hasDragged)) {
- var L = p.isInsidePlot(_ - t, D - o, { visiblePlotOnly: !0 });
- !p.hasCartesianSeries && !p.mapView || !this.zoomX && !this.zoomY || !L || P || m || (this.selectionMarker = m = p.renderer.rect(t, o, h ? 1 : n, s ? 1 : A, 0).attr({ class: "highcharts-selection-marker", zIndex: 7 }).add(), p.styledMode || m.attr({ fill: i.selectionMarkerFill || H("#335cad").setOpacity(0.25).get() })), m && h && (h = X - _, m.attr({ width: Math.abs(h), x: (0 < h ? 0 : h) + _ })), m && s && (h = g - D, m.attr({ height: Math.abs(h), y: (0 < h ? 0 : h) + D })), L && !m && W && p.pan(c, i.panning);
- }
- }, a.prototype.dragStart = function(c) {
- var p = this.chart;
- p.mouseIsDown = c.type, p.cancelClick = !1, p.mouseDownX = this.mouseDownX = c.chartX, p.mouseDownY = this.mouseDownY = c.chartY;
- }, a.prototype.drop = function(c) {
- var p = this, i = this.chart, h = this.hasPinched;
- if (this.selectionMarker) {
- var s = this.selectionMarker, t = s.attr ? s.attr("x") : s.x, o = s.attr ? s.attr("y") : s.y, n = s.attr ? s.attr("width") : s.width, A = s.attr ? s.attr("height") : s.height, _ = { originalEvent: c, xAxis: [], yAxis: [], x: t, y: o, width: n, height: A }, D = !!i.mapView;
- (this.hasDragged || h) && (i.axes.forEach(function(W) {
- if (W.zoomEnabled && x(W.min) && (h || p[{ xAxis: "zoomX", yAxis: "zoomY" }[W.coll]]) && O(t) && O(o)) {
- var P = W.horiz, X = c.type === "touchend" ? W.minPixelPadding : 0, g = W.toValue((P ? t : o) + X);
- P = W.toValue((P ? t + n : o + A) - X), _[W.coll].push({ axis: W, min: Math.min(g, P), max: Math.max(g, P) }), D = !0;
- }
- }), D && E(i, "selection", _, function(W) {
- i.zoom(u(
- W,
- h ? { animation: !1 } : null
- ));
- })), O(i.index) && (this.selectionMarker = this.selectionMarker.destroy()), h && this.scaleGroups();
- }
- i && O(i.index) && (b(i.container, { cursor: i._cursor }), i.cancelClick = 10 < this.hasDragged, i.mouseIsDown = this.hasDragged = this.hasPinched = !1, this.pinchDown = []);
- }, a.prototype.findNearestKDPoint = function(c, p, i) {
- var h = this.chart, s = h.hoverPoint;
- if (h = h.tooltip, s && h && h.isStickyOnContact())
- return s;
- var t;
- return c.forEach(function(o) {
- var n = !(o.noSharedTooltip && p) && 0 > o.options.findNearestPointBy.indexOf("y");
- if (o = o.searchPoint(i, n), (n = B(o, !0) && o.series) && !(n = !B(t, !0))) {
- n = t.distX - o.distX;
- var A = t.dist - o.dist, _ = (o.series.group && o.series.group.zIndex) - (t.series.group && t.series.group.zIndex);
- n = 0 < (n !== 0 && p ? n : A !== 0 ? A : _ !== 0 ? _ : t.series.index > o.series.index ? -1 : 1);
- }
- n && (t = o);
- }), t;
- }, a.prototype.getChartCoordinatesFromPoint = function(c, p) {
- var i = c.series, h = i.xAxis;
- i = i.yAxis;
- var s = c.shapeArgs;
- if (h && i) {
- var t = w(c.clientX, c.plotX), o = c.plotY || 0;
- return c.isNode && s && O(s.x) && O(s.y) && (t = s.x, o = s.y), p ? { chartX: i.len + i.pos - o, chartY: h.len + h.pos - t } : { chartX: t + h.pos, chartY: o + i.pos };
- }
- if (s && s.x && s.y)
- return { chartX: s.x, chartY: s.y };
- }, a.prototype.getChartPosition = function() {
- if (this.chartPosition)
- return this.chartPosition;
- var c = this.chart.container, p = S(c);
- this.chartPosition = { left: p.left, top: p.top, scaleX: 1, scaleY: 1 };
- var i = c.offsetWidth;
- return c = c.offsetHeight, 2 < i && 2 < c && (this.chartPosition.scaleX = p.width / i, this.chartPosition.scaleY = p.height / c), this.chartPosition;
- }, a.prototype.getCoordinates = function(c) {
- var p = { xAxis: [], yAxis: [] };
- return this.chart.axes.forEach(function(i) {
- p[i.isXAxis ? "xAxis" : "yAxis"].push({ axis: i, value: i.toValue(c[i.horiz ? "chartX" : "chartY"]) });
- }), p;
- }, a.prototype.getHoverData = function(c, p, i, h, s, t) {
- var o = [];
- h = !(!h || !c);
- var n = { chartX: t ? t.chartX : void 0, chartY: t ? t.chartY : void 0, shared: s };
- E(this, "beforeGetHoverData", n);
- var A = p && !p.stickyTracking ? [p] : i.filter(function(D) {
- return n.filter ? n.filter(D) : D.visible && !(!s && D.directTouch) && w(D.options.enableMouseTracking, !0) && D.stickyTracking;
- }), _ = h || !t ? c : this.findNearestKDPoint(A, s, t);
- return p = _ && _.series, _ && (s && !p.noSharedTooltip ? (A = i.filter(function(D) {
- return n.filter ? n.filter(D) : D.visible && !(!s && D.directTouch) && w(D.options.enableMouseTracking, !0) && !D.noSharedTooltip;
- }), A.forEach(function(D) {
- var W = f(D.points, function(P) {
- return P.x === _.x && !P.isNull;
- });
- B(W) && (D.chart.isBoosting && (W = D.getPoint(W)), o.push(W));
- })) : o.push(_)), n = { hoverPoint: _ }, E(this, "afterGetHoverData", n), { hoverPoint: n.hoverPoint, hoverSeries: p, hoverPoints: o };
- }, a.prototype.getPointFromEvent = function(c) {
- c = c.target;
- for (var p; c && !p; )
- p = c.point, c = c.parentNode;
- return p;
- }, a.prototype.onTrackerMouseOut = function(c) {
- c = c.relatedTarget || c.toElement;
- var p = this.chart.hoverSeries;
- this.isDirectTouch = !1, !p || !c || p.stickyTracking || this.inClass(c, "highcharts-tooltip") || this.inClass(c, "highcharts-series-" + p.index) && this.inClass(c, "highcharts-tracker") || p.onMouseOut();
- }, a.prototype.inClass = function(c, p) {
- for (var i; c; ) {
- if (i = N(c, "class")) {
- if (i.indexOf(p) !== -1)
- return !0;
- if (i.indexOf("highcharts-container") !== -1)
- return !1;
- }
- c = c.parentNode;
- }
- }, a.prototype.init = function(c, p) {
- this.options = p, this.chart = c, this.runChartClick = !(!p.chart.events || !p.chart.events.click), this.pinchDown = [], this.lastValidTouch = {}, I && (c.tooltip = new I(c, p.tooltip), this.followTouchMove = w(p.tooltip.followTouchMove, !0)), this.setDOMEvents();
- }, a.prototype.normalize = function(c, p) {
- var i = c.touches, h = i ? i.length ? i.item(0) : w(i.changedTouches, c.changedTouches)[0] : c;
- return p || (p = this.getChartPosition()), i = h.pageX - p.left, h = h.pageY - p.top, i /= p.scaleX, h /= p.scaleY, u(c, { chartX: Math.round(i), chartY: Math.round(h) });
- }, a.prototype.onContainerClick = function(c) {
- var p = this.chart, i = p.hoverPoint;
- c = this.normalize(c);
- var h = p.plotLeft, s = p.plotTop;
- p.cancelClick || (i && this.inClass(c.target, "highcharts-tracker") ? (E(i.series, "click", u(c, { point: i })), p.hoverPoint && i.firePointEvent("click", c)) : (u(c, this.getCoordinates(c)), p.isInsidePlot(c.chartX - h, c.chartY - s, { visiblePlotOnly: !0 }) && E(p, "click", c)));
- }, a.prototype.onContainerMouseDown = function(c) {
- var p = ((c.buttons || c.button) & 1) === 1;
- c = this.normalize(c), j.isFirefox && c.button !== 0 && this.onContainerMouseMove(c), (typeof c.button > "u" || p) && (this.zoomOption(c), p && c.preventDefault && c.preventDefault(), this.dragStart(c));
- }, a.prototype.onContainerMouseLeave = function(c) {
- var p = U[w(a.hoverChartIndex, -1)], i = this.chart.tooltip;
- i && i.shouldStickOnContact() && this.inClass(c.relatedTarget, "highcharts-tooltip-container") || (c = this.normalize(c), p && (c.relatedTarget || c.toElement) && (p.pointer.reset(), p.pointer.chartPosition = void 0), i && !i.isHidden && this.reset());
- }, a.prototype.onContainerMouseEnter = function(c) {
- delete this.chartPosition;
- }, a.prototype.onContainerMouseMove = function(c) {
- var p = this.chart;
- c = this.normalize(c), this.setHoverChartIndex(), c.preventDefault || (c.returnValue = !1), (p.mouseIsDown === "mousedown" || this.touchSelect(c)) && this.drag(c), p.openMenu || !this.inClass(c.target, "highcharts-tracker") && !p.isInsidePlot(c.chartX - p.plotLeft, c.chartY - p.plotTop, { visiblePlotOnly: !0 }) || (this.inClass(c.target, "highcharts-no-tooltip") ? this.reset(!1, 0) : this.runPointActions(c));
- }, a.prototype.onDocumentTouchEnd = function(c) {
- var p = U[w(
- a.hoverChartIndex,
- -1
- )];
- p && p.pointer.drop(c);
- }, a.prototype.onContainerTouchMove = function(c) {
- this.touchSelect(c) ? this.onContainerMouseMove(c) : this.touch(c);
- }, a.prototype.onContainerTouchStart = function(c) {
- this.touchSelect(c) ? this.onContainerMouseDown(c) : (this.zoomOption(c), this.touch(c, !0));
- }, a.prototype.onDocumentMouseMove = function(c) {
- var p = this.chart, i = this.chartPosition;
- c = this.normalize(c, i);
- var h = p.tooltip;
- !i || h && h.isStickyOnContact() || p.isInsidePlot(c.chartX - p.plotLeft, c.chartY - p.plotTop, { visiblePlotOnly: !0 }) || this.inClass(c.target, "highcharts-tracker") || this.reset();
- }, a.prototype.onDocumentMouseUp = function(c) {
- var p = U[w(a.hoverChartIndex, -1)];
- p && p.pointer.drop(c);
- }, a.prototype.pinch = function(c) {
- var p = this, i = p.chart, h = p.pinchDown, s = c.touches || [], t = s.length, o = p.lastValidTouch, n = p.hasZoom, A = {}, _ = t === 1 && (p.inClass(c.target, "highcharts-tracker") && i.runTrackerClick || p.runChartClick), D = {}, W = p.selectionMarker;
- 1 < t ? p.initiated = !0 : t === 1 && this.followTouchMove && (p.initiated = !1), n && p.initiated && !_ && c.cancelable !== !1 && c.preventDefault(), [].map.call(s, function(P) {
- return p.normalize(P);
- }), c.type === "touchstart" ? ([].forEach.call(s, function(P, X) {
- h[X] = { chartX: P.chartX, chartY: P.chartY };
- }), o.x = [h[0].chartX, h[1] && h[1].chartX], o.y = [h[0].chartY, h[1] && h[1].chartY], i.axes.forEach(function(P) {
- if (P.zoomEnabled) {
- var X = i.bounds[P.horiz ? "h" : "v"], g = P.minPixelPadding, m = P.toPixels(Math.min(w(P.options.min, P.dataMin), P.dataMin)), L = P.toPixels(Math.max(w(P.options.max, P.dataMax), P.dataMax)), Y = Math.max(m, L);
- X.min = Math.min(P.pos, Math.min(
- m,
- L
- ) - g), X.max = Math.max(P.pos + P.len, Y + g);
- }
- }), p.res = !0) : p.followTouchMove && t === 1 ? this.runPointActions(p.normalize(c)) : h.length && (E(i, "touchpan", { originalEvent: c }, function() {
- W || (p.selectionMarker = W = u({ destroy: F, touch: !0 }, i.plotBox)), p.pinchTranslate(h, s, A, W, D, o), p.hasPinched = n, p.scaleGroups(A, D);
- }), p.res && (p.res = !1, this.reset(!1, 0)));
- }, a.prototype.pinchTranslate = function(c, p, i, h, s, t) {
- this.zoomHor && this.pinchTranslateDirection(!0, c, p, i, h, s, t), this.zoomVert && this.pinchTranslateDirection(!1, c, p, i, h, s, t);
- }, a.prototype.pinchTranslateDirection = function(c, p, i, h, s, t, o, n) {
- var A = this.chart, _ = c ? "x" : "y", D = c ? "X" : "Y", W = "chart" + D, P = c ? "width" : "height", X = A["plot" + (c ? "Left" : "Top")], g = A.inverted, m = A.bounds[c ? "h" : "v"], L = p.length === 1, Y = p[0][W], V = !L && p[1][W];
- p = function() {
- typeof $ == "number" && 20 < Math.abs(Y - V) && (G = n || Math.abs(z - $) / Math.abs(Y - V)), k = (X - z) / G + Y, Q = A["plot" + (c ? "Width" : "Height")] / G;
- };
- var Q, k, G = n || 1, z = i[0][W], $ = !L && i[1][W];
- if (p(), i = k, i < m.min) {
- i = m.min;
- var q = !0;
- } else
- i + Q > m.max && (i = m.max - Q, q = !0);
- q ? (z -= 0.8 * (z - o[_][0]), typeof $ == "number" && ($ -= 0.8 * ($ - o[_][1])), p()) : o[_] = [z, $], g || (t[_] = k - X, t[P] = Q), t = g ? 1 / G : G, s[P] = Q, s[_] = i, h[g ? c ? "scaleY" : "scaleX" : "scale" + D] = G, h["translate" + D] = t * X + (z - t * Y);
- }, a.prototype.reset = function(c, p) {
- var i = this.chart, h = i.hoverSeries, s = i.hoverPoint, t = i.hoverPoints, o = i.tooltip, n = o && o.shared ? t : s;
- c && n && v(n).forEach(function(A) {
- A.series.isCartesian && typeof A.plotX > "u" && (c = !1);
- }), c ? o && n && v(n).length && (o.refresh(n), o.shared && t ? t.forEach(function(A) {
- A.setState(A.state, !0), A.series.isCartesian && (A.series.xAxis.crosshair && A.series.xAxis.drawCrosshair(
- null,
- A
- ), A.series.yAxis.crosshair && A.series.yAxis.drawCrosshair(null, A));
- }) : s && (s.setState(s.state, !0), i.axes.forEach(function(A) {
- A.crosshair && s.series[A.coll] === A && A.drawCrosshair(null, s);
- }))) : (s && s.onMouseOut(), t && t.forEach(function(A) {
- A.setState();
- }), h && h.onMouseOut(), o && o.hide(p), this.unDocMouseMove && (this.unDocMouseMove = this.unDocMouseMove()), i.axes.forEach(function(A) {
- A.hideCrosshair();
- }), this.hoverX = i.hoverPoints = i.hoverPoint = null);
- }, a.prototype.runPointActions = function(c, p) {
- var i = this.chart, h = i.tooltip && i.tooltip.options.enabled ? i.tooltip : void 0, s = h ? h.shared : !1, t = p || i.hoverPoint, o = t && t.series || i.hoverSeries;
- p = this.getHoverData(t, o, i.series, (!c || c.type !== "touchmove") && (!!p || o && o.directTouch && this.isDirectTouch), s, c), t = p.hoverPoint, o = p.hoverSeries;
- var n = p.hoverPoints;
- if (p = o && o.tooltipOptions.followPointer && !o.tooltipOptions.split, s = s && o && !o.noSharedTooltip, t && (t !== i.hoverPoint || h && h.isHidden)) {
- if ((i.hoverPoints || []).forEach(function(A) {
- n.indexOf(A) === -1 && A.setState();
- }), i.hoverSeries !== o && o.onMouseOver(), this.applyInactiveState(n), (n || []).forEach(function(A) {
- A.setState("hover");
- }), i.hoverPoint && i.hoverPoint.firePointEvent("mouseOut"), !t.series)
- return;
- i.hoverPoints = n, i.hoverPoint = t, t.firePointEvent("mouseOver"), h && h.refresh(s ? n : t, c);
- } else
- p && h && !h.isHidden && (t = h.getAnchor([{}], c), i.isInsidePlot(t[0], t[1], { visiblePlotOnly: !0 }) && h.updatePosition({ plotX: t[0], plotY: t[1] }));
- this.unDocMouseMove || (this.unDocMouseMove = R(i.container.ownerDocument, "mousemove", function(A) {
- var _ = U[a.hoverChartIndex];
- _ && _.pointer.onDocumentMouseMove(A);
- }), this.eventsToUnbind.push(this.unDocMouseMove)), i.axes.forEach(function(A) {
- var _ = w((A.crosshair || {}).snap, !0), D;
- _ && ((D = i.hoverPoint) && D.series[A.coll] === A || (D = f(n, function(W) {
- return W.series[A.coll] === A;
- }))), D || !_ ? A.drawCrosshair(c, D) : A.hideCrosshair();
- });
- }, a.prototype.scaleGroups = function(c, p) {
- var i = this.chart;
- i.series.forEach(function(h) {
- var s = c || h.getPlotBox();
- h.group && (h.xAxis && h.xAxis.zoomEnabled || i.mapView) && (h.group.attr(s), h.markerGroup && (h.markerGroup.attr(s), h.markerGroup.clip(p ? i.clipRect : null)), h.dataLabelsGroup && h.dataLabelsGroup.attr(s));
- }), i.clipRect.attr(p || i.clipBox);
- }, a.prototype.setDOMEvents = function() {
- var c = this, p = this.chart.container, i = p.ownerDocument;
- p.onmousedown = this.onContainerMouseDown.bind(this), p.onmousemove = this.onContainerMouseMove.bind(this), p.onclick = this.onContainerClick.bind(this), this.eventsToUnbind.push(R(p, "mouseenter", this.onContainerMouseEnter.bind(this))), this.eventsToUnbind.push(R(p, "mouseleave", this.onContainerMouseLeave.bind(this))), a.unbindDocumentMouseUp || (a.unbindDocumentMouseUp = R(i, "mouseup", this.onDocumentMouseUp.bind(this)));
- for (var h = this.chart.renderTo.parentElement; h && h.tagName !== "BODY"; )
- this.eventsToUnbind.push(R(h, "scroll", function() {
- delete c.chartPosition;
- })), h = h.parentElement;
- j.hasTouch && (this.eventsToUnbind.push(R(p, "touchstart", this.onContainerTouchStart.bind(this), { passive: !1 })), this.eventsToUnbind.push(R(p, "touchmove", this.onContainerTouchMove.bind(this), { passive: !1 })), a.unbindDocumentTouchEnd || (a.unbindDocumentTouchEnd = R(i, "touchend", this.onDocumentTouchEnd.bind(this), { passive: !1 })));
- }, a.prototype.setHoverChartIndex = function() {
- var c = this.chart, p = j.charts[w(a.hoverChartIndex, -1)];
- p && p !== c && p.pointer.onContainerMouseLeave({ relatedTarget: !0 }), p && p.mouseIsDown || (a.hoverChartIndex = c.index);
- }, a.prototype.touch = function(c, p) {
- var i = this.chart;
- if (this.setHoverChartIndex(), c.touches.length === 1)
- if (c = this.normalize(c), i.isInsidePlot(c.chartX - i.plotLeft, c.chartY - i.plotTop, { visiblePlotOnly: !0 }) && !i.openMenu) {
- if (p && this.runPointActions(c), c.type === "touchmove") {
- p = this.pinchDown;
- var h = p[0] ? 4 <= Math.sqrt(Math.pow(p[0].chartX - c.chartX, 2) + Math.pow(p[0].chartY - c.chartY, 2)) : !1;
- }
- w(h, !0) && this.pinch(c);
- } else
- p && this.reset();
- else
- c.touches.length === 2 && this.pinch(c);
- }, a.prototype.touchSelect = function(c) {
- return !(!this.chart.options.chart.zoomBySingleTouch || !c.touches || c.touches.length !== 1);
- }, a.prototype.zoomOption = function(c) {
- var p = this.chart, i = p.options.chart;
- p = p.inverted;
- var h = i.zoomType || "";
- /touch/.test(c.type) && (h = w(i.pinchType, h)), this.zoomX = c = /x/.test(h), this.zoomY = i = /y/.test(h), this.zoomHor = c && !p || i && p, this.zoomVert = i && !p || c && p, this.hasZoom = c || i;
- }, a;
- }(), y;
- }), T(l, "Core/MSPointer.js", [l["Core/Globals.js"], l["Core/Pointer.js"], l["Core/Utilities.js"]], function(y, j, I) {
- function Z() {
- var M = [];
- return M.item = function(S) {
- return this[S];
- }, f(O, function(S) {
- M.push({ pageX: S.pageX, pageY: S.pageY, target: S.target });
- }), M;
- }
- function H(M, S, w, v) {
- var a = F[j.hoverChartIndex || NaN];
- M.pointerType !== "touch" && M.pointerType !== M.MSPOINTER_TYPE_TOUCH || !a || (a = a.pointer, v(M), a[S]({ type: w, target: M.currentTarget, preventDefault: N, touches: Z() }));
- }
- var U = this && this.__extends || function() {
- var M = function(S, w) {
- return M = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(v, a) {
- v.__proto__ = a;
- } || function(v, a) {
- for (var c in a)
- a.hasOwnProperty(c) && (v[c] = a[c]);
- }, M(S, w);
- };
- return function(S, w) {
- function v() {
- this.constructor = S;
- }
- M(S, w), S.prototype = w === null ? Object.create(w) : (v.prototype = w.prototype, new v());
- };
- }(), F = y.charts, R = y.doc, N = y.noop, b = y.win, x = I.addEvent, u = I.css, f = I.objectEach, E = I.removeEvent, O = {}, B = !!b.PointerEvent;
- return function(M) {
- function S() {
- return M !== null && M.apply(this, arguments) || this;
- }
- return U(S, M), S.isRequired = function() {
- return !(y.hasTouch || !b.PointerEvent && !b.MSPointerEvent);
- }, S.prototype.batchMSEvents = function(w) {
- w(this.chart.container, B ? "pointerdown" : "MSPointerDown", this.onContainerPointerDown), w(this.chart.container, B ? "pointermove" : "MSPointerMove", this.onContainerPointerMove), w(R, B ? "pointerup" : "MSPointerUp", this.onDocumentPointerUp);
- }, S.prototype.destroy = function() {
- this.batchMSEvents(E), M.prototype.destroy.call(this);
- }, S.prototype.init = function(w, v) {
- M.prototype.init.call(this, w, v), this.hasZoom && u(w.container, { "-ms-touch-action": "none", "touch-action": "none" });
- }, S.prototype.onContainerPointerDown = function(w) {
- H(w, "onContainerTouchStart", "touchstart", function(v) {
- O[v.pointerId] = { pageX: v.pageX, pageY: v.pageY, target: v.currentTarget };
- });
- }, S.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);
- });
- }, S.prototype.onDocumentPointerUp = function(w) {
- H(w, "onDocumentTouchEnd", "touchend", function(v) {
- delete O[v.pointerId];
- });
- }, S.prototype.setDOMEvents = function() {
- M.prototype.setDOMEvents.call(this), (this.hasZoom || this.followTouchMove) && this.batchMSEvents(x);
- }, S;
- }(j);
- }), T(l, "Core/Legend/Legend.js", [
- l["Core/Animation/AnimationUtilities.js"],
- l["Core/FormatUtilities.js"],
- l["Core/Globals.js"],
- l["Core/Series/Point.js"],
- l["Core/Renderer/RendererUtilities.js"],
- l["Core/Utilities.js"]
- ], function(y, j, I, Z, H, U) {
- var F = y.animObject, R = y.setAnimation, N = j.format;
- y = I.isFirefox;
- var b = I.marginNames;
- I = I.win;
- var x = H.distribute, u = U.addEvent, f = U.createElement, E = U.css, O = U.defined, B = U.discardElement, M = U.find, S = U.fireEvent, w = U.isNumber, v = U.merge, a = U.pick, c = U.relativeLength, p = U.stableSort, i = U.syncTimeout;
- return H = U.wrap, U = function() {
- function h(s, 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 = s, this.init(s, t);
- }
- return h.prototype.init = function(s, t) {
- this.chart = s, this.setOptions(t), t.enabled && (this.render(), u(this.chart, "endResize", function() {
- this.legend.positionCheckboxes();
- }), this.proximate ? this.unchartrender = u(this.chart, "render", function() {
- this.legend.proximatePositions(), this.legend.positionItems();
- }) : this.unchartrender && this.unchartrender());
- }, h.prototype.setOptions = function(s) {
- var t = a(s.padding, 8);
- this.options = s, this.chart.styledMode || (this.itemStyle = s.itemStyle, this.itemHiddenStyle = v(this.itemStyle, s.itemHiddenStyle)), this.itemMarginTop = s.itemMarginTop || 0, this.itemMarginBottom = s.itemMarginBottom || 0, this.padding = t, this.initialItemY = t - 5, this.symbolWidth = a(
- s.symbolWidth,
- 16
- ), this.pages = [], this.proximate = s.layout === "proximate" && !this.chart.inverted, this.baseline = void 0;
- }, h.prototype.update = function(s, t) {
- var o = this.chart;
- this.setOptions(v(!0, this.options, s)), this.destroy(), o.isDirtyLegend = o.isDirtyBox = !0, a(t, !0) && o.redraw(), S(this, "afterUpdate");
- }, h.prototype.colorizeItem = function(s, t) {
- if (s.legendGroup[t ? "removeClass" : "addClass"]("highcharts-legend-item-hidden"), !this.chart.styledMode) {
- var o = this.options, n = s.legendItem, A = s.legendLine, _ = s.legendSymbol, D = this.itemHiddenStyle.color;
- o = t ? o.itemStyle.color : D;
- var W = t && s.color || D, P = s.options && s.options.marker, X = { fill: W };
- n && n.css({ fill: o, color: o }), A && A.attr({ stroke: W }), _ && (P && _.isMarker && (X = s.pointAttribs(), t || (X.stroke = X.fill = D)), _.attr(X));
- }
- S(this, "afterColorizeItem", { item: s, visible: t });
- }, h.prototype.positionItems = function() {
- this.allItems.forEach(this.positionItem, this), this.chart.isResizing || this.positionCheckboxes();
- }, h.prototype.positionItem = function(s) {
- var t = this, o = this.options, n = o.symbolPadding, A = !o.rtl, _ = s._legendItemPos;
- o = _[0], _ = _[1];
- var D = s.checkbox, W = s.legendGroup;
- W && W.element && (n = { translateX: A ? o : this.legendWidth - o - 2 * n - 4, translateY: _ }, A = function() {
- S(t, "afterPositionItem", { item: s });
- }, O(W.translateY) ? W.animate(n, void 0, A) : (W.attr(n), A())), D && (D.x = o, D.y = _);
- }, h.prototype.destroyItem = function(s) {
- var t = s.checkbox;
- ["legendItem", "legendLine", "legendSymbol", "legendGroup"].forEach(function(o) {
- s[o] && (s[o] = s[o].destroy());
- }), t && B(s.checkbox);
- }, h.prototype.destroy = function() {
- function s(t) {
- this[t] && (this[t] = this[t].destroy());
- }
- this.getAllItems().forEach(function(t) {
- [
- "legendItem",
- "legendGroup"
- ].forEach(s, t);
- }), "clipRect up down pager nav box title group".split(" ").forEach(s, this), this.display = null;
- }, h.prototype.positionCheckboxes = function() {
- var s = this.group && this.group.alignAttr, t = this.clipHeight || this.legendHeight, o = this.titleHeight;
- if (s) {
- var n = s.translateY;
- this.allItems.forEach(function(A) {
- var _ = A.checkbox;
- if (_) {
- var D = n + o + _.y + (this.scrollOffset || 0) + 3;
- E(_, { left: s.translateX + A.checkboxOffset + _.x - 20 + "px", top: D + "px", display: this.proximate || D > n - 6 && D < n + t - 6 ? "" : "none" });
- }
- }, this);
- }
- }, h.prototype.renderTitle = function() {
- var s = this.options, t = this.padding, o = s.title, n = 0;
- o.text && (this.title || (this.title = this.chart.renderer.label(o.text, t - 3, t - 4, null, null, null, s.useHTML, null, "legend-title").attr({ zIndex: 1 }), this.chart.styledMode || this.title.css(o.style), this.title.add(this.group)), o.width || this.title.css({ width: this.maxLegendWidth + "px" }), s = this.title.getBBox(), n = s.height, this.offsetWidth = s.width, this.contentGroup.attr({ translateY: n })), this.titleHeight = n;
- }, h.prototype.setText = function(s) {
- var t = this.options;
- s.legendItem.attr({ text: t.labelFormat ? N(t.labelFormat, s, this.chart) : t.labelFormatter.call(s) });
- }, h.prototype.renderItem = function(s) {
- var t = this.chart, o = t.renderer, n = this.options, A = this.symbolWidth, _ = n.symbolPadding || 0, D = this.itemStyle, W = this.itemHiddenStyle, P = n.layout === "horizontal" ? a(n.itemDistance, 20) : 0, X = !n.rtl, g = !s.series, m = !g && s.series.drawLegendSymbol ? s.series : s, L = m.options, Y = this.createCheckboxForItem && L && L.showCheckbox, V = n.useHTML, Q = s.options.className, k = s.legendItem;
- L = A + _ + P + (Y ? 20 : 0), k || (s.legendGroup = o.g("legend-item").addClass("highcharts-" + m.type + "-series highcharts-color-" + s.colorIndex + (Q ? " " + Q : "") + (g ? " highcharts-series-" + s.index : "")).attr({ zIndex: 1 }).add(this.scrollGroup), s.legendItem = k = o.text("", X ? A + _ : -_, this.baseline || 0, V), t.styledMode || k.css(v(s.visible ? D : W)), k.attr({ align: X ? "left" : "right", zIndex: 2 }).add(s.legendGroup), this.baseline || (this.fontMetrics = o.fontMetrics(t.styledMode ? 12 : D.fontSize, k), this.baseline = this.fontMetrics.f + 3 + this.itemMarginTop, k.attr("y", this.baseline), this.symbolHeight = n.symbolHeight || this.fontMetrics.f, n.squareSymbol && (this.symbolWidth = a(n.symbolWidth, Math.max(this.symbolHeight, 16)), L = this.symbolWidth + _ + P + (Y ? 20 : 0), X && k.attr("x", this.symbolWidth + _))), m.drawLegendSymbol(this, s), this.setItemEvents && this.setItemEvents(s, k, V)), Y && !s.checkbox && this.createCheckboxForItem && this.createCheckboxForItem(s), this.colorizeItem(s, s.visible), !t.styledMode && D.width || k.css({ width: (n.itemWidth || this.widthOption || t.spacingBox.width) - L + "px" }), this.setText(s), t = k.getBBox(), o = this.fontMetrics && this.fontMetrics.h || 0, s.itemWidth = s.checkboxOffset = n.itemWidth || s.legendItemWidth || t.width + L, this.maxItemWidth = Math.max(this.maxItemWidth, s.itemWidth), this.totalItemWidth += s.itemWidth, this.itemHeight = s.itemHeight = Math.round(s.legendItemHeight || (t.height > 1.5 * o ? t.height : o));
- }, h.prototype.layoutItem = function(s) {
- var t = this.options, o = this.padding, n = t.layout === "horizontal", A = s.itemHeight, _ = this.itemMarginBottom, D = this.itemMarginTop, W = n ? a(t.itemDistance, 20) : 0, P = this.maxLegendWidth;
- t = t.alignColumns && this.totalItemWidth > P ? this.maxItemWidth : s.itemWidth, n && this.itemX - o + t > P && (this.itemX = o, this.lastLineHeight && (this.itemY += D + this.lastLineHeight + _), this.lastLineHeight = 0), this.lastItemY = D + this.itemY + _, this.lastLineHeight = Math.max(A, this.lastLineHeight), s._legendItemPos = [this.itemX, this.itemY], n ? this.itemX += t : (this.itemY += D + A + _, this.lastLineHeight = A), this.offsetWidth = this.widthOption || Math.max((n ? this.itemX - o - (s.checkbox ? 0 : W) : t) + o, this.offsetWidth);
- }, h.prototype.getAllItems = function() {
- var s = [];
- return this.chart.series.forEach(function(t) {
- var o = t && t.options;
- t && a(o.showInLegend, O(o.linkedTo) ? !1 : void 0, !0) && (s = s.concat(t.legendItems || (o.legendType === "point" ? t.data : t)));
- }), S(this, "afterGetAllItems", { allItems: s }), s;
- }, h.prototype.getAlignment = function() {
- var s = this.options;
- return this.proximate ? s.align.charAt(0) + "tv" : s.floating ? "" : s.align.charAt(0) + s.verticalAlign.charAt(0) + s.layout.charAt(0);
- }, h.prototype.adjustMargins = function(s, t) {
- var o = this.chart, n = this.options, A = this.getAlignment();
- A && [/(lth|ct|rth)/, /(rtv|rm|rbv)/, /(rbh|cb|lbh)/, /(lbv|lm|ltv)/].forEach(function(_, D) {
- _.test(A) && !O(s[D]) && (o[b[D]] = Math.max(o[b[D]], o.legend[(D + 1) % 2 ? "legendHeight" : "legendWidth"] + [1, -1, -1, 1][D] * n[D % 2 ? "x" : "y"] + a(n.margin, 12) + t[D] + (o.titleOffset[D] || 0)));
- });
- }, h.prototype.proximatePositions = function() {
- var s = this.chart, t = [], o = this.options.align === "left";
- this.allItems.forEach(function(n) {
- var A, _ = o;
- if (n.yAxis) {
- n.xAxis.options.reversed && (_ = !_), n.points && (A = M(_ ? n.points : n.points.slice(0).reverse(), function(W) {
- return w(W.plotY);
- })), _ = this.itemMarginTop + n.legendItem.getBBox().height + this.itemMarginBottom;
- var D = n.yAxis.top - s.plotTop;
- n.visible ? (A = A ? A.plotY : n.yAxis.height, A += D - 0.3 * _) : A = D + n.yAxis.height, t.push({ target: A, size: _, item: n });
- }
- }, this), x(t, s.plotHeight).forEach(function(n) {
- n.item._legendItemPos && (n.item._legendItemPos[1] = s.plotTop - s.spacing[0] + n.pos);
- });
- }, h.prototype.render = function() {
- var s = this.chart, t = s.renderer, o = this.options, n = this.padding, A = this.getAllItems(), _ = this.group, D = this.box;
- this.itemX = n, this.itemY = this.initialItemY, this.lastItemY = this.offsetWidth = 0, this.widthOption = c(o.width, s.spacingBox.width - n);
- var W = s.spacingBox.width - 2 * n - o.x;
- -1 < ["rm", "lm"].indexOf(this.getAlignment().substring(0, 2)) && (W /= 2), this.maxLegendWidth = this.widthOption || W, _ || (this.group = _ = t.g("legend").addClass(o.className || "").attr({ zIndex: 7 }).add(), this.contentGroup = t.g().attr({ zIndex: 1 }).add(_), this.scrollGroup = t.g().add(this.contentGroup)), this.renderTitle(), p(A, function(X, g) {
- return (X.options && X.options.legendIndex || 0) - (g.options && g.options.legendIndex || 0);
- }), o.reversed && A.reverse(), this.allItems = A, this.display = W = !!A.length, this.itemHeight = this.totalItemWidth = this.maxItemWidth = this.lastLineHeight = 0, A.forEach(this.renderItem, this), A.forEach(this.layoutItem, this), A = (this.widthOption || this.offsetWidth) + n;
- var P = this.lastItemY + this.lastLineHeight + this.titleHeight;
- P = this.handleOverflow(P), P += n, D || (this.box = D = t.rect().addClass("highcharts-legend-box").attr({ r: o.borderRadius }).add(_), D.isNew = !0), s.styledMode || D.attr({ stroke: o.borderColor, "stroke-width": o.borderWidth || 0, fill: o.backgroundColor || "none" }).shadow(o.shadow), 0 < A && 0 < P && (D[D.isNew ? "attr" : "animate"](D.crisp.call({}, { x: 0, y: 0, width: A, height: P }, D.strokeWidth())), D.isNew = !1), D[W ? "show" : "hide"](), s.styledMode && _.getStyle("display") === "none" && (A = P = 0), this.legendWidth = A, this.legendHeight = P, W && this.align(), this.proximate || this.positionItems(), S(this, "afterRender");
- }, h.prototype.align = function(s) {
- s === void 0 && (s = this.chart.spacingBox);
- var t = this.chart, o = this.options, n = s.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 !== s.y && (s = v(s, { y: n })), this.group.align(v(o, { width: this.legendWidth, height: this.legendHeight, verticalAlign: this.proximate ? "top" : o.verticalAlign }), !0, s);
- }, h.prototype.handleOverflow = function(s) {
- var t = this, o = this.chart, n = o.renderer, A = this.options, _ = A.y, D = A.verticalAlign === "top", W = this.padding, P = A.maxHeight, X = A.navigation, g = a(X.animation, !0), m = X.arrowSize || 12, L = this.pages, Y = this.allItems, V = function(q) {
- typeof q == "number" ? $.attr({ height: q }) : $ && (t.clipRect = $.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(z), o.styledMode || t[q].attr("fill", "rgba(0,0,0,0.0001)"), t[q];
- }, k, G;
- _ = o.spacingBox.height + (D ? -_ : _) - W;
- var z = this.nav, $ = this.clipRect;
- return A.layout !== "horizontal" || A.verticalAlign === "middle" || A.floating || (_ /= 2), P && (_ = Math.min(_, P)), L.length = 0, s && 0 < _ && s > _ && X.enabled !== !1 ? (this.clipHeight = k = Math.max(_ - 20 - this.titleHeight - W, 0), this.currentPage = a(this.currentPage, 1), this.fullHeight = s, Y.forEach(function(q, it) {
- var et = q._legendItemPos[1], nt = Math.round(q.legendItem.getBBox().height), rt = L.length;
- (!rt || et - L[rt - 1] > k && (G || et) !== L[rt - 1]) && (L.push(G || et), rt++), q.pageIx = rt - 1, G && (Y[it - 1].pageIx = rt - 1), it === Y.length - 1 && et + nt - L[rt - 1] > k && nt <= k && (L.push(et), q.pageIx = rt), et !== G && (G = et);
- }), $ || ($ = t.clipRect = n.clipRect(0, W, 9999, 0), t.contentGroup.clip($)), V(k), z || (this.nav = z = n.g().attr({ zIndex: 1 }).add(this.group), this.up = n.symbol("triangle", 0, 0, m, m).add(z), Q("upTracker").on(
- "click",
- function() {
- t.scroll(-1, g);
- }
- ), this.pager = n.text("", 15, 10).addClass("highcharts-legend-navigation"), o.styledMode || this.pager.css(X.style), this.pager.add(z), this.down = n.symbol("triangle-down", 0, 0, m, m).add(z), Q("downTracker").on("click", function() {
- t.scroll(1, g);
- })), t.scroll(0), s = _) : z && (V(), this.nav = z.destroy(), this.scrollGroup.attr({ translateY: 1 }), this.clipHeight = 0), s;
- }, h.prototype.scroll = function(s, t) {
- var o = this, n = this.chart, A = this.pages, _ = A.length, D = this.clipHeight, W = this.options.navigation, P = this.pager, X = this.padding, g = this.currentPage + s;
- g > _ && (g = _), 0 < g && (typeof t < "u" && R(t, n), this.nav.attr({ translateX: X, translateY: D + 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" });
- }), P.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 = -A[g - 1] + this.initialItemY, this.scrollGroup.animate({ translateY: this.scrollOffset }), this.currentPage = g, this.positionCheckboxes(), s = F(a(t, n.renderer.globalAnimation, !0)), i(function() {
- S(o, "afterScroll", { currentPage: g });
- }, s.duration));
- }, h.prototype.setItemEvents = function(s, t, o) {
- var n = this, A = n.chart.renderer.boxWrapper, _ = s instanceof Z, D = "highcharts-legend-" + (_ ? "point" : "series") + "-active", W = n.chart.styledMode, P = function(X) {
- n.allItems.forEach(function(g) {
- s !== g && [g].concat(g.linkedSeries || []).forEach(function(m) {
- m.setState(X, !_);
- });
- });
- };
- (o ? [t, s.legendSymbol] : [s.legendGroup]).forEach(function(X) {
- X && X.on("mouseover", function() {
- s.visible && P("inactive"), s.setState("hover"), s.visible && A.addClass(D), W || t.css(n.options.itemHoverStyle);
- }).on("mouseout", function() {
- n.chart.styledMode || t.css(v(s.visible ? n.itemStyle : n.itemHiddenStyle)), P(""), A.removeClass(D), s.setState();
- }).on("click", function(g) {
- var m = function() {
- s.setVisible && s.setVisible(), P(s.visible ? "inactive" : "");
- };
- A.removeClass(D), g = { browserEvent: g }, s.firePointEvent ? s.firePointEvent("legendItemClick", g, m) : S(s, "legendItemClick", g, m);
- });
- });
- }, h.prototype.createCheckboxForItem = function(s) {
- s.checkbox = f(
- "input",
- { type: "checkbox", className: "highcharts-legend-checkbox", checked: s.selected, defaultChecked: s.selected },
- this.options.itemCheckboxStyle,
- this.chart.container
- ), u(s.checkbox, "click", function(t) {
- S(s.series || s, "checkboxClick", { checked: t.target.checked, item: s }, function() {
- s.select();
- });
- });
- }, h;
- }(), (/Trident\/7\.0/.test(I.navigator && I.navigator.userAgent) || y) && H(U.prototype, "positionItem", function(h, s) {
- var t = this, o = function() {
- s._legendItemPos && h.call(t, s);
- };
- o(), t.bubbleLegend || setTimeout(o);
- }), U;
- }), T(
- l,
- "Core/Series/SeriesRegistry.js",
- [l["Core/Globals.js"], l["Core/DefaultOptions.js"], l["Core/Series/Point.js"], l["Core/Utilities.js"]],
- function(y, j, I, Z) {
- var H = j.defaultOptions, U = Z.error, F = Z.extendClass, R = Z.merge, N;
- return function(b) {
- function x(u, f) {
- var E = H.plotOptions || {}, O = f.defaultOptions;
- f.prototype.pointClass || (f.prototype.pointClass = I), f.prototype.type = u, O && (E[u] = O), b.seriesTypes[u] = f;
- }
- b.seriesTypes = y.seriesTypes, b.getSeries = function(u, f) {
- f === void 0 && (f = {});
- var E = u.options.chart;
- E = f.type || E.type || E.defaultSeriesType || "";
- var O = b.seriesTypes[E];
- return b || U(17, !0, u, { missingModuleFor: E }), E = new O(), typeof E.init == "function" && E.init(u, f), E;
- }, b.registerSeriesType = x, b.seriesType = function(u, f, E, O, B) {
- var M = H.plotOptions || {};
- return f = f || "", M[u] = R(M[f], E), x(u, F(b.seriesTypes[f] || function() {
- }, O)), b.seriesTypes[u].prototype.type = u, B && (b.seriesTypes[u].prototype.pointClass = F(I, B)), b.seriesTypes[u];
- };
- }(N || (N = {})), N;
- }
- ), T(l, "Core/Chart/Chart.js", [
- l["Core/Animation/AnimationUtilities.js"],
- l["Core/Axis/Axis.js"],
- l["Core/FormatUtilities.js"],
- l["Core/Foundation.js"],
- l["Core/Globals.js"],
- l["Core/Legend/Legend.js"],
- l["Core/MSPointer.js"],
- l["Core/DefaultOptions.js"],
- l["Core/Pointer.js"],
- l["Core/Renderer/RendererRegistry.js"],
- l["Core/Series/SeriesRegistry.js"],
- l["Core/Renderer/SVG/SVGRenderer.js"],
- l["Core/Time.js"],
- l["Core/Utilities.js"],
- l["Core/Renderer/HTML/AST.js"]
- ], function(y, j, I, Z, H, U, F, R, N, b, x, u, f, E, O) {
- var B = y.animate, M = y.animObject, S = y.setAnimation, w = I.numberFormat, v = Z.registerEventOptions, a = H.charts, c = H.doc, p = H.marginNames, i = H.svg, h = H.win, s = R.defaultOptions, t = R.defaultTime, o = x.seriesTypes, n = E.addEvent, A = E.attr, _ = E.cleanRecursively, D = E.createElement, W = E.css, P = E.defined, X = E.discardElement, g = E.erase, m = E.error, L = E.extend, Y = E.find, V = E.fireEvent, Q = E.getStyle, k = E.isArray, G = E.isNumber, z = E.isObject, $ = E.isString, q = E.merge, it = E.objectEach, et = E.pick, nt = E.pInt, rt = E.relativeLength, ct = E.removeEvent, gt = E.splat, dt = E.syncTimeout, ht = E.uniqueKey;
- return y = function() {
- function at(J, tt, st) {
- 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, st);
- }
- return at.chart = function(J, tt, st) {
- return new at(J, tt, st);
- }, at.prototype.getArgs = function(J, tt, st) {
- $(J) || J.nodeName ? (this.renderTo = J, this.init(tt, st)) : this.init(J, tt);
- }, at.prototype.init = function(J, tt) {
- var st = J.plotOptions || {};
- V(this, "init", { args: arguments }, function() {
- var lt = q(s, J), pt = lt.chart;
- it(lt.plotOptions, function(yt, vt) {
- z(yt) && (yt.tooltip = st[vt] && q(st[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 f(J.time) : H.time, this.numberFormatter = pt.numberFormatter || w, this.styledMode = pt.styledMode, this.hasCartesianSeries = pt.showAxes, this.index = a.length, a.push(this), H.chartCount++, v(this, pt), this.xAxis = [], this.yAxis = [], this.pointCount = this.colorCounter = this.symbolCounter = 0, V(this, "afterInit"), this.firstRender();
- });
- }, at.prototype.initSeries = function(J) {
- var tt = this.options.chart;
- tt = J.type || tt.type || tt.defaultSeriesType;
- var st = o[tt];
- return st || m(17, !0, this, { missingModuleFor: tt }), tt = new st(), 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 st = tt.length; J < st; ++J)
- tt[J] && (tt[J].index = J, tt[J].name = tt[J].getName());
- }, at.prototype.isInsidePlot = function(J, tt, st) {
- st === void 0 && (st = {});
- var lt = this.inverted, pt = this.plotBox, yt = this.plotLeft, vt = this.plotTop, Mt = this.scrollablePlotBox, Pt = 0, At = 0;
- st.visiblePlotOnly && this.scrollingContainer && (At = this.scrollingContainer, Pt = At.scrollLeft, At = At.scrollTop);
- var St = st.series;
- if (pt = st.visiblePlotOnly && Mt || pt, Mt = st.inverted ? tt : J, tt = st.inverted ? J : tt, J = { x: Mt, y: tt, isInsidePlot: !0 }, !st.ignoreX) {
- var Dt = St && (lt ? St.yAxis : St.xAxis) || { pos: yt, len: 1 / 0 };
- Mt = st.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 !st.ignoreY && J.isInsidePlot && (lt = St && (lt ? St.xAxis : St.yAxis) || { pos: vt, len: 1 / 0 }, st = st.paneCoordinates ? lt.pos + tt : vt + tt, st >= Math.max(At + vt, lt.pos) && st <= Math.min(At + vt + pt.height, lt.pos + lt.len) || (J.isInsidePlot = !1)), V(this, "afterIsInsidePlot", J), J.isInsidePlot;
- }, at.prototype.redraw = function(J) {
- V(this, "beforeRedraw");
- var tt = this.hasCartesianSeries ? this.axes : this.colorAxis || [], st = 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), S(this.hasRendered ? J : !1, this), Mt && this.temporaryDisplay(), this.layOutTitles(), J = st.length; J--; ) {
- var Dt = st[J];
- if (Dt.options.stacking || Dt.options.centerInCategory) {
- var Lt = !0;
- if (Dt.isDirty) {
- var Nt = !0;
- break;
- }
- }
- }
- if (Nt)
- for (J = st.length; J--; )
- Dt = st[J], Dt.options.stacking && (Dt.isDirty = !0);
- st.forEach(function(Et) {
- Et.isDirty && (Et.options.legendType === "point" ? (typeof Et.updateTotals == "function" && Et.updateTotals(), St = !0) : yt && (yt.labelFormatter || yt.labelFormat) && (St = !0)), Et.isDirtyData && V(Et, "updatedData");
- }), St && pt && pt.options.enabled && (pt.render(), this.isDirtyLegend = !1), Lt && this.getStacks(), tt.forEach(function(Et) {
- Et.updateNames(), Et.setScale();
- }), this.getMargins(), tt.forEach(function(Et) {
- Et.isDirty && (At = !0);
- }), tt.forEach(function(Et) {
- var Kt = Et.min + "," + Et.max;
- Et.extKey !== Kt && (Et.extKey = Kt, Pt.push(function() {
- V(Et, "afterSetExtremes", L(Et.eventArgs, Et.getExtremes())), delete Et.eventArgs;
- })), (At || Lt) && Et.redraw();
- }), At && this.drawChartBox(), V(this, "predraw"), st.forEach(function(Et) {
- (At || Et.isDirty) && Et.visible && Et.redraw(), Et.isDirtyData = !1;
- }), lt && lt.reset(!0), vt.draw(), V(this, "redraw"), V(this, "render"), Mt && this.temporaryDisplay(!0), Pt.forEach(function(Et) {
- Et.call();
- });
- }, at.prototype.get = function(J) {
- function tt(yt) {
- return yt.id === J || yt.options && yt.options.id === J;
- }
- for (var st = this.series, lt = Y(this.axes, tt) || Y(this.series, tt), pt = 0; !lt && pt < st.length; pt++)
- lt = Y(st[pt].points || [], tt);
- return lt;
- }, at.prototype.getAxes = function() {
- var J = this, tt = this.options, st = tt.xAxis = gt(tt.xAxis || {});
- tt = tt.yAxis = gt(tt.yAxis || {}), V(this, "getAxes"), st.forEach(function(lt, pt) {
- lt.index = pt, lt.isX = !0;
- }), tt.forEach(function(lt, pt) {
- lt.index = pt;
- }), st.concat(tt).forEach(function(lt) {
- new j(J, lt);
- }), V(this, "afterGetAxes");
- }, at.prototype.getSelectedPoints = function() {
- return this.series.reduce(function(J, tt) {
- return tt.getPointsCollection().forEach(function(st) {
- et(st.selectedStaging, st.selected) && J.push(st);
- }), J;
- }, []);
- }, at.prototype.getSelectedSeries = function() {
- return this.series.filter(function(J) {
- return J.selected;
- });
- }, at.prototype.setTitle = function(J, tt, st) {
- this.applyDescription("title", J), this.applyDescription("subtitle", tt), this.applyDescription("caption", void 0), this.layOutTitles(st);
- }, at.prototype.applyDescription = function(J, tt) {
- var st = 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) {
- st[{ 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], st = 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 = st.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, V(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 st = this.renderTo;
- P(tt) || (this.containerWidth = Q(st, "width")), P(J) || (this.containerHeight = Q(st, "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 && (c.body.removeChild(tt), tt.hcOrigDetached = !1), tt = tt.parentNode;
- else
- for (; tt && tt.style && (c.body.contains(tt) || tt.parentNode || (tt.hcOrigDetached = !0, c.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 !== c.body); )
- ;
- }, at.prototype.setClassName = function(J) {
- this.container.className = "highcharts-container " + (J || "");
- }, at.prototype.getContainer = function() {
- var J = this.options, tt = J.chart, st = ht(), lt, pt = this.renderTo;
- pt || (this.renderTo = pt = tt.renderTo), $(pt) && (this.renderTo = pt = c.getElementById(pt)), pt || m(13, !0, this);
- var yt = nt(A(pt, "data-highcharts-chart"));
- G(yt) && a[yt] && a[yt].hasRendered && a[yt].destroy(), A(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 = st = D("div", { id: st }, lt, pt), this._cursor = st.style.cursor, this.renderer = new (tt.renderer || !i ? b.getRendererType(tt.renderer) : u)(st, yt, vt, void 0, tt.forExport, J.exporting && J.exporting.allowHTML, this.styledMode), S(
- 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, V(this, "afterGetContainer");
- }, at.prototype.getMargins = function(J) {
- var tt = this.spacing, st = this.margin, lt = this.titleOffset;
- this.resetMargins(), lt[0] && !P(st[0]) && (this.plotTop = Math.max(this.plotTop, lt[0] + tt[0])), lt[2] && !P(st[2]) && (this.marginBottom = Math.max(this.marginBottom, lt[2] + tt[2])), this.legend && this.legend.display && this.legend.adjustMargins(
- st,
- tt
- ), V(this, "getMargins"), J || this.getAxisMargins();
- }, at.prototype.getAxisMargins = function() {
- var J = this, tt = J.axisOffset = [0, 0, 0, 0], st = J.colorAxis, lt = J.margin, pt = function(yt) {
- yt.forEach(function(vt) {
- vt.visible && vt.getOffset();
- });
- };
- J.hasCartesianSeries ? pt(J.axes) : st && st.length && pt(st), p.forEach(function(yt, vt) {
- P(lt[vt]) || (J[yt] += tt[vt]);
- }), J.setChartSize();
- }, at.prototype.reflow = function(J) {
- var tt = this, st = tt.options.chart, lt = tt.renderTo, pt = P(st.width) && P(st.height), yt = st.width || Q(lt, "width");
- st = st.height || Q(lt, "height"), lt = J ? J.target : h, delete tt.pointer.chartPosition, !pt && !tt.isPrinting && yt && st && (lt === h || lt === c) && ((yt !== tt.containerWidth || st !== tt.containerHeight) && (E.clearTimeout(tt.reflowTimeout), tt.reflowTimeout = dt(function() {
- tt.container && tt.setSize(void 0, void 0, !1);
- }, J ? 100 : 0)), tt.containerWidth = yt, tt.containerHeight = st);
- }, at.prototype.setReflow = function(J) {
- var tt = this;
- J === !1 || this.unbindReflow ? J === !1 && this.unbindReflow && (this.unbindReflow = this.unbindReflow()) : (this.unbindReflow = n(h, "resize", function(st) {
- tt.options && tt.reflow(st);
- }), n(this, "destroy", this.unbindReflow));
- }, at.prototype.setSize = function(J, tt, st) {
- var lt = this, pt = lt.renderer;
- lt.isResizing += 1, S(st, lt), st = 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 || (st ? B : W)(lt.container, { width: lt.chartWidth + "px", height: lt.chartHeight + "px" }, st), lt.setChartSize(!0), pt.setSize(lt.chartWidth, lt.chartHeight, st), lt.axes.forEach(function(yt) {
- yt.isDirty = !0, yt.setScale();
- }), lt.isDirtyLegend = !0, lt.isDirtyBox = !0, lt.layOutTitles(), lt.getMargins(), lt.redraw(st), lt.oldChartHeight = null, V(lt, "resize"), dt(function() {
- lt && V(lt, "endResize", null, function() {
- --lt.isResizing;
- });
- }, M(st).duration);
- }, at.prototype.setChartSize = function(J) {
- var tt = this.inverted, st = 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 = st.spacingBox = { x: vt[3], y: vt[0], width: lt - vt[3] - vt[1], height: pt - vt[0] - vt[2] }, this.plotBox = st.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(Lt) {
- Lt.setAxisSize(), Lt.setAxisTranslation();
- }), st.alignElements()), V(this, "afterSetChartSize", { skipAxes: J });
- }, at.prototype.resetMargins = function() {
- V(this, "resetMargins");
- var J = this, tt = J.options.chart;
- ["margin", "spacing"].forEach(function(st) {
- var lt = tt[st], pt = z(lt) ? lt : [lt, lt, lt, lt];
- ["Top", "Right", "Bottom", "Left"].forEach(function(yt, vt) {
- J[st][vt] = et(tt[st + yt], pt[vt]);
- });
- }), p.forEach(function(st, lt) {
- J[st] = 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, st = 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, Lt = this.plotHeight, Nt = this.plotBox, Et = this.clipRect, Kt = this.clipBox, Gt = this.chartBackground, Wt = this.plotBackground, Jt = this.plotBorder, be, zt = "animate";
- if (Gt || (this.chartBackground = Gt = tt.rect().addClass("highcharts-background").add(), zt = "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[zt]({ x: be / 2, y: be / 2, width: st - be - Vt % 2, height: lt - be - Vt % 2, r: J.borderRadius }), zt = "animate", Wt || (zt = "attr", this.plotBackground = Wt = tt.rect().addClass("highcharts-plot-background").add()), Wt[zt](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, Lt).add())), Et ? Et.animate({ width: Kt.width, height: Kt.height }) : this.clipRect = tt.clipRect(Kt), zt = "animate", Jt || (zt = "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[zt](Jt.crisp({ x: At, y: St, width: Dt, height: Lt }, -Jt.strokeWidth())), this.isDirtyBox = !1, V(this, "afterDrawChartBox");
- }, at.prototype.propFromSeries = function() {
- var J = this, tt = J.options.chart, st = J.options.series, lt, pt, yt;
- ["inverted", "angular", "polar"].forEach(function(vt) {
- for (pt = o[tt.type || tt.defaultSeriesType], yt = tt[vt] || pt && pt.prototype[vt], lt = st && st.length; !yt && lt--; )
- (pt = o[st[lt].type]) && pt.prototype[vt] && (yt = !0);
- J[vt] = yt;
- });
- }, at.prototype.linkSeries = function() {
- var J = this, tt = J.series;
- tt.forEach(function(st) {
- st.linkedSeries.length = 0;
- }), tt.forEach(function(st) {
- var lt = st.options.linkedTo;
- $(lt) && (lt = lt === ":previous" ? J.series[st.index - 1] : J.get(lt)) && lt.linkedParent !== st && (lt.linkedSeries.push(st), st.linkedParent = lt, lt.enabledDataSorting && st.setDataSortingOptions(), st.visible = et(st.options.visible, lt.options.visible, st.visible));
- }), V(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(st) {
- var lt = L(tt.style, st.style), pt = nt(lt.left) + J.plotLeft, yt = nt(lt.top) + J.plotTop + 12;
- delete lt.left, delete lt.top, J.renderer.text(st.html, pt, yt).attr({ zIndex: 2 }).css(lt).add();
- });
- }, at.prototype.render = function() {
- var J = this.axes, tt = this.colorAxis, st = this.renderer, lt = this.options, pt = function(At) {
- At.forEach(function(St) {
- St.visible && St.render();
- });
- }, yt = 0;
- this.setTitle(), this.legend = new U(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 = st.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, st = q(!0, this.options.credits, J);
- st.enabled && !this.credits && (this.credits = this.renderer.text(st.text + (this.mapCredits || ""), 0, 0).addClass("highcharts-credits").on("click", function() {
- st.href && (h.location.href = st.href);
- }).attr({ align: st.position.align, zIndex: 8 }), tt.styledMode || this.credits.css(st.style), this.credits.add().align(st.position), this.credits.update = function(lt) {
- tt.credits = tt.credits.destroy(), tt.addCredits(lt);
- });
- }, at.prototype.destroy = function() {
- var J = this, tt = J.axes, st = J.series, lt = J.container, pt = lt && lt.parentNode, yt;
- for (V(J, "destroy"), J.renderer.forExport ? g(a, J) : a[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 = st.length; yt--; )
- st[yt] = st[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(), (k(tt.series) ? tt.series : []).forEach(function(st) {
- J.initSeries(st);
- }), J.linkSeries(), J.setSeriesData(), V(J, "beforeRender"), N && (F.isRequired() ? J.pointer = new F(J, tt) : J.pointer = new N(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), V(this, "load"), V(this, "render"), P(this.index) && this.setReflow(this.options.chart.reflow), this.hasLoaded = !0;
- }, at.prototype.addSeries = function(J, tt, st) {
- var lt = this, pt;
- return J && (tt = et(tt, !0), V(lt, "addSeries", { options: J }, function() {
- pt = lt.initSeries(J), lt.isDirtyLegend = !0, lt.linkSeries(), pt.enabledDataSorting && pt.setData(J.data, !1), V(lt, "afterAddSeries", { series: pt }), tt && lt.redraw(st);
- })), pt;
- }, at.prototype.addAxis = function(J, tt, st, lt) {
- return this.createAxis(tt ? "xAxis" : "yAxis", { axis: J, redraw: st, animation: lt });
- }, at.prototype.addColorAxis = function(J, tt, st) {
- return this.createAxis("colorAxis", { axis: J, redraw: tt, animation: st });
- }, at.prototype.createAxis = function(J, tt) {
- return J = new j(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, st = tt.options, lt = st.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 = D("div", { className: "highcharts-loading highcharts-loading-hidden" }, null, tt.container)), vt || (tt.loadingSpan = vt = D(
- "span",
- { className: "highcharts-loading-inner" },
- null,
- yt
- ), n(tt, "redraw", pt)), yt.className = "highcharts-loading", O.setElementHTML(vt, et(J, st.lang.loading, "")), tt.styledMode || (W(yt, L(lt.style, { zIndex: 10 })), W(vt, lt.labelStyle), tt.loadingShown || (W(yt, { opacity: 0, display: "" }), B(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 || B(tt, { opacity: 0 }, {
- duration: J.loading.hideDuration || 100,
- complete: function() {
- W(tt, { display: "none" });
- }
- })), this.loadingShown = !1;
- }, at.prototype.update = function(J, tt, st, lt) {
- var pt = this, yt = { credits: "addCredits", title: "setTitle", subtitle: "setSubtitle", caption: "setCaption" }, vt = J.isResponsiveOptions, Mt = [], Pt, At;
- V(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(Lt, 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 f(J.time)), q(!0, pt.options.time, J.time)), it(J, function(Lt, Nt) {
- pt[Nt] && typeof pt[Nt].update == "function" ? pt[Nt].update(Lt, !1) : typeof pt[yt[Nt]] == "function" ? pt[yt[Nt]](Lt) : 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(Lt) {
- if (J[Lt]) {
- var Nt = [];
- pt[Lt].forEach(function(Et, Kt) {
- Et.options.isInternal || Nt.push(et(Et.options.index, Kt));
- }), gt(J[Lt]).forEach(function(Et, Kt) {
- var Gt = P(Et.id), Wt;
- Gt && (Wt = pt.get(Et.id)), !Wt && pt[Lt] && (Wt = pt[Lt][Nt ? Nt[Kt] : Kt]) && Gt && P(Wt.options.id) && (Wt = void 0), Wt && Wt.coll === Lt && (Wt.update(Et, !1), st && (Wt.touched = !0)), !Wt && st && pt.collectionsWithInit[Lt] && (pt.collectionsWithInit[Lt][0].apply(pt, [Et].concat(pt.collectionsWithInit[Lt][1] || []).concat([!1])).touched = !0);
- }), st && pt[Lt].forEach(function(Et) {
- Et.touched || Et.options.isInternal ? delete Et.touched : Mt.push(Et);
- });
- }
- }), Mt.forEach(function(Lt) {
- Lt.chart && Lt.remove && Lt.remove(!1);
- }), Dt && pt.axes.forEach(function(Lt) {
- Lt.update({}, !1);
- }), Pt && pt.getSeriesOrderByLinks().forEach(function(Lt) {
- Lt.chart && Lt.update({}, !1);
- }, this), Dt = St && St.width, St = St && ($(St.height) ? rt(St.height, Dt || pt.chartWidth) : St.height), At || G(Dt) && Dt !== pt.chartWidth || G(St) && St !== pt.chartHeight ? pt.setSize(Dt, St, lt) : et(tt, !0) && pt.redraw(lt), V(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, st = s.lang, lt = tt.options.chart.resetZoomButton, pt = lt.theme, yt = pt.states, vt = lt.relativeTo === "chart" || lt.relativeTo === "spacingBox" ? null : "scrollablePlotBox";
- V(this, "beforeShowResetZoom", null, function() {
- tt.resetZoomButton = tt.renderer.button(st.resetZoom, null, null, J, pt, yt && yt.hover).attr({ align: lt.position.align, title: st.resetZoomTitle }).addClass("highcharts-reset-zoom").add().align(lt.position, !1, vt);
- }), V(this, "afterShowResetZoom");
- }, at.prototype.zoomOut = function() {
- V(this, "selection", { resetSelection: !0 }, this.zoom);
- }, at.prototype.zoom = function(J) {
- var tt = this, st = tt.pointer, lt = tt.inverted ? st.mouseDownX : st.mouseDownY, pt = !1, yt;
- !J || J.resetSelection ? (tt.axes.forEach(function(Mt) {
- yt = Mt.zoom();
- }), st.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, Lt = !1;
- (!Dt && lt >= At && lt <= St || Dt || !P(lt)) && (Lt = !0), st[Dt ? "zoomX" : "zoomY"] && Lt && (yt = Pt.zoom(Mt.min, Mt.max), Pt.displayBtn && (pt = !0));
- });
- var vt = tt.resetZoomButton;
- pt && !vt ? tt.showResetZoom() : !pt && z(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 st = this, lt = st.hoverPoints;
- tt = typeof tt == "object" ? tt : { enabled: tt, type: "x" };
- var pt = st.options.chart, yt = st.options.mapNavigation && st.options.mapNavigation.enabled;
- pt && pt.panning && (pt.panning = tt);
- var vt = tt.type, Mt;
- V(this, "pan", { originalEvent: J }, function() {
- lt && lt.forEach(function(St) {
- St.setState();
- });
- var Pt = st.xAxis;
- vt === "xy" ? Pt = Pt.concat(st.yAxis) : vt === "y" && (Pt = st.yAxis);
- var At = {};
- Pt.forEach(function(St) {
- if (St.options.panningEnabled && !St.options.isInternal) {
- var Dt = St.horiz, Lt = J[Dt ? "chartX" : "chartY"];
- Dt = Dt ? "mouseDownX" : "mouseDownY";
- var Nt = st[Dt], Et = St.minPointOffset || 0, Kt = St.reversed && !st.inverted || !St.reversed && st.inverted ? -1 : 1, Gt = St.getExtremes(), Wt = St.toValue(Nt - Lt, !0) + Et * Kt, Jt = St.toValue(Nt + St.len - Lt, !0) - (Et * Kt || St.isXAxis && St.pointRangePadding || 0), be = Jt < Wt;
- Kt = St.hasVerticalPanning(), Nt = be ? Jt : Wt, Wt = be ? Wt : Jt;
- var zt = St.panningState;
- !Kt || St.isXAxis || zt && !zt.isDirty || St.series.forEach(function(Vt) {
- var Ce = Vt.getProcessedData(!0);
- Ce = Vt.getExtremes(Ce.yData, !0), zt || (zt = { startMin: Number.MAX_VALUE, startMax: -Number.MAX_VALUE }), G(Ce.dataMin) && G(Ce.dataMax) && (zt.startMin = Math.min(et(Vt.options.threshold, 1 / 0), Ce.dataMin, zt.startMin), zt.startMax = Math.max(et(Vt.options.threshold, -1 / 0), Ce.dataMax, zt.startMax));
- }), Kt = Math.min(et(zt && zt.startMin, Gt.dataMin), Et ? Gt.min : St.toValue(St.toPixels(Gt.min) - St.minPixelPadding)), Jt = Math.max(et(zt && zt.startMax, Gt.dataMax), Et ? Gt.max : St.toValue(St.toPixels(Gt.max) + St.minPixelPadding)), St.panningState = zt, St.isOrdinal || (Et = Kt - Nt, 0 < Et && (Wt += Et, Nt = Kt), Et = Wt - Jt, 0 < Et && (Wt = Jt, Nt -= Et), St.series.length && Nt !== Gt.min && Wt !== Gt.max && Nt >= Kt && Wt <= Jt && (St.setExtremes(Nt, Wt, !1, !1, { trigger: "pan" }), st.resetZoomButton || yt || Nt === Kt || Wt === Jt || !vt.match("y") || (st.showResetZoom(), St.displayBtn = !1), Mt = !0), At[Dt] = Lt);
- }
- }), it(At, function(St, Dt) {
- st[Dt] = St;
- }), Mt && st.redraw(!1), W(st.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;
- }), T(l, "Core/Legend/LegendSymbol.js", [l["Core/Utilities.js"]], function(y) {
- var j = y.merge, I = y.pick, Z;
- return function(H) {
- H.drawLineMarker = function(U) {
- var F = this.options, R = U.symbolWidth, N = U.symbolHeight, b = N / 2, x = this.chart.renderer, u = this.legendGroup;
- U = U.baseline - Math.round(0.3 * U.fontMetrics.b);
- var f = {}, E = F.marker;
- this.chart.styledMode || (f = { "stroke-width": F.lineWidth || 0 }, F.dashStyle && (f.dashstyle = F.dashStyle)), this.legendLine = x.path([["M", 0, U], ["L", R, U]]).addClass("highcharts-graph").attr(f).add(u), E && E.enabled !== !1 && R && (F = Math.min(I(E.radius, b), b), this.symbol.indexOf("url") === 0 && (E = j(E, { width: N, height: N }), F = 0), this.legendSymbol = R = x.symbol(this.symbol, R / 2 - F, U - F, 2 * F, 2 * F, E).addClass("highcharts-point").add(u), R.isMarker = !0);
- }, H.drawRectangle = function(U, F) {
- var R = U.symbolHeight, N = U.options.squareSymbol;
- F.legendSymbol = this.chart.renderer.rect(N ? (U.symbolWidth - R) / 2 : 0, U.baseline - R + 1, N ? R : U.symbolWidth, R, I(U.options.symbolRadius, R / 2)).addClass("highcharts-point").attr({ zIndex: 3 }).add(F.legendGroup);
- };
- }(Z || (Z = {})), Z;
- }), T(l, "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" };
- }), T(l, "Core/Series/Series.js", [
- l["Core/Animation/AnimationUtilities.js"],
- l["Core/DefaultOptions.js"],
- l["Core/Foundation.js"],
- l["Core/Globals.js"],
- l["Core/Legend/LegendSymbol.js"],
- l["Core/Series/Point.js"],
- l["Core/Series/SeriesDefaults.js"],
- l["Core/Series/SeriesRegistry.js"],
- l["Core/Renderer/SVG/SVGElement.js"],
- l["Core/Utilities.js"]
- ], function(y, j, I, Z, H, U, F, R, N, b) {
- var x = y.animObject, u = y.setAnimation, f = j.defaultOptions, E = I.registerEventOptions, O = Z.hasTouch, B = Z.svg, M = Z.win, S = R.seriesTypes, w = b.addEvent, v = b.arrayMax, a = b.arrayMin, c = b.clamp, p = b.cleanRecursively, i = b.correctFloat, h = b.defined, s = b.erase, t = b.error, o = b.extend, n = b.find, A = b.fireEvent, _ = b.getNestedProperty, D = b.isArray, W = b.isNumber, P = b.isString, X = b.merge, g = b.objectEach, m = b.pick, L = b.removeEvent, Y = b.splat, V = b.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(k, G) {
- A(this, "init", { options: G });
- var z = this, $ = k.series;
- this.eventsToUnbind = [], z.chart = k, z.options = z.setOptions(G), G = z.options, z.linkedSeries = [], z.bindAxes(), o(z, { name: G.name, state: "", visible: G.visible !== !1, selected: G.selected === !0 }), E(this, G);
- var q = G.events;
- (q && q.click || G.point && G.point.events && G.point.events.click || G.allowPointSelect) && (k.runTrackerClick = !0), z.getColor(), z.getSymbol(), z.parallelArrays.forEach(function(et) {
- z[et + "Data"] || (z[et + "Data"] = []);
- }), z.isCartesian && (k.hasCartesianSeries = !0);
- var it;
- $.length && (it = $[$.length - 1]), z._i = m(it && it._i, -1) + 1, z.opacity = z.options.opacity, k.orderSeries(this.insert($)), G.dataSorting && G.dataSorting.enabled ? z.setDataSortingOptions() : z.points || z.data || z.setData(G.data, !1), A(this, "afterInit");
- }, Q.prototype.is = function(k) {
- return S[k] && this instanceof S[k];
- }, Q.prototype.insert = function(k) {
- var G = this.options.index, z;
- if (W(G)) {
- for (z = k.length; z--; )
- if (G >= m(k[z].options.index, k[z]._i)) {
- k.splice(z + 1, 0, this);
- break;
- }
- z === -1 && k.unshift(this), z += 1;
- } else
- k.push(this);
- return m(z, k.length - 1);
- }, Q.prototype.bindAxes = function() {
- var k = this, G = k.options, z = k.chart, $;
- A(this, "bindAxes", null, function() {
- (k.axisTypes || []).forEach(function(q) {
- var it = 0;
- z[q].forEach(function(et) {
- $ = et.options, (G[q] === it && !$.isInternal || typeof G[q] < "u" && G[q] === $.id || typeof G[q] > "u" && $.index === 0) && (k.insert(et.series), k[q] = et, et.isDirty = !0), $.isInternal || it++;
- }), k[q] || k.optionalAxis === q || t(18, !0, z);
- });
- }), A(this, "afterBindAxes");
- }, Q.prototype.updateParallelArrays = function(k, G) {
- var z = k.series, $ = arguments, q = W(G) ? function(it) {
- var et = it === "y" && z.toYData ? z.toYData(k) : k[it];
- z[it + "Data"][G] = et;
- } : function(it) {
- Array.prototype[G].apply(z[it + "Data"], Array.prototype.slice.call($, 2));
- };
- z.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(k) {
- var G = this.options, z = G.pointIntervalUnit, $ = G.relativeXValue, q = this.chart.time, it = this.xIncrement, et;
- return it = m(it, G.pointStart, 0), this.pointInterval = et = m(this.pointInterval, G.pointInterval, 1), $ && W(k) && (et *= k), z && (G = new q.Date(it), z === "day" ? q.set("Date", G, q.get("Date", G) + et) : z === "month" ? q.set("Month", G, q.get("Month", G) + et) : z === "year" && q.set("FullYear", G, q.get("FullYear", G) + et), et = G.getTime() - it), $ && W(k) ? it + et : (this.xIncrement = it + et, it);
- }, Q.prototype.setDataSortingOptions = function() {
- var k = this.options;
- o(this, { requireSorting: !1, sorted: !1, enabledDataSorting: !0, allowDG: !1 }), h(k.pointRange) || (k.pointRange = 1);
- }, Q.prototype.setOptions = function(k) {
- var G = this.chart, z = G.options, $ = z.plotOptions, q = G.userOptions || {};
- k = X(k), G = G.styledMode;
- var it = { plotOptions: $, userOptions: k };
- A(this, "setOptions", it);
- var et = it.plotOptions[this.type], nt = q.plotOptions || {};
- return this.userOptions = it.userOptions, q = X(et, $.series, q.plotOptions && q.plotOptions[this.type], k), this.tooltipOptions = X(f.tooltip, f.plotOptions.series && f.plotOptions.series.tooltip, f.plotOptions[this.type].tooltip, z.tooltip.userOptions, $.series && $.series.tooltip, $[this.type].tooltip, k.tooltip), this.stickyTracking = m(k.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, $ = this.zones = (q.zones || []).slice(), !q.negativeColor && !q.negativeFillColor || q.zones || (z = { value: q[this.zoneAxis + "Threshold"] || q.threshold || 0, className: "highcharts-negative" }, G || (z.color = q.negativeColor, z.fillColor = q.negativeFillColor), $.push(z)), $.length && h($[$.length - 1].value) && $.push(G ? {} : { color: this.color, fillColor: this.fillColor }), A(this, "afterSetOptions", { options: q }), q;
- }, Q.prototype.getName = function() {
- return m(this.options.name, "Series " + (this.index + 1));
- }, Q.prototype.getCyclic = function(k, G, z) {
- var $ = this.chart, q = this.userOptions, it = k + "Index", et = k + "Counter", nt = z ? z.length : m($.options.chart[k + "Count"], $[k + "Count"]);
- if (!G) {
- var rt = m(q[it], q["_" + it]);
- h(rt) || ($.series.length || ($[et] = 0), q["_" + it] = rt = $[et] % nt, $[et] += 1), z && (G = z[rt]);
- }
- typeof rt < "u" && (this[it] = rt), this[k] = G;
- }, Q.prototype.getColor = function() {
- this.chart.styledMode ? this.getCyclic("color") : this.options.colorByPoint ? this.color = "#cccccc" : this.getCyclic("color", this.options.color || f.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(k, G) {
- var z = k.id, $ = k.x, q = this.points, it = this.options.dataSorting, et, nt;
- if (z)
- it = this.chart.get(z), it instanceof U && (et = it);
- else if ((this.linkedParent || this.enabledDataSorting || this.options.relativeXValue) && (et = function(ct) {
- return !ct.touched && ct.index === k.index;
- }, it && it.matchByName ? et = function(ct) {
- return !ct.touched && ct.name === k.name;
- } : this.options.relativeXValue && (et = function(ct) {
- return !ct.touched && ct.options.x === k.x;
- }), et = n(q, et), !et))
- return;
- if (et) {
- var rt = et && et.index;
- typeof rt < "u" && (nt = !0);
- }
- return typeof rt > "u" && W($) && (rt = this.xData.indexOf($, G)), 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(k, G) {
- var z = this.options, $ = z.dataSorting, q = this.points, it = [], et = this.requireSorting, nt = k.length === q.length, rt, ct, gt, dt = !0;
- if (this.xIncrement = null, k.forEach(function(ht, at) {
- var J = h(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 !== z.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 || $ && $.enabled || this.hasDerivedData) && (rt = !0)) : it.push(ht);
- }, this), rt)
- for (k = q.length; k--; )
- (ct = q[k]) && !ct.touched && ct.remove && ct.remove(!1, G);
- else
- !nt || $ && $.enabled ? dt = !1 : (k.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(k, G, 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, st, lt = 0, pt = 1, yt = null;
- k = k || [];
- var vt = k.length;
- if (G = m(G, !0), ct && ct.enabled && (k = this.sortData(k)), $ !== !1 && vt && et && !q.cropped && !q.hasGroupedData && q.visible && !q.isSeriesBoosting && (st = this.updateData(k, z)), !st) {
- if (q.xIncrement = null, q.colorCounter = 0, this.parallelArrays.forEach(function(Mt) {
- q[Mt + "Data"].length = 0;
- }), dt && vt > dt)
- if (yt = q.getFirstValidPoint(k), W(yt))
- for (z = 0; z < vt; z++)
- ht[z] = this.autoIncrement(), at[z] = k[z];
- else if (D(yt))
- if (J)
- if (yt.length === J)
- for (z = 0; z < vt; z++)
- ht[z] = this.autoIncrement(), at[z] = k[z];
- else
- for (z = 0; z < vt; z++)
- $ = k[z], ht[z] = $[0], at[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 (z = 0; z < vt; z++)
- ht[z] = this.autoIncrement(), at[z] = k[z][pt];
- else
- for (z = 0; z < vt; z++)
- $ = k[z], ht[z] = $[lt], at[z] = $[pt];
- else
- t(12, !1, rt);
- else
- for (z = 0; z < vt; z++)
- typeof k[z] < "u" && ($ = { series: q }, q.pointClass.prototype.applyOptions.apply($, [k[z]]), q.updateParallelArrays($, z));
- for (at && P(at[0]) && t(14, !0, rt), q.data = [], q.options.data = q.userOptions.data = k, z = et; z--; )
- it[z] && it[z].destroy && it[z].destroy();
- gt && (gt.minRange = gt.userMinRange), q.isDirty = rt.isDirtyBox = !0, q.isDirtyData = !!it, z = !1;
- }
- nt.legendType === "point" && (this.processData(), this.generatePoints()), G && rt.redraw(z);
- }, Q.prototype.sortData = function(k) {
- var G = this, z = G.options.dataSorting.sortKey || "y", $ = function(q, it) {
- return h(it) && q.pointClass.prototype.optionsToObject.call({ series: q }, it) || {};
- };
- return k.forEach(function(q, it) {
- k[it] = $(G, q), k[it].index = it;
- }, this), k.concat().sort(function(q, it) {
- return q = _(z, q), it = _(z, it), it < q ? -1 : it > q ? 1 : 0;
- }).forEach(function(q, it) {
- q.x = it;
- }, this), G.linkedSeries && G.linkedSeries.forEach(function(q) {
- var it = q.options, et = it.data;
- it.dataSorting && it.dataSorting.enabled || !et || (et.forEach(function(nt, rt) {
- et[rt] = $(q, nt), k[rt] && (et[rt].x = k[rt].x, et[rt].index = rt);
- }), q.setData(et, !1));
- }), k;
- }, Q.prototype.getProcessedData = function(k) {
- var G = this.xAxis, z = this.options, $ = z.cropThreshold, q = k || this.getExtremesFromAll || z.getExtremesFromAll, it = this.isCartesian;
- k = G && G.val2lin, z = !(!G || !G.logarithmic);
- var et = 0, nt = this.xData, rt = this.yData, ct = this.requireSorting, gt = !1, dt = nt.length;
- if (G) {
- gt = G.getExtremes();
- var ht = gt.min, at = gt.max;
- gt = G.categories && !G.names.length;
- }
- if (it && this.sorted && !q && (!$ || dt > $ || 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 ($ = nt.length || 1; --$; )
- if (G = z ? k(nt[$]) - k(nt[$ - 1]) : nt[$] - nt[$ - 1], 0 < G && (typeof tt > "u" || G < tt))
- var tt = G;
- else
- 0 > G && ct && !gt && (t(15, !1, this.chart), ct = !1);
- return { xData: nt, yData: rt, cropped: J, cropStart: et, closestPointRange: tt };
- }, Q.prototype.processData = function(k) {
- var G = this.xAxis;
- if (this.isCartesian && !this.isDirty && !G.isDirty && !this.yAxis.isDirty && !k)
- return !1;
- k = this.getProcessedData(), this.cropped = k.cropped, this.cropStart = k.cropStart, this.processedXData = k.xData, this.processedYData = k.yData, this.closestPointRange = this.basePointRange = k.closestPointRange, A(this, "afterProcessData");
- }, Q.prototype.cropData = function(k, G, z, $, q) {
- var it = k.length, et, nt = 0, rt = it;
- for (q = m(q, this.cropShoulder), et = 0; et < it; et++)
- if (k[et] >= z) {
- nt = Math.max(0, et - q);
- break;
- }
- for (z = et; z < it; z++)
- if (k[z] > $) {
- rt = z + q;
- break;
- }
- return { xData: k.slice(nt, rt), yData: G.slice(
- nt,
- rt
- ), start: nt, end: rt };
- }, Q.prototype.generatePoints = function() {
- var k = this.options, G = k.data, z = this.processedXData, $ = this.processedYData, q = this.pointClass, it = z.length, et = this.cropStart || 0, nt = this.hasGroupedData, rt = k.keys, ct = [];
- k = k.dataGrouping && k.dataGrouping.groupAll ? et : 0;
- var gt, dt, ht = this.data;
- if (!ht && !nt) {
- var at = [];
- at.length = G.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, [z[dt]].concat(Y($[dt])));
- J.dataGroup = this.groupMap[k + dt], J.dataGroup.options && (J.options = J.dataGroup.options, o(J, J.dataGroup.options), delete J.dataLabels);
- } else
- (J = ht[at]) || typeof G[at] > "u" || (ht[at] = J = new q().init(this, G[at], z[dt]));
- J && (J.index = nt ? k + 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, A(this, "afterGeneratePoints");
- }, Q.prototype.getXExtremes = function(k) {
- return { min: a(k), max: v(k) };
- }, Q.prototype.getExtremes = function(k, G) {
- var z = this.xAxis, $ = this.yAxis, q = this.processedXData || this.xData, it = [], et = this.requireSorting ? this.cropShoulder : 0;
- $ = $ ? $.positiveValuesOnly : !1;
- var nt, rt = 0, ct = 0, gt = 0;
- k = k || this.stackedYData || this.processedYData || [];
- var dt = k.length;
- if (z) {
- var ht = z.getExtremes();
- rt = ht.min, ct = ht.max;
- }
- for (nt = 0; nt < dt; nt++) {
- var at = q[nt];
- ht = k[nt];
- var J = (W(ht) || D(ht)) && (ht.length || 0 < ht || !$);
- if (at = G || this.getExtremesFromAll || this.options.getExtremesFromAll || this.cropped || !z || (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 k = { activeYData: it, dataMin: a(it), dataMax: v(it) }, A(this, "afterGetExtremes", { dataExtremes: k }), k;
- }, Q.prototype.applyExtremes = function() {
- var k = this.getExtremes();
- return this.dataMin = k.dataMin, this.dataMax = k.dataMax, k;
- }, Q.prototype.getFirstValidPoint = function(k) {
- for (var G = k.length, z = 0, $ = null; $ === null && z < G; )
- $ = k[z], z++;
- return $;
- }, Q.prototype.translate = function() {
- this.processedXData || this.processData(), this.generatePoints();
- var k = this.options, G = k.stacking, z = this.xAxis, $ = z.categories, q = this.enabledDataSorting, it = this.yAxis, et = this.points, nt = et.length, rt = this.pointPlacementToXValue(), ct = !!rt, gt = k.threshold, dt = k.startFromThreshold ? gt : 0, ht = this.zoneAxis || "y", at, J, tt = Number.MAX_VALUE;
- for (at = 0; at < nt; at++) {
- var st = et[at], lt = st.x, pt = void 0, yt = void 0, vt = st.y, Mt = st.low, Pt = G && it.stacking && it.stacking.stacks[(this.negStacks && vt < (dt ? 0 : gt) ? "-" : "") + this.stackKey];
- if ((it.positiveValuesOnly && !it.validatePositiveValue(vt) || z.positiveValuesOnly && !z.validatePositiveValue(lt)) && (st.isNull = !0), st.plotX = J = i(c(z.translate(lt, 0, 0, 0, 1, rt, this.type === "flags"), -1e5, 1e5)), G && this.visible && Pt && Pt[lt]) {
- var At = this.getStackIndicator(
- At,
- lt,
- this.index
- );
- st.isNull || (pt = Pt[lt], yt = pt.points[At.key]);
- }
- if (D(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), st.total = st.stackTotal = pt.total, st.percentage = pt.total && st.y / pt.total * 100, st.stackY = vt, this.irregularWidths || pt.setOffset(this.pointXOffset || 0, this.barW || 0)), st.yBottom = h(Mt) ? c(it.translate(Mt, 0, 1, 0, 1), -1e5, 1e5) : null, this.dataModify && (vt = this.dataModify.modifyValue(vt, at)), st.plotY = void 0, W(vt) && (pt = it.translate(vt, !1, !0, !1, !0), typeof pt < "u" && (st.plotY = c(
- pt,
- -1e5,
- 1e5
- ))), st.isInside = this.isPointInside(st), st.clientX = ct ? i(z.translate(lt, 0, 0, 0, 1, rt)) : J, st.negative = st[ht] < (k[ht + "Threshold"] || gt || 0), st.category = $ && typeof $[st.x] < "u" ? $[st.x] : st.x, !st.isNull && st.visible !== !1) {
- typeof St < "u" && (tt = Math.min(tt, Math.abs(J - St)));
- var St = J;
- }
- st.zone = this.zones.length ? st.getZone() : void 0, !st.graphic && this.group && q && (st.isNew = !0);
- }
- this.closestPointRangePx = tt, A(this, "afterTranslate");
- }, Q.prototype.getValidPoints = function(k, G, z) {
- var $ = this.chart;
- return (k || this.points || []).filter(function(q) {
- return G && !$.isInsidePlot(q.plotX, q.plotY, { inverted: $.inverted }) ? !1 : q.visible !== !1 && (z || !q.isNull);
- });
- }, Q.prototype.getClipBox = function() {
- var k = this.chart, G = this.xAxis, z = this.yAxis, $ = X(k.clipBox);
- return G && G.len !== k.plotSizeX && ($.width = G.len), z && z.len !== k.plotSizeY && ($.height = z.len), $;
- }, Q.prototype.getSharedClipKey = function() {
- return this.sharedClipKey = (this.options.xAxis || 0) + "," + (this.options.yAxis || 0);
- }, Q.prototype.setClip = function() {
- var k = this.chart, G = this.group, z = this.markerGroup, $ = k.sharedClips;
- k = k.renderer;
- var q = this.getClipBox(), it = this.getSharedClipKey(), et = $[it];
- et ? et.animate(q) : $[it] = et = k.clipRect(q), G && G.clip(this.options.clip === !1 ? void 0 : et), z && z.clip();
- }, Q.prototype.animate = function(k) {
- var G = this.chart, z = this.group, $ = this.markerGroup, q = G.inverted, it = x(this.options.animation), et = [this.getSharedClipKey(), it.duration, it.easing, it.defer].join(), nt = G.sharedClips[et], rt = G.sharedClips[et + "m"];
- if (k && z)
- it = this.getClipBox(), nt ? nt.attr("height", it.height) : (it.width = 0, q && (it.x = G.plotHeight), nt = G.renderer.clipRect(it), G.sharedClips[et] = nt, rt = G.renderer.clipRect({ x: q ? (G.plotSizeX || 0) + 99 : -99, y: q ? -G.plotLeft : -G.plotTop, width: 99, height: q ? G.chartWidth : G.chartHeight }), G.sharedClips[et + "m"] = rt), z.clip(nt), $ && $.clip(rt);
- else if (nt && !nt.hasClass("highcharts-animating")) {
- G = this.getClipBox();
- var ct = it.step;
- $ && $.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(G, it);
- }
- }, Q.prototype.afterAnimate = function() {
- var k = this;
- this.setClip(), g(
- this.chart.sharedClips,
- function(G, z, $) {
- G && !k.chart.container.querySelector('[clip-path="url(#' + G.id + ')"]') && (G.destroy(), delete $[z]);
- }
- ), this.finishedAnimating = !0, A(this, "afterAnimate");
- }, Q.prototype.drawPoints = function() {
- var k = this.points, G = this.chart, z = this.options.marker, $ = this[this.specialGroup] || this.markerGroup, q = this.xAxis, it = m(z.enabled, !q || q.isRadial ? !0 : null, this.closestPointRangePx >= z.enabledThreshold * z.radius), et, nt;
- if (z.enabled !== !1 || this._hasPointMarkers)
- for (et = 0; et < k.length; et++) {
- var rt = k[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 = G.renderer.symbol(ht, at.x, at.y, at.width, at.height, dt ? gt : z).add($), this.enabledDataSorting && G.hasRendered && (nt.attr({ x: rt.startXPos }), ct = "animate")), nt && ct === "animate" && nt[J ? "show" : "hide"](J).animate(at), nt && !G.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(k, G) {
- var z = this.options, $ = z.marker, q = k.marker || {}, it = q.symbol || $.symbol, et = m(q.radius, $.radius);
- return G && ($ = $.states[G], G = q.states && q.states[G], et = m(G && G.radius, $ && $.radius, et + ($ && $.radiusPlus || 0))), k.hasImage = it && it.indexOf("url") === 0, k.hasImage && (et = 0), k = { x: z.crisp ? Math.floor(k.plotX - et) : k.plotX - et, y: k.plotY - et }, et && (k.width = k.height = 2 * et), k;
- }, Q.prototype.pointAttribs = function(k, G) {
- var z = this.options.marker, $ = k && k.options, q = $ && $.marker || {}, it = $ && $.color, et = k && k.color, nt = k && k.zone && k.zone.color, rt = this.color;
- return k = m(q.lineWidth, z.lineWidth), $ = 1, rt = it || nt || et || rt, it = q.fillColor || z.fillColor || rt, et = q.lineColor || z.lineColor || rt, G = G || "normal", z = z.states[G] || {}, G = q.states && q.states[G] || {}, k = m(G.lineWidth, z.lineWidth, k + m(G.lineWidthPlus, z.lineWidthPlus, 0)), it = G.fillColor || z.fillColor || it, et = G.lineColor || z.lineColor || et, $ = m(G.opacity, z.opacity, $), { stroke: et, "stroke-width": k, fill: it, opacity: $ };
- }, Q.prototype.destroy = function(k) {
- var G = this, z = G.chart, $ = /AppleWebKit\/533/.test(M.navigator.userAgent), q = G.data || [], it, et, nt, rt;
- for (A(G, "destroy"), this.removeEvents(k), (G.axisTypes || []).forEach(function(ct) {
- (rt = G[ct]) && rt.series && (s(rt.series, G), rt.isDirty = rt.forceRedraw = !0);
- }), G.legendItem && G.chart.legend.destroyItem(G), et = q.length; et--; )
- (nt = q[et]) && nt.destroy && nt.destroy();
- G.clips && G.clips.forEach(function(ct) {
- return ct.destroy();
- }), b.clearTimeout(G.animationTimeout), g(G, function(ct, gt) {
- ct instanceof N && !ct.survive && (it = $ && gt === "group" ? "hide" : "destroy", ct[it]());
- }), z.hoverSeries === G && (z.hoverSeries = void 0), s(z.series, G), z.orderSeries(), g(G, function(ct, gt) {
- k && gt === "hcEvents" || delete G[gt];
- });
- }, Q.prototype.applyZones = function() {
- var k = this, G = this.chart, z = G.renderer, $ = this.zones, q = this.clips || [], it = this.graph, et = this.area, nt = Math.max(G.chartWidth, G.chartHeight), rt = this[(this.zoneAxis || "y") + "Axis"], ct = G.inverted, gt, dt, ht, at, J, tt, st, lt, pt = !1;
- if ($.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();
- $.forEach(function(Pt, At) {
- gt = yt ? vt ? G.plotWidth : 0 : vt ? 0 : rt.toPixels(Mt.min) || 0, gt = c(m(dt, gt), 0, nt), dt = c(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 = G.plotHeight - ht.x)) : (ht = { x: 0, y: ct ? tt : J, width: nt, height: at }, vt && (ht.y = G.plotWidth - ht.y)), ct && z.isVML && (ht = rt.isXAxis ? {
- x: 0,
- y: yt ? J : tt,
- height: ht.width,
- width: G.chartWidth
- } : { x: ht.y - G.plotLeft - G.spacingBox.x, y: 0, width: ht.height, height: G.chartHeight }), q[At] ? q[At].animate(ht) : q[At] = z.clipRect(ht), st = k["zone-area-" + At], lt = k["zone-graph-" + At], it && lt && lt.clip(q[At]), et && st && st.clip(q[At]), pt = Pt.value > Mt.max, k.resetZones && dt === 0 && (dt = void 0);
- }), this.clips = q;
- } else
- k.visible && (it && it.show(!0), et && et.show(!0));
- }, Q.prototype.invertGroups = function(k) {
- function G() {
- ["group", "markerGroup"].forEach(function(q) {
- z[q] && ($.renderer.isVML && z[q].attr({ width: z.yAxis.len, height: z.xAxis.len }), z[q].width = z.yAxis.len, z[q].height = z.xAxis.len, z[q].invert(z.isRadialSeries ? !1 : k));
- });
- }
- var z = this, $ = z.chart;
- z.xAxis && (z.eventsToUnbind.push(w($, "resize", G)), G(), z.invertGroups = G);
- }, Q.prototype.plotGroup = function(k, G, z, $, q) {
- var it = this[k], et = !it;
- return z = { visibility: z, zIndex: $ || 0.1 }, typeof this.opacity > "u" || this.chart.styledMode || this.state === "inactive" || (z.opacity = this.opacity), et && (this[k] = it = this.chart.renderer.g().add(q)), it.addClass("highcharts-" + G + " highcharts-series-" + this.index + " highcharts-" + this.type + "-series " + (h(this.colorIndex) ? "highcharts-color-" + this.colorIndex + " " : "") + (this.options.className || "") + (it.hasClass("highcharts-tracker") ? " highcharts-tracker" : ""), !0), it.attr(z)[et ? "attr" : "animate"](this.getPlotBox()), it;
- }, Q.prototype.getPlotBox = function() {
- var k = this.chart, G = this.xAxis, z = this.yAxis;
- return k.inverted && (G = z, z = this.xAxis), { translateX: G ? G.left : k.plotLeft, translateY: z ? z.top : k.plotTop, scaleX: 1, scaleY: 1 };
- }, Q.prototype.removeEvents = function(k) {
- k || L(this), this.eventsToUnbind.length && (this.eventsToUnbind.forEach(function(G) {
- G();
- }), this.eventsToUnbind.length = 0);
- }, Q.prototype.render = function() {
- var k = this, G = k.chart, z = k.options, $ = x(z.animation), q = k.visible ? "inherit" : "hidden", it = z.zIndex, et = k.hasRendered, nt = G.seriesGroup, rt = G.inverted;
- G = !k.finishedAnimating && G.renderer.isSVG ? $.duration : 0, A(this, "render");
- var ct = k.plotGroup("group", "series", q, it, nt);
- k.markerGroup = k.plotGroup("markerGroup", "markers", q, it, nt), z.clip !== !1 && k.setClip(), k.animate && G && k.animate(!0), ct.inverted = m(k.invertible, k.isCartesian) ? rt : !1, k.drawGraph && (k.drawGraph(), k.applyZones()), k.visible && k.drawPoints(), k.drawDataLabels && k.drawDataLabels(), k.redrawPoints && k.redrawPoints(), k.drawTracker && k.options.enableMouseTracking !== !1 && k.drawTracker(), k.invertGroups(rt), k.animate && G && k.animate(), et || (G && $.defer && (G += $.defer), k.animationTimeout = V(function() {
- k.afterAnimate();
- }, G || 0)), k.isDirty = !1, k.hasRendered = !0, A(k, "afterRender");
- }, Q.prototype.redraw = function() {
- var k = this.chart, G = this.isDirty || this.isDirtyData, z = this.group, $ = this.xAxis, q = this.yAxis;
- z && (k.inverted && z.attr({
- width: k.plotWidth,
- height: k.plotHeight
- }), z.animate({ translateX: m($ && $.left, k.plotLeft), translateY: m(q && q.top, k.plotTop) })), this.translate(), this.render(), G && delete this.kdTree;
- }, Q.prototype.searchPoint = function(k, G) {
- var z = this.xAxis, $ = this.yAxis, q = this.chart.inverted;
- return this.searchKDTree({ clientX: q ? z.len - k.chartY + z.pos : k.chartX - z.pos, plotY: q ? $.len - k.chartX + $.pos : k.chartY - $.pos }, G, k);
- }, Q.prototype.buildKDTree = function(k) {
- function G(q, it, et) {
- var nt = q && q.length;
- if (nt) {
- var rt = z.kdAxisArray[it % et];
- return q.sort(function(ct, gt) {
- return ct[rt] - gt[rt];
- }), nt = Math.floor(nt / 2), { point: q[nt], left: G(q.slice(0, nt), it + 1, et), right: G(q.slice(nt + 1), it + 1, et) };
- }
- }
- this.buildingKdTree = !0;
- var z = this, $ = -1 < z.options.findNearestPointBy.indexOf("y") ? 2 : 1;
- delete z.kdTree, V(function() {
- z.kdTree = G(z.getValidPoints(null, !z.directTouch), $, $), z.buildingKdTree = !1;
- }, z.options.kdNow || k && k.type === "touchstart" ? 0 : 1);
- }, Q.prototype.searchKDTree = function(k, G, z) {
- function $(rt, ct, gt, dt) {
- var ht = ct.point, at = q.kdAxisArray[gt % dt], J = ht, tt = h(rt[it]) && h(ht[it]) ? Math.pow(rt[it] - ht[it], 2) : null, st = h(rt[et]) && h(ht[et]) ? Math.pow(rt[et] - ht[et], 2) : null;
- return st = (tt || 0) + (st || 0), ht.dist = h(st) ? Math.sqrt(st) : Number.MAX_VALUE, ht.distX = h(tt) ? Math.sqrt(tt) : Number.MAX_VALUE, at = rt[at] - ht[at], st = 0 > at ? "left" : "right", tt = 0 > at ? "right" : "left", ct[st] && (st = $(rt, ct[st], gt + 1, dt), J = st[nt] < J[nt] ? st : ht), ct[tt] && Math.sqrt(at * at) < J[nt] && (rt = $(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 = G ? "distX" : "dist";
- if (G = -1 < q.options.findNearestPointBy.indexOf("y") ? 2 : 1, this.kdTree || this.buildingKdTree || this.buildKDTree(z), this.kdTree)
- return $(
- k,
- this.kdTree,
- G,
- G
- );
- }, Q.prototype.pointPlacementToXValue = function() {
- var k = this.options, G = k.pointRange, z = this.xAxis;
- return k = k.pointPlacement, k === "between" && (k = z.reversed ? -0.5 : 0.5), W(k) ? k * (G || z.pointRange) : 0;
- }, Q.prototype.isPointInside = function(k) {
- var G = this.chart, z = this.xAxis, $ = this.yAxis;
- return typeof k.plotY < "u" && typeof k.plotX < "u" && 0 <= k.plotY && k.plotY <= ($ ? $.len : G.plotHeight) && 0 <= k.plotX && k.plotX <= (z ? z.len : G.plotWidth);
- }, Q.prototype.drawTracker = function() {
- var k = this, G = k.options, z = G.trackByArea, $ = [].concat(z ? k.areaPath : k.graphPath), q = k.chart, it = q.pointer, et = q.renderer, nt = q.options.tooltip.snap, rt = k.tracker, ct = function(dt) {
- q.hoverSeries !== k && k.onMouseOver();
- }, gt = "rgba(192,192,192," + (B ? 1e-4 : 2e-3) + ")";
- rt ? rt.attr({ d: $ }) : k.graph && (k.tracker = et.path($).attr({ visibility: k.visible ? "visible" : "hidden", zIndex: 2 }).addClass(z ? "highcharts-tracker-area" : "highcharts-tracker-line").add(k.group), q.styledMode || k.tracker.attr({ "stroke-linecap": "round", "stroke-linejoin": "round", stroke: gt, fill: z ? gt : "none", "stroke-width": k.graph.strokeWidth() + (z ? 0 : 2 * nt) }), [k.tracker, k.markerGroup, k.dataLabelsGroup].forEach(function(dt) {
- dt && (dt.addClass("highcharts-tracker").on("mouseover", ct).on("mouseout", function(ht) {
- it.onTrackerMouseOut(ht);
- }), G.cursor && !q.styledMode && dt.css({ cursor: G.cursor }), O) && dt.on("touchstart", ct);
- })), A(this, "afterDrawTracker");
- }, Q.prototype.addPoint = function(k, G, 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;
- G = m(G, !0);
- var ht = { series: this };
- this.pointClass.prototype.applyOptions.apply(
- ht,
- [k]
- );
- 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, k), dt && (this.data.splice(J, 0, null), this.processData()), it.legendType === "point" && this.generatePoints(), z && (et[0] && et[0].remove ? et[0].remove(!1) : (et.shift(), this.updateParallelArrays(ht, "shift"), ct.shift())), q !== !1 && A(this, "addPoint", { point: ht }), this.isDirtyData = this.isDirty = !0, G && nt.redraw($);
- }, Q.prototype.removePoint = function(k, G, z) {
- var $ = this, q = $.data, it = q[k], et = $.points, nt = $.chart, rt = function() {
- et && et.length === q.length && et.splice(k, 1), q.splice(k, 1), $.options.data.splice(k, 1), $.updateParallelArrays(it || { series: $ }, "splice", k, 1), it && it.destroy(), $.isDirty = !0, $.isDirtyData = !0, G && nt.redraw();
- };
- u(z, nt), G = m(G, !0), it ? it.firePointEvent("remove", null, rt) : rt();
- }, Q.prototype.remove = function(k, G, z, $) {
- function q() {
- it.destroy($), et.isDirtyLegend = et.isDirtyBox = !0, et.linkSeries(), m(k, !0) && et.redraw(G);
- }
- var it = this, et = it.chart;
- z !== !1 ? A(
- it,
- "remove",
- null,
- q
- ) : q();
- }, Q.prototype.update = function(k, G) {
- k = p(k, this.userOptions), A(this, "update", { options: k });
- var z = this, $ = z.chart, q = z.userOptions, it = z.initialType || z.type, et = $.options.plotOptions, nt = S[it].prototype, rt = z.finishedAnimating && { animation: !1 }, ct = {}, gt, dt = ["eventOptions", "navigatorSeries", "baseSeries"], ht = k.type || q.type || $.options.chart.type, at = !(this.hasDerivedData || ht && ht !== this.type || typeof k.pointStart < "u" || typeof k.pointInterval < "u" || typeof k.relativeXValue < "u" || z.hasOptionChanged("dataGrouping") || z.hasOptionChanged("pointStart") || z.hasOptionChanged("pointInterval") || z.hasOptionChanged("pointIntervalUnit") || z.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"), k.visible !== !1 && dt.push("area", "graph"), z.parallelArrays.forEach(function(tt) {
- dt.push(tt + "Data");
- }), k.data && (k.dataSorting && o(z.options.dataSorting, k.dataSorting), this.setData(k.data, !1))), k = X(q, rt, { index: typeof q.index > "u" ? z.index : q.index, pointStart: m(et && et.series && et.series.pointStart, q.pointStart, z.xData[0]) }, !at && { data: z.options.data }, k), at && k.data && (k.data = z.options.data), dt = ["group", "markerGroup", "dataLabelsGroup", "transformGroup"].concat(dt), dt.forEach(function(tt) {
- dt[tt] = z[tt], delete z[tt];
- }), et = !1, S[ht]) {
- if (et = ht !== z.type, z.remove(!1, !1, !1, !0), et)
- if (Object.setPrototypeOf)
- Object.setPrototypeOf(z, S[ht].prototype);
- else {
- rt = Object.hasOwnProperty.call(z, "hcEvents") && z.hcEvents;
- for (gt in nt)
- z[gt] = void 0;
- o(z, S[ht].prototype), rt ? z.hcEvents = rt : delete z.hcEvents;
- }
- } else
- t(17, !0, $, { missingModuleFor: ht });
- if (dt.forEach(function(tt) {
- z[tt] = dt[tt];
- }), z.init($, k), at && this.points) {
- var J = z.options;
- J.visible === !1 ? (ct.graphic = 1, ct.dataLabel = 1) : z._hasPointLabels || (k = J.marker, nt = J.dataLabels, !k || k.enabled !== !1 && (q.marker && q.marker.symbol) === k.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 && $.legend.destroyItem(tt));
- }, this);
- }
- z.initialType = it, $.linkSeries(), et && z.linkedSeries.length && (z.isDirtyData = !0), A(this, "afterUpdate"), m(G, !0) && $.redraw(at ? void 0 : !1);
- }, Q.prototype.setName = function(k) {
- this.name = this.options.name = this.userOptions.name = k, this.chart.isDirtyLegend = !0;
- }, Q.prototype.hasOptionChanged = function(k) {
- var G = this.options[k], z = this.chart.options.plotOptions, $ = this.userOptions[k];
- return $ ? G !== $ : G !== m(
- z && z[this.type] && z[this.type][k],
- z && z.series && z.series[k],
- G
- );
- }, Q.prototype.onMouseOver = function() {
- var k = this.chart, G = k.hoverSeries;
- k.pointer.setHoverChartIndex(), G && G !== this && G.onMouseOut(), this.options.events.mouseOver && A(this, "mouseOver"), this.setState("hover"), k.hoverSeries = this;
- }, Q.prototype.onMouseOut = function() {
- var k = this.options, G = this.chart, z = G.tooltip, $ = G.hoverPoint;
- G.hoverSeries = null, $ && $.onMouseOut(), this && k.events.mouseOut && A(this, "mouseOut"), !z || this.stickyTracking || z.shared && !this.noSharedTooltip || z.hide(), G.series.forEach(function(q) {
- q.setState(
- "",
- !0
- );
- });
- }, Q.prototype.setState = function(k, G) {
- var z = this, $ = z.options, q = z.graph, it = $.inactiveOtherPoints, et = $.states, nt = m(et[k || "normal"] && et[k || "normal"].animation, z.chart.options.chart.animation), rt = $.lineWidth, ct = 0, gt = $.opacity;
- if (k = k || "", z.state !== k && ([z.group, z.markerGroup, z.dataLabelsGroup].forEach(function(dt) {
- dt && (z.state && dt.removeClass("highcharts-series-" + z.state), k && dt.addClass("highcharts-series-" + k));
- }), z.state = k, !z.chart.styledMode)) {
- if (et[k] && et[k].enabled === !1)
- return;
- if (k && (rt = et[k].lineWidth || rt + (et[k].lineWidthPlus || 0), gt = m(et[k].opacity, gt)), q && !q.dashstyle)
- for ($ = { "stroke-width": rt }, q.animate($, nt); z["zone-graph-" + ct]; )
- z["zone-graph-" + ct].animate($, nt), ct += 1;
- it || [z.group, z.markerGroup, z.dataLabelsGroup, z.labelBySeries].forEach(function(dt) {
- dt && dt.animate({ opacity: gt }, nt);
- });
- }
- G && it && z.points && z.setAllPointsToState(k || void 0);
- }, Q.prototype.setAllPointsToState = function(k) {
- this.points.forEach(function(G) {
- G.setState && G.setState(k);
- });
- }, Q.prototype.setVisible = function(k, G) {
- var z = this, $ = z.chart, q = z.legendItem, it = $.options.chart.ignoreHiddenSeries, et = z.visible, nt = (z.visible = k = z.options.visible = z.userOptions.visible = typeof k > "u" ? !et : k) ? "show" : "hide";
- ["group", "dataLabelsGroup", "markerGroup", "tracker", "tt"].forEach(function(rt) {
- z[rt] && z[rt][nt]();
- }), ($.hoverSeries === z || ($.hoverPoint && $.hoverPoint.series) === z) && z.onMouseOut(), q && $.legend.colorizeItem(z, k), z.isDirty = !0, z.options.stacking && $.series.forEach(function(rt) {
- rt.options.stacking && rt.visible && (rt.isDirty = !0);
- }), z.linkedSeries.forEach(function(rt) {
- rt.setVisible(k, !1);
- }), it && ($.isDirtyBox = !0), A(z, nt), G !== !1 && $.redraw();
- }, Q.prototype.show = function() {
- this.setVisible(!0);
- }, Q.prototype.hide = function() {
- this.setVisible(!1);
- }, Q.prototype.select = function(k) {
- this.selected = k = this.options.selected = typeof k > "u" ? !this.selected : k, this.checkbox && (this.checkbox.checked = k), A(this, k ? "select" : "unselect");
- }, Q.prototype.shouldShowTooltip = function(k, G, z) {
- return z === void 0 && (z = {}), z.series = this, z.visiblePlotOnly = !0, this.chart.isInsidePlot(k, G, z);
- }, Q.defaultOptions = F, Q;
- }(), o(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: U, requireSorting: !0, sorted: !0 }), R.series = y, y;
- }), T(l, "Extensions/ScrollablePlotArea.js", [l["Core/Animation/AnimationUtilities.js"], l["Core/Axis/Axis.js"], l["Core/Chart/Chart.js"], l["Core/Series/Series.js"], l["Core/Renderer/RendererRegistry.js"], l["Core/Utilities.js"]], function(y, j, I, Z, H, U) {
- var F = y.stop, R = U.addEvent, N = U.createElement, b = U.merge, x = U.pick;
- R(I, "afterSetChartSize", function(u) {
- var f = this.options.chart.scrollablePlotArea, E = f && f.minWidth;
- if (f = f && f.minHeight, !this.renderer.forExport) {
- if (E) {
- if (this.scrollablePixelsX = E = Math.max(0, E - this.chartWidth)) {
- this.scrollablePlotBox = this.renderer.scrollablePlotBox = b(this.plotBox), this.plotBox.width = this.plotWidth += E, this.inverted ? this.clipBox.height += E : this.clipBox.width += E;
- var O = { 1: { name: "right", value: E } };
- }
- } else
- f && (this.scrollablePixelsY = E = Math.max(
- 0,
- f - this.chartHeight
- )) && (this.scrollablePlotBox = this.renderer.scrollablePlotBox = b(this.plotBox), this.plotBox.height = this.plotHeight += E, this.inverted ? this.clipBox.width += E : this.clipBox.height += E, O = { 2: { name: "bottom", value: E } });
- O && !u.skipAxes && this.axes.forEach(function(B) {
- O[B.side] ? B.getPlotLinePath = function() {
- var M = O[B.side].name, S = this[M];
- this[M] = S - O[B.side].value;
- var w = j.prototype.getPlotLinePath.apply(this, arguments);
- return this[M] = S, w;
- } : (B.setAxisSize(), B.setAxisTranslation());
- });
- }
- }), R(I, "render", function() {
- this.scrollablePixelsX || this.scrollablePixelsY ? (this.setUpScrolling && this.setUpScrolling(), this.applyFixed()) : this.fixedDiv && this.applyFixed();
- }), I.prototype.setUpScrolling = function() {
- var u = this, f = { WebkitOverflowScrolling: "touch", overflowX: "hidden", overflowY: "hidden" };
- this.scrollablePixelsX && (f.overflowX = "auto"), this.scrollablePixelsY && (f.overflowY = "auto"), this.scrollingParent = N("div", { className: "highcharts-scrolling-parent" }, { position: "relative" }, this.renderTo), this.scrollingContainer = N(
- "div",
- { className: "highcharts-scrolling" },
- f,
- this.scrollingParent
- ), R(this.scrollingContainer, "scroll", function() {
- u.pointer && delete u.pointer.chartPosition;
- }), this.innerContainer = N("div", { className: "highcharts-inner-container" }, null, this.scrollingContainer), this.innerContainer.appendChild(this.container), this.setUpScrolling = null;
- }, I.prototype.moveFixedElements = function() {
- var u = this.container, f = this.fixedRenderer, E = ".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 && E.push(O + ":not(.highcharts-radial-axis)", O + "-labels:not(.highcharts-radial-axis-labels)"), E.forEach(function(B) {
- [].forEach.call(u.querySelectorAll(B), function(M) {
- (M.namespaceURI === f.SVG_NS ? f.box : f.box.parentNode).appendChild(M), M.style.pointerEvents = "auto";
- });
- });
- }, I.prototype.applyFixed = function() {
- var u = !this.fixedDiv, f = this.options.chart, E = f.scrollablePlotArea, O = H.getRendererType();
- u ? (this.fixedDiv = N("div", { className: "highcharts-fixed" }, { position: "absolute", overflow: "hidden", pointerEvents: "none", zIndex: (f.style && f.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 = f = new O(
- this.fixedDiv,
- this.chartWidth,
- this.chartHeight,
- this.options.chart.style
- ), this.scrollableMask = f.path().attr({ fill: this.options.chart.backgroundColor || "#fff", "fill-opacity": x(E.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 || u) && (this.scrollableDirty = !1, this.moveFixedElements()), f = this.chartWidth + (this.scrollablePixelsX || 0), O = this.chartHeight + (this.scrollablePixelsY || 0), F(this.container), this.container.style.width = f + "px", this.container.style.height = O + "px", this.renderer.boxWrapper.attr({ width: f, height: O, viewBox: [0, 0, f, O].join(" ") }), this.chartBackground.attr({ width: f, height: O }), this.scrollingContainer.style.height = this.chartHeight + "px", u && (E.scrollPositionX && (this.scrollingContainer.scrollLeft = this.scrollablePixelsX * E.scrollPositionX), E.scrollPositionY && (this.scrollingContainer.scrollTop = this.scrollablePixelsY * E.scrollPositionY)), O = this.axisOffset, u = this.plotTop - O[0] - 1, E = this.plotLeft - O[3] - 1, f = this.plotTop + this.plotHeight + O[2] + 1, O = this.plotLeft + this.plotWidth + O[1] + 1;
- var B = this.plotLeft + this.plotWidth - (this.scrollablePixelsX || 0), M = this.plotTop + this.plotHeight - (this.scrollablePixelsY || 0);
- u = this.scrollablePixelsX ? [["M", 0, u], ["L", this.plotLeft - 1, u], ["L", this.plotLeft - 1, f], ["L", 0, f], ["Z"], ["M", B, u], ["L", this.chartWidth, u], ["L", this.chartWidth, f], ["L", B, f], ["Z"]] : this.scrollablePixelsY ? [["M", E, 0], ["L", E, this.plotTop - 1], ["L", O, this.plotTop - 1], ["L", O, 0], ["Z"], ["M", E, M], ["L", E, this.chartHeight], ["L", O, this.chartHeight], ["L", O, M], ["Z"]] : [["M", 0, 0]], this.redrawTrigger !== "adjustHeight" && this.scrollableMask.attr({ d: u });
- }, R(j, "afterInit", function() {
- this.chart.scrollableDirty = !0;
- }), R(Z, "show", function() {
- this.chart.scrollableDirty = !0;
- });
- }), T(l, "Core/Axis/StackingAxis.js", [l["Core/Animation/AnimationUtilities.js"], l["Core/Axis/Axis.js"], l["Core/Utilities.js"]], function(y, j, I) {
- var Z = y.getDeferredAnimation, H = I.addEvent, U = I.destroyObjectProperties, F = I.fireEvent, R = I.isNumber, N = I.objectEach, b;
- return function(x) {
- function u() {
- var B = this.stacking;
- if (B) {
- var M = B.stacks;
- N(M, function(S, w) {
- U(S), M[w] = null;
- }), B && B.stackTotalGroup && B.stackTotalGroup.destroy();
- }
- }
- function f() {
- this.stacking || (this.stacking = new O(this));
- }
- var E = [];
- x.compose = function(B) {
- return E.indexOf(B) === -1 && (E.push(B), H(B, "init", f), H(B, "destroy", u)), B;
- };
- var O = function() {
- function B(M) {
- this.oldStacks = {}, this.stacks = {}, this.stacksTouched = 0, this.axis = M;
- }
- return B.prototype.buildStacks = function() {
- var M = this.axis, S = M.series, w = M.options.reversedStacks, v = S.length, a;
- if (!M.isXAxis) {
- for (this.usePercentage = !1, a = v; a--; ) {
- var c = S[w ? a : v - a - 1];
- c.setStackedPoints(), c.setGroupedPoints();
- }
- for (a = 0; a < v; a++)
- S[a].modifyStacks();
- F(M, "afterBuildStacks");
- }
- }, B.prototype.cleanStacks = function() {
- if (!this.axis.isXAxis) {
- if (this.oldStacks)
- var M = this.stacks = this.oldStacks;
- N(M, function(S) {
- N(S, function(w) {
- w.cumulative = w.total;
- });
- });
- }
- }, B.prototype.resetStacks = function() {
- var M = this, S = M.stacks;
- M.axis.isXAxis || N(S, function(w) {
- N(
- w,
- function(v, a) {
- R(v.touched) && v.touched < M.stacksTouched ? (v.destroy(), delete w[a]) : (v.total = null, v.cumulative = null);
- }
- );
- });
- }, B.prototype.renderStackTotals = function() {
- var M = this.axis, S = M.chart, w = S.renderer, v = this.stacks;
- M = Z(S, M.options.stackLabels && M.options.stackLabels.animation || !1);
- var a = this.stackTotalGroup = this.stackTotalGroup || w.g("stack-labels").attr({ visibility: "visible", zIndex: 6, opacity: 0 }).add();
- a.translate(S.plotLeft, S.plotTop), N(v, function(c) {
- N(c, function(p) {
- p.render(a);
- });
- }), a.animate(
- { opacity: 1 },
- M
- );
- }, B;
- }();
- x.Additions = O;
- }(b || (b = {})), b;
- }), T(l, "Extensions/Stacking.js", [l["Core/Axis/Axis.js"], l["Core/Chart/Chart.js"], l["Core/FormatUtilities.js"], l["Core/Globals.js"], l["Core/Series/Series.js"], l["Core/Axis/StackingAxis.js"], l["Core/Utilities.js"]], function(y, j, I, Z, H, U, F) {
- var R = I.format, N = F.correctFloat, b = F.defined, x = F.destroyObjectProperties, u = F.isArray, f = F.isNumber, E = F.objectEach, O = F.pick, B = function() {
- function M(S, w, v, a, c) {
- var p = S.chart.inverted;
- this.axis = S, this.isNegative = v, this.options = w = w || {}, this.x = a, this.total = null, this.points = {}, this.hasValidPoints = !1, this.stack = c, this.rightCliff = this.leftCliff = 0, this.alignOptions = { align: w.align || (p ? v ? "left" : "right" : "center"), verticalAlign: w.verticalAlign || (p ? "middle" : v ? "bottom" : "top"), y: w.y, x: w.x }, this.textAlign = w.textAlign || (p ? v ? "right" : "left" : "center");
- }
- return M.prototype.destroy = function() {
- x(this, this.axis);
- }, M.prototype.render = function(S) {
- var w = this.axis.chart, v = this.options, a = v.format;
- a = a ? R(a, this, w) : v.formatter.call(this), this.label ? this.label.attr({
- text: a,
- visibility: "hidden"
- }) : (this.label = w.renderer.label(a, null, null, v.shape, null, null, v.useHTML, !1, "stack-labels"), a = { r: v.borderRadius || 0, text: a, rotation: v.rotation, padding: O(v.padding, 5), visibility: "hidden" }, w.styledMode || (a.fill = v.backgroundColor, a.stroke = v.borderColor, a["stroke-width"] = v.borderWidth, this.label.css(v.style)), this.label.attr(a), this.label.added || this.label.add(S)), this.label.labelrank = w.plotSizeY;
- }, M.prototype.setOffset = function(S, w, v, a, c) {
- var p = this.axis, i = p.chart;
- a = p.translate(p.stacking.usePercentage ? 100 : a || this.total, 0, 0, 0, 1), v = p.translate(v || 0), v = b(a) && Math.abs(a - v), S = O(c, i.xAxis[0].translate(this.x)) + S, p = b(a) && this.getStackBox(i, this, S, a, w, v, p), w = this.label, v = this.isNegative, S = O(this.options.overflow, "justify") === "justify";
- var h = this.textAlign;
- w && p && (c = w.getBBox(), a = w.padding, h = h === "left" ? i.inverted ? -a : a : h === "right" ? c.width : i.inverted && h === "center" ? c.width / 2 : i.inverted ? v ? c.width + a : -a : c.width / 2, v = i.inverted ? c.height / 2 : v ? -a : c.height, this.alignOptions.x = O(this.options.x, 0), this.alignOptions.y = O(this.options.y, 0), p.x -= h, p.y -= v, w.align(this.alignOptions, null, p), i.isInsidePlot(w.alignAttr.x + h - this.alignOptions.x, w.alignAttr.y + v - this.alignOptions.y) ? w.show() : (w.alignAttr.y = -9999, S = !1), S && H.prototype.justifyDataLabel.call(this.axis, w, this.alignOptions, w.alignAttr, c, p), w.attr({ x: w.alignAttr.x, y: w.alignAttr.y }), O(!S && this.options.crop, !0) && ((i = f(w.x) && f(w.y) && i.isInsidePlot(w.x - a + w.width, w.y) && i.isInsidePlot(w.x + a, w.y)) || w.hide()));
- }, M.prototype.getStackBox = function(S, w, v, a, c, p, i) {
- var h = w.axis.reversed, s = S.inverted, t = i.height + i.pos - (s ? S.plotLeft : S.plotTop);
- return w = w.isNegative && !h || !w.isNegative && h, { x: s ? w ? a - i.right : a - p + i.pos - S.plotLeft : v + S.xAxis[0].transB - S.plotLeft, y: s ? i.height - v - c : w ? t - a - p : t - a, width: s ? p : c, height: s ? c : p };
- }, M;
- }();
- return j.prototype.getStacks = function() {
- var M = this, S = M.inverted;
- M.yAxis.forEach(function(w) {
- w.stacking && w.stacking.stacks && w.hasVisibleSeries && (w.stacking.oldStacks = w.stacking.stacks);
- }), M.series.forEach(function(w) {
- var v = w.xAxis && w.xAxis.options || {};
- !w.options.stacking || w.visible !== !0 && M.options.chart.ignoreHiddenSeries !== !1 || (w.stackKey = [w.type, O(w.options.stack, ""), S ? v.top : v.left, S ? v.height : v.width].join());
- });
- }, U.compose(y), H.prototype.setGroupedPoints = function() {
- var M = 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") : M && E(M.stacks, function(S, w) {
- w.slice(-5) === "group" && (E(S, function(v) {
- return v.destroy();
- }), delete M.stacks[w]);
- });
- }, H.prototype.setStackedPoints = function(M) {
- var S = M || this.options.stacking;
- if (S && (this.visible === !0 || this.chart.options.chart.ignoreHiddenSeries === !1)) {
- var w = this.processedXData, v = this.processedYData, a = [], c = v.length, p = this.options, i = p.threshold, h = O(p.startFromThreshold && i, 0);
- p = p.stack, M = M ? this.type + "," + S : this.stackKey;
- var s = "-" + M, t = this.negStacks, o = this.yAxis, n = o.stacking.stacks, A = o.stacking.oldStacks, _, D;
- for (o.stacking.stacksTouched += 1, D = 0; D < c; D++) {
- var W = w[D], P = v[D], X = this.getStackIndicator(
- X,
- W,
- this.index
- ), g = X.key, m = (_ = t && P < (h ? 0 : i)) ? s : M;
- n[m] || (n[m] = {}), n[m][W] || (A[m] && A[m][W] ? (n[m][W] = A[m][W], n[m][W].total = null) : n[m][W] = new B(o, o.options.stackLabels, _, W, p)), m = n[m][W], P !== null ? (m.points[g] = m.points[this.index] = [O(m.cumulative, h)], b(m.cumulative) || (m.base = g), m.touched = o.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, S === "percent" ? (_ = _ ? M : s, t && n[_] && n[_][W] ? (_ = n[_][W], m.total = _.total = Math.max(_.total, m.total) + Math.abs(P) || 0) : m.total = N(m.total + (Math.abs(P) || 0))) : S === "group" ? (u(P) && (P = P[0]), P !== null && (m.total = (m.total || 0) + 1)) : m.total = N(m.total + (P || 0)), m.cumulative = S === "group" ? (m.total || 1) - 1 : O(m.cumulative, h) + (P || 0), P !== null && (m.points[g].push(m.cumulative), a[D] = m.cumulative, m.hasValidPoints = !0);
- }
- S === "percent" && (o.stacking.usePercentage = !0), S !== "group" && (this.stackedYData = a), o.stacking.oldStacks = {};
- }
- }, H.prototype.modifyStacks = function() {
- var M = this, S = M.stackKey, w = M.yAxis.stacking.stacks, v = M.processedXData, a, c = M.options.stacking;
- M[c + "Stacker"] && [S, "-" + S].forEach(function(p) {
- for (var i = v.length, h, s; i--; )
- h = v[i], a = M.getStackIndicator(a, h, M.index, p), (s = (h = w[p] && w[p][h]) && h.points[a.key]) && M[c + "Stacker"](s, h, i);
- });
- }, H.prototype.percentStacker = function(M, S, w) {
- S = S.total ? 100 / S.total : 0, M[0] = N(M[0] * S), M[1] = N(M[1] * S), this.stackedYData[w] = M[1];
- }, H.prototype.getStackIndicator = function(M, S, w, v) {
- return !b(M) || M.x !== S || v && M.key !== v ? M = { x: S, index: 0, key: v } : M.index++, M.key = [w, S, M.index].join(), M;
- }, Z.StackItem = B, Z.StackItem;
- }), T(l, "Series/Line/LineSeries.js", [l["Core/Series/Series.js"], l["Core/Series/SeriesRegistry.js"], l["Core/Utilities.js"]], function(y, j, I) {
- var Z = this && this.__extends || function() {
- var F = function(R, N) {
- return F = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(b, x) {
- b.__proto__ = x;
- } || function(b, x) {
- for (var u in x)
- x.hasOwnProperty(u) && (b[u] = x[u]);
- }, F(R, N);
- };
- return function(R, N) {
- function b() {
- this.constructor = R;
- }
- F(R, N), R.prototype = N === null ? Object.create(N) : (b.prototype = N.prototype, new b());
- };
- }(), H = I.defined, U = I.merge;
- return I = function(F) {
- function R() {
- var N = F !== null && F.apply(this, arguments) || this;
- return N.data = void 0, N.options = void 0, N.points = void 0, N;
- }
- return Z(R, F), R.prototype.drawGraph = function() {
- var N = this, b = this.options, x = (this.gappedPath || this.getGraphPath).call(this), u = this.chart.styledMode, f = [["graph", "highcharts-graph"]];
- u || f[0].push(b.lineColor || this.color || "#cccccc", b.dashStyle), f = N.getZonesGraphs(f), f.forEach(function(E, O) {
- var B = E[0], M = N[B], S = M ? "animate" : "attr";
- M ? (M.endX = N.preventGraphAnimation ? null : x.xMap, M.animate({ d: x })) : x.length && (N[B] = M = N.chart.renderer.path(x).addClass(E[1]).attr({ zIndex: 1 }).add(N.group)), M && !u && (B = { stroke: E[2], "stroke-width": b.lineWidth, fill: N.fillGraph && N.color || "none" }, E[3] ? B.dashstyle = E[3] : b.linecap !== "square" && (B["stroke-linecap"] = B["stroke-linejoin"] = "round"), M[S](B).shadow(2 > O && b.shadow)), M && (M.startX = x.xMap, M.isArea = x.isArea);
- });
- }, R.prototype.getGraphPath = function(N, b, x) {
- var u = this, f = u.options, E = [], O = [], B, M = f.step;
- N = N || u.points;
- var S = N.reversed;
- return S && N.reverse(), (M = { right: 1, center: 2 }[M] || M && 3) && S && (M = 4 - M), N = this.getValidPoints(N, !1, !(f.connectNulls && !b && !x)), N.forEach(function(w, v) {
- var a = w.plotX, c = w.plotY, p = N[v - 1];
- (w.leftCliff || p && p.rightCliff) && !x && (B = !0), w.isNull && !H(b) && 0 < v ? B = !f.connectNulls : w.isNull && !b ? B = !0 : (v === 0 || B ? v = [["M", w.plotX, w.plotY]] : u.getPointSpline ? v = [u.getPointSpline(N, w, v)] : M ? (v = M === 1 ? [["L", p.plotX, c]] : M === 2 ? [["L", (p.plotX + a) / 2, p.plotY], ["L", (p.plotX + a) / 2, c]] : [["L", a, p.plotY]], v.push(["L", a, c])) : v = [["L", a, c]], O.push(w.x), M && (O.push(w.x), M === 2 && O.push(w.x)), E.push.apply(E, v), B = !1);
- }), E.xMap = O, u.graphPath = E;
- }, R.prototype.getZonesGraphs = function(N) {
- return this.zones.forEach(function(b, x) {
- x = ["zone-graph-" + x, "highcharts-graph highcharts-zone-graph-" + x + " " + (b.className || "")], this.chart.styledMode || x.push(b.color || this.color, b.dashStyle || this.options.dashStyle), N.push(x);
- }, this), N;
- }, R.defaultOptions = U(y.defaultOptions, {}), R;
- }(y), j.registerSeriesType("line", I), I;
- }), T(l, "Series/Area/AreaSeries.js", [
- l["Core/Color/Color.js"],
- l["Core/Legend/LegendSymbol.js"],
- l["Core/Series/SeriesRegistry.js"],
- l["Core/Utilities.js"]
- ], function(y, j, I, Z) {
- var H = this && this.__extends || function() {
- var x = function(u, f) {
- return x = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(E, O) {
- E.__proto__ = O;
- } || function(E, O) {
- for (var B in O)
- O.hasOwnProperty(B) && (E[B] = O[B]);
- }, x(u, f);
- };
- return function(u, f) {
- function E() {
- this.constructor = u;
- }
- x(u, f), u.prototype = f === null ? Object.create(f) : (E.prototype = f.prototype, new E());
- };
- }(), U = y.parse, F = I.seriesTypes.line;
- y = Z.extend;
- var R = Z.merge, N = Z.objectEach, b = Z.pick;
- return Z = function(x) {
- function u() {
- var f = x !== null && x.apply(this, arguments) || this;
- return f.data = void 0, f.options = void 0, f.points = void 0, f;
- }
- return H(u, x), u.prototype.drawGraph = function() {
- this.areaPath = [], x.prototype.drawGraph.apply(this);
- var f = this, E = this.areaPath, O = this.options, B = [["area", "highcharts-area", this.color, O.fillColor]];
- this.zones.forEach(function(M, S) {
- B.push(["zone-area-" + S, "highcharts-area highcharts-zone-area-" + S + " " + M.className, M.color || f.color, M.fillColor || O.fillColor]);
- }), B.forEach(function(M) {
- var S = M[0], w = f[S], v = w ? "animate" : "attr", a = {};
- w ? (w.endX = f.preventGraphAnimation ? null : E.xMap, w.animate({ d: E })) : (a.zIndex = 0, w = f[S] = f.chart.renderer.path(E).addClass(M[1]).add(f.group), w.isArea = !0), f.chart.styledMode || (a.fill = b(M[3], U(M[2]).setOpacity(b(O.fillOpacity, 0.75)).get())), w[v](a), w.startX = E.xMap, w.shiftUnit = O.step ? 2 : 1;
- });
- }, u.prototype.getGraphPath = function(f) {
- var E = F.prototype.getGraphPath, O = this.options, B = O.stacking, M = this.yAxis, S, w = [], v = [], a = this.index, c = M.stacking.stacks[this.stackKey], p = O.threshold, i = Math.round(M.getThreshold(O.threshold));
- O = b(O.connectNulls, B === "percent");
- var h = function(n, A, _) {
- var D = f[n];
- n = B && c[D.x].points[a];
- var W = D[_ + "Null"] || 0;
- if (_ = D[_ + "Cliff"] || 0, D = !0, _ || W) {
- var P = (W ? n[0] : n[1]) + _, X = n[0] + _;
- D = !!W;
- } else
- !B && f[A] && f[A].isNull && (P = X = p);
- typeof P < "u" && (v.push({ plotX: t, plotY: P === null ? i : M.getThreshold(P), isNull: D, isCliff: !0 }), w.push({ plotX: t, plotY: X === null ? i : M.getThreshold(X), doCurve: !1 }));
- };
- for (f = f || this.points, B && (f = this.getStackPoints(f)), S = 0; S < f.length; S++) {
- B || (f[S].leftCliff = f[S].rightCliff = f[S].leftNull = f[S].rightNull = void 0);
- var s = f[S].isNull, t = b(f[S].rectPlotX, f[S].plotX), o = B ? b(f[S].yBottom, i) : i;
- (!s || O) && (O || h(S, S - 1, "left"), s && !B && O || (v.push(f[S]), w.push({ x: S, plotX: t, plotY: o })), O || h(S, S + 1, "right"));
- }
- return S = E.call(this, v, !0, !0), w.reversed = !0, s = E.call(this, w, !0, !0), (o = s[0]) && o[0] === "M" && (s[0] = ["L", o[1], o[2]]), s = S.concat(s), s.length && s.push(["Z"]), E = E.call(this, v, !1, O), s.xMap = S.xMap, this.areaPath = s, E;
- }, u.prototype.getStackPoints = function(f) {
- var E = this, O = [], B = [], M = this.xAxis, S = this.yAxis, w = S.stacking.stacks[this.stackKey], v = {}, a = S.series, c = a.length, p = S.options.reversedStacks ? 1 : -1, i = a.indexOf(E);
- if (f = f || this.points, this.options.stacking) {
- for (var h = 0; h < f.length; h++)
- f[h].leftNull = f[h].rightNull = void 0, v[f[h].x] = f[h];
- N(w, function(t, o) {
- t.total !== null && B.push(o);
- }), B.sort(function(t, o) {
- return t - o;
- });
- var s = a.map(function(t) {
- return t.visible;
- });
- B.forEach(function(t, o) {
- var n = 0, A, _;
- if (v[t] && !v[t].isNull)
- O.push(v[t]), [-1, 1].forEach(function(W) {
- var P = W === 1 ? "rightNull" : "leftNull", X = 0, g = w[B[o + W]];
- if (g)
- for (var m = i; 0 <= m && m < c; ) {
- var L = a[m].index;
- A = g.points[L], A || (L === E.index ? v[t][P] = !0 : s[m] && (_ = w[t].points[L]) && (X -= _[1] - _[0])), m += p;
- }
- v[t][W === 1 ? "rightCliff" : "leftCliff"] = X;
- });
- else {
- for (var D = i; 0 <= D && D < c; ) {
- if (A = w[t].points[a[D].index]) {
- n = A[1];
- break;
- }
- D += p;
- }
- n = b(n, 0), n = S.translate(n, 0, 1, 0, 1), O.push({ isNull: !0, plotX: M.translate(t, 0, 0, 0, 1), x: t, plotY: n, yBottom: n });
- }
- });
- }
- return O;
- }, u.defaultOptions = R(F.defaultOptions, { threshold: 0 }), u;
- }(F), y(Z.prototype, {
- singleStacks: !1,
- drawLegendSymbol: j.drawRectangle
- }), I.registerSeriesType("area", Z), Z;
- }), T(l, "Series/Spline/SplineSeries.js", [l["Core/Series/SeriesRegistry.js"], l["Core/Utilities.js"]], function(y, j) {
- var I = this && this.__extends || function() {
- var F = function(R, N) {
- return F = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(b, x) {
- b.__proto__ = x;
- } || function(b, x) {
- for (var u in x)
- x.hasOwnProperty(u) && (b[u] = x[u]);
- }, F(R, N);
- };
- return function(R, N) {
- function b() {
- this.constructor = R;
- }
- F(R, N), R.prototype = N === null ? Object.create(N) : (b.prototype = N.prototype, new b());
- };
- }(), Z = y.seriesTypes.line, H = j.merge, U = j.pick;
- return j = function(F) {
- function R() {
- var N = F !== null && F.apply(this, arguments) || this;
- return N.data = void 0, N.options = void 0, N.points = void 0, N;
- }
- return I(R, F), R.prototype.getPointSpline = function(N, b, x) {
- var u = b.plotX || 0, f = b.plotY || 0, E = N[x - 1];
- if (x = N[x + 1], E && !E.isNull && E.doCurve !== !1 && !b.isCliff && x && !x.isNull && x.doCurve !== !1 && !b.isCliff) {
- N = E.plotY || 0;
- var O = x.plotX || 0;
- x = x.plotY || 0;
- var B = 0, M = (1.5 * u + (E.plotX || 0)) / 2.5, S = (1.5 * f + N) / 2.5;
- O = (1.5 * u + O) / 2.5;
- var w = (1.5 * f + x) / 2.5;
- O !== M && (B = (w - S) * (O - u) / (O - M) + f - w), S += B, w += B, S > N && S > f ? (S = Math.max(N, f), w = 2 * f - S) : S < N && S < f && (S = Math.min(N, f), w = 2 * f - S), w > x && w > f ? (w = Math.max(x, f), S = 2 * f - w) : w < x && w < f && (w = Math.min(x, f), S = 2 * f - w), b.rightContX = O, b.rightContY = w;
- }
- return b = ["C", U(E.rightContX, E.plotX, 0), U(E.rightContY, E.plotY, 0), U(M, u, 0), U(S, f, 0), u, f], E.rightContX = E.rightContY = void 0, b;
- }, R.defaultOptions = H(Z.defaultOptions), R;
- }(Z), y.registerSeriesType("spline", j), j;
- }), T(
- l,
- "Series/AreaSpline/AreaSplineSeries.js",
- [l["Series/Area/AreaSeries.js"], l["Series/Spline/SplineSeries.js"], l["Core/Legend/LegendSymbol.js"], l["Core/Series/SeriesRegistry.js"], l["Core/Utilities.js"]],
- function(y, j, I, Z, H) {
- var U = this && this.__extends || function() {
- var b = function(x, u) {
- return b = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(f, E) {
- f.__proto__ = E;
- } || function(f, E) {
- for (var O in E)
- E.hasOwnProperty(O) && (f[O] = E[O]);
- }, b(x, u);
- };
- return function(x, u) {
- function f() {
- this.constructor = x;
- }
- b(x, u), x.prototype = u === null ? Object.create(u) : (f.prototype = u.prototype, new f());
- };
- }(), F = y.prototype, R = H.extend, N = H.merge;
- return H = function(b) {
- function x() {
- var u = b !== null && b.apply(this, arguments) || this;
- return u.data = void 0, u.points = void 0, u.options = void 0, u;
- }
- return U(x, b), x.defaultOptions = N(j.defaultOptions, y.defaultOptions), x;
- }(j), R(H.prototype, { getGraphPath: F.getGraphPath, getStackPoints: F.getStackPoints, drawGraph: F.drawGraph, drawLegendSymbol: I.drawRectangle }), Z.registerSeriesType("areaspline", H), H;
- }
- ), T(l, "Series/Column/ColumnSeries.js", [
- l["Core/Animation/AnimationUtilities.js"],
- l["Core/Color/Color.js"],
- l["Core/Globals.js"],
- l["Core/Legend/LegendSymbol.js"],
- l["Core/Series/Series.js"],
- l["Core/Series/SeriesRegistry.js"],
- l["Core/Utilities.js"]
- ], function(y, j, I, Z, H, U, F) {
- var R = this && this.__extends || function() {
- var c = function(p, i) {
- return c = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(h, s) {
- h.__proto__ = s;
- } || function(h, s) {
- for (var t in s)
- s.hasOwnProperty(t) && (h[t] = s[t]);
- }, c(p, i);
- };
- return function(p, i) {
- function h() {
- this.constructor = p;
- }
- c(p, i), p.prototype = i === null ? Object.create(i) : (h.prototype = i.prototype, new h());
- };
- }(), N = y.animObject, b = j.parse, x = I.hasTouch;
- y = I.noop;
- var u = F.clamp, f = F.css, E = F.defined, O = F.extend, B = F.fireEvent, M = F.isArray, S = F.isNumber, w = F.merge, v = F.pick, a = F.objectEach;
- return F = function(c) {
- function p() {
- var i = c !== null && c.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(p, c), p.prototype.animate = function(i) {
- var h = this, s = this.yAxis, t = h.options, o = this.chart.inverted, n = {}, A = o ? "translateX" : "translateY";
- if (i)
- n.scaleY = 1e-3, i = u(s.toPixels(t.threshold), s.pos, s.pos + s.len), o ? n.translateX = i - s.len : n.translateY = i, h.clipBox && h.setClip(), h.group.attr(n);
- else {
- var _ = Number(h.group.attr(A));
- h.group.animate({ scaleY: 1 }, O(N(h.options.animation), { step: function(D, W) {
- h.group && (n[A] = _ + W.pos * (s.pos - _), h.group.attr(n));
- } }));
- }
- }, p.prototype.init = function(i, h) {
- c.prototype.init.apply(this, arguments);
- var s = this;
- i = s.chart, i.hasRendered && i.series.forEach(function(t) {
- t.type === s.type && (t.isDirty = !0);
- });
- }, p.prototype.getColumnMetrics = function() {
- var i = this, h = i.options, s = i.xAxis, t = i.yAxis, o = s.options.reversedStacks;
- o = s.reversed && !o || !s.reversed && o;
- var n = {}, A, _ = 0;
- h.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") {
- A = X.stackKey, typeof n[A] > "u" && (n[A] = _++);
- var L = n[A];
- } else
- m.grouping !== !1 && (L = _++);
- X.columnIndex = L;
- }
- });
- var D = Math.min(Math.abs(s.transA) * (s.ordinal && s.ordinal.slope || h.pointRange || s.closestPointRange || s.tickInterval || 1), s.len), W = D * h.groupPadding, P = (D - 2 * W) / (_ || 1);
- return h = Math.min(h.maxPointWidth || s.len, v(h.pointWidth, P * (1 - 2 * h.pointPadding))), i.columnMetrics = { width: h, offset: (P - h) / 2 + (W + ((i.columnIndex || 0) + (o ? 1 : 0)) * P - D / 2) * (o ? -1 : 1), paddedWidth: P, columnCount: _ }, i.columnMetrics;
- }, p.prototype.crispCol = function(i, h, s, t) {
- var o = this.chart, n = this.borderWidth, A = -(n % 2 ? 0.5 : 0);
- return n = n % 2 ? 0.5 : 1, o.inverted && o.renderer.isVML && (n += 1), this.options.crisp && (s = Math.round(i + s) + A, i = Math.round(i) + A, s -= i), t = Math.round(h + t) + n, A = 0.5 >= Math.abs(h) && 0.5 < t, h = Math.round(h) + n, t -= h, A && t && (--h, t += 1), { x: i, y: h, width: s, height: t };
- }, p.prototype.adjustForMissingColumns = function(i, h, s, t) {
- var o = this, n = this.options.stacking;
- if (!s.isNull && 1 < t.columnCount) {
- var A = 0, _ = 0;
- a(this.yAxis.stacking && this.yAxis.stacking.stacks, function(D) {
- if (typeof s.x == "number" && (D = D[s.x.toString()])) {
- var W = D.points[o.index], P = D.total;
- n ? (W && (A = _), D.hasValidPoints && _++) : M(W) && (A = W[1], _ = P || 0);
- }
- }), i = (s.plotX || 0) + ((_ - 1) * t.paddedWidth + h) / 2 - h - A * t.paddedWidth;
- }
- return i;
- }, p.prototype.translate = function() {
- var i = this, h = i.chart, s = i.options, t = i.dense = 2 > i.closestPointRange * i.xAxis.transA;
- t = i.borderWidth = v(s.borderWidth, t ? 0 : 1);
- var o = i.xAxis, n = i.yAxis, A = s.threshold, _ = i.translatedThreshold = n.getThreshold(A), D = v(s.minPointLength, 5), W = i.getColumnMetrics(), P = W.width, X = i.pointXOffset = W.offset, g = i.dataMin, m = i.dataMax, L = i.barW = Math.max(P, 1 + 2 * t);
- h.inverted && (_ -= 0.5), s.pointPadding && (L = Math.ceil(L)), H.prototype.translate.apply(i), i.points.forEach(function(Y) {
- var V = v(Y.yBottom, _), Q = 999 + Math.abs(V), k = Y.plotX || 0;
- Q = u(Y.plotY, -Q, n.len + Q);
- var G = Math.min(Q, V), z = Math.max(Q, V) - G, $ = P, q = k + X, it = L;
- D && Math.abs(z) < D && (z = D, k = !n.reversed && !Y.negative || n.reversed && Y.negative, S(A) && S(m) && Y.y === A && m <= A && (n.min || 0) < A && (g !== m || (n.max || 0) <= A) && (k = !k), G = Math.abs(G - _) > D ? V - D : _ - (k ? D : 0)), E(Y.options.pointWidth) && ($ = it = Math.ceil(Y.options.pointWidth), q -= Math.round(($ - P) / 2)), s.centerInCategory && (q = i.adjustForMissingColumns(q, $, Y, W)), Y.barX = q, Y.pointWidth = $, Y.tooltipPos = h.inverted ? [u(n.len + n.pos - h.plotLeft - Q, n.pos - h.plotLeft, n.len + n.pos - h.plotLeft), o.len + o.pos - h.plotTop - q - it / 2, z] : [o.left - h.plotLeft + q + it / 2, u(Q + n.pos - h.plotTop, n.pos - h.plotTop, n.len + n.pos - h.plotTop), z], Y.shapeType = i.pointClass.prototype.shapeType || "rect", Y.shapeArgs = i.crispCol.apply(i, Y.isNull ? [q, _, it, 0] : [q, G, it, z]);
- });
- }, p.prototype.drawGraph = function() {
- this.group[this.dense ? "addClass" : "removeClass"]("highcharts-dense-data");
- }, p.prototype.pointAttribs = function(i, h) {
- var s = this.options, t = this.pointAttrToOptions || {}, o = t.stroke || "borderColor", n = t["stroke-width"] || "borderWidth", A = i && i.color || this.color, _ = i && i[o] || s[o] || A;
- t = i && i.options.dashStyle || s.dashStyle;
- var D = i && i[n] || s[n] || this[n] || 0, W = v(i && i.opacity, s.opacity, 1);
- if (i && this.zones.length) {
- var P = i.getZone();
- A = i.options.color || P && (P.color || i.nonZonedColor) || this.color, P && (_ = P.borderColor || _, t = P.dashStyle || t, D = P.borderWidth || D);
- }
- return h && i && (i = w(s.states[h], i.options.states && i.options.states[h] || {}), h = i.brightness, A = i.color || typeof h < "u" && b(A).brighten(i.brightness).get() || A, _ = i[o] || _, D = i[n] || D, t = i.dashStyle || t, W = v(i.opacity, W)), o = { fill: A, stroke: _, "stroke-width": D, opacity: W }, t && (o.dashstyle = t), o;
- }, p.prototype.drawPoints = function() {
- var i = this, h = this.chart, s = i.options, t = h.renderer, o = s.animationLimit || 250, n;
- i.points.forEach(function(A) {
- var _ = A.graphic, D = !!_, W = _ && h.pointCount < o ? "animate" : "attr";
- S(A.plotY) && A.y !== null ? (n = A.shapeArgs, _ && A.hasNewShapeType() && (_ = _.destroy()), i.enabledDataSorting && (A.startXPos = i.xAxis.reversed ? -(n && n.width || 0) : i.xAxis.width), _ || (A.graphic = _ = t[A.shapeType](n).add(A.group || i.group)) && i.enabledDataSorting && h.hasRendered && h.pointCount < o && (_.attr({ x: A.startXPos }), D = !0, W = "animate"), _ && D && _[W](w(n)), s.borderRadius && _[W]({ r: s.borderRadius }), h.styledMode || _[W](i.pointAttribs(A, A.selected && "select")).shadow(A.allowShadow !== !1 && s.shadow, null, s.stacking && !s.borderRadius), _ && (_.addClass(A.getClassName(), !0), _.attr({ visibility: A.visible ? "inherit" : "hidden" }))) : _ && (A.graphic = _.destroy());
- });
- }, p.prototype.drawTracker = function() {
- var i = this, h = i.chart, s = h.pointer, t = function(n) {
- var A = s.getPointFromEvent(n);
- typeof A < "u" && (s.isDirectTouch = !0, A.onMouseOver(n));
- }, o;
- i.points.forEach(function(n) {
- o = M(n.dataLabels) ? n.dataLabels : n.dataLabel ? [n.dataLabel] : [], n.graphic && (n.graphic.element.point = n), o.forEach(function(A) {
- A.div ? A.div.point = n : A.element.point = n;
- });
- }), i._hasTracking || (i.trackerGroups.forEach(function(n) {
- i[n] && (i[n].addClass("highcharts-tracker").on("mouseover", t).on("mouseout", function(A) {
- s.onTrackerMouseOut(A);
- }), x && i[n].on(
- "touchstart",
- t
- ), !h.styledMode && i.options.cursor && i[n].css(f).css({ cursor: i.options.cursor }));
- }), i._hasTracking = !0), B(this, "afterDrawTracker");
- }, p.prototype.remove = function() {
- var i = this, h = i.chart;
- h.hasRendered && h.series.forEach(function(s) {
- s.type === i.type && (s.isDirty = !0);
- }), H.prototype.remove.apply(i, arguments);
- }, p.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" }), p;
- }(H), O(F.prototype, { cropShoulder: 0, directTouch: !0, drawLegendSymbol: Z.drawRectangle, getSymbol: y, negStacks: !0, trackerGroups: ["group", "dataLabelsGroup"] }), U.registerSeriesType("column", F), F;
- }), T(l, "Core/Series/DataLabel.js", [
- l["Core/Animation/AnimationUtilities.js"],
- l["Core/FormatUtilities.js"],
- l["Core/Utilities.js"]
- ], function(y, j, I) {
- var Z = y.getDeferredAnimation, H = j.format, U = I.defined, F = I.extend, R = I.fireEvent, N = I.isArray, b = I.merge, x = I.objectEach, u = I.pick, f = I.splat, E;
- return function(O) {
- function B(p, i, h, s, t) {
- var o = this, n = this.chart, A = this.isCartesian && n.inverted, _ = this.enabledDataSorting, D = u(p.dlBox && p.dlBox.centerX, p.plotX, -9999), W = u(p.plotY, -9999), P = i.getBBox(), X = h.rotation, g = h.align, m = n.isInsidePlot(D, Math.round(W), { inverted: A, paneCoordinates: !0, series: o }), L = function(k) {
- _ && o.xAxis && !Y && o.setDataLabelStartPos(
- p,
- i,
- t,
- m,
- k
- );
- }, Y = u(h.overflow, _ ? "none" : "justify") === "justify", V = this.visible && p.visible !== !1 && (p.series.forceDL || _ && !Y || m || u(h.inside, !!this.options.stacking) && s && n.isInsidePlot(D, A ? s.x + 1 : s.y + s.height - 1, { inverted: A, paneCoordinates: !0, series: o }));
- if (V) {
- var Q = n.renderer.fontMetrics(n.styledMode ? void 0 : h.style.fontSize, i).b;
- s = F({ x: A ? this.yAxis.len - W : D, y: Math.round(A ? this.xAxis.len - D : W), width: 0, height: 0 }, s), F(h, { width: P.width, height: P.height }), X ? (Y = !1, D = n.renderer.rotCorr(Q, X), D = { x: s.x + (h.x || 0) + s.width / 2 + D.x, y: s.y + (h.y || 0) + { top: 0, middle: 0.5, bottom: 1 }[h.verticalAlign] * s.height }, L(D), i[t ? "attr" : "animate"](D).attr({ align: g }), L = (X + 720) % 360, L = 180 < L && 360 > L, g === "left" ? D.y -= L ? P.height : 0 : g === "center" ? (D.x -= P.width / 2, D.y -= P.height / 2) : g === "right" && (D.x -= P.width, D.y -= L ? 0 : P.height), i.placed = !0, i.alignAttr = D) : (L(s), i.align(h, void 0, s), D = i.alignAttr), Y && 0 <= s.height ? this.justifyDataLabel(i, h, D, P, s, t) : u(h.crop, !0) && (V = n.isInsidePlot(D.x, D.y, { paneCoordinates: !0, series: o }) && n.isInsidePlot(D.x + P.width, D.y + P.height, {
- paneCoordinates: !0,
- series: o
- })), h.shape && !X && i[t ? "attr" : "animate"]({ anchorX: A ? n.plotWidth - p.plotY : p.plotX, anchorY: A ? n.plotHeight - p.plotX : p.plotY });
- }
- t && _ && (i.placed = !1), V || _ && !Y || (i.hide(!0), i.placed = !1);
- }
- function M(p, i) {
- var h = i.filter;
- return h ? (i = h.operator, p = p[h.property], h = h.value, i === ">" && p > h || i === "<" && p < h || i === ">=" && p >= h || i === "<=" && p <= h || i === "==" && p == h || i === "===" && p === h) : !0;
- }
- function S() {
- var p = this, i = p.chart, h = p.options, s = p.points, t = p.hasRendered || 0, o = i.renderer, n = h.dataLabels, A, _ = n.animation;
- if (_ = n.defer ? Z(
- i,
- _,
- p
- ) : { 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[p.type] && i.options.plotOptions[p.type].dataLabels), n), R(this, "drawDataLabels"), N(n) || n.enabled || p._hasPointLabels) {
- var D = p.plotGroup("dataLabelsGroup", "data-labels", t ? "inherit" : "hidden", n.zIndex || 6);
- D.attr({ opacity: +t }), !t && (t = p.dataLabelsGroup) && (p.visible && D.show(!0), t[h.animation ? "animate" : "attr"]({ opacity: 1 }, _)), s.forEach(function(W) {
- A = f(v(n, W.dlOptions || W.options && W.options.dataLabels)), A.forEach(function(P, X) {
- var g = P.enabled && (!W.isNull || W.dataLabelOnNull) && M(W, P), m = W.connectors ? W.connectors[X] : W.connector, L = W.dataLabels ? W.dataLabels[X] : W.dataLabel, Y = u(P.distance, W.labelDistance), V = !L;
- if (g) {
- var Q = W.getLabelConfig(), k = u(P[W.formatPrefix + "Format"], P.format);
- Q = U(k) ? H(k, Q, i) : (P[W.formatPrefix + "Formatter"] || P.formatter).call(Q, P), k = P.style;
- var G = P.rotation;
- i.styledMode || (k.color = u(P.color, k.color, p.color, "#000000"), k.color === "contrast" ? (W.contrastColor = o.getContrast(W.color || p.color), k.color = !U(Y) && P.inside || 0 > Y || h.stacking ? W.contrastColor : "#000000") : delete W.contrastColor, h.cursor && (k.cursor = h.cursor));
- var z = { r: P.borderRadius || 0, rotation: G, padding: P.padding, zIndex: 1 };
- i.styledMode || (z.fill = P.backgroundColor, z.stroke = P.borderColor, z["stroke-width"] = P.borderWidth), x(z, function($, q) {
- typeof $ > "u" && delete z[q];
- });
- }
- !L || g && U(Q) && !!L.div == !!P.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 && U(Q) && (L ? z.text = Q : (W.dataLabels = W.dataLabels || [], L = W.dataLabels[X] = G ? o.text(Q, 0, -9999, P.useHTML).addClass("highcharts-data-label") : o.label(Q, 0, -9999, P.shape, null, null, P.useHTML, null, "data-label"), X || (W.dataLabel = L), L.addClass(" highcharts-data-label-color-" + W.colorIndex + " " + (P.className || "") + (P.useHTML ? " highcharts-tracker" : ""))), L.options = P, L.attr(z), i.styledMode || L.css(k).shadow(P.shadow), L.added || L.add(D), P.textPath && !P.useHTML && (L.setTextPath(W.getDataLabelPath && W.getDataLabelPath(L) || W.graphic, P.textPath), W.dataLabelPath && !P.textPath.enabled && (W.dataLabelPath = W.dataLabelPath.destroy())), p.alignDataLabel(W, L, P, null, V));
- });
- });
- }
- R(this, "afterDrawDataLabels");
- }
- function w(p, i, h, s, t, o) {
- var n = this.chart, A = i.align, _ = i.verticalAlign, D = p.box ? 0 : p.padding || 0, W = i.x;
- W = W === void 0 ? 0 : W;
- var P = i.y;
- P = P === void 0 ? 0 : P;
- var X = (h.x || 0) + D;
- if (0 > X) {
- A === "right" && 0 <= W ? (i.align = "left", i.inside = !0) : W -= X;
- var g = !0;
- }
- return X = (h.x || 0) + s.width - D, X > n.plotWidth && (A === "left" && 0 >= W ? (i.align = "right", i.inside = !0) : W += n.plotWidth - X, g = !0), X = h.y + D, 0 > X && (_ === "bottom" && 0 <= P ? (i.verticalAlign = "top", i.inside = !0) : P -= X, g = !0), X = (h.y || 0) + s.height - D, X > n.plotHeight && (_ === "top" && 0 >= P ? (i.verticalAlign = "bottom", i.inside = !0) : P += n.plotHeight - X, g = !0), g && (i.x = W, i.y = P, p.placed = !o, p.align(i, void 0, t)), g;
- }
- function v(p, i) {
- var h = [], s;
- if (N(p) && !N(i))
- h = p.map(function(t) {
- return b(t, i);
- });
- else if (N(i) && !N(p))
- h = i.map(function(t) {
- return b(p, t);
- });
- else if (N(p) || N(i))
- for (s = Math.max(p.length, i.length); s--; )
- h[s] = b(p[s], i[s]);
- else
- h = b(p, i);
- return h;
- }
- function a(p, i, h, s, t) {
- var o = this.chart, n = o.inverted, A = this.xAxis, _ = A.reversed, D = n ? i.height / 2 : i.width / 2;
- p = (p = p.pointWidth) ? p / 2 : 0, i.startXPos = n ? t.x : _ ? -D - p : A.width - D + p, i.startYPos = n ? _ ? this.yAxis.height - D + p : -D - p : t.y, s ? i.visibility === "hidden" && (i.show(), i.attr({ opacity: 0 }).animate({ opacity: 1 })) : i.attr({ opacity: 1 }).animate(
- { opacity: 0 },
- void 0,
- i.hide
- ), o.hasRendered && (h && i.attr({ x: i.startXPos, y: i.startYPos }), i.placed = !0);
- }
- var c = [];
- O.compose = function(p) {
- if (c.indexOf(p) === -1) {
- var i = p.prototype;
- c.push(p), i.alignDataLabel = B, i.drawDataLabels = S, i.justifyDataLabel = w, i.setDataLabelStartPos = a;
- }
- };
- }(E || (E = {})), E;
- }), T(l, "Series/Column/ColumnDataLabel.js", [l["Core/Series/DataLabel.js"], l["Core/Series/SeriesRegistry.js"], l["Core/Utilities.js"]], function(y, j, I) {
- var Z = j.series, H = I.merge, U = I.pick, F;
- return function(R) {
- function N(x, u, f, E, O) {
- var B = this.chart.inverted, M = x.series, S = (M.xAxis ? M.xAxis.len : this.chart.plotSizeX) || 0;
- M = (M.yAxis ? M.yAxis.len : this.chart.plotSizeY) || 0;
- var w = x.dlBox || x.shapeArgs, v = U(x.below, x.plotY > U(this.translatedThreshold, M)), a = U(f.inside, !!this.options.stacking);
- w && (E = H(w), 0 > E.y && (E.height += E.y, E.y = 0), w = E.y + E.height - M, 0 < w && w < E.height && (E.height -= w), B && (E = { x: M - E.y - E.height, y: S - E.x - E.width, width: E.height, height: E.width }), a || (B ? (E.x += v ? 0 : E.width, E.width = 0) : (E.y += v ? E.height : 0, E.height = 0))), f.align = U(f.align, !B || a ? "center" : v ? "right" : "left"), f.verticalAlign = U(f.verticalAlign, B || a ? "middle" : v ? "top" : "bottom"), Z.prototype.alignDataLabel.call(this, x, u, f, E, O), f.inside && x.contrastColor && u.css({ color: x.contrastColor });
- }
- var b = [];
- R.compose = function(x) {
- y.compose(Z), b.indexOf(x) === -1 && (b.push(x), x.prototype.alignDataLabel = N);
- };
- }(F || (F = {})), F;
- }), T(l, "Series/Bar/BarSeries.js", [l["Series/Column/ColumnSeries.js"], l["Core/Series/SeriesRegistry.js"], l["Core/Utilities.js"]], function(y, j, I) {
- var Z = this && this.__extends || function() {
- var F = function(R, N) {
- return F = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(b, x) {
- b.__proto__ = x;
- } || function(b, x) {
- for (var u in x)
- x.hasOwnProperty(u) && (b[u] = x[u]);
- }, F(R, N);
- };
- return function(R, N) {
- function b() {
- this.constructor = R;
- }
- F(R, N), R.prototype = N === null ? Object.create(N) : (b.prototype = N.prototype, new b());
- };
- }(), H = I.extend, U = I.merge;
- return I = function(F) {
- function R() {
- var N = F !== null && F.apply(this, arguments) || this;
- return N.data = void 0, N.options = void 0, N.points = void 0, N;
- }
- return Z(R, F), R.defaultOptions = U(
- y.defaultOptions,
- {}
- ), R;
- }(y), H(I.prototype, { inverted: !0 }), j.registerSeriesType("bar", I), I;
- }), T(l, "Series/Scatter/ScatterSeries.js", [l["Series/Column/ColumnSeries.js"], l["Series/Line/LineSeries.js"], l["Core/Series/SeriesRegistry.js"], l["Core/Utilities.js"]], function(y, j, I, Z) {
- var H = this && this.__extends || function() {
- var N = function(b, x) {
- return N = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(u, f) {
- u.__proto__ = f;
- } || function(u, f) {
- for (var E in f)
- f.hasOwnProperty(E) && (u[E] = f[E]);
- }, N(b, x);
- };
- return function(b, x) {
- function u() {
- this.constructor = b;
- }
- N(b, x), b.prototype = x === null ? Object.create(x) : (u.prototype = x.prototype, new u());
- };
- }(), U = Z.addEvent, F = Z.extend, R = Z.merge;
- return Z = function(N) {
- function b() {
- var x = N !== null && N.apply(this, arguments) || this;
- return x.data = void 0, x.options = void 0, x.points = void 0, x;
- }
- return H(b, N), b.prototype.applyJitter = function() {
- var x = this, u = this.options.jitter, f = this.points.length;
- u && this.points.forEach(function(E, O) {
- ["x", "y"].forEach(function(B, M) {
- var S = "plot" + B.toUpperCase();
- if (u[B] && !E.isNull) {
- var w = x[B + "Axis"], v = u[B] * w.transA;
- if (w && !w.isLog) {
- var a = Math.max(0, E[S] - v);
- w = Math.min(w.len, E[S] + v), M = 1e4 * Math.sin(O + M * f), E[S] = a + (w - a) * (M - Math.floor(M)), B === "x" && (E.clientX = E.plotX);
- }
- }
- });
- });
- }, b.prototype.drawGraph = function() {
- this.options.lineWidth ? N.prototype.drawGraph.call(this) : this.graph && (this.graph = this.graph.destroy());
- }, b.defaultOptions = R(j.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/>"
- } }), b;
- }(j), F(Z.prototype, { drawTracker: y.prototype.drawTracker, sorted: !1, requireSorting: !1, noSharedTooltip: !0, trackerGroups: ["group", "markerGroup", "dataLabelsGroup"], takeOrdinalPosition: !1 }), U(Z, "afterTranslate", function() {
- this.applyJitter();
- }), I.registerSeriesType("scatter", Z), Z;
- }), T(l, "Series/CenteredUtilities.js", [l["Core/Globals.js"], l["Core/Series/Series.js"], l["Core/Utilities.js"]], function(y, j, I) {
- var Z = y.deg2rad, H = I.isNumber, U = I.pick, F = I.relativeLength, R;
- return function(N) {
- N.getCenter = function() {
- var b = this.options, x = this.chart, u = 2 * (b.slicedOffset || 0), f = x.plotWidth - 2 * u, E = x.plotHeight - 2 * u, O = b.center, B = Math.min(f, E), M = b.size, S = b.innerSize || 0;
- for (typeof M == "string" && (M = parseFloat(M)), typeof S == "string" && (S = parseFloat(S)), b = [U(O[0], "50%"), U(O[1], "50%"), U(M && 0 > M ? void 0 : b.size, "100%"), U(S && 0 > S ? void 0 : b.innerSize || 0, "0%")], !x.angular || this instanceof j || (b[3] = 0), O = 0; 4 > O; ++O)
- M = b[O], x = 2 > O || O === 2 && /%$/.test(M), b[O] = F(M, [f, E, B, b[2]][O]) + (x ? u : 0);
- return b[3] > b[2] && (b[3] = b[2]), b;
- }, N.getStartAndEndRadians = function(b, x) {
- return b = H(b) ? b : 0, x = H(x) && x > b && 360 > x - b ? x : b + 360, { start: Z * (b + -90), end: Z * (x + -90) };
- };
- }(R || (R = {})), R;
- }), T(l, "Series/Pie/PiePoint.js", [l["Core/Animation/AnimationUtilities.js"], l["Core/Series/Point.js"], l["Core/Utilities.js"]], function(y, j, I) {
- var Z = this && this.__extends || function() {
- var x = function(u, f) {
- return x = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(E, O) {
- E.__proto__ = O;
- } || function(E, O) {
- for (var B in O)
- O.hasOwnProperty(B) && (E[B] = O[B]);
- }, x(u, f);
- };
- return function(u, f) {
- function E() {
- this.constructor = u;
- }
- x(u, f), u.prototype = f === null ? Object.create(f) : (E.prototype = f.prototype, new E());
- };
- }(), H = y.setAnimation, U = I.addEvent, F = I.defined;
- y = I.extend;
- var R = I.isNumber, N = I.pick, b = I.relativeLength;
- return j = function(x) {
- function u() {
- var f = x !== null && x.apply(this, arguments) || this;
- return f.labelDistance = void 0, f.options = void 0, f.series = void 0, f;
- }
- return Z(u, x), u.prototype.getConnectorPath = function() {
- var f = this.labelPosition, E = this.series.options.dataLabels, O = this.connectorShapes, B = E.connectorShape;
- return O[B] && (B = O[B]), B.call(this, { x: f.final.x, y: f.final.y, alignment: f.alignment }, f.connectorPosition, E);
- }, u.prototype.getTranslate = function() {
- return this.sliced ? this.slicedTranslation : { translateX: 0, translateY: 0 };
- }, u.prototype.haloPath = function(f) {
- var E = this.shapeArgs;
- return this.sliced || !this.visible ? [] : this.series.chart.renderer.symbols.arc(E.x, E.y, E.r + f, E.r + f, { innerR: E.r - 1, start: E.start, end: E.end });
- }, u.prototype.init = function() {
- var f = this;
- x.prototype.init.apply(
- this,
- arguments
- ), this.name = N(this.name, "Slice");
- var E = function(O) {
- f.slice(O.type === "select");
- };
- return U(this, "select", E), U(this, "unselect", E), this;
- }, u.prototype.isValid = function() {
- return R(this.y) && 0 <= this.y;
- }, u.prototype.setVisible = function(f, E) {
- var O = this, B = this.series, M = B.chart, S = B.options.ignoreHiddenPoint;
- E = N(E, S), f !== this.visible && (this.visible = this.options.visible = f = typeof f > "u" ? !this.visible : f, B.options.data[B.data.indexOf(this)] = this.options, ["graphic", "dataLabel", "connector", "shadowGroup"].forEach(function(w) {
- O[w] && O[w][f ? "show" : "hide"](f);
- }), this.legendItem && M.legend.colorizeItem(this, f), f || this.state !== "hover" || this.setState(""), S && (B.isDirty = !0), E && M.redraw());
- }, u.prototype.slice = function(f, E, O) {
- var B = this.series;
- H(O, B.chart), N(E, !0), this.sliced = this.options.sliced = F(f) ? f : !this.sliced, B.options.data[B.data.indexOf(this)] = this.options, this.graphic && this.graphic.animate(this.getTranslate()), this.shadowGroup && this.shadowGroup.animate(this.getTranslate());
- }, u;
- }(j), y(j.prototype, { connectorShapes: { fixedOffset: function(x, u, f) {
- var E = u.breakAt;
- return u = u.touchingSliceAt, [["M", x.x, x.y], f.softConnector ? ["C", x.x + (x.alignment === "left" ? -5 : 5), x.y, 2 * E.x - u.x, 2 * E.y - u.y, E.x, E.y] : ["L", E.x, E.y], ["L", u.x, u.y]];
- }, straight: function(x, u) {
- return u = u.touchingSliceAt, [["M", x.x, x.y], ["L", u.x, u.y]];
- }, crookedLine: function(x, u, f) {
- u = u.touchingSliceAt;
- var E = this.series, O = E.center[0], B = E.chart.plotWidth, M = E.chart.plotLeft;
- E = x.alignment;
- var S = this.shapeArgs.r;
- return f = b(f.crookDistance, 1), B = E === "left" ? O + S + (B + M - O - S) * (1 - f) : M + (O - S) * f, f = ["L", B, x.y], O = !0, (E === "left" ? B > x.x || B < u.x : B < x.x || B > u.x) && (O = !1), x = [["M", x.x, x.y]], O && x.push(f), x.push(["L", u.x, u.y]), x;
- } } }), j;
- }), T(l, "Series/Pie/PieSeries.js", [l["Series/CenteredUtilities.js"], l["Series/Column/ColumnSeries.js"], l["Core/Globals.js"], l["Core/Legend/LegendSymbol.js"], l["Series/Pie/PiePoint.js"], l["Core/Series/Series.js"], l["Core/Series/SeriesRegistry.js"], l["Core/Renderer/SVG/Symbols.js"], l["Core/Utilities.js"]], function(y, j, I, Z, H, U, F, R, N) {
- var b = this && this.__extends || function() {
- var S = function(w, v) {
- return S = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(a, c) {
- a.__proto__ = c;
- } || function(a, c) {
- for (var p in c)
- c.hasOwnProperty(p) && (a[p] = c[p]);
- }, S(w, v);
- };
- return function(w, v) {
- function a() {
- this.constructor = w;
- }
- S(w, v), w.prototype = v === null ? Object.create(v) : (a.prototype = v.prototype, new a());
- };
- }(), x = y.getStartAndEndRadians;
- I = I.noop;
- var u = N.clamp, f = N.extend, E = N.fireEvent, O = N.merge, B = N.pick, M = N.relativeLength;
- return N = function(S) {
- function w() {
- var v = S !== null && S.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 b(w, S), w.prototype.animate = function(v) {
- var a = this, c = a.points, p = a.startAngleRad;
- v || c.forEach(function(i) {
- var h = i.graphic, s = i.shapeArgs;
- h && s && (h.attr({ r: B(i.startR, a.center && a.center[3] / 2), start: p, end: p }), h.animate({ r: s.r, start: s.start, end: s.end }, a.options.animation));
- });
- }, w.prototype.drawEmpty = function() {
- var v = this.startAngleRad, a = this.endAngleRad, c = this.options;
- if (this.total === 0 && this.center) {
- var p = this.center[0], i = this.center[1];
- this.graph || (this.graph = this.chart.renderer.arc(p, i, this.center[1] / 2, 0, v, a).addClass("highcharts-empty-series").add(this.group)), this.graph.attr({ d: R.arc(p, i, this.center[2] / 2, 0, { start: v, end: a, innerR: this.center[3] / 2 }) }), this.chart.styledMode || this.graph.attr({ "stroke-width": c.borderWidth, fill: c.fillColor || "none", stroke: c.color || "#cccccc" });
- } else
- this.graph && (this.graph = this.graph.destroy());
- }, w.prototype.drawPoints = function() {
- var v = this.chart.renderer;
- this.points.forEach(function(a) {
- a.graphic && a.hasNewShapeType() && (a.graphic = a.graphic.destroy()), a.graphic || (a.graphic = v[a.shapeType](a.shapeArgs).add(a.series.group), a.delayedRendering = !0);
- });
- }, w.prototype.generatePoints = function() {
- S.prototype.generatePoints.call(this), this.updateTotals();
- }, w.prototype.getX = function(v, a, c) {
- var p = this.center, i = this.radii ? this.radii[c.index] || 0 : p[2] / 2;
- return v = Math.asin(u((v - p[1]) / (i + c.labelDistance), -1, 1)), p[0] + (a ? -1 : 1) * Math.cos(v) * (i + c.labelDistance) + (0 < c.labelDistance ? (a ? -1 : 1) * this.options.dataLabels.padding : 0);
- }, w.prototype.hasData = function() {
- return !!this.processedXData.length;
- }, w.prototype.redrawPoints = function() {
- var v = this, a = v.chart, c = a.renderer, p = v.options.shadow, i, h, s, t;
- this.drawEmpty(), !p || v.shadowGroup || a.styledMode || (v.shadowGroup = c.g("shadow").attr({ zIndex: -1 }).add(v.group)), v.points.forEach(function(o) {
- var n = {};
- if (h = o.graphic, !o.isNull && h) {
- var A = void 0;
- t = o.shapeArgs, i = o.getTranslate(), a.styledMode || (A = o.shadowGroup, p && !A && (A = o.shadowGroup = c.g("shadow").add(v.shadowGroup)), A && A.attr(i), s = v.pointAttribs(o, o.selected && "select")), o.delayedRendering ? (h.setRadialReference(v.center).attr(t).attr(i), a.styledMode || h.attr(s).attr({ "stroke-linejoin": "round" }).shadow(p, A), o.delayedRendering = !1) : (h.setRadialReference(v.center), a.styledMode || O(!0, n, s), O(!0, n, t, i), h.animate(n)), h.attr({ visibility: o.visible ? "inherit" : "hidden" }), h.addClass(o.getClassName(), !0);
- } else
- h && (o.graphic = h.destroy());
- });
- }, w.prototype.sortByAngle = function(v, a) {
- v.sort(function(c, p) {
- return typeof c.angle < "u" && (p.angle - c.angle) * a;
- });
- }, w.prototype.translate = function(v) {
- this.generatePoints();
- var a = this.options, c = a.slicedOffset, p = c + (a.borderWidth || 0), i = x(a.startAngle, a.endAngle), h = this.startAngleRad = i.start;
- i = (this.endAngleRad = i.end) - h;
- var s = this.points, t = a.dataLabels.distance;
- a = a.ignoreHiddenPoint;
- var o = s.length, n, A = 0;
- for (v || (this.center = v = this.getCenter()), n = 0; n < o; n++) {
- var _ = s[n], D = h + A * i;
- !_.isValid() || a && !_.visible || (A += _.percentage / 100);
- var W = h + A * i, P = { x: v[0], y: v[1], r: v[2] / 2, innerR: v[3] / 2, start: Math.round(1e3 * D) / 1e3, end: Math.round(1e3 * W) / 1e3 };
- _.shapeType = "arc", _.shapeArgs = P, _.labelDistance = B(_.options.dataLabels && _.options.dataLabels.distance, t), _.labelDistance = M(_.labelDistance, P.r), this.maxLabelDistance = Math.max(this.maxLabelDistance || 0, _.labelDistance), W = (W + D) / 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) * c), translateY: Math.round(Math.sin(W) * c) }, P = Math.cos(W) * v[2] / 2;
- var X = Math.sin(W) * v[2] / 2;
- _.tooltipPos = [v[0] + 0.7 * P, v[1] + 0.7 * X], _.half = W < -Math.PI / 2 || W > Math.PI / 2 ? 1 : 0, _.angle = W, D = Math.min(p, _.labelDistance / 5), _.labelPosition = { natural: { x: v[0] + P + 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] + P + Math.cos(W) * D, y: v[1] + X + Math.sin(W) * D }, touchingSliceAt: { x: v[0] + P, y: v[1] + X } } };
- }
- E(this, "afterTranslate");
- }, w.prototype.updateTotals = function() {
- var v = this.points, a = v.length, c = this.options.ignoreHiddenPoint, p, i = 0;
- for (p = 0; p < a; p++) {
- var h = v[p];
- !h.isValid() || c && !h.visible || (i += h.y);
- }
- for (this.total = i, p = 0; p < a; p++)
- h = v[p], h.percentage = 0 < i && (h.visible || !c) ? h.y / i * 100 : 0, h.total = i;
- }, w.defaultOptions = O(U.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;
- }(U), f(N.prototype, { axisTypes: [], directTouch: !0, drawGraph: void 0, drawLegendSymbol: Z.drawRectangle, drawTracker: j.prototype.drawTracker, getCenter: y.getCenter, getSymbol: I, isCartesian: !1, noSharedTooltip: !0, pointAttribs: j.prototype.pointAttribs, pointClass: H, requireSorting: !1, searchPoint: I, trackerGroups: ["group", "dataLabelsGroup"] }), F.registerSeriesType("pie", N), N;
- }), T(l, "Series/Pie/PieDataLabel.js", [
- l["Core/Series/DataLabel.js"],
- l["Core/Globals.js"],
- l["Core/Renderer/RendererUtilities.js"],
- l["Core/Series/SeriesRegistry.js"],
- l["Core/Utilities.js"]
- ], function(y, j, I, Z, H) {
- var U = j.noop, F = I.distribute, R = Z.series, N = H.arrayMax, b = H.clamp, x = H.defined, u = H.merge, f = H.pick, E = H.relativeLength, O;
- return function(B) {
- function M() {
- var c = this, p = c.data, i = c.chart, h = c.options.dataLabels || {}, s = h.connectorPadding, t = i.plotWidth, o = i.plotHeight, n = i.plotLeft, A = Math.round(i.chartWidth / 3), _ = c.center, D = _[2] / 2, W = _[1], P = [[], []], X = [0, 0, 0, 0], g = c.dataLabelPositioners, m, L, Y, V, Q, k, G, z, $, q, it, et;
- c.visible && (h.enabled || c._hasPointLabels) && (p.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(c), p.forEach(function(nt) {
- nt.dataLabel && (nt.visible ? (P[nt.half].push(nt), nt.dataLabel._pos = null, !x(h.style.width) && !x(nt.options.dataLabels && nt.options.dataLabels.style && nt.options.dataLabels.style.width) && nt.dataLabel.getBBox().width > A && (nt.dataLabel.css({ width: Math.round(0.7 * A) + "px" }), nt.dataLabel.shortened = !0)) : (nt.dataLabel = nt.dataLabel.destroy(), nt.dataLabels && nt.dataLabels.length === 1 && delete nt.dataLabels));
- }), P.forEach(function(nt, rt) {
- var ct = nt.length, gt = [], dt;
- if (ct) {
- if (c.sortByAngle(nt, rt - 0.5), 0 < c.maxLabelDistance) {
- var ht = Math.max(0, W - D - c.maxLabelDistance), at = Math.min(W + D + c.maxLabelDistance, i.plotHeight);
- nt.forEach(function(J) {
- 0 < J.labelDistance && J.dataLabel && (J.top = Math.max(0, W - D - J.labelDistance), J.bottom = Math.min(W + D + 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, F(gt, ht, ht / 5);
- }
- for (it = 0; it < ct; it++) {
- if (m = nt[it], k = m.labelPosition, V = m.dataLabel, q = m.visible === !1 ? "hidden" : "inherit", $ = ht = k.natural.y, gt && x(m.distributeBox) && (typeof m.distributeBox.pos > "u" ? q = "hidden" : (G = m.distributeBox.size, $ = g.radialDistributionY(m))), delete m.positionIndex, h.justify)
- z = g.justify(m, D, _);
- else
- switch (h.alignTo) {
- case "connectors":
- z = g.alignToConnectors(nt, rt, t, n);
- break;
- case "plotEdges":
- z = g.alignToPlotEdges(V, rt, t, n);
- break;
- default:
- z = g.radialDistributionX(c, m, $, ht);
- }
- V._attr = { visibility: q, align: k.alignment }, et = m.options.dataLabels || {}, V._pos = { x: z + f(et.x, h.x) + ({ left: s, right: -s }[k.alignment] || 0), y: $ + f(et.y, h.y) - 10 }, k.final.x = z, k.final.y = $, f(h.crop, !0) && (Q = V.getBBox().width, ht = null, z - Q < s && rt === 1 ? (ht = Math.round(Q - z + s), X[3] = Math.max(ht, X[3])) : z + Q > t - s && rt === 0 && (ht = Math.round(z + Q - t + s), X[1] = Math.max(ht, X[1])), 0 > $ - G / 2 ? X[0] = Math.max(Math.round(-$ + G / 2), X[0]) : $ + G / 2 > o && (X[2] = Math.max(Math.round($ + G / 2 - o), X[2])), V.sideOverflow = ht);
- }
- }
- }), N(X) === 0 || this.verifyDataLabelOverflow(X)) && (this.placeDataLabels(), this.points.forEach(function(nt) {
- if (et = u(h, nt.options.dataLabels), L = f(et.connectorWidth, 1)) {
- var rt;
- Y = nt.connector, (V = nt.dataLabel) && V._pos && nt.visible && 0 < nt.labelDistance ? (q = V._attr.visibility, (rt = !Y) && (nt.connector = Y = i.renderer.path().addClass("highcharts-data-label-connector highcharts-color-" + nt.colorIndex + (nt.className ? " " + nt.className : "")).add(c.dataLabelsGroup), i.styledMode || Y.attr({ "stroke-width": L, stroke: et.connectorColor || nt.color || "#666666" })), Y[rt ? "attr" : "animate"]({ d: nt.getConnectorPath() }), Y.attr("visibility", q)) : Y && (nt.connector = Y.destroy());
- }
- }));
- }
- function S() {
- this.points.forEach(function(c) {
- var p = c.dataLabel, i;
- p && c.visible && ((i = p._pos) ? (p.sideOverflow && (p._attr.width = Math.max(p.getBBox().width - p.sideOverflow, 0), p.css({ width: p._attr.width + "px", textOverflow: (this.options.dataLabels.style || {}).textOverflow || "ellipsis" }), p.shortened = !0), p.attr(p._attr), p[p.moved ? "animate" : "attr"](i), p.moved = !0) : p && p.attr({ y: -9999 })), delete c.distributeBox;
- }, this);
- }
- function w(c) {
- var p = this.center, i = this.options, h = i.center, s = i.minSize || 80, t = i.size !== null;
- if (!t) {
- if (h[0] !== null)
- var o = Math.max(p[2] - Math.max(c[1], c[3]), s);
- else
- o = Math.max(p[2] - c[1] - c[3], s), p[0] += (c[3] - c[1]) / 2;
- h[1] !== null ? o = b(o, s, p[2] - Math.max(c[0], c[2])) : (o = b(o, s, p[2] - c[0] - c[2]), p[1] += (c[0] - c[2]) / 2), o < p[2] ? (p[2] = o, p[3] = Math.min(E(i.innerSize || 0, o), o), this.translate(p), this.drawDataLabels && this.drawDataLabels()) : t = !0;
- }
- return t;
- }
- var v = [], a = { radialDistributionY: function(c) {
- return c.top + c.distributeBox.pos;
- }, radialDistributionX: function(c, p, i, h) {
- return c.getX(i < p.top + 2 || i > p.bottom - 2 ? h : i, p.half, p);
- }, justify: function(c, p, i) {
- return i[0] + (c.half ? -1 : 1) * (p + c.labelDistance);
- }, alignToPlotEdges: function(c, p, i, h) {
- return c = c.getBBox().width, p ? c + h : i - c - h;
- }, alignToConnectors: function(c, p, i, h) {
- var s = 0, t;
- return c.forEach(function(o) {
- t = o.dataLabel.getBBox().width, t > s && (s = t);
- }), p ? s + h : i - s - h;
- } };
- B.compose = function(c) {
- y.compose(R), v.indexOf(c) === -1 && (v.push(c), c = c.prototype, c.dataLabelPositioners = a, c.alignDataLabel = U, c.drawDataLabels = M, c.placeDataLabels = S, c.verifyDataLabelOverflow = w);
- };
- }(O || (O = {})), O;
- }), T(l, "Extensions/OverlappingDataLabels.js", [l["Core/Chart/Chart.js"], l["Core/Utilities.js"]], function(y, j) {
- function I(b, x) {
- var u = !1;
- if (b) {
- var f = b.newOpacity;
- b.oldOpacity !== f && (b.alignAttr && b.placed ? (b[f ? "removeClass" : "addClass"]("highcharts-data-label-hidden"), u = !0, b.alignAttr.opacity = f, b[b.isOld ? "animate" : "attr"](b.alignAttr, null, function() {
- x.styledMode || b.css({ pointerEvents: f ? "auto" : "none" });
- }), H(x, "afterHideOverlappingLabel")) : b.attr({ opacity: f })), b.isOld = !0;
- }
- return u;
- }
- var Z = j.addEvent, H = j.fireEvent, U = j.isArray, F = j.isNumber, R = j.objectEach, N = j.pick;
- Z(y, "render", function() {
- var b = this, x = [];
- (this.labelCollectors || []).forEach(function(u) {
- x = x.concat(u());
- }), (this.yAxis || []).forEach(function(u) {
- u.stacking && u.options.stackLabels && !u.options.stackLabels.allowOverlap && R(u.stacking.stacks, function(f) {
- R(f, function(E) {
- E.label && E.label.visibility !== "hidden" && x.push(E.label);
- });
- });
- }), (this.series || []).forEach(function(u) {
- var f = u.options.dataLabels;
- u.visible && (f.enabled !== !1 || u._hasPointLabels) && (f = function(E) {
- return E.forEach(function(O) {
- O.visible && (U(O.dataLabels) ? O.dataLabels : O.dataLabel ? [O.dataLabel] : []).forEach(function(B) {
- var M = B.options;
- B.labelrank = N(M.labelrank, O.labelrank, O.shapeArgs && O.shapeArgs.height), M.allowOverlap ? (B.oldOpacity = B.opacity, B.newOpacity = 1, I(B, b)) : x.push(B);
- });
- });
- }, f(u.nodes || []), f(u.points));
- }), this.hideOverlappingLabels(x);
- }), y.prototype.hideOverlappingLabels = function(b) {
- var x = this, u = b.length, f = x.renderer, E, O, B, M = !1, S = function(a) {
- var c, p = a.box ? 0 : a.padding || 0, i = c = 0, h;
- if (a && (!a.alignAttr || a.placed)) {
- var s = a.alignAttr || { x: a.attr("x"), y: a.attr("y") }, t = a.parentGroup;
- a.width || (c = a.getBBox(), a.width = c.width, a.height = c.height, c = f.fontMetrics(null, a.element).h);
- var o = a.width - 2 * p;
- return (h = { left: "0", center: "0.5", right: "1" }[a.alignValue]) ? i = +h * o : F(a.x) && Math.round(a.x) !== a.translateX && (i = a.x - a.translateX), { x: s.x + (t.translateX || 0) + p - (i || 0), y: s.y + (t.translateY || 0) + p - c, width: a.width - 2 * p, height: a.height - 2 * p };
- }
- };
- for (O = 0; O < u; O++)
- (E = b[O]) && (E.oldOpacity = E.opacity, E.newOpacity = 1, E.absoluteBox = S(E));
- for (b.sort(function(a, c) {
- return (c.labelrank || 0) - (a.labelrank || 0);
- }), O = 0; O < u; O++) {
- var w = (S = b[O]) && S.absoluteBox;
- for (E = O + 1; E < u; ++E) {
- var v = (B = b[E]) && B.absoluteBox;
- !w || !v || S === B || S.newOpacity === 0 || B.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 || ((S.labelrank < B.labelrank ? S : B).newOpacity = 0);
- }
- }
- b.forEach(function(a) {
- I(a, x) && (M = !0);
- }), M && H(x, "afterHideAllOverlappingLabels");
- };
- }), T(
- l,
- "Core/Responsive.js",
- [l["Core/Utilities.js"]],
- function(y) {
- var j = y.extend, I = y.find, Z = y.isArray, H = y.isObject, U = y.merge, F = y.objectEach, R = y.pick, N = y.splat, b = y.uniqueKey, x;
- return function(u) {
- var f = [];
- u.compose = function(O) {
- return f.indexOf(O) === -1 && (f.push(O), j(O.prototype, E.prototype)), O;
- };
- var E = function() {
- function O() {
- }
- return O.prototype.currentOptions = function(B) {
- function M(v, a, c, p) {
- var i;
- F(v, function(h, s) {
- if (!p && -1 < S.collectionsWithUpdate.indexOf(s) && a[s])
- for (h = N(h), c[s] = [], i = 0; i < Math.max(h.length, a[s].length); i++)
- a[s][i] && (h[i] === void 0 ? c[s][i] = a[s][i] : (c[s][i] = {}, M(h[i], a[s][i], c[s][i], p + 1)));
- else
- H(h) ? (c[s] = Z(h) ? [] : {}, M(h, a[s] || {}, c[s], p + 1)) : c[s] = typeof a[s] > "u" ? null : a[s];
- });
- }
- var S = this, w = {};
- return M(B, this.options, w, 0), w;
- }, O.prototype.matchResponsiveRule = function(B, M) {
- var S = B.condition;
- (S.callback || function() {
- return this.chartWidth <= R(S.maxWidth, Number.MAX_VALUE) && this.chartHeight <= R(S.maxHeight, Number.MAX_VALUE) && this.chartWidth >= R(S.minWidth, 0) && this.chartHeight >= R(S.minHeight, 0);
- }).call(this) && M.push(B._id);
- }, O.prototype.setResponsive = function(B, M) {
- var S = this, w = this.options.responsive, v = this.currentResponsive, a = [];
- !M && w && w.rules && w.rules.forEach(function(c) {
- typeof c._id > "u" && (c._id = b()), S.matchResponsiveRule(c, a);
- }, this), M = U.apply(void 0, a.map(function(c) {
- return I((w || {}).rules || [], function(p) {
- return p._id === c;
- });
- }).map(function(c) {
- return c && c.chartOptions;
- })), M.isResponsiveOptions = !0, a = a.toString() || void 0, a !== (v && v.ruleIds) && (v && this.update(v.undoOptions, B, !0), a ? (v = this.currentOptions(M), v.isResponsiveOptions = !0, this.currentResponsive = { ruleIds: a, mergedOptions: M, undoOptions: v }, this.update(M, B, !0)) : this.currentResponsive = void 0);
- }, O;
- }();
- }(x || (x = {})), x;
- }
- ), T(l, "masters/highcharts.src.js", [
- l["Core/Globals.js"],
- l["Core/Utilities.js"],
- l["Core/DefaultOptions.js"],
- l["Core/Animation/Fx.js"],
- l["Core/Animation/AnimationUtilities.js"],
- l["Core/Renderer/HTML/AST.js"],
- l["Core/FormatUtilities.js"],
- l["Core/Renderer/RendererUtilities.js"],
- l["Core/Renderer/SVG/SVGElement.js"],
- l["Core/Renderer/SVG/SVGRenderer.js"],
- l["Core/Renderer/HTML/HTMLElement.js"],
- l["Core/Renderer/HTML/HTMLRenderer.js"],
- l["Core/Axis/Axis.js"],
- l["Core/Axis/DateTimeAxis.js"],
- l["Core/Axis/LogarithmicAxis.js"],
- l["Core/Axis/PlotLineOrBand/PlotLineOrBand.js"],
- l["Core/Axis/Tick.js"],
- l["Core/Tooltip.js"],
- l["Core/Series/Point.js"],
- l["Core/Pointer.js"],
- l["Core/MSPointer.js"],
- l["Core/Legend/Legend.js"],
- l["Core/Chart/Chart.js"],
- l["Core/Series/Series.js"],
- l["Core/Series/SeriesRegistry.js"],
- l["Series/Column/ColumnSeries.js"],
- l["Series/Column/ColumnDataLabel.js"],
- l["Series/Pie/PieSeries.js"],
- l["Series/Pie/PieDataLabel.js"],
- l["Core/Series/DataLabel.js"],
- l["Core/Responsive.js"],
- l["Core/Color/Color.js"],
- l["Core/Time.js"]
- ], function(y, j, I, Z, H, U, F, R, N, b, x, u, f, E, O, B, M, S, w, v, a, c, p, i, h, s, t, o, n, A, _, D, W) {
- return y.animate = H.animate, y.animObject = H.animObject, y.getDeferredAnimation = H.getDeferredAnimation, y.setAnimation = H.setAnimation, y.stop = H.stop, y.timers = Z.timers, y.AST = U, y.Axis = f, y.Chart = p, y.chart = p.chart, y.Fx = Z, y.Legend = c, y.PlotLineOrBand = B, y.Point = w, y.Pointer = a.isRequired() ? a : v, y.Series = i, y.SVGElement = N, y.SVGRenderer = b, y.Tick = M, y.Time = W, y.Tooltip = S, y.Color = D, y.color = D.parse, u.compose(b), x.compose(N), y.defaultOptions = I.defaultOptions, y.getOptions = I.getOptions, y.time = I.defaultTime, y.setOptions = I.setOptions, y.dateFormat = F.dateFormat, y.format = F.format, y.numberFormat = F.numberFormat, y.addEvent = j.addEvent, y.arrayMax = j.arrayMax, y.arrayMin = j.arrayMin, y.attr = j.attr, y.clearTimeout = j.clearTimeout, y.correctFloat = j.correctFloat, y.createElement = j.createElement, y.css = j.css, y.defined = j.defined, y.destroyObjectProperties = j.destroyObjectProperties, y.discardElement = j.discardElement, y.distribute = R.distribute, y.erase = j.erase, y.error = j.error, y.extend = j.extend, y.extendClass = j.extendClass, y.find = j.find, y.fireEvent = j.fireEvent, y.getMagnitude = j.getMagnitude, y.getStyle = j.getStyle, y.inArray = j.inArray, y.isArray = j.isArray, y.isClass = j.isClass, y.isDOMElement = j.isDOMElement, y.isFunction = j.isFunction, y.isNumber = j.isNumber, y.isObject = j.isObject, y.isString = j.isString, y.keys = j.keys, y.merge = j.merge, y.normalizeTickInterval = j.normalizeTickInterval, y.objectEach = j.objectEach, y.offset = j.offset, y.pad = j.pad, y.pick = j.pick, y.pInt = j.pInt, y.relativeLength = j.relativeLength, y.removeEvent = j.removeEvent, y.seriesType = h.seriesType, y.splat = j.splat, y.stableSort = j.stableSort, y.syncTimeout = j.syncTimeout, y.timeUnits = j.timeUnits, y.uniqueKey = j.uniqueKey, y.useSerialIds = j.useSerialIds, y.wrap = j.wrap, t.compose(s), A.compose(i), E.compose(f), O.compose(f), n.compose(o), B.compose(f), _.compose(p), y;
- }), T(l, "Core/Axis/OrdinalAxis.js", [
- l["Core/Axis/Axis.js"],
- l["Core/Globals.js"],
- l["Core/Series/Series.js"],
- l["Core/Utilities.js"]
- ], function(y, j, I, Z) {
- var H = Z.addEvent, U = Z.correctFloat, F = Z.css, R = Z.defined, N = Z.error, b = Z.pick, x = Z.timeUnits, u = [], f;
- return function(E) {
- function O(t, o, n, A, _, D, W) {
- _ === void 0 && (_ = []), D === void 0 && (D = 0);
- var P = {}, X = this.options.tickPixelInterval, g = this.chart.time, m = [], L, Y, V = 0, Q = [], k = -Number.MAX_VALUE;
- if (!this.options.ordinal && !this.options.breaks || !_ || 3 > _.length || typeof o > "u")
- return g.getTimeTicks.apply(g, arguments);
- var G = _.length;
- for (L = 0; L < G; L++) {
- var z = L && _[L - 1] > n;
- if (_[L] < o && (V = L), L === G - 1 || _[L + 1] - _[L] > 5 * D || z) {
- if (_[L] > k) {
- for (Y = g.getTimeTicks(t, _[V], _[L], A); Y.length && Y[0] <= k; )
- Y.shift();
- Y.length && (k = Y[Y.length - 1]), m.push(Q.length), Q = Q.concat(Y);
- }
- V = L + 1;
- }
- if (z)
- break;
- }
- if (Y) {
- if (Y = Y.info, W && Y.unitRange <= x.hour) {
- for (L = Q.length - 1, V = 1; V < L; V++)
- if (g.dateFormat("%d", Q[V]) !== g.dateFormat("%d", Q[V - 1])) {
- P[Q[V]] = "day";
- var $ = !0;
- }
- $ && (P[Q[0]] = "day"), Y.higherRanks = P;
- }
- Y.segmentStarts = m, Q.info = Y;
- } else
- N(12, !1, this.chart);
- if (W && R(X)) {
- for (Y = Q.length, g = [], V = [], L = void 0, $ = Y; $--; )
- m = this.translate(Q[$]), L && (V[$] = L - m), g[$] = L = m;
- for (V.sort(), V = V[Math.floor(V.length / 2)], V < 0.6 * X && (V = null), $ = Q[Y - 1] > n ? Y - 1 : Y, L = void 0; $--; )
- m = g[$], Y = Math.abs(L - m), L && Y < 0.8 * X && (V === null || Y < 0.8 * V) ? (P[Q[$]] && !P[Q[$ + 1]] ? (Y = $ + 1, L = m) : Y = $, Q.splice(Y, 1)) : L = m;
- }
- return Q;
- }
- function B(t) {
- var o = this.ordinal.positions;
- if (!o)
- return t;
- var n = o.length - 1;
- if (0 > t)
- t = o[0];
- else if (t > n)
- t = o[n];
- else {
- n = Math.floor(t);
- var A = t - n;
- }
- return typeof A < "u" && typeof o[n] < "u" ? o[n] + (A ? A * (o[n + 1] - o[n]) : 0) : t;
- }
- function M(t) {
- var o = this.ordinal, n = o.positions;
- if (!n)
- return t;
- var A = (t - (this.old ? this.old.min : this.min)) * (this.old ? this.old.transA : this.transA) + this.minPixelPadding;
- if (0 < A && A < this.left + this.len || (o.extendedOrdinalPositions || (o.extendedOrdinalPositions = o.getExtendedPositions()), n = o.extendedOrdinalPositions), n && n.length) {
- if (t = o.getIndexOfPoint(A, n), o = U(t % 1), 0 <= t && t < n.length - 1)
- return n[Math.floor(t)] + o * (n[Math.ceil(t)] - n[Math.floor(t)]);
- o = n.length, A = n[0], n = n[o - 1];
- var _ = (n - A) / (o - 1);
- return 0 > t ? A + _ * t : n + _ * (t - o);
- }
- return t;
- }
- function S(t, o) {
- var n = E.Additions.findIndexOf(t, o, !0);
- return t[n] === o ? n : n + (o - t[n]) / (t[n + 1] - t[n]);
- }
- function w() {
- this.ordinal || (this.ordinal = new E.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 a() {
- this.horiz && !this.isDirty && (this.isDirty = this.isOrdinal && this.chart.navigator && !this.chart.navigator.adaptToUpdatedData);
- }
- function c() {
- this.ordinal && (this.ordinal.beforeSetTickPositions(), this.tickInterval = this.ordinal.postProcessTickInterval(this.tickInterval));
- }
- function p(t) {
- var o = this.xAxis[0], n = o.options.overscroll, A = t.originalEvent.chartX, _ = this.options.chart.panning, D = !1;
- if (_ && _.type !== "y" && o.options.ordinal && o.series.length) {
- var W = this.mouseDownX, P = o.getExtremes(), X = P.dataMax, g = P.min, m = P.max, L = this.hoverPoints, Y = o.closestPointRange || o.ordinal && o.ordinal.overscrollPointsRange;
- W = (W - A) / (o.translationSlope * (o.ordinal.slope || Y)), Y = { ordinal: { positions: o.ordinal.getExtendedPositions() } };
- var V = o.index2val, Q = o.val2lin, k = void 0, G = k = void 0, z = void 0;
- Y.ordinal.positions ? 1 < Math.abs(W) && (L && L.forEach(function($) {
- $.setState();
- }), 0 > W ? (G = Y, z = o.ordinal.positions ? o : Y) : (G = o.ordinal.positions ? o : Y, z = Y), k = z.ordinal.positions, X > k[k.length - 1] && k.push(X), this.fixedRange = m - g, k = o.navigatorAxis.toFixedRange(void 0, void 0, V.apply(G, [Q.apply(G, [g, !0]) + W]), V.apply(z, [Q.apply(z, [m, !0]) + W])), k.min >= Math.min(
- P.dataMin,
- g
- ) && k.max <= Math.max(X, m) + n && o.setExtremes(k.min, k.max, !0, !1, { trigger: "pan" }), this.mouseDownX = A, F(this.container, { cursor: "move" })) : D = !0;
- } else
- D = !0;
- D || _ && /y/.test(_.type) ? n && (o.max = o.dataMax + n) : t.preventDefault();
- }
- function i() {
- var t = this.xAxis;
- t && t.options.ordinal && (delete t.ordinal.index, delete t.ordinal.extendedOrdinalPositions);
- }
- function h(t, o) {
- var n = this.ordinal, A = n.positions, _ = n.slope, D = n.extendedOrdinalPositions;
- if (!A)
- return t;
- var W = A.length;
- if (A[0] <= t && A[W - 1] >= t)
- t = S(A, t);
- else {
- if (D || (D = n.getExtendedPositions && n.getExtendedPositions(), n.extendedOrdinalPositions = D), !D || !D.length)
- return t;
- W = D.length, _ || (_ = (D[W - 1] - D[0]) / W), A = S(D, A[0]), t >= D[0] && t <= D[W - 1] ? t = S(D, t) - A : t < D[0] ? (t = D[0] - t, t = -A - t / _) : (t -= D[W - 1], t = t / _ + W - A);
- }
- return o ? t : _ * (t || 0) + n.offset;
- }
- E.compose = function(t, o, n) {
- if (u.indexOf(t) === -1) {
- u.push(t);
- var A = t.prototype;
- A.getTimeTicks = O, A.index2val = B, A.lin2val = M, A.val2lin = h, A.ordinal2lin = A.val2lin, H(t, "afterInit", w), H(t, "foundExtremes", v), H(t, "afterSetScale", a), H(t, "initialAxisTranslation", c);
- }
- return u.indexOf(n) === -1 && (u.push(n), H(n, "pan", p)), u.indexOf(o) === -1 && (u.push(o), H(o, "updatedData", i)), t;
- };
- var s = function() {
- function t(o) {
- this.index = {}, this.axis = o;
- }
- return t.prototype.beforeSetTickPositions = function() {
- var o = this.axis, n = o.ordinal, A = o.getExtremes(), _ = A.min, D = A.max, W = o.isXAxis && !!o.options.breaks;
- A = o.options.ordinal;
- var P = o.chart.options.chart.ignoreHiddenSeries, X, g, m = [], L = Number.MAX_VALUE, Y = !1;
- if (A || W) {
- o.series.forEach(function(k, G) {
- if (X = [], !(P && k.visible === !1 || k.takeOrdinalPosition === !1 && !W) && (m = m.concat(k.processedXData), V = m.length, m.sort(function(z, $) {
- return z - $;
- }), L = Math.min(L, b(k.closestPointRange, L)), V)) {
- for (G = 0; G < V - 1; )
- m[G] !== m[G + 1] && X.push(m[G + 1]), G++;
- X[0] !== m[0] && X.unshift(m[0]), m = X;
- }
- });
- var V = m.length;
- if (2 < V) {
- var Q = m[1] - m[0];
- for (g = V - 1; g-- && !Y; )
- m[g + 1] - m[g] !== Q && (Y = !0);
- !o.options.keepOrdinalPadding && (m[0] - _ > Q || D - m[m.length - 1] > Q) && (Y = !0);
- } else
- o.options.overscroll && (V === 2 ? L = m[1] - m[0] : V === 1 ? (L = o.options.overscroll, m = [m[0], m[0] + L]) : L = n.overscrollPointsRange);
- Y || o.forceOrdinal ? (o.options.overscroll && (n.overscrollPointsRange = L, m = m.concat(n.getOverscrollPositions())), n.positions = m, Q = o.ordinal2lin(Math.max(_, m[0]), !0), g = Math.max(o.ordinal2lin(Math.min(D, m[m.length - 1]), !0), 1), n.slope = D = (D - _) / (g - Q), n.offset = _ - Q * D) : (n.overscrollPointsRange = b(o.closestPointRange, n.overscrollPointsRange), n.positions = o.ordinal.slope = n.offset = void 0);
- }
- o.isOrdinal = A && Y, n.groupIntervalFactor = null;
- }, t.findIndexOf = function(o, n, A) {
- for (var _ = 0, D = o.length - 1, W; _ < D; )
- W = Math.ceil((_ + D) / 2), o[W] <= n ? _ = W : D = W - 1;
- return o[_] === n || A ? _ : -1;
- }, t.prototype.getExtendedPositions = function() {
- var o = this, n = o.axis, A = n.constructor.prototype, _ = n.chart, D = n.series[0].currentDataGrouping, W = D ? D.count + D.unitName : "raw", P = n.options.overscroll, X = n.getExtremes(), g = void 0, m = o.index;
- if (m || (m = o.index = {}), !m[W]) {
- var L = {
- series: [],
- chart: _,
- forceOrdinal: !1,
- getExtremes: function() {
- return { min: X.dataMin, max: X.dataMax + P };
- },
- getGroupPixelWidth: A.getGroupPixelWidth,
- getTimeTicks: A.getTimeTicks,
- options: { ordinal: !0 },
- ordinal: { getGroupIntervalFactor: this.getGroupIntervalFactor },
- ordinal2lin: A.ordinal2lin,
- getIndexOfPoint: A.getIndexOfPoint,
- val2lin: A.val2lin
- };
- L.ordinal.axis = L, n.series.forEach(function(Y) {
- g = { xAxis: L, xData: Y.xData.slice(), chart: _, destroyGroupedData: j.noop, getProcessedData: I.prototype.getProcessedData, applyGrouping: I.prototype.applyGrouping }, g.xData = g.xData.concat(o.getOverscrollPositions()), g.options = { dataGrouping: D ? { firstAnchor: "firstPoint", anchor: "middle", lastAnchor: "lastPoint", enabled: !0, forced: !0, approximation: "open", units: [[D.unitName, [D.count]]] } : { enabled: !1 } }, L.series.push(g), Y.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(o, n, A) {
- A = A.processedXData;
- var _ = A.length, D = [], W = this.groupIntervalFactor;
- if (!W) {
- for (W = 0; W < _ - 1; W++)
- D[W] = A[W + 1] - A[W];
- D.sort(function(P, X) {
- return P - X;
- }), D = D[Math.floor(_ / 2)], o = Math.max(o, A[0]), n = Math.min(n, A[_ - 1]), this.groupIntervalFactor = W = _ * D / (n - o);
- }
- return W;
- }, t.prototype.getIndexOfPoint = function(o, n) {
- var A = this.axis, _ = this.positions ? this.positions[0] : 0, D = A.series[0].points && A.series[0].points[0] && A.series[0].points[0].plotX || A.minPixelPadding;
- return 1 < A.series.length && A.series.forEach(function(W) {
- W.points && R(W.points[0]) && R(W.points[0].plotX) && W.points[0].plotX < D && (D = W.points[0].plotX);
- }), o = (o - D) / (A.translationSlope * (this.slope || A.closestPointRange || this.overscrollPointsRange)), t.findIndexOf(n, _) + o;
- }, t.prototype.getOverscrollPositions = function() {
- var o = this.axis, n = o.options.overscroll, A = this.overscrollPointsRange, _ = [], D = o.dataMax;
- if (R(A))
- for (; D <= o.dataMax + n; )
- D += A, _.push(D);
- return _;
- }, t.prototype.postProcessTickInterval = function(o) {
- var n = this.axis, A = this.slope;
- return A ? n.options.breaks ? n.closestPointRange || o : o / (A / n.closestPointRange) : o;
- }, t;
- }();
- E.Additions = s;
- }(f || (f = {})), f;
- }), T(l, "Series/DataModifyComposition.js", [l["Core/Axis/Axis.js"], l["Core/Series/Point.js"], l["Core/Series/Series.js"], l["Core/Utilities.js"]], function(y, j, I, Z) {
- var H = j.prototype.tooltipFormatter, U = Z.addEvent, F = Z.arrayMax, R = Z.arrayMin, N = Z.correctFloat, b = Z.defined, x = Z.isArray, u = Z.isNumber, f = Z.isString, E = Z.pick, O;
- return function(B) {
- function M(o, n, A) {
- this.isXAxis || (this.series.forEach(function(_) {
- o === "compare" && typeof n != "boolean" ? _.setCompare(n, !1) : o !== "cumulative" || f(n) || _.setCumulative(n, !1);
- }), E(A, !0) && this.chart.redraw());
- }
- function S(o) {
- var n = this, A = n.series.chart.numberFormatter, _ = function(D) {
- o = o.replace("{point." + D + "}", (0 < n[D] && D === "change" ? "+" : "") + A(n[D], E(n.series.tooltipOptions.changeDecimals, 2)));
- };
- return b(n.change) && _("change"), b(n.cumulativeSum) && _("cumulativeSum"), H.apply(this, [o]);
- }
- function w() {
- var o = this.options.compare;
- if (o === "percent" || o === "value" || this.options.cumulative) {
- var n = new t(this);
- o === "percent" || o === "value" ? n.initCompare(o) : n.initCumulative();
- }
- this.dataModify = n;
- }
- function v(o) {
- o = o.dataExtremes;
- var n = o.activeYData;
- if (this.dataModify && o) {
- var A = void 0;
- this.options.compare ? A = [this.dataModify.modifyValue(o.dataMin), this.dataModify.modifyValue(o.dataMax)] : this.options.cumulative && x(n) && 2 <= n.length && (A = t.getCumulativeExtremes(n)), A && (o.dataMin = R(A), o.dataMax = F(A));
- }
- }
- function a(o, n) {
- this.options.compare = this.userOptions.compare = o, this.update({}, E(n, !0)), !this.dataModify || o !== "value" && o !== "percent" ? this.points.forEach(function(A) {
- delete A.change;
- }) : this.dataModify.initCompare(o);
- }
- function c() {
- if (this.xAxis && this.processedYData && this.dataModify) {
- var o = this.processedXData, n = this.processedYData, A = n.length, _ = this.options.compareStart === !0 ? 0 : 1, D = -1, W;
- for (this.pointArrayMap && (D = this.pointArrayMap.indexOf(this.options.pointValKey || this.pointValKey || "y")), W = 0; W < A - _; W++) {
- var P = n[W] && -1 < D ? n[W][D] : n[W];
- if (u(P) && P !== 0 && o[W + _] >= (this.xAxis.min || 0)) {
- this.dataModify.compareValue = P;
- break;
- }
- }
- }
- }
- function p(o, n) {
- this.setModifier("compare", o, n);
- }
- function i(o, n) {
- o = E(o, !1), this.options.cumulative = this.userOptions.cumulative = o, this.update({}, E(n, !0)), this.dataModify ? this.dataModify.initCumulative() : this.points.forEach(function(A) {
- delete A.cumulativeSum;
- });
- }
- function h(o, n) {
- this.setModifier("cumulative", o, n);
- }
- var s = [];
- B.compose = function(o, n, A) {
- if (s.indexOf(o) === -1) {
- s.push(o);
- var _ = o.prototype;
- _.setCompare = a, _.setCumulative = i, U(o, "afterInit", w), U(o, "afterGetExtremes", v), U(o, "afterProcessData", c);
- }
- return s.indexOf(n) === -1 && (s.push(n), n = n.prototype, n.setCompare = p, n.setModifier = M, n.setCumulative = h), s.indexOf(A) === -1 && (s.push(A), A.prototype.tooltipFormatter = S), o;
- };
- var t = function() {
- function o(n) {
- this.series = n;
- }
- return o.prototype.modifyValue = function() {
- return 0;
- }, o.getCumulativeExtremes = function(n) {
- var A = 1 / 0, _ = -1 / 0;
- return n.reduce(function(D, W) {
- return W = D + W, A = Math.min(A, W, D), _ = Math.max(
- _,
- W,
- D
- ), W;
- }), [A, _];
- }, o.prototype.initCompare = function(n) {
- this.modifyValue = function(A, _) {
- A === null && (A = 0);
- var D = this.compareValue;
- return typeof A < "u" && typeof D < "u" ? (A = n === "value" ? A - D : A / D * 100 - (this.series.options.compareBase === 100 ? 0 : 100), typeof _ < "u" && (_ = this.series.points[_]) && (_.change = A), A) : 0;
- };
- }, o.prototype.initCumulative = function() {
- this.modifyValue = function(n, A) {
- if (n === null && (n = 0), n !== void 0 && A !== void 0) {
- var _ = 0 < A ? this.series.points[A - 1] : null;
- return _ && _.cumulativeSum && (n = N(_.cumulativeSum + n)), (A = this.series.points[A]) && (A.cumulativeSum = n), n;
- }
- return 0;
- };
- }, o;
- }();
- B.Additions = t;
- }(O || (O = {})), O;
- }), T(l, "Core/Axis/BrokenAxis.js", [l["Extensions/Stacking.js"], l["Core/Utilities.js"]], function(y, j) {
- var I = j.addEvent, Z = j.find, H = j.fireEvent, U = j.isArray, F = j.isNumber, R = j.pick, N;
- return function(b) {
- function x() {
- typeof this.brokenAxis < "u" && this.brokenAxis.setBreaks(this.options.breaks, !1);
- }
- function u() {
- this.brokenAxis && this.brokenAxis.hasBreaks && (this.options.ordinal = !1);
- }
- function f() {
- var a = this.brokenAxis;
- if (a && a.hasBreaks) {
- for (var c = this.tickPositions, p = this.tickPositions.info, i = [], h = 0; h < c.length; h++)
- a.isInAnyBreak(c[h]) || i.push(c[h]);
- this.tickPositions = i, this.tickPositions.info = p;
- }
- }
- function E() {
- this.brokenAxis || (this.brokenAxis = new v(this));
- }
- function O() {
- var a = this.options.connectNulls, c = this.points, p = this.xAxis, i = this.yAxis;
- if (this.isDirty)
- for (var h = c.length; h--; ) {
- var s = c[h], t = !(s.y === null && a === !1) && (p && p.brokenAxis && p.brokenAxis.isInAnyBreak(s.x, !0) || i && i.brokenAxis && i.brokenAxis.isInAnyBreak(s.y, !0));
- s.visible = t ? !1 : s.options.visible !== !1;
- }
- }
- function B() {
- this.drawBreaks(this.xAxis, ["x"]), this.drawBreaks(this.yAxis, R(this.pointArrayMap, ["y"]));
- }
- function M(a, c) {
- var p = this, i = p.points, h, s, t, o;
- if (a && a.brokenAxis && a.brokenAxis.hasBreaks) {
- var n = a.brokenAxis;
- c.forEach(function(A) {
- h = n && n.breakArray || [], s = a.isXAxis ? a.min : R(p.options.threshold, a.min), i.forEach(function(_) {
- o = R(_["stack" + A.toUpperCase()], _[A]), h.forEach(function(D) {
- F(s) && F(o) && (t = !1, s < D.from && o > D.to || s > D.from && o < D.from ? t = "pointBreak" : (s < D.from && o > D.from && o < D.to || s > D.from && o > D.to && o < D.from) && (t = "pointInBreak"), t && H(a, t, { point: _, brk: D }));
- });
- });
- });
- }
- }
- function S() {
- var a = this.currentDataGrouping, c = a && a.gapSize;
- a = this.points.slice();
- var p = this.yAxis, i = this.options.gapSize, h = a.length - 1, s;
- if (i && 0 < h)
- for (this.options.gapUnit !== "value" && (i *= this.basePointRange), c && c > i && c >= this.basePointRange && (i = c), s = void 0; h--; )
- s && s.visible !== !1 || (s = a[h + 1]), c = a[h], s.visible !== !1 && c.visible !== !1 && (s.x - c.x > i && (s = (c.x + s.x) / 2, a.splice(h + 1, 0, { isNull: !0, x: s }), p.stacking && this.options.stacking && (s = p.stacking.stacks[this.stackKey][s] = new y(p, p.options.stackLabels, !1, s, this.stack), s.total = 0)), s = c);
- return this.getGraphPath(a);
- }
- var w = [];
- b.compose = function(a, c) {
- if (w.indexOf(a) === -1 && (w.push(a), a.keepProps.push("brokenAxis"), I(a, "init", E), I(a, "afterInit", x), I(a, "afterSetTickPositions", f), I(a, "afterSetOptions", u)), w.indexOf(c) === -1) {
- w.push(c);
- var p = c.prototype;
- p.drawBreaks = M, p.gappedPath = S, I(c, "afterGeneratePoints", O), I(
- c,
- "afterRender",
- B
- );
- }
- return a;
- };
- var v = function() {
- function a(c) {
- this.hasBreaks = !1, this.axis = c;
- }
- return a.isInBreak = function(c, p) {
- var i = c.repeat || 1 / 0, h = c.from, s = c.to - c.from;
- return p = p >= h ? (p - h) % i : i - (h - p) % i, c.inclusive ? p <= s : p < s && p !== 0;
- }, a.lin2Val = function(c) {
- var p = this.brokenAxis;
- if (p = p && p.breakArray, !p || !F(c))
- return c;
- var i;
- for (i = 0; i < p.length; i++) {
- var h = p[i];
- if (h.from >= c)
- break;
- (h.to < c || a.isInBreak(h, c)) && (c += h.len);
- }
- return c;
- }, a.val2Lin = function(c) {
- var p = this.brokenAxis;
- if (p = p && p.breakArray, !p || !F(c))
- return c;
- var i = c, h;
- for (h = 0; h < p.length; h++) {
- var s = p[h];
- if (s.to <= c)
- i -= s.len;
- else {
- if (s.from >= c)
- break;
- if (a.isInBreak(s, c)) {
- i -= c - s.from;
- break;
- }
- }
- }
- return i;
- }, a.prototype.findBreakAt = function(c, p) {
- return Z(p, function(i) {
- return i.from < c && c < i.to;
- });
- }, a.prototype.isInAnyBreak = function(c, p) {
- var i = this.axis, h = i.options.breaks || [], s = h.length, t;
- if (s && F(c)) {
- for (; s--; )
- if (a.isInBreak(h[s], c)) {
- var o = !0;
- t || (t = R(h[s].showPoints, !i.isXAxis));
- }
- var n = o && p ? o && !t : o;
- }
- return n;
- }, a.prototype.setBreaks = function(c, p) {
- var i = this, h = i.axis, s = U(c) && !!c.length;
- h.isDirty = i.hasBreaks !== s, i.hasBreaks = s, h.options.breaks = h.userOptions.breaks = c, h.forceRedraw = !0, h.series.forEach(function(t) {
- t.isDirty = !0;
- }), s || h.val2lin !== a.val2Lin || (delete h.val2lin, delete h.lin2val), s && (h.userOptions.ordinal = !1, h.lin2val = a.lin2Val, h.val2lin = a.val2Lin, h.setExtremes = function(t, o, n, A, _) {
- if (i.hasBreaks) {
- for (var D = this.options.breaks || [], W; W = i.findBreakAt(t, D); )
- t = W.to;
- for (; W = i.findBreakAt(o, D); )
- o = W.from;
- o < t && (o = t);
- }
- h.constructor.prototype.setExtremes.call(this, t, o, n, A, _);
- }, h.setAxisTranslation = function() {
- if (h.constructor.prototype.setAxisTranslation.call(this), i.unitLength = void 0, i.hasBreaks) {
- var t = h.options.breaks || [], o = [], n = [], A = R(h.pointRangePadding, 0), _ = 0, D, W = h.userMin || h.min, P = h.userMax || h.max, X;
- t.forEach(function(L) {
- D = L.repeat || 1 / 0, F(W) && F(P) && (a.isInBreak(L, W) && (W += L.to % D - W % D), a.isInBreak(L, P) && (P -= P % D - L.from % D));
- }), t.forEach(function(L) {
- if (m = L.from, D = L.repeat || 1 / 0, F(W) && F(P)) {
- for (; m - D > W; )
- m -= D;
- for (; m < W; )
- m += D;
- for (X = m; X < P; X += D)
- o.push({ value: X, move: "in" }), o.push({ value: X + L.to - L.from, move: "out", size: L.breakSize });
- }
- }), o.sort(function(L, Y) {
- return L.value === Y.value ? (L.move === "in" ? 0 : 1) - (Y.move === "in" ? 0 : 1) : L.value - Y.value;
- });
- var g = 0, m = W;
- o.forEach(function(L) {
- g += L.move === "in" ? 1 : -1, g === 1 && L.move === "in" && (m = L.value), g === 0 && F(m) && (n.push({ from: m, to: L.value, len: L.value - m - (L.size || 0) }), _ += L.value - m - (L.size || 0));
- }), i.breakArray = n, F(W) && F(P) && F(h.min) && (i.unitLength = P - W - _ + A, H(h, "afterBreaks"), h.staticScale ? h.transA = h.staticScale : i.unitLength && (h.transA *= (P - h.min + A) / i.unitLength), A && (h.minPixelPadding = h.transA * (h.minPointOffset || 0)), h.min = W, h.max = P);
- }
- }), R(p, !0) && h.chart.redraw();
- }, a;
- }();
- b.Additions = v;
- }(N || (N = {})), N;
- }), T(l, "masters/modules/broken-axis.src.js", [l["Core/Globals.js"], l["Core/Axis/BrokenAxis.js"]], function(y, j) {
- j.compose(y.Axis, y.Series);
- }), T(l, "Extensions/DataGrouping.js", [
- l["Core/Axis/Axis.js"],
- l["Core/Axis/DateTimeAxis.js"],
- l["Core/FormatUtilities.js"],
- l["Core/Globals.js"],
- l["Core/Series/Point.js"],
- l["Core/Series/Series.js"],
- l["Core/Tooltip.js"],
- l["Core/DefaultOptions.js"],
- l["Core/Utilities.js"]
- ], function(y, j, I, Z, H, U, F, R, N) {
- var b = I.format, x = U.prototype;
- I = N.addEvent;
- var u = N.arrayMax, f = N.arrayMin, E = N.correctFloat, O = N.defined, B = N.error, M = N.extend, S = N.isNumber, w = N.merge, v = N.pick, a = Z.approximations = {
- sum: function(t) {
- var o = t.length;
- if (!o && t.hasNulls)
- var n = null;
- else if (o)
- for (n = 0; o--; )
- n += t[o];
- return n;
- },
- average: function(t) {
- var o = t.length;
- return t = a.sum(t), S(t) && o && (t = E(t / o)), t;
- },
- averages: function() {
- var t = [];
- return [].forEach.call(arguments, function(o) {
- t.push(a.average(o));
- }), 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 ? u(t) : t.hasNulls ? null : void 0;
- },
- low: function(t) {
- return t.length ? f(t) : t.hasNulls ? null : void 0;
- },
- close: function(t) {
- return t.length ? t[t.length - 1] : t.hasNulls ? null : void 0;
- },
- hlc: function(t, o, n) {
- if (t = a.high(t), o = a.low(o), n = a.close(n), S(t) || S(o) || S(n))
- return [t, o, n];
- },
- ohlc: function(t, o, n, A) {
- if (t = a.open(t), o = a.high(o), n = a.low(n), A = a.close(A), S(t) || S(o) || S(n) || S(A))
- return [t, o, n, A];
- },
- range: function(t, o) {
- if (t = a.low(t), o = a.high(o), S(t) || S(o))
- return [t, o];
- if (t === null && o === null)
- return null;
- }
- };
- N = function(t, o, n, A) {
- var _ = this, D = _.data, W = _.options && _.options.data, P = [], X = [], g = [], m = t.length, L = !!o, Y = [], V = _.pointArrayMap, Q = V && V.length, k = ["x"].concat(V || ["y"]), G = this.options.dataGrouping && this.options.dataGrouping.groupAll, z = 0, $ = 0, q;
- A = typeof A == "function" ? A : a[A] ? a[A] : a[_.getDGApproximation && _.getDGApproximation() || "average"], Q ? V.forEach(function() {
- Y.push([]);
- }) : Y.push([]);
- var it = Q || 1;
- for (q = 0; q <= m && !(t[q] >= n[0]); q++)
- ;
- for (q; q <= m; q++) {
- for (; typeof n[z + 1] < "u" && t[q] >= n[z + 1] || q === m; ) {
- var et = n[z];
- _.dataGroupInfo = { start: G ? $ : _.cropStart + $, length: Y[0].length };
- var nt = A.apply(_, Y);
- for (_.pointClass && !O(_.dataGroupInfo.options) && (_.dataGroupInfo.options = w(_.pointClass.prototype.optionsToObject.call({ series: _ }, _.options.data[_.cropStart + $])), k.forEach(function(ct) {
- delete _.dataGroupInfo.options[ct];
- })), typeof nt < "u" && (P.push(et), X.push(nt), g.push(_.dataGroupInfo)), $ = q, et = 0; et < it; et++)
- Y[et].length = 0, Y[et].hasNulls = !1;
- if (z += 1, q === m)
- break;
- }
- if (q === m)
- break;
- if (V) {
- et = _.options.dataGrouping && _.options.dataGrouping.groupAll ? q : _.cropStart + q, nt = D && D[et] || _.pointClass.prototype.applyOptions.apply({ series: _ }, [W[et]]);
- var rt = void 0;
- for (et = 0; et < Q; et++)
- rt = nt[V[et]], S(rt) ? Y[et].push(rt) : rt === null && (Y[et].hasNulls = !0);
- } else
- et = L ? o[q] : null, S(et) ? Y[0].push(et) : et === null && (Y[0].hasNulls = !0);
- }
- return { groupedXData: P, groupedYData: X, groupMap: g };
- };
- var c = { approximations: a, groupData: N }, p = 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"] } }, h = {
- line: {},
- spline: {},
- area: {},
- areaspline: {},
- arearange: {},
- column: { groupPixelWidth: 10 },
- columnrange: { groupPixelWidth: 10 },
- candlestick: { groupPixelWidth: 10 },
- ohlc: { groupPixelWidth: 5 },
- hlc: { groupPixelWidth: 5 },
- heikinashi: { groupPixelWidth: 10 }
- }, s = Z.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 = N, x.applyGrouping = function(t) {
- var o = this.chart, n = this.options.dataGrouping, A = this.allowDG !== !1 && n && v(n.enabled, o.options.isStock), _ = this.visible || !o.options.chart.ignoreHiddenSeries, D, W = this.currentDataGrouping, P = !1;
- if (A && !this.requireSorting && (this.requireSorting = P = !0), t = !!(this.isCartesian && !this.isDirty && !this.xAxis.isDirty && !this.yAxis.isDirty && !t) || !A, P && (this.requireSorting = !1), !t) {
- this.destroyGroupedData(), A = n.groupAll ? this.xData : this.processedXData;
- var X = n.groupAll ? this.yData : this.processedYData;
- t = o.plotSizeX, P = this.xAxis;
- var g = P.options.ordinal, m = this.groupPixelWidth;
- if (m && A && A.length) {
- this.isDirty = D = !0, this.points = null;
- var L = P.getExtremes(), Y = L.min;
- L = L.max, g = g && P.ordinal && P.ordinal.getGroupIntervalFactor(Y, L, this) || 1, t = P.getTimeTicks(j.Additions.prototype.normalizeTimeTickInterval(m * (L - Y) / t * g, n.units || s), Math.min(Y, A[0]), Math.max(L, A[A.length - 1]), P.options.startOfWeek, A, this.closestPointRange), m = x.groupData.apply(this, [A, X, t, n.approximation]), A = m.groupedXData, X = m.groupedYData, g = 0, n && n.smoothed && A.length && (n.firstAnchor = "firstPoint", n.anchor = "middle", n.lastAnchor = "lastPoint", B(32, !1, o, { "dataGrouping.smoothed": "use dataGrouping.anchor" })), o = A;
- var V = this.options.dataGrouping;
- if (Y = this.currentDataGrouping && this.currentDataGrouping.gapSize, V && this.xData && Y && this.groupMap) {
- var Q = o.length - 1, k = V.anchor, G = v(V.firstAnchor, k);
- if (V = v(V.lastAnchor, k), k && k !== "start") {
- var z = Y * { middle: 0.5, end: 1 }[k];
- for (k = o.length - 1; k-- && 0 < k; )
- o[k] += z;
- }
- if (G && G !== "start" && this.xData[0] >= o[0]) {
- k = this.groupMap[0].start, z = this.groupMap[0].length;
- var $ = void 0;
- S(k) && S(z) && ($ = k + (z - 1)), o[0] = { middle: o[0] + 0.5 * Y, end: o[0] + Y, firstPoint: this.xData[0], lastPoint: $ && this.xData[$] }[G];
- }
- V && V !== "start" && Y && o[Q] >= L - Y && (L = this.groupMap[this.groupMap.length - 1].start, o[Q] = { middle: o[Q] + 0.5 * Y, end: o[Q] + Y, firstPoint: L && this.xData[L], lastPoint: this.xData[this.xData.length - 1] }[V]);
- }
- 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, _ && (_ = A, O(_[0]) && S(P.min) && S(P.dataMin) && _[0] < P.min && ((!O(P.options.min) && P.min <= P.dataMin || P.min === P.dataMin) && (P.min = Math.min(_[0], P.min)), P.dataMin = Math.min(_[0], P.dataMin)), O(_[_.length - 1]) && S(P.max) && S(P.dataMax) && _[_.length - 1] > P.max && ((!O(P.options.max) && S(P.dataMax) && P.max >= P.dataMax || P.max === P.dataMax) && (P.max = Math.max(_[_.length - 1], P.max)), P.dataMax = Math.max(_[_.length - 1], P.dataMax))), n.groupAll && (this.allGroupedData = X, n = this.cropData(A, X, P.min, P.max, 1), A = n.xData, X = n.yData, this.cropStart = n.start), this.processedXData = A, this.processedYData = X;
- } else
- this.groupMap = null;
- this.hasGroupedData = D, this.currentDataGrouping = L, this.preventGraphAnimation = (W && W.totalRange) !== (L && L.totalRange);
- }
- }, x.destroyGroupedData = function() {
- this.groupedData && (this.groupedData.forEach(function(t, o) {
- t && (this.groupedData[o] = t.destroy ? t.destroy() : null);
- }, this), this.groupedData.length = 0);
- }, x.generatePoints = function() {
- p.apply(this), this.destroyGroupedData(), this.groupedData = this.hasGroupedData ? this.points : null;
- }, y.prototype.applyGrouping = function(t) {
- var o = this;
- o.series.forEach(function(n) {
- n.groupPixelWidth = void 0, n.groupPixelWidth = o.getGroupPixelWidth && o.getGroupPixelWidth(), n.groupPixelWidth && (n.hasProcessed = !0), n.applyGrouping(!!t.hasExtemesChanged);
- });
- }, y.prototype.getGroupPixelWidth = function() {
- var t = this.series, o = t.length, n, A = 0, _ = !1, D;
- for (n = o; n--; )
- (D = t[n].options.dataGrouping) && (A = Math.max(A, v(D.groupPixelWidth, i.groupPixelWidth)));
- for (n = o; n--; )
- (D = t[n].options.dataGrouping) && (o = (t[n].processedXData || t[n].data).length, (t[n].groupPixelWidth || o > this.chart.plotSizeX / A || o && D.forced) && (_ = !0));
- return _ ? A : 0;
- }, y.prototype.setDataGrouping = function(t, o) {
- var n;
- if (o = v(o, !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(A) {
- A.dataGrouping = t;
- }, !1);
- this.ordinal && (this.ordinal.slope = void 0), o && this.chart.redraw();
- }, I(y, "postProcessData", y.prototype.applyGrouping), I(H, "update", function() {
- if (this.dataGroup)
- return B(
- 24,
- !1,
- this.series.chart
- ), !1;
- }), I(F, "headerFormatter", function(t) {
- var o = this.chart, n = o.time, A = t.labelConfig, _ = A.series, D = _.tooltipOptions, W = _.options.dataGrouping, P = D.xDateFormat, X = _.xAxis, g = D[t.isFooter ? "footerFormat" : "headerFormat"];
- if (X && X.options.type === "datetime" && W && S(A.key)) {
- var m = _.currentDataGrouping;
- if (W = W.dateTimeLabelFormats || i.dateTimeLabelFormats, m)
- if (D = W[m.unitName], m.count === 1)
- P = D[0];
- else {
- P = D[1];
- var L = D[2];
- }
- else
- !P && W && X.dateTime && (P = X.dateTime.getXDateFormat(A.x, D.dateTimeLabelFormats));
- P = n.dateFormat(P, A.key), L && (P += n.dateFormat(L, A.key + m.totalRange - 1)), _.chart.styledMode && (g = this.styledModeFormat(g)), t.text = b(g, { point: M(A.point, { key: P }), series: _ }, o), t.preventDefault();
- }
- }), I(U, "destroy", x.destroyGroupedData), I(U, "afterSetOptions", function(t) {
- t = t.options;
- var o = this.type, n = this.chart.options.plotOptions, A = R.defaultOptions.plotOptions[o].dataGrouping, _ = this.useCommonDataGrouping && i;
- if (n && (h[o] || _)) {
- A || (A = w(i, h[o]));
- var D = this.chart.rangeSelector;
- t.dataGrouping = w(
- _,
- A,
- n.series && n.series.dataGrouping,
- n[o].dataGrouping,
- this.userOptions.dataGrouping,
- !t.isInternal && D && S(D.selected) && D.buttonOptions[D.selected].dataGrouping
- );
- }
- }), I(y, "afterSetScale", function() {
- this.series.forEach(function(t) {
- t.hasProcessed = !1;
- });
- }), Z.dataGrouping = c, c;
- }), T(l, "Series/HLC/HLCPoint.js", [l["Core/Series/SeriesRegistry.js"]], function(y) {
- var j = this && this.__extends || function() {
- var I = function(Z, H) {
- return I = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(U, F) {
- U.__proto__ = F;
- } || function(U, F) {
- for (var R in F)
- F.hasOwnProperty(R) && (U[R] = F[R]);
- }, I(Z, H);
- };
- return function(Z, H) {
- function U() {
- this.constructor = Z;
- }
- I(Z, H), Z.prototype = H === null ? Object.create(H) : (U.prototype = H.prototype, new U());
- };
- }();
- return function(I) {
- function Z() {
- var H = I !== null && I.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 j(Z, I), Z;
- }(y.seriesTypes.column.prototype.pointClass);
- }), T(
- l,
- "Series/HLC/HLCSeries.js",
- [l["Series/HLC/HLCPoint.js"], l["Core/Series/SeriesRegistry.js"], l["Core/Utilities.js"]],
- function(y, j, I) {
- var Z = this && this.__extends || function() {
- var R = function(N, b) {
- return R = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(x, u) {
- x.__proto__ = u;
- } || function(x, u) {
- for (var f in u)
- u.hasOwnProperty(f) && (x[f] = u[f]);
- }, R(N, b);
- };
- return function(N, b) {
- function x() {
- this.constructor = N;
- }
- R(N, b), N.prototype = b === null ? Object.create(b) : (x.prototype = b.prototype, new x());
- };
- }(), H = j.seriesTypes.column, U = I.extend, F = I.merge;
- return I = function(R) {
- function N() {
- var b = R !== null && R.apply(this, arguments) || this;
- return b.data = void 0, b.options = void 0, b.points = void 0, b.yData = void 0, b;
- }
- return Z(N, R), N.prototype.extendStem = function(b, x, u) {
- var f = b[0];
- b = b[1], typeof f[2] == "number" && (f[2] = Math.max(u + x, f[2])), typeof b[2] == "number" && (b[2] = Math.min(u - x, b[2]));
- }, N.prototype.getPointPath = function(b, x) {
- x = x.strokeWidth();
- var u = b.series, f = x % 2 / 2, E = Math.round(b.plotX) - f, O = Math.round(b.shapeArgs.width / 2), B = [["M", E, Math.round(b.yBottom)], ["L", E, Math.round(b.plotHigh)]];
- return b.close !== null && (b = Math.round(b.plotClose) + f, B.push(["M", E, b], ["L", E + O, b]), u.extendStem(B, x / 2, b)), B;
- }, N.prototype.drawSinglePoint = function(b) {
- var x = b.series, u = x.chart, f = b.graphic, E = !f;
- typeof b.plotY < "u" && (f || (b.graphic = f = u.renderer.path().add(x.group)), u.styledMode || f.attr(x.pointAttribs(b, b.selected && "select")), x = x.getPointPath(b, f), f[E ? "attr" : "animate"]({ d: x }).addClass(b.getClassName(), !0));
- }, N.prototype.drawPoints = function() {
- this.points.forEach(this.drawSinglePoint);
- }, N.prototype.init = function() {
- R.prototype.init.apply(this, arguments), this.options.stacking = void 0;
- }, N.prototype.pointAttribs = function(b, x) {
- return b = R.prototype.pointAttribs.call(this, b, x), delete b.fill, b;
- }, N.prototype.toYData = function(b) {
- return [b.high, b.low, b.close];
- }, N.prototype.translate = function() {
- var b = this, x = b.yAxis, u = this.pointArrayMap && this.pointArrayMap.slice() || [], f = u.map(function(E) {
- return "plot" + (E.charAt(0).toUpperCase() + E.slice(1));
- });
- f.push("yBottom"), u.push("low"), R.prototype.translate.apply(b), b.points.forEach(function(E) {
- u.forEach(function(O, B) {
- O = E[O], O !== null && (b.dataModify && (O = b.dataModify.modifyValue(O)), E[f[B]] = x.toPixels(O, !0));
- }), E.tooltipPos[1] = E.plotHigh + x.pos - b.chart.plotTop;
- });
- }, N.defaultOptions = F(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 }), N;
- }(H), U(I.prototype, { animate: null, directTouch: !1, pointArrayMap: ["high", "low", "close"], pointAttrToOptions: {
- stroke: "color",
- "stroke-width": "lineWidth"
- }, pointValKey: "close" }), I.prototype.pointClass = y, j.registerSeriesType("hlc", I), I;
- }
- ), T(l, "Series/OHLC/OHLCPoint.js", [l["Core/Series/SeriesRegistry.js"]], function(y) {
- var j = this && this.__extends || function() {
- var I = function(Z, H) {
- return I = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(U, F) {
- U.__proto__ = F;
- } || function(U, F) {
- for (var R in F)
- F.hasOwnProperty(R) && (U[R] = F[R]);
- }, I(Z, H);
- };
- return function(Z, H) {
- function U() {
- this.constructor = Z;
- }
- I(Z, H), Z.prototype = H === null ? Object.create(H) : (U.prototype = H.prototype, new U());
- };
- }();
- return function(I) {
- function Z() {
- var H = I !== null && I.apply(this, arguments) || this;
- return H.open = void 0, H.options = void 0, H.plotOpen = void 0, H.series = void 0, H;
- }
- return j(Z, I), Z.prototype.getClassName = function() {
- return I.prototype.getClassName.call(this) + (this.open < this.close ? " highcharts-point-up" : " highcharts-point-down");
- }, Z.prototype.resolveUpColor = function() {
- this.open < this.close && !this.options.color && this.series.options.upColor && (this.color = this.series.options.upColor);
- }, Z.prototype.resolveColor = function() {
- I.prototype.resolveColor.call(this), this.resolveUpColor();
- }, Z.prototype.getZone = function() {
- var H = I.prototype.getZone.call(this);
- return this.resolveUpColor(), H;
- }, Z.prototype.applyOptions = function() {
- return I.prototype.applyOptions.apply(this, arguments), this.resolveColor && this.resolveColor(), this;
- }, Z;
- }(y.seriesTypes.hlc.prototype.pointClass);
- }), T(
- l,
- "Series/OHLC/OHLCSeries.js",
- [l["Series/OHLC/OHLCPoint.js"], l["Core/Series/SeriesRegistry.js"], l["Core/Utilities.js"]],
- function(y, j, I) {
- var Z = this && this.__extends || function() {
- var x = function(u, f) {
- return x = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(E, O) {
- E.__proto__ = O;
- } || function(E, O) {
- for (var B in O)
- O.hasOwnProperty(B) && (E[B] = O[B]);
- }, x(u, f);
- };
- return function(u, f) {
- function E() {
- this.constructor = u;
- }
- x(u, f), u.prototype = f === null ? Object.create(f) : (E.prototype = f.prototype, new E());
- };
- }(), H = j.series, U = j.seriesTypes.hlc, F = I.addEvent, R = I.extend, N = I.merge, b = function(x) {
- function u() {
- var f = x !== null && x.apply(this, arguments) || this;
- return f.data = void 0, f.options = void 0, f.points = void 0, f;
- }
- return Z(u, x), u.prototype.getPointPath = function(f, E) {
- var O = x.prototype.getPointPath.call(this, f, E);
- E = E.strokeWidth();
- var B = E % 2 / 2, M = Math.round(f.plotX) - B, S = Math.round(f.shapeArgs.width / 2);
- return f.open !== null && (f = Math.round(f.plotOpen) + B, O.push(["M", M, f], ["L", M - S, f]), x.prototype.extendStem.call(this, O, E / 2, f)), O;
- }, u.prototype.pointAttribs = function(f, E) {
- E = x.prototype.pointAttribs.call(this, f, E);
- var O = this.options;
- return delete E.fill, !f.options.color && O.upColor && f.open < f.close && (E.stroke = O.upColor), E;
- }, u.prototype.toYData = function(f) {
- return [f.open, f.high, f.low, f.close];
- }, u.defaultOptions = N(U.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/>' } }), u;
- }(U);
- return R(b.prototype, { pointArrayMap: ["open", "high", "low", "close"] }), b.prototype.pointClass = y, j.registerSeriesType("ohlc", b), F(H, "init", function(x) {
- x = x.options, x.useOhlcData && x.id !== "highcharts-navigator-series" && R(this, { pointValKey: b.prototype.pointValKey, pointArrayMap: b.prototype.pointArrayMap, toYData: b.prototype.toYData });
- }), F(H, "afterSetOptions", function(x) {
- x = x.options;
- var u = x.dataGrouping;
- u && x.useOhlcData && x.id !== "highcharts-navigator-series" && (u.approximation = "ohlc");
- }), b;
- }
- ), T(l, "Series/Candlestick/CandlestickSeries.js", [l["Core/DefaultOptions.js"], l["Core/Series/SeriesRegistry.js"], l["Core/Utilities.js"]], function(y, j, I) {
- var Z = this && this.__extends || function() {
- var N = function(b, x) {
- return N = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(u, f) {
- u.__proto__ = f;
- } || function(u, f) {
- for (var E in f)
- f.hasOwnProperty(E) && (u[E] = f[E]);
- }, N(b, x);
- };
- return function(b, x) {
- function u() {
- this.constructor = b;
- }
- N(b, x), b.prototype = x === null ? Object.create(x) : (u.prototype = x.prototype, new u());
- };
- }(), H = y.defaultOptions;
- y = j.seriesTypes;
- var U = y.column, F = y.ohlc, R = I.merge;
- return I = function(N) {
- function b() {
- var x = N !== null && N.apply(this, arguments) || this;
- return x.data = void 0, x.options = void 0, x.points = void 0, x;
- }
- return Z(b, N), b.prototype.pointAttribs = function(x, u) {
- var f = U.prototype.pointAttribs.call(this, x, u), E = this.options, O = x.open < x.close, B = E.lineColor || this.color, M = x.color || this.color;
- return f["stroke-width"] = E.lineWidth, f.fill = x.options.color || O && E.upColor || M, f.stroke = x.options.lineColor || O && E.upLineColor || B, u && (x = E.states[u], f.fill = x.color || f.fill, f.stroke = x.lineColor || f.stroke, f["stroke-width"] = x.lineWidth || f["stroke-width"]), f;
- }, b.prototype.drawPoints = function() {
- var x = this, u = x.chart, f = x.yAxis.reversed;
- x.points.forEach(function(E) {
- var O = E.graphic, B = !O;
- if (typeof E.plotY < "u") {
- O || (E.graphic = O = u.renderer.path().add(x.group)), x.chart.styledMode || O.attr(x.pointAttribs(E, E.selected && "select")).shadow(x.options.shadow);
- var M = O.strokeWidth() % 2 / 2, S = Math.round(E.plotX) - M, w = E.plotOpen, v = E.plotClose, a = Math.min(w, v);
- w = Math.max(w, v);
- var c = Math.round(E.shapeArgs.width / 2);
- v = f ? w !== E.yBottom : Math.round(a) !== Math.round(E.plotHigh);
- var p = f ? Math.round(a) !== Math.round(E.plotHigh) : w !== E.yBottom;
- a = Math.round(a) + M, w = Math.round(w) + M, M = [], M.push(["M", S - c, w], ["L", S - c, a], ["L", S + c, a], ["L", S + c, w], ["Z"], ["M", S, a], ["L", S, v ? Math.round(f ? E.yBottom : E.plotHigh) : a], ["M", S, w], ["L", S, p ? Math.round(f ? E.plotHigh : E.yBottom) : w]), O[B ? "attr" : "animate"]({ d: M }).addClass(E.getClassName(), !0);
- }
- });
- }, b.defaultOptions = R(F.defaultOptions, H.plotOptions, { states: { hover: { lineWidth: 2 } }, tooltip: H.plotOptions.ohlc.tooltip, threshold: null, lineColor: "#000000", lineWidth: 1, upColor: "#ffffff", stickyTracking: !0 }), b;
- }(F), j.registerSeriesType("candlestick", I), I;
- }), T(l, "Series/Flags/FlagsPoint.js", [l["Core/Series/SeriesRegistry.js"], l["Core/Utilities.js"]], function(y, j) {
- var I = this && this.__extends || function() {
- var H = function(U, F) {
- return H = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(R, N) {
- R.__proto__ = N;
- } || function(R, N) {
- for (var b in N)
- N.hasOwnProperty(b) && (R[b] = N[b]);
- }, H(U, F);
- };
- return function(U, F) {
- function R() {
- this.constructor = U;
- }
- H(U, F), U.prototype = F === null ? Object.create(F) : (R.prototype = F.prototype, new R());
- };
- }(), Z = j.isNumber;
- return function(H) {
- function U() {
- var F = H !== null && H.apply(this, arguments) || this;
- return F.options = void 0, F.series = void 0, F;
- }
- return I(U, H), U.prototype.isValid = function() {
- return Z(this.y) || typeof this.y > "u";
- }, U.prototype.hasNewShapeType = function() {
- var F = this.options.shape || this.series.options.shape;
- return this.graphic && F && F !== this.graphic.symbolKey;
- }, U;
- }(y.seriesTypes.column.prototype.pointClass);
- }), T(l, "Series/OnSeriesComposition.js", [
- l["Series/Column/ColumnSeries.js"],
- l["Core/Series/Series.js"],
- l["Core/Utilities.js"]
- ], function(y, j, I) {
- var Z = y.prototype, H = j.prototype, U = I.defined, F = I.stableSort, R;
- return function(N) {
- function b() {
- return H.getPlotBox.call(this.options.onSeries && this.chart.get(this.options.onSeries) || this);
- }
- function x() {
- Z.translate.apply(this);
- var f = this, E = f.options, O = f.chart, B = f.points, M = E.onSeries, S = (M = M && O.get(M)) && M.options.step, w = M && M.points, v = O.inverted, a = f.xAxis, c = f.yAxis;
- O = B.length - 1;
- var p;
- E = E.onKey || "y";
- var i = w && w.length, h = 0, s;
- if (M && M.visible && i) {
- h = (M.pointXOffset || 0) + (M.barW || 0) / 2;
- var t = M.currentDataGrouping, o = w[i - 1].x + (t ? t.totalRange : 0);
- for (F(B, function(_, D) {
- return _.x - D.x;
- }), E = "plot" + E[0].toUpperCase() + E.substr(1); i-- && B[O]; ) {
- var n = w[i];
- if (t = B[O], t.y = n.y, n.x <= t.x && typeof n[E] < "u") {
- if (t.x <= o && (t.plotY = n[E], n.x < t.x && !S && (s = w[i + 1]) && typeof s[E] < "u")) {
- var A = (t.x - n.x) / (s.x - n.x);
- t.plotY += A * (s[E] - n[E]), t.y += A * (s.y - n.y);
- }
- if (O--, i++, 0 > O)
- break;
- }
- }
- }
- B.forEach(function(_, D) {
- if (_.plotX += h, (typeof _.plotY > "u" || v) && (0 <= _.plotX && _.plotX <= a.len ? v ? (_.plotY = a.translate(_.x, 0, 1, 0, 1), _.plotX = U(_.y) ? c.translate(_.y, 0, 0, 0, 1) : 0) : _.plotY = (a.opposite ? 0 : f.yAxis.len) + a.offset : _.shapeArgs = {}), (p = B[D - 1]) && p.plotX === _.plotX) {
- typeof p.stackIndex > "u" && (p.stackIndex = 0);
- var W = p.stackIndex + 1;
- }
- _.stackIndex = W;
- }), this.onSeries = M;
- }
- var u = [];
- N.compose = function(f) {
- if (u.indexOf(f) === -1) {
- u.push(f);
- var E = f.prototype;
- E.getPlotBox = b, E.translate = x;
- }
- return f;
- }, N.getPlotBox = b, N.translate = x;
- }(R || (R = {})), R;
- }), T(
- l,
- "Series/Flags/FlagsSymbols.js",
- [l["Core/Renderer/RendererRegistry.js"], l["Core/Renderer/SVG/SVGRenderer.js"]],
- function(y, j) {
- function I(H) {
- Z[H + "pin"] = function(U, F, R, N, b) {
- var x = b && b.anchorX;
- b = b && b.anchorY, H === "circle" && N > R && (U -= Math.round((N - R) / 2), R = N);
- var u = Z[H](U, F, R, N);
- if (x && b) {
- var f = x;
- H === "circle" ? f = U + R / 2 : (U = u[0], R = u[1], U[0] === "M" && R[0] === "L" && (f = (U[1] + R[1]) / 2)), u.push(["M", f, F > b ? F : F + N], ["L", x, b]), u = u.concat(Z.circle(x - 1, b - 1, 2, 2));
- }
- return u;
- };
- }
- var Z = j.prototype.symbols;
- return Z.flag = function(H, U, F, R, N) {
- var b = N && N.anchorX || H;
- N = N && N.anchorY || U;
- var x = Z.circle(b - 1, N - 1, 2, 2);
- return x.push(["M", b, N], ["L", H, U + R], ["L", H, U], ["L", H + F, U], ["L", H + F, U + R], ["L", H, U + R], ["Z"]), x;
- }, I("circle"), I("square"), y = y.getRendererType(), y !== j && (y.prototype.symbols.circlepin = Z.circlepin, y.prototype.symbols.flag = Z.flag, y.prototype.symbols.squarepin = Z.squarepin), Z;
- }
- ), T(l, "Series/Flags/FlagsSeries.js", [
- l["Series/Flags/FlagsPoint.js"],
- l["Core/Globals.js"],
- l["Series/OnSeriesComposition.js"],
- l["Core/Renderer/RendererUtilities.js"],
- l["Core/Series/SeriesRegistry.js"],
- l["Core/Renderer/SVG/SVGElement.js"],
- l["Core/Utilities.js"]
- ], function(y, j, I, Z, H, U, F) {
- var R = this && this.__extends || function() {
- var M = function(S, w) {
- return M = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(v, a) {
- v.__proto__ = a;
- } || function(v, a) {
- for (var c in a)
- a.hasOwnProperty(c) && (v[c] = a[c]);
- }, M(S, w);
- };
- return function(S, w) {
- function v() {
- this.constructor = S;
- }
- M(S, w), S.prototype = w === null ? Object.create(w) : (v.prototype = w.prototype, new v());
- };
- }();
- j = j.noop;
- var N = Z.distribute, b = H.series, x = H.seriesTypes.column, u = F.addEvent, f = F.defined;
- Z = F.extend;
- var E = F.merge, O = F.objectEach, B = F.wrap;
- return F = function(M) {
- function S() {
- var w = M !== null && M.apply(this, arguments) || this;
- return w.data = void 0, w.options = void 0, w.points = void 0, w;
- }
- return R(S, M), S.prototype.animate = function(w) {
- w && this.setClip();
- }, S.prototype.drawPoints = function() {
- var w = this.points, v = this.chart, a = v.renderer, c = v.inverted, p = this.options, i = p.y, h, s = this.yAxis, t = {}, o = [];
- for (h = w.length; h--; ) {
- var n = w[h], A = (c ? n.plotY : n.plotX) > this.xAxis.len, _ = n.plotX, D = n.stackIndex, W = n.options.shape || p.shape, P = n.plotY;
- typeof P < "u" && (P = n.plotY + i - (typeof D < "u" && D * p.stackDistance)), n.anchorX = D ? void 0 : n.plotX;
- var X = D ? void 0 : n.plotY, g = W !== "flag";
- D = n.graphic, typeof P < "u" && 0 <= _ && !A ? (D && n.hasNewShapeType() && (D = D.destroy()), D || (D = n.graphic = a.label("", null, null, W, null, null, p.useHTML).addClass("highcharts-point").add(this.markerGroup), n.graphic.div && (n.graphic.div.point = n), D.isNew = !0), D.attr({
- align: g ? "center" : "left",
- width: p.width,
- height: p.height,
- "text-align": p.textAlign
- }), v.styledMode || D.attr(this.pointAttribs(n)).css(E(p.style, n.style)).shadow(p.shadow), 0 < _ && (_ -= D.strokeWidth() % 2), W = { y: P, anchorY: X }, p.allowOverlapX && (W.x = _, W.anchorX = n.anchorX), D.attr({ text: n.options.title || p.title || "A" })[D.isNew ? "attr" : "animate"](W), p.allowOverlapX || (t[n.plotX] ? t[n.plotX].size = Math.max(t[n.plotX].size, D.width) : t[n.plotX] = { align: g ? 0.5 : 0, size: D.width, target: _, anchorX: _ }), n.tooltipPos = [_, P + s.pos - v.plotTop]) : D && (n.graphic = D.destroy());
- }
- if (!p.allowOverlapX) {
- var m = 100;
- O(t, function(L) {
- L.plotX = L.anchorX, o.push(L), m = Math.max(L.size, m);
- }), N(o, c ? s.len : this.xAxis.len, m), w.forEach(function(L) {
- var Y = L.graphic && t[L.plotX];
- Y && (L.graphic[L.graphic.isNew ? "attr" : "animate"]({ x: Y.pos + Y.align * Y.size, anchorX: L.anchorX }), f(Y.pos) ? L.graphic.isNew = !1 : (L.graphic.attr({ x: -9999, anchorX: -9999 }), L.graphic.isNew = !0));
- });
- }
- p.useHTML && B(this.markerGroup, "on", function(L) {
- return U.prototype.on.apply(L.apply(this, [].slice.call(arguments, 1)), [].slice.call(arguments, 1));
- });
- }, S.prototype.drawTracker = function() {
- var w = this.points;
- M.prototype.drawTracker.call(this), w.forEach(function(v) {
- var a = v.graphic;
- a && (v.unbindMouseOver && v.unbindMouseOver(), v.unbindMouseOver = u(a.element, "mouseover", function() {
- 0 < v.stackIndex && !v.raised && (v._y = a.y, a.attr({ y: v._y - 8 }), v.raised = !0), w.forEach(function(c) {
- c !== v && c.raised && c.graphic && (c.graphic.attr({ y: c._y }), c.raised = !1);
- });
- }));
- });
- }, S.prototype.pointAttribs = function(w, v) {
- var a = this.options, c = w && w.color || this.color, p = a.lineColor, i = w && w.lineWidth;
- return w = w && w.fillColor || a.fillColor, v && (w = a.states[v].fillColor, p = a.states[v].lineColor, i = a.states[v].lineWidth), { fill: w || c, stroke: p || c, "stroke-width": i || a.lineWidth || 0 };
- }, S.prototype.setClip = function() {
- b.prototype.setClip.apply(this, arguments), this.options.clip !== !1 && this.sharedClipKey && this.markerGroup && this.markerGroup.clip(this.chart.sharedClips[this.sharedClipKey]);
- }, S.defaultOptions = E(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" }
- }), S;
- }(x), I.compose(F), Z(F.prototype, { allowDG: !1, forceCrop: !0, invertible: !1, noSharedTooltip: !0, pointClass: y, sorted: !1, takeOrdinalPosition: !1, trackerGroups: ["markerGroup"], buildKDTree: j, init: b.prototype.init, invertGroups: j }), H.registerSeriesType("flags", F), F;
- }), T(l, "Core/Axis/ScrollbarAxis.js", [l["Core/Utilities.js"]], function(y) {
- var j = y.addEvent, I = y.defined, Z = y.pick;
- return function() {
- function H() {
- }
- return H.compose = function(U, F) {
- if (H.composed.indexOf(U) === -1)
- H.composed.push(U);
- else
- return U;
- var R = function(N) {
- var b = Z(N.options && N.options.min, N.min), x = Z(N.options && N.options.max, N.max);
- return { axisMin: b, axisMax: x, scrollMin: I(N.dataMin) ? Math.min(b, N.min, N.dataMin, Z(N.threshold, 1 / 0)) : b, scrollMax: I(N.dataMax) ? Math.max(x, N.max, N.dataMax, Z(N.threshold, -1 / 0)) : x };
- };
- return j(U, "afterInit", function() {
- var N = this;
- N.options && N.options.scrollbar && N.options.scrollbar.enabled && (N.options.scrollbar.vertical = !N.horiz, N.options.startOnTick = N.options.endOnTick = !1, N.scrollbar = new F(N.chart.renderer, N.options.scrollbar, N.chart), j(N.scrollbar, "changed", function(b) {
- var x = R(N), u = x.axisMax, f = x.scrollMin, E = x.scrollMax - f;
- I(x.axisMin) && I(u) && (N.horiz && !N.reversed || !N.horiz && N.reversed ? (x = f + E * this.to, f += E * this.from) : (x = f + E * (1 - this.from), f += E * (1 - this.to)), this.shouldUpdateExtremes(b.DOMType) ? N.setExtremes(f, x, !0, b.DOMType !== "mousemove" && b.DOMType !== "touchmove", b) : this.setRange(
- this.from,
- this.to
- ));
- }));
- }), j(U, "afterRender", function() {
- var N = R(this), b = N.scrollMin, x = N.scrollMax;
- N = this.scrollbar;
- var u = this.axisTitleMargin + (this.titleOffset || 0), f = this.chart.scrollbarsOffsets, E = this.options.margin || 0;
- N && (this.horiz ? (this.opposite || (f[1] += u), N.position(this.left, this.top + this.height + 2 + f[1] - (this.opposite ? E : 0), this.width, this.height), this.opposite || (f[1] += E), u = 1) : (this.opposite && (f[0] += u), N.position(
- N.options.opposite ? this.left + this.width + 2 + f[0] - (this.opposite ? 0 : E) : this.opposite ? 0 : E,
- this.top,
- this.width,
- this.height
- ), this.opposite && (f[0] += E), u = 0), f[u] += N.size + N.options.margin, isNaN(b) || isNaN(x) || !I(this.min) || !I(this.max) || this.min === this.max ? N.setRange(0, 1) : (f = (this.min - b) / (x - b), b = (this.max - b) / (x - b), this.horiz && !this.reversed || !this.horiz && this.reversed ? N.setRange(f, b) : N.setRange(1 - b, 1 - f)));
- }), j(U, "afterGetOffset", function() {
- var N = this.scrollbar && !this.scrollbar.options.opposite;
- N = this.horiz ? 2 : N ? 3 : 1;
- var b = this.scrollbar;
- b && (this.chart.scrollbarsOffsets = [0, 0], this.chart.axisOffset[N] += b.size + b.options.margin);
- }), U;
- }, H.composed = [], H;
- }();
- }), T(l, "Core/ScrollbarDefaults.js", [l["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
- };
- }), T(l, "Core/Scrollbar.js", [l["Core/DefaultOptions.js"], l["Core/Globals.js"], l["Core/Axis/ScrollbarAxis.js"], l["Core/ScrollbarDefaults.js"], l["Core/Utilities.js"]], function(y, j, I, Z, H) {
- var U = y.defaultOptions, F = H.addEvent, R = H.correctFloat, N = H.defined, b = H.destroyObjectProperties, x = H.fireEvent, u = H.merge, f = H.pick, E = H.removeEvent;
- return y = function() {
- function O(B, M, S) {
- 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(B, M, S);
- }
- return O.compose = function(B) {
- I.compose(B, O);
- }, O.swapXY = function(B, M) {
- return M && B.forEach(function(S) {
- for (var w = S.length, v, a = 0; a < w; a += 2)
- v = S[a + 1], typeof v == "number" && (S[a + 1] = S[a + 2], S[a + 2] = v);
- }), B;
- }, O.prototype.addEvents = function() {
- var B = this.options.inverted ? [1, 0] : [0, 1], M = this.scrollbarButtons, S = this.scrollbarGroup.element, w = this.track.element, v = this.mouseDownHandler.bind(this), a = this.mouseMoveHandler.bind(this), c = this.mouseUpHandler.bind(this);
- B = [[M[B[0]].element, "click", this.buttonToMinClick.bind(this)], [M[B[1]].element, "click", this.buttonToMaxClick.bind(this)], [w, "click", this.trackClick.bind(this)], [S, "mousedown", v], [S.ownerDocument, "mousemove", a], [S.ownerDocument, "mouseup", c]], j.hasTouch && B.push(
- [S, "touchstart", v],
- [S.ownerDocument, "touchmove", a],
- [S.ownerDocument, "touchend", c]
- ), B.forEach(function(p) {
- F.apply(null, p);
- }), this._events = B;
- }, O.prototype.buttonToMaxClick = function(B) {
- var M = (this.to - this.from) * f(this.options.step, 0.2);
- this.updatePosition(this.from + M, this.to + M), x(this, "changed", { from: this.from, to: this.to, trigger: "scrollbar", DOMEvent: B });
- }, O.prototype.buttonToMinClick = function(B) {
- var M = R(this.to - this.from) * f(this.options.step, 0.2);
- this.updatePosition(R(this.from - M), R(this.to - M)), x(this, "changed", {
- from: this.from,
- to: this.to,
- trigger: "scrollbar",
- DOMEvent: B
- });
- }, O.prototype.cursorToScrollbarPosition = function(B) {
- var M = this.options;
- return M = M.minWidth > this.calculatedWidth ? M.minWidth : 0, { chartX: (B.chartX - this.x - this.xOffset) / (this.barWidth - M), chartY: (B.chartY - this.y - this.yOffset) / (this.barWidth - M) };
- }, O.prototype.destroy = function() {
- var B = this, M = B.chart.scroller;
- B.removeEvents(), ["track", "scrollbarRifles", "scrollbar", "scrollbarGroup", "group"].forEach(function(S) {
- B[S] && B[S].destroy && (B[S] = B[S].destroy());
- }), M && B === M.scrollbar && (M.scrollbar = null, b(M.scrollbarButtons));
- }, O.prototype.drawScrollbarButton = function(B) {
- var M = this.renderer, S = this.scrollbarButtons, w = this.options, v = this.size, a = M.g().add(this.group);
- S.push(a), a = M.rect().addClass("highcharts-scrollbar-button").add(a), this.chart.styledMode || a.attr({ stroke: w.buttonBorderColor, "stroke-width": w.buttonBorderWidth, fill: w.buttonBackgroundColor }), a.attr(a.crisp({ x: -0.5, y: -0.5, width: v + 1, height: v + 1, r: w.buttonBorderRadius }, a.strokeWidth())), a = M.path(O.swapXY([["M", v / 2 + (B ? -1 : 1), v / 2 - 3], ["L", v / 2 + (B ? -1 : 1), v / 2 + 3], ["L", v / 2 + (B ? 2 : -2), v / 2]], w.vertical)).addClass("highcharts-scrollbar-arrow").add(S[B]), this.chart.styledMode || a.attr({ fill: w.buttonArrowColor });
- }, O.prototype.init = function(B, M, S) {
- this.scrollbarButtons = [], this.renderer = B, this.userOptions = M, this.options = u(Z, U.scrollbar, M), this.chart = S, this.size = f(this.options.size, this.options.height), M.enabled && (this.render(), this.addEvents());
- }, O.prototype.mouseDownHandler = function(B) {
- B = this.chart.pointer.normalize(B), B = this.cursorToScrollbarPosition(B), this.chartX = B.chartX, this.chartY = B.chartY, this.initPositions = [this.from, this.to], this.grabbedCenter = !0;
- }, O.prototype.mouseMoveHandler = function(B) {
- var M = this.chart.pointer.normalize(B), S = this.options.vertical ? "chartY" : "chartX", w = this.initPositions || [];
- !this.grabbedCenter || B.touches && B.touches[0][S] === 0 || (M = this.cursorToScrollbarPosition(M)[S], S = this[S], S = M - S, this.hasDragged = !0, this.updatePosition(w[0] + S, w[1] + S), this.hasDragged && x(this, "changed", { from: this.from, to: this.to, trigger: "scrollbar", DOMType: B.type, DOMEvent: B }));
- }, O.prototype.mouseUpHandler = function(B) {
- this.hasDragged && x(this, "changed", { from: this.from, to: this.to, trigger: "scrollbar", DOMType: B.type, DOMEvent: B }), this.grabbedCenter = this.hasDragged = this.chartX = this.chartY = null;
- }, O.prototype.position = function(B, M, S, w) {
- var v = this.options.vertical, a = this.rendered ? "animate" : "attr", c = 0;
- this.x = B, this.y = M + this.trackBorderWidth, this.width = S, this.xOffset = this.height = w, this.yOffset = c, v ? (this.width = this.yOffset = S = c = this.size, this.xOffset = M = 0, this.barWidth = w - 2 * S, this.x = B += this.options.margin) : (this.height = this.xOffset = w = M = this.size, this.barWidth = S - 2 * w, this.y += this.options.margin), this.group[a]({ translateX: B, translateY: this.y }), this.track[a]({ width: S, height: w }), this.scrollbarButtons[1][a]({ translateX: v ? 0 : S - M, translateY: v ? w - c : 0 });
- }, O.prototype.removeEvents = function() {
- this._events.forEach(function(B) {
- E.apply(null, B);
- }), this._events.length = 0;
- }, O.prototype.render = function() {
- var B = this.renderer, M = this.options, S = this.size, w = this.chart.styledMode, v = B.g("scrollbar").attr({ zIndex: M.zIndex, translateY: -99999 }).add();
- this.group = v, this.track = B.rect().addClass("highcharts-scrollbar-track").attr({ x: 0, r: M.trackBorderRadius || 0, height: S, width: S }).add(v), w || this.track.attr({ fill: M.trackBackgroundColor, stroke: M.trackBorderColor, "stroke-width": M.trackBorderWidth }), this.trackBorderWidth = this.track.strokeWidth(), this.track.attr({ y: -this.trackBorderWidth % 2 / 2 }), this.scrollbarGroup = B.g().add(v), this.scrollbar = B.rect().addClass("highcharts-scrollbar-thumb").attr({ height: S, width: S, r: M.barBorderRadius || 0 }).add(this.scrollbarGroup), this.scrollbarRifles = B.path(O.swapXY([["M", -3, S / 4], ["L", -3, 2 * S / 3], ["M", 0, S / 4], ["L", 0, 2 * S / 3], ["M", 3, S / 4], ["L", 3, 2 * S / 3]], M.vertical)).addClass("highcharts-scrollbar-rifles").add(this.scrollbarGroup), w || (this.scrollbar.attr({ fill: M.barBackgroundColor, stroke: M.barBorderColor, "stroke-width": M.barBorderWidth }), this.scrollbarRifles.attr({ stroke: M.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(B, M) {
- var S = this.options, w = S.vertical, v = S.minWidth, a = this.barWidth, c = !this.rendered || this.hasDragged || this.chart.navigator && this.chart.navigator.hasDragged ? "attr" : "animate";
- if (N(a)) {
- var p = a * Math.min(M, 1);
- B = Math.max(B, 0);
- var i = Math.ceil(a * B);
- this.calculatedWidth = p = R(p - i), p < v && (i = (a - v + p) * B, p = v), v = Math.floor(i + this.xOffset + this.yOffset), a = p / 2 - 0.5, this.from = B, this.to = M, w ? (this.scrollbarGroup[c]({ translateY: v }), this.scrollbar[c]({ height: p }), this.scrollbarRifles[c]({ translateY: a }), this.scrollbarTop = v, this.scrollbarLeft = 0) : (this.scrollbarGroup[c]({ translateX: v }), this.scrollbar[c]({ width: p }), this.scrollbarRifles[c]({ translateX: a }), this.scrollbarLeft = v, this.scrollbarTop = 0), 12 >= p ? this.scrollbarRifles.hide() : this.scrollbarRifles.show(!0), S.showFull === !1 && (0 >= B && 1 <= M ? this.group.hide() : this.group.show()), this.rendered = !0;
- }
- }, O.prototype.shouldUpdateExtremes = function(B) {
- return f(this.options.liveRedraw, j.svg && !j.isTouchDevice && !this.chart.isBoosting) || B === "mouseup" || B === "touchend" || !N(B);
- }, O.prototype.trackClick = function(B) {
- var M = this.chart.pointer.normalize(B), S = this.to - this.from, w = this.y + this.scrollbarTop, v = this.x + this.scrollbarLeft;
- this.options.vertical && M.chartY > w || !this.options.vertical && M.chartX > v ? this.updatePosition(this.from + S, this.to + S) : this.updatePosition(this.from - S, this.to - S), x(this, "changed", { from: this.from, to: this.to, trigger: "scrollbar", DOMEvent: B });
- }, O.prototype.update = function(B) {
- this.destroy(), this.init(this.chart.renderer, u(
- !0,
- this.options,
- B
- ), this.chart);
- }, O.prototype.updatePosition = function(B, M) {
- 1 < M && (B = R(1 - R(M - B)), M = 1), 0 > B && (M = R(M - B), B = 0), this.from = B, this.to = M;
- }, O.defaultOptions = Z, O;
- }(), U.scrollbar = u(!0, y.defaultOptions, U.scrollbar), y;
- }), T(l, "Core/Axis/NavigatorAxis.js", [l["Core/Globals.js"], l["Core/Utilities.js"]], function(y, j) {
- var I = y.isTouchDevice, Z = j.addEvent, H = j.correctFloat, U = j.defined, F = j.isNumber, R = j.pick, N = function() {
- function b(x) {
- this.axis = x;
- }
- return b.prototype.destroy = function() {
- this.axis = void 0;
- }, b.prototype.toFixedRange = function(x, u, f, E) {
- var O = this.axis, B = O.chart;
- B = B && B.fixedRange;
- var M = (O.pointRange || 0) / 2;
- return x = R(f, O.translate(x, !0, !O.horiz)), u = R(E, O.translate(u, !0, !O.horiz)), O = B && (u - x) / B, U(f) || (x = H(x + M)), U(E) || (u = H(u - M)), 0.7 < O && 1.3 > O && (E ? x = u - B : u = x + B), F(x) && F(u) || (x = u = void 0), { min: x, max: u };
- }, b;
- }();
- return function() {
- function b() {
- }
- return b.compose = function(x) {
- x.keepProps.push("navigatorAxis"), Z(x, "init", function() {
- this.navigatorAxis || (this.navigatorAxis = new N(this));
- }), Z(x, "zoom", function(u) {
- var f = this.chart.options, E = f.navigator, O = this.navigatorAxis, B = f.chart.pinchType, M = f.rangeSelector;
- f = f.chart.zoomType, this.isXAxis && (E && E.enabled || M && M.enabled) && (f === "y" ? u.zoomed = !1 : (!I && f === "xy" || I && B === "xy") && this.options.range && (E = O.previousZoom, U(u.newMin) ? O.previousZoom = [this.min, this.max] : E && (u.newMin = E[0], u.newMax = E[1], O.previousZoom = void 0))), typeof u.zoomed < "u" && u.preventDefault();
- });
- }, b.AdditionsClass = N, b;
- }();
- }), T(l, "Core/Navigator.js", [
- l["Core/Axis/Axis.js"],
- l["Core/Chart/Chart.js"],
- l["Core/Color/Color.js"],
- l["Core/Globals.js"],
- l["Core/Axis/NavigatorAxis.js"],
- l["Core/DefaultOptions.js"],
- l["Core/Renderer/RendererRegistry.js"],
- l["Core/Scrollbar.js"],
- l["Core/Series/Series.js"],
- l["Core/Series/SeriesRegistry.js"],
- l["Core/Utilities.js"]
- ], function(y, j, I, Z, H, U, F, R, N, b, x) {
- I = I.parse;
- var u = Z.hasTouch, f = Z.isTouchDevice, E = U.defaultOptions, O = x.addEvent, B = x.clamp, M = x.correctFloat, S = x.defined, w = x.destroyObjectProperties, v = x.erase, a = x.extend, c = x.find, p = x.isArray, i = x.isNumber, h = x.merge, s = x.pick, t = x.removeEvent, o = x.splat, n = function(_) {
- for (var D = [], W = 1; W < arguments.length; W++)
- D[W - 1] = arguments[W];
- if (D = [].filter.call(D, i), D.length)
- return Math[_].apply(0, D);
- };
- U = typeof b.seriesTypes.areaspline > "u" ? "line" : "areaspline", a(E, { 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: I("#6685c2").setOpacity(0.3).get(), outlineColor: "#cccccc", outlineWidth: 1, series: {
- type: U,
- 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 } } }), F.getRendererType().prototype.symbols["navigator-handle"] = function(_, D, W, P, X) {
- return _ = (X && X.width || 0) / 2, D = 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", -D, 4], ["L", -D, X - 3], ["M", D - 1, 4], ["L", D - 1, X - 3]];
- };
- var A = function() {
- function _(D) {
- 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(D);
- }
- return _.prototype.drawHandle = function(D, W, P, X) {
- var g = this.navigatorOptions.handles.height;
- this.handles[W][X](P ? { translateX: Math.round(this.left + this.height / 2), translateY: Math.round(this.top + parseInt(D, 10) + 0.5 - g) } : { translateX: Math.round(this.left + parseInt(D, 10)), translateY: Math.round(this.top + this.height / 2 - g / 2 - 1) });
- }, _.prototype.drawOutline = function(D, W, P, X) {
- var g = this.navigatorOptions.maskInside, m = this.outline.strokeWidth(), L = m / 2, Y = m % 2 / 2;
- m = this.outlineHeight;
- var V = this.scrollbarHeight || 0, Q = this.size, k = this.left - V, G = this.top;
- P ? (k -= L, P = G + W + Y, W = G + D + Y, Y = [["M", k + m, G - V - Y], ["L", k + m, P], ["L", k, P], ["L", k, W], ["L", k + m, W], ["L", k + m, G + Q + V]], g && Y.push(["M", k + m, P - L], ["L", k + m, W + L])) : (D += k + V - Y, W += k + V - Y, G += L, Y = [["M", k, G], ["L", D, G], ["L", D, G + m], ["L", W, G + m], ["L", W, G], ["L", k + Q + 2 * V, G]], g && Y.push(["M", D - L, G], ["L", W + L, G])), this.outline[X]({ d: Y });
- }, _.prototype.drawMasks = function(D, W, P, X) {
- var g = this.left, m = this.top, L = this.height;
- if (P)
- var Y = [g, g, g], V = [m, m + D, m + W], Q = [L, L, L], k = [D, W - D, this.size - W];
- else
- Y = [g, g + D, g + W], V = [m, m, m], Q = [D, W - D, this.size - W], k = [L, L, L];
- this.shades.forEach(function(G, z) {
- G[X]({ x: Y[z], y: V[z], width: Q[z], height: k[z] });
- });
- }, _.prototype.renderElements = function() {
- var D = this, W = D.navigatorOptions, P = W.maskInside, X = D.chart, g = X.renderer, m, L = { cursor: X.inverted ? "ns-resize" : "ew-resize" };
- D.navigatorGroup = m = g.g("navigator").attr({ zIndex: 8, visibility: "hidden" }).add(), [!P, P, !P].forEach(function(Y, V) {
- D.shades[V] = g.rect().addClass("highcharts-navigator-mask" + (V === 1 ? "-inside" : "-outside")).add(m), X.styledMode || D.shades[V].attr({ fill: Y ? W.maskFill : "rgba(0,0,0,0)" }).css(V === 1 && L);
- }), D.outline = g.path().addClass("highcharts-navigator-outline").add(m), X.styledMode || D.outline.attr({ "stroke-width": W.outlineWidth, stroke: W.outlineColor }), W.handles.enabled && [0, 1].forEach(function(Y) {
- if (W.handles.inverted = X.inverted, D.handles[Y] = g.symbol(W.handles.symbols[Y], -W.handles.width / 2 - 1, 0, W.handles.width, W.handles.height, W.handles), D.handles[Y].attr({ zIndex: 7 - Y }).addClass("highcharts-navigator-handle highcharts-navigator-handle-" + ["left", "right"][Y]).add(m), !X.styledMode) {
- var V = W.handles;
- D.handles[Y].attr({ fill: V.backgroundColor, stroke: V.borderColor, "stroke-width": V.lineWidth }).css(L);
- }
- });
- }, _.prototype.update = function(D) {
- (this.series || []).forEach(function(W) {
- W.baseSeries && delete W.baseSeries.navigatorSeries;
- }), this.destroy(), h(!0, this.chart.options.navigator, this.options, D), this.init(this.chart);
- }, _.prototype.render = function(D, W, P, X) {
- var g = this.chart, m = this.scrollbarHeight, L, Y = this.xAxis, V = Y.pointRange || 0, Q = Y.navigatorAxis.fake ? g.xAxis[0] : Y, k = this.navigatorEnabled, G, z = this.rendered, $ = g.inverted, q = g.xAxis[0].minRange, it = g.xAxis[0].options.maxRange;
- if (!this.hasDragged || S(P)) {
- if (D = M(D - V / 2), W = M(W + V / 2), !i(D) || !i(W))
- if (z)
- P = 0, X = s(Y.width, Q.width);
- else
- return;
- this.left = s(Y.left, g.plotLeft + m + ($ ? g.plotWidth : 0)), this.size = G = L = s(Y.len, ($ ? g.plotHeight : g.plotWidth) - 2 * m), g = $ ? m : L + 2 * m, P = s(P, Y.toPixels(D, !0)), X = s(X, Y.toPixels(W, !0)), i(P) && Math.abs(P) !== 1 / 0 || (P = 0, X = g), D = Y.toValue(P, !0), W = Y.toValue(X, !0);
- var et = Math.abs(M(W - D));
- et < q ? this.grabbedLeft ? P = Y.toPixels(W - q - V, !0) : this.grabbedRight && (X = Y.toPixels(D + q + V, !0)) : S(it) && M(et - V) > it && (this.grabbedLeft ? P = Y.toPixels(W - it - V, !0) : this.grabbedRight && (X = Y.toPixels(D + it + V, !0))), this.zoomedMax = B(Math.max(P, X), 0, G), this.zoomedMin = B(this.fixedWidth ? this.zoomedMax - this.fixedWidth : Math.min(P, X), 0, G), this.range = this.zoomedMax - this.zoomedMin, G = Math.round(this.zoomedMax), P = Math.round(this.zoomedMin), k && (this.navigatorGroup.attr({ visibility: "visible" }), z = z && !this.hasDragged ? "animate" : "attr", this.drawMasks(P, G, $, z), this.drawOutline(P, G, $, z), this.navigatorOptions.handles.enabled && (this.drawHandle(P, 0, $, z), this.drawHandle(G, 1, $, z))), this.scrollbar && ($ ? ($ = this.top - m, Q = this.left - m + (k || !Q.opposite ? 0 : (Q.titleOffset || 0) + Q.axisTitleMargin), m = L + 2 * m) : ($ = this.top + (k ? this.height : -m), Q = this.left - m), this.scrollbar.position(Q, $, g, m), this.scrollbar.setRange(this.zoomedMin / (L || 1), this.zoomedMax / (L || 1))), this.rendered = !0;
- }
- }, _.prototype.addMouseEvents = function() {
- var D = this, W = D.chart, P = W.container, X = [], g, m;
- D.mouseMoveHandler = g = function(L) {
- D.onMouseMove(L);
- }, D.mouseUpHandler = m = function(L) {
- D.onMouseUp(L);
- }, X = D.getPartsEvents("mousedown"), X.push(O(W.renderTo, "mousemove", g), O(P.ownerDocument, "mouseup", m)), u && (X.push(O(W.renderTo, "touchmove", g), O(P.ownerDocument, "touchend", m)), X.concat(D.getPartsEvents("touchstart"))), D.eventsToUnbind = X, D.series && D.series[0] && X.push(O(D.series[0].xAxis, "foundExtremes", function() {
- W.navigator.modifyNavigatorAxisExtremes();
- }));
- }, _.prototype.getPartsEvents = function(D) {
- var W = this, P = [];
- return ["shades", "handles"].forEach(function(X) {
- W[X].forEach(function(g, m) {
- P.push(O(g.element, D, function(L) {
- W[X + "Mousedown"](L, m);
- }));
- });
- }), P;
- }, _.prototype.shadesMousedown = function(D, W) {
- D = this.chart.pointer.normalize(D);
- var P = this.chart, X = this.xAxis, g = this.zoomedMin, m = this.left, L = this.size, Y = this.range, V = D.chartX;
- if (P.inverted && (V = D.chartY, m = this.top), W === 1)
- this.grabbedCenter = V, this.fixedWidth = Y, this.dragOffset = V - g;
- else {
- if (D = V - m - Y / 2, W === 0)
- D = Math.max(0, D);
- else if (W === 2 && D + Y >= L)
- if (D = L - Y, this.reversedExtremes) {
- D -= Y;
- var Q = this.getUnionExtremes().dataMin;
- } else
- var k = this.getUnionExtremes().dataMax;
- D !== g && (this.fixedWidth = Y, W = X.navigatorAxis.toFixedRange(D, D + Y, Q, k), S(W.min) && P.xAxis[0].setExtremes(Math.min(W.min, W.max), Math.max(W.min, W.max), !0, null, { trigger: "navigator" }));
- }
- }, _.prototype.handlesMousedown = function(D, W) {
- this.chart.pointer.normalize(D), D = this.chart;
- var P = D.xAxis[0], X = this.reversedExtremes;
- W === 0 ? (this.grabbedLeft = !0, this.otherHandlePos = this.zoomedMax, this.fixedExtreme = X ? P.min : P.max) : (this.grabbedRight = !0, this.otherHandlePos = this.zoomedMin, this.fixedExtreme = X ? P.max : P.min), D.fixedRange = null;
- }, _.prototype.onMouseMove = function(D) {
- var W = this, P = W.chart, X = W.left, g = W.navigatorSize, m = W.range, L = W.dragOffset, Y = P.inverted;
- D.touches && D.touches[0].pageX === 0 || (D = P.pointer.normalize(D), P = D.chartX, Y && (X = W.top, P = D.chartY), W.grabbedLeft ? (W.hasDragged = !0, W.render(0, 0, P - X, W.otherHandlePos)) : W.grabbedRight ? (W.hasDragged = !0, W.render(0, 0, W.otherHandlePos, P - X)) : W.grabbedCenter && (W.hasDragged = !0, P < L ? P = L : P > g + L - m && (P = g + L - m), W.render(0, 0, P - L, P - L + m)), W.hasDragged && W.scrollbar && s(W.scrollbar.options.liveRedraw, Z.svg && !f && !this.chart.isBoosting) && (D.DOMType = D.type, setTimeout(function() {
- W.onMouseUp(D);
- }, 0)));
- }, _.prototype.onMouseUp = function(D) {
- var W = this.chart, P = this.xAxis, X = this.scrollbar, g = D.DOMEvent || D, m = W.inverted, L = this.rendered && !this.hasDragged ? "animate" : "attr";
- if (this.hasDragged && (!X || !X.hasDragged) || D.trigger === "scrollbar") {
- if (X = this.getUnionExtremes(), this.zoomedMin === this.otherHandlePos)
- var Y = this.fixedExtreme;
- else if (this.zoomedMax === this.otherHandlePos)
- var V = this.fixedExtreme;
- this.zoomedMax === this.size && (V = this.reversedExtremes ? X.dataMin : X.dataMax), this.zoomedMin === 0 && (Y = this.reversedExtremes ? X.dataMax : X.dataMin), P = P.navigatorAxis.toFixedRange(this.zoomedMin, this.zoomedMax, Y, V), S(P.min) && W.xAxis[0].setExtremes(Math.min(P.min, P.max), Math.max(P.min, P.max), !0, this.hasDragged ? !1 : null, { trigger: "navigator", triggerOp: "navigator-drag", DOMEvent: g });
- }
- D.DOMType !== "mousemove" && D.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), D = Math.round(this.zoomedMax), this.shades && this.drawMasks(W, D, m, L), this.outline && this.drawOutline(W, D, m, L), this.navigatorOptions.handles.enabled && Object.keys(this.handles).length === this.handles.length && (this.drawHandle(W, 0, m, L), this.drawHandle(D, 1, m, L)));
- }, _.prototype.removeEvents = function() {
- this.eventsToUnbind && (this.eventsToUnbind.forEach(function(D) {
- D();
- }), this.eventsToUnbind = void 0), this.removeBaseSeriesEvents();
- }, _.prototype.removeBaseSeriesEvents = function() {
- var D = this.baseSeries || [];
- this.navigatorEnabled && D[0] && (this.navigatorOptions.adaptToUpdatedData !== !1 && D.forEach(function(W) {
- t(W, "updatedData", this.updatedDataHandler);
- }, this), D[0].xAxis && t(D[0].xAxis, "foundExtremes", this.modifyBaseAxisExtremes));
- }, _.prototype.init = function(D) {
- var W = D.options, P = W.navigator, X = P.enabled, g = W.scrollbar, m = g.enabled;
- W = X ? P.height : 0;
- var L = m ? g.height : 0;
- this.handles = [], this.shades = [], this.chart = D, this.setBaseSeries(), this.height = W, this.scrollbarHeight = L, this.scrollbarEnabled = m, this.navigatorEnabled = X, this.navigatorOptions = P, this.scrollbarOptions = g, this.outlineHeight = W + L, this.opposite = s(P.opposite, !(X || !D.inverted));
- var Y = this;
- X = Y.baseSeries, g = D.xAxis.length, m = D.yAxis.length;
- var V = X && X[0] && X[0].xAxis || D.xAxis[0] || { options: {} };
- D.isDirtyBox = !0, Y.navigatorEnabled ? (Y.xAxis = new y(D, h(
- { breaks: V.options.breaks, ordinal: V.options.ordinal },
- P.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 },
- D.inverted ? { offsets: [L, 0, -L, 0], width: W } : { offsets: [0, -L, 0, L], height: W }
- )), Y.yAxis = new y(D, h(P.yAxis, { id: "navigator-y-axis", alignTicks: !1, offset: 0, index: m, isInternal: !0, reversed: s(P.yAxis && P.yAxis.reversed, D.yAxis[0] && D.yAxis[0].reversed, !1), zoomEnabled: !1 }, D.inverted ? { width: W } : { height: W })), X || P.series.data ? Y.updateNavigatorSeries(!1) : D.series.length === 0 && (Y.unbindRedraw = O(D, "beforeRedraw", function() {
- 0 < D.series.length && !Y.series && (Y.setBaseSeries(), Y.unbindRedraw());
- })), Y.reversedExtremes = D.inverted && !Y.xAxis.reversed || !D.inverted && Y.xAxis.reversed, Y.renderElements(), Y.addMouseEvents()) : (Y.xAxis = {
- chart: D,
- navigatorAxis: { fake: !0 },
- translate: function(Q, k) {
- var G = D.xAxis[0], z = G.getExtremes(), $ = G.len - 2 * L, q = n("min", G.options.min, z.dataMin);
- return G = n("max", G.options.max, z.dataMax) - q, k ? Q * G / $ + q : $ * (Q - q) / G;
- },
- toPixels: function(Q) {
- return this.translate(Q);
- },
- toValue: function(Q) {
- return this.translate(Q, !0);
- }
- }, Y.xAxis.navigatorAxis.axis = Y.xAxis, Y.xAxis.navigatorAxis.toFixedRange = H.AdditionsClass.prototype.toFixedRange.bind(Y.xAxis.navigatorAxis)), D.options.scrollbar.enabled && (D.scrollbar = Y.scrollbar = new R(D.renderer, h(D.options.scrollbar, { margin: Y.navigatorEnabled ? 0 : 10, vertical: D.inverted }), D), O(Y.scrollbar, "changed", function(Q) {
- var k = Y.size, G = k * this.to;
- k *= this.from, Y.hasDragged = Y.scrollbar.hasDragged, Y.render(0, 0, k, G), this.shouldUpdateExtremes(Q.DOMType) && setTimeout(function() {
- Y.onMouseUp(Q);
- });
- })), Y.addBaseSeriesEvents(), Y.addChartEvents();
- }, _.prototype.getUnionExtremes = function(D) {
- var W = this.chart.xAxis[0], P = this.xAxis, X = P.options, g = W.options, m;
- return D && W.dataMin === null || (m = { dataMin: s(X && X.min, n("min", g.min, W.dataMin, P.dataMin, P.min)), dataMax: s(X && X.max, n("max", g.max, W.dataMax, P.dataMax, P.max)) }), m;
- }, _.prototype.setBaseSeries = function(D, W) {
- var P = this.chart, X = this.baseSeries = [];
- D = D || P.options && P.options.navigator.baseSeries || (P.series.length ? c(
- P.series,
- function(g) {
- return !g.options.isInternal;
- }
- ).index : 0), (P.series || []).forEach(function(g, m) {
- g.options.isInternal || !g.options.showInNavigator && (m !== D && g.options.id !== D || g.options.showInNavigator === !1) || X.push(g);
- }), this.xAxis && !this.xAxis.navigatorAxis.fake && this.updateNavigatorSeries(!0, W);
- }, _.prototype.updateNavigatorSeries = function(D, W) {
- var P = this, X = P.chart, g = P.baseSeries, m, L, Y = P.navigatorOptions.series, V, 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 } }
- }, k = P.series = (P.series || []).filter(function(G) {
- var z = G.baseSeries;
- return 0 > g.indexOf(z) ? (z && (t(z, "updatedData", P.updatedDataHandler), delete z.navigatorSeries), G.chart && G.destroy(), !1) : !0;
- });
- g && g.length && g.forEach(function(G) {
- var z = G.navigatorSeries, $ = a({ color: G.color, visible: G.visible }, p(Y) ? E.navigator.series : Y);
- z && P.navigatorOptions.adaptToUpdatedData === !1 || (Q.name = "Navigator " + g.length, m = G.options || {}, V = m.navigatorOptions || {}, $.dataLabels = o($.dataLabels), L = h(m, Q, $, V), L.pointRange = s($.pointRange, V.pointRange, E.plotOptions[L.type || "line"].pointRange), $ = V.data || $.data, P.hasNavigatorData = P.hasNavigatorData || !!$, L.data = $ || m.data && m.data.slice(0), z && z.options ? z.update(L, W) : (G.navigatorSeries = X.initSeries(L), G.navigatorSeries.baseSeries = G, k.push(G.navigatorSeries)));
- }), (Y.data && (!g || !g.length) || p(Y)) && (P.hasNavigatorData = !1, Y = o(Y), Y.forEach(function(G, z) {
- Q.name = "Navigator " + (k.length + 1), L = h(
- E.navigator.series,
- { color: X.series[z] && !X.series[z].options.isInternal && X.series[z].color || X.options.colors[z] || X.options.colors[0] },
- Q,
- G
- ), L.data = G.data, L.data && (P.hasNavigatorData = !0, k.push(X.initSeries(L)));
- })), D && this.addBaseSeriesEvents();
- }, _.prototype.addBaseSeriesEvents = function() {
- var D = this, W = D.baseSeries || [];
- W[0] && W[0].xAxis && W[0].eventsToUnbind.push(O(W[0].xAxis, "foundExtremes", this.modifyBaseAxisExtremes)), W.forEach(function(P) {
- P.eventsToUnbind.push(O(P, "show", function() {
- this.navigatorSeries && this.navigatorSeries.setVisible(
- !0,
- !1
- );
- })), P.eventsToUnbind.push(O(P, "hide", function() {
- this.navigatorSeries && this.navigatorSeries.setVisible(!1, !1);
- })), this.navigatorOptions.adaptToUpdatedData !== !1 && P.xAxis && P.eventsToUnbind.push(O(P, "updatedData", this.updatedDataHandler)), P.eventsToUnbind.push(O(P, "remove", function() {
- this.navigatorSeries && (v(D.series, this.navigatorSeries), S(this.navigatorSeries.options) && this.navigatorSeries.remove(!1), delete this.navigatorSeries);
- }));
- }, this);
- }, _.prototype.getBaseSeriesMin = function(D) {
- return this.baseSeries.reduce(function(W, P) {
- return Math.min(W, P.xData ? P.xData[0] : W);
- }, D);
- }, _.prototype.modifyNavigatorAxisExtremes = function() {
- var D = this.xAxis, W;
- typeof D.getExtremes < "u" && (!(W = this.getUnionExtremes(!0)) || W.dataMin === D.min && W.dataMax === D.max || (D.min = W.dataMin, D.max = W.dataMax));
- }, _.prototype.modifyBaseAxisExtremes = function() {
- var D = this.chart.navigator, W = this.getExtremes(), P = W.dataMin, X = W.dataMax;
- W = W.max - W.min;
- var g = D.stickToMin, m = D.stickToMax, L = s(this.options.overscroll, 0), Y = D.series && D.series[0], V = !!this.setExtremes;
- if (!this.eventArgs || this.eventArgs.trigger !== "rangeSelectorButton") {
- if (g)
- var Q = P, k = Q + W;
- m && (k = X + L, g || (Q = Math.max(P, k - W, D.getBaseSeriesMin(Y && Y.xData ? Y.xData[0] : -Number.MAX_VALUE)))), V && (g || m) && i(Q) && (this.min = this.userMin = Q, this.max = this.userMax = k);
- }
- D.stickToMin = D.stickToMax = null;
- }, _.prototype.updatedDataHandler = function() {
- var D = this.chart.navigator, W = this.navigatorSeries;
- D.stickToMax = D.reversedExtremes ? Math.round(D.zoomedMin) === 0 : Math.round(D.zoomedMax) >= Math.round(D.size), D.stickToMin = D.shouldStickToMin(
- this,
- D
- ), W && !D.hasNavigatorData && (W.options.pointStart = this.xData[0], W.setData(this.options.data, !1, null, !1));
- }, _.prototype.shouldStickToMin = function(D, W) {
- W = W.getBaseSeriesMin(D.xData[0]);
- var P = D.xAxis;
- D = P.max;
- var X = P.min;
- return P = P.options.range, i(D) && i(X) ? P && 0 < D - W ? D - W < P : X <= W : !1;
- }, _.prototype.addChartEvents = function() {
- this.eventsToUnbind || (this.eventsToUnbind = []), this.eventsToUnbind.push(O(this.chart, "redraw", function() {
- var D = this.navigator, W = D && (D.baseSeries && D.baseSeries[0] && D.baseSeries[0].xAxis || this.xAxis[0]);
- W && D.render(W.min, W.max);
- }), O(this.chart, "getMargins", function() {
- var D = this.navigator, W = D.opposite ? "plotTop" : "marginBottom";
- this.inverted && (W = D.opposite ? "marginRight" : "plotLeft"), this[W] = (this[W] || 0) + (D.navigatorEnabled || !this.inverted ? D.outlineHeight : 0) + D.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(D) {
- D.destroy && D.destroy();
- }), "series xAxis yAxis shades outline scrollbarTrack scrollbarRifles scrollbarGroup scrollbar navigatorGroup rendered".split(" ").forEach(function(D) {
- this[D] && this[D].destroy && this[D].destroy(), this[D] = null;
- }, this), [this.handles].forEach(function(D) {
- w(D);
- }, this);
- }, _;
- }();
- return Z.Navigator || (Z.Navigator = A, H.compose(y), O(j, "beforeShowResetZoom", function() {
- var _ = this.options, D = _.navigator, W = _.rangeSelector;
- if ((D && D.enabled || W && W.enabled) && (!f && _.chart.zoomType === "x" || f && _.chart.pinchType === "x"))
- return !1;
- }), O(j, "beforeRender", function() {
- var _ = this.options;
- (_.navigator.enabled || _.scrollbar.enabled) && (this.scroller = this.navigator = new A(this));
- }), O(j, "afterSetChartSize", function() {
- var _ = this.legend, D = this.navigator;
- if (D) {
- var W = _ && _.options, P = D.xAxis, X = D.yAxis, g = D.scrollbarHeight;
- this.inverted ? (D.left = D.opposite ? this.chartWidth - g - D.height : this.spacing[3] + g, D.top = this.plotTop + g) : (D.left = s(P.left, this.plotLeft + g), D.top = D.navigatorOptions.top || this.chartHeight - D.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 + s(W.margin, 10) : 0) - (this.titleOffset ? this.titleOffset[2] : 0)), P && X && (this.inverted ? P.options.left = X.options.left = D.left : P.options.top = X.options.top = D.top, P.setAxisSize(), X.setAxisSize());
- }
- }), O(j, "update", function(_) {
- var D = _.options.navigator || {}, W = _.options.scrollbar || {};
- this.navigator || this.scroller || !D.enabled && !W.enabled || (h(
- !0,
- this.options.navigator,
- D
- ), h(!0, this.options.scrollbar, W), delete _.options.navigator, delete _.options.scrollbar);
- }), O(j, "afterUpdate", function(_) {
- this.navigator || this.scroller || !this.options.navigator.enabled && !this.options.scrollbar.enabled || (this.scroller = this.navigator = new A(this), s(_.redraw, !0) && this.redraw(_.animation));
- }), O(j, "afterAddSeries", function() {
- this.navigator && this.navigator.setBaseSeries(null, !1);
- }), O(N, "afterUpdate", function() {
- this.chart.navigator && !this.options.isInternal && this.chart.navigator.setBaseSeries(
- null,
- !1
- );
- }), j.prototype.callbacks.push(function(_) {
- var D = _.navigator;
- D && _.xAxis[0] && (_ = _.xAxis[0].getExtremes(), D.render(_.min, _.max));
- })), Z.Navigator = A, Z.Navigator;
- }), T(l, "Extensions/RangeSelector.js", [l["Core/Axis/Axis.js"], l["Core/Chart/Chart.js"], l["Core/Globals.js"], l["Core/DefaultOptions.js"], l["Core/Renderer/SVG/SVGElement.js"], l["Core/Utilities.js"]], function(y, j, I, Z, H, U) {
- function F(o) {
- if (o.indexOf("%L") !== -1)
- return "text";
- var n = "aAdewbBmoyY".split("").some(function(_) {
- return o.indexOf("%" + _) !== -1;
- }), A = "HkIlMS".split("").some(function(_) {
- return o.indexOf("%" + _) !== -1;
- });
- return n && A ? "datetime-local" : n ? "date" : A ? "time" : "text";
- }
- var R = Z.defaultOptions, N = U.addEvent, b = U.createElement, x = U.css, u = U.defined, f = U.destroyObjectProperties, E = U.discardElement, O = U.extend, B = U.find, M = U.fireEvent, S = U.isNumber, w = U.merge, v = U.objectEach, a = U.pad, c = U.pick, p = U.pInt, i = U.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 h = function() {
- function o(n) {
- this.buttons = void 0, this.buttonOptions = o.prototype.defaultButtons, this.initialButtonGroupWidth = 0, this.options = void 0, this.chart = n, this.init(n);
- }
- return o.prototype.clickButton = function(n, A) {
- var _ = this.chart, D = this.buttonOptions[n], W = _.xAxis[0], P = _.scroller && _.scroller.getUnionExtremes() || W || {}, X = P.dataMin, g = P.dataMax, m = W && Math.round(Math.min(W.max, c(g, W.max))), L = D.type;
- P = D._range;
- var Y, V = D.dataGrouping;
- if (X !== null && g !== null) {
- if (_.fixedRange = P, this.setSelected(n), V && (this.forcedDataGrouping = !0, y.prototype.setDataGrouping.call(W || { chart: this.chart }, V, !1), this.frozenStates = D.preserveDataGrouping), L === "month" || L === "year")
- if (W) {
- L = { range: D, max: m, chart: _, dataMin: X, dataMax: g };
- var Q = W.minFromRange.call(L);
- S(L.newMax) && (m = L.newMax);
- } else
- P = D;
- else if (P)
- Q = Math.max(m - P, X), m = Math.min(Q + P, g);
- else if (L === "ytd")
- if (W)
- typeof g > "u" && (X = Number.MAX_VALUE, g = Number.MIN_VALUE, _.series.forEach(function($) {
- $ = $.xData, X = Math.min($[0], X), g = Math.max($[$.length - 1], g);
- }), A = !1), m = this.getYTDExtremes(
- g,
- X,
- _.time.useUTC
- ), Q = Y = 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 (u(Q) && (Q += D._offsetMin), u(m) && (m += D._offsetMax), this.dropdown && (this.dropdown.selectedIndex = n + 1), W)
- W.setExtremes(Q, m, c(A, !0), void 0, { trigger: "rangeSelectorButton", rangeSelectorButton: D });
- else {
- var k = i(_.options.xAxis)[0], G = k.range;
- k.range = P;
- var z = k.min;
- k.min = Y, N(_, "load", function() {
- k.range = G, k.min = z;
- });
- }
- M(
- this,
- "afterBtnClick"
- );
- }
- }, o.prototype.setSelected = function(n) {
- this.selected = this.options.selected = n;
- }, o.prototype.init = function(n) {
- var A = this, _ = n.options.rangeSelector, D = _.buttons || A.defaultButtons.slice(), W = _.selected, P = function() {
- var X = A.minInput, g = A.maxInput;
- X && X.blur && M(X, "blur"), g && g.blur && M(g, "blur");
- };
- A.chart = n, A.options = _, A.buttons = [], A.buttonOptions = D, this.eventsToUnbind = [], this.eventsToUnbind.push(N(n.container, "mousedown", P)), this.eventsToUnbind.push(N(n, "resize", P)), D.forEach(A.computeButtonRange), typeof W < "u" && D[W] && this.clickButton(W, !1), this.eventsToUnbind.push(N(n, "load", function() {
- n.xAxis && n.xAxis[0] && N(n.xAxis[0], "setExtremes", function(X) {
- this.max - this.min !== n.fixedRange && X.trigger !== "rangeSelectorButton" && X.trigger !== "updatedData" && A.forcedDataGrouping && !A.frozenStates && this.setDataGrouping(!1, !1);
- });
- }));
- }, o.prototype.updateButtonStates = function() {
- var n = this, A = this.chart, _ = this.dropdown, D = A.xAxis[0], W = Math.round(D.max - D.min), P = !D.hasVisibleSeries, X = A.scroller && A.scroller.getUnionExtremes() || D, g = X.dataMin, m = X.dataMax;
- A = n.getYTDExtremes(m, g, A.time.useUTC);
- var L = A.min, Y = A.max, V = n.selected, Q = S(V), k = n.options.allButtonsEnabled, G = n.buttons;
- n.buttonOptions.forEach(function(z, $) {
- var q = z._range, it = z.type, et = z.count || 1, nt = G[$], rt = 0, ct = z._offsetMax - z._offsetMin;
- z = $ === V;
- var gt = q > m - g, dt = q < D.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 = Y - L + ct === W, ht = !z) : it === "all" && (q = D.max - D.min >= m - g, at = !z && Q && q), it = !k && (gt || dt || at || P), et = z && q || q && !Q && !ht || z && n.frozenStates, it ? rt = 3 : et && (Q = !0, rt = 2), nt.state !== rt && (nt.setState(rt), _ && (_.options[$ + 1].disabled = it, rt === 2 && (_.selectedIndex = $ + 1)), rt === 0 && V === $ && n.setSelected());
- });
- }, o.prototype.computeButtonRange = function(n) {
- var A = n.type, _ = n.count || 1, D = { millisecond: 1, second: 1e3, minute: 6e4, hour: 36e5, day: 864e5, week: 6048e5 };
- D[A] ? n._range = D[A] * _ : (A === "month" || A === "year") && (n._range = 864e5 * { month: 30, year: 365 }[A] * _), n._offsetMin = c(n.offsetMin, 0), n._offsetMax = c(n.offsetMax, 0), n._range += n._offsetMax - n._offsetMin;
- }, o.prototype.getInputValue = function(n) {
- n = n === "min" ? this.minInput : this.maxInput;
- var A = this.chart.options.rangeSelector, _ = this.chart.time;
- return n ? (n.type === "text" && A.inputDateParser || this.defaultInputDateParser)(n.value, _.useUTC, _) : 0;
- }, o.prototype.setInputValue = function(n, A) {
- var _ = this.options, D = this.chart.time, W = n === "min" ? this.minInput : this.maxInput;
- if (n = n === "min" ? this.minDateBox : this.maxDateBox, W) {
- var P = W.getAttribute("data-hc-time");
- P = u(P) ? Number(P) : void 0, u(A) && (u(P) && W.setAttribute("data-hc-time-previous", P), W.setAttribute("data-hc-time", A), P = A), W.value = D.dateFormat(this.inputTypeFormats[W.type] || _.inputEditDateFormat, P), n && n.attr({ text: D.dateFormat(_.inputDateFormat, P) });
- }
- }, o.prototype.setInputExtremes = function(n, A, _) {
- if (n = n === "min" ? this.minInput : this.maxInput) {
- var D = this.inputTypeFormats[n.type], W = this.chart.time;
- D && (A = W.dateFormat(D, A), n.min !== A && (n.min = A), _ = W.dateFormat(D, _), n.max !== _ && (n.max = _));
- }
- }, o.prototype.showInput = function(n) {
- var A = n === "min" ? this.minDateBox : this.maxDateBox;
- if ((n = n === "min" ? this.minInput : this.maxInput) && A && this.inputGroup) {
- var _ = n.type === "text", D = this.inputGroup, W = D.translateX;
- D = D.translateY;
- var P = this.options.inputBoxWidth;
- x(n, { width: _ ? A.width + (P ? -2 : 20) + "px" : "auto", height: _ ? A.height - 2 + "px" : "auto", border: "2px solid silver" }), _ && P ? x(n, { left: W + A.x + "px", top: D + "px" }) : x(n, { left: Math.min(Math.round(A.x + W - (n.offsetWidth - A.width) / 2), this.chart.chartWidth - n.offsetWidth) + "px", top: D - (n.offsetHeight - A.height) / 2 + "px" });
- }
- }, o.prototype.hideInput = function(n) {
- (n = n === "min" ? this.minInput : this.maxInput) && x(n, { top: "-9999em", border: 0, width: "1px", height: "1px" });
- }, o.prototype.defaultInputDateParser = function(n, A, _) {
- var D = n.split("/").join("-").split(" ").join("T");
- if (D.indexOf("T") === -1 && (D += "T00:00"), A)
- D += "Z";
- else {
- var W;
- (W = I.isSafari) && (W = D, W = !(6 < W.length && (W.lastIndexOf("-") === W.length - 6 || W.lastIndexOf("+") === W.length - 6))), W && (W = new Date(D).getTimezoneOffset() / 60, D += 0 >= W ? "+" + a(-W) + ":00" : "-" + a(W) + ":00");
- }
- return D = Date.parse(D), S(D) || (n = n.split("-"), D = Date.UTC(p(n[0]), p(n[1]) - 1, p(n[2]))), _ && A && S(D) && (D += _.getTimezoneOffset(D)), D;
- }, o.prototype.drawInput = function(n) {
- function A() {
- var k = P.getInputValue(n), G = _.xAxis[0], z = _.scroller && _.scroller.xAxis ? _.scroller.xAxis : G, $ = z.dataMin;
- z = z.dataMax;
- var q = P.maxInput, it = P.minInput;
- k !== Number(V.getAttribute("data-hc-time-previous")) && S(k) && (V.setAttribute("data-hc-time-previous", k), L && q && S($) ? k > Number(q.getAttribute("data-hc-time")) ? k = void 0 : k < $ && (k = $) : it && S(z) && (k < Number(it.getAttribute("data-hc-time")) ? k = void 0 : k > z && (k = z)), typeof k < "u" && G.setExtremes(L ? k : G.min, L ? G.max : k, void 0, void 0, { trigger: "rangeSelectorInput" }));
- }
- var _ = this.chart, D = this.div, W = this.inputGroup, P = this, X = _.renderer.style || {}, g = _.renderer, m = _.options.rangeSelector, L = n === "min", Y = R.lang[L ? "rangeSelectorFrom" : "rangeSelectorTo"] || "";
- Y = g.label(Y, 0).addClass("highcharts-range-label").attr({ padding: Y ? 2 : 0, height: Y ? 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() {
- P.showInput(n), P[n + "Input"].focus();
- }
- ), _.styledMode || g.attr({ stroke: m.inputBoxBorderColor, "stroke-width": 1 }), g.add(W);
- var V = b("input", { name: n, className: "highcharts-range-selector" }, void 0, D);
- V.setAttribute("type", F(m.inputDateFormat || "%b %e, %Y")), _.styledMode || (Y.css(w(X, m.labelStyle)), g.css(w({ color: "#333333" }, X, m.inputStyle)), x(V, 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))), V.onfocus = function() {
- P.showInput(n);
- }, V.onblur = function() {
- V === I.doc.activeElement && A(), P.hideInput(n), P.setInputValue(n), V.blur();
- };
- var Q = !1;
- return V.onchange = function() {
- Q || (A(), P.hideInput(n), V.blur());
- }, V.onkeypress = function(k) {
- k.keyCode === 13 && A();
- }, V.onkeydown = function(k) {
- Q = !0, k.keyCode !== 38 && k.keyCode !== 40 || A();
- }, V.onkeyup = function() {
- Q = !1;
- }, { dateBox: g, input: V, label: Y };
- }, o.prototype.getPosition = function() {
- var n = this.chart, A = n.options.rangeSelector;
- return n = A.verticalAlign === "top" ? n.plotTop - n.axisOffset[0] : 0, { buttonTop: n + A.buttonPosition.y, inputTop: n + A.inputPosition.y - 10 };
- }, o.prototype.getYTDExtremes = function(n, A, _) {
- var D = this.chart.time, W = new D.Date(n), P = D.get("FullYear", W);
- return _ = _ ? D.Date.UTC(P, 0, 1) : +new D.Date(P, 0, 1), A = Math.max(A, _), W = W.getTime(), { max: Math.min(n || W, W), min: A };
- }, o.prototype.render = function(n, A) {
- var _ = this.chart, D = _.renderer, W = _.container, P = _.options, X = P.rangeSelector, g = c(P.chart.style && P.chart.style.zIndex, 0) + 1;
- if (P = X.inputEnabled, X.enabled !== !1) {
- if (this.rendered || (this.group = D.g("range-selector-group").attr({ zIndex: 7 }).add(), this.div = b("div", void 0, { position: "relative", height: 0, zIndex: g }), this.buttonOptions.length && this.renderButtons(), W.parentNode && W.parentNode.insertBefore(this.div, W), P && (this.inputGroup = D.g("input-group").add(this.group), D = this.drawInput("min"), this.minDateBox = D.dateBox, this.minLabel = D.label, this.minInput = D.input, D = this.drawInput("max"), this.maxDateBox = D.dateBox, this.maxLabel = D.label, this.maxInput = D.input)), P && (this.setInputValue(
- "min",
- n
- ), this.setInputValue("max", A), n = _.scroller && _.scroller.getUnionExtremes() || _.xAxis[0] || {}, u(n.dataMin) && u(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 Y = L.getBBox().width;
- Y && (L.attr({ x: m }), m += Y + X.inputSpacing);
- }
- });
- }
- this.alignElements(), this.rendered = !0;
- }
- }, o.prototype.renderButtons = function() {
- var n = this, A = this.buttons, _ = this.options, D = R.lang, W = this.chart.renderer, P = w(_.buttonTheme), X = P && P.states, g = P.width || 28;
- delete P.width, delete P.states, this.buttonGroup = W.g("range-selector-buttons").add(this.group);
- var m = this.dropdown = b("select", void 0, { position: "absolute", width: "1px", height: "1px", padding: 0, border: 0, top: "-9999em", cursor: "pointer", opacity: 1e-4 }, this.div);
- N(m, "touchstart", function() {
- m.style.fontSize = "16px";
- }), [[I.isMS ? "mouseover" : "mouseenter"], [I.isMS ? "mouseout" : "mouseleave"], ["change", "click"]].forEach(function(L) {
- var Y = L[0], V = L[1];
- N(m, Y, function() {
- var Q = A[n.currentButtonIndex()];
- Q && M(Q.element, V || Y);
- });
- }), this.zoomText = W.label(D && D.rangeSelectorZoom || "", 0).attr({ padding: _.buttonTheme.padding, height: _.buttonTheme.height, paddingLeft: 0, paddingRight: 0 }).add(this.buttonGroup), this.chart.styledMode || (this.zoomText.css(_.labelStyle), P["stroke-width"] = c(P["stroke-width"], 0)), b(
- "option",
- { textContent: this.zoomText.textStr, disabled: !0 },
- void 0,
- m
- ), this.buttonOptions.forEach(function(L, Y) {
- b("option", { textContent: L.title || L.text }, void 0, m), A[Y] = W.button(L.text, 0, 0, function(V) {
- var Q = L.events && L.events.click, k;
- Q && (k = Q.call(L, V)), k !== !1 && n.clickButton(Y), n.isActive = !0;
- }, P, X && X.hover, X && X.select, X && X.disabled).attr({ "text-align": "center", width: g }).add(n.buttonGroup), L.title && A[Y].attr("title", L.title);
- });
- }, o.prototype.alignElements = function() {
- var n = this, A = this.buttonGroup, _ = this.buttons, D = this.chart, W = this.group, P = this.inputGroup, X = this.options, g = this.zoomText, m = D.options, L = m.exporting && m.exporting.enabled !== !1 && m.navigation && m.navigation.buttonOptions;
- m = X.buttonPosition;
- var Y = X.inputPosition, V = X.verticalAlign, Q = function($, q) {
- return L && n.titleCollision(D) && V === "top" && q.align === "right" && q.y - $.getBBox().height - 12 < (L.y || 0) + (L.height || 0) + D.spacing[0] ? -40 : 0;
- }, k = D.plotLeft;
- if (W && m && Y) {
- var G = m.x - D.spacing[3];
- if (A) {
- if (this.positionButtons(), !this.initialButtonGroupWidth) {
- var z = 0;
- g && (z += g.getBBox().width + 5), _.forEach(function($, q) {
- z += $.width, q !== _.length - 1 && (z += X.buttonSpacing);
- }), this.initialButtonGroupWidth = z;
- }
- k -= D.spacing[3], this.updateButtonStates(), g = Q(A, m), this.alignButtonGroup(g), W.placed = A.placed = D.hasLoaded;
- }
- A = 0, P && (A = Q(P, Y), Y.align === "left" ? G = k : Y.align === "right" && (G = -Math.max(D.axisOffset[1], -A)), P.align({ y: Y.y, width: P.getBBox().width, align: Y.align, x: Y.x + G - 2 }, !0, D.spacingBox), P.placed = D.hasLoaded), this.handleCollision(A), W.align({ verticalAlign: V }, !0, D.spacingBox), P = W.alignAttr.translateY, A = W.getBBox().height + 20, Q = 0, V === "bottom" && (Q = (Q = D.legend && D.legend.options) && Q.verticalAlign === "bottom" && Q.enabled && !Q.floating ? D.legend.legendHeight + c(Q.margin, 10) : 0, A = A + Q - 20, Q = P - A - (X.floating ? 0 : X.y) - (D.titleOffset ? D.titleOffset[2] : 0) - 10), V === "top" ? (X.floating && (Q = 0), D.titleOffset && D.titleOffset[0] && (Q = D.titleOffset[0]), Q += D.margin[0] - D.spacing[0] || 0) : V === "middle" && (Y.y === m.y ? Q = P : (Y.y || m.y) && (Q = 0 > Y.y || 0 > m.y ? Q - Math.min(Y.y, m.y) : P - A)), W.translate(X.x, X.y + Math.floor(Q)), m = this.minInput, Y = this.maxInput, P = this.dropdown, X.inputEnabled && m && Y && (m.style.marginTop = W.translateY + "px", Y.style.marginTop = W.translateY + "px"), P && (P.style.marginTop = W.translateY + "px");
- }
- }, o.prototype.alignButtonGroup = function(n, A) {
- var _ = this.chart, D = this.buttonGroup, W = this.options.buttonPosition, P = _.plotLeft - _.spacing[3], X = W.x - _.spacing[3];
- W.align === "right" ? X += n - P : W.align === "center" && (X -= P / 2), D && D.align({ y: W.y, width: c(A, this.initialButtonGroupWidth), align: W.align, x: X }, !0, _.spacingBox);
- }, o.prototype.positionButtons = function() {
- var n = this.buttons, A = this.chart, _ = this.options, D = this.zoomText, W = A.hasLoaded ? "animate" : "attr", P = _.buttonPosition, X = A.plotLeft, g = X;
- D && D.visibility !== "hidden" && (D[W]({ x: c(X + P.x, X) }), g += P.x + D.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 });
- });
- }, o.prototype.handleCollision = function(n) {
- var A = this, _ = this.chart, D = this.buttonGroup, W = this.inputGroup, P = this.options, X = P.buttonPosition, g = P.dropdown, m = P.inputPosition;
- P = function() {
- var V = 0;
- return A.buttons.forEach(function(Q) {
- Q = Q.getBBox(), Q.width > V && (V = Q.width);
- }), V;
- };
- var L = function(V) {
- if (W && D) {
- var Q = W.alignAttr.translateX + W.alignOptions.x - n + W.getBBox().x + 2, k = W.alignOptions.width, G = D.alignAttr.translateX + D.getBBox().x;
- return G + V > Q && Q + k > G && X.y < m.y + W.getBBox().height;
- }
- return !1;
- }, Y = function() {
- W && D && W.attr({ translateX: W.alignAttr.translateX + (_.axisOffset[1] >= -n ? 0 : -n), translateY: W.alignAttr.translateY + D.getBBox().height + 10 });
- };
- if (D) {
- if (g === "always") {
- this.collapseButtons(n), L(P()) && Y();
- return;
- }
- g === "never" && this.expandButtons();
- }
- W && D ? m.align === X.align || L(this.initialButtonGroupWidth + 20) ? g === "responsive" ? (this.collapseButtons(n), L(P()) && Y()) : Y() : g === "responsive" && this.expandButtons() : D && g === "responsive" && (this.initialButtonGroupWidth > _.plotWidth ? this.collapseButtons(n) : this.expandButtons());
- }, o.prototype.collapseButtons = function(n) {
- var A = this.buttons, _ = this.buttonOptions, D = this.chart, W = this.dropdown, P = this.options, X = this.zoomText, g = D.userOptions.rangeSelector && D.userOptions.rangeSelector.buttonTheme || {}, m = function(Y) {
- return { text: Y ? Y + " ▾" : "▾", width: "auto", paddingLeft: c(P.buttonTheme.paddingLeft, g.padding, 8), paddingRight: c(P.buttonTheme.paddingRight, g.padding, 8) };
- };
- X && X.hide();
- var L = !1;
- _.forEach(function(Y, V) {
- V = A[V], V.state !== 2 ? V.hide() : (V.show(), V.attr(m(Y.text)), L = !0);
- }), L || (W && (W.selectedIndex = 0), A[0].show(), A[0].attr(m(this.zoomText && this.zoomText.textStr))), _ = P.buttonPosition.align, this.positionButtons(), _ !== "right" && _ !== "center" || this.alignButtonGroup(n, A[this.currentButtonIndex()].getBBox().width), this.showDropdown();
- }, o.prototype.expandButtons = function() {
- var n = this.buttons, A = this.buttonOptions, _ = this.options, D = this.zoomText;
- this.hideDropdown(), D && D.show(), A.forEach(function(W, P) {
- P = n[P], P.show(), P.attr({ text: W.text, width: _.buttonTheme.width || 28, paddingLeft: c(_.buttonTheme.paddingLeft, "unset"), paddingRight: c(_.buttonTheme.paddingRight, "unset") }), 2 > P.state && P.setState(0);
- }), this.positionButtons();
- }, o.prototype.currentButtonIndex = function() {
- var n = this.dropdown;
- return n && 0 < n.selectedIndex ? n.selectedIndex - 1 : 0;
- }, o.prototype.showDropdown = function() {
- var n = this.buttonGroup, A = this.buttons, _ = this.chart, D = this.dropdown;
- if (n && D) {
- var W = n.translateX;
- n = n.translateY, A = A[this.currentButtonIndex()].getBBox(), x(D, { left: _.plotLeft + W + "px", top: n + 0.5 + "px", width: A.width + "px", height: A.height + "px" }), this.hasVisibleDropdown = !0;
- }
- }, o.prototype.hideDropdown = function() {
- var n = this.dropdown;
- n && (x(n, { top: "-9999em", width: "1px", height: "1px" }), this.hasVisibleDropdown = !1);
- }, o.prototype.getHeight = function() {
- var n = this.options, A = this.group, _ = n.y, D = n.buttonPosition.y, W = n.inputPosition.y;
- return n.height ? n.height : (this.alignElements(), n = A ? A.getBBox(!0).height + 13 + _ : 0, A = Math.min(W, D), (0 > W && 0 > D || 0 < W && 0 < D) && (n += Math.abs(A)), n);
- }, o.prototype.titleCollision = function(n) {
- return !(n.options.title.text || n.options.subtitle.text);
- }, o.prototype.update = function(n) {
- var A = this.chart;
- w(!0, A.options.rangeSelector, n), this.destroy(), this.init(A), this.render();
- }, o.prototype.destroy = function() {
- var n = this, A = n.minInput, _ = n.maxInput;
- n.eventsToUnbind && (n.eventsToUnbind.forEach(function(D) {
- return D();
- }), n.eventsToUnbind = void 0), f(n.buttons), A && (A.onfocus = A.onblur = A.onchange = null), _ && (_.onfocus = _.onblur = _.onchange = null), v(n, function(D, W) {
- D && W !== "chart" && (D instanceof H ? D.destroy() : D instanceof window.HTMLElement && E(D)), D !== o.prototype[W] && (n[W] = null);
- }, this);
- }, o;
- }();
- if (h.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" }
- ], h.prototype.inputTypeFormats = { "datetime-local": "%Y-%m-%dT%H:%M:%S", date: "%Y-%m-%d", time: "%H:%M:%S" }, y.prototype.minFromRange = function() {
- var o = this.range, n = o.type, A = this.max, _ = this.chart.time, D = function(g, m) {
- var L = n === "year" ? "FullYear" : "Month", Y = new _.Date(g), V = _.get(L, Y);
- return _.set(L, Y, V + m), V === _.get(L, Y) && _.set("Date", Y, 0), Y.getTime() - g;
- };
- if (S(o))
- var W = A - o, P = o;
- else
- W = A + D(A, -o.count), this.chart && (this.chart.fixedRange = A - W);
- var X = c(this.dataMin, Number.MIN_VALUE);
- return S(W) || (W = X), W <= X && (W = X, typeof P > "u" && (P = D(W, o.count)), this.newMax = Math.min(W + P, this.dataMax)), S(A) || (W = void 0), W;
- }, !I.RangeSelector) {
- var s = [], t = function(o) {
- function n() {
- _ && (A = o.xAxis[0].getExtremes(), D = o.legend, P = _ && _.options.verticalAlign, S(A.min) && _.render(A.min, A.max), D.display && P === "top" && P === D.options.verticalAlign && (W = w(o.spacingBox), W.y = D.options.layout === "vertical" ? o.plotTop : W.y + _.getHeight(), D.group.placed = !1, D.align(W)));
- }
- var A, _ = o.rangeSelector, D, W, P;
- _ && (B(s, function(X) {
- return X[0] === o;
- }) || s.push([o, [N(o.xAxis[0], "afterSetExtremes", function(X) {
- _ && _.render(X.min, X.max);
- }), N(o, "redraw", n)]]), n());
- };
- N(j, "afterGetContainer", function() {
- this.options.rangeSelector && this.options.rangeSelector.enabled && (this.rangeSelector = new h(this));
- }), N(j, "beforeRender", function() {
- var o = this.axes, n = this.rangeSelector;
- n && (S(n.deferredYTDClick) && (n.clickButton(n.deferredYTDClick), delete n.deferredYTDClick), o.forEach(function(A) {
- A.updateNames(), A.setScale();
- }), this.getAxisMargins(), n.render(), o = n.options.verticalAlign, n.options.floating || (o === "bottom" ? this.extraBottomMargin = !0 : o !== "middle" && (this.extraTopMargin = !0)));
- }), N(j, "update", function(o) {
- var n = o.options.rangeSelector;
- o = this.rangeSelector;
- var A = this.extraBottomMargin, _ = this.extraTopMargin;
- n && n.enabled && !u(o) && this.options.rangeSelector && (this.options.rangeSelector.enabled = !0, this.rangeSelector = o = new h(this)), this.extraTopMargin = this.extraBottomMargin = !1, o && (t(this), n = n && n.verticalAlign || o.options && o.options.verticalAlign, o.options.floating || (n === "bottom" ? this.extraBottomMargin = !0 : n !== "middle" && (this.extraTopMargin = !0)), this.extraBottomMargin !== A || this.extraTopMargin !== _) && (this.isDirtyBox = !0);
- }), N(j, "render", function() {
- var o = this.rangeSelector;
- o && !o.options.floating && (o.render(), o = o.options.verticalAlign, o === "bottom" ? this.extraBottomMargin = !0 : o !== "middle" && (this.extraTopMargin = !0));
- }), N(j, "getMargins", function() {
- var o = this.rangeSelector;
- o && (o = o.getHeight(), this.extraTopMargin && (this.plotTop += o), this.extraBottomMargin && (this.marginBottom += o));
- }), j.prototype.callbacks.push(t), N(j, "destroy", function() {
- for (var o = 0; o < s.length; o++) {
- var n = s[o];
- if (n[0] === this) {
- n[1].forEach(function(A) {
- return A();
- }), s.splice(o, 1);
- break;
- }
- }
- }), I.RangeSelector = h;
- }
- return h;
- }), T(
- l,
- "Core/Chart/StockChart.js",
- [l["Core/Animation/AnimationUtilities.js"], l["Core/Axis/Axis.js"], l["Core/Chart/Chart.js"], l["Core/FormatUtilities.js"], l["Core/DefaultOptions.js"], l["Core/Series/Series.js"], l["Core/Renderer/SVG/SVGRenderer.js"], l["Core/Utilities.js"]],
- function(y, j, I, Z, H, U, F, R) {
- function N(p, i) {
- return p === "xAxis" ? { minPadding: 0, maxPadding: 0, overscroll: 0, ordinal: !0, title: { text: null }, labels: { overflow: "justify" }, showLastLabel: !0 } : p === "yAxis" ? { labels: { y: -2 }, opposite: a(i.opposite, !0), showLastLabel: !(!i.categories && i.type !== "category"), title: { text: null } } : {};
- }
- function b(p, i) {
- if (p === "xAxis") {
- p = f();
- var h = { type: "datetime", categories: void 0 };
- return a(i.navigator && i.navigator.enabled, p.navigator.enabled, !0) && (h.startOnTick = !1, h.endOnTick = !1), h;
- }
- return {};
- }
- var x = this && this.__extends || function() {
- var p = function(i, h) {
- return p = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(s, t) {
- s.__proto__ = t;
- } || function(s, t) {
- for (var o in t)
- t.hasOwnProperty(o) && (s[o] = t[o]);
- }, p(i, h);
- };
- return function(i, h) {
- function s() {
- this.constructor = i;
- }
- p(i, h), i.prototype = h === null ? Object.create(h) : (s.prototype = h.prototype, new s());
- };
- }(), u = Z.format, f = H.getOptions;
- y = R.addEvent;
- var E = R.clamp, O = R.defined, B = R.extend, M = R.find, S = R.isNumber, w = R.isString, v = R.merge, a = R.pick, c = R.splat;
- return R = function(p) {
- function i() {
- return p !== null && p.apply(this, arguments) || this;
- }
- return x(i, p), i.prototype.init = function(h, s) {
- var t = f(), o = h.xAxis, n = h.yAxis, A = a(h.navigator && h.navigator.enabled, t.navigator.enabled, !0);
- h.xAxis = h.yAxis = void 0, A = v({ chart: { panning: { enabled: !0, type: "x" }, pinchType: "x" }, navigator: { enabled: A }, scrollbar: { enabled: a(t.scrollbar && t.scrollbar.enabled, !0) }, rangeSelector: { enabled: a(t.rangeSelector.enabled, !0) }, title: { text: null }, tooltip: { split: a(t.tooltip.split, !0), crosshairs: !0 }, legend: { enabled: !1 } }, h, { isStock: !0 }), h.xAxis = o, h.yAxis = n, A.xAxis = c(h.xAxis || {}).map(function(_, D) {
- return v(N("xAxis", _), t.xAxis, t.xAxis && t.xAxis[D], _, b("xAxis", h));
- }), A.yAxis = c(h.yAxis || {}).map(function(_, D) {
- return v(N("yAxis", _), t.yAxis, t.yAxis && t.yAxis[D], _);
- }), p.prototype.init.call(this, A, s);
- }, i.prototype.createAxis = function(h, s) {
- return s.axis = v(N(h, s.axis), s.axis, b(h, this.userOptions)), p.prototype.createAxis.call(this, h, s);
- }, i;
- }(I), function(p) {
- p.stockChart = function(i, h, s) {
- return new p(i, h, s);
- };
- }(R || (R = {})), y(U, "setOptions", function(p) {
- 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 && (p.plotOptions[this.type] = v(p.plotOptions[this.type], i)));
- }), y(j, "autoLabelAlign", function(p) {
- var i = this.chart, h = this.options;
- i = i._labelPanes = i._labelPanes || {};
- var s = this.options.labels;
- this.chart.options.isStock && this.coll === "yAxis" && (h = h.top + "," + h.height, !i[h] && s.enabled && (s.x === 15 && (s.x = 0), typeof s.align > "u" && (s.align = "right"), i[h] = this, p.align = "right", p.preventDefault()));
- }), y(j, "destroy", function() {
- var p = this.chart, i = this.options && this.options.top + "," + this.options.height;
- i && p._labelPanes && p._labelPanes[i] === this && delete p._labelPanes[i];
- }), y(j, "getPlotLinePath", function(p) {
- function i(G) {
- var z = G === "xAxis" ? "yAxis" : "xAxis";
- return G = h.options[z], S(G) ? [t[z][G]] : w(G) ? [t.get(G)] : s.map(function($) {
- return $[z];
- });
- }
- var h = this, s = this.isLinked && !this.series ? this.linkedParent.series : this.series, t = h.chart, o = t.renderer, n = h.left, A = h.top, _, D, W, P, X = [], g = [], m = p.translatedValue, L = p.value, Y = p.force;
- if (t.options.isStock && p.acrossPanes !== !1 && h.coll === "xAxis" || h.coll === "yAxis") {
- p.preventDefault(), g = i(h.coll);
- var V = h.isXAxis ? t.yAxis : t.xAxis;
- V.forEach(function(G) {
- if (!O(G.options.id) || G.options.id.indexOf("navigator") === -1) {
- var z = G.isXAxis ? "yAxis" : "xAxis";
- z = O(G.options[z]) ? t[z][G.options[z]] : t[z][0], h === z && g.push(G);
- }
- });
- var Q = g.length ? [] : [h.isXAxis ? t.yAxis[0] : t.xAxis[0]];
- g.forEach(function(G) {
- Q.indexOf(G) !== -1 || M(Q, function(z) {
- return z.pos === G.pos && z.len === G.len;
- }) || Q.push(G);
- });
- var k = a(m, h.translate(L, null, null, p.old));
- S(k) && (h.horiz ? Q.forEach(function(G) {
- var z;
- D = G.pos, P = D + G.len, _ = W = Math.round(k + h.transB), Y !== "pass" && (_ < n || _ > n + h.width) && (Y ? _ = W = E(_, n, n + h.width) : z = !0), z || X.push(["M", _, D], ["L", W, P]);
- }) : Q.forEach(function(G) {
- var z;
- _ = G.pos, W = _ + G.len, D = P = Math.round(A + h.height - k), Y !== "pass" && (D < A || D > A + h.height) && (Y ? D = P = E(D, A, A + h.height) : z = !0), z || X.push(["M", _, D], ["L", W, P]);
- })), p.path = 0 < X.length ? o.crispPolyLine(X, p.lineWidth || 1) : null;
- }
- }), F.prototype.crispPolyLine = function(p, i) {
- for (var h = 0; h < p.length; h += 2) {
- var s = p[h], t = p[h + 1];
- s[1] === t[1] && (s[1] = t[1] = Math.round(s[1]) - i % 2 / 2), s[2] === t[2] && (s[2] = t[2] = Math.round(s[2]) + i % 2 / 2);
- }
- return p;
- }, y(j, "afterHideCrosshair", function() {
- this.crossLabel && (this.crossLabel = this.crossLabel.hide());
- }), y(j, "afterDrawCrosshair", function(p) {
- var i, h;
- if (this.crosshair && this.crosshair.label && this.crosshair.label.enabled && this.cross && S(this.min) && S(this.max)) {
- var s = this.chart, t = this.logarithmic, o = this.crosshair.label, n = this.horiz, A = this.opposite, _ = this.left, D = this.top, W = this.crossLabel, P = o.format, X = "", g = this.options.tickPosition === "inside", m = this.crosshair.snap !== !1, L = 0, Y = p.e || this.cross && this.cross.e;
- p = p.point;
- var V = this.min, Q = this.max;
- t && (V = t.lin2log(V), Q = t.lin2log(Q)), t = n ? "center" : A ? this.labelAlign === "right" ? "right" : "left" : this.labelAlign === "left" ? "left" : "center", W || (W = this.crossLabel = s.renderer.label("", 0, void 0, o.shape || "callout").addClass("highcharts-crosshair-label highcharts-color-" + (p ? p.series.colorIndex : this.series[0] && this.series[0].colorIndex)).attr({ align: o.align || t, padding: a(o.padding, 8), r: a(o.borderRadius, 3), zIndex: 2 }).add(this.labelGroup), s.styledMode || W.attr({ fill: o.backgroundColor || p && p.series && p.series.color || "#666666", stroke: o.borderColor || "", "stroke-width": o.borderWidth || 0 }).css(B({ color: "#ffffff", fontWeight: "normal", fontSize: "11px", textAlign: "center" }, o.style || {}))), n ? (t = m ? (p.plotX || 0) + _ : Y.chartX, D += A ? 0 : this.height) : (t = A ? this.width + _ : 0, D = m ? (p.plotY || 0) + D : Y.chartY), P || o.formatter || (this.dateTime && (X = "%b %d, %Y"), P = "{value" + (X ? ":" + X : "") + "}"), X = m ? this.isXAxis ? p.x : p.y : this.toValue(n ? Y.chartX : Y.chartY), m = p ? p.series.isPointInside(p) : S(X) && X > V && X < Q, Y = "", P ? Y = u(P, { value: X }, s) : o.formatter && S(X) && (Y = o.formatter.call(this, X)), W.attr({ text: Y, x: t, y: D, visibility: m ? "visible" : "hidden" }), o = W.getBBox(), S(W.y) && (n ? (g && !A || !g && A) && (D = W.y - o.height) : D = W.y - o.height / 2), n ? (i = _ - o.x, h = _ + this.width - o.x) : (i = this.labelAlign === "left" ? _ : 0, h = this.labelAlign === "right" ? _ + this.width : s.chartWidth), W.translateX < i && (L = i - W.translateX), W.translateX + o.width >= h && (L = -(W.translateX + o.width - h)), W.attr({ x: t + L, y: D, anchorX: n ? t : this.opposite ? 0 : s.chartWidth, anchorY: n ? this.opposite ? s.chartHeight : 0 : D + o.height / 2 });
- }
- }), U.prototype.forceCropping = function() {
- var p = this.chart, i = this.options.dataGrouping;
- return this.allowDG !== !1 && i && a(i.enabled, p.options.isStock);
- }, y(I, "update", function(p) {
- p = p.options, "scrollbar" in p && this.navigator && (v(!0, this.options.scrollbar, p.scrollbar), this.navigator.update({}, !1), delete p.scrollbar);
- }), R;
- }
- ), T(l, "masters/modules/stock.src.js", [
- l["Core/Globals.js"],
- l["Core/Axis/OrdinalAxis.js"],
- l["Series/DataModifyComposition.js"],
- l["Core/Scrollbar.js"],
- l["Core/Chart/StockChart.js"]
- ], function(y, j, I, Z, H) {
- y.Scrollbar = Z, y.StockChart = y.stockChart = H.stockChart, Z.compose(y.Axis), j.compose(y.Axis, y.Series, y.Chart), I.compose(y.Series, y.Axis, y.Point);
- }), T(l, "masters/highstock.src.js", [l["masters/highcharts.src.js"]], function(y) {
- return y.product = "Highstock", y;
- }), l["masters/highstock.src.js"]._modules = l, l["masters/highstock.src.js"];
- });
- })(Fp);
- var O0 = Fp.exports;
- const $r = /* @__PURE__ */ Mn(O0);
- var Up = { exports: {} };
- (function(r) {
- (function(d, T) {
- r.exports ? (T.default = T, r.exports = d.document ? T(d) : T) : (d.Highcharts && d.Highcharts.error(16, !0), d.Highcharts = T(d));
- })(typeof window < "u" ? window : Fr, function(d) {
- function T(y, j, I, Z) {
- y.hasOwnProperty(j) || (y[j] = Z.apply(null, I));
- }
- var l = {};
- return T(l, "Core/Globals.js", [], function() {
- var y = typeof d < "u" ? d : typeof window < "u" ? window : {}, j;
- return function(I) {
- I.SVG_NS = "http://www.w3.org/2000/svg", I.product = "Highcharts", I.version = "9.3.3", I.win = y, I.doc = I.win.document, I.svg = I.doc && I.doc.createElementNS && !!I.doc.createElementNS(I.SVG_NS, "svg").createSVGRect, I.userAgent = I.win.navigator && I.win.navigator.userAgent || "", I.isChrome = I.userAgent.indexOf("Chrome") !== -1, I.isFirefox = I.userAgent.indexOf("Firefox") !== -1, I.isMS = /(edge|msie|trident)/i.test(I.userAgent) && !I.win.opera, I.isSafari = !I.isChrome && I.userAgent.indexOf("Safari") !== -1, I.isTouchDevice = /(Mobile|Android|Windows Phone)/.test(I.userAgent), I.isWebKit = I.userAgent.indexOf("AppleWebKit") !== -1, I.deg2rad = 2 * Math.PI / 360, I.hasBidiBug = I.isFirefox && 4 > parseInt(I.userAgent.split("Firefox/")[1], 10), I.hasTouch = !!I.win.TouchEvent, I.marginNames = ["plotTop", "marginRight", "marginBottom", "plotLeft"], I.noop = function() {
- }, I.supportsPassiveEvents = function() {
- var Z = !1;
- if (!I.isMS) {
- var H = Object.defineProperty({}, "passive", { get: function() {
- Z = !0;
- } });
- I.win.addEventListener && I.win.removeEventListener && (I.win.addEventListener(
- "testPassive",
- I.noop,
- H
- ), I.win.removeEventListener("testPassive", I.noop, H));
- }
- return Z;
- }(), I.charts = [], I.dateFormats = {}, I.seriesTypes = {}, I.symbolSizes = {}, I.chartCount = 0;
- }(j || (j = {})), j;
- }), T(l, "Core/Utilities.js", [l["Core/Globals.js"]], function(y) {
- function j(t, o, n, A) {
- var _ = o ? "Highcharts error" : "Highcharts warning";
- t === 32 && (t = _ + ": Deprecated member");
- var D = b(t), W = D ? _ + " #" + t + ": www.highcharts.com/errors/" + t + "/" : t.toString();
- if (typeof A < "u") {
- var P = "";
- D && (W += "?"), S(A, function(X, g) {
- P += `
- - ` + g + ": " + X, D && (W += encodeURI(g) + "=" + encodeURI(X));
- }), W += P;
- }
- v(y, "displayError", { chart: n, code: t, message: W, params: A }, function() {
- if (o)
- throw Error(W);
- p.console && j.messages.indexOf(W) === -1 && console.warn(W);
- }), j.messages.push(W);
- }
- function I(t, o) {
- var n = {};
- return S(t, function(A, _) {
- F(t[_], !0) && !t.nodeType && o[_] ? (A = I(t[_], o[_]), Object.keys(A).length && (n[_] = A)) : (F(t[_]) || t[_] !== o[_]) && (n[_] = t[_]);
- }), n;
- }
- function Z(t, o) {
- return parseInt(t, o || 10);
- }
- function H(t) {
- return typeof t == "string";
- }
- function U(t) {
- return t = Object.prototype.toString.call(t), t === "[object Array]" || t === "[object Array Iterator]";
- }
- function F(t, o) {
- return !!t && typeof t == "object" && (!o || !U(t));
- }
- function R(t) {
- return F(t) && typeof t.nodeType == "number";
- }
- function N(t) {
- var o = t && t.constructor;
- return !(!F(t, !0) || R(t) || !o || !o.name || o.name === "Object");
- }
- function b(t) {
- return typeof t == "number" && !isNaN(t) && 1 / 0 > t && -1 / 0 < t;
- }
- function x(t) {
- return typeof t < "u" && t !== null;
- }
- function u(t, o, n) {
- var A;
- return H(o) ? x(n) ? t.setAttribute(o, n) : t && t.getAttribute && ((A = t.getAttribute(o)) || o !== "class" || (A = t.getAttribute(o + "Name"))) : S(o, function(_, D) {
- x(_) ? t.setAttribute(D, _) : t.removeAttribute(D);
- }), A;
- }
- function f(t, o) {
- var n;
- t || (t = {});
- for (n in o)
- t[n] = o[n];
- return t;
- }
- function E() {
- for (var t = arguments, o = t.length, n = 0; n < o; n++) {
- var A = t[n];
- if (typeof A < "u" && A !== null)
- return A;
- }
- }
- function O(t, o) {
- y.isMS && !y.svg && o && typeof o.opacity < "u" && (o.filter = "alpha(opacity=" + 100 * o.opacity + ")"), f(t.style, o);
- }
- function B(t, o) {
- return 1e14 < t ? t : parseFloat(t.toPrecision(o || 14));
- }
- function M(t, o, n) {
- var A = y.getStyle || M;
- if (o === "width")
- return o = Math.min(t.offsetWidth, t.scrollWidth), n = t.getBoundingClientRect && t.getBoundingClientRect().width, n < o && n >= o - 1 && (o = Math.floor(n)), Math.max(0, o - (A(t, "padding-left", !0) || 0) - (A(t, "padding-right", !0) || 0));
- if (o === "height")
- return Math.max(0, Math.min(t.offsetHeight, t.scrollHeight) - (A(t, "padding-top", !0) || 0) - (A(t, "padding-bottom", !0) || 0));
- if (p.getComputedStyle || j(27, !0), t = p.getComputedStyle(t, void 0)) {
- var _ = t.getPropertyValue(o);
- E(n, o !== "opacity") && (_ = Z(_));
- }
- return _;
- }
- function S(t, o, n) {
- for (var A in t)
- Object.hasOwnProperty.call(t, A) && o.call(n || t[A], t[A], A, t);
- }
- function w(t, o, n) {
- function A(P, X) {
- var g = t.removeEventListener || y.removeEventListenerPolyfill;
- g && g.call(t, P, X, !1);
- }
- function _(P) {
- var X;
- if (t.nodeName) {
- if (o) {
- var g = {};
- g[o] = !0;
- } else
- g = P;
- S(g, function(m, L) {
- if (P[L])
- for (X = P[L].length; X--; )
- A(L, P[L][X].fn);
- });
- }
- }
- var D = typeof t == "function" && t.prototype || t;
- if (Object.hasOwnProperty.call(D, "hcEvents")) {
- var W = D.hcEvents;
- o ? (D = W[o] || [], n ? (W[o] = D.filter(function(P) {
- return n !== P.fn;
- }), A(o, n)) : (_(W), W[o] = [])) : (_(W), delete D.hcEvents);
- }
- }
- function v(t, o, n, A) {
- if (n = n || {}, c.createEvent && (t.dispatchEvent || t.fireEvent && t !== y)) {
- var _ = c.createEvent("Events");
- _.initEvent(o, !0, !0), n = f(_, n), t.dispatchEvent ? t.dispatchEvent(n) : t.fireEvent(o, n);
- } else if (t.hcEvents) {
- n.target || f(n, { preventDefault: function() {
- n.defaultPrevented = !0;
- }, target: t, type: o }), _ = [];
- for (var D = t, W = !1; D.hcEvents; )
- Object.hasOwnProperty.call(D, "hcEvents") && D.hcEvents[o] && (_.length && (W = !0), _.unshift.apply(_, D.hcEvents[o])), D = Object.getPrototypeOf(D);
- W && _.sort(function(P, X) {
- return P.order - X.order;
- }), _.forEach(function(P) {
- P.fn.call(t, n) === !1 && n.preventDefault();
- });
- }
- A && !n.defaultPrevented && A.call(t, n);
- }
- var a = y.charts, c = y.doc, p = y.win;
- (j || (j = {})).messages = [], Math.easeInOutSine = function(t) {
- return -0.5 * (Math.cos(Math.PI * t) - 1);
- };
- var i = Array.prototype.find ? function(t, o) {
- return t.find(o);
- } : function(t, o) {
- var n, A = t.length;
- for (n = 0; n < A; n++)
- if (o(t[n], n))
- return t[n];
- };
- S({ map: "map", each: "forEach", grep: "filter", reduce: "reduce", some: "some" }, function(t, o) {
- y[o] = function(n) {
- var A;
- return j(32, !1, void 0, (A = {}, A["Highcharts." + o] = "use Array." + t, A)), Array.prototype[t].apply(n, [].slice.call(arguments, 1));
- };
- });
- var h, s = function() {
- var t = Math.random().toString(36).substring(2, 9) + "-", o = 0;
- return function() {
- return "highcharts-" + (h ? "" : t) + o++;
- };
- }();
- return p.jQuery && (p.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) : a[u(this[0], "data-highcharts-chart")];
- }), i = { addEvent: function(t, o, n, A) {
- A === void 0 && (A = {});
- 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 D = t.addEventListener || y.addEventListenerPolyfill;
- return D && D.call(t, o, n, y.supportsPassiveEvents ? { passive: A.passive === void 0 ? o.indexOf("touch") !== -1 : A.passive, capture: !1 } : !1), _[o] || (_[o] = []), _[o].push({ fn: n, order: typeof A.order == "number" ? A.order : 1 / 0 }), _[o].sort(function(W, P) {
- return W.order - P.order;
- }), function() {
- w(t, o, n);
- };
- }, arrayMax: function(t) {
- for (var o = t.length, n = t[0]; o--; )
- t[o] > n && (n = t[o]);
- return n;
- }, arrayMin: function(t) {
- for (var o = t.length, n = t[0]; o--; )
- t[o] < n && (n = t[o]);
- return n;
- }, attr: u, clamp: function(t, o, n) {
- return t > o ? t < n ? t : n : o;
- }, cleanRecursively: I, clearTimeout: function(t) {
- x(t) && clearTimeout(t);
- }, correctFloat: B, createElement: function(t, o, n, A, _) {
- return t = c.createElement(t), o && f(t, o), _ && O(t, { padding: "0", border: "none", margin: "0" }), n && O(t, n), A && A.appendChild(t), t;
- }, css: O, defined: x, destroyObjectProperties: function(t, o) {
- S(t, function(n, A) {
- n && n !== o && n.destroy && n.destroy(), delete t[A];
- });
- }, discardElement: function(t) {
- t && t.parentElement && t.parentElement.removeChild(t);
- }, erase: function(t, o) {
- for (var n = t.length; n--; )
- if (t[n] === o) {
- t.splice(n, 1);
- break;
- }
- }, error: j, extend: f, extendClass: function(t, o) {
- var n = function() {
- };
- return n.prototype = new t(), f(n.prototype, o), n;
- }, find: i, fireEvent: v, getMagnitude: function(t) {
- return Math.pow(10, Math.floor(Math.log(t) / Math.LN10));
- }, getNestedProperty: function(t, o) {
- for (t = t.split("."); t.length && x(o); ) {
- var n = t.shift();
- if (typeof n > "u" || n === "__proto__" || (o = o[n], !x(o) || typeof o == "function" || typeof o.nodeType == "number" || o === p))
- return;
- }
- return o;
- }, getStyle: M, inArray: function(t, o, n) {
- return j(32, !1, void 0, { "Highcharts.inArray": "use Array.indexOf" }), o.indexOf(t, n);
- }, isArray: U, isClass: N, isDOMElement: R, isFunction: function(t) {
- return typeof t == "function";
- }, isNumber: b, isObject: F, isString: H, keys: function(t) {
- return j(32, !1, void 0, { "Highcharts.keys": "use Object.keys" }), Object.keys(t);
- }, merge: function() {
- var t, o = arguments, n = {}, A = function(D, W) {
- return typeof D != "object" && (D = {}), S(W, function(P, X) {
- X !== "__proto__" && X !== "constructor" && (!F(P, !0) || N(P) || R(P) ? D[X] = W[X] : D[X] = A(D[X] || {}, P));
- }), D;
- };
- o[0] === !0 && (n = o[1], o = Array.prototype.slice.call(o, 2));
- var _ = o.length;
- for (t = 0; t < _; t++)
- n = A(n, o[t]);
- return n;
- }, normalizeTickInterval: function(t, o, n, A, _) {
- var D = t;
- n = E(n, 1);
- var W = t / n;
- for (o || (o = _ ? [1, 1.2, 1.5, 2, 2.5, 3, 4, 5, 6, 8, 10] : [1, 2, 2.5, 5, 10], A === !1 && (n === 1 ? o = o.filter(function(P) {
- return P % 1 === 0;
- }) : 0.1 >= n && (o = [1 / n]))), A = 0; A < o.length && (D = o[A], !(_ && D * n >= t || !_ && W <= (o[A] + (o[A + 1] || o[A])) / 2)); A++)
- ;
- return D = B(D * n, -Math.round(Math.log(1e-3) / Math.LN10));
- }, objectEach: S, offset: function(t) {
- var o = c.documentElement;
- return t = t.parentElement || t.parentNode ? t.getBoundingClientRect() : { top: 0, left: 0, width: 0, height: 0 }, { top: t.top + (p.pageYOffset || o.scrollTop) - (o.clientTop || 0), left: t.left + (p.pageXOffset || o.scrollLeft) - (o.clientLeft || 0), width: t.width, height: t.height };
- }, pad: function(t, o, n) {
- return Array((o || 2) + 1 - String(t).replace("-", "").length).join(n || "0") + t;
- }, pick: E, pInt: Z, relativeLength: function(t, o, n) {
- return /%$/.test(t) ? o * parseFloat(t) / 100 + (n || 0) : parseFloat(t);
- }, removeEvent: w, splat: function(t) {
- return U(t) ? t : [t];
- }, stableSort: function(t, o) {
- var n = t.length, A, _;
- for (_ = 0; _ < n; _++)
- t[_].safeI = _;
- for (t.sort(function(D, W) {
- return A = o(D, W), A === 0 ? D.safeI - W.safeI : A;
- }), _ = 0; _ < n; _++)
- delete t[_].safeI;
- }, syncTimeout: function(t, o, n) {
- return 0 < o ? setTimeout(t, o, n) : (t.call(0, n), -1);
- }, timeUnits: {
- millisecond: 1,
- second: 1e3,
- minute: 6e4,
- hour: 36e5,
- day: 864e5,
- week: 6048e5,
- month: 24192e5,
- year: 314496e5
- }, uniqueKey: s, useSerialIds: function(t) {
- return h = E(t, h);
- }, wrap: function(t, o, n) {
- var A = t[o];
- t[o] = function() {
- var _ = Array.prototype.slice.call(arguments), D = arguments, W = this;
- return W.proceed = function() {
- A.apply(W, arguments.length ? arguments : D);
- }, _.unshift(A), _ = n.apply(this, _), W.proceed = null, _;
- };
- } }, i;
- }), T(l, "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" };
- }), T(l, "Core/Color/Color.js", [l["Core/Globals.js"], l["Core/Utilities.js"]], function(y, j) {
- var I = j.isNumber, Z = j.merge, H = j.pInt;
- return j = function() {
- function U(F) {
- this.rgba = [NaN, NaN, NaN, NaN], this.input = F;
- var R = y.Color;
- if (R && R !== U)
- return new R(F);
- if (!(this instanceof U))
- return new U(F);
- this.init(F);
- }
- return U.parse = function(F) {
- return F ? new U(F) : U.None;
- }, U.prototype.init = function(F) {
- var R;
- if (typeof F == "object" && typeof F.stops < "u")
- this.stops = F.stops.map(function(u) {
- return new U(u[1]);
- });
- else if (typeof F == "string") {
- if (this.input = F = U.names[F.toLowerCase()] || F, F.charAt(0) === "#") {
- var N = F.length, b = parseInt(F.substr(1), 16);
- N === 7 ? R = [(b & 16711680) >> 16, (b & 65280) >> 8, b & 255, 1] : N === 4 && (R = [(b & 3840) >> 4 | (b & 3840) >> 8, (b & 240) >> 4 | b & 240, (b & 15) << 4 | b & 15, 1]);
- }
- if (!R)
- for (b = U.parsers.length; b-- && !R; ) {
- var x = U.parsers[b];
- (N = x.regex.exec(F)) && (R = x.parse(N));
- }
- }
- R && (this.rgba = R);
- }, U.prototype.get = function(F) {
- var R = this.input, N = this.rgba;
- if (typeof R == "object" && typeof this.stops < "u") {
- var b = Z(R);
- return b.stops = [].slice.call(b.stops), this.stops.forEach(function(x, u) {
- b.stops[u] = [b.stops[u][0], x.get(F)];
- }), b;
- }
- return N && I(N[0]) ? F === "rgb" || !F && N[3] === 1 ? "rgb(" + N[0] + "," + N[1] + "," + N[2] + ")" : F === "a" ? "" + N[3] : "rgba(" + N.join(",") + ")" : R;
- }, U.prototype.brighten = function(F) {
- var R = this.rgba;
- if (this.stops)
- this.stops.forEach(function(b) {
- b.brighten(F);
- });
- else if (I(F) && F !== 0)
- for (var N = 0; 3 > N; N++)
- R[N] += H(255 * F), 0 > R[N] && (R[N] = 0), 255 < R[N] && (R[N] = 255);
- return this;
- }, U.prototype.setOpacity = function(F) {
- return this.rgba[3] = F, this;
- }, U.prototype.tweenTo = function(F, R) {
- var N = this.rgba, b = F.rgba;
- return !I(N[0]) || !I(b[0]) ? F.input || "none" : (F = b[3] !== 1 || N[3] !== 1, (F ? "rgba(" : "rgb(") + Math.round(b[0] + (N[0] - b[0]) * (1 - R)) + "," + Math.round(b[1] + (N[1] - b[1]) * (1 - R)) + "," + Math.round(b[2] + (N[2] - b[2]) * (1 - R)) + (F ? "," + (b[3] + (N[3] - b[3]) * (1 - R)) : "") + ")");
- }, U.names = { white: "#ffffff", black: "#000000" }, U.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(F) {
- return [H(F[1]), H(F[2]), H(F[3]), parseFloat(F[4], 10)];
- }
- }, { regex: /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/, parse: function(F) {
- return [H(F[1]), H(F[2]), H(F[3]), 1];
- } }], U.None = new U(""), U;
- }(), j;
- }), T(l, "Core/Color/Palettes.js", [], function() {
- return { colors: "#7cb5ec #434348 #90ed7d #f7a35c #8085e9 #f15c80 #e4d354 #2b908f #f45b5b #91e8e1".split(" ") };
- }), T(l, "Core/Time.js", [l["Core/Globals.js"], l["Core/Utilities.js"]], function(y, j) {
- var I = y.win, Z = j.defined, H = j.error, U = j.extend, F = j.isObject, R = j.merge, N = j.objectEach, b = j.pad, x = j.pick, u = j.splat, f = j.timeUnits, E = y.isSafari && I.Intl && I.Intl.DateTimeFormat.prototype.formatRange, O = y.isSafari && I.Intl && !I.Intl.DateTimeFormat.prototype.formatRange;
- return j = function() {
- function B(M) {
- this.options = {}, this.variableTimezone = this.useUTC = !1, this.Date = I.Date, this.getTimezoneOffset = this.timezoneOffsetFunction(), this.update(M);
- }
- return B.prototype.get = function(M, S) {
- if (this.variableTimezone || this.timezoneOffset) {
- var w = S.getTime(), v = w - this.getTimezoneOffset(S);
- return S.setTime(v), M = S["getUTC" + M](), S.setTime(w), M;
- }
- return this.useUTC ? S["getUTC" + M]() : S["get" + M]();
- }, B.prototype.set = function(M, S, w) {
- if (this.variableTimezone || this.timezoneOffset) {
- if (M === "Milliseconds" || M === "Seconds" || M === "Minutes" && this.getTimezoneOffset(S) % 36e5 === 0)
- return S["setUTC" + M](w);
- var v = this.getTimezoneOffset(S);
- return v = S.getTime() - v, S.setTime(v), S["setUTC" + M](w), M = this.getTimezoneOffset(S), v = S.getTime() + M, S.setTime(v);
- }
- return this.useUTC || E && M === "FullYear" ? S["setUTC" + M](w) : S["set" + M](w);
- }, B.prototype.update = function(M) {
- var S = x(M && M.useUTC, !0);
- this.options = M = R(!0, this.options || {}, M), this.Date = M.Date || I.Date || Date, this.timezoneOffset = (this.useUTC = S) && M.timezoneOffset, this.getTimezoneOffset = this.timezoneOffsetFunction(), this.variableTimezone = S && !(!M.getTimezoneOffset && !M.timezone);
- }, B.prototype.makeTime = function(M, S, w, v, a, c) {
- if (this.useUTC) {
- var p = this.Date.UTC.apply(0, arguments), i = this.getTimezoneOffset(p);
- p += i;
- var h = this.getTimezoneOffset(p);
- i !== h ? p += h - i : i - 36e5 !== this.getTimezoneOffset(p - 36e5) || O || (p -= 36e5);
- } else
- p = new this.Date(M, S, x(w, 1), x(v, 0), x(a, 0), x(c, 0)).getTime();
- return p;
- }, B.prototype.timezoneOffsetFunction = function() {
- var M = this, S = this.options, w = S.getTimezoneOffset, v = S.moment || I.moment;
- if (!this.useUTC)
- return function(a) {
- return 6e4 * new Date(a.toString()).getTimezoneOffset();
- };
- if (S.timezone) {
- if (v)
- return function(a) {
- return 6e4 * -v.tz(a, S.timezone).utcOffset();
- };
- H(25);
- }
- return this.useUTC && w ? function(a) {
- return 6e4 * w(a.valueOf());
- } : function() {
- return 6e4 * (M.timezoneOffset || 0);
- };
- }, B.prototype.dateFormat = function(M, S, w) {
- if (!Z(S) || isNaN(S))
- return y.defaultOptions.lang && y.defaultOptions.lang.invalidDate || "";
- M = x(M, "%Y-%m-%d %H:%M:%S");
- var v = this, a = new this.Date(S), c = this.get("Hours", a), p = this.get("Day", a), i = this.get("Date", a), h = this.get("Month", a), s = this.get("FullYear", a), t = y.defaultOptions.lang, o = t && t.weekdays, n = t && t.shortWeekdays;
- return a = U({ a: n ? n[p] : o[p].substr(0, 3), A: o[p], d: b(i), e: b(i, 2, " "), w: p, b: t.shortMonths[h], B: t.months[h], m: b(h + 1), o: h + 1, y: s.toString().substr(2, 2), Y: s, H: b(c), k: c, I: b(c % 12 || 12), l: c % 12 || 12, M: b(this.get("Minutes", a)), p: 12 > c ? "AM" : "PM", P: 12 > c ? "am" : "pm", S: b(a.getSeconds()), L: b(Math.floor(S % 1e3), 3) }, y.dateFormats), N(a, function(A, _) {
- for (; M.indexOf("%" + _) !== -1; )
- M = M.replace("%" + _, typeof A == "function" ? A.call(v, S) : A);
- }), w ? M.substr(0, 1).toUpperCase() + M.substr(1) : M;
- }, B.prototype.resolveDTLFormat = function(M) {
- return F(M, !0) ? M : (M = u(M), { main: M[0], from: M[1], to: M[2] });
- }, B.prototype.getTimeTicks = function(M, S, w, v) {
- var a = this, c = [], p = {}, i = new a.Date(S), h = M.unitRange, s = M.count || 1, t;
- if (v = x(v, 1), Z(S)) {
- if (a.set(
- "Milliseconds",
- i,
- h >= f.second ? 0 : s * Math.floor(a.get("Milliseconds", i) / s)
- ), h >= f.second && a.set("Seconds", i, h >= f.minute ? 0 : s * Math.floor(a.get("Seconds", i) / s)), h >= f.minute && a.set("Minutes", i, h >= f.hour ? 0 : s * Math.floor(a.get("Minutes", i) / s)), h >= f.hour && a.set("Hours", i, h >= f.day ? 0 : s * Math.floor(a.get("Hours", i) / s)), h >= f.day && a.set("Date", i, h >= f.month ? 1 : Math.max(1, s * Math.floor(a.get("Date", i) / s))), h >= f.month) {
- a.set("Month", i, h >= f.year ? 0 : s * Math.floor(a.get("Month", i) / s));
- var o = a.get("FullYear", i);
- }
- h >= f.year && a.set(
- "FullYear",
- i,
- o - o % s
- ), h === f.week && (o = a.get("Day", i), a.set("Date", i, a.get("Date", i) - o + v + (o < v ? -7 : 0))), o = a.get("FullYear", i), v = a.get("Month", i);
- var n = a.get("Date", i), A = a.get("Hours", i);
- for (S = i.getTime(), !a.variableTimezone && a.useUTC || !Z(w) || (t = w - S > 4 * f.month || a.getTimezoneOffset(S) !== a.getTimezoneOffset(w)), S = i.getTime(), i = 1; S < w; )
- c.push(S), S = h === f.year ? a.makeTime(o + i * s, 0) : h === f.month ? a.makeTime(o, v + i * s) : !t || h !== f.day && h !== f.week ? t && h === f.hour && 1 < s ? a.makeTime(o, v, n, A + i * s) : S + h * s : a.makeTime(o, v, n + i * s * (h === f.day ? 1 : 7)), i++;
- c.push(S), h <= f.hour && 1e4 > c.length && c.forEach(function(_) {
- _ % 18e5 === 0 && a.dateFormat("%H%M%S%L", _) === "000000000" && (p[_] = "day");
- });
- }
- return c.info = U(M, { higherRanks: p, totalRange: h * s }), c;
- }, B.prototype.getDateFormat = function(M, S, w, v) {
- var a = this.dateFormat("%m-%d %H:%M:%S.%L", S), c = { millisecond: 15, second: 12, minute: 9, hour: 6, day: 3 }, p = "millisecond";
- for (i in f) {
- if (M === f.week && +this.dateFormat("%w", S) === w && a.substr(6) === "00:00:00.000") {
- var i = "week";
- break;
- }
- if (f[i] > M) {
- i = p;
- break;
- }
- if (c[i] && a.substr(c[i]) !== "01-01 00:00:00.000".substr(c[i]))
- break;
- i !== "week" && (p = i);
- }
- if (i)
- var h = this.resolveDTLFormat(v[i]).main;
- return h;
- }, B;
- }(), j;
- }), T(l, "Core/DefaultOptions.js", [l["Core/Chart/ChartDefaults.js"], l["Core/Color/Color.js"], l["Core/Globals.js"], l["Core/Color/Palettes.js"], l["Core/Time.js"], l["Core/Utilities.js"]], function(y, j, I, Z, H, U) {
- j = j.parse;
- var F = U.merge, R = {
- colors: Z.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: I.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: I.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: j("#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 N = new H(F(R.global, R.time));
- return y = { defaultOptions: R, defaultTime: N, getOptions: function() {
- return R;
- }, setOptions: function(b) {
- return F(!0, R, b), (b.time || b.global) && (I.time ? I.time.update(F(
- R.global,
- R.time,
- b.global,
- b.time
- )) : I.time = N), R;
- } }, y;
- }), T(l, "Core/Animation/Fx.js", [l["Core/Color/Color.js"], l["Core/Globals.js"], l["Core/Utilities.js"]], function(y, j, I) {
- var Z = y.parse, H = j.win, U = I.isNumber, F = I.objectEach;
- return function() {
- function R(N, b, x) {
- this.pos = NaN, this.options = b, this.elem = N, this.prop = x;
- }
- return R.prototype.dSetter = function() {
- var N = this.paths, b = N && N[0];
- N = N && N[1];
- var x = this.now || 0, u = [];
- if (x !== 1 && b && N)
- if (b.length === N.length && 1 > x)
- for (var f = 0; f < N.length; f++) {
- for (var E = b[f], O = N[f], B = [], M = 0; M < O.length; M++) {
- var S = E[M], w = O[M];
- U(S) && U(w) && (O[0] !== "A" || M !== 4 && M !== 5) ? B[M] = S + x * (w - S) : B[M] = w;
- }
- u.push(B);
- }
- else
- u = N;
- else
- u = this.toD || [];
- this.elem.attr("d", u, void 0, !0);
- }, R.prototype.update = function() {
- var N = this.elem, b = this.prop, x = this.now, u = this.options.step;
- this[b + "Setter"] ? this[b + "Setter"]() : N.attr ? N.element && N.attr(b, x, null, !0) : N.style[b] = x + this.unit, u && u.call(N, x, this);
- }, R.prototype.run = function(N, b, x) {
- var u = this, f = u.options, E = function(M) {
- return E.stopped ? !1 : u.step(M);
- }, O = H.requestAnimationFrame || function(M) {
- setTimeout(
- M,
- 13
- );
- }, B = function() {
- for (var M = 0; M < R.timers.length; M++)
- R.timers[M]() || R.timers.splice(M--, 1);
- R.timers.length && O(B);
- };
- N !== b || this.elem["forceAnimate:" + this.prop] ? (this.startTime = +/* @__PURE__ */ new Date(), this.start = N, this.end = b, this.unit = x, this.now = this.start, this.pos = 0, E.elem = this.elem, E.prop = this.prop, E() && R.timers.push(E) === 1 && O(B)) : (delete f.curAnim[this.prop], f.complete && Object.keys(f.curAnim).length === 0 && f.complete.call(this.elem));
- }, R.prototype.step = function(N) {
- var b = +/* @__PURE__ */ new Date(), x = this.options, u = this.elem, f = x.complete, E = x.duration, O = x.curAnim;
- if (u.attr && !u.element)
- N = !1;
- else if (N || b >= E + this.startTime) {
- this.now = this.end, this.pos = 1, this.update();
- var B = O[this.prop] = !0;
- F(O, function(M) {
- M !== !0 && (B = !1);
- }), B && f && f.call(u), N = !1;
- } else
- this.pos = x.easing((b - this.startTime) / E), this.now = this.start + (this.end - this.start) * this.pos, this.update(), N = !0;
- return N;
- }, R.prototype.initPath = function(N, b, x) {
- function u(a, c) {
- for (; a.length < v; ) {
- var p = a[0], i = c[v - a.length];
- i && p[0] === "M" && (a[0] = i[0] === "C" ? ["C", p[1], p[2], p[1], p[2], p[1], p[2]] : [
- "L",
- p[1],
- p[2]
- ]), a.unshift(p), B && (p = a.pop(), a.push(a[a.length - 1], p));
- }
- }
- function f(a, c) {
- for (; a.length < v; )
- if (c = a[Math.floor(a.length / M) - 1].slice(), c[0] === "C" && (c[1] = c[5], c[2] = c[6]), B) {
- var p = a[Math.floor(a.length / M)].slice();
- a.splice(a.length / 2, 0, c, p);
- } else
- a.push(c);
- }
- var E = N.startX, O = N.endX;
- x = x.slice();
- var B = N.isArea, M = B ? 2 : 1;
- if (b = b && b.slice(), !b)
- return [x, x];
- if (E && O && O.length) {
- for (N = 0; N < E.length; N++)
- if (E[N] === O[0]) {
- var S = N;
- break;
- } else if (E[0] === O[O.length - E.length + N]) {
- S = N;
- var w = !0;
- break;
- } else if (E[E.length - 1] === O[O.length - E.length + N]) {
- S = E.length - N;
- break;
- }
- typeof S > "u" && (b = []);
- }
- if (b.length && U(S)) {
- var v = x.length + S * M;
- w ? (u(b, x), f(x, b)) : (u(x, b), f(b, x));
- }
- return [b, x];
- }, R.prototype.fillSetter = function() {
- R.prototype.strokeSetter.apply(this, arguments);
- }, R.prototype.strokeSetter = function() {
- this.elem.attr(this.prop, Z(this.start).tweenTo(Z(this.end), this.pos), void 0, !0);
- }, R.timers = [], R;
- }();
- }), T(l, "Core/Animation/AnimationUtilities.js", [l["Core/Animation/Fx.js"], l["Core/Utilities.js"]], function(y, j) {
- function I(f) {
- return N(f) ? b({ duration: 500, defer: 0 }, f) : { duration: f ? 500 : 0, defer: 0 };
- }
- function Z(f, E) {
- for (var O = y.timers.length; O--; )
- y.timers[O].elem !== f || E && E !== y.timers[O].prop || (y.timers[O].stopped = !0);
- }
- var H = j.defined, U = j.getStyle, F = j.isArray, R = j.isNumber, N = j.isObject, b = j.merge, x = j.objectEach, u = j.pick;
- return { animate: function(f, E, O) {
- var B, M = "", S, w;
- if (!N(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 = b(E), x(E, function(a, c) {
- Z(f, c), w = new y(f, O, c), S = void 0, c === "d" && F(E.d) ? (w.paths = w.initPath(f, f.pathArray, E.d), w.toD = E.d, B = 0, S = 1) : f.attr ? B = f.attr(c) : (B = parseFloat(U(f, c)) || 0, c !== "opacity" && (M = "px")), S || (S = a), typeof S == "string" && S.match("px") && (S = S.replace(/px/g, "")), w.run(B, S, M);
- });
- }, animObject: I, getDeferredAnimation: function(f, E, O) {
- var B = I(E), M = 0, S = 0;
- return (O ? [O] : f.series).forEach(function(w) {
- w = I(w.options.animation), M = E && H(E.defer) ? B.defer : Math.max(M, w.duration + w.defer), S = Math.min(B.duration, w.duration);
- }), f.renderer.forExport && (M = 0), { defer: Math.max(0, M - S), duration: Math.min(M, S) };
- }, setAnimation: function(f, E) {
- E.renderer.globalAnimation = u(f, E.options.chart.animation, !0);
- }, stop: Z };
- }), T(l, "Core/Renderer/HTML/AST.js", [l["Core/Globals.js"], l["Core/Utilities.js"]], function(y, j) {
- var I = y.SVG_NS, Z = j.attr, H = j.createElement, U = j.error, F = j.isFunction, R = j.isString, N = j.objectEach, b = j.splat, x = (j = y.win.trustedTypes) && F(j.createPolicy) && j.createPolicy("highcharts", { createHTML: function(E) {
- return E;
- } }), u = x ? x.createHTML("") : "";
- try {
- var f = !!new DOMParser().parseFromString(u, "text/html");
- } catch {
- f = !1;
- }
- return F = function() {
- function E(O) {
- this.nodes = typeof O == "string" ? this.parseMarkup(O) : O;
- }
- return E.filterUserAttributes = function(O) {
- return N(O, function(B, M) {
- var S = !0;
- E.allowedAttributes.indexOf(M) === -1 && (S = !1), ["background", "dynsrc", "href", "lowsrc", "src"].indexOf(M) !== -1 && (S = R(B) && E.allowedReferences.some(function(w) {
- return B.indexOf(w) === 0;
- })), S || (U("Highcharts warning: Invalid attribute '" + M + "' in config"), delete O[M]);
- }), O;
- }, E.setElementHTML = function(O, B) {
- O.innerHTML = E.emptyHTML, B && new E(B).addToDOM(O);
- }, E.prototype.addToDOM = function(O) {
- function B(M, S) {
- var w;
- return b(M).forEach(function(v) {
- var a = v.tagName, c = v.textContent ? y.doc.createTextNode(v.textContent) : void 0;
- if (a)
- if (a === "#text")
- var p = c;
- else if (E.allowedTags.indexOf(a) !== -1) {
- a = y.doc.createElementNS(a === "svg" ? I : S.namespaceURI || I, a);
- var i = v.attributes || {};
- N(v, function(h, s) {
- s !== "tagName" && s !== "attributes" && s !== "children" && s !== "textContent" && (i[s] = h);
- }), Z(a, E.filterUserAttributes(i)), c && a.appendChild(c), B(v.children || [], a), p = a;
- } else
- U("Highcharts warning: Invalid tagName " + a + " in config");
- p && S.appendChild(p), w = p;
- }), w;
- }
- return B(this.nodes, O);
- }, E.prototype.parseMarkup = function(O) {
- var B = [];
- if (O = O.trim(), f)
- O = new DOMParser().parseFromString(x ? x.createHTML(O) : O, "text/html");
- else {
- var M = H("div");
- M.innerHTML = O, O = { body: M };
- }
- var S = function(w, v) {
- var a = w.nodeName.toLowerCase(), c = { tagName: a };
- if (a === "#text" && (c.textContent = w.textContent || ""), a = w.attributes) {
- var p = {};
- [].forEach.call(a, function(h) {
- p[h.name] = h.value;
- }), c.attributes = p;
- }
- if (w.childNodes.length) {
- var i = [];
- [].forEach.call(w.childNodes, function(h) {
- S(h, i);
- }), i.length && (c.children = i);
- }
- v.push(c);
- };
- return [].forEach.call(O.body.childNodes, function(w) {
- return S(w, B);
- }), B;
- }, E.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(" "), E.allowedReferences = "https:// http:// mailto: / ../ ./ #".split(" "), E.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(" "), E.emptyHTML = u, E;
- }(), F;
- }), T(
- l,
- "Core/FormatUtilities.js",
- [l["Core/DefaultOptions.js"], l["Core/Utilities.js"]],
- function(y, j) {
- function I(b, x, u, f) {
- b = +b || 0, x = +x;
- var E = Z.lang, O = (b.toString().split(".")[1] || "").split("e")[0].length, B = b.toString().split("e"), M = x;
- if (x === -1)
- x = Math.min(O, 20);
- else if (!F(x))
- x = 2;
- else if (x && B[1] && 0 > B[1]) {
- var S = x + +B[1];
- 0 <= S ? (B[0] = (+B[0]).toExponential(S).split("e")[0], x = S) : (B[0] = B[0].split(".")[0] || 0, b = 20 > x ? (B[0] * Math.pow(10, B[1])).toFixed(x) : 0, B[1] = 0);
- }
- S = (Math.abs(B[1] ? B[0] : b) + Math.pow(10, -Math.max(x, O) - 1)).toFixed(x), O = String(N(S));
- var w = 3 < O.length ? O.length % 3 : 0;
- return u = R(u, E.decimalPoint), f = R(f, E.thousandsSep), b = (0 > b ? "-" : "") + (w ? O.substr(0, w) + f : ""), b = 0 > +B[1] && !M ? "0" : b + O.substr(w).replace(/(\d{3})(?=\d)/g, "$1" + f), x && (b += u + S.slice(-x)), B[1] && +b != 0 && (b += "e" + B[1]), b;
- }
- var Z = y.defaultOptions, H = y.defaultTime, U = j.getNestedProperty, F = j.isNumber, R = j.pick, N = j.pInt;
- return { dateFormat: function(b, x, u) {
- return H.dateFormat(b, x, u);
- }, format: function(b, x, u) {
- var f = "{", E = !1, O = /f$/, B = /\.([0-9])/, M = Z.lang, S = u && u.time || H;
- u = u && u.numberFormatter || I;
- for (var w = []; b; ) {
- var v = b.indexOf(f);
- if (v === -1)
- break;
- var a = b.slice(0, v);
- if (E) {
- if (a = a.split(":"), f = U(a.shift() || "", x), a.length && typeof f == "number")
- if (a = a.join(":"), O.test(a)) {
- var c = parseInt((a.match(B) || ["", "-1"])[1], 10);
- f !== null && (f = u(f, c, M.decimalPoint, -1 < a.indexOf(",") ? M.thousandsSep : ""));
- } else
- f = S.dateFormat(a, f);
- w.push(f);
- } else
- w.push(a);
- b = b.slice(v + 1), f = (E = !E) ? "}" : "{";
- }
- return w.push(b), w.join("");
- }, numberFormat: I };
- }
- ), T(l, "Core/Renderer/RendererUtilities.js", [l["Core/Utilities.js"]], function(y) {
- var j = y.clamp, I = y.pick, Z = y.stableSort, H;
- return function(U) {
- function F(R, N, b) {
- var x = R, u = x.reducedLen || N, f = function(w, v) {
- return (v.rank || 0) - (w.rank || 0);
- }, E = function(w, v) {
- return w.target - v.target;
- }, O, B = !0, M = [], S = 0;
- for (O = R.length; O--; )
- S += R[O].size;
- if (S > u) {
- for (Z(R, f), S = O = 0; S <= u; )
- S += R[O].size, O++;
- M = R.splice(O - 1, R.length);
- }
- for (Z(R, E), R = R.map(function(w) {
- return { size: w.size, targets: [w.target], align: I(w.align, 0.5) };
- }); B; ) {
- for (O = R.length; O--; )
- u = R[O], f = (Math.min.apply(0, u.targets) + Math.max.apply(0, u.targets)) / 2, u.pos = j(
- f - u.size * u.align,
- 0,
- N - u.size
- );
- for (O = R.length, B = !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 > N && (R[O - 1].pos = N - R[O - 1].size), R.splice(O, 1), B = !0);
- }
- return x.push.apply(x, M), O = 0, R.some(function(w) {
- var v = 0;
- return (w.targets || []).some(function() {
- return x[O].pos = w.pos + v, typeof b < "u" && Math.abs(x[O].pos - x[O].target) > b ? (x.slice(0, O + 1).forEach(function(a) {
- return delete a.pos;
- }), x.reducedLen = (x.reducedLen || N) - 0.1 * N, x.reducedLen > 0.1 * N && F(x, N, b), !0) : (v += x[O].size, O++, !1);
- });
- }), Z(x, E), x;
- }
- U.distribute = F;
- }(H || (H = {})), H;
- }), T(l, "Core/Renderer/SVG/SVGElement.js", [l["Core/Animation/AnimationUtilities.js"], l["Core/Renderer/HTML/AST.js"], l["Core/Color/Color.js"], l["Core/Globals.js"], l["Core/Utilities.js"]], function(y, j, I, Z, H) {
- var U = y.animate, F = y.animObject, R = y.stop, N = Z.deg2rad, b = Z.doc, x = Z.noop, u = Z.svg, f = Z.SVG_NS, E = Z.win, O = H.addEvent, B = H.attr, M = H.createElement, S = H.css, w = H.defined, v = H.erase, a = H.extend, c = H.fireEvent, p = H.isArray, i = H.isFunction, h = H.isNumber, s = H.isString, t = H.merge, o = H.objectEach, n = H.pick, A = H.pInt, _ = H.syncTimeout, D = H.uniqueKey;
- return y = function() {
- function W() {
- this.element = void 0, this.onEvents = {}, this.opacity = 1, this.renderer = void 0, this.SVG_NS = f, this.symbolCustomAttribs = "x y width height r start end innerR anchorX anchorY rounded".split(" ");
- }
- return W.prototype._defaultGetter = function(P) {
- return P = n(this[P + "Value"], this[P], this.element ? this.element.getAttribute(P) : null, 0), /^[\-0-9\.]+$/.test(P) && (P = parseFloat(P)), P;
- }, W.prototype._defaultSetter = function(P, X, g) {
- g.setAttribute(X, P);
- }, W.prototype.add = function(P) {
- var X = this.renderer, g = this.element;
- if (P && (this.parentGroup = P), this.parentInverted = P && P.inverted, typeof this.textStr < "u" && this.element.nodeName === "text" && X.buildText(this), this.added = !0, !P || P.handleZ || this.zIndex)
- var m = this.zIndexSetter();
- return m || (P ? P.element : X.box).appendChild(g), this.onAdd && this.onAdd(), this;
- }, W.prototype.addClass = function(P, X) {
- var g = X ? "" : this.attr("class") || "";
- return P = (P || "").split(/ /g).reduce(function(m, L) {
- return g.indexOf(L) === -1 && m.push(L), m;
- }, g ? [g] : []).join(" "), P !== g && this.attr("class", P), this;
- }, W.prototype.afterSetters = function() {
- this.doTransform && (this.updateTransform(), this.doTransform = !1);
- }, W.prototype.align = function(P, X, g) {
- var m = {}, L = this.renderer, Y = L.alignedObjects, V, Q, k;
- P ? (this.alignOptions = P, this.alignByTranslate = X, (!g || s(g)) && (this.alignTo = V = g || "renderer", v(Y, this), Y.push(this), g = void 0)) : (P = this.alignOptions, X = this.alignByTranslate, V = this.alignTo), g = n(g, L[V], V === "scrollablePlotBox" ? L.plotBox : void 0, L), V = P.align;
- var G = P.verticalAlign;
- return L = (g.x || 0) + (P.x || 0), Y = (g.y || 0) + (P.y || 0), V === "right" ? Q = 1 : V === "center" && (Q = 2), Q && (L += (g.width - (P.width || 0)) / Q), m[X ? "translateX" : "x"] = Math.round(L), G === "bottom" ? k = 1 : G === "middle" && (k = 2), k && (Y += (g.height - (P.height || 0)) / k), m[X ? "translateY" : "y"] = Math.round(Y), this[this.placed ? "animate" : "attr"](m), this.placed = !0, this.alignAttr = m, this;
- }, W.prototype.alignSetter = function(P) {
- var X = { left: "start", center: "middle", right: "end" };
- X[P] && (this.alignValue = P, this.element.setAttribute(
- "text-anchor",
- X[P]
- ));
- }, W.prototype.animate = function(P, X, g) {
- var m = this, L = F(n(X, this.renderer.globalAnimation, !0));
- return X = L.defer, n(b.hidden, b.msHidden, b.webkitHidden, !1) && (L.duration = 0), L.duration !== 0 ? (g && (L.complete = g), _(function() {
- m.element && U(m, P, L);
- }, X)) : (this.attr(P, void 0, g), o(P, function(Y, V) {
- L.step && L.step.call(this, Y, { prop: V, pos: 1, elem: this });
- }, this)), this;
- }, W.prototype.applyTextOutline = function(P) {
- var X = this.element;
- P.indexOf("contrast") !== -1 && (P = P.replace(/contrast/g, this.renderer.getContrast(X.style.fill)));
- var g = P.split(" ");
- if (P = g[g.length - 1], (g = g[0]) && g !== "none" && Z.svg) {
- this.fakeTS = !0, this.ySetter = this.xSetter, g = g.replace(/(^[\d\.]+)(.*?)$/g, function(Y, V, Q) {
- return 2 * Number(V) + Q;
- }), this.removeTextOutline();
- var m = b.createElementNS(f, "tspan");
- B(m, { class: "highcharts-text-outline", fill: P, stroke: P, "stroke-width": g, "stroke-linejoin": "round" }), [].forEach.call(X.childNodes, function(Y) {
- var V = Y.cloneNode(!0);
- V.removeAttribute && ["fill", "stroke", "stroke-width", "stroke"].forEach(function(Q) {
- return V.removeAttribute(Q);
- }), m.appendChild(V);
- });
- var L = b.createElementNS(f, "tspan");
- L.textContent = "", ["x", "y"].forEach(function(Y) {
- var V = X.getAttribute(Y);
- V && L.setAttribute(Y, V);
- }), m.appendChild(L), X.insertBefore(m, X.firstChild);
- }
- }, W.prototype.attr = function(P, X, g, m) {
- var L = this.element, Y = this.symbolCustomAttribs, V, Q = this, k, G;
- if (typeof P == "string" && typeof X < "u") {
- var z = P;
- P = {}, P[z] = X;
- }
- return typeof P == "string" ? Q = (this[P + "Getter"] || this._defaultGetter).call(this, P, L) : (o(P, function($, q) {
- k = !1, m || R(this, q), this.symbolName && Y.indexOf(q) !== -1 && (V || (this.symbolAttr(P), V = !0), k = !0), !this.rotation || q !== "x" && q !== "y" || (this.doTransform = !0), k || (G = this[q + "Setter"] || this._defaultSetter, G.call(this, $, q, L), !this.styledMode && this.shadows && /^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(q) && this.updateShadows(q, $, G));
- }, this), this.afterSetters()), g && g.call(this), Q;
- }, W.prototype.clip = function(P) {
- return this.attr("clip-path", P ? "url(" + this.renderer.url + "#" + P.id + ")" : "none");
- }, W.prototype.crisp = function(P, X) {
- X = X || P.strokeWidth || 0;
- var g = Math.round(X) % 2 / 2;
- return P.x = Math.floor(P.x || this.x || 0) + g, P.y = Math.floor(P.y || this.y || 0) + g, P.width = Math.floor((P.width || this.width || 0) - 2 * g), P.height = Math.floor((P.height || this.height || 0) - 2 * g), w(P.strokeWidth) && (P.strokeWidth = X), P;
- }, W.prototype.complexColor = function(P, X, g) {
- var m = this.renderer, L, Y, V, Q, k, G, z, $, q, it, et = [], nt;
- c(this.renderer, "complexColor", { args: arguments }, function() {
- if (P.radialGradient ? Y = "radialGradient" : P.linearGradient && (Y = "linearGradient"), Y) {
- if (V = P[Y], k = m.gradients, G = P.stops, q = g.radialReference, p(V) && (P[Y] = V = { x1: V[0], y1: V[1], x2: V[2], y2: V[3], gradientUnits: "userSpaceOnUse" }), Y === "radialGradient" && q && !w(V.gradientUnits) && (Q = V, V = t(V, m.getRadialAttr(q, Q), { gradientUnits: "userSpaceOnUse" })), o(V, function(ct, gt) {
- gt !== "id" && et.push(gt, ct);
- }), o(G, function(ct) {
- et.push(ct);
- }), et = et.join(","), k[et])
- it = k[et].attr("id");
- else {
- V.id = it = D();
- var rt = k[et] = m.createElement(Y).attr(V).add(m.defs);
- rt.radAttr = Q, rt.stops = [], G.forEach(function(ct) {
- ct[1].indexOf("rgba") === 0 ? (L = I.parse(ct[1]), z = L.get("rgb"), $ = L.get("a")) : (z = ct[1], $ = 1), ct = m.createElement("stop").attr({
- offset: ct[0],
- "stop-color": z,
- "stop-opacity": $
- }).add(rt), rt.stops.push(ct);
- });
- }
- nt = "url(" + m.url + "#" + it + ")", g.setAttribute(X, nt), g.gradient = et, P.toString = function() {
- return nt;
- };
- }
- });
- }, W.prototype.css = function(P) {
- var X = this.styles, g = {}, m = this.element, L = ["textOutline", "textOverflow", "width"], Y = "", V = !X;
- if (P && P.color && (P.fill = P.color), X && o(P, function(G, z) {
- X && X[z] !== G && (g[z] = G, V = !0);
- }), V) {
- if (X && (P = a(X, g)), P) {
- if (P.width === null || P.width === "auto")
- delete this.textWidth;
- else if (m.nodeName.toLowerCase() === "text" && P.width)
- var Q = this.textWidth = A(P.width);
- }
- if (this.styles = P, Q && !u && this.renderer.forExport && delete P.width, m.namespaceURI === this.SVG_NS) {
- var k = function(G, z) {
- return "-" + z.toLowerCase();
- };
- o(P, function(G, z) {
- L.indexOf(z) === -1 && (Y += z.replace(/([A-Z])/g, k) + ":" + G + ";");
- }), Y && B(m, "style", Y);
- } else
- S(m, P);
- this.added && (this.element.nodeName === "text" && this.renderer.buildText(this), P && P.textOutline && this.applyTextOutline(P.textOutline));
- }
- return this;
- }, W.prototype.dashstyleSetter = function(P) {
- var X = this["stroke-width"];
- if (X === "inherit" && (X = 1), P = P && P.toLowerCase()) {
- var g = P.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 (P = g.length; P--; )
- g[P] = "" + A(g[P]) * n(X, NaN);
- P = g.join(",").replace(/NaN/g, "none"), this.element.setAttribute("stroke-dasharray", P);
- }
- }, W.prototype.destroy = function() {
- var P = this, X = P.element || {}, g = P.renderer, m = X.ownerSVGElement, L = g.isSVG && X.nodeName === "SPAN" && P.parentGroup || void 0;
- if (X.onclick = X.onmouseout = X.onmouseover = X.onmousemove = X.point = null, R(P), P.clipPath && m) {
- var Y = P.clipPath;
- [].forEach.call(m.querySelectorAll("[clip-path],[CLIP-PATH]"), function(V) {
- -1 < V.getAttribute("clip-path").indexOf(Y.element.id) && V.removeAttribute("clip-path");
- }), P.clipPath = Y.destroy();
- }
- if (P.stops) {
- for (m = 0; m < P.stops.length; m++)
- P.stops[m].destroy();
- P.stops.length = 0, P.stops = void 0;
- }
- for (P.safeRemoveChild(X), g.styledMode || P.destroyShadows(); L && L.div && L.div.childNodes.length === 0; )
- X = L.parentGroup, P.safeRemoveChild(L.div), delete L.div, L = X;
- P.alignTo && v(g.alignedObjects, P), o(P, function(V, Q) {
- P[Q] && P[Q].parentGroup === P && P[Q].destroy && P[Q].destroy(), delete P[Q];
- });
- }, W.prototype.destroyShadows = function() {
- (this.shadows || []).forEach(function(P) {
- this.safeRemoveChild(P);
- }, this), this.shadows = void 0;
- }, W.prototype.destroyTextPath = function(P, X) {
- var g = P.getElementsByTagName("text")[0];
- if (g) {
- if (g.removeAttribute("dx"), g.removeAttribute("dy"), X.element.setAttribute("id", ""), this.textPathWrapper && g.getElementsByTagName("textPath").length) {
- for (P = this.textPathWrapper.element.childNodes; P.length; )
- g.appendChild(P[0]);
- g.removeChild(this.textPathWrapper.element);
- }
- } else
- (P.getAttribute("dx") || P.getAttribute("dy")) && (P.removeAttribute("dx"), P.removeAttribute("dy"));
- this.textPathWrapper && (this.textPathWrapper = this.textPathWrapper.destroy());
- }, W.prototype.dSetter = function(P, X, g) {
- p(P) && (typeof P[0] == "string" && (P = this.renderer.pathToSegments(P)), this.pathArray = P, P = P.reduce(function(m, L, Y) {
- return L && L.join ? (Y ? m + " " : "") + L.join(" ") : (L || "").toString();
- }, "")), /(NaN| {2}|^$)/.test(P) && (P = "M 0 0"), this[X] !== P && (g.setAttribute(X, P), this[X] = P);
- }, W.prototype.fadeOut = function(P) {
- var X = this;
- X.animate({ opacity: 0 }, { duration: n(P, 150), complete: function() {
- X.attr({ y: -9999 }).hide();
- } });
- }, W.prototype.fillSetter = function(P, X, g) {
- typeof P == "string" ? g.setAttribute(X, P) : P && this.complexColor(P, X, g);
- }, W.prototype.getBBox = function(P, X) {
- var g = this.renderer, m = this.element, L = this.styles, Y = this.textStr, V = g.cache, Q = g.cacheKeys, k = m.namespaceURI === this.SVG_NS;
- X = n(X, this.rotation, 0);
- var G = g.styledMode ? m && W.prototype.getStyle.call(m, "font-size") : L && L.fontSize, z;
- if (w(Y)) {
- var $ = Y.toString();
- $.indexOf("<") === -1 && ($ = $.replace(/[0-9]/g, "0")), $ += ["", X, G, this.textWidth, L && L.textOverflow, L && L.fontWeight].join();
- }
- if ($ && !P && (z = V[$]), !z) {
- if (k || g.forExport) {
- try {
- var q = this.fakeTS && function(it) {
- var et = m.querySelector(".highcharts-text-outline");
- et && S(et, { display: it });
- };
- i(q) && q("none"), z = m.getBBox ? a({}, m.getBBox()) : { width: m.offsetWidth, height: m.offsetHeight }, i(q) && q("");
- } catch {
- }
- (!z || 0 > z.width) && (z = {
- width: 0,
- height: 0
- });
- } else
- z = this.htmlGetBBox();
- if (g.isSVG && (P = z.width, g = z.height, k && (z.height = g = { "11px,17": 14, "13px,20": 16 }[(G || "") + "," + Math.round(g)] || g), X && (k = X * N, z.width = Math.abs(g * Math.sin(k)) + Math.abs(P * Math.cos(k)), z.height = Math.abs(g * Math.cos(k)) + Math.abs(P * Math.sin(k)))), $ && (Y === "" || 0 < z.height)) {
- for (; 250 < Q.length; )
- delete V[Q.shift()];
- V[$] || Q.push($), V[$] = z;
- }
- }
- return z;
- }, W.prototype.getStyle = function(P) {
- return E.getComputedStyle(this.element || this, "").getPropertyValue(P);
- }, W.prototype.hasClass = function(P) {
- return ("" + this.attr("class")).split(" ").indexOf(P) !== -1;
- }, W.prototype.hide = function(P) {
- return P ? 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(P, X) {
- this.element = X === "span" ? M(X) : b.createElementNS(this.SVG_NS, X), this.renderer = P, c(this, "afterInit");
- }, W.prototype.invert = function(P) {
- return this.inverted = P, this.updateTransform(), this;
- }, W.prototype.on = function(P, X) {
- var g = this.onEvents;
- return g[P] && g[P](), g[P] = O(
- this.element,
- P,
- X
- ), this;
- }, W.prototype.opacitySetter = function(P, X, g) {
- this.opacity = P = Number(Number(P).toFixed(3)), g.setAttribute(X, P);
- }, W.prototype.removeClass = function(P) {
- return this.attr("class", ("" + this.attr("class")).replace(s(P) ? new RegExp("(^| )" + P + "( |$)") : P, " ").replace(/ +/g, " ").trim());
- }, W.prototype.removeTextOutline = function() {
- var P = this.element.querySelector("tspan.highcharts-text-outline");
- P && this.safeRemoveChild(P);
- }, W.prototype.safeRemoveChild = function(P) {
- var X = P.parentNode;
- X && X.removeChild(P);
- }, W.prototype.setRadialReference = function(P) {
- var X = this.element.gradient && this.renderer.gradients[this.element.gradient];
- return this.element.radialReference = P, X && X.radAttr && X.animate(this.renderer.getRadialAttr(P, X.radAttr)), this;
- }, W.prototype.setTextPath = function(P, X) {
- var g = this.element, m = this.text ? this.text.element : g, L = { textAnchor: "text-anchor" }, Y = !1, V = this.textPathWrapper, Q = !V;
- X = t(!0, { enabled: !0, attributes: { dy: -5, startOffset: "50%", textAnchor: "middle" } }, X);
- var k = j.filterUserAttributes(X.attributes);
- if (P && X && X.enabled) {
- V && V.element.parentNode === null ? (Q = !0, V = V.destroy()) : V && this.removeTextOutline.call(V.parentGroup), this.options && this.options.padding && (k.dx = -this.options.padding), V || (this.textPathWrapper = V = this.renderer.createElement("textPath"), Y = !0);
- var G = V.element;
- if ((X = P.element.getAttribute("id")) || P.element.setAttribute("id", X = D()), Q)
- for (m.setAttribute("y", 0), h(k.dx) && m.setAttribute("x", -k.dx), P = [].slice.call(m.childNodes), Q = 0; Q < P.length; Q++) {
- var z = P[Q];
- z.nodeType !== E.Node.TEXT_NODE && z.nodeName !== "tspan" || G.appendChild(z);
- }
- Y && V && V.add({ element: m }), G.setAttributeNS("http://www.w3.org/1999/xlink", "href", this.renderer.url + "#" + X), w(k.dy) && (G.parentNode.setAttribute("dy", k.dy), delete k.dy), w(k.dx) && (G.parentNode.setAttribute("dx", k.dx), delete k.dx), o(k, function($, q) {
- G.setAttribute(L[q] || q, $);
- }), g.removeAttribute("transform"), this.removeTextOutline.call(V), this.text && !this.renderer.styledMode && this.attr({ fill: "none", "stroke-width": 0 }), this.applyTextOutline = this.updateTransform = x;
- } else
- V && (delete this.updateTransform, delete this.applyTextOutline, this.destroyTextPath(g, P), this.updateTransform(), this.options && this.options.rotation && this.applyTextOutline(this.options.style.textOutline));
- return this;
- }, W.prototype.shadow = function(P, X, g) {
- var m = [], L = this.element, Y = this.oldShadowOptions, V = { color: "#000000", offsetX: this.parentInverted ? -1 : 1, offsetY: this.parentInverted ? -1 : 1, opacity: 0.15, width: 3 }, Q = !1, k;
- if (P === !0 ? k = V : typeof P == "object" && (k = a(V, P)), k && (k && Y && o(k, function(it, et) {
- it !== Y[et] && (Q = !0);
- }), Q && this.destroyShadows(), this.oldShadowOptions = k), !k)
- this.destroyShadows();
- else if (!this.shadows) {
- var G = k.opacity / k.width, z = this.parentInverted ? "translate(" + k.offsetY + ", " + k.offsetX + ")" : "translate(" + k.offsetX + ", " + k.offsetY + ")";
- for (V = 1; V <= k.width; V++) {
- var $ = L.cloneNode(!1), q = 2 * k.width + 1 - 2 * V;
- B($, { stroke: P.color || "#000000", "stroke-opacity": G * V, "stroke-width": q, transform: z, fill: "none" }), $.setAttribute("class", ($.getAttribute("class") || "") + " highcharts-shadow"), g && (B($, "height", Math.max(B($, "height") - q, 0)), $.cutHeight = q), X ? X.element.appendChild($) : L.parentNode && L.parentNode.insertBefore($, L), m.push($);
- }
- this.shadows = m;
- }
- return this;
- }, W.prototype.show = function(P) {
- return this.attr({ visibility: P ? "inherit" : "visible" });
- }, W.prototype.strokeSetter = function(P, X, g) {
- this[X] = P, 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" && P === 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 P = this.getStyle("stroke-width"), X = 0;
- if (P.indexOf("px") === P.length - 2)
- X = A(P);
- else if (P !== "") {
- var g = b.createElementNS(f, "rect");
- B(g, { width: P, "stroke-width": 0 }), this.element.parentNode.appendChild(g), X = g.getBBox().width, g.parentNode.removeChild(g);
- }
- return X;
- }, W.prototype.symbolAttr = function(P) {
- var X = this;
- "x y r start end width height innerR anchorX anchorY clockwise".split(" ").forEach(function(g) {
- X[g] = n(P[g], X[g]);
- }), X.attr({ d: X.renderer.symbols[X.symbolName](X.x, X.y, X.width, X.height, X) });
- }, W.prototype.textSetter = function(P) {
- P !== this.textStr && (delete this.textPxLength, this.textStr = P, this.added && this.renderer.buildText(this));
- }, W.prototype.titleSetter = function(P) {
- var X = this.element, g = X.getElementsByTagName("title")[0] || b.createElementNS(this.SVG_NS, "title");
- X.insertBefore ? X.insertBefore(g, X.firstChild) : X.appendChild(g), g.textContent = String(n(P, "")).replace(/<[^>]*>/g, "").replace(/</g, "<").replace(
- />/g,
- ">"
- );
- }, W.prototype.toFront = function() {
- var P = this.element;
- return P.parentNode.appendChild(P), this;
- }, W.prototype.translate = function(P, X) {
- return this.attr({ translateX: P, translateY: X });
- }, W.prototype.updateShadows = function(P, X, g) {
- var m = this.shadows;
- if (m)
- for (var L = m.length; L--; )
- g.call(m[L], P === "height" ? Math.max(X - (m[L].cutHeight || 0), 0) : P === "d" ? this.d : X, P, m[L]);
- }, W.prototype.updateTransform = function() {
- var P = this.scaleX, X = this.scaleY, g = this.inverted, m = this.rotation, L = this.matrix, Y = this.element, V = this.translateX || 0, Q = this.translateY || 0;
- g && (V += this.width, Q += this.height), V = ["translate(" + V + "," + Q + ")"], w(L) && V.push("matrix(" + L.join(",") + ")"), g ? V.push("rotate(90) scale(-1,1)") : m && V.push("rotate(" + m + " " + n(this.rotationOriginX, Y.getAttribute("x"), 0) + " " + n(this.rotationOriginY, Y.getAttribute("y") || 0) + ")"), (w(P) || w(X)) && V.push("scale(" + n(P, 1) + " " + n(X, 1) + ")"), V.length && Y.setAttribute("transform", V.join(" "));
- }, W.prototype.visibilitySetter = function(P, X, g) {
- P === "inherit" ? g.removeAttribute(X) : this[X] !== P && g.setAttribute(
- X,
- P
- ), this[X] = P;
- }, W.prototype.xGetter = function(P) {
- return this.element.nodeName === "circle" && (P === "x" ? P = "cx" : P === "y" && (P = "cy")), this._defaultGetter(P);
- }, W.prototype.zIndexSetter = function(P, X) {
- var g = this.renderer, m = this.parentGroup, L = (m || g).element || g.box, Y = this.element;
- g = L === g.box;
- var V = !1, Q = this.added, k;
- if (w(P) ? (Y.setAttribute("data-z-index", P), P = +P, this[X] === P && (Q = !1)) : w(this[X]) && Y.removeAttribute("data-z-index"), this[X] = P, Q) {
- for ((P = this.zIndex) && m && (m.handleZ = !0), X = L.childNodes, k = X.length - 1; 0 <= k && !V; k--) {
- m = X[k], Q = m.getAttribute("data-z-index");
- var G = !w(Q);
- m !== Y && (0 > P && G && !g && !k ? (L.insertBefore(Y, X[k]), V = !0) : (A(Q) <= P || G && (!w(P) || 0 <= P)) && (L.insertBefore(Y, X[k + 1] || null), V = !0));
- }
- V || (L.insertBefore(Y, X[g ? 3 : 0] || null), V = !0);
- }
- return V;
- }, 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, P) {
- this[P] = W, this.doTransform = !0;
- }, y;
- }), T(l, "Core/Renderer/RendererRegistry.js", [l["Core/Globals.js"]], function(y) {
- var j;
- return function(I) {
- I.rendererTypes = {};
- var Z;
- I.getRendererType = function(H) {
- return H === void 0 && (H = Z), I.rendererTypes[H] || I.rendererTypes[Z];
- }, I.registerRendererType = function(H, U, F) {
- I.rendererTypes[H] = U, (!Z || F) && (Z = H, y.Renderer = U);
- };
- }(j || (j = {})), j;
- }), T(
- l,
- "Core/Renderer/SVG/SVGLabel.js",
- [l["Core/Renderer/SVG/SVGElement.js"], l["Core/Utilities.js"]],
- function(y, j) {
- var I = this && this.__extends || function() {
- var b = function(x, u) {
- return b = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(f, E) {
- f.__proto__ = E;
- } || function(f, E) {
- for (var O in E)
- E.hasOwnProperty(O) && (f[O] = E[O]);
- }, b(x, u);
- };
- return function(x, u) {
- function f() {
- this.constructor = x;
- }
- b(x, u), x.prototype = u === null ? Object.create(u) : (f.prototype = u.prototype, new f());
- };
- }(), Z = j.defined, H = j.extend, U = j.isNumber, F = j.merge, R = j.pick, N = j.removeEvent;
- return function(b) {
- function x(u, f, E, O, B, M, S, w, v, a) {
- var c = b.call(this) || this;
- c.paddingLeftSetter = c.paddingSetter, c.paddingRightSetter = c.paddingSetter, c.init(u, "g"), c.textStr = f, c.x = E, c.y = O, c.anchorX = M, c.anchorY = S, c.baseline = v, c.className = a, c.addClass(a === "button" ? "highcharts-no-tooltip" : "highcharts-label"), a && c.addClass("highcharts-" + a), c.text = u.text(void 0, 0, 0, w).attr({ zIndex: 1 });
- var p;
- return typeof B == "string" && ((p = /^url\((.*?)\)$/.test(B)) || c.renderer.symbols[B]) && (c.symbolKey = B), c.bBox = x.emptyBBox, c.padding = 3, c.baselineOffset = 0, c.needsBox = u.styledMode || p, c.deferredAttr = {}, c.alignFactor = 0, c;
- }
- return I(x, b), x.prototype.alignSetter = function(u) {
- u = { left: 0, center: 0.5, right: 1 }[u], u !== this.alignFactor && (this.alignFactor = u, this.bBox && U(this.xSetting) && this.attr({ x: this.xSetting }));
- }, x.prototype.anchorXSetter = function(u, f) {
- this.anchorX = u, this.boxAttr(f, Math.round(u) - this.getCrispAdjust() - this.xSetting);
- }, x.prototype.anchorYSetter = function(u, f) {
- this.anchorY = u, this.boxAttr(f, u - this.ySetting);
- }, x.prototype.boxAttr = function(u, f) {
- this.box ? this.box.attr(u, f) : this.deferredAttr[u] = f;
- }, x.prototype.css = function(u) {
- if (u) {
- var f = {};
- u = F(u), x.textProps.forEach(function(O) {
- typeof u[O] < "u" && (f[O] = u[O], delete u[O]);
- }), this.text.css(f);
- var E = "width" in f;
- "fontSize" in f || "fontWeight" in f ? this.updateTextPadding() : E && this.updateBoxSize();
- }
- return y.prototype.css.call(this, u);
- }, x.prototype.destroy = function() {
- N(this.element, "mouseenter"), N(this.element, "mouseleave"), this.text && this.text.destroy(), this.box && (this.box = this.box.destroy()), y.prototype.destroy.call(this);
- }, x.prototype.fillSetter = function(u, f) {
- u && (this.needsBox = !0), this.fill = u, this.boxAttr(f, u);
- }, x.prototype.getBBox = function() {
- this.textStr && this.bBox.width === 0 && this.bBox.height === 0 && this.updateBoxSize();
- var u = this.padding, f = R(this.paddingLeft, u);
- return { width: this.width, height: this.height, x: this.bBox.x - f, y: this.bBox.y - u };
- }, 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(u) {
- this.heightSetting = u;
- }, x.prototype.onAdd = function() {
- var u = this.textStr;
- this.text.add(this), this.attr({ text: Z(u) ? u : "", x: this.x, y: this.y }), this.box && Z(this.anchorX) && this.attr({ anchorX: this.anchorX, anchorY: this.anchorY });
- }, x.prototype.paddingSetter = function(u, f) {
- U(u) ? u !== this[f] && (this[f] = u, this.updateTextPadding()) : this[f] = void 0;
- }, x.prototype.rSetter = function(u, f) {
- this.boxAttr(f, u);
- }, x.prototype.shadow = function(u) {
- return u && !this.renderer.styledMode && (this.updateBoxSize(), this.box && this.box.shadow(u)), this;
- }, x.prototype.strokeSetter = function(u, f) {
- this.stroke = u, this.boxAttr(f, u);
- }, x.prototype["stroke-widthSetter"] = function(u, f) {
- u && (this.needsBox = !0), this["stroke-width"] = u, this.boxAttr(f, u);
- }, x.prototype["text-alignSetter"] = function(u) {
- this.textAlign = u;
- }, x.prototype.textSetter = function(u) {
- typeof u < "u" && this.text.attr({ text: u }), this.updateTextPadding();
- }, x.prototype.updateBoxSize = function() {
- var u = this.text.element.style, f = {}, E = this.padding, O = this.bBox = U(this.widthSetting) && U(this.heightSetting) && !this.textAlign || !Z(this.text.textStr) ? x.emptyBBox : this.text.getBBox();
- this.width = this.getPaddedWidth(), this.height = (this.heightSetting || O.height || 0) + 2 * E, u = this.renderer.fontMetrics(u && u.fontSize, this.text), this.baselineOffset = E + Math.min((this.text.firstLineMetrics || u).b, O.height || 1 / 0), this.heightSetting && (this.baselineOffset += (this.heightSetting - u.h) / 2), this.needsBox && (this.box || (E = this.box = this.symbolKey ? this.renderer.symbol(this.symbolKey) : this.renderer.rect(), E.addClass((this.className === "button" ? "" : "highcharts-label-box") + (this.className ? " highcharts-" + this.className + "-box" : "")), E.add(this)), E = this.getCrispAdjust(), f.x = E, f.y = (this.baseline ? -this.baselineOffset : 0) + E, f.width = Math.round(this.width), f.height = Math.round(this.height), this.box.attr(H(f, this.deferredAttr)), this.deferredAttr = {});
- }, x.prototype.updateTextPadding = function() {
- var u = this.text;
- this.updateBoxSize();
- var f = this.baseline ? 0 : this.baselineOffset, E = R(this.paddingLeft, this.padding);
- Z(this.widthSetting) && this.bBox && (this.textAlign === "center" || this.textAlign === "right") && (E += { center: 0.5, right: 1 }[this.textAlign] * (this.widthSetting - this.bBox.width)), (E !== u.x || f !== u.y) && (u.attr("x", E), u.hasBoxWidthChanged && (this.bBox = u.getBBox(!0)), typeof f < "u" && u.attr("y", f)), u.x = E, u.y = f;
- }, x.prototype.widthSetter = function(u) {
- this.widthSetting = U(u) ? u : void 0;
- }, x.prototype.getPaddedWidth = function() {
- var u = this.padding, f = R(this.paddingLeft, u);
- return u = R(this.paddingRight, u), (this.widthSetting || this.bBox.width || 0) + f + u;
- }, x.prototype.xSetter = function(u) {
- this.x = u, this.alignFactor && (u -= this.alignFactor * this.getPaddedWidth(), this["forceAnimate:x"] = !0), this.xSetting = Math.round(u), this.attr("translateX", this.xSetting);
- }, x.prototype.ySetter = function(u) {
- this.ySetting = this.y = Math.round(u), 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);
- }
- ), T(
- l,
- "Core/Renderer/SVG/Symbols.js",
- [l["Core/Utilities.js"]],
- function(y) {
- function j(R, N, b, x, u) {
- var f = [];
- if (u) {
- var E = u.start || 0, O = F(u.r, b);
- b = F(u.r, x || b);
- var B = (u.end || 0) - 1e-3;
- x = u.innerR;
- var M = F(u.open, 1e-3 > Math.abs((u.end || 0) - E - 2 * Math.PI)), S = Math.cos(E), w = Math.sin(E), v = Math.cos(B), a = Math.sin(B);
- E = F(u.longArc, 1e-3 > B - E - Math.PI ? 0 : 1), f.push(["M", R + O * S, N + b * w], ["A", O, b, 0, E, F(u.clockwise, 1), R + O * v, N + b * a]), H(x) && f.push(M ? ["M", R + x * v, N + x * a] : ["L", R + x * v, N + x * a], ["A", x, x, 0, E, H(u.clockwise) ? 1 - u.clockwise : 0, R + x * S, N + x * w]), M || f.push(["Z"]);
- }
- return f;
- }
- function I(R, N, b, x, u) {
- return u && u.r ? Z(R, N, b, x, u) : [["M", R, N], ["L", R + b, N], ["L", R + b, N + x], ["L", R, N + x], ["Z"]];
- }
- function Z(R, N, b, x, u) {
- return u = u && u.r || 0, [["M", R + u, N], ["L", R + b - u, N], ["C", R + b, N, R + b, N, R + b, N + u], ["L", R + b, N + x - u], ["C", R + b, N + x, R + b, N + x, R + b - u, N + x], ["L", R + u, N + x], ["C", R, N + x, R, N + x, R, N + x - u], ["L", R, N + u], ["C", R, N, R, N, R + u, N]];
- }
- var H = y.defined, U = y.isNumber, F = y.pick;
- return { arc: j, callout: function(R, N, b, x, u) {
- var f = Math.min(u && u.r || 0, b, x), E = f + 6, O = u && u.anchorX;
- u = u && u.anchorY || 0;
- var B = Z(R, N, b, x, { r: f });
- return U(O) && (R + O >= b ? u > N + E && u < N + x - E ? B.splice(3, 1, ["L", R + b, u - 6], ["L", R + b + 6, u], ["L", R + b, u + 6], ["L", R + b, N + x - f]) : B.splice(3, 1, ["L", R + b, x / 2], ["L", O, u], ["L", R + b, x / 2], ["L", R + b, N + x - f]) : 0 >= R + O ? u > N + E && u < N + x - E ? B.splice(7, 1, ["L", R, u + 6], ["L", R - 6, u], ["L", R, u - 6], ["L", R, N + f]) : B.splice(7, 1, ["L", R, x / 2], ["L", O, u], ["L", R, x / 2], ["L", R, N + f]) : u && u > x && O > R + E && O < R + b - E ? B.splice(5, 1, ["L", O + 6, N + x], ["L", O, N + x + 6], ["L", O - 6, N + x], ["L", R + f, N + x]) : u && 0 > u && O > R + E && O < R + b - E && B.splice(1, 1, ["L", O - 6, N], ["L", O, N - 6], ["L", O + 6, N], ["L", b - f, N])), B;
- }, circle: function(R, N, b, x) {
- return j(R + b / 2, N + x / 2, b / 2, x / 2, { start: 0.5 * Math.PI, end: 2.5 * Math.PI, open: !1 });
- }, diamond: function(R, N, b, x) {
- return [["M", R + b / 2, N], ["L", R + b, N + x / 2], ["L", R + b / 2, N + x], ["L", R, N + x / 2], ["Z"]];
- }, rect: I, roundedRect: Z, square: I, triangle: function(R, N, b, x) {
- return [["M", R + b / 2, N], ["L", R + b, N + x], ["L", R, N + x], ["Z"]];
- }, "triangle-down": function(R, N, b, x) {
- return [["M", R, N], ["L", R + b, N], ["L", R + b / 2, N + x], ["Z"]];
- } };
- }
- ), T(l, "Core/Renderer/SVG/TextBuilder.js", [l["Core/Renderer/HTML/AST.js"], l["Core/Globals.js"], l["Core/Utilities.js"]], function(y, j, I) {
- var Z = j.doc, H = j.SVG_NS, U = j.win, F = I.attr, R = I.isString, N = I.objectEach, b = I.pick;
- return function() {
- function x(u) {
- var f = u.styles;
- this.renderer = u.renderer, this.svgElement = u, this.width = u.textWidth, this.textLineHeight = f && f.lineHeight, this.textOutline = f && f.textOutline, this.ellipsis = !(!f || f.textOverflow !== "ellipsis"), this.noWrap = !(!f || f.whiteSpace !== "nowrap"), this.fontSize = f && f.fontSize;
- }
- return x.prototype.buildSVG = function() {
- var u = this.svgElement, f = u.element, E = u.renderer, O = b(u.textStr, "").toString(), B = O.indexOf("<") !== -1, M = f.childNodes;
- E = this.width && !u.added && E.box;
- var S = /<br.*?>/g, w = [O, this.ellipsis, this.noWrap, this.textLineHeight, this.textOutline, this.fontSize, this.width].join();
- if (w !== u.textCache) {
- for (u.textCache = w, delete u.actualWidth, w = M.length; w--; )
- f.removeChild(M[w]);
- B || this.ellipsis || this.width || O.indexOf(" ") !== -1 && (!this.noWrap || S.test(O)) ? O !== "" && (E && E.appendChild(f), O = new y(O), this.modifyTree(O.nodes), O.addToDOM(u.element), this.modifyDOM(), this.ellipsis && (f.textContent || "").indexOf("…") !== -1 && u.attr(
- "title",
- this.unescapeEntities(u.textStr || "", ["<", ">"])
- ), E && E.removeChild(f)) : f.appendChild(Z.createTextNode(this.unescapeEntities(O))), R(this.textOutline) && u.applyTextOutline && u.applyTextOutline(this.textOutline);
- }
- }, x.prototype.modifyDOM = function() {
- var u = this, f = this.svgElement, E = F(f.element, "x");
- f.firstLineMetrics = void 0;
- for (var O; (O = f.element.firstChild) && /^[\s\u200B]*$/.test(O.textContent || " "); )
- f.element.removeChild(O);
- [].forEach.call(f.element.querySelectorAll("tspan.highcharts-br"), function(w, v) {
- w.nextSibling && w.previousSibling && (v === 0 && w.previousSibling.nodeType === 1 && (f.firstLineMetrics = f.renderer.fontMetrics(void 0, w.previousSibling)), F(w, { dy: u.getLineHeight(w.nextSibling), x: E }));
- });
- var B = this.width || 0;
- if (B) {
- var M = function(w, v) {
- var a = w.textContent || "", c = a.replace(/([^\^])-/g, "$1- ").split(" "), p = !u.noWrap && (1 < c.length || 1 < f.element.childNodes.length), i = u.getLineHeight(v), h = 0, s = f.actualWidth;
- if (u.ellipsis)
- a && u.truncate(w, a, void 0, 0, Math.max(0, B - parseInt(u.fontSize || 12, 10)), function(t, o) {
- return t.substring(
- 0,
- o
- ) + "…";
- });
- else if (p) {
- for (a = [], p = []; v.firstChild && v.firstChild !== w; )
- p.push(v.firstChild), v.removeChild(v.firstChild);
- for (; c.length; )
- c.length && !u.noWrap && 0 < h && (a.push(w.textContent || ""), w.textContent = c.join(" ").replace(/- /g, "-")), u.truncate(w, void 0, c, h === 0 && s || 0, B, function(t, o) {
- return c.slice(0, o).join(" ").replace(/- /g, "-");
- }), s = f.actualWidth, h++;
- p.forEach(function(t) {
- v.insertBefore(t, w);
- }), a.forEach(function(t) {
- v.insertBefore(Z.createTextNode(t), w), t = Z.createElementNS(H, "tspan"), t.textContent = "", F(t, { dy: i, x: E }), v.insertBefore(t, w);
- });
- }
- }, S = function(w) {
- [].slice.call(w.childNodes).forEach(function(v) {
- v.nodeType === U.Node.TEXT_NODE ? M(v, w) : (v.className.baseVal.indexOf("highcharts-br") !== -1 && (f.actualWidth = 0), S(v));
- });
- };
- S(f.element);
- }
- }, x.prototype.getLineHeight = function(u) {
- var f;
- return u = u.nodeType === U.Node.TEXT_NODE ? u.parentElement : u, this.renderer.styledMode || (f = u && /(px|em)$/.test(u.style.fontSize) ? u.style.fontSize : this.fontSize || this.renderer.style.fontSize || 12), this.textLineHeight ? parseInt(
- this.textLineHeight.toString(),
- 10
- ) : this.renderer.fontMetrics(f, u || this.svgElement.element).h;
- }, x.prototype.modifyTree = function(u) {
- var f = this, E = function(O, B) {
- var M = O.attributes;
- M = M === void 0 ? {} : M;
- var S = O.children, w = O.tagName, v = f.renderer.styledMode;
- w === "b" || w === "strong" ? v ? M.class = "highcharts-strong" : M.style = "font-weight:bold;" + (M.style || "") : (w === "i" || w === "em") && (v ? M.class = "highcharts-emphasized" : M.style = "font-style:italic;" + (M.style || "")), R(M.style) && (M.style = M.style.replace(/(;| |^)color([ :])/, "$1fill$2")), w === "br" ? (M.class = "highcharts-br", O.textContent = "", (B = u[B + 1]) && B.textContent && (B.textContent = B.textContent.replace(/^ +/gm, ""))) : w === "a" && S && S.some(function(a) {
- return a.tagName === "#text";
- }) && (O.children = [{ children: S, tagName: "tspan" }]), w !== "#text" && w !== "a" && (O.tagName = "tspan"), O.attributes = M, S && S.filter(function(a) {
- return a.tagName !== "#text";
- }).forEach(E);
- };
- u.forEach(E);
- }, x.prototype.truncate = function(u, f, E, O, B, M) {
- var S = this.svgElement, w = S.renderer, v = S.rotation, a = [], c = E ? 1 : 0, p = (f || E || "").length, i = p, h, s = function(o, n) {
- n = n || o;
- var A = u.parentNode;
- if (A && typeof a[n] > "u")
- if (A.getSubStringLength)
- try {
- a[n] = O + A.getSubStringLength(0, E ? n + 1 : n);
- } catch {
- }
- else
- w.getSpanWidth && (u.textContent = M(f || E, o), a[n] = O + w.getSpanWidth(S, u));
- return a[n];
- };
- S.rotation = 0;
- var t = s(u.textContent.length);
- if (O + t > B) {
- for (; c <= p; )
- i = Math.ceil((c + p) / 2), E && (h = M(E, i)), t = s(i, h && h.length - 1), c === p ? c = p + 1 : t > B ? p = i - 1 : c = i;
- p === 0 ? u.textContent = "" : f && p === f.length - 1 || (u.textContent = h || M(f || E, i));
- }
- E && E.splice(0, i), S.actualWidth = t, S.rotation = v;
- }, x.prototype.unescapeEntities = function(u, f) {
- return N(this.renderer.escapes, function(E, O) {
- f && f.indexOf(E) !== -1 || (u = u.toString().replace(new RegExp(E, "g"), O));
- }), u;
- }, x;
- }();
- }), T(l, "Core/Renderer/SVG/SVGRenderer.js", [l["Core/Renderer/HTML/AST.js"], l["Core/Color/Color.js"], l["Core/Globals.js"], l["Core/Renderer/RendererRegistry.js"], l["Core/Renderer/SVG/SVGElement.js"], l["Core/Renderer/SVG/SVGLabel.js"], l["Core/Renderer/SVG/Symbols.js"], l["Core/Renderer/SVG/TextBuilder.js"], l["Core/Utilities.js"]], function(y, j, I, Z, H, U, F, R, N) {
- var b = I.charts, x = I.deg2rad, u = I.doc, f = I.isFirefox, E = I.isMS, O = I.isWebKit, B = I.noop, M = I.SVG_NS, S = I.symbolSizes, w = I.win, v = N.addEvent, a = N.attr, c = N.createElement, p = N.css, i = N.defined, h = N.destroyObjectProperties, s = N.extend, t = N.isArray, o = N.isNumber, n = N.isObject, A = N.isString, _ = N.merge, D = N.pick, W = N.pInt, P = N.uniqueKey, X;
- return I = function() {
- function g(m, L, Y, V, Q, k, G) {
- 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, Y, V, Q, k, G);
- }
- return g.prototype.init = function(m, L, Y, V, Q, k, G) {
- var z = this.createElement("svg").attr({ version: "1.1", class: "highcharts-root" }), $ = z.element;
- G || z.css(this.getStyle(V)), m.appendChild($), a(m, "dir", "ltr"), m.innerHTML.indexOf("xmlns") === -1 && a($, "xmlns", this.SVG_NS), this.isSVG = !0, this.box = $, this.boxWrapper = z, this.alignedObjects = [], this.url = this.getReferenceURL(), this.createElement("desc").add().element.appendChild(u.createTextNode("Created with Highcharts 9.3.3")), this.defs = this.createElement("defs").add(), this.allowHTML = k, this.forExport = Q, this.styledMode = G, this.gradients = {}, this.cache = {}, this.cacheKeys = [], this.imgCount = 0, this.setSize(L, Y, !1);
- var q;
- f && m.getBoundingClientRect && (L = function() {
- p(m, { left: 0, top: 0 }), q = m.getBoundingClientRect(), p(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 ((f || O) && u.getElementsByTagName("base").length) {
- if (!i(X)) {
- var m = P();
- 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(u.body), p(m, { position: "fixed", top: 0, left: 0, zIndex: 9e5 });
- var L = u.elementFromPoint(6, 6);
- X = (L && L.id) === "hitme", u.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 = s({ 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(), h(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 = j.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, Y, V, Q, k, G, z, $, q) {
- var it = this.label(m, L, Y, $, 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, k = _(rt, { fill: "#e6e6e6" }, y.filterUserAttributes(k || {}));
- var gt = k.style;
- delete k.style, G = _(rt, { fill: "#e6ebf5", style: { color: "#000000", fontWeight: "bold" } }, y.filterUserAttributes(G || {}));
- var dt = G.style;
- delete G.style, z = _(rt, { style: { color: "#cccccc" } }, y.filterUserAttributes(z || {}));
- var ht = z.style;
- delete z.style;
- }
- return v(it.element, E ? "mouseover" : "mouseenter", function() {
- nt !== 3 && it.setState(1);
- }), v(it.element, E ? "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, k, G, z][at || 0]).css([ct, gt, dt, ht][at || 0]);
- }, et || it.attr(rt).css(s({ cursor: "default" }, ct)), it.on("touchstart", function(at) {
- return at.stopPropagation();
- }).on("click", function(at) {
- nt !== 3 && V.call(it, at);
- });
- }, g.prototype.crispLine = function(m, L, Y) {
- Y === void 0 && (Y = "round");
- var V = m[0], Q = m[1];
- return i(V[1]) && V[1] === Q[1] && (V[1] = Q[1] = Math[Y](V[1]) - L % 2 / 2), i(V[2]) && V[2] === Q[2] && (V[2] = Q[2] = Math[Y](V[2]) + L % 2 / 2), m;
- }, g.prototype.path = function(m) {
- var L = this.styledMode ? {} : { fill: "none" };
- return t(m) ? L.d = m : n(m) && s(L, m), this.createElement("path").attr(L);
- }, g.prototype.circle = function(m, L, Y) {
- return m = n(m) ? m : typeof m > "u" ? {} : { x: m, y: L, r: Y }, L = this.createElement("circle"), L.xSetter = L.ySetter = function(V, Q, k) {
- k.setAttribute("c" + Q, V);
- }, L.attr(m);
- }, g.prototype.arc = function(m, L, Y, V, Q, k) {
- return n(m) ? (V = m, L = V.y, Y = V.r, m = V.x) : V = { innerR: V, start: Q, end: k }, m = this.symbol("arc", m, L, Y, Y, V), m.r = Y, m;
- }, g.prototype.rect = function(m, L, Y, V, Q, k) {
- Q = n(m) ? m.r : Q;
- var G = this.createElement("rect");
- return m = n(m) ? m : typeof m > "u" ? {} : { x: m, y: L, width: Math.max(Y, 0), height: Math.max(V, 0) }, this.styledMode || (typeof k < "u" && (m["stroke-width"] = k, m = G.crisp(m)), m.fill = "none"), Q && (m.r = Q), G.rSetter = function(z, $, q) {
- G.r = z, a(q, { rx: z, ry: z });
- }, G.rGetter = function() {
- return G.r || 0;
- }, G.attr(m);
- }, g.prototype.setSize = function(m, L, Y) {
- 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: D(
- Y,
- !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, Y, V, Q, k) {
- var G = { preserveAspectRatio: "none" }, z = function(q, it) {
- q.setAttributeNS ? q.setAttributeNS("http://www.w3.org/1999/xlink", "href", it) : q.setAttribute("hc-svg-href", it);
- };
- o(L) && (G.x = L), o(Y) && (G.y = Y), o(V) && (G.width = V), o(Q) && (G.height = Q);
- var $ = this.createElement("image").attr(G);
- return L = function(q) {
- z($.element, m), k.call($, q);
- }, k ? (z(
- $.element,
- "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="
- ), Y = new w.Image(), v(Y, "load", L), Y.src = m, Y.complete && L({})) : z($.element, m), $;
- }, g.prototype.symbol = function(m, L, Y, V, Q, k) {
- var G = this, z = /^url\((.*?)\)$/, $ = z.test(m), q = !$ && (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(Y || 0), V || 0, Q || 0, k));
- var nt = this.path(et);
- G.styledMode || nt.attr("fill", "none"), s(nt, { symbolName: q || void 0, x: L, y: Y, width: V, height: Q }), k && s(nt, k);
- } else if ($) {
- var rt = m.match(z)[1], ct = nt = this.image(rt);
- ct.imgwidth = D(S[rt] && S[rt].width, k && k.width), ct.imgheight = D(S[rt] && S[rt].height, k && k.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) && (k && k.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: Y }), ct.isImg = !0, i(ct.imgwidth) && i(ct.imgheight) ? gt(ct) : (ct.attr({ width: 0, height: 0 }), c("img", { onload: function() {
- var dt = b[G.chartIndex];
- this.width === 0 && (p(this, { position: "absolute", top: "-999em" }), u.body.appendChild(this)), S[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), G.imgCount--, !G.imgCount && dt && !dt.hasLoaded && dt.onload();
- }, src: rt }), this.imgCount++);
- }
- return nt;
- }, g.prototype.clipRect = function(m, L, Y, V) {
- var Q = P() + "-", k = this.createElement("clipPath").attr({ id: Q }).add(this.defs);
- return m = this.rect(m, L, Y, V, 0).add(k), m.id = Q, m.clipPath = k, m.count = 0, m;
- }, g.prototype.text = function(m, L, Y, V) {
- var Q = {};
- return V && (this.allowHTML || !this.forExport) ? this.html(m, L, Y) : (Q.x = Math.round(L || 0), Y && (Q.y = Math.round(Y)), i(m) && (Q.text = m), m = this.createElement("text").attr(Q), (!V || this.forExport && !this.allowHTML) && (m.xSetter = function(k, G, z) {
- for (var $ = z.getElementsByTagName("tspan"), q = z.getAttribute(G), it = 0, et; it < $.length; it++)
- et = $[it], et.getAttribute(G) === q && et.setAttribute(G, k);
- z.setAttribute(G, k);
- }), 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, Y) {
- var V = m;
- return L && Y && (V = Math.max(V * Math.cos(L * x), 4)), { x: -m / 3 * Math.sin(L * x), y: V };
- }, g.prototype.pathToSegments = function(m) {
- for (var L = [], Y = [], V = { A: 8, C: 7, H: 2, L: 3, M: 3, Q: 5, S: 5, T: 3, V: 2 }, Q = 0; Q < m.length; Q++)
- A(Y[0]) && o(m[Q]) && Y.length === V[Y[0].toUpperCase()] && m.splice(Q, 0, Y[0].replace("M", "L").replace("m", "l")), typeof m[Q] == "string" && (Y.length && L.push(Y.slice(0)), Y.length = 0), Y.push(m[Q]);
- return L.push(Y.slice(0)), L;
- }, g.prototype.label = function(m, L, Y, V, Q, k, G, z, $) {
- return new U(this, m, L, Y, V, Q, k, G, z, $);
- }, g.prototype.alignElements = function() {
- this.alignedObjects.forEach(function(m) {
- return m.align();
- });
- }, g;
- }(), s(I.prototype, { Element: H, SVG_NS: M, escapes: { "&": "&", "<": "<", ">": ">", "'": "'", '"': """ }, symbols: F, draw: B }), Z.registerRendererType("svg", I, !0), I;
- }), T(l, "Core/Renderer/HTML/HTMLElement.js", [l["Core/Globals.js"], l["Core/Renderer/SVG/SVGElement.js"], l["Core/Utilities.js"]], function(y, j, I) {
- var Z = this && this.__extends || function() {
- var E = function(O, B) {
- return E = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(M, S) {
- M.__proto__ = S;
- } || function(M, S) {
- for (var w in S)
- S.hasOwnProperty(w) && (M[w] = S[w]);
- }, E(O, B);
- };
- return function(O, B) {
- function M() {
- this.constructor = O;
- }
- E(O, B), O.prototype = B === null ? Object.create(B) : (M.prototype = B.prototype, new M());
- };
- }(), H = y.isFirefox, U = y.isMS, F = y.isWebKit, R = y.win, N = I.css, b = I.defined, x = I.extend, u = I.pick, f = I.pInt;
- return function(E) {
- function O() {
- return E !== null && E.apply(this, arguments) || this;
- }
- return Z(O, E), O.compose = function(B) {
- if (O.composedClasses.indexOf(B) === -1) {
- O.composedClasses.push(B);
- var M = O.prototype, S = B.prototype;
- S.getSpanCorrection = M.getSpanCorrection, S.htmlCss = M.htmlCss, S.htmlGetBBox = M.htmlGetBBox, S.htmlUpdateTransform = M.htmlUpdateTransform, S.setSpanRotation = M.setSpanRotation;
- }
- return B;
- }, O.prototype.getSpanCorrection = function(B, M, S) {
- this.xCorr = -B * S, this.yCorr = -M;
- }, O.prototype.htmlCss = function(B) {
- var M = this.element.tagName === "SPAN" && B && "width" in B, S = u(M && B.width, void 0);
- if (M) {
- delete B.width, this.textWidth = S;
- var w = !0;
- }
- return B && B.textOverflow === "ellipsis" && (B.whiteSpace = "nowrap", B.overflow = "hidden"), this.styles = x(this.styles, B), N(this.element, B), w && this.htmlUpdateTransform(), this;
- }, O.prototype.htmlGetBBox = function() {
- var B = this.element;
- return { x: B.offsetLeft, y: B.offsetTop, width: B.offsetWidth, height: B.offsetHeight };
- }, O.prototype.htmlUpdateTransform = function() {
- if (this.added) {
- var B = this.renderer, M = this.element, S = this.translateX || 0, w = this.translateY || 0, v = this.x || 0, a = this.y || 0, c = this.textAlign || "left", p = { left: 0, center: 0.5, right: 1 }[c], i = this.styles;
- if (i = i && i.whiteSpace, N(M, { marginLeft: S, marginTop: w }), !B.styledMode && this.shadows && this.shadows.forEach(function(A) {
- N(A, { marginLeft: S + 1, marginTop: w + 1 });
- }), this.inverted && [].forEach.call(M.childNodes, function(A) {
- B.invertChild(A, M);
- }), M.tagName === "SPAN") {
- var h = this.rotation, s = this.textWidth && f(this.textWidth), t = [h, c, M.innerHTML, this.textWidth, this.textAlign].join(), o = void 0;
- if (o = !1, s !== this.oldTextWidth) {
- if (this.textPxLength)
- var n = this.textPxLength;
- else
- N(M, { width: "", whiteSpace: i || "nowrap" }), n = M.offsetWidth;
- (s > this.oldTextWidth || n > s) && (/[ \-]/.test(M.textContent || M.innerText) || M.style.textOverflow === "ellipsis") && (N(M, { width: n > s || h ? s + "px" : "auto", display: "block", whiteSpace: i || "normal" }), this.oldTextWidth = s, o = !0);
- }
- this.hasBoxWidthChanged = o, t !== this.cTT && (o = B.fontMetrics(M.style.fontSize, M).b, !b(h) || h === (this.oldRotation || 0) && c === this.oldAlign || this.setSpanRotation(h, p, o), this.getSpanCorrection(!b(h) && this.textPxLength || M.offsetWidth, o, p, h, c)), N(M, { left: v + (this.xCorr || 0) + "px", top: a + (this.yCorr || 0) + "px" }), this.cTT = t, this.oldRotation = h, this.oldAlign = c;
- }
- } else
- this.alignOnAdd = !0;
- }, O.prototype.setSpanRotation = function(B, M, S) {
- var w = {}, v = U && !/Edge/.test(R.navigator.userAgent) ? "-ms-transform" : F ? "-webkit-transform" : H ? "MozTransform" : R.opera ? "-o-transform" : void 0;
- v && (w[v] = w.transform = "rotate(" + B + "deg)", w[v + (H ? "Origin" : "-origin")] = w.transformOrigin = 100 * M + "% " + S + "px", N(this.element, w));
- }, O.composedClasses = [], O;
- }(j);
- }), T(
- l,
- "Core/Renderer/HTML/HTMLRenderer.js",
- [l["Core/Renderer/HTML/AST.js"], l["Core/Renderer/SVG/SVGElement.js"], l["Core/Renderer/SVG/SVGRenderer.js"], l["Core/Utilities.js"]],
- function(y, j, I, Z) {
- var H = this && this.__extends || function() {
- var b = function(x, u) {
- return b = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(f, E) {
- f.__proto__ = E;
- } || function(f, E) {
- for (var O in E)
- E.hasOwnProperty(O) && (f[O] = E[O]);
- }, b(x, u);
- };
- return function(x, u) {
- function f() {
- this.constructor = x;
- }
- b(x, u), x.prototype = u === null ? Object.create(u) : (f.prototype = u.prototype, new f());
- };
- }(), U = Z.attr, F = Z.createElement, R = Z.extend, N = Z.pick;
- return function(b) {
- function x() {
- return b !== null && b.apply(this, arguments) || this;
- }
- return H(x, b), x.compose = function(u) {
- return x.composedClasses.indexOf(u) === -1 && (x.composedClasses.push(u), u.prototype.html = x.prototype.html), u;
- }, x.prototype.html = function(u, f, E) {
- var O = this.createElement("span"), B = O.element, M = O.renderer, S = M.isSVG, w = function(v, a) {
- ["opacity", "visibility"].forEach(function(c) {
- v[c + "Setter"] = function(p, i, h) {
- var s = v.div ? v.div.style : a;
- j.prototype[c + "Setter"].call(this, p, i, h), s && (s[i] = p);
- };
- }), v.addedSetters = !0;
- };
- return O.textSetter = function(v) {
- v !== this.textStr && (delete this.bBox, delete this.oldTextWidth, y.setElementHTML(this.element, N(v, "")), this.textStr = v, O.doTransform = !0);
- }, S && w(O, O.element.style), O.xSetter = O.ySetter = O.alignSetter = O.rotationSetter = function(v, a) {
- a === "align" ? O.alignValue = O.textAlign = v : O[a] = v, O.doTransform = !0;
- }, O.afterSetters = function() {
- this.doTransform && (this.htmlUpdateTransform(), this.doTransform = !1);
- }, O.attr({ text: u, x: Math.round(f), y: Math.round(E) }).css({ position: "absolute" }), M.styledMode || O.css({ fontFamily: this.style.fontFamily, fontSize: this.style.fontSize }), B.style.whiteSpace = "nowrap", O.css = O.htmlCss, S && (O.add = function(v) {
- var a = M.box.parentNode, c = [];
- if (this.parentGroup = v) {
- var p = v.div;
- if (!p) {
- for (; v; )
- c.push(v), v = v.parentGroup;
- c.reverse().forEach(function(i) {
- function h(n, A) {
- i[A] = n, A === "translateX" ? o.left = n + "px" : o.top = n + "px", i.doTransform = !0;
- }
- var s = U(i.element, "class"), t = i.styles || {};
- p = i.div = i.div || F("div", s ? { className: s } : 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
- }, p || a);
- var o = p.style;
- R(i, { classSetter: function(n) {
- return function(A) {
- this.element.setAttribute("class", A), n.className = A;
- };
- }(p), on: function() {
- return c[0].div && O.on.apply({ element: c[0].div, onEvents: i.onEvents }, arguments), i;
- }, translateXSetter: h, translateYSetter: h }), i.addedSetters || w(i);
- });
- }
- } else
- p = a;
- return p.appendChild(B), O.added = !0, O.alignOnAdd && O.htmlUpdateTransform(), O;
- }), O;
- }, x.composedClasses = [], x;
- }(I);
- }
- ), T(l, "Core/Axis/AxisDefaults.js", [], function() {
- var y;
- return function(j) {
- j.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" }, j.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 I = this.axis.chart.numberFormatter;
- return I(this.total, -1);
- },
- style: { color: "#000000", fontSize: "11px", fontWeight: "bold", textOutline: "1px contrast" }
- }, gridLineWidth: 1, lineWidth: 0 }, j.defaultLeftAxisOptions = { labels: { x: -15 }, title: { rotation: 270 } }, j.defaultRightAxisOptions = { labels: { x: 15 }, title: { rotation: 90 } }, j.defaultBottomAxisOptions = { labels: { autoRotation: [-45], x: 0 }, margin: 15, title: { rotation: 0 } }, j.defaultTopAxisOptions = { labels: { autoRotation: [-45], x: 0 }, margin: 15, title: { rotation: 0 } };
- }(y || (y = {})), y;
- }), T(l, "Core/Foundation.js", [l["Core/Utilities.js"]], function(y) {
- var j = y.addEvent, I = y.isFunction, Z = y.objectEach, H = y.removeEvent, U;
- return function(F) {
- F.registerEventOptions = function(R, N) {
- R.eventOptions = R.eventOptions || {}, Z(N.events, function(b, x) {
- R.eventOptions[x] !== b && (R.eventOptions[x] && (H(R, x, R.eventOptions[x]), delete R.eventOptions[x]), I(b) && (R.eventOptions[x] = b, j(R, x, b)));
- });
- };
- }(U || (U = {})), U;
- }), T(
- l,
- "Core/Axis/Tick.js",
- [l["Core/FormatUtilities.js"], l["Core/Globals.js"], l["Core/Utilities.js"]],
- function(y, j, I) {
- var Z = j.deg2rad, H = I.clamp, U = I.correctFloat, F = I.defined, R = I.destroyObjectProperties, N = I.extend, b = I.fireEvent, x = I.isNumber, u = I.merge, f = I.objectEach, E = I.pick;
- return j = function() {
- function O(B, M, S, w, v) {
- this.isNewLabel = this.isNew = !0, this.axis = B, this.pos = M, this.type = S || "", this.parameters = v || {}, this.tickmarkOffset = this.parameters.tickmarkOffset, this.options = this.parameters.options, b(this, "init"), S || w || this.addLabel();
- }
- return O.prototype.addLabel = function() {
- var B = this, M = B.axis, S = M.options, w = M.chart, v = M.categories, a = M.logarithmic, c = M.names, p = B.pos, i = E(B.options && B.options.labels, S.labels), h = M.tickPositions, s = p === h[0], t = p === h[h.length - 1], o = (!i.step || i.step === 1) && M.tickInterval === 1;
- h = h.info;
- var n = B.label, A;
- if (v = this.parameters.category || (v ? E(v[p], c[p], p) : p), a && x(v) && (v = U(a.lin2log(v))), M.dateTime)
- if (h)
- var _ = w.time.resolveDTLFormat(S.dateTimeLabelFormats[!S.grid && h.higherRanks[p] || h.unitName]), D = _.main;
- else
- x(v) && (D = M.dateTime.getXDateFormat(v, S.dateTimeLabelFormats || {}));
- B.isFirst = s, B.isLast = t;
- var W = {
- axis: M,
- chart: w,
- dateTimeLabelFormat: D,
- isFirst: s,
- isLast: t,
- pos: p,
- tick: B,
- tickPositionInfo: h,
- value: v
- };
- b(this, "labelFormat", W);
- var P = function(g) {
- return i.formatter ? i.formatter.call(g, g) : i.format ? (g.text = M.defaultLabelFormatter.call(g), y.format(i.format, g, w)) : M.defaultLabelFormatter.call(g, g);
- };
- S = P.call(W, W);
- var X = _ && _.list;
- B.shortenLabel = X ? function() {
- for (A = 0; A < X.length; A++)
- if (N(W, { dateTimeLabelFormat: X[A] }), n.attr({ text: P.call(W, W) }), n.getBBox().width < M.getSlotWidth(B) - 2 * i.padding)
- return;
- n.attr({ text: "" });
- } : void 0, o && M._addedPlotLB && B.moveLabel(S, i), F(n) || B.movedLabel ? n && n.textStr !== S && !o && (!n.textWidth || i.style.width || n.styles.width || n.css({ width: null }), n.attr({ text: S }), n.textPxLength = n.getBBox().width) : (B.label = n = B.createLabel({ x: 0, y: 0 }, S, i), B.rotation = 0);
- }, O.prototype.createLabel = function(B, M, S) {
- var w = this.axis, v = w.chart;
- return (B = F(M) && S.enabled ? v.renderer.text(M, B.x, B.y, S.useHTML).add(w.labelGroup) : null) && (v.styledMode || B.css(u(S.style)), B.textPxLength = B.getBBox().width), B;
- }, O.prototype.destroy = function() {
- R(
- this,
- this.axis
- );
- }, O.prototype.getPosition = function(B, M, S, w) {
- var v = this.axis, a = v.chart, c = w && a.oldChartHeight || a.chartHeight;
- return B = { x: B ? U(v.translate(M + S, null, null, w) + v.transB) : v.left + v.offset + (v.opposite ? (w && a.oldChartWidth || a.chartWidth) - v.right - v.left : 0), y: B ? c - v.bottom + v.offset - (v.opposite ? v.height : 0) : U(c - v.translate(M + S, null, null, w) - v.transB) }, B.y = H(B.y, -1e5, 1e5), b(this, "afterGetPosition", { pos: B }), B;
- }, O.prototype.getLabelPosition = function(B, M, S, w, v, a, c, p) {
- var i = this.axis, h = i.transA, s = i.isLinked && i.linkedParent ? i.linkedParent.reversed : i.reversed, t = i.staggerLines, o = i.tickRotCorr || { x: 0, y: 0 }, n = w || i.reserveSpaceDefault ? 0 : -i.labelOffset * (i.labelAlign === "center" ? 0.5 : 1), A = {}, _ = v.y;
- return F(_) || (_ = i.side === 0 ? S.rotation ? -8 : -S.getBBox().height : i.side === 2 ? o.y + 8 : Math.cos(S.rotation * Z) * (o.y - S.getBBox(!1, 0).height / 2)), B = B + v.x + n + o.x - (a && w ? a * h * (s ? -1 : 1) : 0), M = M + _ - (a && !w ? a * h * (s ? 1 : -1) : 0), t && (S = c / (p || 1) % t, i.opposite && (S = t - S - 1), M += i.labelOffset / t * S), A.x = B, A.y = Math.round(M), b(this, "afterGetLabelPosition", { pos: A, tickmarkOffset: a, index: c }), A;
- }, O.prototype.getLabelSize = function() {
- return this.label ? this.label.getBBox()[this.axis.horiz ? "height" : "width"] : 0;
- }, O.prototype.getMarkPath = function(B, M, S, w, v, a) {
- return a.crispLine([["M", B, M], ["L", B + (v ? 0 : -S), M + (v ? S : 0)]], w);
- }, O.prototype.handleOverflow = function(B) {
- var M = this.axis, S = M.options.labels, w = B.x, v = M.chart.chartWidth, a = M.chart.spacing, c = E(M.labelLeft, Math.min(M.pos, a[3]));
- a = E(M.labelRight, Math.max(M.isRadial ? 0 : M.pos + M.len, v - a[1]));
- var p = this.label, i = this.rotation, h = { left: 0, center: 0.5, right: 1 }[M.labelAlign || p.attr("align")], s = p.getBBox().width, t = M.getSlotWidth(this), o = {}, n = t, A = 1, _;
- i || S.overflow !== "justify" ? 0 > i && w - h * s < c ? _ = Math.round(w / Math.cos(i * Z) - c) : 0 < i && w + h * s > a && (_ = Math.round((v - w) / Math.cos(i * Z))) : (v = w + (1 - h) * s, w - h * s < c ? n = B.x + n * (1 - h) - c : v > a && (n = a - B.x + n * h, A = -1), n = Math.min(t, n), n < t && M.labelAlign === "center" && (B.x += A * (t - n - h * (t - Math.min(s, n)))), (s > n || M.autoRotation && (p.styles || {}).width) && (_ = n)), _ && (this.shortenLabel ? this.shortenLabel() : (o.width = Math.floor(_) + "px", (S.style || {}).textOverflow || (o.textOverflow = "ellipsis"), p.css(o)));
- }, O.prototype.moveLabel = function(B, M) {
- var S = this, w = S.label, v = S.axis, a = v.reversed, c = !1;
- if (w && w.textStr === B ? (S.movedLabel = w, c = !0, delete S.label) : f(v.ticks, function(i) {
- c || i.isNew || i === S || !i.label || i.label.textStr !== B || (S.movedLabel = i.label, c = !0, i.labelPos = S.movedLabel.xy, delete i.label);
- }), !c && (S.labelPos || w)) {
- var p = S.labelPos || w.xy;
- w = v.horiz ? a ? 0 : v.width + v.left : p.x, v = v.horiz ? p.y : a ? v.width + v.left : 0, S.movedLabel = S.createLabel({ x: w, y: v }, B, M), S.movedLabel && S.movedLabel.attr({ opacity: 0 });
- }
- }, O.prototype.render = function(B, M, S) {
- var w = this.axis, v = w.horiz, a = this.pos, c = E(this.tickmarkOffset, w.tickmarkOffset);
- a = this.getPosition(v, a, c, M), c = a.x;
- var p = a.y;
- w = v && c === w.pos + w.len || !v && p === w.pos ? -1 : 1, v = E(S, this.label && this.label.newOpacity, 1), S = E(S, 1), this.isActive = !0, this.renderGridLine(M, S, w), this.renderMark(a, S, w), this.renderLabel(a, M, v, B), this.isNew = !1, b(this, "afterRender");
- }, O.prototype.renderGridLine = function(B, M, S) {
- var w = this.axis, v = w.options, a = {}, c = this.pos, p = this.type, i = E(
- this.tickmarkOffset,
- w.tickmarkOffset
- ), h = w.chart.renderer, s = this.gridLine, t = v.gridLineWidth, o = v.gridLineColor, n = v.gridLineDashStyle;
- this.type === "minor" && (t = v.minorGridLineWidth, o = v.minorGridLineColor, n = v.minorGridLineDashStyle), s || (w.chart.styledMode || (a.stroke = o, a["stroke-width"] = t || 0, a.dashstyle = n), p || (a.zIndex = 1), B && (M = 0), this.gridLine = s = h.path().attr(a).addClass("highcharts-" + (p ? p + "-" : "") + "grid-line").add(w.gridGroup)), s && (S = w.getPlotLinePath({ value: c + i, lineWidth: s.strokeWidth() * S, force: "pass", old: B })) && s[B || this.isNew ? "attr" : "animate"]({ d: S, opacity: M });
- }, O.prototype.renderMark = function(B, M, S) {
- var w = this.axis, v = w.options, a = w.chart.renderer, c = this.type, p = w.tickSize(c ? c + "Tick" : "tick"), i = B.x;
- B = B.y;
- var h = E(v[c !== "minor" ? "tickWidth" : "minorTickWidth"], !c && w.isXAxis ? 1 : 0);
- v = v[c !== "minor" ? "tickColor" : "minorTickColor"];
- var s = this.mark, t = !s;
- p && (w.opposite && (p[0] = -p[0]), s || (this.mark = s = a.path().addClass("highcharts-" + (c ? c + "-" : "") + "tick").add(w.axisGroup), w.chart.styledMode || s.attr({ stroke: v, "stroke-width": h })), s[t ? "attr" : "animate"]({ d: this.getMarkPath(
- i,
- B,
- p[0],
- s.strokeWidth() * S,
- w.horiz,
- a
- ), opacity: M }));
- }, O.prototype.renderLabel = function(B, M, S, w) {
- var v = this.axis, a = v.horiz, c = v.options, p = this.label, i = c.labels, h = i.step;
- v = E(this.tickmarkOffset, v.tickmarkOffset);
- var s = B.x;
- B = B.y;
- var t = !0;
- p && x(s) && (p.xy = B = this.getLabelPosition(s, B, p, a, i, v, w, h), this.isFirst && !this.isLast && !c.showFirstLabel || this.isLast && !this.isFirst && !c.showLastLabel ? t = !1 : !a || i.step || i.rotation || M || S === 0 || this.handleOverflow(B), h && w % h && (t = !1), t && x(B.y) ? (B.opacity = S, p[this.isNewLabel ? "attr" : "animate"](B), this.isNewLabel = !1) : (p.attr("y", -9999), this.isNewLabel = !0));
- }, O.prototype.replaceMovedLabel = function() {
- var B = this.label, M = this.axis, S = M.reversed;
- if (B && !this.isNew) {
- var w = M.horiz ? S ? M.left : M.width + M.left : B.xy.x;
- S = M.horiz ? B.xy.y : S ? M.width + M.top : M.top, B.animate({ x: w, y: S, opacity: 0 }, void 0, B.destroy), delete this.label;
- }
- M.isDirty = !0, this.label = this.movedLabel, delete this.movedLabel;
- }, O;
- }(), j;
- }
- ), T(l, "Core/Axis/Axis.js", [
- l["Core/Animation/AnimationUtilities.js"],
- l["Core/Axis/AxisDefaults.js"],
- l["Core/Color/Color.js"],
- l["Core/DefaultOptions.js"],
- l["Core/Foundation.js"],
- l["Core/Globals.js"],
- l["Core/Axis/Tick.js"],
- l["Core/Utilities.js"]
- ], function(y, j, I, Z, H, U, F, R) {
- var N = y.animObject, b = Z.defaultOptions, x = H.registerEventOptions, u = U.deg2rad, f = R.arrayMax, E = R.arrayMin, O = R.clamp, B = R.correctFloat, M = R.defined, S = R.destroyObjectProperties, w = R.erase, v = R.error, a = R.extend, c = R.fireEvent, p = R.getMagnitude, i = R.isArray, h = R.isNumber, s = R.isString, t = R.merge, o = R.normalizeTickInterval, n = R.objectEach, A = R.pick, _ = R.relativeLength, D = R.removeEvent, W = R.splat, P = 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"), c(this, "init", { userOptions: m }), this.opposite = A(m.opposite, this.opposite), this.side = A(m.side, this.side, this.horiz ? this.opposite ? 0 : 2 : this.opposite ? 1 : 3), this.setOptions(m);
- var Y = this.options, V = Y.labels, Q = Y.type;
- this.userOptions = m, this.minPixelPadding = 0, this.reversed = A(Y.reversed, this.reversed), this.visible = Y.visible, this.zoomEnabled = Y.zoomEnabled, this.hasNames = Q === "category" || Y.categories === !0, this.categories = Y.categories || this.hasNames, this.names || (this.names = [], this.names.keys = {}), this.plotLinesAndBandsGroups = {}, this.positiveValuesOnly = !!this.logarithmic, this.isLinked = M(Y.linkedTo), this.ticks = {}, this.labelEdge = [], this.minorTicks = {}, this.plotLinesAndBands = [], this.alternateBands = {}, this.len = 0, this.minRange = this.userMinRange = Y.minRange || Y.maxZoom, this.range = Y.range, this.offset = Y.offset || 0, this.min = this.max = null, m = A(Y.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 = h(V.rotation) ? V.rotation : void 0, x(this, Y), c(this, "afterInit");
- }, X.prototype.setOptions = function(g) {
- this.options = t(j.defaultXAxisOptions, this.coll === "yAxis" && j.defaultYAxisOptions, [j.defaultTopAxisOptions, j.defaultRightAxisOptions, j.defaultBottomAxisOptions, j.defaultLeftAxisOptions][this.side], t(b[this.coll], g)), c(this, "afterSetOptions", { userOptions: g });
- }, X.prototype.defaultLabelFormatter = function(g) {
- var m = this.axis;
- g = this.chart.numberFormatter;
- var L = h(this.value) ? this.value : NaN, Y = m.chart.time, V = this.dateTimeLabelFormat, Q = b.lang, k = Q.numericSymbols;
- Q = Q.numericSymbolMagnitude || 1e3;
- var G = m.logarithmic ? Math.abs(L) : m.tickInterval, z = k && k.length;
- if (m.categories)
- var $ = "" + this.value;
- else if (V)
- $ = Y.dateFormat(V, L);
- else if (z && 1e3 <= G)
- for (; z-- && typeof $ > "u"; )
- m = Math.pow(Q, z + 1), G >= m && 10 * L % m === 0 && k[z] !== null && L !== 0 && ($ = g(L / m, -1) + k[z]);
- return typeof $ > "u" && ($ = 1e4 <= Math.abs(L) ? g(L, -1) : g(L, -1, void 0, "")), $;
- }, X.prototype.getSeriesExtremes = function() {
- var g = this, m = g.chart, L;
- c(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(Y) {
- if (Y.visible || !m.options.chart.ignoreHiddenSeries) {
- var V = Y.options, Q = V.threshold;
- if (g.hasVisibleSeries = !0, g.positiveValuesOnly && 0 >= Q && (Q = null), g.isXAxis) {
- if (V = Y.xData, V.length) {
- V = g.logarithmic ? V.filter(g.validatePositiveValue) : V, L = Y.getXExtremes(V);
- var k = L.min, G = L.max;
- h(k) || k instanceof Date || (V = V.filter(h), L = Y.getXExtremes(V), k = L.min, G = L.max), V.length && (g.dataMin = Math.min(A(g.dataMin, k), k), g.dataMax = Math.max(A(g.dataMax, G), G));
- }
- } else
- Y = Y.applyExtremes(), h(Y.dataMin) && (k = Y.dataMin, g.dataMin = Math.min(A(g.dataMin, k), k)), h(Y.dataMax) && (G = Y.dataMax, g.dataMax = Math.max(A(g.dataMax, G), G)), M(Q) && (g.threshold = Q), (!V.softThreshold || g.positiveValuesOnly) && (g.softThreshold = !1);
- }
- });
- }), c(this, "afterGetSeriesExtremes");
- }, X.prototype.translate = function(g, m, L, Y, V, Q) {
- var k = this.linkedParent || this, G = Y && k.old ? k.old.min : k.min, z = k.minPixelPadding;
- V = (k.isOrdinal || k.brokenAxis && k.brokenAxis.hasBreaks || k.logarithmic && V) && k.lin2val;
- var $ = 1, q = 0;
- return Y = Y && k.old ? k.old.transA : k.transA, Y || (Y = k.transA), L && ($ *= -1, q = k.len), k.reversed && ($ *= -1, q -= $ * (k.sector || k.len)), m ? (g = (g * $ + q - z) / Y + G, V && (g = k.lin2val(g))) : (V && (g = k.val2lin(g)), g = h(G) ? $ * (g - G) * Y + q + $ * z + (h(Q) ? Y * 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, Y = L.chart, V = L.left, Q = L.top, k = g.old, G = g.value, z = g.lineWidth, $ = k && Y.oldChartHeight || Y.chartHeight, q = k && Y.oldChartWidth || Y.chartWidth, it = L.transB, et = g.translatedValue, nt = g.force, rt, ct, gt, dt, ht;
- return g = {
- value: G,
- lineWidth: z,
- old: k,
- force: nt,
- acrossPanes: g.acrossPanes,
- translatedValue: et
- }, c(this, "getPlotLinePath", g, function(at) {
- et = A(et, L.translate(G, null, null, k)), et = O(et, -1e5, 1e5), rt = gt = Math.round(et + it), ct = dt = Math.round($ - et - it), h(et) ? L.horiz ? (ct = Q, dt = $ - L.bottom, rt = gt = m(rt, V, V + L.width)) : (rt = V, gt = q - L.right, ct = dt = m(ct, Q, Q + L.height)) : (ht = !0, nt = !1), at.path = ht && !nt ? null : Y.renderer.crispLine([["M", rt, ct], ["L", gt, dt]], z || 1);
- }), g.path;
- }, X.prototype.getLinearTickPositions = function(g, m, L) {
- var Y = B(Math.floor(m / g) * g);
- L = B(Math.ceil(L / g) * g);
- var V = [], Q;
- if (B(Y + g) === Y && (Q = 20), this.single)
- return [m];
- for (m = Y; m <= L && (V.push(m), m = B(m + g, Q), m !== k); )
- var k = m;
- return V;
- }, X.prototype.getMinorTickInterval = function() {
- var g = this.options;
- return g.minorTicks === !0 ? A(g.minorTickInterval, "auto") : g.minorTicks === !1 ? null : g.minorTickInterval;
- }, X.prototype.getMinorTickPositions = function() {
- var g = this.options, m = this.tickPositions, L = this.minorTickInterval, Y = this.pointRangePadding || 0, V = this.min - Y;
- Y = this.max + Y;
- var Q = Y - V, k = [];
- if (Q && Q / L < this.len / 3) {
- var G = this.logarithmic;
- if (G)
- this.paddedTicks.forEach(function(z, $, q) {
- $ && k.push.apply(
- k,
- G.getLogTickPositions(L, q[$ - 1], q[$], !0)
- );
- });
- else if (this.dateTime && this.getMinorTickInterval() === "auto")
- k = k.concat(this.getTimeTicks(this.dateTime.normalizeTimeTickInterval(L), V, Y, g.startOfWeek));
- else
- for (g = V + (m[0] - V) % L; g <= Y && g !== k[0]; g += L)
- k.push(g);
- }
- return k.length !== 0 && this.trimTicks(k), k;
- }, X.prototype.adjustForMinRange = function() {
- var g = this.options, m = this.logarithmic, L = this.min, Y = this.max, V = 0, Q, k, G, z;
- if (this.isXAxis && typeof this.minRange > "u" && !m && (M(g.min) || M(g.max) || M(g.floor) || M(g.ceiling) ? this.minRange = null : (this.series.forEach(function(et) {
- if (G = et.xData, z = et.xIncrement ? 1 : G.length - 1, 1 < G.length)
- for (Q = z; 0 < Q; Q--)
- k = G[Q] - G[Q - 1], (!V || k < V) && (V = k);
- }), this.minRange = Math.min(5 * V, this.dataMax - this.dataMin))), Y - L < this.minRange) {
- var $ = this.dataMax - this.dataMin >= this.minRange, q = this.minRange, it = (q - Y + L) / 2;
- it = [L - it, A(g.min, L - it)], $ && (it[2] = this.logarithmic ? this.logarithmic.log2lin(this.dataMin) : this.dataMin), L = f(it), Y = [L + q, A(g.max, L + q)], $ && (Y[2] = m ? m.log2lin(this.dataMax) : this.dataMax), Y = E(Y), Y - L < q && (it[0] = Y - q, it[1] = A(g.min, Y - q), L = f(it));
- }
- this.min = L, this.max = Y;
- }, X.prototype.getClosest = function() {
- var g;
- return this.categories ? g = 1 : this.series.forEach(function(m) {
- var L = m.closestPointRange, Y = m.visible || !m.chart.options.chart.ignoreHiddenSeries;
- !m.noSharedTooltip && M(L) && Y && (g = M(g) ? Math.min(g, L) : L);
- }), g;
- }, X.prototype.nameToX = function(g) {
- var m = i(this.categories), L = m ? this.categories : this.names, Y = g.options.x;
- if (g.series.requireSorting = !1, M(Y) || (Y = this.options.uniqueNames ? m ? L.indexOf(g.name) : A(L.keys[g.name], -1) : g.series.autoIncrement()), Y === -1) {
- if (!m)
- var V = L.length;
- } else
- V = Y;
- return typeof V < "u" && (this.names[V] = g.name, this.names.keys[g.name] = V), V;
- }, 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(Y, V) {
- if (Y && Y.options && typeof Y.name < "u") {
- var Q = g.nameToX(Y);
- typeof Q < "u" && Q !== Y.x && (Y.x = Q, L.xData[V] = Q);
- }
- });
- }));
- }, X.prototype.setAxisTranslation = function() {
- var g = this, m = g.max - g.min, L = g.linkedParent, Y = !!g.categories, V = g.isXAxis, Q = g.axisPointRange || 0, k = 0, G = 0, z = g.transA;
- if (V || Y || Q) {
- var $ = g.getClosest();
- L ? (k = L.minPointOffset, G = L.pointRangePadding) : g.series.forEach(function(q) {
- var it = Y ? 1 : V ? A(q.options.pointRange, $, 0) : g.axisPointRange || 0, et = q.options.pointPlacement;
- Q = Math.max(Q, it), (!g.single || Y) && (q = q.is("xrange") ? !V : V, k = Math.max(k, q && s(et) ? 0 : it / 2), G = Math.max(G, q && et === "on" ? 0 : it));
- }), L = g.ordinal && g.ordinal.slope && $ ? g.ordinal.slope / $ : 1, g.minPointOffset = k *= L, g.pointRangePadding = G *= L, g.pointRange = Math.min(Q, g.single && Y ? 1 : m), V && (g.closestPointRange = $);
- }
- g.translationSlope = g.transA = z = g.staticScale || g.len / (m + G || 1), g.transB = g.horiz ? g.left : g.bottom, g.minPixelPadding = z * k, c(this, "afterSetAxisTranslation");
- }, X.prototype.minFromRange = function() {
- return this.max - this.range;
- }, X.prototype.setTickInterval = function(g) {
- var m = this.chart, L = this.logarithmic, Y = this.options, V = this.isXAxis, Q = this.isLinked, k = Y.tickPixelInterval, G = this.categories, z = this.softThreshold, $ = Y.maxPadding, q = Y.minPadding, it = h(Y.tickInterval) && 0 <= Y.tickInterval ? Y.tickInterval : void 0, et = h(this.threshold) ? this.threshold : null;
- this.dateTime || G || Q || this.getTickAmount();
- var nt = A(this.userMin, Y.min), rt = A(this.userMax, Y.max);
- if (Q) {
- this.linkedParent = m[this.coll][Y.linkedTo];
- var ct = this.linkedParent.getExtremes();
- this.min = A(ct.min, ct.dataMin), this.max = A(ct.max, ct.dataMax), Y.type !== this.linkedParent.options.type && v(11, 1, m);
- } else {
- if (z && M(et)) {
- if (this.dataMin >= et)
- ct = et, q = 0;
- else if (this.dataMax <= et) {
- var gt = et;
- $ = 0;
- }
- }
- this.min = A(nt, ct, this.dataMin), this.max = A(rt, gt, this.dataMax);
- }
- if (L && (this.positiveValuesOnly && !g && 0 >= Math.min(this.min, A(this.dataMin, this.min)) && v(10, 1, m), this.min = B(L.log2lin(this.min), 16), this.max = B(L.log2lin(this.max), 16)), this.range && M(this.max) && (this.userMin = this.min = nt = Math.max(this.dataMin, this.minFromRange()), this.userMax = rt = this.max, this.range = null), c(this, "foundExtremes"), this.beforePadding && this.beforePadding(), this.adjustForMinRange(), !(G || this.axisPointRange || this.stacking && this.stacking.usePercentage || Q) && M(this.min) && M(this.max) && (m = this.max - this.min) && (!M(nt) && q && (this.min -= m * q), !M(rt) && $ && (this.max += m * $)), h(this.userMin) || (h(Y.softMin) && Y.softMin < this.min && (this.min = nt = Y.softMin), h(Y.floor) && (this.min = Math.max(this.min, Y.floor))), h(this.userMax) || (h(Y.softMax) && Y.softMax > this.max && (this.max = rt = Y.softMax), h(Y.ceiling) && (this.max = Math.min(this.max, Y.ceiling))), z && M(this.dataMin) && (et = et || 0, !M(nt) && this.min < et && this.dataMin >= et ? this.min = this.options.minRange ? Math.min(et, this.max - this.minRange) : et : !M(rt) && this.max > et && this.dataMax <= et && (this.max = this.options.minRange ? Math.max(et, this.min + this.minRange) : et)), h(this.min) && h(this.max) && !this.chart.polar && this.min > this.max && (M(this.options.min) ? this.max = this.min : M(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 && k === this.linkedParent.options.tickPixelInterval ? it = this.linkedParent.tickInterval : A(it, this.tickAmount ? (this.max - this.min) / Math.max(this.tickAmount - 1, 1) : void 0, G ? 1 : (this.max - this.min) * k / Math.max(this.len, k)), V && !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);
- }), c(this, "postProcessData", { hasExtemesChanged: dt });
- }
- this.setAxisTranslation(), c(this, "initialAxisTranslation"), this.pointRange && !it && (this.tickInterval = Math.max(this.pointRange, this.tickInterval)), g = A(Y.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 = o(this.tickInterval, void 0, p(this.tickInterval), A(Y.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(), Y = this.hasVerticalPanning(), V = this.coll === "colorAxis", Q = (V || !Y) && g.startOnTick;
- Y = (V || !Y) && g.endOnTick, V = 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 && M(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, V && (V = V.apply(this, [this.min, this.max]))) && (this.tickPositions = L = V), this.paddedTicks = L.slice(0), this.trimTicks(L, Q, Y), this.isLinked || (this.single && 2 > L.length && !this.categories && !this.series.some(function(k) {
- return k.is("heatmap") && k.options.pointPlacement === "between";
- }) && (this.min -= 0.5, this.max += 0.5), m || V || this.adjustTickAmount()), c(this, "afterSetTickPositions");
- }, X.prototype.trimTicks = function(g, m, L) {
- var Y = g[0], V = g[g.length - 1], Q = !this.isOrdinal && this.minPointOffset || 0;
- if (c(this, "trimTicks"), !this.isLinked) {
- if (m && Y !== -1 / 0)
- this.min = Y;
- else
- for (; this.min - Q > g[0]; )
- g.shift();
- if (L)
- this.max = V;
- else
- for (; this.max + Q < g[g.length - 1]; )
- g.pop();
- g.length === 0 && M(Y) && !this.options.tickPositions && g.push((V + Y) / 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(Y) {
- var V = Y.options;
- V = [Y.horiz ? V.left : V.top, V.width, V.height, V.pane].join(), Y.series.length && (g[V] ? L = !0 : g[V] = 1);
- }), L;
- }, X.prototype.getTickAmount = function() {
- var g = this.options, m = g.tickPixelInterval, L = g.tickAmount;
- !M(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, Y = this.tickAmount, V = this.finalTickAmt, Q = L && L.length, k = A(this.threshold, this.softThreshold ? 0 : null);
- if (this.hasData() && h(this.min) && h(this.max)) {
- if (Q < Y) {
- for (; L.length < Y; )
- L.length % 2 || this.min === k ? L.push(B(L[L.length - 1] + m)) : L.unshift(B(L[0] - m));
- this.transA *= (Q - 1) / (Y - 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 > Y && (this.tickInterval *= 2, this.setTickPositions());
- if (M(V)) {
- for (m = g = L.length; m--; )
- (V === 3 && m % 2 === 1 || 2 >= V && 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(Y) {
- g = g || Y.isDirtyData || Y.isDirty, m = m || Y.xAxis && Y.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), c(this, "afterSetScale");
- }, X.prototype.setExtremes = function(g, m, L, Y, V) {
- var Q = this, k = Q.chart;
- L = A(L, !0), Q.series.forEach(function(G) {
- delete G.kdTree;
- }), V = a(V, { min: g, max: m }), c(Q, "setExtremes", V, function() {
- Q.userMin = g, Q.userMax = m, Q.eventArgs = V, L && k.redraw(Y);
- });
- }, X.prototype.zoom = function(g, m) {
- var L = this, Y = this.dataMin, V = this.dataMax, Q = this.options, k = Math.min(Y, A(Q.min, Y)), G = Math.max(V, A(Q.max, V));
- return g = { newMin: g, newMax: m }, c(this, "zoom", g, function(z) {
- var $ = z.newMin, q = z.newMax;
- ($ !== L.min || q !== L.max) && (L.allowZoomOutside || (M(Y) && ($ < k && ($ = k), $ > G && ($ = G)), M(V) && (q < k && (q = k), q > G && (q = G))), L.displayBtn = typeof $ < "u" || typeof q < "u", L.setExtremes($, q, !1, void 0, { trigger: "zoom" })), z.zoomed = !0;
- }), g.zoomed;
- }, X.prototype.setAxisSize = function() {
- var g = this.chart, m = this.options, L = m.offsets || [0, 0, 0, 0], Y = this.horiz, V = this.width = Math.round(_(A(m.width, g.plotWidth - L[3] + L[1]), g.plotWidth)), Q = this.height = Math.round(_(A(m.height, g.plotHeight - L[0] + L[2]), g.plotHeight)), k = this.top = Math.round(_(A(m.top, g.plotTop + L[0]), g.plotHeight, g.plotTop));
- m = this.left = Math.round(_(A(m.left, g.plotLeft + L[3]), g.plotWidth, g.plotLeft)), this.bottom = g.chartHeight - Q - k, this.right = g.chartWidth - V - m, this.len = Math.max(Y ? V : Q, 0), this.pos = Y ? m : k;
- }, X.prototype.getExtremes = function() {
- var g = this.logarithmic;
- return { min: g ? B(g.lin2log(this.min)) : this.min, max: g ? B(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 = (A(g, 0) - 90 * this.side + 720) % 360;
- return g = { align: "center" }, c(
- 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 = A(m[g === "tick" ? "tickWidth" : "minorTickWidth"], g === "tick" && this.isXAxis && !this.categories ? 1 : 0), Y = m[g === "tick" ? "tickLength" : "minorTickLength"];
- if (L && Y) {
- m[g + "Position"] === "inside" && (Y = -Y);
- var V = [Y, L];
- }
- return g = { tickSize: V }, c(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, Y = this.len / (((this.categories ? 1 : 0) + this.max - this.min) / L), V = g.rotation, Q = this.labelMetrics(), k = Math.max(this.max - this.min, 0), G = function(nt) {
- var rt = nt / (Y || 1);
- return rt = 1 < rt ? Math.ceil(rt) : 1, rt * L > k && nt !== 1 / 0 && Y !== 1 / 0 && k && (rt = Math.ceil(k / L)), B(rt * L);
- }, z = L, $, q, it = Number.MAX_VALUE;
- if (m) {
- if (!g.staggerLines && !g.step)
- if (h(V))
- var et = [V];
- else
- Y < g.autoRotationLimit && (et = g.autoRotation);
- et && et.forEach(function(nt) {
- if (nt === V || nt && -90 <= nt && 90 >= nt) {
- q = G(Math.abs(Q.h / Math.sin(u * nt)));
- var rt = q + Math.abs(nt / 360);
- rt < it && (it = rt, $ = nt, z = q);
- }
- });
- } else
- g.step || (z = G(Q.h));
- return this.autoRotation = et, this.labelRotation = A($, h(V) ? V : 0), z;
- }, X.prototype.getSlotWidth = function(g) {
- var m = this.chart, L = this.horiz, Y = this.options.labels, V = Math.max(this.tickPositions.length - (this.categories ? 0 : 1), 1), Q = m.margin[3];
- if (g && h(g.slotWidth))
- return g.slotWidth;
- if (L && 2 > Y.step)
- return Y.rotation ? 0 : (this.staggerLines || 1) * this.len / V;
- if (!L) {
- if (g = Y.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, Y = this.ticks, V = this.options.labels, Q = V.style, k = this.horiz, G = this.getSlotWidth(), z = Math.max(1, Math.round(G - 2 * V.padding)), $ = {}, q = this.labelMetrics(), it = Q.textOverflow, et = 0;
- if (s(V.rotation) || ($.rotation = V.rotation || 0), L.forEach(function(gt) {
- gt = Y[gt], gt.movedLabel && gt.replaceMovedLabel(), gt && gt.label && gt.label.textPxLength > et && (et = gt.label.textPxLength);
- }), this.maxLabelLength = et, this.autoRotation)
- et > z && et > q.h ? $.rotation = this.labelRotation : this.labelRotation = 0;
- else if (G) {
- var nt = z;
- if (!it) {
- var rt = "clip";
- for (z = L.length; !k && z--; ) {
- var ct = L[z];
- (ct = Y[ct].label) && (ct.styles && ct.styles.textOverflow === "ellipsis" ? ct.css({ textOverflow: "clip" }) : ct.textPxLength > G && ct.css({ width: G + "px" }), ct.getBBox().height > this.len / L.length - (q.h - q.f) && (ct.specificTextOverflow = "ellipsis"));
- }
- }
- }
- $.rotation && (nt = et > 0.5 * g.chartHeight ? 0.33 * g.chartHeight : et, it || (rt = "ellipsis")), (this.labelAlign = V.align || this.autoLabelAlign(this.labelRotation)) && ($.align = this.labelAlign), L.forEach(function(gt) {
- var dt = (gt = Y[gt]) && gt.label, ht = Q.width, at = {};
- dt && (dt.attr($), 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 = $.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 && M(this.min) && M(this.max);
- }, X.prototype.addTitle = function(g) {
- var m = this.chart.renderer, L = this.horiz, Y = this.opposite, V = this.options.title, Q = this.chart.styledMode, k;
- this.axisTitle || ((k = V.textAlign) || (k = (L ? { low: "left", middle: "center", high: "right" } : { low: Y ? "right" : "left", middle: "center", high: Y ? "left" : "right" })[V.align]), this.axisTitle = m.text(V.text || "", 0, 0, V.useHTML).attr({ zIndex: 7, rotation: V.rotation, align: k }).addClass("highcharts-axis-title"), Q || this.axisTitle.css(t(V.style)), this.axisTitle.add(this.axisGroup), this.axisTitle.isNew = !0), Q || V.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 F(this, g);
- }, X.prototype.getOffset = function() {
- var g = this, m = this, L = m.chart, Y = m.horiz, V = m.options, Q = m.side, k = m.ticks, G = m.tickPositions, z = m.coll, $ = m.axisParent, q = L.renderer, it = L.inverted && !m.isZAxis ? [1, 0, 3, 2][Q] : Q, et = m.hasData(), nt = V.title, rt = V.labels, ct = L.axisOffset;
- L = L.clipOffset;
- var gt = [
- -1,
- 1,
- 1,
- -1
- ][Q], dt = V.className, ht, at = 0, J = 0, tt = 0;
- if (m.showAxis = ht = et || V.showEmpty, m.staggerLines = m.horiz && rt.staggerLines || void 0, !m.axisGroup) {
- var st = function(pt, yt, vt) {
- return q.g(pt).attr({ zIndex: vt }).addClass("highcharts-" + z.toLowerCase() + yt + " " + (g.isRadial ? "highcharts-radial-axis" + yt + " " : "") + (dt || "")).add($);
- };
- m.gridGroup = st("grid", "-grid", V.gridZIndex), m.axisGroup = st("axis", "", V.zIndex), m.labelGroup = st("axis-labels", "-labels", rt.zIndex);
- }
- if (et || m.isLinked ? (G.forEach(function(pt) {
- m.generateTick(pt);
- }), m.renderUnsquish(), m.reserveSpaceDefault = Q === 0 || Q === 2 || { 1: "left", 3: "right" }[Q] === m.labelAlign, A(rt.reserveSpace, m.labelAlign === "center" ? !0 : null, m.reserveSpaceDefault) && G.forEach(function(pt) {
- tt = Math.max(k[pt].getLabelSize(), tt);
- }), m.staggerLines && (tt *= m.staggerLines), m.labelOffset = tt * (m.opposite ? -1 : 1)) : n(k, function(pt, yt) {
- pt.destroy(), delete k[yt];
- }), nt && nt.text && nt.enabled !== !1 && (m.addTitle(ht), ht && nt.reserveSpace !== !1)) {
- m.titleOffset = at = m.axisTitle.getBBox()[Y ? "height" : "width"];
- var lt = nt.offset;
- J = M(lt) ? 0 : A(nt.margin, Y ? 5 : 10);
- }
- m.renderLine(), m.offset = gt * A(V.offset, ct[Q] ? ct[Q] + (V.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 * (Y ? A(rt.y, m.tickRotCorr.y + 8 * gt) : rt.x)), m.axisTitleMargin = A(lt, et), m.getMaxLabelDimensions && (m.maxLabelDimensions = m.getMaxLabelDimensions(k, G)), z !== "colorAxis" && (Y = this.tickSize("tick"), ct[Q] = Math.max(ct[Q], (m.axisTitleMargin || 0) + at + gt * m.offset, et, G && G.length && Y ? Y[0] + gt * m.offset : 0), V = !m.axisLine || V.offset ? 0 : 2 * Math.floor(m.axisLine.strokeWidth() / 2), L[it] = Math.max(L[it], V)), c(this, "afterGetOffset");
- }, X.prototype.getLinePath = function(g) {
- var m = this.chart, L = this.opposite, Y = this.offset, V = this.horiz, Q = this.left + (L ? this.width : 0) + Y;
- return Y = m.chartHeight - this.bottom - (L ? this.height : 0) + Y, L && (g *= -1), m.renderer.crispLine([["M", V ? this.left : Q, V ? Y : this.top], ["L", V ? m.chartWidth - this.right : Q, V ? Y : 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, Y = this.len, V = this.options.title, Q = g ? m : L, k = this.opposite, G = this.offset, z = V.x, $ = V.y, q = this.axisTitle, it = this.chart.renderer.fontMetrics(V.style.fontSize, q);
- return q = Math.max(q.getBBox(null, 0).height - it.h - 1, 0), Y = { low: Q + (g ? 0 : Y), middle: Q + Y / 2, high: Q + (g ? Y : 0) }[V.align], m = (g ? L + this.height : m) + (g ? 1 : -1) * (k ? -1 : 1) * this.axisTitleMargin + [-q, q, it.f, -q][this.side], g = { x: g ? Y + z : m + (k ? this.width : 0) + G + z, y: g ? m + $ - (k ? this.height : 0) + G : Y + $ }, c(this, "afterGetTitlePosition", { titlePosition: g }), g;
- }, X.prototype.renderMinorTick = function(g, m) {
- var L = this.minorTicks;
- L[g] || (L[g] = new F(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 Y = this.ticks;
- (!this.isLinked || g >= this.min && g <= this.max || this.grid && this.grid.isColumn) && (Y[g] || (Y[g] = new F(this, g)), L && Y[g].isNew && Y[g].render(
- m,
- !0,
- -1
- ), Y[g].render(m));
- }, X.prototype.render = function() {
- var g = this, m = g.chart, L = g.logarithmic, Y = g.options, V = g.isLinked, Q = g.tickPositions, k = g.axisTitle, G = g.ticks, z = g.minorTicks, $ = g.alternateBands, q = Y.stackLabels, it = Y.alternateGridColor, et = g.tickmarkOffset, nt = g.axisLine, rt = g.showAxis, ct = N(m.renderer.globalAnimation), gt, dt;
- if (g.labelEdge.length = 0, g.overlap = !1, [G, z, $].forEach(function(at) {
- n(at, function(J) {
- J.isActive = !1;
- });
- }), g.hasData() || V) {
- var ht = g.chart.hasRendered && g.old && h(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) && (G[-1] || (G[-1] = new F(g, -1, null, !0)), G[-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) && ($[at] || ($[at] = new U.PlotLineOrBand(g)), gt = at + et, $[at].options = { from: L ? L.lin2log(gt) : gt, to: L ? L.lin2log(dt) : dt, color: it, className: "highcharts-alternate-grid" }, $[at].render(), $[at].isActive = !0);
- }), g._addedPlotLB || (g._addedPlotLB = !0, (Y.plotLines || []).concat(Y.plotBands || []).forEach(function(at) {
- g.addPlotBandOrLine(at);
- }));
- }
- [G, z, $].forEach(function(at) {
- var J = [], tt = ct.duration;
- n(at, function(st, lt) {
- st.isActive || (st.render(lt, !1, 0), st.isActive = !1, J.push(lt));
- }), P(function() {
- for (var st = J.length; st--; )
- at[J[st]] && !at[J[st]].isActive && (at[J[st]].destroy(), delete at[J[st]]);
- }, at !== $ && m.hasRendered && tt ? tt : 0);
- }), nt && (nt[nt.isPlaced ? "animate" : "attr"]({ d: this.getLinePath(nt.strokeWidth()) }), nt.isPlaced = !0, nt[rt ? "show" : "hide"](rt)), k && rt && (Y = g.getTitlePosition(), h(Y.y) ? (k[k.isNew ? "attr" : "animate"](Y), k.isNew = !1) : (k.attr("y", -9999), k.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, c(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, Y = this.eventOptions;
- if (c(this, "destroy", { keepEvents: g }), g || D(m), [m.ticks, m.minorTicks, m.alternateBands].forEach(function(Q) {
- S(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 V in m.plotLinesAndBandsGroups)
- m.plotLinesAndBandsGroups[V] = m.plotLinesAndBandsGroups[V].destroy();
- n(m, function(Q, k) {
- m.getKeepProps().indexOf(k) === -1 && delete m[k];
- }), this.eventOptions = Y;
- }, X.prototype.drawCrosshair = function(g, m) {
- var L = this.crosshair, Y = A(L && L.snap, !0), V = this.chart, Q, k = this.cross;
- if (c(this, "drawCrosshair", { e: g, point: m }), g || (g = this.cross && this.cross.e), L && (M(m) || !Y) !== !1) {
- if (Y ? M(m) && (Q = A(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), M(Q)) {
- var G = { value: m && (this.isXAxis ? m.x : A(m.stackY, m.y)), translatedValue: Q };
- V.polar && a(G, { isCrosshair: !0, chartX: g && g.chartX, chartY: g && g.chartY, point: m }), G = this.getPlotLinePath(G) || null;
- }
- if (!M(G)) {
- this.hideCrosshair();
- return;
- }
- Y = this.categories && !this.isRadial, k || (this.cross = k = V.renderer.path().addClass("highcharts-crosshair highcharts-crosshair-" + (Y ? "category " : "thin ") + (L.className || "")).attr({ zIndex: A(L.zIndex, 2) }).add(), V.styledMode || (k.attr({ stroke: L.color || (Y ? I.parse("#ccd6eb").setOpacity(0.25).get() : "#cccccc"), "stroke-width": A(L.width, 1) }).css({ "pointer-events": "none" }), L.dashStyle && k.attr({ dashstyle: L.dashStyle }))), k.show().attr({ d: G }), Y && !L.width && k.attr({ "stroke-width": this.transA }), this.cross.e = g;
- } else
- this.hideCrosshair();
- c(this, "afterDrawCrosshair", { e: g, point: m });
- }, X.prototype.hideCrosshair = function() {
- this.cross && this.cross.hide(), c(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 h(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, A(m, !0) && L.redraw();
- }, X.prototype.remove = function(g) {
- for (var m = this.chart, L = this.coll, Y = this.series, V = Y.length; V--; )
- Y[V] && Y[V].remove(!1);
- w(m.axes, this), w(m[L], this), m[L].forEach(function(Q, k) {
- Q.options.index = Q.userOptions.index = k;
- }), this.destroy(), m.isDirtyBox = !0, A(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 = j.defaultXAxisOptions, X.keepProps = "extKey hcEvents names series userMax userMin".split(" "), X;
- }(), y;
- }), T(l, "Core/Axis/DateTimeAxis.js", [l["Core/Utilities.js"]], function(y) {
- var j = y.addEvent, I = y.getMagnitude, Z = y.normalizeTickInterval, H = y.timeUnits, U;
- return function(F) {
- function R() {
- return this.chart.time.getTimeTicks.apply(this.chart.time, arguments);
- }
- function N(u) {
- u.userOptions.type !== "datetime" ? this.dateTime = void 0 : this.dateTime || (this.dateTime = new x(this));
- }
- var b = [];
- F.compose = function(u) {
- return b.indexOf(u) === -1 && (b.push(u), u.keepProps.push("dateTime"), u.prototype.getTimeTicks = R, j(u, "init", N)), u;
- };
- var x = function() {
- function u(f) {
- this.axis = f;
- }
- return u.prototype.normalizeTimeTickInterval = function(f, E) {
- var O = E || [["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]];
- E = O[O.length - 1];
- var B = H[E[0]], M = E[1], S;
- for (S = 0; S < O.length && (E = O[S], B = H[E[0]], M = E[1], !(O[S + 1] && f <= (B * M[M.length - 1] + H[O[S + 1][0]]) / 2)); S++)
- ;
- return B === H.year && f < 5 * B && (M = [1, 2, 5]), f = Z(f / B, M, E[0] === "year" ? Math.max(I(f / B), 1) : 1), { unitRange: B, count: f, unitName: E[0] };
- }, u.prototype.getXDateFormat = function(f, E) {
- var O = this.axis;
- return O.closestPointRange ? O.chart.time.getDateFormat(O.closestPointRange, f, O.options.startOfWeek, E) || E.year : E.day;
- }, u;
- }();
- F.Additions = x;
- }(U || (U = {})), U;
- }), T(l, "Core/Axis/LogarithmicAxis.js", [l["Core/Utilities.js"]], function(y) {
- var j = y.addEvent, I = y.getMagnitude, Z = y.normalizeTickInterval, H = y.pick, U;
- return function(F) {
- function R(u) {
- var f = this.logarithmic;
- u.userOptions.type !== "logarithmic" ? this.logarithmic = void 0 : f || (this.logarithmic = new x(this));
- }
- function N() {
- var u = this.logarithmic;
- u && (this.lin2val = function(f) {
- return u.lin2log(f);
- }, this.val2lin = function(f) {
- return u.log2lin(f);
- });
- }
- var b = [];
- F.compose = function(u) {
- return b.indexOf(u) === -1 && (b.push(u), u.keepProps.push("logarithmic"), j(u, "init", R), j(u, "afterInit", N)), u;
- };
- var x = function() {
- function u(f) {
- this.axis = f;
- }
- return u.prototype.getLogTickPositions = function(f, E, O, B) {
- var M = this.axis, S = M.len, w = M.options, v = [];
- if (B || (this.minorAutoInterval = void 0), 0.5 <= f)
- f = Math.round(f), v = M.getLinearTickPositions(f, E, O);
- else if (0.08 <= f) {
- var a = Math.floor(E), c, p = w = void 0;
- for (S = 0.3 < f ? [1, 2, 4] : 0.15 < f ? [1, 2, 4, 6, 8] : [1, 2, 3, 4, 5, 6, 7, 8, 9]; a < O + 1 && !p; a++) {
- var i = S.length;
- for (c = 0; c < i && !p; c++) {
- var h = this.log2lin(this.lin2log(a) * S[c]);
- h > E && (!B || w <= O) && typeof w < "u" && v.push(w), w > O && (p = !0), w = h;
- }
- }
- } else
- E = this.lin2log(E), O = this.lin2log(O), f = B ? M.getMinorTickInterval() : w.tickInterval, f = H(f === "auto" ? null : f, this.minorAutoInterval, w.tickPixelInterval / (B ? 5 : 1) * (O - E) / ((B ? S / M.tickPositions.length : S) || 1)), f = Z(f, void 0, I(f)), v = M.getLinearTickPositions(f, E, O).map(this.log2lin), B || (this.minorAutoInterval = f / 5);
- return B || (M.tickInterval = f), v;
- }, u.prototype.lin2log = function(f) {
- return Math.pow(10, f);
- }, u.prototype.log2lin = function(f) {
- return Math.log(f) / Math.LN10;
- }, u;
- }();
- F.Additions = x;
- }(U || (U = {})), U;
- }), T(l, "Core/Axis/PlotLineOrBand/PlotLineOrBandAxis.js", [l["Core/Utilities.js"]], function(y) {
- var j = y.erase, I = y.extend, Z = y.isNumber, H;
- return function(U) {
- var F = [], R;
- U.compose = function(b, x) {
- return R || (R = b), F.indexOf(x) === -1 && (F.push(x), I(x.prototype, N.prototype)), x;
- };
- var N = function() {
- function b() {
- }
- return b.prototype.getPlotBandPath = function(x, u, f) {
- f === void 0 && (f = this.options);
- var E = this.getPlotLinePath({ value: u, force: !0, acrossPanes: f.acrossPanes }), O = [], B = this.horiz;
- if (u = !Z(this.min) || !Z(this.max) || x < this.min && u < this.min || x > this.max && u > this.max, x = this.getPlotLinePath({ value: x, force: !0, acrossPanes: f.acrossPanes }), f = 1, x && E) {
- if (u) {
- var M = x.toString() === E.toString();
- f = 0;
- }
- for (u = 0; u < x.length; u += 2) {
- var S = x[u], w = x[u + 1], v = E[u], a = E[u + 1];
- S[0] !== "M" && S[0] !== "L" || w[0] !== "M" && w[0] !== "L" || v[0] !== "M" && v[0] !== "L" || a[0] !== "M" && a[0] !== "L" || (B && v[1] === S[1] ? (v[1] += f, a[1] += f) : B || v[2] !== S[2] || (v[2] += f, a[2] += f), O.push(["M", S[1], S[2]], ["L", w[1], w[2]], ["L", a[1], a[2]], ["L", v[1], v[2]], ["Z"])), O.isFlat = M;
- }
- }
- return O;
- }, b.prototype.addPlotBand = function(x) {
- return this.addPlotBandOrLine(x, "plotBands");
- }, b.prototype.addPlotLine = function(x) {
- return this.addPlotBandOrLine(
- x,
- "plotLines"
- );
- }, b.prototype.addPlotBandOrLine = function(x, u) {
- var f = this, E = this.userOptions, O = new R(this, x);
- if (this.visible && (O = O.render()), O) {
- if (this._addedPlotLB || (this._addedPlotLB = !0, (E.plotLines || []).concat(E.plotBands || []).forEach(function(M) {
- f.addPlotBandOrLine(M);
- })), u) {
- var B = E[u] || [];
- B.push(x), E[u] = B;
- }
- this.plotLinesAndBands.push(O);
- }
- return O;
- }, b.prototype.removePlotBandOrLine = function(x) {
- var u = this.plotLinesAndBands, f = this.options, E = this.userOptions;
- if (u) {
- for (var O = u.length; O--; )
- u[O].id === x && u[O].destroy();
- [f.plotLines || [], E.plotLines || [], f.plotBands || [], E.plotBands || []].forEach(function(B) {
- for (O = B.length; O--; )
- (B[O] || {}).id === x && j(B, B[O]);
- });
- }
- }, b.prototype.removePlotBand = function(x) {
- this.removePlotBandOrLine(x);
- }, b.prototype.removePlotLine = function(x) {
- this.removePlotBandOrLine(x);
- }, b;
- }();
- }(H || (H = {})), H;
- }), T(l, "Core/Axis/PlotLineOrBand/PlotLineOrBand.js", [l["Core/Axis/PlotLineOrBand/PlotLineOrBandAxis.js"], l["Core/Utilities.js"]], function(y, j) {
- var I = j.arrayMax, Z = j.arrayMin, H = j.defined, U = j.destroyObjectProperties, F = j.erase, R = j.fireEvent, N = j.merge, b = j.objectEach, x = j.pick;
- return j = function() {
- function u(f, E) {
- this.axis = f, E && (this.options = E, this.id = E.id);
- }
- return u.compose = function(f) {
- return y.compose(u, f);
- }, u.prototype.render = function() {
- R(this, "render");
- var f = this, E = f.axis, O = E.horiz, B = E.logarithmic, M = f.options, S = M.color, w = x(M.zIndex, 0), v = M.events, a = {}, c = E.chart.renderer, p = M.label, i = f.label, h = M.to, s = M.from, t = M.value, o = f.svgElem, n = [], A = H(s) && H(h);
- n = H(t);
- var _ = !o, D = { class: "highcharts-plot-" + (A ? "band " : "line ") + (M.className || "") }, W = A ? "bands" : "lines";
- if (B && (s = B.log2lin(s), h = B.log2lin(h), t = B.log2lin(t)), E.chart.styledMode || (n ? (D.stroke = S || "#999999", D["stroke-width"] = x(M.width, 1), M.dashStyle && (D.dashstyle = M.dashStyle)) : A && (D.fill = S || "#e6ebf5", M.borderWidth && (D.stroke = M.borderColor, D["stroke-width"] = M.borderWidth))), a.zIndex = w, W += "-" + w, (B = E.plotLinesAndBandsGroups[W]) || (E.plotLinesAndBandsGroups[W] = B = c.g("plot-" + W).attr(a).add()), _ && (f.svgElem = o = c.path().attr(D).add(B)), n)
- n = E.getPlotLinePath({
- value: t,
- lineWidth: o.strokeWidth(),
- acrossPanes: M.acrossPanes
- });
- else if (A)
- n = E.getPlotBandPath(s, h, M);
- else
- return;
- return !f.eventsAdded && v && (b(v, function(P, X) {
- o.on(X, function(g) {
- v[X].apply(f, [g]);
- });
- }), f.eventsAdded = !0), (_ || !o.d) && n && n.length ? o.attr({ d: n }) : o && (n ? (o.show(!0), o.animate({ d: n })) : o.d && (o.hide(), i && (f.label = i = i.destroy()))), p && (H(p.text) || H(p.formatter)) && n && n.length && 0 < E.width && 0 < E.height && !n.isFlat ? (p = N({ align: O && A && "center", x: O ? !A && 4 : 10, verticalAlign: !O && A && "middle", y: O ? A ? 16 : 10 : A ? 6 : -4, rotation: O && !A && 90 }, p), this.renderLabel(
- p,
- n,
- A,
- w
- )) : i && i.hide(), f;
- }, u.prototype.renderLabel = function(f, E, O, B) {
- var M = this.axis, S = M.chart.renderer, w = this.label;
- w || (this.label = w = S.text(this.getLabelText(f), 0, 0, f.useHTML).attr({ align: f.textAlign || f.align, rotation: f.rotation, class: "highcharts-plot-" + (O ? "band" : "line") + "-label " + (f.className || ""), zIndex: B }).add(), M.chart.styledMode || w.css(N({ textOverflow: "ellipsis" }, f.style))), B = E.xBounds || [E[0][1], E[1][1], O ? E[2][1] : E[0][1]], E = E.yBounds || [E[0][2], E[1][2], O ? E[2][2] : E[0][2]], O = Z(B), S = Z(E), w.align(
- f,
- !1,
- { x: O, y: S, width: I(B) - O, height: I(E) - S }
- ), w.alignValue && w.alignValue !== "left" || w.css({ width: (w.rotation === 90 ? M.height - (w.alignAttr.y - M.top) : M.width - (w.alignAttr.x - M.left)) + "px" }), w.show(!0);
- }, u.prototype.getLabelText = function(f) {
- return H(f.formatter) ? f.formatter.call(this) : f.text;
- }, u.prototype.destroy = function() {
- F(this.axis.plotLinesAndBands, this), delete this.axis, U(this);
- }, u;
- }(), j;
- }), T(l, "Core/Tooltip.js", [
- l["Core/FormatUtilities.js"],
- l["Core/Globals.js"],
- l["Core/Renderer/RendererUtilities.js"],
- l["Core/Renderer/RendererRegistry.js"],
- l["Core/Utilities.js"]
- ], function(y, j, I, Z, H) {
- var U = y.format, F = j.doc, R = I.distribute, N = H.addEvent, b = H.clamp, x = H.css, u = H.defined, f = H.discardElement, E = H.extend, O = H.fireEvent, B = H.isArray, M = H.isNumber, S = H.isString, w = H.merge, v = H.pick, a = H.splat, c = H.syncTimeout;
- return y = function() {
- function p(i, h) {
- 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, h);
- }
- return p.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" } }] }] });
- }, p.prototype.bodyFormatter = function(i) {
- return i.map(function(h) {
- var s = h.series.tooltipOptions;
- return (s[(h.point.formatPrefix || "point") + "Formatter"] || h.point.tooltipFormatter).call(h.point, s[(h.point.formatPrefix || "point") + "Format"] || "");
- });
- }, p.prototype.cleanSplit = function(i) {
- this.chart.series.forEach(function(h) {
- var s = h && h.tt;
- s && (!s.isActive || i ? h.tt = s.destroy() : s.isActive = !1);
- });
- }, p.prototype.defaultFormatter = function(i) {
- var h = this.points || a(this), s = [i.tooltipFooterHeaderFormatter(h[0])];
- return s = s.concat(i.bodyFormatter(h)), s.push(i.tooltipFooterHeaderFormatter(
- h[0],
- !0
- )), s;
- }, p.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(), f(this.container)), H.clearTimeout(this.hideTimer), H.clearTimeout(this.tooltipTimeout);
- }, p.prototype.getAnchor = function(i, h) {
- var s = this.chart, t = s.pointer, o = s.inverted, n = s.plotTop, A = s.plotLeft, _, D, W = 0, P = 0;
- return i = a(i), this.followPointer && h ? (typeof h.chartX > "u" && (h = t.normalize(h)), t = [h.chartX - A, h.chartY - n]) : i[0].tooltipPos ? t = i[0].tooltipPos : (i.forEach(function(X) {
- _ = X.series.yAxis, D = X.series.xAxis, W += X.plotX || 0, P += X.plotLow ? (X.plotLow + (X.plotHigh || 0)) / 2 : X.plotY || 0, D && _ && (o ? (W += n + s.plotHeight - D.len - D.pos, P += A + s.plotWidth - _.len - _.pos) : (W += D.pos - A, P += _.pos - n));
- }), W /= i.length, P /= i.length, t = [o ? s.plotWidth - P : W, o ? s.plotHeight - W : P], this.shared && 1 < i.length && h && (o ? t[0] = h.chartX - A : t[1] = h.chartY - n)), t.map(Math.round);
- }, p.prototype.getLabel = function() {
- var i = this, h = this.chart.styledMode, s = this.options, t = this.split && this.allowShared, o = "tooltip" + (u(s.className) ? " " + s.className : ""), n = s.style.pointerEvents || (!this.followPointer && s.stickOnContact ? "auto" : "none"), A = function() {
- i.inContact = !0;
- }, _ = function(Y) {
- var V = i.chart.hoverSeries;
- i.inContact = i.shouldStickOnContact() && i.chart.pointer.inClass(Y.relatedTarget, "highcharts-tooltip"), !i.inContact && V && V.onMouseOut && V.onMouseOut();
- }, D, W = this.chart.renderer;
- if (i.label) {
- var P = !i.label.hasClass("highcharts-label");
- (t && !P || !t && P) && i.destroy();
- }
- if (!this.label) {
- if (this.outside) {
- P = this.chart.options.chart.style;
- var X = Z.getRendererType();
- this.container = D = j.doc.createElement("div"), D.className = "highcharts-tooltip-container", x(D, { position: "absolute", top: "1px", pointerEvents: n, zIndex: Math.max(this.options.style.zIndex || 0, (P && P.zIndex || 0) + 3) }), N(D, "mouseenter", A), N(D, "mouseleave", _), j.doc.body.appendChild(D), this.renderer = W = new X(D, 0, 0, P, void 0, void 0, W.styledMode);
- }
- if (t ? this.label = W.g(o) : (this.label = W.label("", 0, 0, s.shape, void 0, void 0, s.useHTML, void 0, o).attr({ padding: s.padding, r: s.borderRadius }), h || this.label.attr({ fill: s.backgroundColor, "stroke-width": s.borderWidth }).css(s.style).css({ pointerEvents: n }).shadow(s.shadow)), h && s.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(Y) {
- m.call(g, i.distance), D.style.left = Y + "px";
- }, g.ySetter = function(Y) {
- L.call(g, i.distance), D.style.top = Y + "px";
- };
- }
- this.label.on("mouseenter", A).on("mouseleave", _).attr({ zIndex: 8 }).add();
- }
- return this.label;
- }, p.prototype.getPosition = function(i, h, s) {
- var t = this.chart, o = this.distance, n = {}, A = t.inverted && s.h || 0, _ = this.outside, D = _ ? F.documentElement.clientWidth - 2 * o : t.chartWidth, W = _ ? Math.max(F.body.scrollHeight, F.documentElement.scrollHeight, F.body.offsetHeight, F.documentElement.offsetHeight, F.documentElement.clientHeight) : t.chartHeight, P = t.pointer.getChartPosition(), X = function(z) {
- var $ = z === "x";
- return [z, $ ? D : W, $ ? i : h].concat(_ ? [$ ? i * P.scaleX : h * P.scaleY, $ ? P.left - o + (s.plotX + t.plotLeft) * P.scaleX : P.top - o + (s.plotY + t.plotTop) * P.scaleY, 0, $ ? D : W] : [$ ? i : h, $ ? s.plotX + t.plotLeft : s.plotY + t.plotTop, $ ? t.plotLeft : t.plotTop, $ ? t.plotLeft + t.plotWidth : t.plotTop + t.plotHeight]);
- }, g = X("y"), m = X("x"), L;
- X = !!s.negative, !t.polar && t.hoverSeries && t.hoverSeries.yAxis && t.hoverSeries.yAxis.reversed && (X = !X);
- var Y = !this.followPointer && v(s.ttBelow, !t.inverted === X), V = function(z, $, q, it, et, nt, rt) {
- var ct = _ ? z === "y" ? o * P.scaleY : o * P.scaleX : o, gt = (q - it) / 2, dt = it < et - o, ht = et + o + it < $, at = et - ct - q + gt;
- if (et = et + ct - gt, Y && ht)
- n[z] = et;
- else if (!Y && dt)
- n[z] = at;
- else if (dt)
- n[z] = Math.min(rt - it, 0 > at - A ? at : at - A);
- else if (ht)
- n[z] = Math.max(nt, et + A + q > $ ? et : et + A);
- else
- return !1;
- }, Q = function(z, $, q, it, et) {
- var nt;
- return et < o || et > $ - o ? nt = !1 : n[z] = et < q / 2 ? 1 : et > $ - it / 2 ? $ - it - 2 : et - q / 2, nt;
- }, k = function(z) {
- var $ = g;
- g = m, m = $, L = z;
- }, G = function() {
- V.apply(0, g) !== !1 ? Q.apply(0, m) !== !1 || L || (k(!0), G()) : L ? n.x = n.y = 0 : (k(!0), G());
- };
- return (t.inverted || 1 < this.len) && k(), G(), n;
- }, p.prototype.hide = function(i) {
- var h = this;
- H.clearTimeout(this.hideTimer), i = v(i, this.options.hideDelay), this.isHidden || (this.hideTimer = c(function() {
- h.getLabel().fadeOut(i && void 0), h.isHidden = !0;
- }, i));
- }, p.prototype.init = function(i, h) {
- this.chart = i, this.options = h, this.crosshairs = [], this.now = { x: 0, y: 0 }, this.isHidden = !0, this.split = h.split && !i.inverted && !i.polar, this.shared = h.shared || this.split, this.outside = v(h.outside, !(!i.scrollablePixelsX && !i.scrollablePixelsY));
- }, p.prototype.shouldStickOnContact = function() {
- return !(this.followPointer || !this.options.stickOnContact);
- }, p.prototype.isStickyOnContact = function() {
- return !(!this.shouldStickOnContact() || !this.inContact);
- }, p.prototype.move = function(i, h, s, t) {
- var o = this, n = o.now, A = o.options.animation !== !1 && !o.isHidden && (1 < Math.abs(i - n.x) || 1 < Math.abs(h - n.y)), _ = o.followPointer || 1 < o.len;
- E(n, { x: A ? (2 * n.x + i) / 3 : i, y: A ? (n.y + h) / 2 : h, anchorX: _ ? void 0 : A ? (2 * n.anchorX + s) / 3 : s, anchorY: _ ? void 0 : A ? (n.anchorY + t) / 2 : t }), o.getLabel().attr(n), o.drawTracker(), A && (H.clearTimeout(this.tooltipTimeout), this.tooltipTimeout = setTimeout(function() {
- o && o.move(i, h, s, t);
- }, 32));
- }, p.prototype.refresh = function(i, h) {
- var s = this.chart, t = this.options, o = a(i), n = o[0], A = [], _ = t.formatter || this.defaultFormatter, D = this.shared, W = s.styledMode, P = {};
- if (t.enabled) {
- H.clearTimeout(this.hideTimer), this.allowShared = !(!B(i) && i.series && i.series.noSharedTooltip), this.followPointer = !this.split && n.series.tooltipOptions.followPointer, i = this.getAnchor(i, h);
- var X = i[0], g = i[1];
- if (D && this.allowShared ? (s.pointer.applyInactiveState(o), o.forEach(function(Y) {
- Y.setState("hover"), A.push(Y.getLabelConfig());
- }), P = { x: n.category, y: n.y }, P.points = A) : P = n.getLabelConfig(), this.len = A.length, _ = _.call(P, this), D = n.series, this.distance = v(
- D.tooltipOptions.distance,
- 16
- ), _ === !1)
- this.hide();
- else {
- if (this.split && this.allowShared)
- this.renderSplit(_, o);
- else {
- var m = X, L = g;
- if (h && s.pointer.isDirectTouch && (m = h.chartX - s.plotLeft, L = h.chartY - s.plotTop), s.polar || D.options.clip === !1 || o.some(function(Y) {
- return Y.series.shouldShowTooltip(m, L);
- }))
- h = this.getLabel(), t.style.width && !W || h.css({ width: this.chart.spacingBox.width + "px" }), h.attr({ text: _ && _.join ? _.join("") : _ }), h.removeClass(/highcharts-color-[\d]+/g).addClass("highcharts-color-" + v(n.colorIndex, D.colorIndex)), W || h.attr({ stroke: t.borderColor || n.color || D.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");
- }
- }, p.prototype.renderSplit = function(i, h) {
- function s(ht, at, J, tt, st) {
- return st === void 0 && (st = !0), J ? (at = it ? 0 : ct, ht = b(ht - tt / 2, z.left, z.right - tt - (t.outside ? et : 0))) : (at -= nt, ht = st ? ht - tt - Q : ht + Q, ht = b(ht, st ? ht : z.left, z.right)), { x: ht, y: at };
- }
- var t = this, o = t.chart, n = t.chart, A = n.chartWidth, _ = n.chartHeight, D = n.plotHeight, W = n.plotLeft, P = 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 Y = L.scrollLeft;
- L = L.scrollTop;
- var V = n.styledMode, Q = t.distance, k = t.options, G = t.options.positioner, z = t.outside && typeof m != "number" ? F.documentElement.getBoundingClientRect() : { left: Y, right: Y + A, top: L, bottom: L + _ }, $ = t.getLabel(), q = this.renderer || o.renderer, it = !(!o.xAxis[0] || !o.xAxis[0].opposite);
- o = X.getChartPosition();
- var et = o.left;
- o = o.top;
- var nt = P + L, rt = 0, ct = D - g;
- S(i) && (i = [!1, i]), i = i.slice(0, h.length + 1).reduce(function(ht, at, J) {
- if (at !== !1 && at !== "") {
- J = h[J - 1] || { isHeader: !0, plotX: h[0].plotX, plotY: D, series: {} };
- var tt = J.isHeader, st = tt ? t : J.series;
- at = at.toString();
- var lt = st.tt, pt = J.isHeader, yt = J.series, vt = "highcharts-color-" + v(J.colorIndex, yt.colorIndex, "none");
- if (lt || (lt = { padding: k.padding, r: k.borderRadius }, V || (lt.fill = k.backgroundColor, lt["stroke-width"] = k.borderWidth), lt = q.label("", 0, 0, k[pt ? "headerShape" : "shape"], void 0, void 0, k.useHTML).addClass((pt ? "highcharts-tooltip-header " : "") + "highcharts-tooltip-box " + vt).attr(lt).add($)), lt.isActive = !0, lt.attr({ text: at }), V || lt.css(k.style).shadow(k.shadow).attr({ stroke: k.borderColor || J.color || yt.color || "#333333" }), st = st.tt = lt, pt = st.getBBox(), at = pt.width + st.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 = P + D / 2;
- } else {
- var Pt = lt.xAxis, At = lt.yAxis;
- yt = Pt.pos + b(yt, -Q, Pt.len + Q), lt.shouldShowTooltip(0, At.pos - P + vt, { ignoreX: !0 }) && (Mt = At.pos + vt);
- }
- yt = b(
- yt,
- z.left - Q,
- z.right + Q
- ), typeof Mt == "number" ? (pt = pt.height + 1, vt = G ? G.call(t, at, pt, J) : s(yt, Mt, tt, at), ht.push({ align: G ? 0 : void 0, anchorX: yt, anchorY: Mt, boxWidth: at, point: J, rank: v(vt.rank, tt ? 1 : 0), size: pt, target: vt.y, tt: st, x: vt.x })) : st.isActive = !1;
- }
- return ht;
- }, []), !G && i.some(function(ht) {
- var at = (t.outside ? et : 0) + ht.anchorX;
- return at < z.left && at + ht.boxWidth < z.right ? !0 : at < et - z.left + ht.boxWidth && z.right - at > at;
- }) && (i = i.map(function(ht) {
- var at = s(ht.anchorX, ht.anchorY, ht.point.isHeader, ht.boxWidth, !1);
- return E(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, st = 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 && (st || (tt.x = at + lt, tt.anchorX = J + lt), st && (tt.x = (dt - gt) / 2, tt.anchorX = J + lt));
- }
- ht.tt.attr(tt);
- }), i = t.container, g = t.renderer, t.outside && i && g && (n = $.getBBox(), g.setSize(n.width + n.x, n.height + n.y, !1), i.style.left = gt + "px", i.style.top = o + "px");
- }, p.prototype.drawTracker = function() {
- if (this.followPointer || !this.options.stickOnContact)
- this.tracker && this.tracker.destroy();
- else {
- var i = this.chart, h = this.label, s = this.shared ? i.hoverPoints : i.hoverPoint;
- if (h && s) {
- var t = { x: 0, y: 0, width: 0, height: 0 };
- s = this.getAnchor(s);
- var o = h.getBBox();
- s[0] += i.plotLeft - h.translateX, s[1] += i.plotTop - h.translateY, t.x = Math.min(0, s[0]), t.y = Math.min(0, s[1]), t.width = 0 > s[0] ? Math.max(Math.abs(s[0]), o.width - s[0]) : Math.max(
- Math.abs(s[0]),
- o.width
- ), t.height = 0 > s[1] ? Math.max(Math.abs(s[1]), o.height - Math.abs(s[1])) : Math.max(Math.abs(s[1]), o.height), this.tracker ? this.tracker.attr(t) : (this.tracker = h.renderer.rect(t).addClass("highcharts-tracker").add(h), i.styledMode || this.tracker.attr({ fill: "rgba(0,0,0,0)" }));
- }
- }
- }, p.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}"');
- }, p.prototype.tooltipFooterHeaderFormatter = function(i, h) {
- var s = i.series, t = s.tooltipOptions, o = s.xAxis, n = o && o.dateTime;
- o = { isFooter: h, labelConfig: i };
- var A = t.xDateFormat, _ = t[h ? "footerFormat" : "headerFormat"];
- return O(this, "headerFormatter", o, function(D) {
- n && !A && M(i.key) && (A = n.getXDateFormat(i.key, t.dateTimeLabelFormats)), n && A && (i.point && i.point.tooltipDateKeys || ["key"]).forEach(function(W) {
- _ = _.replace("{point." + W + "}", "{point." + W + ":" + A + "}");
- }), s.chart.styledMode && (_ = this.styledModeFormat(_)), D.text = U(_, { point: i, series: s }, this.chart);
- }), o.text;
- }, p.prototype.update = function(i) {
- this.destroy(), w(!0, this.chart.options.tooltip.userOptions, i), this.init(this.chart, w(!0, this.options, i));
- }, p.prototype.updatePosition = function(i) {
- var h = this.chart, s = this.options, t = h.pointer, o = this.getLabel();
- t = t.getChartPosition();
- var n = (s.positioner || this.getPosition).call(this, o.width, o.height, i), A = i.plotX + h.plotLeft;
- i = i.plotY + h.plotTop, this.outside && (s = s.borderWidth + 2 * this.distance, this.renderer.setSize(o.width + s, o.height + s, !1), (t.scaleX !== 1 || t.scaleY !== 1) && (x(this.container, { transform: "scale(" + t.scaleX + ", " + t.scaleY + ")" }), A *= t.scaleX, i *= t.scaleY), A += t.left - n.x, i += t.top - n.y), this.move(Math.round(n.x), Math.round(n.y || 0), A, i);
- }, p;
- }(), y;
- }), T(l, "Core/Series/Point.js", [l["Core/Renderer/HTML/AST.js"], l["Core/Animation/AnimationUtilities.js"], l["Core/DefaultOptions.js"], l["Core/FormatUtilities.js"], l["Core/Utilities.js"]], function(y, j, I, Z, H) {
- var U = j.animObject, F = I.defaultOptions, R = Z.format, N = H.addEvent, b = H.defined, x = H.erase, u = H.extend, f = H.fireEvent, E = H.getNestedProperty, O = H.isArray, B = H.isFunction, M = H.isNumber, S = H.isObject, w = H.merge, v = H.objectEach, a = H.pick, c = H.syncTimeout, p = H.removeEvent, i = H.uniqueKey;
- return j = function() {
- function h() {
- 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 h.prototype.animateBeforeDestroy = function() {
- var s = this, t = { x: s.startXPos, opacity: 0 }, o = s.getGraphicalProps();
- o.singular.forEach(function(n) {
- s[n] = s[n].animate(n === "dataLabel" ? { x: s[n].startXPos, y: s[n].startYPos, opacity: 0 } : t);
- }), o.plural.forEach(function(n) {
- s[n].forEach(function(A) {
- A.element && A.animate(u({ x: s.startXPos }, A.startYPos ? { x: A.startXPos, y: A.startYPos } : {}));
- });
- });
- }, h.prototype.applyOptions = function(s, t) {
- var o = this.series, n = o.options.pointValKey || o.pointValKey;
- return s = h.prototype.optionsToObject.call(this, s), u(this, s), this.options = this.options ? u(this.options, s) : s, s.group && delete this.group, s.dataLabels && delete this.dataLabels, n && (this.y = h.prototype.getNestedProperty.call(
- this,
- n
- )), this.formatPrefix = (this.isNull = a(this.isValid && !this.isValid(), this.x === null || !M(this.y))) ? "null" : "point", this.selected && (this.state = "select"), "name" in this && typeof t > "u" && o.xAxis && o.xAxis.hasNames && (this.x = o.xAxis.nameToX(this)), typeof this.x > "u" && o ? this.x = typeof t > "u" ? o.autoIncrement() : t : M(s.x) && o.options.relativeXValue && (this.x = o.autoIncrement(s.x)), this;
- }, h.prototype.destroy = function() {
- function s() {
- (t.graphic || t.dataLabel || t.dataLabels) && (p(t), t.destroyElements());
- for (D in t)
- t[D] = null;
- }
- var t = this, o = t.series, n = o.chart;
- o = o.options.dataSorting;
- var A = n.hoverPoints, _ = U(t.series.chart.renderer.globalAnimation), D;
- t.legendItem && n.legend.destroyItem(t), A && (t.setState(), x(A, t), A.length || (n.hoverPoints = null)), t === n.hoverPoint && t.onMouseOut(), o && o.enabled ? (this.animateBeforeDestroy(), c(s, _.duration)) : s(), n.pointCount--;
- }, h.prototype.destroyElements = function(s) {
- var t = this;
- s = t.getGraphicalProps(s), s.singular.forEach(function(o) {
- t[o] = t[o].destroy();
- }), s.plural.forEach(function(o) {
- t[o].forEach(function(n) {
- n.element && n.destroy();
- }), delete t[o];
- });
- }, h.prototype.firePointEvent = function(s, t, o) {
- var n = this, A = this.series.options;
- (A.point.events[s] || n.options && n.options.events && n.options.events[s]) && n.importEvents(), s === "click" && A.allowPointSelect && (o = function(_) {
- n.select && n.select(null, _.ctrlKey || _.metaKey || _.shiftKey);
- }), f(n, s, t, o);
- }, h.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", "") : "");
- }, h.prototype.getGraphicalProps = function(s) {
- var t = this, o = [], n = { singular: [], plural: [] }, A;
- for (s = s || { graphic: 1, dataLabel: 1 }, s.graphic && o.push("graphic", "upperGraphic", "shadowGroup"), s.dataLabel && o.push("dataLabel", "dataLabelUpper", "connector"), A = o.length; A--; ) {
- var _ = o[A];
- t[_] && n.singular.push(_);
- }
- return ["dataLabel", "connector"].forEach(function(D) {
- var W = D + "s";
- s[D] && t[W] && n.plural.push(W);
- }), n;
- }, h.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 };
- }, h.prototype.getNestedProperty = function(s) {
- if (s)
- return s.indexOf("custom.") === 0 ? E(s, this.options) : this[s];
- }, h.prototype.getZone = function() {
- var s = this.series, t = s.zones;
- s = s.zoneAxis || "y";
- var o, n = 0;
- for (o = t[n]; this[s] >= o.value; )
- o = t[++n];
- return this.nonZonedColor || (this.nonZonedColor = this.color), this.color = o && o.color && !this.options.color ? o.color : this.nonZonedColor, o;
- }, h.prototype.hasNewShapeType = function() {
- return (this.graphic && (this.graphic.symbolName || this.graphic.element.nodeName)) !== this.shapeType;
- }, h.prototype.init = function(s, t, o) {
- return this.series = s, this.applyOptions(t, o), this.id = b(this.id) ? this.id : i(), this.resolveColor(), s.chart.pointCount++, f(this, "afterInit"), this;
- }, h.prototype.optionsToObject = function(s) {
- var t = this.series, o = t.options.keys, n = o || t.pointArrayMap || ["y"], A = n.length, _ = {}, D = 0, W = 0;
- if (M(s) || s === null)
- _[n[0]] = s;
- else if (O(s))
- for (!o && s.length > A && (t = typeof s[0], t === "string" ? _.name = s[0] : t === "number" && (_.x = s[0]), D++); W < A; )
- o && typeof s[D] > "u" || (0 < n[W].indexOf(".") ? h.prototype.setNestedProperty(_, s[D], n[W]) : _[n[W]] = s[D]), D++, W++;
- else
- typeof s == "object" && (_ = s, s.dataLabels && (t._hasPointLabels = !0), s.marker && (t._hasPointMarkers = !0));
- return _;
- }, h.prototype.resolveColor = function() {
- var s = this.series, t = s.chart.styledMode, o = s.chart.options.chart.colorCount;
- if (delete this.nonZonedColor, s.options.colorByPoint) {
- if (!t) {
- o = s.options.colors || s.chart.options.colors;
- var n = o[s.colorCounter];
- o = o.length;
- }
- t = s.colorCounter, s.colorCounter++, s.colorCounter === o && (s.colorCounter = 0);
- } else
- t || (n = s.color), t = s.colorIndex;
- this.colorIndex = a(this.options.colorIndex, t), this.color = a(this.options.color, n);
- }, h.prototype.setNestedProperty = function(s, t, o) {
- return o.split(".").reduce(function(n, A, _, D) {
- return n[A] = D.length - 1 === _ ? t : S(n[A], !0) ? n[A] : {}, n[A];
- }, s), s;
- }, h.prototype.tooltipFormatter = function(s) {
- var t = this.series, o = t.tooltipOptions, n = a(o.valueDecimals, ""), A = o.valuePrefix || "", _ = o.valueSuffix || "";
- return t.chart.styledMode && (s = t.chart.tooltip.styledModeFormat(s)), (t.pointArrayMap || ["y"]).forEach(function(D) {
- D = "{point." + D, (A || _) && (s = s.replace(RegExp(D + "}", "g"), A + D + "}" + _)), s = s.replace(RegExp(D + "}", "g"), D + ":,." + n + "f}");
- }), R(s, { point: this, series: this.series }, t.chart);
- }, h.prototype.update = function(s, t, o, n) {
- function A() {
- _.applyOptions(s);
- var m = W && _.hasDummyGraphic;
- m = _.y === null ? !m : m, W && m && (_.graphic = W.destroy(), delete _.hasDummyGraphic), S(s, !0) && (W && W.element && s && s.marker && typeof s.marker.symbol < "u" && (_.graphic = W.destroy()), s && s.dataLabels && _.dataLabel && (_.dataLabel = _.dataLabel.destroy()), _.connector && (_.connector = _.connector.destroy())), g = _.index, D.updateParallelArrays(_, g), X.data[g] = S(X.data[g], !0) || S(s, !0) ? _.options : a(s, X.data[g]), D.isDirty = D.isDirtyData = !0, !D.fixedBox && D.hasCartesianSeries && (P.isDirtyBox = !0), X.legendType === "point" && (P.isDirtyLegend = !0), t && P.redraw(o);
- }
- var _ = this, D = _.series, W = _.graphic, P = D.chart, X = D.options, g;
- t = a(t, !0), n === !1 ? A() : _.firePointEvent("update", { options: s }, A);
- }, h.prototype.remove = function(s, t) {
- this.series.removePoint(this.series.data.indexOf(this), s, t);
- }, h.prototype.select = function(s, t) {
- var o = this, n = o.series, A = n.chart;
- this.selectedStaging = s = a(s, !o.selected), o.firePointEvent(s ? "select" : "unselect", { accumulate: t }, function() {
- o.selected = o.options.selected = s, n.options.data[n.data.indexOf(o)] = o.options, o.setState(s && "select"), t || A.getSelectedPoints().forEach(function(_) {
- var D = _.series;
- _.selected && _ !== o && (_.selected = _.options.selected = !1, D.options.data[D.data.indexOf(_)] = _.options, _.setState(A.hoverPoints && D.options.inactiveOtherPoints ? "inactive" : ""), _.firePointEvent("unselect"));
- });
- }), delete this.selectedStaging;
- }, h.prototype.onMouseOver = function(s) {
- var t = this.series.chart, o = t.pointer;
- s = s ? o.normalize(s) : o.getChartCoordinatesFromPoint(this, t.inverted), o.runPointActions(
- s,
- this
- );
- }, h.prototype.onMouseOut = function() {
- var s = this.series.chart;
- this.firePointEvent("mouseOut"), this.series.options.inactiveOtherPoints || (s.hoverPoints || []).forEach(function(t) {
- t.setState();
- }), s.hoverPoints = s.hoverPoint = null;
- }, h.prototype.importEvents = function() {
- if (!this.hasImportedEvents) {
- var s = this, t = w(s.series.options.point, s.options).events;
- s.events = t, v(t, function(o, n) {
- B(o) && N(s, n, o);
- }), this.hasImportedEvents = !0;
- }
- }, h.prototype.setState = function(s, t) {
- var o = this.series, n = this.state, A = o.options.states[s || "normal"] || {}, _ = F.plotOptions[o.type].marker && o.options.marker, D = _ && _.enabled === !1, W = _ && _.states && _.states[s || "normal"] || {}, P = W.enabled === !1, X = this.marker || {}, g = o.chart, m = _ && o.markerAttribs, L = o.halo, Y, V = o.stateMarkerGraphic;
- if (s = s || "", !(s === this.state && !t || this.selected && s !== "select" || A.enabled === !1 || s && (P || D && W.enabled === !1) || s && X.states && X.states[s] && X.states[s].enabled === !1)) {
- if (this.state = s, m && (Y = o.markerAttribs(this, s)), this.graphic && !this.hasDummyGraphic) {
- if (n && this.graphic.removeClass("highcharts-point-" + n), s && this.graphic.addClass("highcharts-point-" + s), !g.styledMode) {
- var Q = o.pointAttribs(this, s), k = a(g.options.chart.animation, A.animation);
- o.options.inactiveOtherPoints && M(Q.opacity) && ((this.dataLabels || []).forEach(function(G) {
- G && G.animate({ opacity: Q.opacity }, k);
- }), this.connector && this.connector.animate({ opacity: Q.opacity }, k)), this.graphic.animate(Q, k);
- }
- Y && this.graphic.animate(Y, a(g.options.chart.animation, W.animation, _.animation)), V && V.hide();
- } else
- s && W && (n = X.symbol || o.symbol, V && V.currentSymbol !== n && (V = V.destroy()), Y && (V ? V[t ? "animate" : "attr"]({ x: Y.x, y: Y.y }) : n && (o.stateMarkerGraphic = V = g.renderer.symbol(n, Y.x, Y.y, Y.width, Y.height).add(o.markerGroup), V.currentSymbol = n)), !g.styledMode && V && this.state !== "inactive" && V.attr(o.pointAttribs(this, s))), V && (V[s && this.isInside ? "show" : "hide"](), V.element.point = this, V.addClass(this.getClassName(), !0));
- A = A.halo, Y = (V = this.graphic || V) && V.visibility || "inherit", A && A.size && V && Y !== "hidden" && !this.isCluster ? (L || (o.halo = L = g.renderer.path().add(V.parentGroup)), L.show()[t ? "animate" : "attr"]({ d: this.haloPath(A.size) }), L.attr({ class: "highcharts-halo highcharts-color-" + a(this.colorIndex, o.colorIndex) + (this.className ? " " + this.className : ""), visibility: Y, zIndex: -1 }), L.point = this, g.styledMode || L.attr(u({ fill: this.color || o.color, "fill-opacity": A.opacity }, y.filterUserAttributes(A.attributes || {})))) : L && L.point && L.point.haloPath && L.animate({ d: L.point.haloPath(0) }, null, L.hide), f(this, "afterSetState", { state: s });
- }
- }, h.prototype.haloPath = function(s) {
- return this.series.chart.renderer.symbols.circle(Math.floor(this.plotX) - s, this.plotY - s, 2 * s, 2 * s);
- }, h;
- }(), j;
- }), T(l, "Core/Pointer.js", [l["Core/Color/Color.js"], l["Core/Globals.js"], l["Core/Tooltip.js"], l["Core/Utilities.js"]], function(y, j, I, Z) {
- var H = y.parse, U = j.charts, F = j.noop, R = Z.addEvent, N = Z.attr, b = Z.css, x = Z.defined, u = Z.extend, f = Z.find, E = Z.fireEvent, O = Z.isNumber, B = Z.isObject, M = Z.objectEach, S = Z.offset, w = Z.pick, v = Z.splat;
- return y = function() {
- function a(c, p) {
- this.lastValidTouch = {}, this.pinchDown = [], this.runChartClick = !1, this.eventsToUnbind = [], this.chart = c, this.hasDragged = !1, this.options = p, this.init(c, p);
- }
- return a.prototype.applyInactiveState = function(c) {
- var p = [], i;
- (c || []).forEach(function(h) {
- i = h.series, p.push(i), i.linkedParent && p.push(i.linkedParent), i.linkedSeries && (p = p.concat(i.linkedSeries)), i.navigatorSeries && p.push(i.navigatorSeries);
- }), this.chart.series.forEach(function(h) {
- p.indexOf(h) === -1 ? h.setState("inactive", !0) : h.options.inactiveOtherPoints && h.setAllPointsToState("inactive");
- });
- }, a.prototype.destroy = function() {
- var c = this;
- this.eventsToUnbind.forEach(function(p) {
- return p();
- }), this.eventsToUnbind = [], j.chartCount || (a.unbindDocumentMouseUp && (a.unbindDocumentMouseUp = a.unbindDocumentMouseUp()), a.unbindDocumentTouchEnd && (a.unbindDocumentTouchEnd = a.unbindDocumentTouchEnd())), clearInterval(c.tooltipTimeout), M(c, function(p, i) {
- c[i] = void 0;
- });
- }, a.prototype.drag = function(c) {
- var p = this.chart, i = p.options.chart, h = this.zoomHor, s = this.zoomVert, t = p.plotLeft, o = p.plotTop, n = p.plotWidth, A = p.plotHeight, _ = this.mouseDownX || 0, D = this.mouseDownY || 0, W = B(i.panning) ? i.panning && i.panning.enabled : i.panning, P = i.panKey && c[i.panKey + "Key"], X = c.chartX, g = c.chartY, m = this.selectionMarker;
- if ((!m || !m.touch) && (X < t ? X = t : X > t + n && (X = t + n), g < o ? g = o : g > o + A && (g = o + A), this.hasDragged = Math.sqrt(Math.pow(_ - X, 2) + Math.pow(D - g, 2)), 10 < this.hasDragged)) {
- var L = p.isInsidePlot(_ - t, D - o, { visiblePlotOnly: !0 });
- !p.hasCartesianSeries && !p.mapView || !this.zoomX && !this.zoomY || !L || P || m || (this.selectionMarker = m = p.renderer.rect(t, o, h ? 1 : n, s ? 1 : A, 0).attr({ class: "highcharts-selection-marker", zIndex: 7 }).add(), p.styledMode || m.attr({ fill: i.selectionMarkerFill || H("#335cad").setOpacity(0.25).get() })), m && h && (h = X - _, m.attr({ width: Math.abs(h), x: (0 < h ? 0 : h) + _ })), m && s && (h = g - D, m.attr({ height: Math.abs(h), y: (0 < h ? 0 : h) + D })), L && !m && W && p.pan(c, i.panning);
- }
- }, a.prototype.dragStart = function(c) {
- var p = this.chart;
- p.mouseIsDown = c.type, p.cancelClick = !1, p.mouseDownX = this.mouseDownX = c.chartX, p.mouseDownY = this.mouseDownY = c.chartY;
- }, a.prototype.drop = function(c) {
- var p = this, i = this.chart, h = this.hasPinched;
- if (this.selectionMarker) {
- var s = this.selectionMarker, t = s.attr ? s.attr("x") : s.x, o = s.attr ? s.attr("y") : s.y, n = s.attr ? s.attr("width") : s.width, A = s.attr ? s.attr("height") : s.height, _ = { originalEvent: c, xAxis: [], yAxis: [], x: t, y: o, width: n, height: A }, D = !!i.mapView;
- (this.hasDragged || h) && (i.axes.forEach(function(W) {
- if (W.zoomEnabled && x(W.min) && (h || p[{ xAxis: "zoomX", yAxis: "zoomY" }[W.coll]]) && O(t) && O(o)) {
- var P = W.horiz, X = c.type === "touchend" ? W.minPixelPadding : 0, g = W.toValue((P ? t : o) + X);
- P = W.toValue((P ? t + n : o + A) - X), _[W.coll].push({ axis: W, min: Math.min(g, P), max: Math.max(g, P) }), D = !0;
- }
- }), D && E(i, "selection", _, function(W) {
- i.zoom(u(
- W,
- h ? { animation: !1 } : null
- ));
- })), O(i.index) && (this.selectionMarker = this.selectionMarker.destroy()), h && this.scaleGroups();
- }
- i && O(i.index) && (b(i.container, { cursor: i._cursor }), i.cancelClick = 10 < this.hasDragged, i.mouseIsDown = this.hasDragged = this.hasPinched = !1, this.pinchDown = []);
- }, a.prototype.findNearestKDPoint = function(c, p, i) {
- var h = this.chart, s = h.hoverPoint;
- if (h = h.tooltip, s && h && h.isStickyOnContact())
- return s;
- var t;
- return c.forEach(function(o) {
- var n = !(o.noSharedTooltip && p) && 0 > o.options.findNearestPointBy.indexOf("y");
- if (o = o.searchPoint(i, n), (n = B(o, !0) && o.series) && !(n = !B(t, !0))) {
- n = t.distX - o.distX;
- var A = t.dist - o.dist, _ = (o.series.group && o.series.group.zIndex) - (t.series.group && t.series.group.zIndex);
- n = 0 < (n !== 0 && p ? n : A !== 0 ? A : _ !== 0 ? _ : t.series.index > o.series.index ? -1 : 1);
- }
- n && (t = o);
- }), t;
- }, a.prototype.getChartCoordinatesFromPoint = function(c, p) {
- var i = c.series, h = i.xAxis;
- i = i.yAxis;
- var s = c.shapeArgs;
- if (h && i) {
- var t = w(c.clientX, c.plotX), o = c.plotY || 0;
- return c.isNode && s && O(s.x) && O(s.y) && (t = s.x, o = s.y), p ? { chartX: i.len + i.pos - o, chartY: h.len + h.pos - t } : { chartX: t + h.pos, chartY: o + i.pos };
- }
- if (s && s.x && s.y)
- return { chartX: s.x, chartY: s.y };
- }, a.prototype.getChartPosition = function() {
- if (this.chartPosition)
- return this.chartPosition;
- var c = this.chart.container, p = S(c);
- this.chartPosition = { left: p.left, top: p.top, scaleX: 1, scaleY: 1 };
- var i = c.offsetWidth;
- return c = c.offsetHeight, 2 < i && 2 < c && (this.chartPosition.scaleX = p.width / i, this.chartPosition.scaleY = p.height / c), this.chartPosition;
- }, a.prototype.getCoordinates = function(c) {
- var p = { xAxis: [], yAxis: [] };
- return this.chart.axes.forEach(function(i) {
- p[i.isXAxis ? "xAxis" : "yAxis"].push({ axis: i, value: i.toValue(c[i.horiz ? "chartX" : "chartY"]) });
- }), p;
- }, a.prototype.getHoverData = function(c, p, i, h, s, t) {
- var o = [];
- h = !(!h || !c);
- var n = { chartX: t ? t.chartX : void 0, chartY: t ? t.chartY : void 0, shared: s };
- E(this, "beforeGetHoverData", n);
- var A = p && !p.stickyTracking ? [p] : i.filter(function(D) {
- return n.filter ? n.filter(D) : D.visible && !(!s && D.directTouch) && w(D.options.enableMouseTracking, !0) && D.stickyTracking;
- }), _ = h || !t ? c : this.findNearestKDPoint(A, s, t);
- return p = _ && _.series, _ && (s && !p.noSharedTooltip ? (A = i.filter(function(D) {
- return n.filter ? n.filter(D) : D.visible && !(!s && D.directTouch) && w(D.options.enableMouseTracking, !0) && !D.noSharedTooltip;
- }), A.forEach(function(D) {
- var W = f(D.points, function(P) {
- return P.x === _.x && !P.isNull;
- });
- B(W) && (D.chart.isBoosting && (W = D.getPoint(W)), o.push(W));
- })) : o.push(_)), n = { hoverPoint: _ }, E(this, "afterGetHoverData", n), { hoverPoint: n.hoverPoint, hoverSeries: p, hoverPoints: o };
- }, a.prototype.getPointFromEvent = function(c) {
- c = c.target;
- for (var p; c && !p; )
- p = c.point, c = c.parentNode;
- return p;
- }, a.prototype.onTrackerMouseOut = function(c) {
- c = c.relatedTarget || c.toElement;
- var p = this.chart.hoverSeries;
- this.isDirectTouch = !1, !p || !c || p.stickyTracking || this.inClass(c, "highcharts-tooltip") || this.inClass(c, "highcharts-series-" + p.index) && this.inClass(c, "highcharts-tracker") || p.onMouseOut();
- }, a.prototype.inClass = function(c, p) {
- for (var i; c; ) {
- if (i = N(c, "class")) {
- if (i.indexOf(p) !== -1)
- return !0;
- if (i.indexOf("highcharts-container") !== -1)
- return !1;
- }
- c = c.parentNode;
- }
- }, a.prototype.init = function(c, p) {
- this.options = p, this.chart = c, this.runChartClick = !(!p.chart.events || !p.chart.events.click), this.pinchDown = [], this.lastValidTouch = {}, I && (c.tooltip = new I(c, p.tooltip), this.followTouchMove = w(p.tooltip.followTouchMove, !0)), this.setDOMEvents();
- }, a.prototype.normalize = function(c, p) {
- var i = c.touches, h = i ? i.length ? i.item(0) : w(i.changedTouches, c.changedTouches)[0] : c;
- return p || (p = this.getChartPosition()), i = h.pageX - p.left, h = h.pageY - p.top, i /= p.scaleX, h /= p.scaleY, u(c, { chartX: Math.round(i), chartY: Math.round(h) });
- }, a.prototype.onContainerClick = function(c) {
- var p = this.chart, i = p.hoverPoint;
- c = this.normalize(c);
- var h = p.plotLeft, s = p.plotTop;
- p.cancelClick || (i && this.inClass(c.target, "highcharts-tracker") ? (E(i.series, "click", u(c, { point: i })), p.hoverPoint && i.firePointEvent("click", c)) : (u(c, this.getCoordinates(c)), p.isInsidePlot(c.chartX - h, c.chartY - s, { visiblePlotOnly: !0 }) && E(p, "click", c)));
- }, a.prototype.onContainerMouseDown = function(c) {
- var p = ((c.buttons || c.button) & 1) === 1;
- c = this.normalize(c), j.isFirefox && c.button !== 0 && this.onContainerMouseMove(c), (typeof c.button > "u" || p) && (this.zoomOption(c), p && c.preventDefault && c.preventDefault(), this.dragStart(c));
- }, a.prototype.onContainerMouseLeave = function(c) {
- var p = U[w(a.hoverChartIndex, -1)], i = this.chart.tooltip;
- i && i.shouldStickOnContact() && this.inClass(c.relatedTarget, "highcharts-tooltip-container") || (c = this.normalize(c), p && (c.relatedTarget || c.toElement) && (p.pointer.reset(), p.pointer.chartPosition = void 0), i && !i.isHidden && this.reset());
- }, a.prototype.onContainerMouseEnter = function(c) {
- delete this.chartPosition;
- }, a.prototype.onContainerMouseMove = function(c) {
- var p = this.chart;
- c = this.normalize(c), this.setHoverChartIndex(), c.preventDefault || (c.returnValue = !1), (p.mouseIsDown === "mousedown" || this.touchSelect(c)) && this.drag(c), p.openMenu || !this.inClass(c.target, "highcharts-tracker") && !p.isInsidePlot(c.chartX - p.plotLeft, c.chartY - p.plotTop, { visiblePlotOnly: !0 }) || (this.inClass(c.target, "highcharts-no-tooltip") ? this.reset(!1, 0) : this.runPointActions(c));
- }, a.prototype.onDocumentTouchEnd = function(c) {
- var p = U[w(
- a.hoverChartIndex,
- -1
- )];
- p && p.pointer.drop(c);
- }, a.prototype.onContainerTouchMove = function(c) {
- this.touchSelect(c) ? this.onContainerMouseMove(c) : this.touch(c);
- }, a.prototype.onContainerTouchStart = function(c) {
- this.touchSelect(c) ? this.onContainerMouseDown(c) : (this.zoomOption(c), this.touch(c, !0));
- }, a.prototype.onDocumentMouseMove = function(c) {
- var p = this.chart, i = this.chartPosition;
- c = this.normalize(c, i);
- var h = p.tooltip;
- !i || h && h.isStickyOnContact() || p.isInsidePlot(c.chartX - p.plotLeft, c.chartY - p.plotTop, { visiblePlotOnly: !0 }) || this.inClass(c.target, "highcharts-tracker") || this.reset();
- }, a.prototype.onDocumentMouseUp = function(c) {
- var p = U[w(a.hoverChartIndex, -1)];
- p && p.pointer.drop(c);
- }, a.prototype.pinch = function(c) {
- var p = this, i = p.chart, h = p.pinchDown, s = c.touches || [], t = s.length, o = p.lastValidTouch, n = p.hasZoom, A = {}, _ = t === 1 && (p.inClass(c.target, "highcharts-tracker") && i.runTrackerClick || p.runChartClick), D = {}, W = p.selectionMarker;
- 1 < t ? p.initiated = !0 : t === 1 && this.followTouchMove && (p.initiated = !1), n && p.initiated && !_ && c.cancelable !== !1 && c.preventDefault(), [].map.call(s, function(P) {
- return p.normalize(P);
- }), c.type === "touchstart" ? ([].forEach.call(s, function(P, X) {
- h[X] = { chartX: P.chartX, chartY: P.chartY };
- }), o.x = [h[0].chartX, h[1] && h[1].chartX], o.y = [h[0].chartY, h[1] && h[1].chartY], i.axes.forEach(function(P) {
- if (P.zoomEnabled) {
- var X = i.bounds[P.horiz ? "h" : "v"], g = P.minPixelPadding, m = P.toPixels(Math.min(w(P.options.min, P.dataMin), P.dataMin)), L = P.toPixels(Math.max(w(P.options.max, P.dataMax), P.dataMax)), Y = Math.max(m, L);
- X.min = Math.min(P.pos, Math.min(
- m,
- L
- ) - g), X.max = Math.max(P.pos + P.len, Y + g);
- }
- }), p.res = !0) : p.followTouchMove && t === 1 ? this.runPointActions(p.normalize(c)) : h.length && (E(i, "touchpan", { originalEvent: c }, function() {
- W || (p.selectionMarker = W = u({ destroy: F, touch: !0 }, i.plotBox)), p.pinchTranslate(h, s, A, W, D, o), p.hasPinched = n, p.scaleGroups(A, D);
- }), p.res && (p.res = !1, this.reset(!1, 0)));
- }, a.prototype.pinchTranslate = function(c, p, i, h, s, t) {
- this.zoomHor && this.pinchTranslateDirection(!0, c, p, i, h, s, t), this.zoomVert && this.pinchTranslateDirection(!1, c, p, i, h, s, t);
- }, a.prototype.pinchTranslateDirection = function(c, p, i, h, s, t, o, n) {
- var A = this.chart, _ = c ? "x" : "y", D = c ? "X" : "Y", W = "chart" + D, P = c ? "width" : "height", X = A["plot" + (c ? "Left" : "Top")], g = A.inverted, m = A.bounds[c ? "h" : "v"], L = p.length === 1, Y = p[0][W], V = !L && p[1][W];
- p = function() {
- typeof $ == "number" && 20 < Math.abs(Y - V) && (G = n || Math.abs(z - $) / Math.abs(Y - V)), k = (X - z) / G + Y, Q = A["plot" + (c ? "Width" : "Height")] / G;
- };
- var Q, k, G = n || 1, z = i[0][W], $ = !L && i[1][W];
- if (p(), i = k, i < m.min) {
- i = m.min;
- var q = !0;
- } else
- i + Q > m.max && (i = m.max - Q, q = !0);
- q ? (z -= 0.8 * (z - o[_][0]), typeof $ == "number" && ($ -= 0.8 * ($ - o[_][1])), p()) : o[_] = [z, $], g || (t[_] = k - X, t[P] = Q), t = g ? 1 / G : G, s[P] = Q, s[_] = i, h[g ? c ? "scaleY" : "scaleX" : "scale" + D] = G, h["translate" + D] = t * X + (z - t * Y);
- }, a.prototype.reset = function(c, p) {
- var i = this.chart, h = i.hoverSeries, s = i.hoverPoint, t = i.hoverPoints, o = i.tooltip, n = o && o.shared ? t : s;
- c && n && v(n).forEach(function(A) {
- A.series.isCartesian && typeof A.plotX > "u" && (c = !1);
- }), c ? o && n && v(n).length && (o.refresh(n), o.shared && t ? t.forEach(function(A) {
- A.setState(A.state, !0), A.series.isCartesian && (A.series.xAxis.crosshair && A.series.xAxis.drawCrosshair(
- null,
- A
- ), A.series.yAxis.crosshair && A.series.yAxis.drawCrosshair(null, A));
- }) : s && (s.setState(s.state, !0), i.axes.forEach(function(A) {
- A.crosshair && s.series[A.coll] === A && A.drawCrosshair(null, s);
- }))) : (s && s.onMouseOut(), t && t.forEach(function(A) {
- A.setState();
- }), h && h.onMouseOut(), o && o.hide(p), this.unDocMouseMove && (this.unDocMouseMove = this.unDocMouseMove()), i.axes.forEach(function(A) {
- A.hideCrosshair();
- }), this.hoverX = i.hoverPoints = i.hoverPoint = null);
- }, a.prototype.runPointActions = function(c, p) {
- var i = this.chart, h = i.tooltip && i.tooltip.options.enabled ? i.tooltip : void 0, s = h ? h.shared : !1, t = p || i.hoverPoint, o = t && t.series || i.hoverSeries;
- p = this.getHoverData(t, o, i.series, (!c || c.type !== "touchmove") && (!!p || o && o.directTouch && this.isDirectTouch), s, c), t = p.hoverPoint, o = p.hoverSeries;
- var n = p.hoverPoints;
- if (p = o && o.tooltipOptions.followPointer && !o.tooltipOptions.split, s = s && o && !o.noSharedTooltip, t && (t !== i.hoverPoint || h && h.isHidden)) {
- if ((i.hoverPoints || []).forEach(function(A) {
- n.indexOf(A) === -1 && A.setState();
- }), i.hoverSeries !== o && o.onMouseOver(), this.applyInactiveState(n), (n || []).forEach(function(A) {
- A.setState("hover");
- }), i.hoverPoint && i.hoverPoint.firePointEvent("mouseOut"), !t.series)
- return;
- i.hoverPoints = n, i.hoverPoint = t, t.firePointEvent("mouseOver"), h && h.refresh(s ? n : t, c);
- } else
- p && h && !h.isHidden && (t = h.getAnchor([{}], c), i.isInsidePlot(t[0], t[1], { visiblePlotOnly: !0 }) && h.updatePosition({ plotX: t[0], plotY: t[1] }));
- this.unDocMouseMove || (this.unDocMouseMove = R(i.container.ownerDocument, "mousemove", function(A) {
- var _ = U[a.hoverChartIndex];
- _ && _.pointer.onDocumentMouseMove(A);
- }), this.eventsToUnbind.push(this.unDocMouseMove)), i.axes.forEach(function(A) {
- var _ = w((A.crosshair || {}).snap, !0), D;
- _ && ((D = i.hoverPoint) && D.series[A.coll] === A || (D = f(n, function(W) {
- return W.series[A.coll] === A;
- }))), D || !_ ? A.drawCrosshair(c, D) : A.hideCrosshair();
- });
- }, a.prototype.scaleGroups = function(c, p) {
- var i = this.chart;
- i.series.forEach(function(h) {
- var s = c || h.getPlotBox();
- h.group && (h.xAxis && h.xAxis.zoomEnabled || i.mapView) && (h.group.attr(s), h.markerGroup && (h.markerGroup.attr(s), h.markerGroup.clip(p ? i.clipRect : null)), h.dataLabelsGroup && h.dataLabelsGroup.attr(s));
- }), i.clipRect.attr(p || i.clipBox);
- }, a.prototype.setDOMEvents = function() {
- var c = this, p = this.chart.container, i = p.ownerDocument;
- p.onmousedown = this.onContainerMouseDown.bind(this), p.onmousemove = this.onContainerMouseMove.bind(this), p.onclick = this.onContainerClick.bind(this), this.eventsToUnbind.push(R(p, "mouseenter", this.onContainerMouseEnter.bind(this))), this.eventsToUnbind.push(R(p, "mouseleave", this.onContainerMouseLeave.bind(this))), a.unbindDocumentMouseUp || (a.unbindDocumentMouseUp = R(i, "mouseup", this.onDocumentMouseUp.bind(this)));
- for (var h = this.chart.renderTo.parentElement; h && h.tagName !== "BODY"; )
- this.eventsToUnbind.push(R(h, "scroll", function() {
- delete c.chartPosition;
- })), h = h.parentElement;
- j.hasTouch && (this.eventsToUnbind.push(R(p, "touchstart", this.onContainerTouchStart.bind(this), { passive: !1 })), this.eventsToUnbind.push(R(p, "touchmove", this.onContainerTouchMove.bind(this), { passive: !1 })), a.unbindDocumentTouchEnd || (a.unbindDocumentTouchEnd = R(i, "touchend", this.onDocumentTouchEnd.bind(this), { passive: !1 })));
- }, a.prototype.setHoverChartIndex = function() {
- var c = this.chart, p = j.charts[w(a.hoverChartIndex, -1)];
- p && p !== c && p.pointer.onContainerMouseLeave({ relatedTarget: !0 }), p && p.mouseIsDown || (a.hoverChartIndex = c.index);
- }, a.prototype.touch = function(c, p) {
- var i = this.chart;
- if (this.setHoverChartIndex(), c.touches.length === 1)
- if (c = this.normalize(c), i.isInsidePlot(c.chartX - i.plotLeft, c.chartY - i.plotTop, { visiblePlotOnly: !0 }) && !i.openMenu) {
- if (p && this.runPointActions(c), c.type === "touchmove") {
- p = this.pinchDown;
- var h = p[0] ? 4 <= Math.sqrt(Math.pow(p[0].chartX - c.chartX, 2) + Math.pow(p[0].chartY - c.chartY, 2)) : !1;
- }
- w(h, !0) && this.pinch(c);
- } else
- p && this.reset();
- else
- c.touches.length === 2 && this.pinch(c);
- }, a.prototype.touchSelect = function(c) {
- return !(!this.chart.options.chart.zoomBySingleTouch || !c.touches || c.touches.length !== 1);
- }, a.prototype.zoomOption = function(c) {
- var p = this.chart, i = p.options.chart;
- p = p.inverted;
- var h = i.zoomType || "";
- /touch/.test(c.type) && (h = w(i.pinchType, h)), this.zoomX = c = /x/.test(h), this.zoomY = i = /y/.test(h), this.zoomHor = c && !p || i && p, this.zoomVert = i && !p || c && p, this.hasZoom = c || i;
- }, a;
- }(), y;
- }), T(l, "Core/MSPointer.js", [l["Core/Globals.js"], l["Core/Pointer.js"], l["Core/Utilities.js"]], function(y, j, I) {
- function Z() {
- var M = [];
- return M.item = function(S) {
- return this[S];
- }, f(O, function(S) {
- M.push({ pageX: S.pageX, pageY: S.pageY, target: S.target });
- }), M;
- }
- function H(M, S, w, v) {
- var a = F[j.hoverChartIndex || NaN];
- M.pointerType !== "touch" && M.pointerType !== M.MSPOINTER_TYPE_TOUCH || !a || (a = a.pointer, v(M), a[S]({ type: w, target: M.currentTarget, preventDefault: N, touches: Z() }));
- }
- var U = this && this.__extends || function() {
- var M = function(S, w) {
- return M = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(v, a) {
- v.__proto__ = a;
- } || function(v, a) {
- for (var c in a)
- a.hasOwnProperty(c) && (v[c] = a[c]);
- }, M(S, w);
- };
- return function(S, w) {
- function v() {
- this.constructor = S;
- }
- M(S, w), S.prototype = w === null ? Object.create(w) : (v.prototype = w.prototype, new v());
- };
- }(), F = y.charts, R = y.doc, N = y.noop, b = y.win, x = I.addEvent, u = I.css, f = I.objectEach, E = I.removeEvent, O = {}, B = !!b.PointerEvent;
- return function(M) {
- function S() {
- return M !== null && M.apply(this, arguments) || this;
- }
- return U(S, M), S.isRequired = function() {
- return !(y.hasTouch || !b.PointerEvent && !b.MSPointerEvent);
- }, S.prototype.batchMSEvents = function(w) {
- w(this.chart.container, B ? "pointerdown" : "MSPointerDown", this.onContainerPointerDown), w(this.chart.container, B ? "pointermove" : "MSPointerMove", this.onContainerPointerMove), w(R, B ? "pointerup" : "MSPointerUp", this.onDocumentPointerUp);
- }, S.prototype.destroy = function() {
- this.batchMSEvents(E), M.prototype.destroy.call(this);
- }, S.prototype.init = function(w, v) {
- M.prototype.init.call(this, w, v), this.hasZoom && u(w.container, { "-ms-touch-action": "none", "touch-action": "none" });
- }, S.prototype.onContainerPointerDown = function(w) {
- H(w, "onContainerTouchStart", "touchstart", function(v) {
- O[v.pointerId] = { pageX: v.pageX, pageY: v.pageY, target: v.currentTarget };
- });
- }, S.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);
- });
- }, S.prototype.onDocumentPointerUp = function(w) {
- H(w, "onDocumentTouchEnd", "touchend", function(v) {
- delete O[v.pointerId];
- });
- }, S.prototype.setDOMEvents = function() {
- M.prototype.setDOMEvents.call(this), (this.hasZoom || this.followTouchMove) && this.batchMSEvents(x);
- }, S;
- }(j);
- }), T(l, "Core/Legend/Legend.js", [
- l["Core/Animation/AnimationUtilities.js"],
- l["Core/FormatUtilities.js"],
- l["Core/Globals.js"],
- l["Core/Series/Point.js"],
- l["Core/Renderer/RendererUtilities.js"],
- l["Core/Utilities.js"]
- ], function(y, j, I, Z, H, U) {
- var F = y.animObject, R = y.setAnimation, N = j.format;
- y = I.isFirefox;
- var b = I.marginNames;
- I = I.win;
- var x = H.distribute, u = U.addEvent, f = U.createElement, E = U.css, O = U.defined, B = U.discardElement, M = U.find, S = U.fireEvent, w = U.isNumber, v = U.merge, a = U.pick, c = U.relativeLength, p = U.stableSort, i = U.syncTimeout;
- return H = U.wrap, U = function() {
- function h(s, 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 = s, this.init(s, t);
- }
- return h.prototype.init = function(s, t) {
- this.chart = s, this.setOptions(t), t.enabled && (this.render(), u(this.chart, "endResize", function() {
- this.legend.positionCheckboxes();
- }), this.proximate ? this.unchartrender = u(this.chart, "render", function() {
- this.legend.proximatePositions(), this.legend.positionItems();
- }) : this.unchartrender && this.unchartrender());
- }, h.prototype.setOptions = function(s) {
- var t = a(s.padding, 8);
- this.options = s, this.chart.styledMode || (this.itemStyle = s.itemStyle, this.itemHiddenStyle = v(this.itemStyle, s.itemHiddenStyle)), this.itemMarginTop = s.itemMarginTop || 0, this.itemMarginBottom = s.itemMarginBottom || 0, this.padding = t, this.initialItemY = t - 5, this.symbolWidth = a(
- s.symbolWidth,
- 16
- ), this.pages = [], this.proximate = s.layout === "proximate" && !this.chart.inverted, this.baseline = void 0;
- }, h.prototype.update = function(s, t) {
- var o = this.chart;
- this.setOptions(v(!0, this.options, s)), this.destroy(), o.isDirtyLegend = o.isDirtyBox = !0, a(t, !0) && o.redraw(), S(this, "afterUpdate");
- }, h.prototype.colorizeItem = function(s, t) {
- if (s.legendGroup[t ? "removeClass" : "addClass"]("highcharts-legend-item-hidden"), !this.chart.styledMode) {
- var o = this.options, n = s.legendItem, A = s.legendLine, _ = s.legendSymbol, D = this.itemHiddenStyle.color;
- o = t ? o.itemStyle.color : D;
- var W = t && s.color || D, P = s.options && s.options.marker, X = { fill: W };
- n && n.css({ fill: o, color: o }), A && A.attr({ stroke: W }), _ && (P && _.isMarker && (X = s.pointAttribs(), t || (X.stroke = X.fill = D)), _.attr(X));
- }
- S(this, "afterColorizeItem", { item: s, visible: t });
- }, h.prototype.positionItems = function() {
- this.allItems.forEach(this.positionItem, this), this.chart.isResizing || this.positionCheckboxes();
- }, h.prototype.positionItem = function(s) {
- var t = this, o = this.options, n = o.symbolPadding, A = !o.rtl, _ = s._legendItemPos;
- o = _[0], _ = _[1];
- var D = s.checkbox, W = s.legendGroup;
- W && W.element && (n = { translateX: A ? o : this.legendWidth - o - 2 * n - 4, translateY: _ }, A = function() {
- S(t, "afterPositionItem", { item: s });
- }, O(W.translateY) ? W.animate(n, void 0, A) : (W.attr(n), A())), D && (D.x = o, D.y = _);
- }, h.prototype.destroyItem = function(s) {
- var t = s.checkbox;
- ["legendItem", "legendLine", "legendSymbol", "legendGroup"].forEach(function(o) {
- s[o] && (s[o] = s[o].destroy());
- }), t && B(s.checkbox);
- }, h.prototype.destroy = function() {
- function s(t) {
- this[t] && (this[t] = this[t].destroy());
- }
- this.getAllItems().forEach(function(t) {
- [
- "legendItem",
- "legendGroup"
- ].forEach(s, t);
- }), "clipRect up down pager nav box title group".split(" ").forEach(s, this), this.display = null;
- }, h.prototype.positionCheckboxes = function() {
- var s = this.group && this.group.alignAttr, t = this.clipHeight || this.legendHeight, o = this.titleHeight;
- if (s) {
- var n = s.translateY;
- this.allItems.forEach(function(A) {
- var _ = A.checkbox;
- if (_) {
- var D = n + o + _.y + (this.scrollOffset || 0) + 3;
- E(_, { left: s.translateX + A.checkboxOffset + _.x - 20 + "px", top: D + "px", display: this.proximate || D > n - 6 && D < n + t - 6 ? "" : "none" });
- }
- }, this);
- }
- }, h.prototype.renderTitle = function() {
- var s = this.options, t = this.padding, o = s.title, n = 0;
- o.text && (this.title || (this.title = this.chart.renderer.label(o.text, t - 3, t - 4, null, null, null, s.useHTML, null, "legend-title").attr({ zIndex: 1 }), this.chart.styledMode || this.title.css(o.style), this.title.add(this.group)), o.width || this.title.css({ width: this.maxLegendWidth + "px" }), s = this.title.getBBox(), n = s.height, this.offsetWidth = s.width, this.contentGroup.attr({ translateY: n })), this.titleHeight = n;
- }, h.prototype.setText = function(s) {
- var t = this.options;
- s.legendItem.attr({ text: t.labelFormat ? N(t.labelFormat, s, this.chart) : t.labelFormatter.call(s) });
- }, h.prototype.renderItem = function(s) {
- var t = this.chart, o = t.renderer, n = this.options, A = this.symbolWidth, _ = n.symbolPadding || 0, D = this.itemStyle, W = this.itemHiddenStyle, P = n.layout === "horizontal" ? a(n.itemDistance, 20) : 0, X = !n.rtl, g = !s.series, m = !g && s.series.drawLegendSymbol ? s.series : s, L = m.options, Y = this.createCheckboxForItem && L && L.showCheckbox, V = n.useHTML, Q = s.options.className, k = s.legendItem;
- L = A + _ + P + (Y ? 20 : 0), k || (s.legendGroup = o.g("legend-item").addClass("highcharts-" + m.type + "-series highcharts-color-" + s.colorIndex + (Q ? " " + Q : "") + (g ? " highcharts-series-" + s.index : "")).attr({ zIndex: 1 }).add(this.scrollGroup), s.legendItem = k = o.text("", X ? A + _ : -_, this.baseline || 0, V), t.styledMode || k.css(v(s.visible ? D : W)), k.attr({ align: X ? "left" : "right", zIndex: 2 }).add(s.legendGroup), this.baseline || (this.fontMetrics = o.fontMetrics(t.styledMode ? 12 : D.fontSize, k), this.baseline = this.fontMetrics.f + 3 + this.itemMarginTop, k.attr("y", this.baseline), this.symbolHeight = n.symbolHeight || this.fontMetrics.f, n.squareSymbol && (this.symbolWidth = a(n.symbolWidth, Math.max(this.symbolHeight, 16)), L = this.symbolWidth + _ + P + (Y ? 20 : 0), X && k.attr("x", this.symbolWidth + _))), m.drawLegendSymbol(this, s), this.setItemEvents && this.setItemEvents(s, k, V)), Y && !s.checkbox && this.createCheckboxForItem && this.createCheckboxForItem(s), this.colorizeItem(s, s.visible), !t.styledMode && D.width || k.css({ width: (n.itemWidth || this.widthOption || t.spacingBox.width) - L + "px" }), this.setText(s), t = k.getBBox(), o = this.fontMetrics && this.fontMetrics.h || 0, s.itemWidth = s.checkboxOffset = n.itemWidth || s.legendItemWidth || t.width + L, this.maxItemWidth = Math.max(this.maxItemWidth, s.itemWidth), this.totalItemWidth += s.itemWidth, this.itemHeight = s.itemHeight = Math.round(s.legendItemHeight || (t.height > 1.5 * o ? t.height : o));
- }, h.prototype.layoutItem = function(s) {
- var t = this.options, o = this.padding, n = t.layout === "horizontal", A = s.itemHeight, _ = this.itemMarginBottom, D = this.itemMarginTop, W = n ? a(t.itemDistance, 20) : 0, P = this.maxLegendWidth;
- t = t.alignColumns && this.totalItemWidth > P ? this.maxItemWidth : s.itemWidth, n && this.itemX - o + t > P && (this.itemX = o, this.lastLineHeight && (this.itemY += D + this.lastLineHeight + _), this.lastLineHeight = 0), this.lastItemY = D + this.itemY + _, this.lastLineHeight = Math.max(A, this.lastLineHeight), s._legendItemPos = [this.itemX, this.itemY], n ? this.itemX += t : (this.itemY += D + A + _, this.lastLineHeight = A), this.offsetWidth = this.widthOption || Math.max((n ? this.itemX - o - (s.checkbox ? 0 : W) : t) + o, this.offsetWidth);
- }, h.prototype.getAllItems = function() {
- var s = [];
- return this.chart.series.forEach(function(t) {
- var o = t && t.options;
- t && a(o.showInLegend, O(o.linkedTo) ? !1 : void 0, !0) && (s = s.concat(t.legendItems || (o.legendType === "point" ? t.data : t)));
- }), S(this, "afterGetAllItems", { allItems: s }), s;
- }, h.prototype.getAlignment = function() {
- var s = this.options;
- return this.proximate ? s.align.charAt(0) + "tv" : s.floating ? "" : s.align.charAt(0) + s.verticalAlign.charAt(0) + s.layout.charAt(0);
- }, h.prototype.adjustMargins = function(s, t) {
- var o = this.chart, n = this.options, A = this.getAlignment();
- A && [/(lth|ct|rth)/, /(rtv|rm|rbv)/, /(rbh|cb|lbh)/, /(lbv|lm|ltv)/].forEach(function(_, D) {
- _.test(A) && !O(s[D]) && (o[b[D]] = Math.max(o[b[D]], o.legend[(D + 1) % 2 ? "legendHeight" : "legendWidth"] + [1, -1, -1, 1][D] * n[D % 2 ? "x" : "y"] + a(n.margin, 12) + t[D] + (o.titleOffset[D] || 0)));
- });
- }, h.prototype.proximatePositions = function() {
- var s = this.chart, t = [], o = this.options.align === "left";
- this.allItems.forEach(function(n) {
- var A, _ = o;
- if (n.yAxis) {
- n.xAxis.options.reversed && (_ = !_), n.points && (A = M(_ ? n.points : n.points.slice(0).reverse(), function(W) {
- return w(W.plotY);
- })), _ = this.itemMarginTop + n.legendItem.getBBox().height + this.itemMarginBottom;
- var D = n.yAxis.top - s.plotTop;
- n.visible ? (A = A ? A.plotY : n.yAxis.height, A += D - 0.3 * _) : A = D + n.yAxis.height, t.push({ target: A, size: _, item: n });
- }
- }, this), x(t, s.plotHeight).forEach(function(n) {
- n.item._legendItemPos && (n.item._legendItemPos[1] = s.plotTop - s.spacing[0] + n.pos);
- });
- }, h.prototype.render = function() {
- var s = this.chart, t = s.renderer, o = this.options, n = this.padding, A = this.getAllItems(), _ = this.group, D = this.box;
- this.itemX = n, this.itemY = this.initialItemY, this.lastItemY = this.offsetWidth = 0, this.widthOption = c(o.width, s.spacingBox.width - n);
- var W = s.spacingBox.width - 2 * n - o.x;
- -1 < ["rm", "lm"].indexOf(this.getAlignment().substring(0, 2)) && (W /= 2), this.maxLegendWidth = this.widthOption || W, _ || (this.group = _ = t.g("legend").addClass(o.className || "").attr({ zIndex: 7 }).add(), this.contentGroup = t.g().attr({ zIndex: 1 }).add(_), this.scrollGroup = t.g().add(this.contentGroup)), this.renderTitle(), p(A, function(X, g) {
- return (X.options && X.options.legendIndex || 0) - (g.options && g.options.legendIndex || 0);
- }), o.reversed && A.reverse(), this.allItems = A, this.display = W = !!A.length, this.itemHeight = this.totalItemWidth = this.maxItemWidth = this.lastLineHeight = 0, A.forEach(this.renderItem, this), A.forEach(this.layoutItem, this), A = (this.widthOption || this.offsetWidth) + n;
- var P = this.lastItemY + this.lastLineHeight + this.titleHeight;
- P = this.handleOverflow(P), P += n, D || (this.box = D = t.rect().addClass("highcharts-legend-box").attr({ r: o.borderRadius }).add(_), D.isNew = !0), s.styledMode || D.attr({ stroke: o.borderColor, "stroke-width": o.borderWidth || 0, fill: o.backgroundColor || "none" }).shadow(o.shadow), 0 < A && 0 < P && (D[D.isNew ? "attr" : "animate"](D.crisp.call({}, { x: 0, y: 0, width: A, height: P }, D.strokeWidth())), D.isNew = !1), D[W ? "show" : "hide"](), s.styledMode && _.getStyle("display") === "none" && (A = P = 0), this.legendWidth = A, this.legendHeight = P, W && this.align(), this.proximate || this.positionItems(), S(this, "afterRender");
- }, h.prototype.align = function(s) {
- s === void 0 && (s = this.chart.spacingBox);
- var t = this.chart, o = this.options, n = s.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 !== s.y && (s = v(s, { y: n })), this.group.align(v(o, { width: this.legendWidth, height: this.legendHeight, verticalAlign: this.proximate ? "top" : o.verticalAlign }), !0, s);
- }, h.prototype.handleOverflow = function(s) {
- var t = this, o = this.chart, n = o.renderer, A = this.options, _ = A.y, D = A.verticalAlign === "top", W = this.padding, P = A.maxHeight, X = A.navigation, g = a(X.animation, !0), m = X.arrowSize || 12, L = this.pages, Y = this.allItems, V = function(q) {
- typeof q == "number" ? $.attr({ height: q }) : $ && (t.clipRect = $.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(z), o.styledMode || t[q].attr("fill", "rgba(0,0,0,0.0001)"), t[q];
- }, k, G;
- _ = o.spacingBox.height + (D ? -_ : _) - W;
- var z = this.nav, $ = this.clipRect;
- return A.layout !== "horizontal" || A.verticalAlign === "middle" || A.floating || (_ /= 2), P && (_ = Math.min(_, P)), L.length = 0, s && 0 < _ && s > _ && X.enabled !== !1 ? (this.clipHeight = k = Math.max(_ - 20 - this.titleHeight - W, 0), this.currentPage = a(this.currentPage, 1), this.fullHeight = s, Y.forEach(function(q, it) {
- var et = q._legendItemPos[1], nt = Math.round(q.legendItem.getBBox().height), rt = L.length;
- (!rt || et - L[rt - 1] > k && (G || et) !== L[rt - 1]) && (L.push(G || et), rt++), q.pageIx = rt - 1, G && (Y[it - 1].pageIx = rt - 1), it === Y.length - 1 && et + nt - L[rt - 1] > k && nt <= k && (L.push(et), q.pageIx = rt), et !== G && (G = et);
- }), $ || ($ = t.clipRect = n.clipRect(0, W, 9999, 0), t.contentGroup.clip($)), V(k), z || (this.nav = z = n.g().attr({ zIndex: 1 }).add(this.group), this.up = n.symbol("triangle", 0, 0, m, m).add(z), Q("upTracker").on(
- "click",
- function() {
- t.scroll(-1, g);
- }
- ), this.pager = n.text("", 15, 10).addClass("highcharts-legend-navigation"), o.styledMode || this.pager.css(X.style), this.pager.add(z), this.down = n.symbol("triangle-down", 0, 0, m, m).add(z), Q("downTracker").on("click", function() {
- t.scroll(1, g);
- })), t.scroll(0), s = _) : z && (V(), this.nav = z.destroy(), this.scrollGroup.attr({ translateY: 1 }), this.clipHeight = 0), s;
- }, h.prototype.scroll = function(s, t) {
- var o = this, n = this.chart, A = this.pages, _ = A.length, D = this.clipHeight, W = this.options.navigation, P = this.pager, X = this.padding, g = this.currentPage + s;
- g > _ && (g = _), 0 < g && (typeof t < "u" && R(t, n), this.nav.attr({ translateX: X, translateY: D + 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" });
- }), P.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 = -A[g - 1] + this.initialItemY, this.scrollGroup.animate({ translateY: this.scrollOffset }), this.currentPage = g, this.positionCheckboxes(), s = F(a(t, n.renderer.globalAnimation, !0)), i(function() {
- S(o, "afterScroll", { currentPage: g });
- }, s.duration));
- }, h.prototype.setItemEvents = function(s, t, o) {
- var n = this, A = n.chart.renderer.boxWrapper, _ = s instanceof Z, D = "highcharts-legend-" + (_ ? "point" : "series") + "-active", W = n.chart.styledMode, P = function(X) {
- n.allItems.forEach(function(g) {
- s !== g && [g].concat(g.linkedSeries || []).forEach(function(m) {
- m.setState(X, !_);
- });
- });
- };
- (o ? [t, s.legendSymbol] : [s.legendGroup]).forEach(function(X) {
- X && X.on("mouseover", function() {
- s.visible && P("inactive"), s.setState("hover"), s.visible && A.addClass(D), W || t.css(n.options.itemHoverStyle);
- }).on("mouseout", function() {
- n.chart.styledMode || t.css(v(s.visible ? n.itemStyle : n.itemHiddenStyle)), P(""), A.removeClass(D), s.setState();
- }).on("click", function(g) {
- var m = function() {
- s.setVisible && s.setVisible(), P(s.visible ? "inactive" : "");
- };
- A.removeClass(D), g = { browserEvent: g }, s.firePointEvent ? s.firePointEvent("legendItemClick", g, m) : S(s, "legendItemClick", g, m);
- });
- });
- }, h.prototype.createCheckboxForItem = function(s) {
- s.checkbox = f(
- "input",
- { type: "checkbox", className: "highcharts-legend-checkbox", checked: s.selected, defaultChecked: s.selected },
- this.options.itemCheckboxStyle,
- this.chart.container
- ), u(s.checkbox, "click", function(t) {
- S(s.series || s, "checkboxClick", { checked: t.target.checked, item: s }, function() {
- s.select();
- });
- });
- }, h;
- }(), (/Trident\/7\.0/.test(I.navigator && I.navigator.userAgent) || y) && H(U.prototype, "positionItem", function(h, s) {
- var t = this, o = function() {
- s._legendItemPos && h.call(t, s);
- };
- o(), t.bubbleLegend || setTimeout(o);
- }), U;
- }), T(
- l,
- "Core/Series/SeriesRegistry.js",
- [l["Core/Globals.js"], l["Core/DefaultOptions.js"], l["Core/Series/Point.js"], l["Core/Utilities.js"]],
- function(y, j, I, Z) {
- var H = j.defaultOptions, U = Z.error, F = Z.extendClass, R = Z.merge, N;
- return function(b) {
- function x(u, f) {
- var E = H.plotOptions || {}, O = f.defaultOptions;
- f.prototype.pointClass || (f.prototype.pointClass = I), f.prototype.type = u, O && (E[u] = O), b.seriesTypes[u] = f;
- }
- b.seriesTypes = y.seriesTypes, b.getSeries = function(u, f) {
- f === void 0 && (f = {});
- var E = u.options.chart;
- E = f.type || E.type || E.defaultSeriesType || "";
- var O = b.seriesTypes[E];
- return b || U(17, !0, u, { missingModuleFor: E }), E = new O(), typeof E.init == "function" && E.init(u, f), E;
- }, b.registerSeriesType = x, b.seriesType = function(u, f, E, O, B) {
- var M = H.plotOptions || {};
- return f = f || "", M[u] = R(M[f], E), x(u, F(b.seriesTypes[f] || function() {
- }, O)), b.seriesTypes[u].prototype.type = u, B && (b.seriesTypes[u].prototype.pointClass = F(I, B)), b.seriesTypes[u];
- };
- }(N || (N = {})), N;
- }
- ), T(l, "Core/Chart/Chart.js", [
- l["Core/Animation/AnimationUtilities.js"],
- l["Core/Axis/Axis.js"],
- l["Core/FormatUtilities.js"],
- l["Core/Foundation.js"],
- l["Core/Globals.js"],
- l["Core/Legend/Legend.js"],
- l["Core/MSPointer.js"],
- l["Core/DefaultOptions.js"],
- l["Core/Pointer.js"],
- l["Core/Renderer/RendererRegistry.js"],
- l["Core/Series/SeriesRegistry.js"],
- l["Core/Renderer/SVG/SVGRenderer.js"],
- l["Core/Time.js"],
- l["Core/Utilities.js"],
- l["Core/Renderer/HTML/AST.js"]
- ], function(y, j, I, Z, H, U, F, R, N, b, x, u, f, E, O) {
- var B = y.animate, M = y.animObject, S = y.setAnimation, w = I.numberFormat, v = Z.registerEventOptions, a = H.charts, c = H.doc, p = H.marginNames, i = H.svg, h = H.win, s = R.defaultOptions, t = R.defaultTime, o = x.seriesTypes, n = E.addEvent, A = E.attr, _ = E.cleanRecursively, D = E.createElement, W = E.css, P = E.defined, X = E.discardElement, g = E.erase, m = E.error, L = E.extend, Y = E.find, V = E.fireEvent, Q = E.getStyle, k = E.isArray, G = E.isNumber, z = E.isObject, $ = E.isString, q = E.merge, it = E.objectEach, et = E.pick, nt = E.pInt, rt = E.relativeLength, ct = E.removeEvent, gt = E.splat, dt = E.syncTimeout, ht = E.uniqueKey;
- return y = function() {
- function at(J, tt, st) {
- 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, st);
- }
- return at.chart = function(J, tt, st) {
- return new at(J, tt, st);
- }, at.prototype.getArgs = function(J, tt, st) {
- $(J) || J.nodeName ? (this.renderTo = J, this.init(tt, st)) : this.init(J, tt);
- }, at.prototype.init = function(J, tt) {
- var st = J.plotOptions || {};
- V(this, "init", { args: arguments }, function() {
- var lt = q(s, J), pt = lt.chart;
- it(lt.plotOptions, function(yt, vt) {
- z(yt) && (yt.tooltip = st[vt] && q(st[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 f(J.time) : H.time, this.numberFormatter = pt.numberFormatter || w, this.styledMode = pt.styledMode, this.hasCartesianSeries = pt.showAxes, this.index = a.length, a.push(this), H.chartCount++, v(this, pt), this.xAxis = [], this.yAxis = [], this.pointCount = this.colorCounter = this.symbolCounter = 0, V(this, "afterInit"), this.firstRender();
- });
- }, at.prototype.initSeries = function(J) {
- var tt = this.options.chart;
- tt = J.type || tt.type || tt.defaultSeriesType;
- var st = o[tt];
- return st || m(17, !0, this, { missingModuleFor: tt }), tt = new st(), 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 st = tt.length; J < st; ++J)
- tt[J] && (tt[J].index = J, tt[J].name = tt[J].getName());
- }, at.prototype.isInsidePlot = function(J, tt, st) {
- st === void 0 && (st = {});
- var lt = this.inverted, pt = this.plotBox, yt = this.plotLeft, vt = this.plotTop, Mt = this.scrollablePlotBox, Pt = 0, At = 0;
- st.visiblePlotOnly && this.scrollingContainer && (At = this.scrollingContainer, Pt = At.scrollLeft, At = At.scrollTop);
- var St = st.series;
- if (pt = st.visiblePlotOnly && Mt || pt, Mt = st.inverted ? tt : J, tt = st.inverted ? J : tt, J = { x: Mt, y: tt, isInsidePlot: !0 }, !st.ignoreX) {
- var Dt = St && (lt ? St.yAxis : St.xAxis) || { pos: yt, len: 1 / 0 };
- Mt = st.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 !st.ignoreY && J.isInsidePlot && (lt = St && (lt ? St.xAxis : St.yAxis) || { pos: vt, len: 1 / 0 }, st = st.paneCoordinates ? lt.pos + tt : vt + tt, st >= Math.max(At + vt, lt.pos) && st <= Math.min(At + vt + pt.height, lt.pos + lt.len) || (J.isInsidePlot = !1)), V(this, "afterIsInsidePlot", J), J.isInsidePlot;
- }, at.prototype.redraw = function(J) {
- V(this, "beforeRedraw");
- var tt = this.hasCartesianSeries ? this.axes : this.colorAxis || [], st = 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), S(this.hasRendered ? J : !1, this), Mt && this.temporaryDisplay(), this.layOutTitles(), J = st.length; J--; ) {
- var Dt = st[J];
- if (Dt.options.stacking || Dt.options.centerInCategory) {
- var Lt = !0;
- if (Dt.isDirty) {
- var Nt = !0;
- break;
- }
- }
- }
- if (Nt)
- for (J = st.length; J--; )
- Dt = st[J], Dt.options.stacking && (Dt.isDirty = !0);
- st.forEach(function(Et) {
- Et.isDirty && (Et.options.legendType === "point" ? (typeof Et.updateTotals == "function" && Et.updateTotals(), St = !0) : yt && (yt.labelFormatter || yt.labelFormat) && (St = !0)), Et.isDirtyData && V(Et, "updatedData");
- }), St && pt && pt.options.enabled && (pt.render(), this.isDirtyLegend = !1), Lt && this.getStacks(), tt.forEach(function(Et) {
- Et.updateNames(), Et.setScale();
- }), this.getMargins(), tt.forEach(function(Et) {
- Et.isDirty && (At = !0);
- }), tt.forEach(function(Et) {
- var Kt = Et.min + "," + Et.max;
- Et.extKey !== Kt && (Et.extKey = Kt, Pt.push(function() {
- V(Et, "afterSetExtremes", L(Et.eventArgs, Et.getExtremes())), delete Et.eventArgs;
- })), (At || Lt) && Et.redraw();
- }), At && this.drawChartBox(), V(this, "predraw"), st.forEach(function(Et) {
- (At || Et.isDirty) && Et.visible && Et.redraw(), Et.isDirtyData = !1;
- }), lt && lt.reset(!0), vt.draw(), V(this, "redraw"), V(this, "render"), Mt && this.temporaryDisplay(!0), Pt.forEach(function(Et) {
- Et.call();
- });
- }, at.prototype.get = function(J) {
- function tt(yt) {
- return yt.id === J || yt.options && yt.options.id === J;
- }
- for (var st = this.series, lt = Y(this.axes, tt) || Y(this.series, tt), pt = 0; !lt && pt < st.length; pt++)
- lt = Y(st[pt].points || [], tt);
- return lt;
- }, at.prototype.getAxes = function() {
- var J = this, tt = this.options, st = tt.xAxis = gt(tt.xAxis || {});
- tt = tt.yAxis = gt(tt.yAxis || {}), V(this, "getAxes"), st.forEach(function(lt, pt) {
- lt.index = pt, lt.isX = !0;
- }), tt.forEach(function(lt, pt) {
- lt.index = pt;
- }), st.concat(tt).forEach(function(lt) {
- new j(J, lt);
- }), V(this, "afterGetAxes");
- }, at.prototype.getSelectedPoints = function() {
- return this.series.reduce(function(J, tt) {
- return tt.getPointsCollection().forEach(function(st) {
- et(st.selectedStaging, st.selected) && J.push(st);
- }), J;
- }, []);
- }, at.prototype.getSelectedSeries = function() {
- return this.series.filter(function(J) {
- return J.selected;
- });
- }, at.prototype.setTitle = function(J, tt, st) {
- this.applyDescription("title", J), this.applyDescription("subtitle", tt), this.applyDescription(
- "caption",
- void 0
- ), this.layOutTitles(st);
- }, at.prototype.applyDescription = function(J, tt) {
- var st = 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) {
- st[{ 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], st = 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 = st.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, V(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 st = this.renderTo;
- P(tt) || (this.containerWidth = Q(st, "width")), P(J) || (this.containerHeight = Q(st, "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 && (c.body.removeChild(tt), tt.hcOrigDetached = !1), tt = tt.parentNode;
- else
- for (; tt && tt.style && (c.body.contains(tt) || tt.parentNode || (tt.hcOrigDetached = !0, c.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 !== c.body); )
- ;
- }, at.prototype.setClassName = function(J) {
- this.container.className = "highcharts-container " + (J || "");
- }, at.prototype.getContainer = function() {
- var J = this.options, tt = J.chart, st = ht(), lt, pt = this.renderTo;
- pt || (this.renderTo = pt = tt.renderTo), $(pt) && (this.renderTo = pt = c.getElementById(pt)), pt || m(13, !0, this);
- var yt = nt(A(pt, "data-highcharts-chart"));
- G(yt) && a[yt] && a[yt].hasRendered && a[yt].destroy(), A(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 = st = D("div", { id: st }, lt, pt), this._cursor = st.style.cursor, this.renderer = new (tt.renderer || !i ? b.getRendererType(tt.renderer) : u)(st, yt, vt, void 0, tt.forExport, J.exporting && J.exporting.allowHTML, this.styledMode), S(
- 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, V(this, "afterGetContainer");
- }, at.prototype.getMargins = function(J) {
- var tt = this.spacing, st = this.margin, lt = this.titleOffset;
- this.resetMargins(), lt[0] && !P(st[0]) && (this.plotTop = Math.max(this.plotTop, lt[0] + tt[0])), lt[2] && !P(st[2]) && (this.marginBottom = Math.max(this.marginBottom, lt[2] + tt[2])), this.legend && this.legend.display && this.legend.adjustMargins(
- st,
- tt
- ), V(this, "getMargins"), J || this.getAxisMargins();
- }, at.prototype.getAxisMargins = function() {
- var J = this, tt = J.axisOffset = [0, 0, 0, 0], st = J.colorAxis, lt = J.margin, pt = function(yt) {
- yt.forEach(function(vt) {
- vt.visible && vt.getOffset();
- });
- };
- J.hasCartesianSeries ? pt(J.axes) : st && st.length && pt(st), p.forEach(function(yt, vt) {
- P(lt[vt]) || (J[yt] += tt[vt]);
- }), J.setChartSize();
- }, at.prototype.reflow = function(J) {
- var tt = this, st = tt.options.chart, lt = tt.renderTo, pt = P(st.width) && P(st.height), yt = st.width || Q(lt, "width");
- st = st.height || Q(lt, "height"), lt = J ? J.target : h, delete tt.pointer.chartPosition, !pt && !tt.isPrinting && yt && st && (lt === h || lt === c) && ((yt !== tt.containerWidth || st !== tt.containerHeight) && (E.clearTimeout(tt.reflowTimeout), tt.reflowTimeout = dt(function() {
- tt.container && tt.setSize(void 0, void 0, !1);
- }, J ? 100 : 0)), tt.containerWidth = yt, tt.containerHeight = st);
- }, at.prototype.setReflow = function(J) {
- var tt = this;
- J === !1 || this.unbindReflow ? J === !1 && this.unbindReflow && (this.unbindReflow = this.unbindReflow()) : (this.unbindReflow = n(h, "resize", function(st) {
- tt.options && tt.reflow(st);
- }), n(this, "destroy", this.unbindReflow));
- }, at.prototype.setSize = function(J, tt, st) {
- var lt = this, pt = lt.renderer;
- lt.isResizing += 1, S(st, lt), st = 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 || (st ? B : W)(lt.container, { width: lt.chartWidth + "px", height: lt.chartHeight + "px" }, st), lt.setChartSize(!0), pt.setSize(lt.chartWidth, lt.chartHeight, st), lt.axes.forEach(function(yt) {
- yt.isDirty = !0, yt.setScale();
- }), lt.isDirtyLegend = !0, lt.isDirtyBox = !0, lt.layOutTitles(), lt.getMargins(), lt.redraw(st), lt.oldChartHeight = null, V(lt, "resize"), dt(function() {
- lt && V(lt, "endResize", null, function() {
- --lt.isResizing;
- });
- }, M(st).duration);
- }, at.prototype.setChartSize = function(J) {
- var tt = this.inverted, st = 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 = st.spacingBox = { x: vt[3], y: vt[0], width: lt - vt[3] - vt[1], height: pt - vt[0] - vt[2] }, this.plotBox = st.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(Lt) {
- Lt.setAxisSize(), Lt.setAxisTranslation();
- }), st.alignElements()), V(this, "afterSetChartSize", { skipAxes: J });
- }, at.prototype.resetMargins = function() {
- V(this, "resetMargins");
- var J = this, tt = J.options.chart;
- ["margin", "spacing"].forEach(function(st) {
- var lt = tt[st], pt = z(lt) ? lt : [lt, lt, lt, lt];
- ["Top", "Right", "Bottom", "Left"].forEach(function(yt, vt) {
- J[st][vt] = et(tt[st + yt], pt[vt]);
- });
- }), p.forEach(function(st, lt) {
- J[st] = 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, st = 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, Lt = this.plotHeight, Nt = this.plotBox, Et = this.clipRect, Kt = this.clipBox, Gt = this.chartBackground, Wt = this.plotBackground, Jt = this.plotBorder, be, zt = "animate";
- if (Gt || (this.chartBackground = Gt = tt.rect().addClass("highcharts-background").add(), zt = "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[zt]({ x: be / 2, y: be / 2, width: st - be - Vt % 2, height: lt - be - Vt % 2, r: J.borderRadius }), zt = "animate", Wt || (zt = "attr", this.plotBackground = Wt = tt.rect().addClass("highcharts-plot-background").add()), Wt[zt](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, Lt).add())), Et ? Et.animate({ width: Kt.width, height: Kt.height }) : this.clipRect = tt.clipRect(Kt), zt = "animate", Jt || (zt = "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[zt](Jt.crisp({ x: At, y: St, width: Dt, height: Lt }, -Jt.strokeWidth())), this.isDirtyBox = !1, V(this, "afterDrawChartBox");
- }, at.prototype.propFromSeries = function() {
- var J = this, tt = J.options.chart, st = J.options.series, lt, pt, yt;
- ["inverted", "angular", "polar"].forEach(function(vt) {
- for (pt = o[tt.type || tt.defaultSeriesType], yt = tt[vt] || pt && pt.prototype[vt], lt = st && st.length; !yt && lt--; )
- (pt = o[st[lt].type]) && pt.prototype[vt] && (yt = !0);
- J[vt] = yt;
- });
- }, at.prototype.linkSeries = function() {
- var J = this, tt = J.series;
- tt.forEach(function(st) {
- st.linkedSeries.length = 0;
- }), tt.forEach(function(st) {
- var lt = st.options.linkedTo;
- $(lt) && (lt = lt === ":previous" ? J.series[st.index - 1] : J.get(lt)) && lt.linkedParent !== st && (lt.linkedSeries.push(st), st.linkedParent = lt, lt.enabledDataSorting && st.setDataSortingOptions(), st.visible = et(st.options.visible, lt.options.visible, st.visible));
- }), V(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(st) {
- var lt = L(tt.style, st.style), pt = nt(lt.left) + J.plotLeft, yt = nt(lt.top) + J.plotTop + 12;
- delete lt.left, delete lt.top, J.renderer.text(st.html, pt, yt).attr({ zIndex: 2 }).css(lt).add();
- });
- }, at.prototype.render = function() {
- var J = this.axes, tt = this.colorAxis, st = this.renderer, lt = this.options, pt = function(At) {
- At.forEach(function(St) {
- St.visible && St.render();
- });
- }, yt = 0;
- this.setTitle(), this.legend = new U(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 = st.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, st = q(!0, this.options.credits, J);
- st.enabled && !this.credits && (this.credits = this.renderer.text(st.text + (this.mapCredits || ""), 0, 0).addClass("highcharts-credits").on("click", function() {
- st.href && (h.location.href = st.href);
- }).attr({ align: st.position.align, zIndex: 8 }), tt.styledMode || this.credits.css(st.style), this.credits.add().align(st.position), this.credits.update = function(lt) {
- tt.credits = tt.credits.destroy(), tt.addCredits(lt);
- });
- }, at.prototype.destroy = function() {
- var J = this, tt = J.axes, st = J.series, lt = J.container, pt = lt && lt.parentNode, yt;
- for (V(J, "destroy"), J.renderer.forExport ? g(a, J) : a[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 = st.length; yt--; )
- st[yt] = st[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(), (k(tt.series) ? tt.series : []).forEach(function(st) {
- J.initSeries(st);
- }), J.linkSeries(), J.setSeriesData(), V(J, "beforeRender"), N && (F.isRequired() ? J.pointer = new F(J, tt) : J.pointer = new N(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), V(this, "load"), V(this, "render"), P(this.index) && this.setReflow(this.options.chart.reflow), this.hasLoaded = !0;
- }, at.prototype.addSeries = function(J, tt, st) {
- var lt = this, pt;
- return J && (tt = et(tt, !0), V(lt, "addSeries", { options: J }, function() {
- pt = lt.initSeries(J), lt.isDirtyLegend = !0, lt.linkSeries(), pt.enabledDataSorting && pt.setData(J.data, !1), V(lt, "afterAddSeries", { series: pt }), tt && lt.redraw(st);
- })), pt;
- }, at.prototype.addAxis = function(J, tt, st, lt) {
- return this.createAxis(tt ? "xAxis" : "yAxis", { axis: J, redraw: st, animation: lt });
- }, at.prototype.addColorAxis = function(J, tt, st) {
- return this.createAxis(
- "colorAxis",
- { axis: J, redraw: tt, animation: st }
- );
- }, at.prototype.createAxis = function(J, tt) {
- return J = new j(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, st = tt.options, lt = st.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 = D("div", { className: "highcharts-loading highcharts-loading-hidden" }, null, tt.container)), vt || (tt.loadingSpan = vt = D("span", { className: "highcharts-loading-inner" }, null, yt), n(tt, "redraw", pt)), yt.className = "highcharts-loading", O.setElementHTML(vt, et(J, st.lang.loading, "")), tt.styledMode || (W(yt, L(lt.style, { zIndex: 10 })), W(vt, lt.labelStyle), tt.loadingShown || (W(yt, { opacity: 0, display: "" }), B(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 || B(tt, { opacity: 0 }, { duration: J.loading.hideDuration || 100, complete: function() {
- W(tt, { display: "none" });
- } })), this.loadingShown = !1;
- }, at.prototype.update = function(J, tt, st, lt) {
- var pt = this, yt = { credits: "addCredits", title: "setTitle", subtitle: "setSubtitle", caption: "setCaption" }, vt = J.isResponsiveOptions, Mt = [], Pt, At;
- V(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(Lt, 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 f(J.time)), q(
- !0,
- pt.options.time,
- J.time
- )), it(J, function(Lt, Nt) {
- pt[Nt] && typeof pt[Nt].update == "function" ? pt[Nt].update(Lt, !1) : typeof pt[yt[Nt]] == "function" ? pt[yt[Nt]](Lt) : 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(Lt) {
- if (J[Lt]) {
- var Nt = [];
- pt[Lt].forEach(function(Et, Kt) {
- Et.options.isInternal || Nt.push(et(Et.options.index, Kt));
- }), gt(J[Lt]).forEach(function(Et, Kt) {
- var Gt = P(Et.id), Wt;
- Gt && (Wt = pt.get(Et.id)), !Wt && pt[Lt] && (Wt = pt[Lt][Nt ? Nt[Kt] : Kt]) && Gt && P(Wt.options.id) && (Wt = void 0), Wt && Wt.coll === Lt && (Wt.update(Et, !1), st && (Wt.touched = !0)), !Wt && st && pt.collectionsWithInit[Lt] && (pt.collectionsWithInit[Lt][0].apply(pt, [Et].concat(pt.collectionsWithInit[Lt][1] || []).concat([!1])).touched = !0);
- }), st && pt[Lt].forEach(function(Et) {
- Et.touched || Et.options.isInternal ? delete Et.touched : Mt.push(Et);
- });
- }
- }), Mt.forEach(function(Lt) {
- Lt.chart && Lt.remove && Lt.remove(!1);
- }), Dt && pt.axes.forEach(function(Lt) {
- Lt.update({}, !1);
- }), Pt && pt.getSeriesOrderByLinks().forEach(function(Lt) {
- Lt.chart && Lt.update({}, !1);
- }, this), Dt = St && St.width, St = St && ($(St.height) ? rt(St.height, Dt || pt.chartWidth) : St.height), At || G(Dt) && Dt !== pt.chartWidth || G(St) && St !== pt.chartHeight ? pt.setSize(Dt, St, lt) : et(tt, !0) && pt.redraw(lt), V(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, st = s.lang, lt = tt.options.chart.resetZoomButton, pt = lt.theme, yt = pt.states, vt = lt.relativeTo === "chart" || lt.relativeTo === "spacingBox" ? null : "scrollablePlotBox";
- V(this, "beforeShowResetZoom", null, function() {
- tt.resetZoomButton = tt.renderer.button(st.resetZoom, null, null, J, pt, yt && yt.hover).attr({ align: lt.position.align, title: st.resetZoomTitle }).addClass("highcharts-reset-zoom").add().align(lt.position, !1, vt);
- }), V(this, "afterShowResetZoom");
- }, at.prototype.zoomOut = function() {
- V(this, "selection", { resetSelection: !0 }, this.zoom);
- }, at.prototype.zoom = function(J) {
- var tt = this, st = tt.pointer, lt = tt.inverted ? st.mouseDownX : st.mouseDownY, pt = !1, yt;
- !J || J.resetSelection ? (tt.axes.forEach(function(Mt) {
- yt = Mt.zoom();
- }), st.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, Lt = !1;
- (!Dt && lt >= At && lt <= St || Dt || !P(lt)) && (Lt = !0), st[Dt ? "zoomX" : "zoomY"] && Lt && (yt = Pt.zoom(Mt.min, Mt.max), Pt.displayBtn && (pt = !0));
- });
- var vt = tt.resetZoomButton;
- pt && !vt ? tt.showResetZoom() : !pt && z(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 st = this, lt = st.hoverPoints;
- tt = typeof tt == "object" ? tt : { enabled: tt, type: "x" };
- var pt = st.options.chart, yt = st.options.mapNavigation && st.options.mapNavigation.enabled;
- pt && pt.panning && (pt.panning = tt);
- var vt = tt.type, Mt;
- V(this, "pan", { originalEvent: J }, function() {
- lt && lt.forEach(function(St) {
- St.setState();
- });
- var Pt = st.xAxis;
- vt === "xy" ? Pt = Pt.concat(st.yAxis) : vt === "y" && (Pt = st.yAxis);
- var At = {};
- Pt.forEach(function(St) {
- if (St.options.panningEnabled && !St.options.isInternal) {
- var Dt = St.horiz, Lt = J[Dt ? "chartX" : "chartY"];
- Dt = Dt ? "mouseDownX" : "mouseDownY";
- var Nt = st[Dt], Et = St.minPointOffset || 0, Kt = St.reversed && !st.inverted || !St.reversed && st.inverted ? -1 : 1, Gt = St.getExtremes(), Wt = St.toValue(Nt - Lt, !0) + Et * Kt, Jt = St.toValue(Nt + St.len - Lt, !0) - (Et * Kt || St.isXAxis && St.pointRangePadding || 0), be = Jt < Wt;
- Kt = St.hasVerticalPanning(), Nt = be ? Jt : Wt, Wt = be ? Wt : Jt;
- var zt = St.panningState;
- !Kt || St.isXAxis || zt && !zt.isDirty || St.series.forEach(function(Vt) {
- var Ce = Vt.getProcessedData(!0);
- Ce = Vt.getExtremes(Ce.yData, !0), zt || (zt = { startMin: Number.MAX_VALUE, startMax: -Number.MAX_VALUE }), G(Ce.dataMin) && G(Ce.dataMax) && (zt.startMin = Math.min(et(Vt.options.threshold, 1 / 0), Ce.dataMin, zt.startMin), zt.startMax = Math.max(et(Vt.options.threshold, -1 / 0), Ce.dataMax, zt.startMax));
- }), Kt = Math.min(et(zt && zt.startMin, Gt.dataMin), Et ? Gt.min : St.toValue(St.toPixels(Gt.min) - St.minPixelPadding)), Jt = Math.max(et(zt && zt.startMax, Gt.dataMax), Et ? Gt.max : St.toValue(St.toPixels(Gt.max) + St.minPixelPadding)), St.panningState = zt, St.isOrdinal || (Et = Kt - Nt, 0 < Et && (Wt += Et, Nt = Kt), Et = Wt - Jt, 0 < Et && (Wt = Jt, Nt -= Et), St.series.length && Nt !== Gt.min && Wt !== Gt.max && Nt >= Kt && Wt <= Jt && (St.setExtremes(
- Nt,
- Wt,
- !1,
- !1,
- { trigger: "pan" }
- ), st.resetZoomButton || yt || Nt === Kt || Wt === Jt || !vt.match("y") || (st.showResetZoom(), St.displayBtn = !1), Mt = !0), At[Dt] = Lt);
- }
- }), it(At, function(St, Dt) {
- st[Dt] = St;
- }), Mt && st.redraw(!1), W(st.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;
- }), T(l, "Core/Legend/LegendSymbol.js", [l["Core/Utilities.js"]], function(y) {
- var j = y.merge, I = y.pick, Z;
- return function(H) {
- H.drawLineMarker = function(U) {
- var F = this.options, R = U.symbolWidth, N = U.symbolHeight, b = N / 2, x = this.chart.renderer, u = this.legendGroup;
- U = U.baseline - Math.round(0.3 * U.fontMetrics.b);
- var f = {}, E = F.marker;
- this.chart.styledMode || (f = { "stroke-width": F.lineWidth || 0 }, F.dashStyle && (f.dashstyle = F.dashStyle)), this.legendLine = x.path([["M", 0, U], ["L", R, U]]).addClass("highcharts-graph").attr(f).add(u), E && E.enabled !== !1 && R && (F = Math.min(I(E.radius, b), b), this.symbol.indexOf("url") === 0 && (E = j(E, { width: N, height: N }), F = 0), this.legendSymbol = R = x.symbol(this.symbol, R / 2 - F, U - F, 2 * F, 2 * F, E).addClass("highcharts-point").add(u), R.isMarker = !0);
- }, H.drawRectangle = function(U, F) {
- var R = U.symbolHeight, N = U.options.squareSymbol;
- F.legendSymbol = this.chart.renderer.rect(N ? (U.symbolWidth - R) / 2 : 0, U.baseline - R + 1, N ? R : U.symbolWidth, R, I(U.options.symbolRadius, R / 2)).addClass("highcharts-point").attr({ zIndex: 3 }).add(F.legendGroup);
- };
- }(Z || (Z = {})), Z;
- }), T(l, "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" };
- }), T(l, "Core/Series/Series.js", [
- l["Core/Animation/AnimationUtilities.js"],
- l["Core/DefaultOptions.js"],
- l["Core/Foundation.js"],
- l["Core/Globals.js"],
- l["Core/Legend/LegendSymbol.js"],
- l["Core/Series/Point.js"],
- l["Core/Series/SeriesDefaults.js"],
- l["Core/Series/SeriesRegistry.js"],
- l["Core/Renderer/SVG/SVGElement.js"],
- l["Core/Utilities.js"]
- ], function(y, j, I, Z, H, U, F, R, N, b) {
- var x = y.animObject, u = y.setAnimation, f = j.defaultOptions, E = I.registerEventOptions, O = Z.hasTouch, B = Z.svg, M = Z.win, S = R.seriesTypes, w = b.addEvent, v = b.arrayMax, a = b.arrayMin, c = b.clamp, p = b.cleanRecursively, i = b.correctFloat, h = b.defined, s = b.erase, t = b.error, o = b.extend, n = b.find, A = b.fireEvent, _ = b.getNestedProperty, D = b.isArray, W = b.isNumber, P = b.isString, X = b.merge, g = b.objectEach, m = b.pick, L = b.removeEvent, Y = b.splat, V = b.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(k, G) {
- A(this, "init", { options: G });
- var z = this, $ = k.series;
- this.eventsToUnbind = [], z.chart = k, z.options = z.setOptions(G), G = z.options, z.linkedSeries = [], z.bindAxes(), o(z, { name: G.name, state: "", visible: G.visible !== !1, selected: G.selected === !0 }), E(this, G);
- var q = G.events;
- (q && q.click || G.point && G.point.events && G.point.events.click || G.allowPointSelect) && (k.runTrackerClick = !0), z.getColor(), z.getSymbol(), z.parallelArrays.forEach(function(et) {
- z[et + "Data"] || (z[et + "Data"] = []);
- }), z.isCartesian && (k.hasCartesianSeries = !0);
- var it;
- $.length && (it = $[$.length - 1]), z._i = m(it && it._i, -1) + 1, z.opacity = z.options.opacity, k.orderSeries(this.insert($)), G.dataSorting && G.dataSorting.enabled ? z.setDataSortingOptions() : z.points || z.data || z.setData(G.data, !1), A(this, "afterInit");
- }, Q.prototype.is = function(k) {
- return S[k] && this instanceof S[k];
- }, Q.prototype.insert = function(k) {
- var G = this.options.index, z;
- if (W(G)) {
- for (z = k.length; z--; )
- if (G >= m(k[z].options.index, k[z]._i)) {
- k.splice(z + 1, 0, this);
- break;
- }
- z === -1 && k.unshift(this), z += 1;
- } else
- k.push(this);
- return m(z, k.length - 1);
- }, Q.prototype.bindAxes = function() {
- var k = this, G = k.options, z = k.chart, $;
- A(this, "bindAxes", null, function() {
- (k.axisTypes || []).forEach(function(q) {
- var it = 0;
- z[q].forEach(function(et) {
- $ = et.options, (G[q] === it && !$.isInternal || typeof G[q] < "u" && G[q] === $.id || typeof G[q] > "u" && $.index === 0) && (k.insert(et.series), k[q] = et, et.isDirty = !0), $.isInternal || it++;
- }), k[q] || k.optionalAxis === q || t(18, !0, z);
- });
- }), A(this, "afterBindAxes");
- }, Q.prototype.updateParallelArrays = function(k, G) {
- var z = k.series, $ = arguments, q = W(G) ? function(it) {
- var et = it === "y" && z.toYData ? z.toYData(k) : k[it];
- z[it + "Data"][G] = et;
- } : function(it) {
- Array.prototype[G].apply(z[it + "Data"], Array.prototype.slice.call($, 2));
- };
- z.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(k) {
- var G = this.options, z = G.pointIntervalUnit, $ = G.relativeXValue, q = this.chart.time, it = this.xIncrement, et;
- return it = m(it, G.pointStart, 0), this.pointInterval = et = m(this.pointInterval, G.pointInterval, 1), $ && W(k) && (et *= k), z && (G = new q.Date(it), z === "day" ? q.set("Date", G, q.get("Date", G) + et) : z === "month" ? q.set("Month", G, q.get("Month", G) + et) : z === "year" && q.set("FullYear", G, q.get("FullYear", G) + et), et = G.getTime() - it), $ && W(k) ? it + et : (this.xIncrement = it + et, it);
- }, Q.prototype.setDataSortingOptions = function() {
- var k = this.options;
- o(this, { requireSorting: !1, sorted: !1, enabledDataSorting: !0, allowDG: !1 }), h(k.pointRange) || (k.pointRange = 1);
- }, Q.prototype.setOptions = function(k) {
- var G = this.chart, z = G.options, $ = z.plotOptions, q = G.userOptions || {};
- k = X(k), G = G.styledMode;
- var it = { plotOptions: $, userOptions: k };
- A(this, "setOptions", it);
- var et = it.plotOptions[this.type], nt = q.plotOptions || {};
- return this.userOptions = it.userOptions, q = X(et, $.series, q.plotOptions && q.plotOptions[this.type], k), this.tooltipOptions = X(f.tooltip, f.plotOptions.series && f.plotOptions.series.tooltip, f.plotOptions[this.type].tooltip, z.tooltip.userOptions, $.series && $.series.tooltip, $[this.type].tooltip, k.tooltip), this.stickyTracking = m(k.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, $ = this.zones = (q.zones || []).slice(), !q.negativeColor && !q.negativeFillColor || q.zones || (z = { value: q[this.zoneAxis + "Threshold"] || q.threshold || 0, className: "highcharts-negative" }, G || (z.color = q.negativeColor, z.fillColor = q.negativeFillColor), $.push(z)), $.length && h($[$.length - 1].value) && $.push(G ? {} : { color: this.color, fillColor: this.fillColor }), A(this, "afterSetOptions", { options: q }), q;
- }, Q.prototype.getName = function() {
- return m(this.options.name, "Series " + (this.index + 1));
- }, Q.prototype.getCyclic = function(k, G, z) {
- var $ = this.chart, q = this.userOptions, it = k + "Index", et = k + "Counter", nt = z ? z.length : m($.options.chart[k + "Count"], $[k + "Count"]);
- if (!G) {
- var rt = m(q[it], q["_" + it]);
- h(rt) || ($.series.length || ($[et] = 0), q["_" + it] = rt = $[et] % nt, $[et] += 1), z && (G = z[rt]);
- }
- typeof rt < "u" && (this[it] = rt), this[k] = G;
- }, Q.prototype.getColor = function() {
- this.chart.styledMode ? this.getCyclic("color") : this.options.colorByPoint ? this.color = "#cccccc" : this.getCyclic("color", this.options.color || f.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(k, G) {
- var z = k.id, $ = k.x, q = this.points, it = this.options.dataSorting, et, nt;
- if (z)
- it = this.chart.get(z), it instanceof U && (et = it);
- else if ((this.linkedParent || this.enabledDataSorting || this.options.relativeXValue) && (et = function(ct) {
- return !ct.touched && ct.index === k.index;
- }, it && it.matchByName ? et = function(ct) {
- return !ct.touched && ct.name === k.name;
- } : this.options.relativeXValue && (et = function(ct) {
- return !ct.touched && ct.options.x === k.x;
- }), et = n(q, et), !et))
- return;
- if (et) {
- var rt = et && et.index;
- typeof rt < "u" && (nt = !0);
- }
- return typeof rt > "u" && W($) && (rt = this.xData.indexOf($, G)), 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(k, G) {
- var z = this.options, $ = z.dataSorting, q = this.points, it = [], et = this.requireSorting, nt = k.length === q.length, rt, ct, gt, dt = !0;
- if (this.xIncrement = null, k.forEach(function(ht, at) {
- var J = h(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 !== z.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 || $ && $.enabled || this.hasDerivedData) && (rt = !0)) : it.push(ht);
- }, this), rt)
- for (k = q.length; k--; )
- (ct = q[k]) && !ct.touched && ct.remove && ct.remove(!1, G);
- else
- !nt || $ && $.enabled ? dt = !1 : (k.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(k, G, 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, st, lt = 0, pt = 1, yt = null;
- k = k || [];
- var vt = k.length;
- if (G = m(G, !0), ct && ct.enabled && (k = this.sortData(k)), $ !== !1 && vt && et && !q.cropped && !q.hasGroupedData && q.visible && !q.isSeriesBoosting && (st = this.updateData(k, z)), !st) {
- if (q.xIncrement = null, q.colorCounter = 0, this.parallelArrays.forEach(function(Mt) {
- q[Mt + "Data"].length = 0;
- }), dt && vt > dt)
- if (yt = q.getFirstValidPoint(k), W(yt))
- for (z = 0; z < vt; z++)
- ht[z] = this.autoIncrement(), at[z] = k[z];
- else if (D(yt))
- if (J)
- if (yt.length === J)
- for (z = 0; z < vt; z++)
- ht[z] = this.autoIncrement(), at[z] = k[z];
- else
- for (z = 0; z < vt; z++)
- $ = k[z], ht[z] = $[0], at[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 (z = 0; z < vt; z++)
- ht[z] = this.autoIncrement(), at[z] = k[z][pt];
- else
- for (z = 0; z < vt; z++)
- $ = k[z], ht[z] = $[lt], at[z] = $[pt];
- else
- t(12, !1, rt);
- else
- for (z = 0; z < vt; z++)
- typeof k[z] < "u" && ($ = { series: q }, q.pointClass.prototype.applyOptions.apply($, [k[z]]), q.updateParallelArrays($, z));
- for (at && P(at[0]) && t(14, !0, rt), q.data = [], q.options.data = q.userOptions.data = k, z = et; z--; )
- it[z] && it[z].destroy && it[z].destroy();
- gt && (gt.minRange = gt.userMinRange), q.isDirty = rt.isDirtyBox = !0, q.isDirtyData = !!it, z = !1;
- }
- nt.legendType === "point" && (this.processData(), this.generatePoints()), G && rt.redraw(z);
- }, Q.prototype.sortData = function(k) {
- var G = this, z = G.options.dataSorting.sortKey || "y", $ = function(q, it) {
- return h(it) && q.pointClass.prototype.optionsToObject.call({ series: q }, it) || {};
- };
- return k.forEach(function(q, it) {
- k[it] = $(G, q), k[it].index = it;
- }, this), k.concat().sort(function(q, it) {
- return q = _(z, q), it = _(z, it), it < q ? -1 : it > q ? 1 : 0;
- }).forEach(function(q, it) {
- q.x = it;
- }, this), G.linkedSeries && G.linkedSeries.forEach(function(q) {
- var it = q.options, et = it.data;
- it.dataSorting && it.dataSorting.enabled || !et || (et.forEach(function(nt, rt) {
- et[rt] = $(q, nt), k[rt] && (et[rt].x = k[rt].x, et[rt].index = rt);
- }), q.setData(et, !1));
- }), k;
- }, Q.prototype.getProcessedData = function(k) {
- var G = this.xAxis, z = this.options, $ = z.cropThreshold, q = k || this.getExtremesFromAll || z.getExtremesFromAll, it = this.isCartesian;
- k = G && G.val2lin, z = !(!G || !G.logarithmic);
- var et = 0, nt = this.xData, rt = this.yData, ct = this.requireSorting, gt = !1, dt = nt.length;
- if (G) {
- gt = G.getExtremes();
- var ht = gt.min, at = gt.max;
- gt = G.categories && !G.names.length;
- }
- if (it && this.sorted && !q && (!$ || dt > $ || 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 ($ = nt.length || 1; --$; )
- if (G = z ? k(nt[$]) - k(nt[$ - 1]) : nt[$] - nt[$ - 1], 0 < G && (typeof tt > "u" || G < tt))
- var tt = G;
- else
- 0 > G && ct && !gt && (t(15, !1, this.chart), ct = !1);
- return { xData: nt, yData: rt, cropped: J, cropStart: et, closestPointRange: tt };
- }, Q.prototype.processData = function(k) {
- var G = this.xAxis;
- if (this.isCartesian && !this.isDirty && !G.isDirty && !this.yAxis.isDirty && !k)
- return !1;
- k = this.getProcessedData(), this.cropped = k.cropped, this.cropStart = k.cropStart, this.processedXData = k.xData, this.processedYData = k.yData, this.closestPointRange = this.basePointRange = k.closestPointRange, A(this, "afterProcessData");
- }, Q.prototype.cropData = function(k, G, z, $, q) {
- var it = k.length, et, nt = 0, rt = it;
- for (q = m(q, this.cropShoulder), et = 0; et < it; et++)
- if (k[et] >= z) {
- nt = Math.max(0, et - q);
- break;
- }
- for (z = et; z < it; z++)
- if (k[z] > $) {
- rt = z + q;
- break;
- }
- return { xData: k.slice(nt, rt), yData: G.slice(
- nt,
- rt
- ), start: nt, end: rt };
- }, Q.prototype.generatePoints = function() {
- var k = this.options, G = k.data, z = this.processedXData, $ = this.processedYData, q = this.pointClass, it = z.length, et = this.cropStart || 0, nt = this.hasGroupedData, rt = k.keys, ct = [];
- k = k.dataGrouping && k.dataGrouping.groupAll ? et : 0;
- var gt, dt, ht = this.data;
- if (!ht && !nt) {
- var at = [];
- at.length = G.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, [z[dt]].concat(Y($[dt])));
- J.dataGroup = this.groupMap[k + dt], J.dataGroup.options && (J.options = J.dataGroup.options, o(J, J.dataGroup.options), delete J.dataLabels);
- } else
- (J = ht[at]) || typeof G[at] > "u" || (ht[at] = J = new q().init(this, G[at], z[dt]));
- J && (J.index = nt ? k + 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, A(this, "afterGeneratePoints");
- }, Q.prototype.getXExtremes = function(k) {
- return { min: a(k), max: v(k) };
- }, Q.prototype.getExtremes = function(k, G) {
- var z = this.xAxis, $ = this.yAxis, q = this.processedXData || this.xData, it = [], et = this.requireSorting ? this.cropShoulder : 0;
- $ = $ ? $.positiveValuesOnly : !1;
- var nt, rt = 0, ct = 0, gt = 0;
- k = k || this.stackedYData || this.processedYData || [];
- var dt = k.length;
- if (z) {
- var ht = z.getExtremes();
- rt = ht.min, ct = ht.max;
- }
- for (nt = 0; nt < dt; nt++) {
- var at = q[nt];
- ht = k[nt];
- var J = (W(ht) || D(ht)) && (ht.length || 0 < ht || !$);
- if (at = G || this.getExtremesFromAll || this.options.getExtremesFromAll || this.cropped || !z || (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 k = { activeYData: it, dataMin: a(it), dataMax: v(it) }, A(this, "afterGetExtremes", { dataExtremes: k }), k;
- }, Q.prototype.applyExtremes = function() {
- var k = this.getExtremes();
- return this.dataMin = k.dataMin, this.dataMax = k.dataMax, k;
- }, Q.prototype.getFirstValidPoint = function(k) {
- for (var G = k.length, z = 0, $ = null; $ === null && z < G; )
- $ = k[z], z++;
- return $;
- }, Q.prototype.translate = function() {
- this.processedXData || this.processData(), this.generatePoints();
- var k = this.options, G = k.stacking, z = this.xAxis, $ = z.categories, q = this.enabledDataSorting, it = this.yAxis, et = this.points, nt = et.length, rt = this.pointPlacementToXValue(), ct = !!rt, gt = k.threshold, dt = k.startFromThreshold ? gt : 0, ht = this.zoneAxis || "y", at, J, tt = Number.MAX_VALUE;
- for (at = 0; at < nt; at++) {
- var st = et[at], lt = st.x, pt = void 0, yt = void 0, vt = st.y, Mt = st.low, Pt = G && it.stacking && it.stacking.stacks[(this.negStacks && vt < (dt ? 0 : gt) ? "-" : "") + this.stackKey];
- if ((it.positiveValuesOnly && !it.validatePositiveValue(vt) || z.positiveValuesOnly && !z.validatePositiveValue(lt)) && (st.isNull = !0), st.plotX = J = i(c(z.translate(lt, 0, 0, 0, 1, rt, this.type === "flags"), -1e5, 1e5)), G && this.visible && Pt && Pt[lt]) {
- var At = this.getStackIndicator(
- At,
- lt,
- this.index
- );
- st.isNull || (pt = Pt[lt], yt = pt.points[At.key]);
- }
- if (D(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), st.total = st.stackTotal = pt.total, st.percentage = pt.total && st.y / pt.total * 100, st.stackY = vt, this.irregularWidths || pt.setOffset(this.pointXOffset || 0, this.barW || 0)), st.yBottom = h(Mt) ? c(it.translate(Mt, 0, 1, 0, 1), -1e5, 1e5) : null, this.dataModify && (vt = this.dataModify.modifyValue(vt, at)), st.plotY = void 0, W(vt) && (pt = it.translate(vt, !1, !0, !1, !0), typeof pt < "u" && (st.plotY = c(
- pt,
- -1e5,
- 1e5
- ))), st.isInside = this.isPointInside(st), st.clientX = ct ? i(z.translate(lt, 0, 0, 0, 1, rt)) : J, st.negative = st[ht] < (k[ht + "Threshold"] || gt || 0), st.category = $ && typeof $[st.x] < "u" ? $[st.x] : st.x, !st.isNull && st.visible !== !1) {
- typeof St < "u" && (tt = Math.min(tt, Math.abs(J - St)));
- var St = J;
- }
- st.zone = this.zones.length ? st.getZone() : void 0, !st.graphic && this.group && q && (st.isNew = !0);
- }
- this.closestPointRangePx = tt, A(this, "afterTranslate");
- }, Q.prototype.getValidPoints = function(k, G, z) {
- var $ = this.chart;
- return (k || this.points || []).filter(function(q) {
- return G && !$.isInsidePlot(q.plotX, q.plotY, { inverted: $.inverted }) ? !1 : q.visible !== !1 && (z || !q.isNull);
- });
- }, Q.prototype.getClipBox = function() {
- var k = this.chart, G = this.xAxis, z = this.yAxis, $ = X(k.clipBox);
- return G && G.len !== k.plotSizeX && ($.width = G.len), z && z.len !== k.plotSizeY && ($.height = z.len), $;
- }, Q.prototype.getSharedClipKey = function() {
- return this.sharedClipKey = (this.options.xAxis || 0) + "," + (this.options.yAxis || 0);
- }, Q.prototype.setClip = function() {
- var k = this.chart, G = this.group, z = this.markerGroup, $ = k.sharedClips;
- k = k.renderer;
- var q = this.getClipBox(), it = this.getSharedClipKey(), et = $[it];
- et ? et.animate(q) : $[it] = et = k.clipRect(q), G && G.clip(this.options.clip === !1 ? void 0 : et), z && z.clip();
- }, Q.prototype.animate = function(k) {
- var G = this.chart, z = this.group, $ = this.markerGroup, q = G.inverted, it = x(this.options.animation), et = [this.getSharedClipKey(), it.duration, it.easing, it.defer].join(), nt = G.sharedClips[et], rt = G.sharedClips[et + "m"];
- if (k && z)
- it = this.getClipBox(), nt ? nt.attr("height", it.height) : (it.width = 0, q && (it.x = G.plotHeight), nt = G.renderer.clipRect(it), G.sharedClips[et] = nt, rt = G.renderer.clipRect({ x: q ? (G.plotSizeX || 0) + 99 : -99, y: q ? -G.plotLeft : -G.plotTop, width: 99, height: q ? G.chartWidth : G.chartHeight }), G.sharedClips[et + "m"] = rt), z.clip(nt), $ && $.clip(rt);
- else if (nt && !nt.hasClass("highcharts-animating")) {
- G = this.getClipBox();
- var ct = it.step;
- $ && $.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(G, it);
- }
- }, Q.prototype.afterAnimate = function() {
- var k = this;
- this.setClip(), g(
- this.chart.sharedClips,
- function(G, z, $) {
- G && !k.chart.container.querySelector('[clip-path="url(#' + G.id + ')"]') && (G.destroy(), delete $[z]);
- }
- ), this.finishedAnimating = !0, A(this, "afterAnimate");
- }, Q.prototype.drawPoints = function() {
- var k = this.points, G = this.chart, z = this.options.marker, $ = this[this.specialGroup] || this.markerGroup, q = this.xAxis, it = m(z.enabled, !q || q.isRadial ? !0 : null, this.closestPointRangePx >= z.enabledThreshold * z.radius), et, nt;
- if (z.enabled !== !1 || this._hasPointMarkers)
- for (et = 0; et < k.length; et++) {
- var rt = k[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 = G.renderer.symbol(ht, at.x, at.y, at.width, at.height, dt ? gt : z).add($), this.enabledDataSorting && G.hasRendered && (nt.attr({ x: rt.startXPos }), ct = "animate")), nt && ct === "animate" && nt[J ? "show" : "hide"](J).animate(at), nt && !G.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(k, G) {
- var z = this.options, $ = z.marker, q = k.marker || {}, it = q.symbol || $.symbol, et = m(q.radius, $.radius);
- return G && ($ = $.states[G], G = q.states && q.states[G], et = m(G && G.radius, $ && $.radius, et + ($ && $.radiusPlus || 0))), k.hasImage = it && it.indexOf("url") === 0, k.hasImage && (et = 0), k = { x: z.crisp ? Math.floor(k.plotX - et) : k.plotX - et, y: k.plotY - et }, et && (k.width = k.height = 2 * et), k;
- }, Q.prototype.pointAttribs = function(k, G) {
- var z = this.options.marker, $ = k && k.options, q = $ && $.marker || {}, it = $ && $.color, et = k && k.color, nt = k && k.zone && k.zone.color, rt = this.color;
- return k = m(q.lineWidth, z.lineWidth), $ = 1, rt = it || nt || et || rt, it = q.fillColor || z.fillColor || rt, et = q.lineColor || z.lineColor || rt, G = G || "normal", z = z.states[G] || {}, G = q.states && q.states[G] || {}, k = m(G.lineWidth, z.lineWidth, k + m(G.lineWidthPlus, z.lineWidthPlus, 0)), it = G.fillColor || z.fillColor || it, et = G.lineColor || z.lineColor || et, $ = m(G.opacity, z.opacity, $), { stroke: et, "stroke-width": k, fill: it, opacity: $ };
- }, Q.prototype.destroy = function(k) {
- var G = this, z = G.chart, $ = /AppleWebKit\/533/.test(M.navigator.userAgent), q = G.data || [], it, et, nt, rt;
- for (A(G, "destroy"), this.removeEvents(k), (G.axisTypes || []).forEach(function(ct) {
- (rt = G[ct]) && rt.series && (s(rt.series, G), rt.isDirty = rt.forceRedraw = !0);
- }), G.legendItem && G.chart.legend.destroyItem(G), et = q.length; et--; )
- (nt = q[et]) && nt.destroy && nt.destroy();
- G.clips && G.clips.forEach(function(ct) {
- return ct.destroy();
- }), b.clearTimeout(G.animationTimeout), g(G, function(ct, gt) {
- ct instanceof N && !ct.survive && (it = $ && gt === "group" ? "hide" : "destroy", ct[it]());
- }), z.hoverSeries === G && (z.hoverSeries = void 0), s(z.series, G), z.orderSeries(), g(G, function(ct, gt) {
- k && gt === "hcEvents" || delete G[gt];
- });
- }, Q.prototype.applyZones = function() {
- var k = this, G = this.chart, z = G.renderer, $ = this.zones, q = this.clips || [], it = this.graph, et = this.area, nt = Math.max(G.chartWidth, G.chartHeight), rt = this[(this.zoneAxis || "y") + "Axis"], ct = G.inverted, gt, dt, ht, at, J, tt, st, lt, pt = !1;
- if ($.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();
- $.forEach(function(Pt, At) {
- gt = yt ? vt ? G.plotWidth : 0 : vt ? 0 : rt.toPixels(Mt.min) || 0, gt = c(m(dt, gt), 0, nt), dt = c(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 = G.plotHeight - ht.x)) : (ht = { x: 0, y: ct ? tt : J, width: nt, height: at }, vt && (ht.y = G.plotWidth - ht.y)), ct && z.isVML && (ht = rt.isXAxis ? {
- x: 0,
- y: yt ? J : tt,
- height: ht.width,
- width: G.chartWidth
- } : { x: ht.y - G.plotLeft - G.spacingBox.x, y: 0, width: ht.height, height: G.chartHeight }), q[At] ? q[At].animate(ht) : q[At] = z.clipRect(ht), st = k["zone-area-" + At], lt = k["zone-graph-" + At], it && lt && lt.clip(q[At]), et && st && st.clip(q[At]), pt = Pt.value > Mt.max, k.resetZones && dt === 0 && (dt = void 0);
- }), this.clips = q;
- } else
- k.visible && (it && it.show(!0), et && et.show(!0));
- }, Q.prototype.invertGroups = function(k) {
- function G() {
- ["group", "markerGroup"].forEach(function(q) {
- z[q] && ($.renderer.isVML && z[q].attr({ width: z.yAxis.len, height: z.xAxis.len }), z[q].width = z.yAxis.len, z[q].height = z.xAxis.len, z[q].invert(z.isRadialSeries ? !1 : k));
- });
- }
- var z = this, $ = z.chart;
- z.xAxis && (z.eventsToUnbind.push(w($, "resize", G)), G(), z.invertGroups = G);
- }, Q.prototype.plotGroup = function(k, G, z, $, q) {
- var it = this[k], et = !it;
- return z = { visibility: z, zIndex: $ || 0.1 }, typeof this.opacity > "u" || this.chart.styledMode || this.state === "inactive" || (z.opacity = this.opacity), et && (this[k] = it = this.chart.renderer.g().add(q)), it.addClass("highcharts-" + G + " highcharts-series-" + this.index + " highcharts-" + this.type + "-series " + (h(this.colorIndex) ? "highcharts-color-" + this.colorIndex + " " : "") + (this.options.className || "") + (it.hasClass("highcharts-tracker") ? " highcharts-tracker" : ""), !0), it.attr(z)[et ? "attr" : "animate"](this.getPlotBox()), it;
- }, Q.prototype.getPlotBox = function() {
- var k = this.chart, G = this.xAxis, z = this.yAxis;
- return k.inverted && (G = z, z = this.xAxis), { translateX: G ? G.left : k.plotLeft, translateY: z ? z.top : k.plotTop, scaleX: 1, scaleY: 1 };
- }, Q.prototype.removeEvents = function(k) {
- k || L(this), this.eventsToUnbind.length && (this.eventsToUnbind.forEach(function(G) {
- G();
- }), this.eventsToUnbind.length = 0);
- }, Q.prototype.render = function() {
- var k = this, G = k.chart, z = k.options, $ = x(z.animation), q = k.visible ? "inherit" : "hidden", it = z.zIndex, et = k.hasRendered, nt = G.seriesGroup, rt = G.inverted;
- G = !k.finishedAnimating && G.renderer.isSVG ? $.duration : 0, A(this, "render");
- var ct = k.plotGroup("group", "series", q, it, nt);
- k.markerGroup = k.plotGroup("markerGroup", "markers", q, it, nt), z.clip !== !1 && k.setClip(), k.animate && G && k.animate(!0), ct.inverted = m(k.invertible, k.isCartesian) ? rt : !1, k.drawGraph && (k.drawGraph(), k.applyZones()), k.visible && k.drawPoints(), k.drawDataLabels && k.drawDataLabels(), k.redrawPoints && k.redrawPoints(), k.drawTracker && k.options.enableMouseTracking !== !1 && k.drawTracker(), k.invertGroups(rt), k.animate && G && k.animate(), et || (G && $.defer && (G += $.defer), k.animationTimeout = V(function() {
- k.afterAnimate();
- }, G || 0)), k.isDirty = !1, k.hasRendered = !0, A(k, "afterRender");
- }, Q.prototype.redraw = function() {
- var k = this.chart, G = this.isDirty || this.isDirtyData, z = this.group, $ = this.xAxis, q = this.yAxis;
- z && (k.inverted && z.attr({
- width: k.plotWidth,
- height: k.plotHeight
- }), z.animate({ translateX: m($ && $.left, k.plotLeft), translateY: m(q && q.top, k.plotTop) })), this.translate(), this.render(), G && delete this.kdTree;
- }, Q.prototype.searchPoint = function(k, G) {
- var z = this.xAxis, $ = this.yAxis, q = this.chart.inverted;
- return this.searchKDTree({ clientX: q ? z.len - k.chartY + z.pos : k.chartX - z.pos, plotY: q ? $.len - k.chartX + $.pos : k.chartY - $.pos }, G, k);
- }, Q.prototype.buildKDTree = function(k) {
- function G(q, it, et) {
- var nt = q && q.length;
- if (nt) {
- var rt = z.kdAxisArray[it % et];
- return q.sort(function(ct, gt) {
- return ct[rt] - gt[rt];
- }), nt = Math.floor(nt / 2), { point: q[nt], left: G(q.slice(0, nt), it + 1, et), right: G(q.slice(nt + 1), it + 1, et) };
- }
- }
- this.buildingKdTree = !0;
- var z = this, $ = -1 < z.options.findNearestPointBy.indexOf("y") ? 2 : 1;
- delete z.kdTree, V(function() {
- z.kdTree = G(z.getValidPoints(null, !z.directTouch), $, $), z.buildingKdTree = !1;
- }, z.options.kdNow || k && k.type === "touchstart" ? 0 : 1);
- }, Q.prototype.searchKDTree = function(k, G, z) {
- function $(rt, ct, gt, dt) {
- var ht = ct.point, at = q.kdAxisArray[gt % dt], J = ht, tt = h(rt[it]) && h(ht[it]) ? Math.pow(rt[it] - ht[it], 2) : null, st = h(rt[et]) && h(ht[et]) ? Math.pow(rt[et] - ht[et], 2) : null;
- return st = (tt || 0) + (st || 0), ht.dist = h(st) ? Math.sqrt(st) : Number.MAX_VALUE, ht.distX = h(tt) ? Math.sqrt(tt) : Number.MAX_VALUE, at = rt[at] - ht[at], st = 0 > at ? "left" : "right", tt = 0 > at ? "right" : "left", ct[st] && (st = $(rt, ct[st], gt + 1, dt), J = st[nt] < J[nt] ? st : ht), ct[tt] && Math.sqrt(at * at) < J[nt] && (rt = $(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 = G ? "distX" : "dist";
- if (G = -1 < q.options.findNearestPointBy.indexOf("y") ? 2 : 1, this.kdTree || this.buildingKdTree || this.buildKDTree(z), this.kdTree)
- return $(
- k,
- this.kdTree,
- G,
- G
- );
- }, Q.prototype.pointPlacementToXValue = function() {
- var k = this.options, G = k.pointRange, z = this.xAxis;
- return k = k.pointPlacement, k === "between" && (k = z.reversed ? -0.5 : 0.5), W(k) ? k * (G || z.pointRange) : 0;
- }, Q.prototype.isPointInside = function(k) {
- var G = this.chart, z = this.xAxis, $ = this.yAxis;
- return typeof k.plotY < "u" && typeof k.plotX < "u" && 0 <= k.plotY && k.plotY <= ($ ? $.len : G.plotHeight) && 0 <= k.plotX && k.plotX <= (z ? z.len : G.plotWidth);
- }, Q.prototype.drawTracker = function() {
- var k = this, G = k.options, z = G.trackByArea, $ = [].concat(z ? k.areaPath : k.graphPath), q = k.chart, it = q.pointer, et = q.renderer, nt = q.options.tooltip.snap, rt = k.tracker, ct = function(dt) {
- q.hoverSeries !== k && k.onMouseOver();
- }, gt = "rgba(192,192,192," + (B ? 1e-4 : 2e-3) + ")";
- rt ? rt.attr({ d: $ }) : k.graph && (k.tracker = et.path($).attr({ visibility: k.visible ? "visible" : "hidden", zIndex: 2 }).addClass(z ? "highcharts-tracker-area" : "highcharts-tracker-line").add(k.group), q.styledMode || k.tracker.attr({ "stroke-linecap": "round", "stroke-linejoin": "round", stroke: gt, fill: z ? gt : "none", "stroke-width": k.graph.strokeWidth() + (z ? 0 : 2 * nt) }), [k.tracker, k.markerGroup, k.dataLabelsGroup].forEach(function(dt) {
- dt && (dt.addClass("highcharts-tracker").on("mouseover", ct).on("mouseout", function(ht) {
- it.onTrackerMouseOut(ht);
- }), G.cursor && !q.styledMode && dt.css({ cursor: G.cursor }), O) && dt.on("touchstart", ct);
- })), A(this, "afterDrawTracker");
- }, Q.prototype.addPoint = function(k, G, 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;
- G = m(G, !0);
- var ht = { series: this };
- this.pointClass.prototype.applyOptions.apply(
- ht,
- [k]
- );
- 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, k), dt && (this.data.splice(J, 0, null), this.processData()), it.legendType === "point" && this.generatePoints(), z && (et[0] && et[0].remove ? et[0].remove(!1) : (et.shift(), this.updateParallelArrays(ht, "shift"), ct.shift())), q !== !1 && A(this, "addPoint", { point: ht }), this.isDirtyData = this.isDirty = !0, G && nt.redraw($);
- }, Q.prototype.removePoint = function(k, G, z) {
- var $ = this, q = $.data, it = q[k], et = $.points, nt = $.chart, rt = function() {
- et && et.length === q.length && et.splice(k, 1), q.splice(k, 1), $.options.data.splice(k, 1), $.updateParallelArrays(it || { series: $ }, "splice", k, 1), it && it.destroy(), $.isDirty = !0, $.isDirtyData = !0, G && nt.redraw();
- };
- u(z, nt), G = m(G, !0), it ? it.firePointEvent("remove", null, rt) : rt();
- }, Q.prototype.remove = function(k, G, z, $) {
- function q() {
- it.destroy($), et.isDirtyLegend = et.isDirtyBox = !0, et.linkSeries(), m(k, !0) && et.redraw(G);
- }
- var it = this, et = it.chart;
- z !== !1 ? A(
- it,
- "remove",
- null,
- q
- ) : q();
- }, Q.prototype.update = function(k, G) {
- k = p(k, this.userOptions), A(this, "update", { options: k });
- var z = this, $ = z.chart, q = z.userOptions, it = z.initialType || z.type, et = $.options.plotOptions, nt = S[it].prototype, rt = z.finishedAnimating && { animation: !1 }, ct = {}, gt, dt = ["eventOptions", "navigatorSeries", "baseSeries"], ht = k.type || q.type || $.options.chart.type, at = !(this.hasDerivedData || ht && ht !== this.type || typeof k.pointStart < "u" || typeof k.pointInterval < "u" || typeof k.relativeXValue < "u" || z.hasOptionChanged("dataGrouping") || z.hasOptionChanged("pointStart") || z.hasOptionChanged("pointInterval") || z.hasOptionChanged("pointIntervalUnit") || z.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"), k.visible !== !1 && dt.push("area", "graph"), z.parallelArrays.forEach(function(tt) {
- dt.push(tt + "Data");
- }), k.data && (k.dataSorting && o(z.options.dataSorting, k.dataSorting), this.setData(k.data, !1))), k = X(q, rt, { index: typeof q.index > "u" ? z.index : q.index, pointStart: m(et && et.series && et.series.pointStart, q.pointStart, z.xData[0]) }, !at && { data: z.options.data }, k), at && k.data && (k.data = z.options.data), dt = ["group", "markerGroup", "dataLabelsGroup", "transformGroup"].concat(dt), dt.forEach(function(tt) {
- dt[tt] = z[tt], delete z[tt];
- }), et = !1, S[ht]) {
- if (et = ht !== z.type, z.remove(!1, !1, !1, !0), et)
- if (Object.setPrototypeOf)
- Object.setPrototypeOf(z, S[ht].prototype);
- else {
- rt = Object.hasOwnProperty.call(z, "hcEvents") && z.hcEvents;
- for (gt in nt)
- z[gt] = void 0;
- o(z, S[ht].prototype), rt ? z.hcEvents = rt : delete z.hcEvents;
- }
- } else
- t(17, !0, $, { missingModuleFor: ht });
- if (dt.forEach(function(tt) {
- z[tt] = dt[tt];
- }), z.init($, k), at && this.points) {
- var J = z.options;
- J.visible === !1 ? (ct.graphic = 1, ct.dataLabel = 1) : z._hasPointLabels || (k = J.marker, nt = J.dataLabels, !k || k.enabled !== !1 && (q.marker && q.marker.symbol) === k.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 && $.legend.destroyItem(tt));
- }, this);
- }
- z.initialType = it, $.linkSeries(), et && z.linkedSeries.length && (z.isDirtyData = !0), A(this, "afterUpdate"), m(G, !0) && $.redraw(at ? void 0 : !1);
- }, Q.prototype.setName = function(k) {
- this.name = this.options.name = this.userOptions.name = k, this.chart.isDirtyLegend = !0;
- }, Q.prototype.hasOptionChanged = function(k) {
- var G = this.options[k], z = this.chart.options.plotOptions, $ = this.userOptions[k];
- return $ ? G !== $ : G !== m(
- z && z[this.type] && z[this.type][k],
- z && z.series && z.series[k],
- G
- );
- }, Q.prototype.onMouseOver = function() {
- var k = this.chart, G = k.hoverSeries;
- k.pointer.setHoverChartIndex(), G && G !== this && G.onMouseOut(), this.options.events.mouseOver && A(this, "mouseOver"), this.setState("hover"), k.hoverSeries = this;
- }, Q.prototype.onMouseOut = function() {
- var k = this.options, G = this.chart, z = G.tooltip, $ = G.hoverPoint;
- G.hoverSeries = null, $ && $.onMouseOut(), this && k.events.mouseOut && A(this, "mouseOut"), !z || this.stickyTracking || z.shared && !this.noSharedTooltip || z.hide(), G.series.forEach(function(q) {
- q.setState(
- "",
- !0
- );
- });
- }, Q.prototype.setState = function(k, G) {
- var z = this, $ = z.options, q = z.graph, it = $.inactiveOtherPoints, et = $.states, nt = m(et[k || "normal"] && et[k || "normal"].animation, z.chart.options.chart.animation), rt = $.lineWidth, ct = 0, gt = $.opacity;
- if (k = k || "", z.state !== k && ([z.group, z.markerGroup, z.dataLabelsGroup].forEach(function(dt) {
- dt && (z.state && dt.removeClass("highcharts-series-" + z.state), k && dt.addClass("highcharts-series-" + k));
- }), z.state = k, !z.chart.styledMode)) {
- if (et[k] && et[k].enabled === !1)
- return;
- if (k && (rt = et[k].lineWidth || rt + (et[k].lineWidthPlus || 0), gt = m(et[k].opacity, gt)), q && !q.dashstyle)
- for ($ = { "stroke-width": rt }, q.animate($, nt); z["zone-graph-" + ct]; )
- z["zone-graph-" + ct].animate($, nt), ct += 1;
- it || [z.group, z.markerGroup, z.dataLabelsGroup, z.labelBySeries].forEach(function(dt) {
- dt && dt.animate({ opacity: gt }, nt);
- });
- }
- G && it && z.points && z.setAllPointsToState(k || void 0);
- }, Q.prototype.setAllPointsToState = function(k) {
- this.points.forEach(function(G) {
- G.setState && G.setState(k);
- });
- }, Q.prototype.setVisible = function(k, G) {
- var z = this, $ = z.chart, q = z.legendItem, it = $.options.chart.ignoreHiddenSeries, et = z.visible, nt = (z.visible = k = z.options.visible = z.userOptions.visible = typeof k > "u" ? !et : k) ? "show" : "hide";
- ["group", "dataLabelsGroup", "markerGroup", "tracker", "tt"].forEach(function(rt) {
- z[rt] && z[rt][nt]();
- }), ($.hoverSeries === z || ($.hoverPoint && $.hoverPoint.series) === z) && z.onMouseOut(), q && $.legend.colorizeItem(z, k), z.isDirty = !0, z.options.stacking && $.series.forEach(function(rt) {
- rt.options.stacking && rt.visible && (rt.isDirty = !0);
- }), z.linkedSeries.forEach(function(rt) {
- rt.setVisible(k, !1);
- }), it && ($.isDirtyBox = !0), A(z, nt), G !== !1 && $.redraw();
- }, Q.prototype.show = function() {
- this.setVisible(!0);
- }, Q.prototype.hide = function() {
- this.setVisible(!1);
- }, Q.prototype.select = function(k) {
- this.selected = k = this.options.selected = typeof k > "u" ? !this.selected : k, this.checkbox && (this.checkbox.checked = k), A(this, k ? "select" : "unselect");
- }, Q.prototype.shouldShowTooltip = function(k, G, z) {
- return z === void 0 && (z = {}), z.series = this, z.visiblePlotOnly = !0, this.chart.isInsidePlot(k, G, z);
- }, Q.defaultOptions = F, Q;
- }(), o(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: U, requireSorting: !0, sorted: !0 }), R.series = y, y;
- }), T(l, "Extensions/ScrollablePlotArea.js", [l["Core/Animation/AnimationUtilities.js"], l["Core/Axis/Axis.js"], l["Core/Chart/Chart.js"], l["Core/Series/Series.js"], l["Core/Renderer/RendererRegistry.js"], l["Core/Utilities.js"]], function(y, j, I, Z, H, U) {
- var F = y.stop, R = U.addEvent, N = U.createElement, b = U.merge, x = U.pick;
- R(I, "afterSetChartSize", function(u) {
- var f = this.options.chart.scrollablePlotArea, E = f && f.minWidth;
- if (f = f && f.minHeight, !this.renderer.forExport) {
- if (E) {
- if (this.scrollablePixelsX = E = Math.max(0, E - this.chartWidth)) {
- this.scrollablePlotBox = this.renderer.scrollablePlotBox = b(this.plotBox), this.plotBox.width = this.plotWidth += E, this.inverted ? this.clipBox.height += E : this.clipBox.width += E;
- var O = { 1: { name: "right", value: E } };
- }
- } else
- f && (this.scrollablePixelsY = E = Math.max(
- 0,
- f - this.chartHeight
- )) && (this.scrollablePlotBox = this.renderer.scrollablePlotBox = b(this.plotBox), this.plotBox.height = this.plotHeight += E, this.inverted ? this.clipBox.width += E : this.clipBox.height += E, O = { 2: { name: "bottom", value: E } });
- O && !u.skipAxes && this.axes.forEach(function(B) {
- O[B.side] ? B.getPlotLinePath = function() {
- var M = O[B.side].name, S = this[M];
- this[M] = S - O[B.side].value;
- var w = j.prototype.getPlotLinePath.apply(this, arguments);
- return this[M] = S, w;
- } : (B.setAxisSize(), B.setAxisTranslation());
- });
- }
- }), R(I, "render", function() {
- this.scrollablePixelsX || this.scrollablePixelsY ? (this.setUpScrolling && this.setUpScrolling(), this.applyFixed()) : this.fixedDiv && this.applyFixed();
- }), I.prototype.setUpScrolling = function() {
- var u = this, f = { WebkitOverflowScrolling: "touch", overflowX: "hidden", overflowY: "hidden" };
- this.scrollablePixelsX && (f.overflowX = "auto"), this.scrollablePixelsY && (f.overflowY = "auto"), this.scrollingParent = N("div", { className: "highcharts-scrolling-parent" }, { position: "relative" }, this.renderTo), this.scrollingContainer = N(
- "div",
- { className: "highcharts-scrolling" },
- f,
- this.scrollingParent
- ), R(this.scrollingContainer, "scroll", function() {
- u.pointer && delete u.pointer.chartPosition;
- }), this.innerContainer = N("div", { className: "highcharts-inner-container" }, null, this.scrollingContainer), this.innerContainer.appendChild(this.container), this.setUpScrolling = null;
- }, I.prototype.moveFixedElements = function() {
- var u = this.container, f = this.fixedRenderer, E = ".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 && E.push(O + ":not(.highcharts-radial-axis)", O + "-labels:not(.highcharts-radial-axis-labels)"), E.forEach(function(B) {
- [].forEach.call(u.querySelectorAll(B), function(M) {
- (M.namespaceURI === f.SVG_NS ? f.box : f.box.parentNode).appendChild(M), M.style.pointerEvents = "auto";
- });
- });
- }, I.prototype.applyFixed = function() {
- var u = !this.fixedDiv, f = this.options.chart, E = f.scrollablePlotArea, O = H.getRendererType();
- u ? (this.fixedDiv = N("div", { className: "highcharts-fixed" }, { position: "absolute", overflow: "hidden", pointerEvents: "none", zIndex: (f.style && f.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 = f = new O(
- this.fixedDiv,
- this.chartWidth,
- this.chartHeight,
- this.options.chart.style
- ), this.scrollableMask = f.path().attr({ fill: this.options.chart.backgroundColor || "#fff", "fill-opacity": x(E.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 || u) && (this.scrollableDirty = !1, this.moveFixedElements()), f = this.chartWidth + (this.scrollablePixelsX || 0), O = this.chartHeight + (this.scrollablePixelsY || 0), F(this.container), this.container.style.width = f + "px", this.container.style.height = O + "px", this.renderer.boxWrapper.attr({ width: f, height: O, viewBox: [0, 0, f, O].join(" ") }), this.chartBackground.attr({ width: f, height: O }), this.scrollingContainer.style.height = this.chartHeight + "px", u && (E.scrollPositionX && (this.scrollingContainer.scrollLeft = this.scrollablePixelsX * E.scrollPositionX), E.scrollPositionY && (this.scrollingContainer.scrollTop = this.scrollablePixelsY * E.scrollPositionY)), O = this.axisOffset, u = this.plotTop - O[0] - 1, E = this.plotLeft - O[3] - 1, f = this.plotTop + this.plotHeight + O[2] + 1, O = this.plotLeft + this.plotWidth + O[1] + 1;
- var B = this.plotLeft + this.plotWidth - (this.scrollablePixelsX || 0), M = this.plotTop + this.plotHeight - (this.scrollablePixelsY || 0);
- u = this.scrollablePixelsX ? [["M", 0, u], ["L", this.plotLeft - 1, u], ["L", this.plotLeft - 1, f], ["L", 0, f], ["Z"], ["M", B, u], ["L", this.chartWidth, u], ["L", this.chartWidth, f], ["L", B, f], ["Z"]] : this.scrollablePixelsY ? [["M", E, 0], ["L", E, this.plotTop - 1], ["L", O, this.plotTop - 1], ["L", O, 0], ["Z"], ["M", E, M], ["L", E, this.chartHeight], ["L", O, this.chartHeight], ["L", O, M], ["Z"]] : [["M", 0, 0]], this.redrawTrigger !== "adjustHeight" && this.scrollableMask.attr({ d: u });
- }, R(j, "afterInit", function() {
- this.chart.scrollableDirty = !0;
- }), R(Z, "show", function() {
- this.chart.scrollableDirty = !0;
- });
- }), T(l, "Core/Axis/StackingAxis.js", [l["Core/Animation/AnimationUtilities.js"], l["Core/Axis/Axis.js"], l["Core/Utilities.js"]], function(y, j, I) {
- var Z = y.getDeferredAnimation, H = I.addEvent, U = I.destroyObjectProperties, F = I.fireEvent, R = I.isNumber, N = I.objectEach, b;
- return function(x) {
- function u() {
- var B = this.stacking;
- if (B) {
- var M = B.stacks;
- N(M, function(S, w) {
- U(S), M[w] = null;
- }), B && B.stackTotalGroup && B.stackTotalGroup.destroy();
- }
- }
- function f() {
- this.stacking || (this.stacking = new O(this));
- }
- var E = [];
- x.compose = function(B) {
- return E.indexOf(B) === -1 && (E.push(B), H(B, "init", f), H(B, "destroy", u)), B;
- };
- var O = function() {
- function B(M) {
- this.oldStacks = {}, this.stacks = {}, this.stacksTouched = 0, this.axis = M;
- }
- return B.prototype.buildStacks = function() {
- var M = this.axis, S = M.series, w = M.options.reversedStacks, v = S.length, a;
- if (!M.isXAxis) {
- for (this.usePercentage = !1, a = v; a--; ) {
- var c = S[w ? a : v - a - 1];
- c.setStackedPoints(), c.setGroupedPoints();
- }
- for (a = 0; a < v; a++)
- S[a].modifyStacks();
- F(M, "afterBuildStacks");
- }
- }, B.prototype.cleanStacks = function() {
- if (!this.axis.isXAxis) {
- if (this.oldStacks)
- var M = this.stacks = this.oldStacks;
- N(M, function(S) {
- N(S, function(w) {
- w.cumulative = w.total;
- });
- });
- }
- }, B.prototype.resetStacks = function() {
- var M = this, S = M.stacks;
- M.axis.isXAxis || N(S, function(w) {
- N(
- w,
- function(v, a) {
- R(v.touched) && v.touched < M.stacksTouched ? (v.destroy(), delete w[a]) : (v.total = null, v.cumulative = null);
- }
- );
- });
- }, B.prototype.renderStackTotals = function() {
- var M = this.axis, S = M.chart, w = S.renderer, v = this.stacks;
- M = Z(S, M.options.stackLabels && M.options.stackLabels.animation || !1);
- var a = this.stackTotalGroup = this.stackTotalGroup || w.g("stack-labels").attr({ visibility: "visible", zIndex: 6, opacity: 0 }).add();
- a.translate(S.plotLeft, S.plotTop), N(v, function(c) {
- N(c, function(p) {
- p.render(a);
- });
- }), a.animate(
- { opacity: 1 },
- M
- );
- }, B;
- }();
- x.Additions = O;
- }(b || (b = {})), b;
- }), T(l, "Extensions/Stacking.js", [l["Core/Axis/Axis.js"], l["Core/Chart/Chart.js"], l["Core/FormatUtilities.js"], l["Core/Globals.js"], l["Core/Series/Series.js"], l["Core/Axis/StackingAxis.js"], l["Core/Utilities.js"]], function(y, j, I, Z, H, U, F) {
- var R = I.format, N = F.correctFloat, b = F.defined, x = F.destroyObjectProperties, u = F.isArray, f = F.isNumber, E = F.objectEach, O = F.pick, B = function() {
- function M(S, w, v, a, c) {
- var p = S.chart.inverted;
- this.axis = S, this.isNegative = v, this.options = w = w || {}, this.x = a, this.total = null, this.points = {}, this.hasValidPoints = !1, this.stack = c, this.rightCliff = this.leftCliff = 0, this.alignOptions = { align: w.align || (p ? v ? "left" : "right" : "center"), verticalAlign: w.verticalAlign || (p ? "middle" : v ? "bottom" : "top"), y: w.y, x: w.x }, this.textAlign = w.textAlign || (p ? v ? "right" : "left" : "center");
- }
- return M.prototype.destroy = function() {
- x(this, this.axis);
- }, M.prototype.render = function(S) {
- var w = this.axis.chart, v = this.options, a = v.format;
- a = a ? R(a, this, w) : v.formatter.call(this), this.label ? this.label.attr({
- text: a,
- visibility: "hidden"
- }) : (this.label = w.renderer.label(a, null, null, v.shape, null, null, v.useHTML, !1, "stack-labels"), a = { r: v.borderRadius || 0, text: a, rotation: v.rotation, padding: O(v.padding, 5), visibility: "hidden" }, w.styledMode || (a.fill = v.backgroundColor, a.stroke = v.borderColor, a["stroke-width"] = v.borderWidth, this.label.css(v.style)), this.label.attr(a), this.label.added || this.label.add(S)), this.label.labelrank = w.plotSizeY;
- }, M.prototype.setOffset = function(S, w, v, a, c) {
- var p = this.axis, i = p.chart;
- a = p.translate(p.stacking.usePercentage ? 100 : a || this.total, 0, 0, 0, 1), v = p.translate(v || 0), v = b(a) && Math.abs(a - v), S = O(c, i.xAxis[0].translate(this.x)) + S, p = b(a) && this.getStackBox(i, this, S, a, w, v, p), w = this.label, v = this.isNegative, S = O(this.options.overflow, "justify") === "justify";
- var h = this.textAlign;
- w && p && (c = w.getBBox(), a = w.padding, h = h === "left" ? i.inverted ? -a : a : h === "right" ? c.width : i.inverted && h === "center" ? c.width / 2 : i.inverted ? v ? c.width + a : -a : c.width / 2, v = i.inverted ? c.height / 2 : v ? -a : c.height, this.alignOptions.x = O(this.options.x, 0), this.alignOptions.y = O(this.options.y, 0), p.x -= h, p.y -= v, w.align(this.alignOptions, null, p), i.isInsidePlot(w.alignAttr.x + h - this.alignOptions.x, w.alignAttr.y + v - this.alignOptions.y) ? w.show() : (w.alignAttr.y = -9999, S = !1), S && H.prototype.justifyDataLabel.call(this.axis, w, this.alignOptions, w.alignAttr, c, p), w.attr({ x: w.alignAttr.x, y: w.alignAttr.y }), O(!S && this.options.crop, !0) && ((i = f(w.x) && f(w.y) && i.isInsidePlot(w.x - a + w.width, w.y) && i.isInsidePlot(w.x + a, w.y)) || w.hide()));
- }, M.prototype.getStackBox = function(S, w, v, a, c, p, i) {
- var h = w.axis.reversed, s = S.inverted, t = i.height + i.pos - (s ? S.plotLeft : S.plotTop);
- return w = w.isNegative && !h || !w.isNegative && h, { x: s ? w ? a - i.right : a - p + i.pos - S.plotLeft : v + S.xAxis[0].transB - S.plotLeft, y: s ? i.height - v - c : w ? t - a - p : t - a, width: s ? p : c, height: s ? c : p };
- }, M;
- }();
- return j.prototype.getStacks = function() {
- var M = this, S = M.inverted;
- M.yAxis.forEach(function(w) {
- w.stacking && w.stacking.stacks && w.hasVisibleSeries && (w.stacking.oldStacks = w.stacking.stacks);
- }), M.series.forEach(function(w) {
- var v = w.xAxis && w.xAxis.options || {};
- !w.options.stacking || w.visible !== !0 && M.options.chart.ignoreHiddenSeries !== !1 || (w.stackKey = [w.type, O(w.options.stack, ""), S ? v.top : v.left, S ? v.height : v.width].join());
- });
- }, U.compose(y), H.prototype.setGroupedPoints = function() {
- var M = 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") : M && E(M.stacks, function(S, w) {
- w.slice(-5) === "group" && (E(S, function(v) {
- return v.destroy();
- }), delete M.stacks[w]);
- });
- }, H.prototype.setStackedPoints = function(M) {
- var S = M || this.options.stacking;
- if (S && (this.visible === !0 || this.chart.options.chart.ignoreHiddenSeries === !1)) {
- var w = this.processedXData, v = this.processedYData, a = [], c = v.length, p = this.options, i = p.threshold, h = O(p.startFromThreshold && i, 0);
- p = p.stack, M = M ? this.type + "," + S : this.stackKey;
- var s = "-" + M, t = this.negStacks, o = this.yAxis, n = o.stacking.stacks, A = o.stacking.oldStacks, _, D;
- for (o.stacking.stacksTouched += 1, D = 0; D < c; D++) {
- var W = w[D], P = v[D], X = this.getStackIndicator(
- X,
- W,
- this.index
- ), g = X.key, m = (_ = t && P < (h ? 0 : i)) ? s : M;
- n[m] || (n[m] = {}), n[m][W] || (A[m] && A[m][W] ? (n[m][W] = A[m][W], n[m][W].total = null) : n[m][W] = new B(o, o.options.stackLabels, _, W, p)), m = n[m][W], P !== null ? (m.points[g] = m.points[this.index] = [O(m.cumulative, h)], b(m.cumulative) || (m.base = g), m.touched = o.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, S === "percent" ? (_ = _ ? M : s, t && n[_] && n[_][W] ? (_ = n[_][W], m.total = _.total = Math.max(_.total, m.total) + Math.abs(P) || 0) : m.total = N(m.total + (Math.abs(P) || 0))) : S === "group" ? (u(P) && (P = P[0]), P !== null && (m.total = (m.total || 0) + 1)) : m.total = N(m.total + (P || 0)), m.cumulative = S === "group" ? (m.total || 1) - 1 : O(m.cumulative, h) + (P || 0), P !== null && (m.points[g].push(m.cumulative), a[D] = m.cumulative, m.hasValidPoints = !0);
- }
- S === "percent" && (o.stacking.usePercentage = !0), S !== "group" && (this.stackedYData = a), o.stacking.oldStacks = {};
- }
- }, H.prototype.modifyStacks = function() {
- var M = this, S = M.stackKey, w = M.yAxis.stacking.stacks, v = M.processedXData, a, c = M.options.stacking;
- M[c + "Stacker"] && [S, "-" + S].forEach(function(p) {
- for (var i = v.length, h, s; i--; )
- h = v[i], a = M.getStackIndicator(a, h, M.index, p), (s = (h = w[p] && w[p][h]) && h.points[a.key]) && M[c + "Stacker"](s, h, i);
- });
- }, H.prototype.percentStacker = function(M, S, w) {
- S = S.total ? 100 / S.total : 0, M[0] = N(M[0] * S), M[1] = N(M[1] * S), this.stackedYData[w] = M[1];
- }, H.prototype.getStackIndicator = function(M, S, w, v) {
- return !b(M) || M.x !== S || v && M.key !== v ? M = { x: S, index: 0, key: v } : M.index++, M.key = [w, S, M.index].join(), M;
- }, Z.StackItem = B, Z.StackItem;
- }), T(l, "Series/Line/LineSeries.js", [l["Core/Series/Series.js"], l["Core/Series/SeriesRegistry.js"], l["Core/Utilities.js"]], function(y, j, I) {
- var Z = this && this.__extends || function() {
- var F = function(R, N) {
- return F = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(b, x) {
- b.__proto__ = x;
- } || function(b, x) {
- for (var u in x)
- x.hasOwnProperty(u) && (b[u] = x[u]);
- }, F(R, N);
- };
- return function(R, N) {
- function b() {
- this.constructor = R;
- }
- F(R, N), R.prototype = N === null ? Object.create(N) : (b.prototype = N.prototype, new b());
- };
- }(), H = I.defined, U = I.merge;
- return I = function(F) {
- function R() {
- var N = F !== null && F.apply(this, arguments) || this;
- return N.data = void 0, N.options = void 0, N.points = void 0, N;
- }
- return Z(R, F), R.prototype.drawGraph = function() {
- var N = this, b = this.options, x = (this.gappedPath || this.getGraphPath).call(this), u = this.chart.styledMode, f = [["graph", "highcharts-graph"]];
- u || f[0].push(b.lineColor || this.color || "#cccccc", b.dashStyle), f = N.getZonesGraphs(f), f.forEach(function(E, O) {
- var B = E[0], M = N[B], S = M ? "animate" : "attr";
- M ? (M.endX = N.preventGraphAnimation ? null : x.xMap, M.animate({ d: x })) : x.length && (N[B] = M = N.chart.renderer.path(x).addClass(E[1]).attr({ zIndex: 1 }).add(N.group)), M && !u && (B = { stroke: E[2], "stroke-width": b.lineWidth, fill: N.fillGraph && N.color || "none" }, E[3] ? B.dashstyle = E[3] : b.linecap !== "square" && (B["stroke-linecap"] = B["stroke-linejoin"] = "round"), M[S](B).shadow(2 > O && b.shadow)), M && (M.startX = x.xMap, M.isArea = x.isArea);
- });
- }, R.prototype.getGraphPath = function(N, b, x) {
- var u = this, f = u.options, E = [], O = [], B, M = f.step;
- N = N || u.points;
- var S = N.reversed;
- return S && N.reverse(), (M = { right: 1, center: 2 }[M] || M && 3) && S && (M = 4 - M), N = this.getValidPoints(N, !1, !(f.connectNulls && !b && !x)), N.forEach(function(w, v) {
- var a = w.plotX, c = w.plotY, p = N[v - 1];
- (w.leftCliff || p && p.rightCliff) && !x && (B = !0), w.isNull && !H(b) && 0 < v ? B = !f.connectNulls : w.isNull && !b ? B = !0 : (v === 0 || B ? v = [["M", w.plotX, w.plotY]] : u.getPointSpline ? v = [u.getPointSpline(N, w, v)] : M ? (v = M === 1 ? [["L", p.plotX, c]] : M === 2 ? [["L", (p.plotX + a) / 2, p.plotY], ["L", (p.plotX + a) / 2, c]] : [["L", a, p.plotY]], v.push(["L", a, c])) : v = [["L", a, c]], O.push(w.x), M && (O.push(w.x), M === 2 && O.push(w.x)), E.push.apply(E, v), B = !1);
- }), E.xMap = O, u.graphPath = E;
- }, R.prototype.getZonesGraphs = function(N) {
- return this.zones.forEach(function(b, x) {
- x = ["zone-graph-" + x, "highcharts-graph highcharts-zone-graph-" + x + " " + (b.className || "")], this.chart.styledMode || x.push(b.color || this.color, b.dashStyle || this.options.dashStyle), N.push(x);
- }, this), N;
- }, R.defaultOptions = U(y.defaultOptions, {}), R;
- }(y), j.registerSeriesType("line", I), I;
- }), T(l, "Series/Area/AreaSeries.js", [
- l["Core/Color/Color.js"],
- l["Core/Legend/LegendSymbol.js"],
- l["Core/Series/SeriesRegistry.js"],
- l["Core/Utilities.js"]
- ], function(y, j, I, Z) {
- var H = this && this.__extends || function() {
- var x = function(u, f) {
- return x = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(E, O) {
- E.__proto__ = O;
- } || function(E, O) {
- for (var B in O)
- O.hasOwnProperty(B) && (E[B] = O[B]);
- }, x(u, f);
- };
- return function(u, f) {
- function E() {
- this.constructor = u;
- }
- x(u, f), u.prototype = f === null ? Object.create(f) : (E.prototype = f.prototype, new E());
- };
- }(), U = y.parse, F = I.seriesTypes.line;
- y = Z.extend;
- var R = Z.merge, N = Z.objectEach, b = Z.pick;
- return Z = function(x) {
- function u() {
- var f = x !== null && x.apply(this, arguments) || this;
- return f.data = void 0, f.options = void 0, f.points = void 0, f;
- }
- return H(u, x), u.prototype.drawGraph = function() {
- this.areaPath = [], x.prototype.drawGraph.apply(this);
- var f = this, E = this.areaPath, O = this.options, B = [["area", "highcharts-area", this.color, O.fillColor]];
- this.zones.forEach(function(M, S) {
- B.push(["zone-area-" + S, "highcharts-area highcharts-zone-area-" + S + " " + M.className, M.color || f.color, M.fillColor || O.fillColor]);
- }), B.forEach(function(M) {
- var S = M[0], w = f[S], v = w ? "animate" : "attr", a = {};
- w ? (w.endX = f.preventGraphAnimation ? null : E.xMap, w.animate({ d: E })) : (a.zIndex = 0, w = f[S] = f.chart.renderer.path(E).addClass(M[1]).add(f.group), w.isArea = !0), f.chart.styledMode || (a.fill = b(M[3], U(M[2]).setOpacity(b(O.fillOpacity, 0.75)).get())), w[v](a), w.startX = E.xMap, w.shiftUnit = O.step ? 2 : 1;
- });
- }, u.prototype.getGraphPath = function(f) {
- var E = F.prototype.getGraphPath, O = this.options, B = O.stacking, M = this.yAxis, S, w = [], v = [], a = this.index, c = M.stacking.stacks[this.stackKey], p = O.threshold, i = Math.round(M.getThreshold(O.threshold));
- O = b(O.connectNulls, B === "percent");
- var h = function(n, A, _) {
- var D = f[n];
- n = B && c[D.x].points[a];
- var W = D[_ + "Null"] || 0;
- if (_ = D[_ + "Cliff"] || 0, D = !0, _ || W) {
- var P = (W ? n[0] : n[1]) + _, X = n[0] + _;
- D = !!W;
- } else
- !B && f[A] && f[A].isNull && (P = X = p);
- typeof P < "u" && (v.push({ plotX: t, plotY: P === null ? i : M.getThreshold(P), isNull: D, isCliff: !0 }), w.push({ plotX: t, plotY: X === null ? i : M.getThreshold(X), doCurve: !1 }));
- };
- for (f = f || this.points, B && (f = this.getStackPoints(f)), S = 0; S < f.length; S++) {
- B || (f[S].leftCliff = f[S].rightCliff = f[S].leftNull = f[S].rightNull = void 0);
- var s = f[S].isNull, t = b(f[S].rectPlotX, f[S].plotX), o = B ? b(f[S].yBottom, i) : i;
- (!s || O) && (O || h(S, S - 1, "left"), s && !B && O || (v.push(f[S]), w.push({ x: S, plotX: t, plotY: o })), O || h(S, S + 1, "right"));
- }
- return S = E.call(this, v, !0, !0), w.reversed = !0, s = E.call(this, w, !0, !0), (o = s[0]) && o[0] === "M" && (s[0] = ["L", o[1], o[2]]), s = S.concat(s), s.length && s.push(["Z"]), E = E.call(this, v, !1, O), s.xMap = S.xMap, this.areaPath = s, E;
- }, u.prototype.getStackPoints = function(f) {
- var E = this, O = [], B = [], M = this.xAxis, S = this.yAxis, w = S.stacking.stacks[this.stackKey], v = {}, a = S.series, c = a.length, p = S.options.reversedStacks ? 1 : -1, i = a.indexOf(E);
- if (f = f || this.points, this.options.stacking) {
- for (var h = 0; h < f.length; h++)
- f[h].leftNull = f[h].rightNull = void 0, v[f[h].x] = f[h];
- N(w, function(t, o) {
- t.total !== null && B.push(o);
- }), B.sort(function(t, o) {
- return t - o;
- });
- var s = a.map(function(t) {
- return t.visible;
- });
- B.forEach(function(t, o) {
- var n = 0, A, _;
- if (v[t] && !v[t].isNull)
- O.push(v[t]), [-1, 1].forEach(function(W) {
- var P = W === 1 ? "rightNull" : "leftNull", X = 0, g = w[B[o + W]];
- if (g)
- for (var m = i; 0 <= m && m < c; ) {
- var L = a[m].index;
- A = g.points[L], A || (L === E.index ? v[t][P] = !0 : s[m] && (_ = w[t].points[L]) && (X -= _[1] - _[0])), m += p;
- }
- v[t][W === 1 ? "rightCliff" : "leftCliff"] = X;
- });
- else {
- for (var D = i; 0 <= D && D < c; ) {
- if (A = w[t].points[a[D].index]) {
- n = A[1];
- break;
- }
- D += p;
- }
- n = b(n, 0), n = S.translate(n, 0, 1, 0, 1), O.push({ isNull: !0, plotX: M.translate(t, 0, 0, 0, 1), x: t, plotY: n, yBottom: n });
- }
- });
- }
- return O;
- }, u.defaultOptions = R(F.defaultOptions, { threshold: 0 }), u;
- }(F), y(Z.prototype, {
- singleStacks: !1,
- drawLegendSymbol: j.drawRectangle
- }), I.registerSeriesType("area", Z), Z;
- }), T(l, "Series/Spline/SplineSeries.js", [l["Core/Series/SeriesRegistry.js"], l["Core/Utilities.js"]], function(y, j) {
- var I = this && this.__extends || function() {
- var F = function(R, N) {
- return F = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(b, x) {
- b.__proto__ = x;
- } || function(b, x) {
- for (var u in x)
- x.hasOwnProperty(u) && (b[u] = x[u]);
- }, F(R, N);
- };
- return function(R, N) {
- function b() {
- this.constructor = R;
- }
- F(R, N), R.prototype = N === null ? Object.create(N) : (b.prototype = N.prototype, new b());
- };
- }(), Z = y.seriesTypes.line, H = j.merge, U = j.pick;
- return j = function(F) {
- function R() {
- var N = F !== null && F.apply(this, arguments) || this;
- return N.data = void 0, N.options = void 0, N.points = void 0, N;
- }
- return I(R, F), R.prototype.getPointSpline = function(N, b, x) {
- var u = b.plotX || 0, f = b.plotY || 0, E = N[x - 1];
- if (x = N[x + 1], E && !E.isNull && E.doCurve !== !1 && !b.isCliff && x && !x.isNull && x.doCurve !== !1 && !b.isCliff) {
- N = E.plotY || 0;
- var O = x.plotX || 0;
- x = x.plotY || 0;
- var B = 0, M = (1.5 * u + (E.plotX || 0)) / 2.5, S = (1.5 * f + N) / 2.5;
- O = (1.5 * u + O) / 2.5;
- var w = (1.5 * f + x) / 2.5;
- O !== M && (B = (w - S) * (O - u) / (O - M) + f - w), S += B, w += B, S > N && S > f ? (S = Math.max(N, f), w = 2 * f - S) : S < N && S < f && (S = Math.min(N, f), w = 2 * f - S), w > x && w > f ? (w = Math.max(x, f), S = 2 * f - w) : w < x && w < f && (w = Math.min(x, f), S = 2 * f - w), b.rightContX = O, b.rightContY = w;
- }
- return b = ["C", U(E.rightContX, E.plotX, 0), U(E.rightContY, E.plotY, 0), U(M, u, 0), U(S, f, 0), u, f], E.rightContX = E.rightContY = void 0, b;
- }, R.defaultOptions = H(Z.defaultOptions), R;
- }(Z), y.registerSeriesType("spline", j), j;
- }), T(
- l,
- "Series/AreaSpline/AreaSplineSeries.js",
- [l["Series/Area/AreaSeries.js"], l["Series/Spline/SplineSeries.js"], l["Core/Legend/LegendSymbol.js"], l["Core/Series/SeriesRegistry.js"], l["Core/Utilities.js"]],
- function(y, j, I, Z, H) {
- var U = this && this.__extends || function() {
- var b = function(x, u) {
- return b = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(f, E) {
- f.__proto__ = E;
- } || function(f, E) {
- for (var O in E)
- E.hasOwnProperty(O) && (f[O] = E[O]);
- }, b(x, u);
- };
- return function(x, u) {
- function f() {
- this.constructor = x;
- }
- b(x, u), x.prototype = u === null ? Object.create(u) : (f.prototype = u.prototype, new f());
- };
- }(), F = y.prototype, R = H.extend, N = H.merge;
- return H = function(b) {
- function x() {
- var u = b !== null && b.apply(this, arguments) || this;
- return u.data = void 0, u.points = void 0, u.options = void 0, u;
- }
- return U(x, b), x.defaultOptions = N(j.defaultOptions, y.defaultOptions), x;
- }(j), R(H.prototype, { getGraphPath: F.getGraphPath, getStackPoints: F.getStackPoints, drawGraph: F.drawGraph, drawLegendSymbol: I.drawRectangle }), Z.registerSeriesType("areaspline", H), H;
- }
- ), T(l, "Series/Column/ColumnSeries.js", [
- l["Core/Animation/AnimationUtilities.js"],
- l["Core/Color/Color.js"],
- l["Core/Globals.js"],
- l["Core/Legend/LegendSymbol.js"],
- l["Core/Series/Series.js"],
- l["Core/Series/SeriesRegistry.js"],
- l["Core/Utilities.js"]
- ], function(y, j, I, Z, H, U, F) {
- var R = this && this.__extends || function() {
- var c = function(p, i) {
- return c = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(h, s) {
- h.__proto__ = s;
- } || function(h, s) {
- for (var t in s)
- s.hasOwnProperty(t) && (h[t] = s[t]);
- }, c(p, i);
- };
- return function(p, i) {
- function h() {
- this.constructor = p;
- }
- c(p, i), p.prototype = i === null ? Object.create(i) : (h.prototype = i.prototype, new h());
- };
- }(), N = y.animObject, b = j.parse, x = I.hasTouch;
- y = I.noop;
- var u = F.clamp, f = F.css, E = F.defined, O = F.extend, B = F.fireEvent, M = F.isArray, S = F.isNumber, w = F.merge, v = F.pick, a = F.objectEach;
- return F = function(c) {
- function p() {
- var i = c !== null && c.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(p, c), p.prototype.animate = function(i) {
- var h = this, s = this.yAxis, t = h.options, o = this.chart.inverted, n = {}, A = o ? "translateX" : "translateY";
- if (i)
- n.scaleY = 1e-3, i = u(s.toPixels(t.threshold), s.pos, s.pos + s.len), o ? n.translateX = i - s.len : n.translateY = i, h.clipBox && h.setClip(), h.group.attr(n);
- else {
- var _ = Number(h.group.attr(A));
- h.group.animate({ scaleY: 1 }, O(N(h.options.animation), { step: function(D, W) {
- h.group && (n[A] = _ + W.pos * (s.pos - _), h.group.attr(n));
- } }));
- }
- }, p.prototype.init = function(i, h) {
- c.prototype.init.apply(this, arguments);
- var s = this;
- i = s.chart, i.hasRendered && i.series.forEach(function(t) {
- t.type === s.type && (t.isDirty = !0);
- });
- }, p.prototype.getColumnMetrics = function() {
- var i = this, h = i.options, s = i.xAxis, t = i.yAxis, o = s.options.reversedStacks;
- o = s.reversed && !o || !s.reversed && o;
- var n = {}, A, _ = 0;
- h.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") {
- A = X.stackKey, typeof n[A] > "u" && (n[A] = _++);
- var L = n[A];
- } else
- m.grouping !== !1 && (L = _++);
- X.columnIndex = L;
- }
- });
- var D = Math.min(Math.abs(s.transA) * (s.ordinal && s.ordinal.slope || h.pointRange || s.closestPointRange || s.tickInterval || 1), s.len), W = D * h.groupPadding, P = (D - 2 * W) / (_ || 1);
- return h = Math.min(h.maxPointWidth || s.len, v(h.pointWidth, P * (1 - 2 * h.pointPadding))), i.columnMetrics = { width: h, offset: (P - h) / 2 + (W + ((i.columnIndex || 0) + (o ? 1 : 0)) * P - D / 2) * (o ? -1 : 1), paddedWidth: P, columnCount: _ }, i.columnMetrics;
- }, p.prototype.crispCol = function(i, h, s, t) {
- var o = this.chart, n = this.borderWidth, A = -(n % 2 ? 0.5 : 0);
- return n = n % 2 ? 0.5 : 1, o.inverted && o.renderer.isVML && (n += 1), this.options.crisp && (s = Math.round(i + s) + A, i = Math.round(i) + A, s -= i), t = Math.round(h + t) + n, A = 0.5 >= Math.abs(h) && 0.5 < t, h = Math.round(h) + n, t -= h, A && t && (--h, t += 1), { x: i, y: h, width: s, height: t };
- }, p.prototype.adjustForMissingColumns = function(i, h, s, t) {
- var o = this, n = this.options.stacking;
- if (!s.isNull && 1 < t.columnCount) {
- var A = 0, _ = 0;
- a(this.yAxis.stacking && this.yAxis.stacking.stacks, function(D) {
- if (typeof s.x == "number" && (D = D[s.x.toString()])) {
- var W = D.points[o.index], P = D.total;
- n ? (W && (A = _), D.hasValidPoints && _++) : M(W) && (A = W[1], _ = P || 0);
- }
- }), i = (s.plotX || 0) + ((_ - 1) * t.paddedWidth + h) / 2 - h - A * t.paddedWidth;
- }
- return i;
- }, p.prototype.translate = function() {
- var i = this, h = i.chart, s = i.options, t = i.dense = 2 > i.closestPointRange * i.xAxis.transA;
- t = i.borderWidth = v(s.borderWidth, t ? 0 : 1);
- var o = i.xAxis, n = i.yAxis, A = s.threshold, _ = i.translatedThreshold = n.getThreshold(A), D = v(s.minPointLength, 5), W = i.getColumnMetrics(), P = W.width, X = i.pointXOffset = W.offset, g = i.dataMin, m = i.dataMax, L = i.barW = Math.max(P, 1 + 2 * t);
- h.inverted && (_ -= 0.5), s.pointPadding && (L = Math.ceil(L)), H.prototype.translate.apply(i), i.points.forEach(function(Y) {
- var V = v(Y.yBottom, _), Q = 999 + Math.abs(V), k = Y.plotX || 0;
- Q = u(Y.plotY, -Q, n.len + Q);
- var G = Math.min(Q, V), z = Math.max(Q, V) - G, $ = P, q = k + X, it = L;
- D && Math.abs(z) < D && (z = D, k = !n.reversed && !Y.negative || n.reversed && Y.negative, S(A) && S(m) && Y.y === A && m <= A && (n.min || 0) < A && (g !== m || (n.max || 0) <= A) && (k = !k), G = Math.abs(G - _) > D ? V - D : _ - (k ? D : 0)), E(Y.options.pointWidth) && ($ = it = Math.ceil(Y.options.pointWidth), q -= Math.round(($ - P) / 2)), s.centerInCategory && (q = i.adjustForMissingColumns(q, $, Y, W)), Y.barX = q, Y.pointWidth = $, Y.tooltipPos = h.inverted ? [u(n.len + n.pos - h.plotLeft - Q, n.pos - h.plotLeft, n.len + n.pos - h.plotLeft), o.len + o.pos - h.plotTop - q - it / 2, z] : [o.left - h.plotLeft + q + it / 2, u(Q + n.pos - h.plotTop, n.pos - h.plotTop, n.len + n.pos - h.plotTop), z], Y.shapeType = i.pointClass.prototype.shapeType || "rect", Y.shapeArgs = i.crispCol.apply(i, Y.isNull ? [q, _, it, 0] : [q, G, it, z]);
- });
- }, p.prototype.drawGraph = function() {
- this.group[this.dense ? "addClass" : "removeClass"]("highcharts-dense-data");
- }, p.prototype.pointAttribs = function(i, h) {
- var s = this.options, t = this.pointAttrToOptions || {}, o = t.stroke || "borderColor", n = t["stroke-width"] || "borderWidth", A = i && i.color || this.color, _ = i && i[o] || s[o] || A;
- t = i && i.options.dashStyle || s.dashStyle;
- var D = i && i[n] || s[n] || this[n] || 0, W = v(i && i.opacity, s.opacity, 1);
- if (i && this.zones.length) {
- var P = i.getZone();
- A = i.options.color || P && (P.color || i.nonZonedColor) || this.color, P && (_ = P.borderColor || _, t = P.dashStyle || t, D = P.borderWidth || D);
- }
- return h && i && (i = w(s.states[h], i.options.states && i.options.states[h] || {}), h = i.brightness, A = i.color || typeof h < "u" && b(A).brighten(i.brightness).get() || A, _ = i[o] || _, D = i[n] || D, t = i.dashStyle || t, W = v(i.opacity, W)), o = { fill: A, stroke: _, "stroke-width": D, opacity: W }, t && (o.dashstyle = t), o;
- }, p.prototype.drawPoints = function() {
- var i = this, h = this.chart, s = i.options, t = h.renderer, o = s.animationLimit || 250, n;
- i.points.forEach(function(A) {
- var _ = A.graphic, D = !!_, W = _ && h.pointCount < o ? "animate" : "attr";
- S(A.plotY) && A.y !== null ? (n = A.shapeArgs, _ && A.hasNewShapeType() && (_ = _.destroy()), i.enabledDataSorting && (A.startXPos = i.xAxis.reversed ? -(n && n.width || 0) : i.xAxis.width), _ || (A.graphic = _ = t[A.shapeType](n).add(A.group || i.group)) && i.enabledDataSorting && h.hasRendered && h.pointCount < o && (_.attr({ x: A.startXPos }), D = !0, W = "animate"), _ && D && _[W](w(n)), s.borderRadius && _[W]({ r: s.borderRadius }), h.styledMode || _[W](i.pointAttribs(A, A.selected && "select")).shadow(A.allowShadow !== !1 && s.shadow, null, s.stacking && !s.borderRadius), _ && (_.addClass(A.getClassName(), !0), _.attr({ visibility: A.visible ? "inherit" : "hidden" }))) : _ && (A.graphic = _.destroy());
- });
- }, p.prototype.drawTracker = function() {
- var i = this, h = i.chart, s = h.pointer, t = function(n) {
- var A = s.getPointFromEvent(n);
- typeof A < "u" && (s.isDirectTouch = !0, A.onMouseOver(n));
- }, o;
- i.points.forEach(function(n) {
- o = M(n.dataLabels) ? n.dataLabels : n.dataLabel ? [n.dataLabel] : [], n.graphic && (n.graphic.element.point = n), o.forEach(function(A) {
- A.div ? A.div.point = n : A.element.point = n;
- });
- }), i._hasTracking || (i.trackerGroups.forEach(function(n) {
- i[n] && (i[n].addClass("highcharts-tracker").on("mouseover", t).on("mouseout", function(A) {
- s.onTrackerMouseOut(A);
- }), x && i[n].on(
- "touchstart",
- t
- ), !h.styledMode && i.options.cursor && i[n].css(f).css({ cursor: i.options.cursor }));
- }), i._hasTracking = !0), B(this, "afterDrawTracker");
- }, p.prototype.remove = function() {
- var i = this, h = i.chart;
- h.hasRendered && h.series.forEach(function(s) {
- s.type === i.type && (s.isDirty = !0);
- }), H.prototype.remove.apply(i, arguments);
- }, p.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" }), p;
- }(H), O(F.prototype, { cropShoulder: 0, directTouch: !0, drawLegendSymbol: Z.drawRectangle, getSymbol: y, negStacks: !0, trackerGroups: ["group", "dataLabelsGroup"] }), U.registerSeriesType("column", F), F;
- }), T(l, "Core/Series/DataLabel.js", [
- l["Core/Animation/AnimationUtilities.js"],
- l["Core/FormatUtilities.js"],
- l["Core/Utilities.js"]
- ], function(y, j, I) {
- var Z = y.getDeferredAnimation, H = j.format, U = I.defined, F = I.extend, R = I.fireEvent, N = I.isArray, b = I.merge, x = I.objectEach, u = I.pick, f = I.splat, E;
- return function(O) {
- function B(p, i, h, s, t) {
- var o = this, n = this.chart, A = this.isCartesian && n.inverted, _ = this.enabledDataSorting, D = u(p.dlBox && p.dlBox.centerX, p.plotX, -9999), W = u(p.plotY, -9999), P = i.getBBox(), X = h.rotation, g = h.align, m = n.isInsidePlot(D, Math.round(W), { inverted: A, paneCoordinates: !0, series: o }), L = function(k) {
- _ && o.xAxis && !Y && o.setDataLabelStartPos(
- p,
- i,
- t,
- m,
- k
- );
- }, Y = u(h.overflow, _ ? "none" : "justify") === "justify", V = this.visible && p.visible !== !1 && (p.series.forceDL || _ && !Y || m || u(h.inside, !!this.options.stacking) && s && n.isInsidePlot(D, A ? s.x + 1 : s.y + s.height - 1, { inverted: A, paneCoordinates: !0, series: o }));
- if (V) {
- var Q = n.renderer.fontMetrics(n.styledMode ? void 0 : h.style.fontSize, i).b;
- s = F({ x: A ? this.yAxis.len - W : D, y: Math.round(A ? this.xAxis.len - D : W), width: 0, height: 0 }, s), F(h, { width: P.width, height: P.height }), X ? (Y = !1, D = n.renderer.rotCorr(Q, X), D = { x: s.x + (h.x || 0) + s.width / 2 + D.x, y: s.y + (h.y || 0) + { top: 0, middle: 0.5, bottom: 1 }[h.verticalAlign] * s.height }, L(D), i[t ? "attr" : "animate"](D).attr({ align: g }), L = (X + 720) % 360, L = 180 < L && 360 > L, g === "left" ? D.y -= L ? P.height : 0 : g === "center" ? (D.x -= P.width / 2, D.y -= P.height / 2) : g === "right" && (D.x -= P.width, D.y -= L ? 0 : P.height), i.placed = !0, i.alignAttr = D) : (L(s), i.align(h, void 0, s), D = i.alignAttr), Y && 0 <= s.height ? this.justifyDataLabel(i, h, D, P, s, t) : u(h.crop, !0) && (V = n.isInsidePlot(D.x, D.y, { paneCoordinates: !0, series: o }) && n.isInsidePlot(D.x + P.width, D.y + P.height, {
- paneCoordinates: !0,
- series: o
- })), h.shape && !X && i[t ? "attr" : "animate"]({ anchorX: A ? n.plotWidth - p.plotY : p.plotX, anchorY: A ? n.plotHeight - p.plotX : p.plotY });
- }
- t && _ && (i.placed = !1), V || _ && !Y || (i.hide(!0), i.placed = !1);
- }
- function M(p, i) {
- var h = i.filter;
- return h ? (i = h.operator, p = p[h.property], h = h.value, i === ">" && p > h || i === "<" && p < h || i === ">=" && p >= h || i === "<=" && p <= h || i === "==" && p == h || i === "===" && p === h) : !0;
- }
- function S() {
- var p = this, i = p.chart, h = p.options, s = p.points, t = p.hasRendered || 0, o = i.renderer, n = h.dataLabels, A, _ = n.animation;
- if (_ = n.defer ? Z(
- i,
- _,
- p
- ) : { 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[p.type] && i.options.plotOptions[p.type].dataLabels), n), R(this, "drawDataLabels"), N(n) || n.enabled || p._hasPointLabels) {
- var D = p.plotGroup("dataLabelsGroup", "data-labels", t ? "inherit" : "hidden", n.zIndex || 6);
- D.attr({ opacity: +t }), !t && (t = p.dataLabelsGroup) && (p.visible && D.show(!0), t[h.animation ? "animate" : "attr"]({ opacity: 1 }, _)), s.forEach(function(W) {
- A = f(v(n, W.dlOptions || W.options && W.options.dataLabels)), A.forEach(function(P, X) {
- var g = P.enabled && (!W.isNull || W.dataLabelOnNull) && M(W, P), m = W.connectors ? W.connectors[X] : W.connector, L = W.dataLabels ? W.dataLabels[X] : W.dataLabel, Y = u(P.distance, W.labelDistance), V = !L;
- if (g) {
- var Q = W.getLabelConfig(), k = u(P[W.formatPrefix + "Format"], P.format);
- Q = U(k) ? H(k, Q, i) : (P[W.formatPrefix + "Formatter"] || P.formatter).call(Q, P), k = P.style;
- var G = P.rotation;
- i.styledMode || (k.color = u(P.color, k.color, p.color, "#000000"), k.color === "contrast" ? (W.contrastColor = o.getContrast(W.color || p.color), k.color = !U(Y) && P.inside || 0 > Y || h.stacking ? W.contrastColor : "#000000") : delete W.contrastColor, h.cursor && (k.cursor = h.cursor));
- var z = { r: P.borderRadius || 0, rotation: G, padding: P.padding, zIndex: 1 };
- i.styledMode || (z.fill = P.backgroundColor, z.stroke = P.borderColor, z["stroke-width"] = P.borderWidth), x(z, function($, q) {
- typeof $ > "u" && delete z[q];
- });
- }
- !L || g && U(Q) && !!L.div == !!P.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 && U(Q) && (L ? z.text = Q : (W.dataLabels = W.dataLabels || [], L = W.dataLabels[X] = G ? o.text(Q, 0, -9999, P.useHTML).addClass("highcharts-data-label") : o.label(Q, 0, -9999, P.shape, null, null, P.useHTML, null, "data-label"), X || (W.dataLabel = L), L.addClass(" highcharts-data-label-color-" + W.colorIndex + " " + (P.className || "") + (P.useHTML ? " highcharts-tracker" : ""))), L.options = P, L.attr(z), i.styledMode || L.css(k).shadow(P.shadow), L.added || L.add(D), P.textPath && !P.useHTML && (L.setTextPath(W.getDataLabelPath && W.getDataLabelPath(L) || W.graphic, P.textPath), W.dataLabelPath && !P.textPath.enabled && (W.dataLabelPath = W.dataLabelPath.destroy())), p.alignDataLabel(W, L, P, null, V));
- });
- });
- }
- R(this, "afterDrawDataLabels");
- }
- function w(p, i, h, s, t, o) {
- var n = this.chart, A = i.align, _ = i.verticalAlign, D = p.box ? 0 : p.padding || 0, W = i.x;
- W = W === void 0 ? 0 : W;
- var P = i.y;
- P = P === void 0 ? 0 : P;
- var X = (h.x || 0) + D;
- if (0 > X) {
- A === "right" && 0 <= W ? (i.align = "left", i.inside = !0) : W -= X;
- var g = !0;
- }
- return X = (h.x || 0) + s.width - D, X > n.plotWidth && (A === "left" && 0 >= W ? (i.align = "right", i.inside = !0) : W += n.plotWidth - X, g = !0), X = h.y + D, 0 > X && (_ === "bottom" && 0 <= P ? (i.verticalAlign = "top", i.inside = !0) : P -= X, g = !0), X = (h.y || 0) + s.height - D, X > n.plotHeight && (_ === "top" && 0 >= P ? (i.verticalAlign = "bottom", i.inside = !0) : P += n.plotHeight - X, g = !0), g && (i.x = W, i.y = P, p.placed = !o, p.align(i, void 0, t)), g;
- }
- function v(p, i) {
- var h = [], s;
- if (N(p) && !N(i))
- h = p.map(function(t) {
- return b(t, i);
- });
- else if (N(i) && !N(p))
- h = i.map(function(t) {
- return b(p, t);
- });
- else if (N(p) || N(i))
- for (s = Math.max(p.length, i.length); s--; )
- h[s] = b(p[s], i[s]);
- else
- h = b(p, i);
- return h;
- }
- function a(p, i, h, s, t) {
- var o = this.chart, n = o.inverted, A = this.xAxis, _ = A.reversed, D = n ? i.height / 2 : i.width / 2;
- p = (p = p.pointWidth) ? p / 2 : 0, i.startXPos = n ? t.x : _ ? -D - p : A.width - D + p, i.startYPos = n ? _ ? this.yAxis.height - D + p : -D - p : t.y, s ? i.visibility === "hidden" && (i.show(), i.attr({ opacity: 0 }).animate({ opacity: 1 })) : i.attr({ opacity: 1 }).animate(
- { opacity: 0 },
- void 0,
- i.hide
- ), o.hasRendered && (h && i.attr({ x: i.startXPos, y: i.startYPos }), i.placed = !0);
- }
- var c = [];
- O.compose = function(p) {
- if (c.indexOf(p) === -1) {
- var i = p.prototype;
- c.push(p), i.alignDataLabel = B, i.drawDataLabels = S, i.justifyDataLabel = w, i.setDataLabelStartPos = a;
- }
- };
- }(E || (E = {})), E;
- }), T(l, "Series/Column/ColumnDataLabel.js", [l["Core/Series/DataLabel.js"], l["Core/Series/SeriesRegistry.js"], l["Core/Utilities.js"]], function(y, j, I) {
- var Z = j.series, H = I.merge, U = I.pick, F;
- return function(R) {
- function N(x, u, f, E, O) {
- var B = this.chart.inverted, M = x.series, S = (M.xAxis ? M.xAxis.len : this.chart.plotSizeX) || 0;
- M = (M.yAxis ? M.yAxis.len : this.chart.plotSizeY) || 0;
- var w = x.dlBox || x.shapeArgs, v = U(x.below, x.plotY > U(this.translatedThreshold, M)), a = U(f.inside, !!this.options.stacking);
- w && (E = H(w), 0 > E.y && (E.height += E.y, E.y = 0), w = E.y + E.height - M, 0 < w && w < E.height && (E.height -= w), B && (E = { x: M - E.y - E.height, y: S - E.x - E.width, width: E.height, height: E.width }), a || (B ? (E.x += v ? 0 : E.width, E.width = 0) : (E.y += v ? E.height : 0, E.height = 0))), f.align = U(f.align, !B || a ? "center" : v ? "right" : "left"), f.verticalAlign = U(f.verticalAlign, B || a ? "middle" : v ? "top" : "bottom"), Z.prototype.alignDataLabel.call(this, x, u, f, E, O), f.inside && x.contrastColor && u.css({ color: x.contrastColor });
- }
- var b = [];
- R.compose = function(x) {
- y.compose(Z), b.indexOf(x) === -1 && (b.push(x), x.prototype.alignDataLabel = N);
- };
- }(F || (F = {})), F;
- }), T(l, "Series/Bar/BarSeries.js", [l["Series/Column/ColumnSeries.js"], l["Core/Series/SeriesRegistry.js"], l["Core/Utilities.js"]], function(y, j, I) {
- var Z = this && this.__extends || function() {
- var F = function(R, N) {
- return F = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(b, x) {
- b.__proto__ = x;
- } || function(b, x) {
- for (var u in x)
- x.hasOwnProperty(u) && (b[u] = x[u]);
- }, F(R, N);
- };
- return function(R, N) {
- function b() {
- this.constructor = R;
- }
- F(R, N), R.prototype = N === null ? Object.create(N) : (b.prototype = N.prototype, new b());
- };
- }(), H = I.extend, U = I.merge;
- return I = function(F) {
- function R() {
- var N = F !== null && F.apply(this, arguments) || this;
- return N.data = void 0, N.options = void 0, N.points = void 0, N;
- }
- return Z(R, F), R.defaultOptions = U(
- y.defaultOptions,
- {}
- ), R;
- }(y), H(I.prototype, { inverted: !0 }), j.registerSeriesType("bar", I), I;
- }), T(l, "Series/Scatter/ScatterSeries.js", [l["Series/Column/ColumnSeries.js"], l["Series/Line/LineSeries.js"], l["Core/Series/SeriesRegistry.js"], l["Core/Utilities.js"]], function(y, j, I, Z) {
- var H = this && this.__extends || function() {
- var N = function(b, x) {
- return N = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(u, f) {
- u.__proto__ = f;
- } || function(u, f) {
- for (var E in f)
- f.hasOwnProperty(E) && (u[E] = f[E]);
- }, N(b, x);
- };
- return function(b, x) {
- function u() {
- this.constructor = b;
- }
- N(b, x), b.prototype = x === null ? Object.create(x) : (u.prototype = x.prototype, new u());
- };
- }(), U = Z.addEvent, F = Z.extend, R = Z.merge;
- return Z = function(N) {
- function b() {
- var x = N !== null && N.apply(this, arguments) || this;
- return x.data = void 0, x.options = void 0, x.points = void 0, x;
- }
- return H(b, N), b.prototype.applyJitter = function() {
- var x = this, u = this.options.jitter, f = this.points.length;
- u && this.points.forEach(function(E, O) {
- ["x", "y"].forEach(function(B, M) {
- var S = "plot" + B.toUpperCase();
- if (u[B] && !E.isNull) {
- var w = x[B + "Axis"], v = u[B] * w.transA;
- if (w && !w.isLog) {
- var a = Math.max(0, E[S] - v);
- w = Math.min(w.len, E[S] + v), M = 1e4 * Math.sin(O + M * f), E[S] = a + (w - a) * (M - Math.floor(M)), B === "x" && (E.clientX = E.plotX);
- }
- }
- });
- });
- }, b.prototype.drawGraph = function() {
- this.options.lineWidth ? N.prototype.drawGraph.call(this) : this.graph && (this.graph = this.graph.destroy());
- }, b.defaultOptions = R(j.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/>"
- } }), b;
- }(j), F(Z.prototype, { drawTracker: y.prototype.drawTracker, sorted: !1, requireSorting: !1, noSharedTooltip: !0, trackerGroups: ["group", "markerGroup", "dataLabelsGroup"], takeOrdinalPosition: !1 }), U(Z, "afterTranslate", function() {
- this.applyJitter();
- }), I.registerSeriesType("scatter", Z), Z;
- }), T(l, "Series/CenteredUtilities.js", [l["Core/Globals.js"], l["Core/Series/Series.js"], l["Core/Utilities.js"]], function(y, j, I) {
- var Z = y.deg2rad, H = I.isNumber, U = I.pick, F = I.relativeLength, R;
- return function(N) {
- N.getCenter = function() {
- var b = this.options, x = this.chart, u = 2 * (b.slicedOffset || 0), f = x.plotWidth - 2 * u, E = x.plotHeight - 2 * u, O = b.center, B = Math.min(f, E), M = b.size, S = b.innerSize || 0;
- for (typeof M == "string" && (M = parseFloat(M)), typeof S == "string" && (S = parseFloat(S)), b = [U(O[0], "50%"), U(O[1], "50%"), U(M && 0 > M ? void 0 : b.size, "100%"), U(S && 0 > S ? void 0 : b.innerSize || 0, "0%")], !x.angular || this instanceof j || (b[3] = 0), O = 0; 4 > O; ++O)
- M = b[O], x = 2 > O || O === 2 && /%$/.test(M), b[O] = F(M, [f, E, B, b[2]][O]) + (x ? u : 0);
- return b[3] > b[2] && (b[3] = b[2]), b;
- }, N.getStartAndEndRadians = function(b, x) {
- return b = H(b) ? b : 0, x = H(x) && x > b && 360 > x - b ? x : b + 360, { start: Z * (b + -90), end: Z * (x + -90) };
- };
- }(R || (R = {})), R;
- }), T(l, "Series/Pie/PiePoint.js", [l["Core/Animation/AnimationUtilities.js"], l["Core/Series/Point.js"], l["Core/Utilities.js"]], function(y, j, I) {
- var Z = this && this.__extends || function() {
- var x = function(u, f) {
- return x = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(E, O) {
- E.__proto__ = O;
- } || function(E, O) {
- for (var B in O)
- O.hasOwnProperty(B) && (E[B] = O[B]);
- }, x(u, f);
- };
- return function(u, f) {
- function E() {
- this.constructor = u;
- }
- x(u, f), u.prototype = f === null ? Object.create(f) : (E.prototype = f.prototype, new E());
- };
- }(), H = y.setAnimation, U = I.addEvent, F = I.defined;
- y = I.extend;
- var R = I.isNumber, N = I.pick, b = I.relativeLength;
- return j = function(x) {
- function u() {
- var f = x !== null && x.apply(this, arguments) || this;
- return f.labelDistance = void 0, f.options = void 0, f.series = void 0, f;
- }
- return Z(u, x), u.prototype.getConnectorPath = function() {
- var f = this.labelPosition, E = this.series.options.dataLabels, O = this.connectorShapes, B = E.connectorShape;
- return O[B] && (B = O[B]), B.call(this, { x: f.final.x, y: f.final.y, alignment: f.alignment }, f.connectorPosition, E);
- }, u.prototype.getTranslate = function() {
- return this.sliced ? this.slicedTranslation : { translateX: 0, translateY: 0 };
- }, u.prototype.haloPath = function(f) {
- var E = this.shapeArgs;
- return this.sliced || !this.visible ? [] : this.series.chart.renderer.symbols.arc(E.x, E.y, E.r + f, E.r + f, { innerR: E.r - 1, start: E.start, end: E.end });
- }, u.prototype.init = function() {
- var f = this;
- x.prototype.init.apply(
- this,
- arguments
- ), this.name = N(this.name, "Slice");
- var E = function(O) {
- f.slice(O.type === "select");
- };
- return U(this, "select", E), U(this, "unselect", E), this;
- }, u.prototype.isValid = function() {
- return R(this.y) && 0 <= this.y;
- }, u.prototype.setVisible = function(f, E) {
- var O = this, B = this.series, M = B.chart, S = B.options.ignoreHiddenPoint;
- E = N(E, S), f !== this.visible && (this.visible = this.options.visible = f = typeof f > "u" ? !this.visible : f, B.options.data[B.data.indexOf(this)] = this.options, ["graphic", "dataLabel", "connector", "shadowGroup"].forEach(function(w) {
- O[w] && O[w][f ? "show" : "hide"](f);
- }), this.legendItem && M.legend.colorizeItem(this, f), f || this.state !== "hover" || this.setState(""), S && (B.isDirty = !0), E && M.redraw());
- }, u.prototype.slice = function(f, E, O) {
- var B = this.series;
- H(O, B.chart), N(E, !0), this.sliced = this.options.sliced = F(f) ? f : !this.sliced, B.options.data[B.data.indexOf(this)] = this.options, this.graphic && this.graphic.animate(this.getTranslate()), this.shadowGroup && this.shadowGroup.animate(this.getTranslate());
- }, u;
- }(j), y(j.prototype, { connectorShapes: { fixedOffset: function(x, u, f) {
- var E = u.breakAt;
- return u = u.touchingSliceAt, [["M", x.x, x.y], f.softConnector ? ["C", x.x + (x.alignment === "left" ? -5 : 5), x.y, 2 * E.x - u.x, 2 * E.y - u.y, E.x, E.y] : ["L", E.x, E.y], ["L", u.x, u.y]];
- }, straight: function(x, u) {
- return u = u.touchingSliceAt, [["M", x.x, x.y], ["L", u.x, u.y]];
- }, crookedLine: function(x, u, f) {
- u = u.touchingSliceAt;
- var E = this.series, O = E.center[0], B = E.chart.plotWidth, M = E.chart.plotLeft;
- E = x.alignment;
- var S = this.shapeArgs.r;
- return f = b(f.crookDistance, 1), B = E === "left" ? O + S + (B + M - O - S) * (1 - f) : M + (O - S) * f, f = ["L", B, x.y], O = !0, (E === "left" ? B > x.x || B < u.x : B < x.x || B > u.x) && (O = !1), x = [["M", x.x, x.y]], O && x.push(f), x.push(["L", u.x, u.y]), x;
- } } }), j;
- }), T(l, "Series/Pie/PieSeries.js", [l["Series/CenteredUtilities.js"], l["Series/Column/ColumnSeries.js"], l["Core/Globals.js"], l["Core/Legend/LegendSymbol.js"], l["Series/Pie/PiePoint.js"], l["Core/Series/Series.js"], l["Core/Series/SeriesRegistry.js"], l["Core/Renderer/SVG/Symbols.js"], l["Core/Utilities.js"]], function(y, j, I, Z, H, U, F, R, N) {
- var b = this && this.__extends || function() {
- var S = function(w, v) {
- return S = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(a, c) {
- a.__proto__ = c;
- } || function(a, c) {
- for (var p in c)
- c.hasOwnProperty(p) && (a[p] = c[p]);
- }, S(w, v);
- };
- return function(w, v) {
- function a() {
- this.constructor = w;
- }
- S(w, v), w.prototype = v === null ? Object.create(v) : (a.prototype = v.prototype, new a());
- };
- }(), x = y.getStartAndEndRadians;
- I = I.noop;
- var u = N.clamp, f = N.extend, E = N.fireEvent, O = N.merge, B = N.pick, M = N.relativeLength;
- return N = function(S) {
- function w() {
- var v = S !== null && S.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 b(w, S), w.prototype.animate = function(v) {
- var a = this, c = a.points, p = a.startAngleRad;
- v || c.forEach(function(i) {
- var h = i.graphic, s = i.shapeArgs;
- h && s && (h.attr({ r: B(i.startR, a.center && a.center[3] / 2), start: p, end: p }), h.animate({ r: s.r, start: s.start, end: s.end }, a.options.animation));
- });
- }, w.prototype.drawEmpty = function() {
- var v = this.startAngleRad, a = this.endAngleRad, c = this.options;
- if (this.total === 0 && this.center) {
- var p = this.center[0], i = this.center[1];
- this.graph || (this.graph = this.chart.renderer.arc(p, i, this.center[1] / 2, 0, v, a).addClass("highcharts-empty-series").add(this.group)), this.graph.attr({ d: R.arc(p, i, this.center[2] / 2, 0, { start: v, end: a, innerR: this.center[3] / 2 }) }), this.chart.styledMode || this.graph.attr({ "stroke-width": c.borderWidth, fill: c.fillColor || "none", stroke: c.color || "#cccccc" });
- } else
- this.graph && (this.graph = this.graph.destroy());
- }, w.prototype.drawPoints = function() {
- var v = this.chart.renderer;
- this.points.forEach(function(a) {
- a.graphic && a.hasNewShapeType() && (a.graphic = a.graphic.destroy()), a.graphic || (a.graphic = v[a.shapeType](a.shapeArgs).add(a.series.group), a.delayedRendering = !0);
- });
- }, w.prototype.generatePoints = function() {
- S.prototype.generatePoints.call(this), this.updateTotals();
- }, w.prototype.getX = function(v, a, c) {
- var p = this.center, i = this.radii ? this.radii[c.index] || 0 : p[2] / 2;
- return v = Math.asin(u((v - p[1]) / (i + c.labelDistance), -1, 1)), p[0] + (a ? -1 : 1) * Math.cos(v) * (i + c.labelDistance) + (0 < c.labelDistance ? (a ? -1 : 1) * this.options.dataLabels.padding : 0);
- }, w.prototype.hasData = function() {
- return !!this.processedXData.length;
- }, w.prototype.redrawPoints = function() {
- var v = this, a = v.chart, c = a.renderer, p = v.options.shadow, i, h, s, t;
- this.drawEmpty(), !p || v.shadowGroup || a.styledMode || (v.shadowGroup = c.g("shadow").attr({ zIndex: -1 }).add(v.group)), v.points.forEach(function(o) {
- var n = {};
- if (h = o.graphic, !o.isNull && h) {
- var A = void 0;
- t = o.shapeArgs, i = o.getTranslate(), a.styledMode || (A = o.shadowGroup, p && !A && (A = o.shadowGroup = c.g("shadow").add(v.shadowGroup)), A && A.attr(i), s = v.pointAttribs(o, o.selected && "select")), o.delayedRendering ? (h.setRadialReference(v.center).attr(t).attr(i), a.styledMode || h.attr(s).attr({ "stroke-linejoin": "round" }).shadow(p, A), o.delayedRendering = !1) : (h.setRadialReference(v.center), a.styledMode || O(!0, n, s), O(!0, n, t, i), h.animate(n)), h.attr({ visibility: o.visible ? "inherit" : "hidden" }), h.addClass(o.getClassName(), !0);
- } else
- h && (o.graphic = h.destroy());
- });
- }, w.prototype.sortByAngle = function(v, a) {
- v.sort(function(c, p) {
- return typeof c.angle < "u" && (p.angle - c.angle) * a;
- });
- }, w.prototype.translate = function(v) {
- this.generatePoints();
- var a = this.options, c = a.slicedOffset, p = c + (a.borderWidth || 0), i = x(a.startAngle, a.endAngle), h = this.startAngleRad = i.start;
- i = (this.endAngleRad = i.end) - h;
- var s = this.points, t = a.dataLabels.distance;
- a = a.ignoreHiddenPoint;
- var o = s.length, n, A = 0;
- for (v || (this.center = v = this.getCenter()), n = 0; n < o; n++) {
- var _ = s[n], D = h + A * i;
- !_.isValid() || a && !_.visible || (A += _.percentage / 100);
- var W = h + A * i, P = { x: v[0], y: v[1], r: v[2] / 2, innerR: v[3] / 2, start: Math.round(1e3 * D) / 1e3, end: Math.round(1e3 * W) / 1e3 };
- _.shapeType = "arc", _.shapeArgs = P, _.labelDistance = B(_.options.dataLabels && _.options.dataLabels.distance, t), _.labelDistance = M(_.labelDistance, P.r), this.maxLabelDistance = Math.max(this.maxLabelDistance || 0, _.labelDistance), W = (W + D) / 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) * c), translateY: Math.round(Math.sin(W) * c) }, P = Math.cos(W) * v[2] / 2;
- var X = Math.sin(W) * v[2] / 2;
- _.tooltipPos = [v[0] + 0.7 * P, v[1] + 0.7 * X], _.half = W < -Math.PI / 2 || W > Math.PI / 2 ? 1 : 0, _.angle = W, D = Math.min(p, _.labelDistance / 5), _.labelPosition = { natural: { x: v[0] + P + 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] + P + Math.cos(W) * D, y: v[1] + X + Math.sin(W) * D }, touchingSliceAt: { x: v[0] + P, y: v[1] + X } } };
- }
- E(this, "afterTranslate");
- }, w.prototype.updateTotals = function() {
- var v = this.points, a = v.length, c = this.options.ignoreHiddenPoint, p, i = 0;
- for (p = 0; p < a; p++) {
- var h = v[p];
- !h.isValid() || c && !h.visible || (i += h.y);
- }
- for (this.total = i, p = 0; p < a; p++)
- h = v[p], h.percentage = 0 < i && (h.visible || !c) ? h.y / i * 100 : 0, h.total = i;
- }, w.defaultOptions = O(U.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;
- }(U), f(N.prototype, { axisTypes: [], directTouch: !0, drawGraph: void 0, drawLegendSymbol: Z.drawRectangle, drawTracker: j.prototype.drawTracker, getCenter: y.getCenter, getSymbol: I, isCartesian: !1, noSharedTooltip: !0, pointAttribs: j.prototype.pointAttribs, pointClass: H, requireSorting: !1, searchPoint: I, trackerGroups: ["group", "dataLabelsGroup"] }), F.registerSeriesType("pie", N), N;
- }), T(l, "Series/Pie/PieDataLabel.js", [
- l["Core/Series/DataLabel.js"],
- l["Core/Globals.js"],
- l["Core/Renderer/RendererUtilities.js"],
- l["Core/Series/SeriesRegistry.js"],
- l["Core/Utilities.js"]
- ], function(y, j, I, Z, H) {
- var U = j.noop, F = I.distribute, R = Z.series, N = H.arrayMax, b = H.clamp, x = H.defined, u = H.merge, f = H.pick, E = H.relativeLength, O;
- return function(B) {
- function M() {
- var c = this, p = c.data, i = c.chart, h = c.options.dataLabels || {}, s = h.connectorPadding, t = i.plotWidth, o = i.plotHeight, n = i.plotLeft, A = Math.round(i.chartWidth / 3), _ = c.center, D = _[2] / 2, W = _[1], P = [[], []], X = [0, 0, 0, 0], g = c.dataLabelPositioners, m, L, Y, V, Q, k, G, z, $, q, it, et;
- c.visible && (h.enabled || c._hasPointLabels) && (p.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(c), p.forEach(function(nt) {
- nt.dataLabel && (nt.visible ? (P[nt.half].push(nt), nt.dataLabel._pos = null, !x(h.style.width) && !x(nt.options.dataLabels && nt.options.dataLabels.style && nt.options.dataLabels.style.width) && nt.dataLabel.getBBox().width > A && (nt.dataLabel.css({ width: Math.round(0.7 * A) + "px" }), nt.dataLabel.shortened = !0)) : (nt.dataLabel = nt.dataLabel.destroy(), nt.dataLabels && nt.dataLabels.length === 1 && delete nt.dataLabels));
- }), P.forEach(function(nt, rt) {
- var ct = nt.length, gt = [], dt;
- if (ct) {
- if (c.sortByAngle(nt, rt - 0.5), 0 < c.maxLabelDistance) {
- var ht = Math.max(0, W - D - c.maxLabelDistance), at = Math.min(W + D + c.maxLabelDistance, i.plotHeight);
- nt.forEach(function(J) {
- 0 < J.labelDistance && J.dataLabel && (J.top = Math.max(0, W - D - J.labelDistance), J.bottom = Math.min(W + D + 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, F(gt, ht, ht / 5);
- }
- for (it = 0; it < ct; it++) {
- if (m = nt[it], k = m.labelPosition, V = m.dataLabel, q = m.visible === !1 ? "hidden" : "inherit", $ = ht = k.natural.y, gt && x(m.distributeBox) && (typeof m.distributeBox.pos > "u" ? q = "hidden" : (G = m.distributeBox.size, $ = g.radialDistributionY(m))), delete m.positionIndex, h.justify)
- z = g.justify(m, D, _);
- else
- switch (h.alignTo) {
- case "connectors":
- z = g.alignToConnectors(nt, rt, t, n);
- break;
- case "plotEdges":
- z = g.alignToPlotEdges(V, rt, t, n);
- break;
- default:
- z = g.radialDistributionX(c, m, $, ht);
- }
- V._attr = { visibility: q, align: k.alignment }, et = m.options.dataLabels || {}, V._pos = { x: z + f(et.x, h.x) + ({ left: s, right: -s }[k.alignment] || 0), y: $ + f(et.y, h.y) - 10 }, k.final.x = z, k.final.y = $, f(h.crop, !0) && (Q = V.getBBox().width, ht = null, z - Q < s && rt === 1 ? (ht = Math.round(Q - z + s), X[3] = Math.max(ht, X[3])) : z + Q > t - s && rt === 0 && (ht = Math.round(z + Q - t + s), X[1] = Math.max(ht, X[1])), 0 > $ - G / 2 ? X[0] = Math.max(Math.round(-$ + G / 2), X[0]) : $ + G / 2 > o && (X[2] = Math.max(Math.round($ + G / 2 - o), X[2])), V.sideOverflow = ht);
- }
- }
- }), N(X) === 0 || this.verifyDataLabelOverflow(X)) && (this.placeDataLabels(), this.points.forEach(function(nt) {
- if (et = u(h, nt.options.dataLabels), L = f(et.connectorWidth, 1)) {
- var rt;
- Y = nt.connector, (V = nt.dataLabel) && V._pos && nt.visible && 0 < nt.labelDistance ? (q = V._attr.visibility, (rt = !Y) && (nt.connector = Y = i.renderer.path().addClass("highcharts-data-label-connector highcharts-color-" + nt.colorIndex + (nt.className ? " " + nt.className : "")).add(c.dataLabelsGroup), i.styledMode || Y.attr({ "stroke-width": L, stroke: et.connectorColor || nt.color || "#666666" })), Y[rt ? "attr" : "animate"]({ d: nt.getConnectorPath() }), Y.attr("visibility", q)) : Y && (nt.connector = Y.destroy());
- }
- }));
- }
- function S() {
- this.points.forEach(function(c) {
- var p = c.dataLabel, i;
- p && c.visible && ((i = p._pos) ? (p.sideOverflow && (p._attr.width = Math.max(p.getBBox().width - p.sideOverflow, 0), p.css({ width: p._attr.width + "px", textOverflow: (this.options.dataLabels.style || {}).textOverflow || "ellipsis" }), p.shortened = !0), p.attr(p._attr), p[p.moved ? "animate" : "attr"](i), p.moved = !0) : p && p.attr({ y: -9999 })), delete c.distributeBox;
- }, this);
- }
- function w(c) {
- var p = this.center, i = this.options, h = i.center, s = i.minSize || 80, t = i.size !== null;
- if (!t) {
- if (h[0] !== null)
- var o = Math.max(p[2] - Math.max(c[1], c[3]), s);
- else
- o = Math.max(p[2] - c[1] - c[3], s), p[0] += (c[3] - c[1]) / 2;
- h[1] !== null ? o = b(o, s, p[2] - Math.max(c[0], c[2])) : (o = b(o, s, p[2] - c[0] - c[2]), p[1] += (c[0] - c[2]) / 2), o < p[2] ? (p[2] = o, p[3] = Math.min(E(i.innerSize || 0, o), o), this.translate(p), this.drawDataLabels && this.drawDataLabels()) : t = !0;
- }
- return t;
- }
- var v = [], a = { radialDistributionY: function(c) {
- return c.top + c.distributeBox.pos;
- }, radialDistributionX: function(c, p, i, h) {
- return c.getX(i < p.top + 2 || i > p.bottom - 2 ? h : i, p.half, p);
- }, justify: function(c, p, i) {
- return i[0] + (c.half ? -1 : 1) * (p + c.labelDistance);
- }, alignToPlotEdges: function(c, p, i, h) {
- return c = c.getBBox().width, p ? c + h : i - c - h;
- }, alignToConnectors: function(c, p, i, h) {
- var s = 0, t;
- return c.forEach(function(o) {
- t = o.dataLabel.getBBox().width, t > s && (s = t);
- }), p ? s + h : i - s - h;
- } };
- B.compose = function(c) {
- y.compose(R), v.indexOf(c) === -1 && (v.push(c), c = c.prototype, c.dataLabelPositioners = a, c.alignDataLabel = U, c.drawDataLabels = M, c.placeDataLabels = S, c.verifyDataLabelOverflow = w);
- };
- }(O || (O = {})), O;
- }), T(l, "Extensions/OverlappingDataLabels.js", [l["Core/Chart/Chart.js"], l["Core/Utilities.js"]], function(y, j) {
- function I(b, x) {
- var u = !1;
- if (b) {
- var f = b.newOpacity;
- b.oldOpacity !== f && (b.alignAttr && b.placed ? (b[f ? "removeClass" : "addClass"]("highcharts-data-label-hidden"), u = !0, b.alignAttr.opacity = f, b[b.isOld ? "animate" : "attr"](b.alignAttr, null, function() {
- x.styledMode || b.css({ pointerEvents: f ? "auto" : "none" });
- }), H(x, "afterHideOverlappingLabel")) : b.attr({ opacity: f })), b.isOld = !0;
- }
- return u;
- }
- var Z = j.addEvent, H = j.fireEvent, U = j.isArray, F = j.isNumber, R = j.objectEach, N = j.pick;
- Z(y, "render", function() {
- var b = this, x = [];
- (this.labelCollectors || []).forEach(function(u) {
- x = x.concat(u());
- }), (this.yAxis || []).forEach(function(u) {
- u.stacking && u.options.stackLabels && !u.options.stackLabels.allowOverlap && R(u.stacking.stacks, function(f) {
- R(f, function(E) {
- E.label && E.label.visibility !== "hidden" && x.push(E.label);
- });
- });
- }), (this.series || []).forEach(function(u) {
- var f = u.options.dataLabels;
- u.visible && (f.enabled !== !1 || u._hasPointLabels) && (f = function(E) {
- return E.forEach(function(O) {
- O.visible && (U(O.dataLabels) ? O.dataLabels : O.dataLabel ? [O.dataLabel] : []).forEach(function(B) {
- var M = B.options;
- B.labelrank = N(M.labelrank, O.labelrank, O.shapeArgs && O.shapeArgs.height), M.allowOverlap ? (B.oldOpacity = B.opacity, B.newOpacity = 1, I(B, b)) : x.push(B);
- });
- });
- }, f(u.nodes || []), f(u.points));
- }), this.hideOverlappingLabels(x);
- }), y.prototype.hideOverlappingLabels = function(b) {
- var x = this, u = b.length, f = x.renderer, E, O, B, M = !1, S = function(a) {
- var c, p = a.box ? 0 : a.padding || 0, i = c = 0, h;
- if (a && (!a.alignAttr || a.placed)) {
- var s = a.alignAttr || { x: a.attr("x"), y: a.attr("y") }, t = a.parentGroup;
- a.width || (c = a.getBBox(), a.width = c.width, a.height = c.height, c = f.fontMetrics(null, a.element).h);
- var o = a.width - 2 * p;
- return (h = { left: "0", center: "0.5", right: "1" }[a.alignValue]) ? i = +h * o : F(a.x) && Math.round(a.x) !== a.translateX && (i = a.x - a.translateX), { x: s.x + (t.translateX || 0) + p - (i || 0), y: s.y + (t.translateY || 0) + p - c, width: a.width - 2 * p, height: a.height - 2 * p };
- }
- };
- for (O = 0; O < u; O++)
- (E = b[O]) && (E.oldOpacity = E.opacity, E.newOpacity = 1, E.absoluteBox = S(E));
- for (b.sort(function(a, c) {
- return (c.labelrank || 0) - (a.labelrank || 0);
- }), O = 0; O < u; O++) {
- var w = (S = b[O]) && S.absoluteBox;
- for (E = O + 1; E < u; ++E) {
- var v = (B = b[E]) && B.absoluteBox;
- !w || !v || S === B || S.newOpacity === 0 || B.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 || ((S.labelrank < B.labelrank ? S : B).newOpacity = 0);
- }
- }
- b.forEach(function(a) {
- I(a, x) && (M = !0);
- }), M && H(x, "afterHideAllOverlappingLabels");
- };
- }), T(
- l,
- "Core/Responsive.js",
- [l["Core/Utilities.js"]],
- function(y) {
- var j = y.extend, I = y.find, Z = y.isArray, H = y.isObject, U = y.merge, F = y.objectEach, R = y.pick, N = y.splat, b = y.uniqueKey, x;
- return function(u) {
- var f = [];
- u.compose = function(O) {
- return f.indexOf(O) === -1 && (f.push(O), j(O.prototype, E.prototype)), O;
- };
- var E = function() {
- function O() {
- }
- return O.prototype.currentOptions = function(B) {
- function M(v, a, c, p) {
- var i;
- F(v, function(h, s) {
- if (!p && -1 < S.collectionsWithUpdate.indexOf(s) && a[s])
- for (h = N(h), c[s] = [], i = 0; i < Math.max(h.length, a[s].length); i++)
- a[s][i] && (h[i] === void 0 ? c[s][i] = a[s][i] : (c[s][i] = {}, M(h[i], a[s][i], c[s][i], p + 1)));
- else
- H(h) ? (c[s] = Z(h) ? [] : {}, M(h, a[s] || {}, c[s], p + 1)) : c[s] = typeof a[s] > "u" ? null : a[s];
- });
- }
- var S = this, w = {};
- return M(B, this.options, w, 0), w;
- }, O.prototype.matchResponsiveRule = function(B, M) {
- var S = B.condition;
- (S.callback || function() {
- return this.chartWidth <= R(S.maxWidth, Number.MAX_VALUE) && this.chartHeight <= R(S.maxHeight, Number.MAX_VALUE) && this.chartWidth >= R(S.minWidth, 0) && this.chartHeight >= R(S.minHeight, 0);
- }).call(this) && M.push(B._id);
- }, O.prototype.setResponsive = function(B, M) {
- var S = this, w = this.options.responsive, v = this.currentResponsive, a = [];
- !M && w && w.rules && w.rules.forEach(function(c) {
- typeof c._id > "u" && (c._id = b()), S.matchResponsiveRule(c, a);
- }, this), M = U.apply(void 0, a.map(function(c) {
- return I((w || {}).rules || [], function(p) {
- return p._id === c;
- });
- }).map(function(c) {
- return c && c.chartOptions;
- })), M.isResponsiveOptions = !0, a = a.toString() || void 0, a !== (v && v.ruleIds) && (v && this.update(v.undoOptions, B, !0), a ? (v = this.currentOptions(M), v.isResponsiveOptions = !0, this.currentResponsive = { ruleIds: a, mergedOptions: M, undoOptions: v }, this.update(M, B, !0)) : this.currentResponsive = void 0);
- }, O;
- }();
- }(x || (x = {})), x;
- }
- ), T(l, "masters/highcharts.src.js", [
- l["Core/Globals.js"],
- l["Core/Utilities.js"],
- l["Core/DefaultOptions.js"],
- l["Core/Animation/Fx.js"],
- l["Core/Animation/AnimationUtilities.js"],
- l["Core/Renderer/HTML/AST.js"],
- l["Core/FormatUtilities.js"],
- l["Core/Renderer/RendererUtilities.js"],
- l["Core/Renderer/SVG/SVGElement.js"],
- l["Core/Renderer/SVG/SVGRenderer.js"],
- l["Core/Renderer/HTML/HTMLElement.js"],
- l["Core/Renderer/HTML/HTMLRenderer.js"],
- l["Core/Axis/Axis.js"],
- l["Core/Axis/DateTimeAxis.js"],
- l["Core/Axis/LogarithmicAxis.js"],
- l["Core/Axis/PlotLineOrBand/PlotLineOrBand.js"],
- l["Core/Axis/Tick.js"],
- l["Core/Tooltip.js"],
- l["Core/Series/Point.js"],
- l["Core/Pointer.js"],
- l["Core/MSPointer.js"],
- l["Core/Legend/Legend.js"],
- l["Core/Chart/Chart.js"],
- l["Core/Series/Series.js"],
- l["Core/Series/SeriesRegistry.js"],
- l["Series/Column/ColumnSeries.js"],
- l["Series/Column/ColumnDataLabel.js"],
- l["Series/Pie/PieSeries.js"],
- l["Series/Pie/PieDataLabel.js"],
- l["Core/Series/DataLabel.js"],
- l["Core/Responsive.js"],
- l["Core/Color/Color.js"],
- l["Core/Time.js"]
- ], function(y, j, I, Z, H, U, F, R, N, b, x, u, f, E, O, B, M, S, w, v, a, c, p, i, h, s, t, o, n, A, _, D, W) {
- return y.animate = H.animate, y.animObject = H.animObject, y.getDeferredAnimation = H.getDeferredAnimation, y.setAnimation = H.setAnimation, y.stop = H.stop, y.timers = Z.timers, y.AST = U, y.Axis = f, y.Chart = p, y.chart = p.chart, y.Fx = Z, y.Legend = c, y.PlotLineOrBand = B, y.Point = w, y.Pointer = a.isRequired() ? a : v, y.Series = i, y.SVGElement = N, y.SVGRenderer = b, y.Tick = M, y.Time = W, y.Tooltip = S, y.Color = D, y.color = D.parse, u.compose(b), x.compose(N), y.defaultOptions = I.defaultOptions, y.getOptions = I.getOptions, y.time = I.defaultTime, y.setOptions = I.setOptions, y.dateFormat = F.dateFormat, y.format = F.format, y.numberFormat = F.numberFormat, y.addEvent = j.addEvent, y.arrayMax = j.arrayMax, y.arrayMin = j.arrayMin, y.attr = j.attr, y.clearTimeout = j.clearTimeout, y.correctFloat = j.correctFloat, y.createElement = j.createElement, y.css = j.css, y.defined = j.defined, y.destroyObjectProperties = j.destroyObjectProperties, y.discardElement = j.discardElement, y.distribute = R.distribute, y.erase = j.erase, y.error = j.error, y.extend = j.extend, y.extendClass = j.extendClass, y.find = j.find, y.fireEvent = j.fireEvent, y.getMagnitude = j.getMagnitude, y.getStyle = j.getStyle, y.inArray = j.inArray, y.isArray = j.isArray, y.isClass = j.isClass, y.isDOMElement = j.isDOMElement, y.isFunction = j.isFunction, y.isNumber = j.isNumber, y.isObject = j.isObject, y.isString = j.isString, y.keys = j.keys, y.merge = j.merge, y.normalizeTickInterval = j.normalizeTickInterval, y.objectEach = j.objectEach, y.offset = j.offset, y.pad = j.pad, y.pick = j.pick, y.pInt = j.pInt, y.relativeLength = j.relativeLength, y.removeEvent = j.removeEvent, y.seriesType = h.seriesType, y.splat = j.splat, y.stableSort = j.stableSort, y.syncTimeout = j.syncTimeout, y.timeUnits = j.timeUnits, y.uniqueKey = j.uniqueKey, y.useSerialIds = j.useSerialIds, y.wrap = j.wrap, t.compose(s), A.compose(i), E.compose(f), O.compose(f), n.compose(o), B.compose(f), _.compose(p), y;
- }), l["masters/highcharts.src.js"]._modules = l, l["masters/highcharts.src.js"];
- });
- })(Up);
- var L0 = Up.exports;
- const to = /* @__PURE__ */ Mn(L0);
- var Vp = { exports: {} };
- (function(r) {
- (function(d) {
- r.exports ? (d.default = d, r.exports = d) : d(typeof Highcharts < "u" ? Highcharts : void 0);
- })(function(d) {
- function T(l, y, j, I) {
- l.hasOwnProperty(y) || (l[y] = I.apply(null, j));
- }
- d = d ? d._modules : {}, T(d, "Extensions/Pane.js", [
- d["Core/Chart/Chart.js"],
- d["Series/CenteredUtilities.js"],
- d["Core/Globals.js"],
- d["Core/Pointer.js"],
- d["Core/Utilities.js"]
- ], function(l, y, j, I, Z) {
- function H(x, u, f) {
- return Math.sqrt(Math.pow(x - f[0], 2) + Math.pow(u - f[1], 2)) <= f[2] / 2;
- }
- var U = Z.addEvent, F = Z.extend, R = Z.merge, N = Z.pick, b = Z.splat;
- return l.prototype.collectionsWithUpdate.push("pane"), Z = function() {
- function x(u, f) {
- 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(u, f);
- }
- return x.prototype.init = function(u, f) {
- this.chart = f, this.background = [], f.pane.push(this), this.setOptions(u);
- }, x.prototype.setOptions = function(u) {
- this.options = R(this.defaultOptions, this.chart.angular ? { background: {} } : void 0, u);
- }, x.prototype.render = function() {
- var u = this.options, f = this.options.background, E = this.chart.renderer;
- if (this.group || (this.group = E.g("pane-group").attr({ zIndex: u.zIndex || 0 }).add()), this.updateCenter(), f)
- for (f = b(f), u = Math.max(f.length, this.background.length || 0), E = 0; E < u; E++)
- f[E] && this.axis ? this.renderBackground(R(this.defaultBackgroundOptions, f[E]), E) : this.background[E] && (this.background[E] = this.background[E].destroy(), this.background.splice(E, 1));
- }, x.prototype.renderBackground = function(u, f) {
- var E = "animate", O = { class: "highcharts-pane " + (u.className || "") };
- this.chart.styledMode || F(O, { fill: u.backgroundColor, stroke: u.borderColor, "stroke-width": u.borderWidth }), this.background[f] || (this.background[f] = this.chart.renderer.path().add(this.group), E = "attr"), this.background[f][E]({ d: this.axis.getPlotBandPath(u.from, u.to, u) }).attr(O);
- }, x.prototype.updateCenter = function(u) {
- this.center = (u || this.axis || {}).center = y.getCenter.call(this);
- }, x.prototype.update = function(u, f) {
- R(!0, this.options, u), this.setOptions(this.options), this.render(), this.chart.axes.forEach(function(E) {
- E.pane === this && (E.pane = null, E.update({}, f));
- }, this);
- }, x;
- }(), l.prototype.getHoverPane = function(x) {
- var u = this, f;
- return x && u.pane.forEach(function(E) {
- var O = x.chartX - u.plotLeft, B = x.chartY - u.plotTop;
- H(u.inverted ? B : O, u.inverted ? O : B, E.center) && (f = E);
- }), f;
- }, U(l, "afterIsInsidePlot", function(x) {
- this.polar && (x.isInsidePlot = this.pane.some(function(u) {
- return H(x.x, x.y, u.center);
- }));
- }), U(I, "beforeGetHoverData", function(x) {
- var u = this.chart;
- u.polar ? (u.hoverPane = u.getHoverPane(x), x.filter = function(f) {
- return f.visible && !(!x.shared && f.directTouch) && N(f.options.enableMouseTracking, !0) && (!u.hoverPane || f.xAxis.pane === u.hoverPane);
- }) : u.hoverPane = void 0;
- }), U(
- I,
- "afterGetHoverData",
- function(x) {
- var u = this.chart;
- x.hoverPoint && x.hoverPoint.plotX && x.hoverPoint.plotY && u.hoverPane && !H(x.hoverPoint.plotX, x.hoverPoint.plotY, u.hoverPane.center) && (x.hoverPoint = void 0);
- }
- ), j.Pane = Z, j.Pane;
- }), T(d, "Core/Axis/RadialAxis.js", [d["Core/Axis/AxisDefaults.js"], d["Core/DefaultOptions.js"], d["Core/Globals.js"], d["Core/Utilities.js"]], function(l, y, j, I) {
- var Z = y.defaultOptions, H = j.noop, U = I.addEvent, F = I.correctFloat, R = I.defined, N = I.extend, b = I.fireEvent, x = I.merge, u = I.pick, f = I.relativeLength, E = I.wrap, O;
- return function(B) {
- function M() {
- this.autoConnect = this.isCircular && typeof u(this.userMax, this.options.max) > "u" && F(this.endAngleRad - this.startAngleRad) === F(2 * Math.PI), !this.isCircular && this.chart.inverted && this.max++, this.autoConnect && (this.max += this.categories && 1 || this.pointRange || this.closestPointRange || 0);
- }
- function S() {
- var $ = this;
- return function() {
- if ($.isRadial && $.tickPositions && $.options.labels && $.options.labels.allowOverlap !== !0)
- return $.tickPositions.map(function(q) {
- return $.ticks[q] && $.ticks[q].label;
- }).filter(function(q) {
- return !!q;
- });
- };
- }
- function w() {
- return H;
- }
- function v($, q, it) {
- var et = this.pane.center, nt = $.value;
- if (this.isCircular) {
- if (R(nt))
- $.point && (rt = $.point.shapeArgs || {}, rt.start && (nt = this.chart.inverted ? this.translate($.point.rectPlotY, !0) : $.point.x));
- else {
- var rt = $.chartX || 0, ct = $.chartY || 0;
- nt = this.translate(Math.atan2(ct - it, rt - q) - this.startAngleRad, !0);
- }
- $ = this.getPosition(nt), rt = $.x, ct = $.y;
- } else
- R(nt) || (rt = $.chartX, ct = $.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 a($, q, it) {
- $ = this.pane.center;
- var et = this.chart, nt = this.left || 0, rt = this.top || 0, ct = u(q, $[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 + $[0], rt + $[1], ct, ct, { start: this.startAngleRad, end: this.endAngleRad, open: !0, innerR: 0 }), q.xBounds = [nt + $[0]], q.yBounds = [rt + $[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 c() {
- this.constructor.prototype.getOffset.call(this), this.chart.axisOffset[this.side] = 0;
- }
- function p($, 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, st = u(nt(it.outerRadius), gt), lt = nt(it.innerRadius);
- if (nt = u(nt(it.thickness), 10), this.options.gridLineInterpolation === "polygon")
- dt = this.getPlotLinePath({ value: $ }).concat(this.getPlotLinePath({ value: q, reverse: !0 }));
- else {
- if ($ = Math.max($, this.min), q = Math.min(q, this.max), $ = this.translate($), q = this.translate(q), tt || (st = $ || 0, lt = q || 0), it.shape !== "circle" && tt)
- it = ct + ($ || 0), ct += q || 0;
- else {
- it = -Math.PI / 2, ct = 1.5 * Math.PI;
- var pt = !0;
- }
- st -= dt, dt = et.renderer.symbols.arc(ht + rt[0], at + rt[1], st, st, { start: Math.min(it, ct), end: Math.max(it, ct), innerR: u(lt, st - (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($) {
- var q = this, it = this.pane.center, et = this.chart, nt = et.inverted, rt = $.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 = $.isCrosshair;
- ct = it[3] / 2;
- var st = $.value, lt, pt = this.getPosition(st), yt = pt.x;
- if (pt = pt.y, tt && (pt = this.getCrosshairPosition($, ht, at), st = pt[0], yt = pt[1], pt = pt[2]), this.isCircular)
- st = Math.sqrt(Math.pow(yt - ht, 2) + Math.pow(pt - at, 2)), rt = typeof gt == "string" ? f(gt, 1) : gt / st, et = typeof dt == "string" ? f(dt, 1) : dt / st, it && ct && (ct /= st, 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 ((st = this.translate(st)) && (0 > st || st > J) && (st = 0), this.options.gridLineInterpolation === "circle")
- it = this.getLinePath(0, st, 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()), st && (st += ct), at = 0; at < ht.length; at++)
- ct = lt.getPosition(ht[at], st), it.push(at ? ["L", ct.x, ct.y] : ["M", ct.x, ct.y]);
- return it;
- }
- function h($, q) {
- return $ = this.translate($), this.postTranslate(this.isCircular ? $ : this.angleRad, u(this.isCircular ? q : 0 > $ ? 0 : $, this.center[2] / 2) - this.offset);
- }
- function s() {
- var $ = this.center, q = this.chart, it = this.options.title;
- return { x: q.plotLeft + $[0] + (it.x || 0), y: q.plotTop + $[1] - { high: 0.5, middle: 0.25, low: 0 }[it.align] * $[2] + (it.y || 0) };
- }
- function t($) {
- $.beforeSetTickPositions = M, $.createLabelCollector = S, $.getCrosshairPosition = v, $.getLinePath = a, $.getOffset = c, $.getPlotBandPath = p, $.getPlotLinePath = i, $.getPosition = h, $.getTitlePosition = s, $.postTranslate = X, $.setAxisSize = m, $.setAxisTranslation = L, $.setOptions = Y;
- }
- function o() {
- var $ = this.chart, q = this.options, it = this.pane, et = it && it.options;
- $.angular && this.isXAxis || !it || !$.angular && !$.polar || (this.angleRad = (q.angle || 0) * Math.PI / 180, this.startAngleRad = (et.startAngle - 90) * Math.PI / 180, this.endAngleRad = (u(et.endAngle, et.startAngle + 360) - 90) * Math.PI / 180, this.offset = q.offset || 0);
- }
- function n($) {
- this.isRadial && ($.align = void 0, $.preventDefault());
- }
- function A() {
- if (this.chart && this.chart.labelCollectors) {
- var $ = this.labelCollector ? this.chart.labelCollectors.indexOf(this.labelCollector) : -1;
- 0 <= $ && this.chart.labelCollectors.splice($, 1);
- }
- }
- function _($) {
- 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;
- $ = $.userOptions.pane || 0, $ = this.pane = q.pane && q.pane[$];
- 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 = G)) : nt && (t(this), this.defaultPolarOptions = (ht = this.horiz) ? k : x(ct === "xAxis" ? l.defaultXAxisOptions : l.defaultYAxisOptions, z), it && ct === "yAxis" && (this.defaultPolarOptions.stackLabels = l.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, $ && ht && ($.axis = this), this.isCircular = ht);
- }
- function D() {
- this.isRadial && this.beforeSetTickPositions();
- }
- function W($) {
- 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, st = tt, lt = 0, pt = 0;
- if (it.isRadial) {
- var yt = it.getPosition(this.pos, it.center[2] / 2 + f(u(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 < st && 360 >= st && (st = 360 - st), (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 < st && 110 > st && (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 > st ? pt = J === "start" ? 0.15 * -et.height : 0.15 * et.height : 165 < st && 180 >= st && (pt = J === "start" ? 0.15 * et.height : 0.15 * -et.height), q.attr({ align: at }), q.translate(
- pt,
- lt + gt
- )), $.pos.x = yt.x + (nt.x || 0), $.pos.y = yt.y + (dt || 0);
- }
- }
- }
- function P($) {
- this.axis.getPosition && N($.pos, this.axis.getPosition(this.pos));
- }
- function X($, q) {
- var it = this.chart, et = this.center;
- return $ = this.startAngleRad + $, { x: it.plotLeft + et[0] + Math.cos($) * q, y: it.plotTop + et[1] + Math.sin($) * q };
- }
- function g() {
- this.isDirty = !1;
- }
- function m() {
- if (this.constructor.prototype.setAxisSize.call(this), this.isRadial) {
- this.pane.updateCenter(this);
- var $ = this.center = this.pane.center.slice();
- if (this.isCircular)
- this.sector = this.endAngleRad - this.startAngleRad;
- else {
- var q = this.postTranslate(this.angleRad, $[3] / 2);
- $[0] = q.x - this.chart.plotLeft, $[1] = q.y - this.chart.plotTop;
- }
- this.len = this.width = this.height = ($[2] - $[3]) * u(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 Y($) {
- $ = this.options = x(this.constructor.defaultOptions, this.defaultPolarOptions, Z[this.coll], $), $.plotBands || ($.plotBands = []), b(this, "afterSetOptions");
- }
- function V($, q, it, et, nt, rt, ct) {
- var gt = this.axis;
- return gt.isRadial ? ($ = gt.getPosition(this.pos, gt.center[2] / 2 + et), q = ["M", q, it, "L", $.x, $.y]) : q = $.call(this, q, it, et, nt, rt, ct), q;
- }
- var Q = [], k = { gridLineWidth: 1, labels: { align: void 0, distance: 15, x: 0, y: void 0, style: { textOverflow: "none" } }, maxPadding: 0, minPadding: 0, showLastLabel: !1, tickLength: 0 }, G = {
- 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
- }, z = { gridLineInterpolation: "circle", gridLineWidth: 1, labels: { align: "right", x: -3, y: -2 }, showLastLabel: !1, title: { x: 4, text: null, rotation: 90 } };
- B.compose = function($, q) {
- return Q.indexOf($) === -1 && (Q.push($), U($, "afterInit", o), U($, "autoLabelAlign", n), U($, "destroy", A), U($, "init", _), U($, "initialAxisTranslation", D)), Q.indexOf(q) === -1 && (Q.push(q), U(
- q,
- "afterGetLabelPosition",
- W
- ), U(q, "afterGetPosition", P), E(q.prototype, "getMarkPath", V)), $;
- };
- }(O || (O = {})), O;
- }), T(d, "Series/AreaRange/AreaRangePoint.js", [d["Series/Area/AreaSeries.js"], d["Core/Series/Point.js"], d["Core/Utilities.js"]], function(l, y, j) {
- var I = this && this.__extends || function() {
- var F = function(R, N) {
- return F = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(b, x) {
- b.__proto__ = x;
- } || function(b, x) {
- for (var u in x)
- x.hasOwnProperty(u) && (b[u] = x[u]);
- }, F(R, N);
- };
- return function(R, N) {
- function b() {
- this.constructor = R;
- }
- F(R, N), R.prototype = N === null ? Object.create(N) : (b.prototype = N.prototype, new b());
- };
- }(), Z = y.prototype, H = j.defined, U = j.isNumber;
- return function(F) {
- function R() {
- var N = F !== null && F.apply(this, arguments) || this;
- return N.high = void 0, N.low = void 0, N.options = void 0, N.plotHigh = void 0, N.plotLow = void 0, N.plotHighX = void 0, N.plotLowX = void 0, N.plotX = void 0, N.series = void 0, N;
- }
- return I(R, F), R.prototype.setState = function() {
- var N = this.state, b = this.series, x = b.chart.polar;
- H(this.plotHigh) || (this.plotHigh = b.yAxis.toPixels(
- this.high,
- !0
- )), H(this.plotLow) || (this.plotLow = this.plotY = b.yAxis.toPixels(this.low, !0)), b.stateMarkerGraphic && (b.lowerStateMarkerGraphic = b.stateMarkerGraphic, b.stateMarkerGraphic = b.upperStateMarkerGraphic), this.graphic = this.upperGraphic, this.plotY = this.plotHigh, x && (this.plotX = this.plotHighX), Z.setState.apply(this, arguments), this.state = N, this.plotY = this.plotLow, this.graphic = this.lowerGraphic, x && (this.plotX = this.plotLowX), b.stateMarkerGraphic && (b.upperStateMarkerGraphic = b.stateMarkerGraphic, b.stateMarkerGraphic = b.lowerStateMarkerGraphic, b.lowerStateMarkerGraphic = void 0), Z.setState.apply(this, arguments);
- }, R.prototype.haloPath = function() {
- var N = this.series.chart.polar, b = [];
- return this.plotY = this.plotLow, N && (this.plotX = this.plotLowX), this.isInside && (b = Z.haloPath.apply(this, arguments)), this.plotY = this.plotHigh, N && (this.plotX = this.plotHighX), this.isTopInside && (b = b.concat(Z.haloPath.apply(this, arguments))), b;
- }, R.prototype.isValid = function() {
- return U(this.low) && U(this.high);
- }, R;
- }(l.prototype.pointClass);
- }), T(
- d,
- "Series/AreaRange/AreaRangeSeries.js",
- [d["Series/AreaRange/AreaRangePoint.js"], d["Series/Area/AreaSeries.js"], d["Series/Column/ColumnSeries.js"], d["Core/Globals.js"], d["Core/Series/Series.js"], d["Core/Series/SeriesRegistry.js"], d["Core/Utilities.js"]],
- function(l, y, j, I, Z, H, U) {
- var F = this && this.__extends || function() {
- var B = function(M, S) {
- return B = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(w, v) {
- w.__proto__ = v;
- } || function(w, v) {
- for (var a in v)
- v.hasOwnProperty(a) && (w[a] = v[a]);
- }, B(M, S);
- };
- return function(M, S) {
- function w() {
- this.constructor = M;
- }
- B(M, S), M.prototype = S === null ? Object.create(S) : (w.prototype = S.prototype, new w());
- };
- }(), R = y.prototype, N = j.prototype;
- j = I.noop;
- var b = Z.prototype, x = U.defined, u = U.extend, f = U.isArray, E = U.pick, O = U.merge;
- return Z = function(B) {
- function M() {
- var S = B !== null && B.apply(this, arguments) || this;
- return S.data = void 0, S.options = void 0, S.points = void 0, S.lowerStateMarkerGraphic = void 0, S.xAxis = void 0, S;
- }
- return F(M, B), M.prototype.toYData = function(S) {
- return [S.low, S.high];
- }, M.prototype.highToXY = function(S) {
- var w = this.chart, v = this.xAxis.postTranslate(S.rectPlotX || 0, this.yAxis.len - S.plotHigh);
- S.plotHighX = v.x - w.plotLeft, S.plotHigh = v.y - w.plotTop, S.plotLowX = S.plotX;
- }, M.prototype.translate = function() {
- var S = this, w = S.yAxis;
- R.translate.apply(S), S.points.forEach(function(v) {
- var a = v.high, c = v.plotY;
- v.isNull ? v.plotY = null : (v.plotLow = c, v.plotHigh = w.translate(S.dataModify ? S.dataModify.modifyValue(a) : a, 0, 1, 0, 1), S.dataModify && (v.yBottom = v.plotHigh));
- }), this.chart.polar && this.points.forEach(function(v) {
- S.highToXY(v), v.tooltipPos = [(v.plotHighX + v.plotLowX) / 2, (v.plotHigh + v.plotLow) / 2];
- });
- }, M.prototype.getGraphPath = function(S) {
- var w = [], v = [], a, c = R.getGraphPath, p = this.options, i = this.chart.polar, h = i && p.connectEnds !== !1, s = p.connectNulls, t = p.step;
- for (S = S || this.points, a = S.length; a--; ) {
- var o = S[a], n = i ? { plotX: o.rectPlotX, plotY: o.yBottom, doCurve: !1 } : { plotX: o.plotX, plotY: o.plotY, doCurve: !1 };
- o.isNull || h || s || S[a + 1] && !S[a + 1].isNull || v.push(n);
- var A = { polarPlotY: o.polarPlotY, rectPlotX: o.rectPlotX, yBottom: o.yBottom, plotX: E(
- o.plotHighX,
- o.plotX
- ), plotY: o.plotHigh, isNull: o.isNull };
- v.push(A), w.push(A), o.isNull || h || s || S[a - 1] && !S[a - 1].isNull || v.push(n);
- }
- return S = c.call(this, S), t && (t === !0 && (t = "left"), p.step = { left: "right", center: "center", right: "left" }[t]), w = c.call(this, w), v = c.call(this, v), p.step = t, p = [].concat(S, w), !this.chart.polar && v[0] && v[0][0] === "M" && (v[0] = ["L", v[0][1], v[0][2]]), this.graphPath = p, this.areaPath = S.concat(v), p.isArea = !0, p.xMap = S.xMap, this.areaPath.xMap = S.xMap, p;
- }, M.prototype.drawDataLabels = function() {
- var S = this.points, w = S.length, v, a = [], c = this.options.dataLabels, p, i = this.chart.inverted;
- if (c) {
- if (f(c))
- var h = c[0] || { enabled: !1 }, s = c[1] || { enabled: !1 };
- else
- h = u({}, c), h.x = c.xHigh, h.y = c.yHigh, s = u({}, c), s.x = c.xLow, s.y = c.yLow;
- if (h.enabled || this._hasPointLabels) {
- for (v = w; v--; )
- if (p = S[v]) {
- var t = h.inside ? p.plotHigh < p.plotLow : p.plotHigh > p.plotLow;
- p.y = p.high, p._plotY = p.plotY, p.plotY = p.plotHigh, a[v] = p.dataLabel, p.dataLabel = p.dataLabelUpper, p.below = t, i ? h.align || (h.align = t ? "right" : "left") : h.verticalAlign || (h.verticalAlign = t ? "top" : "bottom");
- }
- for (this.options.dataLabels = h, b.drawDataLabels && b.drawDataLabels.apply(this, arguments), v = w; v--; )
- (p = S[v]) && (p.dataLabelUpper = p.dataLabel, p.dataLabel = a[v], delete p.dataLabels, p.y = p.low, p.plotY = p._plotY);
- }
- if (s.enabled || this._hasPointLabels) {
- for (v = w; v--; )
- (p = S[v]) && (t = s.inside ? p.plotHigh < p.plotLow : p.plotHigh > p.plotLow, p.below = !t, i ? s.align || (s.align = t ? "left" : "right") : s.verticalAlign || (s.verticalAlign = t ? "bottom" : "top"));
- this.options.dataLabels = s, b.drawDataLabels && b.drawDataLabels.apply(this, arguments);
- }
- if (h.enabled)
- for (v = w; v--; )
- (p = S[v]) && (p.dataLabels = [p.dataLabelUpper, p.dataLabel].filter(function(o) {
- return !!o;
- }));
- this.options.dataLabels = c;
- }
- }, M.prototype.alignDataLabel = function() {
- N.alignDataLabel.apply(this, arguments);
- }, M.prototype.drawPoints = function() {
- var S = this.points.length, w;
- for (b.drawPoints.apply(this, arguments), w = 0; w < S; ) {
- 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 = E(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 (b.drawPoints.apply(this, arguments), w = 0; w < S; )
- v = this.points[w], v.upperGraphic = v.graphic, v.graphic = v.lowerGraphic, v.origProps && (u(v, v.origProps), delete v.origProps), w++;
- }, M.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 }
- }), M;
- }(y), u(Z.prototype, { pointArrayMap: ["low", "high"], pointValKey: "low", deferTranslatePolar: !0, pointClass: l, setStackedPoints: j }), H.registerSeriesType("arearange", Z), Z;
- }
- ), T(d, "Series/AreaSplineRange/AreaSplineRangeSeries.js", [
- d["Series/AreaRange/AreaRangeSeries.js"],
- d["Core/Series/SeriesRegistry.js"],
- d["Core/Utilities.js"]
- ], function(l, y, j) {
- var I = this && this.__extends || function() {
- var F = function(R, N) {
- return F = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(b, x) {
- b.__proto__ = x;
- } || function(b, x) {
- for (var u in x)
- x.hasOwnProperty(u) && (b[u] = x[u]);
- }, F(R, N);
- };
- return function(R, N) {
- function b() {
- this.constructor = R;
- }
- F(R, N), R.prototype = N === null ? Object.create(N) : (b.prototype = N.prototype, new b());
- };
- }(), Z = y.seriesTypes.spline, H = j.merge;
- j = j.extend;
- var U = function(F) {
- function R() {
- var N = F !== null && F.apply(this, arguments) || this;
- return N.options = void 0, N.data = void 0, N.points = void 0, N;
- }
- return I(R, F), R.defaultOptions = H(l.defaultOptions), R;
- }(l);
- return j(U.prototype, { getPointSpline: Z.prototype.getPointSpline }), y.registerSeriesType("areasplinerange", U), U;
- }), T(d, "Series/BoxPlot/BoxPlotSeries.js", [d["Series/Column/ColumnSeries.js"], d["Core/Globals.js"], d["Core/Series/SeriesRegistry.js"], d["Core/Utilities.js"]], function(l, y, j, I) {
- var Z = this && this.__extends || function() {
- var R = function(N, b) {
- return R = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(x, u) {
- x.__proto__ = u;
- } || function(x, u) {
- for (var f in u)
- u.hasOwnProperty(f) && (x[f] = u[f]);
- }, R(N, b);
- };
- return function(N, b) {
- function x() {
- this.constructor = N;
- }
- R(N, b), N.prototype = b === null ? Object.create(b) : (x.prototype = b.prototype, new x());
- };
- }();
- y = y.noop;
- var H = I.extend, U = I.merge, F = I.pick;
- return I = function(R) {
- function N() {
- var b = R !== null && R.apply(this, arguments) || this;
- return b.data = void 0, b.options = void 0, b.points = void 0, b;
- }
- return Z(N, R), N.prototype.pointAttribs = function() {
- return {};
- }, N.prototype.translate = function() {
- var b = this.yAxis, x = this.pointArrayMap;
- R.prototype.translate.apply(this), this.points.forEach(function(u) {
- x.forEach(function(f) {
- u[f] !== null && (u[f + "Plot"] = b.translate(u[f], 0, 1, 0, 1));
- }), u.plotHigh = u.highPlot;
- });
- }, N.prototype.drawPoints = function() {
- var b = this, x = b.options, u = b.chart, f = u.renderer, E, O, B, M, S, w, v = 0, a, c, p, i, h = b.doQuartiles !== !1, s, t = b.options.whiskerLength;
- b.points.forEach(function(o) {
- var n = o.graphic, A = n ? "animate" : "attr", _ = o.shapeArgs, D = {}, W = {}, P = {}, X = {}, g = o.color || b.color;
- typeof o.plotY < "u" && (a = Math.round(_.width), c = Math.floor(_.x), p = c + a, i = Math.round(a / 2), E = Math.floor(h ? o.q1Plot : o.lowPlot), O = Math.floor(h ? o.q3Plot : o.lowPlot), B = Math.floor(o.highPlot), M = Math.floor(o.lowPlot), n || (o.graphic = n = f.g("point").add(b.group), o.stem = f.path().addClass("highcharts-boxplot-stem").add(n), t && (o.whiskers = f.path().addClass("highcharts-boxplot-whisker").add(n)), h && (o.box = f.path(void 0).addClass("highcharts-boxplot-box").add(n)), o.medianShape = f.path(void 0).addClass("highcharts-boxplot-median").add(n)), u.styledMode || (W.stroke = o.stemColor || x.stemColor || g, W["stroke-width"] = F(o.stemWidth, x.stemWidth, x.lineWidth), W.dashstyle = o.stemDashStyle || x.stemDashStyle || x.dashStyle, o.stem.attr(W), t && (P.stroke = o.whiskerColor || x.whiskerColor || g, P["stroke-width"] = F(o.whiskerWidth, x.whiskerWidth, x.lineWidth), P.dashstyle = o.whiskerDashStyle || x.whiskerDashStyle || x.dashStyle, o.whiskers.attr(P)), h && (D.fill = o.fillColor || x.fillColor || g, D.stroke = x.lineColor || g, D["stroke-width"] = x.lineWidth || 0, D.dashstyle = o.boxDashStyle || x.boxDashStyle || x.dashStyle, o.box.attr(D)), X.stroke = o.medianColor || x.medianColor || g, X["stroke-width"] = F(o.medianWidth, x.medianWidth, x.lineWidth), X.dashstyle = o.medianDashStyle || x.medianDashStyle || x.dashStyle, o.medianShape.attr(X)), w = o.stem.strokeWidth() % 2 / 2, v = c + i + w, n = [["M", v, O], ["L", v, B], ["M", v, E], ["L", v, M]], o.stem[A]({ d: n }), h && (w = o.box.strokeWidth() % 2 / 2, E = Math.floor(E) + w, O = Math.floor(O) + w, c += w, p += w, n = [["M", c, O], ["L", c, E], ["L", p, E], ["L", p, O], ["L", c, O], ["Z"]], o.box[A]({ d: n })), t && (w = o.whiskers.strokeWidth() % 2 / 2, B += w, M += w, s = /%$/.test(t) ? i * parseFloat(t) / 100 : t / 2, n = [["M", v - s, B], ["L", v + s, B], ["M", v - s, M], ["L", v + s, M]], o.whiskers[A]({ d: n })), S = Math.round(o.medianPlot), w = o.medianShape.strokeWidth() % 2 / 2, S += w, n = [["M", c, S], ["L", p, S]], o.medianShape[A]({ d: n }));
- });
- }, N.prototype.toYData = function(b) {
- return [b.low, b.q1, b.median, b.q3, b.high];
- }, N.defaultOptions = U(l.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
- }), N;
- }(l), H(I.prototype, { pointArrayMap: ["low", "q1", "median", "q3", "high"], pointValKey: "high", drawDataLabels: y, setStackedPoints: y }), j.registerSeriesType("boxplot", I), I;
- }), T(d, "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 };
- }), T(d, "Series/Bubble/BubbleLegendItem.js", [d["Core/Color/Color.js"], d["Core/FormatUtilities.js"], d["Core/Globals.js"], d["Core/Utilities.js"]], function(l, y, j, I) {
- var Z = l.parse, H = j.noop, U = I.arrayMax, F = I.arrayMin, R = I.isNumber, N = I.merge, b = I.pick, x = I.stableSort;
- return function() {
- function u(f, E) {
- 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(f, E);
- }
- return u.prototype.init = function(f, E) {
- this.options = f, this.visible = !0, this.chart = E.chart, this.legend = E;
- }, u.prototype.addToLegend = function(f) {
- f.splice(
- this.options.legendIndex,
- 0,
- this
- );
- }, u.prototype.drawLegendSymbol = function(f) {
- var E = this.chart, O = this.options, B = b(f.options.itemDistance, 20), M = O.ranges, S = O.connectorDistance;
- this.fontMetrics = E.renderer.fontMetrics(O.labels.style.fontSize), M && M.length && R(M[0].value) ? (x(M, function(w, v) {
- return v.value - w.value;
- }), this.ranges = M, this.setOptions(), this.render(), f = this.getMaxLabelSize(), M = this.ranges[0].radius, E = 2 * M, S = S - M + f.width, S = 0 < S ? S : 0, this.maxLabel = f, this.movementX = O.labels.align === "left" ? S : 0, this.legendItemWidth = E + S + B, this.legendItemHeight = E + this.fontMetrics.h / 2) : f.options.bubbleLegend.autoRanges = !0;
- }, u.prototype.setOptions = function() {
- var f = this.ranges, E = this.options, O = this.chart.series[E.seriesIndex], B = this.legend.baseline, M = { zIndex: E.zIndex, "stroke-width": E.borderWidth }, S = { zIndex: E.zIndex, "stroke-width": E.connectorWidth }, w = { align: this.legend.options.rtl || E.labels.align === "left" ? "right" : "left", zIndex: E.zIndex }, v = O.options.marker.fillOpacity, a = this.chart.styledMode;
- f.forEach(function(c, p) {
- a || (M.stroke = b(c.borderColor, E.borderColor, O.color), M.fill = b(c.color, E.color, v !== 1 ? Z(O.color).setOpacity(v).get("rgba") : O.color), S.stroke = b(c.connectorColor, E.connectorColor, O.color)), f[p].radius = this.getRangeRadius(c.value), f[p] = N(f[p], { center: f[0].radius - f[p].radius + B }), a || N(!0, f[p], { bubbleAttribs: N(M), connectorAttribs: N(S), labelAttribs: w });
- }, this);
- }, u.prototype.getRangeRadius = function(f) {
- var E = this.options;
- return this.chart.series[this.options.seriesIndex].getRadius.call(
- this,
- E.ranges[E.ranges.length - 1].value,
- E.ranges[0].value,
- E.minSize,
- E.maxSize,
- f
- );
- }, u.prototype.render = function() {
- var f = this.chart.renderer, E = this.options.zThreshold;
- this.symbols || (this.symbols = { connectors: [], bubbleItems: [], labels: [] }), this.legendSymbol = f.g("bubble-legend"), this.legendItem = f.g("bubble-legend-item"), this.legendSymbol.translateX = 0, this.legendSymbol.translateY = 0, this.ranges.forEach(function(O) {
- O.value >= E && this.renderRange(O);
- }, this), this.legendSymbol.add(this.legendItem), this.legendItem.add(this.legendGroup), this.hideOverlappingLabels();
- }, u.prototype.renderRange = function(f) {
- var E = this.options, O = E.labels, B = this.chart, M = B.series[E.seriesIndex], S = B.renderer, w = this.symbols;
- B = w.labels;
- var v = f.center, a = Math.abs(f.radius), c = E.connectorDistance || 0, p = O.align, i = E.connectorWidth, h = this.ranges[0].radius || 0, s = v - a - E.borderWidth / 2 + i / 2, t = this.fontMetrics;
- t = t.f / 2 - (t.h - t.f) / 2;
- var o = S.styledMode;
- c = this.legend.options.rtl || p === "left" ? -c : c, p === "center" && (c = 0, E.connectorDistance = 0, f.labelAttribs.align = "center"), p = s + E.labels.y;
- var n = h + c + E.labels.x;
- w.bubbleItems.push(S.circle(
- h,
- v + ((s % 1 ? 1 : 0.5) - (i % 2 ? 0 : 0.5)),
- a
- ).attr(o ? {} : f.bubbleAttribs).addClass((o ? "highcharts-color-" + M.colorIndex + " " : "") + "highcharts-bubble-legend-symbol " + (E.className || "")).add(this.legendSymbol)), w.connectors.push(S.path(S.crispLine([["M", h, s], ["L", h + c, s]], E.connectorWidth)).attr(o ? {} : f.connectorAttribs).addClass((o ? "highcharts-color-" + this.options.seriesIndex + " " : "") + "highcharts-bubble-legend-connectors " + (E.connectorClassName || "")).add(this.legendSymbol)), f = S.text(this.formatLabel(f), n, p + t).attr(o ? {} : f.labelAttribs).css(o ? {} : O.style).addClass("highcharts-bubble-legend-labels " + (E.labels.className || "")).add(this.legendSymbol), B.push(f), f.placed = !0, f.alignAttr = { x: n, y: p + t };
- }, u.prototype.getMaxLabelSize = function() {
- var f, E;
- return this.symbols.labels.forEach(function(O) {
- E = O.getBBox(!0), f = f ? E.width > f.width ? E : f : E;
- }), f || {};
- }, u.prototype.formatLabel = function(f) {
- var E = this.options, O = E.labels.formatter;
- E = E.labels.format;
- var B = this.chart.numberFormatter;
- return E ? y.format(E, f) : O ? O.call(f) : B(f.value, 1);
- }, u.prototype.hideOverlappingLabels = function() {
- var f = this.chart, E = this.symbols;
- !this.options.labels.allowOverlap && E && (f.hideOverlappingLabels(E.labels), E.labels.forEach(function(O, B) {
- O.newOpacity ? O.newOpacity !== O.oldOpacity && E.connectors[B].show() : E.connectors[B].hide();
- }));
- }, u.prototype.getRanges = function() {
- var f = this.legend.bubbleLegend, E = f.options.ranges, O, B = Number.MAX_VALUE, M = -Number.MAX_VALUE;
- f.chart.series.forEach(function(w) {
- w.isBubble && !w.ignoreSeries && (O = w.zData.filter(R), O.length && (B = b(w.options.zMin, Math.min(B, Math.max(
- F(O),
- w.options.displayNegative === !1 ? w.options.zThreshold : -Number.MAX_VALUE
- ))), M = b(w.options.zMax, Math.max(M, U(O)))));
- });
- var S = B === M ? [{ value: M }] : [{ value: B }, { value: (B + M) / 2 }, { value: M, autoRanges: !0 }];
- return E.length && E[0].radius && S.reverse(), S.forEach(function(w, v) {
- E && E[v] && (S[v] = N(E[v], w));
- }), S;
- }, u.prototype.predictBubbleSizes = function() {
- var f = this.chart, E = this.fontMetrics, O = f.legend.options, B = O.floating, M = (O = O.layout === "horizontal") ? f.legend.lastLineHeight : 0, S = f.plotSizeX, w = f.plotSizeY, v = f.series[this.options.seriesIndex], a = v.getPxExtremes();
- f = Math.ceil(a.minPxSize), a = Math.ceil(a.maxPxSize);
- var c = Math.min(w, S);
- return v = v.options.maxSize, B || !/%$/.test(v) ? E = a : (v = parseFloat(v), E = (c + M - E.h / 2) * v / 100 / (v / 100 + 1), (O && w - E >= S || !O && S - E >= w) && (E = a)), [f, Math.ceil(E)];
- }, u.prototype.updateRanges = function(f, E) {
- var O = this.legend.options.bubbleLegend;
- O.minSize = f, O.maxSize = E, O.ranges = this.getRanges();
- }, u.prototype.correctSizes = function() {
- var f = this.legend, E = this.chart.series[this.options.seriesIndex].getPxExtremes();
- 1 < Math.abs(Math.ceil(E.maxPxSize) - this.options.maxSize) && (this.updateRanges(this.options.minSize, E.maxPxSize), f.render());
- }, u;
- }();
- }), T(d, "Series/Bubble/BubbleLegendComposition.js", [d["Series/Bubble/BubbleLegendDefaults.js"], d["Series/Bubble/BubbleLegendItem.js"], d["Core/DefaultOptions.js"], d["Core/Utilities.js"]], function(l, y, j, I) {
- var Z = j.setOptions, H = I.addEvent, U = I.objectEach, F = I.wrap, R;
- return function(N) {
- function b(M, S, w) {
- var v = this.legend, a = 0 <= x(this);
- if (v && v.options.enabled && v.bubbleLegend && v.options.bubbleLegend.autoRanges && a) {
- var c = v.bubbleLegend.options;
- a = v.bubbleLegend.predictBubbleSizes(), v.bubbleLegend.updateRanges(a[0], a[1]), c.placed || (v.group.placed = !1, v.allItems.forEach(function(p) {
- p.legendGroup.translateY = null;
- })), v.render(), this.getMargins(), this.axes.forEach(function(p) {
- p.visible && p.render(), c.placed || (p.setScale(), p.updateNames(), U(p.ticks, function(i) {
- i.isNew = !0, i.isNewLabel = !0;
- }));
- }), c.placed = !0, this.getMargins(), M.call(this, S, w), v.bubbleLegend.correctSizes(), O(v, u(v));
- } else
- M.call(this, S, w), v && v.options.enabled && v.bubbleLegend && (v.render(), O(v, u(v)));
- }
- function x(M) {
- M = M.series;
- for (var S = 0; S < M.length; ) {
- if (M[S] && M[S].isBubble && M[S].visible && M[S].zData.length)
- return S;
- S++;
- }
- return -1;
- }
- function u(M) {
- M = M.allItems;
- var S = [], w = M.length, v, a = 0;
- for (v = 0; v < w; v++)
- if (M[v].legendItemHeight && (M[v].itemHeight = M[v].legendItemHeight), M[v] === M[w - 1] || M[v + 1] && M[v]._legendItemPos[1] !== M[v + 1]._legendItemPos[1]) {
- S.push({ height: 0 });
- var c = S[S.length - 1];
- for (a; a <= v; a++)
- M[a].itemHeight > c.height && (c.height = M[a].itemHeight);
- c.step = v;
- }
- return S;
- }
- function f(M) {
- var S = this.bubbleLegend, w = this.options, v = w.bubbleLegend, a = x(this.chart);
- S && S.ranges && S.ranges.length && (v.ranges.length && (v.autoRanges = !!v.ranges[0].autoRanges), this.destroyItem(S)), 0 <= a && w.enabled && v.enabled && (v.seriesIndex = a, this.bubbleLegend = new y(v, this), this.bubbleLegend.addToLegend(M.allItems));
- }
- function E() {
- var M = this.chart, S = this.visible, w = this.chart.legend;
- w && w.bubbleLegend && (this.visible = !S, this.ignoreSeries = S, M = 0 <= x(M), w.bubbleLegend.visible !== M && (w.update({ bubbleLegend: { enabled: M } }), w.bubbleLegend.visible = M), this.visible = S);
- }
- function O(M, S) {
- var w = M.options.rtl, v, a, c, p = 0;
- M.allItems.forEach(function(i, h) {
- v = i.legendGroup.translateX, a = i._legendItemPos[1], ((c = i.movementX) || w && i.ranges) && (c = w ? v - i.options.maxSize / 2 : v + c, i.legendGroup.attr({ translateX: c })), h > S[p].step && p++, i.legendGroup.attr({ translateY: Math.round(a + S[p].height / 2) }), i._legendItemPos[1] = a + S[p].height / 2;
- });
- }
- var B = [];
- N.compose = function(M, S, w) {
- B.indexOf(M) === -1 && (B.push(M), Z({ legend: { bubbleLegend: l } }), F(M.prototype, "drawChartBox", b)), B.indexOf(S) === -1 && (B.push(S), H(S, "afterGetAllItems", f)), B.indexOf(w) === -1 && (B.push(w), H(w, "legendItemClick", E));
- };
- }(R || (R = {})), R;
- }), T(d, "Series/Bubble/BubblePoint.js", [d["Core/Series/Point.js"], d["Core/Series/SeriesRegistry.js"], d["Core/Utilities.js"]], function(l, y, j) {
- var I = this && this.__extends || function() {
- var Z = function(H, U) {
- return Z = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(F, R) {
- F.__proto__ = R;
- } || function(F, R) {
- for (var N in R)
- R.hasOwnProperty(N) && (F[N] = R[N]);
- }, Z(H, U);
- };
- return function(H, U) {
- function F() {
- this.constructor = H;
- }
- Z(H, U), H.prototype = U === null ? Object.create(U) : (F.prototype = U.prototype, new F());
- };
- }();
- return j = j.extend, y = function(Z) {
- function H() {
- var U = Z !== null && Z.apply(this, arguments) || this;
- return U.options = void 0, U.series = void 0, U;
- }
- return I(H, Z), H.prototype.haloPath = function(U) {
- return l.prototype.haloPath.call(this, U === 0 ? 0 : (this.marker && this.marker.radius || 0) + U);
- }, H;
- }(y.seriesTypes.scatter.prototype.pointClass), j(y.prototype, { ttBelow: !1 }), y;
- }), T(d, "Series/Bubble/BubbleSeries.js", [
- d["Core/Axis/Axis.js"],
- d["Series/Bubble/BubbleLegendComposition.js"],
- d["Series/Bubble/BubblePoint.js"],
- d["Core/Color/Color.js"],
- d["Core/Globals.js"],
- d["Core/Series/Series.js"],
- d["Core/Series/SeriesRegistry.js"],
- d["Core/Utilities.js"]
- ], function(l, y, j, I, Z, H, U, F) {
- var R = this && this.__extends || function() {
- var w = function(v, a) {
- return w = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(c, p) {
- c.__proto__ = p;
- } || function(c, p) {
- for (var i in p)
- p.hasOwnProperty(i) && (c[i] = p[i]);
- }, w(v, a);
- };
- return function(v, a) {
- function c() {
- this.constructor = v;
- }
- w(v, a), v.prototype = a === null ? Object.create(a) : (c.prototype = a.prototype, new c());
- };
- }(), N = I.parse;
- I = Z.noop;
- var b = U.seriesTypes;
- Z = b.column;
- var x = b.scatter;
- b = F.addEvent;
- var u = F.arrayMax, f = F.arrayMin, E = F.clamp, O = F.extend, B = F.isNumber, M = F.merge, S = F.pick;
- return F = function(w) {
- function v() {
- var a = w !== null && w.apply(this, arguments) || this;
- return a.data = void 0, a.maxPxSize = void 0, a.minPxSize = void 0, a.options = void 0, a.points = void 0, a.radii = void 0, a.yData = void 0, a.zData = void 0, a;
- }
- return R(v, w), v.prototype.animate = function(a) {
- !a && this.points.length < this.options.animationLimit && this.points.forEach(function(c) {
- var p = c.graphic;
- p && p.width && (this.hasRendered || p.attr({ x: c.plotX, y: c.plotY, width: 1, height: 1 }), p.animate(this.markerAttribs(c), this.options.animation));
- }, this);
- }, v.prototype.getRadii = function() {
- var a = this, c = this.zData, p = this.yData, i = [], h = this.chart.bubbleZExtremes, s = this.getPxExtremes(), t = s.minPxSize, o = s.maxPxSize;
- if (!h) {
- var n = Number.MAX_VALUE, A = -Number.MAX_VALUE, _;
- this.chart.series.forEach(function(P) {
- P.bubblePadding && (P.visible || !a.chart.options.chart.ignoreHiddenSeries) && (P = P.getZExtremes()) && (n = Math.min(n || P.zMin, P.zMin), A = Math.max(A || P.zMax, P.zMax), _ = !0);
- }), _ ? (h = { zMin: n, zMax: A }, this.chart.bubbleZExtremes = h) : h = { zMin: 0, zMax: 0 };
- }
- var D = 0;
- for (s = c.length; D < s; D++) {
- var W = c[D];
- i.push(this.getRadius(h.zMin, h.zMax, t, o, W, p[D]));
- }
- this.radii = i;
- }, v.prototype.getRadius = function(a, c, p, i, h, s) {
- var t = this.options, o = t.sizeBy !== "width", n = t.zThreshold, A = c - a, _ = 0.5;
- if (s === null || h === null)
- return null;
- if (B(h)) {
- if (t.sizeByAbsoluteValue && (h = Math.abs(h - n), A = Math.max(c - n, Math.abs(a - n)), a = 0), h < a)
- return p / 2 - 1;
- 0 < A && (_ = (h - a) / A);
- }
- return o && 0 <= _ && (_ = Math.sqrt(_)), Math.ceil(p + _ * (i - p)) / 2;
- }, v.prototype.hasData = function() {
- return !!this.processedXData.length;
- }, v.prototype.pointAttribs = function(a, c) {
- var p = this.options.marker.fillOpacity;
- return a = H.prototype.pointAttribs.call(this, a, c), p !== 1 && (a.fill = N(a.fill).setOpacity(p).get("rgba")), a;
- }, v.prototype.translate = function() {
- w.prototype.translate.call(this), this.getRadii(), this.translateBubble();
- }, v.prototype.translateBubble = function() {
- for (var a = this.data, c = this.radii, p = this.getPxExtremes().minPxSize, i = a.length; i--; ) {
- var h = a[i], s = c ? c[i] : 0;
- B(s) && s >= p / 2 ? (h.marker = O(h.marker, { radius: s, width: 2 * s, height: 2 * s }), h.dlBox = { x: h.plotX - s, y: h.plotY - s, width: 2 * s, height: 2 * s }) : h.shapeArgs = h.plotY = h.dlBox = void 0;
- }
- }, v.prototype.getPxExtremes = function() {
- var a = Math.min(this.chart.plotWidth, this.chart.plotHeight), c = function(i) {
- if (typeof i == "string") {
- var h = /%$/.test(i);
- i = parseInt(i, 10);
- }
- return h ? a * i / 100 : i;
- }, p = c(S(this.options.minSize, 8));
- return c = Math.max(c(S(this.options.maxSize, "20%")), p), {
- minPxSize: p,
- maxPxSize: c
- };
- }, v.prototype.getZExtremes = function() {
- var a = this.options, c = (this.zData || []).filter(B);
- if (c.length) {
- var p = S(a.zMin, E(f(c), a.displayNegative === !1 ? a.zThreshold || 0 : -Number.MAX_VALUE, Number.MAX_VALUE));
- if (a = S(a.zMax, u(c)), B(p) && B(a))
- return { zMin: p, zMax: a };
- }
- }, v.compose = y.compose, v.defaultOptions = M(x.defaultOptions, { dataLabels: { formatter: function() {
- var a = this.series.chart.numberFormatter, c = this.point.z;
- return B(c) ? a(c, -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(F.prototype, {
- alignDataLabel: Z.prototype.alignDataLabel,
- applyZones: I,
- bubblePadding: !0,
- buildKDTree: I,
- directTouch: !0,
- isBubble: !0,
- pointArrayMap: ["y", "z"],
- pointClass: j,
- parallelArrays: ["x", "y", "z"],
- trackerGroups: ["group", "dataLabelsGroup"],
- specialGroup: "group",
- zoneAxis: "z"
- }), b(F, "updatedData", function(w) {
- delete w.target.chart.bubbleZExtremes;
- }), l.prototype.beforePadding = function() {
- var w = this, v = this.len, a = this.chart, c = 0, p = v, i = this.isXAxis, h = i ? "xData" : "yData", s = this.min, t = this.max - s, o = v / t, n;
- this.series.forEach(function(A) {
- if (A.bubblePadding && (A.visible || !a.options.chart.ignoreHiddenSeries)) {
- n = w.allowZoomOutside = !0;
- var _ = A[h];
- if (i && A.getRadii(0, 0, A), 0 < t) {
- for (var D = _.length; D--; )
- if (B(_[D]) && w.dataMin <= _[D] && _[D] <= w.max) {
- var W = A.radii && A.radii[D] || 0;
- c = Math.min((_[D] - s) * o - W, c), p = Math.max((_[D] - s) * o + W, p);
- }
- }
- }
- }), n && 0 < t && !this.logarithmic && (p -= v, o *= (v + Math.max(0, c) - Math.min(p, v)) / v, [["min", "userMin", c], ["max", "userMax", p]].forEach(function(A) {
- typeof S(w.options[A[0]], w[A[1]]) > "u" && (w[A[0]] += A[2] / o);
- }));
- }, U.registerSeriesType("bubble", F), F;
- }), T(d, "Series/ColumnRange/ColumnRangePoint.js", [d["Core/Series/SeriesRegistry.js"], d["Core/Utilities.js"]], function(l, y) {
- var j = this && this.__extends || function() {
- var U = function(F, R) {
- return U = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(N, b) {
- N.__proto__ = b;
- } || function(N, b) {
- for (var x in b)
- b.hasOwnProperty(x) && (N[x] = b[x]);
- }, U(F, R);
- };
- return function(F, R) {
- function N() {
- this.constructor = F;
- }
- U(F, R), F.prototype = R === null ? Object.create(R) : (N.prototype = R.prototype, new N());
- };
- }(), I = l.seriesTypes;
- l = I.column.prototype.pointClass;
- var Z = y.extend, H = y.isNumber;
- return y = function(U) {
- function F() {
- var R = U !== null && U.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 j(F, U), F.prototype.isValid = function() {
- return H(this.low);
- }, F;
- }(I.arearange.prototype.pointClass), Z(y.prototype, { setState: l.prototype.setState }), y;
- }), T(d, "Series/ColumnRange/ColumnRangeSeries.js", [d["Series/ColumnRange/ColumnRangePoint.js"], d["Core/Globals.js"], d["Core/Series/SeriesRegistry.js"], d["Core/Utilities.js"]], function(l, y, j, I) {
- var Z = this && this.__extends || function() {
- var E = function(O, B) {
- return E = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(M, S) {
- M.__proto__ = S;
- } || function(M, S) {
- for (var w in S)
- S.hasOwnProperty(w) && (M[w] = S[w]);
- }, E(O, B);
- };
- return function(O, B) {
- function M() {
- this.constructor = O;
- }
- E(O, B), O.prototype = B === null ? Object.create(B) : (M.prototype = B.prototype, new M());
- };
- }();
- y = y.noop;
- var H = j.seriesTypes, U = H.arearange, F = H.column, R = F.prototype, N = U.prototype, b = I.clamp, x = I.merge, u = I.pick;
- I = I.extend;
- var f = { pointRange: null, marker: null, states: { hover: { halo: !1 } } };
- return H = function(E) {
- function O() {
- var B = E !== null && E.apply(this, arguments) || this;
- return B.data = void 0, B.points = void 0, B.options = void 0, B;
- }
- return Z(O, E), O.prototype.setOptions = function() {
- return x(!0, arguments[0], { stacking: void 0 }), N.setOptions.apply(this, arguments);
- }, O.prototype.translate = function() {
- var B = this, M = B.yAxis, S = B.xAxis, w = S.startAngleRad, v, a = B.chart, c = B.xAxis.isRadial, p = Math.max(a.chartWidth, a.chartHeight) + 999, i;
- R.translate.apply(B), B.points.forEach(function(h) {
- var s = h.shapeArgs || {}, t = B.options.minPointLength;
- h.plotHigh = i = b(M.translate(h.high, 0, 1, 0, 1), -p, p), h.plotLow = b(h.plotY, -p, p);
- var o = i, n = u(
- h.rectPlotY,
- h.plotY
- ) - i;
- Math.abs(n) < t ? (t -= n, n += t, o -= t / 2) : 0 > n && (n *= -1, o -= n), c ? (v = h.barX + w, h.shapeType = "arc", h.shapeArgs = B.polarArc(o + n, o, v, v + h.pointWidth)) : (s.height = n, s.y = o, t = s.x, t = t === void 0 ? 0 : t, s = s.width, s = s === void 0 ? 0 : s, h.tooltipPos = a.inverted ? [M.len + M.pos - a.plotLeft - o - n / 2, S.len + S.pos - a.plotTop - t - s / 2, n] : [S.left - a.plotLeft + t + s / 2, M.pos - a.plotTop + o + 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(F.defaultOptions, U.defaultOptions, f), O;
- }(U), I(H.prototype, { directTouch: !0, trackerGroups: ["group", "dataLabelsGroup"], drawGraph: y, getSymbol: y, polarArc: function() {
- return R.polarArc.apply(this, arguments);
- }, pointClass: l }), j.registerSeriesType("columnrange", H), H;
- }), T(d, "Series/ColumnPyramid/ColumnPyramidSeries.js", [d["Series/Column/ColumnSeries.js"], d["Core/Series/SeriesRegistry.js"], d["Core/Utilities.js"]], function(l, y, j) {
- var I = this && this.__extends || function() {
- var R = function(N, b) {
- return R = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(x, u) {
- x.__proto__ = u;
- } || function(x, u) {
- for (var f in u)
- u.hasOwnProperty(f) && (x[f] = u[f]);
- }, R(N, b);
- };
- return function(N, b) {
- function x() {
- this.constructor = N;
- }
- R(N, b), N.prototype = b === null ? Object.create(b) : (x.prototype = b.prototype, new x());
- };
- }(), Z = l.prototype, H = j.clamp, U = j.merge, F = j.pick;
- return j = function(R) {
- function N() {
- var b = R !== null && R.apply(this, arguments) || this;
- return b.data = void 0, b.options = void 0, b.points = void 0, b;
- }
- return I(N, R), N.prototype.translate = function() {
- var b = this, x = b.chart, u = b.options, f = b.dense = 2 > b.closestPointRange * b.xAxis.transA;
- f = b.borderWidth = F(u.borderWidth, f ? 0 : 1);
- var E = b.yAxis, O = u.threshold, B = b.translatedThreshold = E.getThreshold(O), M = F(u.minPointLength, 5), S = b.getColumnMetrics(), w = S.width, v = b.barW = Math.max(w, 1 + 2 * f), a = b.pointXOffset = S.offset;
- x.inverted && (B -= 0.5), u.pointPadding && (v = Math.ceil(v)), Z.translate.apply(b), b.points.forEach(function(c) {
- var p = F(c.yBottom, B), i = 999 + Math.abs(p), h = H(c.plotY, -i, E.len + i);
- i = c.plotX + a;
- var s = v / 2, t = Math.min(h, p);
- p = Math.max(h, p) - t;
- var o;
- c.barX = i, c.pointWidth = w, c.tooltipPos = x.inverted ? [E.len + E.pos - x.plotLeft - h, b.xAxis.len - i - s, p] : [i + s, h + E.pos - x.plotTop, p], h = O + (c.total || c.y), u.stacking === "percent" && (h = O + (0 > c.y) ? -100 : 100), h = E.toPixels(h, !0);
- var n = (o = x.plotHeight - h - (x.plotHeight - B)) ? s * (t - h) / o : 0, A = o ? s * (t + p - h) / o : 0;
- o = i - n + s, n = i + n + s;
- var _ = i + A + s;
- A = i - A + s;
- var D = t - M, W = t + p;
- 0 > c.y && (D = t, W = t + p + M), x.inverted && (_ = E.width - t, o = h - (E.width - B), n = s * (h - _) / o, A = s * (h - (_ - p)) / o, o = i + s + n, n = o - 2 * n, _ = i - A + s, A = i + A + s, D = t, W = t + p - M, 0 > c.y && (W = t + p + M)), c.shapeType = "path", c.shapeArgs = { x: o, y: D, width: n - o, height: p, d: [["M", o, D], ["L", n, D], ["L", _, W], ["L", A, W], ["Z"]] };
- });
- }, N.defaultOptions = U(l.defaultOptions, {}), N;
- }(l), y.registerSeriesType("columnpyramid", j), j;
- }), T(d, "Series/ErrorBar/ErrorBarSeries.js", [d["Series/BoxPlot/BoxPlotSeries.js"], d["Series/Column/ColumnSeries.js"], d["Core/Series/SeriesRegistry.js"], d["Core/Utilities.js"]], function(l, y, j, I) {
- var Z = this && this.__extends || function() {
- var R = function(N, b) {
- return R = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(x, u) {
- x.__proto__ = u;
- } || function(x, u) {
- for (var f in u)
- u.hasOwnProperty(f) && (x[f] = u[f]);
- }, R(N, b);
- };
- return function(N, b) {
- function x() {
- this.constructor = N;
- }
- R(N, b), N.prototype = b === null ? Object.create(b) : (x.prototype = b.prototype, new x());
- };
- }(), H = j.seriesTypes.arearange, U = I.merge;
- I = I.extend;
- var F = function(R) {
- function N() {
- var b = R !== null && R.apply(this, arguments) || this;
- return b.data = void 0, b.options = void 0, b.points = void 0, b;
- }
- return Z(N, R), N.prototype.getColumnMetrics = function() {
- return this.linkedParent && this.linkedParent.columnMetrics || y.prototype.getColumnMetrics.call(this);
- }, N.prototype.drawDataLabels = function() {
- var b = this.pointValKey;
- H && (H.prototype.drawDataLabels.call(this), this.data.forEach(function(x) {
- x.y = x[b];
- }));
- }, N.prototype.toYData = function(b) {
- return [b.low, b.high];
- }, N.defaultOptions = U(l.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
- }), N;
- }(l);
- return I(F.prototype, { pointArrayMap: ["low", "high"], pointValKey: "high", doQuartiles: !1 }), j.registerSeriesType("errorbar", F), F;
- }), T(d, "Series/Gauge/GaugePoint.js", [d["Core/Series/SeriesRegistry.js"]], function(l) {
- var y = this && this.__extends || function() {
- var j = function(I, Z) {
- return j = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(H, U) {
- H.__proto__ = U;
- } || function(H, U) {
- for (var F in U)
- U.hasOwnProperty(F) && (H[F] = U[F]);
- }, j(I, Z);
- };
- return function(I, Z) {
- function H() {
- this.constructor = I;
- }
- j(I, Z), I.prototype = Z === null ? Object.create(Z) : (H.prototype = Z.prototype, new H());
- };
- }();
- return function(j) {
- function I() {
- var Z = j !== null && j.apply(this, arguments) || this;
- return Z.options = void 0, Z.series = void 0, Z.shapeArgs = void 0, Z;
- }
- return y(I, j), I.prototype.setState = function(Z) {
- this.state = Z;
- }, I;
- }(l.series.prototype.pointClass);
- }), T(d, "Series/Gauge/GaugeSeries.js", [d["Series/Gauge/GaugePoint.js"], d["Core/Globals.js"], d["Core/Series/SeriesRegistry.js"], d["Core/Utilities.js"]], function(l, y, j, I) {
- var Z = this && this.__extends || function() {
- var f = function(E, O) {
- return f = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(B, M) {
- B.__proto__ = M;
- } || function(B, M) {
- for (var S in M)
- M.hasOwnProperty(S) && (B[S] = M[S]);
- }, f(E, O);
- };
- return function(E, O) {
- function B() {
- this.constructor = E;
- }
- f(E, O), E.prototype = O === null ? Object.create(O) : (B.prototype = O.prototype, new B());
- };
- }();
- y = y.noop;
- var H = j.series, U = j.seriesTypes.column, F = I.clamp, R = I.isNumber, N = I.extend, b = I.merge, x = I.pick, u = I.pInt;
- return I = function(f) {
- function E() {
- var O = f !== null && f.apply(this, arguments) || this;
- return O.data = void 0, O.points = void 0, O.options = void 0, O.yAxis = void 0, O;
- }
- return Z(E, f), E.prototype.translate = function() {
- var O = this.yAxis, B = this.options, M = O.center;
- this.generatePoints(), this.points.forEach(function(S) {
- var w = b(B.dial, S.dial), v = u(x(w.radius, "80%")) * M[2] / 200, a = u(x(w.baseLength, "70%")) * v / 100, c = u(x(w.rearLength, "10%")) * v / 100, p = w.baseWidth || 3, i = w.topWidth || 1, h = B.overshoot, s = O.startAngleRad + O.translate(S.y, null, null, null, !0);
- (R(h) || B.wrap === !1) && (h = R(h) ? h / 180 * Math.PI : 0, s = F(
- s,
- O.startAngleRad - h,
- O.endAngleRad + h
- )), s = 180 * s / Math.PI, S.shapeType = "path", S.shapeArgs = { d: w.path || [["M", -c, -p / 2], ["L", a, -p / 2], ["L", v, -i / 2], ["L", v, i / 2], ["L", a, p / 2], ["L", -c, p / 2], ["Z"]], translateX: M[0], translateY: M[1], rotation: s }, S.plotX = M[0], S.plotY = M[1];
- });
- }, E.prototype.drawPoints = function() {
- var O = this, B = O.chart, M = O.yAxis.center, S = O.pivot, w = O.options, v = w.pivot, a = B.renderer;
- O.points.forEach(function(c) {
- var p = c.graphic, i = c.shapeArgs, h = i.d, s = b(w.dial, c.dial);
- p ? (p.animate(i), i.d = h) : c.graphic = a[c.shapeType](i).attr({
- rotation: i.rotation,
- zIndex: 1
- }).addClass("highcharts-dial").add(O.group), B.styledMode || c.graphic[p ? "animate" : "attr"]({ stroke: s.borderColor || "none", "stroke-width": s.borderWidth || 0, fill: s.backgroundColor || "#000000" });
- }), S ? S.animate({ translateX: M[0], translateY: M[1] }) : (O.pivot = a.circle(0, 0, x(v.radius, 5)).attr({ zIndex: 2 }).addClass("highcharts-pivot").translate(M[0], M[1]).add(O.group), B.styledMode || O.pivot.attr({ "stroke-width": v.borderWidth || 0, stroke: v.borderColor || "#cccccc", fill: v.backgroundColor || "#000000" }));
- }, E.prototype.animate = function(O) {
- var B = this;
- O || B.points.forEach(function(M) {
- var S = M.graphic;
- S && (S.attr({ rotation: 180 * B.yAxis.startAngleRad / Math.PI }), S.animate({ rotation: M.shapeArgs.rotation }, B.options.animation));
- });
- }, E.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);
- }, E.prototype.setData = function(O, B) {
- H.prototype.setData.call(this, O, !1), this.processData(), this.generatePoints(), x(B, !0) && this.chart.redraw();
- }, E.prototype.hasData = function() {
- return !!this.points.length;
- }, E.defaultOptions = b(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 }), E;
- }(H), N(I.prototype, { angular: !0, directTouch: !0, drawGraph: y, drawTracker: U.prototype.drawTracker, fixedBox: !0, forceDL: !0, noSharedTooltip: !0, pointClass: l, trackerGroups: [
- "group",
- "dataLabelsGroup"
- ] }), j.registerSeriesType("gauge", I), I;
- }), T(d, "Series/PackedBubble/PackedBubblePoint.js", [d["Core/Chart/Chart.js"], d["Core/Series/Point.js"], d["Core/Series/SeriesRegistry.js"]], function(l, y, j) {
- var I = this && this.__extends || function() {
- var Z = function(H, U) {
- return Z = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(F, R) {
- F.__proto__ = R;
- } || function(F, R) {
- for (var N in R)
- R.hasOwnProperty(N) && (F[N] = R[N]);
- }, Z(H, U);
- };
- return function(H, U) {
- function F() {
- this.constructor = H;
- }
- Z(H, U), H.prototype = U === null ? Object.create(U) : (F.prototype = U.prototype, new F());
- };
- }();
- return function(Z) {
- function H() {
- var U = Z !== null && Z.apply(this, arguments) || this;
- return U.degree = NaN, U.mass = NaN, U.radius = NaN, U.options = void 0, U.series = void 0, U.value = null, U;
- }
- return I(H, Z), 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 U = this.series.options;
- if (this.isParentNode && U.parentNode) {
- var F = U.allowPointSelect;
- U.allowPointSelect = U.parentNode.allowPointSelect, y.prototype.firePointEvent.apply(this, arguments), U.allowPointSelect = F;
- } else
- y.prototype.firePointEvent.apply(this, arguments);
- }, H.prototype.select = function() {
- var U = this.series.chart;
- this.isParentNode ? (U.getSelectedPoints = U.getSelectedParentNodes, y.prototype.select.apply(this, arguments), U.getSelectedPoints = l.prototype.getSelectedPoints) : y.prototype.select.apply(this, arguments);
- }, H;
- }(j.seriesTypes.bubble.prototype.pointClass);
- }), T(d, "Series/Networkgraph/DraggableNodes.js", [d["Core/Chart/Chart.js"], d["Core/Globals.js"], d["Core/Utilities.js"]], function(l, y, j) {
- var I = j.addEvent;
- y.dragNodesMixin = { onMouseDown: function(Z, H) {
- H = this.chart.pointer.normalize(H), Z.fixedPosition = { chartX: H.chartX, chartY: H.chartY, plotX: Z.plotX, plotY: Z.plotY }, Z.inDragMode = !0;
- }, onMouseMove: function(Z, H) {
- if (Z.fixedPosition && Z.inDragMode) {
- var U = this.chart, F = U.pointer.normalize(H);
- H = Z.fixedPosition.chartX - F.chartX, F = Z.fixedPosition.chartY - F.chartY;
- var R = void 0, N = void 0, b = U.graphLayoutsLookup;
- (5 < Math.abs(H) || 5 < Math.abs(F)) && (R = Z.fixedPosition.plotX - H, N = Z.fixedPosition.plotY - F, U.isInsidePlot(R, N) && (Z.plotX = R, Z.plotY = N, Z.hasDragged = !0, this.redrawHalo(Z), b.forEach(function(x) {
- x.restartSimulation();
- })));
- }
- }, onMouseUp: function(Z, H) {
- Z.fixedPosition && (Z.hasDragged && (this.layout.enableSimulation ? this.layout.start() : this.chart.redraw()), Z.inDragMode = Z.hasDragged = !1, this.options.fixedDraggable || delete Z.fixedPosition);
- }, redrawHalo: function(Z) {
- Z && this.halo && this.halo.attr({ d: Z.haloPath(this.options.states.hover.halo.size) });
- } }, I(l, "load", function() {
- var Z = this, H, U, F;
- Z.container && (H = I(Z.container, "mousedown", function(R) {
- var N = Z.hoverPoint;
- N && N.series && N.series.hasDraggableNodes && N.series.options.draggable && (N.series.onMouseDown(N, R), U = I(Z.container, "mousemove", function(b) {
- return N && N.series && N.series.onMouseMove(N, b);
- }), F = I(Z.container.ownerDocument, "mouseup", function(b) {
- return U(), F(), N && N.series && N.series.onMouseUp(N, b);
- }));
- })), I(Z, "destroy", function() {
- H();
- });
- });
- }), T(
- d,
- "Series/Networkgraph/Integrations.js",
- [d["Core/Globals.js"]],
- function(l) {
- l.networkgraphIntegrations = { verlet: { attractiveForceFunction: function(y, j) {
- return (j - y) / y;
- }, repulsiveForceFunction: function(y, j) {
- return (j - y) / y * (j > y ? 1 : 0);
- }, barycenter: function() {
- var y = this.options.gravitationalConstant, j = this.barycenter.xFactor, I = this.barycenter.yFactor;
- j = (j - (this.box.left + this.box.width) / 2) * y, I = (I - (this.box.top + this.box.height) / 2) * y, this.nodes.forEach(function(Z) {
- Z.fixedPosition || (Z.plotX -= j / Z.mass / Z.degree, Z.plotY -= I / Z.mass / Z.degree);
- });
- }, repulsive: function(y, j, I) {
- j = j * this.diffTemperature / y.mass / y.degree, y.fixedPosition || (y.plotX += I.x * j, y.plotY += I.y * j);
- }, attractive: function(y, j, I) {
- var Z = y.getMass(), H = -I.x * j * this.diffTemperature;
- j = -I.y * j * this.diffTemperature, y.fromNode.fixedPosition || (y.fromNode.plotX -= H * Z.fromNode / y.fromNode.degree, y.fromNode.plotY -= j * Z.fromNode / y.fromNode.degree), y.toNode.fixedPosition || (y.toNode.plotX += H * Z.toNode / y.toNode.degree, y.toNode.plotY += j * Z.toNode / y.toNode.degree);
- }, integrate: function(y, j) {
- var I = -y.options.friction, Z = y.options.maxSpeed, H = (j.plotX + j.dispX - j.prevX) * I;
- I *= j.plotY + j.dispY - j.prevY;
- var U = Math.abs, F = U(H) / (H || 1);
- U = U(I) / (I || 1), H = F * Math.min(Z, Math.abs(H)), I = U * Math.min(Z, Math.abs(I)), j.prevX = j.plotX + j.dispX, j.prevY = j.plotY + j.dispY, j.plotX += H, j.plotY += I, j.temperature = y.vectorLength({ x: H, y: I });
- }, getK: function(y) {
- return Math.pow(y.box.width * y.box.height / y.nodes.length, 0.5);
- } }, euler: { attractiveForceFunction: function(y, j) {
- return y * y / j;
- }, repulsiveForceFunction: function(y, j) {
- return j * j / y;
- }, barycenter: function() {
- var y = this.options.gravitationalConstant, j = this.barycenter.xFactor, I = this.barycenter.yFactor;
- this.nodes.forEach(function(Z) {
- if (!Z.fixedPosition) {
- var H = Z.getDegree();
- H *= 1 + H / 2, Z.dispX += (j - Z.plotX) * y * H / Z.degree, Z.dispY += (I - Z.plotY) * y * H / Z.degree;
- }
- });
- }, repulsive: function(y, j, I, Z) {
- y.dispX += I.x / Z * j / y.degree, y.dispY += I.y / Z * j / y.degree;
- }, attractive: function(y, j, I, Z) {
- var H = y.getMass(), U = I.x / Z * j;
- j *= I.y / Z, y.fromNode.fixedPosition || (y.fromNode.dispX -= U * H.fromNode / y.fromNode.degree, y.fromNode.dispY -= j * H.fromNode / y.fromNode.degree), y.toNode.fixedPosition || (y.toNode.dispX += U * H.toNode / y.toNode.degree, y.toNode.dispY += j * H.toNode / y.toNode.degree);
- }, integrate: function(y, j) {
- j.dispX += j.dispX * y.options.friction, j.dispY += j.dispY * y.options.friction;
- var I = j.temperature = y.vectorLength({ x: j.dispX, y: j.dispY });
- I !== 0 && (j.plotX += j.dispX / I * Math.min(Math.abs(j.dispX), y.temperature), j.plotY += j.dispY / I * Math.min(Math.abs(j.dispY), y.temperature));
- }, getK: function(y) {
- return Math.pow(y.box.width * y.box.height / y.nodes.length, 0.3);
- } } };
- }
- ), T(
- d,
- "Series/Networkgraph/QuadTree.js",
- [d["Core/Globals.js"], d["Core/Utilities.js"]],
- function(l, y) {
- y = y.extend;
- var j = l.QuadTreeNode = function(I) {
- this.box = I, this.boxSize = Math.min(I.width, I.height), this.nodes = [], this.body = this.isInternal = !1, this.isEmpty = !0;
- };
- y(j.prototype, { insert: function(I, Z) {
- this.isInternal ? this.nodes[this.getBoxPosition(I)].insert(I, Z - 1) : (this.isEmpty = !1, this.body ? Z ? (this.isInternal = !0, this.divideBox(), this.body !== !0 && (this.nodes[this.getBoxPosition(this.body)].insert(this.body, Z - 1), this.body = !0), this.nodes[this.getBoxPosition(I)].insert(I, Z - 1)) : (Z = new j({
- top: I.plotX,
- left: I.plotY,
- width: 0.1,
- height: 0.1
- }), Z.body = I, Z.isInternal = !1, this.nodes.push(Z)) : (this.isInternal = !1, this.body = I));
- }, updateMassAndCenter: function() {
- var I = 0, Z = 0, H = 0;
- this.isInternal ? (this.nodes.forEach(function(U) {
- U.isEmpty || (I += U.mass, Z += U.plotX * U.mass, H += U.plotY * U.mass);
- }), Z /= I, H /= I) : this.body && (I = this.body.mass, Z = this.body.plotX, H = this.body.plotY), this.mass = I, this.plotX = Z, this.plotY = H;
- }, divideBox: function() {
- var I = this.box.width / 2, Z = this.box.height / 2;
- this.nodes[0] = new j({
- left: this.box.left,
- top: this.box.top,
- width: I,
- height: Z
- }), this.nodes[1] = new j({ left: this.box.left + I, top: this.box.top, width: I, height: Z }), this.nodes[2] = new j({ left: this.box.left + I, top: this.box.top + Z, width: I, height: Z }), this.nodes[3] = new j({ left: this.box.left, top: this.box.top + Z, width: I, height: Z });
- }, getBoxPosition: function(I) {
- var Z = I.plotY < this.box.top + this.box.height / 2;
- return I.plotX < this.box.left + this.box.width / 2 ? Z ? 0 : 3 : Z ? 1 : 2;
- } }), l = l.QuadTree = function(I, Z, H, U) {
- this.box = { left: I, top: Z, width: H, height: U }, this.maxDepth = 25, this.root = new j(
- this.box,
- "0"
- ), this.root.isInternal = !0, this.root.isRoot = !0, this.root.divideBox();
- }, y(l.prototype, { insertNodes: function(I) {
- I.forEach(function(Z) {
- this.root.insert(Z, this.maxDepth);
- }, this);
- }, visitNodeRecursive: function(I, Z, H) {
- var U;
- I || (I = this.root), I === this.root && Z && (U = Z(I)), U !== !1 && (I.nodes.forEach(function(F) {
- if (F.isInternal) {
- if (Z && (U = Z(F)), U === !1)
- return;
- this.visitNodeRecursive(F, Z, H);
- } else
- F.body && Z && Z(F.body);
- H && H(F);
- }, this), I === this.root && H && H(I));
- }, calculateMassAndCenter: function() {
- this.visitNodeRecursive(
- null,
- null,
- function(I) {
- I.updateMassAndCenter();
- }
- );
- } });
- }
- ), T(d, "Series/Networkgraph/Layouts.js", [d["Core/Chart/Chart.js"], d["Core/Animation/AnimationUtilities.js"], d["Core/Globals.js"], d["Core/Utilities.js"]], function(l, y, j, I) {
- var Z = y.setAnimation;
- y = I.addEvent;
- var H = I.clamp, U = I.defined, F = I.extend, R = I.isFunction, N = I.pick;
- j.layouts = { "reingold-fruchterman": function() {
- } }, F(j.layouts["reingold-fruchterman"].prototype, {
- init: function(b) {
- this.options = b, this.nodes = [], this.links = [], this.series = [], this.box = {
- x: 0,
- y: 0,
- width: 0,
- height: 0
- }, this.setInitialRendering(!0), this.integration = j.networkgraphIntegrations[b.integration], this.enableSimulation = b.enableSimulation, this.attractiveForce = N(b.attractiveForce, this.integration.attractiveForceFunction), this.repulsiveForce = N(b.repulsiveForce, this.integration.repulsiveForceFunction), this.approximation = b.approximation;
- },
- updateSimulation: function(b) {
- this.enableSimulation = N(b, this.options.enableSimulation);
- },
- start: function() {
- var b = this.series, x = this.options;
- this.currentStep = 0, this.forces = b[0] && b[0].forces || [], this.chart = b[0] && b[0].chart, this.initialRendering && (this.initPositions(), b.forEach(function(u) {
- u.finishedAnimating = !0, u.render();
- })), this.setK(), this.resetSimulation(x), this.enableSimulation && this.step();
- },
- step: function() {
- var b = this, x = this.series;
- b.currentStep++, b.approximation === "barnes-hut" && (b.createQuadTree(), b.quadTree.calculateMassAndCenter()), b.forces.forEach(function(u) {
- b[u + "Forces"](b.temperature);
- }), b.applyLimits(b.temperature), b.temperature = b.coolDown(
- b.startTemperature,
- b.diffTemperature,
- b.currentStep
- ), b.prevSystemTemperature = b.systemTemperature, b.systemTemperature = b.getSystemTemperature(), b.enableSimulation && (x.forEach(function(u) {
- u.chart && u.render();
- }), b.maxIterations-- && isFinite(b.temperature) && !b.isStable() ? (b.simulation && j.win.cancelAnimationFrame(b.simulation), b.simulation = j.win.requestAnimationFrame(function() {
- b.step();
- })) : b.simulation = !1);
- },
- stop: function() {
- this.simulation && j.win.cancelAnimationFrame(this.simulation);
- },
- setArea: function(b, x, u, f) {
- this.box = {
- left: b,
- top: x,
- width: u,
- height: f
- };
- },
- setK: function() {
- this.k = this.options.linkLength || this.integration.getK(this);
- },
- addElementsToCollection: function(b, x) {
- b.forEach(function(u) {
- x.indexOf(u) === -1 && x.push(u);
- });
- },
- removeElementFromCollection: function(b, x) {
- b = x.indexOf(b), b !== -1 && x.splice(b, 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(b) {
- this.maxIterations = N(b, 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(b) {
- this.initialRendering = b;
- },
- createQuadTree: function() {
- this.quadTree = new j.QuadTree(this.box.left, this.box.top, this.box.width, this.box.height), this.quadTree.insertNodes(this.nodes);
- },
- initPositions: function() {
- var b = this.options.initialPositions;
- R(b) ? (b.call(this), this.nodes.forEach(function(x) {
- U(x.prevX) || (x.prevX = x.plotX), U(x.prevY) || (x.prevY = x.plotY), x.dispX = 0, x.dispY = 0;
- })) : b === "circle" ? this.setCircularPositions() : this.setRandomPositions();
- },
- setCircularPositions: function() {
- function b(S) {
- S.linksFrom.forEach(function(w) {
- B[w.toNode.id] || (B[w.toNode.id] = !0, O.push(w.toNode), b(w.toNode));
- });
- }
- var x = this.box, u = this.nodes, f = 2 * Math.PI / (u.length + 1), E = u.filter(function(S) {
- return S.linksTo.length === 0;
- }), O = [], B = {}, M = this.options.initialPositionRadius;
- E.forEach(function(S) {
- O.push(S), b(S);
- }), O.length ? u.forEach(function(S) {
- O.indexOf(S) === -1 && O.push(S);
- }) : O = u, O.forEach(function(S, w) {
- S.plotX = S.prevX = N(S.plotX, x.width / 2 + M * Math.cos(w * f)), S.plotY = S.prevY = N(S.plotY, x.height / 2 + M * Math.sin(w * f)), S.dispX = 0, S.dispY = 0;
- });
- },
- setRandomPositions: function() {
- function b(E) {
- return E = E * E / Math.PI, E -= Math.floor(E);
- }
- var x = this.box, u = this.nodes, f = u.length + 1;
- u.forEach(function(E, O) {
- E.plotX = E.prevX = N(E.plotX, x.width * b(O)), E.plotY = E.prevY = N(E.plotY, x.height * b(f + O)), E.dispX = 0, E.dispY = 0;
- });
- },
- force: function(b) {
- this.integration[b].apply(this, Array.prototype.slice.call(arguments, 1));
- },
- barycenterForces: function() {
- this.getBarycenter(), this.force("barycenter");
- },
- getBarycenter: function() {
- var b = 0, x = 0, u = 0;
- return this.nodes.forEach(function(f) {
- x += f.plotX * f.mass, u += f.plotY * f.mass, b += f.mass;
- }), this.barycenter = { x, y: u, xFactor: x / b, yFactor: u / b };
- },
- barnesHutApproximation: function(b, x) {
- var u = this.getDistXY(b, x), f = this.vectorLength(u);
- if (b !== x && f !== 0)
- if (x.isInternal)
- if (x.boxSize / f < this.options.theta && f !== 0) {
- var E = this.repulsiveForce(f, this.k);
- this.force("repulsive", b, E * x.mass, u, f);
- var O = !1;
- } else
- O = !0;
- else
- E = this.repulsiveForce(f, this.k), this.force("repulsive", b, E * x.mass, u, f);
- return O;
- },
- repulsiveForces: function() {
- var b = this;
- b.approximation === "barnes-hut" ? b.nodes.forEach(function(x) {
- b.quadTree.visitNodeRecursive(
- null,
- function(u) {
- return b.barnesHutApproximation(x, u);
- }
- );
- }) : b.nodes.forEach(function(x) {
- b.nodes.forEach(function(u) {
- if (x !== u && !x.fixedPosition) {
- var f = b.getDistXY(x, u), E = b.vectorLength(f);
- if (E !== 0) {
- var O = b.repulsiveForce(E, b.k);
- b.force("repulsive", x, O * u.mass, f, E);
- }
- }
- });
- });
- },
- attractiveForces: function() {
- var b = this, x, u, f;
- b.links.forEach(function(E) {
- E.fromNode && E.toNode && (x = b.getDistXY(E.fromNode, E.toNode), u = b.vectorLength(x), u !== 0 && (f = b.attractiveForce(u, b.k), b.force("attractive", E, f, x, u)));
- });
- },
- applyLimits: function() {
- var b = this;
- b.nodes.forEach(function(x) {
- x.fixedPosition || (b.integration.integrate(b, x), b.applyLimitBox(x, b.box), x.dispX = 0, x.dispY = 0);
- });
- },
- applyLimitBox: function(b, x) {
- var u = b.radius;
- b.plotX = H(b.plotX, x.left + u, x.width - u), b.plotY = H(b.plotY, x.top + u, x.height - u);
- },
- coolDown: function(b, x, u) {
- return b - x * u;
- },
- isStable: function() {
- return 1e-5 > Math.abs(this.systemTemperature - this.prevSystemTemperature) || 0 >= this.temperature;
- },
- getSystemTemperature: function() {
- return this.nodes.reduce(function(b, x) {
- return b + x.temperature;
- }, 0);
- },
- vectorLength: function(b) {
- return Math.sqrt(b.x * b.x + b.y * b.y);
- },
- getDistR: function(b, x) {
- return b = this.getDistXY(b, x), this.vectorLength(b);
- },
- getDistXY: function(b, x) {
- var u = b.plotX - x.plotX;
- return b = b.plotY - x.plotY, { x: u, y: b, absX: Math.abs(u), absY: Math.abs(b) };
- }
- }), y(l, "predraw", function() {
- this.graphLayoutsLookup && this.graphLayoutsLookup.forEach(function(b) {
- b.stop();
- });
- }), y(l, "render", function() {
- function b(f) {
- f.maxIterations-- && isFinite(f.temperature) && !f.isStable() && !f.enableSimulation && (f.beforeStep && f.beforeStep(), f.step(), u = !1, x = !0);
- }
- var x = !1;
- if (this.graphLayoutsLookup) {
- for (Z(!1, this), this.graphLayoutsLookup.forEach(function(f) {
- f.start();
- }); !u; ) {
- var u = !0;
- this.graphLayoutsLookup.forEach(b);
- }
- x && this.series.forEach(function(f) {
- f && f.layout && f.render();
- });
- }
- }), y(l, "beforePrint", function() {
- this.graphLayoutsLookup && (this.graphLayoutsLookup.forEach(function(b) {
- b.updateSimulation(!1);
- }), this.redraw());
- }), y(l, "afterPrint", function() {
- this.graphLayoutsLookup && this.graphLayoutsLookup.forEach(function(b) {
- b.updateSimulation();
- }), this.redraw();
- });
- }), T(d, "Series/PackedBubble/PackedBubbleComposition.js", [d["Core/Chart/Chart.js"], d["Core/Globals.js"], d["Core/Utilities.js"]], function(l, y, j) {
- var I = y.layouts["reingold-fruchterman"], Z = j.addEvent, H = j.extendClass, U = j.pick;
- l.prototype.getSelectedParentNodes = function() {
- var F = [];
- return this.series.forEach(function(R) {
- R.parentNode && R.parentNode.selected && F.push(R.parentNode);
- }), F;
- }, y.networkgraphIntegrations.packedbubble = { repulsiveForceFunction: function(F, R, N, b) {
- return Math.min(F, (N.marker.radius + b.marker.radius) / 2);
- }, barycenter: function() {
- var F = this, R = F.options.gravitationalConstant, N = F.box, b = F.nodes, x, u;
- b.forEach(function(f) {
- F.options.splitSeries && !f.isParentNode ? (x = f.series.parentNode.plotX, u = f.series.parentNode.plotY) : (x = N.width / 2, u = N.height / 2), f.fixedPosition || (f.plotX -= (f.plotX - x) * R / (f.mass * Math.sqrt(b.length)), f.plotY -= (f.plotY - u) * R / (f.mass * Math.sqrt(b.length)));
- });
- }, repulsive: function(F, R, N, b) {
- var x = R * this.diffTemperature / F.mass / F.degree;
- R = N.x * x, N = N.y * x, F.fixedPosition || (F.plotX += R, F.plotY += N), b.fixedPosition || (b.plotX -= R, b.plotY -= N);
- }, integrate: y.networkgraphIntegrations.verlet.integrate, getK: y.noop }, y.layouts.packedbubble = H(I, { beforeStep: function() {
- this.options.marker && this.series.forEach(function(F) {
- F && F.calculateParentRadius();
- });
- }, isStable: function() {
- var F = Math.abs(this.prevSystemTemperature - this.systemTemperature);
- return 1 > Math.abs(10 * this.systemTemperature / Math.sqrt(this.nodes.length)) && 1e-5 > F || 0 >= this.temperature;
- }, setCircularPositions: function() {
- var F = this, R = F.box, N = F.nodes, b = 2 * Math.PI / (N.length + 1), x, u, f = F.options.initialPositionRadius;
- N.forEach(function(E, O) {
- F.options.splitSeries && !E.isParentNode ? (x = E.series.parentNode.plotX, u = E.series.parentNode.plotY) : (x = R.width / 2, u = R.height / 2), E.plotX = E.prevX = U(E.plotX, x + f * Math.cos(E.index || O * b)), E.plotY = E.prevY = U(E.plotY, u + f * Math.sin(E.index || O * b)), E.dispX = 0, E.dispY = 0;
- });
- }, repulsiveForces: function() {
- var F = this, R, N, b, x = F.options.bubblePadding;
- F.nodes.forEach(function(u) {
- u.degree = u.mass, u.neighbours = 0, F.nodes.forEach(function(f) {
- R = 0, u === f || u.fixedPosition || !F.options.seriesInteraction && u.series !== f.series || (b = F.getDistXY(u, f), N = F.vectorLength(b) - (u.marker.radius + f.marker.radius + x), 0 > N && (u.degree += 0.01, u.neighbours++, R = F.repulsiveForce(-N / Math.sqrt(u.neighbours), F.k, u, f)), F.force("repulsive", u, R * f.mass, b, f, N));
- });
- });
- }, applyLimitBox: function(F) {
- if (this.options.splitSeries && !F.isParentNode && this.options.parentNodeLimit) {
- var R = this.getDistXY(F, F.series.parentNode), N = F.series.parentNodeRadius - F.marker.radius - this.vectorLength(R);
- 0 > N && N > -2 * F.marker.radius && (F.plotX -= 0.01 * R.x, F.plotY -= 0.01 * R.y);
- }
- I.prototype.applyLimitBox.apply(this, arguments);
- } }), Z(l, "beforeRedraw", function() {
- this.allDataPoints && delete this.allDataPoints;
- });
- }), T(d, "Series/PackedBubble/PackedBubbleSeries.js", [d["Core/Color/Color.js"], d["Core/Globals.js"], d["Series/PackedBubble/PackedBubblePoint.js"], d["Core/Series/SeriesRegistry.js"], d["Core/Utilities.js"]], function(l, y, j, I, Z) {
- var H = this && this.__extends || function() {
- var w = function(v, a) {
- return w = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(c, p) {
- c.__proto__ = p;
- } || function(c, p) {
- for (var i in p)
- p.hasOwnProperty(i) && (c[i] = p[i]);
- }, w(v, a);
- };
- return function(v, a) {
- function c() {
- this.constructor = v;
- }
- w(v, a), v.prototype = a === null ? Object.create(a) : (c.prototype = a.prototype, new c());
- };
- }(), U = l.parse, F = I.series, R = I.seriesTypes.bubble, N = Z.addEvent, b = Z.clamp, x = Z.defined, u = Z.extend, f = Z.fireEvent, E = Z.isArray, O = Z.isNumber, B = Z.merge, M = Z.pick, S = y.dragNodesMixin;
- return l = function(w) {
- function v() {
- var a = w !== null && w.apply(this, arguments) || this;
- return a.chart = void 0, a.data = void 0, a.layout = void 0, a.options = void 0, a.points = void 0, a.xData = void 0, a;
- }
- return H(v, w), v.prototype.accumulateAllPoints = function(a) {
- var c = a.chart, p = [], i, h;
- for (i = 0; i < c.series.length; i++)
- if (a = c.series[i], a.is("packedbubble") && a.visible || !c.options.chart.ignoreHiddenSeries)
- for (h = 0; h < a.yData.length; h++)
- p.push([null, null, a.yData[h], a.index, h, { id: h, marker: { radius: 0 } }]);
- return p;
- }, v.prototype.addLayout = function() {
- var a = this.options.layoutAlgorithm, c = this.chart.graphLayoutsStorage, p = this.chart.graphLayoutsLookup, i = this.chart.options.chart;
- c || (this.chart.graphLayoutsStorage = c = {}, this.chart.graphLayoutsLookup = p = []);
- var h = c[a.type];
- h || (a.enableSimulation = x(i.forExport) ? !i.forExport : a.enableSimulation, c[a.type] = h = new y.layouts[a.type](), h.init(a), p.splice(h.index, 0, h)), this.layout = h, this.points.forEach(function(s) {
- s.mass = 2, s.degree = 1, s.collisionNmb = 1;
- }), h.setArea(0, 0, this.chart.plotWidth, this.chart.plotHeight), h.addElementsToCollection([this], h.series), h.addElementsToCollection(this.points, h.nodes);
- }, v.prototype.addSeriesLayout = function() {
- var a = this.options.layoutAlgorithm, c = this.chart.graphLayoutsStorage, p = this.chart.graphLayoutsLookup, i = B(a, a.parentNodeOptions, { enableSimulation: this.layout.options.enableSimulation }), h = c[a.type + "-series"];
- h || (c[a.type + "-series"] = h = new y.layouts[a.type](), h.init(i), p.splice(h.index, 0, h)), this.parentNodeLayout = h, this.createParentNodes();
- }, v.prototype.calculateParentRadius = function() {
- var a = this.seriesBox();
- this.parentNodeRadius = b(Math.sqrt(2 * this.parentNodeMass / Math.PI) + 20, 20, a ? Math.max(Math.sqrt(Math.pow(
- a.width,
- 2
- ) + Math.pow(a.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 a = this.options.zMin, c = this.options.zMax, p = 1 / 0, i = -1 / 0;
- return a && c ? [a, c] : (this.chart.series.forEach(function(h) {
- h.yData.forEach(function(s) {
- x(s) && (s > i && (i = s), s < p && (p = s));
- });
- }), a = M(a, p), c = M(c, i), [a, c]);
- }, v.prototype.checkOverlap = function(a, c) {
- var p = a[0] - c[0], i = a[1] - c[1];
- return -1e-3 > Math.sqrt(p * p + i * i) - Math.abs(a[2] + c[2]);
- }, v.prototype.createParentNodes = function() {
- var a = this, c = a.chart, p = a.parentNodeLayout, i, h = a.parentNode, s = a.pointClass, t = a.layout.options, o = { radius: a.parentNodeRadius, lineColor: a.color, fillColor: U(a.color).brighten(0.4).get() };
- t.parentNodeOptions && (o = B(t.parentNodeOptions.marker || {}, o)), a.parentNodeMass = 0, a.points.forEach(function(n) {
- a.parentNodeMass += Math.PI * Math.pow(n.marker.radius, 2);
- }), a.calculateParentRadius(), p.nodes.forEach(function(n) {
- n.seriesIndex === a.index && (i = !0);
- }), p.setArea(0, 0, c.plotWidth, c.plotHeight), i || (h || (h = new s().init(this, { mass: a.parentNodeRadius / 2, marker: o, dataLabels: { inside: !1 }, states: { normal: { marker: o }, hover: { marker: o } }, dataLabelOnNull: !0, degree: a.parentNodeRadius, isParentNode: !0, seriesIndex: a.index })), a.parentNode && (h.plotX = a.parentNode.plotX, h.plotY = a.parentNode.plotY), a.parentNode = h, p.addElementsToCollection([a], p.series), p.addElementsToCollection([h], p.nodes));
- }, v.prototype.deferLayout = function() {
- var a = this.options.layoutAlgorithm;
- this.visible && (this.addLayout(), a.splitSeries && this.addSeriesLayout());
- }, v.prototype.destroy = function() {
- this.chart.graphLayoutsLookup && this.chart.graphLayoutsLookup.forEach(function(a) {
- a.removeElementFromCollection(this, a.series);
- }, this), this.parentNode && this.parentNodeLayout && (this.parentNodeLayout.removeElementFromCollection(this.parentNode, this.parentNodeLayout.nodes), this.parentNode.dataLabel && (this.parentNode.dataLabel = this.parentNode.dataLabel.destroy())), F.prototype.destroy.apply(this, arguments);
- }, v.prototype.drawDataLabels = function() {
- var a = this.options.dataLabels.textPath, c = this.points;
- F.prototype.drawDataLabels.apply(this, arguments), this.parentNode && (this.parentNode.formatPrefix = "parentNode", this.points = [this.parentNode], this.options.dataLabels.textPath = this.options.dataLabels.parentNodeTextPath, F.prototype.drawDataLabels.apply(this, arguments), this.points = c, this.options.dataLabels.textPath = a);
- }, v.prototype.drawGraph = function() {
- if (this.layout && this.layout.options.splitSeries) {
- var a = this.chart, c = this.layout.options.parentNodeOptions.marker, p = { fill: c.fillColor || U(this.color).brighten(0.4).get(), opacity: c.fillOpacity, stroke: c.lineColor || this.color, "stroke-width": M(c.lineWidth, this.options.lineWidth) };
- this.parentNodesGroup || (this.parentNodesGroup = this.plotGroup("parentNodesGroup", "parentNode", this.visible ? "inherit" : "hidden", 0.1, a.seriesGroup), this.group.attr({ zIndex: 2 })), this.calculateParentRadius(), c = B({
- x: this.parentNode.plotX - this.parentNodeRadius,
- y: this.parentNode.plotY - this.parentNodeRadius,
- width: 2 * this.parentNodeRadius,
- height: 2 * this.parentNodeRadius
- }, p), this.parentNode.graphic || (this.graph = this.parentNode.graphic = a.renderer.symbol(p.symbol).add(this.parentNodesGroup)), this.parentNode.graphic.attr(c);
- }
- }, v.prototype.drawTracker = function() {
- var a = this.parentNode;
- if (w.prototype.drawTracker.call(this), a) {
- var c = E(a.dataLabels) ? a.dataLabels : a.dataLabel ? [a.dataLabel] : [];
- a.graphic && (a.graphic.element.point = a), c.forEach(function(p) {
- p.div ? p.div.point = a : p.element.point = a;
- });
- }
- }, v.prototype.getPointRadius = function() {
- var a = this, c = a.chart, p = a.options, i = p.useSimulation, h = Math.min(c.plotWidth, c.plotHeight), s = {}, t = [], o = c.allDataPoints, n, A, _, D;
- ["minSize", "maxSize"].forEach(function(P) {
- var X = parseInt(p[P], 10), g = /%$/.test(p[P]);
- s[P] = g ? h * X / 100 : X * Math.sqrt(o.length);
- }), c.minRadius = n = s.minSize / Math.sqrt(o.length), c.maxRadius = A = s.maxSize / Math.sqrt(o.length);
- var W = i ? a.calculateZExtremes() : [n, A];
- (o || []).forEach(function(P, X) {
- _ = i ? b(P[2], W[0], W[1]) : P[2], D = a.getRadius(W[0], W[1], n, A, _), D === 0 && (D = null), o[X][2] = D, t.push(D);
- }), a.radii = t;
- }, v.prototype.init = function() {
- return F.prototype.init.apply(this, arguments), this.eventsToUnbind.push(N(this, "updatedData", function() {
- this.chart.series.forEach(function(a) {
- a.type === this.type && (a.isDirty = !0);
- }, this);
- })), this;
- }, v.prototype.onMouseUp = function(a) {
- if (a.fixedPosition && !a.removed) {
- var c, p, i = this.layout, h = this.parentNodeLayout;
- h && i.options.dragBetweenSeries && h.nodes.forEach(function(s) {
- a && a.marker && s !== a.series.parentNode && (c = i.getDistXY(a, s), p = i.vectorLength(c) - s.marker.radius - a.marker.radius, 0 > p && (s.series.addPoint(B(a.options, { plotX: a.plotX, plotY: a.plotY }), !1), i.removeElementFromCollection(a, i.nodes), a.remove()));
- }), S.onMouseUp.apply(this, arguments);
- }
- }, v.prototype.placeBubbles = function(a) {
- var c = this.checkOverlap, p = this.positionBubble, i = [], h = 1, s = 0, t = 0, o = [], n;
- if (a = a.sort(function(A, _) {
- return _[2] - A[2];
- }), a.length) {
- if (i.push([[0, 0, a[0][2], a[0][3], a[0][4]]]), 1 < a.length)
- for (i.push([[0, 0 - a[1][2] - a[0][2], a[1][2], a[1][3], a[1][4]]]), n = 2; n < a.length; n++)
- a[n][2] = a[n][2] || 1, o = p(i[h][s], i[h - 1][t], a[n]), c(o, i[h][0]) ? (i.push([]), t = 0, i[h + 1].push(p(i[h][s], i[h][0], a[n])), h++, s = 0) : 1 < h && i[h - 1][t + 1] && c(o, i[h - 1][t + 1]) ? (t++, i[h].push(p(i[h][s], i[h - 1][t], a[n])), s++) : (s++, i[h].push(o));
- this.chart.stages = i, this.chart.rawPositions = [].concat.apply([], i), this.resizeRadius(), o = this.chart.rawPositions;
- }
- return o;
- }, v.prototype.pointAttribs = function(a, c) {
- var p = this.options, i = p.marker;
- return a && a.isParentNode && p.layoutAlgorithm && p.layoutAlgorithm.parentNodeOptions && (i = p.layoutAlgorithm.parentNodeOptions.marker), p = i.fillOpacity, a = F.prototype.pointAttribs.call(this, a, c), p !== 1 && (a["fill-opacity"] = p), a;
- }, v.prototype.positionBubble = function(a, c, p) {
- var i = Math.sqrt, h = Math.asin, s = Math.acos, t = Math.pow, o = Math.abs;
- return i = i(t(a[0] - c[0], 2) + t(a[1] - c[1], 2)), s = s((t(i, 2) + t(p[2] + c[2], 2) - t(p[2] + a[2], 2)) / (2 * (p[2] + c[2]) * i)), h = h(o(a[0] - c[0]) / i), a = (0 > a[1] - c[1] ? 0 : Math.PI) + s + h * (0 > (a[0] - c[0]) * (a[1] - c[1]) ? 1 : -1), [c[0] + (c[2] + p[2]) * Math.sin(a), c[1] - (c[2] + p[2]) * Math.cos(a), p[2], p[3], p[4]];
- }, v.prototype.render = function() {
- var a = [];
- F.prototype.render.apply(this, arguments), this.options.dataLabels.allowOverlap || (this.data.forEach(function(c) {
- E(c.dataLabels) && c.dataLabels.forEach(function(p) {
- a.push(p);
- });
- }), this.options.useSimulation && this.chart.hideOverlappingLabels(a));
- }, v.prototype.resizeRadius = function() {
- var a = this.chart, c = a.rawPositions, p = Math.min, i = Math.max, h = a.plotLeft, s = a.plotTop, t = a.plotHeight, o = a.plotWidth, n, A, _, D = n = Number.POSITIVE_INFINITY, W = A = Number.NEGATIVE_INFINITY;
- for (_ = 0; _ < c.length; _++) {
- var P = c[_][2];
- D = p(
- D,
- c[_][0] - P
- ), W = i(W, c[_][0] + P), n = p(n, c[_][1] - P), A = i(A, c[_][1] + P);
- }
- if (_ = [W - D, A - n], p = p.apply([], [(o - h) / _[0], (t - s) / _[1]]), 1e-10 < Math.abs(p - 1)) {
- for (_ = 0; _ < c.length; _++)
- c[_][2] *= p;
- this.placeBubbles(c);
- } else
- a.diffY = t / 2 + s - n - (A - n) / 2, a.diffX = o / 2 + h - D - (W - D) / 2;
- }, v.prototype.seriesBox = function() {
- var a = this.chart, c = Math.max, p = Math.min, i, h = [a.plotLeft, a.plotLeft + a.plotWidth, a.plotTop, a.plotTop + a.plotHeight];
- return this.data.forEach(function(s) {
- x(s.plotX) && x(s.plotY) && s.marker.radius && (i = s.marker.radius, h[0] = p(h[0], s.plotX - i), h[1] = c(h[1], s.plotX + i), h[2] = p(h[2], s.plotY - i), h[3] = c(h[3], s.plotY + i));
- }), O(h.width / h.height) ? h : null;
- }, v.prototype.setVisible = function() {
- var a = this;
- F.prototype.setVisible.apply(a, arguments), a.parentNodeLayout && a.graph ? a.visible ? (a.graph.show(), a.parentNode.dataLabel && a.parentNode.dataLabel.show()) : (a.graph.hide(), a.parentNodeLayout.removeElementFromCollection(a.parentNode, a.parentNodeLayout.nodes), a.parentNode.dataLabel && a.parentNode.dataLabel.hide()) : a.layout && (a.visible ? a.layout.addElementsToCollection(
- a.points,
- a.layout.nodes
- ) : a.points.forEach(function(c) {
- a.layout.removeElementFromCollection(c, a.layout.nodes);
- }));
- }, v.prototype.translate = function() {
- var a = this.chart, c = this.data, p = this.index, i, h = this.options.useSimulation;
- if (this.processedXData = this.xData, this.generatePoints(), x(a.allDataPoints) || (a.allDataPoints = this.accumulateAllPoints(this), this.getPointRadius()), h)
- var s = a.allDataPoints;
- else
- s = this.placeBubbles(a.allDataPoints), this.options.draggable = !1;
- for (i = 0; i < s.length; i++)
- if (s[i][3] === p) {
- var t = c[s[i][4]], o = M(s[i][2], void 0);
- h || (t.plotX = s[i][0] - a.plotLeft + a.diffX, t.plotY = s[i][1] - a.plotTop + a.diffY), O(o) && (t.marker = u(t.marker, { radius: o, width: 2 * o, height: 2 * o }), t.radius = o);
- }
- h && this.deferLayout(), f(this, "afterTranslate");
- }, v.defaultOptions = B(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 a = this.series.chart.numberFormatter, c = this.point.value;
- return O(c) ? a(c, -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), u(l.prototype, {
- alignDataLabel: F.prototype.alignDataLabel,
- axisTypes: [],
- directTouch: !0,
- forces: ["barycenter", "repulsive"],
- hasDraggableNodes: !0,
- isCartesian: !1,
- noSharedTooltip: !0,
- onMouseDown: S.onMouseDown,
- onMouseMove: S.onMouseMove,
- pointArrayMap: ["value"],
- pointClass: j,
- pointValKey: "value",
- redrawHalo: S.redrawHalo,
- requireSorting: !1,
- searchPoint: y.noop,
- trackerGroups: ["group", "dataLabelsGroup", "parentNodesGroup"]
- }), I.registerSeriesType("packedbubble", l), l;
- }), T(d, "Series/Polygon/PolygonSeries.js", [d["Core/Globals.js"], d["Core/Legend/LegendSymbol.js"], d["Core/Series/SeriesRegistry.js"], d["Core/Utilities.js"]], function(l, y, j, I) {
- var Z = this && this.__extends || function() {
- var x = function(u, f) {
- return x = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(E, O) {
- E.__proto__ = O;
- } || function(E, O) {
- for (var B in O)
- O.hasOwnProperty(B) && (E[B] = O[B]);
- }, x(u, f);
- };
- return function(u, f) {
- function E() {
- this.constructor = u;
- }
- x(u, f), u.prototype = f === null ? Object.create(f) : (E.prototype = f.prototype, new E());
- };
- }();
- l = l.noop;
- var H = j.series, U = j.seriesTypes, F = U.area, R = U.line, N = U.scatter;
- U = I.extend;
- var b = I.merge;
- return I = function(x) {
- function u() {
- var f = x !== null && x.apply(this, arguments) || this;
- return f.data = void 0, f.options = void 0, f.points = void 0, f;
- }
- return Z(u, x), u.prototype.getGraphPath = function() {
- for (var f = R.prototype.getGraphPath.call(this), E = f.length + 1; E--; )
- (E === f.length || f[E][0] === "M") && 0 < E && f.splice(E, 0, ["Z"]);
- return this.areaPath = f;
- }, u.prototype.drawGraph = function() {
- this.options.fillColor = this.color, F.prototype.drawGraph.call(this);
- }, u.defaultOptions = b(N.defaultOptions, { marker: { enabled: !1, states: { hover: { enabled: !1 } } }, stickyTracking: !1, tooltip: { followPointer: !0, pointFormat: "" }, trackByArea: !0 }), u;
- }(N), U(I.prototype, { type: "polygon", drawLegendSymbol: y.drawRectangle, drawTracker: H.prototype.drawTracker, setStackedPoints: l }), j.registerSeriesType("polygon", I), I;
- }), T(d, "Core/Axis/WaterfallAxis.js", [d["Extensions/Stacking.js"], d["Core/Utilities.js"]], function(l, y) {
- var j = y.addEvent, I = y.objectEach, Z;
- return function(H) {
- function U() {
- var x = this.waterfall.stacks;
- x && (x.changed = !1, delete x.alreadyChanged);
- }
- function F() {
- var x = this.options.stackLabels;
- x && x.enabled && this.waterfall.stacks && this.waterfall.renderStackTotals();
- }
- function R() {
- for (var x = this.axes, u = this.series, f = u.length; f--; )
- u[f].options.stacking && (x.forEach(function(E) {
- E.isXAxis || (E.waterfall.stacks.changed = !0);
- }), f = 0);
- }
- function N() {
- this.waterfall || (this.waterfall = new b(this));
- }
- var b = function() {
- function x(u) {
- this.axis = u, this.stacks = { changed: !1 };
- }
- return x.prototype.renderStackTotals = function() {
- var u = this.axis, f = u.waterfall.stacks, E = u.stacking && u.stacking.stackTotalGroup, O = new l(u, u.options.stackLabels, !1, 0, void 0);
- this.dummyStackItem = O, I(f, function(B) {
- I(B, function(M) {
- O.total = M.stackTotal, M.label && (O.label = M.label), l.prototype.render.call(O, E), M.label = O.label, delete O.label;
- });
- }), O.total = null;
- }, x;
- }();
- H.Composition = b, H.compose = function(x, u) {
- j(x, "init", N), j(x, "afterBuildStacks", U), j(x, "afterRender", F), j(u, "beforeRedraw", R);
- };
- }(Z || (Z = {})), Z;
- }), T(d, "Series/Waterfall/WaterfallPoint.js", [d["Series/Column/ColumnSeries.js"], d["Core/Series/Point.js"], d["Core/Utilities.js"]], function(l, y, j) {
- var I = this && this.__extends || function() {
- var H = function(U, F) {
- return H = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(R, N) {
- R.__proto__ = N;
- } || function(R, N) {
- for (var b in N)
- N.hasOwnProperty(b) && (R[b] = N[b]);
- }, H(U, F);
- };
- return function(U, F) {
- function R() {
- this.constructor = U;
- }
- H(U, F), U.prototype = F === null ? Object.create(F) : (R.prototype = F.prototype, new R());
- };
- }(), Z = j.isNumber;
- return function(H) {
- function U() {
- var F = H !== null && H.apply(this, arguments) || this;
- return F.options = void 0, F.series = void 0, F;
- }
- return I(U, H), U.prototype.getClassName = function() {
- var F = y.prototype.getClassName.call(this);
- return this.isSum ? F += " highcharts-sum" : this.isIntermediateSum && (F += " highcharts-intermediate-sum"), F;
- }, U.prototype.isValid = function() {
- return Z(this.y) || this.isSum || !!this.isIntermediateSum;
- }, U;
- }(l.prototype.pointClass);
- }), T(d, "Series/Waterfall/WaterfallSeries.js", [d["Core/Axis/Axis.js"], d["Core/Chart/Chart.js"], d["Core/Series/SeriesRegistry.js"], d["Core/Utilities.js"], d["Core/Axis/WaterfallAxis.js"], d["Series/Waterfall/WaterfallPoint.js"]], function(l, y, j, I, Z, H) {
- var U = this && this.__extends || function() {
- var M = function(S, w) {
- return M = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(v, a) {
- v.__proto__ = a;
- } || function(v, a) {
- for (var c in a)
- a.hasOwnProperty(c) && (v[c] = a[c]);
- }, M(S, w);
- };
- return function(S, w) {
- function v() {
- this.constructor = S;
- }
- M(S, w), S.prototype = w === null ? Object.create(w) : (v.prototype = w.prototype, new v());
- };
- }(), F = j.seriesTypes, R = F.column, N = F.line, b = I.arrayMax, x = I.arrayMin, u = I.correctFloat;
- F = I.extend;
- var f = I.isNumber, E = I.merge, O = I.objectEach, B = I.pick;
- return I = function(M) {
- function S() {
- var w = M !== null && M.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 U(S, M), S.prototype.generatePoints = function() {
- var w;
- R.prototype.generatePoints.apply(this);
- var v = 0;
- for (w = this.points.length; v < w; v++) {
- var a = this.points[v], c = this.processedYData[v];
- (a.isIntermediateSum || a.isSum) && (a.y = u(c));
- }
- }, S.prototype.translate = function() {
- var w = this.options, v = this.yAxis, a = B(w.minPointLength, 5), c = a / 2, p = w.threshold || 0, i = p, h = p;
- w = w.stacking;
- var s = v.waterfall.stacks[this.stackKey];
- R.prototype.translate.apply(this);
- for (var t = this.points, o = 0; o < t.length; o++) {
- var n = t[o], A = this.processedYData[o], _ = n.shapeArgs;
- if (_ && f(A)) {
- var D = [0, A], W = n.y;
- if (w) {
- if (s) {
- if (D = s[o], w === "overlap") {
- var P = D.stackState[D.stateIndex--];
- P = 0 <= W ? P : P - W, Object.hasOwnProperty.call(D, "absolutePos") && delete D.absolutePos, Object.hasOwnProperty.call(D, "absoluteNeg") && delete D.absoluteNeg;
- } else
- 0 <= W ? (P = D.threshold + D.posTotal, D.posTotal -= W) : (P = D.threshold + D.negTotal, D.negTotal -= W, P -= W), !D.posTotal && Object.hasOwnProperty.call(D, "absolutePos") && (D.posTotal = D.absolutePos, delete D.absolutePos), !D.negTotal && Object.hasOwnProperty.call(D, "absoluteNeg") && (D.negTotal = D.absoluteNeg, delete D.absoluteNeg);
- n.isSum || (D.connectorThreshold = D.threshold + D.stackTotal), v.reversed ? (A = 0 <= W ? P - W : P + W, W = P) : (A = P, W = P - W), n.below = A <= p, _.y = v.translate(A, !1, !0, !1, !0) || 0, _.height = Math.abs(_.y - (v.translate(W, !1, !0, !1, !0) || 0)), (W = v.waterfall.dummyStackItem) && (W.x = o, W.label = s[o].label, W.setOffset(this.pointXOffset || 0, this.barW || 0, this.stackedYNeg[o], this.stackedYPos[o]));
- }
- } else
- P = Math.max(i, i + W) + D[0], _.y = v.translate(
- P,
- !1,
- !0,
- !1,
- !0
- ) || 0, n.isSum ? (_.y = v.translate(D[1], !1, !0, !1, !0) || 0, _.height = Math.min(v.translate(D[0], !1, !0, !1, !0) || 0, v.len) - _.y, n.below = D[1] <= p) : n.isIntermediateSum ? (0 <= W ? (A = D[1] + h, W = h) : (A = h, W = D[1] + h), v.reversed && (A ^= W, W ^= A, A ^= W), _.y = v.translate(A, !1, !0, !1, !0) || 0, _.height = Math.abs(_.y - Math.min(v.translate(W, !1, !0, !1, !0) || 0, v.len)), h += D[1], n.below = A <= p) : (_.height = 0 < A ? (v.translate(i, !1, !0, !1, !0) || 0) - _.y : (v.translate(i, !1, !0, !1, !0) || 0) - (v.translate(i - A, !1, !0, !1, !0) || 0), i += A, n.below = i < p), 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 <= a && !n.isNull ? (_.height = a, _.y -= c, n.plotY = _.y, n.minPointLengthOffset = 0 > n.y ? -c : c) : (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);
- }
- }
- }, S.prototype.processData = function(w) {
- var v = this.options, a = this.yData, c = v.data, p = a.length, i = v.threshold || 0, h, s, t, o, n;
- for (n = s = h = t = o = 0; n < p; n++) {
- var A = a[n], _ = c && c[n] ? c[n] : {};
- A === "sum" || _.isSum ? a[n] = u(s) : A === "intermediateSum" || _.isIntermediateSum ? (a[n] = u(h), h = 0) : (s += A, h += A), t = Math.min(s, t), o = Math.max(s, o);
- }
- M.prototype.processData.call(this, w), v.stacking || (this.dataMin = t + i, this.dataMax = o);
- }, S.prototype.toYData = function(w) {
- return w.isSum ? "sum" : w.isIntermediateSum ? "intermediateSum" : w.y;
- }, S.prototype.updateParallelArrays = function(w, v) {
- M.prototype.updateParallelArrays.call(this, w, v), (this.yData[0] === "sum" || this.yData[0] === "intermediateSum") && (this.yData[0] = null);
- }, S.prototype.pointAttribs = function(w, v) {
- var a = this.options.upColor;
- return a && !w.options.color && (w.color = 0 < w.y ? a : null), w = R.prototype.pointAttribs.call(this, w, v), delete w.dashstyle, w;
- }, S.prototype.getGraphPath = function() {
- return [["M", 0, 0]];
- }, S.prototype.getCrispPath = function() {
- var w = this.data, v = this.yAxis, a = w.length, c = Math.round(this.graph.strokeWidth()) % 2 / 2, p = Math.round(this.borderWidth) % 2 / 2, i = this.xAxis.reversed, h = this.yAxis.reversed, s = this.options.stacking, t = [], o;
- for (o = 1; o < a; o++) {
- var n = w[o].shapeArgs, A = w[o - 1], _ = w[o - 1].shapeArgs, D = v.waterfall.stacks[this.stackKey], W = 0 < A.y ? -_.height : 0;
- D && _ && n && (D = D[o - 1], s ? (D = D.connectorThreshold, W = Math.round(v.translate(D, 0, 1, 0, 1) + (h ? W : 0)) - c) : W = _.y + A.minPointLengthOffset + p - c, t.push(["M", (_.x || 0) + (i ? 0 : _.width || 0), W], ["L", (n.x || 0) + (i && n.width || 0), W])), _ && t.length && (!s && 0 > A.y && !h || 0 < A.y && h) && ((A = t[t.length - 2]) && typeof A[2] == "number" && (A[2] += _.height || 0), (A = t[t.length - 1]) && typeof A[2] == "number" && (A[2] += _.height || 0));
- }
- return t;
- }, S.prototype.drawGraph = function() {
- N.prototype.drawGraph.call(this), this.graph.attr({ d: this.getCrispPath() });
- }, S.prototype.setStackedPoints = function() {
- function w(V, Q, k, G) {
- if (Y)
- for (k; k < Y; k++)
- X.stackState[k] += G;
- else
- X.stackState[0] = V, Y = X.stackState.length;
- X.stackState.push(X.stackState[Y - 1] + Q);
- }
- var v = this.options, a = this.yAxis.waterfall.stacks, c = v.threshold, p = c || 0, i = p, h = this.stackKey, s = this.xData, t = s.length, o, n, A;
- this.yAxis.stacking.usePercentage = !1;
- var _ = n = A = p;
- if (this.visible || !this.chart.options.chart.ignoreHiddenSeries) {
- var D = a.changed;
- (o = a.alreadyChanged) && 0 > o.indexOf(h) && (D = !0), a[h] || (a[h] = {}), o = a[h];
- for (var W = 0; W < t; W++) {
- var P = s[W];
- (!o[P] || D) && (o[P] = { negTotal: 0, posTotal: 0, stackTotal: 0, threshold: 0, stateIndex: 0, stackState: [], label: D && o[P] ? o[P].label : void 0 });
- var X = o[P], g = this.yData[W];
- 0 <= g ? X.posTotal += g : X.negTotal += g;
- var m = v.data[W];
- P = X.absolutePos = X.posTotal;
- var L = X.absoluteNeg = X.negTotal;
- X.stackTotal = P + L;
- var Y = X.stackState.length;
- m && m.isIntermediateSum ? (w(A, n, 0, A), A = n, n = c, p ^= i, i ^= p, p ^= i) : m && m.isSum ? (w(c, _, Y), p = c) : (w(p, g, 0, _), m && (_ += g, n += g)), X.stateIndex++, X.threshold = p, p += X.stackTotal;
- }
- a.changed = !1, a.alreadyChanged || (a.alreadyChanged = []), a.alreadyChanged.push(h);
- }
- }, S.prototype.getExtremes = function() {
- var w = this.options.stacking;
- if (w) {
- var v = this.yAxis;
- v = v.waterfall.stacks;
- var a = this.stackedYNeg = [], c = this.stackedYPos = [];
- return w === "overlap" ? O(v[this.stackKey], function(p) {
- a.push(x(p.stackState)), c.push(b(p.stackState));
- }) : O(v[this.stackKey], function(p) {
- a.push(p.negTotal + p.threshold), c.push(p.posTotal + p.threshold);
- }), { dataMin: x(a), dataMax: b(c) };
- }
- return { dataMin: this.dataMin, dataMax: this.dataMax };
- }, S.defaultOptions = E(R.defaultOptions, { dataLabels: { inside: !0 }, lineWidth: 1, lineColor: "#333333", dashStyle: "Dot", borderColor: "#333333", states: { hover: { lineWidthPlus: 0 } } }), S;
- }(R), F(I.prototype, { getZonesGraphs: N.prototype.getZonesGraphs, pointValKey: "y", showLine: !0, pointClass: H }), j.registerSeriesType("waterfall", I), Z.compose(l, y), I;
- }), T(d, "Extensions/Polar.js", [
- d["Core/Animation/AnimationUtilities.js"],
- d["Core/Chart/Chart.js"],
- d["Core/Globals.js"],
- d["Extensions/Pane.js"],
- d["Core/Pointer.js"],
- d["Core/Series/Series.js"],
- d["Core/Series/SeriesRegistry.js"],
- d["Core/Renderer/SVG/SVGRenderer.js"],
- d["Core/Utilities.js"]
- ], function(l, y, j, I, Z, H, U, F, R) {
- var N = l.animObject;
- U = U.seriesTypes;
- var b = R.addEvent, x = R.defined, u = R.find, f = R.isNumber, E = R.pick, O = R.splat, B = R.uniqueKey;
- l = R.wrap;
- var M = H.prototype;
- Z = Z.prototype, M.searchPointByAngle = function(v) {
- var a = this.chart, c = this.xAxis.pane.center;
- return this.searchKDTree({ clientX: 180 + -180 / Math.PI * Math.atan2(v.chartX - c[0] - a.plotLeft, v.chartY - c[1] - a.plotTop) });
- }, M.getConnectors = function(v, a, c, p) {
- var i = p ? 1 : 0, h = 0 <= a && a <= v.length - 1 ? a : 0 > a ? v.length - 1 + a : 0;
- a = 0 > h - 1 ? v.length - (1 + i) : h - 1, i = h + 1 > v.length - 1 ? i : h + 1;
- var s = v[a];
- i = v[i];
- var t = s.plotX;
- s = s.plotY;
- var o = i.plotX, n = i.plotY;
- i = v[h].plotX, h = v[h].plotY, t = (1.5 * i + t) / 2.5, s = (1.5 * h + s) / 2.5, o = (1.5 * i + o) / 2.5;
- var A = (1.5 * h + n) / 2.5;
- n = Math.sqrt(Math.pow(t - i, 2) + Math.pow(s - h, 2));
- var _ = Math.sqrt(Math.pow(o - i, 2) + Math.pow(A - h, 2));
- return t = Math.atan2(s - h, t - i), A = Math.PI / 2 + (t + Math.atan2(A - h, o - i)) / 2, Math.abs(t - A) > Math.PI / 2 && (A -= Math.PI), t = i + Math.cos(A) * n, s = h + Math.sin(A) * n, o = i + Math.cos(Math.PI + A) * _, A = h + Math.sin(Math.PI + A) * _, i = { rightContX: o, rightContY: A, leftContX: t, leftContY: s, plotX: i, plotY: h }, c && (i.prevPointCont = this.getConnectors(v, a, !1, p)), i;
- }, M.toXY = function(v) {
- var a = this.chart, c = this.xAxis, p = this.yAxis, i = v.plotX, h = v.plotY, s = v.series, t = a.inverted, o = v.y, n = t ? i : p.len - h;
- t && s && !s.isRadialBar && (v.plotY = h = typeof o == "number" && p.translate(o) || 0), v.rectPlotX = i, v.rectPlotY = h, p.center && (n += p.center[3] / 2), f(h) && (p = t ? p.postTranslate(h, n) : c.postTranslate(i, n), v.plotX = v.polarPlotX = p.x - a.plotLeft, v.plotY = v.polarPlotY = p.y - a.plotTop), this.kdByAngle ? (a = (i / Math.PI * 180 + c.pane.options.startAngle) % 360, 0 > a && (a += 360), v.clientX = a) : v.clientX = v.plotX;
- }, U.spline && (l(U.spline.prototype, "getPointSpline", function(v, a, c, p) {
- return this.chart.polar ? p ? (v = this.getConnectors(a, p, !0, this.connectEnds), a = v.prevPointCont && v.prevPointCont.rightContX, c = v.prevPointCont && v.prevPointCont.rightContY, v = ["C", f(a) ? a : v.plotX, f(c) ? c : v.plotY, f(v.leftContX) ? v.leftContX : v.plotX, f(v.leftContY) ? v.leftContY : v.plotY, v.plotX, v.plotY]) : v = ["M", c.plotX, c.plotY] : v = v.call(this, a, c, p), v;
- }), U.areasplinerange && (U.areasplinerange.prototype.getPointSpline = U.spline.prototype.getPointSpline)), b(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 a = this.points, c = a.length; c--; )
- this.toXY(a[c]), !v.hasParallelCoordinates && !this.yAxis.reversed && a[c].y < this.yAxis.min && (a[c].isNull = !0);
- this.hasClipCircleSetter || (this.hasClipCircleSetter = !!this.eventsToUnbind.push(b(this, "afterRender", function() {
- if (v.polar) {
- var p = this.yAxis.pane.center;
- this.clipCircle ? this.clipCircle.animate({ x: p[0], y: p[1], r: p[2] / 2, innerR: p[3] / 2 }) : this.clipCircle = v.renderer.clipCircle(p[0], p[1], p[2] / 2, p[3] / 2), this.group.clip(this.clipCircle), this.setClip = j.noop;
- }
- })));
- }
- }, { order: 2 }), l(
- U.line.prototype,
- "getGraphPath",
- function(v, a) {
- var c = this, p;
- if (this.chart.polar) {
- for (a = a || this.points, p = 0; p < a.length; p++)
- if (!a[p].isNull) {
- var i = p;
- break;
- }
- if (this.options.connectEnds !== !1 && typeof i < "u") {
- this.connectEnds = !0, a.splice(a.length, 0, a[i]);
- var h = !0;
- }
- a.forEach(function(s) {
- typeof s.polarPlotY > "u" && c.toXY(s);
- });
- }
- return p = v.apply(this, [].slice.call(arguments, 1)), h && a.pop(), p;
- }
- );
- var S = function(v, a) {
- var c = this, p = this.chart, i = this.options.animation, h = this.group, s = this.markerGroup, t = this.xAxis && this.xAxis.center, o = p.plotLeft, n = p.plotTop, A, _, D, W;
- if (p.polar) {
- if (c.isRadialBar)
- a || (c.startAngleRad = E(c.translatedThreshold, c.xAxis.startAngleRad), j.seriesTypes.pie.prototype.animate.call(c, a));
- else if (p.renderer.isSVG)
- if (i = N(i), c.is("column")) {
- if (!a) {
- var P = t[3] / 2;
- c.points.forEach(function(X) {
- A = X.graphic, D = (_ = X.shapeArgs) && _.r, W = _ && _.innerR, A && _ && (A.attr({ r: P, innerR: P }), A.animate({ r: D, innerR: W }, c.options.animation));
- });
- }
- } else
- a ? (v = { translateX: t[0] + o, translateY: t[1] + n, scaleX: 1e-3, scaleY: 1e-3 }, h.attr(v), s && s.attr(v)) : (v = { translateX: o, translateY: n, scaleX: 1, scaleY: 1 }, h.animate(v, i), s && s.animate(v, i));
- } else
- v.call(this, a);
- };
- if (l(M, "animate", S), U.column) {
- var w = U.arearange.prototype;
- U = U.column.prototype, U.polarArc = function(v, a, c, p) {
- var i = this.xAxis.center, h = this.yAxis.len, s = i[3] / 2;
- return a = h - a + s, v = h - E(v, h) + s, this.yAxis.reversed && (0 > a && (a = s), 0 > v && (v = s)), { x: i[0], y: i[1], r: a, innerR: v, start: c, end: p };
- }, l(U, "animate", S), l(U, "translate", function(v) {
- var a = this.options, c = a.stacking, p = this.chart, i = this.xAxis, h = this.yAxis, s = h.reversed, t = h.center, o = i.startAngleRad, n = i.endAngleRad - o;
- if (this.preventPostTranslate = !0, v.call(this), i.isRadial) {
- v = this.points, i = v.length;
- var A = h.translate(h.min), _ = h.translate(h.max);
- if (a = a.threshold || 0, p.inverted && f(a)) {
- var D = h.translate(a);
- x(D) && (0 > D ? D = 0 : D > n && (D = n), this.translatedThreshold = D + o);
- }
- for (; i--; ) {
- a = v[i];
- var W = a.barX, P = a.x, X = a.y;
- if (a.shapeType = "arc", p.inverted) {
- if (a.plotY = h.translate(X), c && h.stacking) {
- if (X = h.stacking.stacks[(0 > X ? "-" : "") + this.stackKey], this.visible && X && X[P] && !a.isNull) {
- var g = X[P].points[this.getStackIndicator(void 0, P, this.index).key], m = h.translate(g[0]);
- g = h.translate(g[1]), x(m) && (m = R.clamp(m, 0, n));
- }
- } else
- m = D, g = a.plotY;
- m > g && (g = [m, m = g][0]), s ? g > A ? g = A : m < _ ? m = _ : (m > A || g < _) && (m = g = n) : m < A ? m = A : g > _ ? g = _ : (g < A || m > _) && (m = g = 0), h.min > h.max && (m = g = s ? n : 0), m += o, g += o, t && (a.barX = W += t[3] / 2), P = Math.max(W, 0), X = Math.max(W + a.pointWidth, 0), a.shapeArgs = { x: t && t[0], y: t && t[1], r: X, innerR: P, start: m, end: g }, a.opacity = m === g ? 0 : void 0, a.plotY = (x(this.translatedThreshold) && (m < this.translatedThreshold ? m : g)) - o;
- } else
- m = W + o, a.shapeArgs = this.polarArc(a.yBottom, a.plotY, m, m + a.pointWidth);
- this.toXY(a), p.inverted ? (W = h.postTranslate(a.rectPlotY, W + a.pointWidth / 2), a.tooltipPos = [W.x - p.plotLeft, W.y - p.plotTop]) : a.tooltipPos = [a.plotX, a.plotY], t && (a.ttBelow = a.plotY > t[1]);
- }
- }
- }), U.findAlignments = function(v, a) {
- return a.align === null && (a.align = 20 < v && 160 > v ? "left" : 200 < v && 340 > v ? "right" : "center"), a.verticalAlign === null && (a.verticalAlign = 45 > v || 315 < v ? "bottom" : 135 < v && 225 > v ? "top" : "middle"), a;
- }, w && (w.findAlignments = U.findAlignments), l(U, "alignDataLabel", function(v, a, c, p, i, h) {
- var s = this.chart, t = E(p.inside, !!this.options.stacking);
- s.polar ? (v = a.rectPlotX / Math.PI * 180, s.inverted ? (this.forceDL = s.isInsidePlot(a.plotX, Math.round(a.plotY)), t && a.shapeArgs ? (i = a.shapeArgs, i = this.yAxis.postTranslate(((i.start || 0) + (i.end || 0)) / 2 - this.xAxis.startAngleRad, a.barX + a.pointWidth / 2), i = { x: i.x - s.plotLeft, y: i.y - s.plotTop }) : a.tooltipPos && (i = { x: a.tooltipPos[0], y: a.tooltipPos[1] }), p.align = E(p.align, "center"), p.verticalAlign = E(
- p.verticalAlign,
- "middle"
- )) : this.findAlignments && (p = this.findAlignments(v, p)), M.alignDataLabel.call(this, a, c, p, i, h), this.isRadialBar && a.shapeArgs && a.shapeArgs.start === a.shapeArgs.end && c.hide(!0)) : v.call(this, a, c, p, i, h);
- });
- }
- l(Z, "getCoordinates", function(v, a) {
- var c = this.chart, p = { xAxis: [], yAxis: [] };
- return c.polar ? c.axes.forEach(function(i) {
- var h = i.isXAxis, s = i.center;
- if (i.coll !== "colorAxis") {
- var t = a.chartX - s[0] - c.plotLeft;
- s = a.chartY - s[1] - c.plotTop, p[h ? "xAxis" : "yAxis"].push({ axis: i, value: i.translate(h ? Math.PI - Math.atan2(t, s) : Math.sqrt(Math.pow(
- t,
- 2
- ) + Math.pow(s, 2)), !0) });
- }
- }) : p = v.call(this, a), p;
- }), F.prototype.clipCircle = function(v, a, c, p) {
- var i = B(), h = this.createElement("clipPath").attr({ id: i }).add(this.defs);
- return v = p ? this.arc(v, a, c, p, 0, 2 * Math.PI).add(h) : this.circle(v, a, c).add(h), v.id = i, v.clipPath = h, v;
- }, b(y, "getAxes", function() {
- this.pane || (this.pane = []), this.options.pane = O(this.options.pane), this.options.pane.forEach(function(v) {
- new I(v, this);
- }, this);
- }), b(y, "afterDrawChartBox", function() {
- this.pane.forEach(function(v) {
- v.render();
- });
- }), b(
- H,
- "afterInit",
- function() {
- var v = this.chart;
- v.inverted && v.polar && (this.isRadialSeries = !0, this.is("column") && (this.isRadialBar = !0));
- }
- ), l(y.prototype, "get", function(v, a) {
- return u(this.pane || [], function(c) {
- return c.options.id === a;
- }) || v.call(this, a);
- });
- }), T(d, "masters/highcharts-more.src.js", [d["Core/Globals.js"], d["Core/Axis/RadialAxis.js"], d["Series/Bubble/BubbleSeries.js"]], function(l, y, j) {
- y.compose(l.Axis, l.Tick), j.compose(l.Chart, l.Legend, l.Series);
- });
- });
- })(Vp);
- var _0 = Vp.exports;
- const D0 = /* @__PURE__ */ Mn(_0);
- var $p = { exports: {} };
- (function(r) {
- (function(d) {
- r.exports ? (d.default = d, r.exports = d) : d(typeof Highcharts < "u" ? Highcharts : void 0);
- })(function(d) {
- function T(l, y, j, I) {
- l.hasOwnProperty(y) || (l[y] = I.apply(null, j));
- }
- d = d ? d._modules : {}, T(
- d,
- "Extensions/FullScreen.js",
- [d["Core/Chart/Chart.js"], d["Core/Globals.js"], d["Core/Renderer/HTML/AST.js"], d["Core/Utilities.js"]],
- function(l, y, j, I) {
- var Z = I.addEvent;
- return I = function() {
- function H(U) {
- this.chart = U, this.isOpen = !1, U = U.renderTo, this.browserProps || (typeof U.requestFullscreen == "function" ? this.browserProps = { fullscreenChange: "fullscreenchange", requestFullscreen: "requestFullscreen", exitFullscreen: "exitFullscreen" } : U.mozRequestFullScreen ? this.browserProps = { fullscreenChange: "mozfullscreenchange", requestFullscreen: "mozRequestFullScreen", exitFullscreen: "mozCancelFullScreen" } : U.webkitRequestFullScreen ? this.browserProps = {
- fullscreenChange: "webkitfullscreenchange",
- requestFullscreen: "webkitRequestFullScreen",
- exitFullscreen: "webkitExitFullscreen"
- } : U.msRequestFullscreen && (this.browserProps = { fullscreenChange: "MSFullscreenChange", requestFullscreen: "msRequestFullscreen", exitFullscreen: "msExitFullscreen" }));
- }
- return H.prototype.close = function() {
- var U = this.chart, F = U.options.chart;
- this.isOpen && this.browserProps && U.container.ownerDocument instanceof Document && U.container.ownerDocument[this.browserProps.exitFullscreen](), this.unbindFullscreenEvent && (this.unbindFullscreenEvent = this.unbindFullscreenEvent()), U.setSize(this.origWidth, this.origHeight, !1), this.origHeight = this.origWidth = void 0, F.width = this.origWidthOption, F.height = this.origHeightOption, this.origHeightOption = this.origWidthOption = void 0, this.isOpen = !1, this.setButtonText();
- }, H.prototype.open = function() {
- var U = this, F = U.chart, R = F.options.chart;
- if (R && (U.origWidthOption = R.width, U.origHeightOption = R.height), U.origWidth = F.chartWidth, U.origHeight = F.chartHeight, U.browserProps) {
- var N = Z(
- F.container.ownerDocument,
- U.browserProps.fullscreenChange,
- function() {
- U.isOpen ? (U.isOpen = !1, U.close()) : (F.setSize(null, null, !1), U.isOpen = !0, U.setButtonText());
- }
- ), b = Z(F, "destroy", N);
- U.unbindFullscreenEvent = function() {
- N(), b();
- }, (R = F.renderTo[U.browserProps.requestFullscreen]()) && R.catch(function() {
- alert("Full screen is not supported inside a frame.");
- });
- }
- }, H.prototype.setButtonText = function() {
- var U = this.chart, F = U.exportDivElements, R = U.options.exporting, N = R && R.buttons && R.buttons.contextButton.menuItems;
- U = U.options.lang, R && R.menuItemDefinitions && U && U.exitFullscreen && U.viewFullscreen && N && F && (F = F[N.indexOf("viewFullscreen")]) && j.setElementHTML(F, this.isOpen ? U.exitFullscreen : R.menuItemDefinitions.viewFullscreen.text || U.viewFullscreen);
- }, H.prototype.toggle = function() {
- this.isOpen ? this.close() : this.open();
- }, H;
- }(), y.Fullscreen = I, Z(l, "beforeRender", function() {
- this.fullscreen = new y.Fullscreen(this);
- }), y.Fullscreen;
- }
- ), T(d, "Core/Chart/ChartNavigationComposition.js", [], function() {
- var l;
- return function(y) {
- y.compose = function(I) {
- return I.navigation || (I.navigation = new j(I)), I;
- };
- var j = function() {
- function I(Z) {
- this.updates = [], this.chart = Z;
- }
- return I.prototype.addUpdate = function(Z) {
- this.chart.navigation.updates.push(Z);
- }, I.prototype.update = function(Z, H) {
- var U = this;
- this.updates.forEach(function(F) {
- F.call(U.chart, Z, H);
- });
- }, I;
- }();
- y.Additions = j;
- }(l || (l = {})), l;
- }), T(d, "Extensions/Exporting/ExportingDefaults.js", [d["Core/Globals.js"]], function(l) {
- 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: l.isTouchDevice ? "14px" : "11px", transition: "background 250ms, color 250ms" }, menuItemHoverStyle: {
- background: "#335cad",
- color: "#ffffff"
- } } };
- }), T(d, "Extensions/Exporting/ExportingSymbols.js", [], function() {
- var l;
- return function(y) {
- function j(H, U, F, R) {
- return [["M", H, U + 2.5], ["L", H + F, U + 2.5], ["M", H, U + R / 2 + 0.5], ["L", H + F, U + R / 2 + 0.5], ["M", H, U + R - 1.5], ["L", H + F, U + R - 1.5]];
- }
- function I(H, U, F, R) {
- return H = R / 3 - 2, R = [], R = R.concat(this.circle(F - H, U, H, H), this.circle(F - H, U + H + 4, H, H), this.circle(F - H, U + 2 * (H + 4), H, H));
- }
- var Z = [];
- y.compose = function(H) {
- Z.indexOf(H) === -1 && (Z.push(H), H = H.prototype.symbols, H.menu = j, H.menuball = I.bind(H));
- };
- }(l || (l = {})), l;
- }), T(d, "Core/HttpUtilities.js", [d["Core/Globals.js"], d["Core/Utilities.js"]], function(l, y) {
- var j = l.doc, I = y.createElement, Z = y.discardElement, H = y.merge, U = y.objectEach, F = { ajax: function(R) {
- var N = 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 b = new XMLHttpRequest();
- if (!N.url)
- return !1;
- b.open(N.type.toUpperCase(), N.url, !0), N.headers["Content-Type"] || b.setRequestHeader(
- "Content-Type",
- R[N.dataType] || R.text
- ), U(N.headers, function(x, u) {
- b.setRequestHeader(u, x);
- }), b.onreadystatechange = function() {
- if (b.readyState === 4) {
- if (b.status === 200) {
- var x = b.responseText;
- if (N.dataType === "json")
- try {
- x = JSON.parse(x);
- } catch (u) {
- N.error && N.error(b, u);
- return;
- }
- return N.success && N.success(x);
- }
- N.error && N.error(b, b.responseText);
- }
- };
- try {
- N.data = JSON.stringify(N.data);
- } catch {
- }
- b.send(N.data || !0);
- }, getJSON: function(R, N) {
- F.ajax({ url: R, success: N, dataType: "json", headers: { "Content-Type": "text/plain" } });
- }, post: function(R, N, b) {
- var x = I("form", H({ method: "post", action: R, enctype: "multipart/form-data" }, b), { display: "none" }, j.body);
- U(N, function(u, f) {
- I("input", { type: "hidden", name: f, value: u }, null, x);
- }), x.submit(), Z(x);
- } };
- return F;
- }), T(d, "Extensions/Exporting/Exporting.js", [
- d["Core/Renderer/HTML/AST.js"],
- d["Core/Chart/Chart.js"],
- d["Core/Chart/ChartNavigationComposition.js"],
- d["Core/DefaultOptions.js"],
- d["Extensions/Exporting/ExportingDefaults.js"],
- d["Extensions/Exporting/ExportingSymbols.js"],
- d["Core/Globals.js"],
- d["Core/HttpUtilities.js"],
- d["Core/Utilities.js"]
- ], function(l, y, j, I, Z, H, U, F, R) {
- y = I.defaultOptions;
- var N = U.doc, b = U.win, x = R.addEvent, u = R.css, f = R.createElement, E = R.discardElement, O = R.extend, B = R.find, M = R.fireEvent, S = R.isObject, w = R.merge, v = R.objectEach, a = R.pick, c = R.removeEvent, p = R.uniqueKey, i;
- return function(h) {
- function s(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, st = tt && tt.hover;
- tt = tt && tt.select;
- var lt;
- rt.styledMode || (J.fill = a(J.fill, "#ffffff"), J.stroke = a(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 = a(J.paddingLeft, 30) : gt.text || O(J, { width: gt.width, height: gt.height, padding: 0 }), rt.styledMode || (J["stroke-linecap"] = "round", J.fill = a(J.fill, "#ffffff"), J.stroke = a(J.stroke, "none"));
- var pt = ct.button(gt.text, 0, 0, lt, J, st, tt).addClass(nt.className).attr({ title: a(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: a(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, M(this, "afterPrint");
- }
- }
- function o() {
- var nt = N.body, rt = this.options.exporting.printMaxWidth, ct = { childNodes: nt.childNodes, origDisplay: [], resetParams: void 0 };
- this.isPrinting = !0, this.pointer.reset(null, 0), M(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 A(nt, rt, ct, gt, dt, ht, at) {
- var J = this, tt = J.options.navigation, st = J.chartWidth, lt = J.chartHeight, pt = "cache-" + nt, yt = Math.max(dt, ht), vt = J[pt];
- if (!vt) {
- J.exportContextMenu = J[pt] = vt = f("div", { className: nt }, { position: "absolute", zIndex: 1e3, padding: yt + "px", pointerEvents: "auto" }, J.fixedDiv || J.container);
- var Mt = f("ul", { className: "highcharts-menu" }, { listStyle: "none", margin: 0, padding: 0 }, vt);
- J.styledMode || u(Mt, O(
- { MozBoxShadow: "3px 3px 10px #888", WebkitBoxShadow: "3px 3px 10px #888", boxShadow: "3px 3px 10px #888" },
- tt.menuStyle
- )), vt.hideMenu = function() {
- u(vt, { display: "none" }), at && at.setState(0), J.openMenu = !1, u(J.renderTo, { overflow: "hidden" }), u(J.container, { overflow: "hidden" }), R.clearTimeout(vt.hideTimer), M(J, "exportMenuHidden");
- }, J.exportEvents.push(x(vt, "mouseleave", function() {
- vt.hideTimer = b.setTimeout(vt.hideMenu, 500);
- }), x(vt, "mouseenter", function() {
- R.clearTimeout(vt.hideTimer);
- }), x(N, "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]), S(Pt, !0)) {
- var At = void 0;
- Pt.separator ? At = f("hr", void 0, void 0, Mt) : (Pt.textKey === "viewData" && J.isDataTableVisible && (Pt.textKey = "hideData"), At = f("li", { className: "highcharts-menu-item", onclick: function(St) {
- St && St.stopPropagation(), vt.hideMenu(), Pt.onclick && Pt.onclick.apply(J, arguments);
- } }, void 0, Mt), l.setElementHTML(At, Pt.text || J.options.lang[Pt.textKey]), J.styledMode || (At.onmouseover = function() {
- u(this, tt.menuItemHoverStyle);
- }, At.onmouseout = function() {
- u(this, tt.menuItemStyle);
- }, u(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 > st ? rt.right = st - 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", u(vt, rt), u(J.renderTo, { overflow: "" }), u(J.container, { overflow: "" }), J.openMenu = !0, M(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), c(ht, "mouseleave"), gt[at] = ht.onmouseout = ht.onmouseover = ht.ontouchstart = ht.onclick = null, E(ht));
- }), gt.length = 0), nt && (nt.forEach(function(ht) {
- ht();
- }), nt.length = 0);
- }
- function D(nt, rt) {
- rt = this.getSVGForExport(nt, rt), nt = w(this.options.exporting, nt), F.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 P() {
- 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 = f("div", null, { position: "absolute", top: "-9999em", width: this.chartWidth + "px", height: this.chartHeight + "px" }, N.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 = p()), 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 st = {};
- nt[tt] && (st[tt] = nt[tt], J.update(st));
- }), this.axes.forEach(function(tt) {
- var st = B(J.axes, function(yt) {
- return yt.options.internalKey === tt.userOptions.internalKey;
- }), lt = tt.getExtremes(), pt = lt.userMin;
- lt = lt.userMax, st && (typeof pt < "u" && pt !== st.min || typeof lt < "u" && lt !== st.max) && st.setExtremes(
- pt,
- lt,
- !0,
- !1
- );
- }), ht = J.getChartHTML(), M(this, "getSVG", { chartCopy: J }), ht = this.sanitizeSVG(ht, ct), ct = null, J.destroy(), E(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 ? st += m(Dt) + ":" + St + ";" : St && J.setAttribute(m(Dt), St));
- }
- var st = "", lt, pt, yt;
- if (J.nodeType === 1 && it.indexOf(J.nodeName) === -1) {
- var vt = b.getComputedStyle(J, null), Mt = J.nodeName === "svg" ? {} : b.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(b.getComputedStyle(Pt, null)), J.nodeName === "text" && delete gt.text.fill, dt.removeChild(Pt);
- }
- if (U.isFirefox || U.isMS)
- for (var At in vt)
- tt(vt[At], At);
- else
- v(vt, tt);
- st && (vt = J.getAttribute("style"), J.setAttribute("style", (vt ? vt + ";" : "") + st)), J.nodeName === "svg" && J.setAttribute("stroke-width", "1px"), J.nodeName !== "text" && [].forEach.call(J.children || J.childNodes, nt);
- }
- }
- var rt = $, ct = h.inlineWhitelist, gt = {}, dt, ht = N.createElement("iframe");
- u(ht, { width: "1px", height: "1px", visibility: "hidden" }), N.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 Y(nt) {
- (this.fixedDiv ? [this.fixedDiv, this.scrollingContainer] : [this.container]).forEach(function(rt) {
- nt.appendChild(rt);
- });
- }
- function V() {
- var nt = this;
- nt.exporting = { update: function(rt, ct) {
- nt.isDirtyExporting = !0, w(!0, nt.options.exporting, rt), a(ct, !0) && nt.redraw();
- } }, j.compose(nt).navigation.addUpdate(function(rt, ct) {
- nt.isDirtyExporting = !0, w(!0, nt.options.navigation, rt), a(ct, !0) && nt.redraw();
- });
- }
- function Q() {
- var nt = this;
- nt.isPrinting || (et = nt, U.isSafari || nt.beforePrint(), setTimeout(function() {
- b.focus(), b.print(), U.isSafari || setTimeout(function() {
- nt.afterPrint();
- }, 1e3);
- }, 1));
- }
- function k() {
- 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 G(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 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(" ");
- h.inlineWhitelist = [];
- var it = ["clipPath", "defs", "desc"], et;
- h.compose = function(nt, rt) {
- H.compose(rt), z.indexOf(nt) === -1 && (z.push(nt), rt = nt.prototype, rt.afterPrint = t, rt.exportChart = D, rt.inlineStyles = L, rt.print = Q, rt.sanitizeSVG = G, rt.getChartHTML = W, rt.getSVG = X, rt.getSVGForExport = g, rt.getFilename = P, rt.moveContainers = Y, rt.beforePrint = o, rt.contextMenu = A, rt.addButton = s, rt.destroyExport = _, rt.renderExporting = k, rt.callbacks.push(n), x(nt, "init", V), U.isSafari && U.win.matchMedia("print").addListener(function(ct) {
- et && (ct.matches ? et.beforePrint() : et.afterPrint());
- }));
- };
- }(i || (i = {})), y.exporting = w(Z.exporting, y.exporting), y.lang = w(Z.lang, y.lang), y.navigation = w(Z.navigation, y.navigation), i;
- }), T(d, "masters/modules/exporting.src.js", [d["Core/Globals.js"], d["Extensions/Exporting/Exporting.js"], d["Core/HttpUtilities.js"]], function(l, y, j) {
- l.HttpUtilities = j, l.ajax = j.ajax, l.getJSON = j.getJSON, l.post = j.post, y.compose(l.Chart, l.Renderer);
- });
- });
- })($p);
- var I0 = $p.exports;
- const R0 = /* @__PURE__ */ Mn(I0);
- var Zp = { exports: {} };
- (function(r) {
- (function(d) {
- r.exports ? (d.default = d, r.exports = d) : d(typeof Highcharts < "u" ? Highcharts : void 0);
- })(function(d) {
- function T(l, y, j, I) {
- l.hasOwnProperty(y) || (l[y] = I.apply(null, j));
- }
- d = d ? d._modules : {}, T(d, "Extensions/Boost/Boostables.js", [], function() {
- return "area arearange column columnrange bar line scatter heatmap bubble treemap".split(" ");
- }), T(d, "Extensions/Boost/BoostableMap.js", [d["Extensions/Boost/Boostables.js"]], function(l) {
- var y = {};
- return l.forEach(function(j) {
- y[j] = 1;
- }), y;
- }), T(d, "Extensions/Boost/WGLShader.js", [d["Core/Utilities.js"]], function(l) {
- var y = l.clamp, j = l.error, I = l.pick;
- return function(Z) {
- function H() {
- v.length && j("[highcharts boost] shader error - " + v.join(`
- `));
- }
- function U(c, p) {
- var i = Z.createShader(p === "vertex" ? Z.VERTEX_SHADER : Z.FRAGMENT_SHADER);
- return Z.shaderSource(i, c), Z.compileShader(i), Z.getShaderParameter(i, Z.COMPILE_STATUS) ? i : (v.push("when compiling " + p + ` shader:
- ` + Z.getShaderInfoLog(i)), !1);
- }
- function F() {
- function c(h) {
- return Z.getUniformLocation(b, h);
- }
- var p = U(
- `#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 = U(`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 !p || !i ? (b = !1, H(), !1) : (b = Z.createProgram(), Z.attachShader(b, p), Z.attachShader(b, i), Z.linkProgram(b), Z.getProgramParameter(b, Z.LINK_STATUS) ? (Z.useProgram(b), Z.bindAttribLocation(b, 0, "aVertexPosition"), x = c("uPMatrix"), u = c("pSize"), f = c("fillColor"), E = c("isBubble"), O = c("bubbleSizeAbs"), B = c("bubbleSizeByArea"), a = c("uSampler"), M = c("skipTranslation"), S = c("isCircle"), w = c("isInverted"), !0) : (v.push(Z.getProgramInfoLog(b)), H(), b = !1));
- }
- function R(c, p) {
- Z && b && (c = N[c] = N[c] || Z.getUniformLocation(b, c), Z.uniform1f(c, p));
- }
- var N = {}, b, x, u, f, E, O, B, M, S, w, v = [], a;
- return Z && !F() ? !1 : { psUniform: function() {
- return u;
- }, pUniform: function() {
- return x;
- }, fillColorUniform: function() {
- return f;
- }, setBubbleUniforms: function(c, p, i) {
- var h = c.options, s = Number.MAX_VALUE, t = -Number.MAX_VALUE;
- if (Z && b && c.is("bubble")) {
- var o = c.getPxExtremes();
- s = I(h.zMin, y(p, h.displayNegative === !1 ? h.zThreshold : -Number.MAX_VALUE, s)), t = I(h.zMax, Math.max(t, i)), Z.uniform1i(E, 1), Z.uniform1i(S, 1), Z.uniform1i(B, c.options.sizeBy !== "width"), Z.uniform1i(O, c.options.sizeByAbsoluteValue), R("bubbleZMin", s), R("bubbleZMax", t), R("bubbleZThreshold", c.options.zThreshold), R("bubbleMinSize", o.minPxSize), R("bubbleMaxSize", o.maxPxSize);
- }
- }, bind: function() {
- Z && b && Z.useProgram(b);
- }, program: function() {
- return b;
- }, create: F, setUniform: R, setPMatrix: function(c) {
- Z && b && Z.uniformMatrix4fv(x, !1, c);
- }, setColor: function(c) {
- Z && b && Z.uniform4f(f, c[0] / 255, c[1] / 255, c[2] / 255, c[3]);
- }, setPointSize: function(c) {
- Z && b && Z.uniform1f(u, c);
- }, setSkipTranslation: function(c) {
- Z && b && Z.uniform1i(M, c === !0 ? 1 : 0);
- }, setTexture: function(c) {
- Z && b && Z.uniform1i(a, c);
- }, setDrawAsCircle: function(c) {
- Z && b && Z.uniform1i(S, c ? 1 : 0);
- }, reset: function() {
- Z && b && (Z.uniform1i(E, 0), Z.uniform1i(S, 0));
- }, setInverted: function(c) {
- Z && b && Z.uniform1i(w, c);
- }, destroy: function() {
- Z && b && (Z.deleteProgram(b), b = !1);
- } };
- };
- }), T(d, "Extensions/Boost/WGLVBuffer.js", [], function() {
- return function(l, y, j) {
- function I() {
- Z && (l.deleteBuffer(Z), H = Z = !1), R = 0, U = j || 2, N = [];
- }
- var Z = !1, H = !1, U = j || 2, F = !1, R = 0, N;
- return {
- destroy: I,
- bind: function() {
- if (!Z)
- return !1;
- l.vertexAttribPointer(H, U, l.FLOAT, !1, 0, 0);
- },
- data: N,
- build: function(b, x, u) {
- var f;
- return N = b || [], N && N.length !== 0 || F ? (U = u || U, Z && l.deleteBuffer(Z), F || (f = new Float32Array(N)), Z = l.createBuffer(), l.bindBuffer(l.ARRAY_BUFFER, Z), l.bufferData(l.ARRAY_BUFFER, F || f, l.STATIC_DRAW), H = l.getAttribLocation(y.program(), x), l.enableVertexAttribArray(H), !0) : (I(), !1);
- },
- render: function(b, x, u) {
- var f = F ? F.length : N.length;
- return !Z || !f || ((!b || b > f || 0 > b) && (b = 0), (!x || x > f) && (x = f), b >= x) ? !1 : (l.drawArrays(l[(u || "points").toUpperCase()], b / U, (x - b) / U), !0);
- },
- allocate: function(b) {
- R = -1, F = new Float32Array(4 * b);
- },
- push: function(b, x, u, f) {
- F && (F[++R] = b, F[++R] = x, F[++R] = u, F[++R] = f);
- }
- };
- };
- }), T(d, "Extensions/Boost/WGLRenderer.js", [d["Core/Color/Color.js"], d["Extensions/Boost/WGLShader.js"], d["Extensions/Boost/WGLVBuffer.js"], d["Core/Globals.js"], d["Core/Utilities.js"]], function(l, y, j, I, Z) {
- var H = l.parse, U = I.doc, F = Z.isNumber, R = Z.isObject, N = Z.merge, b = Z.objectEach, x = Z.pick;
- return function(u) {
- function f(m) {
- if (m.isSeriesBoosting) {
- var L = !!m.options.stacking, Y = m.xData || m.options.xData || m.processedXData;
- return L = (L ? m.data : Y || m.options.data).length, m.type === "treemap" ? L *= 12 : m.type === "heatmap" ? L *= 6 : P[m.type] && (L *= 2), L;
- }
- return 0;
- }
- function E() {
- h.clear(h.COLOR_BUFFER_BIT | h.DEPTH_BUFFER_BIT);
- }
- function O(m, L) {
- function Y($t) {
- $t && (L.colorData.push($t[0]), L.colorData.push($t[1]), L.colorData.push($t[2]), L.colorData.push($t[3]));
- }
- function V($t, ue, ge, Re, De) {
- Y(De), g.usePreallocated ? (p.push($t, ue, ge ? 1 : 0, Re || 1), i += 4) : (o.push($t), o.push(ue), o.push(ge ? 1 : 0), o.push(Re || 1));
- }
- function Q() {
- L.segments.length && (L.segments[L.segments.length - 1].to = o.length || i);
- }
- function k() {
- L.segments.length && L.segments[L.segments.length - 1].from === (o.length || i) || (Q(), L.segments.push({ from: o.length || i }));
- }
- function G($t, ue, ge, Re, De) {
- Y(De), V($t + ge, ue), Y(De), V($t, ue), Y(De), V($t, ue + Re), Y(De), V($t, ue + Re), Y(De), V($t + ge, ue + Re), Y(De), V($t + ge, ue);
- }
- function z($t, ue) {
- g.useGPUTranslations || (L.skipTranslation = !0, $t.x = lt.toPixels($t.x, !0), $t.y = st.toPixels($t.y, !0)), ue ? o = [$t.x, $t.y, 0, 2].concat(o) : V($t.x, $t.y, 0, 2);
- }
- var $ = 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, st = 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, Lt = { x: Number.MAX_VALUE, y: 0 }, Nt = { x: -Number.MAX_VALUE, y: 0 }, Et = 0, Kt = !1, Gt, Wt, Jt, be, zt = -1, Vt = !1, Ce = !1, _r, uo = typeof q.index > "u", Pn = !1, En = !1, $e = !1, On = P[m.type], Ln = !1, Jr = !0, fo = !0, Hs = it.zoneAxis || "y", Dr = it.zones || !1, Xi = !1, go = it.threshold, _n = !1;
- if (!(it.boostData && 0 < it.boostData.length)) {
- if (it.gapSize && (_n = it.gapUnit !== "value" ? it.gapSize * m.closestPointRange : it.gapSize), Dr) {
- var Ir = [];
- Dr.forEach(function($t, ue) {
- if ($t.color) {
- var ge = H($t.color).rgba;
- ge[0] /= 255, ge[1] /= 255, ge[2] /= 255, Ir[ue] = 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, k(), rt && 0 < rt.length)
- L.skipTranslation = !0, L.drawMode = "triangles", rt[0].node && rt[0].node.levelDynamic && rt.sort(function($t, ue) {
- if ($t.node) {
- if ($t.node.levelDynamic > ue.node.levelDynamic)
- return 1;
- if ($t.node.levelDynamic < ue.node.levelDynamic)
- return -1;
- }
- return 0;
- }), rt.forEach(function($t) {
- var ue = $t.plotY;
- if (typeof ue < "u" && !isNaN(ue) && $t.y !== null && $t.shapeArgs) {
- var ge = $t.shapeArgs;
- ue = ge.x, ue = ue === void 0 ? 0 : ue;
- 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, G(ue, Re, De, ge, St), $t /= 2), m.type === "heatmap" && q.inverted && (ue = lt.len - ue, Re = st.len - Re, De = -De, ge = -ge), G(ue + $t, Re + $t, De - 2 * $t, ge - 2 * $t, $e);
- }
- });
- else {
- for (rt = function() {
- if (Jt = Dt[++zt], typeof Jt > "u")
- return "continue";
- if (uo)
- return "break";
- var $t = nt && nt[zt];
- 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[zt + 1] && (Ce = Dt[zt + 1][0]), Dt[zt - 1] && (Vt = Dt[zt - 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[zt], Dt[zt + 1] && (Ce = Dt[zt + 1]), Dt[zt - 1] && (Vt = Dt[zt - 1]), tt && tt.length && (be = tt[zt], tt[zt] > L.zMax && (L.zMax = tt[zt]), tt[zt] < L.zMin && (L.zMin = tt[zt]))), !vt && (Gt === null || Wt === null))
- return k(), "continue";
- if (Ce && Ce >= ct && Ce <= gt && (Pn = !0), Vt && Vt >= ct && Vt <= gt && (En = !0), $ ? (yt && (Wt = Jt.slice(1, 3)), _r = Wt[0], Wt = Wt[1]) : et && (Gt = Jt.x, Wt = Jt.stackY, _r = 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 && Lt.x > ct && (Lt.x = Gt, Lt.y = Wt), Wt === null && vt)
- return "continue";
- if (Wt === null || !Jr && !Pn && !En)
- return k(), "continue";
- if ((Ce >= ct || Gt >= ct) && (Vt <= gt || Gt <= gt) && (Ln = !0), !Ln && !Pn && !En)
- return "continue";
- if (_n && Gt - Vt > _n && k(), Dr) {
- var ue;
- Dr.some(function(ge, Re) {
- var De = Dr[Re - 1];
- return Hs === "x" ? typeof ge.value < "u" && Gt <= ge.value ? (Ir[Re] && (!De || Gt >= De.value) && (ue = Ir[Re]), !0) : !1 : typeof ge.value < "u" && Wt <= ge.value ? (Ir[Re] && (!De || Wt >= De.value) && (ue = Ir[Re]), !0) : !1;
- }), $e = ue || Xi || $e;
- }
- if (!g.useGPUTranslations && (L.skipTranslation = !0, Gt = lt.toPixels(Gt, !0), Wt = st.toPixels(Wt, !0), Gt > pt && L.drawMode === "points"))
- return "continue";
- if (L.hasMarkers && Ln && 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 && ++Et, "continue";
- On && (At = _r, (_r === !1 || typeof _r > "u") && (At = 0 > Wt ? Wt : 0), $ || et || (At = Math.max(go === null ? dt : go, dt)), g.useGPUTranslations || (At = st.toPixels(At, !0)), V(Gt, At, 0, 0, $e)), it.step && !fo && V(Gt, Pt, 0, 2, $e), V(Gt, Wt, 0, m.type === "bubble" ? be || 1 : 2, $e), Mt = Gt, Pt = Wt, Kt = !0, fo = !1;
- }; zt < Dt.length - 1 && rt() !== "break"; )
- ;
- g.debug.showSkipSummary && console.log("skipped points:", Et), Kt || vt === !1 || m.drawMode !== "line_strip" || (Lt.x < Number.MAX_VALUE && z(Lt, !0), Nt.x > -Number.MAX_VALUE && z(Nt));
- }
- Q();
- }
- }
- function B() {
- D = [], A.data = o = [], n = [], p && p.destroy();
- }
- function M(m) {
- c && (c.setUniform("xAxisTrans", m.transA), c.setUniform("xAxisMin", m.min), c.setUniform("xAxisMinPad", m.minPixelPadding), c.setUniform("xAxisPointRange", m.pointRange), c.setUniform("xAxisLen", m.len), c.setUniform(
- "xAxisPos",
- m.pos
- ), c.setUniform("xAxisCVSCoord", !m.horiz), c.setUniform("xAxisIsLog", !!m.logarithmic), c.setUniform("xAxisReversed", !!m.reversed));
- }
- function S(m) {
- c && (c.setUniform("yAxisTrans", m.transA), c.setUniform("yAxisMin", m.min), c.setUniform("yAxisMinPad", m.minPixelPadding), c.setUniform("yAxisPointRange", m.pointRange), c.setUniform("yAxisLen", m.len), c.setUniform("yAxisPos", m.pos), c.setUniform("yAxisCVSCoord", !m.horiz), c.setUniform("yAxisIsLog", !!m.logarithmic), c.setUniform("yAxisReversed", !!m.reversed));
- }
- function w(m, L) {
- c.setUniform("hasThreshold", m), c.setUniform("translatedThreshold", L);
- }
- function v(m) {
- if (m)
- s = m.chartWidth || 800, t = m.chartHeight || 400;
- else
- return !1;
- if (!(h && s && t && c))
- return !1;
- g.debug.timeRendering && console.time("gl rendering"), h.canvas.width = s, h.canvas.height = t, c.bind(), h.viewport(0, 0, s, t), c.setPMatrix([2 / s, 0, 0, 0, 0, -(2 / t), 0, 0, 0, 0, -2, 0, -1, 1, -1, 1]), 1 < g.lineWidth && !I.isMS && h.lineWidth(g.lineWidth), p.build(A.data, "aVertexPosition", 4), p.bind(), c.setInverted(m.inverted), D.forEach(function(L, Y) {
- var V = L.series.options, Q = V.marker, k = typeof V.lineWidth < "u" ? V.lineWidth : 1, G = V.threshold, z = F(G), $ = L.series.yAxis.getThreshold(G);
- if (G = x(V.marker ? V.marker.enabled : null, L.series.xAxis.isRadial ? !0 : null, L.series.closestPointRangePx > 2 * ((V.marker ? V.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 && (h.bindTexture(h.TEXTURE_2D, Q.handle), c.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, V.colorByPoint && (Q = L.series.chart.options.colors[Y])), L.series.fillOpacity && V.fillOpacity && (Q = new l(Q).setOpacity(x(V.fillOpacity, 1)).get()), Q = H(Q).rgba, g.useAlpha || (Q[3] = 1), L.drawMode === "lines" && g.useAlpha && 1 > Q[3] && (Q[3] /= 10), V.boostBlending === "add" ? (h.blendFunc(h.SRC_ALPHA, h.ONE), h.blendEquation(h.FUNC_ADD)) : V.boostBlending === "mult" || V.boostBlending === "multiply" ? h.blendFunc(h.DST_COLOR, h.ZERO) : V.boostBlending === "darken" ? (h.blendFunc(h.ONE, h.ONE), h.blendEquation(h.FUNC_MIN)) : h.blendFuncSeparate(h.SRC_ALPHA, h.ONE_MINUS_SRC_ALPHA, h.ONE, h.ONE_MINUS_SRC_ALPHA), c.reset(), 0 < L.colorData.length ? (c.setUniform("hasColor", 1), Y = j(h, c), Y.build(L.colorData, "aColor", 4), Y.bind()) : h.disableVertexAttribArray(h.getAttribLocation(c.program(), "aColor")), c.setColor(Q), M(L.series.xAxis), S(L.series.yAxis), w(z, $), L.drawMode === "points" && (V.marker && F(V.marker.radius) ? c.setPointSize(2 * V.marker.radius) : c.setPointSize(1)), c.setSkipTranslation(L.skipTranslation), L.series.type === "bubble" && c.setBubbleUniforms(L.series, L.zMin, L.zMax), c.setDrawAsCircle(X[L.series.type] || !1), 0 < k || L.drawMode !== "line_strip")
- for (k = 0; k < L.segments.length; k++)
- p.render(L.segments[k].from, L.segments[k].to, L.drawMode);
- if (L.hasMarkers && G)
- for (V.marker && F(V.marker.radius) ? c.setPointSize(2 * V.marker.radius) : c.setPointSize(10), c.setDrawAsCircle(!0), k = 0; k < L.segments.length; k++)
- p.render(L.segments[k].from, L.segments[k].to, "POINTS");
- }
- }), g.debug.timeRendering && console.timeEnd("gl rendering"), u && u(), B();
- }
- function a(m) {
- if (E(), m.renderer.forExport)
- return v(m);
- _ ? v(m) : setTimeout(function() {
- a(m);
- }, 1);
- }
- var c = !1, p = !1, i = 0, h = !1, s = 0, t = 0, o = !1, n = !1, A = {}, _ = !1, D = [], W = {}, P = { 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 A = { allocateBufferForSingleSeries: function(m) {
- var L = 0;
- g.usePreallocated && (m.isSeriesBoosting && (L = f(m)), p.allocate(L));
- }, pushSeries: function(m) {
- 0 < D.length && D[D.length - 1].hasMarkers && (D[D.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 >= D.length ? D.push(L) : D[m.index] = L, O(m, L), g.debug.timeSeriesProcessing && console.timeEnd("building " + m.type + " series");
- }, setSize: function(m, L) {
- s === m && t === L || !c || (s = m, t = L, c.bind(), c.setPMatrix([2 / s, 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 Y(k, G) {
- var z = { isReady: !1, texture: U.createElement("canvas"), handle: h.createTexture() }, $ = z.texture.getContext("2d");
- W[k] = z, z.texture.width = 512, z.texture.height = 512, $.mozImageSmoothingEnabled = !1, $.webkitImageSmoothingEnabled = !1, $.msImageSmoothingEnabled = !1, $.imageSmoothingEnabled = !1, $.strokeStyle = "rgba(255, 255, 255, 0)", $.fillStyle = "#FFF", G($);
- try {
- h.activeTexture(h.TEXTURE0), h.bindTexture(h.TEXTURE_2D, z.handle), h.texImage2D(h.TEXTURE_2D, 0, h.RGBA, h.RGBA, h.UNSIGNED_BYTE, z.texture), h.texParameteri(h.TEXTURE_2D, h.TEXTURE_WRAP_S, h.CLAMP_TO_EDGE), h.texParameteri(
- h.TEXTURE_2D,
- h.TEXTURE_WRAP_T,
- h.CLAMP_TO_EDGE
- ), h.texParameteri(h.TEXTURE_2D, h.TEXTURE_MAG_FILTER, h.LINEAR), h.texParameteri(h.TEXTURE_2D, h.TEXTURE_MIN_FILTER, h.LINEAR), h.bindTexture(h.TEXTURE_2D, null), z.isReady = !0;
- } catch {
- }
- }
- var V = 0, Q = ["webgl", "experimental-webgl", "moz-webgl", "webkit-3d"];
- if (_ = !1, !m)
- return !1;
- for (g.debug.timeSetup && console.time("gl setup"); V < Q.length && !(h = m.getContext(Q[V], {})); V++)
- ;
- if (h)
- L || B();
- else
- return !1;
- return h.enable(h.BLEND), h.blendFunc(h.SRC_ALPHA, h.ONE_MINUS_SRC_ALPHA), h.disable(h.DEPTH_TEST), h.depthFunc(h.LESS), c = y(h), c ? (p = j(h, c), Y("circle", function(k) {
- k.beginPath(), k.arc(256, 256, 256, 0, 2 * Math.PI), k.stroke(), k.fill();
- }), Y("square", function(k) {
- k.fillRect(0, 0, 512, 512);
- }), Y("diamond", function(k) {
- k.beginPath(), k.moveTo(256, 0), k.lineTo(512, 256), k.lineTo(256, 512), k.lineTo(0, 256), k.lineTo(256, 0), k.fill();
- }), Y("triangle", function(k) {
- k.beginPath(), k.moveTo(0, 512), k.lineTo(256, 0), k.lineTo(512, 512), k.lineTo(0, 512), k.fill();
- }), Y("triangle-down", function(k) {
- k.beginPath(), k.moveTo(0, 0), k.lineTo(256, 512), k.lineTo(
- 512,
- 0
- ), k.lineTo(0, 0), k.fill();
- }), _ = !0, g.debug.timeSetup && console.timeEnd("gl setup"), !0) : !1;
- }, render: a, settings: g, valid: function() {
- return h !== !1;
- }, clear: E, flush: B, setXAxis: M, setYAxis: S, data: o, gl: function() {
- return h;
- }, allocateBuffer: function(m) {
- var L = 0;
- g.usePreallocated && (m.series.forEach(function(Y) {
- Y.isSeriesBoosting && (L += f(Y));
- }), p.allocate(L));
- }, destroy: function() {
- B(), p.destroy(), c.destroy(), h && (b(W, function(m) {
- m.handle && h.deleteTexture(m.handle);
- }), h.canvas.width = 1, h.canvas.height = 1);
- }, setOptions: function(m) {
- N(
- !0,
- g,
- m
- );
- } };
- };
- }), T(d, "Extensions/Boost/BoostAttach.js", [d["Core/Chart/Chart.js"], d["Extensions/Boost/WGLRenderer.js"], d["Core/Globals.js"], d["Core/Utilities.js"]], function(l, y, j, I) {
- var Z = j.doc, H = I.error, U;
- return function(F, R) {
- var N = F.chartWidth, b = F.chartHeight, x = F, u = F.seriesGroup || R.group, f = Z.implementation.hasFeature("www.http://w3.org/TR/SVG11/feature#Extensibility", "1.1");
- return x = F.isChartSeriesBoosting() ? F : R, f = !1, U || (U = Z.createElement("canvas")), x.renderTarget || (x.canvas = U, F.renderer.forExport || !f ? (x.renderTarget = F.renderer.image("", 0, 0, N, b).addClass("highcharts-boost-canvas").add(u), x.boostClear = function() {
- x.renderTarget.attr({ href: "" });
- }, x.boostCopy = function() {
- x.boostResizeTarget(), x.renderTarget.attr({ href: x.canvas.toDataURL("image/png") });
- }) : (x.renderTargetFo = F.renderer.createElement("foreignObject").add(u), x.renderTarget = Z.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() {
- N = F.chartWidth, b = F.chartHeight, (x.renderTargetFo || x.renderTarget).attr({ x: 0, y: 0, width: N, height: b }).css({ pointerEvents: "none", mixedBlendMode: "normal", opacity: 1 }), x instanceof l && x.markerGroup.translate(F.plotLeft, F.plotTop);
- }, x.boostClipRect = F.renderer.clipRect(), (x.renderTargetFo || x.renderTarget).clip(x.boostClipRect), x instanceof l && (x.markerGroup = x.renderer.g().add(u), x.markerGroup.translate(R.xAxis.pos, R.yAxis.pos))), x.canvas.width = N, x.canvas.height = b, x.boostClipRect.attr(F.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(F.options.boost || {}), x instanceof l && x.ogl.allocateBuffer(F)), x.ogl.setSize(N, b), x.ogl;
- };
- }), T(d, "Extensions/Boost/BoostUtils.js", [d["Core/Globals.js"], d["Extensions/Boost/BoostableMap.js"], d["Extensions/Boost/BoostAttach.js"], d["Core/Utilities.js"]], function(l, y, j, I) {
- function Z() {
- for (var u = [], f = 0; f < arguments.length; f++)
- u[f] = arguments[f];
- var E = -Number.MAX_VALUE;
- return u.forEach(function(O) {
- if (typeof O < "u" && O !== null && typeof O.length < "u" && 0 < O.length)
- return E = O.length, !0;
- }), E;
- }
- function H(u, f, E) {
- u && f.renderTarget && f.canvas && !(E || f.chart).isChartSeriesBoosting() && u.render(E || f.chart);
- }
- function U(u, f) {
- u && f.renderTarget && f.canvas && !f.chart.isChartSeriesBoosting() && u.allocateBufferForSingleSeries(f);
- }
- function F(u, f, E, O, B, M) {
- B = B || 0, O = O || 3e3;
- for (var S = B + O, w = !0; w && B < S && B < u.length; )
- w = f(u[B], B), ++B;
- w && (B < u.length ? M ? F(u, f, E, O, B, M) : N.requestAnimationFrame ? N.requestAnimationFrame(function() {
- F(u, f, E, O, B);
- }) : setTimeout(function() {
- F(u, f, E, O, B);
- }) : E && E());
- }
- function R() {
- var u = 0, f, E = [
- "webgl",
- "experimental-webgl",
- "moz-webgl",
- "webkit-3d"
- ], O = !1;
- if (typeof N.WebGLRenderingContext < "u")
- for (f = b.createElement("canvas"); u < E.length; u++)
- try {
- if (O = f.getContext(E[u]), typeof O < "u" && O !== null)
- return !0;
- } catch {
- }
- return !1;
- }
- var N = l.win, b = l.doc, x = I.pick;
- return I = { patientMax: Z, boostEnabled: function(u) {
- return x(u && u.options && u.options.boost && u.options.boost.enabled, !0);
- }, shouldForceChartSeriesBoosting: function(u) {
- var f = 0, E = 0, O = x(u.options.boost && u.options.boost.allowForce, !0);
- if (typeof u.boostForceChartBoost < "u")
- return u.boostForceChartBoost;
- if (1 < u.series.length)
- for (var B = 0; B < u.series.length; B++) {
- var M = u.series[B];
- M.options.boostThreshold !== 0 && M.visible !== !1 && M.type !== "heatmap" && (y[M.type] && ++E, Z(M.processedXData, M.options.data, M.points) >= (M.options.boostThreshold || Number.MAX_VALUE) && ++f);
- }
- return u.boostForceChartBoost = O && (E === u.series.length && 0 < f || 5 < f), u.boostForceChartBoost;
- }, renderIfNotSeriesBoosting: H, allocateIfNotSeriesBoosting: U, eachAsync: F, hasWebGLSupport: R, pointDrawHandler: function(u) {
- var f = !0;
- if (this.chart.options && this.chart.options.boost && (f = typeof this.chart.options.boost.enabled > "u" ? !0 : this.chart.options.boost.enabled), !f || !this.isSeriesBoosting)
- return u.call(this);
- this.chart.isBoosting = !0, (u = j(this.chart, this)) && (U(u, this), u.pushSeries(this)), H(u, this);
- } }, l.hasWebGLSupport = R, I;
- }), T(
- d,
- "Extensions/Boost/BoostInit.js",
- [d["Core/Chart/Chart.js"], d["Core/Globals.js"], d["Core/Series/Series.js"], d["Core/Series/SeriesRegistry.js"], d["Core/Utilities.js"], d["Extensions/Boost/BoostUtils.js"], d["Extensions/Boost/BoostAttach.js"]],
- function(l, y, j, I, Z, H, U) {
- var F = y.noop, R = I.seriesTypes, N = Z.addEvent, b = Z.extend, x = Z.fireEvent, u = Z.wrap, f = H.eachAsync, E = H.pointDrawHandler, O = H.allocateIfNotSeriesBoosting, B = H.renderIfNotSeriesBoosting, M = H.shouldForceChartSeriesBoosting, S;
- return function() {
- b(j.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 (G)
- var st = dt[0], lt = dt[1];
- else
- st = dt, lt = o[ht];
- Y ? (G && (lt = dt.slice(1, 3)), at = lt[0], lt = lt[1]) : V && (st = dt.x, lt = dt.stackY, at = lt - dt.y), k || (tt = lt >= D && lt <= W), lt !== null && st >= A && st <= _ && tt && (dt = h.toPixels(st, !0), g ? ((typeof q > "u" || dt === X) && (Y || (at = lt), (typeof it > "u" || lt > $) && ($ = lt, it = ht), (typeof q > "u" || at < z) && (z = at, q = ht)), dt !== X && (typeof q < "u" && (lt = s.toPixels($, !0), L = s.toPixels(z, !0), rt(dt, lt, it), L !== lt && rt(dt, L, q)), q = it = void 0, X = dt)) : (lt = Math.ceil(s.toPixels(lt, !0)), rt(dt, lt, ht)));
- }
- return !J;
- }
- function v() {
- x(a, "renderedCanvas"), delete a.buildKDTree, a.buildKDTree(), ct.debug.timeKDTree && console.timeEnd("kd tree building");
- }
- var a = this, c = a.options || {}, p = !1, i = a.chart, h = this.xAxis, s = this.yAxis, t = c.xData || a.processedXData, o = c.yData || a.processedYData, n = c.data;
- p = h.getExtremes();
- var A = p.min, _ = p.max;
- p = s.getExtremes();
- var D = p.min, W = p.max, P = {}, X, g = !!a.sampling, m = c.enableMouseTracking !== !1, L = s.getThreshold(c.threshold), Y = a.pointArrayMap && a.pointArrayMap.join(",") === "low,high", V = !!c.stacking, Q = a.cropStart || 0, k = a.requireSorting, G = !t, z, $, q, it, et = c.findNearestPointBy === "x", nt = this.xData || this.options.xData || this.processedXData || !1, rt = function(dt, ht, at) {
- dt = Math.ceil(dt), S = et ? dt : dt + "," + ht, m && !P[S] && (P[S] = !0, i.inverted && (dt = h.len - dt, ht = s.len - ht), gt.push({ x: nt ? nt[Q + at] : !1, clientX: dt, plotX: dt, plotY: ht, i: Q + at }));
- };
- p = U(i, a), i.isBoosting = !0;
- var ct = p.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 = a.plotGroup("markerGroup", "markers", !0, 1, i.seriesGroup));
- var gt = this.points = [];
- a.buildKDTree = F, p && (O(p, this), p.pushSeries(a), B(p, this, i)), i.renderer.forExport || (ct.debug.timeKDTree && console.time("kd tree building"), f(V ? a.data : t || n, w, v));
- }
- } }), ["heatmap", "treemap"].forEach(function(w) {
- R[w] && u(R[w].prototype, "drawPoints", E);
- }), R.bubble && (delete R.bubble.prototype.buildKDTree, u(R.bubble.prototype, "markerAttribs", function(w) {
- return this.isSeriesBoosting ? !1 : w.apply(this, [].slice.call(arguments, 1));
- })), R.scatter.prototype.fill = !0, b(R.area.prototype, { fill: !0, fillOpacity: !0, sampling: !0 }), b(R.column.prototype, { fill: !0, sampling: !0 }), l.prototype.propsRequireUpdateSeries.push("boost"), l.prototype.callbacks.push(function(w) {
- N(w, "predraw", function() {
- w.boostForceChartBoost = void 0, w.boostForceChartBoost = M(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);
- }), N(w, "render", function() {
- w.ogl && w.isChartSeriesBoosting() && w.ogl.render(w);
- });
- var v = -1, a = -1;
- N(w.pointer, "afterGetHoverData", function() {
- var c = w.hoverSeries;
- if (w.markerGroup && c) {
- var p = w.inverted ? c.yAxis : c.xAxis;
- c = w.inverted ? c.xAxis : c.yAxis, (p && p.pos !== v || c && c.pos !== a) && (w.markerGroup.translate(p.pos, c.pos), v = p.pos, a = c.pos);
- }
- });
- });
- };
- }
- ), T(
- d,
- "Extensions/BoostCanvas.js",
- [d["Core/Chart/Chart.js"], d["Core/Color/Color.js"], d["Core/Globals.js"], d["Core/Series/Series.js"], d["Core/Series/SeriesRegistry.js"], d["Core/Utilities.js"]],
- function(l, y, j, I, Z, H) {
- var U = y.parse, F = j.doc, R = j.noop, N = Z.seriesTypes, b = H.addEvent, x = H.extend, u = H.fireEvent, f = H.isNumber, E = H.merge, O = H.pick, B = H.wrap, M;
- return function() {
- j.seriesTypes.heatmap && B(j.seriesTypes.heatmap.prototype, "drawPoints", function() {
- var S = this.chart, w = this.getContext(), v = this.chart.inverted, a = this.xAxis, c = this.yAxis;
- w ? (this.points.forEach(function(p) {
- var i = p.plotY;
- if (typeof i < "u" && !isNaN(i) && p.y !== null && w) {
- var h = p.shapeArgs || {};
- i = h.x, i = i === void 0 ? 0 : i;
- var s = h.y;
- s = s === void 0 ? 0 : s;
- var t = h.width;
- t = t === void 0 ? 0 : t, h = h.height, h = h === void 0 ? 0 : h, p = S.styledMode ? p.series.colorAttribs(p) : p.series.pointAttribs(p), w.fillStyle = p.fill, v ? w.fillRect(c.len - s + a.left, a.len - i + c.top, -h, -t) : w.fillRect(i + a.left, s + c.top, t, h);
- }
- }), this.canvasToSVG()) : this.chart.showLoading("Your browser doesn't support HTML5 canvas, <br>please use a modern browser");
- }), x(I.prototype, { getContext: function() {
- var S = this.chart, w = S.chartWidth, v = S.chartHeight, a = S.seriesGroup || this.group, c = this, p = function(h, s, t, o, n, A, _) {
- h.call(this, t, s, o, n, A, _);
- };
- S.isChartSeriesBoosting() && (c = S, a = S.seriesGroup);
- var i = c.ctx;
- return c.canvas || (c.canvas = F.createElement("canvas"), c.renderTarget = S.renderer.image("", 0, 0, w, v).addClass("highcharts-boost-canvas").add(a), c.ctx = i = c.canvas.getContext("2d"), S.inverted && ["moveTo", "lineTo", "rect", "arc"].forEach(function(h) {
- B(i, h, p);
- }), c.boostCopy = function() {
- c.renderTarget.attr({ href: c.canvas.toDataURL("image/png") });
- }, c.boostClear = function() {
- i.clearRect(0, 0, c.canvas.width, c.canvas.height), c === this && c.renderTarget.attr({ href: "" });
- }, c.boostClipRect = S.renderer.clipRect(), c.renderTarget.clip(c.boostClipRect)), c.canvas.width !== w && (c.canvas.width = w), c.canvas.height !== v && (c.canvas.height = v), c.renderTarget.attr({ x: 0, y: 0, width: w, height: v, style: "pointer-events: none", href: "" }), c.boostClipRect.attr(S.getBoostClipRect(c)), i;
- }, canvasToSVG: function() {
- this.chart.isChartSeriesBoosting() ? this.boostClear && this.boostClear() : (this.boostCopy || this.chart.boostCopy) && (this.boostCopy || this.chart.boostCopy)();
- }, cvsLineTo: function(S, w, v) {
- S.lineTo(w, v);
- }, renderCanvas: function() {
- var S = this, w = S.options, v = S.chart, a = this.xAxis, c = this.yAxis, p = (v.options.boost || {}).timeRendering || !1, i = 0, h = S.processedXData, s = S.processedYData, t = w.data, o = a.getExtremes(), n = o.min, A = o.max;
- o = c.getExtremes();
- var _ = o.min, D = o.max, W = {}, P, X = !!S.sampling, g = w.marker && w.marker.radius, m = this.cvsDrawPoint, L = w.lineWidth ? this.cvsLineTo : void 0, Y = g && 1 >= g ? this.cvsMarkerSquare : this.cvsMarkerCircle, V = this.cvsStrokeBatch || 1e3, Q = w.enableMouseTracking !== !1, k;
- o = w.threshold;
- var G = c.getThreshold(o), z = f(o), $ = G, q = this.fill, it = S.pointArrayMap && S.pointArrayMap.join(",") === "low,high", et = !!w.stacking, nt = S.cropStart || 0;
- o = v.options.loading;
- var rt = S.requireSorting, ct, gt = w.connectNulls, dt = !h, ht, at, J, tt, st, lt = et ? S.data : h || t, pt = S.fillOpacity ? y.parse(S.color).setOpacity(O(w.fillOpacity, 0.75)).get() : S.color, yt = function() {
- q ? (Dt.fillStyle = pt, Dt.fill()) : (Dt.strokeStyle = S.color, Dt.lineWidth = w.lineWidth, Dt.stroke());
- }, vt = function(Lt, Nt, Et, Kt) {
- i === 0 && (Dt.beginPath(), L && (Dt.lineJoin = "round")), v.scroller && S.options.className === "highcharts-navigator-series" ? (Nt += v.scroller.top, Et && (Et += v.scroller.top)) : Nt += v.plotTop, Lt += v.plotLeft, ct ? Dt.moveTo(Lt, Nt) : m ? m(Dt, Lt, Nt, Et, k) : L ? L(Dt, Lt, Nt) : Y && Y.call(S, Dt, Lt, Nt, g, Kt), i += 1, i === V && (yt(), i = 0), k = { clientX: Lt, plotY: Nt, yBottom: Et };
- }, Mt = w.findNearestPointBy === "x", Pt = this.xData || this.options.xData || this.processedXData || !1, At = function(Lt, Nt, Et) {
- st = Mt ? Lt : Lt + "," + Nt, Q && !W[st] && (W[st] = !0, v.inverted && (Lt = a.len - Lt, Nt = c.len - Nt), St.push({ x: Pt ? Pt[nt + Et] : !1, clientX: Lt, plotX: Lt, plotY: Nt, i: nt + Et }));
- };
- this.renderTarget && this.renderTarget.attr({ href: "" }), (this.points || this.graph) && this.destroyGraphics(), S.plotGroup("group", "series", S.visible ? "visible" : "hidden", w.zIndex, v.seriesGroup), S.markerGroup = S.group, b(S, "destroy", function() {
- S.markerGroup = null;
- });
- var St = this.points = [], Dt = this.getContext();
- S.buildKDTree = R, this.boostClear && this.boostClear(), this.visible && (99999 < t.length && (v.options.loading = E(o, { labelStyle: {
- backgroundColor: U("#ffffff").setOpacity(0.75).get(),
- padding: "1em",
- borderRadius: "0.5em"
- }, style: { backgroundColor: "none", opacity: 1 } }), H.clearTimeout(M), v.showLoading("Drawing..."), v.options.loading = o), p && console.time("canvas rendering"), j.eachAsync(lt, function(Lt, Nt) {
- var Et = !1, Kt = !1, Gt = !1, Wt = !1, Jt = typeof v.index > "u", be = !0;
- if (!Jt) {
- if (dt) {
- var zt = Lt[0], Vt = Lt[1];
- lt[Nt + 1] && (Gt = lt[Nt + 1][0]), lt[Nt - 1] && (Wt = lt[Nt - 1][0]);
- } else
- zt = Lt, Vt = s[Nt], lt[Nt + 1] && (Gt = lt[Nt + 1]), lt[Nt - 1] && (Wt = lt[Nt - 1]);
- if (Gt && Gt >= n && Gt <= A && (Et = !0), Wt && Wt >= n && Wt <= A && (Kt = !0), it) {
- dt && (Vt = Lt.slice(1, 3));
- var Ce = Vt[0];
- Vt = Vt[1];
- } else
- et && (zt = Lt.x, Vt = Lt.stackY, Ce = Vt - Lt.y);
- Lt = Vt === null, rt || (be = Vt >= _ && Vt <= D), !Lt && (zt >= n && zt <= A && be || Et || Kt) && (zt = Math.round(a.toPixels(zt, !0)), X ? ((typeof J > "u" || zt === P) && (it || (Ce = Vt), (typeof tt > "u" || Vt > at) && (at = Vt, tt = Nt), (typeof J > "u" || Ce < ht) && (ht = Ce, J = Nt)), zt !== P && (typeof J < "u" && (Vt = c.toPixels(at, !0), G = c.toPixels(ht, !0), vt(zt, z ? Math.min(Vt, $) : Vt, z ? Math.max(G, $) : G, Nt), At(zt, Vt, tt), G !== Vt && At(zt, G, J)), J = tt = void 0, P = zt)) : (Vt = Math.round(c.toPixels(Vt, !0)), vt(zt, Vt, G, Nt), At(zt, Vt, Nt))), ct = Lt && !gt, Nt % 5e4 === 0 && (S.boostCopy || S.chart.boostCopy) && (S.boostCopy || S.chart.boostCopy)();
- }
- return !Jt;
- }, function() {
- var Lt = v.loadingDiv, Nt = v.loadingShown;
- yt(), S.canvasToSVG(), p && console.timeEnd("canvas rendering"), u(S, "renderedCanvas"), Nt && (x(Lt.style, { transition: "opacity 250ms", opacity: 0 }), v.loadingShown = !1, M = setTimeout(function() {
- Lt.parentNode && Lt.parentNode.removeChild(Lt), v.loadingDiv = v.loadingSpan = null;
- }, 250)), delete S.buildKDTree, S.buildKDTree();
- }, v.renderer.forExport ? Number.MAX_VALUE : void 0));
- } }), N.scatter.prototype.cvsMarkerCircle = function(S, w, v, a) {
- S.moveTo(w, v), S.arc(w, v, a, 0, 2 * Math.PI, !1);
- }, N.scatter.prototype.cvsMarkerSquare = function(S, w, v, a) {
- S.rect(w - a, v - a, 2 * a, 2 * a);
- }, N.scatter.prototype.fill = !0, N.bubble && (N.bubble.prototype.cvsMarkerCircle = function(S, w, v, a, c) {
- S.moveTo(w, v), S.arc(w, v, this.radii && this.radii[c], 0, 2 * Math.PI, !1);
- }, N.bubble.prototype.cvsStrokeBatch = 1), x(N.area.prototype, {
- cvsDrawPoint: function(S, w, v, a, c) {
- c && w !== c.clientX && (S.moveTo(c.clientX, c.yBottom), S.lineTo(c.clientX, c.plotY), S.lineTo(w, v), S.lineTo(w, a));
- },
- fill: !0,
- fillOpacity: !0,
- sampling: !0
- }), x(N.column.prototype, { cvsDrawPoint: function(S, w, v, a) {
- S.rect(w - 1, v, 1, a - v);
- }, fill: !0, sampling: !0 }), l.prototype.callbacks.push(function(S) {
- b(S, "predraw", function() {
- S.renderTarget && S.renderTarget.attr({ href: "" }), S.canvas && S.canvas.getContext("2d").clearRect(0, 0, S.canvas.width, S.canvas.height);
- }), b(S, "render", function() {
- S.boostCopy && S.boostCopy();
- });
- });
- };
- }
- ), T(d, "Extensions/Boost/BoostOverrides.js", [
- d["Core/Chart/Chart.js"],
- d["Core/DefaultOptions.js"],
- d["Core/Series/Point.js"],
- d["Core/Series/Series.js"],
- d["Core/Series/SeriesRegistry.js"],
- d["Core/Utilities.js"],
- d["Extensions/Boost/BoostUtils.js"],
- d["Extensions/Boost/Boostables.js"],
- d["Extensions/Boost/BoostableMap.js"]
- ], function(l, y, j, I, Z, H, U, F, R) {
- y = y.getOptions;
- var N = Z.seriesTypes;
- Z = H.addEvent;
- var b = H.error, x = H.isArray, u = H.isNumber, f = H.pick, E = H.wrap, O = U.boostEnabled, B = U.shouldForceChartSeriesBoosting, M = y().plotOptions;
- l.prototype.isChartSeriesBoosting = function() {
- return f(this.options.boost && this.options.boost.seriesThreshold, 50) <= this.series.length || B(this);
- }, l.prototype.getBoostClipRect = function(S) {
- var w = { x: this.plotLeft, y: this.plotTop, width: this.plotWidth, height: this.plotHeight };
- return S === this && (S = this.inverted ? this.xAxis : this.yAxis, 1 >= S.length ? (w.y = Math.min(S[0].pos, w.y), w.height = S[0].pos - this.plotTop + S[0].len) : w.height = this.plotHeight), w;
- }, I.prototype.getPoint = function(S) {
- var w = S, v = this.xData || this.options.xData || this.processedXData || !1;
- return !S || S instanceof this.pointClass || (w = new this.pointClass().init(this, this.options.data[S.i], v ? v[S.i] : void 0), w.category = f(this.xAxis.categories ? this.xAxis.categories[w.x] : w.x, w.x), w.dist = S.dist, w.distX = S.distX, w.plotX = S.plotX, w.plotY = S.plotY, w.index = S.i, w.isInside = this.isPointInside(S)), w;
- }, E(I.prototype, "searchPoint", function(S) {
- return this.getPoint(S.apply(this, [].slice.call(arguments, 1)));
- }), E(j.prototype, "haloPath", function(S) {
- var w = this.series, v = this.plotX, a = this.plotY, c = w.chart.inverted;
- w.isSeriesBoosting && c && (this.plotX = w.yAxis.len - a, this.plotY = w.xAxis.len - v);
- var p = S.apply(this, Array.prototype.slice.call(
- arguments,
- 1
- ));
- return w.isSeriesBoosting && c && (this.plotX = v, this.plotY = a), p;
- }), E(I.prototype, "markerAttribs", function(S, w) {
- var v = w.plotX, a = w.plotY, c = this.chart.inverted;
- this.isSeriesBoosting && c && (w.plotX = this.yAxis.len - a, w.plotY = this.xAxis.len - v);
- var p = S.apply(this, Array.prototype.slice.call(arguments, 1));
- return this.isSeriesBoosting && c && (w.plotX = v, w.plotY = a), p;
- }), Z(I, "destroy", function() {
- var S = this, w = S.chart;
- w.markerGroup === S.markerGroup && (S.markerGroup = null), w.hoverPoints && (w.hoverPoints = w.hoverPoints.filter(function(v) {
- return v.series === S;
- })), w.hoverPoint && w.hoverPoint.series === S && (w.hoverPoint = null);
- }), E(I.prototype, "getExtremes", function(S) {
- return this.isSeriesBoosting && this.hasExtremes && this.hasExtremes() ? {} : S.apply(this, Array.prototype.slice.call(arguments, 1));
- }), ["translate", "generatePoints", "drawTracker", "drawPoints", "render"].forEach(function(S) {
- function w(v) {
- var a = this.options.stacking && (S === "translate" || S === "generatePoints");
- !this.isSeriesBoosting || a || !O(this.chart) || this.type === "heatmap" || this.type === "treemap" || !R[this.type] || this.options.boostThreshold === 0 ? v.call(this) : this[S + "Canvas"] && this[S + "Canvas"]();
- }
- E(I.prototype, S, w), S === "translate" && "column bar arearange columnrange heatmap treemap".split(" ").forEach(function(v) {
- N[v] && E(N[v].prototype, S, w);
- });
- }), E(I.prototype, "processData", function(S) {
- function w(c) {
- return v.forceCrop ? !1 : v.chart.isChartSeriesBoosting() || (c ? c.length : 0) >= (v.options.boostThreshold || Number.MAX_VALUE);
- }
- var v = this, a = this.options.data;
- O(this.chart) && R[this.type] ? (w(a) && this.type !== "heatmap" && this.type !== "treemap" && !this.options.stacking && this.hasExtremes && this.hasExtremes(!0) || (S.apply(this, Array.prototype.slice.call(arguments, 1)), a = this.processedXData), (this.isSeriesBoosting = w(a)) ? (a = void 0, this.options.data && this.options.data.length && (a = this.getFirstValidPoint(this.options.data), u(a) || x(a) || b(12, !1, this.chart)), this.enterBoost()) : this.exitBoost && this.exitBoost()) : S.apply(this, Array.prototype.slice.call(arguments, 1));
- }), Z(I, "hide", function() {
- this.canvas && this.renderTarget && (this.ogl && this.ogl.clear(), this.boostClear());
- }), I.prototype.enterBoost = function() {
- this.alteredByBoost = [], ["allowDG", "directTouch", "stickyTracking"].forEach(function(S) {
- this.alteredByBoost.push({ prop: S, val: this[S], own: Object.hasOwnProperty.call(this, S) });
- }, this), this.directTouch = this.allowDG = !1, this.finishedAnimating = this.stickyTracking = !0, this.labelBySeries && (this.labelBySeries = this.labelBySeries.destroy());
- }, I.prototype.exitBoost = function() {
- (this.alteredByBoost || []).forEach(
- function(S) {
- S.own ? this[S.prop] = S.val : delete this[S.prop];
- },
- this
- ), this.boostClear && this.boostClear();
- }, I.prototype.hasExtremes = function(S) {
- var w = this.options, v = this.xAxis && this.xAxis.options, a = this.yAxis && this.yAxis.options, c = this.colorAxis && this.colorAxis.options;
- return w.data.length > (w.boostThreshold || Number.MAX_VALUE) && u(a.min) && u(a.max) && (!S || u(v.min) && u(v.max)) && (!c || u(c.min) && u(c.max));
- }, I.prototype.destroyGraphics = function() {
- var S = this, w = this, v = this.points, a, c;
- if (v)
- for (c = 0; c < v.length; c += 1)
- (a = v[c]) && a.destroyElements && a.destroyElements();
- [
- "graph",
- "area",
- "tracker"
- ].forEach(function(p) {
- w[p] && (w[p] = w[p].destroy());
- }), this.getZonesGraphs && this.getZonesGraphs([["graph", "highcharts-graph"]]).forEach(function(p) {
- var i = S[p[0]];
- i && (S[p[0]] = i.destroy());
- });
- }, F.forEach(function(S) {
- M[S] && (M[S].boostThreshold = 5e3, M[S].boostData = [], N[S].prototype.fillOpacity = !0);
- });
- }), T(d, "Extensions/Boost/NamedColors.js", [d["Core/Color/Color.js"]], function(l) {
- 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 l.names = y;
- }), T(d, "Extensions/Boost/Boost.js", [d["Extensions/Boost/BoostUtils.js"], d["Extensions/Boost/BoostInit.js"], d["Extensions/BoostCanvas.js"], d["Core/Utilities.js"]], function(l, y, j, I) {
- I = I.error, l = l.hasWebGLSupport, l() ? y() : typeof j < "u" ? j() : I(26);
- }), T(d, "masters/modules/boost.src.js", [], function() {
- });
- });
- })(Zp);
- var N0 = Zp.exports;
- const B0 = /* @__PURE__ */ Mn(N0), j0 = (r) => {
- let d = window.location.protocol;
- /^http(s)?:&/.test(d) || (d = "http:");
- let T = {
- 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: d + "//cdn.hcharts.cn/highcharts/modules/canvas-tools.js",
- VMLRadialGradientURL: d + +"//cdn.hcharts.cn/highcharts/gfx/vml-radial-gradient.png"
- },
- exporting: {
- url: d + "//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(T);
- };
- //! moment.js
- //! version : 2.29.4
- //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
- //! license : MIT
- //! momentjs.com
- var Kp;
- function Xt() {
- return Kp.apply(null, arguments);
- }
- function W0(r) {
- Kp = r;
- }
- function Wi(r) {
- return r instanceof Array || Object.prototype.toString.call(r) === "[object Array]";
- }
- function Zr(r) {
- return r != null && Object.prototype.toString.call(r) === "[object Object]";
- }
- function me(r, d) {
- return Object.prototype.hasOwnProperty.call(r, d);
- }
- function kl(r) {
- if (Object.getOwnPropertyNames)
- return Object.getOwnPropertyNames(r).length === 0;
- var d;
- for (d in r)
- if (me(r, d))
- return !1;
- return !0;
- }
- function hi(r) {
- return r === void 0;
- }
- function gr(r) {
- return typeof r == "number" || Object.prototype.toString.call(r) === "[object Number]";
- }
- function so(r) {
- return r instanceof Date || Object.prototype.toString.call(r) === "[object Date]";
- }
- function Jp(r, d) {
- var T = [], l, y = r.length;
- for (l = 0; l < y; ++l)
- T.push(d(r[l], l));
- return T;
- }
- function Er(r, d) {
- for (var T in d)
- me(d, T) && (r[T] = d[T]);
- return me(d, "toString") && (r.toString = d.toString), me(d, "valueOf") && (r.valueOf = d.valueOf), r;
- }
- function Zi(r, d, T, l) {
- return Su(r, d, T, l, !0).utc();
- }
- function z0() {
- 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 = z0()), r._pf;
- }
- var fl;
- Array.prototype.some ? fl = Array.prototype.some : fl = function(r) {
- var d = Object(this), T = d.length >>> 0, l;
- for (l = 0; l < T; l++)
- if (l in d && r.call(this, d[l], l, d))
- return !0;
- return !1;
- };
- function Al(r) {
- if (r._isValid == null) {
- var d = oe(r), T = fl.call(d.parsedDateParts, function(y) {
- return y != null;
- }), l = !isNaN(r._d.getTime()) && d.overflow < 0 && !d.empty && !d.invalidEra && !d.invalidMonth && !d.invalidWeekday && !d.weekdayMismatch && !d.nullInput && !d.invalidFormat && !d.userInvalidated && (!d.meridiem || d.meridiem && T);
- if (r._strict && (l = l && d.charsLeftOver === 0 && d.unusedTokens.length === 0 && d.bigHour === void 0), Object.isFrozen == null || !Object.isFrozen(r))
- r._isValid = l;
- else
- return l;
- }
- return r._isValid;
- }
- function As(r) {
- var d = Zi(NaN);
- return r != null ? Er(oe(d), r) : oe(d).userInvalidated = !0, d;
- }
- var Ap = Xt.momentProperties = [], rl = !1;
- function Tl(r, d) {
- var T, l, y, j = Ap.length;
- if (hi(d._isAMomentObject) || (r._isAMomentObject = d._isAMomentObject), hi(d._i) || (r._i = d._i), hi(d._f) || (r._f = d._f), hi(d._l) || (r._l = d._l), hi(d._strict) || (r._strict = d._strict), hi(d._tzm) || (r._tzm = d._tzm), hi(d._isUTC) || (r._isUTC = d._isUTC), hi(d._offset) || (r._offset = d._offset), hi(d._pf) || (r._pf = oe(d)), hi(d._locale) || (r._locale = d._locale), j > 0)
- for (T = 0; T < j; T++)
- l = Ap[T], y = d[l], hi(y) || (r[l] = y);
- return r;
- }
- function ao(r) {
- Tl(this, r), this._d = new Date(r._d != null ? r._d.getTime() : NaN), this.isValid() || (this._d = /* @__PURE__ */ new Date(NaN)), rl === !1 && (rl = !0, Xt.updateOffset(this), rl = !1);
- }
- function zi(r) {
- return r instanceof ao || r != null && r._isAMomentObject != null;
- }
- function qp(r) {
- Xt.suppressDeprecationWarnings === !1 && typeof console < "u" && console.warn && console.warn("Deprecation warning: " + r);
- }
- function Li(r, d) {
- var T = !0;
- return Er(function() {
- if (Xt.deprecationHandler != null && Xt.deprecationHandler(null, r), T) {
- var l = [], y, j, I, Z = arguments.length;
- for (j = 0; j < Z; j++) {
- if (y = "", typeof arguments[j] == "object") {
- y += `
- [` + j + "] ";
- for (I in arguments[0])
- me(arguments[0], I) && (y += I + ": " + arguments[0][I] + ", ");
- y = y.slice(0, -2);
- } else
- y = arguments[j];
- l.push(y);
- }
- qp(
- r + `
- Arguments: ` + Array.prototype.slice.call(l).join("") + `
- ` + new Error().stack
- ), T = !1;
- }
- return d.apply(this, arguments);
- }, d);
- }
- var Tp = {};
- function Qp(r, d) {
- Xt.deprecationHandler != null && Xt.deprecationHandler(r, d), Tp[r] || (qp(d), Tp[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 Y0(r) {
- var d, T;
- for (T in r)
- me(r, T) && (d = r[T], Ki(d) ? this[T] = d : this["_" + T] = d);
- this._config = r, this._dayOfMonthOrdinalParseLenient = new RegExp(
- (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + "|" + /\d{1,2}/.source
- );
- }
- function gl(r, d) {
- var T = Er({}, r), l;
- for (l in d)
- me(d, l) && (Zr(r[l]) && Zr(d[l]) ? (T[l] = {}, Er(T[l], r[l]), Er(T[l], d[l])) : d[l] != null ? T[l] = d[l] : delete T[l]);
- for (l in r)
- me(r, l) && !me(d, l) && Zr(r[l]) && (T[l] = Er({}, T[l]));
- return T;
- }
- function Pl(r) {
- r != null && this.set(r);
- }
- var ml;
- Object.keys ? ml = Object.keys : ml = function(r) {
- var d, T = [];
- for (d in r)
- me(r, d) && T.push(d);
- return T;
- };
- var X0 = {
- sameDay: "[Today at] LT",
- nextDay: "[Tomorrow at] LT",
- nextWeek: "dddd [at] LT",
- lastDay: "[Yesterday at] LT",
- lastWeek: "[Last] dddd [at] LT",
- sameElse: "L"
- };
- function G0(r, d, T) {
- var l = this._calendar[r] || this._calendar.sameElse;
- return Ki(l) ? l.call(d, T) : l;
- }
- function $i(r, d, T) {
- var l = "" + Math.abs(r), y = d - l.length, j = r >= 0;
- return (j ? T ? "+" : "" : "-") + Math.pow(10, Math.max(0, y)).toString().substr(1) + l;
- }
- var El = /(\[[^\[]*\])|(\\)?([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, ns = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g, nl = {}, vn = {};
- function Zt(r, d, T, l) {
- var y = l;
- typeof l == "string" && (y = function() {
- return this[l]();
- }), r && (vn[r] = y), d && (vn[d[0]] = function() {
- return $i(y.apply(this, arguments), d[1], d[2]);
- }), T && (vn[T] = function() {
- return this.localeData().ordinal(
- y.apply(this, arguments),
- r
- );
- });
- }
- function H0(r) {
- return r.match(/\[[\s\S]/) ? r.replace(/^\[|\]$/g, "") : r.replace(/\\/g, "");
- }
- function F0(r) {
- var d = r.match(El), T, l;
- for (T = 0, l = d.length; T < l; T++)
- vn[d[T]] ? d[T] = vn[d[T]] : d[T] = H0(d[T]);
- return function(y) {
- var j = "", I;
- for (I = 0; I < l; I++)
- j += Ki(d[I]) ? d[I].call(y, r) : d[I];
- return j;
- };
- }
- function as(r, d) {
- return r.isValid() ? (d = tu(d, r.localeData()), nl[d] = nl[d] || F0(d), nl[d](r)) : r.localeData().invalidDate();
- }
- function tu(r, d) {
- var T = 5;
- function l(y) {
- return d.longDateFormat(y) || y;
- }
- for (ns.lastIndex = 0; T >= 0 && ns.test(r); )
- r = r.replace(
- ns,
- l
- ), ns.lastIndex = 0, T -= 1;
- return r;
- }
- var U0 = {
- 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 V0(r) {
- var d = this._longDateFormat[r], T = this._longDateFormat[r.toUpperCase()];
- return d || !T ? d : (this._longDateFormat[r] = T.match(El).map(function(l) {
- return l === "MMMM" || l === "MM" || l === "DD" || l === "dddd" ? l.slice(1) : l;
- }).join(""), this._longDateFormat[r]);
- }
- var $0 = "Invalid date";
- function Z0() {
- return this._invalidDate;
- }
- var K0 = "%d", J0 = /\d{1,2}/;
- function q0(r) {
- return this._ordinal.replace("%d", r);
- }
- var Q0 = {
- 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 t1(r, d, T, l) {
- var y = this._relativeTime[T];
- return Ki(y) ? y(r, d, T, l) : y.replace(/%d/i, r);
- }
- function e1(r, d) {
- var T = this._relativeTime[r > 0 ? "future" : "past"];
- return Ki(T) ? T(d) : T.replace(/%s/i, d);
- }
- var qn = {};
- function ti(r, d) {
- var T = r.toLowerCase();
- qn[T] = qn[T + "s"] = qn[d] = r;
- }
- function _i(r) {
- return typeof r == "string" ? qn[r] || qn[r.toLowerCase()] : void 0;
- }
- function Ol(r) {
- var d = {}, T, l;
- for (l in r)
- me(r, l) && (T = _i(l), T && (d[T] = r[l]));
- return d;
- }
- var eu = {};
- function ei(r, d) {
- eu[r] = d;
- }
- function i1(r) {
- var d = [], T;
- for (T in r)
- me(r, T) && d.push({ unit: T, priority: eu[T] });
- return d.sort(function(l, y) {
- return l.priority - y.priority;
- }), d;
- }
- function Ts(r) {
- return r % 4 === 0 && r % 100 !== 0 || r % 400 === 0;
- }
- function Ti(r) {
- return r < 0 ? Math.ceil(r) || 0 : Math.floor(r);
- }
- function le(r) {
- var d = +r, T = 0;
- return d !== 0 && isFinite(d) && (T = Ti(d)), T;
- }
- function kn(r, d) {
- return function(T) {
- return T != null ? (iu(this, r, T), Xt.updateOffset(this, d), this) : ys(this, r);
- };
- }
- function ys(r, d) {
- return r.isValid() ? r._d["get" + (r._isUTC ? "UTC" : "") + d]() : NaN;
- }
- function iu(r, d, T) {
- r.isValid() && !isNaN(T) && (d === "FullYear" && Ts(r.year()) && r.month() === 1 && r.date() === 29 ? (T = le(T), r._d["set" + (r._isUTC ? "UTC" : "") + d](
- T,
- r.month(),
- Ds(T, r.month())
- )) : r._d["set" + (r._isUTC ? "UTC" : "") + d](T));
- }
- function r1(r) {
- return r = _i(r), Ki(this[r]) ? this[r]() : this;
- }
- function n1(r, d) {
- if (typeof r == "object") {
- r = Ol(r);
- var T = i1(r), l, y = T.length;
- for (l = 0; l < y; l++)
- this[T[l].unit](r[T[l].unit]);
- } else if (r = _i(r), Ki(this[r]))
- return this[r](d);
- return this;
- }
- var ru = /\d/, vi = /\d\d/, nu = /\d{3}/, Ll = /\d{4}/, Ps = /[+-]?\d{6}/, Pe = /\d\d?/, ou = /\d\d\d\d?/, su = /\d\d\d\d\d\d?/, Es = /\d{1,3}/, _l = /\d{1,4}/, Os = /[+-]?\d{1,6}/, An = /\d+/, Ls = /[+-]?\d+/, o1 = /Z|[+-]\d\d:?\d\d/gi, _s = /Z|[+-]\d\d(?::?\d\d)?/gi, s1 = /[+-]?\d+(\.\d{1,3})?/, lo = /[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, vs;
- vs = {};
- function Ft(r, d, T) {
- vs[r] = Ki(d) ? d : function(l, y) {
- return l && T ? T : d;
- };
- }
- function a1(r, d) {
- return me(vs, r) ? vs[r](d._strict, d._locale) : new RegExp(l1(r));
- }
- function l1(r) {
- return yi(
- r.replace("\\", "").replace(
- /\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,
- function(d, T, l, y, j) {
- return T || l || y || j;
- }
- )
- );
- }
- function yi(r) {
- return r.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&");
- }
- var yl = {};
- function we(r, d) {
- var T, l = d, y;
- for (typeof r == "string" && (r = [r]), gr(d) && (l = function(j, I) {
- I[d] = le(j);
- }), y = r.length, T = 0; T < y; T++)
- yl[r[T]] = l;
- }
- function ho(r, d) {
- we(r, function(T, l, y, j) {
- y._w = y._w || {}, d(T, y._w, y, j);
- });
- }
- function h1(r, d, T) {
- d != null && me(yl, r) && yl[r](d, T._a, T, r);
- }
- var Qe = 0, pr = 1, Ui = 2, Xe = 3, ji = 4, ur = 5, Ur = 6, c1 = 7, p1 = 8;
- function u1(r, d) {
- return (r % d + d) % d;
- }
- var We;
- Array.prototype.indexOf ? We = Array.prototype.indexOf : We = function(r) {
- var d;
- for (d = 0; d < this.length; ++d)
- if (this[d] === r)
- return d;
- return -1;
- };
- function Ds(r, d) {
- if (isNaN(r) || isNaN(d))
- return NaN;
- var T = u1(d, 12);
- return r += (d - T) / 12, T === 1 ? Ts(r) ? 29 : 28 : 31 - T % 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);
- });
- ti("month", "M");
- ei("month", 8);
- Ft("M", Pe);
- Ft("MM", Pe, vi);
- Ft("MMM", function(r, d) {
- return d.monthsShortRegex(r);
- });
- Ft("MMMM", function(r, d) {
- return d.monthsRegex(r);
- });
- we(["M", "MM"], function(r, d) {
- d[pr] = le(r) - 1;
- });
- we(["MMM", "MMMM"], function(r, d, T, l) {
- var y = T._locale.monthsParse(r, l, T._strict);
- y != null ? d[pr] = y : oe(T).invalidMonth = r;
- });
- var d1 = "January_February_March_April_May_June_July_August_September_October_November_December".split(
- "_"
- ), au = "Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"), lu = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/, f1 = lo, g1 = lo;
- function m1(r, d) {
- return r ? Wi(this._months) ? this._months[r.month()] : this._months[(this._months.isFormat || lu).test(d) ? "format" : "standalone"][r.month()] : Wi(this._months) ? this._months : this._months.standalone;
- }
- function y1(r, d) {
- return r ? Wi(this._monthsShort) ? this._monthsShort[r.month()] : this._monthsShort[lu.test(d) ? "format" : "standalone"][r.month()] : Wi(this._monthsShort) ? this._monthsShort : this._monthsShort.standalone;
- }
- function v1(r, d, T) {
- var l, y, j, I = r.toLocaleLowerCase();
- if (!this._monthsParse)
- for (this._monthsParse = [], this._longMonthsParse = [], this._shortMonthsParse = [], l = 0; l < 12; ++l)
- j = Zi([2e3, l]), this._shortMonthsParse[l] = this.monthsShort(
- j,
- ""
- ).toLocaleLowerCase(), this._longMonthsParse[l] = this.months(j, "").toLocaleLowerCase();
- return T ? d === "MMM" ? (y = We.call(this._shortMonthsParse, I), y !== -1 ? y : null) : (y = We.call(this._longMonthsParse, I), y !== -1 ? y : null) : d === "MMM" ? (y = We.call(this._shortMonthsParse, I), y !== -1 ? y : (y = We.call(this._longMonthsParse, I), y !== -1 ? y : null)) : (y = We.call(this._longMonthsParse, I), y !== -1 ? y : (y = We.call(this._shortMonthsParse, I), y !== -1 ? y : null));
- }
- function x1(r, d, T) {
- var l, y, j;
- if (this._monthsParseExact)
- return v1.call(this, r, d, T);
- for (this._monthsParse || (this._monthsParse = [], this._longMonthsParse = [], this._shortMonthsParse = []), l = 0; l < 12; l++) {
- if (y = Zi([2e3, l]), T && !this._longMonthsParse[l] && (this._longMonthsParse[l] = new RegExp(
- "^" + this.months(y, "").replace(".", "") + "$",
- "i"
- ), this._shortMonthsParse[l] = new RegExp(
- "^" + this.monthsShort(y, "").replace(".", "") + "$",
- "i"
- )), !T && !this._monthsParse[l] && (j = "^" + this.months(y, "") + "|^" + this.monthsShort(y, ""), this._monthsParse[l] = new RegExp(j.replace(".", ""), "i")), T && d === "MMMM" && this._longMonthsParse[l].test(r))
- return l;
- if (T && d === "MMM" && this._shortMonthsParse[l].test(r))
- return l;
- if (!T && this._monthsParse[l].test(r))
- return l;
- }
- }
- function hu(r, d) {
- var T;
- if (!r.isValid())
- return r;
- if (typeof d == "string") {
- if (/^\d+$/.test(d))
- d = le(d);
- else if (d = r.localeData().monthsParse(d), !gr(d))
- return r;
- }
- return T = Math.min(r.date(), Ds(r.year(), d)), r._d["set" + (r._isUTC ? "UTC" : "") + "Month"](d, T), r;
- }
- function cu(r) {
- return r != null ? (hu(this, r), Xt.updateOffset(this, !0), this) : ys(this, "Month");
- }
- function b1() {
- return Ds(this.year(), this.month());
- }
- function S1(r) {
- return this._monthsParseExact ? (me(this, "_monthsRegex") || pu.call(this), r ? this._monthsShortStrictRegex : this._monthsShortRegex) : (me(this, "_monthsShortRegex") || (this._monthsShortRegex = f1), this._monthsShortStrictRegex && r ? this._monthsShortStrictRegex : this._monthsShortRegex);
- }
- function w1(r) {
- return this._monthsParseExact ? (me(this, "_monthsRegex") || pu.call(this), r ? this._monthsStrictRegex : this._monthsRegex) : (me(this, "_monthsRegex") || (this._monthsRegex = g1), this._monthsStrictRegex && r ? this._monthsStrictRegex : this._monthsRegex);
- }
- function pu() {
- function r(I, Z) {
- return Z.length - I.length;
- }
- var d = [], T = [], l = [], y, j;
- for (y = 0; y < 12; y++)
- j = Zi([2e3, y]), d.push(this.monthsShort(j, "")), T.push(this.months(j, "")), l.push(this.months(j, "")), l.push(this.monthsShort(j, ""));
- for (d.sort(r), T.sort(r), l.sort(r), y = 0; y < 12; y++)
- d[y] = yi(d[y]), T[y] = yi(T[y]);
- for (y = 0; y < 24; y++)
- l[y] = yi(l[y]);
- this._monthsRegex = new RegExp("^(" + l.join("|") + ")", "i"), this._monthsShortRegex = this._monthsRegex, this._monthsStrictRegex = new RegExp(
- "^(" + T.join("|") + ")",
- "i"
- ), this._monthsShortStrictRegex = new RegExp(
- "^(" + d.join("|") + ")",
- "i"
- );
- }
- 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");
- ti("year", "y");
- ei("year", 1);
- Ft("Y", Ls);
- Ft("YY", Pe, vi);
- Ft("YYYY", _l, Ll);
- Ft("YYYYY", Os, Ps);
- Ft("YYYYYY", Os, Ps);
- we(["YYYYY", "YYYYYY"], Qe);
- we("YYYY", function(r, d) {
- d[Qe] = r.length === 2 ? Xt.parseTwoDigitYear(r) : le(r);
- });
- we("YY", function(r, d) {
- d[Qe] = Xt.parseTwoDigitYear(r);
- });
- we("Y", function(r, d) {
- d[Qe] = parseInt(r, 10);
- });
- function Qn(r) {
- return Ts(r) ? 366 : 365;
- }
- Xt.parseTwoDigitYear = function(r) {
- return le(r) + (le(r) > 68 ? 1900 : 2e3);
- };
- var uu = kn("FullYear", !0);
- function C1() {
- return Ts(this.year());
- }
- function M1(r, d, T, l, y, j, I) {
- var Z;
- return r < 100 && r >= 0 ? (Z = new Date(r + 400, d, T, l, y, j, I), isFinite(Z.getFullYear()) && Z.setFullYear(r)) : Z = new Date(r, d, T, l, y, j, I), Z;
- }
- function eo(r) {
- var d, T;
- return r < 100 && r >= 0 ? (T = Array.prototype.slice.call(arguments), T[0] = r + 400, d = new Date(Date.UTC.apply(null, T)), isFinite(d.getUTCFullYear()) && d.setUTCFullYear(r)) : d = new Date(Date.UTC.apply(null, arguments)), d;
- }
- function xs(r, d, T) {
- var l = 7 + d - T, y = (7 + eo(r, 0, l).getUTCDay() - d) % 7;
- return -y + l - 1;
- }
- function du(r, d, T, l, y) {
- var j = (7 + T - l) % 7, I = xs(r, l, y), Z = 1 + 7 * (d - 1) + j + I, H, U;
- return Z <= 0 ? (H = r - 1, U = Qn(H) + Z) : Z > Qn(r) ? (H = r + 1, U = Z - Qn(r)) : (H = r, U = Z), {
- year: H,
- dayOfYear: U
- };
- }
- function io(r, d, T) {
- var l = xs(r.year(), d, T), y = Math.floor((r.dayOfYear() - l - 1) / 7) + 1, j, I;
- return y < 1 ? (I = r.year() - 1, j = y + dr(I, d, T)) : y > dr(r.year(), d, T) ? (j = y - dr(r.year(), d, T), I = r.year() + 1) : (I = r.year(), j = y), {
- week: j,
- year: I
- };
- }
- function dr(r, d, T) {
- var l = xs(r, d, T), y = xs(r + 1, d, T);
- return (Qn(r) - l + y) / 7;
- }
- Zt("w", ["ww", 2], "wo", "week");
- Zt("W", ["WW", 2], "Wo", "isoWeek");
- ti("week", "w");
- ti("isoWeek", "W");
- ei("week", 5);
- ei("isoWeek", 5);
- Ft("w", Pe);
- Ft("ww", Pe, vi);
- Ft("W", Pe);
- Ft("WW", Pe, vi);
- ho(
- ["w", "ww", "W", "WW"],
- function(r, d, T, l) {
- d[l.substr(0, 1)] = le(r);
- }
- );
- function k1(r) {
- return io(r, this._week.dow, this._week.doy).week;
- }
- var A1 = {
- 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 T1() {
- return this._week.dow;
- }
- function P1() {
- return this._week.doy;
- }
- function E1(r) {
- var d = this.localeData().week(this);
- return r == null ? d : this.add((r - d) * 7, "d");
- }
- function O1(r) {
- var d = io(this, 1, 4).week;
- return r == null ? d : this.add((r - d) * 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");
- ti("day", "d");
- ti("weekday", "e");
- ti("isoWeekday", "E");
- ei("day", 11);
- ei("weekday", 11);
- ei("isoWeekday", 11);
- Ft("d", Pe);
- Ft("e", Pe);
- Ft("E", Pe);
- Ft("dd", function(r, d) {
- return d.weekdaysMinRegex(r);
- });
- Ft("ddd", function(r, d) {
- return d.weekdaysShortRegex(r);
- });
- Ft("dddd", function(r, d) {
- return d.weekdaysRegex(r);
- });
- ho(["dd", "ddd", "dddd"], function(r, d, T, l) {
- var y = T._locale.weekdaysParse(r, l, T._strict);
- y != null ? d.d = y : oe(T).invalidWeekday = r;
- });
- ho(["d", "e", "E"], function(r, d, T, l) {
- d[l] = le(r);
- });
- function L1(r, d) {
- return typeof r != "string" ? r : isNaN(r) ? (r = d.weekdaysParse(r), typeof r == "number" ? r : null) : parseInt(r, 10);
- }
- function _1(r, d) {
- return typeof r == "string" ? d.weekdaysParse(r) % 7 || 7 : isNaN(r) ? null : r;
- }
- function Dl(r, d) {
- return r.slice(d, 7).concat(r.slice(0, d));
- }
- var D1 = "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), fu = "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"), I1 = "Su_Mo_Tu_We_Th_Fr_Sa".split("_"), R1 = lo, N1 = lo, B1 = lo;
- function j1(r, d) {
- var T = Wi(this._weekdays) ? this._weekdays : this._weekdays[r && r !== !0 && this._weekdays.isFormat.test(d) ? "format" : "standalone"];
- return r === !0 ? Dl(T, this._week.dow) : r ? T[r.day()] : T;
- }
- function W1(r) {
- return r === !0 ? Dl(this._weekdaysShort, this._week.dow) : r ? this._weekdaysShort[r.day()] : this._weekdaysShort;
- }
- function z1(r) {
- return r === !0 ? Dl(this._weekdaysMin, this._week.dow) : r ? this._weekdaysMin[r.day()] : this._weekdaysMin;
- }
- function Y1(r, d, T) {
- var l, y, j, I = r.toLocaleLowerCase();
- if (!this._weekdaysParse)
- for (this._weekdaysParse = [], this._shortWeekdaysParse = [], this._minWeekdaysParse = [], l = 0; l < 7; ++l)
- j = Zi([2e3, 1]).day(l), this._minWeekdaysParse[l] = this.weekdaysMin(
- j,
- ""
- ).toLocaleLowerCase(), this._shortWeekdaysParse[l] = this.weekdaysShort(
- j,
- ""
- ).toLocaleLowerCase(), this._weekdaysParse[l] = this.weekdays(j, "").toLocaleLowerCase();
- return T ? d === "dddd" ? (y = We.call(this._weekdaysParse, I), y !== -1 ? y : null) : d === "ddd" ? (y = We.call(this._shortWeekdaysParse, I), y !== -1 ? y : null) : (y = We.call(this._minWeekdaysParse, I), y !== -1 ? y : null) : d === "dddd" ? (y = We.call(this._weekdaysParse, I), y !== -1 || (y = We.call(this._shortWeekdaysParse, I), y !== -1) ? y : (y = We.call(this._minWeekdaysParse, I), y !== -1 ? y : null)) : d === "ddd" ? (y = We.call(this._shortWeekdaysParse, I), y !== -1 || (y = We.call(this._weekdaysParse, I), y !== -1) ? y : (y = We.call(this._minWeekdaysParse, I), y !== -1 ? y : null)) : (y = We.call(this._minWeekdaysParse, I), y !== -1 || (y = We.call(this._weekdaysParse, I), y !== -1) ? y : (y = We.call(this._shortWeekdaysParse, I), y !== -1 ? y : null));
- }
- function X1(r, d, T) {
- var l, y, j;
- if (this._weekdaysParseExact)
- return Y1.call(this, r, d, T);
- for (this._weekdaysParse || (this._weekdaysParse = [], this._minWeekdaysParse = [], this._shortWeekdaysParse = [], this._fullWeekdaysParse = []), l = 0; l < 7; l++) {
- if (y = Zi([2e3, 1]).day(l), T && !this._fullWeekdaysParse[l] && (this._fullWeekdaysParse[l] = new RegExp(
- "^" + this.weekdays(y, "").replace(".", "\\.?") + "$",
- "i"
- ), this._shortWeekdaysParse[l] = new RegExp(
- "^" + this.weekdaysShort(y, "").replace(".", "\\.?") + "$",
- "i"
- ), this._minWeekdaysParse[l] = new RegExp(
- "^" + this.weekdaysMin(y, "").replace(".", "\\.?") + "$",
- "i"
- )), this._weekdaysParse[l] || (j = "^" + this.weekdays(y, "") + "|^" + this.weekdaysShort(y, "") + "|^" + this.weekdaysMin(y, ""), this._weekdaysParse[l] = new RegExp(j.replace(".", ""), "i")), T && d === "dddd" && this._fullWeekdaysParse[l].test(r))
- return l;
- if (T && d === "ddd" && this._shortWeekdaysParse[l].test(r))
- return l;
- if (T && d === "dd" && this._minWeekdaysParse[l].test(r))
- return l;
- if (!T && this._weekdaysParse[l].test(r))
- return l;
- }
- }
- function G1(r) {
- if (!this.isValid())
- return r != null ? this : NaN;
- var d = this._isUTC ? this._d.getUTCDay() : this._d.getDay();
- return r != null ? (r = L1(r, this.localeData()), this.add(r - d, "d")) : d;
- }
- function H1(r) {
- if (!this.isValid())
- return r != null ? this : NaN;
- var d = (this.day() + 7 - this.localeData()._week.dow) % 7;
- return r == null ? d : this.add(r - d, "d");
- }
- function F1(r) {
- if (!this.isValid())
- return r != null ? this : NaN;
- if (r != null) {
- var d = _1(r, this.localeData());
- return this.day(this.day() % 7 ? d : d - 7);
- } else
- return this.day() || 7;
- }
- function U1(r) {
- return this._weekdaysParseExact ? (me(this, "_weekdaysRegex") || Il.call(this), r ? this._weekdaysStrictRegex : this._weekdaysRegex) : (me(this, "_weekdaysRegex") || (this._weekdaysRegex = R1), this._weekdaysStrictRegex && r ? this._weekdaysStrictRegex : this._weekdaysRegex);
- }
- function V1(r) {
- return this._weekdaysParseExact ? (me(this, "_weekdaysRegex") || Il.call(this), r ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex) : (me(this, "_weekdaysShortRegex") || (this._weekdaysShortRegex = N1), this._weekdaysShortStrictRegex && r ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex);
- }
- function $1(r) {
- return this._weekdaysParseExact ? (me(this, "_weekdaysRegex") || Il.call(this), r ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex) : (me(this, "_weekdaysMinRegex") || (this._weekdaysMinRegex = B1), this._weekdaysMinStrictRegex && r ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex);
- }
- function Il() {
- function r(F, R) {
- return R.length - F.length;
- }
- var d = [], T = [], l = [], y = [], j, I, Z, H, U;
- for (j = 0; j < 7; j++)
- I = Zi([2e3, 1]).day(j), Z = yi(this.weekdaysMin(I, "")), H = yi(this.weekdaysShort(I, "")), U = yi(this.weekdays(I, "")), d.push(Z), T.push(H), l.push(U), y.push(Z), y.push(H), y.push(U);
- d.sort(r), T.sort(r), l.sort(r), y.sort(r), this._weekdaysRegex = new RegExp("^(" + y.join("|") + ")", "i"), this._weekdaysShortRegex = this._weekdaysRegex, this._weekdaysMinRegex = this._weekdaysRegex, this._weekdaysStrictRegex = new RegExp(
- "^(" + l.join("|") + ")",
- "i"
- ), this._weekdaysShortStrictRegex = new RegExp(
- "^(" + T.join("|") + ")",
- "i"
- ), this._weekdaysMinStrictRegex = new RegExp(
- "^(" + d.join("|") + ")",
- "i"
- );
- }
- function Rl() {
- return this.hours() % 12 || 12;
- }
- function Z1() {
- return this.hours() || 24;
- }
- Zt("H", ["HH", 2], 0, "hour");
- Zt("h", ["hh", 2], 0, Rl);
- Zt("k", ["kk", 2], 0, Z1);
- Zt("hmm", 0, 0, function() {
- return "" + Rl.apply(this) + $i(this.minutes(), 2);
- });
- Zt("hmmss", 0, 0, function() {
- return "" + Rl.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 gu(r, d) {
- Zt(r, 0, 0, function() {
- return this.localeData().meridiem(
- this.hours(),
- this.minutes(),
- d
- );
- });
- }
- gu("a", !0);
- gu("A", !1);
- ti("hour", "h");
- ei("hour", 13);
- function mu(r, d) {
- return d._meridiemParse;
- }
- Ft("a", mu);
- Ft("A", mu);
- Ft("H", Pe);
- Ft("h", Pe);
- Ft("k", Pe);
- Ft("HH", Pe, vi);
- Ft("hh", Pe, vi);
- Ft("kk", Pe, vi);
- Ft("hmm", ou);
- Ft("hmmss", su);
- Ft("Hmm", ou);
- Ft("Hmmss", su);
- we(["H", "HH"], Xe);
- we(["k", "kk"], function(r, d, T) {
- var l = le(r);
- d[Xe] = l === 24 ? 0 : l;
- });
- we(["a", "A"], function(r, d, T) {
- T._isPm = T._locale.isPM(r), T._meridiem = r;
- });
- we(["h", "hh"], function(r, d, T) {
- d[Xe] = le(r), oe(T).bigHour = !0;
- });
- we("hmm", function(r, d, T) {
- var l = r.length - 2;
- d[Xe] = le(r.substr(0, l)), d[ji] = le(r.substr(l)), oe(T).bigHour = !0;
- });
- we("hmmss", function(r, d, T) {
- var l = r.length - 4, y = r.length - 2;
- d[Xe] = le(r.substr(0, l)), d[ji] = le(r.substr(l, 2)), d[ur] = le(r.substr(y)), oe(T).bigHour = !0;
- });
- we("Hmm", function(r, d, T) {
- var l = r.length - 2;
- d[Xe] = le(r.substr(0, l)), d[ji] = le(r.substr(l));
- });
- we("Hmmss", function(r, d, T) {
- var l = r.length - 4, y = r.length - 2;
- d[Xe] = le(r.substr(0, l)), d[ji] = le(r.substr(l, 2)), d[ur] = le(r.substr(y));
- });
- function K1(r) {
- return (r + "").toLowerCase().charAt(0) === "p";
- }
- var J1 = /[ap]\.?m?\.?/i, q1 = kn("Hours", !0);
- function Q1(r, d, T) {
- return r > 11 ? T ? "pm" : "PM" : T ? "am" : "AM";
- }
- var yu = {
- calendar: X0,
- longDateFormat: U0,
- invalidDate: $0,
- ordinal: K0,
- dayOfMonthOrdinalParse: J0,
- relativeTime: Q0,
- months: d1,
- monthsShort: au,
- week: A1,
- weekdays: D1,
- weekdaysMin: I1,
- weekdaysShort: fu,
- meridiemParse: J1
- }, Oe = {}, $n = {}, ro;
- function tb(r, d) {
- var T, l = Math.min(r.length, d.length);
- for (T = 0; T < l; T += 1)
- if (r[T] !== d[T])
- return T;
- return l;
- }
- function Pp(r) {
- return r && r.toLowerCase().replace("_", "-");
- }
- function eb(r) {
- for (var d = 0, T, l, y, j; d < r.length; ) {
- for (j = Pp(r[d]).split("-"), T = j.length, l = Pp(r[d + 1]), l = l ? l.split("-") : null; T > 0; ) {
- if (y = Is(j.slice(0, T).join("-")), y)
- return y;
- if (l && l.length >= T && tb(j, l) >= T - 1)
- break;
- T--;
- }
- d++;
- }
- return ro;
- }
- function ib(r) {
- return r.match("^[^/\\\\]*$") != null;
- }
- function Is(r) {
- var d = null, T;
- if (Oe[r] === void 0 && typeof module < "u" && module && module.exports && ib(r))
- try {
- d = ro._abbr, T = require, T("./locale/" + r), Lr(d);
- } catch {
- Oe[r] = null;
- }
- return Oe[r];
- }
- function Lr(r, d) {
- var T;
- return r && (hi(d) ? T = yr(r) : T = Nl(r, d), T ? ro = T : typeof console < "u" && console.warn && console.warn(
- "Locale " + r + " not found. Did you forget to load it?"
- )), ro._abbr;
- }
- function Nl(r, d) {
- if (d !== null) {
- var T, l = yu;
- if (d.abbr = r, Oe[r] != null)
- Qp(
- "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."
- ), l = Oe[r]._config;
- else if (d.parentLocale != null)
- if (Oe[d.parentLocale] != null)
- l = Oe[d.parentLocale]._config;
- else if (T = Is(d.parentLocale), T != null)
- l = T._config;
- else
- return $n[d.parentLocale] || ($n[d.parentLocale] = []), $n[d.parentLocale].push({
- name: r,
- config: d
- }), null;
- return Oe[r] = new Pl(gl(l, d)), $n[r] && $n[r].forEach(function(y) {
- Nl(y.name, y.config);
- }), Lr(r), Oe[r];
- } else
- return delete Oe[r], null;
- }
- function rb(r, d) {
- if (d != null) {
- var T, l, y = yu;
- Oe[r] != null && Oe[r].parentLocale != null ? Oe[r].set(gl(Oe[r]._config, d)) : (l = Is(r), l != null && (y = l._config), d = gl(y, d), l == null && (d.abbr = r), T = new Pl(d), T.parentLocale = Oe[r], Oe[r] = T), Lr(r);
- } else
- Oe[r] != null && (Oe[r].parentLocale != null ? (Oe[r] = Oe[r].parentLocale, r === Lr() && Lr(r)) : Oe[r] != null && delete Oe[r]);
- return Oe[r];
- }
- function yr(r) {
- var d;
- if (r && r._locale && r._locale._abbr && (r = r._locale._abbr), !r)
- return ro;
- if (!Wi(r)) {
- if (d = Is(r), d)
- return d;
- r = [r];
- }
- return eb(r);
- }
- function nb() {
- return ml(Oe);
- }
- function Bl(r) {
- var d, T = r._a;
- return T && oe(r).overflow === -2 && (d = T[pr] < 0 || T[pr] > 11 ? pr : T[Ui] < 1 || T[Ui] > Ds(T[Qe], T[pr]) ? Ui : T[Xe] < 0 || T[Xe] > 24 || T[Xe] === 24 && (T[ji] !== 0 || T[ur] !== 0 || T[Ur] !== 0) ? Xe : T[ji] < 0 || T[ji] > 59 ? ji : T[ur] < 0 || T[ur] > 59 ? ur : T[Ur] < 0 || T[Ur] > 999 ? Ur : -1, oe(r)._overflowDayOfYear && (d < Qe || d > Ui) && (d = Ui), oe(r)._overflowWeeks && d === -1 && (d = c1), oe(r)._overflowWeekday && d === -1 && (d = p1), oe(r).overflow = d), r;
- }
- var ob = /^\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)?)?$/, sb = /^\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)?)?$/, ab = /Z|[+-]\d\d(?::?\d\d)?/, os = [
- ["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/]
- ], lb = /^\/?Date\((-?\d+)/i, hb = /^(?:(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}))$/, cb = {
- 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 vu(r) {
- var d, T, l = r._i, y = ob.exec(l) || sb.exec(l), j, I, Z, H, U = os.length, F = ol.length;
- if (y) {
- for (oe(r).iso = !0, d = 0, T = U; d < T; d++)
- if (os[d][1].exec(y[1])) {
- I = os[d][0], j = os[d][2] !== !1;
- break;
- }
- if (I == null) {
- r._isValid = !1;
- return;
- }
- if (y[3]) {
- for (d = 0, T = F; d < T; d++)
- if (ol[d][1].exec(y[3])) {
- Z = (y[2] || " ") + ol[d][0];
- break;
- }
- if (Z == null) {
- r._isValid = !1;
- return;
- }
- }
- if (!j && Z != null) {
- r._isValid = !1;
- return;
- }
- if (y[4])
- if (ab.exec(y[4]))
- H = "Z";
- else {
- r._isValid = !1;
- return;
- }
- r._f = I + (Z || "") + (H || ""), Wl(r);
- } else
- r._isValid = !1;
- }
- function pb(r, d, T, l, y, j) {
- var I = [
- ub(r),
- au.indexOf(d),
- parseInt(T, 10),
- parseInt(l, 10),
- parseInt(y, 10)
- ];
- return j && I.push(parseInt(j, 10)), I;
- }
- function ub(r) {
- var d = parseInt(r, 10);
- return d <= 49 ? 2e3 + d : d <= 999 ? 1900 + d : d;
- }
- function db(r) {
- return r.replace(/\([^()]*\)|[\n\t]/g, " ").replace(/(\s\s+)/g, " ").replace(/^\s\s*/, "").replace(/\s\s*$/, "");
- }
- function fb(r, d, T) {
- if (r) {
- var l = fu.indexOf(r), y = new Date(
- d[0],
- d[1],
- d[2]
- ).getDay();
- if (l !== y)
- return oe(T).weekdayMismatch = !0, T._isValid = !1, !1;
- }
- return !0;
- }
- function gb(r, d, T) {
- if (r)
- return cb[r];
- if (d)
- return 0;
- var l = parseInt(T, 10), y = l % 100, j = (l - y) / 100;
- return j * 60 + y;
- }
- function xu(r) {
- var d = hb.exec(db(r._i)), T;
- if (d) {
- if (T = pb(
- d[4],
- d[3],
- d[2],
- d[5],
- d[6],
- d[7]
- ), !fb(d[1], T, r))
- return;
- r._a = T, r._tzm = gb(d[8], d[9], d[10]), r._d = eo.apply(null, r._a), r._d.setUTCMinutes(r._d.getUTCMinutes() - r._tzm), oe(r).rfc2822 = !0;
- } else
- r._isValid = !1;
- }
- function mb(r) {
- var d = lb.exec(r._i);
- if (d !== null) {
- r._d = /* @__PURE__ */ new Date(+d[1]);
- return;
- }
- if (vu(r), r._isValid === !1)
- delete r._isValid;
- else
- return;
- if (xu(r), r._isValid === !1)
- delete r._isValid;
- else
- return;
- r._strict ? r._isValid = !1 : Xt.createFromInputFallback(r);
- }
- Xt.createFromInputFallback = Li(
- "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, d, T) {
- return r ?? d ?? T;
- }
- function yb(r) {
- var d = new Date(Xt.now());
- return r._useUTC ? [
- d.getUTCFullYear(),
- d.getUTCMonth(),
- d.getUTCDate()
- ] : [d.getFullYear(), d.getMonth(), d.getDate()];
- }
- function jl(r) {
- var d, T, l = [], y, j, I;
- if (!r._d) {
- for (y = yb(r), r._w && r._a[Ui] == null && r._a[pr] == null && vb(r), r._dayOfYear != null && (I = gn(r._a[Qe], y[Qe]), (r._dayOfYear > Qn(I) || r._dayOfYear === 0) && (oe(r)._overflowDayOfYear = !0), T = eo(I, 0, r._dayOfYear), r._a[pr] = T.getUTCMonth(), r._a[Ui] = T.getUTCDate()), d = 0; d < 3 && r._a[d] == null; ++d)
- r._a[d] = l[d] = y[d];
- for (; d < 7; d++)
- r._a[d] = l[d] = r._a[d] == null ? d === 2 ? 1 : 0 : r._a[d];
- r._a[Xe] === 24 && r._a[ji] === 0 && r._a[ur] === 0 && r._a[Ur] === 0 && (r._nextDay = !0, r._a[Xe] = 0), r._d = (r._useUTC ? eo : M1).apply(
- null,
- l
- ), j = r._useUTC ? r._d.getUTCDay() : r._d.getDay(), r._tzm != null && r._d.setUTCMinutes(r._d.getUTCMinutes() - r._tzm), r._nextDay && (r._a[Xe] = 24), r._w && typeof r._w.d < "u" && r._w.d !== j && (oe(r).weekdayMismatch = !0);
- }
- }
- function vb(r) {
- var d, T, l, y, j, I, Z, H, U;
- d = r._w, d.GG != null || d.W != null || d.E != null ? (j = 1, I = 4, T = gn(
- d.GG,
- r._a[Qe],
- io(Te(), 1, 4).year
- ), l = gn(d.W, 1), y = gn(d.E, 1), (y < 1 || y > 7) && (H = !0)) : (j = r._locale._week.dow, I = r._locale._week.doy, U = io(Te(), j, I), T = gn(d.gg, r._a[Qe], U.year), l = gn(d.w, U.week), d.d != null ? (y = d.d, (y < 0 || y > 6) && (H = !0)) : d.e != null ? (y = d.e + j, (d.e < 0 || d.e > 6) && (H = !0)) : y = j), l < 1 || l > dr(T, j, I) ? oe(r)._overflowWeeks = !0 : H != null ? oe(r)._overflowWeekday = !0 : (Z = du(T, l, y, j, I), r._a[Qe] = Z.year, r._dayOfYear = Z.dayOfYear);
- }
- Xt.ISO_8601 = function() {
- };
- Xt.RFC_2822 = function() {
- };
- function Wl(r) {
- if (r._f === Xt.ISO_8601) {
- vu(r);
- return;
- }
- if (r._f === Xt.RFC_2822) {
- xu(r);
- return;
- }
- r._a = [], oe(r).empty = !0;
- var d = "" + r._i, T, l, y, j, I, Z = d.length, H = 0, U, F;
- for (y = tu(r._f, r._locale).match(El) || [], F = y.length, T = 0; T < F; T++)
- j = y[T], l = (d.match(a1(j, r)) || [])[0], l && (I = d.substr(0, d.indexOf(l)), I.length > 0 && oe(r).unusedInput.push(I), d = d.slice(
- d.indexOf(l) + l.length
- ), H += l.length), vn[j] ? (l ? oe(r).empty = !1 : oe(r).unusedTokens.push(j), h1(j, l, r)) : r._strict && !l && oe(r).unusedTokens.push(j);
- oe(r).charsLeftOver = Z - H, d.length > 0 && oe(r).unusedInput.push(d), r._a[Xe] <= 12 && oe(r).bigHour === !0 && r._a[Xe] > 0 && (oe(r).bigHour = void 0), oe(r).parsedDateParts = r._a.slice(0), oe(r).meridiem = r._meridiem, r._a[Xe] = xb(
- r._locale,
- r._a[Xe],
- r._meridiem
- ), U = oe(r).era, U !== null && (r._a[Qe] = r._locale.erasConvertYear(U, r._a[Qe])), jl(r), Bl(r);
- }
- function xb(r, d, T) {
- var l;
- return T == null ? d : r.meridiemHour != null ? r.meridiemHour(d, T) : (r.isPM != null && (l = r.isPM(T), l && d < 12 && (d += 12), !l && d === 12 && (d = 0)), d);
- }
- function bb(r) {
- var d, T, l, y, j, I, Z = !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++)
- j = 0, I = !1, d = Tl({}, r), r._useUTC != null && (d._useUTC = r._useUTC), d._f = r._f[y], Wl(d), Al(d) && (I = !0), j += oe(d).charsLeftOver, j += oe(d).unusedTokens.length * 10, oe(d).score = j, Z ? j < l && (l = j, T = d) : (l == null || j < l || I) && (l = j, T = d, I && (Z = !0));
- Er(r, T || d);
- }
- function Sb(r) {
- if (!r._d) {
- var d = Ol(r._i), T = d.day === void 0 ? d.date : d.day;
- r._a = Jp(
- [d.year, d.month, T, d.hour, d.minute, d.second, d.millisecond],
- function(l) {
- return l && parseInt(l, 10);
- }
- ), jl(r);
- }
- }
- function wb(r) {
- var d = new ao(Bl(bu(r)));
- return d._nextDay && (d.add(1, "d"), d._nextDay = void 0), d;
- }
- function bu(r) {
- var d = r._i, T = r._f;
- return r._locale = r._locale || yr(r._l), d === null || T === void 0 && d === "" ? As({ nullInput: !0 }) : (typeof d == "string" && (r._i = d = r._locale.preparse(d)), zi(d) ? new ao(Bl(d)) : (so(d) ? r._d = d : Wi(T) ? bb(r) : T ? Wl(r) : Cb(r), Al(r) || (r._d = null), r));
- }
- function Cb(r) {
- var d = r._i;
- hi(d) ? r._d = new Date(Xt.now()) : so(d) ? r._d = new Date(d.valueOf()) : typeof d == "string" ? mb(r) : Wi(d) ? (r._a = Jp(d.slice(0), function(T) {
- return parseInt(T, 10);
- }), jl(r)) : Zr(d) ? Sb(r) : gr(d) ? r._d = new Date(d) : Xt.createFromInputFallback(r);
- }
- function Su(r, d, T, l, y) {
- var j = {};
- return (d === !0 || d === !1) && (l = d, d = void 0), (T === !0 || T === !1) && (l = T, T = void 0), (Zr(r) && kl(r) || Wi(r) && r.length === 0) && (r = void 0), j._isAMomentObject = !0, j._useUTC = j._isUTC = y, j._l = T, j._i = r, j._f = d, j._strict = l, wb(j);
- }
- function Te(r, d, T, l) {
- return Su(r, d, T, l, !1);
- }
- var Mb = Li(
- "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 : As();
- }
- ), kb = Li(
- "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 : As();
- }
- );
- function wu(r, d) {
- var T, l;
- if (d.length === 1 && Wi(d[0]) && (d = d[0]), !d.length)
- return Te();
- for (T = d[0], l = 1; l < d.length; ++l)
- (!d[l].isValid() || d[l][r](T)) && (T = d[l]);
- return T;
- }
- function Ab() {
- var r = [].slice.call(arguments, 0);
- return wu("isBefore", r);
- }
- function Tb() {
- var r = [].slice.call(arguments, 0);
- return wu("isAfter", r);
- }
- var Pb = function() {
- return Date.now ? Date.now() : +/* @__PURE__ */ new Date();
- }, Zn = [
- "year",
- "quarter",
- "month",
- "week",
- "day",
- "hour",
- "minute",
- "second",
- "millisecond"
- ];
- function Eb(r) {
- var d, T = !1, l, y = Zn.length;
- for (d in r)
- if (me(r, d) && !(We.call(Zn, d) !== -1 && (r[d] == null || !isNaN(r[d]))))
- return !1;
- for (l = 0; l < y; ++l)
- if (r[Zn[l]]) {
- if (T)
- return !1;
- parseFloat(r[Zn[l]]) !== le(r[Zn[l]]) && (T = !0);
- }
- return !0;
- }
- function Ob() {
- return this._isValid;
- }
- function Lb() {
- return Yi(NaN);
- }
- function Rs(r) {
- var d = Ol(r), T = d.year || 0, l = d.quarter || 0, y = d.month || 0, j = d.week || d.isoWeek || 0, I = d.day || 0, Z = d.hour || 0, H = d.minute || 0, U = d.second || 0, F = d.millisecond || 0;
- this._isValid = Eb(d), this._milliseconds = +F + U * 1e3 + // 1000
- H * 6e4 + // 1000 * 60
- Z * 1e3 * 60 * 60, this._days = +I + j * 7, this._months = +y + l * 3 + T * 12, this._data = {}, this._locale = yr(), this._bubble();
- }
- function ls(r) {
- return r instanceof Rs;
- }
- function vl(r) {
- return r < 0 ? Math.round(-1 * r) * -1 : Math.round(r);
- }
- function _b(r, d, T) {
- var l = Math.min(r.length, d.length), y = Math.abs(r.length - d.length), j = 0, I;
- for (I = 0; I < l; I++)
- (T && r[I] !== d[I] || !T && le(r[I]) !== le(d[I])) && j++;
- return j + y;
- }
- function Cu(r, d) {
- Zt(r, 0, 0, function() {
- var T = this.utcOffset(), l = "+";
- return T < 0 && (T = -T, l = "-"), l + $i(~~(T / 60), 2) + d + $i(~~T % 60, 2);
- });
- }
- Cu("Z", ":");
- Cu("ZZ", "");
- Ft("Z", _s);
- Ft("ZZ", _s);
- we(["Z", "ZZ"], function(r, d, T) {
- T._useUTC = !0, T._tzm = zl(_s, r);
- });
- var Db = /([\+\-]|\d\d)/gi;
- function zl(r, d) {
- var T = (d || "").match(r), l, y, j;
- return T === null ? null : (l = T[T.length - 1] || [], y = (l + "").match(Db) || ["-", 0, 0], j = +(y[1] * 60) + le(y[2]), j === 0 ? 0 : y[0] === "+" ? j : -j);
- }
- function Yl(r, d) {
- var T, l;
- return d._isUTC ? (T = d.clone(), l = (zi(r) || so(r) ? r.valueOf() : Te(r).valueOf()) - T.valueOf(), T._d.setTime(T._d.valueOf() + l), Xt.updateOffset(T, !1), T) : Te(r).local();
- }
- function xl(r) {
- return -Math.round(r._d.getTimezoneOffset());
- }
- Xt.updateOffset = function() {
- };
- function Ib(r, d, T) {
- var l = this._offset || 0, y;
- if (!this.isValid())
- return r != null ? this : NaN;
- if (r != null) {
- if (typeof r == "string") {
- if (r = zl(_s, r), r === null)
- return this;
- } else
- Math.abs(r) < 16 && !T && (r = r * 60);
- return !this._isUTC && d && (y = xl(this)), this._offset = r, this._isUTC = !0, y != null && this.add(y, "m"), l !== r && (!d || this._changeInProgress ? Au(
- this,
- Yi(r - l, "m"),
- 1,
- !1
- ) : this._changeInProgress || (this._changeInProgress = !0, Xt.updateOffset(this, !0), this._changeInProgress = null)), this;
- } else
- return this._isUTC ? l : xl(this);
- }
- function Rb(r, d) {
- return r != null ? (typeof r != "string" && (r = -r), this.utcOffset(r, d), this) : -this.utcOffset();
- }
- function Nb(r) {
- return this.utcOffset(0, r);
- }
- function Bb(r) {
- return this._isUTC && (this.utcOffset(0, r), this._isUTC = !1, r && this.subtract(xl(this), "m")), this;
- }
- function jb() {
- if (this._tzm != null)
- this.utcOffset(this._tzm, !1, !0);
- else if (typeof this._i == "string") {
- var r = zl(o1, this._i);
- r != null ? this.utcOffset(r) : this.utcOffset(0, !0);
- }
- return this;
- }
- function Wb(r) {
- return this.isValid() ? (r = r ? Te(r).utcOffset() : 0, (this.utcOffset() - r) % 60 === 0) : !1;
- }
- function zb() {
- return this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset();
- }
- function Yb() {
- if (!hi(this._isDSTShifted))
- return this._isDSTShifted;
- var r = {}, d;
- return Tl(r, this), r = bu(r), r._a ? (d = r._isUTC ? Zi(r._a) : Te(r._a), this._isDSTShifted = this.isValid() && _b(r._a, d.toArray()) > 0) : this._isDSTShifted = !1, this._isDSTShifted;
- }
- function Xb() {
- return this.isValid() ? !this._isUTC : !1;
- }
- function Gb() {
- return this.isValid() ? this._isUTC : !1;
- }
- function Mu() {
- return this.isValid() ? this._isUTC && this._offset === 0 : !1;
- }
- var Hb = /^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/, Fb = /^(-|\+)?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, d) {
- var T = r, l = null, y, j, I;
- return ls(r) ? T = {
- ms: r._milliseconds,
- d: r._days,
- M: r._months
- } : gr(r) || !isNaN(+r) ? (T = {}, d ? T[d] = +r : T.milliseconds = +r) : (l = Hb.exec(r)) ? (y = l[1] === "-" ? -1 : 1, T = {
- y: 0,
- d: le(l[Ui]) * y,
- h: le(l[Xe]) * y,
- m: le(l[ji]) * y,
- s: le(l[ur]) * y,
- ms: le(vl(l[Ur] * 1e3)) * y
- // the millisecond decimal point is included in the match
- }) : (l = Fb.exec(r)) ? (y = l[1] === "-" ? -1 : 1, T = {
- y: Hr(l[2], y),
- M: Hr(l[3], y),
- w: Hr(l[4], y),
- d: Hr(l[5], y),
- h: Hr(l[6], y),
- m: Hr(l[7], y),
- s: Hr(l[8], y)
- }) : T == null ? T = {} : typeof T == "object" && ("from" in T || "to" in T) && (I = Ub(
- Te(T.from),
- Te(T.to)
- ), T = {}, T.ms = I.milliseconds, T.M = I.months), j = new Rs(T), ls(r) && me(r, "_locale") && (j._locale = r._locale), ls(r) && me(r, "_isValid") && (j._isValid = r._isValid), j;
- }
- Yi.fn = Rs.prototype;
- Yi.invalid = Lb;
- function Hr(r, d) {
- var T = r && parseFloat(r.replace(",", "."));
- return (isNaN(T) ? 0 : T) * d;
- }
- function Ep(r, d) {
- var T = {};
- return T.months = d.month() - r.month() + (d.year() - r.year()) * 12, r.clone().add(T.months, "M").isAfter(d) && --T.months, T.milliseconds = +d - +r.clone().add(T.months, "M"), T;
- }
- function Ub(r, d) {
- var T;
- return r.isValid() && d.isValid() ? (d = Yl(d, r), r.isBefore(d) ? T = Ep(r, d) : (T = Ep(d, r), T.milliseconds = -T.milliseconds, T.months = -T.months), T) : { milliseconds: 0, months: 0 };
- }
- function ku(r, d) {
- return function(T, l) {
- var y, j;
- return l !== null && !isNaN(+l) && (Qp(
- d,
- "moment()." + d + "(period, number) is deprecated. Please use moment()." + d + "(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."
- ), j = T, T = l, l = j), y = Yi(T, l), Au(this, y, r), this;
- };
- }
- function Au(r, d, T, l) {
- var y = d._milliseconds, j = vl(d._days), I = vl(d._months);
- r.isValid() && (l = l ?? !0, I && hu(r, ys(r, "Month") + I * T), j && iu(r, "Date", ys(r, "Date") + j * T), y && r._d.setTime(r._d.valueOf() + y * T), l && Xt.updateOffset(r, j || I));
- }
- var Vb = ku(1, "add"), $b = ku(-1, "subtract");
- function Tu(r) {
- return typeof r == "string" || r instanceof String;
- }
- function Zb(r) {
- return zi(r) || so(r) || Tu(r) || gr(r) || Jb(r) || Kb(r) || r === null || r === void 0;
- }
- function Kb(r) {
- var d = Zr(r) && !kl(r), T = !1, l = [
- "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, j, I = l.length;
- for (y = 0; y < I; y += 1)
- j = l[y], T = T || me(r, j);
- return d && T;
- }
- function Jb(r) {
- var d = Wi(r), T = !1;
- return d && (T = r.filter(function(l) {
- return !gr(l) && Tu(r);
- }).length === 0), d && T;
- }
- function qb(r) {
- var d = Zr(r) && !kl(r), T = !1, l = [
- "sameDay",
- "nextDay",
- "lastDay",
- "nextWeek",
- "lastWeek",
- "sameElse"
- ], y, j;
- for (y = 0; y < l.length; y += 1)
- j = l[y], T = T || me(r, j);
- return d && T;
- }
- function Qb(r, d) {
- var T = r.diff(d, "days", !0);
- return T < -6 ? "sameElse" : T < -1 ? "lastWeek" : T < 0 ? "lastDay" : T < 1 ? "sameDay" : T < 2 ? "nextDay" : T < 7 ? "nextWeek" : "sameElse";
- }
- function tS(r, d) {
- arguments.length === 1 && (arguments[0] ? Zb(arguments[0]) ? (r = arguments[0], d = void 0) : qb(arguments[0]) && (d = arguments[0], r = void 0) : (r = void 0, d = void 0));
- var T = r || Te(), l = Yl(T, this).startOf("day"), y = Xt.calendarFormat(this, l) || "sameElse", j = d && (Ki(d[y]) ? d[y].call(this, T) : d[y]);
- return this.format(
- j || this.localeData().calendar(y, this, Te(T))
- );
- }
- function eS() {
- return new ao(this);
- }
- function iS(r, d) {
- var T = zi(r) ? r : Te(r);
- return this.isValid() && T.isValid() ? (d = _i(d) || "millisecond", d === "millisecond" ? this.valueOf() > T.valueOf() : T.valueOf() < this.clone().startOf(d).valueOf()) : !1;
- }
- function rS(r, d) {
- var T = zi(r) ? r : Te(r);
- return this.isValid() && T.isValid() ? (d = _i(d) || "millisecond", d === "millisecond" ? this.valueOf() < T.valueOf() : this.clone().endOf(d).valueOf() < T.valueOf()) : !1;
- }
- function nS(r, d, T, l) {
- var y = zi(r) ? r : Te(r), j = zi(d) ? d : Te(d);
- return this.isValid() && y.isValid() && j.isValid() ? (l = l || "()", (l[0] === "(" ? this.isAfter(y, T) : !this.isBefore(y, T)) && (l[1] === ")" ? this.isBefore(j, T) : !this.isAfter(j, T))) : !1;
- }
- function oS(r, d) {
- var T = zi(r) ? r : Te(r), l;
- return this.isValid() && T.isValid() ? (d = _i(d) || "millisecond", d === "millisecond" ? this.valueOf() === T.valueOf() : (l = T.valueOf(), this.clone().startOf(d).valueOf() <= l && l <= this.clone().endOf(d).valueOf())) : !1;
- }
- function sS(r, d) {
- return this.isSame(r, d) || this.isAfter(r, d);
- }
- function aS(r, d) {
- return this.isSame(r, d) || this.isBefore(r, d);
- }
- function lS(r, d, T) {
- var l, y, j;
- if (!this.isValid())
- return NaN;
- if (l = Yl(r, this), !l.isValid())
- return NaN;
- switch (y = (l.utcOffset() - this.utcOffset()) * 6e4, d = _i(d), d) {
- case "year":
- j = hs(this, l) / 12;
- break;
- case "month":
- j = hs(this, l);
- break;
- case "quarter":
- j = hs(this, l) / 3;
- break;
- case "second":
- j = (this - l) / 1e3;
- break;
- case "minute":
- j = (this - l) / 6e4;
- break;
- case "hour":
- j = (this - l) / 36e5;
- break;
- case "day":
- j = (this - l - y) / 864e5;
- break;
- case "week":
- j = (this - l - y) / 6048e5;
- break;
- default:
- j = this - l;
- }
- return T ? j : Ti(j);
- }
- function hs(r, d) {
- if (r.date() < d.date())
- return -hs(d, r);
- var T = (d.year() - r.year()) * 12 + (d.month() - r.month()), l = r.clone().add(T, "months"), y, j;
- return d - l < 0 ? (y = r.clone().add(T - 1, "months"), j = (d - l) / (l - y)) : (y = r.clone().add(T + 1, "months"), j = (d - l) / (y - l)), -(T + j) || 0;
- }
- Xt.defaultFormat = "YYYY-MM-DDTHH:mm:ssZ";
- Xt.defaultFormatUtc = "YYYY-MM-DDTHH:mm:ss[Z]";
- function hS() {
- return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ");
- }
- function cS(r) {
- if (!this.isValid())
- return null;
- var d = r !== !0, T = d ? this.clone().utc() : this;
- return T.year() < 0 || T.year() > 9999 ? as(
- T,
- d ? "YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]" : "YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"
- ) : Ki(Date.prototype.toISOString) ? d ? this.toDate().toISOString() : new Date(this.valueOf() + this.utcOffset() * 60 * 1e3).toISOString().replace("Z", as(T, "Z")) : as(
- T,
- d ? "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", d = "", T, l, y, j;
- return this.isLocal() || (r = this.utcOffset() === 0 ? "moment.utc" : "moment.parseZone", d = "Z"), T = "[" + r + '("]', l = 0 <= this.year() && this.year() <= 9999 ? "YYYY" : "YYYYYY", y = "-MM-DD[T]HH:mm:ss.SSS", j = d + '[")]', this.format(T + l + y + j);
- }
- function uS(r) {
- r || (r = this.isUtc() ? Xt.defaultFormatUtc : Xt.defaultFormat);
- var d = as(this, r);
- return this.localeData().postformat(d);
- }
- function dS(r, d) {
- return this.isValid() && (zi(r) && r.isValid() || Te(r).isValid()) ? Yi({ to: this, from: r }).locale(this.locale()).humanize(!d) : this.localeData().invalidDate();
- }
- function fS(r) {
- return this.from(Te(), r);
- }
- function gS(r, d) {
- return this.isValid() && (zi(r) && r.isValid() || Te(r).isValid()) ? Yi({ from: this, to: r }).locale(this.locale()).humanize(!d) : this.localeData().invalidDate();
- }
- function mS(r) {
- return this.to(Te(), r);
- }
- function Pu(r) {
- var d;
- return r === void 0 ? this._locale._abbr : (d = yr(r), d != null && (this._locale = d), this);
- }
- var Eu = Li(
- "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 Ou() {
- return this._locale;
- }
- var bs = 1e3, xn = 60 * bs, Ss = 60 * xn, Lu = (365 * 400 + 97) * 24 * Ss;
- function bn(r, d) {
- return (r % d + d) % d;
- }
- function _u(r, d, T) {
- return r < 100 && r >= 0 ? new Date(r + 400, d, T) - Lu : new Date(r, d, T).valueOf();
- }
- function Du(r, d, T) {
- return r < 100 && r >= 0 ? Date.UTC(r + 400, d, T) - Lu : Date.UTC(r, d, T);
- }
- function yS(r) {
- var d, T;
- if (r = _i(r), r === void 0 || r === "millisecond" || !this.isValid())
- return this;
- switch (T = this._isUTC ? Du : _u, r) {
- case "year":
- d = T(this.year(), 0, 1);
- break;
- case "quarter":
- d = T(
- this.year(),
- this.month() - this.month() % 3,
- 1
- );
- break;
- case "month":
- d = T(this.year(), this.month(), 1);
- break;
- case "week":
- d = T(
- this.year(),
- this.month(),
- this.date() - this.weekday()
- );
- break;
- case "isoWeek":
- d = T(
- this.year(),
- this.month(),
- this.date() - (this.isoWeekday() - 1)
- );
- break;
- case "day":
- case "date":
- d = T(this.year(), this.month(), this.date());
- break;
- case "hour":
- d = this._d.valueOf(), d -= bn(
- d + (this._isUTC ? 0 : this.utcOffset() * xn),
- Ss
- );
- break;
- case "minute":
- d = this._d.valueOf(), d -= bn(d, xn);
- break;
- case "second":
- d = this._d.valueOf(), d -= bn(d, bs);
- break;
- }
- return this._d.setTime(d), Xt.updateOffset(this, !0), this;
- }
- function vS(r) {
- var d, T;
- if (r = _i(r), r === void 0 || r === "millisecond" || !this.isValid())
- return this;
- switch (T = this._isUTC ? Du : _u, r) {
- case "year":
- d = T(this.year() + 1, 0, 1) - 1;
- break;
- case "quarter":
- d = T(
- this.year(),
- this.month() - this.month() % 3 + 3,
- 1
- ) - 1;
- break;
- case "month":
- d = T(this.year(), this.month() + 1, 1) - 1;
- break;
- case "week":
- d = T(
- this.year(),
- this.month(),
- this.date() - this.weekday() + 7
- ) - 1;
- break;
- case "isoWeek":
- d = T(
- this.year(),
- this.month(),
- this.date() - (this.isoWeekday() - 1) + 7
- ) - 1;
- break;
- case "day":
- case "date":
- d = T(this.year(), this.month(), this.date() + 1) - 1;
- break;
- case "hour":
- d = this._d.valueOf(), d += Ss - bn(
- d + (this._isUTC ? 0 : this.utcOffset() * xn),
- Ss
- ) - 1;
- break;
- case "minute":
- d = this._d.valueOf(), d += xn - bn(d, xn) - 1;
- break;
- case "second":
- d = this._d.valueOf(), d += bs - bn(d, bs) - 1;
- break;
- }
- return this._d.setTime(d), Xt.updateOffset(this, !0), this;
- }
- function xS() {
- return this._d.valueOf() - (this._offset || 0) * 6e4;
- }
- function bS() {
- return Math.floor(this.valueOf() / 1e3);
- }
- function SS() {
- 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 CS() {
- 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 MS() {
- return this.isValid() ? this.toISOString() : null;
- }
- function kS() {
- return Al(this);
- }
- function AS() {
- return Er({}, oe(this));
- }
- function TS() {
- return oe(this).overflow;
- }
- function PS() {
- 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", Xl);
- Ft("NN", Xl);
- Ft("NNN", Xl);
- Ft("NNNN", WS);
- Ft("NNNNN", zS);
- we(
- ["N", "NN", "NNN", "NNNN", "NNNNN"],
- function(r, d, T, l) {
- var y = T._locale.erasParse(r, l, T._strict);
- y ? oe(T).era = y : oe(T).invalidEra = r;
- }
- );
- Ft("y", An);
- Ft("yy", An);
- Ft("yyy", An);
- Ft("yyyy", An);
- Ft("yo", YS);
- we(["y", "yy", "yyy", "yyyy"], Qe);
- we(["yo"], function(r, d, T, l) {
- var y;
- T._locale._eraYearOrdinalRegex && (y = r.match(T._locale._eraYearOrdinalRegex)), T._locale.eraYearOrdinalParse ? d[Qe] = T._locale.eraYearOrdinalParse(r, y) : d[Qe] = parseInt(r, 10);
- });
- function ES(r, d) {
- var T, l, y, j = this._eras || yr("en")._eras;
- for (T = 0, l = j.length; T < l; ++T) {
- switch (typeof j[T].since) {
- case "string":
- y = Xt(j[T].since).startOf("day"), j[T].since = y.valueOf();
- break;
- }
- switch (typeof j[T].until) {
- case "undefined":
- j[T].until = 1 / 0;
- break;
- case "string":
- y = Xt(j[T].until).startOf("day").valueOf(), j[T].until = y.valueOf();
- break;
- }
- }
- return j;
- }
- function OS(r, d, T) {
- var l, y, j = this.eras(), I, Z, H;
- for (r = r.toUpperCase(), l = 0, y = j.length; l < y; ++l)
- if (I = j[l].name.toUpperCase(), Z = j[l].abbr.toUpperCase(), H = j[l].narrow.toUpperCase(), T)
- switch (d) {
- case "N":
- case "NN":
- case "NNN":
- if (Z === r)
- return j[l];
- break;
- case "NNNN":
- if (I === r)
- return j[l];
- break;
- case "NNNNN":
- if (H === r)
- return j[l];
- break;
- }
- else if ([I, Z, H].indexOf(r) >= 0)
- return j[l];
- }
- function LS(r, d) {
- var T = r.since <= r.until ? 1 : -1;
- return d === void 0 ? Xt(r.since).year() : Xt(r.since).year() + (d - r.offset) * T;
- }
- function _S() {
- var r, d, T, l = this.localeData().eras();
- for (r = 0, d = l.length; r < d; ++r)
- if (T = this.clone().startOf("day").valueOf(), l[r].since <= T && T <= l[r].until || l[r].until <= T && T <= l[r].since)
- return l[r].name;
- return "";
- }
- function DS() {
- var r, d, T, l = this.localeData().eras();
- for (r = 0, d = l.length; r < d; ++r)
- if (T = this.clone().startOf("day").valueOf(), l[r].since <= T && T <= l[r].until || l[r].until <= T && T <= l[r].since)
- return l[r].narrow;
- return "";
- }
- function IS() {
- var r, d, T, l = this.localeData().eras();
- for (r = 0, d = l.length; r < d; ++r)
- if (T = this.clone().startOf("day").valueOf(), l[r].since <= T && T <= l[r].until || l[r].until <= T && T <= l[r].since)
- return l[r].abbr;
- return "";
- }
- function RS() {
- var r, d, T, l, y = this.localeData().eras();
- for (r = 0, d = y.length; r < d; ++r)
- if (T = y[r].since <= y[r].until ? 1 : -1, l = this.clone().startOf("day").valueOf(), y[r].since <= l && l <= y[r].until || y[r].until <= l && l <= y[r].since)
- return (this.year() - Xt(y[r].since).year()) * T + y[r].offset;
- return this.year();
- }
- function NS(r) {
- return me(this, "_erasNameRegex") || Gl.call(this), r ? this._erasNameRegex : this._erasRegex;
- }
- function BS(r) {
- return me(this, "_erasAbbrRegex") || Gl.call(this), r ? this._erasAbbrRegex : this._erasRegex;
- }
- function jS(r) {
- return me(this, "_erasNarrowRegex") || Gl.call(this), r ? this._erasNarrowRegex : this._erasRegex;
- }
- function Xl(r, d) {
- return d.erasAbbrRegex(r);
- }
- function WS(r, d) {
- return d.erasNameRegex(r);
- }
- function zS(r, d) {
- return d.erasNarrowRegex(r);
- }
- function YS(r, d) {
- return d._eraYearOrdinalRegex || An;
- }
- function Gl() {
- var r = [], d = [], T = [], l = [], y, j, I = this.eras();
- for (y = 0, j = I.length; y < j; ++y)
- d.push(yi(I[y].name)), r.push(yi(I[y].abbr)), T.push(yi(I[y].narrow)), l.push(yi(I[y].name)), l.push(yi(I[y].abbr)), l.push(yi(I[y].narrow));
- this._erasRegex = new RegExp("^(" + l.join("|") + ")", "i"), this._erasNameRegex = new RegExp("^(" + d.join("|") + ")", "i"), this._erasAbbrRegex = new RegExp("^(" + r.join("|") + ")", "i"), this._erasNarrowRegex = new RegExp(
- "^(" + T.join("|") + ")",
- "i"
- );
- }
- Zt(0, ["gg", 2], 0, function() {
- return this.weekYear() % 100;
- });
- Zt(0, ["GG", 2], 0, function() {
- return this.isoWeekYear() % 100;
- });
- function Ns(r, d) {
- Zt(0, [r, r.length], 0, d);
- }
- Ns("gggg", "weekYear");
- Ns("ggggg", "weekYear");
- Ns("GGGG", "isoWeekYear");
- Ns("GGGGG", "isoWeekYear");
- ti("weekYear", "gg");
- ti("isoWeekYear", "GG");
- ei("weekYear", 1);
- ei("isoWeekYear", 1);
- Ft("G", Ls);
- Ft("g", Ls);
- Ft("GG", Pe, vi);
- Ft("gg", Pe, vi);
- Ft("GGGG", _l, Ll);
- Ft("gggg", _l, Ll);
- Ft("GGGGG", Os, Ps);
- Ft("ggggg", Os, Ps);
- ho(
- ["gggg", "ggggg", "GGGG", "GGGGG"],
- function(r, d, T, l) {
- d[l.substr(0, 2)] = le(r);
- }
- );
- ho(["gg", "GG"], function(r, d, T, l) {
- d[l] = Xt.parseTwoDigitYear(r);
- });
- function XS(r) {
- return Iu.call(
- this,
- r,
- this.week(),
- this.weekday(),
- this.localeData()._week.dow,
- this.localeData()._week.doy
- );
- }
- function GS(r) {
- return Iu.call(
- this,
- r,
- this.isoWeek(),
- this.isoWeekday(),
- 1,
- 4
- );
- }
- function HS() {
- return dr(this.year(), 1, 4);
- }
- function FS() {
- return dr(this.isoWeekYear(), 1, 4);
- }
- function US() {
- var r = this.localeData()._week;
- return dr(this.year(), r.dow, r.doy);
- }
- function VS() {
- var r = this.localeData()._week;
- return dr(this.weekYear(), r.dow, r.doy);
- }
- function Iu(r, d, T, l, y) {
- var j;
- return r == null ? io(this, l, y).year : (j = dr(r, l, y), d > j && (d = j), $S.call(this, r, d, T, l, y));
- }
- function $S(r, d, T, l, y) {
- var j = du(r, d, T, l, y), I = eo(j.year, 0, j.dayOfYear);
- return this.year(I.getUTCFullYear()), this.month(I.getUTCMonth()), this.date(I.getUTCDate()), this;
- }
- Zt("Q", 0, "Qo", "quarter");
- ti("quarter", "Q");
- ei("quarter", 7);
- Ft("Q", ru);
- we("Q", function(r, d) {
- d[pr] = (le(r) - 1) * 3;
- });
- function ZS(r) {
- return r == null ? Math.ceil((this.month() + 1) / 3) : this.month((r - 1) * 3 + this.month() % 3);
- }
- Zt("D", ["DD", 2], "Do", "date");
- ti("date", "D");
- ei("date", 9);
- Ft("D", Pe);
- Ft("DD", Pe, vi);
- Ft("Do", function(r, d) {
- return r ? d._dayOfMonthOrdinalParse || d._ordinalParse : d._dayOfMonthOrdinalParseLenient;
- });
- we(["D", "DD"], Ui);
- we("Do", function(r, d) {
- d[Ui] = le(r.match(Pe)[0]);
- });
- var Ru = kn("Date", !0);
- Zt("DDD", ["DDDD", 3], "DDDo", "dayOfYear");
- ti("dayOfYear", "DDD");
- ei("dayOfYear", 4);
- Ft("DDD", Es);
- Ft("DDDD", nu);
- we(["DDD", "DDDD"], function(r, d, T) {
- T._dayOfYear = le(r);
- });
- function KS(r) {
- var d = Math.round(
- (this.clone().startOf("day") - this.clone().startOf("year")) / 864e5
- ) + 1;
- return r == null ? d : this.add(r - d, "d");
- }
- Zt("m", ["mm", 2], 0, "minute");
- ti("minute", "m");
- ei("minute", 14);
- Ft("m", Pe);
- Ft("mm", Pe, vi);
- we(["m", "mm"], ji);
- var JS = kn("Minutes", !1);
- Zt("s", ["ss", 2], 0, "second");
- ti("second", "s");
- ei("second", 15);
- Ft("s", Pe);
- Ft("ss", Pe, vi);
- we(["s", "ss"], ur);
- var qS = kn("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;
- });
- ti("millisecond", "ms");
- ei("millisecond", 16);
- Ft("S", Es, ru);
- Ft("SS", Es, vi);
- Ft("SSS", Es, nu);
- var Or, Nu;
- for (Or = "SSSS"; Or.length <= 9; Or += "S")
- Ft(Or, An);
- function QS(r, d) {
- d[Ur] = le(("0." + r) * 1e3);
- }
- for (Or = "S"; Or.length <= 9; Or += "S")
- we(Or, QS);
- Nu = kn("Milliseconds", !1);
- Zt("z", 0, 0, "zoneAbbr");
- Zt("zz", 0, 0, "zoneName");
- function tw() {
- return this._isUTC ? "UTC" : "";
- }
- function ew() {
- return this._isUTC ? "Coordinated Universal Time" : "";
- }
- var jt = ao.prototype;
- jt.add = Vb;
- jt.calendar = tS;
- jt.clone = eS;
- jt.diff = lS;
- jt.endOf = vS;
- jt.format = uS;
- jt.from = dS;
- jt.fromNow = fS;
- jt.to = gS;
- jt.toNow = mS;
- jt.get = r1;
- jt.invalidAt = TS;
- jt.isAfter = iS;
- jt.isBefore = rS;
- jt.isBetween = nS;
- jt.isSame = oS;
- jt.isSameOrAfter = sS;
- jt.isSameOrBefore = aS;
- jt.isValid = kS;
- jt.lang = Eu;
- jt.locale = Pu;
- jt.localeData = Ou;
- jt.max = kb;
- jt.min = Mb;
- jt.parsingFlags = AS;
- jt.set = n1;
- jt.startOf = yS;
- jt.subtract = $b;
- jt.toArray = wS;
- jt.toObject = CS;
- jt.toDate = SS;
- jt.toISOString = cS;
- jt.inspect = pS;
- typeof Symbol < "u" && Symbol.for != null && (jt[Symbol.for("nodejs.util.inspect.custom")] = function() {
- return "Moment<" + this.format() + ">";
- });
- jt.toJSON = MS;
- jt.toString = hS;
- jt.unix = bS;
- jt.valueOf = xS;
- jt.creationData = PS;
- jt.eraName = _S;
- jt.eraNarrow = DS;
- jt.eraAbbr = IS;
- jt.eraYear = RS;
- jt.year = uu;
- jt.isLeapYear = C1;
- jt.weekYear = XS;
- jt.isoWeekYear = GS;
- jt.quarter = jt.quarters = ZS;
- jt.month = cu;
- jt.daysInMonth = b1;
- jt.week = jt.weeks = E1;
- jt.isoWeek = jt.isoWeeks = O1;
- jt.weeksInYear = US;
- jt.weeksInWeekYear = VS;
- jt.isoWeeksInYear = HS;
- jt.isoWeeksInISOWeekYear = FS;
- jt.date = Ru;
- jt.day = jt.days = G1;
- jt.weekday = H1;
- jt.isoWeekday = F1;
- jt.dayOfYear = KS;
- jt.hour = jt.hours = q1;
- jt.minute = jt.minutes = JS;
- jt.second = jt.seconds = qS;
- jt.millisecond = jt.milliseconds = Nu;
- jt.utcOffset = Ib;
- jt.utc = Nb;
- jt.local = Bb;
- jt.parseZone = jb;
- jt.hasAlignedHourOffset = Wb;
- jt.isDST = zb;
- jt.isLocal = Xb;
- jt.isUtcOffset = Gb;
- jt.isUtc = Mu;
- jt.isUTC = Mu;
- jt.zoneAbbr = tw;
- jt.zoneName = ew;
- jt.dates = Li(
- "dates accessor is deprecated. Use date instead.",
- Ru
- );
- jt.months = Li(
- "months accessor is deprecated. Use month instead",
- cu
- );
- jt.years = Li(
- "years accessor is deprecated. Use year instead",
- uu
- );
- jt.zone = Li(
- "moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",
- Rb
- );
- jt.isDSTShifted = Li(
- "isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",
- Yb
- );
- function iw(r) {
- return Te(r * 1e3);
- }
- function rw() {
- return Te.apply(null, arguments).parseZone();
- }
- function Bu(r) {
- return r;
- }
- var ye = Pl.prototype;
- ye.calendar = G0;
- ye.longDateFormat = V0;
- ye.invalidDate = Z0;
- ye.ordinal = q0;
- ye.preparse = Bu;
- ye.postformat = Bu;
- ye.relativeTime = t1;
- ye.pastFuture = e1;
- ye.set = Y0;
- ye.eras = ES;
- ye.erasParse = OS;
- ye.erasConvertYear = LS;
- ye.erasAbbrRegex = BS;
- ye.erasNameRegex = NS;
- ye.erasNarrowRegex = jS;
- ye.months = m1;
- ye.monthsShort = y1;
- ye.monthsParse = x1;
- ye.monthsRegex = w1;
- ye.monthsShortRegex = S1;
- ye.week = k1;
- ye.firstDayOfYear = P1;
- ye.firstDayOfWeek = T1;
- ye.weekdays = j1;
- ye.weekdaysMin = z1;
- ye.weekdaysShort = W1;
- ye.weekdaysParse = X1;
- ye.weekdaysRegex = U1;
- ye.weekdaysShortRegex = V1;
- ye.weekdaysMinRegex = $1;
- ye.isPM = K1;
- ye.meridiem = Q1;
- function ws(r, d, T, l) {
- var y = yr(), j = Zi().set(l, d);
- return y[T](j, r);
- }
- function ju(r, d, T) {
- if (gr(r) && (d = r, r = void 0), r = r || "", d != null)
- return ws(r, d, T, "month");
- var l, y = [];
- for (l = 0; l < 12; l++)
- y[l] = ws(r, l, T, "month");
- return y;
- }
- function Hl(r, d, T, l) {
- typeof r == "boolean" ? (gr(d) && (T = d, d = void 0), d = d || "") : (d = r, T = d, r = !1, gr(d) && (T = d, d = void 0), d = d || "");
- var y = yr(), j = r ? y._week.dow : 0, I, Z = [];
- if (T != null)
- return ws(d, (T + j) % 7, l, "day");
- for (I = 0; I < 7; I++)
- Z[I] = ws(d, (I + j) % 7, l, "day");
- return Z;
- }
- function nw(r, d) {
- return ju(r, d, "months");
- }
- function ow(r, d) {
- return ju(r, d, "monthsShort");
- }
- function sw(r, d, T) {
- return Hl(r, d, T, "weekdays");
- }
- function aw(r, d, T) {
- return Hl(r, d, T, "weekdaysShort");
- }
- function lw(r, d, T) {
- return Hl(r, d, T, "weekdaysMin");
- }
- Lr("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 d = r % 10, T = le(r % 100 / 10) === 1 ? "th" : d === 1 ? "st" : d === 2 ? "nd" : d === 3 ? "rd" : "th";
- return r + T;
- }
- });
- Xt.lang = Li(
- "moment.lang is deprecated. Use moment.locale instead.",
- Lr
- );
- Xt.langData = Li(
- "moment.langData is deprecated. Use moment.localeData instead.",
- yr
- );
- var ar = Math.abs;
- function hw() {
- var r = this._data;
- return this._milliseconds = ar(this._milliseconds), this._days = ar(this._days), this._months = ar(this._months), r.milliseconds = ar(r.milliseconds), r.seconds = ar(r.seconds), r.minutes = ar(r.minutes), r.hours = ar(r.hours), r.months = ar(r.months), r.years = ar(r.years), this;
- }
- function Wu(r, d, T, l) {
- var y = Yi(d, T);
- return r._milliseconds += l * y._milliseconds, r._days += l * y._days, r._months += l * y._months, r._bubble();
- }
- function cw(r, d) {
- return Wu(this, r, d, 1);
- }
- function pw(r, d) {
- return Wu(this, r, d, -1);
- }
- function Op(r) {
- return r < 0 ? Math.floor(r) : Math.ceil(r);
- }
- function uw() {
- var r = this._milliseconds, d = this._days, T = this._months, l = this._data, y, j, I, Z, H;
- return r >= 0 && d >= 0 && T >= 0 || r <= 0 && d <= 0 && T <= 0 || (r += Op(bl(T) + d) * 864e5, d = 0, T = 0), l.milliseconds = r % 1e3, y = Ti(r / 1e3), l.seconds = y % 60, j = Ti(y / 60), l.minutes = j % 60, I = Ti(j / 60), l.hours = I % 24, d += Ti(I / 24), H = Ti(zu(d)), T += H, d -= Op(bl(H)), Z = Ti(T / 12), T %= 12, l.days = d, l.months = T, l.years = Z, this;
- }
- function zu(r) {
- return r * 4800 / 146097;
- }
- function bl(r) {
- return r * 146097 / 4800;
- }
- function dw(r) {
- if (!this.isValid())
- return NaN;
- var d, T, l = this._milliseconds;
- if (r = _i(r), r === "month" || r === "quarter" || r === "year")
- switch (d = this._days + l / 864e5, T = this._months + zu(d), r) {
- case "month":
- return T;
- case "quarter":
- return T / 3;
- case "year":
- return T / 12;
- }
- else
- switch (d = this._days + Math.round(bl(this._months)), r) {
- case "week":
- return d / 7 + l / 6048e5;
- case "day":
- return d + l / 864e5;
- case "hour":
- return d * 24 + l / 36e5;
- case "minute":
- return d * 1440 + l / 6e4;
- case "second":
- return d * 86400 + l / 1e3;
- case "millisecond":
- return Math.floor(d * 864e5) + l;
- default:
- throw new Error("Unknown unit " + r);
- }
- }
- function fw() {
- return this.isValid() ? this._milliseconds + this._days * 864e5 + this._months % 12 * 2592e6 + le(this._months / 12) * 31536e6 : NaN;
- }
- function vr(r) {
- return function() {
- return this.as(r);
- };
- }
- var gw = vr("ms"), mw = vr("s"), yw = vr("m"), vw = vr("h"), xw = vr("d"), bw = vr("w"), Sw = vr("M"), ww = vr("Q"), Cw = vr("y");
- function Mw() {
- return Yi(this);
- }
- function kw(r) {
- return r = _i(r), this.isValid() ? this[r + "s"]() : NaN;
- }
- function Kr(r) {
- return function() {
- return this.isValid() ? this._data[r] : NaN;
- };
- }
- var Aw = Kr("milliseconds"), Tw = Kr("seconds"), Pw = Kr("minutes"), Ew = Kr("hours"), Ow = Kr("days"), Lw = Kr("months"), _w = Kr("years");
- function Dw() {
- return Ti(this.days() / 7);
- }
- var lr = 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 Iw(r, d, T, l, y) {
- return y.relativeTime(d || 1, !!T, r, l);
- }
- function Rw(r, d, T, l) {
- var y = Yi(r).abs(), j = lr(y.as("s")), I = lr(y.as("m")), Z = lr(y.as("h")), H = lr(y.as("d")), U = lr(y.as("M")), F = lr(y.as("w")), R = lr(y.as("y")), N = j <= T.ss && ["s", j] || j < T.s && ["ss", j] || I <= 1 && ["m"] || I < T.m && ["mm", I] || Z <= 1 && ["h"] || Z < T.h && ["hh", Z] || H <= 1 && ["d"] || H < T.d && ["dd", H];
- return T.w != null && (N = N || F <= 1 && ["w"] || F < T.w && ["ww", F]), N = N || U <= 1 && ["M"] || U < T.M && ["MM", U] || R <= 1 && ["y"] || ["yy", R], N[2] = d, N[3] = +r > 0, N[4] = l, Iw.apply(null, N);
- }
- function Nw(r) {
- return r === void 0 ? lr : typeof r == "function" ? (lr = r, !0) : !1;
- }
- function Bw(r, d) {
- return mn[r] === void 0 ? !1 : d === void 0 ? mn[r] : (mn[r] = d, r === "s" && (mn.ss = d - 1), !0);
- }
- function jw(r, d) {
- if (!this.isValid())
- return this.localeData().invalidDate();
- var T = !1, l = mn, y, j;
- return typeof r == "object" && (d = r, r = !1), typeof r == "boolean" && (T = r), typeof d == "object" && (l = Object.assign({}, mn, d), d.s != null && d.ss == null && (l.ss = d.s - 1)), y = this.localeData(), j = Rw(this, !T, l, y), T && (j = y.pastFuture(+this, j)), y.postformat(j);
- }
- var sl = Math.abs;
- function fn(r) {
- return (r > 0) - (r < 0) || +r;
- }
- function Bs() {
- if (!this.isValid())
- return this.localeData().invalidDate();
- var r = sl(this._milliseconds) / 1e3, d = sl(this._days), T = sl(this._months), l, y, j, I, Z = this.asSeconds(), H, U, F, R;
- return Z ? (l = Ti(r / 60), y = Ti(l / 60), r %= 60, l %= 60, j = Ti(T / 12), T %= 12, I = r ? r.toFixed(3).replace(/\.?0+$/, "") : "", H = Z < 0 ? "-" : "", U = fn(this._months) !== fn(Z) ? "-" : "", F = fn(this._days) !== fn(Z) ? "-" : "", R = fn(this._milliseconds) !== fn(Z) ? "-" : "", H + "P" + (j ? U + j + "Y" : "") + (T ? U + T + "M" : "") + (d ? F + d + "D" : "") + (y || l || r ? "T" : "") + (y ? R + y + "H" : "") + (l ? R + l + "M" : "") + (r ? R + I + "S" : "")) : "P0D";
- }
- var de = Rs.prototype;
- de.isValid = Ob;
- de.abs = hw;
- de.add = cw;
- de.subtract = pw;
- de.as = dw;
- de.asMilliseconds = gw;
- de.asSeconds = mw;
- de.asMinutes = yw;
- de.asHours = vw;
- de.asDays = xw;
- de.asWeeks = bw;
- de.asMonths = Sw;
- de.asQuarters = ww;
- de.asYears = Cw;
- de.valueOf = fw;
- de._bubble = uw;
- de.clone = Mw;
- de.get = kw;
- de.milliseconds = Aw;
- de.seconds = Tw;
- de.minutes = Pw;
- de.hours = Ew;
- de.days = Ow;
- de.weeks = Dw;
- de.months = Lw;
- de.years = _w;
- de.humanize = jw;
- de.toISOString = Bs;
- de.toString = Bs;
- de.toJSON = Bs;
- de.locale = Pu;
- de.localeData = Ou;
- de.toIsoString = Li(
- "toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",
- Bs
- );
- de.lang = Eu;
- Zt("X", 0, 0, "unix");
- Zt("x", 0, 0, "valueOf");
- Ft("x", Ls);
- Ft("X", s1);
- we("X", function(r, d, T) {
- T._d = new Date(parseFloat(r) * 1e3);
- });
- we("x", function(r, d, T) {
- T._d = new Date(le(r));
- });
- //! moment.js
- Xt.version = "2.29.4";
- W0(Te);
- Xt.fn = jt;
- Xt.min = Ab;
- Xt.max = Tb;
- Xt.now = Pb;
- Xt.utc = Zi;
- Xt.unix = iw;
- Xt.months = nw;
- Xt.isDate = so;
- Xt.locale = Lr;
- Xt.invalid = As;
- Xt.duration = Yi;
- Xt.isMoment = zi;
- Xt.weekdays = sw;
- Xt.parseZone = rw;
- Xt.localeData = yr;
- Xt.isDuration = ls;
- Xt.monthsShort = ow;
- Xt.weekdaysMin = lw;
- Xt.defineLocale = Nl;
- Xt.updateLocale = rb;
- Xt.locales = nb;
- Xt.weekdaysShort = aw;
- Xt.normalizeUnits = _i;
- Xt.relativeTimeRounding = Nw;
- Xt.relativeTimeThreshold = Bw;
- Xt.calendarFormat = Qb;
- 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 Cs = { 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
- */
- Cs.exports;
- (function(r, d) {
- (function() {
- var T, l = "4.17.21", y = 200, j = "Unsupported core-js use. Try https://npms.io/search?q=ponyfill.", I = "Expected a function", Z = "Invalid `variable` option passed into `_.template`", H = "__lodash_hash_undefined__", U = 500, F = "__lodash_placeholder__", R = 1, N = 2, b = 4, x = 1, u = 2, f = 1, E = 2, O = 4, B = 8, M = 16, S = 32, w = 64, v = 128, a = 256, c = 512, p = 30, i = "...", h = 800, s = 16, t = 1, o = 2, n = 3, A = 1 / 0, _ = 9007199254740991, D = 17976931348623157e292, W = 0 / 0, P = 4294967295, X = P - 1, g = P >>> 1, m = [
- ["ary", v],
- ["bind", f],
- ["bindKey", E],
- ["curry", B],
- ["curryRight", M],
- ["flip", c],
- ["partial", S],
- ["partialRight", w],
- ["rearg", a]
- ], L = "[object Arguments]", Y = "[object Array]", V = "[object AsyncFunction]", Q = "[object Boolean]", k = "[object Date]", G = "[object DOMException]", z = "[object Error]", $ = "[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]", st = "[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]", Lt = "[object Uint8ClampedArray]", Nt = "[object Uint16Array]", Et = "[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, zt = RegExp(Jt.source), Vt = RegExp(be.source), Ce = /<%-([\s\S]+?)%>/g, _r = /<%([\s\S]+?)%>/g, uo = /<%=([\s\S]+?)%>/g, Pn = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, En = /^\w*$/, $e = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, On = /[\\^$.*+?()[\]{}|]/g, Ln = RegExp(On.source), Jr = /^\s+/, fo = /\s/, Hs = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, Dr = /\{\n\/\* \[wrapped with (.+)\] \*/, Xi = /,? & /, go = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, _n = /[()=,{}\[\]\/\s]/, Ir = /\\(\\)?/g, $t = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g, ue = /\w*$/, ge = /^[-+]0x[0-9a-f]+$/i, Re = /^0b[01]+$/i, De = /^\[object .+?Constructor\]$/, qr = /^0o[0-7]+$/i, fd = /^(?:0|[1-9]\d*)$/, gd = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, mo = /($^)/, md = /['\n\r\u2028\u2029\\]/g, yo = "\\ud800-\\udfff", yd = "\\u0300-\\u036f", vd = "\\ufe20-\\ufe2f", xd = "\\u20d0-\\u20ff", th = yd + vd + xd, eh = "\\u2700-\\u27bf", ih = "a-z\\xdf-\\xf6\\xf8-\\xff", bd = "\\xac\\xb1\\xd7\\xf7", Sd = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", wd = "\\u2000-\\u206f", Cd = " \\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", rh = "A-Z\\xc0-\\xd6\\xd8-\\xde", nh = "\\ufe0e\\ufe0f", oh = bd + Sd + wd + Cd, Fs = "['’]", Md = "[" + yo + "]", sh = "[" + oh + "]", vo = "[" + th + "]", ah = "\\d+", kd = "[" + eh + "]", lh = "[" + ih + "]", hh = "[^" + yo + oh + ah + eh + ih + rh + "]", Us = "\\ud83c[\\udffb-\\udfff]", Ad = "(?:" + vo + "|" + Us + ")", ch = "[^" + yo + "]", Vs = "(?:\\ud83c[\\udde6-\\uddff]){2}", $s = "[\\ud800-\\udbff][\\udc00-\\udfff]", Qr = "[" + rh + "]", ph = "\\u200d", uh = "(?:" + lh + "|" + hh + ")", Td = "(?:" + Qr + "|" + hh + ")", dh = "(?:" + Fs + "(?:d|ll|m|re|s|t|ve))?", fh = "(?:" + Fs + "(?:D|LL|M|RE|S|T|VE))?", gh = Ad + "?", mh = "[" + nh + "]?", Pd = "(?:" + ph + "(?:" + [ch, Vs, $s].join("|") + ")" + mh + gh + ")*", Ed = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", Od = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", yh = mh + gh + Pd, Ld = "(?:" + [kd, Vs, $s].join("|") + ")" + yh, _d = "(?:" + [ch + vo + "?", vo, Vs, $s, Md].join("|") + ")", Dd = RegExp(Fs, "g"), Id = RegExp(vo, "g"), Zs = RegExp(Us + "(?=" + Us + ")|" + _d + yh, "g"), Rd = RegExp([
- Qr + "?" + lh + "+" + dh + "(?=" + [sh, Qr, "$"].join("|") + ")",
- Td + "+" + fh + "(?=" + [sh, Qr + uh, "$"].join("|") + ")",
- Qr + "?" + uh + "+" + dh,
- Qr + "+" + fh,
- Od,
- Ed,
- ah,
- Ld
- ].join("|"), "g"), Nd = RegExp("[" + ph + yo + th + nh + "]"), Bd = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/, jd = [
- "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"
- ], Wd = -1, Ae = {};
- Ae[vt] = Ae[Mt] = Ae[Pt] = Ae[At] = Ae[St] = Ae[Dt] = Ae[Lt] = Ae[Nt] = Ae[Et] = !0, Ae[L] = Ae[Y] = Ae[pt] = Ae[Q] = Ae[yt] = Ae[k] = Ae[z] = Ae[$] = Ae[it] = Ae[et] = Ae[rt] = Ae[dt] = Ae[ht] = Ae[at] = Ae[st] = !1;
- var ke = {};
- ke[L] = ke[Y] = ke[pt] = ke[yt] = ke[Q] = ke[k] = 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[Lt] = ke[Nt] = ke[Et] = !0, ke[z] = ke[$] = ke[st] = !1;
- var zd = {
- // 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"
- }, Yd = {
- "&": "&",
- "<": "<",
- ">": ">",
- '"': """,
- "'": "'"
- }, Xd = {
- "&": "&",
- "<": "<",
- ">": ">",
- """: '"',
- "'": "'"
- }, Gd = {
- "\\": "\\",
- "'": "'",
- "\n": "n",
- "\r": "r",
- "\u2028": "u2028",
- "\u2029": "u2029"
- }, Hd = parseFloat, Fd = parseInt, vh = typeof Fr == "object" && Fr && Fr.Object === Object && Fr, Ud = typeof self == "object" && self && self.Object === Object && self, Ue = vh || Ud || Function("return this")(), Ks = d && !d.nodeType && d, Rr = Ks && !0 && r && !r.nodeType && r, xh = Rr && Rr.exports === Ks, Js = xh && vh.process, xi = function() {
- try {
- var wt = Rr && Rr.require && Rr.require("util").types;
- return wt || Js && Js.binding && Js.binding("util");
- } catch {
- }
- }(), bh = xi && xi.isArrayBuffer, Sh = xi && xi.isDate, wh = xi && xi.isMap, Ch = xi && xi.isRegExp, Mh = xi && xi.isSet, kh = xi && xi.isTypedArray;
- function pi(wt, Ot, Tt) {
- switch (Tt.length) {
- case 0:
- return wt.call(Ot);
- case 1:
- return wt.call(Ot, Tt[0]);
- case 2:
- return wt.call(Ot, Tt[0], Tt[1]);
- case 3:
- return wt.call(Ot, Tt[0], Tt[1], Tt[2]);
- }
- return wt.apply(Ot, Tt);
- }
- function Vd(wt, Ot, Tt, Ht) {
- for (var ee = -1, ve = wt == null ? 0 : wt.length; ++ee < ve; ) {
- var ze = wt[ee];
- Ot(Ht, ze, Tt(ze), wt);
- }
- return Ht;
- }
- function bi(wt, Ot) {
- for (var Tt = -1, Ht = wt == null ? 0 : wt.length; ++Tt < Ht && Ot(wt[Tt], Tt, wt) !== !1; )
- ;
- return wt;
- }
- function $d(wt, Ot) {
- for (var Tt = wt == null ? 0 : wt.length; Tt-- && Ot(wt[Tt], Tt, wt) !== !1; )
- ;
- return wt;
- }
- function Ah(wt, Ot) {
- for (var Tt = -1, Ht = wt == null ? 0 : wt.length; ++Tt < Ht; )
- if (!Ot(wt[Tt], Tt, wt))
- return !1;
- return !0;
- }
- function xr(wt, Ot) {
- for (var Tt = -1, Ht = wt == null ? 0 : wt.length, ee = 0, ve = []; ++Tt < Ht; ) {
- var ze = wt[Tt];
- Ot(ze, Tt, wt) && (ve[ee++] = ze);
- }
- return ve;
- }
- function xo(wt, Ot) {
- var Tt = wt == null ? 0 : wt.length;
- return !!Tt && tn(wt, Ot, 0) > -1;
- }
- function qs(wt, Ot, Tt) {
- for (var Ht = -1, ee = wt == null ? 0 : wt.length; ++Ht < ee; )
- if (Tt(Ot, wt[Ht]))
- return !0;
- return !1;
- }
- function Ee(wt, Ot) {
- for (var Tt = -1, Ht = wt == null ? 0 : wt.length, ee = Array(Ht); ++Tt < Ht; )
- ee[Tt] = Ot(wt[Tt], Tt, wt);
- return ee;
- }
- function br(wt, Ot) {
- for (var Tt = -1, Ht = Ot.length, ee = wt.length; ++Tt < Ht; )
- wt[ee + Tt] = Ot[Tt];
- return wt;
- }
- function Qs(wt, Ot, Tt, Ht) {
- var ee = -1, ve = wt == null ? 0 : wt.length;
- for (Ht && ve && (Tt = wt[++ee]); ++ee < ve; )
- Tt = Ot(Tt, wt[ee], ee, wt);
- return Tt;
- }
- function Zd(wt, Ot, Tt, Ht) {
- var ee = wt == null ? 0 : wt.length;
- for (Ht && ee && (Tt = wt[--ee]); ee--; )
- Tt = Ot(Tt, wt[ee], ee, wt);
- return Tt;
- }
- function ta(wt, Ot) {
- for (var Tt = -1, Ht = wt == null ? 0 : wt.length; ++Tt < Ht; )
- if (Ot(wt[Tt], Tt, wt))
- return !0;
- return !1;
- }
- var Kd = ea("length");
- function Jd(wt) {
- return wt.split("");
- }
- function qd(wt) {
- return wt.match(go) || [];
- }
- function Th(wt, Ot, Tt) {
- var Ht;
- return Tt(wt, function(ee, ve, ze) {
- if (Ot(ee, ve, ze))
- return Ht = ve, !1;
- }), Ht;
- }
- function bo(wt, Ot, Tt, Ht) {
- for (var ee = wt.length, ve = Tt + (Ht ? 1 : -1); Ht ? ve-- : ++ve < ee; )
- if (Ot(wt[ve], ve, wt))
- return ve;
- return -1;
- }
- function tn(wt, Ot, Tt) {
- return Ot === Ot ? pf(wt, Ot, Tt) : bo(wt, Ph, Tt);
- }
- function Qd(wt, Ot, Tt, Ht) {
- for (var ee = Tt - 1, ve = wt.length; ++ee < ve; )
- if (Ht(wt[ee], Ot))
- return ee;
- return -1;
- }
- function Ph(wt) {
- return wt !== wt;
- }
- function Eh(wt, Ot) {
- var Tt = wt == null ? 0 : wt.length;
- return Tt ? ra(wt, Ot) / Tt : W;
- }
- function ea(wt) {
- return function(Ot) {
- return Ot == null ? T : Ot[wt];
- };
- }
- function ia(wt) {
- return function(Ot) {
- return wt == null ? T : wt[Ot];
- };
- }
- function Oh(wt, Ot, Tt, Ht, ee) {
- return ee(wt, function(ve, ze, Me) {
- Tt = Ht ? (Ht = !1, ve) : Ot(Tt, ve, ze, Me);
- }), Tt;
- }
- function tf(wt, Ot) {
- var Tt = wt.length;
- for (wt.sort(Ot); Tt--; )
- wt[Tt] = wt[Tt].value;
- return wt;
- }
- function ra(wt, Ot) {
- for (var Tt, Ht = -1, ee = wt.length; ++Ht < ee; ) {
- var ve = Ot(wt[Ht]);
- ve !== T && (Tt = Tt === T ? ve : Tt + ve);
- }
- return Tt;
- }
- function na(wt, Ot) {
- for (var Tt = -1, Ht = Array(wt); ++Tt < wt; )
- Ht[Tt] = Ot(Tt);
- return Ht;
- }
- function ef(wt, Ot) {
- return Ee(Ot, function(Tt) {
- return [Tt, wt[Tt]];
- });
- }
- function Lh(wt) {
- return wt && wt.slice(0, Rh(wt) + 1).replace(Jr, "");
- }
- function ui(wt) {
- return function(Ot) {
- return wt(Ot);
- };
- }
- function oa(wt, Ot) {
- return Ee(Ot, function(Tt) {
- return wt[Tt];
- });
- }
- function Dn(wt, Ot) {
- return wt.has(Ot);
- }
- function _h(wt, Ot) {
- for (var Tt = -1, Ht = wt.length; ++Tt < Ht && tn(Ot, wt[Tt], 0) > -1; )
- ;
- return Tt;
- }
- function Dh(wt, Ot) {
- for (var Tt = wt.length; Tt-- && tn(Ot, wt[Tt], 0) > -1; )
- ;
- return Tt;
- }
- function rf(wt, Ot) {
- for (var Tt = wt.length, Ht = 0; Tt--; )
- wt[Tt] === Ot && ++Ht;
- return Ht;
- }
- var nf = ia(zd), of = ia(Yd);
- function sf(wt) {
- return "\\" + Gd[wt];
- }
- function af(wt, Ot) {
- return wt == null ? T : wt[Ot];
- }
- function en(wt) {
- return Nd.test(wt);
- }
- function lf(wt) {
- return Bd.test(wt);
- }
- function hf(wt) {
- for (var Ot, Tt = []; !(Ot = wt.next()).done; )
- Tt.push(Ot.value);
- return Tt;
- }
- function sa(wt) {
- var Ot = -1, Tt = Array(wt.size);
- return wt.forEach(function(Ht, ee) {
- Tt[++Ot] = [ee, Ht];
- }), Tt;
- }
- function Ih(wt, Ot) {
- return function(Tt) {
- return wt(Ot(Tt));
- };
- }
- function Sr(wt, Ot) {
- for (var Tt = -1, Ht = wt.length, ee = 0, ve = []; ++Tt < Ht; ) {
- var ze = wt[Tt];
- (ze === Ot || ze === F) && (wt[Tt] = F, ve[ee++] = Tt);
- }
- return ve;
- }
- function So(wt) {
- var Ot = -1, Tt = Array(wt.size);
- return wt.forEach(function(Ht) {
- Tt[++Ot] = Ht;
- }), Tt;
- }
- function cf(wt) {
- var Ot = -1, Tt = Array(wt.size);
- return wt.forEach(function(Ht) {
- Tt[++Ot] = [Ht, Ht];
- }), Tt;
- }
- function pf(wt, Ot, Tt) {
- for (var Ht = Tt - 1, ee = wt.length; ++Ht < ee; )
- if (wt[Ht] === Ot)
- return Ht;
- return -1;
- }
- function uf(wt, Ot, Tt) {
- for (var Ht = Tt + 1; Ht--; )
- if (wt[Ht] === Ot)
- return Ht;
- return Ht;
- }
- function rn(wt) {
- return en(wt) ? ff(wt) : Kd(wt);
- }
- function Di(wt) {
- return en(wt) ? gf(wt) : Jd(wt);
- }
- function Rh(wt) {
- for (var Ot = wt.length; Ot-- && fo.test(wt.charAt(Ot)); )
- ;
- return Ot;
- }
- var df = ia(Xd);
- function ff(wt) {
- for (var Ot = Zs.lastIndex = 0; Zs.test(wt); )
- ++Ot;
- return Ot;
- }
- function gf(wt) {
- return wt.match(Zs) || [];
- }
- function mf(wt) {
- return wt.match(Rd) || [];
- }
- var yf = function wt(Ot) {
- Ot = Ot == null ? Ue : nn.defaults(Ue.Object(), Ot, nn.pick(Ue, jd));
- var Tt = Ot.Array, Ht = Ot.Date, ee = Ot.Error, ve = Ot.Function, ze = Ot.Math, Me = Ot.Object, aa = Ot.RegExp, vf = Ot.String, Si = Ot.TypeError, wo = Tt.prototype, xf = ve.prototype, on = Me.prototype, Co = Ot["__core-js_shared__"], Mo = xf.toString, Se = on.hasOwnProperty, bf = 0, Nh = function() {
- var e = /[^.]+$/.exec(Co && Co.keys && Co.keys.IE_PROTO || "");
- return e ? "Symbol(src)_1." + e : "";
- }(), ko = on.toString, Sf = Mo.call(Me), wf = Ue._, Cf = aa(
- "^" + Mo.call(Se).replace(On, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
- ), Ao = xh ? Ot.Buffer : T, wr = Ot.Symbol, To = Ot.Uint8Array, Bh = Ao ? Ao.allocUnsafe : T, Po = Ih(Me.getPrototypeOf, Me), jh = Me.create, Wh = on.propertyIsEnumerable, Eo = wo.splice, zh = wr ? wr.isConcatSpreadable : T, In = wr ? wr.iterator : T, Nr = wr ? wr.toStringTag : T, Oo = function() {
- try {
- var e = Yr(Me, "defineProperty");
- return e({}, "", {}), e;
- } catch {
- }
- }(), Mf = Ot.clearTimeout !== Ue.clearTimeout && Ot.clearTimeout, kf = Ht && Ht.now !== Ue.Date.now && Ht.now, Af = Ot.setTimeout !== Ue.setTimeout && Ot.setTimeout, Lo = ze.ceil, _o = ze.floor, la = Me.getOwnPropertySymbols, Tf = Ao ? Ao.isBuffer : T, Yh = Ot.isFinite, Pf = wo.join, Ef = Ih(Me.keys, Me), Ye = ze.max, Ze = ze.min, Of = Ht.now, Lf = Ot.parseInt, Xh = ze.random, _f = wo.reverse, ha = Yr(Ot, "DataView"), Rn = Yr(Ot, "Map"), ca = Yr(Ot, "Promise"), sn = Yr(Ot, "Set"), Nn = Yr(Ot, "WeakMap"), Bn = Yr(Me, "create"), Do = Nn && new Nn(), an = {}, Df = Xr(ha), If = Xr(Rn), Rf = Xr(ca), Nf = Xr(sn), Bf = Xr(Nn), Io = wr ? wr.prototype : T, jn = Io ? Io.valueOf : T, Gh = Io ? Io.toString : T;
- function ft(e) {
- if (Ne(e) && !ie(e) && !(e instanceof ce)) {
- if (e instanceof wi)
- return e;
- if (Se.call(e, "__wrapped__"))
- return Hc(e);
- }
- return new wi(e);
- }
- var ln = function() {
- function e() {
- }
- return function(C) {
- if (!Ie(C))
- return {};
- if (jh)
- return jh(C);
- e.prototype = C;
- var K = new e();
- return e.prototype = T, K;
- };
- }();
- function Ro() {
- }
- function wi(e, C) {
- this.__wrapped__ = e, this.__actions__ = [], this.__chain__ = !!C, this.__index__ = 0, this.__values__ = T;
- }
- 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: _r,
- /**
- * Used to detect `data` property values to inject.
- *
- * @memberOf _.templateSettings
- * @type {RegExp}
- */
- interpolate: uo,
- /**
- * 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 = Ro.prototype, ft.prototype.constructor = ft, wi.prototype = ln(Ro.prototype), wi.prototype.constructor = wi;
- function ce(e) {
- this.__wrapped__ = e, this.__actions__ = [], this.__dir__ = 1, this.__filtered__ = !1, this.__iteratees__ = [], this.__takeCount__ = P, this.__views__ = [];
- }
- function jf() {
- var e = new ce(this.__wrapped__);
- return e.__actions__ = oi(this.__actions__), e.__dir__ = this.__dir__, e.__filtered__ = this.__filtered__, e.__iteratees__ = oi(this.__iteratees__), e.__takeCount__ = this.__takeCount__, e.__views__ = oi(this.__views__), e;
- }
- function Wf() {
- if (this.__filtered__) {
- var e = new ce(this);
- e.__dir__ = -1, e.__filtered__ = !0;
- } else
- e = this.clone(), e.__dir__ *= -1;
- return e;
- }
- function zf() {
- var e = this.__wrapped__.value(), C = this.__dir__, K = ie(e), ot = C < 0, ut = K ? e.length : 0, mt = qg(0, ut, this.__views__), xt = mt.start, bt = mt.end, Ct = bt - xt, It = ot ? bt : xt - 1, Rt = this.__iteratees__, Bt = Rt.length, Yt = 0, Ut = Ze(Ct, this.__takeCount__);
- if (!K || !ot && ut == Ct && Ut == Ct)
- return dc(e, this.__actions__);
- var Qt = [];
- t:
- for (; Ct-- && Yt < Ut; ) {
- It += C;
- for (var se = -1, te = e[It]; ++se < Bt; ) {
- var he = Rt[se], pe = he.iteratee, gi = he.type, ni = pe(te);
- if (gi == o)
- te = ni;
- else if (!ni) {
- if (gi == t)
- continue t;
- break t;
- }
- }
- Qt[Yt++] = te;
- }
- return Qt;
- }
- ce.prototype = ln(Ro.prototype), ce.prototype.constructor = ce;
- function Br(e) {
- var C = -1, K = e == null ? 0 : e.length;
- for (this.clear(); ++C < K; ) {
- var ot = e[C];
- this.set(ot[0], ot[1]);
- }
- }
- function Yf() {
- this.__data__ = Bn ? Bn(null) : {}, this.size = 0;
- }
- function Xf(e) {
- var C = this.has(e) && delete this.__data__[e];
- return this.size -= C ? 1 : 0, C;
- }
- function Gf(e) {
- var C = this.__data__;
- if (Bn) {
- var K = C[e];
- return K === H ? T : K;
- }
- return Se.call(C, e) ? C[e] : T;
- }
- function Hf(e) {
- var C = this.__data__;
- return Bn ? C[e] !== T : Se.call(C, e);
- }
- function Ff(e, C) {
- var K = this.__data__;
- return this.size += this.has(e) ? 0 : 1, K[e] = Bn && C === T ? H : C, this;
- }
- Br.prototype.clear = Yf, Br.prototype.delete = Xf, Br.prototype.get = Gf, Br.prototype.has = Hf, Br.prototype.set = Ff;
- function qi(e) {
- var C = -1, K = e == null ? 0 : e.length;
- for (this.clear(); ++C < K; ) {
- var ot = e[C];
- this.set(ot[0], ot[1]);
- }
- }
- function Uf() {
- this.__data__ = [], this.size = 0;
- }
- function Vf(e) {
- var C = this.__data__, K = No(C, e);
- if (K < 0)
- return !1;
- var ot = C.length - 1;
- return K == ot ? C.pop() : Eo.call(C, K, 1), --this.size, !0;
- }
- function $f(e) {
- var C = this.__data__, K = No(C, e);
- return K < 0 ? T : C[K][1];
- }
- function Zf(e) {
- return No(this.__data__, e) > -1;
- }
- function Kf(e, C) {
- var K = this.__data__, ot = No(K, e);
- return ot < 0 ? (++this.size, K.push([e, C])) : K[ot][1] = C, this;
- }
- qi.prototype.clear = Uf, qi.prototype.delete = Vf, qi.prototype.get = $f, qi.prototype.has = Zf, qi.prototype.set = Kf;
- function Qi(e) {
- var C = -1, K = e == null ? 0 : e.length;
- for (this.clear(); ++C < K; ) {
- var ot = e[C];
- this.set(ot[0], ot[1]);
- }
- }
- function Jf() {
- this.size = 0, this.__data__ = {
- hash: new Br(),
- map: new (Rn || qi)(),
- string: new Br()
- };
- }
- function qf(e) {
- var C = $o(this, e).delete(e);
- return this.size -= C ? 1 : 0, C;
- }
- function Qf(e) {
- return $o(this, e).get(e);
- }
- function tg(e) {
- return $o(this, e).has(e);
- }
- function eg(e, C) {
- var K = $o(this, e), ot = K.size;
- return K.set(e, C), this.size += K.size == ot ? 0 : 1, this;
- }
- Qi.prototype.clear = Jf, Qi.prototype.delete = qf, Qi.prototype.get = Qf, Qi.prototype.has = tg, Qi.prototype.set = eg;
- function jr(e) {
- var C = -1, K = e == null ? 0 : e.length;
- for (this.__data__ = new Qi(); ++C < K; )
- this.add(e[C]);
- }
- function ig(e) {
- return this.__data__.set(e, H), this;
- }
- function rg(e) {
- return this.__data__.has(e);
- }
- jr.prototype.add = jr.prototype.push = ig, jr.prototype.has = rg;
- function Ii(e) {
- var C = this.__data__ = new qi(e);
- this.size = C.size;
- }
- function ng() {
- this.__data__ = new qi(), this.size = 0;
- }
- function og(e) {
- var C = this.__data__, K = C.delete(e);
- return this.size = C.size, K;
- }
- function sg(e) {
- return this.__data__.get(e);
- }
- function ag(e) {
- return this.__data__.has(e);
- }
- function lg(e, C) {
- var K = this.__data__;
- if (K instanceof qi) {
- var ot = K.__data__;
- if (!Rn || ot.length < y - 1)
- return ot.push([e, C]), this.size = ++K.size, this;
- K = this.__data__ = new Qi(ot);
- }
- return K.set(e, C), this.size = K.size, this;
- }
- Ii.prototype.clear = ng, Ii.prototype.delete = og, Ii.prototype.get = sg, Ii.prototype.has = ag, Ii.prototype.set = lg;
- function Hh(e, C) {
- var K = ie(e), ot = !K && Gr(e), ut = !K && !ot && Tr(e), mt = !K && !ot && !ut && un(e), xt = K || ot || ut || mt, bt = xt ? na(e.length, vf) : [], 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.
- rr(It, Ct))) && bt.push(It);
- return bt;
- }
- function Fh(e) {
- var C = e.length;
- return C ? e[Sa(0, C - 1)] : T;
- }
- function hg(e, C) {
- return Zo(oi(e), Wr(C, 0, e.length));
- }
- function cg(e) {
- return Zo(oi(e));
- }
- function pa(e, C, K) {
- (K !== T && !Ri(e[C], K) || K === T && !(C in e)) && tr(e, C, K);
- }
- function Wn(e, C, K) {
- var ot = e[C];
- (!(Se.call(e, C) && Ri(ot, K)) || K === T && !(C in e)) && tr(e, C, K);
- }
- function No(e, C) {
- for (var K = e.length; K--; )
- if (Ri(e[K][0], C))
- return K;
- return -1;
- }
- function pg(e, C, K, ot) {
- return Cr(e, function(ut, mt, xt) {
- C(ot, ut, K(ut), xt);
- }), ot;
- }
- function Uh(e, C) {
- return e && Hi(C, He(C), e);
- }
- function ug(e, C) {
- return e && Hi(C, ai(C), e);
- }
- function tr(e, C, K) {
- C == "__proto__" && Oo ? Oo(e, C, {
- configurable: !0,
- enumerable: !0,
- value: K,
- writable: !0
- }) : e[C] = K;
- }
- function ua(e, C) {
- for (var K = -1, ot = C.length, ut = Tt(ot), mt = e == null; ++K < ot; )
- ut[K] = mt ? T : Ua(e, C[K]);
- return ut;
- }
- function Wr(e, C, K) {
- return e === e && (K !== T && (e = e <= K ? e : K), C !== T && (e = e >= C ? e : C)), e;
- }
- function Ci(e, C, K, ot, ut, mt) {
- var xt, bt = C & R, Ct = C & N, It = C & b;
- if (K && (xt = ut ? K(e, ot, ut, mt) : K(e)), xt !== T)
- return xt;
- if (!Ie(e))
- return e;
- var Rt = ie(e);
- if (Rt) {
- if (xt = tm(e), !bt)
- return oi(e, xt);
- } else {
- var Bt = Ke(e), Yt = Bt == $ || Bt == q;
- if (Tr(e))
- return mc(e, bt);
- if (Bt == rt || Bt == L || Yt && !ut) {
- if (xt = Ct || Yt ? {} : Rc(e), !bt)
- return Ct ? Gg(e, ug(xt, e)) : Xg(e, Uh(xt, e));
- } else {
- if (!ke[Bt])
- return ut ? e : {};
- xt = em(e, Bt, bt);
- }
- }
- mt || (mt = new Ii());
- var Ut = mt.get(e);
- if (Ut)
- return Ut;
- mt.set(e, xt), cp(e) ? e.forEach(function(te) {
- xt.add(Ci(te, C, K, te, e, mt));
- }) : lp(e) && e.forEach(function(te, he) {
- xt.set(he, Ci(te, C, K, he, e, mt));
- });
- var Qt = It ? Ct ? _a : La : Ct ? ai : He, se = Rt ? T : Qt(e);
- return bi(se || e, function(te, he) {
- se && (he = te, te = e[he]), Wn(xt, he, Ci(te, C, K, he, e, mt));
- }), xt;
- }
- function dg(e) {
- var C = He(e);
- return function(K) {
- return Vh(K, e, C);
- };
- }
- function Vh(e, C, K) {
- var ot = K.length;
- if (e == null)
- return !ot;
- for (e = Me(e); ot--; ) {
- var ut = K[ot], mt = C[ut], xt = e[ut];
- if (xt === T && !(ut in e) || !mt(xt))
- return !1;
- }
- return !0;
- }
- function $h(e, C, K) {
- if (typeof e != "function")
- throw new Si(I);
- return Un(function() {
- e.apply(T, K);
- }, C);
- }
- function zn(e, C, K, ot) {
- var ut = -1, mt = xo, xt = !0, bt = e.length, Ct = [], It = C.length;
- if (!bt)
- return Ct;
- K && (C = Ee(C, ui(K))), ot ? (mt = qs, xt = !1) : C.length >= y && (mt = Dn, xt = !1, C = new jr(C));
- t:
- for (; ++ut < bt; ) {
- var Rt = e[ut], Bt = K == null ? Rt : K(Rt);
- if (Rt = ot || Rt !== 0 ? Rt : 0, xt && Bt === Bt) {
- for (var Yt = It; Yt--; )
- if (C[Yt] === Bt)
- continue t;
- Ct.push(Rt);
- } else
- mt(C, Bt, ot) || Ct.push(Rt);
- }
- return Ct;
- }
- var Cr = Sc(Gi), Zh = Sc(fa, !0);
- function fg(e, C) {
- var K = !0;
- return Cr(e, function(ot, ut, mt) {
- return K = !!C(ot, ut, mt), K;
- }), K;
- }
- function Bo(e, C, K) {
- for (var ot = -1, ut = e.length; ++ot < ut; ) {
- var mt = e[ot], xt = C(mt);
- if (xt != null && (bt === T ? xt === xt && !fi(xt) : K(xt, bt)))
- var bt = xt, Ct = mt;
- }
- return Ct;
- }
- function gg(e, C, K, ot) {
- var ut = e.length;
- for (K = ne(K), K < 0 && (K = -K > ut ? 0 : ut + K), ot = ot === T || ot > ut ? ut : ne(ot), ot < 0 && (ot += ut), ot = K > ot ? 0 : up(ot); K < ot; )
- e[K++] = C;
- return e;
- }
- function Kh(e, C) {
- var K = [];
- return Cr(e, function(ot, ut, mt) {
- C(ot, ut, mt) && K.push(ot);
- }), K;
- }
- function Ve(e, C, K, ot, ut) {
- var mt = -1, xt = e.length;
- for (K || (K = rm), ut || (ut = []); ++mt < xt; ) {
- var bt = e[mt];
- C > 0 && K(bt) ? C > 1 ? Ve(bt, C - 1, K, ot, ut) : br(ut, bt) : ot || (ut[ut.length] = bt);
- }
- return ut;
- }
- var da = wc(), Jh = wc(!0);
- function Gi(e, C) {
- return e && da(e, C, He);
- }
- function fa(e, C) {
- return e && Jh(e, C, He);
- }
- function jo(e, C) {
- return xr(C, function(K) {
- return nr(e[K]);
- });
- }
- function zr(e, C) {
- C = kr(C, e);
- for (var K = 0, ot = C.length; e != null && K < ot; )
- e = e[Fi(C[K++])];
- return K && K == ot ? e : T;
- }
- function qh(e, C, K) {
- var ot = C(e);
- return ie(e) ? ot : br(ot, K(e));
- }
- function ii(e) {
- return e == null ? e === T ? tt : nt : Nr && Nr in Me(e) ? Jg(e) : cm(e);
- }
- function ga(e, C) {
- return e > C;
- }
- function mg(e, C) {
- return e != null && Se.call(e, C);
- }
- function yg(e, C) {
- return e != null && C in Me(e);
- }
- function vg(e, C, K) {
- return e >= Ze(C, K) && e < Ye(C, K);
- }
- function ma(e, C, K) {
- for (var ot = K ? qs : xo, 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, ui(C))), Ct = Ze(Rt.length, Ct), bt[xt] = !K && (C || ut >= 120 && Rt.length >= 120) ? new jr(xt && Rt) : T;
- }
- Rt = e[0];
- var Bt = -1, Yt = 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, !(Yt ? Dn(Yt, Qt) : ot(It, Qt, K))) {
- for (xt = mt; --xt; ) {
- var se = bt[xt];
- if (!(se ? Dn(se, Qt) : ot(e[xt], Qt, K)))
- continue t;
- }
- Yt && Yt.push(Qt), It.push(Ut);
- }
- }
- return It;
- }
- function xg(e, C, K, ot) {
- return Gi(e, function(ut, mt, xt) {
- C(ot, K(ut), mt, xt);
- }), ot;
- }
- function Yn(e, C, K) {
- C = kr(C, e), e = Wc(e, C);
- var ot = e == null ? e : e[Fi(ki(C))];
- return ot == null ? T : pi(ot, e, K);
- }
- function Qh(e) {
- return Ne(e) && ii(e) == L;
- }
- function bg(e) {
- return Ne(e) && ii(e) == pt;
- }
- function Sg(e) {
- return Ne(e) && ii(e) == k;
- }
- function Xn(e, C, K, ot, ut) {
- return e === C ? !0 : e == null || C == null || !Ne(e) && !Ne(C) ? e !== e && C !== C : wg(e, C, K, ot, Xn, ut);
- }
- function wg(e, C, K, ot, ut, mt) {
- var xt = ie(e), bt = ie(C), Ct = xt ? Y : Ke(e), It = bt ? Y : Ke(C);
- Ct = Ct == L ? rt : Ct, It = It == L ? rt : It;
- var Rt = Ct == rt, Bt = It == rt, Yt = Ct == It;
- if (Yt && Tr(e)) {
- if (!Tr(C))
- return !1;
- xt = !0, Rt = !1;
- }
- if (Yt && !Rt)
- return mt || (mt = new Ii()), xt || un(e) ? _c(e, C, K, ot, ut, mt) : Zg(e, C, Ct, K, ot, ut, mt);
- if (!(K & x)) {
- var Ut = Rt && Se.call(e, "__wrapped__"), Qt = Bt && Se.call(C, "__wrapped__");
- if (Ut || Qt) {
- var se = Ut ? e.value() : e, te = Qt ? C.value() : C;
- return mt || (mt = new Ii()), ut(se, te, K, ot, mt);
- }
- }
- return Yt ? (mt || (mt = new Ii()), Kg(e, C, K, ot, ut, mt)) : !1;
- }
- function Cg(e) {
- return Ne(e) && Ke(e) == it;
- }
- function ya(e, C, K, ot) {
- var ut = K.length, mt = ut, xt = !ot;
- 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 === T && !(Ct in e))
- return !1;
- } else {
- var Bt = new Ii();
- if (ot)
- var Yt = ot(It, Rt, Ct, e, C, Bt);
- if (!(Yt === T ? Xn(Rt, It, x | u, ot, Bt) : Yt))
- return !1;
- }
- }
- return !0;
- }
- function tc(e) {
- if (!Ie(e) || om(e))
- return !1;
- var C = nr(e) ? Cf : De;
- return C.test(Xr(e));
- }
- function Mg(e) {
- return Ne(e) && ii(e) == dt;
- }
- function kg(e) {
- return Ne(e) && Ke(e) == ht;
- }
- function Ag(e) {
- return Ne(e) && es(e.length) && !!Ae[ii(e)];
- }
- function ec(e) {
- return typeof e == "function" ? e : e == null ? li : typeof e == "object" ? ie(e) ? nc(e[0], e[1]) : rc(e) : Cp(e);
- }
- function va(e) {
- if (!Fn(e))
- return Ef(e);
- var C = [];
- for (var K in Me(e))
- Se.call(e, K) && K != "constructor" && C.push(K);
- return C;
- }
- function Tg(e) {
- if (!Ie(e))
- return hm(e);
- var C = Fn(e), K = [];
- for (var ot in e)
- ot == "constructor" && (C || !Se.call(e, ot)) || K.push(ot);
- return K;
- }
- function xa(e, C) {
- return e < C;
- }
- function ic(e, C) {
- var K = -1, ot = si(e) ? Tt(e.length) : [];
- return Cr(e, function(ut, mt, xt) {
- ot[++K] = C(ut, mt, xt);
- }), ot;
- }
- function rc(e) {
- var C = Ia(e);
- return C.length == 1 && C[0][2] ? Bc(C[0][0], C[0][1]) : function(K) {
- return K === e || ya(K, e, C);
- };
- }
- function nc(e, C) {
- return Na(e) && Nc(C) ? Bc(Fi(e), C) : function(K) {
- var ot = Ua(K, e);
- return ot === T && ot === C ? Va(K, e) : Xn(C, ot, x | u);
- };
- }
- function Wo(e, C, K, ot, ut) {
- e !== C && da(C, function(mt, xt) {
- if (ut || (ut = new Ii()), Ie(mt))
- Pg(e, C, xt, K, Wo, ot, ut);
- else {
- var bt = ot ? ot(ja(e, xt), mt, xt + "", e, C, ut) : T;
- bt === T && (bt = mt), pa(e, xt, bt);
- }
- }, ai);
- }
- function Pg(e, C, K, ot, ut, mt, xt) {
- var bt = ja(e, K), Ct = ja(C, K), It = xt.get(Ct);
- if (It) {
- pa(e, K, It);
- return;
- }
- var Rt = mt ? mt(bt, Ct, K + "", e, C, xt) : T, Bt = Rt === T;
- if (Bt) {
- var Yt = ie(Ct), Ut = !Yt && Tr(Ct), Qt = !Yt && !Ut && un(Ct);
- Rt = Ct, Yt || Ut || Qt ? ie(bt) ? Rt = bt : Be(bt) ? Rt = oi(bt) : Ut ? (Bt = !1, Rt = mc(Ct, !0)) : Qt ? (Bt = !1, Rt = yc(Ct, !0)) : Rt = [] : Vn(Ct) || Gr(Ct) ? (Rt = bt, Gr(bt) ? Rt = dp(bt) : (!Ie(bt) || nr(bt)) && (Rt = Rc(Ct))) : Bt = !1;
- }
- Bt && (xt.set(Ct, Rt), ut(Rt, Ct, ot, mt, xt), xt.delete(Ct)), pa(e, K, Rt);
- }
- function oc(e, C) {
- var K = e.length;
- if (K)
- return C += C < 0 ? K : 0, rr(C, K) ? e[C] : T;
- }
- function sc(e, C, K) {
- C.length ? C = Ee(C, function(mt) {
- return ie(mt) ? function(xt) {
- return zr(xt, mt.length === 1 ? mt[0] : mt);
- } : mt;
- }) : C = [li];
- var ot = -1;
- C = Ee(C, ui(qt()));
- var ut = ic(e, function(mt, xt, bt) {
- var Ct = Ee(C, function(It) {
- return It(mt);
- });
- return { criteria: Ct, index: ++ot, value: mt };
- });
- return tf(ut, function(mt, xt) {
- return Yg(mt, xt, K);
- });
- }
- function Eg(e, C) {
- return ac(e, C, function(K, ot) {
- return Va(e, ot);
- });
- }
- function ac(e, C, K) {
- for (var ot = -1, ut = C.length, mt = {}; ++ot < ut; ) {
- var xt = C[ot], bt = zr(e, xt);
- K(bt, xt) && Gn(mt, kr(xt, e), bt);
- }
- return mt;
- }
- function Og(e) {
- return function(C) {
- return zr(C, e);
- };
- }
- function ba(e, C, K, ot) {
- var ut = ot ? Qd : tn, mt = -1, xt = C.length, bt = e;
- for (e === C && (C = oi(C)), K && (bt = Ee(e, ui(K))); ++mt < xt; )
- for (var Ct = 0, It = C[mt], Rt = K ? K(It) : It; (Ct = ut(bt, Rt, Ct, ot)) > -1; )
- bt !== e && Eo.call(bt, Ct, 1), Eo.call(e, Ct, 1);
- return e;
- }
- function lc(e, C) {
- for (var K = e ? C.length : 0, ot = K - 1; K--; ) {
- var ut = C[K];
- if (K == ot || ut !== mt) {
- var mt = ut;
- rr(ut) ? Eo.call(e, ut, 1) : Ma(e, ut);
- }
- }
- return e;
- }
- function Sa(e, C) {
- return e + _o(Xh() * (C - e + 1));
- }
- function Lg(e, C, K, ot) {
- for (var ut = -1, mt = Ye(Lo((C - e) / (K || 1)), 0), xt = Tt(mt); mt--; )
- xt[ot ? mt : ++ut] = e, e += K;
- return xt;
- }
- function wa(e, C) {
- var K = "";
- if (!e || C < 1 || C > _)
- return K;
- do
- C % 2 && (K += e), C = _o(C / 2), C && (e += e);
- while (C);
- return K;
- }
- function ae(e, C) {
- return Wa(jc(e, C, li), e + "");
- }
- function _g(e) {
- return Fh(dn(e));
- }
- function Dg(e, C) {
- var K = dn(e);
- return Zo(K, Wr(C, 0, K.length));
- }
- function Gn(e, C, K, ot) {
- if (!Ie(e))
- return e;
- C = kr(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 = ot ? ot(Rt, Ct, bt) : T, It === T && (It = Ie(Rt) ? Rt : rr(C[ut + 1]) ? [] : {});
- }
- Wn(bt, Ct, It), bt = bt[Ct];
- }
- return e;
- }
- var hc = Do ? function(e, C) {
- return Do.set(e, C), e;
- } : li, Ig = Oo ? function(e, C) {
- return Oo(e, "toString", {
- configurable: !0,
- enumerable: !1,
- value: Za(C),
- writable: !0
- });
- } : li;
- function Rg(e) {
- return Zo(dn(e));
- }
- function Mi(e, C, K) {
- var ot = -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); ++ot < ut; )
- mt[ot] = e[ot + C];
- return mt;
- }
- function Ng(e, C) {
- var K;
- return Cr(e, function(ot, ut, mt) {
- return K = C(ot, ut, mt), !K;
- }), !!K;
- }
- function zo(e, C, K) {
- var ot = 0, ut = e == null ? ot : e.length;
- if (typeof C == "number" && C === C && ut <= g) {
- for (; ot < ut; ) {
- var mt = ot + ut >>> 1, xt = e[mt];
- xt !== null && !fi(xt) && (K ? xt <= C : xt < C) ? ot = mt + 1 : ut = mt;
- }
- return ut;
- }
- return Ca(e, C, li, K);
- }
- function Ca(e, C, K, ot) {
- 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 = fi(C), It = C === T; ut < mt; ) {
- var Rt = _o((ut + mt) / 2), Bt = K(e[Rt]), Yt = Bt !== T, Ut = Bt === null, Qt = Bt === Bt, se = fi(Bt);
- if (xt)
- var te = ot || Qt;
- else
- It ? te = Qt && (ot || Yt) : bt ? te = Qt && Yt && (ot || !Ut) : Ct ? te = Qt && Yt && !Ut && (ot || !se) : Ut || se ? te = !1 : te = ot ? Bt <= C : Bt < C;
- te ? ut = Rt + 1 : mt = Rt;
- }
- return Ze(mt, X);
- }
- function cc(e, C) {
- for (var K = -1, ot = e.length, ut = 0, mt = []; ++K < ot; ) {
- var xt = e[K], bt = C ? C(xt) : xt;
- if (!K || !Ri(bt, Ct)) {
- var Ct = bt;
- mt[ut++] = xt === 0 ? 0 : xt;
- }
- }
- return mt;
- }
- function pc(e) {
- return typeof e == "number" ? e : fi(e) ? W : +e;
- }
- function di(e) {
- if (typeof e == "string")
- return e;
- if (ie(e))
- return Ee(e, di) + "";
- if (fi(e))
- return Gh ? Gh.call(e) : "";
- var C = e + "";
- return C == "0" && 1 / e == -A ? "-0" : C;
- }
- function Mr(e, C, K) {
- var ot = -1, ut = xo, mt = e.length, xt = !0, bt = [], Ct = bt;
- if (K)
- xt = !1, ut = qs;
- else if (mt >= y) {
- var It = C ? null : Vg(e);
- if (It)
- return So(It);
- xt = !1, ut = Dn, Ct = new jr();
- } else
- Ct = C ? [] : bt;
- t:
- for (; ++ot < mt; ) {
- var Rt = e[ot], Bt = C ? C(Rt) : Rt;
- if (Rt = K || Rt !== 0 ? Rt : 0, xt && Bt === Bt) {
- for (var Yt = Ct.length; Yt--; )
- if (Ct[Yt] === 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 Ma(e, C) {
- return C = kr(C, e), e = Wc(e, C), e == null || delete e[Fi(ki(C))];
- }
- function uc(e, C, K, ot) {
- return Gn(e, C, K(zr(e, C)), ot);
- }
- function Yo(e, C, K, ot) {
- for (var ut = e.length, mt = ot ? ut : -1; (ot ? mt-- : ++mt < ut) && C(e[mt], mt, e); )
- ;
- return K ? Mi(e, ot ? 0 : mt, ot ? mt + 1 : ut) : Mi(e, ot ? mt + 1 : 0, ot ? ut : mt);
- }
- function dc(e, C) {
- var K = e;
- return K instanceof ce && (K = K.value()), Qs(C, function(ot, ut) {
- return ut.func.apply(ut.thisArg, br([ot], ut.args));
- }, K);
- }
- function ka(e, C, K) {
- var ot = e.length;
- if (ot < 2)
- return ot ? Mr(e[0]) : [];
- for (var ut = -1, mt = Tt(ot); ++ut < ot; )
- for (var xt = e[ut], bt = -1; ++bt < ot; )
- bt != ut && (mt[ut] = zn(mt[ut] || xt, e[bt], C, K));
- return Mr(Ve(mt, 1), C, K);
- }
- function fc(e, C, K) {
- for (var ot = -1, ut = e.length, mt = C.length, xt = {}; ++ot < ut; ) {
- var bt = ot < mt ? C[ot] : T;
- K(xt, e[ot], bt);
- }
- return xt;
- }
- function Aa(e) {
- return Be(e) ? e : [];
- }
- function Ta(e) {
- return typeof e == "function" ? e : li;
- }
- function kr(e, C) {
- return ie(e) ? e : Na(e, C) ? [e] : Gc(xe(e));
- }
- var Bg = ae;
- function Ar(e, C, K) {
- var ot = e.length;
- return K = K === T ? ot : K, !C && K >= ot ? e : Mi(e, C, K);
- }
- var gc = Mf || function(e) {
- return Ue.clearTimeout(e);
- };
- function mc(e, C) {
- if (C)
- return e.slice();
- var K = e.length, ot = Bh ? Bh(K) : new e.constructor(K);
- return e.copy(ot), ot;
- }
- function Pa(e) {
- var C = new e.constructor(e.byteLength);
- return new To(C).set(new To(e)), C;
- }
- function jg(e, C) {
- var K = C ? Pa(e.buffer) : e.buffer;
- return new e.constructor(K, e.byteOffset, e.byteLength);
- }
- function Wg(e) {
- var C = new e.constructor(e.source, ue.exec(e));
- return C.lastIndex = e.lastIndex, C;
- }
- function zg(e) {
- return jn ? Me(jn.call(e)) : {};
- }
- function yc(e, C) {
- var K = C ? Pa(e.buffer) : e.buffer;
- return new e.constructor(K, e.byteOffset, e.length);
- }
- function vc(e, C) {
- if (e !== C) {
- var K = e !== T, ot = e === null, ut = e === e, mt = fi(e), xt = C !== T, bt = C === null, Ct = C === C, It = fi(C);
- if (!bt && !It && !mt && e > C || mt && xt && Ct && !bt && !It || ot && xt && Ct || !K && Ct || !ut)
- return 1;
- if (!ot && !mt && !It && e < C || It && K && ut && !ot && !mt || bt && K && ut || !xt && ut || !Ct)
- return -1;
- }
- return 0;
- }
- function Yg(e, C, K) {
- for (var ot = -1, ut = e.criteria, mt = C.criteria, xt = ut.length, bt = K.length; ++ot < xt; ) {
- var Ct = vc(ut[ot], mt[ot]);
- if (Ct) {
- if (ot >= bt)
- return Ct;
- var It = K[ot];
- return Ct * (It == "desc" ? -1 : 1);
- }
- }
- return e.index - C.index;
- }
- function xc(e, C, K, ot) {
- for (var ut = -1, mt = e.length, xt = K.length, bt = -1, Ct = C.length, It = Ye(mt - xt, 0), Rt = Tt(Ct + It), Bt = !ot; ++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 bc(e, C, K, ot) {
- for (var ut = -1, mt = e.length, xt = -1, bt = K.length, Ct = -1, It = C.length, Rt = Ye(mt - bt, 0), Bt = Tt(Rt + It), Yt = !ot; ++ut < Rt; )
- Bt[ut] = e[ut];
- for (var Ut = ut; ++Ct < It; )
- Bt[Ut + Ct] = C[Ct];
- for (; ++xt < bt; )
- (Yt || ut < mt) && (Bt[Ut + K[xt]] = e[ut++]);
- return Bt;
- }
- function oi(e, C) {
- var K = -1, ot = e.length;
- for (C || (C = Tt(ot)); ++K < ot; )
- C[K] = e[K];
- return C;
- }
- function Hi(e, C, K, ot) {
- var ut = !K;
- K || (K = {});
- for (var mt = -1, xt = C.length; ++mt < xt; ) {
- var bt = C[mt], Ct = ot ? ot(K[bt], e[bt], bt, K, e) : T;
- Ct === T && (Ct = e[bt]), ut ? tr(K, bt, Ct) : Wn(K, bt, Ct);
- }
- return K;
- }
- function Xg(e, C) {
- return Hi(e, Ra(e), C);
- }
- function Gg(e, C) {
- return Hi(e, Dc(e), C);
- }
- function Xo(e, C) {
- return function(K, ot) {
- var ut = ie(K) ? Vd : pg, mt = C ? C() : {};
- return ut(K, e, qt(ot, 2), mt);
- };
- }
- function hn(e) {
- return ae(function(C, K) {
- var ot = -1, ut = K.length, mt = ut > 1 ? K[ut - 1] : T, xt = ut > 2 ? K[2] : T;
- for (mt = e.length > 3 && typeof mt == "function" ? (ut--, mt) : T, xt && ri(K[0], K[1], xt) && (mt = ut < 3 ? T : mt, ut = 1), C = Me(C); ++ot < ut; ) {
- var bt = K[ot];
- bt && e(C, bt, ot, mt);
- }
- return C;
- });
- }
- function Sc(e, C) {
- return function(K, ot) {
- if (K == null)
- return K;
- if (!si(K))
- return e(K, ot);
- for (var ut = K.length, mt = C ? ut : -1, xt = Me(K); (C ? mt-- : ++mt < ut) && ot(xt[mt], mt, xt) !== !1; )
- ;
- return K;
- };
- }
- function wc(e) {
- return function(C, K, ot) {
- for (var ut = -1, mt = Me(C), xt = ot(C), bt = xt.length; bt--; ) {
- var Ct = xt[e ? bt : ++ut];
- if (K(mt[Ct], Ct, mt) === !1)
- break;
- }
- return C;
- };
- }
- function Hg(e, C, K) {
- var ot = C & f, ut = Hn(e);
- function mt() {
- var xt = this && this !== Ue && this instanceof mt ? ut : e;
- return xt.apply(ot ? K : this, arguments);
- }
- return mt;
- }
- function Cc(e) {
- return function(C) {
- C = xe(C);
- var K = en(C) ? Di(C) : T, ot = K ? K[0] : C.charAt(0), ut = K ? Ar(K, 1).join("") : C.slice(1);
- return ot[e]() + ut;
- };
- }
- function cn(e) {
- return function(C) {
- return Qs(Sp(bp(C).replace(Dd, "")), e, "");
- };
- }
- function Hn(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), ot = e.apply(K, C);
- return Ie(ot) ? ot : K;
- };
- }
- function Fg(e, C, K) {
- var ot = Hn(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 ? [] : Sr(xt, Ct);
- if (mt -= It.length, mt < K)
- return Pc(
- e,
- C,
- Go,
- ut.placeholder,
- T,
- xt,
- It,
- T,
- T,
- K - mt
- );
- var Rt = this && this !== Ue && this instanceof ut ? ot : e;
- return pi(Rt, this, xt);
- }
- return ut;
- }
- function Mc(e) {
- return function(C, K, ot) {
- 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, ot);
- return xt > -1 ? ut[mt ? C[xt] : xt] : T;
- };
- }
- function kc(e) {
- return ir(function(C) {
- var K = C.length, ot = K, ut = wi.prototype.thru;
- for (e && C.reverse(); ot--; ) {
- var mt = C[ot];
- if (typeof mt != "function")
- throw new Si(I);
- if (ut && !xt && Vo(mt) == "wrapper")
- var xt = new wi([], !0);
- }
- for (ot = xt ? ot : K; ++ot < K; ) {
- mt = C[ot];
- var bt = Vo(mt), Ct = bt == "wrapper" ? Da(mt) : T;
- Ct && Ba(Ct[0]) && Ct[1] == (v | B | S | a) && !Ct[4].length && Ct[9] == 1 ? xt = xt[Vo(Ct[0])].apply(xt, Ct[3]) : xt = mt.length == 1 && Ba(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, Yt = K ? C[Bt].apply(this, It) : Rt; ++Bt < K; )
- Yt = C[Bt].call(this, Yt);
- return Yt;
- };
- });
- }
- function Go(e, C, K, ot, ut, mt, xt, bt, Ct, It) {
- var Rt = C & v, Bt = C & f, Yt = C & E, Ut = C & (B | M), Qt = C & c, se = Yt ? T : Hn(e);
- function te() {
- for (var he = arguments.length, pe = Tt(he), gi = he; gi--; )
- pe[gi] = arguments[gi];
- if (Ut)
- var ni = pn(te), mi = rf(pe, ni);
- if (ot && (pe = xc(pe, ot, ut, Ut)), mt && (pe = bc(pe, mt, xt, Ut)), he -= mi, Ut && he < It) {
- var je = Sr(pe, ni);
- return Pc(
- e,
- C,
- Go,
- te.placeholder,
- K,
- pe,
- je,
- bt,
- Ct,
- It - he
- );
- }
- var Ni = Bt ? K : this, sr = Yt ? Ni[e] : e;
- return he = pe.length, bt ? pe = pm(pe, bt) : Qt && he > 1 && pe.reverse(), Rt && Ct < he && (pe.length = Ct), this && this !== Ue && this instanceof te && (sr = se || Hn(sr)), sr.apply(Ni, pe);
- }
- return te;
- }
- function Ac(e, C) {
- return function(K, ot) {
- return xg(K, e, C(ot), {});
- };
- }
- function Ho(e, C) {
- return function(K, ot) {
- var ut;
- if (K === T && ot === T)
- return C;
- if (K !== T && (ut = K), ot !== T) {
- if (ut === T)
- return ot;
- typeof K == "string" || typeof ot == "string" ? (K = di(K), ot = di(ot)) : (K = pc(K), ot = pc(ot)), ut = e(K, ot);
- }
- return ut;
- };
- }
- function Ea(e) {
- return ir(function(C) {
- return C = Ee(C, ui(qt())), ae(function(K) {
- var ot = this;
- return e(C, function(ut) {
- return pi(ut, ot, K);
- });
- });
- });
- }
- function Fo(e, C) {
- C = C === T ? " " : di(C);
- var K = C.length;
- if (K < 2)
- return K ? wa(C, e) : C;
- var ot = wa(C, Lo(e / rn(C)));
- return en(C) ? Ar(Di(ot), 0, e).join("") : ot.slice(0, e);
- }
- function Ug(e, C, K, ot) {
- var ut = C & f, mt = Hn(e);
- function xt() {
- for (var bt = -1, Ct = arguments.length, It = -1, Rt = ot.length, Bt = Tt(Rt + Ct), Yt = this && this !== Ue && this instanceof xt ? mt : e; ++It < Rt; )
- Bt[It] = ot[It];
- for (; Ct--; )
- Bt[It++] = arguments[++bt];
- return pi(Yt, ut ? K : this, Bt);
- }
- return xt;
- }
- function Tc(e) {
- return function(C, K, ot) {
- return ot && typeof ot != "number" && ri(C, K, ot) && (K = ot = T), C = or(C), K === T ? (K = C, C = 0) : K = or(K), ot = ot === T ? C < K ? 1 : -1 : or(ot), Lg(C, K, ot, e);
- };
- }
- function Uo(e) {
- return function(C, K) {
- return typeof C == "string" && typeof K == "string" || (C = Ai(C), K = Ai(K)), e(C, K);
- };
- }
- function Pc(e, C, K, ot, ut, mt, xt, bt, Ct, It) {
- var Rt = C & B, Bt = Rt ? xt : T, Yt = Rt ? T : xt, Ut = Rt ? mt : T, Qt = Rt ? T : mt;
- C |= Rt ? S : w, C &= ~(Rt ? w : S), C & O || (C &= ~(f | E));
- var se = [
- e,
- C,
- ut,
- Ut,
- Bt,
- Qt,
- Yt,
- bt,
- Ct,
- It
- ], te = K.apply(T, se);
- return Ba(e) && zc(te, se), te.placeholder = ot, Yc(te, e, C);
- }
- function Oa(e) {
- var C = ze[e];
- return function(K, ot) {
- if (K = Ai(K), ot = ot == null ? 0 : Ze(ne(ot), 292), ot && Yh(K)) {
- var ut = (xe(K) + "e").split("e"), mt = C(ut[0] + "e" + (+ut[1] + ot));
- return ut = (xe(mt) + "e").split("e"), +(ut[0] + "e" + (+ut[1] - ot));
- }
- return C(K);
- };
- }
- var Vg = sn && 1 / So(new sn([, -0]))[1] == A ? function(e) {
- return new sn(e);
- } : qa;
- function Ec(e) {
- return function(C) {
- var K = Ke(C);
- return K == it ? sa(C) : K == ht ? cf(C) : ef(C, e(C));
- };
- }
- function er(e, C, K, ot, ut, mt, xt, bt) {
- var Ct = C & E;
- if (!Ct && typeof e != "function")
- throw new Si(I);
- var It = ot ? ot.length : 0;
- if (It || (C &= ~(S | w), ot = ut = T), xt = xt === T ? xt : Ye(ne(xt), 0), bt = bt === T ? bt : ne(bt), It -= ut ? ut.length : 0, C & w) {
- var Rt = ot, Bt = ut;
- ot = ut = T;
- }
- var Yt = Ct ? T : Da(e), Ut = [
- e,
- C,
- K,
- ot,
- ut,
- Rt,
- Bt,
- mt,
- xt,
- bt
- ];
- if (Yt && lm(Ut, Yt), e = Ut[0], C = Ut[1], K = Ut[2], ot = Ut[3], ut = Ut[4], bt = Ut[9] = Ut[9] === T ? Ct ? 0 : e.length : Ye(Ut[9] - It, 0), !bt && C & (B | M) && (C &= ~(B | M)), !C || C == f)
- var Qt = Hg(e, C, K);
- else
- C == B || C == M ? Qt = Fg(e, C, bt) : (C == S || C == (f | S)) && !ut.length ? Qt = Ug(e, C, K, ot) : Qt = Go.apply(T, Ut);
- var se = Yt ? hc : zc;
- return Yc(se(Qt, Ut), e, C);
- }
- function Oc(e, C, K, ot) {
- return e === T || Ri(e, on[K]) && !Se.call(ot, K) ? C : e;
- }
- function Lc(e, C, K, ot, ut, mt) {
- return Ie(e) && Ie(C) && (mt.set(C, e), Wo(e, C, T, Lc, mt), mt.delete(C)), e;
- }
- function $g(e) {
- return Vn(e) ? T : e;
- }
- function _c(e, C, K, ot, 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, Yt = !0, Ut = K & u ? new jr() : T;
- for (mt.set(e, C), mt.set(C, e); ++Bt < bt; ) {
- var Qt = e[Bt], se = C[Bt];
- if (ot)
- var te = xt ? ot(se, Qt, Bt, C, e, mt) : ot(Qt, se, Bt, e, C, mt);
- if (te !== T) {
- if (te)
- continue;
- Yt = !1;
- break;
- }
- if (Ut) {
- if (!ta(C, function(he, pe) {
- if (!Dn(Ut, pe) && (Qt === he || ut(Qt, he, K, ot, mt)))
- return Ut.push(pe);
- })) {
- Yt = !1;
- break;
- }
- } else if (!(Qt === se || ut(Qt, se, K, ot, mt))) {
- Yt = !1;
- break;
- }
- }
- return mt.delete(e), mt.delete(C), Yt;
- }
- function Zg(e, C, K, ot, 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 To(e), new To(C)));
- case Q:
- case k:
- case et:
- return Ri(+e, +C);
- case z:
- return e.name == C.name && e.message == C.message;
- case dt:
- case at:
- return e == C + "";
- case it:
- var bt = sa;
- case ht:
- var Ct = ot & x;
- if (bt || (bt = So), e.size != C.size && !Ct)
- return !1;
- var It = xt.get(e);
- if (It)
- return It == C;
- ot |= u, xt.set(e, C);
- var Rt = _c(bt(e), bt(C), ot, ut, mt, xt);
- return xt.delete(e), Rt;
- case J:
- if (jn)
- return jn.call(e) == jn.call(C);
- }
- return !1;
- }
- function Kg(e, C, K, ot, ut, mt) {
- var xt = K & x, bt = La(e), Ct = bt.length, It = La(C), Rt = It.length;
- if (Ct != Rt && !xt)
- return !1;
- for (var Bt = Ct; Bt--; ) {
- var Yt = bt[Bt];
- if (!(xt ? Yt in C : Se.call(C, Yt)))
- return !1;
- }
- var Ut = mt.get(e), Qt = mt.get(C);
- if (Ut && Qt)
- return Ut == C && Qt == e;
- var se = !0;
- mt.set(e, C), mt.set(C, e);
- for (var te = xt; ++Bt < Ct; ) {
- Yt = bt[Bt];
- var he = e[Yt], pe = C[Yt];
- if (ot)
- var gi = xt ? ot(pe, he, Yt, C, e, mt) : ot(he, pe, Yt, e, C, mt);
- if (!(gi === T ? he === pe || ut(he, pe, K, ot, mt) : gi)) {
- se = !1;
- break;
- }
- te || (te = Yt == "constructor");
- }
- if (se && !te) {
- var ni = e.constructor, mi = C.constructor;
- ni != mi && "constructor" in e && "constructor" in C && !(typeof ni == "function" && ni instanceof ni && typeof mi == "function" && mi instanceof mi) && (se = !1);
- }
- return mt.delete(e), mt.delete(C), se;
- }
- function ir(e) {
- return Wa(jc(e, T, Vc), e + "");
- }
- function La(e) {
- return qh(e, He, Ra);
- }
- function _a(e) {
- return qh(e, ai, Dc);
- }
- var Da = Do ? function(e) {
- return Do.get(e);
- } : qa;
- function Vo(e) {
- for (var C = e.name + "", K = an[C], ot = Se.call(an, C) ? K.length : 0; ot--; ) {
- var ut = K[ot], 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 || Ka;
- return e = e === Ka ? ec : e, arguments.length ? e(arguments[0], arguments[1]) : e;
- }
- function $o(e, C) {
- var K = e.__data__;
- return nm(C) ? K[typeof C == "string" ? "string" : "hash"] : K.map;
- }
- function Ia(e) {
- for (var C = He(e), K = C.length; K--; ) {
- var ot = C[K], ut = e[ot];
- C[K] = [ot, ut, Nc(ut)];
- }
- return C;
- }
- function Yr(e, C) {
- var K = af(e, C);
- return tc(K) ? K : T;
- }
- function Jg(e) {
- var C = Se.call(e, Nr), K = e[Nr];
- try {
- e[Nr] = T;
- var ot = !0;
- } catch {
- }
- var ut = ko.call(e);
- return ot && (C ? e[Nr] = K : delete e[Nr]), ut;
- }
- var Ra = la ? function(e) {
- return e == null ? [] : (e = Me(e), xr(la(e), function(C) {
- return Wh.call(e, C);
- }));
- } : Qa, Dc = la ? function(e) {
- for (var C = []; e; )
- br(C, Ra(e)), e = Po(e);
- return C;
- } : Qa, Ke = ii;
- (ha && Ke(new ha(new ArrayBuffer(1))) != yt || Rn && Ke(new Rn()) != it || ca && Ke(ca.resolve()) != ct || sn && Ke(new sn()) != ht || Nn && Ke(new Nn()) != st) && (Ke = function(e) {
- var C = ii(e), K = C == rt ? e.constructor : T, ot = K ? Xr(K) : "";
- if (ot)
- switch (ot) {
- case Df:
- return yt;
- case If:
- return it;
- case Rf:
- return ct;
- case Nf:
- return ht;
- case Bf:
- return st;
- }
- return C;
- });
- function qg(e, C, K) {
- for (var ot = -1, ut = K.length; ++ot < ut; ) {
- var mt = K[ot], 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 = Ye(e, C - xt);
- break;
- }
- }
- return { start: e, end: C };
- }
- function Qg(e) {
- var C = e.match(Dr);
- return C ? C[1].split(Xi) : [];
- }
- function Ic(e, C, K) {
- C = kr(C, e);
- for (var ot = -1, ut = C.length, mt = !1; ++ot < ut; ) {
- var xt = Fi(C[ot]);
- if (!(mt = e != null && K(e, xt)))
- break;
- e = e[xt];
- }
- return mt || ++ot != ut ? mt : (ut = e == null ? 0 : e.length, !!ut && es(ut) && rr(xt, ut) && (ie(e) || Gr(e)));
- }
- function tm(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 Rc(e) {
- return typeof e.constructor == "function" && !Fn(e) ? ln(Po(e)) : {};
- }
- function em(e, C, K) {
- var ot = e.constructor;
- switch (C) {
- case pt:
- return Pa(e);
- case Q:
- case k:
- return new ot(+e);
- case yt:
- return jg(e, K);
- case vt:
- case Mt:
- case Pt:
- case At:
- case St:
- case Dt:
- case Lt:
- case Nt:
- case Et:
- return yc(e, K);
- case it:
- return new ot();
- case et:
- case at:
- return new ot(e);
- case dt:
- return Wg(e);
- case ht:
- return new ot();
- case J:
- return zg(e);
- }
- }
- function im(e, C) {
- var K = C.length;
- if (!K)
- return e;
- var ot = K - 1;
- return C[ot] = (K > 1 ? "& " : "") + C[ot], C = C.join(K > 2 ? ", " : " "), e.replace(Hs, `{
- /* [wrapped with ` + C + `] */
- `);
- }
- function rm(e) {
- return ie(e) || Gr(e) || !!(zh && e && e[zh]);
- }
- function rr(e, C) {
- var K = typeof e;
- return C = C ?? _, !!C && (K == "number" || K != "symbol" && fd.test(e)) && e > -1 && e % 1 == 0 && e < C;
- }
- function ri(e, C, K) {
- if (!Ie(K))
- return !1;
- var ot = typeof C;
- return (ot == "number" ? si(K) && rr(C, K.length) : ot == "string" && C in K) ? Ri(K[C], e) : !1;
- }
- function Na(e, C) {
- if (ie(e))
- return !1;
- var K = typeof e;
- return K == "number" || K == "symbol" || K == "boolean" || e == null || fi(e) ? !0 : En.test(e) || !Pn.test(e) || C != null && e in Me(C);
- }
- function nm(e) {
- var C = typeof e;
- return C == "string" || C == "number" || C == "symbol" || C == "boolean" ? e !== "__proto__" : e === null;
- }
- function Ba(e) {
- var C = Vo(e), K = ft[C];
- if (typeof K != "function" || !(C in ce.prototype))
- return !1;
- if (e === K)
- return !0;
- var ot = Da(K);
- return !!ot && e === ot[0];
- }
- function om(e) {
- return !!Nh && Nh in e;
- }
- var sm = Co ? nr : tl;
- function Fn(e) {
- var C = e && e.constructor, K = typeof C == "function" && C.prototype || on;
- return e === K;
- }
- function Nc(e) {
- return e === e && !Ie(e);
- }
- function Bc(e, C) {
- return function(K) {
- return K == null ? !1 : K[e] === C && (C !== T || e in Me(K));
- };
- }
- function am(e) {
- var C = Qo(e, function(ot) {
- return K.size === U && K.clear(), ot;
- }), K = C.cache;
- return C;
- }
- function lm(e, C) {
- var K = e[1], ot = C[1], ut = K | ot, mt = ut < (f | E | v), xt = ot == v && K == B || ot == v && K == a && e[7].length <= C[8] || ot == (v | a) && C[7].length <= C[8] && K == B;
- if (!(mt || xt))
- return e;
- ot & f && (e[2] = C[2], ut |= K & f ? 0 : O);
- var bt = C[3];
- if (bt) {
- var Ct = e[3];
- e[3] = Ct ? xc(Ct, bt, C[4]) : bt, e[4] = Ct ? Sr(e[3], F) : C[4];
- }
- return bt = C[5], bt && (Ct = e[5], e[5] = Ct ? bc(Ct, bt, C[6]) : bt, e[6] = Ct ? Sr(e[5], F) : C[6]), bt = C[7], bt && (e[7] = bt), ot & 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 hm(e) {
- var C = [];
- if (e != null)
- for (var K in Me(e))
- C.push(K);
- return C;
- }
- function cm(e) {
- return ko.call(e);
- }
- function jc(e, C, K) {
- return C = Ye(C === T ? e.length - 1 : C, 0), function() {
- for (var ot = arguments, ut = -1, mt = Ye(ot.length - C, 0), xt = Tt(mt); ++ut < mt; )
- xt[ut] = ot[C + ut];
- ut = -1;
- for (var bt = Tt(C + 1); ++ut < C; )
- bt[ut] = ot[ut];
- return bt[C] = K(xt), pi(e, this, bt);
- };
- }
- function Wc(e, C) {
- return C.length < 2 ? e : zr(e, Mi(C, 0, -1));
- }
- function pm(e, C) {
- for (var K = e.length, ot = Ze(C.length, K), ut = oi(e); ot--; ) {
- var mt = C[ot];
- e[ot] = rr(mt, K) ? ut[mt] : T;
- }
- return e;
- }
- function ja(e, C) {
- if (!(C === "constructor" && typeof e[C] == "function") && C != "__proto__")
- return e[C];
- }
- var zc = Xc(hc), Un = Af || function(e, C) {
- return Ue.setTimeout(e, C);
- }, Wa = Xc(Ig);
- function Yc(e, C, K) {
- var ot = C + "";
- return Wa(e, im(ot, um(Qg(ot), K)));
- }
- function Xc(e) {
- var C = 0, K = 0;
- return function() {
- var ot = Of(), ut = s - (ot - K);
- if (K = ot, ut > 0) {
- if (++C >= h)
- return arguments[0];
- } else
- C = 0;
- return e.apply(T, arguments);
- };
- }
- function Zo(e, C) {
- var K = -1, ot = e.length, ut = ot - 1;
- for (C = C === T ? ot : C; ++K < C; ) {
- var mt = Sa(K, ut), xt = e[mt];
- e[mt] = e[K], e[K] = xt;
- }
- return e.length = C, e;
- }
- var Gc = am(function(e) {
- var C = [];
- return e.charCodeAt(0) === 46 && C.push(""), e.replace($e, function(K, ot, ut, mt) {
- C.push(ut ? mt.replace(Ir, "$1") : ot || K);
- }), C;
- });
- function Fi(e) {
- if (typeof e == "string" || fi(e))
- return e;
- var C = e + "";
- return C == "0" && 1 / e == -A ? "-0" : C;
- }
- function Xr(e) {
- if (e != null) {
- try {
- return Mo.call(e);
- } catch {
- }
- try {
- return e + "";
- } catch {
- }
- }
- return "";
- }
- function um(e, C) {
- return bi(m, function(K) {
- var ot = "_." + K[0];
- C & K[1] && !xo(e, ot) && e.push(ot);
- }), e.sort();
- }
- function Hc(e) {
- if (e instanceof ce)
- return e.clone();
- var C = new wi(e.__wrapped__, e.__chain__);
- return C.__actions__ = oi(e.__actions__), C.__index__ = e.__index__, C.__values__ = e.__values__, C;
- }
- function dm(e, C, K) {
- (K ? ri(e, C, K) : C === T) ? C = 1 : C = Ye(ne(C), 0);
- var ot = e == null ? 0 : e.length;
- if (!ot || C < 1)
- return [];
- for (var ut = 0, mt = 0, xt = Tt(Lo(ot / C)); ut < ot; )
- xt[mt++] = Mi(e, ut, ut += C);
- return xt;
- }
- function fm(e) {
- for (var C = -1, K = e == null ? 0 : e.length, ot = 0, ut = []; ++C < K; ) {
- var mt = e[C];
- mt && (ut[ot++] = mt);
- }
- return ut;
- }
- function gm() {
- var e = arguments.length;
- if (!e)
- return [];
- for (var C = Tt(e - 1), K = arguments[0], ot = e; ot--; )
- C[ot - 1] = arguments[ot];
- return br(ie(K) ? oi(K) : [K], Ve(C, 1));
- }
- var mm = ae(function(e, C) {
- return Be(e) ? zn(e, Ve(C, 1, Be, !0)) : [];
- }), ym = ae(function(e, C) {
- var K = ki(C);
- return Be(K) && (K = T), Be(e) ? zn(e, Ve(C, 1, Be, !0), qt(K, 2)) : [];
- }), vm = ae(function(e, C) {
- var K = ki(C);
- return Be(K) && (K = T), Be(e) ? zn(e, Ve(C, 1, Be, !0), T, K) : [];
- });
- function xm(e, C, K) {
- var ot = e == null ? 0 : e.length;
- return ot ? (C = K || C === T ? 1 : ne(C), Mi(e, C < 0 ? 0 : C, ot)) : [];
- }
- function bm(e, C, K) {
- var ot = e == null ? 0 : e.length;
- return ot ? (C = K || C === T ? 1 : ne(C), C = ot - C, Mi(e, 0, C < 0 ? 0 : C)) : [];
- }
- function Sm(e, C) {
- return e && e.length ? Yo(e, qt(C, 3), !0, !0) : [];
- }
- function wm(e, C) {
- return e && e.length ? Yo(e, qt(C, 3), !0) : [];
- }
- function Cm(e, C, K, ot) {
- var ut = e == null ? 0 : e.length;
- return ut ? (K && typeof K != "number" && ri(e, C, K) && (K = 0, ot = ut), gg(e, C, K, ot)) : [];
- }
- function Fc(e, C, K) {
- var ot = e == null ? 0 : e.length;
- if (!ot)
- return -1;
- var ut = K == null ? 0 : ne(K);
- return ut < 0 && (ut = Ye(ot + ut, 0)), bo(e, qt(C, 3), ut);
- }
- function Uc(e, C, K) {
- var ot = e == null ? 0 : e.length;
- if (!ot)
- return -1;
- var ut = ot - 1;
- return K !== T && (ut = ne(K), ut = K < 0 ? Ye(ot + ut, 0) : Ze(ut, ot - 1)), bo(e, qt(C, 3), ut, !0);
- }
- function Vc(e) {
- var C = e == null ? 0 : e.length;
- return C ? Ve(e, 1) : [];
- }
- function Mm(e) {
- var C = e == null ? 0 : e.length;
- return C ? Ve(e, A) : [];
- }
- function km(e, C) {
- var K = e == null ? 0 : e.length;
- return K ? (C = C === T ? 1 : ne(C), Ve(e, C)) : [];
- }
- function Am(e) {
- for (var C = -1, K = e == null ? 0 : e.length, ot = {}; ++C < K; ) {
- var ut = e[C];
- ot[ut[0]] = ut[1];
- }
- return ot;
- }
- function $c(e) {
- return e && e.length ? e[0] : T;
- }
- function Tm(e, C, K) {
- var ot = e == null ? 0 : e.length;
- if (!ot)
- return -1;
- var ut = K == null ? 0 : ne(K);
- return ut < 0 && (ut = Ye(ot + ut, 0)), tn(e, C, ut);
- }
- function Pm(e) {
- var C = e == null ? 0 : e.length;
- return C ? Mi(e, 0, -1) : [];
- }
- var Em = ae(function(e) {
- var C = Ee(e, Aa);
- return C.length && C[0] === e[0] ? ma(C) : [];
- }), Om = ae(function(e) {
- var C = ki(e), K = Ee(e, Aa);
- return C === ki(K) ? C = T : K.pop(), K.length && K[0] === e[0] ? ma(K, qt(C, 2)) : [];
- }), Lm = ae(function(e) {
- var C = ki(e), K = Ee(e, Aa);
- return C = typeof C == "function" ? C : T, C && K.pop(), K.length && K[0] === e[0] ? ma(K, T, C) : [];
- });
- function _m(e, C) {
- return e == null ? "" : Pf.call(e, C);
- }
- function ki(e) {
- var C = e == null ? 0 : e.length;
- return C ? e[C - 1] : T;
- }
- function Dm(e, C, K) {
- var ot = e == null ? 0 : e.length;
- if (!ot)
- return -1;
- var ut = ot;
- return K !== T && (ut = ne(K), ut = ut < 0 ? Ye(ot + ut, 0) : Ze(ut, ot - 1)), C === C ? uf(e, C, ut) : bo(e, Ph, ut, !0);
- }
- function Im(e, C) {
- return e && e.length ? oc(e, ne(C)) : T;
- }
- var Rm = ae(Zc);
- function Zc(e, C) {
- return e && e.length && C && C.length ? ba(e, C) : e;
- }
- function Nm(e, C, K) {
- return e && e.length && C && C.length ? ba(e, C, qt(K, 2)) : e;
- }
- function Bm(e, C, K) {
- return e && e.length && C && C.length ? ba(e, C, T, K) : e;
- }
- var jm = ir(function(e, C) {
- var K = e == null ? 0 : e.length, ot = ua(e, C);
- return lc(e, Ee(C, function(ut) {
- return rr(ut, K) ? +ut : ut;
- }).sort(vc)), ot;
- });
- function Wm(e, C) {
- var K = [];
- if (!(e && e.length))
- return K;
- var ot = -1, ut = [], mt = e.length;
- for (C = qt(C, 3); ++ot < mt; ) {
- var xt = e[ot];
- C(xt, ot, e) && (K.push(xt), ut.push(ot));
- }
- return lc(e, ut), K;
- }
- function za(e) {
- return e == null ? e : _f.call(e);
- }
- function zm(e, C, K) {
- var ot = e == null ? 0 : e.length;
- return ot ? (K && typeof K != "number" && ri(e, C, K) ? (C = 0, K = ot) : (C = C == null ? 0 : ne(C), K = K === T ? ot : ne(K)), Mi(e, C, K)) : [];
- }
- function Ym(e, C) {
- return zo(e, C);
- }
- function Xm(e, C, K) {
- return Ca(e, C, qt(K, 2));
- }
- function Gm(e, C) {
- var K = e == null ? 0 : e.length;
- if (K) {
- var ot = zo(e, C);
- if (ot < K && Ri(e[ot], C))
- return ot;
- }
- return -1;
- }
- function Hm(e, C) {
- return zo(e, C, !0);
- }
- function Fm(e, C, K) {
- return Ca(e, C, qt(K, 2), !0);
- }
- function Um(e, C) {
- var K = e == null ? 0 : e.length;
- if (K) {
- var ot = zo(e, C, !0) - 1;
- if (Ri(e[ot], C))
- return ot;
- }
- return -1;
- }
- function Vm(e) {
- return e && e.length ? cc(e) : [];
- }
- function $m(e, C) {
- return e && e.length ? cc(e, qt(C, 2)) : [];
- }
- function Zm(e) {
- var C = e == null ? 0 : e.length;
- return C ? Mi(e, 1, C) : [];
- }
- function Km(e, C, K) {
- return e && e.length ? (C = K || C === T ? 1 : ne(C), Mi(e, 0, C < 0 ? 0 : C)) : [];
- }
- function Jm(e, C, K) {
- var ot = e == null ? 0 : e.length;
- return ot ? (C = K || C === T ? 1 : ne(C), C = ot - C, Mi(e, C < 0 ? 0 : C, ot)) : [];
- }
- function qm(e, C) {
- return e && e.length ? Yo(e, qt(C, 3), !1, !0) : [];
- }
- function Qm(e, C) {
- return e && e.length ? Yo(e, qt(C, 3)) : [];
- }
- var ty = ae(function(e) {
- return Mr(Ve(e, 1, Be, !0));
- }), ey = ae(function(e) {
- var C = ki(e);
- return Be(C) && (C = T), Mr(Ve(e, 1, Be, !0), qt(C, 2));
- }), iy = ae(function(e) {
- var C = ki(e);
- return C = typeof C == "function" ? C : T, Mr(Ve(e, 1, Be, !0), T, C);
- });
- function ry(e) {
- return e && e.length ? Mr(e) : [];
- }
- function ny(e, C) {
- return e && e.length ? Mr(e, qt(C, 2)) : [];
- }
- function oy(e, C) {
- return C = typeof C == "function" ? C : T, e && e.length ? Mr(e, T, C) : [];
- }
- function Ya(e) {
- if (!(e && e.length))
- return [];
- var C = 0;
- return e = xr(e, function(K) {
- if (Be(K))
- return C = Ye(K.length, C), !0;
- }), na(C, function(K) {
- return Ee(e, ea(K));
- });
- }
- function Kc(e, C) {
- if (!(e && e.length))
- return [];
- var K = Ya(e);
- return C == null ? K : Ee(K, function(ot) {
- return pi(C, T, ot);
- });
- }
- var sy = ae(function(e, C) {
- return Be(e) ? zn(e, C) : [];
- }), ay = ae(function(e) {
- return ka(xr(e, Be));
- }), ly = ae(function(e) {
- var C = ki(e);
- return Be(C) && (C = T), ka(xr(e, Be), qt(C, 2));
- }), hy = ae(function(e) {
- var C = ki(e);
- return C = typeof C == "function" ? C : T, ka(xr(e, Be), T, C);
- }), cy = ae(Ya);
- function py(e, C) {
- return fc(e || [], C || [], Wn);
- }
- function uy(e, C) {
- return fc(e || [], C || [], Gn);
- }
- var dy = ae(function(e) {
- var C = e.length, K = C > 1 ? e[C - 1] : T;
- return K = typeof K == "function" ? (e.pop(), K) : T, Kc(e, K);
- });
- function Jc(e) {
- var C = ft(e);
- return C.__chain__ = !0, C;
- }
- function fy(e, C) {
- return C(e), e;
- }
- function Ko(e, C) {
- return C(e);
- }
- var gy = ir(function(e) {
- var C = e.length, K = C ? e[0] : 0, ot = this.__wrapped__, ut = function(mt) {
- return ua(mt, e);
- };
- return C > 1 || this.__actions__.length || !(ot instanceof ce) || !rr(K) ? this.thru(ut) : (ot = ot.slice(K, +K + (C ? 1 : 0)), ot.__actions__.push({
- func: Ko,
- args: [ut],
- thisArg: T
- }), new wi(ot, this.__chain__).thru(function(mt) {
- return C && !mt.length && mt.push(T), mt;
- }));
- });
- function my() {
- return Jc(this);
- }
- function yy() {
- return new wi(this.value(), this.__chain__);
- }
- function vy() {
- this.__values__ === T && (this.__values__ = pp(this.value()));
- var e = this.__index__ >= this.__values__.length, C = e ? T : this.__values__[this.__index__++];
- return { done: e, value: C };
- }
- function xy() {
- return this;
- }
- function by(e) {
- for (var C, K = this; K instanceof Ro; ) {
- var ot = Hc(K);
- ot.__index__ = 0, ot.__values__ = T, C ? ut.__wrapped__ = ot : C = ot;
- var ut = ot;
- K = K.__wrapped__;
- }
- return ut.__wrapped__ = e, C;
- }
- function Sy() {
- 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: Ko,
- args: [za],
- thisArg: T
- }), new wi(C, this.__chain__);
- }
- return this.thru(za);
- }
- function wy() {
- return dc(this.__wrapped__, this.__actions__);
- }
- var Cy = Xo(function(e, C, K) {
- Se.call(e, K) ? ++e[K] : tr(e, K, 1);
- });
- function My(e, C, K) {
- var ot = ie(e) ? Ah : fg;
- return K && ri(e, C, K) && (C = T), ot(e, qt(C, 3));
- }
- function ky(e, C) {
- var K = ie(e) ? xr : Kh;
- return K(e, qt(C, 3));
- }
- var Ay = Mc(Fc), Ty = Mc(Uc);
- function Py(e, C) {
- return Ve(Jo(e, C), 1);
- }
- function Ey(e, C) {
- return Ve(Jo(e, C), A);
- }
- function Oy(e, C, K) {
- return K = K === T ? 1 : ne(K), Ve(Jo(e, C), K);
- }
- function qc(e, C) {
- var K = ie(e) ? bi : Cr;
- return K(e, qt(C, 3));
- }
- function Qc(e, C) {
- var K = ie(e) ? $d : Zh;
- return K(e, qt(C, 3));
- }
- var Ly = Xo(function(e, C, K) {
- Se.call(e, K) ? e[K].push(C) : tr(e, K, [C]);
- });
- function _y(e, C, K, ot) {
- e = si(e) ? e : dn(e), K = K && !ot ? ne(K) : 0;
- var ut = e.length;
- return K < 0 && (K = Ye(ut + K, 0)), is(e) ? K <= ut && e.indexOf(C, K) > -1 : !!ut && tn(e, C, K) > -1;
- }
- var Dy = ae(function(e, C, K) {
- var ot = -1, ut = typeof C == "function", mt = si(e) ? Tt(e.length) : [];
- return Cr(e, function(xt) {
- mt[++ot] = ut ? pi(C, xt, K) : Yn(xt, C, K);
- }), mt;
- }), Iy = Xo(function(e, C, K) {
- tr(e, K, C);
- });
- function Jo(e, C) {
- var K = ie(e) ? Ee : ic;
- return K(e, qt(C, 3));
- }
- function Ry(e, C, K, ot) {
- return e == null ? [] : (ie(C) || (C = C == null ? [] : [C]), K = ot ? T : K, ie(K) || (K = K == null ? [] : [K]), sc(e, C, K));
- }
- var Ny = Xo(function(e, C, K) {
- e[K ? 0 : 1].push(C);
- }, function() {
- return [[], []];
- });
- function By(e, C, K) {
- var ot = ie(e) ? Qs : Oh, ut = arguments.length < 3;
- return ot(e, qt(C, 4), K, ut, Cr);
- }
- function jy(e, C, K) {
- var ot = ie(e) ? Zd : Oh, ut = arguments.length < 3;
- return ot(e, qt(C, 4), K, ut, Zh);
- }
- function Wy(e, C) {
- var K = ie(e) ? xr : Kh;
- return K(e, ts(qt(C, 3)));
- }
- function zy(e) {
- var C = ie(e) ? Fh : _g;
- return C(e);
- }
- function Yy(e, C, K) {
- (K ? ri(e, C, K) : C === T) ? C = 1 : C = ne(C);
- var ot = ie(e) ? hg : Dg;
- return ot(e, C);
- }
- function Xy(e) {
- var C = ie(e) ? cg : Rg;
- return C(e);
- }
- function Gy(e) {
- if (e == null)
- return 0;
- if (si(e))
- return is(e) ? rn(e) : e.length;
- var C = Ke(e);
- return C == it || C == ht ? e.size : va(e).length;
- }
- function Hy(e, C, K) {
- var ot = ie(e) ? ta : Ng;
- return K && ri(e, C, K) && (C = T), ot(e, qt(C, 3));
- }
- var Fy = ae(function(e, C) {
- if (e == null)
- return [];
- var K = C.length;
- return K > 1 && ri(e, C[0], C[1]) ? C = [] : K > 2 && ri(C[0], C[1], C[2]) && (C = [C[0]]), sc(e, Ve(C, 1), []);
- }), qo = kf || function() {
- return Ue.Date.now();
- };
- function Uy(e, C) {
- if (typeof C != "function")
- throw new Si(I);
- return e = ne(e), function() {
- if (--e < 1)
- return C.apply(this, arguments);
- };
- }
- function tp(e, C, K) {
- return C = K ? T : C, C = e && C == null ? e.length : C, er(e, v, T, T, T, T, C);
- }
- function ep(e, C) {
- var K;
- if (typeof C != "function")
- throw new Si(I);
- return e = ne(e), function() {
- return --e > 0 && (K = C.apply(this, arguments)), e <= 1 && (C = T), K;
- };
- }
- var Xa = ae(function(e, C, K) {
- var ot = f;
- if (K.length) {
- var ut = Sr(K, pn(Xa));
- ot |= S;
- }
- return er(e, ot, C, K, ut);
- }), ip = ae(function(e, C, K) {
- var ot = f | E;
- if (K.length) {
- var ut = Sr(K, pn(ip));
- ot |= S;
- }
- return er(C, ot, e, K, ut);
- });
- function rp(e, C, K) {
- C = K ? T : C;
- var ot = er(e, B, T, T, T, T, T, C);
- return ot.placeholder = rp.placeholder, ot;
- }
- function np(e, C, K) {
- C = K ? T : C;
- var ot = er(e, M, T, T, T, T, T, C);
- return ot.placeholder = np.placeholder, ot;
- }
- function op(e, C, K) {
- var ot, ut, mt, xt, bt, Ct, It = 0, Rt = !1, Bt = !1, Yt = !0;
- if (typeof e != "function")
- throw new Si(I);
- C = Ai(C) || 0, Ie(K) && (Rt = !!K.leading, Bt = "maxWait" in K, mt = Bt ? Ye(Ai(K.maxWait) || 0, C) : mt, Yt = "trailing" in K ? !!K.trailing : Yt);
- function Ut(je) {
- var Ni = ot, sr = ut;
- return ot = ut = T, It = je, xt = e.apply(sr, Ni), xt;
- }
- function Qt(je) {
- return It = je, bt = Un(he, C), Rt ? Ut(je) : xt;
- }
- function se(je) {
- var Ni = je - Ct, sr = je - It, Mp = C - Ni;
- return Bt ? Ze(Mp, mt - sr) : Mp;
- }
- function te(je) {
- var Ni = je - Ct, sr = je - It;
- return Ct === T || Ni >= C || Ni < 0 || Bt && sr >= mt;
- }
- function he() {
- var je = qo();
- if (te(je))
- return pe(je);
- bt = Un(he, se(je));
- }
- function pe(je) {
- return bt = T, Yt && ot ? Ut(je) : (ot = ut = T, xt);
- }
- function gi() {
- bt !== T && gc(bt), It = 0, ot = Ct = ut = bt = T;
- }
- function ni() {
- return bt === T ? xt : pe(qo());
- }
- function mi() {
- var je = qo(), Ni = te(je);
- if (ot = arguments, ut = this, Ct = je, Ni) {
- if (bt === T)
- return Qt(Ct);
- if (Bt)
- return gc(bt), bt = Un(he, C), Ut(Ct);
- }
- return bt === T && (bt = Un(he, C)), xt;
- }
- return mi.cancel = gi, mi.flush = ni, mi;
- }
- var Vy = ae(function(e, C) {
- return $h(e, 1, C);
- }), $y = ae(function(e, C, K) {
- return $h(e, Ai(C) || 0, K);
- });
- function Zy(e) {
- return er(e, c);
- }
- function Qo(e, C) {
- if (typeof e != "function" || C != null && typeof C != "function")
- throw new Si(I);
- var K = function() {
- var ot = arguments, ut = C ? C.apply(this, ot) : ot[0], mt = K.cache;
- if (mt.has(ut))
- return mt.get(ut);
- var xt = e.apply(this, ot);
- return K.cache = mt.set(ut, xt) || mt, xt;
- };
- return K.cache = new (Qo.Cache || Qi)(), K;
- }
- Qo.Cache = Qi;
- function ts(e) {
- if (typeof e != "function")
- throw new Si(I);
- 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 Ky(e) {
- return ep(2, e);
- }
- var Jy = Bg(function(e, C) {
- C = C.length == 1 && ie(C[0]) ? Ee(C[0], ui(qt())) : Ee(Ve(C, 1), ui(qt()));
- var K = C.length;
- return ae(function(ot) {
- for (var ut = -1, mt = Ze(ot.length, K); ++ut < mt; )
- ot[ut] = C[ut].call(this, ot[ut]);
- return pi(e, this, ot);
- });
- }), Ga = ae(function(e, C) {
- var K = Sr(C, pn(Ga));
- return er(e, S, T, C, K);
- }), sp = ae(function(e, C) {
- var K = Sr(C, pn(sp));
- return er(e, w, T, C, K);
- }), qy = ir(function(e, C) {
- return er(e, a, T, T, T, C);
- });
- function Qy(e, C) {
- if (typeof e != "function")
- throw new Si(I);
- return C = C === T ? C : ne(C), ae(e, C);
- }
- function tv(e, C) {
- if (typeof e != "function")
- throw new Si(I);
- return C = C == null ? 0 : Ye(ne(C), 0), ae(function(K) {
- var ot = K[C], ut = Ar(K, 0, C);
- return ot && br(ut, ot), pi(e, this, ut);
- });
- }
- function ev(e, C, K) {
- var ot = !0, ut = !0;
- if (typeof e != "function")
- throw new Si(I);
- return Ie(K) && (ot = "leading" in K ? !!K.leading : ot, ut = "trailing" in K ? !!K.trailing : ut), op(e, C, {
- leading: ot,
- maxWait: C,
- trailing: ut
- });
- }
- function iv(e) {
- return tp(e, 1);
- }
- function rv(e, C) {
- return Ga(Ta(C), e);
- }
- function nv() {
- if (!arguments.length)
- return [];
- var e = arguments[0];
- return ie(e) ? e : [e];
- }
- function ov(e) {
- return Ci(e, b);
- }
- function sv(e, C) {
- return C = typeof C == "function" ? C : T, Ci(e, b, C);
- }
- function av(e) {
- return Ci(e, R | b);
- }
- function lv(e, C) {
- return C = typeof C == "function" ? C : T, Ci(e, R | b, C);
- }
- function hv(e, C) {
- return C == null || Vh(e, C, He(C));
- }
- function Ri(e, C) {
- return e === C || e !== e && C !== C;
- }
- var cv = Uo(ga), pv = Uo(function(e, C) {
- return e >= C;
- }), Gr = Qh(function() {
- return arguments;
- }()) ? Qh : function(e) {
- return Ne(e) && Se.call(e, "callee") && !Wh.call(e, "callee");
- }, ie = Tt.isArray, uv = bh ? ui(bh) : bg;
- function si(e) {
- return e != null && es(e.length) && !nr(e);
- }
- function Be(e) {
- return Ne(e) && si(e);
- }
- function dv(e) {
- return e === !0 || e === !1 || Ne(e) && ii(e) == Q;
- }
- var Tr = Tf || tl, fv = Sh ? ui(Sh) : Sg;
- function gv(e) {
- return Ne(e) && e.nodeType === 1 && !Vn(e);
- }
- function mv(e) {
- if (e == null)
- return !0;
- if (si(e) && (ie(e) || typeof e == "string" || typeof e.splice == "function" || Tr(e) || un(e) || Gr(e)))
- return !e.length;
- var C = Ke(e);
- if (C == it || C == ht)
- return !e.size;
- if (Fn(e))
- return !va(e).length;
- for (var K in e)
- if (Se.call(e, K))
- return !1;
- return !0;
- }
- function yv(e, C) {
- return Xn(e, C);
- }
- function vv(e, C, K) {
- K = typeof K == "function" ? K : T;
- var ot = K ? K(e, C) : T;
- return ot === T ? Xn(e, C, T, K) : !!ot;
- }
- function Ha(e) {
- if (!Ne(e))
- return !1;
- var C = ii(e);
- return C == z || C == G || typeof e.message == "string" && typeof e.name == "string" && !Vn(e);
- }
- function xv(e) {
- return typeof e == "number" && Yh(e);
- }
- function nr(e) {
- if (!Ie(e))
- return !1;
- var C = ii(e);
- return C == $ || C == q || C == V || C == gt;
- }
- function ap(e) {
- return typeof e == "number" && e == ne(e);
- }
- function es(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 lp = wh ? ui(wh) : Cg;
- function bv(e, C) {
- return e === C || ya(e, C, Ia(C));
- }
- function Sv(e, C, K) {
- return K = typeof K == "function" ? K : T, ya(e, C, Ia(C), K);
- }
- function wv(e) {
- return hp(e) && e != +e;
- }
- function Cv(e) {
- if (sm(e))
- throw new ee(j);
- return tc(e);
- }
- function Mv(e) {
- return e === null;
- }
- function kv(e) {
- return e == null;
- }
- function hp(e) {
- return typeof e == "number" || Ne(e) && ii(e) == et;
- }
- function Vn(e) {
- if (!Ne(e) || ii(e) != rt)
- return !1;
- var C = Po(e);
- if (C === null)
- return !0;
- var K = Se.call(C, "constructor") && C.constructor;
- return typeof K == "function" && K instanceof K && Mo.call(K) == Sf;
- }
- var Fa = Ch ? ui(Ch) : Mg;
- function Av(e) {
- return ap(e) && e >= -_ && e <= _;
- }
- var cp = Mh ? ui(Mh) : kg;
- function is(e) {
- return typeof e == "string" || !ie(e) && Ne(e) && ii(e) == at;
- }
- function fi(e) {
- return typeof e == "symbol" || Ne(e) && ii(e) == J;
- }
- var un = kh ? ui(kh) : Ag;
- function Tv(e) {
- return e === T;
- }
- function Pv(e) {
- return Ne(e) && Ke(e) == st;
- }
- function Ev(e) {
- return Ne(e) && ii(e) == lt;
- }
- var Ov = Uo(xa), Lv = Uo(function(e, C) {
- return e <= C;
- });
- function pp(e) {
- if (!e)
- return [];
- if (si(e))
- return is(e) ? Di(e) : oi(e);
- if (In && e[In])
- return hf(e[In]());
- var C = Ke(e), K = C == it ? sa : C == ht ? So : dn;
- return K(e);
- }
- function or(e) {
- if (!e)
- return e === 0 ? e : 0;
- if (e = Ai(e), e === A || e === -A) {
- var C = e < 0 ? -1 : 1;
- return C * D;
- }
- return e === e ? e : 0;
- }
- function ne(e) {
- var C = or(e), K = C % 1;
- return C === C ? K ? C - K : C : 0;
- }
- function up(e) {
- return e ? Wr(ne(e), 0, P) : 0;
- }
- function Ai(e) {
- if (typeof e == "number")
- return e;
- if (fi(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 = Lh(e);
- var K = Re.test(e);
- return K || qr.test(e) ? Fd(e.slice(2), K ? 2 : 8) : ge.test(e) ? W : +e;
- }
- function dp(e) {
- return Hi(e, ai(e));
- }
- function _v(e) {
- return e ? Wr(ne(e), -_, _) : e === 0 ? e : 0;
- }
- function xe(e) {
- return e == null ? "" : di(e);
- }
- var Dv = hn(function(e, C) {
- if (Fn(C) || si(C)) {
- Hi(C, He(C), e);
- return;
- }
- for (var K in C)
- Se.call(C, K) && Wn(e, K, C[K]);
- }), fp = hn(function(e, C) {
- Hi(C, ai(C), e);
- }), rs = hn(function(e, C, K, ot) {
- Hi(C, ai(C), e, ot);
- }), Iv = hn(function(e, C, K, ot) {
- Hi(C, He(C), e, ot);
- }), Rv = ir(ua);
- function Nv(e, C) {
- var K = ln(e);
- return C == null ? K : Uh(K, C);
- }
- var Bv = ae(function(e, C) {
- e = Me(e);
- var K = -1, ot = C.length, ut = ot > 2 ? C[2] : T;
- for (ut && ri(C[0], C[1], ut) && (ot = 1); ++K < ot; )
- for (var mt = C[K], xt = ai(mt), bt = -1, Ct = xt.length; ++bt < Ct; ) {
- var It = xt[bt], Rt = e[It];
- (Rt === T || Ri(Rt, on[It]) && !Se.call(e, It)) && (e[It] = mt[It]);
- }
- return e;
- }), jv = ae(function(e) {
- return e.push(T, Lc), pi(gp, T, e);
- });
- function Wv(e, C) {
- return Th(e, qt(C, 3), Gi);
- }
- function zv(e, C) {
- return Th(e, qt(C, 3), fa);
- }
- function Yv(e, C) {
- return e == null ? e : da(e, qt(C, 3), ai);
- }
- function Xv(e, C) {
- return e == null ? e : Jh(e, qt(C, 3), ai);
- }
- function Gv(e, C) {
- return e && Gi(e, qt(C, 3));
- }
- function Hv(e, C) {
- return e && fa(e, qt(C, 3));
- }
- function Fv(e) {
- return e == null ? [] : jo(e, He(e));
- }
- function Uv(e) {
- return e == null ? [] : jo(e, ai(e));
- }
- function Ua(e, C, K) {
- var ot = e == null ? T : zr(e, C);
- return ot === T ? K : ot;
- }
- function Vv(e, C) {
- return e != null && Ic(e, C, mg);
- }
- function Va(e, C) {
- return e != null && Ic(e, C, yg);
- }
- var $v = Ac(function(e, C, K) {
- C != null && typeof C.toString != "function" && (C = ko.call(C)), e[C] = K;
- }, Za(li)), Zv = Ac(function(e, C, K) {
- C != null && typeof C.toString != "function" && (C = ko.call(C)), Se.call(e, C) ? e[C].push(K) : e[C] = [K];
- }, qt), Kv = ae(Yn);
- function He(e) {
- return si(e) ? Hh(e) : va(e);
- }
- function ai(e) {
- return si(e) ? Hh(e, !0) : Tg(e);
- }
- function Jv(e, C) {
- var K = {};
- return C = qt(C, 3), Gi(e, function(ot, ut, mt) {
- tr(K, C(ot, ut, mt), ot);
- }), K;
- }
- function qv(e, C) {
- var K = {};
- return C = qt(C, 3), Gi(e, function(ot, ut, mt) {
- tr(K, ut, C(ot, ut, mt));
- }), K;
- }
- var Qv = hn(function(e, C, K) {
- Wo(e, C, K);
- }), gp = hn(function(e, C, K, ot) {
- Wo(e, C, K, ot);
- }), tx = ir(function(e, C) {
- var K = {};
- if (e == null)
- return K;
- var ot = !1;
- C = Ee(C, function(mt) {
- return mt = kr(mt, e), ot || (ot = mt.length > 1), mt;
- }), Hi(e, _a(e), K), ot && (K = Ci(K, R | N | b, $g));
- for (var ut = C.length; ut--; )
- Ma(K, C[ut]);
- return K;
- });
- function ex(e, C) {
- return mp(e, ts(qt(C)));
- }
- var ix = ir(function(e, C) {
- return e == null ? {} : Eg(e, C);
- });
- function mp(e, C) {
- if (e == null)
- return {};
- var K = Ee(_a(e), function(ot) {
- return [ot];
- });
- return C = qt(C), ac(e, K, function(ot, ut) {
- return C(ot, ut[0]);
- });
- }
- function rx(e, C, K) {
- C = kr(C, e);
- var ot = -1, ut = C.length;
- for (ut || (ut = 1, e = T); ++ot < ut; ) {
- var mt = e == null ? T : e[Fi(C[ot])];
- mt === T && (ot = ut, mt = K), e = nr(mt) ? mt.call(e) : mt;
- }
- return e;
- }
- function nx(e, C, K) {
- return e == null ? e : Gn(e, C, K);
- }
- function ox(e, C, K, ot) {
- return ot = typeof ot == "function" ? ot : T, e == null ? e : Gn(e, C, K, ot);
- }
- var yp = Ec(He), vp = Ec(ai);
- function sx(e, C, K) {
- var ot = ie(e), ut = ot || Tr(e) || un(e);
- if (C = qt(C, 4), K == null) {
- var mt = e && e.constructor;
- ut ? K = ot ? new mt() : [] : Ie(e) ? K = nr(mt) ? ln(Po(e)) : {} : K = {};
- }
- return (ut ? bi : Gi)(e, function(xt, bt, Ct) {
- return C(K, xt, bt, Ct);
- }), K;
- }
- function ax(e, C) {
- return e == null ? !0 : Ma(e, C);
- }
- function lx(e, C, K) {
- return e == null ? e : uc(e, C, Ta(K));
- }
- function hx(e, C, K, ot) {
- return ot = typeof ot == "function" ? ot : T, e == null ? e : uc(e, C, Ta(K), ot);
- }
- function dn(e) {
- return e == null ? [] : oa(e, He(e));
- }
- function cx(e) {
- return e == null ? [] : oa(e, ai(e));
- }
- function px(e, C, K) {
- return K === T && (K = C, C = T), K !== T && (K = Ai(K), K = K === K ? K : 0), C !== T && (C = Ai(C), C = C === C ? C : 0), Wr(Ai(e), C, K);
- }
- function ux(e, C, K) {
- return C = or(C), K === T ? (K = C, C = 0) : K = or(K), e = Ai(e), vg(e, C, K);
- }
- function dx(e, C, K) {
- if (K && typeof K != "boolean" && ri(e, C, K) && (C = K = T), K === T && (typeof C == "boolean" ? (K = C, C = T) : typeof e == "boolean" && (K = e, e = T)), e === T && C === T ? (e = 0, C = 1) : (e = or(e), C === T ? (C = e, e = 0) : C = or(C)), e > C) {
- var ot = e;
- e = C, C = ot;
- }
- if (K || e % 1 || C % 1) {
- var ut = Xh();
- return Ze(e + ut * (C - e + Hd("1e-" + ((ut + "").length - 1))), C);
- }
- return Sa(e, C);
- }
- var fx = cn(function(e, C, K) {
- return C = C.toLowerCase(), e + (K ? xp(C) : C);
- });
- function xp(e) {
- return $a(xe(e).toLowerCase());
- }
- function bp(e) {
- return e = xe(e), e && e.replace(gd, nf).replace(Id, "");
- }
- function gx(e, C, K) {
- e = xe(e), C = di(C);
- var ot = e.length;
- K = K === T ? ot : Wr(ne(K), 0, ot);
- var ut = K;
- return K -= C.length, K >= 0 && e.slice(K, ut) == C;
- }
- function mx(e) {
- return e = xe(e), e && Vt.test(e) ? e.replace(be, of) : e;
- }
- function yx(e) {
- return e = xe(e), e && Ln.test(e) ? e.replace(On, "\\$&") : e;
- }
- var vx = cn(function(e, C, K) {
- return e + (K ? "-" : "") + C.toLowerCase();
- }), xx = cn(function(e, C, K) {
- return e + (K ? " " : "") + C.toLowerCase();
- }), bx = Cc("toLowerCase");
- function Sx(e, C, K) {
- e = xe(e), C = ne(C);
- var ot = C ? rn(e) : 0;
- if (!C || ot >= C)
- return e;
- var ut = (C - ot) / 2;
- return Fo(_o(ut), K) + e + Fo(Lo(ut), K);
- }
- function wx(e, C, K) {
- e = xe(e), C = ne(C);
- var ot = C ? rn(e) : 0;
- return C && ot < C ? e + Fo(C - ot, K) : e;
- }
- function Cx(e, C, K) {
- e = xe(e), C = ne(C);
- var ot = C ? rn(e) : 0;
- return C && ot < C ? Fo(C - ot, K) + e : e;
- }
- function Mx(e, C, K) {
- return K || C == null ? C = 0 : C && (C = +C), Lf(xe(e).replace(Jr, ""), C || 0);
- }
- function kx(e, C, K) {
- return (K ? ri(e, C, K) : C === T) ? C = 1 : C = ne(C), wa(xe(e), C);
- }
- function Ax() {
- var e = arguments, C = xe(e[0]);
- return e.length < 3 ? C : C.replace(e[1], e[2]);
- }
- var Tx = cn(function(e, C, K) {
- return e + (K ? "_" : "") + C.toLowerCase();
- });
- function Px(e, C, K) {
- return K && typeof K != "number" && ri(e, C, K) && (C = K = T), K = K === T ? P : K >>> 0, K ? (e = xe(e), e && (typeof C == "string" || C != null && !Fa(C)) && (C = di(C), !C && en(e)) ? Ar(Di(e), 0, K) : e.split(C, K)) : [];
- }
- var Ex = cn(function(e, C, K) {
- return e + (K ? " " : "") + $a(C);
- });
- function Ox(e, C, K) {
- return e = xe(e), K = K == null ? 0 : Wr(ne(K), 0, e.length), C = di(C), e.slice(K, K + C.length) == C;
- }
- function Lx(e, C, K) {
- var ot = ft.templateSettings;
- K && ri(e, C, K) && (C = T), e = xe(e), C = rs({}, C, ot, Oc);
- var ut = rs({}, C.imports, ot.imports, Oc), mt = He(ut), xt = oa(ut, mt), bt, Ct, It = 0, Rt = C.interpolate || mo, Bt = "__p += '", Yt = aa(
- (C.escape || mo).source + "|" + Rt.source + "|" + (Rt === uo ? $t : mo).source + "|" + (C.evaluate || mo).source + "|$",
- "g"
- ), Ut = "//# sourceURL=" + (Se.call(C, "sourceURL") ? (C.sourceURL + "").replace(/\s/g, " ") : "lodash.templateSources[" + ++Wd + "]") + `
- `;
- e.replace(Yt, function(te, he, pe, gi, ni, mi) {
- return pe || (pe = gi), Bt += e.slice(It, mi).replace(md, sf), he && (bt = !0, Bt += `' +
- __e(` + he + `) +
- '`), ni && (Ct = !0, Bt += `';
- ` + ni + `;
- __p += '`), pe && (Bt += `' +
- ((__t = (` + pe + `)) == null ? '' : __t) +
- '`), It = mi + te.length, te;
- }), Bt += `';
- `;
- var Qt = Se.call(C, "variable") && C.variable;
- if (!Qt)
- Bt = `with (obj) {
- ` + Bt + `
- }
- `;
- else if (_n.test(Qt))
- throw new ee(Z);
- 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 se = wp(function() {
- return ve(mt, Ut + "return " + Bt).apply(T, xt);
- });
- if (se.source = Bt, Ha(se))
- throw se;
- return se;
- }
- function _x(e) {
- return xe(e).toLowerCase();
- }
- function Dx(e) {
- return xe(e).toUpperCase();
- }
- function Ix(e, C, K) {
- if (e = xe(e), e && (K || C === T))
- return Lh(e);
- if (!e || !(C = di(C)))
- return e;
- var ot = Di(e), ut = Di(C), mt = _h(ot, ut), xt = Dh(ot, ut) + 1;
- return Ar(ot, mt, xt).join("");
- }
- function Rx(e, C, K) {
- if (e = xe(e), e && (K || C === T))
- return e.slice(0, Rh(e) + 1);
- if (!e || !(C = di(C)))
- return e;
- var ot = Di(e), ut = Dh(ot, Di(C)) + 1;
- return Ar(ot, 0, ut).join("");
- }
- function Nx(e, C, K) {
- if (e = xe(e), e && (K || C === T))
- return e.replace(Jr, "");
- if (!e || !(C = di(C)))
- return e;
- var ot = Di(e), ut = _h(ot, Di(C));
- return Ar(ot, ut).join("");
- }
- function Bx(e, C) {
- var K = p, ot = i;
- if (Ie(C)) {
- var ut = "separator" in C ? C.separator : ut;
- K = "length" in C ? ne(C.length) : K, ot = "omission" in C ? di(C.omission) : ot;
- }
- e = xe(e);
- var mt = e.length;
- if (en(e)) {
- var xt = Di(e);
- mt = xt.length;
- }
- if (K >= mt)
- return e;
- var bt = K - rn(ot);
- if (bt < 1)
- return ot;
- var Ct = xt ? Ar(xt, 0, bt).join("") : e.slice(0, bt);
- if (ut === T)
- return Ct + ot;
- if (xt && (bt += Ct.length - bt), Fa(ut)) {
- if (e.slice(bt).search(ut)) {
- var It, Rt = Ct;
- for (ut.global || (ut = aa(ut.source, xe(ue.exec(ut)) + "g")), ut.lastIndex = 0; It = ut.exec(Rt); )
- var Bt = It.index;
- Ct = Ct.slice(0, Bt === T ? bt : Bt);
- }
- } else if (e.indexOf(di(ut), bt) != bt) {
- var Yt = Ct.lastIndexOf(ut);
- Yt > -1 && (Ct = Ct.slice(0, Yt));
- }
- return Ct + ot;
- }
- function jx(e) {
- return e = xe(e), e && zt.test(e) ? e.replace(Jt, df) : e;
- }
- var Wx = cn(function(e, C, K) {
- return e + (K ? " " : "") + C.toUpperCase();
- }), $a = Cc("toUpperCase");
- function Sp(e, C, K) {
- return e = xe(e), C = K ? T : C, C === T ? lf(e) ? mf(e) : qd(e) : e.match(C) || [];
- }
- var wp = ae(function(e, C) {
- try {
- return pi(e, T, C);
- } catch (K) {
- return Ha(K) ? K : new ee(K);
- }
- }), zx = ir(function(e, C) {
- return bi(C, function(K) {
- K = Fi(K), tr(e, K, Xa(e[K], e));
- }), e;
- });
- function Yx(e) {
- var C = e == null ? 0 : e.length, K = qt();
- return e = C ? Ee(e, function(ot) {
- if (typeof ot[1] != "function")
- throw new Si(I);
- return [K(ot[0]), ot[1]];
- }) : [], ae(function(ot) {
- for (var ut = -1; ++ut < C; ) {
- var mt = e[ut];
- if (pi(mt[0], this, ot))
- return pi(mt[1], this, ot);
- }
- });
- }
- function Xx(e) {
- return dg(Ci(e, R));
- }
- function Za(e) {
- return function() {
- return e;
- };
- }
- function Gx(e, C) {
- return e == null || e !== e ? C : e;
- }
- var Hx = kc(), Fx = kc(!0);
- function li(e) {
- return e;
- }
- function Ka(e) {
- return ec(typeof e == "function" ? e : Ci(e, R));
- }
- function Ux(e) {
- return rc(Ci(e, R));
- }
- function Vx(e, C) {
- return nc(e, Ci(C, R));
- }
- var $x = ae(function(e, C) {
- return function(K) {
- return Yn(K, e, C);
- };
- }), Zx = ae(function(e, C) {
- return function(K) {
- return Yn(e, K, C);
- };
- });
- function Ja(e, C, K) {
- var ot = He(C), ut = jo(C, ot);
- K == null && !(Ie(C) && (ut.length || !ot.length)) && (K = C, C = e, e = this, ut = jo(C, He(C)));
- var mt = !(Ie(K) && "chain" in K) || !!K.chain, xt = nr(e);
- return bi(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__ = oi(this.__actions__);
- return Bt.push({ func: Ct, args: arguments, thisArg: e }), Rt.__chain__ = It, Rt;
- }
- return Ct.apply(e, br([this.value()], arguments));
- });
- }), e;
- }
- function Kx() {
- return Ue._ === this && (Ue._ = wf), this;
- }
- function qa() {
- }
- function Jx(e) {
- return e = ne(e), ae(function(C) {
- return oc(C, e);
- });
- }
- var qx = Ea(Ee), Qx = Ea(Ah), t0 = Ea(ta);
- function Cp(e) {
- return Na(e) ? ea(Fi(e)) : Og(e);
- }
- function e0(e) {
- return function(C) {
- return e == null ? T : zr(e, C);
- };
- }
- var i0 = Tc(), r0 = Tc(!0);
- function Qa() {
- return [];
- }
- function tl() {
- return !1;
- }
- function n0() {
- return {};
- }
- function o0() {
- return "";
- }
- function s0() {
- return !0;
- }
- function a0(e, C) {
- if (e = ne(e), e < 1 || e > _)
- return [];
- var K = P, ot = Ze(e, P);
- C = qt(C), e -= P;
- for (var ut = na(ot, C); ++K < e; )
- C(K);
- return ut;
- }
- function l0(e) {
- return ie(e) ? Ee(e, Fi) : fi(e) ? [e] : oi(Gc(xe(e)));
- }
- function h0(e) {
- var C = ++bf;
- return xe(e) + C;
- }
- var c0 = Ho(function(e, C) {
- return e + C;
- }, 0), p0 = Oa("ceil"), u0 = Ho(function(e, C) {
- return e / C;
- }, 1), d0 = Oa("floor");
- function f0(e) {
- return e && e.length ? Bo(e, li, ga) : T;
- }
- function g0(e, C) {
- return e && e.length ? Bo(e, qt(C, 2), ga) : T;
- }
- function m0(e) {
- return Eh(e, li);
- }
- function y0(e, C) {
- return Eh(e, qt(C, 2));
- }
- function v0(e) {
- return e && e.length ? Bo(e, li, xa) : T;
- }
- function x0(e, C) {
- return e && e.length ? Bo(e, qt(C, 2), xa) : T;
- }
- var b0 = Ho(function(e, C) {
- return e * C;
- }, 1), S0 = Oa("round"), w0 = Ho(function(e, C) {
- return e - C;
- }, 0);
- function C0(e) {
- return e && e.length ? ra(e, li) : 0;
- }
- function M0(e, C) {
- return e && e.length ? ra(e, qt(C, 2)) : 0;
- }
- return ft.after = Uy, ft.ary = tp, ft.assign = Dv, ft.assignIn = fp, ft.assignInWith = rs, ft.assignWith = Iv, ft.at = Rv, ft.before = ep, ft.bind = Xa, ft.bindAll = zx, ft.bindKey = ip, ft.castArray = nv, ft.chain = Jc, ft.chunk = dm, ft.compact = fm, ft.concat = gm, ft.cond = Yx, ft.conforms = Xx, ft.constant = Za, ft.countBy = Cy, ft.create = Nv, ft.curry = rp, ft.curryRight = np, ft.debounce = op, ft.defaults = Bv, ft.defaultsDeep = jv, ft.defer = Vy, ft.delay = $y, ft.difference = mm, ft.differenceBy = ym, ft.differenceWith = vm, ft.drop = xm, ft.dropRight = bm, ft.dropRightWhile = Sm, ft.dropWhile = wm, ft.fill = Cm, ft.filter = ky, ft.flatMap = Py, ft.flatMapDeep = Ey, ft.flatMapDepth = Oy, ft.flatten = Vc, ft.flattenDeep = Mm, ft.flattenDepth = km, ft.flip = Zy, ft.flow = Hx, ft.flowRight = Fx, ft.fromPairs = Am, ft.functions = Fv, ft.functionsIn = Uv, ft.groupBy = Ly, ft.initial = Pm, ft.intersection = Em, ft.intersectionBy = Om, ft.intersectionWith = Lm, ft.invert = $v, ft.invertBy = Zv, ft.invokeMap = Dy, ft.iteratee = Ka, ft.keyBy = Iy, ft.keys = He, ft.keysIn = ai, ft.map = Jo, ft.mapKeys = Jv, ft.mapValues = qv, ft.matches = Ux, ft.matchesProperty = Vx, ft.memoize = Qo, ft.merge = Qv, ft.mergeWith = gp, ft.method = $x, ft.methodOf = Zx, ft.mixin = Ja, ft.negate = ts, ft.nthArg = Jx, ft.omit = tx, ft.omitBy = ex, ft.once = Ky, ft.orderBy = Ry, ft.over = qx, ft.overArgs = Jy, ft.overEvery = Qx, ft.overSome = t0, ft.partial = Ga, ft.partialRight = sp, ft.partition = Ny, ft.pick = ix, ft.pickBy = mp, ft.property = Cp, ft.propertyOf = e0, ft.pull = Rm, ft.pullAll = Zc, ft.pullAllBy = Nm, ft.pullAllWith = Bm, ft.pullAt = jm, ft.range = i0, ft.rangeRight = r0, ft.rearg = qy, ft.reject = Wy, ft.remove = Wm, ft.rest = Qy, ft.reverse = za, ft.sampleSize = Yy, ft.set = nx, ft.setWith = ox, ft.shuffle = Xy, ft.slice = zm, ft.sortBy = Fy, ft.sortedUniq = Vm, ft.sortedUniqBy = $m, ft.split = Px, ft.spread = tv, ft.tail = Zm, ft.take = Km, ft.takeRight = Jm, ft.takeRightWhile = qm, ft.takeWhile = Qm, ft.tap = fy, ft.throttle = ev, ft.thru = Ko, ft.toArray = pp, ft.toPairs = yp, ft.toPairsIn = vp, ft.toPath = l0, ft.toPlainObject = dp, ft.transform = sx, ft.unary = iv, ft.union = ty, ft.unionBy = ey, ft.unionWith = iy, ft.uniq = ry, ft.uniqBy = ny, ft.uniqWith = oy, ft.unset = ax, ft.unzip = Ya, ft.unzipWith = Kc, ft.update = lx, ft.updateWith = hx, ft.values = dn, ft.valuesIn = cx, ft.without = sy, ft.words = Sp, ft.wrap = rv, ft.xor = ay, ft.xorBy = ly, ft.xorWith = hy, ft.zip = cy, ft.zipObject = py, ft.zipObjectDeep = uy, ft.zipWith = dy, ft.entries = yp, ft.entriesIn = vp, ft.extend = fp, ft.extendWith = rs, Ja(ft, ft), ft.add = c0, ft.attempt = wp, ft.camelCase = fx, ft.capitalize = xp, ft.ceil = p0, ft.clamp = px, ft.clone = ov, ft.cloneDeep = av, ft.cloneDeepWith = lv, ft.cloneWith = sv, ft.conformsTo = hv, ft.deburr = bp, ft.defaultTo = Gx, ft.divide = u0, ft.endsWith = gx, ft.eq = Ri, ft.escape = mx, ft.escapeRegExp = yx, ft.every = My, ft.find = Ay, ft.findIndex = Fc, ft.findKey = Wv, ft.findLast = Ty, ft.findLastIndex = Uc, ft.findLastKey = zv, ft.floor = d0, ft.forEach = qc, ft.forEachRight = Qc, ft.forIn = Yv, ft.forInRight = Xv, ft.forOwn = Gv, ft.forOwnRight = Hv, ft.get = Ua, ft.gt = cv, ft.gte = pv, ft.has = Vv, ft.hasIn = Va, ft.head = $c, ft.identity = li, ft.includes = _y, ft.indexOf = Tm, ft.inRange = ux, ft.invoke = Kv, ft.isArguments = Gr, ft.isArray = ie, ft.isArrayBuffer = uv, ft.isArrayLike = si, ft.isArrayLikeObject = Be, ft.isBoolean = dv, ft.isBuffer = Tr, ft.isDate = fv, ft.isElement = gv, ft.isEmpty = mv, ft.isEqual = yv, ft.isEqualWith = vv, ft.isError = Ha, ft.isFinite = xv, ft.isFunction = nr, ft.isInteger = ap, ft.isLength = es, ft.isMap = lp, ft.isMatch = bv, ft.isMatchWith = Sv, ft.isNaN = wv, ft.isNative = Cv, ft.isNil = kv, ft.isNull = Mv, ft.isNumber = hp, ft.isObject = Ie, ft.isObjectLike = Ne, ft.isPlainObject = Vn, ft.isRegExp = Fa, ft.isSafeInteger = Av, ft.isSet = cp, ft.isString = is, ft.isSymbol = fi, ft.isTypedArray = un, ft.isUndefined = Tv, ft.isWeakMap = Pv, ft.isWeakSet = Ev, ft.join = _m, ft.kebabCase = vx, ft.last = ki, ft.lastIndexOf = Dm, ft.lowerCase = xx, ft.lowerFirst = bx, ft.lt = Ov, ft.lte = Lv, ft.max = f0, ft.maxBy = g0, ft.mean = m0, ft.meanBy = y0, ft.min = v0, ft.minBy = x0, ft.stubArray = Qa, ft.stubFalse = tl, ft.stubObject = n0, ft.stubString = o0, ft.stubTrue = s0, ft.multiply = b0, ft.nth = Im, ft.noConflict = Kx, ft.noop = qa, ft.now = qo, ft.pad = Sx, ft.padEnd = wx, ft.padStart = Cx, ft.parseInt = Mx, ft.random = dx, ft.reduce = By, ft.reduceRight = jy, ft.repeat = kx, ft.replace = Ax, ft.result = rx, ft.round = S0, ft.runInContext = wt, ft.sample = zy, ft.size = Gy, ft.snakeCase = Tx, ft.some = Hy, ft.sortedIndex = Ym, ft.sortedIndexBy = Xm, ft.sortedIndexOf = Gm, ft.sortedLastIndex = Hm, ft.sortedLastIndexBy = Fm, ft.sortedLastIndexOf = Um, ft.startCase = Ex, ft.startsWith = Ox, ft.subtract = w0, ft.sum = C0, ft.sumBy = M0, ft.template = Lx, ft.times = a0, ft.toFinite = or, ft.toInteger = ne, ft.toLength = up, ft.toLower = _x, ft.toNumber = Ai, ft.toSafeInteger = _v, ft.toString = xe, ft.toUpper = Dx, ft.trim = Ix, ft.trimEnd = Rx, ft.trimStart = Nx, ft.truncate = Bx, ft.unescape = jx, ft.uniqueId = h0, ft.upperCase = Wx, ft.upperFirst = $a, ft.each = qc, ft.eachRight = Qc, ft.first = $c, Ja(ft, function() {
- var e = {};
- return Gi(ft, function(C, K) {
- Se.call(ft.prototype, K) || (e[K] = C);
- }), e;
- }(), { chain: !1 }), ft.VERSION = l, bi(["bind", "bindKey", "curry", "curryRight", "partial", "partialRight"], function(e) {
- ft[e].placeholder = ft;
- }), bi(["drop", "take"], function(e, C) {
- ce.prototype[e] = function(K) {
- K = K === T ? 1 : Ye(ne(K), 0);
- var ot = this.__filtered__ && !C ? new ce(this) : this.clone();
- return ot.__filtered__ ? ot.__takeCount__ = Ze(K, ot.__takeCount__) : ot.__views__.push({
- size: Ze(K, P),
- type: e + (ot.__dir__ < 0 ? "Right" : "")
- }), ot;
- }, ce.prototype[e + "Right"] = function(K) {
- return this.reverse()[e](K).reverse();
- };
- }), bi(["filter", "map", "takeWhile"], function(e, C) {
- var K = C + 1, ot = 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__ || ot, mt;
- };
- }), bi(["head", "last"], function(e, C) {
- var K = "take" + (C ? "Right" : "");
- ce.prototype[e] = function() {
- return this[K](1).value()[0];
- };
- }), bi(["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(li);
- }, ce.prototype.find = function(e) {
- return this.filter(e).head();
- }, ce.prototype.findLast = function(e) {
- return this.reverse().find(e);
- }, ce.prototype.invokeMap = ae(function(e, C) {
- return typeof e == "function" ? new ce(this) : this.map(function(K) {
- return Yn(K, e, C);
- });
- }), ce.prototype.reject = function(e) {
- return this.filter(ts(qt(e)));
- }, ce.prototype.slice = function(e, C) {
- e = ne(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 !== T && (C = ne(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(P);
- }, Gi(ce.prototype, function(e, C) {
- var K = /^(?:filter|find|map|reject)|While$/.test(C), ot = /^(?:head|last)$/.test(C), ut = ft[ot ? "take" + (C == "last" ? "Right" : "") : C], mt = ot || /^find/.test(C);
- ut && (ft.prototype[C] = function() {
- var xt = this.__wrapped__, bt = ot ? [1] : arguments, Ct = xt instanceof ce, It = bt[0], Rt = Ct || ie(xt), Bt = function(he) {
- var pe = ut.apply(ft, br([he], bt));
- return ot && Yt ? pe[0] : pe;
- };
- Rt && K && typeof It == "function" && It.length != 1 && (Ct = Rt = !1);
- var Yt = this.__chain__, Ut = !!this.__actions__.length, Qt = mt && !Yt, se = Ct && !Ut;
- if (!mt && Rt) {
- xt = se ? xt : new ce(this);
- var te = e.apply(xt, bt);
- return te.__actions__.push({ func: Ko, args: [Bt], thisArg: T }), new wi(te, Yt);
- }
- return Qt && se ? e.apply(this, bt) : (te = this.thru(Bt), Qt ? ot ? te.value()[0] : te.value() : te);
- });
- }), bi(["pop", "push", "shift", "sort", "splice", "unshift"], function(e) {
- var C = wo[e], K = /^(?:push|sort|unshift)$/.test(e) ? "tap" : "thru", ot = /^(?:pop|shift)$/.test(e);
- ft.prototype[e] = function() {
- var ut = arguments;
- if (ot && !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 ot = K.name + "";
- Se.call(an, ot) || (an[ot] = []), an[ot].push({ name: C, func: K });
- }
- }), an[Go(T, E).name] = [{
- name: "wrapper",
- func: T
- }], ce.prototype.clone = jf, ce.prototype.reverse = Wf, ce.prototype.value = zf, ft.prototype.at = gy, ft.prototype.chain = my, ft.prototype.commit = yy, ft.prototype.next = vy, ft.prototype.plant = by, ft.prototype.reverse = Sy, ft.prototype.toJSON = ft.prototype.valueOf = ft.prototype.value = wy, ft.prototype.first = ft.prototype.head, In && (ft.prototype[In] = xy), ft;
- }, nn = yf();
- Rr ? ((Rr.exports = nn)._ = nn, Ks._ = nn) : Ue._ = nn;
- }).call(Fr);
- })(Cs, Cs.exports);
- var Ww = Cs.exports;
- const no = /* @__PURE__ */ Mn(Ww);
- j0($r);
- R0($r);
- D0($r);
- B0($r);
- let cs = null, _e = Le(null), Fe = Le("zh"), al = Le(""), re = Le(null);
- const kt = k0({
- //极值数据
- 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 ci = !1, Yu = Le(!1);
- const Fl = Le(document.body.clientWidth < 1200 ? "phone" : "pc");
- function zw() {
- return {
- options: re,
- axisLimitState: kt,
- chartRender: Yw,
- setLimitData: lC,
- isUseSelfLimit: Yu
- };
- }
- function Yw({ data: r, renderId: d, lang: T = "zh", changeLangIsCheck: l, showChartTitle: y = !0, shouldUseSelfLimit: j = !1 }) {
- kt.leftIndex = -1, kt.rightIndex = -1, kt.rightTwoIndex = -1, kt.hasLeftAxis = !1, kt.hasRightAxis = !1, kt.hasRightTwoAxis = !1, kt.hasXAxis = !1, Yu.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 I = {};
- Fe.value = T, al.value = d, _e.value = r, ci = j, [1, 11, 12].includes(r.ChartInfo.Source) ? I = {
- 1: Lp,
- 2: Zw,
- 3: hl,
- 4: hl,
- 5: Kw,
- 6: hl,
- 7: Qw,
- 10: nC,
- 11: sC,
- 14: Vw
- }[r.ChartInfo.ChartType](r) : [2, 5].includes(r.ChartInfo.Source) ? I = iC(r) : [3].includes(r.ChartInfo.Source) ? I = rC(r) : [4, 6, 7, 8].includes(r.ChartInfo.Source) ? I = Lp(r) : [9].includes(r.ChartInfo.Source) ? I = $w(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), I = oC(r));
- let Z = Xw();
- return re.value = { ...ms, ...Z, ...I }, Uw(y), Fw(l), $r.setOptions({ global: { useUTC: r.ChartInfo.ChartType == 2 } }), (I.series ? I.series.some((U) => U.chartType === "linear") : !1) ? cs = $r.chart(al.value, re.value) : cs = $r.stockChart(al.value, re.value), cs;
- }
- function Xw() {
- if (!_e.value.ChartInfo.ChartThemeStyle)
- return {};
- let r = JSON.parse(_e.value.ChartInfo.ChartThemeStyle);
- return {
- legend: {
- ...ms.legend,
- ...r.legendOptions
- },
- chart: {
- ...ms.chart,
- ...r.drawOption
- },
- colors: r.colorsOptions
- };
- }
- function Ei(r, d) {
- const { MarkersLines: T, ChartType: l } = _e.value.ChartInfo, { EdbInfoList: y } = _e.value;
- return T ? JSON.parse(T).filter((H) => H.isShow && H.axis === r).map((H) => {
- let U = r === 3 && d === "datetime", F;
- if (U) {
- let R = l === 2 ? new Date(y[0].DataList[1].DataList[0].DataTimestamp).getFullYear() : "";
- F = l === 2 ? (/* @__PURE__ */ new Date(`${R}-${H.value}`)).getTime() : new Date(H.value).getTime();
- } else
- F = Number(H.value);
- return {
- value: F,
- 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 Oi(r, d) {
- const { MarkersAreas: T, ChartType: l } = _e.value.ChartInfo, { EdbInfoList: y } = _e.value;
- return T ? JSON.parse(T).filter((H) => H.isShow && H.axis === r).map((H) => {
- let U = r === 3 && d === "datetime", F, R;
- if (U) {
- let b = l === 2 ? new Date(y[0].DataList[1].DataList[0].DataTimestamp).getFullYear() : "";
- F = l === 2 ? (/* @__PURE__ */ new Date(`${b}-${H.fromValue}`)).getTime() : new Date(H.fromValue).getTime(), R = l === 2 ? (/* @__PURE__ */ new Date(`${b}-${H.toValue}`)).getTime() : new Date(H.toValue).getTime();
- } else
- F = Number(H.fromValue), R = Number(H.toValue);
- let N = {
- top: 12,
- middle: 0,
- bottom: -10
- };
- return {
- from: F,
- to: R,
- color: H.color,
- label: {
- text: H.text || "",
- verticalAlign: H.textPosition,
- y: N[H.textPosition],
- style: {
- color: H.textColor,
- fontSize: H.textFontSize
- }
- }
- };
- }) : [];
- }
- function Xu({ LatestDate: r, PredictChartColor: d }) {
- return {
- zoneAxis: "x",
- zones: [{
- value: new Date(r).getTime() + 1
- }, {
- dashStyle: "ShortDot",
- color: d
- }]
- };
- }
- function Gw(r) {
- return r ? {
- zoneAxis: "x",
- zones: [{
- value: new Date(r).getTime() + 1
- }, {
- dashStyle: "ShortDot"
- }]
- } : {};
- }
- function Gu(r, d, T) {
- let l = Xt(d).diff(Xt(r), "years", !0);
- return !!([5, 6].includes(T) && l <= 1);
- }
- function ll(r, d) {
- const { IsAxis: T, IsOrder: l, EdbInfoType: y, LeadValue: j, LeadUnit: I } = r, Z = d == "zh" ? {
- 0: "右轴",
- 2: "右2轴"
- } : {
- 0: "RHS",
- 2: "2-RHS"
- }, H = d == "zh" ? {
- 1: "逆序"
- } : {
- 1: "REV"
- }, U = d == "zh" ? {
- 0: "领先"
- } : {
- 0: "Lead"
- }, F = d === "zh" ? I : E0[I];
- let R = Z[T] || "", N = H[Number(l)] ? `${R ? "," : ""}${H[Number(l)]}` : "", b = U[y] ? `${R || N ? "," : ""}${U[y]}${j}${F}` : "";
- return R || N || b ? `(${R}${N}${b})` : "";
- }
- function Ms(r, d, T = "zh") {
- let l = "";
- const y = r.EdbNameEn ? `${r.EdbNameEn}${ll(r, "en")}` : "", j = d.length > 1 ? `${r.EdbAliasName || r.EdbName}(${r.SourceName})${ll(r, "zh")}` : `${r.EdbAliasName || r.EdbName}${ll(r, "zh")}`;
- if (l = T == "zh" ? j : y || j, l.length > 20) {
- let I = [];
- for (let Z = 0; Z < l.length / 20; Z++)
- I.push(l.slice(Z * 20, Z * 20 + 20));
- l = I.join("<br>");
- }
- return l;
- }
- function Ul(r) {
- let d = r.filter((y) => y.IsAxis === 1), T = r.filter((y) => !y.IsAxis), l = r.filter((y) => y.IsAxis === 2);
- return [d, T, l].flat(1 / 0);
- }
- function Hw() {
- let r = !0;
- return _e.value.ChartInfo.ChartNameEn || (r = !1), _e.value.EdbInfoList.forEach((d) => {
- d.EdbNameEn || (r = !1), _e.value.ChartInfo.ChartType !== 10 && d.Unit && !d.UnitEn && (r = !1);
- }), r;
- }
- function Fw(r) {
- if (r && !Hw())
- return;
- const { ChartType: d, Source: T } = _e.value.ChartInfo;
- T == 1 && (d == 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((l) => {
- l.name = Fe.value == "zh" ? l.nameZh : l.nameEn;
- }), re.value.tooltip.formatter = Fe.value == "zh" ? re.value.tooltip.formatterZh : re.value.tooltip.formatterEn) : (re.value.yAxis.forEach((l) => {
- l.title.text = Fe.value == "zh" ? l.title.textZh : l.title.textEn;
- }), d != 2 && re.value.series.forEach((l) => {
- l.name = Fe.value == "zh" ? l.nameZh : l.nameEn != "无英文名称" ? l.nameEn : `<span style="color:#999">${l.nameEn}</span>`;
- }), d === 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((l) => {
- l.linkedTo || l.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(d) && (re.value.xAxis.categories = _e.value.XEdbIdValue.map((l) => Fe.value == "zh" ? _e.value.EdbInfoList.find((y) => y.EdbInfoId === l).EdbAliasName || _e.value.EdbInfoList.find((y) => y.EdbInfoId === l).EdbName : _e.value.EdbInfoList.find((y) => y.EdbInfoId === l).EdbNameEn)))), [2, 3, 4].includes(T) && (re.value.yAxis.forEach((l) => {
- l.title.text = Fe.value == "zh" ? l.title.textZh : l.title.textEn || l.title.textZh;
- }), re.value.series.forEach((l) => {
- l.name = Fe.value == "en" && l.nameEn || l.nameZh;
- }), re.value.tooltip.formatter = Fe.value == "en" ? re.value.tooltip.formatterEn : re.value.tooltip.formatterZh, T == 2 && (re.value.xAxis.categories = Vr.value.filter((l) => l.IsHide === 0).map((l) => Fe.value == "en" ? l.NameEn : l.Name)), [3].includes(T) && (re.value.xAxis.title.text = Fe.value == "en" && re.value.xAxis.title.textEn || re.value.xAxis.title.textZh));
- }
- function Uw(r) {
- if (r) {
- const d = _e.value.ChartInfo;
- re.value.title.textZh = d.ChartName, re.value.title.textEn = d.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 Vw(r) {
- const d = r.ChartInfo.ChartThemeStyle ? JSON.parse(r.ChartInfo.ChartThemeStyle) : null, { XDataList: T, UnitList: l, SeriesList: y, IsHeap: j } = 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 I = {
- categories: T.map((R) => this.currentLang == "en" ? R.NameEn : R.Name),
- tickWidth: 1,
- labels: {
- style: {
- ...d && d.xAxisOptions.style
- }
- },
- plotBands: Oi(3),
- plotLines: Ei(3)
- };
- let Z = [], H = [];
- const U = y.some((R) => R.IsAxis === 2) ? Ul(y) : no.cloneDeep(y);
- return U.forEach((R, N) => {
- const b = U.findIndex(
- (v) => v.IsAxis === R.IsAxis
- ), x = {
- 1: ["LeftName", "LeftNameEn"],
- 0: ["RightName", "RightNameEn"],
- 2: ["RightTwoName", "RightTwoNameEn"]
- };
- let u = 0, f = 0;
- const E = {
- 0: ["rightMin", "rightMax"],
- 1: ["leftMin", "leftMax"],
- 2: ["rightTwoMin", "rightTwoMax"]
- };
- E[R.IsAxis] && (u = kt[`${E[R.IsAxis][0]}`] || 0, f = kt[`${E[R.IsAxis][1]}`] || 0);
- let O = {
- ...mr,
- title: {
- text: l[x[R.IsAxis][0]],
- textCh: l[x[R.IsAxis][0]],
- // 中文
- // 中文不存在,无论英文有无都显示空
- textEn: l[x[R.IsAxis][0]] ? l[x[R.IsAxis][1]] : "",
- // 英文
- style: {
- ...d && d.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: {
- ...d && d.yAxisOptions.style
- }
- },
- opposite: [0, 2].includes(R.IsAxis),
- min: Number(u),
- max: Number(f),
- tickWidth: 1,
- visible: b === N,
- plotBands: Oi(R.IsAxis),
- plotLines: Ei(R.IsAxis)
- }, B = N;
- j == 1 && (B = 0);
- let M = R.DataList || [];
- M.forEach((v, a) => {
- R.NoDataEdbIndex.includes(a) && (M[a] = null);
- });
- const S = d ? N % d.lineOptionList.length : N;
- let w = {
- data: M,
- type: R.ChartStyle || "",
- dashStyle: d && d.lineOptionList[S].dashStyle || "Solid",
- chartType: "linear",
- yAxis: B,
- name: R.SeriesName,
- nameZh: R.SeriesName,
- nameEn: R.SeriesNameEn,
- unitName: l[x[R.IsAxis][0]],
- unitNameCh: l[x[R.IsAxis][0]],
- unitNameEn: l[x[R.IsAxis][0]] ? l[x[R.IsAxis][1]] : "",
- color: R.ChartColor,
- lineWidth: Number(R.ChartWidth) || d && d.lineOptionList[S].lineWidth,
- borderWidth: 1,
- borderColor: R.ChartColor,
- marker: {
- //展示数据点
- enabled: !!(R.ChartStyle != "column" && R.IsPoint),
- radius: d && d.lineOptionList[S].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: j == 1 ? "normal" : void 0,
- zIndex: ["line", "spline"].includes(R.ChartStyle) ? 1 : 0
- //防止组合图曲线被遮住
- };
- Z.push(O), H.push(w);
- }), {
- title: {
- text: ""
- },
- tooltip: {
- formatter: function() {
- let R = `<b>${this.points[0].x}</b>`;
- return this.points.forEach((N) => {
- const b = H.find((x) => x.name === N.series.name);
- R = R + `<br><span style="color:${N.color}">●</span>${b.name}:${N.y} ${b.unitNameCh}`;
- }), R;
- },
- formatterCh: function() {
- let R = `<b>${this.points[0].x}</b>`;
- return this.points.forEach((N) => {
- const b = H.find((x) => x.name === N.series.name);
- R = R + `<br><span style="color:${N.color}">●</span>${b.nameCh}:${N.y} ${b.unitNameCh}`;
- }), R;
- },
- formatterEn: function() {
- let R = `<b>${this.points[0].x}</b>`;
- return this.points.forEach((N) => {
- const b = H.find((x) => x.name === N.series.name);
- R = R + `<br><span style="color:${N.color}">●</span>${b.nameEn}:${N.y} ${b.unitNameEn}`;
- }), R;
- },
- shared: !0
- },
- series: H,
- yAxis: Z,
- xAxis: I
- };
- }
- function $w(r) {
- kt.leftIndex = -1, kt.rightIndex = -1, kt.rightTwoIndex = -1;
- const d = r.ChartInfo.ChartThemeStyle ? JSON.parse(r.ChartInfo.ChartThemeStyle) : null, { DataList: T, LeftMaxValue: l, LeftMinValue: y, RightMaxValue: j, RightMinValue: I } = r.DataResp, Z = {
- ...Cn,
- tickWidth: 1,
- labels: {
- style: {
- ...d && d.xAxisOptions.style
- }
- }
- };
- let H = [], U = [];
- return T.forEach((R, N) => {
- let b = {
- ...mr,
- title: {
- text: R.Unit,
- textCh: R.Unit,
- // 中文
- textEn: R.UnitEn || R.Unit,
- align: "high",
- rotation: 0,
- y: -15,
- reserveSpace: !1,
- style: {
- ...d && d.yAxisOptions.style
- }
- },
- labels: {
- style: {
- ...d && d.yAxisOptions.style
- }
- },
- opposite: R.IsAxis !== 1,
- min: Number(N === 0 ? y : I),
- max: Number(N === 0 ? l : j),
- tickWidth: 1
- };
- const x = d ? N % d.lineOptionList.length : N;
- let u = {
- data: R.Value.map((f) => [f.X, f.Y]),
- dashStyle: d && d.lineOptionList[x].dashStyle || "Solid",
- type: d && d.lineOptionList[x].lineType || "spline",
- yAxis: N,
- name: R.Name,
- nameZh: R.Name,
- nameEn: R.NameEn || R.Name,
- color: R.Color,
- lineWidth: d && d.lineOptionList[x].lineWidth || 3,
- chartType: "linear",
- zIndex: 1
- };
- U.push(u), H.push(b);
- }), {
- title: {
- text: ""
- },
- tooltip: {
- formatter: function() {
- let R = T[0].Value.map((u) => u.X), N = R[1] - R[0], x = `<b>${`[${this.x},${this.x + N}]`}</b>`;
- return this.points.forEach((u) => {
- x += `<br><span style="color:${u.color}">●</span>${u.series.name}: ${u.y}%<br>`;
- }), x;
- },
- shared: !0
- },
- series: U,
- yAxis: H,
- xAxis: Z
- };
- }
- function Lp(r) {
- const d = r.ChartInfo.Source === 1, T = [4, 6, 7, 8].includes(r.ChartInfo.Source) ? [r.DataResp] : r.EdbInfoList;
- let l = [], y = [], j = {}, I = T.findIndex((u) => u.IsAxis === 1), Z = T.findIndex((u) => !u.IsAxis), H = T.findIndex((u) => u.IsAxis === 2);
- kt.leftIndex = I, kt.rightIndex = Z, kt.rightTwoIndex = H;
- const U = r.ChartInfo.ChartThemeStyle ? JSON.parse(r.ChartInfo.ChartThemeStyle) : null;
- let F = [], R = T.some((u) => u.IsAxis === 2) ? Ul(T) : T;
- R.forEach((u, f) => {
- let E = R.findIndex((t) => t.IsAxis === u.IsAxis), O = u.EdbName, B = R.filter(
- (t) => O === t.EdbName
- ), M = Ms(u, B, "zh"), S = Ms(u, B, "en"), w = u.EdbInfoCategoryType === 1 ? Xu(u) : {};
- const v = U ? f % U.lineOptionList.length : f;
- let a = {
- data: [],
- dataGrouping: {
- enabled: !1
- },
- type: U && U.lineOptionList[v].lineType || "spline",
- dashStyle: U && U.lineOptionList[v].dashStyle || "Solid",
- yAxis: f,
- name: M,
- nameZh: M,
- nameEn: S,
- color: u.ChartColor,
- lineWidth: Number(u.ChartWidth) || U && U.lineOptionList[v].lineWidth || 1,
- visible: !0,
- LatestDate: u.LatestDate,
- LatestValue: u.LatestValue,
- marker: U && U.lineOptionList[v].dataMark && U.lineOptionList[v].dataMark != "none" ? {
- enabled: !0,
- symbol: U.lineOptionList[v].markType || "circle",
- fillColor: U.lineOptionList[v].markColor,
- radius: U.lineOptionList[v].markSize
- } : {},
- ...w
- };
- u.DataList = u.DataList || [];
- for (let t of u.DataList)
- a.data.push([t.DataTimestamp, t.Value]);
- l.push(a), u.IsAxis, console.log("useSelfLimit", ci);
- let c = 0, p = 0;
- if ((!ci || !d) && (c = u.MinData, p = u.MaxData), ci && d) {
- const t = {
- 0: ["rightMin", "rightMax"],
- 1: ["leftMin", "leftMax"],
- 2: ["rightTwoMin", "rightTwoMax"]
- };
- t[u.IsAxis] && (c = kt[`${t[u.IsAxis][0]}`] || 0, p = kt[`${t[u.IsAxis][1]}`] || 0);
- }
- const i = r.ChartInfo.Source === 12 ? u.ConvertUnit : u.ConvertUnit || u.Unit, h = r.ChartInfo.Source === 12 ? u.ConvertEnUnit : u.ConvertEnUnit || u.UnitEn || u.ConvertUnit || u.Unit;
- let s = {
- ...mr,
- IsAxis: u.IsAxis,
- labels: {
- formatter: function(t) {
- return E !== f ? "" : t.value;
- },
- align: "center",
- x: [0, 2].includes(u.IsAxis) ? 5 : -5,
- style: {
- ...U && U.yAxisOptions.style
- }
- },
- tickWidth: E !== f ? 0 : 1,
- title: {
- text: E !== f ? "" : `${i}`,
- textZh: i,
- //中文单位
- textEn: i ? h : "",
- //英文单位,但如果无中文单位则不显示
- align: "high",
- rotation: 0,
- y: -15,
- x: u.IsAxis === 0 && H > -1 ? -R[H].Unit.length * 12 : 0,
- textAlign: u.IsAxis === 1 ? "left" : "right",
- reserveSpace: !1,
- style: {
- ...U && U.yAxisOptions.style
- }
- },
- opposite: [0, 2].includes(u.IsAxis),
- reversed: u.IsOrder,
- min: Number(c),
- max: Number(p),
- visible: E === f,
- chartEdbInfo: u,
- //指标数据用于在保存时读取指标数据
- plotBands: Oi(u.IsAxis),
- plotLines: Ei(u.IsAxis)
- };
- y.push(s), u.DataList.length > 0 && (F.push(u.DataList[0].DataTimestamp), F.push(u.DataList[u.DataList.length - 1].DataTimestamp));
- });
- let N = Math.min.apply(null, F), b = Math.max.apply(null, F);
- const x = Gu(N, b, r.ChartInfo.DateType);
- return j = {
- ...Hp,
- labels: {
- formatter: function(u) {
- return x ? to.dateFormat("%m/%d", u.value) : to.dateFormat("%y/%m", u.value);
- },
- style: {
- ...U && U.xAxisOptions.style
- }
- },
- tickInterval: Fl.value === "phone" ? (b - N) / 6 / (24 * 3600 * 1e3) > 30 ? (b - N) / 6 : 24 * 3600 * 1e3 * 30 : void 0,
- plotBands: Oi(3, "datetime"),
- plotLines: Ei(3, "datetime")
- }, y.forEach((u) => {
- u.IsAxis === 1 ? (kt.hasLeftAxis = !0, (!ci || !d) && (kt.leftMin = T[I].MinData, kt.leftMax = T[I].MaxData, u.min = T[I].MinData, u.max = T[I].MaxData)) : u.IsAxis === 2 ? (kt.hasRightTwoAxis = !0, (!ci || !d) && (kt.rightTwoMin = T[H].MinData, kt.rightTwoMax = T[H].MaxData, u.min = T[H].MinData, u.max = T[H].MaxData)) : (kt.hasRightAxis = !0, (!ci || !d) && (kt.rightMin = T[Z].MinData, kt.rightMax = T[Z].MaxData, u.min = T[Z].MinData, u.max = T[Z].MaxData));
- }), {
- series: l,
- xAxis: [j],
- yAxis: y,
- rangeSelector: { enabled: !1 }
- };
- }
- function Zw(r) {
- var S;
- kt.leftIndex = 0;
- const { RightAxis: d = {} } = r.DataResp || {};
- kt.rightIndex = d.IsShow ? 1 : -1, kt.rightTwoIndex = -1;
- const T = r.ChartInfo.ChartThemeStyle ? JSON.parse(r.ChartInfo.ChartThemeStyle) : null;
- let l = {};
- const y = r.EdbInfoList[0], j = r.ChartInfo.Calendar || "公历", I = T && T.colorsOptions.reverse();
- let Z = [], H = [];
- const U = j === "农历" ? y.DataList.filter((w, v) => v > 0) : y.DataList;
- T && (T.lineOptionList = T.lineOptionList.reverse().slice(-U.length));
- let F = 0;
- U.forEach((w, v) => {
- let a = y.EdbInfoCategoryType === 1 ? Gw(w.CuttingDataTimestamp) : {};
- const c = T ? v % T.lineOptionList.length : v;
- let p = {
- data: [],
- dataGrouping: {
- enabled: !1
- },
- type: T && T.lineOptionList[c].lineType || y.ChartStyle,
- dashStyle: T && T.lineOptionList[c].dashStyle || "Solid",
- yAxis: 0,
- name: w.ChartLegend,
- lineWidth: T && T.lineOptionList[c].lineWidth || 1,
- // color:colorsArr.slice(-chartDataHandle.length)[lineIndex], //与PC端的配置不同步,导致两边 十条之后的线条颜色不对应
- visible: !0,
- marker: T && T.lineOptionList[c].dataMark && T.lineOptionList[c].dataMark != "none" ? {
- enabled: !0,
- symbol: T.lineOptionList[c].markType || "circle",
- fillColor: T.lineOptionList[c].markColor,
- radius: T.lineOptionList[c].markSize
- } : {},
- ...a
- };
- if (w.DataList = w.DataList || [], (w.DataList || []).length > 0) {
- let h = w.DataList[w.DataList.length - 1].DataTimestamp - w.DataList[0].DataTimestamp;
- F = Math.max(F, h);
- }
- for (let h of w.DataList)
- p.data.push([h.DataTimestamp, h.Value]);
- Z.push(p);
- }), l.colors = I.slice(-U.length);
- const { MaxMinLimits: R = {}, SamePeriodAverage: N = {}, SamePeriodStandardDeviation: b = {} } = r.DataResp || {};
- if (R.IsShow && R.List && R.List.length) {
- let w = {
- type: "arearange",
- //上下限是一个范围
- data: [],
- name: R.Legend || "同期上下限",
- color: R.Color || "#075EEE",
- fillOpacity: ss(R.Color || "") > 0.75 ? 0.75 : ss(R.Color || "")
- //透明度最高0.75
- };
- R.List.forEach((v) => {
- w.data.push([v.DataTimestamp, v.MinValue, v.MaxValue]);
- }), Z.push(w);
- }
- if (N.IsShow && N.List) {
- let w = {
- type: "line",
- data: [],
- lineWidth: N.LineWidth,
- dashStyle: N.LineType,
- name: N.Legend || "同期均值",
- color: N.Color || "#075EEE"
- };
- N.List.forEach((v) => {
- w.data.push([v.DataTimestamp, v.Value]);
- }), Z.push(w);
- }
- if (b.IsShow && b.List) {
- let w = {
- type: "arearange",
- //标准差也是一个范围
- data: [],
- name: b.Legend || "同期标准差",
- color: b.Color || "#075EEE",
- fillOpacity: ss(b.Color || "") > 0.75 ? 0.75 : ss(b.Color || "")
- };
- b.List.forEach((v) => {
- w.data.push([v.DataTimestamp, v.MinValue, v.MaxValue]);
- }), Z.push(w);
- }
- if (d.IsShow) {
- let v = {
- ...d.Style === "column" ? {
- //柱形
- type: "column",
- color: d.ChartColor
- } : {
- //标记点
- type: "spline",
- lineWidth: d.LineWidth,
- dashStyle: d.LineStyle,
- color: d.IsConnected ? d.LineColor : "rgba(255, 255, 255, 0)",
- //没有连线颜色设置为透明
- marker: {
- enabled: !0,
- symbol: d.Shape,
- fillColor: d.ChartColor,
- radius: d.Size
- }
- },
- name: d.Legend || "",
- data: [],
- yAxis: 1
- };
- ((d.IndicatorType === 1 ? d.EdbInfoList[0].DataList : (S = r.EdbInfoList[1]) == null ? void 0 : S.DataList) || []).forEach((c) => {
- v.data.push([c.DataTimestamp, c.Value]);
- }), Z.push(v);
- }
- let x = 0, u = 0, f = 0, E = 0;
- ci ? (x = kt.leftMin || 0, u = kt.leftMax || 0, kt.rightIndex !== -1 && (f = kt.rightMin || 0, E = kt.rightMax || 0)) : (x = y.MinData, u = y.MaxData);
- const O = y.ConvertUnit || y.Unit, B = y.ConvertEnUnit || y.UnitEn || y.ConvertUnit || y.Unit;
- if (H = [{
- IsAxis: y.IsAxis,
- labels: {
- align: "center",
- y: 5,
- style: {
- ...T && T.yAxisOptions.style
- }
- },
- title: {
- text: `${O}`,
- textZh: O,
- // 中文
- // 中文不存在,无论英文有无都显示空
- textEn: O ? B || "英文单位" : "",
- // 英文
- align: "high",
- rotation: 0,
- y: -5,
- x: 0,
- textAlign: "left",
- reserveSpace: !1,
- style: {
- ...T && T.yAxisOptions.style
- }
- },
- max: Number(u),
- min: Number(x),
- plotBands: Oi(1),
- plotLines: Ei(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//指标数据
- }], d.IsShow) {
- const w = (d.IndicatorType === 1 ? d.EdbInfoList[0] : r.EdbInfoList[1]) || { Unit: "" };
- d.IndicatorType === 1 ? w.Unit = d.NumFormat === 1 ? "%" : "" : w.Unit = r.EdbInfoList[1] && (r.EdbInfoList[1].ConvertUnit || r.EdbInfoList[1].Unit) || "", H.push({
- ...P0.yAxis,
- opposite: !0,
- //右轴
- labels: {
- align: "center",
- y: 5,
- style: {
- ...T && T.yAxisOptions.style
- }
- },
- title: {
- text: w.Unit || "",
- style: {
- ...T && T.yAxisOptions.style
- },
- align: "high",
- rotation: 0,
- y: -5,
- x: 0,
- textAlign: "right",
- reserveSpace: !1
- },
- max: Number(E),
- min: Number(f)
- });
- }
- l.series = Z, l.yAxis = H, kt.hasLeftAxis = !0, ci || (kt.leftMin = Number(y.MinData), kt.leftMax = Number(y.MaxData));
- let M = {
- 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) => to.dateFormat("%m/%d", w.value),
- style: {
- ...T && T.xAxisOptions.style
- }
- },
- tickInterval: Fl.value === "phone" ? F / 6 : void 0,
- //季节图
- plotBands: Oi(3, "datetime"),
- plotLines: Ei(3, "datetime")
- };
- return l.xAxis = [M], l.tooltip = {
- split: !1,
- shared: !0,
- dateTimeLabelFormats: {
- // 时间格式化字符
- day: "%m/%d",
- week: "%m/%d",
- month: "%m/%d",
- year: "%m/%d"
- },
- xDateFormat: "%m/%d"
- }, {
- ...l
- // title: {
- // enabled: true,
- // text:e.ChartInfo.ChartName
- // },
- // legend:{
- // enabled:true,
- // verticalAlign: 'top',
- // y:-10,
- // x:(10 * data.Unit.length)/2
- // }
- };
- }
- function hl(r) {
- const d = r.EdbInfoList;
- let l = {
- 3: "areaspline",
- 4: "column",
- 6: ""
- }[r.ChartInfo.ChartType];
- const y = r.ChartInfo.ChartThemeStyle ? JSON.parse(r.ChartInfo.ChartThemeStyle) : null;
- let j = [], I = [], Z = {}, H = {}, U, F, R, N = [], b = d.some((O) => O.IsAxis === 2) ? Ul(d) : d;
- r.ChartInfo.ChartType === 3 && r.ChartInfo.ExtraConfig && (H = JSON.parse(r.ChartInfo.ExtraConfig)), b.forEach((O, B) => {
- let M = b.findIndex((_) => _.IsAxis === O.IsAxis), S = B;
- [4].includes(r.ChartInfo.ChartType) || r.ChartInfo.ChartType === 3 && H.IsHeap == 1 ? S = 0 : r.ChartInfo.ChartType === 6 && ["areaspline", "column"].includes(O.ChartStyle) && (S = b.findIndex((_) => _.ChartStyle === O.ChartStyle)), O.IsAxis = S === B ? O.IsAxis : b[S].IsAxis, O.IsOrder = S === B ? O.IsOrder : b[S].IsOrder, U = [4].includes(r.ChartInfo.ChartType) ? b[S].IsAxis ? S : -1 : d.findIndex((_) => _.IsAxis === 1), F = [4].includes(r.ChartInfo.ChartType) ? b[S].IsAxis ? -1 : S : d.findIndex((_) => !_.IsAxis), R = [4].includes(r.ChartInfo.ChartType) ? -1 : d.findIndex((_) => _.IsAxis === 2), kt.leftIndex = U, kt.rightIndex = F, kt.rightTwoIndex = R;
- let w = O.EdbName, v = b.filter(
- (_) => w === _.EdbName
- ), a = Ms(O, v, "zh"), c = Ms(O, v, "en"), p = O.EdbInfoCategoryType === 1 ? Xu(O) : {};
- const i = y ? B % y.lineOptionList.length : B;
- let h = {
- data: [],
- dataGrouping: {
- enabled: !1
- },
- type: r.ChartInfo.ChartType !== 3 ? l || O.ChartStyle : H.IsHeap == 1 ? "area" : y && y.lineOptionList[i].lineType || O.ChartStyle,
- yAxis: S,
- name: a,
- nameZh: a,
- nameEn: c,
- 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,
- ...p,
- 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)
- h.data.push([_.DataTimestamp, _.Value]);
- j.push(h);
- let s = 0, t = 0;
- if (!ci)
- s = b[M].MinData, t = b[M].MaxData;
- else {
- const _ = {
- 0: ["rightMin", "rightMax"],
- 1: ["leftMin", "leftMax"],
- 2: ["rightTwoMin", "rightTwoMax"]
- };
- _[O.IsAxis] && (s = kt[`${_[O.IsAxis][0]}`] || 0, t = kt[`${_[O.IsAxis][1]}`] || 0);
- }
- O.IsAxis;
- const o = O.ConvertUnit || O.Unit, n = O.ConvertEnUnit || O.UnitEn || O.ConvertUnit || O.Unit;
- let A = {
- ...mr,
- IsAxis: O.IsAxis,
- labels: {
- formatter: (_) => M !== B ? "" : 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: o,
- textZh: o,
- // 中文
- // 中文不存在,无论英文有无都显示空
- textEn: o ? n || "英文单位" : "",
- // 英文
- align: "high",
- rotation: 0,
- y: -15,
- x: O.IsAxis === 0 && R > -1 ? -b[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(s),
- max: r.ChartInfo.ChartType === 3 && H.HeapWay == 2 ? null : Number(t),
- tickWidth: M !== B ? 0 : 1,
- visible: S === B && M === B,
- plotBands: Oi(O.IsAxis),
- plotLines: Ei(O.IsAxis),
- chartEdbInfo: O
- //指标数据用于在保存时读取指标数据
- };
- I.push(A), O.DataList.length > 0 && (N.push(O.DataList[0].DataTimestamp), N.push(O.DataList[O.DataList.length - 1].DataTimestamp));
- });
- let x = Math.min.apply(null, N), u = Math.max.apply(null, N);
- const f = Gu(x, u, r.ChartInfo.DateType);
- Z = {
- ...Hp,
- labels: {
- formatter: function(O) {
- return f ? to.dateFormat("%m/%d", O.value) : to.dateFormat("%y/%m", O.value);
- },
- style: {
- ...y && y.xAxisOptions.style
- }
- },
- tickInterval: Fl.value === "phone" ? (u - x) / 6 / (24 * 3600 * 1e3) > 30 ? (u - x) / 6 : 24 * 3600 * 1e3 * 30 : void 0,
- plotBands: Oi(3, "datetime"),
- plotLines: Ei(3, "datetime")
- }, I.forEach((O) => {
- O.IsAxis === 1 ? (kt.hasLeftAxis = !0, ci || (kt.leftMin = d[U].MinData, kt.leftMax = d[U].MaxData, O.min = d[U].MinData, O.max = d[U].MaxData)) : O.IsAxis === 2 ? (kt.hasRightTwoAxis = !0, ci || (kt.rightTwoMin = d[R].MinData, kt.rightTwoMax = d[R].MaxData, O.min = d[R].MinData, O.max = d[R].MaxData)) : (kt.hasRightAxis = !0, ci || (kt.rightMin = d[F].MinData, kt.rightMax = d[F].MaxData, O.min = d[F].MinData, O.max = d[F].MaxData));
- });
- let E = {
- series: j,
- xAxis: Z,
- yAxis: I,
- rangeSelector: { enabled: !1 }
- };
- return r.ChartInfo.ChartType === 3 && H.HeapWay == 2 && (E.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/>'
- }), E;
- }
- function Kw(r) {
- kt.leftIndex = 1, kt.rightIndex = -1, kt.rightTwoIndex = -1;
- const d = r.EdbInfoList, { ChartInfo: T } = r, l = T.ChartThemeStyle ? JSON.parse(T.ChartThemeStyle) : null;
- kt.hasLeftAxis = !0;
- const y = [];
- let j = {}, I = no.cloneDeep(d)[0].DataList || [], Z = no.cloneDeep(d)[1].DataList || [];
- I.forEach((B) => {
- Z.forEach((M) => {
- if (B.DataTimestamp === M.DataTimestamp) {
- let S = B.Value + "_" + M.Value;
- j[S] ? j[S].push(Xt(B.DataTimestamp).format("YYYY/MM/DD")) : j[S] = [Xt(B.DataTimestamp).format("YYYY/MM/DD")], y.push({
- x: B.Value,
- y: M.Value
- });
- }
- });
- }), y.sort((B, M) => B - M);
- let H = {
- formatter: function() {
- return `<strong>${j[this.x + "_" + this.y].length > 4 ? j[this.x + "_" + this.y].slice(0, 4).join() + "..." : j[this.x + "_" + this.y].join()}</strong><br>
- ${d[0].EdbName}: <span style="font-weight: 600"> ${this.x}</span><br>
- ${d[1].EdbName}: <span style="font-weight: 600"> ${this.y}</span>
- `;
- },
- // 中文
- formatterCh: function() {
- return `<strong>${j[this.x + "_" + this.y].length > 4 ? j[this.x + "_" + this.y].slice(0, 4).join() + "..." : j[this.x + "_" + this.y].join()}</strong><br>
- ${d[0].EdbName}: <span style="font-weight: 600"> ${this.x}</span><br>
- ${d[1].EdbName}: <span style="font-weight: 600"> ${this.y}</span>
- `;
- },
- // 英文
- formatterEn: function() {
- let B = `${d[0].EdbNameEn}`, M = `${d[1].EdbNameEn}`;
- return `<strong>${j[this.x + "_" + this.y].length > 4 ? j[this.x + "_" + this.y].slice(0, 4).join() + "..." : j[this.x + "_" + this.y].join()}</strong><br>
- ${B}: <span style="font-weight: 600"> ${this.x}</span><br>
- ${M}: <span style="font-weight: 600"> ${this.y}</span>
- `;
- }
- };
- const { IsOrder: U, ChartColor: F } = d[0];
- let R = 0, N = 0;
- ci ? (R = kt.leftMin || 0, N = kt.leftMax || 0) : (R = r.ChartInfo.LeftMin || 0, N = r.ChartInfo.LeftMax || 0), console.log("check limit", R, N);
- const b = d[1].ConvertUnit || d[1].Unit, x = d[1].ConvertEnUnit || d[1].UnitEn || d[1].ConvertUnit || d[1].Unit;
- let u = {
- title: {
- text: `${b}`,
- textZh: b,
- textEn: b ? x : "",
- align: "high",
- rotation: 0,
- y: -15,
- x: 0,
- textAlign: "left",
- reserveSpace: !1,
- style: {
- ...l && l.yAxisOptions.style
- }
- },
- labels: {
- formatter: function(B) {
- return B.value;
- },
- align: "center",
- style: {
- ...l && l.yAxisOptions.style
- }
- },
- opposite: !1,
- reversed: U,
- min: Number(R),
- max: Number(N),
- 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: Oi(1),
- plotLines: Ei(1)
- }, f = {
- data: [],
- type: "scatter",
- name: `${T.ChartName}${U ? "(逆序)" : ""}`,
- nameZh: `${T.ChartName}${U ? "(逆序)" : ""}`,
- nameEn: T.ChartNameEn ? `${T.ChartNameEn}${U ? "(reverse)" : ""}` : "",
- color: F,
- visible: !0,
- chartType: "linear",
- marker: {
- radius: l && l.lineOptionList[0].radius || 5
- }
- };
- y.forEach((B) => {
- f.data.push([B.x, B.y]);
- });
- const E = d[0].ConvertUnit || d[0].Unit, O = d[0].ConvertEnUnit || d[0].UnitEn || d[0].ConvertUnit || d[0].Unit;
- return {
- title: {
- text: ""
- },
- series: [f],
- yAxis: u,
- xAxis: {
- ...Cn,
- title: {
- text: `${E}`,
- textZh: E,
- textEn: E ? O : "",
- align: "high",
- rotation: 0,
- x: 0,
- offset: 20,
- style: {
- ...l && l.xAxisOptions.style
- }
- },
- labels: {
- style: {
- ...l && l.xAxisOptions.style
- }
- }
- },
- tooltip: H
- };
- }
- const Hu = Le([]), Fu = Le([]), Jw = Le([]);
- function qw(r) {
- var F, R, N;
- let d = [];
- const T = no.cloneDeep(Hu.value), l = r.ChartInfo.ChartThemeStyle ? JSON.parse(r.ChartInfo.ChartThemeStyle) : null;
- let y = {
- ...Cn,
- categories: Fu.value,
- tickWidth: 1,
- labels: {
- style: {
- ...l && l.xAxisOptions.style
- }
- }
- };
- const { leftMin: j, leftMax: I } = kt, Z = (F = r.ChartInfo) == null ? void 0 : F.Unit, H = ((R = r.ChartInfo) == null ? void 0 : R.UnitEn) || ((N = r.ChartInfo) == null ? void 0 : N.Unit);
- let U = {
- ...mr,
- title: {
- text: Z,
- textZh: Z,
- textEn: H,
- align: "high",
- rotation: 0,
- y: -12,
- x: 0,
- textAlign: "left",
- reserveSpace: !1,
- style: {
- ...l && l.yAxisOptions.style
- }
- },
- labels: {
- formatter: function(b) {
- return b.value;
- },
- align: "center",
- style: {
- ...l && l.yAxisOptions.style
- }
- },
- min: Number(j),
- max: Number(I),
- opposite: !1,
- tickWidth: 1,
- plotBands: Oi(1),
- plotLines: Ei(1)
- };
- return T.forEach((b) => {
- let x = {
- data: b.Value,
- type: "column",
- yAxis: 0,
- name: b.Name || b.Date,
- nameZh: b.Name || b.Date,
- nameEn: b.Date,
- color: b.Color,
- chartType: "linear",
- visible: !0
- };
- d.push(x);
- }), {
- title: {
- text: ""
- },
- plotOptions: {
- column: {
- stacking: null
- }
- },
- series: d,
- yAxis: [U],
- xAxis: y
- };
- }
- function Qw(r) {
- const { XEdbIdValue: d, YDataList: T, EdbInfoList: l, ChartInfo: y } = r;
- let j = d.map((I) => l.find((Z) => Z.EdbInfoId === I).EdbAliasName);
- return kt.leftIndex = -1, kt.rightIndex = -1, kt.rightTwoIndex = -1, Hu.value = T, Fu.value = j, Jw.value = l, kt.hasLeftAxis = !0, kt.leftMin = Number(y.LeftMin), kt.leftMax = Number(y.LeftMax), qw(r);
- }
- const Uu = Le([]), Vr = Le([]), Bi = Le([]), tC = (r, d) => {
- kt.leftIndex = -1, kt.rightIndex = -1, kt.rightTwoIndex = -1;
- const T = _e.value.ChartInfo.ChartThemeStyle ? JSON.parse(_e.value.ChartInfo.ChartThemeStyle) : null;
- let l = [];
- const y = no.cloneDeep(Uu.value);
- console.log(y);
- let j = {
- ...Cn,
- categories: Vr.value.filter((H) => H.IsHide === 0).map((H) => H.Name),
- tickWidth: 1,
- labels: {
- style: {
- ...T && T.xAxisOptions.style
- }
- }
- }, I = {
- ...mr,
- title: {
- text: Bi.value[0].Unit,
- textZh: Bi.value[0].Unit,
- textEn: Bi.value[0].Unit ? Bi.value[0].UnitEn || "英文单位" : "",
- align: "high",
- rotation: 0,
- y: -15,
- textAlign: "left",
- reserveSpace: !1,
- style: {
- ...T && T.yAxisOptions.style
- }
- },
- labels: {
- formatter: function(H) {
- return H.value;
- },
- align: "center",
- style: {
- ...T && T.yAxisOptions.style
- }
- },
- min: Number(r),
- max: Number(d),
- opposite: !1,
- tickWidth: 1
- };
- return y.forEach((H, U) => {
- let F = eC(H);
- const R = T ? U % T.lineOptionList.length : U;
- let N = {
- data: F,
- type: T && T.lineOptionList[R].lineType || "spline",
- dashStyle: T && T.lineOptionList[R].dashStyle || "Solid",
- yAxis: 0,
- name: H.Name,
- nameZh: H.Name,
- nameEn: H.NameEn,
- color: H.Color,
- chartType: "linear",
- lineWidth: T && T.lineOptionList[R].lineWidth || 3,
- visible: !0,
- marker: {
- enabled: !1
- }
- };
- l.push(N);
- }), {
- title: {
- text: ""
- },
- series: l,
- yAxis: [I],
- xAxis: j,
- tooltip: {
- formatter: function() {
- const H = this;
- let U = "";
- return H.points.forEach((F) => {
- let R = y.find((x) => x.Name === F.series.name), N = Vr.value.findIndex((x) => x.Name === H.x);
- const b = R.XEdbInfoIdList[N];
- if (b) {
- const x = Bi.value.some((f) => f.EdbInfoId === b);
- let u = _e.value.ChartInfo.Source === 5 ? x ? R.NameList[N] : `${_e.value.DataResp.ProfitName}(${R.NameList[N]})` : Bi.value.find((f) => f.EdbInfoId === R.XEdbInfoIdList[N]).EdbName;
- U += `<b>${u}</b>`, R.NoDataEdbList.includes(R.XEdbInfoIdList[N]) ? U += `<br><span style="color:${F.color}">●</span>${R.Date}: 无<br>` : U += `<br><span style="color:${F.color}">●</span>${R.Date}: ${F.y}<br>`;
- }
- }), U || "无合约";
- },
- formatterCh: function() {
- const H = this;
- let U = "";
- return H.points.forEach((F) => {
- let R = y.find((x) => x.Name === F.series.name), N = Vr.value.findIndex((x) => x.Name === H.x);
- const b = R.XEdbInfoIdList[N];
- if (b) {
- const x = Bi.value.some((f) => f.EdbInfoId === b);
- let u = _e.value.ChartInfo.Source === 5 ? x ? R.NameList[N] : `${_e.value.DataResp.ProfitName}(${R.NameList[N]})` : Bi.value.find((f) => f.EdbInfoId === R.XEdbInfoIdList[N]).EdbName;
- U += `<b>${u}</b>`, R.NoDataEdbList.includes(R.XEdbInfoIdList[N]) ? U += `<br><span style="color:${F.color}">●</span>${R.Date}: 无<br>` : U += `<br><span style="color:${F.color}">●</span>${R.Date}: ${F.y}<br>`;
- }
- }), U || "无合约";
- },
- formatterEn: function() {
- const H = this;
- let U = "";
- return H.points.forEach((F) => {
- let R = y.find((x) => x.NameEn === F.series.name), N = Vr.value.findIndex((x) => x.NameEn === H.x);
- const b = R.XEdbInfoIdList[N];
- if (b) {
- const x = Bi.value.some((f) => f.EdbInfoId === b);
- let u = _e.value.ChartInfo.Source === 5 ? x ? R.NameList[N] : `${_e.value.DataResp.ProfitNameEn}(${R.NameList[N]})` : Bi.value.find((f) => f.EdbInfoId === R.XEdbInfoIdList[N]).EdbNameEn;
- U += `<b>${u}</b>`, R.NoDataEdbList.includes(R.XEdbInfoIdList[N]) ? U += `<br><span style="color:${F.color}">●</span>${R.Date}: 无<br>` : U += `<br><span style="color:${F.color}">●</span>${R.Date}: ${F.y}<br>`;
- }
- }), U || "无合约";
- },
- shared: !0
- }
- };
- };
- function eC(r) {
- let d = r.XEdbInfoIdList.filter((I) => !r.NoDataEdbList.includes(I)), T = r.XEdbInfoIdList.findIndex((I) => I === d[0]), l = r.XEdbInfoIdList.findIndex((I) => I === d[d.length - 1]), y = r.Value.map((I, Z) => Z < T || Z > l ? null : I), j = [];
- return Vr.value.forEach((I, Z) => {
- I.IsHide !== 1 && j.push(y[Z]);
- }), j;
- }
- function iC(r) {
- const { XDataList: d, YDataList: T, EdbInfoList: l, ChartInfo: y, DataResp: j } = r;
- return Bi.value = l, Uu.value = y.Source === 5 ? j.YDataList : T, Vr.value = y.Source === 5 ? j.XDataList : d, kt.hasLeftAxis = !0, kt.leftMin = Number(y.LeftMin), kt.leftMax = Number(y.LeftMax), tC(y.LeftMin, y.LeftMax);
- }
- function rC(r) {
- const d = r.ChartInfo.ChartThemeStyle ? JSON.parse(r.ChartInfo.ChartThemeStyle) : null;
- kt.leftIndex = -1, kt.rightIndex = -1, kt.rightTwoIndex = -1;
- let T = {
- 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(${kp[r.CorrelationChartInfo.LeadUnit]})` : null,
- align: "high",
- rotation: 0,
- x: 0,
- y: 10,
- offset: 20,
- style: {
- ...d && d.xAxisOptions.style
- }
- },
- labels: {
- style: {
- ...d && d.xAxisOptions.style
- }
- },
- tickInterval: 1,
- offset: 0,
- tickmarkPlacement: "on"
- }, l = {
- ...mr,
- title: {
- text: "相关性系数",
- textZh: "相关性系数",
- textEn: "Correlation coefficient",
- align: "high",
- rotation: 0,
- y: -15,
- textAlign: "left",
- reserveSpace: !1,
- style: {
- ...d && d.yAxisOptions.style
- }
- },
- labels: {
- formatter: function(U) {
- return U.value;
- },
- align: "center",
- style: {
- ...d && d.yAxisOptions.style
- }
- },
- opposite: !1,
- tickWidth: 1
- }, y = [];
- r.YDataList.forEach((U, F) => {
- const R = d ? F % d.lineOptionList.length : F;
- let N = {
- data: U.Value,
- type: d && d.lineOptionList[R].lineType || "spline",
- dashStyle: d && d.lineOptionList[R].dashStyle || "Solid",
- yAxis: 0,
- name: U.Name || r.ChartInfo.ChartName,
- nameZh: U.Name || r.ChartInfo.ChartName,
- nameEn: U.NameEn || r.ChartInfo.ChartNameEn,
- color: U.Color,
- chartType: "linear",
- lineWidth: d && d.lineOptionList[R].lineWidth || 3,
- visible: !0,
- marker: {
- enabled: !1
- }
- };
- y.push(N);
- });
- const { LeadValue: j, LeadUnit: I } = r.CorrelationChartInfo, { Source: Z } = r.ChartInfo;
- let H = {
- formatter: function() {
- return `<p>相关性系数:${this.y.toFixed(4)}</p><br><p>领先${Z === 3 ? this.x + "期" : j + I}</p>`;
- },
- formatterCh: function() {
- return `<p>相关性系数:${this.y.toFixed(4)}</p><br><p>领先${Z === 3 ? this.x + "期" : j + I}</p>`;
- },
- formatterEn: function() {
- return `<p>Correlation coefficient:${this.y.toFixed(4)}</p><br><p>lead${Z === 3 ? this.x + "stage" : j + kp[I]}</p>`;
- }
- };
- return gs(() => {
- re.value = {
- isRelevanceChart: r.ChartInfo.Source === 3,
- title: {
- text: ""
- },
- series: y,
- yAxis: [l],
- xAxis: T,
- tooltip: H
- }, cs.update(re.value, !0);
- }), {
- isRelevanceChart: !0,
- title: {
- text: ""
- },
- series: y,
- yAxis: [l],
- xAxis: T,
- tooltip: H
- };
- }
- function nC({ DataResp: r, ChartInfo: d }) {
- kt.leftIndex = -1, kt.rightIndex = -1, kt.rightTwoIndex = -1;
- const T = d.ChartThemeStyle ? JSON.parse(d.ChartThemeStyle) : null, { DataList: l, XName: y, XNameEn: j, XUnitName: I, XUnitNameEn: Z, YName: H, YNameEn: U, YUnitName: F, YUnitNameEn: R } = r, N = Number(r.YMinValue), b = Number(r.YMaxValue), x = Number(r.XMinValue), u = Number(r.XMaxValue);
- kt.hasLeftAxis = !0, kt.hasXAxis = !0, kt.leftMin = N, kt.leftMax = b, kt.xMin = x, kt.xMax = u;
- let f = {
- ...mr,
- title: {
- text: H,
- textZh: H,
- // 中文
- textEn: U || "",
- style: {
- ...T && T.yAxisOptions.style
- },
- align: "middle"
- },
- labels: {
- style: {
- ...T && T.yAxisOptions.style
- }
- },
- opposite: !1,
- reversed: !1,
- min: Number(N),
- max: Number(b),
- tickWidth: 1,
- plotBands: Oi(1),
- plotLines: Ei(1)
- }, E = {
- ...Cn,
- title: {
- text: y,
- textZh: y,
- // 中文
- textEn: j || "",
- style: {
- ...T && T.xAxisOptions.style
- },
- align: "middle"
- },
- labels: {
- style: {
- ...T && T.xAxisOptions.style
- }
- },
- min: Number(x),
- max: Number(u),
- plotBands: Oi(3),
- plotLines: Ei(3)
- }, O = [];
- return l.forEach((M, S) => {
- const w = T ? S % T.lineOptionList.length : S;
- let v = {
- data: [],
- type: "scatter",
- name: M.Name,
- nameZh: M.Name,
- nameEn: M.NameEn,
- color: M.Color,
- lineWidth: 0,
- chartType: "linear",
- zIndex: 1,
- visible: !0,
- marker: {
- radius: T && T.lineOptionList[w].radius || 5
- }
- };
- if (M.EdbInfoList.forEach((a) => {
- v.data.push({
- x: a.XValue,
- y: a.YValue,
- dataLabels: {
- enabled: a.IsShow,
- allowOverlap: !0,
- align: "left",
- format: a.Name,
- formatZh: a.Name,
- formatEn: a.NameEn
- }
- });
- }), O.push(v), M.ShowTrendLine) {
- let c = {
- data: M.TrendLimitData.map((p, i) => i === M.TrendLimitData.length - 1 ? {
- x: p.X,
- y: p.Y,
- dataLabels: {
- enabled: M.ShowRSquare || M.ShowFitEquation,
- align: "left",
- color: M.Color,
- x: 20,
- y: 30,
- zIndex: 9,
- allowOverlap: !0,
- formatter: function() {
- let h = "";
- return M.ShowRSquare && M.ShowFitEquation ? h = `<span>${M.TrendLine}</span><br><span>R²=${M.RSquare}</span>` : M.ShowRSquare && !M.ShowFitEquation ? h = `<span>R²=${M.RSquare}</span>` : M.ShowFitEquation && !M.ShowRSquare && (h = `<span>${M.TrendLine}</span>`), h;
- }
- }
- } : {
- x: p.X,
- y: p.Y
- }),
- type: "spline",
- linkedTo: ":previous",
- color: M.Color,
- lineWidth: 1,
- chartType: "linear",
- enableMouseTracking: !1,
- dashStyle: "Dash",
- zIndex: 2,
- visible: !0,
- marker: {
- enabled: !1
- }
- };
- O.push(c);
- }
- }), {
- title: {
- text: ""
- },
- series: O,
- yAxis: [f],
- xAxis: E,
- tooltip: {
- formatter: function() {
- let S = l.find((v) => v.Name === this.series.name).EdbInfoList.find((v) => v.XValue === this.x && v.YValue === this.y), w = `<b>${S.Name}</b>`;
- return w += `<br><span style="color:${this.color}">●</span>${S.XName}: ${this.x} ${S.XDate}<br>`, w += `<span style="color:${this.color}">●</span>${S.YName}: ${this.y} (${S.YDate})`, w;
- },
- formatterCh: function() {
- let S = l.find((v) => v.Name === this.series.name).EdbInfoList.find((v) => v.XValue === this.x && v.YValue === this.y), w = `<b>${S.Name}</b>`;
- return w += `<br><span style="color:${this.color}">●</span>${S.XName}: ${this.x} ${S.XDate}<br>`, w += `<span style="color:${this.color}">●</span>${S.YName}: ${this.y} (${S.YDate})`, w;
- },
- formatterEn: function() {
- let S = l.find((v) => v.NameEn === this.series.name).EdbInfoList.find((v) => v.XValue === this.x && v.YValue === this.y), w = `<b>${S.NameEn}</b>`;
- return w += `<br><span style="color:${this.color}">●</span>${S.XNameEn}: ${this.x} ${S.XDate}<br>`, w += `<span style="color:${this.color}">●</span>${S.YNameEn}: ${this.y} ${S.YDate}`, w;
- }
- }
- };
- }
- function oC({ DataResp: r, EdbInfoList: d, ChartInfo: T }) {
- kt.leftIndex = -1, kt.rightIndex = -1, kt.rightTwoIndex = -1;
- const l = T.ChartThemeStyle ? JSON.parse(T.ChartThemeStyle) : null, { DataList: y, XName: j, YName: I, XNameEn: Z, YNameEn: H, XMaxValue: U, XMinValue: F, YMaxValue: R, YMinValue: N } = r, { leftMin: b, leftMax: x, xMin: u, xMax: f } = kt;
- let E = {
- ...mr,
- title: {
- text: I,
- textCh: I,
- // 中文
- textEn: H || I,
- align: "middle",
- style: {
- ...l && l.xAxisOptions.style
- }
- },
- labels: {
- style: {
- ...l && l.xAxisOptions.style
- }
- },
- opposite: !1,
- reversed: !1,
- min: Number(b),
- max: Number(x),
- tickWidth: 1
- }, O = {
- ...Cn,
- title: {
- text: j,
- textCh: j,
- // 中文
- textEn: Z || j,
- align: "middle",
- style: {
- ...l && l.xAxisOptions.style
- }
- },
- labels: {
- style: {
- ...l && l.xAxisOptions.style
- }
- },
- min: Number(u),
- max: Number(f)
- }, B = [];
- const M = {
- //标签对应文字
- 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((a) => {
- v.data.push({
- x: a.X,
- y: a.Y,
- dataLabels: {
- enabled: a.ShowTips === 1,
- allowOverlap: !0,
- align: "left",
- format: M[a.DateType] || `-${a.DaysAgo}D`
- }
- });
- }), B.push(v);
- }), {
- title: {
- text: ""
- },
- series: B,
- yAxis: [E],
- 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), a = d.find((i) => i.EdbInfoId === v.XEdbInfoId), c = d.find((i) => i.EdbInfoId === v.YEdbInfoId), p = `<b>${this.series.name}</b>`;
- return p += `<br><span style="color:${this.color}">●</span>${a.EdbName}: ${this.x} ${v.XDate}<br>`, p += `<span style="color:${this.color}">●</span>${c.EdbName}: ${this.y} ${v.YDate}`, p;
- },
- formatterCh: function() {
- let v = y.find((i) => i.Name === this.series.name).CoordinatePointData.find((i) => i.X === this.x && i.Y === this.y), a = d.find((i) => i.EdbInfoId === v.XEdbInfoId), c = d.find((i) => i.EdbInfoId === v.YEdbInfoId), p = `<b>${this.series.name}</b>`;
- return p += `<br><span style="color:${this.color}">●</span>${a.EdbName}: ${this.x} ${v.XDate}<br>`, p += `<span style="color:${this.color}">●</span>${c.EdbName}: ${this.y} ${v.YDate}`, p;
- },
- formatterEn: function() {
- let v = y.find((i) => i.NameEn === this.series.name).CoordinatePointData.find((i) => i.X === this.x && i.Y === this.y), a = d.find((i) => i.EdbInfoId === v.XEdbInfoId), c = d.find((i) => i.EdbInfoId === v.YEdbInfoId), p = `<b>${this.series.name}</b>`;
- return p += `<br><span style="color:${this.color}">●</span>${a.EdbNameEn}: ${this.x} ${v.XDate}<br>`, p += `<span style="color:${this.color}">●</span>${c.EdbNameEn}: ${this.y} ${v.YDate}`, p;
- }
- }
- };
- }
- function sC({ DataResp: r, EdbInfoList: d, ChartInfo: T }) {
- kt.leftIndex = -1, kt.rightIndex = -1, kt.rightTwoIndex = -1;
- const { YDataList: l, XEdbIdValue: y } = r;
- let j = d.filter((F) => y.includes(F.EdbInfoId));
- kt.hasLeftAxis = !0, kt.leftMin = Number(T.LeftMin), kt.leftMax = Number(T.LeftMax);
- const I = T.ChartThemeStyle ? JSON.parse(T.ChartThemeStyle) : null;
- let Z = {
- lineWidth: 0,
- tickLength: 0,
- tickmarkPlacement: "on",
- categories: j.map((F) => F.EdbAliasName || F.EdbName),
- labels: {
- allowOverlap: !0,
- autoRotationLimit: 40,
- style: {
- ...I && I.xAxisOptions.style
- }
- }
- }, H = [{
- gridLineInterpolation: "polygon",
- gridLineWidth: 1,
- lineWidth: 0,
- endOnTick: !1,
- startOnTick: !1,
- showLastLabel: !0,
- // tickAmount:4,
- title: {
- text: T.Unit,
- textCh: T.Unit,
- textEn: T.UnitEn,
- align: "high",
- rotation: 0,
- y: 5,
- x: 10,
- textAlign: "left",
- reserveSpace: !1,
- style: {
- ...I && I.yAxisOptions.style
- }
- },
- labels: {
- allowOverlap: !0,
- style: {
- ...I && I.yAxisOptions.style
- }
- },
- min: Number(T.LeftMin),
- max: Number(T.LeftMax)
- }], U = [];
- return l.forEach((F, R) => {
- const N = I ? R % I.lineOptionList.length : R;
- let b = {
- name: F.Name || F.Date,
- nameZh: F.Name || F.Date,
- nameEn: F.Date,
- data: F.Value,
- pointPlacement: "on",
- type: I && I.lineOptionList[N].lineType || "line",
- dashStyle: I && I.lineOptionList[N].dashStyle || "Solid",
- yAxis: 0,
- color: F.Color,
- lineWidth: I && I.lineOptionList[N].lineWidth || 1,
- chartType: "linear"
- };
- U.push(b);
- }), {
- chart: {
- ...ms.chart,
- ...I == null ? void 0 : I.drawOption,
- spacing: [2, 10, 2, 10],
- polar: !0
- },
- title: {
- text: ""
- },
- pane: {
- size: "85%"
- },
- series: U,
- yAxis: H,
- xAxis: Z
- };
- }
- function ss(r = "rgba(51, 51, 51, 1)") {
- const d = r.match(/(\d(\.\d+)?)+/g) || ["", "", "", 1];
- return parseFloat(d[3] || 1);
- }
- function aC(r = [], d, T = {}) {
- if (d.ChartType === 5) {
- r[1] && (kt.leftMin = r[1].MinData, kt.leftMax = r[1].MaxData);
- return;
- }
- const l = r.filter((I) => I.IsAxis === 1).map((I) => [Number(I.MinData), Number(I.MaxData)]), y = r.filter((I) => !I.IsAxis).map((I) => [Number(I.MinData), Number(I.MaxData)]), j = r.filter((I) => I.IsAxis === 2).map((I) => [Number(I.MinData), Number(I.MaxData)]);
- if (l.length) {
- const {
- Max: I,
- Min: Z
- } = Sn(l.flat());
- kt.leftMin = Z, kt.leftMax = I;
- }
- if (y.length) {
- const {
- Max: I,
- Min: Z
- } = Sn(y.flat());
- kt.rightMin = Z, kt.rightMax = I;
- }
- if (j.length) {
- const {
- Max: I,
- Min: Z
- } = Sn(j.flat());
- kt.rightTwoMin = Z, kt.rightTwoMax = I;
- }
- d.ChartType === 2 && T.RightAxis && T.RightAxis.IsAdd && T.RightAxis.IsShow && (T.RightAxis.IndicatorType === 1 ? (kt.rightMin = T.RightAxis.EdbInfoList[0].MinData || 0, kt.rightMax = T.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 lC({ EdbInfoList: r, ChartInfo: d, DataResp: T }) {
- const {
- //左右轴极值字段
- LeftMin: l = 0,
- LeftMax: y = 0,
- RightMin: j = 0,
- RightMax: I = 0,
- Right2Min: Z = 0,
- Right2Max: H = 0,
- MinMaxSave: U
- } = d;
- U ? (kt.leftMin = Number(l), kt.leftMax = Number(y), kt.rightMin = Number(j), kt.rightMax = Number(I), kt.rightTwoMin = Number(Z), kt.rightTwoMax = Number(H), hC(r, d), console.log("check", kt.leftMin, kt.leftMax)) : aC(r, d, T || {});
- }
- function hC(r = [], d) {
- if (d.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 T = r.filter((l) => l.IsAxis === 1).map((l) => [Number(l.MinData), Number(l.MaxData)]);
- if (T.length) {
- const { Max: l, Min: y } = Sn(T.flat());
- kt.leftMin = y, kt.leftMax = l;
- }
- }
- if (Number(kt.rightMin) === 0 && Number(kt.rightMax) === 0) {
- const T = r.filter((l) => !l.IsAxis).map((l) => [Number(l.MinData), Number(l.MaxData)]);
- if (T.length) {
- const { Max: l, Min: y } = Sn(T.flat());
- kt.rightMin = y, kt.rightMax = l;
- }
- }
- if (Number(kt.rightTwoMin) === 0 && Number(kt.rightTwoMax) === 0) {
- const T = r.filter((l) => l.IsAxis === 2).map((l) => [Number(l.MinData), Number(l.MaxData)]);
- if (T.length) {
- const { Max: l, Min: y } = Sn(T.flat());
- kt.rightTwoMin = y, kt.rightTwoMax = l;
- }
- }
- }
- function Vu(r, d) {
- return function() {
- return r.apply(d, arguments);
- };
- }
- const { toString: cC } = Object.prototype, { getPrototypeOf: Vl } = Object, js = ((r) => (d) => {
- const T = cC.call(d);
- return r[T] || (r[T] = T.slice(8, -1).toLowerCase());
- })(/* @__PURE__ */ Object.create(null)), Ji = (r) => (r = r.toLowerCase(), (d) => js(d) === r), Ws = (r) => (d) => typeof d === r, { isArray: Tn } = Array, oo = Ws("undefined");
- function pC(r) {
- return r !== null && !oo(r) && r.constructor !== null && !oo(r.constructor) && Pi(r.constructor.isBuffer) && r.constructor.isBuffer(r);
- }
- const $u = Ji("ArrayBuffer");
- function uC(r) {
- let d;
- return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? d = ArrayBuffer.isView(r) : d = r && r.buffer && $u(r.buffer), d;
- }
- const dC = Ws("string"), Pi = Ws("function"), Zu = Ws("number"), zs = (r) => r !== null && typeof r == "object", fC = (r) => r === !0 || r === !1, ps = (r) => {
- if (js(r) !== "object")
- return !1;
- const d = Vl(r);
- return (d === null || d === Object.prototype || Object.getPrototypeOf(d) === null) && !(Symbol.toStringTag in r) && !(Symbol.iterator in r);
- }, gC = Ji("Date"), mC = Ji("File"), yC = Ji("Blob"), vC = Ji("FileList"), xC = (r) => zs(r) && Pi(r.pipe), bC = (r) => {
- let d;
- return r && (typeof FormData == "function" && r instanceof FormData || Pi(r.append) && ((d = js(r)) === "formdata" || // detect form-data instance
- d === "object" && Pi(r.toString) && r.toString() === "[object FormData]"));
- }, SC = Ji("URLSearchParams"), wC = (r) => r.trim ? r.trim() : r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
- function co(r, d, { allOwnKeys: T = !1 } = {}) {
- if (r === null || typeof r > "u")
- return;
- let l, y;
- if (typeof r != "object" && (r = [r]), Tn(r))
- for (l = 0, y = r.length; l < y; l++)
- d.call(null, r[l], l, r);
- else {
- const j = T ? Object.getOwnPropertyNames(r) : Object.keys(r), I = j.length;
- let Z;
- for (l = 0; l < I; l++)
- Z = j[l], d.call(null, r[Z], Z, r);
- }
- }
- function Ku(r, d) {
- d = d.toLowerCase();
- const T = Object.keys(r);
- let l = T.length, y;
- for (; l-- > 0; )
- if (y = T[l], d === y.toLowerCase())
- return y;
- return null;
- }
- const Ju = (() => typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global)(), qu = (r) => !oo(r) && r !== Ju;
- function Sl() {
- const { caseless: r } = qu(this) && this || {}, d = {}, T = (l, y) => {
- const j = r && Ku(d, y) || y;
- ps(d[j]) && ps(l) ? d[j] = Sl(d[j], l) : ps(l) ? d[j] = Sl({}, l) : Tn(l) ? d[j] = l.slice() : d[j] = l;
- };
- for (let l = 0, y = arguments.length; l < y; l++)
- arguments[l] && co(arguments[l], T);
- return d;
- }
- const CC = (r, d, T, { allOwnKeys: l } = {}) => (co(d, (y, j) => {
- T && Pi(y) ? r[j] = Vu(y, T) : r[j] = y;
- }, { allOwnKeys: l }), r), MC = (r) => (r.charCodeAt(0) === 65279 && (r = r.slice(1)), r), kC = (r, d, T, l) => {
- r.prototype = Object.create(d.prototype, l), r.prototype.constructor = r, Object.defineProperty(r, "super", {
- value: d.prototype
- }), T && Object.assign(r.prototype, T);
- }, AC = (r, d, T, l) => {
- let y, j, I;
- const Z = {};
- if (d = d || {}, r == null)
- return d;
- do {
- for (y = Object.getOwnPropertyNames(r), j = y.length; j-- > 0; )
- I = y[j], (!l || l(I, r, d)) && !Z[I] && (d[I] = r[I], Z[I] = !0);
- r = T !== !1 && Vl(r);
- } while (r && (!T || T(r, d)) && r !== Object.prototype);
- return d;
- }, TC = (r, d, T) => {
- r = String(r), (T === void 0 || T > r.length) && (T = r.length), T -= d.length;
- const l = r.indexOf(d, T);
- return l !== -1 && l === T;
- }, PC = (r) => {
- if (!r)
- return null;
- if (Tn(r))
- return r;
- let d = r.length;
- if (!Zu(d))
- return null;
- const T = new Array(d);
- for (; d-- > 0; )
- T[d] = r[d];
- return T;
- }, EC = ((r) => (d) => r && d instanceof r)(typeof Uint8Array < "u" && Vl(Uint8Array)), OC = (r, d) => {
- const l = (r && r[Symbol.iterator]).call(r);
- let y;
- for (; (y = l.next()) && !y.done; ) {
- const j = y.value;
- d.call(r, j[0], j[1]);
- }
- }, LC = (r, d) => {
- let T;
- const l = [];
- for (; (T = r.exec(d)) !== null; )
- l.push(T);
- return l;
- }, _C = Ji("HTMLFormElement"), DC = (r) => r.toLowerCase().replace(
- /[-_\s]([a-z\d])(\w*)/g,
- function(T, l, y) {
- return l.toUpperCase() + y;
- }
- ), _p = (({ hasOwnProperty: r }) => (d, T) => r.call(d, T))(Object.prototype), IC = Ji("RegExp"), Qu = (r, d) => {
- const T = Object.getOwnPropertyDescriptors(r), l = {};
- co(T, (y, j) => {
- d(y, j, r) !== !1 && (l[j] = y);
- }), Object.defineProperties(r, l);
- }, RC = (r) => {
- Qu(r, (d, T) => {
- if (Pi(r) && ["arguments", "caller", "callee"].indexOf(T) !== -1)
- return !1;
- const l = r[T];
- if (Pi(l)) {
- if (d.enumerable = !1, "writable" in d) {
- d.writable = !1;
- return;
- }
- d.set || (d.set = () => {
- throw Error("Can not rewrite read-only method '" + T + "'");
- });
- }
- });
- }, NC = (r, d) => {
- const T = {}, l = (y) => {
- y.forEach((j) => {
- T[j] = !0;
- });
- };
- return Tn(r) ? l(r) : l(String(r).split(d)), T;
- }, BC = () => {
- }, jC = (r, d) => (r = +r, Number.isFinite(r) ? r : d), cl = "abcdefghijklmnopqrstuvwxyz", Dp = "0123456789", td = {
- DIGIT: Dp,
- ALPHA: cl,
- ALPHA_DIGIT: cl + cl.toUpperCase() + Dp
- }, WC = (r = 16, d = td.ALPHA_DIGIT) => {
- let T = "";
- const { length: l } = d;
- for (; r--; )
- T += d[Math.random() * l | 0];
- return T;
- };
- function zC(r) {
- return !!(r && Pi(r.append) && r[Symbol.toStringTag] === "FormData" && r[Symbol.iterator]);
- }
- const YC = (r) => {
- const d = new Array(10), T = (l, y) => {
- if (zs(l)) {
- if (d.indexOf(l) >= 0)
- return;
- if (!("toJSON" in l)) {
- d[y] = l;
- const j = Tn(l) ? [] : {};
- return co(l, (I, Z) => {
- const H = T(I, y + 1);
- !oo(H) && (j[Z] = H);
- }), d[y] = void 0, j;
- }
- }
- return l;
- };
- return T(r, 0);
- }, XC = Ji("AsyncFunction"), GC = (r) => r && (zs(r) || Pi(r)) && Pi(r.then) && Pi(r.catch), _t = {
- isArray: Tn,
- isArrayBuffer: $u,
- isBuffer: pC,
- isFormData: bC,
- isArrayBufferView: uC,
- isString: dC,
- isNumber: Zu,
- isBoolean: fC,
- isObject: zs,
- isPlainObject: ps,
- isUndefined: oo,
- isDate: gC,
- isFile: mC,
- isBlob: yC,
- isRegExp: IC,
- isFunction: Pi,
- isStream: xC,
- isURLSearchParams: SC,
- isTypedArray: EC,
- isFileList: vC,
- forEach: co,
- merge: Sl,
- extend: CC,
- trim: wC,
- stripBOM: MC,
- inherits: kC,
- toFlatObject: AC,
- kindOf: js,
- kindOfTest: Ji,
- endsWith: TC,
- toArray: PC,
- forEachEntry: OC,
- matchAll: LC,
- isHTMLForm: _C,
- hasOwnProperty: _p,
- hasOwnProp: _p,
- // an alias to avoid ESLint no-prototype-builtins detection
- reduceDescriptors: Qu,
- freezeMethods: RC,
- toObjectSet: NC,
- toCamelCase: DC,
- noop: BC,
- toFiniteNumber: jC,
- findKey: Ku,
- global: Ju,
- isContextDefined: qu,
- ALPHABET: td,
- generateString: WC,
- isSpecCompliantForm: zC,
- toJSONObject: YC,
- isAsyncFn: XC,
- isThenable: GC
- };
- function fe(r, d, T, l, y) {
- Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = r, this.name = "AxiosError", d && (this.code = d), T && (this.config = T), l && (this.request = l), y && (this.response = y);
- }
- _t.inherits(fe, 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: _t.toJSONObject(this.config),
- code: this.code,
- status: this.response && this.response.status ? this.response.status : null
- };
- }
- });
- const ed = fe.prototype, id = {};
- [
- "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) => {
- id[r] = { value: r };
- });
- Object.defineProperties(fe, id);
- Object.defineProperty(ed, "isAxiosError", { value: !0 });
- fe.from = (r, d, T, l, y, j) => {
- const I = Object.create(ed);
- return _t.toFlatObject(r, I, function(H) {
- return H !== Error.prototype;
- }, (Z) => Z !== "isAxiosError"), fe.call(I, r.message, d, T, l, y), I.cause = r, I.name = r.name, j && Object.assign(I, j), I;
- };
- const HC = null;
- function wl(r) {
- return _t.isPlainObject(r) || _t.isArray(r);
- }
- function rd(r) {
- return _t.endsWith(r, "[]") ? r.slice(0, -2) : r;
- }
- function Ip(r, d, T) {
- return r ? r.concat(d).map(function(y, j) {
- return y = rd(y), !T && j ? "[" + y + "]" : y;
- }).join(T ? "." : "") : d;
- }
- function FC(r) {
- return _t.isArray(r) && !r.some(wl);
- }
- const UC = _t.toFlatObject(_t, {}, null, function(d) {
- return /^is[A-Z]/.test(d);
- });
- function Ys(r, d, T) {
- if (!_t.isObject(r))
- throw new TypeError("target must be an object");
- d = d || new FormData(), T = _t.toFlatObject(T, {
- metaTokens: !0,
- dots: !1,
- indexes: !1
- }, !1, function(u, f) {
- return !_t.isUndefined(f[u]);
- });
- const l = T.metaTokens, y = T.visitor || F, j = T.dots, I = T.indexes, H = (T.Blob || typeof Blob < "u" && Blob) && _t.isSpecCompliantForm(d);
- if (!_t.isFunction(y))
- throw new TypeError("visitor must be a function");
- function U(x) {
- if (x === null)
- return "";
- if (_t.isDate(x))
- return x.toISOString();
- if (!H && _t.isBlob(x))
- throw new fe("Blob is not supported. Use a Buffer instead.");
- return _t.isArrayBuffer(x) || _t.isTypedArray(x) ? H && typeof Blob == "function" ? new Blob([x]) : Buffer.from(x) : x;
- }
- function F(x, u, f) {
- let E = x;
- if (x && !f && typeof x == "object") {
- if (_t.endsWith(u, "{}"))
- u = l ? u : u.slice(0, -2), x = JSON.stringify(x);
- else if (_t.isArray(x) && FC(x) || (_t.isFileList(x) || _t.endsWith(u, "[]")) && (E = _t.toArray(x)))
- return u = rd(u), E.forEach(function(B, M) {
- !(_t.isUndefined(B) || B === null) && d.append(
- // eslint-disable-next-line no-nested-ternary
- I === !0 ? Ip([u], M, j) : I === null ? u : u + "[]",
- U(B)
- );
- }), !1;
- }
- return wl(x) ? !0 : (d.append(Ip(f, u, j), U(x)), !1);
- }
- const R = [], N = Object.assign(UC, {
- defaultVisitor: F,
- convertValue: U,
- isVisitable: wl
- });
- function b(x, u) {
- if (!_t.isUndefined(x)) {
- if (R.indexOf(x) !== -1)
- throw Error("Circular reference detected in " + u.join("."));
- R.push(x), _t.forEach(x, function(E, O) {
- (!(_t.isUndefined(E) || E === null) && y.call(
- d,
- E,
- _t.isString(O) ? O.trim() : O,
- u,
- N
- )) === !0 && b(E, u ? u.concat(O) : [O]);
- }), R.pop();
- }
- }
- if (!_t.isObject(r))
- throw new TypeError("data must be an object");
- return b(r), d;
- }
- function Rp(r) {
- const d = {
- "!": "%21",
- "'": "%27",
- "(": "%28",
- ")": "%29",
- "~": "%7E",
- "%20": "+",
- "%00": "\0"
- };
- return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g, function(l) {
- return d[l];
- });
- }
- function $l(r, d) {
- this._pairs = [], r && Ys(r, this, d);
- }
- const nd = $l.prototype;
- nd.append = function(d, T) {
- this._pairs.push([d, T]);
- };
- nd.toString = function(d) {
- const T = d ? function(l) {
- return d.call(this, l, Rp);
- } : Rp;
- return this._pairs.map(function(y) {
- return T(y[0]) + "=" + T(y[1]);
- }, "").join("&");
- };
- function VC(r) {
- return encodeURIComponent(r).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
- }
- function od(r, d, T) {
- if (!d)
- return r;
- const l = T && T.encode || VC, y = T && T.serialize;
- let j;
- if (y ? j = y(d, T) : j = _t.isURLSearchParams(d) ? d.toString() : new $l(d, T).toString(l), j) {
- const I = r.indexOf("#");
- I !== -1 && (r = r.slice(0, I)), r += (r.indexOf("?") === -1 ? "?" : "&") + j;
- }
- return r;
- }
- class $C {
- 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(d, T, l) {
- return this.handlers.push({
- fulfilled: d,
- rejected: T,
- synchronous: l ? l.synchronous : !1,
- runWhen: l ? l.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(d) {
- this.handlers[d] && (this.handlers[d] = 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(d) {
- _t.forEach(this.handlers, function(l) {
- l !== null && d(l);
- });
- }
- }
- const Np = $C, sd = {
- silentJSONParsing: !0,
- forcedJSONParsing: !0,
- clarifyTimeoutError: !1
- }, ZC = typeof URLSearchParams < "u" ? URLSearchParams : $l, KC = typeof FormData < "u" ? FormData : null, JC = typeof Blob < "u" ? Blob : null, qC = (() => {
- let r;
- return typeof navigator < "u" && ((r = navigator.product) === "ReactNative" || r === "NativeScript" || r === "NS") ? !1 : typeof window < "u" && typeof document < "u";
- })(), QC = (() => typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
- self instanceof WorkerGlobalScope && typeof self.importScripts == "function")(), Vi = {
- isBrowser: !0,
- classes: {
- URLSearchParams: ZC,
- FormData: KC,
- Blob: JC
- },
- isStandardBrowserEnv: qC,
- isStandardBrowserWebWorkerEnv: QC,
- protocols: ["http", "https", "file", "blob", "url", "data"]
- };
- function tM(r, d) {
- return Ys(r, new Vi.classes.URLSearchParams(), Object.assign({
- visitor: function(T, l, y, j) {
- return Vi.isNode && _t.isBuffer(T) ? (this.append(l, T.toString("base64")), !1) : j.defaultVisitor.apply(this, arguments);
- }
- }, d));
- }
- function eM(r) {
- return _t.matchAll(/\w+|\[(\w*)]/g, r).map((d) => d[0] === "[]" ? "" : d[1] || d[0]);
- }
- function iM(r) {
- const d = {}, T = Object.keys(r);
- let l;
- const y = T.length;
- let j;
- for (l = 0; l < y; l++)
- j = T[l], d[j] = r[j];
- return d;
- }
- function ad(r) {
- function d(T, l, y, j) {
- let I = T[j++];
- const Z = Number.isFinite(+I), H = j >= T.length;
- return I = !I && _t.isArray(y) ? y.length : I, H ? (_t.hasOwnProp(y, I) ? y[I] = [y[I], l] : y[I] = l, !Z) : ((!y[I] || !_t.isObject(y[I])) && (y[I] = []), d(T, l, y[I], j) && _t.isArray(y[I]) && (y[I] = iM(y[I])), !Z);
- }
- if (_t.isFormData(r) && _t.isFunction(r.entries)) {
- const T = {};
- return _t.forEachEntry(r, (l, y) => {
- d(eM(l), y, T, 0);
- }), T;
- }
- return null;
- }
- const rM = {
- "Content-Type": void 0
- };
- function nM(r, d, T) {
- if (_t.isString(r))
- try {
- return (d || JSON.parse)(r), _t.trim(r);
- } catch (l) {
- if (l.name !== "SyntaxError")
- throw l;
- }
- return (T || JSON.stringify)(r);
- }
- const Xs = {
- transitional: sd,
- adapter: ["xhr", "http"],
- transformRequest: [function(d, T) {
- const l = T.getContentType() || "", y = l.indexOf("application/json") > -1, j = _t.isObject(d);
- if (j && _t.isHTMLForm(d) && (d = new FormData(d)), _t.isFormData(d))
- return y && y ? JSON.stringify(ad(d)) : d;
- if (_t.isArrayBuffer(d) || _t.isBuffer(d) || _t.isStream(d) || _t.isFile(d) || _t.isBlob(d))
- return d;
- if (_t.isArrayBufferView(d))
- return d.buffer;
- if (_t.isURLSearchParams(d))
- return T.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), d.toString();
- let Z;
- if (j) {
- if (l.indexOf("application/x-www-form-urlencoded") > -1)
- return tM(d, this.formSerializer).toString();
- if ((Z = _t.isFileList(d)) || l.indexOf("multipart/form-data") > -1) {
- const H = this.env && this.env.FormData;
- return Ys(
- Z ? { "files[]": d } : d,
- H && new H(),
- this.formSerializer
- );
- }
- }
- return j || y ? (T.setContentType("application/json", !1), nM(d)) : d;
- }],
- transformResponse: [function(d) {
- const T = this.transitional || Xs.transitional, l = T && T.forcedJSONParsing, y = this.responseType === "json";
- if (d && _t.isString(d) && (l && !this.responseType || y)) {
- const I = !(T && T.silentJSONParsing) && y;
- try {
- return JSON.parse(d);
- } catch (Z) {
- if (I)
- throw Z.name === "SyntaxError" ? fe.from(Z, fe.ERR_BAD_RESPONSE, this, null, this.response) : Z;
- }
- }
- return d;
- }],
- /**
- * 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: Vi.classes.FormData,
- Blob: Vi.classes.Blob
- },
- validateStatus: function(d) {
- return d >= 200 && d < 300;
- },
- headers: {
- common: {
- Accept: "application/json, text/plain, */*"
- }
- }
- };
- _t.forEach(["delete", "get", "head"], function(d) {
- Xs.headers[d] = {};
- });
- _t.forEach(["post", "put", "patch"], function(d) {
- Xs.headers[d] = _t.merge(rM);
- });
- const Zl = Xs, oM = _t.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"
- ]), sM = (r) => {
- const d = {};
- let T, l, y;
- return r && r.split(`
- `).forEach(function(I) {
- y = I.indexOf(":"), T = I.substring(0, y).trim().toLowerCase(), l = I.substring(y + 1).trim(), !(!T || d[T] && oM[T]) && (T === "set-cookie" ? d[T] ? d[T].push(l) : d[T] = [l] : d[T] = d[T] ? d[T] + ", " + l : l);
- }), d;
- }, Bp = Symbol("internals");
- function Kn(r) {
- return r && String(r).trim().toLowerCase();
- }
- function us(r) {
- return r === !1 || r == null ? r : _t.isArray(r) ? r.map(us) : String(r);
- }
- function aM(r) {
- const d = /* @__PURE__ */ Object.create(null), T = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
- let l;
- for (; l = T.exec(r); )
- d[l[1]] = l[2];
- return d;
- }
- const lM = (r) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(r.trim());
- function pl(r, d, T, l, y) {
- if (_t.isFunction(l))
- return l.call(this, d, T);
- if (y && (d = T), !!_t.isString(d)) {
- if (_t.isString(l))
- return d.indexOf(l) !== -1;
- if (_t.isRegExp(l))
- return l.test(d);
- }
- }
- function hM(r) {
- return r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (d, T, l) => T.toUpperCase() + l);
- }
- function cM(r, d) {
- const T = _t.toCamelCase(" " + d);
- ["get", "set", "has"].forEach((l) => {
- Object.defineProperty(r, l + T, {
- value: function(y, j, I) {
- return this[l].call(this, d, y, j, I);
- },
- configurable: !0
- });
- });
- }
- class Gs {
- constructor(d) {
- d && this.set(d);
- }
- set(d, T, l) {
- const y = this;
- function j(Z, H, U) {
- const F = Kn(H);
- if (!F)
- throw new Error("header name must be a non-empty string");
- const R = _t.findKey(y, F);
- (!R || y[R] === void 0 || U === !0 || U === void 0 && y[R] !== !1) && (y[R || H] = us(Z));
- }
- const I = (Z, H) => _t.forEach(Z, (U, F) => j(U, F, H));
- return _t.isPlainObject(d) || d instanceof this.constructor ? I(d, T) : _t.isString(d) && (d = d.trim()) && !lM(d) ? I(sM(d), T) : d != null && j(T, d, l), this;
- }
- get(d, T) {
- if (d = Kn(d), d) {
- const l = _t.findKey(this, d);
- if (l) {
- const y = this[l];
- if (!T)
- return y;
- if (T === !0)
- return aM(y);
- if (_t.isFunction(T))
- return T.call(this, y, l);
- if (_t.isRegExp(T))
- return T.exec(y);
- throw new TypeError("parser must be boolean|regexp|function");
- }
- }
- }
- has(d, T) {
- if (d = Kn(d), d) {
- const l = _t.findKey(this, d);
- return !!(l && this[l] !== void 0 && (!T || pl(this, this[l], l, T)));
- }
- return !1;
- }
- delete(d, T) {
- const l = this;
- let y = !1;
- function j(I) {
- if (I = Kn(I), I) {
- const Z = _t.findKey(l, I);
- Z && (!T || pl(l, l[Z], Z, T)) && (delete l[Z], y = !0);
- }
- }
- return _t.isArray(d) ? d.forEach(j) : j(d), y;
- }
- clear(d) {
- const T = Object.keys(this);
- let l = T.length, y = !1;
- for (; l--; ) {
- const j = T[l];
- (!d || pl(this, this[j], j, d, !0)) && (delete this[j], y = !0);
- }
- return y;
- }
- normalize(d) {
- const T = this, l = {};
- return _t.forEach(this, (y, j) => {
- const I = _t.findKey(l, j);
- if (I) {
- T[I] = us(y), delete T[j];
- return;
- }
- const Z = d ? hM(j) : String(j).trim();
- Z !== j && delete T[j], T[Z] = us(y), l[Z] = !0;
- }), this;
- }
- concat(...d) {
- return this.constructor.concat(this, ...d);
- }
- toJSON(d) {
- const T = /* @__PURE__ */ Object.create(null);
- return _t.forEach(this, (l, y) => {
- l != null && l !== !1 && (T[y] = d && _t.isArray(l) ? l.join(", ") : l);
- }), T;
- }
- [Symbol.iterator]() {
- return Object.entries(this.toJSON())[Symbol.iterator]();
- }
- toString() {
- return Object.entries(this.toJSON()).map(([d, T]) => d + ": " + T).join(`
- `);
- }
- get [Symbol.toStringTag]() {
- return "AxiosHeaders";
- }
- static from(d) {
- return d instanceof this ? d : new this(d);
- }
- static concat(d, ...T) {
- const l = new this(d);
- return T.forEach((y) => l.set(y)), l;
- }
- static accessor(d) {
- const l = (this[Bp] = this[Bp] = {
- accessors: {}
- }).accessors, y = this.prototype;
- function j(I) {
- const Z = Kn(I);
- l[Z] || (cM(y, I), l[Z] = !0);
- }
- return _t.isArray(d) ? d.forEach(j) : j(d), this;
- }
- }
- Gs.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
- _t.freezeMethods(Gs.prototype);
- _t.freezeMethods(Gs);
- const fr = Gs;
- function ul(r, d) {
- const T = this || Zl, l = d || T, y = fr.from(l.headers);
- let j = l.data;
- return _t.forEach(r, function(Z) {
- j = Z.call(T, j, y.normalize(), d ? d.status : void 0);
- }), y.normalize(), j;
- }
- function ld(r) {
- return !!(r && r.__CANCEL__);
- }
- function po(r, d, T) {
- fe.call(this, r ?? "canceled", fe.ERR_CANCELED, d, T), this.name = "CanceledError";
- }
- _t.inherits(po, fe, {
- __CANCEL__: !0
- });
- function pM(r, d, T) {
- const l = T.config.validateStatus;
- !T.status || !l || l(T.status) ? r(T) : d(new fe(
- "Request failed with status code " + T.status,
- [fe.ERR_BAD_REQUEST, fe.ERR_BAD_RESPONSE][Math.floor(T.status / 100) - 4],
- T.config,
- T.request,
- T
- ));
- }
- const uM = Vi.isStandardBrowserEnv ? (
- // Standard browser envs support document.cookie
- function() {
- return {
- write: function(T, l, y, j, I, Z) {
- const H = [];
- H.push(T + "=" + encodeURIComponent(l)), _t.isNumber(y) && H.push("expires=" + new Date(y).toGMTString()), _t.isString(j) && H.push("path=" + j), _t.isString(I) && H.push("domain=" + I), Z === !0 && H.push("secure"), document.cookie = H.join("; ");
- },
- read: function(T) {
- const l = document.cookie.match(new RegExp("(^|;\\s*)(" + T + ")=([^;]*)"));
- return l ? decodeURIComponent(l[3]) : null;
- },
- remove: function(T) {
- this.write(T, "", Date.now() - 864e5);
- }
- };
- }()
- ) : (
- // Non standard browser env (web workers, react-native) lack needed support.
- function() {
- return {
- write: function() {
- },
- read: function() {
- return null;
- },
- remove: function() {
- }
- };
- }()
- );
- function dM(r) {
- return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(r);
- }
- function fM(r, d) {
- return d ? r.replace(/\/+$/, "") + "/" + d.replace(/^\/+/, "") : r;
- }
- function hd(r, d) {
- return r && !dM(d) ? fM(r, d) : d;
- }
- const gM = Vi.isStandardBrowserEnv ? (
- // Standard browser envs have full support of the APIs needed to test
- // whether the request URL is of the same origin as current location.
- function() {
- const d = /(msie|trident)/i.test(navigator.userAgent), T = document.createElement("a");
- let l;
- function y(j) {
- let I = j;
- return d && (T.setAttribute("href", I), I = T.href), T.setAttribute("href", I), {
- href: T.href,
- protocol: T.protocol ? T.protocol.replace(/:$/, "") : "",
- host: T.host,
- search: T.search ? T.search.replace(/^\?/, "") : "",
- hash: T.hash ? T.hash.replace(/^#/, "") : "",
- hostname: T.hostname,
- port: T.port,
- pathname: T.pathname.charAt(0) === "/" ? T.pathname : "/" + T.pathname
- };
- }
- return l = y(window.location.href), function(I) {
- const Z = _t.isString(I) ? y(I) : I;
- return Z.protocol === l.protocol && Z.host === l.host;
- };
- }()
- ) : (
- // Non standard browser envs (web workers, react-native) lack needed support.
- function() {
- return function() {
- return !0;
- };
- }()
- );
- function mM(r) {
- const d = /^([-+\w]{1,25})(:?\/\/|:)/.exec(r);
- return d && d[1] || "";
- }
- function yM(r, d) {
- r = r || 10;
- const T = new Array(r), l = new Array(r);
- let y = 0, j = 0, I;
- return d = d !== void 0 ? d : 1e3, function(H) {
- const U = Date.now(), F = l[j];
- I || (I = U), T[y] = H, l[y] = U;
- let R = j, N = 0;
- for (; R !== y; )
- N += T[R++], R = R % r;
- if (y = (y + 1) % r, y === j && (j = (j + 1) % r), U - I < d)
- return;
- const b = F && U - F;
- return b ? Math.round(N * 1e3 / b) : void 0;
- };
- }
- function jp(r, d) {
- let T = 0;
- const l = yM(50, 250);
- return (y) => {
- const j = y.loaded, I = y.lengthComputable ? y.total : void 0, Z = j - T, H = l(Z), U = j <= I;
- T = j;
- const F = {
- loaded: j,
- total: I,
- progress: I ? j / I : void 0,
- bytes: Z,
- rate: H || void 0,
- estimated: H && I && U ? (I - j) / H : void 0,
- event: y
- };
- F[d ? "download" : "upload"] = !0, r(F);
- };
- }
- const vM = typeof XMLHttpRequest < "u", xM = vM && function(r) {
- return new Promise(function(T, l) {
- let y = r.data;
- const j = fr.from(r.headers).normalize(), I = r.responseType;
- let Z;
- function H() {
- r.cancelToken && r.cancelToken.unsubscribe(Z), r.signal && r.signal.removeEventListener("abort", Z);
- }
- _t.isFormData(y) && (Vi.isStandardBrowserEnv || Vi.isStandardBrowserWebWorkerEnv ? j.setContentType(!1) : j.setContentType("multipart/form-data;", !1));
- let U = new XMLHttpRequest();
- if (r.auth) {
- const b = r.auth.username || "", x = r.auth.password ? unescape(encodeURIComponent(r.auth.password)) : "";
- j.set("Authorization", "Basic " + btoa(b + ":" + x));
- }
- const F = hd(r.baseURL, r.url);
- U.open(r.method.toUpperCase(), od(F, r.params, r.paramsSerializer), !0), U.timeout = r.timeout;
- function R() {
- if (!U)
- return;
- const b = fr.from(
- "getAllResponseHeaders" in U && U.getAllResponseHeaders()
- ), u = {
- data: !I || I === "text" || I === "json" ? U.responseText : U.response,
- status: U.status,
- statusText: U.statusText,
- headers: b,
- config: r,
- request: U
- };
- pM(function(E) {
- T(E), H();
- }, function(E) {
- l(E), H();
- }, u), U = null;
- }
- if ("onloadend" in U ? U.onloadend = R : U.onreadystatechange = function() {
- !U || U.readyState !== 4 || U.status === 0 && !(U.responseURL && U.responseURL.indexOf("file:") === 0) || setTimeout(R);
- }, U.onabort = function() {
- U && (l(new fe("Request aborted", fe.ECONNABORTED, r, U)), U = null);
- }, U.onerror = function() {
- l(new fe("Network Error", fe.ERR_NETWORK, r, U)), U = null;
- }, U.ontimeout = function() {
- let x = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded";
- const u = r.transitional || sd;
- r.timeoutErrorMessage && (x = r.timeoutErrorMessage), l(new fe(
- x,
- u.clarifyTimeoutError ? fe.ETIMEDOUT : fe.ECONNABORTED,
- r,
- U
- )), U = null;
- }, Vi.isStandardBrowserEnv) {
- const b = (r.withCredentials || gM(F)) && r.xsrfCookieName && uM.read(r.xsrfCookieName);
- b && j.set(r.xsrfHeaderName, b);
- }
- y === void 0 && j.setContentType(null), "setRequestHeader" in U && _t.forEach(j.toJSON(), function(x, u) {
- U.setRequestHeader(u, x);
- }), _t.isUndefined(r.withCredentials) || (U.withCredentials = !!r.withCredentials), I && I !== "json" && (U.responseType = r.responseType), typeof r.onDownloadProgress == "function" && U.addEventListener("progress", jp(r.onDownloadProgress, !0)), typeof r.onUploadProgress == "function" && U.upload && U.upload.addEventListener("progress", jp(r.onUploadProgress)), (r.cancelToken || r.signal) && (Z = (b) => {
- U && (l(!b || b.type ? new po(null, r, U) : b), U.abort(), U = null);
- }, r.cancelToken && r.cancelToken.subscribe(Z), r.signal && (r.signal.aborted ? Z() : r.signal.addEventListener("abort", Z)));
- const N = mM(F);
- if (N && Vi.protocols.indexOf(N) === -1) {
- l(new fe("Unsupported protocol " + N + ":", fe.ERR_BAD_REQUEST, r));
- return;
- }
- U.send(y || null);
- });
- }, ds = {
- http: HC,
- xhr: xM
- };
- _t.forEach(ds, (r, d) => {
- if (r) {
- try {
- Object.defineProperty(r, "name", { value: d });
- } catch {
- }
- Object.defineProperty(r, "adapterName", { value: d });
- }
- });
- const bM = {
- getAdapter: (r) => {
- r = _t.isArray(r) ? r : [r];
- const { length: d } = r;
- let T, l;
- for (let y = 0; y < d && (T = r[y], !(l = _t.isString(T) ? ds[T.toLowerCase()] : T)); y++)
- ;
- if (!l)
- throw l === !1 ? new fe(
- `Adapter ${T} is not supported by the environment`,
- "ERR_NOT_SUPPORT"
- ) : new Error(
- _t.hasOwnProp(ds, T) ? `Adapter '${T}' is not available in the build` : `Unknown adapter '${T}'`
- );
- if (!_t.isFunction(l))
- throw new TypeError("adapter is not a function");
- return l;
- },
- adapters: ds
- };
- function dl(r) {
- if (r.cancelToken && r.cancelToken.throwIfRequested(), r.signal && r.signal.aborted)
- throw new po(null, r);
- }
- function Wp(r) {
- return dl(r), r.headers = fr.from(r.headers), r.data = ul.call(
- r,
- r.transformRequest
- ), ["post", "put", "patch"].indexOf(r.method) !== -1 && r.headers.setContentType("application/x-www-form-urlencoded", !1), bM.getAdapter(r.adapter || Zl.adapter)(r).then(function(l) {
- return dl(r), l.data = ul.call(
- r,
- r.transformResponse,
- l
- ), l.headers = fr.from(l.headers), l;
- }, function(l) {
- return ld(l) || (dl(r), l && l.response && (l.response.data = ul.call(
- r,
- r.transformResponse,
- l.response
- ), l.response.headers = fr.from(l.response.headers))), Promise.reject(l);
- });
- }
- const zp = (r) => r instanceof fr ? r.toJSON() : r;
- function wn(r, d) {
- d = d || {};
- const T = {};
- function l(U, F, R) {
- return _t.isPlainObject(U) && _t.isPlainObject(F) ? _t.merge.call({ caseless: R }, U, F) : _t.isPlainObject(F) ? _t.merge({}, F) : _t.isArray(F) ? F.slice() : F;
- }
- function y(U, F, R) {
- if (_t.isUndefined(F)) {
- if (!_t.isUndefined(U))
- return l(void 0, U, R);
- } else
- return l(U, F, R);
- }
- function j(U, F) {
- if (!_t.isUndefined(F))
- return l(void 0, F);
- }
- function I(U, F) {
- if (_t.isUndefined(F)) {
- if (!_t.isUndefined(U))
- return l(void 0, U);
- } else
- return l(void 0, F);
- }
- function Z(U, F, R) {
- if (R in d)
- return l(U, F);
- if (R in r)
- return l(void 0, U);
- }
- const H = {
- url: j,
- method: j,
- data: j,
- baseURL: I,
- transformRequest: I,
- transformResponse: I,
- paramsSerializer: I,
- timeout: I,
- timeoutMessage: I,
- withCredentials: I,
- adapter: I,
- responseType: I,
- xsrfCookieName: I,
- xsrfHeaderName: I,
- onUploadProgress: I,
- onDownloadProgress: I,
- decompress: I,
- maxContentLength: I,
- maxBodyLength: I,
- beforeRedirect: I,
- transport: I,
- httpAgent: I,
- httpsAgent: I,
- cancelToken: I,
- socketPath: I,
- responseEncoding: I,
- validateStatus: Z,
- headers: (U, F) => y(zp(U), zp(F), !0)
- };
- return _t.forEach(Object.keys(Object.assign({}, r, d)), function(F) {
- const R = H[F] || y, N = R(r[F], d[F], F);
- _t.isUndefined(N) && R !== Z || (T[F] = N);
- }), T;
- }
- const cd = "1.4.0", Kl = {};
- ["object", "boolean", "number", "function", "string", "symbol"].forEach((r, d) => {
- Kl[r] = function(l) {
- return typeof l === r || "a" + (d < 1 ? "n " : " ") + r;
- };
- });
- const Yp = {};
- Kl.transitional = function(d, T, l) {
- function y(j, I) {
- return "[Axios v" + cd + "] Transitional option '" + j + "'" + I + (l ? ". " + l : "");
- }
- return (j, I, Z) => {
- if (d === !1)
- throw new fe(
- y(I, " has been removed" + (T ? " in " + T : "")),
- fe.ERR_DEPRECATED
- );
- return T && !Yp[I] && (Yp[I] = !0, console.warn(
- y(
- I,
- " has been deprecated since v" + T + " and will be removed in the near future"
- )
- )), d ? d(j, I, Z) : !0;
- };
- };
- function SM(r, d, T) {
- if (typeof r != "object")
- throw new fe("options must be an object", fe.ERR_BAD_OPTION_VALUE);
- const l = Object.keys(r);
- let y = l.length;
- for (; y-- > 0; ) {
- const j = l[y], I = d[j];
- if (I) {
- const Z = r[j], H = Z === void 0 || I(Z, j, r);
- if (H !== !0)
- throw new fe("option " + j + " must be " + H, fe.ERR_BAD_OPTION_VALUE);
- continue;
- }
- if (T !== !0)
- throw new fe("Unknown option " + j, fe.ERR_BAD_OPTION);
- }
- }
- const Cl = {
- assertOptions: SM,
- validators: Kl
- }, Pr = Cl.validators;
- class ks {
- constructor(d) {
- this.defaults = d, this.interceptors = {
- request: new Np(),
- response: new Np()
- };
- }
- /**
- * 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
- */
- request(d, T) {
- typeof d == "string" ? (T = T || {}, T.url = d) : T = d || {}, T = wn(this.defaults, T);
- const { transitional: l, paramsSerializer: y, headers: j } = T;
- l !== void 0 && Cl.assertOptions(l, {
- silentJSONParsing: Pr.transitional(Pr.boolean),
- forcedJSONParsing: Pr.transitional(Pr.boolean),
- clarifyTimeoutError: Pr.transitional(Pr.boolean)
- }, !1), y != null && (_t.isFunction(y) ? T.paramsSerializer = {
- serialize: y
- } : Cl.assertOptions(y, {
- encode: Pr.function,
- serialize: Pr.function
- }, !0)), T.method = (T.method || this.defaults.method || "get").toLowerCase();
- let I;
- I = j && _t.merge(
- j.common,
- j[T.method]
- ), I && _t.forEach(
- ["delete", "get", "head", "post", "put", "patch", "common"],
- (x) => {
- delete j[x];
- }
- ), T.headers = fr.concat(I, j);
- const Z = [];
- let H = !0;
- this.interceptors.request.forEach(function(u) {
- typeof u.runWhen == "function" && u.runWhen(T) === !1 || (H = H && u.synchronous, Z.unshift(u.fulfilled, u.rejected));
- });
- const U = [];
- this.interceptors.response.forEach(function(u) {
- U.push(u.fulfilled, u.rejected);
- });
- let F, R = 0, N;
- if (!H) {
- const x = [Wp.bind(this), void 0];
- for (x.unshift.apply(x, Z), x.push.apply(x, U), N = x.length, F = Promise.resolve(T); R < N; )
- F = F.then(x[R++], x[R++]);
- return F;
- }
- N = Z.length;
- let b = T;
- for (R = 0; R < N; ) {
- const x = Z[R++], u = Z[R++];
- try {
- b = x(b);
- } catch (f) {
- u.call(this, f);
- break;
- }
- }
- try {
- F = Wp.call(this, b);
- } catch (x) {
- return Promise.reject(x);
- }
- for (R = 0, N = U.length; R < N; )
- F = F.then(U[R++], U[R++]);
- return F;
- }
- getUri(d) {
- d = wn(this.defaults, d);
- const T = hd(d.baseURL, d.url);
- return od(T, d.params, d.paramsSerializer);
- }
- }
- _t.forEach(["delete", "get", "head", "options"], function(d) {
- ks.prototype[d] = function(T, l) {
- return this.request(wn(l || {}, {
- method: d,
- url: T,
- data: (l || {}).data
- }));
- };
- });
- _t.forEach(["post", "put", "patch"], function(d) {
- function T(l) {
- return function(j, I, Z) {
- return this.request(wn(Z || {}, {
- method: d,
- headers: l ? {
- "Content-Type": "multipart/form-data"
- } : {},
- url: j,
- data: I
- }));
- };
- }
- ks.prototype[d] = T(), ks.prototype[d + "Form"] = T(!0);
- });
- const fs = ks;
- class Jl {
- constructor(d) {
- if (typeof d != "function")
- throw new TypeError("executor must be a function.");
- let T;
- this.promise = new Promise(function(j) {
- T = j;
- });
- const l = this;
- this.promise.then((y) => {
- if (!l._listeners)
- return;
- let j = l._listeners.length;
- for (; j-- > 0; )
- l._listeners[j](y);
- l._listeners = null;
- }), this.promise.then = (y) => {
- let j;
- const I = new Promise((Z) => {
- l.subscribe(Z), j = Z;
- }).then(y);
- return I.cancel = function() {
- l.unsubscribe(j);
- }, I;
- }, d(function(j, I, Z) {
- l.reason || (l.reason = new po(j, I, Z), T(l.reason));
- });
- }
- /**
- * Throws a `CanceledError` if cancellation has been requested.
- */
- throwIfRequested() {
- if (this.reason)
- throw this.reason;
- }
- /**
- * Subscribe to the cancel signal
- */
- subscribe(d) {
- if (this.reason) {
- d(this.reason);
- return;
- }
- this._listeners ? this._listeners.push(d) : this._listeners = [d];
- }
- /**
- * Unsubscribe from the cancel signal
- */
- unsubscribe(d) {
- if (!this._listeners)
- return;
- const T = this._listeners.indexOf(d);
- T !== -1 && this._listeners.splice(T, 1);
- }
- /**
- * Returns an object that contains a new `CancelToken` and a function that, when called,
- * cancels the `CancelToken`.
- */
- static source() {
- let d;
- return {
- token: new Jl(function(y) {
- d = y;
- }),
- cancel: d
- };
- }
- }
- const wM = Jl;
- function CM(r) {
- return function(T) {
- return r.apply(null, T);
- };
- }
- function MM(r) {
- return _t.isObject(r) && r.isAxiosError === !0;
- }
- const Ml = {
- 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(Ml).forEach(([r, d]) => {
- Ml[d] = r;
- });
- const kM = Ml;
- function pd(r) {
- const d = new fs(r), T = Vu(fs.prototype.request, d);
- return _t.extend(T, fs.prototype, d, { allOwnKeys: !0 }), _t.extend(T, d, null, { allOwnKeys: !0 }), T.create = function(y) {
- return pd(wn(r, y));
- }, T;
- }
- const Ge = pd(Zl);
- Ge.Axios = fs;
- Ge.CanceledError = po;
- Ge.CancelToken = wM;
- Ge.isCancel = ld;
- Ge.VERSION = cd;
- Ge.toFormData = Ys;
- Ge.AxiosError = fe;
- Ge.Cancel = Ge.CanceledError;
- Ge.all = function(d) {
- return Promise.all(d);
- };
- Ge.spread = CM;
- Ge.isAxiosError = MM;
- Ge.mergeConfig = wn;
- Ge.AxiosHeaders = fr;
- Ge.formToJSON = (r) => ad(_t.isHTMLForm(r) ? new FormData(r) : r);
- Ge.HttpStatusCode = kM;
- Ge.default = Ge;
- const AM = Ge;
- let TM = {
- baseURL: "/ybreport/api",
- timeout: 10 * 60 * 1e3
- };
- const ql = AM.create(TM);
- ql.interceptors.request.use(
- function(r) {
- return r;
- },
- function(r) {
- return console.error(r), Promise.reject(r);
- }
- );
- ql.interceptors.response.use(
- function(r) {
- let d = r.data;
- return r.status !== 200 && console.error("网络异常"), d || console.error("服务器开了个小差"), d.Ret === 408 && console.error(d.Msg), d.Ret === 403 && console.error(d.Msg || "网络异常"), d;
- },
- function(r) {
- return console.error(r), Promise.reject(r);
- }
- );
- const Ql = (r, d) => ql.post(r, d), PM = (r) => Ql("/chart/detail", r), EM = (r) => Ql("/eta_forum/chart/detail", r), OM = (r) => Ql("/excel/detail", r);
- function ud(r) {
- if (r.indexOf("?") === -1)
- return {};
- const T = r.split("?")[1].split("&"), l = {};
- return T.forEach((y) => {
- const [j, I] = y.split("=");
- l[j] = decodeURIComponent(I);
- }), l;
- }
- const LM = `@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}
- `, dd = (r, d) => {
- const T = r.__vccOpts || r;
- for (const [l, y] of d)
- T[l] = y;
- return T;
- }, _M = { class: "hz-chart-head" }, DM = {
- key: 0,
- class: "chart-wrapper"
- }, IM = ["id"], RM = {
- key: 1,
- class: "notfound"
- }, NM = {
- key: 2,
- class: "chart-bottom-info bootom-source"
- }, BM = ["textContent"], jM = {
- __name: "EtaChart.ce",
- props: {
- src: "",
- width: "",
- height: "",
- style: ""
- },
- setup(r) {
- const { chartRender: d, setLimitData: T, isUseSelfLimit: l } = zw(), y = r, j = ud(y.src), I = Le(null), Z = Le(""), H = Le(null), U = Le(null), F = Le(!1), R = Le(null), N = Le(null), b = Le(null);
- async function x() {
- if (!j.code) {
- F.value = !1;
- return;
- }
- try {
- const f = j.isETAForumChart && j.isETAForumChart == "true" ? await EM({
- UniqueCode: j.code,
- IsReplace: 1
- }) : await PM({
- UniqueCode: j.code,
- IsReplace: 1
- });
- if (f.Ret !== 200)
- return;
- H.value = f.Data.ChartInfo, U.value = f.Data.ChartInfo.Source === 1 ? f.Data.EdbInfoList : [f.Data.EdbInfoList[0]], Z.value = `hz-chart_${j.code}_${(/* @__PURE__ */ new Date()).getTime()}`, u(), F.value = !0, f.Data.ChartInfo.Source === 1 && ![7, 10, 11].includes(f.Data.ChartInfo.ChartType) ? (l.value = !0, T(f.Data)) : l.value = !1, gs(() => {
- d({
- data: f.Data,
- renderId: I.value,
- lang: j.language,
- changeLangIsCheck: !1,
- showChartTitle: !1,
- shouldUseSelfLimit: !0
- }), f.Data.WaterMark && (R.value.style.backgroundImage = `url(${f.Data.WaterMark})`);
- }), gs(() => {
- var E;
- b.value && (b.value.style.maxWidth = ((E = N.value) == null ? void 0 : E.clientWidth) + "px");
- });
- } catch {
- F.value = !1;
- }
- }
- const u = () => {
- j.language = j.fromPage || j.lang || "zh";
- };
- return x(), (f, E) => {
- var O, B, M, S;
- return Je(), qe("div", {
- class: "hz-chart-wrap",
- ref_key: "chartContainer",
- ref: N,
- style: hr([y.style + ";height:" + y.height + "px", { margin: "0 0 10px 0" }])
- }, [
- cr("header", _M, [
- H.value ? (Je(), qe("span", {
- key: 0,
- class: "chart-title",
- style: hr(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(A0(j).language === "en" ? H.value.ChartNameEn : H.value.ChartName), 5)) : Jn("", !0)
- ]),
- F.value ? (Je(), qe("div", DM, [
- cr("div", {
- id: Z.value,
- ref_key: "chartContentEl",
- ref: I,
- class: "hz-chart-content"
- }, null, 8, IM),
- cr("div", {
- class: "mark",
- ref_key: "markDom",
- ref: R
- }, null, 512)
- ])) : (Je(), qe("div", RM, " 哎吆,你的图飞了,赶快去找管理员救命吧~ ")),
- (O = H.value) != null && O.Instructions && JSON.parse((B = H.value) == null ? void 0 : B.Instructions).isShow ? (Je(), qe("div", NM, [
- cr("div", {
- class: "chart-instruction text_oneLine",
- textContent: yn(JSON.parse(H.value.Instructions).text),
- style: hr(`
- color: ${JSON.parse(H.value.Instructions).color};
- font-size: ${JSON.parse(H.value.Instructions).fontSize}px
- `)
- }, null, 12, BM)
- ])) : Jn("", !0),
- (M = H.value) != null && M.SourcesFrom && ((S = JSON.parse(H.value.SourcesFrom)) != null && S.isShow) ? (Je(), qe("div", {
- key: 3,
- class: "hz-chart-footer",
- ref_key: "chartFooter",
- ref: b,
- style: hr(`
- color: ${JSON.parse(H.value.SourcesFrom).color};
- font-size: ${JSON.parse(H.value.SourcesFrom).fontSize}px;
- `)
- }, [
- E[0] || (E[0] = Xp(" source:")),
- cr("em", null, yn(JSON.parse(H.value.SourcesFrom).text), 1)
- ], 4)) : Jn("", !0)
- ], 4);
- };
- }
- }, WM = /* @__PURE__ */ dd(jM, [["styles", [LM]], ["__scopeId", "data-v-4a9f0e4d"]]), zM = `@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}
- `, YM = { class: "table-wrapper" }, XM = ["colspan", "rowspan"], GM = {
- key: 0,
- class: "split-word"
- }, HM = { key: 1 }, FM = {
- __name: "EtaTable.ce",
- props: {
- src: "",
- width: "",
- height: "",
- style: ""
- },
- setup(r) {
- const T = ud(r.src), l = Le({}), y = Le(!1), j = Le(null), I = Le(null), Z = (F) => JSON.stringify({
- isShow: !0,
- text: F,
- color: "#606266",
- fontSize: 9
- });
- async function H() {
- const F = await OM({
- UniqueCode: T.code,
- FromScene: Number(T.fromScene || ""),
- ReferencedId: Number(T.sourceId || ""),
- Uuid: T.uid || ""
- });
- F.Ret === 200 && (l.value = F.Data, l.value.SourcesFrom || (l.value.SourcesFrom = F.Data.ExcelSource ? Z(F.Data.ExcelSource || "") : ""), y.value = !0, gs(() => {
- var R;
- console.log(j.value.clientWidth), I.value && (I.value.style.maxWidth = ((R = j.value) == null ? void 0 : R.clientWidth) + "px");
- }));
- }
- H();
- function U(F, R) {
- const { HeightList: N, WidthList: b } = l.value.ReferencedExcelConfig;
- if (b && N) {
- let x = b.split(",").map((f) => Number(f)), u = N.split(",").map((f) => Number(f));
- return R === "height" ? u[F] ? `height:${u[F]}px` : "" : x[F] ? `width:${x[F]}px` : "";
- } else
- return "";
- }
- return (F, R) => {
- var N, b;
- return y.value ? (Je(), qe("div", {
- key: 0,
- class: "sheet-show-wrapper",
- ref_key: "sheetRef",
- ref: j
- }, [
- cr("div", YM, [
- cr("table", {
- cellpadding: "0",
- cellspacing: "0",
- style: hr(`font-size: ${((N = l.value.Config) == null ? void 0 : N.FontSize) || 12}PX`)
- }, [
- cr("tbody", null, [
- (Je(!0), qe(el, null, il((b = l.value.TableInfo) == null ? void 0 : b.TableDataList, (x, u) => (Je(), qe("tr", {
- key: u,
- style: hr(`${U(u, "height")}`)
- }, [
- (Je(!0), qe(el, null, il(x, (f, E) => {
- var O;
- return Je(), qe("td", {
- class: T0(["data-cell", {
- "one-bg": (u + 1) % 2 && u > 0,
- "tow-bg": (u + 1) % 2 !== 0 && u > 0,
- "head-column": u === 0
- }]),
- key: E,
- colspan: f.mc.cs || 1,
- rowspan: f.mc.rs || 1,
- style: hr(`
- color: ${f.fc};
- font-weight: ${f.bl ? "bold" : "normal"};
- font-style: ${f.it ? "italic" : "normal"};
- background: ${f.bg};
- font-size: ${f.fs || ((O = l.value.Config) == null ? void 0 : O.FontSize) || 12}px;
- ${U(E, "width")}
- `)
- }, [
- f.ct.s ? (Je(), qe("div", GM, [
- (Je(!0), qe(el, null, il(f.ct.s, (B, M) => (Je(), qe("span", {
- key: `${u}_${E}_${M}`,
- style: hr(`
- color: ${B.fc};
- font-weight: ${B.bl ? "bold" : "normal"};
- font-style: ${B.it ? "italic" : "normal"};
- `)
- }, yn(B.v), 5))), 128))
- ])) : (Je(), qe("div", HM, yn(f.m), 1))
- ], 14, XM);
- }), 128))
- ], 4))), 128))
- ])
- ], 4)
- ]),
- l.value.SourcesFrom && JSON.parse(l.value.SourcesFrom).isShow ? (Je(), qe("div", {
- key: 0,
- class: "sheet-source",
- ref_key: "sheetFooter",
- ref: I,
- style: hr(`
- color: ${JSON.parse(l.value.SourcesFrom).color};
- font-size: ${JSON.parse(l.value.SourcesFrom).fontSize}px;
- `)
- }, [
- R[0] || (R[0] = Xp(" source:")),
- cr("em", null, yn(JSON.parse(l.value.SourcesFrom).text), 1)
- ], 4)) : Jn("", !0)
- ], 512)) : Jn("", !0);
- };
- }
- }, UM = /* @__PURE__ */ dd(FM, [["styles", [zM]], ["__scopeId", "data-v-21c79782"]]), VM = Gp(WM), $M = Gp(UM);
- function KM() {
- customElements.define("eta-chart", VM), customElements.define("eta-table", $M);
- }
- export {
- KM as registerEtaComp
- };
|