vendors.js 1.5 MB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357223582235922360223612236222363223642236522366223672236822369223702237122372223732237422375223762237722378223792238022381223822238322384223852238622387223882238922390223912239222393223942239522396223972239822399224002240122402224032240422405224062240722408224092241022411224122241322414224152241622417224182241922420224212242222423224242242522426224272242822429224302243122432224332243422435224362243722438224392244022441224422244322444224452244622447224482244922450224512245222453224542245522456224572245822459224602246122462224632246422465224662246722468224692247022471224722247322474224752247622477224782247922480224812248222483224842248522486224872248822489224902249122492224932249422495224962249722498224992250022501225022250322504225052250622507225082250922510225112251222513225142251522516225172251822519225202252122522225232252422525225262252722528225292253022531225322253322534225352253622537225382253922540225412254222543225442254522546225472254822549225502255122552225532255422555225562255722558225592256022561225622256322564225652256622567225682256922570225712257222573225742257522576225772257822579225802258122582225832258422585225862258722588225892259022591225922259322594225952259622597225982259922600226012260222603226042260522606226072260822609226102261122612226132261422615226162261722618226192262022621226222262322624226252262622627226282262922630226312263222633226342263522636226372263822639226402264122642226432264422645226462264722648226492265022651226522265322654226552265622657226582265922660226612266222663226642266522666226672266822669226702267122672226732267422675226762267722678226792268022681226822268322684226852268622687226882268922690226912269222693226942269522696226972269822699227002270122702227032270422705227062270722708227092271022711227122271322714227152271622717227182271922720227212272222723227242272522726227272272822729227302273122732227332273422735227362273722738227392274022741227422274322744227452274622747227482274922750227512275222753227542275522756227572275822759227602276122762227632276422765227662276722768227692277022771227722277322774227752277622777227782277922780227812278222783227842278522786227872278822789227902279122792227932279422795227962279722798227992280022801228022280322804228052280622807228082280922810228112281222813228142281522816228172281822819228202282122822228232282422825228262282722828228292283022831228322283322834228352283622837228382283922840228412284222843228442284522846228472284822849228502285122852228532285422855228562285722858228592286022861228622286322864228652286622867228682286922870228712287222873228742287522876228772287822879228802288122882228832288422885228862288722888228892289022891228922289322894228952289622897228982289922900229012290222903229042290522906229072290822909229102291122912229132291422915229162291722918229192292022921229222292322924229252292622927229282292922930229312293222933229342293522936229372293822939229402294122942229432294422945229462294722948229492295022951229522295322954229552295622957229582295922960229612296222963229642296522966229672296822969229702297122972229732297422975229762297722978229792298022981229822298322984229852298622987229882298922990229912299222993229942299522996229972299822999230002300123002230032300423005230062300723008230092301023011230122301323014230152301623017230182301923020230212302223023230242302523026230272302823029230302303123032230332303423035230362303723038230392304023041230422304323044230452304623047230482304923050230512305223053230542305523056230572305823059230602306123062230632306423065230662306723068230692307023071230722307323074230752307623077230782307923080230812308223083230842308523086230872308823089230902309123092230932309423095230962309723098230992310023101231022310323104231052310623107231082310923110231112311223113231142311523116231172311823119231202312123122231232312423125231262312723128231292313023131231322313323134231352313623137231382313923140231412314223143231442314523146231472314823149231502315123152231532315423155231562315723158231592316023161231622316323164231652316623167231682316923170231712317223173231742317523176231772317823179231802318123182231832318423185231862318723188231892319023191231922319323194231952319623197231982319923200232012320223203232042320523206232072320823209232102321123212232132321423215232162321723218232192322023221232222322323224232252322623227232282322923230232312323223233232342323523236232372323823239232402324123242232432324423245232462324723248232492325023251232522325323254232552325623257232582325923260232612326223263232642326523266232672326823269232702327123272232732327423275232762327723278232792328023281232822328323284232852328623287232882328923290232912329223293232942329523296232972329823299233002330123302233032330423305233062330723308233092331023311233122331323314233152331623317233182331923320233212332223323233242332523326233272332823329233302333123332233332333423335233362333723338233392334023341233422334323344233452334623347233482334923350233512335223353233542335523356233572335823359233602336123362233632336423365233662336723368233692337023371233722337323374233752337623377233782337923380233812338223383233842338523386233872338823389233902339123392233932339423395233962339723398233992340023401234022340323404234052340623407234082340923410234112341223413234142341523416234172341823419234202342123422234232342423425234262342723428234292343023431234322343323434234352343623437234382343923440234412344223443234442344523446234472344823449234502345123452234532345423455234562345723458234592346023461234622346323464234652346623467234682346923470234712347223473234742347523476234772347823479234802348123482234832348423485234862348723488234892349023491234922349323494234952349623497234982349923500235012350223503235042350523506235072350823509235102351123512235132351423515235162351723518235192352023521235222352323524235252352623527235282352923530235312353223533235342353523536235372353823539235402354123542235432354423545235462354723548235492355023551235522355323554235552355623557235582355923560235612356223563235642356523566235672356823569235702357123572235732357423575235762357723578235792358023581235822358323584235852358623587235882358923590235912359223593235942359523596235972359823599236002360123602236032360423605236062360723608236092361023611236122361323614236152361623617236182361923620236212362223623236242362523626236272362823629236302363123632236332363423635236362363723638236392364023641236422364323644236452364623647236482364923650236512365223653236542365523656236572365823659236602366123662236632366423665236662366723668236692367023671236722367323674236752367623677236782367923680236812368223683236842368523686236872368823689236902369123692236932369423695236962369723698236992370023701237022370323704237052370623707237082370923710237112371223713237142371523716237172371823719237202372123722237232372423725237262372723728237292373023731237322373323734237352373623737237382373923740237412374223743237442374523746237472374823749237502375123752237532375423755237562375723758237592376023761237622376323764237652376623767237682376923770237712377223773237742377523776237772377823779237802378123782237832378423785237862378723788237892379023791237922379323794237952379623797237982379923800238012380223803238042380523806238072380823809238102381123812238132381423815238162381723818238192382023821238222382323824238252382623827238282382923830238312383223833238342383523836238372383823839238402384123842238432384423845238462384723848238492385023851238522385323854238552385623857238582385923860238612386223863238642386523866238672386823869238702387123872238732387423875238762387723878238792388023881238822388323884238852388623887238882388923890238912389223893238942389523896238972389823899239002390123902239032390423905239062390723908239092391023911239122391323914239152391623917239182391923920239212392223923239242392523926239272392823929239302393123932239332393423935239362393723938239392394023941239422394323944239452394623947239482394923950239512395223953239542395523956239572395823959239602396123962239632396423965239662396723968239692397023971239722397323974239752397623977239782397923980239812398223983239842398523986239872398823989239902399123992239932399423995239962399723998239992400024001240022400324004240052400624007240082400924010240112401224013240142401524016240172401824019240202402124022240232402424025240262402724028240292403024031240322403324034240352403624037240382403924040240412404224043240442404524046240472404824049240502405124052240532405424055240562405724058240592406024061240622406324064240652406624067240682406924070240712407224073240742407524076240772407824079240802408124082240832408424085240862408724088240892409024091240922409324094240952409624097240982409924100241012410224103241042410524106241072410824109241102411124112241132411424115241162411724118241192412024121241222412324124241252412624127241282412924130241312413224133241342413524136241372413824139241402414124142241432414424145241462414724148241492415024151241522415324154241552415624157241582415924160241612416224163241642416524166241672416824169241702417124172241732417424175241762417724178241792418024181241822418324184241852418624187241882418924190241912419224193241942419524196241972419824199242002420124202242032420424205242062420724208242092421024211242122421324214242152421624217242182421924220242212422224223242242422524226242272422824229242302423124232242332423424235242362423724238242392424024241242422424324244242452424624247242482424924250242512425224253242542425524256242572425824259242602426124262242632426424265242662426724268242692427024271242722427324274242752427624277242782427924280242812428224283242842428524286242872428824289242902429124292242932429424295242962429724298242992430024301243022430324304243052430624307243082430924310243112431224313243142431524316243172431824319243202432124322243232432424325243262432724328243292433024331243322433324334243352433624337243382433924340243412434224343243442434524346243472434824349243502435124352243532435424355243562435724358243592436024361243622436324364243652436624367243682436924370243712437224373243742437524376243772437824379243802438124382243832438424385243862438724388243892439024391243922439324394243952439624397243982439924400244012440224403244042440524406244072440824409244102441124412244132441424415244162441724418244192442024421244222442324424244252442624427244282442924430244312443224433244342443524436244372443824439244402444124442244432444424445244462444724448244492445024451244522445324454244552445624457244582445924460244612446224463244642446524466244672446824469244702447124472244732447424475244762447724478244792448024481244822448324484244852448624487244882448924490244912449224493244942449524496244972449824499245002450124502245032450424505245062450724508245092451024511245122451324514245152451624517245182451924520245212452224523245242452524526245272452824529245302453124532245332453424535245362453724538245392454024541245422454324544245452454624547245482454924550245512455224553245542455524556245572455824559245602456124562245632456424565245662456724568245692457024571245722457324574245752457624577245782457924580245812458224583245842458524586245872458824589245902459124592245932459424595245962459724598245992460024601246022460324604246052460624607246082460924610246112461224613246142461524616246172461824619246202462124622246232462424625246262462724628246292463024631246322463324634246352463624637246382463924640246412464224643246442464524646246472464824649246502465124652246532465424655246562465724658246592466024661246622466324664246652466624667246682466924670246712467224673246742467524676246772467824679246802468124682246832468424685246862468724688246892469024691246922469324694246952469624697246982469924700247012470224703247042470524706247072470824709247102471124712247132471424715247162471724718247192472024721247222472324724247252472624727247282472924730247312473224733247342473524736247372473824739247402474124742247432474424745247462474724748247492475024751247522475324754247552475624757247582475924760247612476224763247642476524766247672476824769247702477124772247732477424775247762477724778247792478024781247822478324784247852478624787247882478924790247912479224793247942479524796247972479824799248002480124802248032480424805248062480724808248092481024811248122481324814248152481624817248182481924820248212482224823248242482524826248272482824829248302483124832248332483424835248362483724838248392484024841248422484324844248452484624847248482484924850248512485224853248542485524856248572485824859248602486124862248632486424865248662486724868248692487024871248722487324874248752487624877248782487924880248812488224883248842488524886248872488824889248902489124892248932489424895248962489724898248992490024901249022490324904249052490624907249082490924910249112491224913249142491524916249172491824919249202492124922249232492424925249262492724928249292493024931249322493324934249352493624937249382493924940249412494224943249442494524946249472494824949249502495124952249532495424955249562495724958249592496024961249622496324964249652496624967249682496924970249712497224973249742497524976249772497824979249802498124982249832498424985249862498724988249892499024991249922499324994249952499624997249982499925000250012500225003250042500525006250072500825009250102501125012250132501425015250162501725018250192502025021250222502325024250252502625027250282502925030250312503225033250342503525036250372503825039250402504125042250432504425045250462504725048250492505025051250522505325054250552505625057250582505925060250612506225063250642506525066250672506825069250702507125072250732507425075250762507725078250792508025081250822508325084250852508625087250882508925090250912509225093250942509525096250972509825099251002510125102251032510425105251062510725108251092511025111251122511325114251152511625117251182511925120251212512225123251242512525126251272512825129251302513125132251332513425135251362513725138251392514025141251422514325144251452514625147251482514925150251512515225153251542515525156251572515825159251602516125162251632516425165251662516725168251692517025171251722517325174251752517625177251782517925180251812518225183251842518525186251872518825189251902519125192251932519425195251962519725198251992520025201252022520325204252052520625207252082520925210252112521225213252142521525216252172521825219252202522125222252232522425225252262522725228252292523025231252322523325234252352523625237252382523925240252412524225243252442524525246252472524825249252502525125252252532525425255252562525725258252592526025261252622526325264252652526625267252682526925270252712527225273252742527525276252772527825279252802528125282252832528425285252862528725288252892529025291252922529325294252952529625297252982529925300253012530225303253042530525306253072530825309253102531125312253132531425315253162531725318253192532025321253222532325324253252532625327253282532925330253312533225333253342533525336253372533825339253402534125342253432534425345253462534725348253492535025351253522535325354253552535625357253582535925360253612536225363253642536525366253672536825369253702537125372253732537425375253762537725378253792538025381253822538325384253852538625387253882538925390253912539225393253942539525396253972539825399254002540125402254032540425405254062540725408254092541025411254122541325414254152541625417254182541925420254212542225423254242542525426254272542825429254302543125432254332543425435254362543725438254392544025441254422544325444254452544625447254482544925450254512545225453254542545525456254572545825459254602546125462254632546425465254662546725468254692547025471254722547325474254752547625477254782547925480254812548225483254842548525486254872548825489254902549125492254932549425495254962549725498254992550025501255022550325504255052550625507255082550925510255112551225513255142551525516255172551825519255202552125522255232552425525255262552725528255292553025531255322553325534255352553625537255382553925540255412554225543255442554525546255472554825549255502555125552255532555425555255562555725558255592556025561255622556325564255652556625567255682556925570255712557225573255742557525576255772557825579255802558125582255832558425585255862558725588255892559025591255922559325594255952559625597255982559925600256012560225603256042560525606256072560825609256102561125612256132561425615256162561725618256192562025621256222562325624256252562625627256282562925630256312563225633256342563525636256372563825639256402564125642256432564425645256462564725648256492565025651256522565325654256552565625657256582565925660256612566225663256642566525666256672566825669256702567125672256732567425675256762567725678256792568025681256822568325684256852568625687256882568925690256912569225693256942569525696256972569825699257002570125702257032570425705257062570725708257092571025711257122571325714257152571625717257182571925720257212572225723257242572525726257272572825729257302573125732257332573425735257362573725738257392574025741257422574325744257452574625747257482574925750257512575225753257542575525756257572575825759257602576125762257632576425765257662576725768257692577025771257722577325774257752577625777257782577925780257812578225783257842578525786257872578825789257902579125792257932579425795257962579725798257992580025801258022580325804258052580625807258082580925810258112581225813258142581525816258172581825819258202582125822258232582425825258262582725828258292583025831258322583325834258352583625837258382583925840258412584225843258442584525846258472584825849258502585125852258532585425855258562585725858258592586025861258622586325864258652586625867258682586925870258712587225873258742587525876258772587825879258802588125882258832588425885258862588725888258892589025891258922589325894258952589625897258982589925900259012590225903259042590525906259072590825909259102591125912259132591425915259162591725918259192592025921259222592325924259252592625927259282592925930259312593225933259342593525936259372593825939259402594125942259432594425945259462594725948259492595025951259522595325954259552595625957259582595925960259612596225963259642596525966259672596825969259702597125972259732597425975259762597725978259792598025981259822598325984259852598625987259882598925990259912599225993259942599525996259972599825999260002600126002260032600426005260062600726008260092601026011260122601326014260152601626017260182601926020260212602226023260242602526026260272602826029260302603126032260332603426035260362603726038260392604026041260422604326044260452604626047260482604926050260512605226053260542605526056260572605826059260602606126062260632606426065260662606726068260692607026071260722607326074260752607626077260782607926080260812608226083260842608526086260872608826089260902609126092260932609426095260962609726098260992610026101261022610326104261052610626107261082610926110261112611226113261142611526116261172611826119261202612126122261232612426125261262612726128261292613026131261322613326134261352613626137261382613926140261412614226143261442614526146261472614826149261502615126152261532615426155261562615726158261592616026161261622616326164261652616626167261682616926170261712617226173261742617526176261772617826179261802618126182261832618426185261862618726188261892619026191261922619326194261952619626197261982619926200262012620226203262042620526206262072620826209262102621126212262132621426215262162621726218262192622026221262222622326224262252622626227262282622926230262312623226233262342623526236262372623826239262402624126242262432624426245262462624726248262492625026251262522625326254262552625626257262582625926260262612626226263262642626526266262672626826269262702627126272262732627426275262762627726278262792628026281262822628326284262852628626287262882628926290262912629226293262942629526296262972629826299263002630126302263032630426305263062630726308263092631026311263122631326314263152631626317263182631926320263212632226323263242632526326263272632826329263302633126332263332633426335263362633726338263392634026341263422634326344263452634626347263482634926350263512635226353263542635526356263572635826359263602636126362263632636426365263662636726368263692637026371263722637326374263752637626377263782637926380263812638226383263842638526386263872638826389263902639126392263932639426395263962639726398263992640026401264022640326404264052640626407264082640926410264112641226413264142641526416264172641826419264202642126422264232642426425264262642726428264292643026431264322643326434264352643626437264382643926440264412644226443264442644526446264472644826449264502645126452264532645426455264562645726458264592646026461264622646326464264652646626467264682646926470264712647226473264742647526476264772647826479264802648126482264832648426485264862648726488264892649026491264922649326494264952649626497264982649926500265012650226503265042650526506265072650826509265102651126512265132651426515265162651726518265192652026521265222652326524265252652626527265282652926530265312653226533265342653526536265372653826539265402654126542265432654426545265462654726548265492655026551265522655326554265552655626557265582655926560265612656226563265642656526566265672656826569265702657126572265732657426575265762657726578265792658026581265822658326584265852658626587265882658926590265912659226593265942659526596265972659826599266002660126602266032660426605266062660726608266092661026611266122661326614266152661626617266182661926620266212662226623266242662526626266272662826629266302663126632266332663426635266362663726638266392664026641266422664326644266452664626647266482664926650266512665226653266542665526656266572665826659266602666126662266632666426665266662666726668266692667026671266722667326674266752667626677266782667926680266812668226683266842668526686266872668826689266902669126692266932669426695266962669726698266992670026701267022670326704267052670626707267082670926710267112671226713267142671526716267172671826719267202672126722267232672426725267262672726728267292673026731267322673326734267352673626737267382673926740267412674226743267442674526746267472674826749267502675126752267532675426755267562675726758267592676026761267622676326764267652676626767267682676926770267712677226773267742677526776267772677826779267802678126782267832678426785267862678726788267892679026791267922679326794267952679626797267982679926800268012680226803268042680526806268072680826809268102681126812268132681426815268162681726818268192682026821268222682326824268252682626827268282682926830268312683226833268342683526836268372683826839268402684126842268432684426845268462684726848268492685026851268522685326854268552685626857268582685926860268612686226863268642686526866268672686826869268702687126872268732687426875268762687726878268792688026881268822688326884268852688626887268882688926890268912689226893268942689526896268972689826899269002690126902269032690426905269062690726908269092691026911269122691326914269152691626917269182691926920269212692226923269242692526926269272692826929269302693126932269332693426935269362693726938269392694026941269422694326944269452694626947269482694926950269512695226953269542695526956269572695826959269602696126962269632696426965269662696726968269692697026971269722697326974269752697626977269782697926980269812698226983269842698526986269872698826989269902699126992269932699426995269962699726998269992700027001270022700327004270052700627007270082700927010270112701227013270142701527016270172701827019270202702127022270232702427025270262702727028270292703027031270322703327034270352703627037270382703927040270412704227043270442704527046270472704827049270502705127052270532705427055270562705727058270592706027061270622706327064270652706627067270682706927070270712707227073270742707527076270772707827079270802708127082270832708427085270862708727088270892709027091270922709327094270952709627097270982709927100271012710227103271042710527106271072710827109271102711127112271132711427115271162711727118271192712027121271222712327124271252712627127271282712927130271312713227133271342713527136271372713827139271402714127142271432714427145271462714727148271492715027151271522715327154271552715627157271582715927160271612716227163271642716527166271672716827169271702717127172271732717427175271762717727178271792718027181271822718327184271852718627187271882718927190271912719227193271942719527196271972719827199272002720127202272032720427205272062720727208272092721027211272122721327214272152721627217272182721927220272212722227223272242722527226272272722827229272302723127232272332723427235272362723727238272392724027241272422724327244272452724627247272482724927250272512725227253272542725527256272572725827259272602726127262272632726427265272662726727268272692727027271272722727327274272752727627277272782727927280272812728227283272842728527286272872728827289272902729127292272932729427295272962729727298272992730027301273022730327304273052730627307273082730927310273112731227313273142731527316273172731827319273202732127322273232732427325273262732727328273292733027331273322733327334273352733627337273382733927340273412734227343273442734527346273472734827349273502735127352273532735427355273562735727358273592736027361273622736327364273652736627367273682736927370273712737227373273742737527376273772737827379273802738127382273832738427385273862738727388273892739027391273922739327394273952739627397273982739927400274012740227403274042740527406274072740827409274102741127412274132741427415274162741727418274192742027421274222742327424274252742627427274282742927430274312743227433274342743527436274372743827439274402744127442274432744427445274462744727448274492745027451274522745327454274552745627457274582745927460274612746227463274642746527466274672746827469274702747127472274732747427475274762747727478274792748027481274822748327484274852748627487274882748927490274912749227493274942749527496274972749827499275002750127502275032750427505275062750727508275092751027511275122751327514275152751627517275182751927520275212752227523275242752527526275272752827529275302753127532275332753427535275362753727538275392754027541275422754327544275452754627547275482754927550275512755227553275542755527556275572755827559275602756127562275632756427565275662756727568275692757027571275722757327574275752757627577275782757927580275812758227583275842758527586275872758827589275902759127592275932759427595275962759727598275992760027601276022760327604276052760627607276082760927610276112761227613276142761527616276172761827619276202762127622276232762427625276262762727628276292763027631276322763327634276352763627637276382763927640276412764227643276442764527646276472764827649276502765127652276532765427655276562765727658276592766027661276622766327664276652766627667276682766927670276712767227673276742767527676276772767827679276802768127682276832768427685276862768727688276892769027691276922769327694276952769627697276982769927700277012770227703277042770527706277072770827709277102771127712277132771427715277162771727718277192772027721277222772327724277252772627727277282772927730277312773227733277342773527736277372773827739277402774127742277432774427745277462774727748277492775027751277522775327754277552775627757277582775927760277612776227763277642776527766277672776827769277702777127772277732777427775277762777727778277792778027781277822778327784277852778627787277882778927790277912779227793277942779527796277972779827799278002780127802278032780427805278062780727808278092781027811278122781327814278152781627817278182781927820278212782227823278242782527826278272782827829278302783127832278332783427835278362783727838278392784027841278422784327844278452784627847278482784927850278512785227853278542785527856278572785827859278602786127862278632786427865278662786727868278692787027871278722787327874278752787627877278782787927880278812788227883278842788527886278872788827889278902789127892278932789427895278962789727898278992790027901279022790327904279052790627907279082790927910279112791227913279142791527916279172791827919279202792127922279232792427925279262792727928279292793027931279322793327934279352793627937279382793927940279412794227943279442794527946279472794827949279502795127952279532795427955279562795727958279592796027961279622796327964279652796627967279682796927970279712797227973279742797527976279772797827979279802798127982279832798427985279862798727988279892799027991279922799327994279952799627997279982799928000280012800228003280042800528006280072800828009280102801128012280132801428015280162801728018280192802028021280222802328024280252802628027280282802928030280312803228033280342803528036280372803828039280402804128042280432804428045280462804728048280492805028051280522805328054280552805628057280582805928060280612806228063280642806528066280672806828069280702807128072280732807428075280762807728078280792808028081280822808328084280852808628087280882808928090280912809228093280942809528096280972809828099281002810128102281032810428105281062810728108281092811028111281122811328114281152811628117281182811928120281212812228123281242812528126281272812828129281302813128132281332813428135281362813728138281392814028141281422814328144281452814628147281482814928150281512815228153281542815528156281572815828159281602816128162281632816428165281662816728168281692817028171281722817328174281752817628177281782817928180281812818228183281842818528186281872818828189281902819128192281932819428195281962819728198281992820028201282022820328204282052820628207282082820928210282112821228213282142821528216282172821828219282202822128222282232822428225282262822728228282292823028231282322823328234282352823628237282382823928240282412824228243282442824528246282472824828249282502825128252282532825428255282562825728258282592826028261282622826328264282652826628267282682826928270282712827228273282742827528276282772827828279282802828128282282832828428285282862828728288282892829028291282922829328294282952829628297282982829928300283012830228303283042830528306283072830828309283102831128312283132831428315283162831728318283192832028321283222832328324283252832628327283282832928330283312833228333283342833528336283372833828339283402834128342283432834428345283462834728348283492835028351283522835328354283552835628357283582835928360283612836228363283642836528366283672836828369283702837128372283732837428375283762837728378283792838028381283822838328384283852838628387283882838928390283912839228393283942839528396283972839828399284002840128402284032840428405284062840728408284092841028411284122841328414284152841628417284182841928420284212842228423284242842528426284272842828429284302843128432284332843428435284362843728438284392844028441284422844328444284452844628447284482844928450284512845228453284542845528456284572845828459284602846128462284632846428465284662846728468284692847028471284722847328474284752847628477284782847928480284812848228483284842848528486284872848828489284902849128492284932849428495284962849728498284992850028501285022850328504285052850628507285082850928510285112851228513285142851528516285172851828519285202852128522285232852428525285262852728528285292853028531285322853328534285352853628537285382853928540285412854228543285442854528546285472854828549285502855128552285532855428555285562855728558285592856028561285622856328564285652856628567285682856928570285712857228573285742857528576285772857828579285802858128582285832858428585285862858728588285892859028591285922859328594285952859628597285982859928600286012860228603286042860528606286072860828609286102861128612286132861428615286162861728618286192862028621286222862328624286252862628627286282862928630286312863228633286342863528636286372863828639286402864128642286432864428645286462864728648286492865028651286522865328654286552865628657286582865928660286612866228663286642866528666286672866828669286702867128672286732867428675286762867728678286792868028681286822868328684286852868628687286882868928690286912869228693286942869528696286972869828699287002870128702287032870428705287062870728708287092871028711287122871328714287152871628717287182871928720287212872228723287242872528726287272872828729287302873128732287332873428735287362873728738287392874028741287422874328744287452874628747287482874928750287512875228753287542875528756287572875828759287602876128762287632876428765287662876728768287692877028771287722877328774287752877628777287782877928780287812878228783287842878528786287872878828789287902879128792287932879428795287962879728798287992880028801288022880328804288052880628807288082880928810288112881228813288142881528816288172881828819288202882128822288232882428825288262882728828288292883028831288322883328834288352883628837288382883928840288412884228843288442884528846288472884828849288502885128852288532885428855288562885728858288592886028861288622886328864288652886628867288682886928870288712887228873288742887528876288772887828879288802888128882288832888428885288862888728888288892889028891288922889328894288952889628897288982889928900289012890228903289042890528906289072890828909289102891128912289132891428915289162891728918289192892028921289222892328924289252892628927289282892928930289312893228933289342893528936289372893828939289402894128942289432894428945289462894728948289492895028951289522895328954289552895628957289582895928960289612896228963289642896528966289672896828969289702897128972289732897428975289762897728978289792898028981289822898328984289852898628987289882898928990289912899228993289942899528996289972899828999290002900129002290032900429005290062900729008290092901029011290122901329014290152901629017290182901929020290212902229023290242902529026290272902829029290302903129032290332903429035290362903729038290392904029041290422904329044290452904629047290482904929050290512905229053290542905529056290572905829059290602906129062290632906429065290662906729068290692907029071290722907329074290752907629077290782907929080290812908229083290842908529086290872908829089290902909129092290932909429095290962909729098290992910029101291022910329104291052910629107291082910929110291112911229113291142911529116291172911829119291202912129122291232912429125291262912729128291292913029131291322913329134291352913629137291382913929140291412914229143291442914529146291472914829149291502915129152291532915429155291562915729158291592916029161291622916329164291652916629167291682916929170291712917229173291742917529176291772917829179291802918129182291832918429185291862918729188291892919029191291922919329194291952919629197291982919929200292012920229203292042920529206292072920829209292102921129212292132921429215292162921729218292192922029221292222922329224292252922629227292282922929230292312923229233292342923529236292372923829239292402924129242292432924429245292462924729248292492925029251292522925329254292552925629257292582925929260292612926229263292642926529266292672926829269292702927129272292732927429275292762927729278292792928029281292822928329284292852928629287292882928929290292912929229293292942929529296292972929829299293002930129302293032930429305293062930729308293092931029311293122931329314293152931629317293182931929320293212932229323293242932529326293272932829329293302933129332293332933429335293362933729338293392934029341293422934329344293452934629347293482934929350293512935229353293542935529356293572935829359293602936129362293632936429365293662936729368293692937029371293722937329374293752937629377293782937929380293812938229383293842938529386293872938829389293902939129392293932939429395293962939729398293992940029401294022940329404294052940629407294082940929410294112941229413294142941529416294172941829419294202942129422294232942429425294262942729428294292943029431294322943329434294352943629437294382943929440294412944229443294442944529446294472944829449294502945129452294532945429455294562945729458294592946029461294622946329464294652946629467294682946929470294712947229473294742947529476294772947829479294802948129482294832948429485294862948729488294892949029491294922949329494294952949629497294982949929500295012950229503295042950529506295072950829509295102951129512295132951429515295162951729518295192952029521295222952329524295252952629527295282952929530295312953229533295342953529536295372953829539295402954129542295432954429545295462954729548295492955029551295522955329554295552955629557295582955929560295612956229563295642956529566295672956829569295702957129572295732957429575295762957729578295792958029581295822958329584295852958629587295882958929590295912959229593295942959529596295972959829599296002960129602296032960429605296062960729608296092961029611296122961329614296152961629617296182961929620296212962229623296242962529626296272962829629296302963129632296332963429635296362963729638296392964029641296422964329644296452964629647296482964929650296512965229653296542965529656296572965829659296602966129662296632966429665296662966729668296692967029671296722967329674296752967629677296782967929680296812968229683296842968529686296872968829689296902969129692296932969429695296962969729698296992970029701297022970329704297052970629707297082970929710297112971229713297142971529716297172971829719297202972129722297232972429725297262972729728297292973029731297322973329734297352973629737297382973929740297412974229743297442974529746297472974829749297502975129752297532975429755297562975729758297592976029761297622976329764297652976629767297682976929770297712977229773297742977529776297772977829779297802978129782297832978429785297862978729788297892979029791297922979329794297952979629797297982979929800298012980229803298042980529806298072980829809298102981129812298132981429815298162981729818298192982029821298222982329824298252982629827298282982929830298312983229833298342983529836298372983829839298402984129842298432984429845298462984729848298492985029851298522985329854298552985629857298582985929860298612986229863298642986529866298672986829869298702987129872298732987429875298762987729878298792988029881298822988329884298852988629887298882988929890298912989229893298942989529896298972989829899299002990129902299032990429905299062990729908299092991029911299122991329914299152991629917299182991929920299212992229923299242992529926299272992829929299302993129932299332993429935299362993729938299392994029941299422994329944299452994629947299482994929950299512995229953299542995529956299572995829959299602996129962299632996429965299662996729968299692997029971299722997329974299752997629977299782997929980299812998229983299842998529986299872998829989299902999129992299932999429995299962999729998299993000030001300023000330004300053000630007300083000930010300113001230013300143001530016300173001830019300203002130022300233002430025300263002730028300293003030031300323003330034300353003630037300383003930040300413004230043300443004530046300473004830049300503005130052300533005430055300563005730058300593006030061300623006330064300653006630067300683006930070300713007230073300743007530076300773007830079300803008130082300833008430085300863008730088300893009030091300923009330094300953009630097300983009930100301013010230103301043010530106301073010830109301103011130112301133011430115301163011730118301193012030121301223012330124301253012630127301283012930130301313013230133301343013530136301373013830139301403014130142301433014430145301463014730148301493015030151301523015330154301553015630157301583015930160301613016230163301643016530166301673016830169301703017130172301733017430175301763017730178301793018030181301823018330184301853018630187301883018930190301913019230193301943019530196301973019830199302003020130202302033020430205302063020730208302093021030211302123021330214302153021630217302183021930220302213022230223302243022530226302273022830229302303023130232302333023430235302363023730238302393024030241302423024330244302453024630247302483024930250302513025230253302543025530256302573025830259302603026130262302633026430265302663026730268302693027030271302723027330274302753027630277302783027930280302813028230283302843028530286302873028830289302903029130292302933029430295302963029730298302993030030301303023030330304303053030630307303083030930310303113031230313303143031530316303173031830319303203032130322303233032430325303263032730328303293033030331303323033330334303353033630337303383033930340303413034230343303443034530346303473034830349303503035130352303533035430355303563035730358303593036030361303623036330364303653036630367303683036930370303713037230373303743037530376303773037830379303803038130382303833038430385303863038730388303893039030391303923039330394303953039630397303983039930400304013040230403304043040530406304073040830409304103041130412304133041430415304163041730418304193042030421304223042330424304253042630427304283042930430304313043230433304343043530436304373043830439304403044130442304433044430445304463044730448304493045030451304523045330454304553045630457304583045930460304613046230463304643046530466304673046830469304703047130472304733047430475304763047730478304793048030481304823048330484304853048630487304883048930490304913049230493304943049530496304973049830499305003050130502305033050430505305063050730508305093051030511305123051330514305153051630517305183051930520305213052230523305243052530526305273052830529305303053130532305333053430535305363053730538305393054030541305423054330544305453054630547305483054930550305513055230553305543055530556305573055830559305603056130562305633056430565305663056730568305693057030571305723057330574305753057630577305783057930580305813058230583305843058530586305873058830589305903059130592305933059430595305963059730598305993060030601306023060330604306053060630607306083060930610306113061230613306143061530616306173061830619306203062130622306233062430625306263062730628306293063030631306323063330634306353063630637306383063930640306413064230643306443064530646306473064830649306503065130652306533065430655306563065730658306593066030661306623066330664306653066630667306683066930670306713067230673306743067530676306773067830679306803068130682306833068430685306863068730688306893069030691306923069330694306953069630697306983069930700307013070230703307043070530706307073070830709307103071130712307133071430715307163071730718307193072030721307223072330724307253072630727307283072930730307313073230733307343073530736307373073830739307403074130742307433074430745307463074730748307493075030751307523075330754307553075630757307583075930760307613076230763307643076530766307673076830769307703077130772307733077430775307763077730778307793078030781307823078330784307853078630787307883078930790307913079230793307943079530796307973079830799308003080130802308033080430805308063080730808308093081030811308123081330814308153081630817308183081930820308213082230823308243082530826308273082830829308303083130832308333083430835308363083730838308393084030841308423084330844308453084630847308483084930850308513085230853308543085530856308573085830859308603086130862308633086430865308663086730868308693087030871308723087330874308753087630877308783087930880308813088230883308843088530886308873088830889308903089130892308933089430895308963089730898308993090030901309023090330904309053090630907309083090930910309113091230913309143091530916309173091830919309203092130922309233092430925309263092730928309293093030931309323093330934309353093630937309383093930940309413094230943309443094530946309473094830949309503095130952309533095430955309563095730958309593096030961309623096330964309653096630967309683096930970309713097230973309743097530976309773097830979309803098130982309833098430985309863098730988309893099030991309923099330994309953099630997309983099931000310013100231003310043100531006310073100831009310103101131012310133101431015310163101731018310193102031021310223102331024310253102631027310283102931030310313103231033310343103531036310373103831039310403104131042310433104431045310463104731048310493105031051310523105331054310553105631057310583105931060310613106231063310643106531066310673106831069310703107131072310733107431075310763107731078310793108031081310823108331084310853108631087310883108931090310913109231093310943109531096310973109831099311003110131102311033110431105311063110731108311093111031111311123111331114311153111631117311183111931120311213112231123311243112531126311273112831129311303113131132311333113431135311363113731138311393114031141311423114331144311453114631147311483114931150311513115231153311543115531156311573115831159311603116131162311633116431165311663116731168311693117031171311723117331174311753117631177311783117931180311813118231183311843118531186311873118831189311903119131192311933119431195311963119731198311993120031201312023120331204312053120631207312083120931210312113121231213312143121531216312173121831219312203122131222312233122431225312263122731228312293123031231312323123331234312353123631237312383123931240312413124231243312443124531246312473124831249312503125131252312533125431255312563125731258312593126031261312623126331264312653126631267312683126931270312713127231273312743127531276312773127831279312803128131282312833128431285312863128731288312893129031291312923129331294312953129631297312983129931300313013130231303313043130531306313073130831309313103131131312313133131431315313163131731318313193132031321313223132331324313253132631327313283132931330313313133231333313343133531336313373133831339313403134131342313433134431345313463134731348313493135031351313523135331354313553135631357313583135931360313613136231363313643136531366313673136831369313703137131372313733137431375313763137731378313793138031381313823138331384313853138631387313883138931390313913139231393313943139531396313973139831399314003140131402314033140431405314063140731408314093141031411314123141331414314153141631417314183141931420314213142231423314243142531426314273142831429314303143131432314333143431435314363143731438314393144031441314423144331444314453144631447314483144931450314513145231453314543145531456314573145831459314603146131462314633146431465314663146731468314693147031471314723147331474314753147631477314783147931480314813148231483314843148531486314873148831489314903149131492314933149431495314963149731498314993150031501315023150331504315053150631507315083150931510315113151231513315143151531516315173151831519315203152131522315233152431525315263152731528315293153031531315323153331534315353153631537315383153931540315413154231543315443154531546315473154831549315503155131552315533155431555315563155731558315593156031561315623156331564315653156631567315683156931570315713157231573315743157531576315773157831579315803158131582315833158431585315863158731588315893159031591315923159331594315953159631597315983159931600316013160231603316043160531606316073160831609316103161131612316133161431615316163161731618316193162031621316223162331624316253162631627316283162931630316313163231633316343163531636316373163831639316403164131642316433164431645316463164731648316493165031651316523165331654316553165631657316583165931660316613166231663316643166531666316673166831669316703167131672316733167431675316763167731678316793168031681316823168331684316853168631687316883168931690316913169231693316943169531696316973169831699317003170131702317033170431705317063170731708317093171031711317123171331714317153171631717317183171931720317213172231723317243172531726317273172831729317303173131732317333173431735317363173731738317393174031741317423174331744317453174631747317483174931750317513175231753317543175531756317573175831759317603176131762317633176431765317663176731768317693177031771317723177331774317753177631777317783177931780317813178231783317843178531786317873178831789317903179131792317933179431795317963179731798317993180031801318023180331804318053180631807318083180931810318113181231813318143181531816318173181831819318203182131822318233182431825318263182731828318293183031831318323183331834318353183631837318383183931840318413184231843318443184531846318473184831849318503185131852318533185431855318563185731858318593186031861318623186331864318653186631867318683186931870318713187231873318743187531876318773187831879318803188131882318833188431885318863188731888318893189031891318923189331894318953189631897318983189931900319013190231903319043190531906319073190831909319103191131912319133191431915319163191731918319193192031921319223192331924319253192631927319283192931930319313193231933319343193531936319373193831939319403194131942319433194431945319463194731948319493195031951319523195331954319553195631957319583195931960319613196231963319643196531966319673196831969319703197131972319733197431975319763197731978319793198031981319823198331984319853198631987319883198931990319913199231993319943199531996319973199831999320003200132002320033200432005320063200732008320093201032011320123201332014320153201632017320183201932020320213202232023320243202532026320273202832029320303203132032320333203432035320363203732038320393204032041320423204332044320453204632047320483204932050320513205232053320543205532056320573205832059320603206132062320633206432065320663206732068320693207032071320723207332074320753207632077320783207932080320813208232083320843208532086320873208832089320903209132092320933209432095320963209732098320993210032101321023210332104321053210632107321083210932110321113211232113321143211532116321173211832119321203212132122321233212432125321263212732128321293213032131321323213332134321353213632137321383213932140321413214232143321443214532146321473214832149321503215132152321533215432155321563215732158321593216032161321623216332164321653216632167321683216932170321713217232173321743217532176321773217832179321803218132182321833218432185321863218732188321893219032191321923219332194321953219632197321983219932200322013220232203322043220532206322073220832209322103221132212322133221432215322163221732218322193222032221322223222332224322253222632227322283222932230322313223232233322343223532236322373223832239322403224132242322433224432245322463224732248322493225032251322523225332254322553225632257322583225932260322613226232263322643226532266322673226832269322703227132272322733227432275322763227732278322793228032281322823228332284322853228632287322883228932290322913229232293322943229532296322973229832299323003230132302323033230432305323063230732308323093231032311323123231332314323153231632317323183231932320323213232232323323243232532326323273232832329323303233132332323333233432335323363233732338323393234032341323423234332344323453234632347323483234932350323513235232353323543235532356323573235832359323603236132362323633236432365323663236732368323693237032371323723237332374323753237632377323783237932380323813238232383323843238532386323873238832389323903239132392323933239432395323963239732398323993240032401324023240332404324053240632407324083240932410324113241232413324143241532416324173241832419324203242132422324233242432425324263242732428324293243032431324323243332434324353243632437324383243932440324413244232443324443244532446324473244832449324503245132452324533245432455324563245732458324593246032461324623246332464324653246632467324683246932470324713247232473324743247532476324773247832479324803248132482324833248432485324863248732488324893249032491324923249332494324953249632497324983249932500325013250232503325043250532506325073250832509325103251132512325133251432515325163251732518325193252032521325223252332524325253252632527325283252932530325313253232533325343253532536325373253832539325403254132542325433254432545325463254732548325493255032551325523255332554325553255632557325583255932560325613256232563325643256532566325673256832569325703257132572325733257432575325763257732578325793258032581325823258332584325853258632587325883258932590325913259232593325943259532596325973259832599326003260132602326033260432605326063260732608326093261032611326123261332614326153261632617326183261932620326213262232623326243262532626326273262832629326303263132632326333263432635326363263732638326393264032641326423264332644326453264632647326483264932650326513265232653326543265532656326573265832659326603266132662326633266432665326663266732668326693267032671326723267332674326753267632677326783267932680326813268232683326843268532686326873268832689326903269132692326933269432695326963269732698326993270032701327023270332704327053270632707327083270932710327113271232713327143271532716327173271832719327203272132722327233272432725327263272732728327293273032731327323273332734327353273632737327383273932740327413274232743327443274532746327473274832749327503275132752327533275432755327563275732758327593276032761327623276332764327653276632767327683276932770327713277232773327743277532776327773277832779327803278132782327833278432785327863278732788327893279032791327923279332794327953279632797327983279932800328013280232803328043280532806328073280832809328103281132812328133281432815328163281732818328193282032821328223282332824328253282632827328283282932830328313283232833328343283532836328373283832839328403284132842328433284432845328463284732848328493285032851328523285332854328553285632857328583285932860328613286232863328643286532866328673286832869328703287132872328733287432875328763287732878328793288032881328823288332884328853288632887328883288932890328913289232893328943289532896328973289832899329003290132902329033290432905329063290732908329093291032911329123291332914329153291632917329183291932920329213292232923329243292532926329273292832929329303293132932329333293432935329363293732938329393294032941329423294332944329453294632947329483294932950329513295232953329543295532956329573295832959329603296132962329633296432965329663296732968329693297032971329723297332974329753297632977329783297932980329813298232983329843298532986329873298832989329903299132992329933299432995329963299732998329993300033001330023300333004330053300633007330083300933010330113301233013330143301533016330173301833019330203302133022330233302433025330263302733028330293303033031330323303333034330353303633037330383303933040330413304233043330443304533046330473304833049330503305133052330533305433055330563305733058330593306033061330623306333064330653306633067330683306933070330713307233073330743307533076330773307833079330803308133082330833308433085330863308733088330893309033091330923309333094330953309633097330983309933100331013310233103331043310533106331073310833109331103311133112331133311433115331163311733118331193312033121331223312333124331253312633127331283312933130331313313233133331343313533136331373313833139331403314133142331433314433145331463314733148331493315033151331523315333154331553315633157331583315933160331613316233163331643316533166331673316833169331703317133172331733317433175331763317733178331793318033181331823318333184331853318633187331883318933190331913319233193331943319533196331973319833199332003320133202332033320433205332063320733208332093321033211332123321333214332153321633217332183321933220332213322233223332243322533226332273322833229332303323133232332333323433235332363323733238332393324033241332423324333244332453324633247332483324933250332513325233253332543325533256332573325833259332603326133262332633326433265332663326733268332693327033271332723327333274332753327633277332783327933280332813328233283332843328533286332873328833289332903329133292332933329433295332963329733298332993330033301333023330333304333053330633307333083330933310333113331233313333143331533316333173331833319333203332133322333233332433325333263332733328333293333033331333323333333334333353333633337333383333933340333413334233343333443334533346333473334833349333503335133352333533335433355333563335733358333593336033361333623336333364333653336633367333683336933370333713337233373333743337533376333773337833379333803338133382333833338433385333863338733388333893339033391333923339333394333953339633397333983339933400334013340233403334043340533406334073340833409334103341133412334133341433415334163341733418334193342033421334223342333424334253342633427334283342933430334313343233433334343343533436334373343833439334403344133442334433344433445334463344733448334493345033451334523345333454334553345633457334583345933460334613346233463334643346533466334673346833469334703347133472334733347433475334763347733478334793348033481334823348333484334853348633487334883348933490334913349233493334943349533496334973349833499335003350133502335033350433505335063350733508335093351033511335123351333514335153351633517335183351933520335213352233523335243352533526335273352833529335303353133532335333353433535335363353733538335393354033541335423354333544335453354633547335483354933550335513355233553335543355533556335573355833559335603356133562335633356433565335663356733568335693357033571335723357333574335753357633577335783357933580335813358233583335843358533586335873358833589335903359133592335933359433595335963359733598335993360033601336023360333604336053360633607336083360933610336113361233613336143361533616336173361833619336203362133622336233362433625336263362733628336293363033631336323363333634336353363633637336383363933640336413364233643336443364533646336473364833649336503365133652336533365433655336563365733658336593366033661336623366333664336653366633667336683366933670336713367233673336743367533676336773367833679336803368133682336833368433685336863368733688336893369033691336923369333694336953369633697336983369933700337013370233703337043370533706337073370833709337103371133712337133371433715337163371733718337193372033721337223372333724337253372633727337283372933730337313373233733337343373533736337373373833739337403374133742337433374433745337463374733748337493375033751337523375333754337553375633757337583375933760337613376233763337643376533766337673376833769337703377133772337733377433775337763377733778337793378033781337823378333784337853378633787337883378933790337913379233793337943379533796337973379833799338003380133802338033380433805338063380733808338093381033811338123381333814338153381633817338183381933820338213382233823338243382533826338273382833829338303383133832338333383433835338363383733838338393384033841338423384333844338453384633847338483384933850338513385233853338543385533856338573385833859338603386133862338633386433865338663386733868338693387033871338723387333874338753387633877338783387933880338813388233883338843388533886338873388833889338903389133892338933389433895338963389733898338993390033901339023390333904339053390633907339083390933910339113391233913339143391533916339173391833919339203392133922339233392433925339263392733928339293393033931339323393333934339353393633937339383393933940339413394233943339443394533946339473394833949339503395133952339533395433955339563395733958339593396033961339623396333964339653396633967339683396933970339713397233973339743397533976339773397833979339803398133982339833398433985339863398733988339893399033991339923399333994339953399633997339983399934000340013400234003340043400534006340073400834009340103401134012340133401434015340163401734018340193402034021340223402334024340253402634027340283402934030340313403234033340343403534036340373403834039340403404134042340433404434045340463404734048340493405034051340523405334054340553405634057340583405934060340613406234063340643406534066340673406834069340703407134072340733407434075340763407734078340793408034081340823408334084340853408634087340883408934090340913409234093340943409534096340973409834099341003410134102341033410434105341063410734108341093411034111341123411334114341153411634117341183411934120341213412234123341243412534126341273412834129341303413134132341333413434135341363413734138341393414034141341423414334144341453414634147341483414934150341513415234153341543415534156341573415834159341603416134162341633416434165341663416734168341693417034171341723417334174341753417634177341783417934180341813418234183341843418534186341873418834189341903419134192341933419434195341963419734198341993420034201342023420334204342053420634207342083420934210342113421234213342143421534216342173421834219342203422134222342233422434225342263422734228342293423034231342323423334234342353423634237342383423934240342413424234243342443424534246342473424834249342503425134252342533425434255342563425734258342593426034261342623426334264342653426634267342683426934270342713427234273342743427534276342773427834279342803428134282342833428434285342863428734288342893429034291342923429334294342953429634297342983429934300343013430234303343043430534306343073430834309343103431134312343133431434315343163431734318343193432034321343223432334324343253432634327343283432934330343313433234333343343433534336343373433834339343403434134342343433434434345343463434734348343493435034351343523435334354343553435634357343583435934360343613436234363343643436534366343673436834369343703437134372343733437434375343763437734378343793438034381343823438334384343853438634387343883438934390343913439234393343943439534396343973439834399344003440134402344033440434405344063440734408344093441034411344123441334414344153441634417344183441934420344213442234423344243442534426344273442834429344303443134432344333443434435344363443734438344393444034441344423444334444344453444634447344483444934450344513445234453344543445534456344573445834459344603446134462344633446434465344663446734468344693447034471344723447334474344753447634477344783447934480344813448234483344843448534486344873448834489344903449134492344933449434495344963449734498344993450034501345023450334504345053450634507345083450934510345113451234513345143451534516345173451834519345203452134522345233452434525345263452734528345293453034531345323453334534345353453634537345383453934540345413454234543345443454534546345473454834549345503455134552345533455434555345563455734558345593456034561345623456334564345653456634567345683456934570345713457234573345743457534576345773457834579345803458134582345833458434585345863458734588345893459034591345923459334594345953459634597345983459934600346013460234603346043460534606346073460834609346103461134612346133461434615346163461734618346193462034621346223462334624346253462634627346283462934630346313463234633346343463534636346373463834639346403464134642346433464434645346463464734648346493465034651346523465334654346553465634657346583465934660346613466234663346643466534666346673466834669346703467134672346733467434675346763467734678346793468034681346823468334684346853468634687346883468934690346913469234693346943469534696346973469834699347003470134702347033470434705347063470734708347093471034711347123471334714347153471634717347183471934720347213472234723347243472534726347273472834729347303473134732347333473434735347363473734738347393474034741347423474334744347453474634747347483474934750347513475234753347543475534756347573475834759347603476134762347633476434765347663476734768347693477034771347723477334774347753477634777347783477934780347813478234783347843478534786347873478834789347903479134792347933479434795347963479734798347993480034801348023480334804348053480634807348083480934810348113481234813348143481534816348173481834819348203482134822348233482434825348263482734828348293483034831348323483334834348353483634837348383483934840348413484234843348443484534846348473484834849348503485134852348533485434855348563485734858348593486034861348623486334864348653486634867348683486934870348713487234873348743487534876348773487834879348803488134882348833488434885348863488734888348893489034891348923489334894348953489634897348983489934900349013490234903349043490534906349073490834909349103491134912349133491434915349163491734918349193492034921349223492334924349253492634927349283492934930349313493234933349343493534936349373493834939349403494134942349433494434945349463494734948349493495034951349523495334954349553495634957349583495934960349613496234963349643496534966349673496834969349703497134972349733497434975349763497734978349793498034981349823498334984349853498634987349883498934990349913499234993349943499534996349973499834999350003500135002350033500435005350063500735008350093501035011350123501335014350153501635017350183501935020350213502235023350243502535026350273502835029350303503135032350333503435035350363503735038350393504035041350423504335044350453504635047350483504935050350513505235053350543505535056350573505835059350603506135062350633506435065350663506735068350693507035071350723507335074350753507635077350783507935080350813508235083350843508535086350873508835089350903509135092350933509435095350963509735098350993510035101351023510335104351053510635107351083510935110351113511235113351143511535116351173511835119351203512135122351233512435125351263512735128351293513035131351323513335134351353513635137351383513935140351413514235143351443514535146351473514835149351503515135152351533515435155351563515735158351593516035161351623516335164351653516635167351683516935170351713517235173351743517535176351773517835179351803518135182351833518435185351863518735188351893519035191351923519335194351953519635197351983519935200352013520235203352043520535206352073520835209352103521135212352133521435215352163521735218352193522035221352223522335224352253522635227352283522935230352313523235233352343523535236352373523835239352403524135242352433524435245352463524735248352493525035251352523525335254352553525635257352583525935260352613526235263352643526535266352673526835269352703527135272352733527435275352763527735278352793528035281352823528335284352853528635287352883528935290352913529235293352943529535296352973529835299353003530135302353033530435305353063530735308353093531035311353123531335314353153531635317353183531935320353213532235323353243532535326353273532835329353303533135332353333533435335353363533735338353393534035341353423534335344353453534635347353483534935350353513535235353353543535535356353573535835359353603536135362353633536435365353663536735368353693537035371353723537335374353753537635377353783537935380353813538235383353843538535386353873538835389353903539135392353933539435395353963539735398353993540035401354023540335404354053540635407354083540935410354113541235413354143541535416354173541835419354203542135422354233542435425354263542735428354293543035431354323543335434354353543635437354383543935440354413544235443354443544535446354473544835449354503545135452354533545435455354563545735458354593546035461354623546335464354653546635467354683546935470354713547235473354743547535476354773547835479354803548135482354833548435485354863548735488354893549035491354923549335494354953549635497354983549935500355013550235503355043550535506355073550835509355103551135512355133551435515355163551735518355193552035521355223552335524355253552635527355283552935530355313553235533355343553535536355373553835539355403554135542355433554435545355463554735548355493555035551355523555335554355553555635557355583555935560355613556235563355643556535566355673556835569355703557135572355733557435575355763557735578355793558035581355823558335584355853558635587355883558935590355913559235593355943559535596355973559835599356003560135602356033560435605356063560735608356093561035611356123561335614356153561635617356183561935620356213562235623356243562535626356273562835629356303563135632356333563435635356363563735638356393564035641356423564335644356453564635647356483564935650356513565235653356543565535656356573565835659356603566135662356633566435665356663566735668356693567035671356723567335674356753567635677356783567935680356813568235683356843568535686356873568835689356903569135692356933569435695356963569735698356993570035701357023570335704357053570635707357083570935710357113571235713357143571535716357173571835719357203572135722357233572435725357263572735728357293573035731357323573335734357353573635737357383573935740357413574235743357443574535746357473574835749357503575135752357533575435755357563575735758357593576035761357623576335764357653576635767357683576935770357713577235773357743577535776357773577835779357803578135782357833578435785357863578735788357893579035791357923579335794357953579635797357983579935800358013580235803358043580535806358073580835809358103581135812358133581435815358163581735818358193582035821358223582335824358253582635827358283582935830358313583235833358343583535836358373583835839358403584135842358433584435845358463584735848358493585035851358523585335854358553585635857358583585935860358613586235863358643586535866358673586835869358703587135872358733587435875358763587735878358793588035881358823588335884358853588635887358883588935890358913589235893358943589535896358973589835899359003590135902359033590435905359063590735908359093591035911359123591335914359153591635917359183591935920359213592235923359243592535926359273592835929359303593135932359333593435935359363593735938359393594035941359423594335944359453594635947359483594935950359513595235953359543595535956359573595835959359603596135962359633596435965359663596735968359693597035971359723597335974359753597635977359783597935980359813598235983359843598535986359873598835989359903599135992359933599435995359963599735998359993600036001360023600336004360053600636007360083600936010360113601236013360143601536016360173601836019360203602136022360233602436025360263602736028360293603036031360323603336034360353603636037360383603936040360413604236043360443604536046360473604836049360503605136052360533605436055360563605736058360593606036061360623606336064360653606636067360683606936070360713607236073360743607536076360773607836079360803608136082360833608436085360863608736088360893609036091360923609336094360953609636097360983609936100361013610236103361043610536106361073610836109361103611136112361133611436115361163611736118361193612036121361223612336124361253612636127361283612936130361313613236133361343613536136361373613836139361403614136142361433614436145361463614736148361493615036151361523615336154361553615636157361583615936160361613616236163361643616536166361673616836169361703617136172361733617436175361763617736178361793618036181361823618336184361853618636187361883618936190361913619236193361943619536196361973619836199362003620136202362033620436205362063620736208362093621036211362123621336214362153621636217362183621936220362213622236223362243622536226362273622836229362303623136232362333623436235362363623736238362393624036241362423624336244362453624636247362483624936250362513625236253362543625536256362573625836259362603626136262362633626436265362663626736268362693627036271362723627336274362753627636277362783627936280362813628236283362843628536286362873628836289362903629136292362933629436295362963629736298362993630036301363023630336304363053630636307363083630936310363113631236313363143631536316363173631836319363203632136322363233632436325363263632736328363293633036331363323633336334363353633636337363383633936340363413634236343363443634536346363473634836349363503635136352363533635436355363563635736358363593636036361363623636336364363653636636367363683636936370363713637236373363743637536376363773637836379363803638136382363833638436385363863638736388363893639036391363923639336394363953639636397363983639936400364013640236403364043640536406364073640836409364103641136412364133641436415364163641736418364193642036421364223642336424364253642636427364283642936430364313643236433364343643536436364373643836439364403644136442364433644436445364463644736448364493645036451364523645336454364553645636457364583645936460364613646236463364643646536466364673646836469364703647136472364733647436475364763647736478364793648036481364823648336484364853648636487364883648936490364913649236493364943649536496364973649836499365003650136502365033650436505365063650736508365093651036511365123651336514365153651636517365183651936520365213652236523365243652536526365273652836529365303653136532365333653436535365363653736538365393654036541365423654336544365453654636547365483654936550365513655236553365543655536556365573655836559365603656136562365633656436565365663656736568365693657036571365723657336574365753657636577365783657936580365813658236583365843658536586365873658836589365903659136592365933659436595365963659736598365993660036601366023660336604366053660636607366083660936610366113661236613366143661536616366173661836619366203662136622366233662436625366263662736628366293663036631366323663336634366353663636637366383663936640366413664236643366443664536646366473664836649366503665136652366533665436655366563665736658366593666036661366623666336664366653666636667366683666936670366713667236673366743667536676366773667836679366803668136682366833668436685366863668736688366893669036691366923669336694366953669636697366983669936700367013670236703367043670536706367073670836709367103671136712367133671436715367163671736718367193672036721367223672336724367253672636727367283672936730367313673236733367343673536736367373673836739367403674136742367433674436745367463674736748367493675036751367523675336754367553675636757367583675936760367613676236763367643676536766367673676836769367703677136772367733677436775367763677736778367793678036781367823678336784367853678636787367883678936790367913679236793367943679536796367973679836799368003680136802368033680436805368063680736808368093681036811368123681336814368153681636817368183681936820368213682236823368243682536826368273682836829368303683136832368333683436835368363683736838368393684036841368423684336844368453684636847368483684936850368513685236853368543685536856368573685836859368603686136862368633686436865368663686736868368693687036871368723687336874368753687636877368783687936880368813688236883368843688536886368873688836889368903689136892368933689436895368963689736898368993690036901369023690336904369053690636907369083690936910369113691236913369143691536916369173691836919369203692136922369233692436925369263692736928369293693036931369323693336934369353693636937369383693936940369413694236943369443694536946369473694836949369503695136952369533695436955369563695736958369593696036961369623696336964369653696636967369683696936970369713697236973369743697536976369773697836979369803698136982369833698436985369863698736988369893699036991369923699336994369953699636997369983699937000370013700237003370043700537006370073700837009370103701137012370133701437015370163701737018370193702037021370223702337024370253702637027370283702937030370313703237033370343703537036370373703837039370403704137042370433704437045370463704737048370493705037051370523705337054370553705637057370583705937060370613706237063370643706537066370673706837069370703707137072370733707437075370763707737078370793708037081370823708337084370853708637087370883708937090370913709237093370943709537096370973709837099371003710137102371033710437105371063710737108371093711037111371123711337114371153711637117371183711937120371213712237123371243712537126371273712837129371303713137132371333713437135371363713737138371393714037141371423714337144371453714637147371483714937150371513715237153371543715537156371573715837159371603716137162371633716437165371663716737168371693717037171371723717337174371753717637177371783717937180371813718237183371843718537186371873718837189371903719137192371933719437195371963719737198371993720037201372023720337204372053720637207372083720937210372113721237213372143721537216372173721837219372203722137222372233722437225372263722737228372293723037231372323723337234372353723637237372383723937240372413724237243372443724537246372473724837249372503725137252372533725437255372563725737258372593726037261372623726337264372653726637267372683726937270372713727237273372743727537276372773727837279372803728137282372833728437285372863728737288372893729037291372923729337294372953729637297372983729937300373013730237303373043730537306373073730837309373103731137312373133731437315373163731737318373193732037321373223732337324373253732637327373283732937330373313733237333373343733537336373373733837339373403734137342373433734437345373463734737348373493735037351373523735337354373553735637357373583735937360373613736237363373643736537366373673736837369373703737137372373733737437375373763737737378373793738037381373823738337384373853738637387373883738937390373913739237393373943739537396373973739837399374003740137402374033740437405374063740737408374093741037411374123741337414374153741637417374183741937420374213742237423374243742537426374273742837429374303743137432374333743437435374363743737438374393744037441374423744337444374453744637447374483744937450374513745237453374543745537456374573745837459374603746137462374633746437465374663746737468374693747037471374723747337474374753747637477374783747937480374813748237483374843748537486374873748837489374903749137492374933749437495374963749737498374993750037501375023750337504375053750637507375083750937510375113751237513375143751537516375173751837519375203752137522375233752437525375263752737528375293753037531375323753337534375353753637537375383753937540375413754237543375443754537546375473754837549375503755137552375533755437555375563755737558375593756037561375623756337564375653756637567375683756937570375713757237573375743757537576375773757837579375803758137582375833758437585375863758737588375893759037591375923759337594375953759637597375983759937600376013760237603376043760537606376073760837609376103761137612376133761437615376163761737618376193762037621376223762337624376253762637627376283762937630376313763237633376343763537636376373763837639376403764137642376433764437645376463764737648376493765037651376523765337654376553765637657376583765937660376613766237663376643766537666376673766837669376703767137672376733767437675376763767737678376793768037681376823768337684376853768637687376883768937690376913769237693376943769537696376973769837699377003770137702377033770437705377063770737708377093771037711377123771337714377153771637717377183771937720377213772237723377243772537726377273772837729377303773137732377333773437735377363773737738377393774037741377423774337744377453774637747377483774937750377513775237753377543775537756377573775837759377603776137762377633776437765377663776737768377693777037771377723777337774377753777637777377783777937780377813778237783377843778537786377873778837789377903779137792377933779437795377963779737798377993780037801378023780337804378053780637807378083780937810378113781237813378143781537816378173781837819378203782137822378233782437825378263782737828378293783037831378323783337834378353783637837378383783937840378413784237843378443784537846378473784837849378503785137852378533785437855378563785737858378593786037861378623786337864378653786637867378683786937870378713787237873378743787537876378773787837879378803788137882378833788437885378863788737888378893789037891378923789337894378953789637897378983789937900379013790237903379043790537906379073790837909379103791137912379133791437915379163791737918379193792037921379223792337924379253792637927379283792937930379313793237933379343793537936379373793837939379403794137942379433794437945379463794737948379493795037951379523795337954379553795637957379583795937960379613796237963379643796537966379673796837969379703797137972379733797437975379763797737978379793798037981379823798337984379853798637987379883798937990379913799237993379943799537996379973799837999380003800138002380033800438005380063800738008380093801038011380123801338014380153801638017380183801938020380213802238023380243802538026380273802838029380303803138032380333803438035380363803738038380393804038041380423804338044380453804638047380483804938050380513805238053380543805538056380573805838059380603806138062380633806438065380663806738068380693807038071380723807338074380753807638077380783807938080380813808238083380843808538086380873808838089380903809138092380933809438095380963809738098380993810038101381023810338104381053810638107381083810938110381113811238113381143811538116381173811838119381203812138122381233812438125381263812738128381293813038131381323813338134381353813638137381383813938140381413814238143381443814538146381473814838149381503815138152381533815438155381563815738158381593816038161381623816338164381653816638167381683816938170381713817238173381743817538176381773817838179381803818138182381833818438185381863818738188381893819038191381923819338194381953819638197381983819938200382013820238203382043820538206382073820838209382103821138212382133821438215382163821738218382193822038221382223822338224382253822638227382283822938230382313823238233382343823538236382373823838239382403824138242382433824438245382463824738248382493825038251382523825338254382553825638257382583825938260382613826238263382643826538266382673826838269382703827138272382733827438275382763827738278382793828038281382823828338284382853828638287382883828938290382913829238293382943829538296382973829838299383003830138302383033830438305383063830738308383093831038311383123831338314383153831638317383183831938320383213832238323383243832538326383273832838329383303833138332383333833438335383363833738338383393834038341383423834338344383453834638347383483834938350383513835238353383543835538356383573835838359383603836138362383633836438365383663836738368383693837038371383723837338374383753837638377383783837938380383813838238383383843838538386383873838838389383903839138392383933839438395383963839738398383993840038401384023840338404384053840638407384083840938410384113841238413384143841538416384173841838419384203842138422384233842438425384263842738428384293843038431384323843338434384353843638437384383843938440384413844238443384443844538446384473844838449384503845138452384533845438455384563845738458384593846038461384623846338464384653846638467384683846938470384713847238473384743847538476384773847838479384803848138482384833848438485384863848738488384893849038491384923849338494384953849638497384983849938500385013850238503385043850538506385073850838509385103851138512385133851438515385163851738518385193852038521385223852338524385253852638527385283852938530385313853238533385343853538536385373853838539385403854138542385433854438545385463854738548385493855038551385523855338554385553855638557385583855938560385613856238563385643856538566385673856838569385703857138572385733857438575385763857738578385793858038581385823858338584385853858638587385883858938590385913859238593385943859538596385973859838599386003860138602386033860438605386063860738608386093861038611386123861338614386153861638617386183861938620386213862238623386243862538626386273862838629386303863138632386333863438635386363863738638386393864038641386423864338644386453864638647386483864938650386513865238653386543865538656386573865838659386603866138662386633866438665386663866738668386693867038671386723867338674386753867638677386783867938680386813868238683386843868538686386873868838689386903869138692386933869438695386963869738698386993870038701387023870338704387053870638707387083870938710387113871238713387143871538716387173871838719387203872138722387233872438725387263872738728387293873038731387323873338734387353873638737387383873938740387413874238743387443874538746387473874838749387503875138752387533875438755387563875738758387593876038761387623876338764387653876638767387683876938770387713877238773387743877538776387773877838779387803878138782387833878438785387863878738788387893879038791387923879338794387953879638797387983879938800388013880238803388043880538806388073880838809388103881138812388133881438815388163881738818388193882038821388223882338824388253882638827388283882938830388313883238833388343883538836388373883838839388403884138842388433884438845388463884738848388493885038851388523885338854388553885638857388583885938860388613886238863388643886538866388673886838869388703887138872388733887438875388763887738878388793888038881388823888338884388853888638887388883888938890388913889238893388943889538896388973889838899389003890138902389033890438905389063890738908389093891038911389123891338914389153891638917389183891938920389213892238923389243892538926389273892838929389303893138932389333893438935389363893738938389393894038941389423894338944389453894638947389483894938950389513895238953389543895538956389573895838959389603896138962389633896438965389663896738968389693897038971389723897338974389753897638977389783897938980389813898238983389843898538986389873898838989389903899138992389933899438995389963899738998389993900039001390023900339004390053900639007390083900939010390113901239013390143901539016390173901839019390203902139022390233902439025390263902739028390293903039031390323903339034390353903639037390383903939040390413904239043390443904539046390473904839049390503905139052390533905439055390563905739058390593906039061390623906339064390653906639067390683906939070390713907239073390743907539076390773907839079390803908139082390833908439085390863908739088390893909039091390923909339094390953909639097390983909939100391013910239103391043910539106391073910839109391103911139112391133911439115391163911739118391193912039121391223912339124391253912639127391283912939130391313913239133391343913539136391373913839139391403914139142391433914439145391463914739148391493915039151391523915339154391553915639157391583915939160391613916239163391643916539166391673916839169391703917139172391733917439175391763917739178391793918039181391823918339184391853918639187391883918939190391913919239193391943919539196391973919839199392003920139202392033920439205392063920739208392093921039211392123921339214392153921639217392183921939220392213922239223392243922539226392273922839229392303923139232392333923439235392363923739238392393924039241392423924339244392453924639247392483924939250392513925239253392543925539256392573925839259392603926139262392633926439265392663926739268392693927039271392723927339274392753927639277392783927939280392813928239283392843928539286392873928839289392903929139292392933929439295392963929739298392993930039301393023930339304393053930639307393083930939310393113931239313393143931539316393173931839319393203932139322393233932439325393263932739328393293933039331393323933339334393353933639337393383933939340393413934239343393443934539346393473934839349393503935139352393533935439355393563935739358393593936039361393623936339364393653936639367393683936939370393713937239373393743937539376393773937839379393803938139382393833938439385393863938739388393893939039391393923939339394393953939639397393983939939400394013940239403394043940539406394073940839409394103941139412394133941439415394163941739418394193942039421394223942339424394253942639427394283942939430394313943239433394343943539436394373943839439394403944139442394433944439445394463944739448394493945039451394523945339454394553945639457394583945939460394613946239463394643946539466394673946839469394703947139472394733947439475394763947739478394793948039481394823948339484394853948639487394883948939490394913949239493394943949539496394973949839499395003950139502395033950439505395063950739508395093951039511395123951339514395153951639517395183951939520395213952239523395243952539526395273952839529395303953139532395333953439535395363953739538395393954039541395423954339544395453954639547395483954939550395513955239553395543955539556395573955839559395603956139562395633956439565395663956739568395693957039571395723957339574395753957639577395783957939580395813958239583395843958539586395873958839589395903959139592395933959439595395963959739598395993960039601396023960339604396053960639607396083960939610396113961239613396143961539616396173961839619396203962139622396233962439625396263962739628396293963039631396323963339634396353963639637396383963939640396413964239643396443964539646396473964839649396503965139652396533965439655396563965739658396593966039661396623966339664396653966639667396683966939670396713967239673396743967539676396773967839679396803968139682396833968439685396863968739688396893969039691396923969339694396953969639697396983969939700397013970239703397043970539706397073970839709397103971139712397133971439715397163971739718397193972039721397223972339724397253972639727397283972939730397313973239733397343973539736397373973839739397403974139742397433974439745397463974739748397493975039751397523975339754397553975639757397583975939760397613976239763397643976539766397673976839769397703977139772397733977439775397763977739778397793978039781397823978339784397853978639787397883978939790397913979239793397943979539796397973979839799398003980139802398033980439805398063980739808398093981039811398123981339814398153981639817398183981939820398213982239823398243982539826398273982839829398303983139832398333983439835398363983739838398393984039841398423984339844398453984639847398483984939850398513985239853398543985539856398573985839859398603986139862398633986439865398663986739868398693987039871398723987339874398753987639877398783987939880398813988239883398843988539886398873988839889398903989139892398933989439895398963989739898398993990039901399023990339904399053990639907399083990939910399113991239913399143991539916399173991839919399203992139922399233992439925399263992739928399293993039931399323993339934399353993639937399383993939940399413994239943399443994539946399473994839949399503995139952399533995439955399563995739958399593996039961399623996339964399653996639967399683996939970399713997239973399743997539976399773997839979399803998139982399833998439985399863998739988399893999039991399923999339994399953999639997399983999940000400014000240003400044000540006400074000840009400104001140012400134001440015400164001740018400194002040021400224002340024400254002640027400284002940030400314003240033400344003540036400374003840039400404004140042400434004440045400464004740048400494005040051400524005340054400554005640057400584005940060400614006240063400644006540066400674006840069400704007140072400734007440075400764007740078400794008040081400824008340084400854008640087400884008940090400914009240093400944009540096400974009840099401004010140102401034010440105401064010740108401094011040111401124011340114401154011640117401184011940120401214012240123401244012540126401274012840129401304013140132401334013440135401364013740138401394014040141401424014340144401454014640147401484014940150401514015240153401544015540156401574015840159401604016140162401634016440165401664016740168401694017040171401724017340174401754017640177401784017940180401814018240183401844018540186401874018840189401904019140192401934019440195401964019740198401994020040201402024020340204402054020640207402084020940210402114021240213402144021540216402174021840219402204022140222402234022440225402264022740228402294023040231402324023340234402354023640237402384023940240402414024240243402444024540246402474024840249402504025140252402534025440255402564025740258402594026040261402624026340264402654026640267402684026940270402714027240273402744027540276402774027840279402804028140282402834028440285402864028740288402894029040291402924029340294402954029640297402984029940300403014030240303403044030540306403074030840309403104031140312403134031440315403164031740318403194032040321403224032340324403254032640327403284032940330403314033240333403344033540336403374033840339403404034140342403434034440345403464034740348403494035040351403524035340354403554035640357403584035940360403614036240363403644036540366403674036840369403704037140372403734037440375403764037740378403794038040381403824038340384403854038640387403884038940390403914039240393403944039540396403974039840399404004040140402404034040440405404064040740408404094041040411404124041340414404154041640417404184041940420404214042240423404244042540426404274042840429404304043140432404334043440435404364043740438404394044040441404424044340444404454044640447404484044940450404514045240453404544045540456404574045840459404604046140462404634046440465404664046740468404694047040471404724047340474404754047640477404784047940480404814048240483404844048540486404874048840489404904049140492404934049440495404964049740498404994050040501405024050340504405054050640507405084050940510405114051240513405144051540516405174051840519405204052140522405234052440525405264052740528405294053040531405324053340534405354053640537405384053940540405414054240543405444054540546405474054840549405504055140552405534055440555405564055740558405594056040561405624056340564405654056640567405684056940570405714057240573405744057540576405774057840579405804058140582405834058440585405864058740588405894059040591405924059340594405954059640597405984059940600406014060240603406044060540606406074060840609406104061140612406134061440615406164061740618406194062040621406224062340624406254062640627406284062940630406314063240633406344063540636406374063840639406404064140642406434064440645406464064740648406494065040651406524065340654406554065640657406584065940660406614066240663406644066540666406674066840669406704067140672406734067440675406764067740678406794068040681406824068340684406854068640687406884068940690406914069240693406944069540696406974069840699407004070140702407034070440705407064070740708407094071040711407124071340714407154071640717407184071940720407214072240723407244072540726407274072840729407304073140732407334073440735407364073740738407394074040741407424074340744407454074640747407484074940750407514075240753407544075540756407574075840759407604076140762407634076440765407664076740768407694077040771407724077340774407754077640777407784077940780407814078240783407844078540786407874078840789407904079140792407934079440795407964079740798407994080040801408024080340804408054080640807408084080940810408114081240813408144081540816408174081840819408204082140822408234082440825408264082740828408294083040831408324083340834408354083640837408384083940840408414084240843408444084540846408474084840849408504085140852408534085440855408564085740858408594086040861408624086340864408654086640867408684086940870408714087240873408744087540876408774087840879408804088140882408834088440885408864088740888408894089040891408924089340894408954089640897408984089940900409014090240903409044090540906409074090840909409104091140912409134091440915409164091740918409194092040921409224092340924409254092640927409284092940930409314093240933409344093540936409374093840939409404094140942409434094440945409464094740948409494095040951409524095340954409554095640957409584095940960409614096240963409644096540966409674096840969409704097140972409734097440975409764097740978409794098040981409824098340984409854098640987409884098940990409914099240993409944099540996409974099840999410004100141002410034100441005410064100741008410094101041011410124101341014410154101641017410184101941020410214102241023410244102541026410274102841029410304103141032410334103441035410364103741038410394104041041410424104341044410454104641047410484104941050410514105241053410544105541056410574105841059410604106141062410634106441065410664106741068410694107041071410724107341074410754107641077410784107941080410814108241083410844108541086410874108841089410904109141092410934109441095410964109741098410994110041101411024110341104411054110641107411084110941110411114111241113411144111541116411174111841119411204112141122411234112441125411264112741128411294113041131411324113341134411354113641137411384113941140411414114241143411444114541146411474114841149411504115141152411534115441155411564115741158411594116041161411624116341164411654116641167411684116941170411714117241173411744117541176411774117841179411804118141182411834118441185411864118741188411894119041191411924119341194411954119641197411984119941200412014120241203412044120541206412074120841209412104121141212412134121441215412164121741218412194122041221412224122341224412254122641227412284122941230412314123241233412344123541236412374123841239412404124141242412434124441245412464124741248412494125041251412524125341254412554125641257412584125941260412614126241263412644126541266412674126841269412704127141272412734127441275412764127741278412794128041281412824128341284412854128641287412884128941290412914129241293412944129541296412974129841299413004130141302413034130441305413064130741308413094131041311413124131341314413154131641317413184131941320413214132241323413244132541326413274132841329413304133141332413334133441335413364133741338413394134041341413424134341344413454134641347413484134941350413514135241353413544135541356413574135841359413604136141362413634136441365413664136741368413694137041371413724137341374413754137641377413784137941380413814138241383413844138541386413874138841389413904139141392413934139441395413964139741398413994140041401414024140341404414054140641407414084140941410414114141241413414144141541416414174141841419414204142141422414234142441425414264142741428414294143041431414324143341434414354143641437414384143941440414414144241443414444144541446414474144841449414504145141452414534145441455414564145741458414594146041461414624146341464414654146641467414684146941470414714147241473414744147541476414774147841479414804148141482414834148441485414864148741488414894149041491414924149341494414954149641497414984149941500415014150241503415044150541506415074150841509415104151141512415134151441515415164151741518415194152041521415224152341524415254152641527415284152941530415314153241533415344153541536415374153841539415404154141542415434154441545415464154741548415494155041551415524155341554415554155641557415584155941560415614156241563415644156541566415674156841569415704157141572415734157441575415764157741578415794158041581415824158341584415854158641587415884158941590415914159241593415944159541596415974159841599416004160141602416034160441605416064160741608416094161041611416124161341614416154161641617416184161941620416214162241623416244162541626416274162841629416304163141632416334163441635416364163741638416394164041641416424164341644416454164641647416484164941650416514165241653416544165541656416574165841659416604166141662416634166441665416664166741668416694167041671416724167341674416754167641677416784167941680416814168241683416844168541686416874168841689416904169141692416934169441695416964169741698416994170041701417024170341704417054170641707417084170941710417114171241713417144171541716417174171841719417204172141722417234172441725417264172741728417294173041731417324173341734417354173641737417384173941740417414174241743417444174541746417474174841749417504175141752417534175441755417564175741758417594176041761417624176341764417654176641767417684176941770417714177241773417744177541776417774177841779417804178141782417834178441785417864178741788417894179041791417924179341794417954179641797417984179941800418014180241803418044180541806418074180841809418104181141812418134181441815418164181741818418194182041821418224182341824418254182641827418284182941830418314183241833418344183541836418374183841839418404184141842418434184441845418464184741848418494185041851418524185341854418554185641857418584185941860418614186241863418644186541866418674186841869418704187141872418734187441875418764187741878418794188041881418824188341884418854188641887418884188941890418914189241893418944189541896418974189841899419004190141902419034190441905419064190741908419094191041911419124191341914419154191641917419184191941920419214192241923419244192541926419274192841929419304193141932419334193441935419364193741938419394194041941419424194341944419454194641947419484194941950419514195241953419544195541956419574195841959419604196141962419634196441965419664196741968419694197041971419724197341974419754197641977419784197941980419814198241983419844198541986419874198841989419904199141992419934199441995419964199741998419994200042001420024200342004420054200642007420084200942010420114201242013420144201542016420174201842019420204202142022420234202442025420264202742028420294203042031420324203342034420354203642037420384203942040420414204242043420444204542046420474204842049420504205142052420534205442055420564205742058420594206042061420624206342064420654206642067420684206942070420714207242073420744207542076420774207842079420804208142082420834208442085420864208742088420894209042091420924209342094420954209642097420984209942100421014210242103421044210542106421074210842109421104211142112421134211442115421164211742118421194212042121421224212342124421254212642127421284212942130421314213242133421344213542136421374213842139421404214142142421434214442145421464214742148421494215042151421524215342154421554215642157421584215942160421614216242163421644216542166421674216842169421704217142172421734217442175421764217742178421794218042181421824218342184421854218642187421884218942190421914219242193421944219542196421974219842199422004220142202422034220442205422064220742208422094221042211422124221342214422154221642217422184221942220422214222242223422244222542226422274222842229422304223142232422334223442235422364223742238422394224042241422424224342244422454224642247422484224942250422514225242253422544225542256422574225842259422604226142262422634226442265422664226742268422694227042271422724227342274422754227642277422784227942280422814228242283422844228542286422874228842289422904229142292422934229442295422964229742298422994230042301423024230342304423054230642307423084230942310423114231242313423144231542316423174231842319423204232142322423234232442325423264232742328423294233042331423324233342334423354233642337423384233942340423414234242343423444234542346423474234842349423504235142352423534235442355423564235742358423594236042361423624236342364423654236642367423684236942370423714237242373423744237542376423774237842379423804238142382423834238442385423864238742388423894239042391423924239342394423954239642397423984239942400424014240242403424044240542406424074240842409424104241142412424134241442415424164241742418424194242042421424224242342424424254242642427424284242942430424314243242433424344243542436424374243842439424404244142442424434244442445424464244742448424494245042451424524245342454424554245642457424584245942460424614246242463424644246542466424674246842469424704247142472424734247442475424764247742478424794248042481424824248342484424854248642487424884248942490424914249242493424944249542496424974249842499425004250142502425034250442505425064250742508425094251042511425124251342514425154251642517425184251942520425214252242523425244252542526425274252842529425304253142532425334253442535425364253742538425394254042541425424254342544425454254642547425484254942550425514255242553425544255542556425574255842559425604256142562425634256442565425664256742568425694257042571425724257342574425754257642577425784257942580425814258242583425844258542586425874258842589425904259142592425934259442595425964259742598425994260042601426024260342604426054260642607426084260942610426114261242613426144261542616426174261842619426204262142622426234262442625426264262742628426294263042631426324263342634426354263642637426384263942640426414264242643426444264542646426474264842649426504265142652426534265442655426564265742658426594266042661426624266342664426654266642667426684266942670426714267242673426744267542676426774267842679426804268142682426834268442685426864268742688426894269042691426924269342694426954269642697426984269942700427014270242703427044270542706427074270842709427104271142712427134271442715427164271742718427194272042721427224272342724427254272642727427284272942730427314273242733427344273542736427374273842739427404274142742427434274442745427464274742748427494275042751427524275342754427554275642757427584275942760427614276242763427644276542766427674276842769427704277142772427734277442775427764277742778427794278042781427824278342784427854278642787427884278942790427914279242793427944279542796427974279842799428004280142802428034280442805428064280742808428094281042811428124281342814428154281642817428184281942820428214282242823428244282542826428274282842829428304283142832428334283442835428364283742838428394284042841428424284342844428454284642847428484284942850428514285242853428544285542856428574285842859428604286142862428634286442865428664286742868428694287042871428724287342874428754287642877428784287942880428814288242883428844288542886428874288842889428904289142892428934289442895428964289742898428994290042901429024290342904429054290642907429084290942910429114291242913429144291542916429174291842919429204292142922429234292442925429264292742928429294293042931429324293342934429354293642937429384293942940429414294242943429444294542946429474294842949429504295142952429534295442955429564295742958429594296042961429624296342964429654296642967429684296942970429714297242973429744297542976429774297842979429804298142982429834298442985429864298742988429894299042991429924299342994429954299642997429984299943000430014300243003430044300543006430074300843009430104301143012430134301443015430164301743018430194302043021430224302343024430254302643027430284302943030430314303243033430344303543036430374303843039430404304143042430434304443045430464304743048430494305043051430524305343054430554305643057430584305943060430614306243063430644306543066430674306843069430704307143072430734307443075430764307743078430794308043081430824308343084430854308643087430884308943090430914309243093430944309543096430974309843099431004310143102431034310443105431064310743108431094311043111431124311343114431154311643117431184311943120431214312243123431244312543126431274312843129431304313143132431334313443135431364313743138431394314043141431424314343144431454314643147431484314943150431514315243153431544315543156431574315843159431604316143162431634316443165431664316743168431694317043171431724317343174431754317643177431784317943180431814318243183431844318543186431874318843189431904319143192431934319443195431964319743198431994320043201432024320343204432054320643207432084320943210432114321243213432144321543216432174321843219432204322143222432234322443225432264322743228432294323043231432324323343234432354323643237432384323943240432414324243243432444324543246432474324843249432504325143252432534325443255432564325743258432594326043261432624326343264432654326643267432684326943270432714327243273432744327543276432774327843279432804328143282432834328443285432864328743288432894329043291432924329343294432954329643297432984329943300433014330243303433044330543306433074330843309433104331143312433134331443315433164331743318433194332043321433224332343324433254332643327433284332943330433314333243333433344333543336433374333843339433404334143342433434334443345433464334743348433494335043351433524335343354433554335643357433584335943360433614336243363433644336543366433674336843369433704337143372433734337443375433764337743378433794338043381433824338343384433854338643387433884338943390433914339243393433944339543396433974339843399434004340143402434034340443405434064340743408434094341043411434124341343414434154341643417434184341943420434214342243423434244342543426434274342843429434304343143432434334343443435434364343743438434394344043441434424344343444434454344643447434484344943450434514345243453434544345543456434574345843459434604346143462434634346443465434664346743468434694347043471434724347343474434754347643477434784347943480434814348243483434844348543486434874348843489434904349143492434934349443495434964349743498434994350043501435024350343504435054350643507435084350943510435114351243513435144351543516435174351843519435204352143522435234352443525435264352743528435294353043531435324353343534435354353643537435384353943540435414354243543435444354543546435474354843549435504355143552435534355443555435564355743558435594356043561435624356343564435654356643567435684356943570435714357243573435744357543576435774357843579435804358143582435834358443585435864358743588435894359043591435924359343594435954359643597435984359943600436014360243603436044360543606436074360843609436104361143612436134361443615436164361743618436194362043621436224362343624436254362643627436284362943630436314363243633436344363543636436374363843639436404364143642436434364443645436464364743648436494365043651436524365343654436554365643657436584365943660436614366243663436644366543666436674366843669436704367143672436734367443675436764367743678436794368043681436824368343684436854368643687436884368943690436914369243693436944369543696436974369843699437004370143702437034370443705437064370743708437094371043711437124371343714437154371643717437184371943720437214372243723437244372543726437274372843729437304373143732437334373443735437364373743738437394374043741437424374343744437454374643747437484374943750437514375243753437544375543756437574375843759437604376143762437634376443765437664376743768437694377043771437724377343774437754377643777437784377943780437814378243783437844378543786437874378843789437904379143792437934379443795437964379743798437994380043801438024380343804438054380643807438084380943810438114381243813438144381543816438174381843819438204382143822438234382443825438264382743828438294383043831438324383343834438354383643837438384383943840438414384243843438444384543846438474384843849438504385143852438534385443855438564385743858438594386043861438624386343864438654386643867438684386943870438714387243873438744387543876438774387843879438804388143882438834388443885438864388743888438894389043891438924389343894438954389643897438984389943900439014390243903439044390543906439074390843909439104391143912439134391443915439164391743918439194392043921439224392343924439254392643927439284392943930439314393243933439344393543936439374393843939439404394143942439434394443945439464394743948439494395043951439524395343954439554395643957439584395943960439614396243963439644396543966439674396843969439704397143972439734397443975439764397743978439794398043981439824398343984439854398643987439884398943990439914399243993439944399543996439974399843999440004400144002440034400444005440064400744008440094401044011440124401344014440154401644017440184401944020440214402244023440244402544026440274402844029440304403144032440334403444035440364403744038440394404044041440424404344044440454404644047440484404944050440514405244053440544405544056440574405844059440604406144062440634406444065440664406744068440694407044071440724407344074440754407644077440784407944080440814408244083440844408544086440874408844089440904409144092440934409444095440964409744098440994410044101441024410344104441054410644107441084410944110441114411244113441144411544116441174411844119441204412144122441234412444125441264412744128441294413044131441324413344134441354413644137441384413944140441414414244143441444414544146441474414844149441504415144152441534415444155441564415744158441594416044161441624416344164441654416644167441684416944170441714417244173441744417544176441774417844179441804418144182441834418444185441864418744188441894419044191441924419344194441954419644197441984419944200442014420244203442044420544206442074420844209442104421144212442134421444215442164421744218442194422044221442224422344224442254422644227442284422944230442314423244233442344423544236442374423844239442404424144242442434424444245442464424744248442494425044251442524425344254442554425644257442584425944260442614426244263442644426544266442674426844269442704427144272442734427444275442764427744278442794428044281442824428344284442854428644287442884428944290442914429244293442944429544296442974429844299443004430144302443034430444305443064430744308443094431044311443124431344314443154431644317443184431944320443214432244323443244432544326443274432844329443304433144332443334433444335443364433744338443394434044341443424434344344443454434644347443484434944350443514435244353443544435544356443574435844359443604436144362443634436444365443664436744368443694437044371443724437344374443754437644377443784437944380443814438244383443844438544386443874438844389443904439144392443934439444395443964439744398443994440044401444024440344404444054440644407444084440944410444114441244413444144441544416444174441844419444204442144422444234442444425444264442744428444294443044431444324443344434444354443644437444384443944440444414444244443444444444544446444474444844449444504445144452444534445444455444564445744458444594446044461444624446344464444654446644467444684446944470444714447244473444744447544476444774447844479444804448144482444834448444485444864448744488444894449044491444924449344494444954449644497444984449944500445014450244503445044450544506445074450844509445104451144512445134451444515445164451744518445194452044521445224452344524445254452644527445284452944530445314453244533445344453544536445374453844539445404454144542445434454444545445464454744548445494455044551445524455344554445554455644557445584455944560445614456244563445644456544566445674456844569445704457144572445734457444575445764457744578445794458044581445824458344584445854458644587445884458944590445914459244593445944459544596445974459844599446004460144602446034460444605446064460744608446094461044611446124461344614446154461644617446184461944620446214462244623446244462544626446274462844629446304463144632446334463444635446364463744638446394464044641446424464344644446454464644647446484464944650446514465244653446544465544656446574465844659446604466144662446634466444665446664466744668446694467044671446724467344674446754467644677446784467944680446814468244683446844468544686446874468844689446904469144692446934469444695446964469744698446994470044701447024470344704447054470644707447084470944710447114471244713447144471544716447174471844719447204472144722447234472444725447264472744728447294473044731447324473344734447354473644737447384473944740447414474244743447444474544746447474474844749447504475144752447534475444755447564475744758447594476044761447624476344764447654476644767447684476944770447714477244773447744477544776447774477844779447804478144782447834478444785447864478744788447894479044791447924479344794447954479644797447984479944800448014480244803448044480544806448074480844809448104481144812448134481444815448164481744818448194482044821448224482344824448254482644827448284482944830448314483244833448344483544836448374483844839448404484144842448434484444845448464484744848448494485044851448524485344854448554485644857448584485944860448614486244863448644486544866448674486844869448704487144872448734487444875448764487744878448794488044881448824488344884448854488644887448884488944890448914489244893448944489544896448974489844899449004490144902449034490444905449064490744908449094491044911449124491344914449154491644917449184491944920449214492244923449244492544926449274492844929449304493144932449334493444935449364493744938449394494044941449424494344944449454494644947449484494944950449514495244953449544495544956449574495844959449604496144962449634496444965449664496744968449694497044971449724497344974449754497644977449784497944980449814498244983449844498544986449874498844989449904499144992449934499444995449964499744998449994500045001450024500345004450054500645007450084500945010450114501245013450144501545016450174501845019450204502145022450234502445025450264502745028450294503045031450324503345034450354503645037450384503945040450414504245043450444504545046450474504845049450504505145052450534505445055450564505745058450594506045061450624506345064450654506645067450684506945070450714507245073450744507545076450774507845079450804508145082450834508445085450864508745088450894509045091450924509345094450954509645097450984509945100451014510245103451044510545106451074510845109451104511145112451134511445115451164511745118451194512045121451224512345124451254512645127451284512945130451314513245133451344513545136451374513845139451404514145142451434514445145451464514745148451494515045151451524515345154451554515645157451584515945160451614516245163451644516545166451674516845169451704517145172451734517445175451764517745178451794518045181451824518345184451854518645187451884518945190451914519245193451944519545196451974519845199452004520145202452034520445205452064520745208452094521045211452124521345214452154521645217452184521945220452214522245223452244522545226452274522845229452304523145232452334523445235452364523745238452394524045241452424524345244452454524645247452484524945250452514525245253452544525545256452574525845259452604526145262452634526445265452664526745268452694527045271452724527345274452754527645277452784527945280452814528245283452844528545286452874528845289452904529145292452934529445295452964529745298452994530045301453024530345304453054530645307453084530945310453114531245313453144531545316453174531845319453204532145322453234532445325453264532745328453294533045331453324533345334453354533645337453384533945340453414534245343453444534545346453474534845349453504535145352453534535445355453564535745358453594536045361453624536345364453654536645367453684536945370453714537245373453744537545376453774537845379453804538145382453834538445385453864538745388453894539045391453924539345394453954539645397453984539945400454014540245403454044540545406454074540845409454104541145412454134541445415454164541745418454194542045421454224542345424454254542645427454284542945430454314543245433454344543545436454374543845439454404544145442454434544445445454464544745448454494545045451454524545345454454554545645457454584545945460454614546245463454644546545466454674546845469454704547145472454734547445475454764547745478454794548045481454824548345484454854548645487454884548945490454914549245493454944549545496454974549845499455004550145502455034550445505455064550745508455094551045511455124551345514455154551645517455184551945520455214552245523455244552545526455274552845529455304553145532455334553445535455364553745538455394554045541455424554345544455454554645547455484554945550455514555245553455544555545556455574555845559455604556145562455634556445565455664556745568455694557045571455724557345574455754557645577455784557945580455814558245583455844558545586455874558845589455904559145592455934559445595455964559745598455994560045601456024560345604456054560645607456084560945610456114561245613456144561545616456174561845619456204562145622456234562445625456264562745628456294563045631456324563345634456354563645637456384563945640456414564245643456444564545646456474564845649456504565145652456534565445655456564565745658456594566045661456624566345664456654566645667456684566945670456714567245673456744567545676456774567845679456804568145682456834568445685456864568745688456894569045691456924569345694456954569645697456984569945700457014570245703457044570545706457074570845709457104571145712457134571445715457164571745718457194572045721457224572345724457254572645727457284572945730457314573245733457344573545736457374573845739457404574145742457434574445745457464574745748457494575045751457524575345754457554575645757457584575945760457614576245763457644576545766457674576845769457704577145772457734577445775457764577745778457794578045781457824578345784457854578645787457884578945790457914579245793457944579545796457974579845799458004580145802458034580445805458064580745808458094581045811458124581345814458154581645817458184581945820458214582245823458244582545826458274582845829458304583145832458334583445835458364583745838458394584045841458424584345844458454584645847458484584945850458514585245853458544585545856458574585845859458604586145862458634586445865458664586745868458694587045871458724587345874458754587645877458784587945880458814588245883458844588545886458874588845889458904589145892458934589445895458964589745898458994590045901459024590345904459054590645907459084590945910459114591245913459144591545916459174591845919459204592145922459234592445925459264592745928459294593045931459324593345934459354593645937459384593945940459414594245943459444594545946459474594845949459504595145952459534595445955459564595745958459594596045961459624596345964459654596645967459684596945970459714597245973459744597545976459774597845979459804598145982459834598445985459864598745988459894599045991459924599345994459954599645997459984599946000460014600246003460044600546006460074600846009460104601146012460134601446015460164601746018460194602046021460224602346024460254602646027460284602946030460314603246033460344603546036460374603846039460404604146042460434604446045460464604746048460494605046051460524605346054460554605646057460584605946060460614606246063460644606546066460674606846069460704607146072460734607446075460764607746078460794608046081460824608346084460854608646087460884608946090460914609246093460944609546096460974609846099461004610146102461034610446105461064610746108461094611046111461124611346114461154611646117461184611946120461214612246123461244612546126461274612846129461304613146132461334613446135461364613746138461394614046141461424614346144461454614646147461484614946150461514615246153461544615546156461574615846159461604616146162461634616446165461664616746168461694617046171461724617346174461754617646177461784617946180461814618246183461844618546186461874618846189461904619146192461934619446195461964619746198461994620046201462024620346204462054620646207462084620946210462114621246213462144621546216462174621846219462204622146222462234622446225462264622746228462294623046231462324623346234462354623646237462384623946240462414624246243462444624546246462474624846249462504625146252462534625446255462564625746258462594626046261
  1. /*!
  2. * Chart.js
  3. * http://chartjs.org/
  4. * Version: 2.7.2
  5. *
  6. * Copyright 2018 Chart.js Contributors
  7. * Released under the MIT license
  8. * https://github.com/chartjs/Chart.js/blob/master/LICENSE.md
  9. */
  10. (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Chart = f()}})(function(){var define,module,exports;return (function(){function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}return e})()({1:[function(require,module,exports){
  11. /* MIT license */
  12. var colorNames = require(5);
  13. module.exports = {
  14. getRgba: getRgba,
  15. getHsla: getHsla,
  16. getRgb: getRgb,
  17. getHsl: getHsl,
  18. getHwb: getHwb,
  19. getAlpha: getAlpha,
  20. hexString: hexString,
  21. rgbString: rgbString,
  22. rgbaString: rgbaString,
  23. percentString: percentString,
  24. percentaString: percentaString,
  25. hslString: hslString,
  26. hslaString: hslaString,
  27. hwbString: hwbString,
  28. keyword: keyword
  29. }
  30. function getRgba(string) {
  31. if (!string) {
  32. return;
  33. }
  34. var abbr = /^#([a-fA-F0-9]{3})$/i,
  35. hex = /^#([a-fA-F0-9]{6})$/i,
  36. rgba = /^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i,
  37. per = /^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i,
  38. keyword = /(\w+)/;
  39. var rgb = [0, 0, 0],
  40. a = 1,
  41. match = string.match(abbr);
  42. if (match) {
  43. match = match[1];
  44. for (var i = 0; i < rgb.length; i++) {
  45. rgb[i] = parseInt(match[i] + match[i], 16);
  46. }
  47. }
  48. else if (match = string.match(hex)) {
  49. match = match[1];
  50. for (var i = 0; i < rgb.length; i++) {
  51. rgb[i] = parseInt(match.slice(i * 2, i * 2 + 2), 16);
  52. }
  53. }
  54. else if (match = string.match(rgba)) {
  55. for (var i = 0; i < rgb.length; i++) {
  56. rgb[i] = parseInt(match[i + 1]);
  57. }
  58. a = parseFloat(match[4]);
  59. }
  60. else if (match = string.match(per)) {
  61. for (var i = 0; i < rgb.length; i++) {
  62. rgb[i] = Math.round(parseFloat(match[i + 1]) * 2.55);
  63. }
  64. a = parseFloat(match[4]);
  65. }
  66. else if (match = string.match(keyword)) {
  67. if (match[1] == "transparent") {
  68. return [0, 0, 0, 0];
  69. }
  70. rgb = colorNames[match[1]];
  71. if (!rgb) {
  72. return;
  73. }
  74. }
  75. for (var i = 0; i < rgb.length; i++) {
  76. rgb[i] = scale(rgb[i], 0, 255);
  77. }
  78. if (!a && a != 0) {
  79. a = 1;
  80. }
  81. else {
  82. a = scale(a, 0, 1);
  83. }
  84. rgb[3] = a;
  85. return rgb;
  86. }
  87. function getHsla(string) {
  88. if (!string) {
  89. return;
  90. }
  91. var hsl = /^hsla?\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/;
  92. var match = string.match(hsl);
  93. if (match) {
  94. var alpha = parseFloat(match[4]);
  95. var h = scale(parseInt(match[1]), 0, 360),
  96. s = scale(parseFloat(match[2]), 0, 100),
  97. l = scale(parseFloat(match[3]), 0, 100),
  98. a = scale(isNaN(alpha) ? 1 : alpha, 0, 1);
  99. return [h, s, l, a];
  100. }
  101. }
  102. function getHwb(string) {
  103. if (!string) {
  104. return;
  105. }
  106. var hwb = /^hwb\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/;
  107. var match = string.match(hwb);
  108. if (match) {
  109. var alpha = parseFloat(match[4]);
  110. var h = scale(parseInt(match[1]), 0, 360),
  111. w = scale(parseFloat(match[2]), 0, 100),
  112. b = scale(parseFloat(match[3]), 0, 100),
  113. a = scale(isNaN(alpha) ? 1 : alpha, 0, 1);
  114. return [h, w, b, a];
  115. }
  116. }
  117. function getRgb(string) {
  118. var rgba = getRgba(string);
  119. return rgba && rgba.slice(0, 3);
  120. }
  121. function getHsl(string) {
  122. var hsla = getHsla(string);
  123. return hsla && hsla.slice(0, 3);
  124. }
  125. function getAlpha(string) {
  126. var vals = getRgba(string);
  127. if (vals) {
  128. return vals[3];
  129. }
  130. else if (vals = getHsla(string)) {
  131. return vals[3];
  132. }
  133. else if (vals = getHwb(string)) {
  134. return vals[3];
  135. }
  136. }
  137. // generators
  138. function hexString(rgb) {
  139. return "#" + hexDouble(rgb[0]) + hexDouble(rgb[1])
  140. + hexDouble(rgb[2]);
  141. }
  142. function rgbString(rgba, alpha) {
  143. if (alpha < 1 || (rgba[3] && rgba[3] < 1)) {
  144. return rgbaString(rgba, alpha);
  145. }
  146. return "rgb(" + rgba[0] + ", " + rgba[1] + ", " + rgba[2] + ")";
  147. }
  148. function rgbaString(rgba, alpha) {
  149. if (alpha === undefined) {
  150. alpha = (rgba[3] !== undefined ? rgba[3] : 1);
  151. }
  152. return "rgba(" + rgba[0] + ", " + rgba[1] + ", " + rgba[2]
  153. + ", " + alpha + ")";
  154. }
  155. function percentString(rgba, alpha) {
  156. if (alpha < 1 || (rgba[3] && rgba[3] < 1)) {
  157. return percentaString(rgba, alpha);
  158. }
  159. var r = Math.round(rgba[0]/255 * 100),
  160. g = Math.round(rgba[1]/255 * 100),
  161. b = Math.round(rgba[2]/255 * 100);
  162. return "rgb(" + r + "%, " + g + "%, " + b + "%)";
  163. }
  164. function percentaString(rgba, alpha) {
  165. var r = Math.round(rgba[0]/255 * 100),
  166. g = Math.round(rgba[1]/255 * 100),
  167. b = Math.round(rgba[2]/255 * 100);
  168. return "rgba(" + r + "%, " + g + "%, " + b + "%, " + (alpha || rgba[3] || 1) + ")";
  169. }
  170. function hslString(hsla, alpha) {
  171. if (alpha < 1 || (hsla[3] && hsla[3] < 1)) {
  172. return hslaString(hsla, alpha);
  173. }
  174. return "hsl(" + hsla[0] + ", " + hsla[1] + "%, " + hsla[2] + "%)";
  175. }
  176. function hslaString(hsla, alpha) {
  177. if (alpha === undefined) {
  178. alpha = (hsla[3] !== undefined ? hsla[3] : 1);
  179. }
  180. return "hsla(" + hsla[0] + ", " + hsla[1] + "%, " + hsla[2] + "%, "
  181. + alpha + ")";
  182. }
  183. // hwb is a bit different than rgb(a) & hsl(a) since there is no alpha specific syntax
  184. // (hwb have alpha optional & 1 is default value)
  185. function hwbString(hwb, alpha) {
  186. if (alpha === undefined) {
  187. alpha = (hwb[3] !== undefined ? hwb[3] : 1);
  188. }
  189. return "hwb(" + hwb[0] + ", " + hwb[1] + "%, " + hwb[2] + "%"
  190. + (alpha !== undefined && alpha !== 1 ? ", " + alpha : "") + ")";
  191. }
  192. function keyword(rgb) {
  193. return reverseNames[rgb.slice(0, 3)];
  194. }
  195. // helpers
  196. function scale(num, min, max) {
  197. return Math.min(Math.max(min, num), max);
  198. }
  199. function hexDouble(num) {
  200. var str = num.toString(16).toUpperCase();
  201. return (str.length < 2) ? "0" + str : str;
  202. }
  203. //create a list of reverse color names
  204. var reverseNames = {};
  205. for (var name in colorNames) {
  206. reverseNames[colorNames[name]] = name;
  207. }
  208. },{"5":5}],2:[function(require,module,exports){
  209. /* MIT license */
  210. var convert = require(4);
  211. var string = require(1);
  212. var Color = function (obj) {
  213. if (obj instanceof Color) {
  214. return obj;
  215. }
  216. if (!(this instanceof Color)) {
  217. return new Color(obj);
  218. }
  219. this.valid = false;
  220. this.values = {
  221. rgb: [0, 0, 0],
  222. hsl: [0, 0, 0],
  223. hsv: [0, 0, 0],
  224. hwb: [0, 0, 0],
  225. cmyk: [0, 0, 0, 0],
  226. alpha: 1
  227. };
  228. // parse Color() argument
  229. var vals;
  230. if (typeof obj === 'string') {
  231. vals = string.getRgba(obj);
  232. if (vals) {
  233. this.setValues('rgb', vals);
  234. } else if (vals = string.getHsla(obj)) {
  235. this.setValues('hsl', vals);
  236. } else if (vals = string.getHwb(obj)) {
  237. this.setValues('hwb', vals);
  238. }
  239. } else if (typeof obj === 'object') {
  240. vals = obj;
  241. if (vals.r !== undefined || vals.red !== undefined) {
  242. this.setValues('rgb', vals);
  243. } else if (vals.l !== undefined || vals.lightness !== undefined) {
  244. this.setValues('hsl', vals);
  245. } else if (vals.v !== undefined || vals.value !== undefined) {
  246. this.setValues('hsv', vals);
  247. } else if (vals.w !== undefined || vals.whiteness !== undefined) {
  248. this.setValues('hwb', vals);
  249. } else if (vals.c !== undefined || vals.cyan !== undefined) {
  250. this.setValues('cmyk', vals);
  251. }
  252. }
  253. };
  254. Color.prototype = {
  255. isValid: function () {
  256. return this.valid;
  257. },
  258. rgb: function () {
  259. return this.setSpace('rgb', arguments);
  260. },
  261. hsl: function () {
  262. return this.setSpace('hsl', arguments);
  263. },
  264. hsv: function () {
  265. return this.setSpace('hsv', arguments);
  266. },
  267. hwb: function () {
  268. return this.setSpace('hwb', arguments);
  269. },
  270. cmyk: function () {
  271. return this.setSpace('cmyk', arguments);
  272. },
  273. rgbArray: function () {
  274. return this.values.rgb;
  275. },
  276. hslArray: function () {
  277. return this.values.hsl;
  278. },
  279. hsvArray: function () {
  280. return this.values.hsv;
  281. },
  282. hwbArray: function () {
  283. var values = this.values;
  284. if (values.alpha !== 1) {
  285. return values.hwb.concat([values.alpha]);
  286. }
  287. return values.hwb;
  288. },
  289. cmykArray: function () {
  290. return this.values.cmyk;
  291. },
  292. rgbaArray: function () {
  293. var values = this.values;
  294. return values.rgb.concat([values.alpha]);
  295. },
  296. hslaArray: function () {
  297. var values = this.values;
  298. return values.hsl.concat([values.alpha]);
  299. },
  300. alpha: function (val) {
  301. if (val === undefined) {
  302. return this.values.alpha;
  303. }
  304. this.setValues('alpha', val);
  305. return this;
  306. },
  307. red: function (val) {
  308. return this.setChannel('rgb', 0, val);
  309. },
  310. green: function (val) {
  311. return this.setChannel('rgb', 1, val);
  312. },
  313. blue: function (val) {
  314. return this.setChannel('rgb', 2, val);
  315. },
  316. hue: function (val) {
  317. if (val) {
  318. val %= 360;
  319. val = val < 0 ? 360 + val : val;
  320. }
  321. return this.setChannel('hsl', 0, val);
  322. },
  323. saturation: function (val) {
  324. return this.setChannel('hsl', 1, val);
  325. },
  326. lightness: function (val) {
  327. return this.setChannel('hsl', 2, val);
  328. },
  329. saturationv: function (val) {
  330. return this.setChannel('hsv', 1, val);
  331. },
  332. whiteness: function (val) {
  333. return this.setChannel('hwb', 1, val);
  334. },
  335. blackness: function (val) {
  336. return this.setChannel('hwb', 2, val);
  337. },
  338. value: function (val) {
  339. return this.setChannel('hsv', 2, val);
  340. },
  341. cyan: function (val) {
  342. return this.setChannel('cmyk', 0, val);
  343. },
  344. magenta: function (val) {
  345. return this.setChannel('cmyk', 1, val);
  346. },
  347. yellow: function (val) {
  348. return this.setChannel('cmyk', 2, val);
  349. },
  350. black: function (val) {
  351. return this.setChannel('cmyk', 3, val);
  352. },
  353. hexString: function () {
  354. return string.hexString(this.values.rgb);
  355. },
  356. rgbString: function () {
  357. return string.rgbString(this.values.rgb, this.values.alpha);
  358. },
  359. rgbaString: function () {
  360. return string.rgbaString(this.values.rgb, this.values.alpha);
  361. },
  362. percentString: function () {
  363. return string.percentString(this.values.rgb, this.values.alpha);
  364. },
  365. hslString: function () {
  366. return string.hslString(this.values.hsl, this.values.alpha);
  367. },
  368. hslaString: function () {
  369. return string.hslaString(this.values.hsl, this.values.alpha);
  370. },
  371. hwbString: function () {
  372. return string.hwbString(this.values.hwb, this.values.alpha);
  373. },
  374. keyword: function () {
  375. return string.keyword(this.values.rgb, this.values.alpha);
  376. },
  377. rgbNumber: function () {
  378. var rgb = this.values.rgb;
  379. return (rgb[0] << 16) | (rgb[1] << 8) | rgb[2];
  380. },
  381. luminosity: function () {
  382. // http://www.w3.org/TR/WCAG20/#relativeluminancedef
  383. var rgb = this.values.rgb;
  384. var lum = [];
  385. for (var i = 0; i < rgb.length; i++) {
  386. var chan = rgb[i] / 255;
  387. lum[i] = (chan <= 0.03928) ? chan / 12.92 : Math.pow(((chan + 0.055) / 1.055), 2.4);
  388. }
  389. return 0.2126 * lum[0] + 0.7152 * lum[1] + 0.0722 * lum[2];
  390. },
  391. contrast: function (color2) {
  392. // http://www.w3.org/TR/WCAG20/#contrast-ratiodef
  393. var lum1 = this.luminosity();
  394. var lum2 = color2.luminosity();
  395. if (lum1 > lum2) {
  396. return (lum1 + 0.05) / (lum2 + 0.05);
  397. }
  398. return (lum2 + 0.05) / (lum1 + 0.05);
  399. },
  400. level: function (color2) {
  401. var contrastRatio = this.contrast(color2);
  402. if (contrastRatio >= 7.1) {
  403. return 'AAA';
  404. }
  405. return (contrastRatio >= 4.5) ? 'AA' : '';
  406. },
  407. dark: function () {
  408. // YIQ equation from http://24ways.org/2010/calculating-color-contrast
  409. var rgb = this.values.rgb;
  410. var yiq = (rgb[0] * 299 + rgb[1] * 587 + rgb[2] * 114) / 1000;
  411. return yiq < 128;
  412. },
  413. light: function () {
  414. return !this.dark();
  415. },
  416. negate: function () {
  417. var rgb = [];
  418. for (var i = 0; i < 3; i++) {
  419. rgb[i] = 255 - this.values.rgb[i];
  420. }
  421. this.setValues('rgb', rgb);
  422. return this;
  423. },
  424. lighten: function (ratio) {
  425. var hsl = this.values.hsl;
  426. hsl[2] += hsl[2] * ratio;
  427. this.setValues('hsl', hsl);
  428. return this;
  429. },
  430. darken: function (ratio) {
  431. var hsl = this.values.hsl;
  432. hsl[2] -= hsl[2] * ratio;
  433. this.setValues('hsl', hsl);
  434. return this;
  435. },
  436. saturate: function (ratio) {
  437. var hsl = this.values.hsl;
  438. hsl[1] += hsl[1] * ratio;
  439. this.setValues('hsl', hsl);
  440. return this;
  441. },
  442. desaturate: function (ratio) {
  443. var hsl = this.values.hsl;
  444. hsl[1] -= hsl[1] * ratio;
  445. this.setValues('hsl', hsl);
  446. return this;
  447. },
  448. whiten: function (ratio) {
  449. var hwb = this.values.hwb;
  450. hwb[1] += hwb[1] * ratio;
  451. this.setValues('hwb', hwb);
  452. return this;
  453. },
  454. blacken: function (ratio) {
  455. var hwb = this.values.hwb;
  456. hwb[2] += hwb[2] * ratio;
  457. this.setValues('hwb', hwb);
  458. return this;
  459. },
  460. greyscale: function () {
  461. var rgb = this.values.rgb;
  462. // http://en.wikipedia.org/wiki/Grayscale#Converting_color_to_grayscale
  463. var val = rgb[0] * 0.3 + rgb[1] * 0.59 + rgb[2] * 0.11;
  464. this.setValues('rgb', [val, val, val]);
  465. return this;
  466. },
  467. clearer: function (ratio) {
  468. var alpha = this.values.alpha;
  469. this.setValues('alpha', alpha - (alpha * ratio));
  470. return this;
  471. },
  472. opaquer: function (ratio) {
  473. var alpha = this.values.alpha;
  474. this.setValues('alpha', alpha + (alpha * ratio));
  475. return this;
  476. },
  477. rotate: function (degrees) {
  478. var hsl = this.values.hsl;
  479. var hue = (hsl[0] + degrees) % 360;
  480. hsl[0] = hue < 0 ? 360 + hue : hue;
  481. this.setValues('hsl', hsl);
  482. return this;
  483. },
  484. /**
  485. * Ported from sass implementation in C
  486. * https://github.com/sass/libsass/blob/0e6b4a2850092356aa3ece07c6b249f0221caced/functions.cpp#L209
  487. */
  488. mix: function (mixinColor, weight) {
  489. var color1 = this;
  490. var color2 = mixinColor;
  491. var p = weight === undefined ? 0.5 : weight;
  492. var w = 2 * p - 1;
  493. var a = color1.alpha() - color2.alpha();
  494. var w1 = (((w * a === -1) ? w : (w + a) / (1 + w * a)) + 1) / 2.0;
  495. var w2 = 1 - w1;
  496. return this
  497. .rgb(
  498. w1 * color1.red() + w2 * color2.red(),
  499. w1 * color1.green() + w2 * color2.green(),
  500. w1 * color1.blue() + w2 * color2.blue()
  501. )
  502. .alpha(color1.alpha() * p + color2.alpha() * (1 - p));
  503. },
  504. toJSON: function () {
  505. return this.rgb();
  506. },
  507. clone: function () {
  508. // NOTE(SB): using node-clone creates a dependency to Buffer when using browserify,
  509. // making the final build way to big to embed in Chart.js. So let's do it manually,
  510. // assuming that values to clone are 1 dimension arrays containing only numbers,
  511. // except 'alpha' which is a number.
  512. var result = new Color();
  513. var source = this.values;
  514. var target = result.values;
  515. var value, type;
  516. for (var prop in source) {
  517. if (source.hasOwnProperty(prop)) {
  518. value = source[prop];
  519. type = ({}).toString.call(value);
  520. if (type === '[object Array]') {
  521. target[prop] = value.slice(0);
  522. } else if (type === '[object Number]') {
  523. target[prop] = value;
  524. } else {
  525. console.error('unexpected color value:', value);
  526. }
  527. }
  528. }
  529. return result;
  530. }
  531. };
  532. Color.prototype.spaces = {
  533. rgb: ['red', 'green', 'blue'],
  534. hsl: ['hue', 'saturation', 'lightness'],
  535. hsv: ['hue', 'saturation', 'value'],
  536. hwb: ['hue', 'whiteness', 'blackness'],
  537. cmyk: ['cyan', 'magenta', 'yellow', 'black']
  538. };
  539. Color.prototype.maxes = {
  540. rgb: [255, 255, 255],
  541. hsl: [360, 100, 100],
  542. hsv: [360, 100, 100],
  543. hwb: [360, 100, 100],
  544. cmyk: [100, 100, 100, 100]
  545. };
  546. Color.prototype.getValues = function (space) {
  547. var values = this.values;
  548. var vals = {};
  549. for (var i = 0; i < space.length; i++) {
  550. vals[space.charAt(i)] = values[space][i];
  551. }
  552. if (values.alpha !== 1) {
  553. vals.a = values.alpha;
  554. }
  555. // {r: 255, g: 255, b: 255, a: 0.4}
  556. return vals;
  557. };
  558. Color.prototype.setValues = function (space, vals) {
  559. var values = this.values;
  560. var spaces = this.spaces;
  561. var maxes = this.maxes;
  562. var alpha = 1;
  563. var i;
  564. this.valid = true;
  565. if (space === 'alpha') {
  566. alpha = vals;
  567. } else if (vals.length) {
  568. // [10, 10, 10]
  569. values[space] = vals.slice(0, space.length);
  570. alpha = vals[space.length];
  571. } else if (vals[space.charAt(0)] !== undefined) {
  572. // {r: 10, g: 10, b: 10}
  573. for (i = 0; i < space.length; i++) {
  574. values[space][i] = vals[space.charAt(i)];
  575. }
  576. alpha = vals.a;
  577. } else if (vals[spaces[space][0]] !== undefined) {
  578. // {red: 10, green: 10, blue: 10}
  579. var chans = spaces[space];
  580. for (i = 0; i < space.length; i++) {
  581. values[space][i] = vals[chans[i]];
  582. }
  583. alpha = vals.alpha;
  584. }
  585. values.alpha = Math.max(0, Math.min(1, (alpha === undefined ? values.alpha : alpha)));
  586. if (space === 'alpha') {
  587. return false;
  588. }
  589. var capped;
  590. // cap values of the space prior converting all values
  591. for (i = 0; i < space.length; i++) {
  592. capped = Math.max(0, Math.min(maxes[space][i], values[space][i]));
  593. values[space][i] = Math.round(capped);
  594. }
  595. // convert to all the other color spaces
  596. for (var sname in spaces) {
  597. if (sname !== space) {
  598. values[sname] = convert[space][sname](values[space]);
  599. }
  600. }
  601. return true;
  602. };
  603. Color.prototype.setSpace = function (space, args) {
  604. var vals = args[0];
  605. if (vals === undefined) {
  606. // color.rgb()
  607. return this.getValues(space);
  608. }
  609. // color.rgb(10, 10, 10)
  610. if (typeof vals === 'number') {
  611. vals = Array.prototype.slice.call(args);
  612. }
  613. this.setValues(space, vals);
  614. return this;
  615. };
  616. Color.prototype.setChannel = function (space, index, val) {
  617. var svalues = this.values[space];
  618. if (val === undefined) {
  619. // color.red()
  620. return svalues[index];
  621. } else if (val === svalues[index]) {
  622. // color.red(color.red())
  623. return this;
  624. }
  625. // color.red(100)
  626. svalues[index] = val;
  627. this.setValues(space, svalues);
  628. return this;
  629. };
  630. if (typeof window !== 'undefined') {
  631. window.Color = Color;
  632. }
  633. module.exports = Color;
  634. },{"1":1,"4":4}],3:[function(require,module,exports){
  635. /* MIT license */
  636. module.exports = {
  637. rgb2hsl: rgb2hsl,
  638. rgb2hsv: rgb2hsv,
  639. rgb2hwb: rgb2hwb,
  640. rgb2cmyk: rgb2cmyk,
  641. rgb2keyword: rgb2keyword,
  642. rgb2xyz: rgb2xyz,
  643. rgb2lab: rgb2lab,
  644. rgb2lch: rgb2lch,
  645. hsl2rgb: hsl2rgb,
  646. hsl2hsv: hsl2hsv,
  647. hsl2hwb: hsl2hwb,
  648. hsl2cmyk: hsl2cmyk,
  649. hsl2keyword: hsl2keyword,
  650. hsv2rgb: hsv2rgb,
  651. hsv2hsl: hsv2hsl,
  652. hsv2hwb: hsv2hwb,
  653. hsv2cmyk: hsv2cmyk,
  654. hsv2keyword: hsv2keyword,
  655. hwb2rgb: hwb2rgb,
  656. hwb2hsl: hwb2hsl,
  657. hwb2hsv: hwb2hsv,
  658. hwb2cmyk: hwb2cmyk,
  659. hwb2keyword: hwb2keyword,
  660. cmyk2rgb: cmyk2rgb,
  661. cmyk2hsl: cmyk2hsl,
  662. cmyk2hsv: cmyk2hsv,
  663. cmyk2hwb: cmyk2hwb,
  664. cmyk2keyword: cmyk2keyword,
  665. keyword2rgb: keyword2rgb,
  666. keyword2hsl: keyword2hsl,
  667. keyword2hsv: keyword2hsv,
  668. keyword2hwb: keyword2hwb,
  669. keyword2cmyk: keyword2cmyk,
  670. keyword2lab: keyword2lab,
  671. keyword2xyz: keyword2xyz,
  672. xyz2rgb: xyz2rgb,
  673. xyz2lab: xyz2lab,
  674. xyz2lch: xyz2lch,
  675. lab2xyz: lab2xyz,
  676. lab2rgb: lab2rgb,
  677. lab2lch: lab2lch,
  678. lch2lab: lch2lab,
  679. lch2xyz: lch2xyz,
  680. lch2rgb: lch2rgb
  681. }
  682. function rgb2hsl(rgb) {
  683. var r = rgb[0]/255,
  684. g = rgb[1]/255,
  685. b = rgb[2]/255,
  686. min = Math.min(r, g, b),
  687. max = Math.max(r, g, b),
  688. delta = max - min,
  689. h, s, l;
  690. if (max == min)
  691. h = 0;
  692. else if (r == max)
  693. h = (g - b) / delta;
  694. else if (g == max)
  695. h = 2 + (b - r) / delta;
  696. else if (b == max)
  697. h = 4 + (r - g)/ delta;
  698. h = Math.min(h * 60, 360);
  699. if (h < 0)
  700. h += 360;
  701. l = (min + max) / 2;
  702. if (max == min)
  703. s = 0;
  704. else if (l <= 0.5)
  705. s = delta / (max + min);
  706. else
  707. s = delta / (2 - max - min);
  708. return [h, s * 100, l * 100];
  709. }
  710. function rgb2hsv(rgb) {
  711. var r = rgb[0],
  712. g = rgb[1],
  713. b = rgb[2],
  714. min = Math.min(r, g, b),
  715. max = Math.max(r, g, b),
  716. delta = max - min,
  717. h, s, v;
  718. if (max == 0)
  719. s = 0;
  720. else
  721. s = (delta/max * 1000)/10;
  722. if (max == min)
  723. h = 0;
  724. else if (r == max)
  725. h = (g - b) / delta;
  726. else if (g == max)
  727. h = 2 + (b - r) / delta;
  728. else if (b == max)
  729. h = 4 + (r - g) / delta;
  730. h = Math.min(h * 60, 360);
  731. if (h < 0)
  732. h += 360;
  733. v = ((max / 255) * 1000) / 10;
  734. return [h, s, v];
  735. }
  736. function rgb2hwb(rgb) {
  737. var r = rgb[0],
  738. g = rgb[1],
  739. b = rgb[2],
  740. h = rgb2hsl(rgb)[0],
  741. w = 1/255 * Math.min(r, Math.min(g, b)),
  742. b = 1 - 1/255 * Math.max(r, Math.max(g, b));
  743. return [h, w * 100, b * 100];
  744. }
  745. function rgb2cmyk(rgb) {
  746. var r = rgb[0] / 255,
  747. g = rgb[1] / 255,
  748. b = rgb[2] / 255,
  749. c, m, y, k;
  750. k = Math.min(1 - r, 1 - g, 1 - b);
  751. c = (1 - r - k) / (1 - k) || 0;
  752. m = (1 - g - k) / (1 - k) || 0;
  753. y = (1 - b - k) / (1 - k) || 0;
  754. return [c * 100, m * 100, y * 100, k * 100];
  755. }
  756. function rgb2keyword(rgb) {
  757. return reverseKeywords[JSON.stringify(rgb)];
  758. }
  759. function rgb2xyz(rgb) {
  760. var r = rgb[0] / 255,
  761. g = rgb[1] / 255,
  762. b = rgb[2] / 255;
  763. // assume sRGB
  764. r = r > 0.04045 ? Math.pow(((r + 0.055) / 1.055), 2.4) : (r / 12.92);
  765. g = g > 0.04045 ? Math.pow(((g + 0.055) / 1.055), 2.4) : (g / 12.92);
  766. b = b > 0.04045 ? Math.pow(((b + 0.055) / 1.055), 2.4) : (b / 12.92);
  767. var x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805);
  768. var y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722);
  769. var z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505);
  770. return [x * 100, y *100, z * 100];
  771. }
  772. function rgb2lab(rgb) {
  773. var xyz = rgb2xyz(rgb),
  774. x = xyz[0],
  775. y = xyz[1],
  776. z = xyz[2],
  777. l, a, b;
  778. x /= 95.047;
  779. y /= 100;
  780. z /= 108.883;
  781. x = x > 0.008856 ? Math.pow(x, 1/3) : (7.787 * x) + (16 / 116);
  782. y = y > 0.008856 ? Math.pow(y, 1/3) : (7.787 * y) + (16 / 116);
  783. z = z > 0.008856 ? Math.pow(z, 1/3) : (7.787 * z) + (16 / 116);
  784. l = (116 * y) - 16;
  785. a = 500 * (x - y);
  786. b = 200 * (y - z);
  787. return [l, a, b];
  788. }
  789. function rgb2lch(args) {
  790. return lab2lch(rgb2lab(args));
  791. }
  792. function hsl2rgb(hsl) {
  793. var h = hsl[0] / 360,
  794. s = hsl[1] / 100,
  795. l = hsl[2] / 100,
  796. t1, t2, t3, rgb, val;
  797. if (s == 0) {
  798. val = l * 255;
  799. return [val, val, val];
  800. }
  801. if (l < 0.5)
  802. t2 = l * (1 + s);
  803. else
  804. t2 = l + s - l * s;
  805. t1 = 2 * l - t2;
  806. rgb = [0, 0, 0];
  807. for (var i = 0; i < 3; i++) {
  808. t3 = h + 1 / 3 * - (i - 1);
  809. t3 < 0 && t3++;
  810. t3 > 1 && t3--;
  811. if (6 * t3 < 1)
  812. val = t1 + (t2 - t1) * 6 * t3;
  813. else if (2 * t3 < 1)
  814. val = t2;
  815. else if (3 * t3 < 2)
  816. val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
  817. else
  818. val = t1;
  819. rgb[i] = val * 255;
  820. }
  821. return rgb;
  822. }
  823. function hsl2hsv(hsl) {
  824. var h = hsl[0],
  825. s = hsl[1] / 100,
  826. l = hsl[2] / 100,
  827. sv, v;
  828. if(l === 0) {
  829. // no need to do calc on black
  830. // also avoids divide by 0 error
  831. return [0, 0, 0];
  832. }
  833. l *= 2;
  834. s *= (l <= 1) ? l : 2 - l;
  835. v = (l + s) / 2;
  836. sv = (2 * s) / (l + s);
  837. return [h, sv * 100, v * 100];
  838. }
  839. function hsl2hwb(args) {
  840. return rgb2hwb(hsl2rgb(args));
  841. }
  842. function hsl2cmyk(args) {
  843. return rgb2cmyk(hsl2rgb(args));
  844. }
  845. function hsl2keyword(args) {
  846. return rgb2keyword(hsl2rgb(args));
  847. }
  848. function hsv2rgb(hsv) {
  849. var h = hsv[0] / 60,
  850. s = hsv[1] / 100,
  851. v = hsv[2] / 100,
  852. hi = Math.floor(h) % 6;
  853. var f = h - Math.floor(h),
  854. p = 255 * v * (1 - s),
  855. q = 255 * v * (1 - (s * f)),
  856. t = 255 * v * (1 - (s * (1 - f))),
  857. v = 255 * v;
  858. switch(hi) {
  859. case 0:
  860. return [v, t, p];
  861. case 1:
  862. return [q, v, p];
  863. case 2:
  864. return [p, v, t];
  865. case 3:
  866. return [p, q, v];
  867. case 4:
  868. return [t, p, v];
  869. case 5:
  870. return [v, p, q];
  871. }
  872. }
  873. function hsv2hsl(hsv) {
  874. var h = hsv[0],
  875. s = hsv[1] / 100,
  876. v = hsv[2] / 100,
  877. sl, l;
  878. l = (2 - s) * v;
  879. sl = s * v;
  880. sl /= (l <= 1) ? l : 2 - l;
  881. sl = sl || 0;
  882. l /= 2;
  883. return [h, sl * 100, l * 100];
  884. }
  885. function hsv2hwb(args) {
  886. return rgb2hwb(hsv2rgb(args))
  887. }
  888. function hsv2cmyk(args) {
  889. return rgb2cmyk(hsv2rgb(args));
  890. }
  891. function hsv2keyword(args) {
  892. return rgb2keyword(hsv2rgb(args));
  893. }
  894. // http://dev.w3.org/csswg/css-color/#hwb-to-rgb
  895. function hwb2rgb(hwb) {
  896. var h = hwb[0] / 360,
  897. wh = hwb[1] / 100,
  898. bl = hwb[2] / 100,
  899. ratio = wh + bl,
  900. i, v, f, n;
  901. // wh + bl cant be > 1
  902. if (ratio > 1) {
  903. wh /= ratio;
  904. bl /= ratio;
  905. }
  906. i = Math.floor(6 * h);
  907. v = 1 - bl;
  908. f = 6 * h - i;
  909. if ((i & 0x01) != 0) {
  910. f = 1 - f;
  911. }
  912. n = wh + f * (v - wh); // linear interpolation
  913. switch (i) {
  914. default:
  915. case 6:
  916. case 0: r = v; g = n; b = wh; break;
  917. case 1: r = n; g = v; b = wh; break;
  918. case 2: r = wh; g = v; b = n; break;
  919. case 3: r = wh; g = n; b = v; break;
  920. case 4: r = n; g = wh; b = v; break;
  921. case 5: r = v; g = wh; b = n; break;
  922. }
  923. return [r * 255, g * 255, b * 255];
  924. }
  925. function hwb2hsl(args) {
  926. return rgb2hsl(hwb2rgb(args));
  927. }
  928. function hwb2hsv(args) {
  929. return rgb2hsv(hwb2rgb(args));
  930. }
  931. function hwb2cmyk(args) {
  932. return rgb2cmyk(hwb2rgb(args));
  933. }
  934. function hwb2keyword(args) {
  935. return rgb2keyword(hwb2rgb(args));
  936. }
  937. function cmyk2rgb(cmyk) {
  938. var c = cmyk[0] / 100,
  939. m = cmyk[1] / 100,
  940. y = cmyk[2] / 100,
  941. k = cmyk[3] / 100,
  942. r, g, b;
  943. r = 1 - Math.min(1, c * (1 - k) + k);
  944. g = 1 - Math.min(1, m * (1 - k) + k);
  945. b = 1 - Math.min(1, y * (1 - k) + k);
  946. return [r * 255, g * 255, b * 255];
  947. }
  948. function cmyk2hsl(args) {
  949. return rgb2hsl(cmyk2rgb(args));
  950. }
  951. function cmyk2hsv(args) {
  952. return rgb2hsv(cmyk2rgb(args));
  953. }
  954. function cmyk2hwb(args) {
  955. return rgb2hwb(cmyk2rgb(args));
  956. }
  957. function cmyk2keyword(args) {
  958. return rgb2keyword(cmyk2rgb(args));
  959. }
  960. function xyz2rgb(xyz) {
  961. var x = xyz[0] / 100,
  962. y = xyz[1] / 100,
  963. z = xyz[2] / 100,
  964. r, g, b;
  965. r = (x * 3.2406) + (y * -1.5372) + (z * -0.4986);
  966. g = (x * -0.9689) + (y * 1.8758) + (z * 0.0415);
  967. b = (x * 0.0557) + (y * -0.2040) + (z * 1.0570);
  968. // assume sRGB
  969. r = r > 0.0031308 ? ((1.055 * Math.pow(r, 1.0 / 2.4)) - 0.055)
  970. : r = (r * 12.92);
  971. g = g > 0.0031308 ? ((1.055 * Math.pow(g, 1.0 / 2.4)) - 0.055)
  972. : g = (g * 12.92);
  973. b = b > 0.0031308 ? ((1.055 * Math.pow(b, 1.0 / 2.4)) - 0.055)
  974. : b = (b * 12.92);
  975. r = Math.min(Math.max(0, r), 1);
  976. g = Math.min(Math.max(0, g), 1);
  977. b = Math.min(Math.max(0, b), 1);
  978. return [r * 255, g * 255, b * 255];
  979. }
  980. function xyz2lab(xyz) {
  981. var x = xyz[0],
  982. y = xyz[1],
  983. z = xyz[2],
  984. l, a, b;
  985. x /= 95.047;
  986. y /= 100;
  987. z /= 108.883;
  988. x = x > 0.008856 ? Math.pow(x, 1/3) : (7.787 * x) + (16 / 116);
  989. y = y > 0.008856 ? Math.pow(y, 1/3) : (7.787 * y) + (16 / 116);
  990. z = z > 0.008856 ? Math.pow(z, 1/3) : (7.787 * z) + (16 / 116);
  991. l = (116 * y) - 16;
  992. a = 500 * (x - y);
  993. b = 200 * (y - z);
  994. return [l, a, b];
  995. }
  996. function xyz2lch(args) {
  997. return lab2lch(xyz2lab(args));
  998. }
  999. function lab2xyz(lab) {
  1000. var l = lab[0],
  1001. a = lab[1],
  1002. b = lab[2],
  1003. x, y, z, y2;
  1004. if (l <= 8) {
  1005. y = (l * 100) / 903.3;
  1006. y2 = (7.787 * (y / 100)) + (16 / 116);
  1007. } else {
  1008. y = 100 * Math.pow((l + 16) / 116, 3);
  1009. y2 = Math.pow(y / 100, 1/3);
  1010. }
  1011. x = x / 95.047 <= 0.008856 ? x = (95.047 * ((a / 500) + y2 - (16 / 116))) / 7.787 : 95.047 * Math.pow((a / 500) + y2, 3);
  1012. z = z / 108.883 <= 0.008859 ? z = (108.883 * (y2 - (b / 200) - (16 / 116))) / 7.787 : 108.883 * Math.pow(y2 - (b / 200), 3);
  1013. return [x, y, z];
  1014. }
  1015. function lab2lch(lab) {
  1016. var l = lab[0],
  1017. a = lab[1],
  1018. b = lab[2],
  1019. hr, h, c;
  1020. hr = Math.atan2(b, a);
  1021. h = hr * 360 / 2 / Math.PI;
  1022. if (h < 0) {
  1023. h += 360;
  1024. }
  1025. c = Math.sqrt(a * a + b * b);
  1026. return [l, c, h];
  1027. }
  1028. function lab2rgb(args) {
  1029. return xyz2rgb(lab2xyz(args));
  1030. }
  1031. function lch2lab(lch) {
  1032. var l = lch[0],
  1033. c = lch[1],
  1034. h = lch[2],
  1035. a, b, hr;
  1036. hr = h / 360 * 2 * Math.PI;
  1037. a = c * Math.cos(hr);
  1038. b = c * Math.sin(hr);
  1039. return [l, a, b];
  1040. }
  1041. function lch2xyz(args) {
  1042. return lab2xyz(lch2lab(args));
  1043. }
  1044. function lch2rgb(args) {
  1045. return lab2rgb(lch2lab(args));
  1046. }
  1047. function keyword2rgb(keyword) {
  1048. return cssKeywords[keyword];
  1049. }
  1050. function keyword2hsl(args) {
  1051. return rgb2hsl(keyword2rgb(args));
  1052. }
  1053. function keyword2hsv(args) {
  1054. return rgb2hsv(keyword2rgb(args));
  1055. }
  1056. function keyword2hwb(args) {
  1057. return rgb2hwb(keyword2rgb(args));
  1058. }
  1059. function keyword2cmyk(args) {
  1060. return rgb2cmyk(keyword2rgb(args));
  1061. }
  1062. function keyword2lab(args) {
  1063. return rgb2lab(keyword2rgb(args));
  1064. }
  1065. function keyword2xyz(args) {
  1066. return rgb2xyz(keyword2rgb(args));
  1067. }
  1068. var cssKeywords = {
  1069. aliceblue: [240,248,255],
  1070. antiquewhite: [250,235,215],
  1071. aqua: [0,255,255],
  1072. aquamarine: [127,255,212],
  1073. azure: [240,255,255],
  1074. beige: [245,245,220],
  1075. bisque: [255,228,196],
  1076. black: [0,0,0],
  1077. blanchedalmond: [255,235,205],
  1078. blue: [0,0,255],
  1079. blueviolet: [138,43,226],
  1080. brown: [165,42,42],
  1081. burlywood: [222,184,135],
  1082. cadetblue: [95,158,160],
  1083. chartreuse: [127,255,0],
  1084. chocolate: [210,105,30],
  1085. coral: [255,127,80],
  1086. cornflowerblue: [100,149,237],
  1087. cornsilk: [255,248,220],
  1088. crimson: [220,20,60],
  1089. cyan: [0,255,255],
  1090. darkblue: [0,0,139],
  1091. darkcyan: [0,139,139],
  1092. darkgoldenrod: [184,134,11],
  1093. darkgray: [169,169,169],
  1094. darkgreen: [0,100,0],
  1095. darkgrey: [169,169,169],
  1096. darkkhaki: [189,183,107],
  1097. darkmagenta: [139,0,139],
  1098. darkolivegreen: [85,107,47],
  1099. darkorange: [255,140,0],
  1100. darkorchid: [153,50,204],
  1101. darkred: [139,0,0],
  1102. darksalmon: [233,150,122],
  1103. darkseagreen: [143,188,143],
  1104. darkslateblue: [72,61,139],
  1105. darkslategray: [47,79,79],
  1106. darkslategrey: [47,79,79],
  1107. darkturquoise: [0,206,209],
  1108. darkviolet: [148,0,211],
  1109. deeppink: [255,20,147],
  1110. deepskyblue: [0,191,255],
  1111. dimgray: [105,105,105],
  1112. dimgrey: [105,105,105],
  1113. dodgerblue: [30,144,255],
  1114. firebrick: [178,34,34],
  1115. floralwhite: [255,250,240],
  1116. forestgreen: [34,139,34],
  1117. fuchsia: [255,0,255],
  1118. gainsboro: [220,220,220],
  1119. ghostwhite: [248,248,255],
  1120. gold: [255,215,0],
  1121. goldenrod: [218,165,32],
  1122. gray: [128,128,128],
  1123. green: [0,128,0],
  1124. greenyellow: [173,255,47],
  1125. grey: [128,128,128],
  1126. honeydew: [240,255,240],
  1127. hotpink: [255,105,180],
  1128. indianred: [205,92,92],
  1129. indigo: [75,0,130],
  1130. ivory: [255,255,240],
  1131. khaki: [240,230,140],
  1132. lavender: [230,230,250],
  1133. lavenderblush: [255,240,245],
  1134. lawngreen: [124,252,0],
  1135. lemonchiffon: [255,250,205],
  1136. lightblue: [173,216,230],
  1137. lightcoral: [240,128,128],
  1138. lightcyan: [224,255,255],
  1139. lightgoldenrodyellow: [250,250,210],
  1140. lightgray: [211,211,211],
  1141. lightgreen: [144,238,144],
  1142. lightgrey: [211,211,211],
  1143. lightpink: [255,182,193],
  1144. lightsalmon: [255,160,122],
  1145. lightseagreen: [32,178,170],
  1146. lightskyblue: [135,206,250],
  1147. lightslategray: [119,136,153],
  1148. lightslategrey: [119,136,153],
  1149. lightsteelblue: [176,196,222],
  1150. lightyellow: [255,255,224],
  1151. lime: [0,255,0],
  1152. limegreen: [50,205,50],
  1153. linen: [250,240,230],
  1154. magenta: [255,0,255],
  1155. maroon: [128,0,0],
  1156. mediumaquamarine: [102,205,170],
  1157. mediumblue: [0,0,205],
  1158. mediumorchid: [186,85,211],
  1159. mediumpurple: [147,112,219],
  1160. mediumseagreen: [60,179,113],
  1161. mediumslateblue: [123,104,238],
  1162. mediumspringgreen: [0,250,154],
  1163. mediumturquoise: [72,209,204],
  1164. mediumvioletred: [199,21,133],
  1165. midnightblue: [25,25,112],
  1166. mintcream: [245,255,250],
  1167. mistyrose: [255,228,225],
  1168. moccasin: [255,228,181],
  1169. navajowhite: [255,222,173],
  1170. navy: [0,0,128],
  1171. oldlace: [253,245,230],
  1172. olive: [128,128,0],
  1173. olivedrab: [107,142,35],
  1174. orange: [255,165,0],
  1175. orangered: [255,69,0],
  1176. orchid: [218,112,214],
  1177. palegoldenrod: [238,232,170],
  1178. palegreen: [152,251,152],
  1179. paleturquoise: [175,238,238],
  1180. palevioletred: [219,112,147],
  1181. papayawhip: [255,239,213],
  1182. peachpuff: [255,218,185],
  1183. peru: [205,133,63],
  1184. pink: [255,192,203],
  1185. plum: [221,160,221],
  1186. powderblue: [176,224,230],
  1187. purple: [128,0,128],
  1188. rebeccapurple: [102, 51, 153],
  1189. red: [255,0,0],
  1190. rosybrown: [188,143,143],
  1191. royalblue: [65,105,225],
  1192. saddlebrown: [139,69,19],
  1193. salmon: [250,128,114],
  1194. sandybrown: [244,164,96],
  1195. seagreen: [46,139,87],
  1196. seashell: [255,245,238],
  1197. sienna: [160,82,45],
  1198. silver: [192,192,192],
  1199. skyblue: [135,206,235],
  1200. slateblue: [106,90,205],
  1201. slategray: [112,128,144],
  1202. slategrey: [112,128,144],
  1203. snow: [255,250,250],
  1204. springgreen: [0,255,127],
  1205. steelblue: [70,130,180],
  1206. tan: [210,180,140],
  1207. teal: [0,128,128],
  1208. thistle: [216,191,216],
  1209. tomato: [255,99,71],
  1210. turquoise: [64,224,208],
  1211. violet: [238,130,238],
  1212. wheat: [245,222,179],
  1213. white: [255,255,255],
  1214. whitesmoke: [245,245,245],
  1215. yellow: [255,255,0],
  1216. yellowgreen: [154,205,50]
  1217. };
  1218. var reverseKeywords = {};
  1219. for (var key in cssKeywords) {
  1220. reverseKeywords[JSON.stringify(cssKeywords[key])] = key;
  1221. }
  1222. },{}],4:[function(require,module,exports){
  1223. var conversions = require(3);
  1224. var convert = function() {
  1225. return new Converter();
  1226. }
  1227. for (var func in conversions) {
  1228. // export Raw versions
  1229. convert[func + "Raw"] = (function(func) {
  1230. // accept array or plain args
  1231. return function(arg) {
  1232. if (typeof arg == "number")
  1233. arg = Array.prototype.slice.call(arguments);
  1234. return conversions[func](arg);
  1235. }
  1236. })(func);
  1237. var pair = /(\w+)2(\w+)/.exec(func),
  1238. from = pair[1],
  1239. to = pair[2];
  1240. // export rgb2hsl and ["rgb"]["hsl"]
  1241. convert[from] = convert[from] || {};
  1242. convert[from][to] = convert[func] = (function(func) {
  1243. return function(arg) {
  1244. if (typeof arg == "number")
  1245. arg = Array.prototype.slice.call(arguments);
  1246. var val = conversions[func](arg);
  1247. if (typeof val == "string" || val === undefined)
  1248. return val; // keyword
  1249. for (var i = 0; i < val.length; i++)
  1250. val[i] = Math.round(val[i]);
  1251. return val;
  1252. }
  1253. })(func);
  1254. }
  1255. /* Converter does lazy conversion and caching */
  1256. var Converter = function() {
  1257. this.convs = {};
  1258. };
  1259. /* Either get the values for a space or
  1260. set the values for a space, depending on args */
  1261. Converter.prototype.routeSpace = function(space, args) {
  1262. var values = args[0];
  1263. if (values === undefined) {
  1264. // color.rgb()
  1265. return this.getValues(space);
  1266. }
  1267. // color.rgb(10, 10, 10)
  1268. if (typeof values == "number") {
  1269. values = Array.prototype.slice.call(args);
  1270. }
  1271. return this.setValues(space, values);
  1272. };
  1273. /* Set the values for a space, invalidating cache */
  1274. Converter.prototype.setValues = function(space, values) {
  1275. this.space = space;
  1276. this.convs = {};
  1277. this.convs[space] = values;
  1278. return this;
  1279. };
  1280. /* Get the values for a space. If there's already
  1281. a conversion for the space, fetch it, otherwise
  1282. compute it */
  1283. Converter.prototype.getValues = function(space) {
  1284. var vals = this.convs[space];
  1285. if (!vals) {
  1286. var fspace = this.space,
  1287. from = this.convs[fspace];
  1288. vals = convert[fspace][space](from);
  1289. this.convs[space] = vals;
  1290. }
  1291. return vals;
  1292. };
  1293. ["rgb", "hsl", "hsv", "cmyk", "keyword"].forEach(function(space) {
  1294. Converter.prototype[space] = function(vals) {
  1295. return this.routeSpace(space, arguments);
  1296. }
  1297. });
  1298. module.exports = convert;
  1299. },{"3":3}],5:[function(require,module,exports){
  1300. 'use strict'
  1301. module.exports = {
  1302. "aliceblue": [240, 248, 255],
  1303. "antiquewhite": [250, 235, 215],
  1304. "aqua": [0, 255, 255],
  1305. "aquamarine": [127, 255, 212],
  1306. "azure": [240, 255, 255],
  1307. "beige": [245, 245, 220],
  1308. "bisque": [255, 228, 196],
  1309. "black": [0, 0, 0],
  1310. "blanchedalmond": [255, 235, 205],
  1311. "blue": [0, 0, 255],
  1312. "blueviolet": [138, 43, 226],
  1313. "brown": [165, 42, 42],
  1314. "burlywood": [222, 184, 135],
  1315. "cadetblue": [95, 158, 160],
  1316. "chartreuse": [127, 255, 0],
  1317. "chocolate": [210, 105, 30],
  1318. "coral": [255, 127, 80],
  1319. "cornflowerblue": [100, 149, 237],
  1320. "cornsilk": [255, 248, 220],
  1321. "crimson": [220, 20, 60],
  1322. "cyan": [0, 255, 255],
  1323. "darkblue": [0, 0, 139],
  1324. "darkcyan": [0, 139, 139],
  1325. "darkgoldenrod": [184, 134, 11],
  1326. "darkgray": [169, 169, 169],
  1327. "darkgreen": [0, 100, 0],
  1328. "darkgrey": [169, 169, 169],
  1329. "darkkhaki": [189, 183, 107],
  1330. "darkmagenta": [139, 0, 139],
  1331. "darkolivegreen": [85, 107, 47],
  1332. "darkorange": [255, 140, 0],
  1333. "darkorchid": [153, 50, 204],
  1334. "darkred": [139, 0, 0],
  1335. "darksalmon": [233, 150, 122],
  1336. "darkseagreen": [143, 188, 143],
  1337. "darkslateblue": [72, 61, 139],
  1338. "darkslategray": [47, 79, 79],
  1339. "darkslategrey": [47, 79, 79],
  1340. "darkturquoise": [0, 206, 209],
  1341. "darkviolet": [148, 0, 211],
  1342. "deeppink": [255, 20, 147],
  1343. "deepskyblue": [0, 191, 255],
  1344. "dimgray": [105, 105, 105],
  1345. "dimgrey": [105, 105, 105],
  1346. "dodgerblue": [30, 144, 255],
  1347. "firebrick": [178, 34, 34],
  1348. "floralwhite": [255, 250, 240],
  1349. "forestgreen": [34, 139, 34],
  1350. "fuchsia": [255, 0, 255],
  1351. "gainsboro": [220, 220, 220],
  1352. "ghostwhite": [248, 248, 255],
  1353. "gold": [255, 215, 0],
  1354. "goldenrod": [218, 165, 32],
  1355. "gray": [128, 128, 128],
  1356. "green": [0, 128, 0],
  1357. "greenyellow": [173, 255, 47],
  1358. "grey": [128, 128, 128],
  1359. "honeydew": [240, 255, 240],
  1360. "hotpink": [255, 105, 180],
  1361. "indianred": [205, 92, 92],
  1362. "indigo": [75, 0, 130],
  1363. "ivory": [255, 255, 240],
  1364. "khaki": [240, 230, 140],
  1365. "lavender": [230, 230, 250],
  1366. "lavenderblush": [255, 240, 245],
  1367. "lawngreen": [124, 252, 0],
  1368. "lemonchiffon": [255, 250, 205],
  1369. "lightblue": [173, 216, 230],
  1370. "lightcoral": [240, 128, 128],
  1371. "lightcyan": [224, 255, 255],
  1372. "lightgoldenrodyellow": [250, 250, 210],
  1373. "lightgray": [211, 211, 211],
  1374. "lightgreen": [144, 238, 144],
  1375. "lightgrey": [211, 211, 211],
  1376. "lightpink": [255, 182, 193],
  1377. "lightsalmon": [255, 160, 122],
  1378. "lightseagreen": [32, 178, 170],
  1379. "lightskyblue": [135, 206, 250],
  1380. "lightslategray": [119, 136, 153],
  1381. "lightslategrey": [119, 136, 153],
  1382. "lightsteelblue": [176, 196, 222],
  1383. "lightyellow": [255, 255, 224],
  1384. "lime": [0, 255, 0],
  1385. "limegreen": [50, 205, 50],
  1386. "linen": [250, 240, 230],
  1387. "magenta": [255, 0, 255],
  1388. "maroon": [128, 0, 0],
  1389. "mediumaquamarine": [102, 205, 170],
  1390. "mediumblue": [0, 0, 205],
  1391. "mediumorchid": [186, 85, 211],
  1392. "mediumpurple": [147, 112, 219],
  1393. "mediumseagreen": [60, 179, 113],
  1394. "mediumslateblue": [123, 104, 238],
  1395. "mediumspringgreen": [0, 250, 154],
  1396. "mediumturquoise": [72, 209, 204],
  1397. "mediumvioletred": [199, 21, 133],
  1398. "midnightblue": [25, 25, 112],
  1399. "mintcream": [245, 255, 250],
  1400. "mistyrose": [255, 228, 225],
  1401. "moccasin": [255, 228, 181],
  1402. "navajowhite": [255, 222, 173],
  1403. "navy": [0, 0, 128],
  1404. "oldlace": [253, 245, 230],
  1405. "olive": [128, 128, 0],
  1406. "olivedrab": [107, 142, 35],
  1407. "orange": [255, 165, 0],
  1408. "orangered": [255, 69, 0],
  1409. "orchid": [218, 112, 214],
  1410. "palegoldenrod": [238, 232, 170],
  1411. "palegreen": [152, 251, 152],
  1412. "paleturquoise": [175, 238, 238],
  1413. "palevioletred": [219, 112, 147],
  1414. "papayawhip": [255, 239, 213],
  1415. "peachpuff": [255, 218, 185],
  1416. "peru": [205, 133, 63],
  1417. "pink": [255, 192, 203],
  1418. "plum": [221, 160, 221],
  1419. "powderblue": [176, 224, 230],
  1420. "purple": [128, 0, 128],
  1421. "rebeccapurple": [102, 51, 153],
  1422. "red": [255, 0, 0],
  1423. "rosybrown": [188, 143, 143],
  1424. "royalblue": [65, 105, 225],
  1425. "saddlebrown": [139, 69, 19],
  1426. "salmon": [250, 128, 114],
  1427. "sandybrown": [244, 164, 96],
  1428. "seagreen": [46, 139, 87],
  1429. "seashell": [255, 245, 238],
  1430. "sienna": [160, 82, 45],
  1431. "silver": [192, 192, 192],
  1432. "skyblue": [135, 206, 235],
  1433. "slateblue": [106, 90, 205],
  1434. "slategray": [112, 128, 144],
  1435. "slategrey": [112, 128, 144],
  1436. "snow": [255, 250, 250],
  1437. "springgreen": [0, 255, 127],
  1438. "steelblue": [70, 130, 180],
  1439. "tan": [210, 180, 140],
  1440. "teal": [0, 128, 128],
  1441. "thistle": [216, 191, 216],
  1442. "tomato": [255, 99, 71],
  1443. "turquoise": [64, 224, 208],
  1444. "violet": [238, 130, 238],
  1445. "wheat": [245, 222, 179],
  1446. "white": [255, 255, 255],
  1447. "whitesmoke": [245, 245, 245],
  1448. "yellow": [255, 255, 0],
  1449. "yellowgreen": [154, 205, 50]
  1450. };
  1451. },{}],6:[function(require,module,exports){
  1452. //! moment.js
  1453. //! version : 2.20.1
  1454. //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
  1455. //! license : MIT
  1456. //! momentjs.com
  1457. ;(function (global, factory) {
  1458. typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
  1459. typeof define === 'function' && define.amd ? define(factory) :
  1460. global.moment = factory()
  1461. }(this, (function () { 'use strict';
  1462. var hookCallback;
  1463. function hooks () {
  1464. return hookCallback.apply(null, arguments);
  1465. }
  1466. // This is done to register the method called with moment()
  1467. // without creating circular dependencies.
  1468. function setHookCallback (callback) {
  1469. hookCallback = callback;
  1470. }
  1471. function isArray(input) {
  1472. return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]';
  1473. }
  1474. function isObject(input) {
  1475. // IE8 will treat undefined and null as object if it wasn't for
  1476. // input != null
  1477. return input != null && Object.prototype.toString.call(input) === '[object Object]';
  1478. }
  1479. function isObjectEmpty(obj) {
  1480. if (Object.getOwnPropertyNames) {
  1481. return (Object.getOwnPropertyNames(obj).length === 0);
  1482. } else {
  1483. var k;
  1484. for (k in obj) {
  1485. if (obj.hasOwnProperty(k)) {
  1486. return false;
  1487. }
  1488. }
  1489. return true;
  1490. }
  1491. }
  1492. function isUndefined(input) {
  1493. return input === void 0;
  1494. }
  1495. function isNumber(input) {
  1496. return typeof input === 'number' || Object.prototype.toString.call(input) === '[object Number]';
  1497. }
  1498. function isDate(input) {
  1499. return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]';
  1500. }
  1501. function map(arr, fn) {
  1502. var res = [], i;
  1503. for (i = 0; i < arr.length; ++i) {
  1504. res.push(fn(arr[i], i));
  1505. }
  1506. return res;
  1507. }
  1508. function hasOwnProp(a, b) {
  1509. return Object.prototype.hasOwnProperty.call(a, b);
  1510. }
  1511. function extend(a, b) {
  1512. for (var i in b) {
  1513. if (hasOwnProp(b, i)) {
  1514. a[i] = b[i];
  1515. }
  1516. }
  1517. if (hasOwnProp(b, 'toString')) {
  1518. a.toString = b.toString;
  1519. }
  1520. if (hasOwnProp(b, 'valueOf')) {
  1521. a.valueOf = b.valueOf;
  1522. }
  1523. return a;
  1524. }
  1525. function createUTC (input, format, locale, strict) {
  1526. return createLocalOrUTC(input, format, locale, strict, true).utc();
  1527. }
  1528. function defaultParsingFlags() {
  1529. // We need to deep clone this object.
  1530. return {
  1531. empty : false,
  1532. unusedTokens : [],
  1533. unusedInput : [],
  1534. overflow : -2,
  1535. charsLeftOver : 0,
  1536. nullInput : false,
  1537. invalidMonth : null,
  1538. invalidFormat : false,
  1539. userInvalidated : false,
  1540. iso : false,
  1541. parsedDateParts : [],
  1542. meridiem : null,
  1543. rfc2822 : false,
  1544. weekdayMismatch : false
  1545. };
  1546. }
  1547. function getParsingFlags(m) {
  1548. if (m._pf == null) {
  1549. m._pf = defaultParsingFlags();
  1550. }
  1551. return m._pf;
  1552. }
  1553. var some;
  1554. if (Array.prototype.some) {
  1555. some = Array.prototype.some;
  1556. } else {
  1557. some = function (fun) {
  1558. var t = Object(this);
  1559. var len = t.length >>> 0;
  1560. for (var i = 0; i < len; i++) {
  1561. if (i in t && fun.call(this, t[i], i, t)) {
  1562. return true;
  1563. }
  1564. }
  1565. return false;
  1566. };
  1567. }
  1568. function isValid(m) {
  1569. if (m._isValid == null) {
  1570. var flags = getParsingFlags(m);
  1571. var parsedParts = some.call(flags.parsedDateParts, function (i) {
  1572. return i != null;
  1573. });
  1574. var isNowValid = !isNaN(m._d.getTime()) &&
  1575. flags.overflow < 0 &&
  1576. !flags.empty &&
  1577. !flags.invalidMonth &&
  1578. !flags.invalidWeekday &&
  1579. !flags.weekdayMismatch &&
  1580. !flags.nullInput &&
  1581. !flags.invalidFormat &&
  1582. !flags.userInvalidated &&
  1583. (!flags.meridiem || (flags.meridiem && parsedParts));
  1584. if (m._strict) {
  1585. isNowValid = isNowValid &&
  1586. flags.charsLeftOver === 0 &&
  1587. flags.unusedTokens.length === 0 &&
  1588. flags.bigHour === undefined;
  1589. }
  1590. if (Object.isFrozen == null || !Object.isFrozen(m)) {
  1591. m._isValid = isNowValid;
  1592. }
  1593. else {
  1594. return isNowValid;
  1595. }
  1596. }
  1597. return m._isValid;
  1598. }
  1599. function createInvalid (flags) {
  1600. var m = createUTC(NaN);
  1601. if (flags != null) {
  1602. extend(getParsingFlags(m), flags);
  1603. }
  1604. else {
  1605. getParsingFlags(m).userInvalidated = true;
  1606. }
  1607. return m;
  1608. }
  1609. // Plugins that add properties should also add the key here (null value),
  1610. // so we can properly clone ourselves.
  1611. var momentProperties = hooks.momentProperties = [];
  1612. function copyConfig(to, from) {
  1613. var i, prop, val;
  1614. if (!isUndefined(from._isAMomentObject)) {
  1615. to._isAMomentObject = from._isAMomentObject;
  1616. }
  1617. if (!isUndefined(from._i)) {
  1618. to._i = from._i;
  1619. }
  1620. if (!isUndefined(from._f)) {
  1621. to._f = from._f;
  1622. }
  1623. if (!isUndefined(from._l)) {
  1624. to._l = from._l;
  1625. }
  1626. if (!isUndefined(from._strict)) {
  1627. to._strict = from._strict;
  1628. }
  1629. if (!isUndefined(from._tzm)) {
  1630. to._tzm = from._tzm;
  1631. }
  1632. if (!isUndefined(from._isUTC)) {
  1633. to._isUTC = from._isUTC;
  1634. }
  1635. if (!isUndefined(from._offset)) {
  1636. to._offset = from._offset;
  1637. }
  1638. if (!isUndefined(from._pf)) {
  1639. to._pf = getParsingFlags(from);
  1640. }
  1641. if (!isUndefined(from._locale)) {
  1642. to._locale = from._locale;
  1643. }
  1644. if (momentProperties.length > 0) {
  1645. for (i = 0; i < momentProperties.length; i++) {
  1646. prop = momentProperties[i];
  1647. val = from[prop];
  1648. if (!isUndefined(val)) {
  1649. to[prop] = val;
  1650. }
  1651. }
  1652. }
  1653. return to;
  1654. }
  1655. var updateInProgress = false;
  1656. // Moment prototype object
  1657. function Moment(config) {
  1658. copyConfig(this, config);
  1659. this._d = new Date(config._d != null ? config._d.getTime() : NaN);
  1660. if (!this.isValid()) {
  1661. this._d = new Date(NaN);
  1662. }
  1663. // Prevent infinite loop in case updateOffset creates new moment
  1664. // objects.
  1665. if (updateInProgress === false) {
  1666. updateInProgress = true;
  1667. hooks.updateOffset(this);
  1668. updateInProgress = false;
  1669. }
  1670. }
  1671. function isMoment (obj) {
  1672. return obj instanceof Moment || (obj != null && obj._isAMomentObject != null);
  1673. }
  1674. function absFloor (number) {
  1675. if (number < 0) {
  1676. // -0 -> 0
  1677. return Math.ceil(number) || 0;
  1678. } else {
  1679. return Math.floor(number);
  1680. }
  1681. }
  1682. function toInt(argumentForCoercion) {
  1683. var coercedNumber = +argumentForCoercion,
  1684. value = 0;
  1685. if (coercedNumber !== 0 && isFinite(coercedNumber)) {
  1686. value = absFloor(coercedNumber);
  1687. }
  1688. return value;
  1689. }
  1690. // compare two arrays, return the number of differences
  1691. function compareArrays(array1, array2, dontConvert) {
  1692. var len = Math.min(array1.length, array2.length),
  1693. lengthDiff = Math.abs(array1.length - array2.length),
  1694. diffs = 0,
  1695. i;
  1696. for (i = 0; i < len; i++) {
  1697. if ((dontConvert && array1[i] !== array2[i]) ||
  1698. (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {
  1699. diffs++;
  1700. }
  1701. }
  1702. return diffs + lengthDiff;
  1703. }
  1704. function warn(msg) {
  1705. if (hooks.suppressDeprecationWarnings === false &&
  1706. (typeof console !== 'undefined') && console.warn) {
  1707. console.warn('Deprecation warning: ' + msg);
  1708. }
  1709. }
  1710. function deprecate(msg, fn) {
  1711. var firstTime = true;
  1712. return extend(function () {
  1713. if (hooks.deprecationHandler != null) {
  1714. hooks.deprecationHandler(null, msg);
  1715. }
  1716. if (firstTime) {
  1717. var args = [];
  1718. var arg;
  1719. for (var i = 0; i < arguments.length; i++) {
  1720. arg = '';
  1721. if (typeof arguments[i] === 'object') {
  1722. arg += '\n[' + i + '] ';
  1723. for (var key in arguments[0]) {
  1724. arg += key + ': ' + arguments[0][key] + ', ';
  1725. }
  1726. arg = arg.slice(0, -2); // Remove trailing comma and space
  1727. } else {
  1728. arg = arguments[i];
  1729. }
  1730. args.push(arg);
  1731. }
  1732. warn(msg + '\nArguments: ' + Array.prototype.slice.call(args).join('') + '\n' + (new Error()).stack);
  1733. firstTime = false;
  1734. }
  1735. return fn.apply(this, arguments);
  1736. }, fn);
  1737. }
  1738. var deprecations = {};
  1739. function deprecateSimple(name, msg) {
  1740. if (hooks.deprecationHandler != null) {
  1741. hooks.deprecationHandler(name, msg);
  1742. }
  1743. if (!deprecations[name]) {
  1744. warn(msg);
  1745. deprecations[name] = true;
  1746. }
  1747. }
  1748. hooks.suppressDeprecationWarnings = false;
  1749. hooks.deprecationHandler = null;
  1750. function isFunction(input) {
  1751. return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]';
  1752. }
  1753. function set (config) {
  1754. var prop, i;
  1755. for (i in config) {
  1756. prop = config[i];
  1757. if (isFunction(prop)) {
  1758. this[i] = prop;
  1759. } else {
  1760. this['_' + i] = prop;
  1761. }
  1762. }
  1763. this._config = config;
  1764. // Lenient ordinal parsing accepts just a number in addition to
  1765. // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.
  1766. // TODO: Remove "ordinalParse" fallback in next major release.
  1767. this._dayOfMonthOrdinalParseLenient = new RegExp(
  1768. (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +
  1769. '|' + (/\d{1,2}/).source);
  1770. }
  1771. function mergeConfigs(parentConfig, childConfig) {
  1772. var res = extend({}, parentConfig), prop;
  1773. for (prop in childConfig) {
  1774. if (hasOwnProp(childConfig, prop)) {
  1775. if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {
  1776. res[prop] = {};
  1777. extend(res[prop], parentConfig[prop]);
  1778. extend(res[prop], childConfig[prop]);
  1779. } else if (childConfig[prop] != null) {
  1780. res[prop] = childConfig[prop];
  1781. } else {
  1782. delete res[prop];
  1783. }
  1784. }
  1785. }
  1786. for (prop in parentConfig) {
  1787. if (hasOwnProp(parentConfig, prop) &&
  1788. !hasOwnProp(childConfig, prop) &&
  1789. isObject(parentConfig[prop])) {
  1790. // make sure changes to properties don't modify parent config
  1791. res[prop] = extend({}, res[prop]);
  1792. }
  1793. }
  1794. return res;
  1795. }
  1796. function Locale(config) {
  1797. if (config != null) {
  1798. this.set(config);
  1799. }
  1800. }
  1801. var keys;
  1802. if (Object.keys) {
  1803. keys = Object.keys;
  1804. } else {
  1805. keys = function (obj) {
  1806. var i, res = [];
  1807. for (i in obj) {
  1808. if (hasOwnProp(obj, i)) {
  1809. res.push(i);
  1810. }
  1811. }
  1812. return res;
  1813. };
  1814. }
  1815. var defaultCalendar = {
  1816. sameDay : '[Today at] LT',
  1817. nextDay : '[Tomorrow at] LT',
  1818. nextWeek : 'dddd [at] LT',
  1819. lastDay : '[Yesterday at] LT',
  1820. lastWeek : '[Last] dddd [at] LT',
  1821. sameElse : 'L'
  1822. };
  1823. function calendar (key, mom, now) {
  1824. var output = this._calendar[key] || this._calendar['sameElse'];
  1825. return isFunction(output) ? output.call(mom, now) : output;
  1826. }
  1827. var defaultLongDateFormat = {
  1828. LTS : 'h:mm:ss A',
  1829. LT : 'h:mm A',
  1830. L : 'MM/DD/YYYY',
  1831. LL : 'MMMM D, YYYY',
  1832. LLL : 'MMMM D, YYYY h:mm A',
  1833. LLLL : 'dddd, MMMM D, YYYY h:mm A'
  1834. };
  1835. function longDateFormat (key) {
  1836. var format = this._longDateFormat[key],
  1837. formatUpper = this._longDateFormat[key.toUpperCase()];
  1838. if (format || !formatUpper) {
  1839. return format;
  1840. }
  1841. this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) {
  1842. return val.slice(1);
  1843. });
  1844. return this._longDateFormat[key];
  1845. }
  1846. var defaultInvalidDate = 'Invalid date';
  1847. function invalidDate () {
  1848. return this._invalidDate;
  1849. }
  1850. var defaultOrdinal = '%d';
  1851. var defaultDayOfMonthOrdinalParse = /\d{1,2}/;
  1852. function ordinal (number) {
  1853. return this._ordinal.replace('%d', number);
  1854. }
  1855. var defaultRelativeTime = {
  1856. future : 'in %s',
  1857. past : '%s ago',
  1858. s : 'a few seconds',
  1859. ss : '%d seconds',
  1860. m : 'a minute',
  1861. mm : '%d minutes',
  1862. h : 'an hour',
  1863. hh : '%d hours',
  1864. d : 'a day',
  1865. dd : '%d days',
  1866. M : 'a month',
  1867. MM : '%d months',
  1868. y : 'a year',
  1869. yy : '%d years'
  1870. };
  1871. function relativeTime (number, withoutSuffix, string, isFuture) {
  1872. var output = this._relativeTime[string];
  1873. return (isFunction(output)) ?
  1874. output(number, withoutSuffix, string, isFuture) :
  1875. output.replace(/%d/i, number);
  1876. }
  1877. function pastFuture (diff, output) {
  1878. var format = this._relativeTime[diff > 0 ? 'future' : 'past'];
  1879. return isFunction(format) ? format(output) : format.replace(/%s/i, output);
  1880. }
  1881. var aliases = {};
  1882. function addUnitAlias (unit, shorthand) {
  1883. var lowerCase = unit.toLowerCase();
  1884. aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;
  1885. }
  1886. function normalizeUnits(units) {
  1887. return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined;
  1888. }
  1889. function normalizeObjectUnits(inputObject) {
  1890. var normalizedInput = {},
  1891. normalizedProp,
  1892. prop;
  1893. for (prop in inputObject) {
  1894. if (hasOwnProp(inputObject, prop)) {
  1895. normalizedProp = normalizeUnits(prop);
  1896. if (normalizedProp) {
  1897. normalizedInput[normalizedProp] = inputObject[prop];
  1898. }
  1899. }
  1900. }
  1901. return normalizedInput;
  1902. }
  1903. var priorities = {};
  1904. function addUnitPriority(unit, priority) {
  1905. priorities[unit] = priority;
  1906. }
  1907. function getPrioritizedUnits(unitsObj) {
  1908. var units = [];
  1909. for (var u in unitsObj) {
  1910. units.push({unit: u, priority: priorities[u]});
  1911. }
  1912. units.sort(function (a, b) {
  1913. return a.priority - b.priority;
  1914. });
  1915. return units;
  1916. }
  1917. function zeroFill(number, targetLength, forceSign) {
  1918. var absNumber = '' + Math.abs(number),
  1919. zerosToFill = targetLength - absNumber.length,
  1920. sign = number >= 0;
  1921. return (sign ? (forceSign ? '+' : '') : '-') +
  1922. Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber;
  1923. }
  1924. var formattingTokens = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;
  1925. var localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g;
  1926. var formatFunctions = {};
  1927. var formatTokenFunctions = {};
  1928. // token: 'M'
  1929. // padded: ['MM', 2]
  1930. // ordinal: 'Mo'
  1931. // callback: function () { this.month() + 1 }
  1932. function addFormatToken (token, padded, ordinal, callback) {
  1933. var func = callback;
  1934. if (typeof callback === 'string') {
  1935. func = function () {
  1936. return this[callback]();
  1937. };
  1938. }
  1939. if (token) {
  1940. formatTokenFunctions[token] = func;
  1941. }
  1942. if (padded) {
  1943. formatTokenFunctions[padded[0]] = function () {
  1944. return zeroFill(func.apply(this, arguments), padded[1], padded[2]);
  1945. };
  1946. }
  1947. if (ordinal) {
  1948. formatTokenFunctions[ordinal] = function () {
  1949. return this.localeData().ordinal(func.apply(this, arguments), token);
  1950. };
  1951. }
  1952. }
  1953. function removeFormattingTokens(input) {
  1954. if (input.match(/\[[\s\S]/)) {
  1955. return input.replace(/^\[|\]$/g, '');
  1956. }
  1957. return input.replace(/\\/g, '');
  1958. }
  1959. function makeFormatFunction(format) {
  1960. var array = format.match(formattingTokens), i, length;
  1961. for (i = 0, length = array.length; i < length; i++) {
  1962. if (formatTokenFunctions[array[i]]) {
  1963. array[i] = formatTokenFunctions[array[i]];
  1964. } else {
  1965. array[i] = removeFormattingTokens(array[i]);
  1966. }
  1967. }
  1968. return function (mom) {
  1969. var output = '', i;
  1970. for (i = 0; i < length; i++) {
  1971. output += isFunction(array[i]) ? array[i].call(mom, format) : array[i];
  1972. }
  1973. return output;
  1974. };
  1975. }
  1976. // format date using native date object
  1977. function formatMoment(m, format) {
  1978. if (!m.isValid()) {
  1979. return m.localeData().invalidDate();
  1980. }
  1981. format = expandFormat(format, m.localeData());
  1982. formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format);
  1983. return formatFunctions[format](m);
  1984. }
  1985. function expandFormat(format, locale) {
  1986. var i = 5;
  1987. function replaceLongDateFormatTokens(input) {
  1988. return locale.longDateFormat(input) || input;
  1989. }
  1990. localFormattingTokens.lastIndex = 0;
  1991. while (i >= 0 && localFormattingTokens.test(format)) {
  1992. format = format.replace(localFormattingTokens, replaceLongDateFormatTokens);
  1993. localFormattingTokens.lastIndex = 0;
  1994. i -= 1;
  1995. }
  1996. return format;
  1997. }
  1998. var match1 = /\d/; // 0 - 9
  1999. var match2 = /\d\d/; // 00 - 99
  2000. var match3 = /\d{3}/; // 000 - 999
  2001. var match4 = /\d{4}/; // 0000 - 9999
  2002. var match6 = /[+-]?\d{6}/; // -999999 - 999999
  2003. var match1to2 = /\d\d?/; // 0 - 99
  2004. var match3to4 = /\d\d\d\d?/; // 999 - 9999
  2005. var match5to6 = /\d\d\d\d\d\d?/; // 99999 - 999999
  2006. var match1to3 = /\d{1,3}/; // 0 - 999
  2007. var match1to4 = /\d{1,4}/; // 0 - 9999
  2008. var match1to6 = /[+-]?\d{1,6}/; // -999999 - 999999
  2009. var matchUnsigned = /\d+/; // 0 - inf
  2010. var matchSigned = /[+-]?\d+/; // -inf - inf
  2011. var matchOffset = /Z|[+-]\d\d:?\d\d/gi; // +00:00 -00:00 +0000 -0000 or Z
  2012. var matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi; // +00 -00 +00:00 -00:00 +0000 -0000 or Z
  2013. var matchTimestamp = /[+-]?\d+(\.\d{1,3})?/; // 123456789 123456789.123
  2014. // any word (or two) characters or numbers including two/three word month in arabic.
  2015. // includes scottish gaelic two word and hyphenated months
  2016. var matchWord = /[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;
  2017. var regexes = {};
  2018. function addRegexToken (token, regex, strictRegex) {
  2019. regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) {
  2020. return (isStrict && strictRegex) ? strictRegex : regex;
  2021. };
  2022. }
  2023. function getParseRegexForToken (token, config) {
  2024. if (!hasOwnProp(regexes, token)) {
  2025. return new RegExp(unescapeFormat(token));
  2026. }
  2027. return regexes[token](config._strict, config._locale);
  2028. }
  2029. // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
  2030. function unescapeFormat(s) {
  2031. return regexEscape(s.replace('\\', '').replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4) {
  2032. return p1 || p2 || p3 || p4;
  2033. }));
  2034. }
  2035. function regexEscape(s) {
  2036. return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
  2037. }
  2038. var tokens = {};
  2039. function addParseToken (token, callback) {
  2040. var i, func = callback;
  2041. if (typeof token === 'string') {
  2042. token = [token];
  2043. }
  2044. if (isNumber(callback)) {
  2045. func = function (input, array) {
  2046. array[callback] = toInt(input);
  2047. };
  2048. }
  2049. for (i = 0; i < token.length; i++) {
  2050. tokens[token[i]] = func;
  2051. }
  2052. }
  2053. function addWeekParseToken (token, callback) {
  2054. addParseToken(token, function (input, array, config, token) {
  2055. config._w = config._w || {};
  2056. callback(input, config._w, config, token);
  2057. });
  2058. }
  2059. function addTimeToArrayFromToken(token, input, config) {
  2060. if (input != null && hasOwnProp(tokens, token)) {
  2061. tokens[token](input, config._a, config, token);
  2062. }
  2063. }
  2064. var YEAR = 0;
  2065. var MONTH = 1;
  2066. var DATE = 2;
  2067. var HOUR = 3;
  2068. var MINUTE = 4;
  2069. var SECOND = 5;
  2070. var MILLISECOND = 6;
  2071. var WEEK = 7;
  2072. var WEEKDAY = 8;
  2073. // FORMATTING
  2074. addFormatToken('Y', 0, 0, function () {
  2075. var y = this.year();
  2076. return y <= 9999 ? '' + y : '+' + y;
  2077. });
  2078. addFormatToken(0, ['YY', 2], 0, function () {
  2079. return this.year() % 100;
  2080. });
  2081. addFormatToken(0, ['YYYY', 4], 0, 'year');
  2082. addFormatToken(0, ['YYYYY', 5], 0, 'year');
  2083. addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');
  2084. // ALIASES
  2085. addUnitAlias('year', 'y');
  2086. // PRIORITIES
  2087. addUnitPriority('year', 1);
  2088. // PARSING
  2089. addRegexToken('Y', matchSigned);
  2090. addRegexToken('YY', match1to2, match2);
  2091. addRegexToken('YYYY', match1to4, match4);
  2092. addRegexToken('YYYYY', match1to6, match6);
  2093. addRegexToken('YYYYYY', match1to6, match6);
  2094. addParseToken(['YYYYY', 'YYYYYY'], YEAR);
  2095. addParseToken('YYYY', function (input, array) {
  2096. array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);
  2097. });
  2098. addParseToken('YY', function (input, array) {
  2099. array[YEAR] = hooks.parseTwoDigitYear(input);
  2100. });
  2101. addParseToken('Y', function (input, array) {
  2102. array[YEAR] = parseInt(input, 10);
  2103. });
  2104. // HELPERS
  2105. function daysInYear(year) {
  2106. return isLeapYear(year) ? 366 : 365;
  2107. }
  2108. function isLeapYear(year) {
  2109. return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
  2110. }
  2111. // HOOKS
  2112. hooks.parseTwoDigitYear = function (input) {
  2113. return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);
  2114. };
  2115. // MOMENTS
  2116. var getSetYear = makeGetSet('FullYear', true);
  2117. function getIsLeapYear () {
  2118. return isLeapYear(this.year());
  2119. }
  2120. function makeGetSet (unit, keepTime) {
  2121. return function (value) {
  2122. if (value != null) {
  2123. set$1(this, unit, value);
  2124. hooks.updateOffset(this, keepTime);
  2125. return this;
  2126. } else {
  2127. return get(this, unit);
  2128. }
  2129. };
  2130. }
  2131. function get (mom, unit) {
  2132. return mom.isValid() ?
  2133. mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN;
  2134. }
  2135. function set$1 (mom, unit, value) {
  2136. if (mom.isValid() && !isNaN(value)) {
  2137. if (unit === 'FullYear' && isLeapYear(mom.year()) && mom.month() === 1 && mom.date() === 29) {
  2138. mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value, mom.month(), daysInMonth(value, mom.month()));
  2139. }
  2140. else {
  2141. mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);
  2142. }
  2143. }
  2144. }
  2145. // MOMENTS
  2146. function stringGet (units) {
  2147. units = normalizeUnits(units);
  2148. if (isFunction(this[units])) {
  2149. return this[units]();
  2150. }
  2151. return this;
  2152. }
  2153. function stringSet (units, value) {
  2154. if (typeof units === 'object') {
  2155. units = normalizeObjectUnits(units);
  2156. var prioritized = getPrioritizedUnits(units);
  2157. for (var i = 0; i < prioritized.length; i++) {
  2158. this[prioritized[i].unit](units[prioritized[i].unit]);
  2159. }
  2160. } else {
  2161. units = normalizeUnits(units);
  2162. if (isFunction(this[units])) {
  2163. return this[units](value);
  2164. }
  2165. }
  2166. return this;
  2167. }
  2168. function mod(n, x) {
  2169. return ((n % x) + x) % x;
  2170. }
  2171. var indexOf;
  2172. if (Array.prototype.indexOf) {
  2173. indexOf = Array.prototype.indexOf;
  2174. } else {
  2175. indexOf = function (o) {
  2176. // I know
  2177. var i;
  2178. for (i = 0; i < this.length; ++i) {
  2179. if (this[i] === o) {
  2180. return i;
  2181. }
  2182. }
  2183. return -1;
  2184. };
  2185. }
  2186. function daysInMonth(year, month) {
  2187. if (isNaN(year) || isNaN(month)) {
  2188. return NaN;
  2189. }
  2190. var modMonth = mod(month, 12);
  2191. year += (month - modMonth) / 12;
  2192. return modMonth === 1 ? (isLeapYear(year) ? 29 : 28) : (31 - modMonth % 7 % 2);
  2193. }
  2194. // FORMATTING
  2195. addFormatToken('M', ['MM', 2], 'Mo', function () {
  2196. return this.month() + 1;
  2197. });
  2198. addFormatToken('MMM', 0, 0, function (format) {
  2199. return this.localeData().monthsShort(this, format);
  2200. });
  2201. addFormatToken('MMMM', 0, 0, function (format) {
  2202. return this.localeData().months(this, format);
  2203. });
  2204. // ALIASES
  2205. addUnitAlias('month', 'M');
  2206. // PRIORITY
  2207. addUnitPriority('month', 8);
  2208. // PARSING
  2209. addRegexToken('M', match1to2);
  2210. addRegexToken('MM', match1to2, match2);
  2211. addRegexToken('MMM', function (isStrict, locale) {
  2212. return locale.monthsShortRegex(isStrict);
  2213. });
  2214. addRegexToken('MMMM', function (isStrict, locale) {
  2215. return locale.monthsRegex(isStrict);
  2216. });
  2217. addParseToken(['M', 'MM'], function (input, array) {
  2218. array[MONTH] = toInt(input) - 1;
  2219. });
  2220. addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {
  2221. var month = config._locale.monthsParse(input, token, config._strict);
  2222. // if we didn't find a month name, mark the date as invalid.
  2223. if (month != null) {
  2224. array[MONTH] = month;
  2225. } else {
  2226. getParsingFlags(config).invalidMonth = input;
  2227. }
  2228. });
  2229. // LOCALES
  2230. var MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/;
  2231. var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_');
  2232. function localeMonths (m, format) {
  2233. if (!m) {
  2234. return isArray(this._months) ? this._months :
  2235. this._months['standalone'];
  2236. }
  2237. return isArray(this._months) ? this._months[m.month()] :
  2238. this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()];
  2239. }
  2240. var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_');
  2241. function localeMonthsShort (m, format) {
  2242. if (!m) {
  2243. return isArray(this._monthsShort) ? this._monthsShort :
  2244. this._monthsShort['standalone'];
  2245. }
  2246. return isArray(this._monthsShort) ? this._monthsShort[m.month()] :
  2247. this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()];
  2248. }
  2249. function handleStrictParse(monthName, format, strict) {
  2250. var i, ii, mom, llc = monthName.toLocaleLowerCase();
  2251. if (!this._monthsParse) {
  2252. // this is not used
  2253. this._monthsParse = [];
  2254. this._longMonthsParse = [];
  2255. this._shortMonthsParse = [];
  2256. for (i = 0; i < 12; ++i) {
  2257. mom = createUTC([2000, i]);
  2258. this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase();
  2259. this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();
  2260. }
  2261. }
  2262. if (strict) {
  2263. if (format === 'MMM') {
  2264. ii = indexOf.call(this._shortMonthsParse, llc);
  2265. return ii !== -1 ? ii : null;
  2266. } else {
  2267. ii = indexOf.call(this._longMonthsParse, llc);
  2268. return ii !== -1 ? ii : null;
  2269. }
  2270. } else {
  2271. if (format === 'MMM') {
  2272. ii = indexOf.call(this._shortMonthsParse, llc);
  2273. if (ii !== -1) {
  2274. return ii;
  2275. }
  2276. ii = indexOf.call(this._longMonthsParse, llc);
  2277. return ii !== -1 ? ii : null;
  2278. } else {
  2279. ii = indexOf.call(this._longMonthsParse, llc);
  2280. if (ii !== -1) {
  2281. return ii;
  2282. }
  2283. ii = indexOf.call(this._shortMonthsParse, llc);
  2284. return ii !== -1 ? ii : null;
  2285. }
  2286. }
  2287. }
  2288. function localeMonthsParse (monthName, format, strict) {
  2289. var i, mom, regex;
  2290. if (this._monthsParseExact) {
  2291. return handleStrictParse.call(this, monthName, format, strict);
  2292. }
  2293. if (!this._monthsParse) {
  2294. this._monthsParse = [];
  2295. this._longMonthsParse = [];
  2296. this._shortMonthsParse = [];
  2297. }
  2298. // TODO: add sorting
  2299. // Sorting makes sure if one month (or abbr) is a prefix of another
  2300. // see sorting in computeMonthsParse
  2301. for (i = 0; i < 12; i++) {
  2302. // make the regex if we don't have it already
  2303. mom = createUTC([2000, i]);
  2304. if (strict && !this._longMonthsParse[i]) {
  2305. this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i');
  2306. this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i');
  2307. }
  2308. if (!strict && !this._monthsParse[i]) {
  2309. regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');
  2310. this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');
  2311. }
  2312. // test the regex
  2313. if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) {
  2314. return i;
  2315. } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) {
  2316. return i;
  2317. } else if (!strict && this._monthsParse[i].test(monthName)) {
  2318. return i;
  2319. }
  2320. }
  2321. }
  2322. // MOMENTS
  2323. function setMonth (mom, value) {
  2324. var dayOfMonth;
  2325. if (!mom.isValid()) {
  2326. // No op
  2327. return mom;
  2328. }
  2329. if (typeof value === 'string') {
  2330. if (/^\d+$/.test(value)) {
  2331. value = toInt(value);
  2332. } else {
  2333. value = mom.localeData().monthsParse(value);
  2334. // TODO: Another silent failure?
  2335. if (!isNumber(value)) {
  2336. return mom;
  2337. }
  2338. }
  2339. }
  2340. dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));
  2341. mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);
  2342. return mom;
  2343. }
  2344. function getSetMonth (value) {
  2345. if (value != null) {
  2346. setMonth(this, value);
  2347. hooks.updateOffset(this, true);
  2348. return this;
  2349. } else {
  2350. return get(this, 'Month');
  2351. }
  2352. }
  2353. function getDaysInMonth () {
  2354. return daysInMonth(this.year(), this.month());
  2355. }
  2356. var defaultMonthsShortRegex = matchWord;
  2357. function monthsShortRegex (isStrict) {
  2358. if (this._monthsParseExact) {
  2359. if (!hasOwnProp(this, '_monthsRegex')) {
  2360. computeMonthsParse.call(this);
  2361. }
  2362. if (isStrict) {
  2363. return this._monthsShortStrictRegex;
  2364. } else {
  2365. return this._monthsShortRegex;
  2366. }
  2367. } else {
  2368. if (!hasOwnProp(this, '_monthsShortRegex')) {
  2369. this._monthsShortRegex = defaultMonthsShortRegex;
  2370. }
  2371. return this._monthsShortStrictRegex && isStrict ?
  2372. this._monthsShortStrictRegex : this._monthsShortRegex;
  2373. }
  2374. }
  2375. var defaultMonthsRegex = matchWord;
  2376. function monthsRegex (isStrict) {
  2377. if (this._monthsParseExact) {
  2378. if (!hasOwnProp(this, '_monthsRegex')) {
  2379. computeMonthsParse.call(this);
  2380. }
  2381. if (isStrict) {
  2382. return this._monthsStrictRegex;
  2383. } else {
  2384. return this._monthsRegex;
  2385. }
  2386. } else {
  2387. if (!hasOwnProp(this, '_monthsRegex')) {
  2388. this._monthsRegex = defaultMonthsRegex;
  2389. }
  2390. return this._monthsStrictRegex && isStrict ?
  2391. this._monthsStrictRegex : this._monthsRegex;
  2392. }
  2393. }
  2394. function computeMonthsParse () {
  2395. function cmpLenRev(a, b) {
  2396. return b.length - a.length;
  2397. }
  2398. var shortPieces = [], longPieces = [], mixedPieces = [],
  2399. i, mom;
  2400. for (i = 0; i < 12; i++) {
  2401. // make the regex if we don't have it already
  2402. mom = createUTC([2000, i]);
  2403. shortPieces.push(this.monthsShort(mom, ''));
  2404. longPieces.push(this.months(mom, ''));
  2405. mixedPieces.push(this.months(mom, ''));
  2406. mixedPieces.push(this.monthsShort(mom, ''));
  2407. }
  2408. // Sorting makes sure if one month (or abbr) is a prefix of another it
  2409. // will match the longer piece.
  2410. shortPieces.sort(cmpLenRev);
  2411. longPieces.sort(cmpLenRev);
  2412. mixedPieces.sort(cmpLenRev);
  2413. for (i = 0; i < 12; i++) {
  2414. shortPieces[i] = regexEscape(shortPieces[i]);
  2415. longPieces[i] = regexEscape(longPieces[i]);
  2416. }
  2417. for (i = 0; i < 24; i++) {
  2418. mixedPieces[i] = regexEscape(mixedPieces[i]);
  2419. }
  2420. this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
  2421. this._monthsShortRegex = this._monthsRegex;
  2422. this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');
  2423. this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');
  2424. }
  2425. function createDate (y, m, d, h, M, s, ms) {
  2426. // can't just apply() to create a date:
  2427. // https://stackoverflow.com/q/181348
  2428. var date = new Date(y, m, d, h, M, s, ms);
  2429. // the date constructor remaps years 0-99 to 1900-1999
  2430. if (y < 100 && y >= 0 && isFinite(date.getFullYear())) {
  2431. date.setFullYear(y);
  2432. }
  2433. return date;
  2434. }
  2435. function createUTCDate (y) {
  2436. var date = new Date(Date.UTC.apply(null, arguments));
  2437. // the Date.UTC function remaps years 0-99 to 1900-1999
  2438. if (y < 100 && y >= 0 && isFinite(date.getUTCFullYear())) {
  2439. date.setUTCFullYear(y);
  2440. }
  2441. return date;
  2442. }
  2443. // start-of-first-week - start-of-year
  2444. function firstWeekOffset(year, dow, doy) {
  2445. var // first-week day -- which january is always in the first week (4 for iso, 1 for other)
  2446. fwd = 7 + dow - doy,
  2447. // first-week day local weekday -- which local weekday is fwd
  2448. fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;
  2449. return -fwdlw + fwd - 1;
  2450. }
  2451. // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday
  2452. function dayOfYearFromWeeks(year, week, weekday, dow, doy) {
  2453. var localWeekday = (7 + weekday - dow) % 7,
  2454. weekOffset = firstWeekOffset(year, dow, doy),
  2455. dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,
  2456. resYear, resDayOfYear;
  2457. if (dayOfYear <= 0) {
  2458. resYear = year - 1;
  2459. resDayOfYear = daysInYear(resYear) + dayOfYear;
  2460. } else if (dayOfYear > daysInYear(year)) {
  2461. resYear = year + 1;
  2462. resDayOfYear = dayOfYear - daysInYear(year);
  2463. } else {
  2464. resYear = year;
  2465. resDayOfYear = dayOfYear;
  2466. }
  2467. return {
  2468. year: resYear,
  2469. dayOfYear: resDayOfYear
  2470. };
  2471. }
  2472. function weekOfYear(mom, dow, doy) {
  2473. var weekOffset = firstWeekOffset(mom.year(), dow, doy),
  2474. week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,
  2475. resWeek, resYear;
  2476. if (week < 1) {
  2477. resYear = mom.year() - 1;
  2478. resWeek = week + weeksInYear(resYear, dow, doy);
  2479. } else if (week > weeksInYear(mom.year(), dow, doy)) {
  2480. resWeek = week - weeksInYear(mom.year(), dow, doy);
  2481. resYear = mom.year() + 1;
  2482. } else {
  2483. resYear = mom.year();
  2484. resWeek = week;
  2485. }
  2486. return {
  2487. week: resWeek,
  2488. year: resYear
  2489. };
  2490. }
  2491. function weeksInYear(year, dow, doy) {
  2492. var weekOffset = firstWeekOffset(year, dow, doy),
  2493. weekOffsetNext = firstWeekOffset(year + 1, dow, doy);
  2494. return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;
  2495. }
  2496. // FORMATTING
  2497. addFormatToken('w', ['ww', 2], 'wo', 'week');
  2498. addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');
  2499. // ALIASES
  2500. addUnitAlias('week', 'w');
  2501. addUnitAlias('isoWeek', 'W');
  2502. // PRIORITIES
  2503. addUnitPriority('week', 5);
  2504. addUnitPriority('isoWeek', 5);
  2505. // PARSING
  2506. addRegexToken('w', match1to2);
  2507. addRegexToken('ww', match1to2, match2);
  2508. addRegexToken('W', match1to2);
  2509. addRegexToken('WW', match1to2, match2);
  2510. addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) {
  2511. week[token.substr(0, 1)] = toInt(input);
  2512. });
  2513. // HELPERS
  2514. // LOCALES
  2515. function localeWeek (mom) {
  2516. return weekOfYear(mom, this._week.dow, this._week.doy).week;
  2517. }
  2518. var defaultLocaleWeek = {
  2519. dow : 0, // Sunday is the first day of the week.
  2520. doy : 6 // The week that contains Jan 1st is the first week of the year.
  2521. };
  2522. function localeFirstDayOfWeek () {
  2523. return this._week.dow;
  2524. }
  2525. function localeFirstDayOfYear () {
  2526. return this._week.doy;
  2527. }
  2528. // MOMENTS
  2529. function getSetWeek (input) {
  2530. var week = this.localeData().week(this);
  2531. return input == null ? week : this.add((input - week) * 7, 'd');
  2532. }
  2533. function getSetISOWeek (input) {
  2534. var week = weekOfYear(this, 1, 4).week;
  2535. return input == null ? week : this.add((input - week) * 7, 'd');
  2536. }
  2537. // FORMATTING
  2538. addFormatToken('d', 0, 'do', 'day');
  2539. addFormatToken('dd', 0, 0, function (format) {
  2540. return this.localeData().weekdaysMin(this, format);
  2541. });
  2542. addFormatToken('ddd', 0, 0, function (format) {
  2543. return this.localeData().weekdaysShort(this, format);
  2544. });
  2545. addFormatToken('dddd', 0, 0, function (format) {
  2546. return this.localeData().weekdays(this, format);
  2547. });
  2548. addFormatToken('e', 0, 0, 'weekday');
  2549. addFormatToken('E', 0, 0, 'isoWeekday');
  2550. // ALIASES
  2551. addUnitAlias('day', 'd');
  2552. addUnitAlias('weekday', 'e');
  2553. addUnitAlias('isoWeekday', 'E');
  2554. // PRIORITY
  2555. addUnitPriority('day', 11);
  2556. addUnitPriority('weekday', 11);
  2557. addUnitPriority('isoWeekday', 11);
  2558. // PARSING
  2559. addRegexToken('d', match1to2);
  2560. addRegexToken('e', match1to2);
  2561. addRegexToken('E', match1to2);
  2562. addRegexToken('dd', function (isStrict, locale) {
  2563. return locale.weekdaysMinRegex(isStrict);
  2564. });
  2565. addRegexToken('ddd', function (isStrict, locale) {
  2566. return locale.weekdaysShortRegex(isStrict);
  2567. });
  2568. addRegexToken('dddd', function (isStrict, locale) {
  2569. return locale.weekdaysRegex(isStrict);
  2570. });
  2571. addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {
  2572. var weekday = config._locale.weekdaysParse(input, token, config._strict);
  2573. // if we didn't get a weekday name, mark the date as invalid
  2574. if (weekday != null) {
  2575. week.d = weekday;
  2576. } else {
  2577. getParsingFlags(config).invalidWeekday = input;
  2578. }
  2579. });
  2580. addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {
  2581. week[token] = toInt(input);
  2582. });
  2583. // HELPERS
  2584. function parseWeekday(input, locale) {
  2585. if (typeof input !== 'string') {
  2586. return input;
  2587. }
  2588. if (!isNaN(input)) {
  2589. return parseInt(input, 10);
  2590. }
  2591. input = locale.weekdaysParse(input);
  2592. if (typeof input === 'number') {
  2593. return input;
  2594. }
  2595. return null;
  2596. }
  2597. function parseIsoWeekday(input, locale) {
  2598. if (typeof input === 'string') {
  2599. return locale.weekdaysParse(input) % 7 || 7;
  2600. }
  2601. return isNaN(input) ? null : input;
  2602. }
  2603. // LOCALES
  2604. var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_');
  2605. function localeWeekdays (m, format) {
  2606. if (!m) {
  2607. return isArray(this._weekdays) ? this._weekdays :
  2608. this._weekdays['standalone'];
  2609. }
  2610. return isArray(this._weekdays) ? this._weekdays[m.day()] :
  2611. this._weekdays[this._weekdays.isFormat.test(format) ? 'format' : 'standalone'][m.day()];
  2612. }
  2613. var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_');
  2614. function localeWeekdaysShort (m) {
  2615. return (m) ? this._weekdaysShort[m.day()] : this._weekdaysShort;
  2616. }
  2617. var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_');
  2618. function localeWeekdaysMin (m) {
  2619. return (m) ? this._weekdaysMin[m.day()] : this._weekdaysMin;
  2620. }
  2621. function handleStrictParse$1(weekdayName, format, strict) {
  2622. var i, ii, mom, llc = weekdayName.toLocaleLowerCase();
  2623. if (!this._weekdaysParse) {
  2624. this._weekdaysParse = [];
  2625. this._shortWeekdaysParse = [];
  2626. this._minWeekdaysParse = [];
  2627. for (i = 0; i < 7; ++i) {
  2628. mom = createUTC([2000, 1]).day(i);
  2629. this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase();
  2630. this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase();
  2631. this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();
  2632. }
  2633. }
  2634. if (strict) {
  2635. if (format === 'dddd') {
  2636. ii = indexOf.call(this._weekdaysParse, llc);
  2637. return ii !== -1 ? ii : null;
  2638. } else if (format === 'ddd') {
  2639. ii = indexOf.call(this._shortWeekdaysParse, llc);
  2640. return ii !== -1 ? ii : null;
  2641. } else {
  2642. ii = indexOf.call(this._minWeekdaysParse, llc);
  2643. return ii !== -1 ? ii : null;
  2644. }
  2645. } else {
  2646. if (format === 'dddd') {
  2647. ii = indexOf.call(this._weekdaysParse, llc);
  2648. if (ii !== -1) {
  2649. return ii;
  2650. }
  2651. ii = indexOf.call(this._shortWeekdaysParse, llc);
  2652. if (ii !== -1) {
  2653. return ii;
  2654. }
  2655. ii = indexOf.call(this._minWeekdaysParse, llc);
  2656. return ii !== -1 ? ii : null;
  2657. } else if (format === 'ddd') {
  2658. ii = indexOf.call(this._shortWeekdaysParse, llc);
  2659. if (ii !== -1) {
  2660. return ii;
  2661. }
  2662. ii = indexOf.call(this._weekdaysParse, llc);
  2663. if (ii !== -1) {
  2664. return ii;
  2665. }
  2666. ii = indexOf.call(this._minWeekdaysParse, llc);
  2667. return ii !== -1 ? ii : null;
  2668. } else {
  2669. ii = indexOf.call(this._minWeekdaysParse, llc);
  2670. if (ii !== -1) {
  2671. return ii;
  2672. }
  2673. ii = indexOf.call(this._weekdaysParse, llc);
  2674. if (ii !== -1) {
  2675. return ii;
  2676. }
  2677. ii = indexOf.call(this._shortWeekdaysParse, llc);
  2678. return ii !== -1 ? ii : null;
  2679. }
  2680. }
  2681. }
  2682. function localeWeekdaysParse (weekdayName, format, strict) {
  2683. var i, mom, regex;
  2684. if (this._weekdaysParseExact) {
  2685. return handleStrictParse$1.call(this, weekdayName, format, strict);
  2686. }
  2687. if (!this._weekdaysParse) {
  2688. this._weekdaysParse = [];
  2689. this._minWeekdaysParse = [];
  2690. this._shortWeekdaysParse = [];
  2691. this._fullWeekdaysParse = [];
  2692. }
  2693. for (i = 0; i < 7; i++) {
  2694. // make the regex if we don't have it already
  2695. mom = createUTC([2000, 1]).day(i);
  2696. if (strict && !this._fullWeekdaysParse[i]) {
  2697. this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\.?') + '$', 'i');
  2698. this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\.?') + '$', 'i');
  2699. this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\.?') + '$', 'i');
  2700. }
  2701. if (!this._weekdaysParse[i]) {
  2702. regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, '');
  2703. this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');
  2704. }
  2705. // test the regex
  2706. if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) {
  2707. return i;
  2708. } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) {
  2709. return i;
  2710. } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) {
  2711. return i;
  2712. } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {
  2713. return i;
  2714. }
  2715. }
  2716. }
  2717. // MOMENTS
  2718. function getSetDayOfWeek (input) {
  2719. if (!this.isValid()) {
  2720. return input != null ? this : NaN;
  2721. }
  2722. var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();
  2723. if (input != null) {
  2724. input = parseWeekday(input, this.localeData());
  2725. return this.add(input - day, 'd');
  2726. } else {
  2727. return day;
  2728. }
  2729. }
  2730. function getSetLocaleDayOfWeek (input) {
  2731. if (!this.isValid()) {
  2732. return input != null ? this : NaN;
  2733. }
  2734. var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;
  2735. return input == null ? weekday : this.add(input - weekday, 'd');
  2736. }
  2737. function getSetISODayOfWeek (input) {
  2738. if (!this.isValid()) {
  2739. return input != null ? this : NaN;
  2740. }
  2741. // behaves the same as moment#day except
  2742. // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)
  2743. // as a setter, sunday should belong to the previous week.
  2744. if (input != null) {
  2745. var weekday = parseIsoWeekday(input, this.localeData());
  2746. return this.day(this.day() % 7 ? weekday : weekday - 7);
  2747. } else {
  2748. return this.day() || 7;
  2749. }
  2750. }
  2751. var defaultWeekdaysRegex = matchWord;
  2752. function weekdaysRegex (isStrict) {
  2753. if (this._weekdaysParseExact) {
  2754. if (!hasOwnProp(this, '_weekdaysRegex')) {
  2755. computeWeekdaysParse.call(this);
  2756. }
  2757. if (isStrict) {
  2758. return this._weekdaysStrictRegex;
  2759. } else {
  2760. return this._weekdaysRegex;
  2761. }
  2762. } else {
  2763. if (!hasOwnProp(this, '_weekdaysRegex')) {
  2764. this._weekdaysRegex = defaultWeekdaysRegex;
  2765. }
  2766. return this._weekdaysStrictRegex && isStrict ?
  2767. this._weekdaysStrictRegex : this._weekdaysRegex;
  2768. }
  2769. }
  2770. var defaultWeekdaysShortRegex = matchWord;
  2771. function weekdaysShortRegex (isStrict) {
  2772. if (this._weekdaysParseExact) {
  2773. if (!hasOwnProp(this, '_weekdaysRegex')) {
  2774. computeWeekdaysParse.call(this);
  2775. }
  2776. if (isStrict) {
  2777. return this._weekdaysShortStrictRegex;
  2778. } else {
  2779. return this._weekdaysShortRegex;
  2780. }
  2781. } else {
  2782. if (!hasOwnProp(this, '_weekdaysShortRegex')) {
  2783. this._weekdaysShortRegex = defaultWeekdaysShortRegex;
  2784. }
  2785. return this._weekdaysShortStrictRegex && isStrict ?
  2786. this._weekdaysShortStrictRegex : this._weekdaysShortRegex;
  2787. }
  2788. }
  2789. var defaultWeekdaysMinRegex = matchWord;
  2790. function weekdaysMinRegex (isStrict) {
  2791. if (this._weekdaysParseExact) {
  2792. if (!hasOwnProp(this, '_weekdaysRegex')) {
  2793. computeWeekdaysParse.call(this);
  2794. }
  2795. if (isStrict) {
  2796. return this._weekdaysMinStrictRegex;
  2797. } else {
  2798. return this._weekdaysMinRegex;
  2799. }
  2800. } else {
  2801. if (!hasOwnProp(this, '_weekdaysMinRegex')) {
  2802. this._weekdaysMinRegex = defaultWeekdaysMinRegex;
  2803. }
  2804. return this._weekdaysMinStrictRegex && isStrict ?
  2805. this._weekdaysMinStrictRegex : this._weekdaysMinRegex;
  2806. }
  2807. }
  2808. function computeWeekdaysParse () {
  2809. function cmpLenRev(a, b) {
  2810. return b.length - a.length;
  2811. }
  2812. var minPieces = [], shortPieces = [], longPieces = [], mixedPieces = [],
  2813. i, mom, minp, shortp, longp;
  2814. for (i = 0; i < 7; i++) {
  2815. // make the regex if we don't have it already
  2816. mom = createUTC([2000, 1]).day(i);
  2817. minp = this.weekdaysMin(mom, '');
  2818. shortp = this.weekdaysShort(mom, '');
  2819. longp = this.weekdays(mom, '');
  2820. minPieces.push(minp);
  2821. shortPieces.push(shortp);
  2822. longPieces.push(longp);
  2823. mixedPieces.push(minp);
  2824. mixedPieces.push(shortp);
  2825. mixedPieces.push(longp);
  2826. }
  2827. // Sorting makes sure if one weekday (or abbr) is a prefix of another it
  2828. // will match the longer piece.
  2829. minPieces.sort(cmpLenRev);
  2830. shortPieces.sort(cmpLenRev);
  2831. longPieces.sort(cmpLenRev);
  2832. mixedPieces.sort(cmpLenRev);
  2833. for (i = 0; i < 7; i++) {
  2834. shortPieces[i] = regexEscape(shortPieces[i]);
  2835. longPieces[i] = regexEscape(longPieces[i]);
  2836. mixedPieces[i] = regexEscape(mixedPieces[i]);
  2837. }
  2838. this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
  2839. this._weekdaysShortRegex = this._weekdaysRegex;
  2840. this._weekdaysMinRegex = this._weekdaysRegex;
  2841. this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');
  2842. this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');
  2843. this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i');
  2844. }
  2845. // FORMATTING
  2846. function hFormat() {
  2847. return this.hours() % 12 || 12;
  2848. }
  2849. function kFormat() {
  2850. return this.hours() || 24;
  2851. }
  2852. addFormatToken('H', ['HH', 2], 0, 'hour');
  2853. addFormatToken('h', ['hh', 2], 0, hFormat);
  2854. addFormatToken('k', ['kk', 2], 0, kFormat);
  2855. addFormatToken('hmm', 0, 0, function () {
  2856. return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);
  2857. });
  2858. addFormatToken('hmmss', 0, 0, function () {
  2859. return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) +
  2860. zeroFill(this.seconds(), 2);
  2861. });
  2862. addFormatToken('Hmm', 0, 0, function () {
  2863. return '' + this.hours() + zeroFill(this.minutes(), 2);
  2864. });
  2865. addFormatToken('Hmmss', 0, 0, function () {
  2866. return '' + this.hours() + zeroFill(this.minutes(), 2) +
  2867. zeroFill(this.seconds(), 2);
  2868. });
  2869. function meridiem (token, lowercase) {
  2870. addFormatToken(token, 0, 0, function () {
  2871. return this.localeData().meridiem(this.hours(), this.minutes(), lowercase);
  2872. });
  2873. }
  2874. meridiem('a', true);
  2875. meridiem('A', false);
  2876. // ALIASES
  2877. addUnitAlias('hour', 'h');
  2878. // PRIORITY
  2879. addUnitPriority('hour', 13);
  2880. // PARSING
  2881. function matchMeridiem (isStrict, locale) {
  2882. return locale._meridiemParse;
  2883. }
  2884. addRegexToken('a', matchMeridiem);
  2885. addRegexToken('A', matchMeridiem);
  2886. addRegexToken('H', match1to2);
  2887. addRegexToken('h', match1to2);
  2888. addRegexToken('k', match1to2);
  2889. addRegexToken('HH', match1to2, match2);
  2890. addRegexToken('hh', match1to2, match2);
  2891. addRegexToken('kk', match1to2, match2);
  2892. addRegexToken('hmm', match3to4);
  2893. addRegexToken('hmmss', match5to6);
  2894. addRegexToken('Hmm', match3to4);
  2895. addRegexToken('Hmmss', match5to6);
  2896. addParseToken(['H', 'HH'], HOUR);
  2897. addParseToken(['k', 'kk'], function (input, array, config) {
  2898. var kInput = toInt(input);
  2899. array[HOUR] = kInput === 24 ? 0 : kInput;
  2900. });
  2901. addParseToken(['a', 'A'], function (input, array, config) {
  2902. config._isPm = config._locale.isPM(input);
  2903. config._meridiem = input;
  2904. });
  2905. addParseToken(['h', 'hh'], function (input, array, config) {
  2906. array[HOUR] = toInt(input);
  2907. getParsingFlags(config).bigHour = true;
  2908. });
  2909. addParseToken('hmm', function (input, array, config) {
  2910. var pos = input.length - 2;
  2911. array[HOUR] = toInt(input.substr(0, pos));
  2912. array[MINUTE] = toInt(input.substr(pos));
  2913. getParsingFlags(config).bigHour = true;
  2914. });
  2915. addParseToken('hmmss', function (input, array, config) {
  2916. var pos1 = input.length - 4;
  2917. var pos2 = input.length - 2;
  2918. array[HOUR] = toInt(input.substr(0, pos1));
  2919. array[MINUTE] = toInt(input.substr(pos1, 2));
  2920. array[SECOND] = toInt(input.substr(pos2));
  2921. getParsingFlags(config).bigHour = true;
  2922. });
  2923. addParseToken('Hmm', function (input, array, config) {
  2924. var pos = input.length - 2;
  2925. array[HOUR] = toInt(input.substr(0, pos));
  2926. array[MINUTE] = toInt(input.substr(pos));
  2927. });
  2928. addParseToken('Hmmss', function (input, array, config) {
  2929. var pos1 = input.length - 4;
  2930. var pos2 = input.length - 2;
  2931. array[HOUR] = toInt(input.substr(0, pos1));
  2932. array[MINUTE] = toInt(input.substr(pos1, 2));
  2933. array[SECOND] = toInt(input.substr(pos2));
  2934. });
  2935. // LOCALES
  2936. function localeIsPM (input) {
  2937. // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays
  2938. // Using charAt should be more compatible.
  2939. return ((input + '').toLowerCase().charAt(0) === 'p');
  2940. }
  2941. var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i;
  2942. function localeMeridiem (hours, minutes, isLower) {
  2943. if (hours > 11) {
  2944. return isLower ? 'pm' : 'PM';
  2945. } else {
  2946. return isLower ? 'am' : 'AM';
  2947. }
  2948. }
  2949. // MOMENTS
  2950. // Setting the hour should keep the time, because the user explicitly
  2951. // specified which hour he wants. So trying to maintain the same hour (in
  2952. // a new timezone) makes sense. Adding/subtracting hours does not follow
  2953. // this rule.
  2954. var getSetHour = makeGetSet('Hours', true);
  2955. // months
  2956. // week
  2957. // weekdays
  2958. // meridiem
  2959. var baseConfig = {
  2960. calendar: defaultCalendar,
  2961. longDateFormat: defaultLongDateFormat,
  2962. invalidDate: defaultInvalidDate,
  2963. ordinal: defaultOrdinal,
  2964. dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,
  2965. relativeTime: defaultRelativeTime,
  2966. months: defaultLocaleMonths,
  2967. monthsShort: defaultLocaleMonthsShort,
  2968. week: defaultLocaleWeek,
  2969. weekdays: defaultLocaleWeekdays,
  2970. weekdaysMin: defaultLocaleWeekdaysMin,
  2971. weekdaysShort: defaultLocaleWeekdaysShort,
  2972. meridiemParse: defaultLocaleMeridiemParse
  2973. };
  2974. // internal storage for locale config files
  2975. var locales = {};
  2976. var localeFamilies = {};
  2977. var globalLocale;
  2978. function normalizeLocale(key) {
  2979. return key ? key.toLowerCase().replace('_', '-') : key;
  2980. }
  2981. // pick the locale from the array
  2982. // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each
  2983. // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root
  2984. function chooseLocale(names) {
  2985. var i = 0, j, next, locale, split;
  2986. while (i < names.length) {
  2987. split = normalizeLocale(names[i]).split('-');
  2988. j = split.length;
  2989. next = normalizeLocale(names[i + 1]);
  2990. next = next ? next.split('-') : null;
  2991. while (j > 0) {
  2992. locale = loadLocale(split.slice(0, j).join('-'));
  2993. if (locale) {
  2994. return locale;
  2995. }
  2996. if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {
  2997. //the next array item is better than a shallower substring of this one
  2998. break;
  2999. }
  3000. j--;
  3001. }
  3002. i++;
  3003. }
  3004. return null;
  3005. }
  3006. function loadLocale(name) {
  3007. var oldLocale = null;
  3008. // TODO: Find a better way to register and load all the locales in Node
  3009. if (!locales[name] && (typeof module !== 'undefined') &&
  3010. module && module.exports) {
  3011. try {
  3012. oldLocale = globalLocale._abbr;
  3013. var aliasedRequire = require;
  3014. aliasedRequire('./locale/' + name);
  3015. getSetGlobalLocale(oldLocale);
  3016. } catch (e) {}
  3017. }
  3018. return locales[name];
  3019. }
  3020. // This function will load locale and then set the global locale. If
  3021. // no arguments are passed in, it will simply return the current global
  3022. // locale key.
  3023. function getSetGlobalLocale (key, values) {
  3024. var data;
  3025. if (key) {
  3026. if (isUndefined(values)) {
  3027. data = getLocale(key);
  3028. }
  3029. else {
  3030. data = defineLocale(key, values);
  3031. }
  3032. if (data) {
  3033. // moment.duration._locale = moment._locale = data;
  3034. globalLocale = data;
  3035. }
  3036. }
  3037. return globalLocale._abbr;
  3038. }
  3039. function defineLocale (name, config) {
  3040. if (config !== null) {
  3041. var parentConfig = baseConfig;
  3042. config.abbr = name;
  3043. if (locales[name] != null) {
  3044. deprecateSimple('defineLocaleOverride',
  3045. 'use moment.updateLocale(localeName, config) to change ' +
  3046. 'an existing locale. moment.defineLocale(localeName, ' +
  3047. 'config) should only be used for creating a new locale ' +
  3048. 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.');
  3049. parentConfig = locales[name]._config;
  3050. } else if (config.parentLocale != null) {
  3051. if (locales[config.parentLocale] != null) {
  3052. parentConfig = locales[config.parentLocale]._config;
  3053. } else {
  3054. if (!localeFamilies[config.parentLocale]) {
  3055. localeFamilies[config.parentLocale] = [];
  3056. }
  3057. localeFamilies[config.parentLocale].push({
  3058. name: name,
  3059. config: config
  3060. });
  3061. return null;
  3062. }
  3063. }
  3064. locales[name] = new Locale(mergeConfigs(parentConfig, config));
  3065. if (localeFamilies[name]) {
  3066. localeFamilies[name].forEach(function (x) {
  3067. defineLocale(x.name, x.config);
  3068. });
  3069. }
  3070. // backwards compat for now: also set the locale
  3071. // make sure we set the locale AFTER all child locales have been
  3072. // created, so we won't end up with the child locale set.
  3073. getSetGlobalLocale(name);
  3074. return locales[name];
  3075. } else {
  3076. // useful for testing
  3077. delete locales[name];
  3078. return null;
  3079. }
  3080. }
  3081. function updateLocale(name, config) {
  3082. if (config != null) {
  3083. var locale, tmpLocale, parentConfig = baseConfig;
  3084. // MERGE
  3085. tmpLocale = loadLocale(name);
  3086. if (tmpLocale != null) {
  3087. parentConfig = tmpLocale._config;
  3088. }
  3089. config = mergeConfigs(parentConfig, config);
  3090. locale = new Locale(config);
  3091. locale.parentLocale = locales[name];
  3092. locales[name] = locale;
  3093. // backwards compat for now: also set the locale
  3094. getSetGlobalLocale(name);
  3095. } else {
  3096. // pass null for config to unupdate, useful for tests
  3097. if (locales[name] != null) {
  3098. if (locales[name].parentLocale != null) {
  3099. locales[name] = locales[name].parentLocale;
  3100. } else if (locales[name] != null) {
  3101. delete locales[name];
  3102. }
  3103. }
  3104. }
  3105. return locales[name];
  3106. }
  3107. // returns locale data
  3108. function getLocale (key) {
  3109. var locale;
  3110. if (key && key._locale && key._locale._abbr) {
  3111. key = key._locale._abbr;
  3112. }
  3113. if (!key) {
  3114. return globalLocale;
  3115. }
  3116. if (!isArray(key)) {
  3117. //short-circuit everything else
  3118. locale = loadLocale(key);
  3119. if (locale) {
  3120. return locale;
  3121. }
  3122. key = [key];
  3123. }
  3124. return chooseLocale(key);
  3125. }
  3126. function listLocales() {
  3127. return keys(locales);
  3128. }
  3129. function checkOverflow (m) {
  3130. var overflow;
  3131. var a = m._a;
  3132. if (a && getParsingFlags(m).overflow === -2) {
  3133. overflow =
  3134. a[MONTH] < 0 || a[MONTH] > 11 ? MONTH :
  3135. a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE :
  3136. a[HOUR] < 0 || a[HOUR] > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR :
  3137. a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE :
  3138. a[SECOND] < 0 || a[SECOND] > 59 ? SECOND :
  3139. a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND :
  3140. -1;
  3141. if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {
  3142. overflow = DATE;
  3143. }
  3144. if (getParsingFlags(m)._overflowWeeks && overflow === -1) {
  3145. overflow = WEEK;
  3146. }
  3147. if (getParsingFlags(m)._overflowWeekday && overflow === -1) {
  3148. overflow = WEEKDAY;
  3149. }
  3150. getParsingFlags(m).overflow = overflow;
  3151. }
  3152. return m;
  3153. }
  3154. // Pick the first defined of two or three arguments.
  3155. function defaults(a, b, c) {
  3156. if (a != null) {
  3157. return a;
  3158. }
  3159. if (b != null) {
  3160. return b;
  3161. }
  3162. return c;
  3163. }
  3164. function currentDateArray(config) {
  3165. // hooks is actually the exported moment object
  3166. var nowValue = new Date(hooks.now());
  3167. if (config._useUTC) {
  3168. return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()];
  3169. }
  3170. return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];
  3171. }
  3172. // convert an array to a date.
  3173. // the array should mirror the parameters below
  3174. // note: all values past the year are optional and will default to the lowest possible value.
  3175. // [year, month, day , hour, minute, second, millisecond]
  3176. function configFromArray (config) {
  3177. var i, date, input = [], currentDate, expectedWeekday, yearToUse;
  3178. if (config._d) {
  3179. return;
  3180. }
  3181. currentDate = currentDateArray(config);
  3182. //compute day of the year from weeks and weekdays
  3183. if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {
  3184. dayOfYearFromWeekInfo(config);
  3185. }
  3186. //if the day of the year is set, figure out what it is
  3187. if (config._dayOfYear != null) {
  3188. yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);
  3189. if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) {
  3190. getParsingFlags(config)._overflowDayOfYear = true;
  3191. }
  3192. date = createUTCDate(yearToUse, 0, config._dayOfYear);
  3193. config._a[MONTH] = date.getUTCMonth();
  3194. config._a[DATE] = date.getUTCDate();
  3195. }
  3196. // Default to current date.
  3197. // * if no year, month, day of month are given, default to today
  3198. // * if day of month is given, default month and year
  3199. // * if month is given, default only year
  3200. // * if year is given, don't default anything
  3201. for (i = 0; i < 3 && config._a[i] == null; ++i) {
  3202. config._a[i] = input[i] = currentDate[i];
  3203. }
  3204. // Zero out whatever was not defaulted, including time
  3205. for (; i < 7; i++) {
  3206. config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];
  3207. }
  3208. // Check for 24:00:00.000
  3209. if (config._a[HOUR] === 24 &&
  3210. config._a[MINUTE] === 0 &&
  3211. config._a[SECOND] === 0 &&
  3212. config._a[MILLISECOND] === 0) {
  3213. config._nextDay = true;
  3214. config._a[HOUR] = 0;
  3215. }
  3216. config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);
  3217. expectedWeekday = config._useUTC ? config._d.getUTCDay() : config._d.getDay();
  3218. // Apply timezone offset from input. The actual utcOffset can be changed
  3219. // with parseZone.
  3220. if (config._tzm != null) {
  3221. config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
  3222. }
  3223. if (config._nextDay) {
  3224. config._a[HOUR] = 24;
  3225. }
  3226. // check for mismatching day of week
  3227. if (config._w && typeof config._w.d !== 'undefined' && config._w.d !== expectedWeekday) {
  3228. getParsingFlags(config).weekdayMismatch = true;
  3229. }
  3230. }
  3231. function dayOfYearFromWeekInfo(config) {
  3232. var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow;
  3233. w = config._w;
  3234. if (w.GG != null || w.W != null || w.E != null) {
  3235. dow = 1;
  3236. doy = 4;
  3237. // TODO: We need to take the current isoWeekYear, but that depends on
  3238. // how we interpret now (local, utc, fixed offset). So create
  3239. // a now version of current config (take local/utc/offset flags, and
  3240. // create now).
  3241. weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(createLocal(), 1, 4).year);
  3242. week = defaults(w.W, 1);
  3243. weekday = defaults(w.E, 1);
  3244. if (weekday < 1 || weekday > 7) {
  3245. weekdayOverflow = true;
  3246. }
  3247. } else {
  3248. dow = config._locale._week.dow;
  3249. doy = config._locale._week.doy;
  3250. var curWeek = weekOfYear(createLocal(), dow, doy);
  3251. weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);
  3252. // Default to current week.
  3253. week = defaults(w.w, curWeek.week);
  3254. if (w.d != null) {
  3255. // weekday -- low day numbers are considered next week
  3256. weekday = w.d;
  3257. if (weekday < 0 || weekday > 6) {
  3258. weekdayOverflow = true;
  3259. }
  3260. } else if (w.e != null) {
  3261. // local weekday -- counting starts from begining of week
  3262. weekday = w.e + dow;
  3263. if (w.e < 0 || w.e > 6) {
  3264. weekdayOverflow = true;
  3265. }
  3266. } else {
  3267. // default to begining of week
  3268. weekday = dow;
  3269. }
  3270. }
  3271. if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {
  3272. getParsingFlags(config)._overflowWeeks = true;
  3273. } else if (weekdayOverflow != null) {
  3274. getParsingFlags(config)._overflowWeekday = true;
  3275. } else {
  3276. temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);
  3277. config._a[YEAR] = temp.year;
  3278. config._dayOfYear = temp.dayOfYear;
  3279. }
  3280. }
  3281. // iso 8601 regex
  3282. // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)
  3283. var extendedIsoRegex = /^\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)?)?$/;
  3284. var basicIsoRegex = /^\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)?)?$/;
  3285. var tzRegex = /Z|[+-]\d\d(?::?\d\d)?/;
  3286. var isoDates = [
  3287. ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/],
  3288. ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/],
  3289. ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/],
  3290. ['GGGG-[W]WW', /\d{4}-W\d\d/, false],
  3291. ['YYYY-DDD', /\d{4}-\d{3}/],
  3292. ['YYYY-MM', /\d{4}-\d\d/, false],
  3293. ['YYYYYYMMDD', /[+-]\d{10}/],
  3294. ['YYYYMMDD', /\d{8}/],
  3295. // YYYYMM is NOT allowed by the standard
  3296. ['GGGG[W]WWE', /\d{4}W\d{3}/],
  3297. ['GGGG[W]WW', /\d{4}W\d{2}/, false],
  3298. ['YYYYDDD', /\d{7}/]
  3299. ];
  3300. // iso time formats and regexes
  3301. var isoTimes = [
  3302. ['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/],
  3303. ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/],
  3304. ['HH:mm:ss', /\d\d:\d\d:\d\d/],
  3305. ['HH:mm', /\d\d:\d\d/],
  3306. ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/],
  3307. ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/],
  3308. ['HHmmss', /\d\d\d\d\d\d/],
  3309. ['HHmm', /\d\d\d\d/],
  3310. ['HH', /\d\d/]
  3311. ];
  3312. var aspNetJsonRegex = /^\/?Date\((\-?\d+)/i;
  3313. // date from iso format
  3314. function configFromISO(config) {
  3315. var i, l,
  3316. string = config._i,
  3317. match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),
  3318. allowTime, dateFormat, timeFormat, tzFormat;
  3319. if (match) {
  3320. getParsingFlags(config).iso = true;
  3321. for (i = 0, l = isoDates.length; i < l; i++) {
  3322. if (isoDates[i][1].exec(match[1])) {
  3323. dateFormat = isoDates[i][0];
  3324. allowTime = isoDates[i][2] !== false;
  3325. break;
  3326. }
  3327. }
  3328. if (dateFormat == null) {
  3329. config._isValid = false;
  3330. return;
  3331. }
  3332. if (match[3]) {
  3333. for (i = 0, l = isoTimes.length; i < l; i++) {
  3334. if (isoTimes[i][1].exec(match[3])) {
  3335. // match[2] should be 'T' or space
  3336. timeFormat = (match[2] || ' ') + isoTimes[i][0];
  3337. break;
  3338. }
  3339. }
  3340. if (timeFormat == null) {
  3341. config._isValid = false;
  3342. return;
  3343. }
  3344. }
  3345. if (!allowTime && timeFormat != null) {
  3346. config._isValid = false;
  3347. return;
  3348. }
  3349. if (match[4]) {
  3350. if (tzRegex.exec(match[4])) {
  3351. tzFormat = 'Z';
  3352. } else {
  3353. config._isValid = false;
  3354. return;
  3355. }
  3356. }
  3357. config._f = dateFormat + (timeFormat || '') + (tzFormat || '');
  3358. configFromStringAndFormat(config);
  3359. } else {
  3360. config._isValid = false;
  3361. }
  3362. }
  3363. // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3
  3364. var rfc2822 = /^(?:(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}))$/;
  3365. function extractFromRFC2822Strings(yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) {
  3366. var result = [
  3367. untruncateYear(yearStr),
  3368. defaultLocaleMonthsShort.indexOf(monthStr),
  3369. parseInt(dayStr, 10),
  3370. parseInt(hourStr, 10),
  3371. parseInt(minuteStr, 10)
  3372. ];
  3373. if (secondStr) {
  3374. result.push(parseInt(secondStr, 10));
  3375. }
  3376. return result;
  3377. }
  3378. function untruncateYear(yearStr) {
  3379. var year = parseInt(yearStr, 10);
  3380. if (year <= 49) {
  3381. return 2000 + year;
  3382. } else if (year <= 999) {
  3383. return 1900 + year;
  3384. }
  3385. return year;
  3386. }
  3387. function preprocessRFC2822(s) {
  3388. // Remove comments and folding whitespace and replace multiple-spaces with a single space
  3389. return s.replace(/\([^)]*\)|[\n\t]/g, ' ').replace(/(\s\s+)/g, ' ').trim();
  3390. }
  3391. function checkWeekday(weekdayStr, parsedInput, config) {
  3392. if (weekdayStr) {
  3393. // TODO: Replace the vanilla JS Date object with an indepentent day-of-week check.
  3394. var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),
  3395. weekdayActual = new Date(parsedInput[0], parsedInput[1], parsedInput[2]).getDay();
  3396. if (weekdayProvided !== weekdayActual) {
  3397. getParsingFlags(config).weekdayMismatch = true;
  3398. config._isValid = false;
  3399. return false;
  3400. }
  3401. }
  3402. return true;
  3403. }
  3404. var obsOffsets = {
  3405. UT: 0,
  3406. GMT: 0,
  3407. EDT: -4 * 60,
  3408. EST: -5 * 60,
  3409. CDT: -5 * 60,
  3410. CST: -6 * 60,
  3411. MDT: -6 * 60,
  3412. MST: -7 * 60,
  3413. PDT: -7 * 60,
  3414. PST: -8 * 60
  3415. };
  3416. function calculateOffset(obsOffset, militaryOffset, numOffset) {
  3417. if (obsOffset) {
  3418. return obsOffsets[obsOffset];
  3419. } else if (militaryOffset) {
  3420. // the only allowed military tz is Z
  3421. return 0;
  3422. } else {
  3423. var hm = parseInt(numOffset, 10);
  3424. var m = hm % 100, h = (hm - m) / 100;
  3425. return h * 60 + m;
  3426. }
  3427. }
  3428. // date and time from ref 2822 format
  3429. function configFromRFC2822(config) {
  3430. var match = rfc2822.exec(preprocessRFC2822(config._i));
  3431. if (match) {
  3432. var parsedArray = extractFromRFC2822Strings(match[4], match[3], match[2], match[5], match[6], match[7]);
  3433. if (!checkWeekday(match[1], parsedArray, config)) {
  3434. return;
  3435. }
  3436. config._a = parsedArray;
  3437. config._tzm = calculateOffset(match[8], match[9], match[10]);
  3438. config._d = createUTCDate.apply(null, config._a);
  3439. config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
  3440. getParsingFlags(config).rfc2822 = true;
  3441. } else {
  3442. config._isValid = false;
  3443. }
  3444. }
  3445. // date from iso format or fallback
  3446. function configFromString(config) {
  3447. var matched = aspNetJsonRegex.exec(config._i);
  3448. if (matched !== null) {
  3449. config._d = new Date(+matched[1]);
  3450. return;
  3451. }
  3452. configFromISO(config);
  3453. if (config._isValid === false) {
  3454. delete config._isValid;
  3455. } else {
  3456. return;
  3457. }
  3458. configFromRFC2822(config);
  3459. if (config._isValid === false) {
  3460. delete config._isValid;
  3461. } else {
  3462. return;
  3463. }
  3464. // Final attempt, use Input Fallback
  3465. hooks.createFromInputFallback(config);
  3466. }
  3467. hooks.createFromInputFallback = deprecate(
  3468. 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +
  3469. 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +
  3470. 'discouraged and will be removed in an upcoming major release. Please refer to ' +
  3471. 'http://momentjs.com/guides/#/warnings/js-date/ for more info.',
  3472. function (config) {
  3473. config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));
  3474. }
  3475. );
  3476. // constant that refers to the ISO standard
  3477. hooks.ISO_8601 = function () {};
  3478. // constant that refers to the RFC 2822 form
  3479. hooks.RFC_2822 = function () {};
  3480. // date from string and format string
  3481. function configFromStringAndFormat(config) {
  3482. // TODO: Move this to another part of the creation flow to prevent circular deps
  3483. if (config._f === hooks.ISO_8601) {
  3484. configFromISO(config);
  3485. return;
  3486. }
  3487. if (config._f === hooks.RFC_2822) {
  3488. configFromRFC2822(config);
  3489. return;
  3490. }
  3491. config._a = [];
  3492. getParsingFlags(config).empty = true;
  3493. // This array is used to make a Date, either with `new Date` or `Date.UTC`
  3494. var string = '' + config._i,
  3495. i, parsedInput, tokens, token, skipped,
  3496. stringLength = string.length,
  3497. totalParsedInputLength = 0;
  3498. tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];
  3499. for (i = 0; i < tokens.length; i++) {
  3500. token = tokens[i];
  3501. parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];
  3502. // console.log('token', token, 'parsedInput', parsedInput,
  3503. // 'regex', getParseRegexForToken(token, config));
  3504. if (parsedInput) {
  3505. skipped = string.substr(0, string.indexOf(parsedInput));
  3506. if (skipped.length > 0) {
  3507. getParsingFlags(config).unusedInput.push(skipped);
  3508. }
  3509. string = string.slice(string.indexOf(parsedInput) + parsedInput.length);
  3510. totalParsedInputLength += parsedInput.length;
  3511. }
  3512. // don't parse if it's not a known token
  3513. if (formatTokenFunctions[token]) {
  3514. if (parsedInput) {
  3515. getParsingFlags(config).empty = false;
  3516. }
  3517. else {
  3518. getParsingFlags(config).unusedTokens.push(token);
  3519. }
  3520. addTimeToArrayFromToken(token, parsedInput, config);
  3521. }
  3522. else if (config._strict && !parsedInput) {
  3523. getParsingFlags(config).unusedTokens.push(token);
  3524. }
  3525. }
  3526. // add remaining unparsed input length to the string
  3527. getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength;
  3528. if (string.length > 0) {
  3529. getParsingFlags(config).unusedInput.push(string);
  3530. }
  3531. // clear _12h flag if hour is <= 12
  3532. if (config._a[HOUR] <= 12 &&
  3533. getParsingFlags(config).bigHour === true &&
  3534. config._a[HOUR] > 0) {
  3535. getParsingFlags(config).bigHour = undefined;
  3536. }
  3537. getParsingFlags(config).parsedDateParts = config._a.slice(0);
  3538. getParsingFlags(config).meridiem = config._meridiem;
  3539. // handle meridiem
  3540. config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem);
  3541. configFromArray(config);
  3542. checkOverflow(config);
  3543. }
  3544. function meridiemFixWrap (locale, hour, meridiem) {
  3545. var isPm;
  3546. if (meridiem == null) {
  3547. // nothing to do
  3548. return hour;
  3549. }
  3550. if (locale.meridiemHour != null) {
  3551. return locale.meridiemHour(hour, meridiem);
  3552. } else if (locale.isPM != null) {
  3553. // Fallback
  3554. isPm = locale.isPM(meridiem);
  3555. if (isPm && hour < 12) {
  3556. hour += 12;
  3557. }
  3558. if (!isPm && hour === 12) {
  3559. hour = 0;
  3560. }
  3561. return hour;
  3562. } else {
  3563. // this is not supposed to happen
  3564. return hour;
  3565. }
  3566. }
  3567. // date from string and array of format strings
  3568. function configFromStringAndArray(config) {
  3569. var tempConfig,
  3570. bestMoment,
  3571. scoreToBeat,
  3572. i,
  3573. currentScore;
  3574. if (config._f.length === 0) {
  3575. getParsingFlags(config).invalidFormat = true;
  3576. config._d = new Date(NaN);
  3577. return;
  3578. }
  3579. for (i = 0; i < config._f.length; i++) {
  3580. currentScore = 0;
  3581. tempConfig = copyConfig({}, config);
  3582. if (config._useUTC != null) {
  3583. tempConfig._useUTC = config._useUTC;
  3584. }
  3585. tempConfig._f = config._f[i];
  3586. configFromStringAndFormat(tempConfig);
  3587. if (!isValid(tempConfig)) {
  3588. continue;
  3589. }
  3590. // if there is any input that was not parsed add a penalty for that format
  3591. currentScore += getParsingFlags(tempConfig).charsLeftOver;
  3592. //or tokens
  3593. currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;
  3594. getParsingFlags(tempConfig).score = currentScore;
  3595. if (scoreToBeat == null || currentScore < scoreToBeat) {
  3596. scoreToBeat = currentScore;
  3597. bestMoment = tempConfig;
  3598. }
  3599. }
  3600. extend(config, bestMoment || tempConfig);
  3601. }
  3602. function configFromObject(config) {
  3603. if (config._d) {
  3604. return;
  3605. }
  3606. var i = normalizeObjectUnits(config._i);
  3607. config._a = map([i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond], function (obj) {
  3608. return obj && parseInt(obj, 10);
  3609. });
  3610. configFromArray(config);
  3611. }
  3612. function createFromConfig (config) {
  3613. var res = new Moment(checkOverflow(prepareConfig(config)));
  3614. if (res._nextDay) {
  3615. // Adding is smart enough around DST
  3616. res.add(1, 'd');
  3617. res._nextDay = undefined;
  3618. }
  3619. return res;
  3620. }
  3621. function prepareConfig (config) {
  3622. var input = config._i,
  3623. format = config._f;
  3624. config._locale = config._locale || getLocale(config._l);
  3625. if (input === null || (format === undefined && input === '')) {
  3626. return createInvalid({nullInput: true});
  3627. }
  3628. if (typeof input === 'string') {
  3629. config._i = input = config._locale.preparse(input);
  3630. }
  3631. if (isMoment(input)) {
  3632. return new Moment(checkOverflow(input));
  3633. } else if (isDate(input)) {
  3634. config._d = input;
  3635. } else if (isArray(format)) {
  3636. configFromStringAndArray(config);
  3637. } else if (format) {
  3638. configFromStringAndFormat(config);
  3639. } else {
  3640. configFromInput(config);
  3641. }
  3642. if (!isValid(config)) {
  3643. config._d = null;
  3644. }
  3645. return config;
  3646. }
  3647. function configFromInput(config) {
  3648. var input = config._i;
  3649. if (isUndefined(input)) {
  3650. config._d = new Date(hooks.now());
  3651. } else if (isDate(input)) {
  3652. config._d = new Date(input.valueOf());
  3653. } else if (typeof input === 'string') {
  3654. configFromString(config);
  3655. } else if (isArray(input)) {
  3656. config._a = map(input.slice(0), function (obj) {
  3657. return parseInt(obj, 10);
  3658. });
  3659. configFromArray(config);
  3660. } else if (isObject(input)) {
  3661. configFromObject(config);
  3662. } else if (isNumber(input)) {
  3663. // from milliseconds
  3664. config._d = new Date(input);
  3665. } else {
  3666. hooks.createFromInputFallback(config);
  3667. }
  3668. }
  3669. function createLocalOrUTC (input, format, locale, strict, isUTC) {
  3670. var c = {};
  3671. if (locale === true || locale === false) {
  3672. strict = locale;
  3673. locale = undefined;
  3674. }
  3675. if ((isObject(input) && isObjectEmpty(input)) ||
  3676. (isArray(input) && input.length === 0)) {
  3677. input = undefined;
  3678. }
  3679. // object construction must be done this way.
  3680. // https://github.com/moment/moment/issues/1423
  3681. c._isAMomentObject = true;
  3682. c._useUTC = c._isUTC = isUTC;
  3683. c._l = locale;
  3684. c._i = input;
  3685. c._f = format;
  3686. c._strict = strict;
  3687. return createFromConfig(c);
  3688. }
  3689. function createLocal (input, format, locale, strict) {
  3690. return createLocalOrUTC(input, format, locale, strict, false);
  3691. }
  3692. var prototypeMin = deprecate(
  3693. 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',
  3694. function () {
  3695. var other = createLocal.apply(null, arguments);
  3696. if (this.isValid() && other.isValid()) {
  3697. return other < this ? this : other;
  3698. } else {
  3699. return createInvalid();
  3700. }
  3701. }
  3702. );
  3703. var prototypeMax = deprecate(
  3704. 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',
  3705. function () {
  3706. var other = createLocal.apply(null, arguments);
  3707. if (this.isValid() && other.isValid()) {
  3708. return other > this ? this : other;
  3709. } else {
  3710. return createInvalid();
  3711. }
  3712. }
  3713. );
  3714. // Pick a moment m from moments so that m[fn](other) is true for all
  3715. // other. This relies on the function fn to be transitive.
  3716. //
  3717. // moments should either be an array of moment objects or an array, whose
  3718. // first element is an array of moment objects.
  3719. function pickBy(fn, moments) {
  3720. var res, i;
  3721. if (moments.length === 1 && isArray(moments[0])) {
  3722. moments = moments[0];
  3723. }
  3724. if (!moments.length) {
  3725. return createLocal();
  3726. }
  3727. res = moments[0];
  3728. for (i = 1; i < moments.length; ++i) {
  3729. if (!moments[i].isValid() || moments[i][fn](res)) {
  3730. res = moments[i];
  3731. }
  3732. }
  3733. return res;
  3734. }
  3735. // TODO: Use [].sort instead?
  3736. function min () {
  3737. var args = [].slice.call(arguments, 0);
  3738. return pickBy('isBefore', args);
  3739. }
  3740. function max () {
  3741. var args = [].slice.call(arguments, 0);
  3742. return pickBy('isAfter', args);
  3743. }
  3744. var now = function () {
  3745. return Date.now ? Date.now() : +(new Date());
  3746. };
  3747. var ordering = ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond'];
  3748. function isDurationValid(m) {
  3749. for (var key in m) {
  3750. if (!(indexOf.call(ordering, key) !== -1 && (m[key] == null || !isNaN(m[key])))) {
  3751. return false;
  3752. }
  3753. }
  3754. var unitHasDecimal = false;
  3755. for (var i = 0; i < ordering.length; ++i) {
  3756. if (m[ordering[i]]) {
  3757. if (unitHasDecimal) {
  3758. return false; // only allow non-integers for smallest unit
  3759. }
  3760. if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {
  3761. unitHasDecimal = true;
  3762. }
  3763. }
  3764. }
  3765. return true;
  3766. }
  3767. function isValid$1() {
  3768. return this._isValid;
  3769. }
  3770. function createInvalid$1() {
  3771. return createDuration(NaN);
  3772. }
  3773. function Duration (duration) {
  3774. var normalizedInput = normalizeObjectUnits(duration),
  3775. years = normalizedInput.year || 0,
  3776. quarters = normalizedInput.quarter || 0,
  3777. months = normalizedInput.month || 0,
  3778. weeks = normalizedInput.week || 0,
  3779. days = normalizedInput.day || 0,
  3780. hours = normalizedInput.hour || 0,
  3781. minutes = normalizedInput.minute || 0,
  3782. seconds = normalizedInput.second || 0,
  3783. milliseconds = normalizedInput.millisecond || 0;
  3784. this._isValid = isDurationValid(normalizedInput);
  3785. // representation for dateAddRemove
  3786. this._milliseconds = +milliseconds +
  3787. seconds * 1e3 + // 1000
  3788. minutes * 6e4 + // 1000 * 60
  3789. hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978
  3790. // Because of dateAddRemove treats 24 hours as different from a
  3791. // day when working around DST, we need to store them separately
  3792. this._days = +days +
  3793. weeks * 7;
  3794. // It is impossible to translate months into days without knowing
  3795. // which months you are are talking about, so we have to store
  3796. // it separately.
  3797. this._months = +months +
  3798. quarters * 3 +
  3799. years * 12;
  3800. this._data = {};
  3801. this._locale = getLocale();
  3802. this._bubble();
  3803. }
  3804. function isDuration (obj) {
  3805. return obj instanceof Duration;
  3806. }
  3807. function absRound (number) {
  3808. if (number < 0) {
  3809. return Math.round(-1 * number) * -1;
  3810. } else {
  3811. return Math.round(number);
  3812. }
  3813. }
  3814. // FORMATTING
  3815. function offset (token, separator) {
  3816. addFormatToken(token, 0, 0, function () {
  3817. var offset = this.utcOffset();
  3818. var sign = '+';
  3819. if (offset < 0) {
  3820. offset = -offset;
  3821. sign = '-';
  3822. }
  3823. return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~(offset) % 60, 2);
  3824. });
  3825. }
  3826. offset('Z', ':');
  3827. offset('ZZ', '');
  3828. // PARSING
  3829. addRegexToken('Z', matchShortOffset);
  3830. addRegexToken('ZZ', matchShortOffset);
  3831. addParseToken(['Z', 'ZZ'], function (input, array, config) {
  3832. config._useUTC = true;
  3833. config._tzm = offsetFromString(matchShortOffset, input);
  3834. });
  3835. // HELPERS
  3836. // timezone chunker
  3837. // '+10:00' > ['10', '00']
  3838. // '-1530' > ['-15', '30']
  3839. var chunkOffset = /([\+\-]|\d\d)/gi;
  3840. function offsetFromString(matcher, string) {
  3841. var matches = (string || '').match(matcher);
  3842. if (matches === null) {
  3843. return null;
  3844. }
  3845. var chunk = matches[matches.length - 1] || [];
  3846. var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];
  3847. var minutes = +(parts[1] * 60) + toInt(parts[2]);
  3848. return minutes === 0 ?
  3849. 0 :
  3850. parts[0] === '+' ? minutes : -minutes;
  3851. }
  3852. // Return a moment from input, that is local/utc/zone equivalent to model.
  3853. function cloneWithOffset(input, model) {
  3854. var res, diff;
  3855. if (model._isUTC) {
  3856. res = model.clone();
  3857. diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();
  3858. // Use low-level api, because this fn is low-level api.
  3859. res._d.setTime(res._d.valueOf() + diff);
  3860. hooks.updateOffset(res, false);
  3861. return res;
  3862. } else {
  3863. return createLocal(input).local();
  3864. }
  3865. }
  3866. function getDateOffset (m) {
  3867. // On Firefox.24 Date#getTimezoneOffset returns a floating point.
  3868. // https://github.com/moment/moment/pull/1871
  3869. return -Math.round(m._d.getTimezoneOffset() / 15) * 15;
  3870. }
  3871. // HOOKS
  3872. // This function will be called whenever a moment is mutated.
  3873. // It is intended to keep the offset in sync with the timezone.
  3874. hooks.updateOffset = function () {};
  3875. // MOMENTS
  3876. // keepLocalTime = true means only change the timezone, without
  3877. // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->
  3878. // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset
  3879. // +0200, so we adjust the time as needed, to be valid.
  3880. //
  3881. // Keeping the time actually adds/subtracts (one hour)
  3882. // from the actual represented time. That is why we call updateOffset
  3883. // a second time. In case it wants us to change the offset again
  3884. // _changeInProgress == true case, then we have to adjust, because
  3885. // there is no such time in the given timezone.
  3886. function getSetOffset (input, keepLocalTime, keepMinutes) {
  3887. var offset = this._offset || 0,
  3888. localAdjust;
  3889. if (!this.isValid()) {
  3890. return input != null ? this : NaN;
  3891. }
  3892. if (input != null) {
  3893. if (typeof input === 'string') {
  3894. input = offsetFromString(matchShortOffset, input);
  3895. if (input === null) {
  3896. return this;
  3897. }
  3898. } else if (Math.abs(input) < 16 && !keepMinutes) {
  3899. input = input * 60;
  3900. }
  3901. if (!this._isUTC && keepLocalTime) {
  3902. localAdjust = getDateOffset(this);
  3903. }
  3904. this._offset = input;
  3905. this._isUTC = true;
  3906. if (localAdjust != null) {
  3907. this.add(localAdjust, 'm');
  3908. }
  3909. if (offset !== input) {
  3910. if (!keepLocalTime || this._changeInProgress) {
  3911. addSubtract(this, createDuration(input - offset, 'm'), 1, false);
  3912. } else if (!this._changeInProgress) {
  3913. this._changeInProgress = true;
  3914. hooks.updateOffset(this, true);
  3915. this._changeInProgress = null;
  3916. }
  3917. }
  3918. return this;
  3919. } else {
  3920. return this._isUTC ? offset : getDateOffset(this);
  3921. }
  3922. }
  3923. function getSetZone (input, keepLocalTime) {
  3924. if (input != null) {
  3925. if (typeof input !== 'string') {
  3926. input = -input;
  3927. }
  3928. this.utcOffset(input, keepLocalTime);
  3929. return this;
  3930. } else {
  3931. return -this.utcOffset();
  3932. }
  3933. }
  3934. function setOffsetToUTC (keepLocalTime) {
  3935. return this.utcOffset(0, keepLocalTime);
  3936. }
  3937. function setOffsetToLocal (keepLocalTime) {
  3938. if (this._isUTC) {
  3939. this.utcOffset(0, keepLocalTime);
  3940. this._isUTC = false;
  3941. if (keepLocalTime) {
  3942. this.subtract(getDateOffset(this), 'm');
  3943. }
  3944. }
  3945. return this;
  3946. }
  3947. function setOffsetToParsedOffset () {
  3948. if (this._tzm != null) {
  3949. this.utcOffset(this._tzm, false, true);
  3950. } else if (typeof this._i === 'string') {
  3951. var tZone = offsetFromString(matchOffset, this._i);
  3952. if (tZone != null) {
  3953. this.utcOffset(tZone);
  3954. }
  3955. else {
  3956. this.utcOffset(0, true);
  3957. }
  3958. }
  3959. return this;
  3960. }
  3961. function hasAlignedHourOffset (input) {
  3962. if (!this.isValid()) {
  3963. return false;
  3964. }
  3965. input = input ? createLocal(input).utcOffset() : 0;
  3966. return (this.utcOffset() - input) % 60 === 0;
  3967. }
  3968. function isDaylightSavingTime () {
  3969. return (
  3970. this.utcOffset() > this.clone().month(0).utcOffset() ||
  3971. this.utcOffset() > this.clone().month(5).utcOffset()
  3972. );
  3973. }
  3974. function isDaylightSavingTimeShifted () {
  3975. if (!isUndefined(this._isDSTShifted)) {
  3976. return this._isDSTShifted;
  3977. }
  3978. var c = {};
  3979. copyConfig(c, this);
  3980. c = prepareConfig(c);
  3981. if (c._a) {
  3982. var other = c._isUTC ? createUTC(c._a) : createLocal(c._a);
  3983. this._isDSTShifted = this.isValid() &&
  3984. compareArrays(c._a, other.toArray()) > 0;
  3985. } else {
  3986. this._isDSTShifted = false;
  3987. }
  3988. return this._isDSTShifted;
  3989. }
  3990. function isLocal () {
  3991. return this.isValid() ? !this._isUTC : false;
  3992. }
  3993. function isUtcOffset () {
  3994. return this.isValid() ? this._isUTC : false;
  3995. }
  3996. function isUtc () {
  3997. return this.isValid() ? this._isUTC && this._offset === 0 : false;
  3998. }
  3999. // ASP.NET json date format regex
  4000. var aspNetRegex = /^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/;
  4001. // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html
  4002. // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere
  4003. // and further modified to allow for strings containing both week and day
  4004. var isoRegex = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;
  4005. function createDuration (input, key) {
  4006. var duration = input,
  4007. // matching against regexp is expensive, do it on demand
  4008. match = null,
  4009. sign,
  4010. ret,
  4011. diffRes;
  4012. if (isDuration(input)) {
  4013. duration = {
  4014. ms : input._milliseconds,
  4015. d : input._days,
  4016. M : input._months
  4017. };
  4018. } else if (isNumber(input)) {
  4019. duration = {};
  4020. if (key) {
  4021. duration[key] = input;
  4022. } else {
  4023. duration.milliseconds = input;
  4024. }
  4025. } else if (!!(match = aspNetRegex.exec(input))) {
  4026. sign = (match[1] === '-') ? -1 : 1;
  4027. duration = {
  4028. y : 0,
  4029. d : toInt(match[DATE]) * sign,
  4030. h : toInt(match[HOUR]) * sign,
  4031. m : toInt(match[MINUTE]) * sign,
  4032. s : toInt(match[SECOND]) * sign,
  4033. ms : toInt(absRound(match[MILLISECOND] * 1000)) * sign // the millisecond decimal point is included in the match
  4034. };
  4035. } else if (!!(match = isoRegex.exec(input))) {
  4036. sign = (match[1] === '-') ? -1 : (match[1] === '+') ? 1 : 1;
  4037. duration = {
  4038. y : parseIso(match[2], sign),
  4039. M : parseIso(match[3], sign),
  4040. w : parseIso(match[4], sign),
  4041. d : parseIso(match[5], sign),
  4042. h : parseIso(match[6], sign),
  4043. m : parseIso(match[7], sign),
  4044. s : parseIso(match[8], sign)
  4045. };
  4046. } else if (duration == null) {// checks for null or undefined
  4047. duration = {};
  4048. } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) {
  4049. diffRes = momentsDifference(createLocal(duration.from), createLocal(duration.to));
  4050. duration = {};
  4051. duration.ms = diffRes.milliseconds;
  4052. duration.M = diffRes.months;
  4053. }
  4054. ret = new Duration(duration);
  4055. if (isDuration(input) && hasOwnProp(input, '_locale')) {
  4056. ret._locale = input._locale;
  4057. }
  4058. return ret;
  4059. }
  4060. createDuration.fn = Duration.prototype;
  4061. createDuration.invalid = createInvalid$1;
  4062. function parseIso (inp, sign) {
  4063. // We'd normally use ~~inp for this, but unfortunately it also
  4064. // converts floats to ints.
  4065. // inp may be undefined, so careful calling replace on it.
  4066. var res = inp && parseFloat(inp.replace(',', '.'));
  4067. // apply sign while we're at it
  4068. return (isNaN(res) ? 0 : res) * sign;
  4069. }
  4070. function positiveMomentsDifference(base, other) {
  4071. var res = {milliseconds: 0, months: 0};
  4072. res.months = other.month() - base.month() +
  4073. (other.year() - base.year()) * 12;
  4074. if (base.clone().add(res.months, 'M').isAfter(other)) {
  4075. --res.months;
  4076. }
  4077. res.milliseconds = +other - +(base.clone().add(res.months, 'M'));
  4078. return res;
  4079. }
  4080. function momentsDifference(base, other) {
  4081. var res;
  4082. if (!(base.isValid() && other.isValid())) {
  4083. return {milliseconds: 0, months: 0};
  4084. }
  4085. other = cloneWithOffset(other, base);
  4086. if (base.isBefore(other)) {
  4087. res = positiveMomentsDifference(base, other);
  4088. } else {
  4089. res = positiveMomentsDifference(other, base);
  4090. res.milliseconds = -res.milliseconds;
  4091. res.months = -res.months;
  4092. }
  4093. return res;
  4094. }
  4095. // TODO: remove 'name' arg after deprecation is removed
  4096. function createAdder(direction, name) {
  4097. return function (val, period) {
  4098. var dur, tmp;
  4099. //invert the arguments, but complain about it
  4100. if (period !== null && !isNaN(+period)) {
  4101. deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +
  4102. 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');
  4103. tmp = val; val = period; period = tmp;
  4104. }
  4105. val = typeof val === 'string' ? +val : val;
  4106. dur = createDuration(val, period);
  4107. addSubtract(this, dur, direction);
  4108. return this;
  4109. };
  4110. }
  4111. function addSubtract (mom, duration, isAdding, updateOffset) {
  4112. var milliseconds = duration._milliseconds,
  4113. days = absRound(duration._days),
  4114. months = absRound(duration._months);
  4115. if (!mom.isValid()) {
  4116. // No op
  4117. return;
  4118. }
  4119. updateOffset = updateOffset == null ? true : updateOffset;
  4120. if (months) {
  4121. setMonth(mom, get(mom, 'Month') + months * isAdding);
  4122. }
  4123. if (days) {
  4124. set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);
  4125. }
  4126. if (milliseconds) {
  4127. mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);
  4128. }
  4129. if (updateOffset) {
  4130. hooks.updateOffset(mom, days || months);
  4131. }
  4132. }
  4133. var add = createAdder(1, 'add');
  4134. var subtract = createAdder(-1, 'subtract');
  4135. function getCalendarFormat(myMoment, now) {
  4136. var diff = myMoment.diff(now, 'days', true);
  4137. return diff < -6 ? 'sameElse' :
  4138. diff < -1 ? 'lastWeek' :
  4139. diff < 0 ? 'lastDay' :
  4140. diff < 1 ? 'sameDay' :
  4141. diff < 2 ? 'nextDay' :
  4142. diff < 7 ? 'nextWeek' : 'sameElse';
  4143. }
  4144. function calendar$1 (time, formats) {
  4145. // We want to compare the start of today, vs this.
  4146. // Getting start-of-today depends on whether we're local/utc/offset or not.
  4147. var now = time || createLocal(),
  4148. sod = cloneWithOffset(now, this).startOf('day'),
  4149. format = hooks.calendarFormat(this, sod) || 'sameElse';
  4150. var output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]);
  4151. return this.format(output || this.localeData().calendar(format, this, createLocal(now)));
  4152. }
  4153. function clone () {
  4154. return new Moment(this);
  4155. }
  4156. function isAfter (input, units) {
  4157. var localInput = isMoment(input) ? input : createLocal(input);
  4158. if (!(this.isValid() && localInput.isValid())) {
  4159. return false;
  4160. }
  4161. units = normalizeUnits(!isUndefined(units) ? units : 'millisecond');
  4162. if (units === 'millisecond') {
  4163. return this.valueOf() > localInput.valueOf();
  4164. } else {
  4165. return localInput.valueOf() < this.clone().startOf(units).valueOf();
  4166. }
  4167. }
  4168. function isBefore (input, units) {
  4169. var localInput = isMoment(input) ? input : createLocal(input);
  4170. if (!(this.isValid() && localInput.isValid())) {
  4171. return false;
  4172. }
  4173. units = normalizeUnits(!isUndefined(units) ? units : 'millisecond');
  4174. if (units === 'millisecond') {
  4175. return this.valueOf() < localInput.valueOf();
  4176. } else {
  4177. return this.clone().endOf(units).valueOf() < localInput.valueOf();
  4178. }
  4179. }
  4180. function isBetween (from, to, units, inclusivity) {
  4181. inclusivity = inclusivity || '()';
  4182. return (inclusivity[0] === '(' ? this.isAfter(from, units) : !this.isBefore(from, units)) &&
  4183. (inclusivity[1] === ')' ? this.isBefore(to, units) : !this.isAfter(to, units));
  4184. }
  4185. function isSame (input, units) {
  4186. var localInput = isMoment(input) ? input : createLocal(input),
  4187. inputMs;
  4188. if (!(this.isValid() && localInput.isValid())) {
  4189. return false;
  4190. }
  4191. units = normalizeUnits(units || 'millisecond');
  4192. if (units === 'millisecond') {
  4193. return this.valueOf() === localInput.valueOf();
  4194. } else {
  4195. inputMs = localInput.valueOf();
  4196. return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf();
  4197. }
  4198. }
  4199. function isSameOrAfter (input, units) {
  4200. return this.isSame(input, units) || this.isAfter(input,units);
  4201. }
  4202. function isSameOrBefore (input, units) {
  4203. return this.isSame(input, units) || this.isBefore(input,units);
  4204. }
  4205. function diff (input, units, asFloat) {
  4206. var that,
  4207. zoneDelta,
  4208. delta, output;
  4209. if (!this.isValid()) {
  4210. return NaN;
  4211. }
  4212. that = cloneWithOffset(input, this);
  4213. if (!that.isValid()) {
  4214. return NaN;
  4215. }
  4216. zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;
  4217. units = normalizeUnits(units);
  4218. switch (units) {
  4219. case 'year': output = monthDiff(this, that) / 12; break;
  4220. case 'month': output = monthDiff(this, that); break;
  4221. case 'quarter': output = monthDiff(this, that) / 3; break;
  4222. case 'second': output = (this - that) / 1e3; break; // 1000
  4223. case 'minute': output = (this - that) / 6e4; break; // 1000 * 60
  4224. case 'hour': output = (this - that) / 36e5; break; // 1000 * 60 * 60
  4225. case 'day': output = (this - that - zoneDelta) / 864e5; break; // 1000 * 60 * 60 * 24, negate dst
  4226. case 'week': output = (this - that - zoneDelta) / 6048e5; break; // 1000 * 60 * 60 * 24 * 7, negate dst
  4227. default: output = this - that;
  4228. }
  4229. return asFloat ? output : absFloor(output);
  4230. }
  4231. function monthDiff (a, b) {
  4232. // difference in months
  4233. var wholeMonthDiff = ((b.year() - a.year()) * 12) + (b.month() - a.month()),
  4234. // b is in (anchor - 1 month, anchor + 1 month)
  4235. anchor = a.clone().add(wholeMonthDiff, 'months'),
  4236. anchor2, adjust;
  4237. if (b - anchor < 0) {
  4238. anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');
  4239. // linear across the month
  4240. adjust = (b - anchor) / (anchor - anchor2);
  4241. } else {
  4242. anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');
  4243. // linear across the month
  4244. adjust = (b - anchor) / (anchor2 - anchor);
  4245. }
  4246. //check for negative zero, return zero if negative zero
  4247. return -(wholeMonthDiff + adjust) || 0;
  4248. }
  4249. hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';
  4250. hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';
  4251. function toString () {
  4252. return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');
  4253. }
  4254. function toISOString(keepOffset) {
  4255. if (!this.isValid()) {
  4256. return null;
  4257. }
  4258. var utc = keepOffset !== true;
  4259. var m = utc ? this.clone().utc() : this;
  4260. if (m.year() < 0 || m.year() > 9999) {
  4261. return formatMoment(m, utc ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ');
  4262. }
  4263. if (isFunction(Date.prototype.toISOString)) {
  4264. // native implementation is ~50x faster, use it when we can
  4265. if (utc) {
  4266. return this.toDate().toISOString();
  4267. } else {
  4268. return new Date(this._d.valueOf()).toISOString().replace('Z', formatMoment(m, 'Z'));
  4269. }
  4270. }
  4271. return formatMoment(m, utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ');
  4272. }
  4273. /**
  4274. * Return a human readable representation of a moment that can
  4275. * also be evaluated to get a new moment which is the same
  4276. *
  4277. * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects
  4278. */
  4279. function inspect () {
  4280. if (!this.isValid()) {
  4281. return 'moment.invalid(/* ' + this._i + ' */)';
  4282. }
  4283. var func = 'moment';
  4284. var zone = '';
  4285. if (!this.isLocal()) {
  4286. func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';
  4287. zone = 'Z';
  4288. }
  4289. var prefix = '[' + func + '("]';
  4290. var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';
  4291. var datetime = '-MM-DD[T]HH:mm:ss.SSS';
  4292. var suffix = zone + '[")]';
  4293. return this.format(prefix + year + datetime + suffix);
  4294. }
  4295. function format (inputString) {
  4296. if (!inputString) {
  4297. inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat;
  4298. }
  4299. var output = formatMoment(this, inputString);
  4300. return this.localeData().postformat(output);
  4301. }
  4302. function from (time, withoutSuffix) {
  4303. if (this.isValid() &&
  4304. ((isMoment(time) && time.isValid()) ||
  4305. createLocal(time).isValid())) {
  4306. return createDuration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix);
  4307. } else {
  4308. return this.localeData().invalidDate();
  4309. }
  4310. }
  4311. function fromNow (withoutSuffix) {
  4312. return this.from(createLocal(), withoutSuffix);
  4313. }
  4314. function to (time, withoutSuffix) {
  4315. if (this.isValid() &&
  4316. ((isMoment(time) && time.isValid()) ||
  4317. createLocal(time).isValid())) {
  4318. return createDuration({from: this, to: time}).locale(this.locale()).humanize(!withoutSuffix);
  4319. } else {
  4320. return this.localeData().invalidDate();
  4321. }
  4322. }
  4323. function toNow (withoutSuffix) {
  4324. return this.to(createLocal(), withoutSuffix);
  4325. }
  4326. // If passed a locale key, it will set the locale for this
  4327. // instance. Otherwise, it will return the locale configuration
  4328. // variables for this instance.
  4329. function locale (key) {
  4330. var newLocaleData;
  4331. if (key === undefined) {
  4332. return this._locale._abbr;
  4333. } else {
  4334. newLocaleData = getLocale(key);
  4335. if (newLocaleData != null) {
  4336. this._locale = newLocaleData;
  4337. }
  4338. return this;
  4339. }
  4340. }
  4341. var lang = deprecate(
  4342. 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',
  4343. function (key) {
  4344. if (key === undefined) {
  4345. return this.localeData();
  4346. } else {
  4347. return this.locale(key);
  4348. }
  4349. }
  4350. );
  4351. function localeData () {
  4352. return this._locale;
  4353. }
  4354. function startOf (units) {
  4355. units = normalizeUnits(units);
  4356. // the following switch intentionally omits break keywords
  4357. // to utilize falling through the cases.
  4358. switch (units) {
  4359. case 'year':
  4360. this.month(0);
  4361. /* falls through */
  4362. case 'quarter':
  4363. case 'month':
  4364. this.date(1);
  4365. /* falls through */
  4366. case 'week':
  4367. case 'isoWeek':
  4368. case 'day':
  4369. case 'date':
  4370. this.hours(0);
  4371. /* falls through */
  4372. case 'hour':
  4373. this.minutes(0);
  4374. /* falls through */
  4375. case 'minute':
  4376. this.seconds(0);
  4377. /* falls through */
  4378. case 'second':
  4379. this.milliseconds(0);
  4380. }
  4381. // weeks are a special case
  4382. if (units === 'week') {
  4383. this.weekday(0);
  4384. }
  4385. if (units === 'isoWeek') {
  4386. this.isoWeekday(1);
  4387. }
  4388. // quarters are also special
  4389. if (units === 'quarter') {
  4390. this.month(Math.floor(this.month() / 3) * 3);
  4391. }
  4392. return this;
  4393. }
  4394. function endOf (units) {
  4395. units = normalizeUnits(units);
  4396. if (units === undefined || units === 'millisecond') {
  4397. return this;
  4398. }
  4399. // 'date' is an alias for 'day', so it should be considered as such.
  4400. if (units === 'date') {
  4401. units = 'day';
  4402. }
  4403. return this.startOf(units).add(1, (units === 'isoWeek' ? 'week' : units)).subtract(1, 'ms');
  4404. }
  4405. function valueOf () {
  4406. return this._d.valueOf() - ((this._offset || 0) * 60000);
  4407. }
  4408. function unix () {
  4409. return Math.floor(this.valueOf() / 1000);
  4410. }
  4411. function toDate () {
  4412. return new Date(this.valueOf());
  4413. }
  4414. function toArray () {
  4415. var m = this;
  4416. return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()];
  4417. }
  4418. function toObject () {
  4419. var m = this;
  4420. return {
  4421. years: m.year(),
  4422. months: m.month(),
  4423. date: m.date(),
  4424. hours: m.hours(),
  4425. minutes: m.minutes(),
  4426. seconds: m.seconds(),
  4427. milliseconds: m.milliseconds()
  4428. };
  4429. }
  4430. function toJSON () {
  4431. // new Date(NaN).toJSON() === null
  4432. return this.isValid() ? this.toISOString() : null;
  4433. }
  4434. function isValid$2 () {
  4435. return isValid(this);
  4436. }
  4437. function parsingFlags () {
  4438. return extend({}, getParsingFlags(this));
  4439. }
  4440. function invalidAt () {
  4441. return getParsingFlags(this).overflow;
  4442. }
  4443. function creationData() {
  4444. return {
  4445. input: this._i,
  4446. format: this._f,
  4447. locale: this._locale,
  4448. isUTC: this._isUTC,
  4449. strict: this._strict
  4450. };
  4451. }
  4452. // FORMATTING
  4453. addFormatToken(0, ['gg', 2], 0, function () {
  4454. return this.weekYear() % 100;
  4455. });
  4456. addFormatToken(0, ['GG', 2], 0, function () {
  4457. return this.isoWeekYear() % 100;
  4458. });
  4459. function addWeekYearFormatToken (token, getter) {
  4460. addFormatToken(0, [token, token.length], 0, getter);
  4461. }
  4462. addWeekYearFormatToken('gggg', 'weekYear');
  4463. addWeekYearFormatToken('ggggg', 'weekYear');
  4464. addWeekYearFormatToken('GGGG', 'isoWeekYear');
  4465. addWeekYearFormatToken('GGGGG', 'isoWeekYear');
  4466. // ALIASES
  4467. addUnitAlias('weekYear', 'gg');
  4468. addUnitAlias('isoWeekYear', 'GG');
  4469. // PRIORITY
  4470. addUnitPriority('weekYear', 1);
  4471. addUnitPriority('isoWeekYear', 1);
  4472. // PARSING
  4473. addRegexToken('G', matchSigned);
  4474. addRegexToken('g', matchSigned);
  4475. addRegexToken('GG', match1to2, match2);
  4476. addRegexToken('gg', match1to2, match2);
  4477. addRegexToken('GGGG', match1to4, match4);
  4478. addRegexToken('gggg', match1to4, match4);
  4479. addRegexToken('GGGGG', match1to6, match6);
  4480. addRegexToken('ggggg', match1to6, match6);
  4481. addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) {
  4482. week[token.substr(0, 2)] = toInt(input);
  4483. });
  4484. addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {
  4485. week[token] = hooks.parseTwoDigitYear(input);
  4486. });
  4487. // MOMENTS
  4488. function getSetWeekYear (input) {
  4489. return getSetWeekYearHelper.call(this,
  4490. input,
  4491. this.week(),
  4492. this.weekday(),
  4493. this.localeData()._week.dow,
  4494. this.localeData()._week.doy);
  4495. }
  4496. function getSetISOWeekYear (input) {
  4497. return getSetWeekYearHelper.call(this,
  4498. input, this.isoWeek(), this.isoWeekday(), 1, 4);
  4499. }
  4500. function getISOWeeksInYear () {
  4501. return weeksInYear(this.year(), 1, 4);
  4502. }
  4503. function getWeeksInYear () {
  4504. var weekInfo = this.localeData()._week;
  4505. return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);
  4506. }
  4507. function getSetWeekYearHelper(input, week, weekday, dow, doy) {
  4508. var weeksTarget;
  4509. if (input == null) {
  4510. return weekOfYear(this, dow, doy).year;
  4511. } else {
  4512. weeksTarget = weeksInYear(input, dow, doy);
  4513. if (week > weeksTarget) {
  4514. week = weeksTarget;
  4515. }
  4516. return setWeekAll.call(this, input, week, weekday, dow, doy);
  4517. }
  4518. }
  4519. function setWeekAll(weekYear, week, weekday, dow, doy) {
  4520. var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),
  4521. date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);
  4522. this.year(date.getUTCFullYear());
  4523. this.month(date.getUTCMonth());
  4524. this.date(date.getUTCDate());
  4525. return this;
  4526. }
  4527. // FORMATTING
  4528. addFormatToken('Q', 0, 'Qo', 'quarter');
  4529. // ALIASES
  4530. addUnitAlias('quarter', 'Q');
  4531. // PRIORITY
  4532. addUnitPriority('quarter', 7);
  4533. // PARSING
  4534. addRegexToken('Q', match1);
  4535. addParseToken('Q', function (input, array) {
  4536. array[MONTH] = (toInt(input) - 1) * 3;
  4537. });
  4538. // MOMENTS
  4539. function getSetQuarter (input) {
  4540. return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3);
  4541. }
  4542. // FORMATTING
  4543. addFormatToken('D', ['DD', 2], 'Do', 'date');
  4544. // ALIASES
  4545. addUnitAlias('date', 'D');
  4546. // PRIOROITY
  4547. addUnitPriority('date', 9);
  4548. // PARSING
  4549. addRegexToken('D', match1to2);
  4550. addRegexToken('DD', match1to2, match2);
  4551. addRegexToken('Do', function (isStrict, locale) {
  4552. // TODO: Remove "ordinalParse" fallback in next major release.
  4553. return isStrict ?
  4554. (locale._dayOfMonthOrdinalParse || locale._ordinalParse) :
  4555. locale._dayOfMonthOrdinalParseLenient;
  4556. });
  4557. addParseToken(['D', 'DD'], DATE);
  4558. addParseToken('Do', function (input, array) {
  4559. array[DATE] = toInt(input.match(match1to2)[0]);
  4560. });
  4561. // MOMENTS
  4562. var getSetDayOfMonth = makeGetSet('Date', true);
  4563. // FORMATTING
  4564. addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');
  4565. // ALIASES
  4566. addUnitAlias('dayOfYear', 'DDD');
  4567. // PRIORITY
  4568. addUnitPriority('dayOfYear', 4);
  4569. // PARSING
  4570. addRegexToken('DDD', match1to3);
  4571. addRegexToken('DDDD', match3);
  4572. addParseToken(['DDD', 'DDDD'], function (input, array, config) {
  4573. config._dayOfYear = toInt(input);
  4574. });
  4575. // HELPERS
  4576. // MOMENTS
  4577. function getSetDayOfYear (input) {
  4578. var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1;
  4579. return input == null ? dayOfYear : this.add((input - dayOfYear), 'd');
  4580. }
  4581. // FORMATTING
  4582. addFormatToken('m', ['mm', 2], 0, 'minute');
  4583. // ALIASES
  4584. addUnitAlias('minute', 'm');
  4585. // PRIORITY
  4586. addUnitPriority('minute', 14);
  4587. // PARSING
  4588. addRegexToken('m', match1to2);
  4589. addRegexToken('mm', match1to2, match2);
  4590. addParseToken(['m', 'mm'], MINUTE);
  4591. // MOMENTS
  4592. var getSetMinute = makeGetSet('Minutes', false);
  4593. // FORMATTING
  4594. addFormatToken('s', ['ss', 2], 0, 'second');
  4595. // ALIASES
  4596. addUnitAlias('second', 's');
  4597. // PRIORITY
  4598. addUnitPriority('second', 15);
  4599. // PARSING
  4600. addRegexToken('s', match1to2);
  4601. addRegexToken('ss', match1to2, match2);
  4602. addParseToken(['s', 'ss'], SECOND);
  4603. // MOMENTS
  4604. var getSetSecond = makeGetSet('Seconds', false);
  4605. // FORMATTING
  4606. addFormatToken('S', 0, 0, function () {
  4607. return ~~(this.millisecond() / 100);
  4608. });
  4609. addFormatToken(0, ['SS', 2], 0, function () {
  4610. return ~~(this.millisecond() / 10);
  4611. });
  4612. addFormatToken(0, ['SSS', 3], 0, 'millisecond');
  4613. addFormatToken(0, ['SSSS', 4], 0, function () {
  4614. return this.millisecond() * 10;
  4615. });
  4616. addFormatToken(0, ['SSSSS', 5], 0, function () {
  4617. return this.millisecond() * 100;
  4618. });
  4619. addFormatToken(0, ['SSSSSS', 6], 0, function () {
  4620. return this.millisecond() * 1000;
  4621. });
  4622. addFormatToken(0, ['SSSSSSS', 7], 0, function () {
  4623. return this.millisecond() * 10000;
  4624. });
  4625. addFormatToken(0, ['SSSSSSSS', 8], 0, function () {
  4626. return this.millisecond() * 100000;
  4627. });
  4628. addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {
  4629. return this.millisecond() * 1000000;
  4630. });
  4631. // ALIASES
  4632. addUnitAlias('millisecond', 'ms');
  4633. // PRIORITY
  4634. addUnitPriority('millisecond', 16);
  4635. // PARSING
  4636. addRegexToken('S', match1to3, match1);
  4637. addRegexToken('SS', match1to3, match2);
  4638. addRegexToken('SSS', match1to3, match3);
  4639. var token;
  4640. for (token = 'SSSS'; token.length <= 9; token += 'S') {
  4641. addRegexToken(token, matchUnsigned);
  4642. }
  4643. function parseMs(input, array) {
  4644. array[MILLISECOND] = toInt(('0.' + input) * 1000);
  4645. }
  4646. for (token = 'S'; token.length <= 9; token += 'S') {
  4647. addParseToken(token, parseMs);
  4648. }
  4649. // MOMENTS
  4650. var getSetMillisecond = makeGetSet('Milliseconds', false);
  4651. // FORMATTING
  4652. addFormatToken('z', 0, 0, 'zoneAbbr');
  4653. addFormatToken('zz', 0, 0, 'zoneName');
  4654. // MOMENTS
  4655. function getZoneAbbr () {
  4656. return this._isUTC ? 'UTC' : '';
  4657. }
  4658. function getZoneName () {
  4659. return this._isUTC ? 'Coordinated Universal Time' : '';
  4660. }
  4661. var proto = Moment.prototype;
  4662. proto.add = add;
  4663. proto.calendar = calendar$1;
  4664. proto.clone = clone;
  4665. proto.diff = diff;
  4666. proto.endOf = endOf;
  4667. proto.format = format;
  4668. proto.from = from;
  4669. proto.fromNow = fromNow;
  4670. proto.to = to;
  4671. proto.toNow = toNow;
  4672. proto.get = stringGet;
  4673. proto.invalidAt = invalidAt;
  4674. proto.isAfter = isAfter;
  4675. proto.isBefore = isBefore;
  4676. proto.isBetween = isBetween;
  4677. proto.isSame = isSame;
  4678. proto.isSameOrAfter = isSameOrAfter;
  4679. proto.isSameOrBefore = isSameOrBefore;
  4680. proto.isValid = isValid$2;
  4681. proto.lang = lang;
  4682. proto.locale = locale;
  4683. proto.localeData = localeData;
  4684. proto.max = prototypeMax;
  4685. proto.min = prototypeMin;
  4686. proto.parsingFlags = parsingFlags;
  4687. proto.set = stringSet;
  4688. proto.startOf = startOf;
  4689. proto.subtract = subtract;
  4690. proto.toArray = toArray;
  4691. proto.toObject = toObject;
  4692. proto.toDate = toDate;
  4693. proto.toISOString = toISOString;
  4694. proto.inspect = inspect;
  4695. proto.toJSON = toJSON;
  4696. proto.toString = toString;
  4697. proto.unix = unix;
  4698. proto.valueOf = valueOf;
  4699. proto.creationData = creationData;
  4700. // Year
  4701. proto.year = getSetYear;
  4702. proto.isLeapYear = getIsLeapYear;
  4703. // Week Year
  4704. proto.weekYear = getSetWeekYear;
  4705. proto.isoWeekYear = getSetISOWeekYear;
  4706. // Quarter
  4707. proto.quarter = proto.quarters = getSetQuarter;
  4708. // Month
  4709. proto.month = getSetMonth;
  4710. proto.daysInMonth = getDaysInMonth;
  4711. // Week
  4712. proto.week = proto.weeks = getSetWeek;
  4713. proto.isoWeek = proto.isoWeeks = getSetISOWeek;
  4714. proto.weeksInYear = getWeeksInYear;
  4715. proto.isoWeeksInYear = getISOWeeksInYear;
  4716. // Day
  4717. proto.date = getSetDayOfMonth;
  4718. proto.day = proto.days = getSetDayOfWeek;
  4719. proto.weekday = getSetLocaleDayOfWeek;
  4720. proto.isoWeekday = getSetISODayOfWeek;
  4721. proto.dayOfYear = getSetDayOfYear;
  4722. // Hour
  4723. proto.hour = proto.hours = getSetHour;
  4724. // Minute
  4725. proto.minute = proto.minutes = getSetMinute;
  4726. // Second
  4727. proto.second = proto.seconds = getSetSecond;
  4728. // Millisecond
  4729. proto.millisecond = proto.milliseconds = getSetMillisecond;
  4730. // Offset
  4731. proto.utcOffset = getSetOffset;
  4732. proto.utc = setOffsetToUTC;
  4733. proto.local = setOffsetToLocal;
  4734. proto.parseZone = setOffsetToParsedOffset;
  4735. proto.hasAlignedHourOffset = hasAlignedHourOffset;
  4736. proto.isDST = isDaylightSavingTime;
  4737. proto.isLocal = isLocal;
  4738. proto.isUtcOffset = isUtcOffset;
  4739. proto.isUtc = isUtc;
  4740. proto.isUTC = isUtc;
  4741. // Timezone
  4742. proto.zoneAbbr = getZoneAbbr;
  4743. proto.zoneName = getZoneName;
  4744. // Deprecations
  4745. proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth);
  4746. proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth);
  4747. proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear);
  4748. proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', getSetZone);
  4749. proto.isDSTShifted = deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', isDaylightSavingTimeShifted);
  4750. function createUnix (input) {
  4751. return createLocal(input * 1000);
  4752. }
  4753. function createInZone () {
  4754. return createLocal.apply(null, arguments).parseZone();
  4755. }
  4756. function preParsePostFormat (string) {
  4757. return string;
  4758. }
  4759. var proto$1 = Locale.prototype;
  4760. proto$1.calendar = calendar;
  4761. proto$1.longDateFormat = longDateFormat;
  4762. proto$1.invalidDate = invalidDate;
  4763. proto$1.ordinal = ordinal;
  4764. proto$1.preparse = preParsePostFormat;
  4765. proto$1.postformat = preParsePostFormat;
  4766. proto$1.relativeTime = relativeTime;
  4767. proto$1.pastFuture = pastFuture;
  4768. proto$1.set = set;
  4769. // Month
  4770. proto$1.months = localeMonths;
  4771. proto$1.monthsShort = localeMonthsShort;
  4772. proto$1.monthsParse = localeMonthsParse;
  4773. proto$1.monthsRegex = monthsRegex;
  4774. proto$1.monthsShortRegex = monthsShortRegex;
  4775. // Week
  4776. proto$1.week = localeWeek;
  4777. proto$1.firstDayOfYear = localeFirstDayOfYear;
  4778. proto$1.firstDayOfWeek = localeFirstDayOfWeek;
  4779. // Day of Week
  4780. proto$1.weekdays = localeWeekdays;
  4781. proto$1.weekdaysMin = localeWeekdaysMin;
  4782. proto$1.weekdaysShort = localeWeekdaysShort;
  4783. proto$1.weekdaysParse = localeWeekdaysParse;
  4784. proto$1.weekdaysRegex = weekdaysRegex;
  4785. proto$1.weekdaysShortRegex = weekdaysShortRegex;
  4786. proto$1.weekdaysMinRegex = weekdaysMinRegex;
  4787. // Hours
  4788. proto$1.isPM = localeIsPM;
  4789. proto$1.meridiem = localeMeridiem;
  4790. function get$1 (format, index, field, setter) {
  4791. var locale = getLocale();
  4792. var utc = createUTC().set(setter, index);
  4793. return locale[field](utc, format);
  4794. }
  4795. function listMonthsImpl (format, index, field) {
  4796. if (isNumber(format)) {
  4797. index = format;
  4798. format = undefined;
  4799. }
  4800. format = format || '';
  4801. if (index != null) {
  4802. return get$1(format, index, field, 'month');
  4803. }
  4804. var i;
  4805. var out = [];
  4806. for (i = 0; i < 12; i++) {
  4807. out[i] = get$1(format, i, field, 'month');
  4808. }
  4809. return out;
  4810. }
  4811. // ()
  4812. // (5)
  4813. // (fmt, 5)
  4814. // (fmt)
  4815. // (true)
  4816. // (true, 5)
  4817. // (true, fmt, 5)
  4818. // (true, fmt)
  4819. function listWeekdaysImpl (localeSorted, format, index, field) {
  4820. if (typeof localeSorted === 'boolean') {
  4821. if (isNumber(format)) {
  4822. index = format;
  4823. format = undefined;
  4824. }
  4825. format = format || '';
  4826. } else {
  4827. format = localeSorted;
  4828. index = format;
  4829. localeSorted = false;
  4830. if (isNumber(format)) {
  4831. index = format;
  4832. format = undefined;
  4833. }
  4834. format = format || '';
  4835. }
  4836. var locale = getLocale(),
  4837. shift = localeSorted ? locale._week.dow : 0;
  4838. if (index != null) {
  4839. return get$1(format, (index + shift) % 7, field, 'day');
  4840. }
  4841. var i;
  4842. var out = [];
  4843. for (i = 0; i < 7; i++) {
  4844. out[i] = get$1(format, (i + shift) % 7, field, 'day');
  4845. }
  4846. return out;
  4847. }
  4848. function listMonths (format, index) {
  4849. return listMonthsImpl(format, index, 'months');
  4850. }
  4851. function listMonthsShort (format, index) {
  4852. return listMonthsImpl(format, index, 'monthsShort');
  4853. }
  4854. function listWeekdays (localeSorted, format, index) {
  4855. return listWeekdaysImpl(localeSorted, format, index, 'weekdays');
  4856. }
  4857. function listWeekdaysShort (localeSorted, format, index) {
  4858. return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');
  4859. }
  4860. function listWeekdaysMin (localeSorted, format, index) {
  4861. return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');
  4862. }
  4863. getSetGlobalLocale('en', {
  4864. dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
  4865. ordinal : function (number) {
  4866. var b = number % 10,
  4867. output = (toInt(number % 100 / 10) === 1) ? 'th' :
  4868. (b === 1) ? 'st' :
  4869. (b === 2) ? 'nd' :
  4870. (b === 3) ? 'rd' : 'th';
  4871. return number + output;
  4872. }
  4873. });
  4874. // Side effect imports
  4875. hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', getSetGlobalLocale);
  4876. hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', getLocale);
  4877. var mathAbs = Math.abs;
  4878. function abs () {
  4879. var data = this._data;
  4880. this._milliseconds = mathAbs(this._milliseconds);
  4881. this._days = mathAbs(this._days);
  4882. this._months = mathAbs(this._months);
  4883. data.milliseconds = mathAbs(data.milliseconds);
  4884. data.seconds = mathAbs(data.seconds);
  4885. data.minutes = mathAbs(data.minutes);
  4886. data.hours = mathAbs(data.hours);
  4887. data.months = mathAbs(data.months);
  4888. data.years = mathAbs(data.years);
  4889. return this;
  4890. }
  4891. function addSubtract$1 (duration, input, value, direction) {
  4892. var other = createDuration(input, value);
  4893. duration._milliseconds += direction * other._milliseconds;
  4894. duration._days += direction * other._days;
  4895. duration._months += direction * other._months;
  4896. return duration._bubble();
  4897. }
  4898. // supports only 2.0-style add(1, 's') or add(duration)
  4899. function add$1 (input, value) {
  4900. return addSubtract$1(this, input, value, 1);
  4901. }
  4902. // supports only 2.0-style subtract(1, 's') or subtract(duration)
  4903. function subtract$1 (input, value) {
  4904. return addSubtract$1(this, input, value, -1);
  4905. }
  4906. function absCeil (number) {
  4907. if (number < 0) {
  4908. return Math.floor(number);
  4909. } else {
  4910. return Math.ceil(number);
  4911. }
  4912. }
  4913. function bubble () {
  4914. var milliseconds = this._milliseconds;
  4915. var days = this._days;
  4916. var months = this._months;
  4917. var data = this._data;
  4918. var seconds, minutes, hours, years, monthsFromDays;
  4919. // if we have a mix of positive and negative values, bubble down first
  4920. // check: https://github.com/moment/moment/issues/2166
  4921. if (!((milliseconds >= 0 && days >= 0 && months >= 0) ||
  4922. (milliseconds <= 0 && days <= 0 && months <= 0))) {
  4923. milliseconds += absCeil(monthsToDays(months) + days) * 864e5;
  4924. days = 0;
  4925. months = 0;
  4926. }
  4927. // The following code bubbles up values, see the tests for
  4928. // examples of what that means.
  4929. data.milliseconds = milliseconds % 1000;
  4930. seconds = absFloor(milliseconds / 1000);
  4931. data.seconds = seconds % 60;
  4932. minutes = absFloor(seconds / 60);
  4933. data.minutes = minutes % 60;
  4934. hours = absFloor(minutes / 60);
  4935. data.hours = hours % 24;
  4936. days += absFloor(hours / 24);
  4937. // convert days to months
  4938. monthsFromDays = absFloor(daysToMonths(days));
  4939. months += monthsFromDays;
  4940. days -= absCeil(monthsToDays(monthsFromDays));
  4941. // 12 months -> 1 year
  4942. years = absFloor(months / 12);
  4943. months %= 12;
  4944. data.days = days;
  4945. data.months = months;
  4946. data.years = years;
  4947. return this;
  4948. }
  4949. function daysToMonths (days) {
  4950. // 400 years have 146097 days (taking into account leap year rules)
  4951. // 400 years have 12 months === 4800
  4952. return days * 4800 / 146097;
  4953. }
  4954. function monthsToDays (months) {
  4955. // the reverse of daysToMonths
  4956. return months * 146097 / 4800;
  4957. }
  4958. function as (units) {
  4959. if (!this.isValid()) {
  4960. return NaN;
  4961. }
  4962. var days;
  4963. var months;
  4964. var milliseconds = this._milliseconds;
  4965. units = normalizeUnits(units);
  4966. if (units === 'month' || units === 'year') {
  4967. days = this._days + milliseconds / 864e5;
  4968. months = this._months + daysToMonths(days);
  4969. return units === 'month' ? months : months / 12;
  4970. } else {
  4971. // handle milliseconds separately because of floating point math errors (issue #1867)
  4972. days = this._days + Math.round(monthsToDays(this._months));
  4973. switch (units) {
  4974. case 'week' : return days / 7 + milliseconds / 6048e5;
  4975. case 'day' : return days + milliseconds / 864e5;
  4976. case 'hour' : return days * 24 + milliseconds / 36e5;
  4977. case 'minute' : return days * 1440 + milliseconds / 6e4;
  4978. case 'second' : return days * 86400 + milliseconds / 1000;
  4979. // Math.floor prevents floating point math errors here
  4980. case 'millisecond': return Math.floor(days * 864e5) + milliseconds;
  4981. default: throw new Error('Unknown unit ' + units);
  4982. }
  4983. }
  4984. }
  4985. // TODO: Use this.as('ms')?
  4986. function valueOf$1 () {
  4987. if (!this.isValid()) {
  4988. return NaN;
  4989. }
  4990. return (
  4991. this._milliseconds +
  4992. this._days * 864e5 +
  4993. (this._months % 12) * 2592e6 +
  4994. toInt(this._months / 12) * 31536e6
  4995. );
  4996. }
  4997. function makeAs (alias) {
  4998. return function () {
  4999. return this.as(alias);
  5000. };
  5001. }
  5002. var asMilliseconds = makeAs('ms');
  5003. var asSeconds = makeAs('s');
  5004. var asMinutes = makeAs('m');
  5005. var asHours = makeAs('h');
  5006. var asDays = makeAs('d');
  5007. var asWeeks = makeAs('w');
  5008. var asMonths = makeAs('M');
  5009. var asYears = makeAs('y');
  5010. function clone$1 () {
  5011. return createDuration(this);
  5012. }
  5013. function get$2 (units) {
  5014. units = normalizeUnits(units);
  5015. return this.isValid() ? this[units + 's']() : NaN;
  5016. }
  5017. function makeGetter(name) {
  5018. return function () {
  5019. return this.isValid() ? this._data[name] : NaN;
  5020. };
  5021. }
  5022. var milliseconds = makeGetter('milliseconds');
  5023. var seconds = makeGetter('seconds');
  5024. var minutes = makeGetter('minutes');
  5025. var hours = makeGetter('hours');
  5026. var days = makeGetter('days');
  5027. var months = makeGetter('months');
  5028. var years = makeGetter('years');
  5029. function weeks () {
  5030. return absFloor(this.days() / 7);
  5031. }
  5032. var round = Math.round;
  5033. var thresholds = {
  5034. ss: 44, // a few seconds to seconds
  5035. s : 45, // seconds to minute
  5036. m : 45, // minutes to hour
  5037. h : 22, // hours to day
  5038. d : 26, // days to month
  5039. M : 11 // months to year
  5040. };
  5041. // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize
  5042. function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {
  5043. return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);
  5044. }
  5045. function relativeTime$1 (posNegDuration, withoutSuffix, locale) {
  5046. var duration = createDuration(posNegDuration).abs();
  5047. var seconds = round(duration.as('s'));
  5048. var minutes = round(duration.as('m'));
  5049. var hours = round(duration.as('h'));
  5050. var days = round(duration.as('d'));
  5051. var months = round(duration.as('M'));
  5052. var years = round(duration.as('y'));
  5053. var a = seconds <= thresholds.ss && ['s', seconds] ||
  5054. seconds < thresholds.s && ['ss', seconds] ||
  5055. minutes <= 1 && ['m'] ||
  5056. minutes < thresholds.m && ['mm', minutes] ||
  5057. hours <= 1 && ['h'] ||
  5058. hours < thresholds.h && ['hh', hours] ||
  5059. days <= 1 && ['d'] ||
  5060. days < thresholds.d && ['dd', days] ||
  5061. months <= 1 && ['M'] ||
  5062. months < thresholds.M && ['MM', months] ||
  5063. years <= 1 && ['y'] || ['yy', years];
  5064. a[2] = withoutSuffix;
  5065. a[3] = +posNegDuration > 0;
  5066. a[4] = locale;
  5067. return substituteTimeAgo.apply(null, a);
  5068. }
  5069. // This function allows you to set the rounding function for relative time strings
  5070. function getSetRelativeTimeRounding (roundingFunction) {
  5071. if (roundingFunction === undefined) {
  5072. return round;
  5073. }
  5074. if (typeof(roundingFunction) === 'function') {
  5075. round = roundingFunction;
  5076. return true;
  5077. }
  5078. return false;
  5079. }
  5080. // This function allows you to set a threshold for relative time strings
  5081. function getSetRelativeTimeThreshold (threshold, limit) {
  5082. if (thresholds[threshold] === undefined) {
  5083. return false;
  5084. }
  5085. if (limit === undefined) {
  5086. return thresholds[threshold];
  5087. }
  5088. thresholds[threshold] = limit;
  5089. if (threshold === 's') {
  5090. thresholds.ss = limit - 1;
  5091. }
  5092. return true;
  5093. }
  5094. function humanize (withSuffix) {
  5095. if (!this.isValid()) {
  5096. return this.localeData().invalidDate();
  5097. }
  5098. var locale = this.localeData();
  5099. var output = relativeTime$1(this, !withSuffix, locale);
  5100. if (withSuffix) {
  5101. output = locale.pastFuture(+this, output);
  5102. }
  5103. return locale.postformat(output);
  5104. }
  5105. var abs$1 = Math.abs;
  5106. function sign(x) {
  5107. return ((x > 0) - (x < 0)) || +x;
  5108. }
  5109. function toISOString$1() {
  5110. // for ISO strings we do not use the normal bubbling rules:
  5111. // * milliseconds bubble up until they become hours
  5112. // * days do not bubble at all
  5113. // * months bubble up until they become years
  5114. // This is because there is no context-free conversion between hours and days
  5115. // (think of clock changes)
  5116. // and also not between days and months (28-31 days per month)
  5117. if (!this.isValid()) {
  5118. return this.localeData().invalidDate();
  5119. }
  5120. var seconds = abs$1(this._milliseconds) / 1000;
  5121. var days = abs$1(this._days);
  5122. var months = abs$1(this._months);
  5123. var minutes, hours, years;
  5124. // 3600 seconds -> 60 minutes -> 1 hour
  5125. minutes = absFloor(seconds / 60);
  5126. hours = absFloor(minutes / 60);
  5127. seconds %= 60;
  5128. minutes %= 60;
  5129. // 12 months -> 1 year
  5130. years = absFloor(months / 12);
  5131. months %= 12;
  5132. // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js
  5133. var Y = years;
  5134. var M = months;
  5135. var D = days;
  5136. var h = hours;
  5137. var m = minutes;
  5138. var s = seconds ? seconds.toFixed(3).replace(/\.?0+$/, '') : '';
  5139. var total = this.asSeconds();
  5140. if (!total) {
  5141. // this is the same as C#'s (Noda) and python (isodate)...
  5142. // but not other JS (goog.date)
  5143. return 'P0D';
  5144. }
  5145. var totalSign = total < 0 ? '-' : '';
  5146. var ymSign = sign(this._months) !== sign(total) ? '-' : '';
  5147. var daysSign = sign(this._days) !== sign(total) ? '-' : '';
  5148. var hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';
  5149. return totalSign + 'P' +
  5150. (Y ? ymSign + Y + 'Y' : '') +
  5151. (M ? ymSign + M + 'M' : '') +
  5152. (D ? daysSign + D + 'D' : '') +
  5153. ((h || m || s) ? 'T' : '') +
  5154. (h ? hmsSign + h + 'H' : '') +
  5155. (m ? hmsSign + m + 'M' : '') +
  5156. (s ? hmsSign + s + 'S' : '');
  5157. }
  5158. var proto$2 = Duration.prototype;
  5159. proto$2.isValid = isValid$1;
  5160. proto$2.abs = abs;
  5161. proto$2.add = add$1;
  5162. proto$2.subtract = subtract$1;
  5163. proto$2.as = as;
  5164. proto$2.asMilliseconds = asMilliseconds;
  5165. proto$2.asSeconds = asSeconds;
  5166. proto$2.asMinutes = asMinutes;
  5167. proto$2.asHours = asHours;
  5168. proto$2.asDays = asDays;
  5169. proto$2.asWeeks = asWeeks;
  5170. proto$2.asMonths = asMonths;
  5171. proto$2.asYears = asYears;
  5172. proto$2.valueOf = valueOf$1;
  5173. proto$2._bubble = bubble;
  5174. proto$2.clone = clone$1;
  5175. proto$2.get = get$2;
  5176. proto$2.milliseconds = milliseconds;
  5177. proto$2.seconds = seconds;
  5178. proto$2.minutes = minutes;
  5179. proto$2.hours = hours;
  5180. proto$2.days = days;
  5181. proto$2.weeks = weeks;
  5182. proto$2.months = months;
  5183. proto$2.years = years;
  5184. proto$2.humanize = humanize;
  5185. proto$2.toISOString = toISOString$1;
  5186. proto$2.toString = toISOString$1;
  5187. proto$2.toJSON = toISOString$1;
  5188. proto$2.locale = locale;
  5189. proto$2.localeData = localeData;
  5190. // Deprecations
  5191. proto$2.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', toISOString$1);
  5192. proto$2.lang = lang;
  5193. // Side effect imports
  5194. // FORMATTING
  5195. addFormatToken('X', 0, 0, 'unix');
  5196. addFormatToken('x', 0, 0, 'valueOf');
  5197. // PARSING
  5198. addRegexToken('x', matchSigned);
  5199. addRegexToken('X', matchTimestamp);
  5200. addParseToken('X', function (input, array, config) {
  5201. config._d = new Date(parseFloat(input, 10) * 1000);
  5202. });
  5203. addParseToken('x', function (input, array, config) {
  5204. config._d = new Date(toInt(input));
  5205. });
  5206. // Side effect imports
  5207. hooks.version = '2.20.1';
  5208. setHookCallback(createLocal);
  5209. hooks.fn = proto;
  5210. hooks.min = min;
  5211. hooks.max = max;
  5212. hooks.now = now;
  5213. hooks.utc = createUTC;
  5214. hooks.unix = createUnix;
  5215. hooks.months = listMonths;
  5216. hooks.isDate = isDate;
  5217. hooks.locale = getSetGlobalLocale;
  5218. hooks.invalid = createInvalid;
  5219. hooks.duration = createDuration;
  5220. hooks.isMoment = isMoment;
  5221. hooks.weekdays = listWeekdays;
  5222. hooks.parseZone = createInZone;
  5223. hooks.localeData = getLocale;
  5224. hooks.isDuration = isDuration;
  5225. hooks.monthsShort = listMonthsShort;
  5226. hooks.weekdaysMin = listWeekdaysMin;
  5227. hooks.defineLocale = defineLocale;
  5228. hooks.updateLocale = updateLocale;
  5229. hooks.locales = listLocales;
  5230. hooks.weekdaysShort = listWeekdaysShort;
  5231. hooks.normalizeUnits = normalizeUnits;
  5232. hooks.relativeTimeRounding = getSetRelativeTimeRounding;
  5233. hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;
  5234. hooks.calendarFormat = getCalendarFormat;
  5235. hooks.prototype = proto;
  5236. // currently HTML5 input type only supports 24-hour formats
  5237. hooks.HTML5_FMT = {
  5238. DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // <input type="datetime-local" />
  5239. DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // <input type="datetime-local" step="1" />
  5240. DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // <input type="datetime-local" step="0.001" />
  5241. DATE: 'YYYY-MM-DD', // <input type="date" />
  5242. TIME: 'HH:mm', // <input type="time" />
  5243. TIME_SECONDS: 'HH:mm:ss', // <input type="time" step="1" />
  5244. TIME_MS: 'HH:mm:ss.SSS', // <input type="time" step="0.001" />
  5245. WEEK: 'YYYY-[W]WW', // <input type="week" />
  5246. MONTH: 'YYYY-MM' // <input type="month" />
  5247. };
  5248. return hooks;
  5249. })));
  5250. },{}],7:[function(require,module,exports){
  5251. /**
  5252. * @namespace Chart
  5253. */
  5254. var Chart = require(29)();
  5255. Chart.helpers = require(45);
  5256. // @todo dispatch these helpers into appropriated helpers/helpers.* file and write unit tests!
  5257. require(27)(Chart);
  5258. Chart.defaults = require(25);
  5259. Chart.Element = require(26);
  5260. Chart.elements = require(40);
  5261. Chart.Interaction = require(28);
  5262. Chart.layouts = require(30);
  5263. Chart.platform = require(48);
  5264. Chart.plugins = require(31);
  5265. Chart.Ticks = require(34);
  5266. require(22)(Chart);
  5267. require(23)(Chart);
  5268. require(24)(Chart);
  5269. require(33)(Chart);
  5270. require(32)(Chart);
  5271. require(35)(Chart);
  5272. require(55)(Chart);
  5273. require(53)(Chart);
  5274. require(54)(Chart);
  5275. require(56)(Chart);
  5276. require(57)(Chart);
  5277. require(58)(Chart);
  5278. // Controllers must be loaded after elements
  5279. // See Chart.core.datasetController.dataElementType
  5280. require(15)(Chart);
  5281. require(16)(Chart);
  5282. require(17)(Chart);
  5283. require(18)(Chart);
  5284. require(19)(Chart);
  5285. require(20)(Chart);
  5286. require(21)(Chart);
  5287. require(8)(Chart);
  5288. require(9)(Chart);
  5289. require(10)(Chart);
  5290. require(11)(Chart);
  5291. require(12)(Chart);
  5292. require(13)(Chart);
  5293. require(14)(Chart);
  5294. // Loading built-it plugins
  5295. var plugins = require(49);
  5296. for (var k in plugins) {
  5297. if (plugins.hasOwnProperty(k)) {
  5298. Chart.plugins.register(plugins[k]);
  5299. }
  5300. }
  5301. Chart.platform.initialize();
  5302. module.exports = Chart;
  5303. if (typeof window !== 'undefined') {
  5304. window.Chart = Chart;
  5305. }
  5306. // DEPRECATIONS
  5307. /**
  5308. * Provided for backward compatibility, not available anymore
  5309. * @namespace Chart.Legend
  5310. * @deprecated since version 2.1.5
  5311. * @todo remove at version 3
  5312. * @private
  5313. */
  5314. Chart.Legend = plugins.legend._element;
  5315. /**
  5316. * Provided for backward compatibility, not available anymore
  5317. * @namespace Chart.Title
  5318. * @deprecated since version 2.1.5
  5319. * @todo remove at version 3
  5320. * @private
  5321. */
  5322. Chart.Title = plugins.title._element;
  5323. /**
  5324. * Provided for backward compatibility, use Chart.plugins instead
  5325. * @namespace Chart.pluginService
  5326. * @deprecated since version 2.1.5
  5327. * @todo remove at version 3
  5328. * @private
  5329. */
  5330. Chart.pluginService = Chart.plugins;
  5331. /**
  5332. * Provided for backward compatibility, inheriting from Chart.PlugingBase has no
  5333. * effect, instead simply create/register plugins via plain JavaScript objects.
  5334. * @interface Chart.PluginBase
  5335. * @deprecated since version 2.5.0
  5336. * @todo remove at version 3
  5337. * @private
  5338. */
  5339. Chart.PluginBase = Chart.Element.extend({});
  5340. /**
  5341. * Provided for backward compatibility, use Chart.helpers.canvas instead.
  5342. * @namespace Chart.canvasHelpers
  5343. * @deprecated since version 2.6.0
  5344. * @todo remove at version 3
  5345. * @private
  5346. */
  5347. Chart.canvasHelpers = Chart.helpers.canvas;
  5348. /**
  5349. * Provided for backward compatibility, use Chart.layouts instead.
  5350. * @namespace Chart.layoutService
  5351. * @deprecated since version 2.8.0
  5352. * @todo remove at version 3
  5353. * @private
  5354. */
  5355. Chart.layoutService = Chart.layouts;
  5356. },{"10":10,"11":11,"12":12,"13":13,"14":14,"15":15,"16":16,"17":17,"18":18,"19":19,"20":20,"21":21,"22":22,"23":23,"24":24,"25":25,"26":26,"27":27,"28":28,"29":29,"30":30,"31":31,"32":32,"33":33,"34":34,"35":35,"40":40,"45":45,"48":48,"49":49,"53":53,"54":54,"55":55,"56":56,"57":57,"58":58,"8":8,"9":9}],8:[function(require,module,exports){
  5357. 'use strict';
  5358. module.exports = function(Chart) {
  5359. Chart.Bar = function(context, config) {
  5360. config.type = 'bar';
  5361. return new Chart(context, config);
  5362. };
  5363. };
  5364. },{}],9:[function(require,module,exports){
  5365. 'use strict';
  5366. module.exports = function(Chart) {
  5367. Chart.Bubble = function(context, config) {
  5368. config.type = 'bubble';
  5369. return new Chart(context, config);
  5370. };
  5371. };
  5372. },{}],10:[function(require,module,exports){
  5373. 'use strict';
  5374. module.exports = function(Chart) {
  5375. Chart.Doughnut = function(context, config) {
  5376. config.type = 'doughnut';
  5377. return new Chart(context, config);
  5378. };
  5379. };
  5380. },{}],11:[function(require,module,exports){
  5381. 'use strict';
  5382. module.exports = function(Chart) {
  5383. Chart.Line = function(context, config) {
  5384. config.type = 'line';
  5385. return new Chart(context, config);
  5386. };
  5387. };
  5388. },{}],12:[function(require,module,exports){
  5389. 'use strict';
  5390. module.exports = function(Chart) {
  5391. Chart.PolarArea = function(context, config) {
  5392. config.type = 'polarArea';
  5393. return new Chart(context, config);
  5394. };
  5395. };
  5396. },{}],13:[function(require,module,exports){
  5397. 'use strict';
  5398. module.exports = function(Chart) {
  5399. Chart.Radar = function(context, config) {
  5400. config.type = 'radar';
  5401. return new Chart(context, config);
  5402. };
  5403. };
  5404. },{}],14:[function(require,module,exports){
  5405. 'use strict';
  5406. module.exports = function(Chart) {
  5407. Chart.Scatter = function(context, config) {
  5408. config.type = 'scatter';
  5409. return new Chart(context, config);
  5410. };
  5411. };
  5412. },{}],15:[function(require,module,exports){
  5413. 'use strict';
  5414. var defaults = require(25);
  5415. var elements = require(40);
  5416. var helpers = require(45);
  5417. defaults._set('bar', {
  5418. hover: {
  5419. mode: 'label'
  5420. },
  5421. scales: {
  5422. xAxes: [{
  5423. type: 'category',
  5424. // Specific to Bar Controller
  5425. categoryPercentage: 0.8,
  5426. barPercentage: 0.9,
  5427. // offset settings
  5428. offset: true,
  5429. // grid line settings
  5430. gridLines: {
  5431. offsetGridLines: true
  5432. }
  5433. }],
  5434. yAxes: [{
  5435. type: 'linear'
  5436. }]
  5437. }
  5438. });
  5439. defaults._set('horizontalBar', {
  5440. hover: {
  5441. mode: 'index',
  5442. axis: 'y'
  5443. },
  5444. scales: {
  5445. xAxes: [{
  5446. type: 'linear',
  5447. position: 'bottom'
  5448. }],
  5449. yAxes: [{
  5450. position: 'left',
  5451. type: 'category',
  5452. // Specific to Horizontal Bar Controller
  5453. categoryPercentage: 0.8,
  5454. barPercentage: 0.9,
  5455. // offset settings
  5456. offset: true,
  5457. // grid line settings
  5458. gridLines: {
  5459. offsetGridLines: true
  5460. }
  5461. }]
  5462. },
  5463. elements: {
  5464. rectangle: {
  5465. borderSkipped: 'left'
  5466. }
  5467. },
  5468. tooltips: {
  5469. callbacks: {
  5470. title: function(item, data) {
  5471. // Pick first xLabel for now
  5472. var title = '';
  5473. if (item.length > 0) {
  5474. if (item[0].yLabel) {
  5475. title = item[0].yLabel;
  5476. } else if (data.labels.length > 0 && item[0].index < data.labels.length) {
  5477. title = data.labels[item[0].index];
  5478. }
  5479. }
  5480. return title;
  5481. },
  5482. label: function(item, data) {
  5483. var datasetLabel = data.datasets[item.datasetIndex].label || '';
  5484. return datasetLabel + ': ' + item.xLabel;
  5485. }
  5486. },
  5487. mode: 'index',
  5488. axis: 'y'
  5489. }
  5490. });
  5491. /**
  5492. * Computes the "optimal" sample size to maintain bars equally sized while preventing overlap.
  5493. * @private
  5494. */
  5495. function computeMinSampleSize(scale, pixels) {
  5496. var min = scale.isHorizontal() ? scale.width : scale.height;
  5497. var ticks = scale.getTicks();
  5498. var prev, curr, i, ilen;
  5499. for (i = 1, ilen = pixels.length; i < ilen; ++i) {
  5500. min = Math.min(min, pixels[i] - pixels[i - 1]);
  5501. }
  5502. for (i = 0, ilen = ticks.length; i < ilen; ++i) {
  5503. curr = scale.getPixelForTick(i);
  5504. min = i > 0 ? Math.min(min, curr - prev) : min;
  5505. prev = curr;
  5506. }
  5507. return min;
  5508. }
  5509. /**
  5510. * Computes an "ideal" category based on the absolute bar thickness or, if undefined or null,
  5511. * uses the smallest interval (see computeMinSampleSize) that prevents bar overlapping. This
  5512. * mode currently always generates bars equally sized (until we introduce scriptable options?).
  5513. * @private
  5514. */
  5515. function computeFitCategoryTraits(index, ruler, options) {
  5516. var thickness = options.barThickness;
  5517. var count = ruler.stackCount;
  5518. var curr = ruler.pixels[index];
  5519. var size, ratio;
  5520. if (helpers.isNullOrUndef(thickness)) {
  5521. size = ruler.min * options.categoryPercentage;
  5522. ratio = options.barPercentage;
  5523. } else {
  5524. // When bar thickness is enforced, category and bar percentages are ignored.
  5525. // Note(SB): we could add support for relative bar thickness (e.g. barThickness: '50%')
  5526. // and deprecate barPercentage since this value is ignored when thickness is absolute.
  5527. size = thickness * count;
  5528. ratio = 1;
  5529. }
  5530. return {
  5531. chunk: size / count,
  5532. ratio: ratio,
  5533. start: curr - (size / 2)
  5534. };
  5535. }
  5536. /**
  5537. * Computes an "optimal" category that globally arranges bars side by side (no gap when
  5538. * percentage options are 1), based on the previous and following categories. This mode
  5539. * generates bars with different widths when data are not evenly spaced.
  5540. * @private
  5541. */
  5542. function computeFlexCategoryTraits(index, ruler, options) {
  5543. var pixels = ruler.pixels;
  5544. var curr = pixels[index];
  5545. var prev = index > 0 ? pixels[index - 1] : null;
  5546. var next = index < pixels.length - 1 ? pixels[index + 1] : null;
  5547. var percent = options.categoryPercentage;
  5548. var start, size;
  5549. if (prev === null) {
  5550. // first data: its size is double based on the next point or,
  5551. // if it's also the last data, we use the scale end extremity.
  5552. prev = curr - (next === null ? ruler.end - curr : next - curr);
  5553. }
  5554. if (next === null) {
  5555. // last data: its size is also double based on the previous point.
  5556. next = curr + curr - prev;
  5557. }
  5558. start = curr - ((curr - prev) / 2) * percent;
  5559. size = ((next - prev) / 2) * percent;
  5560. return {
  5561. chunk: size / ruler.stackCount,
  5562. ratio: options.barPercentage,
  5563. start: start
  5564. };
  5565. }
  5566. module.exports = function(Chart) {
  5567. Chart.controllers.bar = Chart.DatasetController.extend({
  5568. dataElementType: elements.Rectangle,
  5569. initialize: function() {
  5570. var me = this;
  5571. var meta;
  5572. Chart.DatasetController.prototype.initialize.apply(me, arguments);
  5573. meta = me.getMeta();
  5574. meta.stack = me.getDataset().stack;
  5575. meta.bar = true;
  5576. },
  5577. update: function(reset) {
  5578. var me = this;
  5579. var rects = me.getMeta().data;
  5580. var i, ilen;
  5581. me._ruler = me.getRuler();
  5582. for (i = 0, ilen = rects.length; i < ilen; ++i) {
  5583. me.updateElement(rects[i], i, reset);
  5584. }
  5585. },
  5586. updateElement: function(rectangle, index, reset) {
  5587. var me = this;
  5588. var chart = me.chart;
  5589. var meta = me.getMeta();
  5590. var dataset = me.getDataset();
  5591. var custom = rectangle.custom || {};
  5592. var rectangleOptions = chart.options.elements.rectangle;
  5593. rectangle._xScale = me.getScaleForId(meta.xAxisID);
  5594. rectangle._yScale = me.getScaleForId(meta.yAxisID);
  5595. rectangle._datasetIndex = me.index;
  5596. rectangle._index = index;
  5597. rectangle._model = {
  5598. datasetLabel: dataset.label,
  5599. label: chart.data.labels[index],
  5600. borderSkipped: custom.borderSkipped ? custom.borderSkipped : rectangleOptions.borderSkipped,
  5601. backgroundColor: custom.backgroundColor ? custom.backgroundColor : helpers.valueAtIndexOrDefault(dataset.backgroundColor, index, rectangleOptions.backgroundColor),
  5602. borderColor: custom.borderColor ? custom.borderColor : helpers.valueAtIndexOrDefault(dataset.borderColor, index, rectangleOptions.borderColor),
  5603. borderWidth: custom.borderWidth ? custom.borderWidth : helpers.valueAtIndexOrDefault(dataset.borderWidth, index, rectangleOptions.borderWidth)
  5604. };
  5605. me.updateElementGeometry(rectangle, index, reset);
  5606. rectangle.pivot();
  5607. },
  5608. /**
  5609. * @private
  5610. */
  5611. updateElementGeometry: function(rectangle, index, reset) {
  5612. var me = this;
  5613. var model = rectangle._model;
  5614. var vscale = me.getValueScale();
  5615. var base = vscale.getBasePixel();
  5616. var horizontal = vscale.isHorizontal();
  5617. var ruler = me._ruler || me.getRuler();
  5618. var vpixels = me.calculateBarValuePixels(me.index, index);
  5619. var ipixels = me.calculateBarIndexPixels(me.index, index, ruler);
  5620. model.horizontal = horizontal;
  5621. model.base = reset ? base : vpixels.base;
  5622. model.x = horizontal ? reset ? base : vpixels.head : ipixels.center;
  5623. model.y = horizontal ? ipixels.center : reset ? base : vpixels.head;
  5624. model.height = horizontal ? ipixels.size : undefined;
  5625. model.width = horizontal ? undefined : ipixels.size;
  5626. },
  5627. /**
  5628. * @private
  5629. */
  5630. getValueScaleId: function() {
  5631. return this.getMeta().yAxisID;
  5632. },
  5633. /**
  5634. * @private
  5635. */
  5636. getIndexScaleId: function() {
  5637. return this.getMeta().xAxisID;
  5638. },
  5639. /**
  5640. * @private
  5641. */
  5642. getValueScale: function() {
  5643. return this.getScaleForId(this.getValueScaleId());
  5644. },
  5645. /**
  5646. * @private
  5647. */
  5648. getIndexScale: function() {
  5649. return this.getScaleForId(this.getIndexScaleId());
  5650. },
  5651. /**
  5652. * Returns the stacks based on groups and bar visibility.
  5653. * @param {Number} [last] - The dataset index
  5654. * @returns {Array} The stack list
  5655. * @private
  5656. */
  5657. _getStacks: function(last) {
  5658. var me = this;
  5659. var chart = me.chart;
  5660. var scale = me.getIndexScale();
  5661. var stacked = scale.options.stacked;
  5662. var ilen = last === undefined ? chart.data.datasets.length : last + 1;
  5663. var stacks = [];
  5664. var i, meta;
  5665. for (i = 0; i < ilen; ++i) {
  5666. meta = chart.getDatasetMeta(i);
  5667. if (meta.bar && chart.isDatasetVisible(i) &&
  5668. (stacked === false ||
  5669. (stacked === true && stacks.indexOf(meta.stack) === -1) ||
  5670. (stacked === undefined && (meta.stack === undefined || stacks.indexOf(meta.stack) === -1)))) {
  5671. stacks.push(meta.stack);
  5672. }
  5673. }
  5674. return stacks;
  5675. },
  5676. /**
  5677. * Returns the effective number of stacks based on groups and bar visibility.
  5678. * @private
  5679. */
  5680. getStackCount: function() {
  5681. return this._getStacks().length;
  5682. },
  5683. /**
  5684. * Returns the stack index for the given dataset based on groups and bar visibility.
  5685. * @param {Number} [datasetIndex] - The dataset index
  5686. * @param {String} [name] - The stack name to find
  5687. * @returns {Number} The stack index
  5688. * @private
  5689. */
  5690. getStackIndex: function(datasetIndex, name) {
  5691. var stacks = this._getStacks(datasetIndex);
  5692. var index = (name !== undefined)
  5693. ? stacks.indexOf(name)
  5694. : -1; // indexOf returns -1 if element is not present
  5695. return (index === -1)
  5696. ? stacks.length - 1
  5697. : index;
  5698. },
  5699. /**
  5700. * @private
  5701. */
  5702. getRuler: function() {
  5703. var me = this;
  5704. var scale = me.getIndexScale();
  5705. var stackCount = me.getStackCount();
  5706. var datasetIndex = me.index;
  5707. var isHorizontal = scale.isHorizontal();
  5708. var start = isHorizontal ? scale.left : scale.top;
  5709. var end = start + (isHorizontal ? scale.width : scale.height);
  5710. var pixels = [];
  5711. var i, ilen, min;
  5712. for (i = 0, ilen = me.getMeta().data.length; i < ilen; ++i) {
  5713. pixels.push(scale.getPixelForValue(null, i, datasetIndex));
  5714. }
  5715. min = helpers.isNullOrUndef(scale.options.barThickness)
  5716. ? computeMinSampleSize(scale, pixels)
  5717. : -1;
  5718. return {
  5719. min: min,
  5720. pixels: pixels,
  5721. start: start,
  5722. end: end,
  5723. stackCount: stackCount,
  5724. scale: scale
  5725. };
  5726. },
  5727. /**
  5728. * Note: pixel values are not clamped to the scale area.
  5729. * @private
  5730. */
  5731. calculateBarValuePixels: function(datasetIndex, index) {
  5732. var me = this;
  5733. var chart = me.chart;
  5734. var meta = me.getMeta();
  5735. var scale = me.getValueScale();
  5736. var datasets = chart.data.datasets;
  5737. var value = scale.getRightValue(datasets[datasetIndex].data[index]);
  5738. var stacked = scale.options.stacked;
  5739. var stack = meta.stack;
  5740. var start = 0;
  5741. var i, imeta, ivalue, base, head, size;
  5742. if (stacked || (stacked === undefined && stack !== undefined)) {
  5743. for (i = 0; i < datasetIndex; ++i) {
  5744. imeta = chart.getDatasetMeta(i);
  5745. if (imeta.bar &&
  5746. imeta.stack === stack &&
  5747. imeta.controller.getValueScaleId() === scale.id &&
  5748. chart.isDatasetVisible(i)) {
  5749. ivalue = scale.getRightValue(datasets[i].data[index]);
  5750. if ((value < 0 && ivalue < 0) || (value >= 0 && ivalue > 0)) {
  5751. start += ivalue;
  5752. }
  5753. }
  5754. }
  5755. }
  5756. base = scale.getPixelForValue(start);
  5757. head = scale.getPixelForValue(start + value);
  5758. size = (head - base) / 2;
  5759. return {
  5760. size: size,
  5761. base: base,
  5762. head: head,
  5763. center: head + size / 2
  5764. };
  5765. },
  5766. /**
  5767. * @private
  5768. */
  5769. calculateBarIndexPixels: function(datasetIndex, index, ruler) {
  5770. var me = this;
  5771. var options = ruler.scale.options;
  5772. var range = options.barThickness === 'flex'
  5773. ? computeFlexCategoryTraits(index, ruler, options)
  5774. : computeFitCategoryTraits(index, ruler, options);
  5775. var stackIndex = me.getStackIndex(datasetIndex, me.getMeta().stack);
  5776. var center = range.start + (range.chunk * stackIndex) + (range.chunk / 2);
  5777. var size = Math.min(
  5778. helpers.valueOrDefault(options.maxBarThickness, Infinity),
  5779. range.chunk * range.ratio);
  5780. return {
  5781. base: center - size / 2,
  5782. head: center + size / 2,
  5783. center: center,
  5784. size: size
  5785. };
  5786. },
  5787. draw: function() {
  5788. var me = this;
  5789. var chart = me.chart;
  5790. var scale = me.getValueScale();
  5791. var rects = me.getMeta().data;
  5792. var dataset = me.getDataset();
  5793. var ilen = rects.length;
  5794. var i = 0;
  5795. helpers.canvas.clipArea(chart.ctx, chart.chartArea);
  5796. for (; i < ilen; ++i) {
  5797. if (!isNaN(scale.getRightValue(dataset.data[i]))) {
  5798. rects[i].draw();
  5799. }
  5800. }
  5801. helpers.canvas.unclipArea(chart.ctx);
  5802. },
  5803. setHoverStyle: function(rectangle) {
  5804. var dataset = this.chart.data.datasets[rectangle._datasetIndex];
  5805. var index = rectangle._index;
  5806. var custom = rectangle.custom || {};
  5807. var model = rectangle._model;
  5808. model.backgroundColor = custom.hoverBackgroundColor ? custom.hoverBackgroundColor : helpers.valueAtIndexOrDefault(dataset.hoverBackgroundColor, index, helpers.getHoverColor(model.backgroundColor));
  5809. model.borderColor = custom.hoverBorderColor ? custom.hoverBorderColor : helpers.valueAtIndexOrDefault(dataset.hoverBorderColor, index, helpers.getHoverColor(model.borderColor));
  5810. model.borderWidth = custom.hoverBorderWidth ? custom.hoverBorderWidth : helpers.valueAtIndexOrDefault(dataset.hoverBorderWidth, index, model.borderWidth);
  5811. },
  5812. removeHoverStyle: function(rectangle) {
  5813. var dataset = this.chart.data.datasets[rectangle._datasetIndex];
  5814. var index = rectangle._index;
  5815. var custom = rectangle.custom || {};
  5816. var model = rectangle._model;
  5817. var rectangleElementOptions = this.chart.options.elements.rectangle;
  5818. model.backgroundColor = custom.backgroundColor ? custom.backgroundColor : helpers.valueAtIndexOrDefault(dataset.backgroundColor, index, rectangleElementOptions.backgroundColor);
  5819. model.borderColor = custom.borderColor ? custom.borderColor : helpers.valueAtIndexOrDefault(dataset.borderColor, index, rectangleElementOptions.borderColor);
  5820. model.borderWidth = custom.borderWidth ? custom.borderWidth : helpers.valueAtIndexOrDefault(dataset.borderWidth, index, rectangleElementOptions.borderWidth);
  5821. }
  5822. });
  5823. Chart.controllers.horizontalBar = Chart.controllers.bar.extend({
  5824. /**
  5825. * @private
  5826. */
  5827. getValueScaleId: function() {
  5828. return this.getMeta().xAxisID;
  5829. },
  5830. /**
  5831. * @private
  5832. */
  5833. getIndexScaleId: function() {
  5834. return this.getMeta().yAxisID;
  5835. }
  5836. });
  5837. };
  5838. },{"25":25,"40":40,"45":45}],16:[function(require,module,exports){
  5839. 'use strict';
  5840. var defaults = require(25);
  5841. var elements = require(40);
  5842. var helpers = require(45);
  5843. defaults._set('bubble', {
  5844. hover: {
  5845. mode: 'single'
  5846. },
  5847. scales: {
  5848. xAxes: [{
  5849. type: 'linear', // bubble should probably use a linear scale by default
  5850. position: 'bottom',
  5851. id: 'x-axis-0' // need an ID so datasets can reference the scale
  5852. }],
  5853. yAxes: [{
  5854. type: 'linear',
  5855. position: 'left',
  5856. id: 'y-axis-0'
  5857. }]
  5858. },
  5859. tooltips: {
  5860. callbacks: {
  5861. title: function() {
  5862. // Title doesn't make sense for scatter since we format the data as a point
  5863. return '';
  5864. },
  5865. label: function(item, data) {
  5866. var datasetLabel = data.datasets[item.datasetIndex].label || '';
  5867. var dataPoint = data.datasets[item.datasetIndex].data[item.index];
  5868. return datasetLabel + ': (' + item.xLabel + ', ' + item.yLabel + ', ' + dataPoint.r + ')';
  5869. }
  5870. }
  5871. }
  5872. });
  5873. module.exports = function(Chart) {
  5874. Chart.controllers.bubble = Chart.DatasetController.extend({
  5875. /**
  5876. * @protected
  5877. */
  5878. dataElementType: elements.Point,
  5879. /**
  5880. * @protected
  5881. */
  5882. update: function(reset) {
  5883. var me = this;
  5884. var meta = me.getMeta();
  5885. var points = meta.data;
  5886. // Update Points
  5887. helpers.each(points, function(point, index) {
  5888. me.updateElement(point, index, reset);
  5889. });
  5890. },
  5891. /**
  5892. * @protected
  5893. */
  5894. updateElement: function(point, index, reset) {
  5895. var me = this;
  5896. var meta = me.getMeta();
  5897. var custom = point.custom || {};
  5898. var xScale = me.getScaleForId(meta.xAxisID);
  5899. var yScale = me.getScaleForId(meta.yAxisID);
  5900. var options = me._resolveElementOptions(point, index);
  5901. var data = me.getDataset().data[index];
  5902. var dsIndex = me.index;
  5903. var x = reset ? xScale.getPixelForDecimal(0.5) : xScale.getPixelForValue(typeof data === 'object' ? data : NaN, index, dsIndex);
  5904. var y = reset ? yScale.getBasePixel() : yScale.getPixelForValue(data, index, dsIndex);
  5905. point._xScale = xScale;
  5906. point._yScale = yScale;
  5907. point._options = options;
  5908. point._datasetIndex = dsIndex;
  5909. point._index = index;
  5910. point._model = {
  5911. backgroundColor: options.backgroundColor,
  5912. borderColor: options.borderColor,
  5913. borderWidth: options.borderWidth,
  5914. hitRadius: options.hitRadius,
  5915. pointStyle: options.pointStyle,
  5916. radius: reset ? 0 : options.radius,
  5917. skip: custom.skip || isNaN(x) || isNaN(y),
  5918. x: x,
  5919. y: y,
  5920. };
  5921. point.pivot();
  5922. },
  5923. /**
  5924. * @protected
  5925. */
  5926. setHoverStyle: function(point) {
  5927. var model = point._model;
  5928. var options = point._options;
  5929. model.backgroundColor = helpers.valueOrDefault(options.hoverBackgroundColor, helpers.getHoverColor(options.backgroundColor));
  5930. model.borderColor = helpers.valueOrDefault(options.hoverBorderColor, helpers.getHoverColor(options.borderColor));
  5931. model.borderWidth = helpers.valueOrDefault(options.hoverBorderWidth, options.borderWidth);
  5932. model.radius = options.radius + options.hoverRadius;
  5933. },
  5934. /**
  5935. * @protected
  5936. */
  5937. removeHoverStyle: function(point) {
  5938. var model = point._model;
  5939. var options = point._options;
  5940. model.backgroundColor = options.backgroundColor;
  5941. model.borderColor = options.borderColor;
  5942. model.borderWidth = options.borderWidth;
  5943. model.radius = options.radius;
  5944. },
  5945. /**
  5946. * @private
  5947. */
  5948. _resolveElementOptions: function(point, index) {
  5949. var me = this;
  5950. var chart = me.chart;
  5951. var datasets = chart.data.datasets;
  5952. var dataset = datasets[me.index];
  5953. var custom = point.custom || {};
  5954. var options = chart.options.elements.point;
  5955. var resolve = helpers.options.resolve;
  5956. var data = dataset.data[index];
  5957. var values = {};
  5958. var i, ilen, key;
  5959. // Scriptable options
  5960. var context = {
  5961. chart: chart,
  5962. dataIndex: index,
  5963. dataset: dataset,
  5964. datasetIndex: me.index
  5965. };
  5966. var keys = [
  5967. 'backgroundColor',
  5968. 'borderColor',
  5969. 'borderWidth',
  5970. 'hoverBackgroundColor',
  5971. 'hoverBorderColor',
  5972. 'hoverBorderWidth',
  5973. 'hoverRadius',
  5974. 'hitRadius',
  5975. 'pointStyle'
  5976. ];
  5977. for (i = 0, ilen = keys.length; i < ilen; ++i) {
  5978. key = keys[i];
  5979. values[key] = resolve([
  5980. custom[key],
  5981. dataset[key],
  5982. options[key]
  5983. ], context, index);
  5984. }
  5985. // Custom radius resolution
  5986. values.radius = resolve([
  5987. custom.radius,
  5988. data ? data.r : undefined,
  5989. dataset.radius,
  5990. options.radius
  5991. ], context, index);
  5992. return values;
  5993. }
  5994. });
  5995. };
  5996. },{"25":25,"40":40,"45":45}],17:[function(require,module,exports){
  5997. 'use strict';
  5998. var defaults = require(25);
  5999. var elements = require(40);
  6000. var helpers = require(45);
  6001. defaults._set('doughnut', {
  6002. animation: {
  6003. // Boolean - Whether we animate the rotation of the Doughnut
  6004. animateRotate: true,
  6005. // Boolean - Whether we animate scaling the Doughnut from the centre
  6006. animateScale: false
  6007. },
  6008. hover: {
  6009. mode: 'single'
  6010. },
  6011. legendCallback: function(chart) {
  6012. var text = [];
  6013. text.push('<ul class="' + chart.id + '-legend">');
  6014. var data = chart.data;
  6015. var datasets = data.datasets;
  6016. var labels = data.labels;
  6017. if (datasets.length) {
  6018. for (var i = 0; i < datasets[0].data.length; ++i) {
  6019. text.push('<li><span style="background-color:' + datasets[0].backgroundColor[i] + '"></span>');
  6020. if (labels[i]) {
  6021. text.push(labels[i]);
  6022. }
  6023. text.push('</li>');
  6024. }
  6025. }
  6026. text.push('</ul>');
  6027. return text.join('');
  6028. },
  6029. legend: {
  6030. labels: {
  6031. generateLabels: function(chart) {
  6032. var data = chart.data;
  6033. if (data.labels.length && data.datasets.length) {
  6034. return data.labels.map(function(label, i) {
  6035. var meta = chart.getDatasetMeta(0);
  6036. var ds = data.datasets[0];
  6037. var arc = meta.data[i];
  6038. var custom = arc && arc.custom || {};
  6039. var valueAtIndexOrDefault = helpers.valueAtIndexOrDefault;
  6040. var arcOpts = chart.options.elements.arc;
  6041. var fill = custom.backgroundColor ? custom.backgroundColor : valueAtIndexOrDefault(ds.backgroundColor, i, arcOpts.backgroundColor);
  6042. var stroke = custom.borderColor ? custom.borderColor : valueAtIndexOrDefault(ds.borderColor, i, arcOpts.borderColor);
  6043. var bw = custom.borderWidth ? custom.borderWidth : valueAtIndexOrDefault(ds.borderWidth, i, arcOpts.borderWidth);
  6044. return {
  6045. text: label,
  6046. fillStyle: fill,
  6047. strokeStyle: stroke,
  6048. lineWidth: bw,
  6049. hidden: isNaN(ds.data[i]) || meta.data[i].hidden,
  6050. // Extra data used for toggling the correct item
  6051. index: i
  6052. };
  6053. });
  6054. }
  6055. return [];
  6056. }
  6057. },
  6058. onClick: function(e, legendItem) {
  6059. var index = legendItem.index;
  6060. var chart = this.chart;
  6061. var i, ilen, meta;
  6062. for (i = 0, ilen = (chart.data.datasets || []).length; i < ilen; ++i) {
  6063. meta = chart.getDatasetMeta(i);
  6064. // toggle visibility of index if exists
  6065. if (meta.data[index]) {
  6066. meta.data[index].hidden = !meta.data[index].hidden;
  6067. }
  6068. }
  6069. chart.update();
  6070. }
  6071. },
  6072. // The percentage of the chart that we cut out of the middle.
  6073. cutoutPercentage: 50,
  6074. // The rotation of the chart, where the first data arc begins.
  6075. rotation: Math.PI * -0.5,
  6076. // The total circumference of the chart.
  6077. circumference: Math.PI * 2.0,
  6078. // Need to override these to give a nice default
  6079. tooltips: {
  6080. callbacks: {
  6081. title: function() {
  6082. return '';
  6083. },
  6084. label: function(tooltipItem, data) {
  6085. var dataLabel = data.labels[tooltipItem.index];
  6086. var value = ': ' + data.datasets[tooltipItem.datasetIndex].data[tooltipItem.index];
  6087. if (helpers.isArray(dataLabel)) {
  6088. // show value on first line of multiline label
  6089. // need to clone because we are changing the value
  6090. dataLabel = dataLabel.slice();
  6091. dataLabel[0] += value;
  6092. } else {
  6093. dataLabel += value;
  6094. }
  6095. return dataLabel;
  6096. }
  6097. }
  6098. }
  6099. });
  6100. defaults._set('pie', helpers.clone(defaults.doughnut));
  6101. defaults._set('pie', {
  6102. cutoutPercentage: 0
  6103. });
  6104. module.exports = function(Chart) {
  6105. Chart.controllers.doughnut = Chart.controllers.pie = Chart.DatasetController.extend({
  6106. dataElementType: elements.Arc,
  6107. linkScales: helpers.noop,
  6108. // Get index of the dataset in relation to the visible datasets. This allows determining the inner and outer radius correctly
  6109. getRingIndex: function(datasetIndex) {
  6110. var ringIndex = 0;
  6111. for (var j = 0; j < datasetIndex; ++j) {
  6112. if (this.chart.isDatasetVisible(j)) {
  6113. ++ringIndex;
  6114. }
  6115. }
  6116. return ringIndex;
  6117. },
  6118. update: function(reset) {
  6119. var me = this;
  6120. var chart = me.chart;
  6121. var chartArea = chart.chartArea;
  6122. var opts = chart.options;
  6123. var arcOpts = opts.elements.arc;
  6124. var availableWidth = chartArea.right - chartArea.left - arcOpts.borderWidth;
  6125. var availableHeight = chartArea.bottom - chartArea.top - arcOpts.borderWidth;
  6126. var minSize = Math.min(availableWidth, availableHeight);
  6127. var offset = {x: 0, y: 0};
  6128. var meta = me.getMeta();
  6129. var cutoutPercentage = opts.cutoutPercentage;
  6130. var circumference = opts.circumference;
  6131. // If the chart's circumference isn't a full circle, calculate minSize as a ratio of the width/height of the arc
  6132. if (circumference < Math.PI * 2.0) {
  6133. var startAngle = opts.rotation % (Math.PI * 2.0);
  6134. startAngle += Math.PI * 2.0 * (startAngle >= Math.PI ? -1 : startAngle < -Math.PI ? 1 : 0);
  6135. var endAngle = startAngle + circumference;
  6136. var start = {x: Math.cos(startAngle), y: Math.sin(startAngle)};
  6137. var end = {x: Math.cos(endAngle), y: Math.sin(endAngle)};
  6138. var contains0 = (startAngle <= 0 && endAngle >= 0) || (startAngle <= Math.PI * 2.0 && Math.PI * 2.0 <= endAngle);
  6139. var contains90 = (startAngle <= Math.PI * 0.5 && Math.PI * 0.5 <= endAngle) || (startAngle <= Math.PI * 2.5 && Math.PI * 2.5 <= endAngle);
  6140. var contains180 = (startAngle <= -Math.PI && -Math.PI <= endAngle) || (startAngle <= Math.PI && Math.PI <= endAngle);
  6141. var contains270 = (startAngle <= -Math.PI * 0.5 && -Math.PI * 0.5 <= endAngle) || (startAngle <= Math.PI * 1.5 && Math.PI * 1.5 <= endAngle);
  6142. var cutout = cutoutPercentage / 100.0;
  6143. var min = {x: contains180 ? -1 : Math.min(start.x * (start.x < 0 ? 1 : cutout), end.x * (end.x < 0 ? 1 : cutout)), y: contains270 ? -1 : Math.min(start.y * (start.y < 0 ? 1 : cutout), end.y * (end.y < 0 ? 1 : cutout))};
  6144. var max = {x: contains0 ? 1 : Math.max(start.x * (start.x > 0 ? 1 : cutout), end.x * (end.x > 0 ? 1 : cutout)), y: contains90 ? 1 : Math.max(start.y * (start.y > 0 ? 1 : cutout), end.y * (end.y > 0 ? 1 : cutout))};
  6145. var size = {width: (max.x - min.x) * 0.5, height: (max.y - min.y) * 0.5};
  6146. minSize = Math.min(availableWidth / size.width, availableHeight / size.height);
  6147. offset = {x: (max.x + min.x) * -0.5, y: (max.y + min.y) * -0.5};
  6148. }
  6149. chart.borderWidth = me.getMaxBorderWidth(meta.data);
  6150. chart.outerRadius = Math.max((minSize - chart.borderWidth) / 2, 0);
  6151. chart.innerRadius = Math.max(cutoutPercentage ? (chart.outerRadius / 100) * (cutoutPercentage) : 0, 0);
  6152. chart.radiusLength = (chart.outerRadius - chart.innerRadius) / chart.getVisibleDatasetCount();
  6153. chart.offsetX = offset.x * chart.outerRadius;
  6154. chart.offsetY = offset.y * chart.outerRadius;
  6155. meta.total = me.calculateTotal();
  6156. me.outerRadius = chart.outerRadius - (chart.radiusLength * me.getRingIndex(me.index));
  6157. me.innerRadius = Math.max(me.outerRadius - chart.radiusLength, 0);
  6158. helpers.each(meta.data, function(arc, index) {
  6159. me.updateElement(arc, index, reset);
  6160. });
  6161. },
  6162. updateElement: function(arc, index, reset) {
  6163. var me = this;
  6164. var chart = me.chart;
  6165. var chartArea = chart.chartArea;
  6166. var opts = chart.options;
  6167. var animationOpts = opts.animation;
  6168. var centerX = (chartArea.left + chartArea.right) / 2;
  6169. var centerY = (chartArea.top + chartArea.bottom) / 2;
  6170. var startAngle = opts.rotation; // non reset case handled later
  6171. var endAngle = opts.rotation; // non reset case handled later
  6172. var dataset = me.getDataset();
  6173. var circumference = reset && animationOpts.animateRotate ? 0 : arc.hidden ? 0 : me.calculateCircumference(dataset.data[index]) * (opts.circumference / (2.0 * Math.PI));
  6174. var innerRadius = reset && animationOpts.animateScale ? 0 : me.innerRadius;
  6175. var outerRadius = reset && animationOpts.animateScale ? 0 : me.outerRadius;
  6176. var valueAtIndexOrDefault = helpers.valueAtIndexOrDefault;
  6177. helpers.extend(arc, {
  6178. // Utility
  6179. _datasetIndex: me.index,
  6180. _index: index,
  6181. // Desired view properties
  6182. _model: {
  6183. x: centerX + chart.offsetX,
  6184. y: centerY + chart.offsetY,
  6185. startAngle: startAngle,
  6186. endAngle: endAngle,
  6187. circumference: circumference,
  6188. outerRadius: outerRadius,
  6189. innerRadius: innerRadius,
  6190. label: valueAtIndexOrDefault(dataset.label, index, chart.data.labels[index])
  6191. }
  6192. });
  6193. var model = arc._model;
  6194. // Resets the visual styles
  6195. this.removeHoverStyle(arc);
  6196. // Set correct angles if not resetting
  6197. if (!reset || !animationOpts.animateRotate) {
  6198. if (index === 0) {
  6199. model.startAngle = opts.rotation;
  6200. } else {
  6201. model.startAngle = me.getMeta().data[index - 1]._model.endAngle;
  6202. }
  6203. model.endAngle = model.startAngle + model.circumference;
  6204. }
  6205. arc.pivot();
  6206. },
  6207. removeHoverStyle: function(arc) {
  6208. Chart.DatasetController.prototype.removeHoverStyle.call(this, arc, this.chart.options.elements.arc);
  6209. },
  6210. calculateTotal: function() {
  6211. var dataset = this.getDataset();
  6212. var meta = this.getMeta();
  6213. var total = 0;
  6214. var value;
  6215. helpers.each(meta.data, function(element, index) {
  6216. value = dataset.data[index];
  6217. if (!isNaN(value) && !element.hidden) {
  6218. total += Math.abs(value);
  6219. }
  6220. });
  6221. /* if (total === 0) {
  6222. total = NaN;
  6223. }*/
  6224. return total;
  6225. },
  6226. calculateCircumference: function(value) {
  6227. var total = this.getMeta().total;
  6228. if (total > 0 && !isNaN(value)) {
  6229. return (Math.PI * 2.0) * (Math.abs(value) / total);
  6230. }
  6231. return 0;
  6232. },
  6233. // gets the max border or hover width to properly scale pie charts
  6234. getMaxBorderWidth: function(arcs) {
  6235. var max = 0;
  6236. var index = this.index;
  6237. var length = arcs.length;
  6238. var borderWidth;
  6239. var hoverWidth;
  6240. for (var i = 0; i < length; i++) {
  6241. borderWidth = arcs[i]._model ? arcs[i]._model.borderWidth : 0;
  6242. hoverWidth = arcs[i]._chart ? arcs[i]._chart.config.data.datasets[index].hoverBorderWidth : 0;
  6243. max = borderWidth > max ? borderWidth : max;
  6244. max = hoverWidth > max ? hoverWidth : max;
  6245. }
  6246. return max;
  6247. }
  6248. });
  6249. };
  6250. },{"25":25,"40":40,"45":45}],18:[function(require,module,exports){
  6251. 'use strict';
  6252. var defaults = require(25);
  6253. var elements = require(40);
  6254. var helpers = require(45);
  6255. defaults._set('line', {
  6256. showLines: true,
  6257. spanGaps: false,
  6258. hover: {
  6259. mode: 'label'
  6260. },
  6261. scales: {
  6262. xAxes: [{
  6263. type: 'category',
  6264. id: 'x-axis-0'
  6265. }],
  6266. yAxes: [{
  6267. type: 'linear',
  6268. id: 'y-axis-0'
  6269. }]
  6270. }
  6271. });
  6272. module.exports = function(Chart) {
  6273. function lineEnabled(dataset, options) {
  6274. return helpers.valueOrDefault(dataset.showLine, options.showLines);
  6275. }
  6276. Chart.controllers.line = Chart.DatasetController.extend({
  6277. datasetElementType: elements.Line,
  6278. dataElementType: elements.Point,
  6279. update: function(reset) {
  6280. var me = this;
  6281. var meta = me.getMeta();
  6282. var line = meta.dataset;
  6283. var points = meta.data || [];
  6284. var options = me.chart.options;
  6285. var lineElementOptions = options.elements.line;
  6286. var scale = me.getScaleForId(meta.yAxisID);
  6287. var i, ilen, custom;
  6288. var dataset = me.getDataset();
  6289. var showLine = lineEnabled(dataset, options);
  6290. // Update Line
  6291. if (showLine) {
  6292. custom = line.custom || {};
  6293. // Compatibility: If the properties are defined with only the old name, use those values
  6294. if ((dataset.tension !== undefined) && (dataset.lineTension === undefined)) {
  6295. dataset.lineTension = dataset.tension;
  6296. }
  6297. // Utility
  6298. line._scale = scale;
  6299. line._datasetIndex = me.index;
  6300. // Data
  6301. line._children = points;
  6302. // Model
  6303. line._model = {
  6304. // Appearance
  6305. // The default behavior of lines is to break at null values, according
  6306. // to https://github.com/chartjs/Chart.js/issues/2435#issuecomment-216718158
  6307. // This option gives lines the ability to span gaps
  6308. spanGaps: dataset.spanGaps ? dataset.spanGaps : options.spanGaps,
  6309. tension: custom.tension ? custom.tension : helpers.valueOrDefault(dataset.lineTension, lineElementOptions.tension),
  6310. backgroundColor: custom.backgroundColor ? custom.backgroundColor : (dataset.backgroundColor || lineElementOptions.backgroundColor),
  6311. borderWidth: custom.borderWidth ? custom.borderWidth : (dataset.borderWidth || lineElementOptions.borderWidth),
  6312. borderColor: custom.borderColor ? custom.borderColor : (dataset.borderColor || lineElementOptions.borderColor),
  6313. borderCapStyle: custom.borderCapStyle ? custom.borderCapStyle : (dataset.borderCapStyle || lineElementOptions.borderCapStyle),
  6314. borderDash: custom.borderDash ? custom.borderDash : (dataset.borderDash || lineElementOptions.borderDash),
  6315. borderDashOffset: custom.borderDashOffset ? custom.borderDashOffset : (dataset.borderDashOffset || lineElementOptions.borderDashOffset),
  6316. borderJoinStyle: custom.borderJoinStyle ? custom.borderJoinStyle : (dataset.borderJoinStyle || lineElementOptions.borderJoinStyle),
  6317. fill: custom.fill ? custom.fill : (dataset.fill !== undefined ? dataset.fill : lineElementOptions.fill),
  6318. steppedLine: custom.steppedLine ? custom.steppedLine : helpers.valueOrDefault(dataset.steppedLine, lineElementOptions.stepped),
  6319. cubicInterpolationMode: custom.cubicInterpolationMode ? custom.cubicInterpolationMode : helpers.valueOrDefault(dataset.cubicInterpolationMode, lineElementOptions.cubicInterpolationMode),
  6320. };
  6321. line.pivot();
  6322. }
  6323. // Update Points
  6324. for (i = 0, ilen = points.length; i < ilen; ++i) {
  6325. me.updateElement(points[i], i, reset);
  6326. }
  6327. if (showLine && line._model.tension !== 0) {
  6328. me.updateBezierControlPoints();
  6329. }
  6330. // Now pivot the point for animation
  6331. for (i = 0, ilen = points.length; i < ilen; ++i) {
  6332. points[i].pivot();
  6333. }
  6334. },
  6335. getPointBackgroundColor: function(point, index) {
  6336. var backgroundColor = this.chart.options.elements.point.backgroundColor;
  6337. var dataset = this.getDataset();
  6338. var custom = point.custom || {};
  6339. if (custom.backgroundColor) {
  6340. backgroundColor = custom.backgroundColor;
  6341. } else if (dataset.pointBackgroundColor) {
  6342. backgroundColor = helpers.valueAtIndexOrDefault(dataset.pointBackgroundColor, index, backgroundColor);
  6343. } else if (dataset.backgroundColor) {
  6344. backgroundColor = dataset.backgroundColor;
  6345. }
  6346. return backgroundColor;
  6347. },
  6348. getPointBorderColor: function(point, index) {
  6349. var borderColor = this.chart.options.elements.point.borderColor;
  6350. var dataset = this.getDataset();
  6351. var custom = point.custom || {};
  6352. if (custom.borderColor) {
  6353. borderColor = custom.borderColor;
  6354. } else if (dataset.pointBorderColor) {
  6355. borderColor = helpers.valueAtIndexOrDefault(dataset.pointBorderColor, index, borderColor);
  6356. } else if (dataset.borderColor) {
  6357. borderColor = dataset.borderColor;
  6358. }
  6359. return borderColor;
  6360. },
  6361. getPointBorderWidth: function(point, index) {
  6362. var borderWidth = this.chart.options.elements.point.borderWidth;
  6363. var dataset = this.getDataset();
  6364. var custom = point.custom || {};
  6365. if (!isNaN(custom.borderWidth)) {
  6366. borderWidth = custom.borderWidth;
  6367. } else if (!isNaN(dataset.pointBorderWidth) || helpers.isArray(dataset.pointBorderWidth)) {
  6368. borderWidth = helpers.valueAtIndexOrDefault(dataset.pointBorderWidth, index, borderWidth);
  6369. } else if (!isNaN(dataset.borderWidth)) {
  6370. borderWidth = dataset.borderWidth;
  6371. }
  6372. return borderWidth;
  6373. },
  6374. updateElement: function(point, index, reset) {
  6375. var me = this;
  6376. var meta = me.getMeta();
  6377. var custom = point.custom || {};
  6378. var dataset = me.getDataset();
  6379. var datasetIndex = me.index;
  6380. var value = dataset.data[index];
  6381. var yScale = me.getScaleForId(meta.yAxisID);
  6382. var xScale = me.getScaleForId(meta.xAxisID);
  6383. var pointOptions = me.chart.options.elements.point;
  6384. var x, y;
  6385. // Compatibility: If the properties are defined with only the old name, use those values
  6386. if ((dataset.radius !== undefined) && (dataset.pointRadius === undefined)) {
  6387. dataset.pointRadius = dataset.radius;
  6388. }
  6389. if ((dataset.hitRadius !== undefined) && (dataset.pointHitRadius === undefined)) {
  6390. dataset.pointHitRadius = dataset.hitRadius;
  6391. }
  6392. x = xScale.getPixelForValue(typeof value === 'object' ? value : NaN, index, datasetIndex);
  6393. y = reset ? yScale.getBasePixel() : me.calculatePointY(value, index, datasetIndex);
  6394. // Utility
  6395. point._xScale = xScale;
  6396. point._yScale = yScale;
  6397. point._datasetIndex = datasetIndex;
  6398. point._index = index;
  6399. // Desired view properties
  6400. point._model = {
  6401. x: x,
  6402. y: y,
  6403. skip: custom.skip || isNaN(x) || isNaN(y),
  6404. // Appearance
  6405. radius: custom.radius || helpers.valueAtIndexOrDefault(dataset.pointRadius, index, pointOptions.radius),
  6406. pointStyle: custom.pointStyle || helpers.valueAtIndexOrDefault(dataset.pointStyle, index, pointOptions.pointStyle),
  6407. backgroundColor: me.getPointBackgroundColor(point, index),
  6408. borderColor: me.getPointBorderColor(point, index),
  6409. borderWidth: me.getPointBorderWidth(point, index),
  6410. tension: meta.dataset._model ? meta.dataset._model.tension : 0,
  6411. steppedLine: meta.dataset._model ? meta.dataset._model.steppedLine : false,
  6412. // Tooltip
  6413. hitRadius: custom.hitRadius || helpers.valueAtIndexOrDefault(dataset.pointHitRadius, index, pointOptions.hitRadius)
  6414. };
  6415. },
  6416. calculatePointY: function(value, index, datasetIndex) {
  6417. var me = this;
  6418. var chart = me.chart;
  6419. var meta = me.getMeta();
  6420. var yScale = me.getScaleForId(meta.yAxisID);
  6421. var sumPos = 0;
  6422. var sumNeg = 0;
  6423. var i, ds, dsMeta;
  6424. if (yScale.options.stacked) {
  6425. for (i = 0; i < datasetIndex; i++) {
  6426. ds = chart.data.datasets[i];
  6427. dsMeta = chart.getDatasetMeta(i);
  6428. if (dsMeta.type === 'line' && dsMeta.yAxisID === yScale.id && chart.isDatasetVisible(i)) {
  6429. var stackedRightValue = Number(yScale.getRightValue(ds.data[index]));
  6430. if (stackedRightValue < 0) {
  6431. sumNeg += stackedRightValue || 0;
  6432. } else {
  6433. sumPos += stackedRightValue || 0;
  6434. }
  6435. }
  6436. }
  6437. var rightValue = Number(yScale.getRightValue(value));
  6438. if (rightValue < 0) {
  6439. return yScale.getPixelForValue(sumNeg + rightValue);
  6440. }
  6441. return yScale.getPixelForValue(sumPos + rightValue);
  6442. }
  6443. return yScale.getPixelForValue(value);
  6444. },
  6445. updateBezierControlPoints: function() {
  6446. var me = this;
  6447. var meta = me.getMeta();
  6448. var area = me.chart.chartArea;
  6449. var points = (meta.data || []);
  6450. var i, ilen, point, model, controlPoints;
  6451. // Only consider points that are drawn in case the spanGaps option is used
  6452. if (meta.dataset._model.spanGaps) {
  6453. points = points.filter(function(pt) {
  6454. return !pt._model.skip;
  6455. });
  6456. }
  6457. function capControlPoint(pt, min, max) {
  6458. return Math.max(Math.min(pt, max), min);
  6459. }
  6460. if (meta.dataset._model.cubicInterpolationMode === 'monotone') {
  6461. helpers.splineCurveMonotone(points);
  6462. } else {
  6463. for (i = 0, ilen = points.length; i < ilen; ++i) {
  6464. point = points[i];
  6465. model = point._model;
  6466. controlPoints = helpers.splineCurve(
  6467. helpers.previousItem(points, i)._model,
  6468. model,
  6469. helpers.nextItem(points, i)._model,
  6470. meta.dataset._model.tension
  6471. );
  6472. model.controlPointPreviousX = controlPoints.previous.x;
  6473. model.controlPointPreviousY = controlPoints.previous.y;
  6474. model.controlPointNextX = controlPoints.next.x;
  6475. model.controlPointNextY = controlPoints.next.y;
  6476. }
  6477. }
  6478. if (me.chart.options.elements.line.capBezierPoints) {
  6479. for (i = 0, ilen = points.length; i < ilen; ++i) {
  6480. model = points[i]._model;
  6481. model.controlPointPreviousX = capControlPoint(model.controlPointPreviousX, area.left, area.right);
  6482. model.controlPointPreviousY = capControlPoint(model.controlPointPreviousY, area.top, area.bottom);
  6483. model.controlPointNextX = capControlPoint(model.controlPointNextX, area.left, area.right);
  6484. model.controlPointNextY = capControlPoint(model.controlPointNextY, area.top, area.bottom);
  6485. }
  6486. }
  6487. },
  6488. draw: function() {
  6489. var me = this;
  6490. var chart = me.chart;
  6491. var meta = me.getMeta();
  6492. var points = meta.data || [];
  6493. var area = chart.chartArea;
  6494. var ilen = points.length;
  6495. var i = 0;
  6496. helpers.canvas.clipArea(chart.ctx, area);
  6497. if (lineEnabled(me.getDataset(), chart.options)) {
  6498. meta.dataset.draw();
  6499. }
  6500. helpers.canvas.unclipArea(chart.ctx);
  6501. // Draw the points
  6502. for (; i < ilen; ++i) {
  6503. points[i].draw(area);
  6504. }
  6505. },
  6506. setHoverStyle: function(point) {
  6507. // Point
  6508. var dataset = this.chart.data.datasets[point._datasetIndex];
  6509. var index = point._index;
  6510. var custom = point.custom || {};
  6511. var model = point._model;
  6512. model.radius = custom.hoverRadius || helpers.valueAtIndexOrDefault(dataset.pointHoverRadius, index, this.chart.options.elements.point.hoverRadius);
  6513. model.backgroundColor = custom.hoverBackgroundColor || helpers.valueAtIndexOrDefault(dataset.pointHoverBackgroundColor, index, helpers.getHoverColor(model.backgroundColor));
  6514. model.borderColor = custom.hoverBorderColor || helpers.valueAtIndexOrDefault(dataset.pointHoverBorderColor, index, helpers.getHoverColor(model.borderColor));
  6515. model.borderWidth = custom.hoverBorderWidth || helpers.valueAtIndexOrDefault(dataset.pointHoverBorderWidth, index, model.borderWidth);
  6516. },
  6517. removeHoverStyle: function(point) {
  6518. var me = this;
  6519. var dataset = me.chart.data.datasets[point._datasetIndex];
  6520. var index = point._index;
  6521. var custom = point.custom || {};
  6522. var model = point._model;
  6523. // Compatibility: If the properties are defined with only the old name, use those values
  6524. if ((dataset.radius !== undefined) && (dataset.pointRadius === undefined)) {
  6525. dataset.pointRadius = dataset.radius;
  6526. }
  6527. model.radius = custom.radius || helpers.valueAtIndexOrDefault(dataset.pointRadius, index, me.chart.options.elements.point.radius);
  6528. model.backgroundColor = me.getPointBackgroundColor(point, index);
  6529. model.borderColor = me.getPointBorderColor(point, index);
  6530. model.borderWidth = me.getPointBorderWidth(point, index);
  6531. }
  6532. });
  6533. };
  6534. },{"25":25,"40":40,"45":45}],19:[function(require,module,exports){
  6535. 'use strict';
  6536. var defaults = require(25);
  6537. var elements = require(40);
  6538. var helpers = require(45);
  6539. defaults._set('polarArea', {
  6540. scale: {
  6541. type: 'radialLinear',
  6542. angleLines: {
  6543. display: false
  6544. },
  6545. gridLines: {
  6546. circular: true
  6547. },
  6548. pointLabels: {
  6549. display: false
  6550. },
  6551. ticks: {
  6552. beginAtZero: true
  6553. }
  6554. },
  6555. // Boolean - Whether to animate the rotation of the chart
  6556. animation: {
  6557. animateRotate: true,
  6558. animateScale: true
  6559. },
  6560. startAngle: -0.5 * Math.PI,
  6561. legendCallback: function(chart) {
  6562. var text = [];
  6563. text.push('<ul class="' + chart.id + '-legend">');
  6564. var data = chart.data;
  6565. var datasets = data.datasets;
  6566. var labels = data.labels;
  6567. if (datasets.length) {
  6568. for (var i = 0; i < datasets[0].data.length; ++i) {
  6569. text.push('<li><span style="background-color:' + datasets[0].backgroundColor[i] + '"></span>');
  6570. if (labels[i]) {
  6571. text.push(labels[i]);
  6572. }
  6573. text.push('</li>');
  6574. }
  6575. }
  6576. text.push('</ul>');
  6577. return text.join('');
  6578. },
  6579. legend: {
  6580. labels: {
  6581. generateLabels: function(chart) {
  6582. var data = chart.data;
  6583. if (data.labels.length && data.datasets.length) {
  6584. return data.labels.map(function(label, i) {
  6585. var meta = chart.getDatasetMeta(0);
  6586. var ds = data.datasets[0];
  6587. var arc = meta.data[i];
  6588. var custom = arc.custom || {};
  6589. var valueAtIndexOrDefault = helpers.valueAtIndexOrDefault;
  6590. var arcOpts = chart.options.elements.arc;
  6591. var fill = custom.backgroundColor ? custom.backgroundColor : valueAtIndexOrDefault(ds.backgroundColor, i, arcOpts.backgroundColor);
  6592. var stroke = custom.borderColor ? custom.borderColor : valueAtIndexOrDefault(ds.borderColor, i, arcOpts.borderColor);
  6593. var bw = custom.borderWidth ? custom.borderWidth : valueAtIndexOrDefault(ds.borderWidth, i, arcOpts.borderWidth);
  6594. return {
  6595. text: label,
  6596. fillStyle: fill,
  6597. strokeStyle: stroke,
  6598. lineWidth: bw,
  6599. hidden: isNaN(ds.data[i]) || meta.data[i].hidden,
  6600. // Extra data used for toggling the correct item
  6601. index: i
  6602. };
  6603. });
  6604. }
  6605. return [];
  6606. }
  6607. },
  6608. onClick: function(e, legendItem) {
  6609. var index = legendItem.index;
  6610. var chart = this.chart;
  6611. var i, ilen, meta;
  6612. for (i = 0, ilen = (chart.data.datasets || []).length; i < ilen; ++i) {
  6613. meta = chart.getDatasetMeta(i);
  6614. meta.data[index].hidden = !meta.data[index].hidden;
  6615. }
  6616. chart.update();
  6617. }
  6618. },
  6619. // Need to override these to give a nice default
  6620. tooltips: {
  6621. callbacks: {
  6622. title: function() {
  6623. return '';
  6624. },
  6625. label: function(item, data) {
  6626. return data.labels[item.index] + ': ' + item.yLabel;
  6627. }
  6628. }
  6629. }
  6630. });
  6631. module.exports = function(Chart) {
  6632. Chart.controllers.polarArea = Chart.DatasetController.extend({
  6633. dataElementType: elements.Arc,
  6634. linkScales: helpers.noop,
  6635. update: function(reset) {
  6636. var me = this;
  6637. var chart = me.chart;
  6638. var chartArea = chart.chartArea;
  6639. var meta = me.getMeta();
  6640. var opts = chart.options;
  6641. var arcOpts = opts.elements.arc;
  6642. var minSize = Math.min(chartArea.right - chartArea.left, chartArea.bottom - chartArea.top);
  6643. chart.outerRadius = Math.max((minSize - arcOpts.borderWidth / 2) / 2, 0);
  6644. chart.innerRadius = Math.max(opts.cutoutPercentage ? (chart.outerRadius / 100) * (opts.cutoutPercentage) : 1, 0);
  6645. chart.radiusLength = (chart.outerRadius - chart.innerRadius) / chart.getVisibleDatasetCount();
  6646. me.outerRadius = chart.outerRadius - (chart.radiusLength * me.index);
  6647. me.innerRadius = me.outerRadius - chart.radiusLength;
  6648. meta.count = me.countVisibleElements();
  6649. helpers.each(meta.data, function(arc, index) {
  6650. me.updateElement(arc, index, reset);
  6651. });
  6652. },
  6653. updateElement: function(arc, index, reset) {
  6654. var me = this;
  6655. var chart = me.chart;
  6656. var dataset = me.getDataset();
  6657. var opts = chart.options;
  6658. var animationOpts = opts.animation;
  6659. var scale = chart.scale;
  6660. var labels = chart.data.labels;
  6661. var circumference = me.calculateCircumference(dataset.data[index]);
  6662. var centerX = scale.xCenter;
  6663. var centerY = scale.yCenter;
  6664. // If there is NaN data before us, we need to calculate the starting angle correctly.
  6665. // We could be way more efficient here, but its unlikely that the polar area chart will have a lot of data
  6666. var visibleCount = 0;
  6667. var meta = me.getMeta();
  6668. for (var i = 0; i < index; ++i) {
  6669. if (!isNaN(dataset.data[i]) && !meta.data[i].hidden) {
  6670. ++visibleCount;
  6671. }
  6672. }
  6673. // var negHalfPI = -0.5 * Math.PI;
  6674. var datasetStartAngle = opts.startAngle;
  6675. var distance = arc.hidden ? 0 : scale.getDistanceFromCenterForValue(dataset.data[index]);
  6676. var startAngle = datasetStartAngle + (circumference * visibleCount);
  6677. var endAngle = startAngle + (arc.hidden ? 0 : circumference);
  6678. var resetRadius = animationOpts.animateScale ? 0 : scale.getDistanceFromCenterForValue(dataset.data[index]);
  6679. helpers.extend(arc, {
  6680. // Utility
  6681. _datasetIndex: me.index,
  6682. _index: index,
  6683. _scale: scale,
  6684. // Desired view properties
  6685. _model: {
  6686. x: centerX,
  6687. y: centerY,
  6688. innerRadius: 0,
  6689. outerRadius: reset ? resetRadius : distance,
  6690. startAngle: reset && animationOpts.animateRotate ? datasetStartAngle : startAngle,
  6691. endAngle: reset && animationOpts.animateRotate ? datasetStartAngle : endAngle,
  6692. label: helpers.valueAtIndexOrDefault(labels, index, labels[index])
  6693. }
  6694. });
  6695. // Apply border and fill style
  6696. me.removeHoverStyle(arc);
  6697. arc.pivot();
  6698. },
  6699. removeHoverStyle: function(arc) {
  6700. Chart.DatasetController.prototype.removeHoverStyle.call(this, arc, this.chart.options.elements.arc);
  6701. },
  6702. countVisibleElements: function() {
  6703. var dataset = this.getDataset();
  6704. var meta = this.getMeta();
  6705. var count = 0;
  6706. helpers.each(meta.data, function(element, index) {
  6707. if (!isNaN(dataset.data[index]) && !element.hidden) {
  6708. count++;
  6709. }
  6710. });
  6711. return count;
  6712. },
  6713. calculateCircumference: function(value) {
  6714. var count = this.getMeta().count;
  6715. if (count > 0 && !isNaN(value)) {
  6716. return (2 * Math.PI) / count;
  6717. }
  6718. return 0;
  6719. }
  6720. });
  6721. };
  6722. },{"25":25,"40":40,"45":45}],20:[function(require,module,exports){
  6723. 'use strict';
  6724. var defaults = require(25);
  6725. var elements = require(40);
  6726. var helpers = require(45);
  6727. defaults._set('radar', {
  6728. scale: {
  6729. type: 'radialLinear'
  6730. },
  6731. elements: {
  6732. line: {
  6733. tension: 0 // no bezier in radar
  6734. }
  6735. }
  6736. });
  6737. module.exports = function(Chart) {
  6738. Chart.controllers.radar = Chart.DatasetController.extend({
  6739. datasetElementType: elements.Line,
  6740. dataElementType: elements.Point,
  6741. linkScales: helpers.noop,
  6742. update: function(reset) {
  6743. var me = this;
  6744. var meta = me.getMeta();
  6745. var line = meta.dataset;
  6746. var points = meta.data;
  6747. var custom = line.custom || {};
  6748. var dataset = me.getDataset();
  6749. var lineElementOptions = me.chart.options.elements.line;
  6750. var scale = me.chart.scale;
  6751. // Compatibility: If the properties are defined with only the old name, use those values
  6752. if ((dataset.tension !== undefined) && (dataset.lineTension === undefined)) {
  6753. dataset.lineTension = dataset.tension;
  6754. }
  6755. helpers.extend(meta.dataset, {
  6756. // Utility
  6757. _datasetIndex: me.index,
  6758. _scale: scale,
  6759. // Data
  6760. _children: points,
  6761. _loop: true,
  6762. // Model
  6763. _model: {
  6764. // Appearance
  6765. tension: custom.tension ? custom.tension : helpers.valueOrDefault(dataset.lineTension, lineElementOptions.tension),
  6766. backgroundColor: custom.backgroundColor ? custom.backgroundColor : (dataset.backgroundColor || lineElementOptions.backgroundColor),
  6767. borderWidth: custom.borderWidth ? custom.borderWidth : (dataset.borderWidth || lineElementOptions.borderWidth),
  6768. borderColor: custom.borderColor ? custom.borderColor : (dataset.borderColor || lineElementOptions.borderColor),
  6769. fill: custom.fill ? custom.fill : (dataset.fill !== undefined ? dataset.fill : lineElementOptions.fill),
  6770. borderCapStyle: custom.borderCapStyle ? custom.borderCapStyle : (dataset.borderCapStyle || lineElementOptions.borderCapStyle),
  6771. borderDash: custom.borderDash ? custom.borderDash : (dataset.borderDash || lineElementOptions.borderDash),
  6772. borderDashOffset: custom.borderDashOffset ? custom.borderDashOffset : (dataset.borderDashOffset || lineElementOptions.borderDashOffset),
  6773. borderJoinStyle: custom.borderJoinStyle ? custom.borderJoinStyle : (dataset.borderJoinStyle || lineElementOptions.borderJoinStyle),
  6774. }
  6775. });
  6776. meta.dataset.pivot();
  6777. // Update Points
  6778. helpers.each(points, function(point, index) {
  6779. me.updateElement(point, index, reset);
  6780. }, me);
  6781. // Update bezier control points
  6782. me.updateBezierControlPoints();
  6783. },
  6784. updateElement: function(point, index, reset) {
  6785. var me = this;
  6786. var custom = point.custom || {};
  6787. var dataset = me.getDataset();
  6788. var scale = me.chart.scale;
  6789. var pointElementOptions = me.chart.options.elements.point;
  6790. var pointPosition = scale.getPointPositionForValue(index, dataset.data[index]);
  6791. // Compatibility: If the properties are defined with only the old name, use those values
  6792. if ((dataset.radius !== undefined) && (dataset.pointRadius === undefined)) {
  6793. dataset.pointRadius = dataset.radius;
  6794. }
  6795. if ((dataset.hitRadius !== undefined) && (dataset.pointHitRadius === undefined)) {
  6796. dataset.pointHitRadius = dataset.hitRadius;
  6797. }
  6798. helpers.extend(point, {
  6799. // Utility
  6800. _datasetIndex: me.index,
  6801. _index: index,
  6802. _scale: scale,
  6803. // Desired view properties
  6804. _model: {
  6805. x: reset ? scale.xCenter : pointPosition.x, // value not used in dataset scale, but we want a consistent API between scales
  6806. y: reset ? scale.yCenter : pointPosition.y,
  6807. // Appearance
  6808. tension: custom.tension ? custom.tension : helpers.valueOrDefault(dataset.lineTension, me.chart.options.elements.line.tension),
  6809. radius: custom.radius ? custom.radius : helpers.valueAtIndexOrDefault(dataset.pointRadius, index, pointElementOptions.radius),
  6810. backgroundColor: custom.backgroundColor ? custom.backgroundColor : helpers.valueAtIndexOrDefault(dataset.pointBackgroundColor, index, pointElementOptions.backgroundColor),
  6811. borderColor: custom.borderColor ? custom.borderColor : helpers.valueAtIndexOrDefault(dataset.pointBorderColor, index, pointElementOptions.borderColor),
  6812. borderWidth: custom.borderWidth ? custom.borderWidth : helpers.valueAtIndexOrDefault(dataset.pointBorderWidth, index, pointElementOptions.borderWidth),
  6813. pointStyle: custom.pointStyle ? custom.pointStyle : helpers.valueAtIndexOrDefault(dataset.pointStyle, index, pointElementOptions.pointStyle),
  6814. // Tooltip
  6815. hitRadius: custom.hitRadius ? custom.hitRadius : helpers.valueAtIndexOrDefault(dataset.pointHitRadius, index, pointElementOptions.hitRadius)
  6816. }
  6817. });
  6818. point._model.skip = custom.skip ? custom.skip : (isNaN(point._model.x) || isNaN(point._model.y));
  6819. },
  6820. updateBezierControlPoints: function() {
  6821. var chartArea = this.chart.chartArea;
  6822. var meta = this.getMeta();
  6823. helpers.each(meta.data, function(point, index) {
  6824. var model = point._model;
  6825. var controlPoints = helpers.splineCurve(
  6826. helpers.previousItem(meta.data, index, true)._model,
  6827. model,
  6828. helpers.nextItem(meta.data, index, true)._model,
  6829. model.tension
  6830. );
  6831. // Prevent the bezier going outside of the bounds of the graph
  6832. model.controlPointPreviousX = Math.max(Math.min(controlPoints.previous.x, chartArea.right), chartArea.left);
  6833. model.controlPointPreviousY = Math.max(Math.min(controlPoints.previous.y, chartArea.bottom), chartArea.top);
  6834. model.controlPointNextX = Math.max(Math.min(controlPoints.next.x, chartArea.right), chartArea.left);
  6835. model.controlPointNextY = Math.max(Math.min(controlPoints.next.y, chartArea.bottom), chartArea.top);
  6836. // Now pivot the point for animation
  6837. point.pivot();
  6838. });
  6839. },
  6840. setHoverStyle: function(point) {
  6841. // Point
  6842. var dataset = this.chart.data.datasets[point._datasetIndex];
  6843. var custom = point.custom || {};
  6844. var index = point._index;
  6845. var model = point._model;
  6846. model.radius = custom.hoverRadius ? custom.hoverRadius : helpers.valueAtIndexOrDefault(dataset.pointHoverRadius, index, this.chart.options.elements.point.hoverRadius);
  6847. model.backgroundColor = custom.hoverBackgroundColor ? custom.hoverBackgroundColor : helpers.valueAtIndexOrDefault(dataset.pointHoverBackgroundColor, index, helpers.getHoverColor(model.backgroundColor));
  6848. model.borderColor = custom.hoverBorderColor ? custom.hoverBorderColor : helpers.valueAtIndexOrDefault(dataset.pointHoverBorderColor, index, helpers.getHoverColor(model.borderColor));
  6849. model.borderWidth = custom.hoverBorderWidth ? custom.hoverBorderWidth : helpers.valueAtIndexOrDefault(dataset.pointHoverBorderWidth, index, model.borderWidth);
  6850. },
  6851. removeHoverStyle: function(point) {
  6852. var dataset = this.chart.data.datasets[point._datasetIndex];
  6853. var custom = point.custom || {};
  6854. var index = point._index;
  6855. var model = point._model;
  6856. var pointElementOptions = this.chart.options.elements.point;
  6857. model.radius = custom.radius ? custom.radius : helpers.valueAtIndexOrDefault(dataset.pointRadius, index, pointElementOptions.radius);
  6858. model.backgroundColor = custom.backgroundColor ? custom.backgroundColor : helpers.valueAtIndexOrDefault(dataset.pointBackgroundColor, index, pointElementOptions.backgroundColor);
  6859. model.borderColor = custom.borderColor ? custom.borderColor : helpers.valueAtIndexOrDefault(dataset.pointBorderColor, index, pointElementOptions.borderColor);
  6860. model.borderWidth = custom.borderWidth ? custom.borderWidth : helpers.valueAtIndexOrDefault(dataset.pointBorderWidth, index, pointElementOptions.borderWidth);
  6861. }
  6862. });
  6863. };
  6864. },{"25":25,"40":40,"45":45}],21:[function(require,module,exports){
  6865. 'use strict';
  6866. var defaults = require(25);
  6867. defaults._set('scatter', {
  6868. hover: {
  6869. mode: 'single'
  6870. },
  6871. scales: {
  6872. xAxes: [{
  6873. id: 'x-axis-1', // need an ID so datasets can reference the scale
  6874. type: 'linear', // scatter should not use a category axis
  6875. position: 'bottom'
  6876. }],
  6877. yAxes: [{
  6878. id: 'y-axis-1',
  6879. type: 'linear',
  6880. position: 'left'
  6881. }]
  6882. },
  6883. showLines: false,
  6884. tooltips: {
  6885. callbacks: {
  6886. title: function() {
  6887. return ''; // doesn't make sense for scatter since data are formatted as a point
  6888. },
  6889. label: function(item) {
  6890. return '(' + item.xLabel + ', ' + item.yLabel + ')';
  6891. }
  6892. }
  6893. }
  6894. });
  6895. module.exports = function(Chart) {
  6896. // Scatter charts use line controllers
  6897. Chart.controllers.scatter = Chart.controllers.line;
  6898. };
  6899. },{"25":25}],22:[function(require,module,exports){
  6900. /* global window: false */
  6901. 'use strict';
  6902. var defaults = require(25);
  6903. var Element = require(26);
  6904. var helpers = require(45);
  6905. defaults._set('global', {
  6906. animation: {
  6907. duration: 1000,
  6908. easing: 'easeOutQuart',
  6909. onProgress: helpers.noop,
  6910. onComplete: helpers.noop
  6911. }
  6912. });
  6913. module.exports = function(Chart) {
  6914. Chart.Animation = Element.extend({
  6915. chart: null, // the animation associated chart instance
  6916. currentStep: 0, // the current animation step
  6917. numSteps: 60, // default number of steps
  6918. easing: '', // the easing to use for this animation
  6919. render: null, // render function used by the animation service
  6920. onAnimationProgress: null, // user specified callback to fire on each step of the animation
  6921. onAnimationComplete: null, // user specified callback to fire when the animation finishes
  6922. });
  6923. Chart.animationService = {
  6924. frameDuration: 17,
  6925. animations: [],
  6926. dropFrames: 0,
  6927. request: null,
  6928. /**
  6929. * @param {Chart} chart - The chart to animate.
  6930. * @param {Chart.Animation} animation - The animation that we will animate.
  6931. * @param {Number} duration - The animation duration in ms.
  6932. * @param {Boolean} lazy - if true, the chart is not marked as animating to enable more responsive interactions
  6933. */
  6934. addAnimation: function(chart, animation, duration, lazy) {
  6935. var animations = this.animations;
  6936. var i, ilen;
  6937. animation.chart = chart;
  6938. if (!lazy) {
  6939. chart.animating = true;
  6940. }
  6941. for (i = 0, ilen = animations.length; i < ilen; ++i) {
  6942. if (animations[i].chart === chart) {
  6943. animations[i] = animation;
  6944. return;
  6945. }
  6946. }
  6947. animations.push(animation);
  6948. // If there are no animations queued, manually kickstart a digest, for lack of a better word
  6949. if (animations.length === 1) {
  6950. this.requestAnimationFrame();
  6951. }
  6952. },
  6953. cancelAnimation: function(chart) {
  6954. var index = helpers.findIndex(this.animations, function(animation) {
  6955. return animation.chart === chart;
  6956. });
  6957. if (index !== -1) {
  6958. this.animations.splice(index, 1);
  6959. chart.animating = false;
  6960. }
  6961. },
  6962. requestAnimationFrame: function() {
  6963. var me = this;
  6964. if (me.request === null) {
  6965. // Skip animation frame requests until the active one is executed.
  6966. // This can happen when processing mouse events, e.g. 'mousemove'
  6967. // and 'mouseout' events will trigger multiple renders.
  6968. me.request = helpers.requestAnimFrame.call(window, function() {
  6969. me.request = null;
  6970. me.startDigest();
  6971. });
  6972. }
  6973. },
  6974. /**
  6975. * @private
  6976. */
  6977. startDigest: function() {
  6978. var me = this;
  6979. var startTime = Date.now();
  6980. var framesToDrop = 0;
  6981. if (me.dropFrames > 1) {
  6982. framesToDrop = Math.floor(me.dropFrames);
  6983. me.dropFrames = me.dropFrames % 1;
  6984. }
  6985. me.advance(1 + framesToDrop);
  6986. var endTime = Date.now();
  6987. me.dropFrames += (endTime - startTime) / me.frameDuration;
  6988. // Do we have more stuff to animate?
  6989. if (me.animations.length > 0) {
  6990. me.requestAnimationFrame();
  6991. }
  6992. },
  6993. /**
  6994. * @private
  6995. */
  6996. advance: function(count) {
  6997. var animations = this.animations;
  6998. var animation, chart;
  6999. var i = 0;
  7000. while (i < animations.length) {
  7001. animation = animations[i];
  7002. chart = animation.chart;
  7003. animation.currentStep = (animation.currentStep || 0) + count;
  7004. animation.currentStep = Math.min(animation.currentStep, animation.numSteps);
  7005. helpers.callback(animation.render, [chart, animation], chart);
  7006. helpers.callback(animation.onAnimationProgress, [animation], chart);
  7007. if (animation.currentStep >= animation.numSteps) {
  7008. helpers.callback(animation.onAnimationComplete, [animation], chart);
  7009. chart.animating = false;
  7010. animations.splice(i, 1);
  7011. } else {
  7012. ++i;
  7013. }
  7014. }
  7015. }
  7016. };
  7017. /**
  7018. * Provided for backward compatibility, use Chart.Animation instead
  7019. * @prop Chart.Animation#animationObject
  7020. * @deprecated since version 2.6.0
  7021. * @todo remove at version 3
  7022. */
  7023. Object.defineProperty(Chart.Animation.prototype, 'animationObject', {
  7024. get: function() {
  7025. return this;
  7026. }
  7027. });
  7028. /**
  7029. * Provided for backward compatibility, use Chart.Animation#chart instead
  7030. * @prop Chart.Animation#chartInstance
  7031. * @deprecated since version 2.6.0
  7032. * @todo remove at version 3
  7033. */
  7034. Object.defineProperty(Chart.Animation.prototype, 'chartInstance', {
  7035. get: function() {
  7036. return this.chart;
  7037. },
  7038. set: function(value) {
  7039. this.chart = value;
  7040. }
  7041. });
  7042. };
  7043. },{"25":25,"26":26,"45":45}],23:[function(require,module,exports){
  7044. 'use strict';
  7045. var defaults = require(25);
  7046. var helpers = require(45);
  7047. var Interaction = require(28);
  7048. var layouts = require(30);
  7049. var platform = require(48);
  7050. var plugins = require(31);
  7051. module.exports = function(Chart) {
  7052. // Create a dictionary of chart types, to allow for extension of existing types
  7053. Chart.types = {};
  7054. // Store a reference to each instance - allowing us to globally resize chart instances on window resize.
  7055. // Destroy method on the chart will remove the instance of the chart from this reference.
  7056. Chart.instances = {};
  7057. // Controllers available for dataset visualization eg. bar, line, slice, etc.
  7058. Chart.controllers = {};
  7059. /**
  7060. * Initializes the given config with global and chart default values.
  7061. */
  7062. function initConfig(config) {
  7063. config = config || {};
  7064. // Do NOT use configMerge() for the data object because this method merges arrays
  7065. // and so would change references to labels and datasets, preventing data updates.
  7066. var data = config.data = config.data || {};
  7067. data.datasets = data.datasets || [];
  7068. data.labels = data.labels || [];
  7069. config.options = helpers.configMerge(
  7070. defaults.global,
  7071. defaults[config.type],
  7072. config.options || {});
  7073. return config;
  7074. }
  7075. /**
  7076. * Updates the config of the chart
  7077. * @param chart {Chart} chart to update the options for
  7078. */
  7079. function updateConfig(chart) {
  7080. var newOptions = chart.options;
  7081. helpers.each(chart.scales, function(scale) {
  7082. layouts.removeBox(chart, scale);
  7083. });
  7084. newOptions = helpers.configMerge(
  7085. Chart.defaults.global,
  7086. Chart.defaults[chart.config.type],
  7087. newOptions);
  7088. chart.options = chart.config.options = newOptions;
  7089. chart.ensureScalesHaveIDs();
  7090. chart.buildOrUpdateScales();
  7091. // Tooltip
  7092. chart.tooltip._options = newOptions.tooltips;
  7093. chart.tooltip.initialize();
  7094. }
  7095. function positionIsHorizontal(position) {
  7096. return position === 'top' || position === 'bottom';
  7097. }
  7098. helpers.extend(Chart.prototype, /** @lends Chart */ {
  7099. /**
  7100. * @private
  7101. */
  7102. construct: function(item, config) {
  7103. var me = this;
  7104. config = initConfig(config);
  7105. var context = platform.acquireContext(item, config);
  7106. var canvas = context && context.canvas;
  7107. var height = canvas && canvas.height;
  7108. var width = canvas && canvas.width;
  7109. me.id = helpers.uid();
  7110. me.ctx = context;
  7111. me.canvas = canvas;
  7112. me.config = config;
  7113. me.width = width;
  7114. me.height = height;
  7115. me.aspectRatio = height ? width / height : null;
  7116. me.options = config.options;
  7117. me._bufferedRender = false;
  7118. /**
  7119. * Provided for backward compatibility, Chart and Chart.Controller have been merged,
  7120. * the "instance" still need to be defined since it might be called from plugins.
  7121. * @prop Chart#chart
  7122. * @deprecated since version 2.6.0
  7123. * @todo remove at version 3
  7124. * @private
  7125. */
  7126. me.chart = me;
  7127. me.controller = me; // chart.chart.controller #inception
  7128. // Add the chart instance to the global namespace
  7129. Chart.instances[me.id] = me;
  7130. // Define alias to the config data: `chart.data === chart.config.data`
  7131. Object.defineProperty(me, 'data', {
  7132. get: function() {
  7133. return me.config.data;
  7134. },
  7135. set: function(value) {
  7136. me.config.data = value;
  7137. }
  7138. });
  7139. if (!context || !canvas) {
  7140. // The given item is not a compatible context2d element, let's return before finalizing
  7141. // the chart initialization but after setting basic chart / controller properties that
  7142. // can help to figure out that the chart is not valid (e.g chart.canvas !== null);
  7143. // https://github.com/chartjs/Chart.js/issues/2807
  7144. console.error("Failed to create chart: can't acquire context from the given item");
  7145. return;
  7146. }
  7147. me.initialize();
  7148. me.update();
  7149. },
  7150. /**
  7151. * @private
  7152. */
  7153. initialize: function() {
  7154. var me = this;
  7155. // Before init plugin notification
  7156. plugins.notify(me, 'beforeInit');
  7157. helpers.retinaScale(me, me.options.devicePixelRatio);
  7158. me.bindEvents();
  7159. if (me.options.responsive) {
  7160. // Initial resize before chart draws (must be silent to preserve initial animations).
  7161. me.resize(true);
  7162. }
  7163. // Make sure scales have IDs and are built before we build any controllers.
  7164. me.ensureScalesHaveIDs();
  7165. me.buildOrUpdateScales();
  7166. me.initToolTip();
  7167. // After init plugin notification
  7168. plugins.notify(me, 'afterInit');
  7169. return me;
  7170. },
  7171. clear: function() {
  7172. helpers.canvas.clear(this);
  7173. return this;
  7174. },
  7175. stop: function() {
  7176. // Stops any current animation loop occurring
  7177. Chart.animationService.cancelAnimation(this);
  7178. return this;
  7179. },
  7180. resize: function(silent) {
  7181. var me = this;
  7182. var options = me.options;
  7183. var canvas = me.canvas;
  7184. var aspectRatio = (options.maintainAspectRatio && me.aspectRatio) || null;
  7185. // the canvas render width and height will be casted to integers so make sure that
  7186. // the canvas display style uses the same integer values to avoid blurring effect.
  7187. // Set to 0 instead of canvas.size because the size defaults to 300x150 if the element is collased
  7188. var newWidth = Math.max(0, Math.floor(helpers.getMaximumWidth(canvas)));
  7189. var newHeight = Math.max(0, Math.floor(aspectRatio ? newWidth / aspectRatio : helpers.getMaximumHeight(canvas)));
  7190. if (me.width === newWidth && me.height === newHeight) {
  7191. return;
  7192. }
  7193. canvas.width = me.width = newWidth;
  7194. canvas.height = me.height = newHeight;
  7195. canvas.style.width = newWidth + 'px';
  7196. canvas.style.height = newHeight + 'px';
  7197. helpers.retinaScale(me, options.devicePixelRatio);
  7198. if (!silent) {
  7199. // Notify any plugins about the resize
  7200. var newSize = {width: newWidth, height: newHeight};
  7201. plugins.notify(me, 'resize', [newSize]);
  7202. // Notify of resize
  7203. if (me.options.onResize) {
  7204. me.options.onResize(me, newSize);
  7205. }
  7206. me.stop();
  7207. me.update(me.options.responsiveAnimationDuration);
  7208. }
  7209. },
  7210. ensureScalesHaveIDs: function() {
  7211. var options = this.options;
  7212. var scalesOptions = options.scales || {};
  7213. var scaleOptions = options.scale;
  7214. helpers.each(scalesOptions.xAxes, function(xAxisOptions, index) {
  7215. xAxisOptions.id = xAxisOptions.id || ('x-axis-' + index);
  7216. });
  7217. helpers.each(scalesOptions.yAxes, function(yAxisOptions, index) {
  7218. yAxisOptions.id = yAxisOptions.id || ('y-axis-' + index);
  7219. });
  7220. if (scaleOptions) {
  7221. scaleOptions.id = scaleOptions.id || 'scale';
  7222. }
  7223. },
  7224. /**
  7225. * Builds a map of scale ID to scale object for future lookup.
  7226. */
  7227. buildOrUpdateScales: function() {
  7228. var me = this;
  7229. var options = me.options;
  7230. var scales = me.scales || {};
  7231. var items = [];
  7232. var updated = Object.keys(scales).reduce(function(obj, id) {
  7233. obj[id] = false;
  7234. return obj;
  7235. }, {});
  7236. if (options.scales) {
  7237. items = items.concat(
  7238. (options.scales.xAxes || []).map(function(xAxisOptions) {
  7239. return {options: xAxisOptions, dtype: 'category', dposition: 'bottom'};
  7240. }),
  7241. (options.scales.yAxes || []).map(function(yAxisOptions) {
  7242. return {options: yAxisOptions, dtype: 'linear', dposition: 'left'};
  7243. })
  7244. );
  7245. }
  7246. if (options.scale) {
  7247. items.push({
  7248. options: options.scale,
  7249. dtype: 'radialLinear',
  7250. isDefault: true,
  7251. dposition: 'chartArea'
  7252. });
  7253. }
  7254. helpers.each(items, function(item) {
  7255. var scaleOptions = item.options;
  7256. var id = scaleOptions.id;
  7257. var scaleType = helpers.valueOrDefault(scaleOptions.type, item.dtype);
  7258. if (positionIsHorizontal(scaleOptions.position) !== positionIsHorizontal(item.dposition)) {
  7259. scaleOptions.position = item.dposition;
  7260. }
  7261. updated[id] = true;
  7262. var scale = null;
  7263. if (id in scales && scales[id].type === scaleType) {
  7264. scale = scales[id];
  7265. scale.options = scaleOptions;
  7266. scale.ctx = me.ctx;
  7267. scale.chart = me;
  7268. } else {
  7269. var scaleClass = Chart.scaleService.getScaleConstructor(scaleType);
  7270. if (!scaleClass) {
  7271. return;
  7272. }
  7273. scale = new scaleClass({
  7274. id: id,
  7275. type: scaleType,
  7276. options: scaleOptions,
  7277. ctx: me.ctx,
  7278. chart: me
  7279. });
  7280. scales[scale.id] = scale;
  7281. }
  7282. scale.mergeTicksOptions();
  7283. // TODO(SB): I think we should be able to remove this custom case (options.scale)
  7284. // and consider it as a regular scale part of the "scales"" map only! This would
  7285. // make the logic easier and remove some useless? custom code.
  7286. if (item.isDefault) {
  7287. me.scale = scale;
  7288. }
  7289. });
  7290. // clear up discarded scales
  7291. helpers.each(updated, function(hasUpdated, id) {
  7292. if (!hasUpdated) {
  7293. delete scales[id];
  7294. }
  7295. });
  7296. me.scales = scales;
  7297. Chart.scaleService.addScalesToLayout(this);
  7298. },
  7299. buildOrUpdateControllers: function() {
  7300. var me = this;
  7301. var types = [];
  7302. var newControllers = [];
  7303. helpers.each(me.data.datasets, function(dataset, datasetIndex) {
  7304. var meta = me.getDatasetMeta(datasetIndex);
  7305. var type = dataset.type || me.config.type;
  7306. if (meta.type && meta.type !== type) {
  7307. me.destroyDatasetMeta(datasetIndex);
  7308. meta = me.getDatasetMeta(datasetIndex);
  7309. }
  7310. meta.type = type;
  7311. types.push(meta.type);
  7312. if (meta.controller) {
  7313. meta.controller.updateIndex(datasetIndex);
  7314. meta.controller.linkScales();
  7315. } else {
  7316. var ControllerClass = Chart.controllers[meta.type];
  7317. if (ControllerClass === undefined) {
  7318. throw new Error('"' + meta.type + '" is not a chart type.');
  7319. }
  7320. meta.controller = new ControllerClass(me, datasetIndex);
  7321. newControllers.push(meta.controller);
  7322. }
  7323. }, me);
  7324. return newControllers;
  7325. },
  7326. /**
  7327. * Reset the elements of all datasets
  7328. * @private
  7329. */
  7330. resetElements: function() {
  7331. var me = this;
  7332. helpers.each(me.data.datasets, function(dataset, datasetIndex) {
  7333. me.getDatasetMeta(datasetIndex).controller.reset();
  7334. }, me);
  7335. },
  7336. /**
  7337. * Resets the chart back to it's state before the initial animation
  7338. */
  7339. reset: function() {
  7340. this.resetElements();
  7341. this.tooltip.initialize();
  7342. },
  7343. update: function(config) {
  7344. var me = this;
  7345. if (!config || typeof config !== 'object') {
  7346. // backwards compatibility
  7347. config = {
  7348. duration: config,
  7349. lazy: arguments[1]
  7350. };
  7351. }
  7352. updateConfig(me);
  7353. // plugins options references might have change, let's invalidate the cache
  7354. // https://github.com/chartjs/Chart.js/issues/5111#issuecomment-355934167
  7355. plugins._invalidate(me);
  7356. if (plugins.notify(me, 'beforeUpdate') === false) {
  7357. return;
  7358. }
  7359. // In case the entire data object changed
  7360. me.tooltip._data = me.data;
  7361. // Make sure dataset controllers are updated and new controllers are reset
  7362. var newControllers = me.buildOrUpdateControllers();
  7363. // Make sure all dataset controllers have correct meta data counts
  7364. helpers.each(me.data.datasets, function(dataset, datasetIndex) {
  7365. me.getDatasetMeta(datasetIndex).controller.buildOrUpdateElements();
  7366. }, me);
  7367. me.updateLayout();
  7368. // Can only reset the new controllers after the scales have been updated
  7369. if (me.options.animation && me.options.animation.duration) {
  7370. helpers.each(newControllers, function(controller) {
  7371. controller.reset();
  7372. });
  7373. }
  7374. me.updateDatasets();
  7375. // Need to reset tooltip in case it is displayed with elements that are removed
  7376. // after update.
  7377. me.tooltip.initialize();
  7378. // Last active contains items that were previously in the tooltip.
  7379. // When we reset the tooltip, we need to clear it
  7380. me.lastActive = [];
  7381. // Do this before render so that any plugins that need final scale updates can use it
  7382. plugins.notify(me, 'afterUpdate');
  7383. if (me._bufferedRender) {
  7384. me._bufferedRequest = {
  7385. duration: config.duration,
  7386. easing: config.easing,
  7387. lazy: config.lazy
  7388. };
  7389. } else {
  7390. me.render(config);
  7391. }
  7392. },
  7393. /**
  7394. * Updates the chart layout unless a plugin returns `false` to the `beforeLayout`
  7395. * hook, in which case, plugins will not be called on `afterLayout`.
  7396. * @private
  7397. */
  7398. updateLayout: function() {
  7399. var me = this;
  7400. if (plugins.notify(me, 'beforeLayout') === false) {
  7401. return;
  7402. }
  7403. layouts.update(this, this.width, this.height);
  7404. /**
  7405. * Provided for backward compatibility, use `afterLayout` instead.
  7406. * @method IPlugin#afterScaleUpdate
  7407. * @deprecated since version 2.5.0
  7408. * @todo remove at version 3
  7409. * @private
  7410. */
  7411. plugins.notify(me, 'afterScaleUpdate');
  7412. plugins.notify(me, 'afterLayout');
  7413. },
  7414. /**
  7415. * Updates all datasets unless a plugin returns `false` to the `beforeDatasetsUpdate`
  7416. * hook, in which case, plugins will not be called on `afterDatasetsUpdate`.
  7417. * @private
  7418. */
  7419. updateDatasets: function() {
  7420. var me = this;
  7421. if (plugins.notify(me, 'beforeDatasetsUpdate') === false) {
  7422. return;
  7423. }
  7424. for (var i = 0, ilen = me.data.datasets.length; i < ilen; ++i) {
  7425. me.updateDataset(i);
  7426. }
  7427. plugins.notify(me, 'afterDatasetsUpdate');
  7428. },
  7429. /**
  7430. * Updates dataset at index unless a plugin returns `false` to the `beforeDatasetUpdate`
  7431. * hook, in which case, plugins will not be called on `afterDatasetUpdate`.
  7432. * @private
  7433. */
  7434. updateDataset: function(index) {
  7435. var me = this;
  7436. var meta = me.getDatasetMeta(index);
  7437. var args = {
  7438. meta: meta,
  7439. index: index
  7440. };
  7441. if (plugins.notify(me, 'beforeDatasetUpdate', [args]) === false) {
  7442. return;
  7443. }
  7444. meta.controller.update();
  7445. plugins.notify(me, 'afterDatasetUpdate', [args]);
  7446. },
  7447. render: function(config) {
  7448. var me = this;
  7449. if (!config || typeof config !== 'object') {
  7450. // backwards compatibility
  7451. config = {
  7452. duration: config,
  7453. lazy: arguments[1]
  7454. };
  7455. }
  7456. var duration = config.duration;
  7457. var lazy = config.lazy;
  7458. if (plugins.notify(me, 'beforeRender') === false) {
  7459. return;
  7460. }
  7461. var animationOptions = me.options.animation;
  7462. var onComplete = function(animation) {
  7463. plugins.notify(me, 'afterRender');
  7464. helpers.callback(animationOptions && animationOptions.onComplete, [animation], me);
  7465. };
  7466. if (animationOptions && ((typeof duration !== 'undefined' && duration !== 0) || (typeof duration === 'undefined' && animationOptions.duration !== 0))) {
  7467. var animation = new Chart.Animation({
  7468. numSteps: (duration || animationOptions.duration) / 16.66, // 60 fps
  7469. easing: config.easing || animationOptions.easing,
  7470. render: function(chart, animationObject) {
  7471. var easingFunction = helpers.easing.effects[animationObject.easing];
  7472. var currentStep = animationObject.currentStep;
  7473. var stepDecimal = currentStep / animationObject.numSteps;
  7474. chart.draw(easingFunction(stepDecimal), stepDecimal, currentStep);
  7475. },
  7476. onAnimationProgress: animationOptions.onProgress,
  7477. onAnimationComplete: onComplete
  7478. });
  7479. Chart.animationService.addAnimation(me, animation, duration, lazy);
  7480. } else {
  7481. me.draw();
  7482. // See https://github.com/chartjs/Chart.js/issues/3781
  7483. onComplete(new Chart.Animation({numSteps: 0, chart: me}));
  7484. }
  7485. return me;
  7486. },
  7487. draw: function(easingValue) {
  7488. var me = this;
  7489. me.clear();
  7490. if (helpers.isNullOrUndef(easingValue)) {
  7491. easingValue = 1;
  7492. }
  7493. me.transition(easingValue);
  7494. if (plugins.notify(me, 'beforeDraw', [easingValue]) === false) {
  7495. return;
  7496. }
  7497. // Draw all the scales
  7498. helpers.each(me.boxes, function(box) {
  7499. box.draw(me.chartArea);
  7500. }, me);
  7501. if (me.scale) {
  7502. me.scale.draw();
  7503. }
  7504. me.drawDatasets(easingValue);
  7505. me._drawTooltip(easingValue);
  7506. plugins.notify(me, 'afterDraw', [easingValue]);
  7507. },
  7508. /**
  7509. * @private
  7510. */
  7511. transition: function(easingValue) {
  7512. var me = this;
  7513. for (var i = 0, ilen = (me.data.datasets || []).length; i < ilen; ++i) {
  7514. if (me.isDatasetVisible(i)) {
  7515. me.getDatasetMeta(i).controller.transition(easingValue);
  7516. }
  7517. }
  7518. me.tooltip.transition(easingValue);
  7519. },
  7520. /**
  7521. * Draws all datasets unless a plugin returns `false` to the `beforeDatasetsDraw`
  7522. * hook, in which case, plugins will not be called on `afterDatasetsDraw`.
  7523. * @private
  7524. */
  7525. drawDatasets: function(easingValue) {
  7526. var me = this;
  7527. if (plugins.notify(me, 'beforeDatasetsDraw', [easingValue]) === false) {
  7528. return;
  7529. }
  7530. // Draw datasets reversed to support proper line stacking
  7531. for (var i = (me.data.datasets || []).length - 1; i >= 0; --i) {
  7532. if (me.isDatasetVisible(i)) {
  7533. me.drawDataset(i, easingValue);
  7534. }
  7535. }
  7536. plugins.notify(me, 'afterDatasetsDraw', [easingValue]);
  7537. },
  7538. /**
  7539. * Draws dataset at index unless a plugin returns `false` to the `beforeDatasetDraw`
  7540. * hook, in which case, plugins will not be called on `afterDatasetDraw`.
  7541. * @private
  7542. */
  7543. drawDataset: function(index, easingValue) {
  7544. var me = this;
  7545. var meta = me.getDatasetMeta(index);
  7546. var args = {
  7547. meta: meta,
  7548. index: index,
  7549. easingValue: easingValue
  7550. };
  7551. if (plugins.notify(me, 'beforeDatasetDraw', [args]) === false) {
  7552. return;
  7553. }
  7554. meta.controller.draw(easingValue);
  7555. plugins.notify(me, 'afterDatasetDraw', [args]);
  7556. },
  7557. /**
  7558. * Draws tooltip unless a plugin returns `false` to the `beforeTooltipDraw`
  7559. * hook, in which case, plugins will not be called on `afterTooltipDraw`.
  7560. * @private
  7561. */
  7562. _drawTooltip: function(easingValue) {
  7563. var me = this;
  7564. var tooltip = me.tooltip;
  7565. var args = {
  7566. tooltip: tooltip,
  7567. easingValue: easingValue
  7568. };
  7569. if (plugins.notify(me, 'beforeTooltipDraw', [args]) === false) {
  7570. return;
  7571. }
  7572. tooltip.draw();
  7573. plugins.notify(me, 'afterTooltipDraw', [args]);
  7574. },
  7575. // Get the single element that was clicked on
  7576. // @return : An object containing the dataset index and element index of the matching element. Also contains the rectangle that was draw
  7577. getElementAtEvent: function(e) {
  7578. return Interaction.modes.single(this, e);
  7579. },
  7580. getElementsAtEvent: function(e) {
  7581. return Interaction.modes.label(this, e, {intersect: true});
  7582. },
  7583. getElementsAtXAxis: function(e) {
  7584. return Interaction.modes['x-axis'](this, e, {intersect: true});
  7585. },
  7586. getElementsAtEventForMode: function(e, mode, options) {
  7587. var method = Interaction.modes[mode];
  7588. if (typeof method === 'function') {
  7589. return method(this, e, options);
  7590. }
  7591. return [];
  7592. },
  7593. getDatasetAtEvent: function(e) {
  7594. return Interaction.modes.dataset(this, e, {intersect: true});
  7595. },
  7596. getDatasetMeta: function(datasetIndex) {
  7597. var me = this;
  7598. var dataset = me.data.datasets[datasetIndex];
  7599. if (!dataset._meta) {
  7600. dataset._meta = {};
  7601. }
  7602. var meta = dataset._meta[me.id];
  7603. if (!meta) {
  7604. meta = dataset._meta[me.id] = {
  7605. type: null,
  7606. data: [],
  7607. dataset: null,
  7608. controller: null,
  7609. hidden: null, // See isDatasetVisible() comment
  7610. xAxisID: null,
  7611. yAxisID: null
  7612. };
  7613. }
  7614. return meta;
  7615. },
  7616. getVisibleDatasetCount: function() {
  7617. var count = 0;
  7618. for (var i = 0, ilen = this.data.datasets.length; i < ilen; ++i) {
  7619. if (this.isDatasetVisible(i)) {
  7620. count++;
  7621. }
  7622. }
  7623. return count;
  7624. },
  7625. isDatasetVisible: function(datasetIndex) {
  7626. var meta = this.getDatasetMeta(datasetIndex);
  7627. // meta.hidden is a per chart dataset hidden flag override with 3 states: if true or false,
  7628. // the dataset.hidden value is ignored, else if null, the dataset hidden state is returned.
  7629. return typeof meta.hidden === 'boolean' ? !meta.hidden : !this.data.datasets[datasetIndex].hidden;
  7630. },
  7631. generateLegend: function() {
  7632. return this.options.legendCallback(this);
  7633. },
  7634. /**
  7635. * @private
  7636. */
  7637. destroyDatasetMeta: function(datasetIndex) {
  7638. var id = this.id;
  7639. var dataset = this.data.datasets[datasetIndex];
  7640. var meta = dataset._meta && dataset._meta[id];
  7641. if (meta) {
  7642. meta.controller.destroy();
  7643. delete dataset._meta[id];
  7644. }
  7645. },
  7646. destroy: function() {
  7647. var me = this;
  7648. var canvas = me.canvas;
  7649. var i, ilen;
  7650. me.stop();
  7651. // dataset controllers need to cleanup associated data
  7652. for (i = 0, ilen = me.data.datasets.length; i < ilen; ++i) {
  7653. me.destroyDatasetMeta(i);
  7654. }
  7655. if (canvas) {
  7656. me.unbindEvents();
  7657. helpers.canvas.clear(me);
  7658. platform.releaseContext(me.ctx);
  7659. me.canvas = null;
  7660. me.ctx = null;
  7661. }
  7662. plugins.notify(me, 'destroy');
  7663. delete Chart.instances[me.id];
  7664. },
  7665. toBase64Image: function() {
  7666. return this.canvas.toDataURL.apply(this.canvas, arguments);
  7667. },
  7668. initToolTip: function() {
  7669. var me = this;
  7670. me.tooltip = new Chart.Tooltip({
  7671. _chart: me,
  7672. _chartInstance: me, // deprecated, backward compatibility
  7673. _data: me.data,
  7674. _options: me.options.tooltips
  7675. }, me);
  7676. },
  7677. /**
  7678. * @private
  7679. */
  7680. bindEvents: function() {
  7681. var me = this;
  7682. var listeners = me._listeners = {};
  7683. var listener = function() {
  7684. me.eventHandler.apply(me, arguments);
  7685. };
  7686. helpers.each(me.options.events, function(type) {
  7687. platform.addEventListener(me, type, listener);
  7688. listeners[type] = listener;
  7689. });
  7690. // Elements used to detect size change should not be injected for non responsive charts.
  7691. // See https://github.com/chartjs/Chart.js/issues/2210
  7692. if (me.options.responsive) {
  7693. listener = function() {
  7694. me.resize();
  7695. };
  7696. platform.addEventListener(me, 'resize', listener);
  7697. listeners.resize = listener;
  7698. }
  7699. },
  7700. /**
  7701. * @private
  7702. */
  7703. unbindEvents: function() {
  7704. var me = this;
  7705. var listeners = me._listeners;
  7706. if (!listeners) {
  7707. return;
  7708. }
  7709. delete me._listeners;
  7710. helpers.each(listeners, function(listener, type) {
  7711. platform.removeEventListener(me, type, listener);
  7712. });
  7713. },
  7714. updateHoverStyle: function(elements, mode, enabled) {
  7715. var method = enabled ? 'setHoverStyle' : 'removeHoverStyle';
  7716. var element, i, ilen;
  7717. for (i = 0, ilen = elements.length; i < ilen; ++i) {
  7718. element = elements[i];
  7719. if (element) {
  7720. this.getDatasetMeta(element._datasetIndex).controller[method](element);
  7721. }
  7722. }
  7723. },
  7724. /**
  7725. * @private
  7726. */
  7727. eventHandler: function(e) {
  7728. var me = this;
  7729. var tooltip = me.tooltip;
  7730. if (plugins.notify(me, 'beforeEvent', [e]) === false) {
  7731. return;
  7732. }
  7733. // Buffer any update calls so that renders do not occur
  7734. me._bufferedRender = true;
  7735. me._bufferedRequest = null;
  7736. var changed = me.handleEvent(e);
  7737. // for smooth tooltip animations issue #4989
  7738. // the tooltip should be the source of change
  7739. // Animation check workaround:
  7740. // tooltip._start will be null when tooltip isn't animating
  7741. if (tooltip) {
  7742. changed = tooltip._start
  7743. ? tooltip.handleEvent(e)
  7744. : changed | tooltip.handleEvent(e);
  7745. }
  7746. plugins.notify(me, 'afterEvent', [e]);
  7747. var bufferedRequest = me._bufferedRequest;
  7748. if (bufferedRequest) {
  7749. // If we have an update that was triggered, we need to do a normal render
  7750. me.render(bufferedRequest);
  7751. } else if (changed && !me.animating) {
  7752. // If entering, leaving, or changing elements, animate the change via pivot
  7753. me.stop();
  7754. // We only need to render at this point. Updating will cause scales to be
  7755. // recomputed generating flicker & using more memory than necessary.
  7756. me.render(me.options.hover.animationDuration, true);
  7757. }
  7758. me._bufferedRender = false;
  7759. me._bufferedRequest = null;
  7760. return me;
  7761. },
  7762. /**
  7763. * Handle an event
  7764. * @private
  7765. * @param {IEvent} event the event to handle
  7766. * @return {Boolean} true if the chart needs to re-render
  7767. */
  7768. handleEvent: function(e) {
  7769. var me = this;
  7770. var options = me.options || {};
  7771. var hoverOptions = options.hover;
  7772. var changed = false;
  7773. me.lastActive = me.lastActive || [];
  7774. // Find Active Elements for hover and tooltips
  7775. if (e.type === 'mouseout') {
  7776. me.active = [];
  7777. } else {
  7778. me.active = me.getElementsAtEventForMode(e, hoverOptions.mode, hoverOptions);
  7779. }
  7780. // Invoke onHover hook
  7781. // Need to call with native event here to not break backwards compatibility
  7782. helpers.callback(options.onHover || options.hover.onHover, [e.native, me.active], me);
  7783. if (e.type === 'mouseup' || e.type === 'click') {
  7784. if (options.onClick) {
  7785. // Use e.native here for backwards compatibility
  7786. options.onClick.call(me, e.native, me.active);
  7787. }
  7788. }
  7789. // Remove styling for last active (even if it may still be active)
  7790. if (me.lastActive.length) {
  7791. me.updateHoverStyle(me.lastActive, hoverOptions.mode, false);
  7792. }
  7793. // Built in hover styling
  7794. if (me.active.length && hoverOptions.mode) {
  7795. me.updateHoverStyle(me.active, hoverOptions.mode, true);
  7796. }
  7797. changed = !helpers.arrayEquals(me.active, me.lastActive);
  7798. // Remember Last Actives
  7799. me.lastActive = me.active;
  7800. return changed;
  7801. }
  7802. });
  7803. /**
  7804. * Provided for backward compatibility, use Chart instead.
  7805. * @class Chart.Controller
  7806. * @deprecated since version 2.6.0
  7807. * @todo remove at version 3
  7808. * @private
  7809. */
  7810. Chart.Controller = Chart;
  7811. };
  7812. },{"25":25,"28":28,"30":30,"31":31,"45":45,"48":48}],24:[function(require,module,exports){
  7813. 'use strict';
  7814. var helpers = require(45);
  7815. module.exports = function(Chart) {
  7816. var arrayEvents = ['push', 'pop', 'shift', 'splice', 'unshift'];
  7817. /**
  7818. * Hooks the array methods that add or remove values ('push', pop', 'shift', 'splice',
  7819. * 'unshift') and notify the listener AFTER the array has been altered. Listeners are
  7820. * called on the 'onData*' callbacks (e.g. onDataPush, etc.) with same arguments.
  7821. */
  7822. function listenArrayEvents(array, listener) {
  7823. if (array._chartjs) {
  7824. array._chartjs.listeners.push(listener);
  7825. return;
  7826. }
  7827. Object.defineProperty(array, '_chartjs', {
  7828. configurable: true,
  7829. enumerable: false,
  7830. value: {
  7831. listeners: [listener]
  7832. }
  7833. });
  7834. arrayEvents.forEach(function(key) {
  7835. var method = 'onData' + key.charAt(0).toUpperCase() + key.slice(1);
  7836. var base = array[key];
  7837. Object.defineProperty(array, key, {
  7838. configurable: true,
  7839. enumerable: false,
  7840. value: function() {
  7841. var args = Array.prototype.slice.call(arguments);
  7842. var res = base.apply(this, args);
  7843. helpers.each(array._chartjs.listeners, function(object) {
  7844. if (typeof object[method] === 'function') {
  7845. object[method].apply(object, args);
  7846. }
  7847. });
  7848. return res;
  7849. }
  7850. });
  7851. });
  7852. }
  7853. /**
  7854. * Removes the given array event listener and cleanup extra attached properties (such as
  7855. * the _chartjs stub and overridden methods) if array doesn't have any more listeners.
  7856. */
  7857. function unlistenArrayEvents(array, listener) {
  7858. var stub = array._chartjs;
  7859. if (!stub) {
  7860. return;
  7861. }
  7862. var listeners = stub.listeners;
  7863. var index = listeners.indexOf(listener);
  7864. if (index !== -1) {
  7865. listeners.splice(index, 1);
  7866. }
  7867. if (listeners.length > 0) {
  7868. return;
  7869. }
  7870. arrayEvents.forEach(function(key) {
  7871. delete array[key];
  7872. });
  7873. delete array._chartjs;
  7874. }
  7875. // Base class for all dataset controllers (line, bar, etc)
  7876. Chart.DatasetController = function(chart, datasetIndex) {
  7877. this.initialize(chart, datasetIndex);
  7878. };
  7879. helpers.extend(Chart.DatasetController.prototype, {
  7880. /**
  7881. * Element type used to generate a meta dataset (e.g. Chart.element.Line).
  7882. * @type {Chart.core.element}
  7883. */
  7884. datasetElementType: null,
  7885. /**
  7886. * Element type used to generate a meta data (e.g. Chart.element.Point).
  7887. * @type {Chart.core.element}
  7888. */
  7889. dataElementType: null,
  7890. initialize: function(chart, datasetIndex) {
  7891. var me = this;
  7892. me.chart = chart;
  7893. me.index = datasetIndex;
  7894. me.linkScales();
  7895. me.addElements();
  7896. },
  7897. updateIndex: function(datasetIndex) {
  7898. this.index = datasetIndex;
  7899. },
  7900. linkScales: function() {
  7901. var me = this;
  7902. var meta = me.getMeta();
  7903. var dataset = me.getDataset();
  7904. if (meta.xAxisID === null || !(meta.xAxisID in me.chart.scales)) {
  7905. meta.xAxisID = dataset.xAxisID || me.chart.options.scales.xAxes[0].id;
  7906. }
  7907. if (meta.yAxisID === null || !(meta.yAxisID in me.chart.scales)) {
  7908. meta.yAxisID = dataset.yAxisID || me.chart.options.scales.yAxes[0].id;
  7909. }
  7910. },
  7911. getDataset: function() {
  7912. return this.chart.data.datasets[this.index];
  7913. },
  7914. getMeta: function() {
  7915. return this.chart.getDatasetMeta(this.index);
  7916. },
  7917. getScaleForId: function(scaleID) {
  7918. return this.chart.scales[scaleID];
  7919. },
  7920. reset: function() {
  7921. this.update(true);
  7922. },
  7923. /**
  7924. * @private
  7925. */
  7926. destroy: function() {
  7927. if (this._data) {
  7928. unlistenArrayEvents(this._data, this);
  7929. }
  7930. },
  7931. createMetaDataset: function() {
  7932. var me = this;
  7933. var type = me.datasetElementType;
  7934. return type && new type({
  7935. _chart: me.chart,
  7936. _datasetIndex: me.index
  7937. });
  7938. },
  7939. createMetaData: function(index) {
  7940. var me = this;
  7941. var type = me.dataElementType;
  7942. return type && new type({
  7943. _chart: me.chart,
  7944. _datasetIndex: me.index,
  7945. _index: index
  7946. });
  7947. },
  7948. addElements: function() {
  7949. var me = this;
  7950. var meta = me.getMeta();
  7951. var data = me.getDataset().data || [];
  7952. var metaData = meta.data;
  7953. var i, ilen;
  7954. for (i = 0, ilen = data.length; i < ilen; ++i) {
  7955. metaData[i] = metaData[i] || me.createMetaData(i);
  7956. }
  7957. meta.dataset = meta.dataset || me.createMetaDataset();
  7958. },
  7959. addElementAndReset: function(index) {
  7960. var element = this.createMetaData(index);
  7961. this.getMeta().data.splice(index, 0, element);
  7962. this.updateElement(element, index, true);
  7963. },
  7964. buildOrUpdateElements: function() {
  7965. var me = this;
  7966. var dataset = me.getDataset();
  7967. var data = dataset.data || (dataset.data = []);
  7968. // In order to correctly handle data addition/deletion animation (an thus simulate
  7969. // real-time charts), we need to monitor these data modifications and synchronize
  7970. // the internal meta data accordingly.
  7971. if (me._data !== data) {
  7972. if (me._data) {
  7973. // This case happens when the user replaced the data array instance.
  7974. unlistenArrayEvents(me._data, me);
  7975. }
  7976. listenArrayEvents(data, me);
  7977. me._data = data;
  7978. }
  7979. // Re-sync meta data in case the user replaced the data array or if we missed
  7980. // any updates and so make sure that we handle number of datapoints changing.
  7981. me.resyncElements();
  7982. },
  7983. update: helpers.noop,
  7984. transition: function(easingValue) {
  7985. var meta = this.getMeta();
  7986. var elements = meta.data || [];
  7987. var ilen = elements.length;
  7988. var i = 0;
  7989. for (; i < ilen; ++i) {
  7990. elements[i].transition(easingValue);
  7991. }
  7992. if (meta.dataset) {
  7993. meta.dataset.transition(easingValue);
  7994. }
  7995. },
  7996. draw: function() {
  7997. var meta = this.getMeta();
  7998. var elements = meta.data || [];
  7999. var ilen = elements.length;
  8000. var i = 0;
  8001. if (meta.dataset) {
  8002. meta.dataset.draw();
  8003. }
  8004. for (; i < ilen; ++i) {
  8005. elements[i].draw();
  8006. }
  8007. },
  8008. removeHoverStyle: function(element, elementOpts) {
  8009. var dataset = this.chart.data.datasets[element._datasetIndex];
  8010. var index = element._index;
  8011. var custom = element.custom || {};
  8012. var valueOrDefault = helpers.valueAtIndexOrDefault;
  8013. var model = element._model;
  8014. model.backgroundColor = custom.backgroundColor ? custom.backgroundColor : valueOrDefault(dataset.backgroundColor, index, elementOpts.backgroundColor);
  8015. model.borderColor = custom.borderColor ? custom.borderColor : valueOrDefault(dataset.borderColor, index, elementOpts.borderColor);
  8016. model.borderWidth = custom.borderWidth ? custom.borderWidth : valueOrDefault(dataset.borderWidth, index, elementOpts.borderWidth);
  8017. },
  8018. setHoverStyle: function(element) {
  8019. var dataset = this.chart.data.datasets[element._datasetIndex];
  8020. var index = element._index;
  8021. var custom = element.custom || {};
  8022. var valueOrDefault = helpers.valueAtIndexOrDefault;
  8023. var getHoverColor = helpers.getHoverColor;
  8024. var model = element._model;
  8025. model.backgroundColor = custom.hoverBackgroundColor ? custom.hoverBackgroundColor : valueOrDefault(dataset.hoverBackgroundColor, index, getHoverColor(model.backgroundColor));
  8026. model.borderColor = custom.hoverBorderColor ? custom.hoverBorderColor : valueOrDefault(dataset.hoverBorderColor, index, getHoverColor(model.borderColor));
  8027. model.borderWidth = custom.hoverBorderWidth ? custom.hoverBorderWidth : valueOrDefault(dataset.hoverBorderWidth, index, model.borderWidth);
  8028. },
  8029. /**
  8030. * @private
  8031. */
  8032. resyncElements: function() {
  8033. var me = this;
  8034. var meta = me.getMeta();
  8035. var data = me.getDataset().data;
  8036. var numMeta = meta.data.length;
  8037. var numData = data.length;
  8038. if (numData < numMeta) {
  8039. meta.data.splice(numData, numMeta - numData);
  8040. } else if (numData > numMeta) {
  8041. me.insertElements(numMeta, numData - numMeta);
  8042. }
  8043. },
  8044. /**
  8045. * @private
  8046. */
  8047. insertElements: function(start, count) {
  8048. for (var i = 0; i < count; ++i) {
  8049. this.addElementAndReset(start + i);
  8050. }
  8051. },
  8052. /**
  8053. * @private
  8054. */
  8055. onDataPush: function() {
  8056. this.insertElements(this.getDataset().data.length - 1, arguments.length);
  8057. },
  8058. /**
  8059. * @private
  8060. */
  8061. onDataPop: function() {
  8062. this.getMeta().data.pop();
  8063. },
  8064. /**
  8065. * @private
  8066. */
  8067. onDataShift: function() {
  8068. this.getMeta().data.shift();
  8069. },
  8070. /**
  8071. * @private
  8072. */
  8073. onDataSplice: function(start, count) {
  8074. this.getMeta().data.splice(start, count);
  8075. this.insertElements(start, arguments.length - 2);
  8076. },
  8077. /**
  8078. * @private
  8079. */
  8080. onDataUnshift: function() {
  8081. this.insertElements(0, arguments.length);
  8082. }
  8083. });
  8084. Chart.DatasetController.extend = helpers.inherits;
  8085. };
  8086. },{"45":45}],25:[function(require,module,exports){
  8087. 'use strict';
  8088. var helpers = require(45);
  8089. module.exports = {
  8090. /**
  8091. * @private
  8092. */
  8093. _set: function(scope, values) {
  8094. return helpers.merge(this[scope] || (this[scope] = {}), values);
  8095. }
  8096. };
  8097. },{"45":45}],26:[function(require,module,exports){
  8098. 'use strict';
  8099. var color = require(2);
  8100. var helpers = require(45);
  8101. function interpolate(start, view, model, ease) {
  8102. var keys = Object.keys(model);
  8103. var i, ilen, key, actual, origin, target, type, c0, c1;
  8104. for (i = 0, ilen = keys.length; i < ilen; ++i) {
  8105. key = keys[i];
  8106. target = model[key];
  8107. // if a value is added to the model after pivot() has been called, the view
  8108. // doesn't contain it, so let's initialize the view to the target value.
  8109. if (!view.hasOwnProperty(key)) {
  8110. view[key] = target;
  8111. }
  8112. actual = view[key];
  8113. if (actual === target || key[0] === '_') {
  8114. continue;
  8115. }
  8116. if (!start.hasOwnProperty(key)) {
  8117. start[key] = actual;
  8118. }
  8119. origin = start[key];
  8120. type = typeof target;
  8121. if (type === typeof origin) {
  8122. if (type === 'string') {
  8123. c0 = color(origin);
  8124. if (c0.valid) {
  8125. c1 = color(target);
  8126. if (c1.valid) {
  8127. view[key] = c1.mix(c0, ease).rgbString();
  8128. continue;
  8129. }
  8130. }
  8131. } else if (type === 'number' && isFinite(origin) && isFinite(target)) {
  8132. view[key] = origin + (target - origin) * ease;
  8133. continue;
  8134. }
  8135. }
  8136. view[key] = target;
  8137. }
  8138. }
  8139. var Element = function(configuration) {
  8140. helpers.extend(this, configuration);
  8141. this.initialize.apply(this, arguments);
  8142. };
  8143. helpers.extend(Element.prototype, {
  8144. initialize: function() {
  8145. this.hidden = false;
  8146. },
  8147. pivot: function() {
  8148. var me = this;
  8149. if (!me._view) {
  8150. me._view = helpers.clone(me._model);
  8151. }
  8152. me._start = {};
  8153. return me;
  8154. },
  8155. transition: function(ease) {
  8156. var me = this;
  8157. var model = me._model;
  8158. var start = me._start;
  8159. var view = me._view;
  8160. // No animation -> No Transition
  8161. if (!model || ease === 1) {
  8162. me._view = model;
  8163. me._start = null;
  8164. return me;
  8165. }
  8166. if (!view) {
  8167. view = me._view = {};
  8168. }
  8169. if (!start) {
  8170. start = me._start = {};
  8171. }
  8172. interpolate(start, view, model, ease);
  8173. return me;
  8174. },
  8175. tooltipPosition: function() {
  8176. return {
  8177. x: this._model.x,
  8178. y: this._model.y
  8179. };
  8180. },
  8181. hasValue: function() {
  8182. return helpers.isNumber(this._model.x) && helpers.isNumber(this._model.y);
  8183. }
  8184. });
  8185. Element.extend = helpers.inherits;
  8186. module.exports = Element;
  8187. },{"2":2,"45":45}],27:[function(require,module,exports){
  8188. /* global window: false */
  8189. /* global document: false */
  8190. 'use strict';
  8191. var color = require(2);
  8192. var defaults = require(25);
  8193. var helpers = require(45);
  8194. module.exports = function(Chart) {
  8195. // -- Basic js utility methods
  8196. helpers.configMerge = function(/* objects ... */) {
  8197. return helpers.merge(helpers.clone(arguments[0]), [].slice.call(arguments, 1), {
  8198. merger: function(key, target, source, options) {
  8199. var tval = target[key] || {};
  8200. var sval = source[key];
  8201. if (key === 'scales') {
  8202. // scale config merging is complex. Add our own function here for that
  8203. target[key] = helpers.scaleMerge(tval, sval);
  8204. } else if (key === 'scale') {
  8205. // used in polar area & radar charts since there is only one scale
  8206. target[key] = helpers.merge(tval, [Chart.scaleService.getScaleDefaults(sval.type), sval]);
  8207. } else {
  8208. helpers._merger(key, target, source, options);
  8209. }
  8210. }
  8211. });
  8212. };
  8213. helpers.scaleMerge = function(/* objects ... */) {
  8214. return helpers.merge(helpers.clone(arguments[0]), [].slice.call(arguments, 1), {
  8215. merger: function(key, target, source, options) {
  8216. if (key === 'xAxes' || key === 'yAxes') {
  8217. var slen = source[key].length;
  8218. var i, type, scale;
  8219. if (!target[key]) {
  8220. target[key] = [];
  8221. }
  8222. for (i = 0; i < slen; ++i) {
  8223. scale = source[key][i];
  8224. type = helpers.valueOrDefault(scale.type, key === 'xAxes' ? 'category' : 'linear');
  8225. if (i >= target[key].length) {
  8226. target[key].push({});
  8227. }
  8228. if (!target[key][i].type || (scale.type && scale.type !== target[key][i].type)) {
  8229. // new/untyped scale or type changed: let's apply the new defaults
  8230. // then merge source scale to correctly overwrite the defaults.
  8231. helpers.merge(target[key][i], [Chart.scaleService.getScaleDefaults(type), scale]);
  8232. } else {
  8233. // scales type are the same
  8234. helpers.merge(target[key][i], scale);
  8235. }
  8236. }
  8237. } else {
  8238. helpers._merger(key, target, source, options);
  8239. }
  8240. }
  8241. });
  8242. };
  8243. helpers.where = function(collection, filterCallback) {
  8244. if (helpers.isArray(collection) && Array.prototype.filter) {
  8245. return collection.filter(filterCallback);
  8246. }
  8247. var filtered = [];
  8248. helpers.each(collection, function(item) {
  8249. if (filterCallback(item)) {
  8250. filtered.push(item);
  8251. }
  8252. });
  8253. return filtered;
  8254. };
  8255. helpers.findIndex = Array.prototype.findIndex ?
  8256. function(array, callback, scope) {
  8257. return array.findIndex(callback, scope);
  8258. } :
  8259. function(array, callback, scope) {
  8260. scope = scope === undefined ? array : scope;
  8261. for (var i = 0, ilen = array.length; i < ilen; ++i) {
  8262. if (callback.call(scope, array[i], i, array)) {
  8263. return i;
  8264. }
  8265. }
  8266. return -1;
  8267. };
  8268. helpers.findNextWhere = function(arrayToSearch, filterCallback, startIndex) {
  8269. // Default to start of the array
  8270. if (helpers.isNullOrUndef(startIndex)) {
  8271. startIndex = -1;
  8272. }
  8273. for (var i = startIndex + 1; i < arrayToSearch.length; i++) {
  8274. var currentItem = arrayToSearch[i];
  8275. if (filterCallback(currentItem)) {
  8276. return currentItem;
  8277. }
  8278. }
  8279. };
  8280. helpers.findPreviousWhere = function(arrayToSearch, filterCallback, startIndex) {
  8281. // Default to end of the array
  8282. if (helpers.isNullOrUndef(startIndex)) {
  8283. startIndex = arrayToSearch.length;
  8284. }
  8285. for (var i = startIndex - 1; i >= 0; i--) {
  8286. var currentItem = arrayToSearch[i];
  8287. if (filterCallback(currentItem)) {
  8288. return currentItem;
  8289. }
  8290. }
  8291. };
  8292. // -- Math methods
  8293. helpers.isNumber = function(n) {
  8294. return !isNaN(parseFloat(n)) && isFinite(n);
  8295. };
  8296. helpers.almostEquals = function(x, y, epsilon) {
  8297. return Math.abs(x - y) < epsilon;
  8298. };
  8299. helpers.almostWhole = function(x, epsilon) {
  8300. var rounded = Math.round(x);
  8301. return (((rounded - epsilon) < x) && ((rounded + epsilon) > x));
  8302. };
  8303. helpers.max = function(array) {
  8304. return array.reduce(function(max, value) {
  8305. if (!isNaN(value)) {
  8306. return Math.max(max, value);
  8307. }
  8308. return max;
  8309. }, Number.NEGATIVE_INFINITY);
  8310. };
  8311. helpers.min = function(array) {
  8312. return array.reduce(function(min, value) {
  8313. if (!isNaN(value)) {
  8314. return Math.min(min, value);
  8315. }
  8316. return min;
  8317. }, Number.POSITIVE_INFINITY);
  8318. };
  8319. helpers.sign = Math.sign ?
  8320. function(x) {
  8321. return Math.sign(x);
  8322. } :
  8323. function(x) {
  8324. x = +x; // convert to a number
  8325. if (x === 0 || isNaN(x)) {
  8326. return x;
  8327. }
  8328. return x > 0 ? 1 : -1;
  8329. };
  8330. helpers.log10 = Math.log10 ?
  8331. function(x) {
  8332. return Math.log10(x);
  8333. } :
  8334. function(x) {
  8335. var exponent = Math.log(x) * Math.LOG10E; // Math.LOG10E = 1 / Math.LN10.
  8336. // Check for whole powers of 10,
  8337. // which due to floating point rounding error should be corrected.
  8338. var powerOf10 = Math.round(exponent);
  8339. var isPowerOf10 = x === Math.pow(10, powerOf10);
  8340. return isPowerOf10 ? powerOf10 : exponent;
  8341. };
  8342. helpers.toRadians = function(degrees) {
  8343. return degrees * (Math.PI / 180);
  8344. };
  8345. helpers.toDegrees = function(radians) {
  8346. return radians * (180 / Math.PI);
  8347. };
  8348. // Gets the angle from vertical upright to the point about a centre.
  8349. helpers.getAngleFromPoint = function(centrePoint, anglePoint) {
  8350. var distanceFromXCenter = anglePoint.x - centrePoint.x;
  8351. var distanceFromYCenter = anglePoint.y - centrePoint.y;
  8352. var radialDistanceFromCenter = Math.sqrt(distanceFromXCenter * distanceFromXCenter + distanceFromYCenter * distanceFromYCenter);
  8353. var angle = Math.atan2(distanceFromYCenter, distanceFromXCenter);
  8354. if (angle < (-0.5 * Math.PI)) {
  8355. angle += 2.0 * Math.PI; // make sure the returned angle is in the range of (-PI/2, 3PI/2]
  8356. }
  8357. return {
  8358. angle: angle,
  8359. distance: radialDistanceFromCenter
  8360. };
  8361. };
  8362. helpers.distanceBetweenPoints = function(pt1, pt2) {
  8363. return Math.sqrt(Math.pow(pt2.x - pt1.x, 2) + Math.pow(pt2.y - pt1.y, 2));
  8364. };
  8365. helpers.aliasPixel = function(pixelWidth) {
  8366. return (pixelWidth % 2 === 0) ? 0 : 0.5;
  8367. };
  8368. helpers.splineCurve = function(firstPoint, middlePoint, afterPoint, t) {
  8369. // Props to Rob Spencer at scaled innovation for his post on splining between points
  8370. // http://scaledinnovation.com/analytics/splines/aboutSplines.html
  8371. // This function must also respect "skipped" points
  8372. var previous = firstPoint.skip ? middlePoint : firstPoint;
  8373. var current = middlePoint;
  8374. var next = afterPoint.skip ? middlePoint : afterPoint;
  8375. var d01 = Math.sqrt(Math.pow(current.x - previous.x, 2) + Math.pow(current.y - previous.y, 2));
  8376. var d12 = Math.sqrt(Math.pow(next.x - current.x, 2) + Math.pow(next.y - current.y, 2));
  8377. var s01 = d01 / (d01 + d12);
  8378. var s12 = d12 / (d01 + d12);
  8379. // If all points are the same, s01 & s02 will be inf
  8380. s01 = isNaN(s01) ? 0 : s01;
  8381. s12 = isNaN(s12) ? 0 : s12;
  8382. var fa = t * s01; // scaling factor for triangle Ta
  8383. var fb = t * s12;
  8384. return {
  8385. previous: {
  8386. x: current.x - fa * (next.x - previous.x),
  8387. y: current.y - fa * (next.y - previous.y)
  8388. },
  8389. next: {
  8390. x: current.x + fb * (next.x - previous.x),
  8391. y: current.y + fb * (next.y - previous.y)
  8392. }
  8393. };
  8394. };
  8395. helpers.EPSILON = Number.EPSILON || 1e-14;
  8396. helpers.splineCurveMonotone = function(points) {
  8397. // This function calculates Bézier control points in a similar way than |splineCurve|,
  8398. // but preserves monotonicity of the provided data and ensures no local extremums are added
  8399. // between the dataset discrete points due to the interpolation.
  8400. // See : https://en.wikipedia.org/wiki/Monotone_cubic_interpolation
  8401. var pointsWithTangents = (points || []).map(function(point) {
  8402. return {
  8403. model: point._model,
  8404. deltaK: 0,
  8405. mK: 0
  8406. };
  8407. });
  8408. // Calculate slopes (deltaK) and initialize tangents (mK)
  8409. var pointsLen = pointsWithTangents.length;
  8410. var i, pointBefore, pointCurrent, pointAfter;
  8411. for (i = 0; i < pointsLen; ++i) {
  8412. pointCurrent = pointsWithTangents[i];
  8413. if (pointCurrent.model.skip) {
  8414. continue;
  8415. }
  8416. pointBefore = i > 0 ? pointsWithTangents[i - 1] : null;
  8417. pointAfter = i < pointsLen - 1 ? pointsWithTangents[i + 1] : null;
  8418. if (pointAfter && !pointAfter.model.skip) {
  8419. var slopeDeltaX = (pointAfter.model.x - pointCurrent.model.x);
  8420. // In the case of two points that appear at the same x pixel, slopeDeltaX is 0
  8421. pointCurrent.deltaK = slopeDeltaX !== 0 ? (pointAfter.model.y - pointCurrent.model.y) / slopeDeltaX : 0;
  8422. }
  8423. if (!pointBefore || pointBefore.model.skip) {
  8424. pointCurrent.mK = pointCurrent.deltaK;
  8425. } else if (!pointAfter || pointAfter.model.skip) {
  8426. pointCurrent.mK = pointBefore.deltaK;
  8427. } else if (this.sign(pointBefore.deltaK) !== this.sign(pointCurrent.deltaK)) {
  8428. pointCurrent.mK = 0;
  8429. } else {
  8430. pointCurrent.mK = (pointBefore.deltaK + pointCurrent.deltaK) / 2;
  8431. }
  8432. }
  8433. // Adjust tangents to ensure monotonic properties
  8434. var alphaK, betaK, tauK, squaredMagnitude;
  8435. for (i = 0; i < pointsLen - 1; ++i) {
  8436. pointCurrent = pointsWithTangents[i];
  8437. pointAfter = pointsWithTangents[i + 1];
  8438. if (pointCurrent.model.skip || pointAfter.model.skip) {
  8439. continue;
  8440. }
  8441. if (helpers.almostEquals(pointCurrent.deltaK, 0, this.EPSILON)) {
  8442. pointCurrent.mK = pointAfter.mK = 0;
  8443. continue;
  8444. }
  8445. alphaK = pointCurrent.mK / pointCurrent.deltaK;
  8446. betaK = pointAfter.mK / pointCurrent.deltaK;
  8447. squaredMagnitude = Math.pow(alphaK, 2) + Math.pow(betaK, 2);
  8448. if (squaredMagnitude <= 9) {
  8449. continue;
  8450. }
  8451. tauK = 3 / Math.sqrt(squaredMagnitude);
  8452. pointCurrent.mK = alphaK * tauK * pointCurrent.deltaK;
  8453. pointAfter.mK = betaK * tauK * pointCurrent.deltaK;
  8454. }
  8455. // Compute control points
  8456. var deltaX;
  8457. for (i = 0; i < pointsLen; ++i) {
  8458. pointCurrent = pointsWithTangents[i];
  8459. if (pointCurrent.model.skip) {
  8460. continue;
  8461. }
  8462. pointBefore = i > 0 ? pointsWithTangents[i - 1] : null;
  8463. pointAfter = i < pointsLen - 1 ? pointsWithTangents[i + 1] : null;
  8464. if (pointBefore && !pointBefore.model.skip) {
  8465. deltaX = (pointCurrent.model.x - pointBefore.model.x) / 3;
  8466. pointCurrent.model.controlPointPreviousX = pointCurrent.model.x - deltaX;
  8467. pointCurrent.model.controlPointPreviousY = pointCurrent.model.y - deltaX * pointCurrent.mK;
  8468. }
  8469. if (pointAfter && !pointAfter.model.skip) {
  8470. deltaX = (pointAfter.model.x - pointCurrent.model.x) / 3;
  8471. pointCurrent.model.controlPointNextX = pointCurrent.model.x + deltaX;
  8472. pointCurrent.model.controlPointNextY = pointCurrent.model.y + deltaX * pointCurrent.mK;
  8473. }
  8474. }
  8475. };
  8476. helpers.nextItem = function(collection, index, loop) {
  8477. if (loop) {
  8478. return index >= collection.length - 1 ? collection[0] : collection[index + 1];
  8479. }
  8480. return index >= collection.length - 1 ? collection[collection.length - 1] : collection[index + 1];
  8481. };
  8482. helpers.previousItem = function(collection, index, loop) {
  8483. if (loop) {
  8484. return index <= 0 ? collection[collection.length - 1] : collection[index - 1];
  8485. }
  8486. return index <= 0 ? collection[0] : collection[index - 1];
  8487. };
  8488. // Implementation of the nice number algorithm used in determining where axis labels will go
  8489. helpers.niceNum = function(range, round) {
  8490. var exponent = Math.floor(helpers.log10(range));
  8491. var fraction = range / Math.pow(10, exponent);
  8492. var niceFraction;
  8493. if (round) {
  8494. if (fraction < 1.5) {
  8495. niceFraction = 1;
  8496. } else if (fraction < 3) {
  8497. niceFraction = 2;
  8498. } else if (fraction < 7) {
  8499. niceFraction = 5;
  8500. } else {
  8501. niceFraction = 10;
  8502. }
  8503. } else if (fraction <= 1.0) {
  8504. niceFraction = 1;
  8505. } else if (fraction <= 2) {
  8506. niceFraction = 2;
  8507. } else if (fraction <= 5) {
  8508. niceFraction = 5;
  8509. } else {
  8510. niceFraction = 10;
  8511. }
  8512. return niceFraction * Math.pow(10, exponent);
  8513. };
  8514. // Request animation polyfill - http://www.paulirish.com/2011/requestanimationframe-for-smart-animating/
  8515. helpers.requestAnimFrame = (function() {
  8516. if (typeof window === 'undefined') {
  8517. return function(callback) {
  8518. callback();
  8519. };
  8520. }
  8521. return window.requestAnimationFrame ||
  8522. window.webkitRequestAnimationFrame ||
  8523. window.mozRequestAnimationFrame ||
  8524. window.oRequestAnimationFrame ||
  8525. window.msRequestAnimationFrame ||
  8526. function(callback) {
  8527. return window.setTimeout(callback, 1000 / 60);
  8528. };
  8529. }());
  8530. // -- DOM methods
  8531. helpers.getRelativePosition = function(evt, chart) {
  8532. var mouseX, mouseY;
  8533. var e = evt.originalEvent || evt;
  8534. var canvas = evt.currentTarget || evt.srcElement;
  8535. var boundingRect = canvas.getBoundingClientRect();
  8536. var touches = e.touches;
  8537. if (touches && touches.length > 0) {
  8538. mouseX = touches[0].clientX;
  8539. mouseY = touches[0].clientY;
  8540. } else {
  8541. mouseX = e.clientX;
  8542. mouseY = e.clientY;
  8543. }
  8544. // Scale mouse coordinates into canvas coordinates
  8545. // by following the pattern laid out by 'jerryj' in the comments of
  8546. // http://www.html5canvastutorials.com/advanced/html5-canvas-mouse-coordinates/
  8547. var paddingLeft = parseFloat(helpers.getStyle(canvas, 'padding-left'));
  8548. var paddingTop = parseFloat(helpers.getStyle(canvas, 'padding-top'));
  8549. var paddingRight = parseFloat(helpers.getStyle(canvas, 'padding-right'));
  8550. var paddingBottom = parseFloat(helpers.getStyle(canvas, 'padding-bottom'));
  8551. var width = boundingRect.right - boundingRect.left - paddingLeft - paddingRight;
  8552. var height = boundingRect.bottom - boundingRect.top - paddingTop - paddingBottom;
  8553. // We divide by the current device pixel ratio, because the canvas is scaled up by that amount in each direction. However
  8554. // the backend model is in unscaled coordinates. Since we are going to deal with our model coordinates, we go back here
  8555. mouseX = Math.round((mouseX - boundingRect.left - paddingLeft) / (width) * canvas.width / chart.currentDevicePixelRatio);
  8556. mouseY = Math.round((mouseY - boundingRect.top - paddingTop) / (height) * canvas.height / chart.currentDevicePixelRatio);
  8557. return {
  8558. x: mouseX,
  8559. y: mouseY
  8560. };
  8561. };
  8562. // Private helper function to convert max-width/max-height values that may be percentages into a number
  8563. function parseMaxStyle(styleValue, node, parentProperty) {
  8564. var valueInPixels;
  8565. if (typeof styleValue === 'string') {
  8566. valueInPixels = parseInt(styleValue, 10);
  8567. if (styleValue.indexOf('%') !== -1) {
  8568. // percentage * size in dimension
  8569. valueInPixels = valueInPixels / 100 * node.parentNode[parentProperty];
  8570. }
  8571. } else {
  8572. valueInPixels = styleValue;
  8573. }
  8574. return valueInPixels;
  8575. }
  8576. /**
  8577. * Returns if the given value contains an effective constraint.
  8578. * @private
  8579. */
  8580. function isConstrainedValue(value) {
  8581. return value !== undefined && value !== null && value !== 'none';
  8582. }
  8583. // Private helper to get a constraint dimension
  8584. // @param domNode : the node to check the constraint on
  8585. // @param maxStyle : the style that defines the maximum for the direction we are using (maxWidth / maxHeight)
  8586. // @param percentageProperty : property of parent to use when calculating width as a percentage
  8587. // @see http://www.nathanaeljones.com/blog/2013/reading-max-width-cross-browser
  8588. function getConstraintDimension(domNode, maxStyle, percentageProperty) {
  8589. var view = document.defaultView;
  8590. var parentNode = domNode.parentNode;
  8591. var constrainedNode = view.getComputedStyle(domNode)[maxStyle];
  8592. var constrainedContainer = view.getComputedStyle(parentNode)[maxStyle];
  8593. var hasCNode = isConstrainedValue(constrainedNode);
  8594. var hasCContainer = isConstrainedValue(constrainedContainer);
  8595. var infinity = Number.POSITIVE_INFINITY;
  8596. if (hasCNode || hasCContainer) {
  8597. return Math.min(
  8598. hasCNode ? parseMaxStyle(constrainedNode, domNode, percentageProperty) : infinity,
  8599. hasCContainer ? parseMaxStyle(constrainedContainer, parentNode, percentageProperty) : infinity);
  8600. }
  8601. return 'none';
  8602. }
  8603. // returns Number or undefined if no constraint
  8604. helpers.getConstraintWidth = function(domNode) {
  8605. return getConstraintDimension(domNode, 'max-width', 'clientWidth');
  8606. };
  8607. // returns Number or undefined if no constraint
  8608. helpers.getConstraintHeight = function(domNode) {
  8609. return getConstraintDimension(domNode, 'max-height', 'clientHeight');
  8610. };
  8611. helpers.getMaximumWidth = function(domNode) {
  8612. var container = domNode.parentNode;
  8613. if (!container) {
  8614. return domNode.clientWidth;
  8615. }
  8616. var paddingLeft = parseInt(helpers.getStyle(container, 'padding-left'), 10);
  8617. var paddingRight = parseInt(helpers.getStyle(container, 'padding-right'), 10);
  8618. var w = container.clientWidth - paddingLeft - paddingRight;
  8619. var cw = helpers.getConstraintWidth(domNode);
  8620. return isNaN(cw) ? w : Math.min(w, cw);
  8621. };
  8622. helpers.getMaximumHeight = function(domNode) {
  8623. var container = domNode.parentNode;
  8624. if (!container) {
  8625. return domNode.clientHeight;
  8626. }
  8627. var paddingTop = parseInt(helpers.getStyle(container, 'padding-top'), 10);
  8628. var paddingBottom = parseInt(helpers.getStyle(container, 'padding-bottom'), 10);
  8629. var h = container.clientHeight - paddingTop - paddingBottom;
  8630. var ch = helpers.getConstraintHeight(domNode);
  8631. return isNaN(ch) ? h : Math.min(h, ch);
  8632. };
  8633. helpers.getStyle = function(el, property) {
  8634. return el.currentStyle ?
  8635. el.currentStyle[property] :
  8636. document.defaultView.getComputedStyle(el, null).getPropertyValue(property);
  8637. };
  8638. helpers.retinaScale = function(chart, forceRatio) {
  8639. var pixelRatio = chart.currentDevicePixelRatio = forceRatio || window.devicePixelRatio || 1;
  8640. if (pixelRatio === 1) {
  8641. return;
  8642. }
  8643. var canvas = chart.canvas;
  8644. var height = chart.height;
  8645. var width = chart.width;
  8646. canvas.height = height * pixelRatio;
  8647. canvas.width = width * pixelRatio;
  8648. chart.ctx.scale(pixelRatio, pixelRatio);
  8649. // If no style has been set on the canvas, the render size is used as display size,
  8650. // making the chart visually bigger, so let's enforce it to the "correct" values.
  8651. // See https://github.com/chartjs/Chart.js/issues/3575
  8652. if (!canvas.style.height && !canvas.style.width) {
  8653. canvas.style.height = height + 'px';
  8654. canvas.style.width = width + 'px';
  8655. }
  8656. };
  8657. // -- Canvas methods
  8658. helpers.fontString = function(pixelSize, fontStyle, fontFamily) {
  8659. return fontStyle + ' ' + pixelSize + 'px ' + fontFamily;
  8660. };
  8661. helpers.longestText = function(ctx, font, arrayOfThings, cache) {
  8662. cache = cache || {};
  8663. var data = cache.data = cache.data || {};
  8664. var gc = cache.garbageCollect = cache.garbageCollect || [];
  8665. if (cache.font !== font) {
  8666. data = cache.data = {};
  8667. gc = cache.garbageCollect = [];
  8668. cache.font = font;
  8669. }
  8670. ctx.font = font;
  8671. var longest = 0;
  8672. helpers.each(arrayOfThings, function(thing) {
  8673. // Undefined strings and arrays should not be measured
  8674. if (thing !== undefined && thing !== null && helpers.isArray(thing) !== true) {
  8675. longest = helpers.measureText(ctx, data, gc, longest, thing);
  8676. } else if (helpers.isArray(thing)) {
  8677. // if it is an array lets measure each element
  8678. // to do maybe simplify this function a bit so we can do this more recursively?
  8679. helpers.each(thing, function(nestedThing) {
  8680. // Undefined strings and arrays should not be measured
  8681. if (nestedThing !== undefined && nestedThing !== null && !helpers.isArray(nestedThing)) {
  8682. longest = helpers.measureText(ctx, data, gc, longest, nestedThing);
  8683. }
  8684. });
  8685. }
  8686. });
  8687. var gcLen = gc.length / 2;
  8688. if (gcLen > arrayOfThings.length) {
  8689. for (var i = 0; i < gcLen; i++) {
  8690. delete data[gc[i]];
  8691. }
  8692. gc.splice(0, gcLen);
  8693. }
  8694. return longest;
  8695. };
  8696. helpers.measureText = function(ctx, data, gc, longest, string) {
  8697. var textWidth = data[string];
  8698. if (!textWidth) {
  8699. textWidth = data[string] = ctx.measureText(string).width;
  8700. gc.push(string);
  8701. }
  8702. if (textWidth > longest) {
  8703. longest = textWidth;
  8704. }
  8705. return longest;
  8706. };
  8707. helpers.numberOfLabelLines = function(arrayOfThings) {
  8708. var numberOfLines = 1;
  8709. helpers.each(arrayOfThings, function(thing) {
  8710. if (helpers.isArray(thing)) {
  8711. if (thing.length > numberOfLines) {
  8712. numberOfLines = thing.length;
  8713. }
  8714. }
  8715. });
  8716. return numberOfLines;
  8717. };
  8718. helpers.color = !color ?
  8719. function(value) {
  8720. console.error('Color.js not found!');
  8721. return value;
  8722. } :
  8723. function(value) {
  8724. /* global CanvasGradient */
  8725. if (value instanceof CanvasGradient) {
  8726. value = defaults.global.defaultColor;
  8727. }
  8728. return color(value);
  8729. };
  8730. helpers.getHoverColor = function(colorValue) {
  8731. /* global CanvasPattern */
  8732. return (colorValue instanceof CanvasPattern) ?
  8733. colorValue :
  8734. helpers.color(colorValue).saturate(0.5).darken(0.1).rgbString();
  8735. };
  8736. };
  8737. },{"2":2,"25":25,"45":45}],28:[function(require,module,exports){
  8738. 'use strict';
  8739. var helpers = require(45);
  8740. /**
  8741. * Helper function to get relative position for an event
  8742. * @param {Event|IEvent} event - The event to get the position for
  8743. * @param {Chart} chart - The chart
  8744. * @returns {Point} the event position
  8745. */
  8746. function getRelativePosition(e, chart) {
  8747. if (e.native) {
  8748. return {
  8749. x: e.x,
  8750. y: e.y
  8751. };
  8752. }
  8753. return helpers.getRelativePosition(e, chart);
  8754. }
  8755. /**
  8756. * Helper function to traverse all of the visible elements in the chart
  8757. * @param chart {chart} the chart
  8758. * @param handler {Function} the callback to execute for each visible item
  8759. */
  8760. function parseVisibleItems(chart, handler) {
  8761. var datasets = chart.data.datasets;
  8762. var meta, i, j, ilen, jlen;
  8763. for (i = 0, ilen = datasets.length; i < ilen; ++i) {
  8764. if (!chart.isDatasetVisible(i)) {
  8765. continue;
  8766. }
  8767. meta = chart.getDatasetMeta(i);
  8768. for (j = 0, jlen = meta.data.length; j < jlen; ++j) {
  8769. var element = meta.data[j];
  8770. if (!element._view.skip) {
  8771. handler(element);
  8772. }
  8773. }
  8774. }
  8775. }
  8776. /**
  8777. * Helper function to get the items that intersect the event position
  8778. * @param items {ChartElement[]} elements to filter
  8779. * @param position {Point} the point to be nearest to
  8780. * @return {ChartElement[]} the nearest items
  8781. */
  8782. function getIntersectItems(chart, position) {
  8783. var elements = [];
  8784. parseVisibleItems(chart, function(element) {
  8785. if (element.inRange(position.x, position.y)) {
  8786. elements.push(element);
  8787. }
  8788. });
  8789. return elements;
  8790. }
  8791. /**
  8792. * Helper function to get the items nearest to the event position considering all visible items in teh chart
  8793. * @param chart {Chart} the chart to look at elements from
  8794. * @param position {Point} the point to be nearest to
  8795. * @param intersect {Boolean} if true, only consider items that intersect the position
  8796. * @param distanceMetric {Function} function to provide the distance between points
  8797. * @return {ChartElement[]} the nearest items
  8798. */
  8799. function getNearestItems(chart, position, intersect, distanceMetric) {
  8800. var minDistance = Number.POSITIVE_INFINITY;
  8801. var nearestItems = [];
  8802. parseVisibleItems(chart, function(element) {
  8803. if (intersect && !element.inRange(position.x, position.y)) {
  8804. return;
  8805. }
  8806. var center = element.getCenterPoint();
  8807. var distance = distanceMetric(position, center);
  8808. if (distance < minDistance) {
  8809. nearestItems = [element];
  8810. minDistance = distance;
  8811. } else if (distance === minDistance) {
  8812. // Can have multiple items at the same distance in which case we sort by size
  8813. nearestItems.push(element);
  8814. }
  8815. });
  8816. return nearestItems;
  8817. }
  8818. /**
  8819. * Get a distance metric function for two points based on the
  8820. * axis mode setting
  8821. * @param {String} axis the axis mode. x|y|xy
  8822. */
  8823. function getDistanceMetricForAxis(axis) {
  8824. var useX = axis.indexOf('x') !== -1;
  8825. var useY = axis.indexOf('y') !== -1;
  8826. return function(pt1, pt2) {
  8827. var deltaX = useX ? Math.abs(pt1.x - pt2.x) : 0;
  8828. var deltaY = useY ? Math.abs(pt1.y - pt2.y) : 0;
  8829. return Math.sqrt(Math.pow(deltaX, 2) + Math.pow(deltaY, 2));
  8830. };
  8831. }
  8832. function indexMode(chart, e, options) {
  8833. var position = getRelativePosition(e, chart);
  8834. // Default axis for index mode is 'x' to match old behaviour
  8835. options.axis = options.axis || 'x';
  8836. var distanceMetric = getDistanceMetricForAxis(options.axis);
  8837. var items = options.intersect ? getIntersectItems(chart, position) : getNearestItems(chart, position, false, distanceMetric);
  8838. var elements = [];
  8839. if (!items.length) {
  8840. return [];
  8841. }
  8842. chart.data.datasets.forEach(function(dataset, datasetIndex) {
  8843. if (chart.isDatasetVisible(datasetIndex)) {
  8844. var meta = chart.getDatasetMeta(datasetIndex);
  8845. var element = meta.data[items[0]._index];
  8846. // don't count items that are skipped (null data)
  8847. if (element && !element._view.skip) {
  8848. elements.push(element);
  8849. }
  8850. }
  8851. });
  8852. return elements;
  8853. }
  8854. /**
  8855. * @interface IInteractionOptions
  8856. */
  8857. /**
  8858. * If true, only consider items that intersect the point
  8859. * @name IInterfaceOptions#boolean
  8860. * @type Boolean
  8861. */
  8862. /**
  8863. * Contains interaction related functions
  8864. * @namespace Chart.Interaction
  8865. */
  8866. module.exports = {
  8867. // Helper function for different modes
  8868. modes: {
  8869. single: function(chart, e) {
  8870. var position = getRelativePosition(e, chart);
  8871. var elements = [];
  8872. parseVisibleItems(chart, function(element) {
  8873. if (element.inRange(position.x, position.y)) {
  8874. elements.push(element);
  8875. return elements;
  8876. }
  8877. });
  8878. return elements.slice(0, 1);
  8879. },
  8880. /**
  8881. * @function Chart.Interaction.modes.label
  8882. * @deprecated since version 2.4.0
  8883. * @todo remove at version 3
  8884. * @private
  8885. */
  8886. label: indexMode,
  8887. /**
  8888. * Returns items at the same index. If the options.intersect parameter is true, we only return items if we intersect something
  8889. * If the options.intersect mode is false, we find the nearest item and return the items at the same index as that item
  8890. * @function Chart.Interaction.modes.index
  8891. * @since v2.4.0
  8892. * @param chart {chart} the chart we are returning items from
  8893. * @param e {Event} the event we are find things at
  8894. * @param options {IInteractionOptions} options to use during interaction
  8895. * @return {Chart.Element[]} Array of elements that are under the point. If none are found, an empty array is returned
  8896. */
  8897. index: indexMode,
  8898. /**
  8899. * Returns items in the same dataset. If the options.intersect parameter is true, we only return items if we intersect something
  8900. * If the options.intersect is false, we find the nearest item and return the items in that dataset
  8901. * @function Chart.Interaction.modes.dataset
  8902. * @param chart {chart} the chart we are returning items from
  8903. * @param e {Event} the event we are find things at
  8904. * @param options {IInteractionOptions} options to use during interaction
  8905. * @return {Chart.Element[]} Array of elements that are under the point. If none are found, an empty array is returned
  8906. */
  8907. dataset: function(chart, e, options) {
  8908. var position = getRelativePosition(e, chart);
  8909. options.axis = options.axis || 'xy';
  8910. var distanceMetric = getDistanceMetricForAxis(options.axis);
  8911. var items = options.intersect ? getIntersectItems(chart, position) : getNearestItems(chart, position, false, distanceMetric);
  8912. if (items.length > 0) {
  8913. items = chart.getDatasetMeta(items[0]._datasetIndex).data;
  8914. }
  8915. return items;
  8916. },
  8917. /**
  8918. * @function Chart.Interaction.modes.x-axis
  8919. * @deprecated since version 2.4.0. Use index mode and intersect == true
  8920. * @todo remove at version 3
  8921. * @private
  8922. */
  8923. 'x-axis': function(chart, e) {
  8924. return indexMode(chart, e, {intersect: false});
  8925. },
  8926. /**
  8927. * Point mode returns all elements that hit test based on the event position
  8928. * of the event
  8929. * @function Chart.Interaction.modes.intersect
  8930. * @param chart {chart} the chart we are returning items from
  8931. * @param e {Event} the event we are find things at
  8932. * @return {Chart.Element[]} Array of elements that are under the point. If none are found, an empty array is returned
  8933. */
  8934. point: function(chart, e) {
  8935. var position = getRelativePosition(e, chart);
  8936. return getIntersectItems(chart, position);
  8937. },
  8938. /**
  8939. * nearest mode returns the element closest to the point
  8940. * @function Chart.Interaction.modes.intersect
  8941. * @param chart {chart} the chart we are returning items from
  8942. * @param e {Event} the event we are find things at
  8943. * @param options {IInteractionOptions} options to use
  8944. * @return {Chart.Element[]} Array of elements that are under the point. If none are found, an empty array is returned
  8945. */
  8946. nearest: function(chart, e, options) {
  8947. var position = getRelativePosition(e, chart);
  8948. options.axis = options.axis || 'xy';
  8949. var distanceMetric = getDistanceMetricForAxis(options.axis);
  8950. var nearestItems = getNearestItems(chart, position, options.intersect, distanceMetric);
  8951. // We have multiple items at the same distance from the event. Now sort by smallest
  8952. if (nearestItems.length > 1) {
  8953. nearestItems.sort(function(a, b) {
  8954. var sizeA = a.getArea();
  8955. var sizeB = b.getArea();
  8956. var ret = sizeA - sizeB;
  8957. if (ret === 0) {
  8958. // if equal sort by dataset index
  8959. ret = a._datasetIndex - b._datasetIndex;
  8960. }
  8961. return ret;
  8962. });
  8963. }
  8964. // Return only 1 item
  8965. return nearestItems.slice(0, 1);
  8966. },
  8967. /**
  8968. * x mode returns the elements that hit-test at the current x coordinate
  8969. * @function Chart.Interaction.modes.x
  8970. * @param chart {chart} the chart we are returning items from
  8971. * @param e {Event} the event we are find things at
  8972. * @param options {IInteractionOptions} options to use
  8973. * @return {Chart.Element[]} Array of elements that are under the point. If none are found, an empty array is returned
  8974. */
  8975. x: function(chart, e, options) {
  8976. var position = getRelativePosition(e, chart);
  8977. var items = [];
  8978. var intersectsItem = false;
  8979. parseVisibleItems(chart, function(element) {
  8980. if (element.inXRange(position.x)) {
  8981. items.push(element);
  8982. }
  8983. if (element.inRange(position.x, position.y)) {
  8984. intersectsItem = true;
  8985. }
  8986. });
  8987. // If we want to trigger on an intersect and we don't have any items
  8988. // that intersect the position, return nothing
  8989. if (options.intersect && !intersectsItem) {
  8990. items = [];
  8991. }
  8992. return items;
  8993. },
  8994. /**
  8995. * y mode returns the elements that hit-test at the current y coordinate
  8996. * @function Chart.Interaction.modes.y
  8997. * @param chart {chart} the chart we are returning items from
  8998. * @param e {Event} the event we are find things at
  8999. * @param options {IInteractionOptions} options to use
  9000. * @return {Chart.Element[]} Array of elements that are under the point. If none are found, an empty array is returned
  9001. */
  9002. y: function(chart, e, options) {
  9003. var position = getRelativePosition(e, chart);
  9004. var items = [];
  9005. var intersectsItem = false;
  9006. parseVisibleItems(chart, function(element) {
  9007. if (element.inYRange(position.y)) {
  9008. items.push(element);
  9009. }
  9010. if (element.inRange(position.x, position.y)) {
  9011. intersectsItem = true;
  9012. }
  9013. });
  9014. // If we want to trigger on an intersect and we don't have any items
  9015. // that intersect the position, return nothing
  9016. if (options.intersect && !intersectsItem) {
  9017. items = [];
  9018. }
  9019. return items;
  9020. }
  9021. }
  9022. };
  9023. },{"45":45}],29:[function(require,module,exports){
  9024. 'use strict';
  9025. var defaults = require(25);
  9026. defaults._set('global', {
  9027. responsive: true,
  9028. responsiveAnimationDuration: 0,
  9029. maintainAspectRatio: true,
  9030. events: ['mousemove', 'mouseout', 'click', 'touchstart', 'touchmove'],
  9031. hover: {
  9032. onHover: null,
  9033. mode: 'nearest',
  9034. intersect: true,
  9035. animationDuration: 400
  9036. },
  9037. onClick: null,
  9038. defaultColor: 'rgba(0,0,0,0.1)',
  9039. defaultFontColor: '#666',
  9040. defaultFontFamily: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",
  9041. defaultFontSize: 12,
  9042. defaultFontStyle: 'normal',
  9043. showLines: true,
  9044. // Element defaults defined in element extensions
  9045. elements: {},
  9046. // Layout options such as padding
  9047. layout: {
  9048. padding: {
  9049. top: 0,
  9050. right: 0,
  9051. bottom: 0,
  9052. left: 0
  9053. }
  9054. }
  9055. });
  9056. module.exports = function() {
  9057. // Occupy the global variable of Chart, and create a simple base class
  9058. var Chart = function(item, config) {
  9059. this.construct(item, config);
  9060. return this;
  9061. };
  9062. Chart.Chart = Chart;
  9063. return Chart;
  9064. };
  9065. },{"25":25}],30:[function(require,module,exports){
  9066. 'use strict';
  9067. var helpers = require(45);
  9068. function filterByPosition(array, position) {
  9069. return helpers.where(array, function(v) {
  9070. return v.position === position;
  9071. });
  9072. }
  9073. function sortByWeight(array, reverse) {
  9074. array.forEach(function(v, i) {
  9075. v._tmpIndex_ = i;
  9076. return v;
  9077. });
  9078. array.sort(function(a, b) {
  9079. var v0 = reverse ? b : a;
  9080. var v1 = reverse ? a : b;
  9081. return v0.weight === v1.weight ?
  9082. v0._tmpIndex_ - v1._tmpIndex_ :
  9083. v0.weight - v1.weight;
  9084. });
  9085. array.forEach(function(v) {
  9086. delete v._tmpIndex_;
  9087. });
  9088. }
  9089. /**
  9090. * @interface ILayoutItem
  9091. * @prop {String} position - The position of the item in the chart layout. Possible values are
  9092. * 'left', 'top', 'right', 'bottom', and 'chartArea'
  9093. * @prop {Number} weight - The weight used to sort the item. Higher weights are further away from the chart area
  9094. * @prop {Boolean} fullWidth - if true, and the item is horizontal, then push vertical boxes down
  9095. * @prop {Function} isHorizontal - returns true if the layout item is horizontal (ie. top or bottom)
  9096. * @prop {Function} update - Takes two parameters: width and height. Returns size of item
  9097. * @prop {Function} getPadding - Returns an object with padding on the edges
  9098. * @prop {Number} width - Width of item. Must be valid after update()
  9099. * @prop {Number} height - Height of item. Must be valid after update()
  9100. * @prop {Number} left - Left edge of the item. Set by layout system and cannot be used in update
  9101. * @prop {Number} top - Top edge of the item. Set by layout system and cannot be used in update
  9102. * @prop {Number} right - Right edge of the item. Set by layout system and cannot be used in update
  9103. * @prop {Number} bottom - Bottom edge of the item. Set by layout system and cannot be used in update
  9104. */
  9105. // The layout service is very self explanatory. It's responsible for the layout within a chart.
  9106. // Scales, Legends and Plugins all rely on the layout service and can easily register to be placed anywhere they need
  9107. // It is this service's responsibility of carrying out that layout.
  9108. module.exports = {
  9109. defaults: {},
  9110. /**
  9111. * Register a box to a chart.
  9112. * A box is simply a reference to an object that requires layout. eg. Scales, Legend, Title.
  9113. * @param {Chart} chart - the chart to use
  9114. * @param {ILayoutItem} item - the item to add to be layed out
  9115. */
  9116. addBox: function(chart, item) {
  9117. if (!chart.boxes) {
  9118. chart.boxes = [];
  9119. }
  9120. // initialize item with default values
  9121. item.fullWidth = item.fullWidth || false;
  9122. item.position = item.position || 'top';
  9123. item.weight = item.weight || 0;
  9124. chart.boxes.push(item);
  9125. },
  9126. /**
  9127. * Remove a layoutItem from a chart
  9128. * @param {Chart} chart - the chart to remove the box from
  9129. * @param {Object} layoutItem - the item to remove from the layout
  9130. */
  9131. removeBox: function(chart, layoutItem) {
  9132. var index = chart.boxes ? chart.boxes.indexOf(layoutItem) : -1;
  9133. if (index !== -1) {
  9134. chart.boxes.splice(index, 1);
  9135. }
  9136. },
  9137. /**
  9138. * Sets (or updates) options on the given `item`.
  9139. * @param {Chart} chart - the chart in which the item lives (or will be added to)
  9140. * @param {Object} item - the item to configure with the given options
  9141. * @param {Object} options - the new item options.
  9142. */
  9143. configure: function(chart, item, options) {
  9144. var props = ['fullWidth', 'position', 'weight'];
  9145. var ilen = props.length;
  9146. var i = 0;
  9147. var prop;
  9148. for (; i < ilen; ++i) {
  9149. prop = props[i];
  9150. if (options.hasOwnProperty(prop)) {
  9151. item[prop] = options[prop];
  9152. }
  9153. }
  9154. },
  9155. /**
  9156. * Fits boxes of the given chart into the given size by having each box measure itself
  9157. * then running a fitting algorithm
  9158. * @param {Chart} chart - the chart
  9159. * @param {Number} width - the width to fit into
  9160. * @param {Number} height - the height to fit into
  9161. */
  9162. update: function(chart, width, height) {
  9163. if (!chart) {
  9164. return;
  9165. }
  9166. var layoutOptions = chart.options.layout || {};
  9167. var padding = helpers.options.toPadding(layoutOptions.padding);
  9168. var leftPadding = padding.left;
  9169. var rightPadding = padding.right;
  9170. var topPadding = padding.top;
  9171. var bottomPadding = padding.bottom;
  9172. var leftBoxes = filterByPosition(chart.boxes, 'left');
  9173. var rightBoxes = filterByPosition(chart.boxes, 'right');
  9174. var topBoxes = filterByPosition(chart.boxes, 'top');
  9175. var bottomBoxes = filterByPosition(chart.boxes, 'bottom');
  9176. var chartAreaBoxes = filterByPosition(chart.boxes, 'chartArea');
  9177. // Sort boxes by weight. A higher weight is further away from the chart area
  9178. sortByWeight(leftBoxes, true);
  9179. sortByWeight(rightBoxes, false);
  9180. sortByWeight(topBoxes, true);
  9181. sortByWeight(bottomBoxes, false);
  9182. // Essentially we now have any number of boxes on each of the 4 sides.
  9183. // Our canvas looks like the following.
  9184. // The areas L1 and L2 are the left axes. R1 is the right axis, T1 is the top axis and
  9185. // B1 is the bottom axis
  9186. // There are also 4 quadrant-like locations (left to right instead of clockwise) reserved for chart overlays
  9187. // These locations are single-box locations only, when trying to register a chartArea location that is already taken,
  9188. // an error will be thrown.
  9189. //
  9190. // |----------------------------------------------------|
  9191. // | T1 (Full Width) |
  9192. // |----------------------------------------------------|
  9193. // | | | T2 | |
  9194. // | |----|-------------------------------------|----|
  9195. // | | | C1 | | C2 | |
  9196. // | | |----| |----| |
  9197. // | | | | |
  9198. // | L1 | L2 | ChartArea (C0) | R1 |
  9199. // | | | | |
  9200. // | | |----| |----| |
  9201. // | | | C3 | | C4 | |
  9202. // | |----|-------------------------------------|----|
  9203. // | | | B1 | |
  9204. // |----------------------------------------------------|
  9205. // | B2 (Full Width) |
  9206. // |----------------------------------------------------|
  9207. //
  9208. // What we do to find the best sizing, we do the following
  9209. // 1. Determine the minimum size of the chart area.
  9210. // 2. Split the remaining width equally between each vertical axis
  9211. // 3. Split the remaining height equally between each horizontal axis
  9212. // 4. Give each layout the maximum size it can be. The layout will return it's minimum size
  9213. // 5. Adjust the sizes of each axis based on it's minimum reported size.
  9214. // 6. Refit each axis
  9215. // 7. Position each axis in the final location
  9216. // 8. Tell the chart the final location of the chart area
  9217. // 9. Tell any axes that overlay the chart area the positions of the chart area
  9218. // Step 1
  9219. var chartWidth = width - leftPadding - rightPadding;
  9220. var chartHeight = height - topPadding - bottomPadding;
  9221. var chartAreaWidth = chartWidth / 2; // min 50%
  9222. var chartAreaHeight = chartHeight / 2; // min 50%
  9223. // Step 2
  9224. var verticalBoxWidth = (width - chartAreaWidth) / (leftBoxes.length + rightBoxes.length);
  9225. // Step 3
  9226. var horizontalBoxHeight = (height - chartAreaHeight) / (topBoxes.length + bottomBoxes.length);
  9227. // Step 4
  9228. var maxChartAreaWidth = chartWidth;
  9229. var maxChartAreaHeight = chartHeight;
  9230. var minBoxSizes = [];
  9231. function getMinimumBoxSize(box) {
  9232. var minSize;
  9233. var isHorizontal = box.isHorizontal();
  9234. if (isHorizontal) {
  9235. minSize = box.update(box.fullWidth ? chartWidth : maxChartAreaWidth, horizontalBoxHeight);
  9236. maxChartAreaHeight -= minSize.height;
  9237. } else {
  9238. minSize = box.update(verticalBoxWidth, maxChartAreaHeight);
  9239. maxChartAreaWidth -= minSize.width;
  9240. }
  9241. minBoxSizes.push({
  9242. horizontal: isHorizontal,
  9243. minSize: minSize,
  9244. box: box,
  9245. });
  9246. }
  9247. helpers.each(leftBoxes.concat(rightBoxes, topBoxes, bottomBoxes), getMinimumBoxSize);
  9248. // If a horizontal box has padding, we move the left boxes over to avoid ugly charts (see issue #2478)
  9249. var maxHorizontalLeftPadding = 0;
  9250. var maxHorizontalRightPadding = 0;
  9251. var maxVerticalTopPadding = 0;
  9252. var maxVerticalBottomPadding = 0;
  9253. helpers.each(topBoxes.concat(bottomBoxes), function(horizontalBox) {
  9254. if (horizontalBox.getPadding) {
  9255. var boxPadding = horizontalBox.getPadding();
  9256. maxHorizontalLeftPadding = Math.max(maxHorizontalLeftPadding, boxPadding.left);
  9257. maxHorizontalRightPadding = Math.max(maxHorizontalRightPadding, boxPadding.right);
  9258. }
  9259. });
  9260. helpers.each(leftBoxes.concat(rightBoxes), function(verticalBox) {
  9261. if (verticalBox.getPadding) {
  9262. var boxPadding = verticalBox.getPadding();
  9263. maxVerticalTopPadding = Math.max(maxVerticalTopPadding, boxPadding.top);
  9264. maxVerticalBottomPadding = Math.max(maxVerticalBottomPadding, boxPadding.bottom);
  9265. }
  9266. });
  9267. // At this point, maxChartAreaHeight and maxChartAreaWidth are the size the chart area could
  9268. // be if the axes are drawn at their minimum sizes.
  9269. // Steps 5 & 6
  9270. var totalLeftBoxesWidth = leftPadding;
  9271. var totalRightBoxesWidth = rightPadding;
  9272. var totalTopBoxesHeight = topPadding;
  9273. var totalBottomBoxesHeight = bottomPadding;
  9274. // Function to fit a box
  9275. function fitBox(box) {
  9276. var minBoxSize = helpers.findNextWhere(minBoxSizes, function(minBox) {
  9277. return minBox.box === box;
  9278. });
  9279. if (minBoxSize) {
  9280. if (box.isHorizontal()) {
  9281. var scaleMargin = {
  9282. left: Math.max(totalLeftBoxesWidth, maxHorizontalLeftPadding),
  9283. right: Math.max(totalRightBoxesWidth, maxHorizontalRightPadding),
  9284. top: 0,
  9285. bottom: 0
  9286. };
  9287. // Don't use min size here because of label rotation. When the labels are rotated, their rotation highly depends
  9288. // on the margin. Sometimes they need to increase in size slightly
  9289. box.update(box.fullWidth ? chartWidth : maxChartAreaWidth, chartHeight / 2, scaleMargin);
  9290. } else {
  9291. box.update(minBoxSize.minSize.width, maxChartAreaHeight);
  9292. }
  9293. }
  9294. }
  9295. // Update, and calculate the left and right margins for the horizontal boxes
  9296. helpers.each(leftBoxes.concat(rightBoxes), fitBox);
  9297. helpers.each(leftBoxes, function(box) {
  9298. totalLeftBoxesWidth += box.width;
  9299. });
  9300. helpers.each(rightBoxes, function(box) {
  9301. totalRightBoxesWidth += box.width;
  9302. });
  9303. // Set the Left and Right margins for the horizontal boxes
  9304. helpers.each(topBoxes.concat(bottomBoxes), fitBox);
  9305. // Figure out how much margin is on the top and bottom of the vertical boxes
  9306. helpers.each(topBoxes, function(box) {
  9307. totalTopBoxesHeight += box.height;
  9308. });
  9309. helpers.each(bottomBoxes, function(box) {
  9310. totalBottomBoxesHeight += box.height;
  9311. });
  9312. function finalFitVerticalBox(box) {
  9313. var minBoxSize = helpers.findNextWhere(minBoxSizes, function(minSize) {
  9314. return minSize.box === box;
  9315. });
  9316. var scaleMargin = {
  9317. left: 0,
  9318. right: 0,
  9319. top: totalTopBoxesHeight,
  9320. bottom: totalBottomBoxesHeight
  9321. };
  9322. if (minBoxSize) {
  9323. box.update(minBoxSize.minSize.width, maxChartAreaHeight, scaleMargin);
  9324. }
  9325. }
  9326. // Let the left layout know the final margin
  9327. helpers.each(leftBoxes.concat(rightBoxes), finalFitVerticalBox);
  9328. // Recalculate because the size of each layout might have changed slightly due to the margins (label rotation for instance)
  9329. totalLeftBoxesWidth = leftPadding;
  9330. totalRightBoxesWidth = rightPadding;
  9331. totalTopBoxesHeight = topPadding;
  9332. totalBottomBoxesHeight = bottomPadding;
  9333. helpers.each(leftBoxes, function(box) {
  9334. totalLeftBoxesWidth += box.width;
  9335. });
  9336. helpers.each(rightBoxes, function(box) {
  9337. totalRightBoxesWidth += box.width;
  9338. });
  9339. helpers.each(topBoxes, function(box) {
  9340. totalTopBoxesHeight += box.height;
  9341. });
  9342. helpers.each(bottomBoxes, function(box) {
  9343. totalBottomBoxesHeight += box.height;
  9344. });
  9345. // We may be adding some padding to account for rotated x axis labels
  9346. var leftPaddingAddition = Math.max(maxHorizontalLeftPadding - totalLeftBoxesWidth, 0);
  9347. totalLeftBoxesWidth += leftPaddingAddition;
  9348. totalRightBoxesWidth += Math.max(maxHorizontalRightPadding - totalRightBoxesWidth, 0);
  9349. var topPaddingAddition = Math.max(maxVerticalTopPadding - totalTopBoxesHeight, 0);
  9350. totalTopBoxesHeight += topPaddingAddition;
  9351. totalBottomBoxesHeight += Math.max(maxVerticalBottomPadding - totalBottomBoxesHeight, 0);
  9352. // Figure out if our chart area changed. This would occur if the dataset layout label rotation
  9353. // changed due to the application of the margins in step 6. Since we can only get bigger, this is safe to do
  9354. // without calling `fit` again
  9355. var newMaxChartAreaHeight = height - totalTopBoxesHeight - totalBottomBoxesHeight;
  9356. var newMaxChartAreaWidth = width - totalLeftBoxesWidth - totalRightBoxesWidth;
  9357. if (newMaxChartAreaWidth !== maxChartAreaWidth || newMaxChartAreaHeight !== maxChartAreaHeight) {
  9358. helpers.each(leftBoxes, function(box) {
  9359. box.height = newMaxChartAreaHeight;
  9360. });
  9361. helpers.each(rightBoxes, function(box) {
  9362. box.height = newMaxChartAreaHeight;
  9363. });
  9364. helpers.each(topBoxes, function(box) {
  9365. if (!box.fullWidth) {
  9366. box.width = newMaxChartAreaWidth;
  9367. }
  9368. });
  9369. helpers.each(bottomBoxes, function(box) {
  9370. if (!box.fullWidth) {
  9371. box.width = newMaxChartAreaWidth;
  9372. }
  9373. });
  9374. maxChartAreaHeight = newMaxChartAreaHeight;
  9375. maxChartAreaWidth = newMaxChartAreaWidth;
  9376. }
  9377. // Step 7 - Position the boxes
  9378. var left = leftPadding + leftPaddingAddition;
  9379. var top = topPadding + topPaddingAddition;
  9380. function placeBox(box) {
  9381. if (box.isHorizontal()) {
  9382. box.left = box.fullWidth ? leftPadding : totalLeftBoxesWidth;
  9383. box.right = box.fullWidth ? width - rightPadding : totalLeftBoxesWidth + maxChartAreaWidth;
  9384. box.top = top;
  9385. box.bottom = top + box.height;
  9386. // Move to next point
  9387. top = box.bottom;
  9388. } else {
  9389. box.left = left;
  9390. box.right = left + box.width;
  9391. box.top = totalTopBoxesHeight;
  9392. box.bottom = totalTopBoxesHeight + maxChartAreaHeight;
  9393. // Move to next point
  9394. left = box.right;
  9395. }
  9396. }
  9397. helpers.each(leftBoxes.concat(topBoxes), placeBox);
  9398. // Account for chart width and height
  9399. left += maxChartAreaWidth;
  9400. top += maxChartAreaHeight;
  9401. helpers.each(rightBoxes, placeBox);
  9402. helpers.each(bottomBoxes, placeBox);
  9403. // Step 8
  9404. chart.chartArea = {
  9405. left: totalLeftBoxesWidth,
  9406. top: totalTopBoxesHeight,
  9407. right: totalLeftBoxesWidth + maxChartAreaWidth,
  9408. bottom: totalTopBoxesHeight + maxChartAreaHeight
  9409. };
  9410. // Step 9
  9411. helpers.each(chartAreaBoxes, function(box) {
  9412. box.left = chart.chartArea.left;
  9413. box.top = chart.chartArea.top;
  9414. box.right = chart.chartArea.right;
  9415. box.bottom = chart.chartArea.bottom;
  9416. box.update(maxChartAreaWidth, maxChartAreaHeight);
  9417. });
  9418. }
  9419. };
  9420. },{"45":45}],31:[function(require,module,exports){
  9421. 'use strict';
  9422. var defaults = require(25);
  9423. var helpers = require(45);
  9424. defaults._set('global', {
  9425. plugins: {}
  9426. });
  9427. /**
  9428. * The plugin service singleton
  9429. * @namespace Chart.plugins
  9430. * @since 2.1.0
  9431. */
  9432. module.exports = {
  9433. /**
  9434. * Globally registered plugins.
  9435. * @private
  9436. */
  9437. _plugins: [],
  9438. /**
  9439. * This identifier is used to invalidate the descriptors cache attached to each chart
  9440. * when a global plugin is registered or unregistered. In this case, the cache ID is
  9441. * incremented and descriptors are regenerated during following API calls.
  9442. * @private
  9443. */
  9444. _cacheId: 0,
  9445. /**
  9446. * Registers the given plugin(s) if not already registered.
  9447. * @param {Array|Object} plugins plugin instance(s).
  9448. */
  9449. register: function(plugins) {
  9450. var p = this._plugins;
  9451. ([]).concat(plugins).forEach(function(plugin) {
  9452. if (p.indexOf(plugin) === -1) {
  9453. p.push(plugin);
  9454. }
  9455. });
  9456. this._cacheId++;
  9457. },
  9458. /**
  9459. * Unregisters the given plugin(s) only if registered.
  9460. * @param {Array|Object} plugins plugin instance(s).
  9461. */
  9462. unregister: function(plugins) {
  9463. var p = this._plugins;
  9464. ([]).concat(plugins).forEach(function(plugin) {
  9465. var idx = p.indexOf(plugin);
  9466. if (idx !== -1) {
  9467. p.splice(idx, 1);
  9468. }
  9469. });
  9470. this._cacheId++;
  9471. },
  9472. /**
  9473. * Remove all registered plugins.
  9474. * @since 2.1.5
  9475. */
  9476. clear: function() {
  9477. this._plugins = [];
  9478. this._cacheId++;
  9479. },
  9480. /**
  9481. * Returns the number of registered plugins?
  9482. * @returns {Number}
  9483. * @since 2.1.5
  9484. */
  9485. count: function() {
  9486. return this._plugins.length;
  9487. },
  9488. /**
  9489. * Returns all registered plugin instances.
  9490. * @returns {Array} array of plugin objects.
  9491. * @since 2.1.5
  9492. */
  9493. getAll: function() {
  9494. return this._plugins;
  9495. },
  9496. /**
  9497. * Calls enabled plugins for `chart` on the specified hook and with the given args.
  9498. * This method immediately returns as soon as a plugin explicitly returns false. The
  9499. * returned value can be used, for instance, to interrupt the current action.
  9500. * @param {Object} chart - The chart instance for which plugins should be called.
  9501. * @param {String} hook - The name of the plugin method to call (e.g. 'beforeUpdate').
  9502. * @param {Array} [args] - Extra arguments to apply to the hook call.
  9503. * @returns {Boolean} false if any of the plugins return false, else returns true.
  9504. */
  9505. notify: function(chart, hook, args) {
  9506. var descriptors = this.descriptors(chart);
  9507. var ilen = descriptors.length;
  9508. var i, descriptor, plugin, params, method;
  9509. for (i = 0; i < ilen; ++i) {
  9510. descriptor = descriptors[i];
  9511. plugin = descriptor.plugin;
  9512. method = plugin[hook];
  9513. if (typeof method === 'function') {
  9514. params = [chart].concat(args || []);
  9515. params.push(descriptor.options);
  9516. if (method.apply(plugin, params) === false) {
  9517. return false;
  9518. }
  9519. }
  9520. }
  9521. return true;
  9522. },
  9523. /**
  9524. * Returns descriptors of enabled plugins for the given chart.
  9525. * @returns {Array} [{ plugin, options }]
  9526. * @private
  9527. */
  9528. descriptors: function(chart) {
  9529. var cache = chart.$plugins || (chart.$plugins = {});
  9530. if (cache.id === this._cacheId) {
  9531. return cache.descriptors;
  9532. }
  9533. var plugins = [];
  9534. var descriptors = [];
  9535. var config = (chart && chart.config) || {};
  9536. var options = (config.options && config.options.plugins) || {};
  9537. this._plugins.concat(config.plugins || []).forEach(function(plugin) {
  9538. var idx = plugins.indexOf(plugin);
  9539. if (idx !== -1) {
  9540. return;
  9541. }
  9542. var id = plugin.id;
  9543. var opts = options[id];
  9544. if (opts === false) {
  9545. return;
  9546. }
  9547. if (opts === true) {
  9548. opts = helpers.clone(defaults.global.plugins[id]);
  9549. }
  9550. plugins.push(plugin);
  9551. descriptors.push({
  9552. plugin: plugin,
  9553. options: opts || {}
  9554. });
  9555. });
  9556. cache.descriptors = descriptors;
  9557. cache.id = this._cacheId;
  9558. return descriptors;
  9559. },
  9560. /**
  9561. * Invalidates cache for the given chart: descriptors hold a reference on plugin option,
  9562. * but in some cases, this reference can be changed by the user when updating options.
  9563. * https://github.com/chartjs/Chart.js/issues/5111#issuecomment-355934167
  9564. * @private
  9565. */
  9566. _invalidate: function(chart) {
  9567. delete chart.$plugins;
  9568. }
  9569. };
  9570. /**
  9571. * Plugin extension hooks.
  9572. * @interface IPlugin
  9573. * @since 2.1.0
  9574. */
  9575. /**
  9576. * @method IPlugin#beforeInit
  9577. * @desc Called before initializing `chart`.
  9578. * @param {Chart.Controller} chart - The chart instance.
  9579. * @param {Object} options - The plugin options.
  9580. */
  9581. /**
  9582. * @method IPlugin#afterInit
  9583. * @desc Called after `chart` has been initialized and before the first update.
  9584. * @param {Chart.Controller} chart - The chart instance.
  9585. * @param {Object} options - The plugin options.
  9586. */
  9587. /**
  9588. * @method IPlugin#beforeUpdate
  9589. * @desc Called before updating `chart`. If any plugin returns `false`, the update
  9590. * is cancelled (and thus subsequent render(s)) until another `update` is triggered.
  9591. * @param {Chart.Controller} chart - The chart instance.
  9592. * @param {Object} options - The plugin options.
  9593. * @returns {Boolean} `false` to cancel the chart update.
  9594. */
  9595. /**
  9596. * @method IPlugin#afterUpdate
  9597. * @desc Called after `chart` has been updated and before rendering. Note that this
  9598. * hook will not be called if the chart update has been previously cancelled.
  9599. * @param {Chart.Controller} chart - The chart instance.
  9600. * @param {Object} options - The plugin options.
  9601. */
  9602. /**
  9603. * @method IPlugin#beforeDatasetsUpdate
  9604. * @desc Called before updating the `chart` datasets. If any plugin returns `false`,
  9605. * the datasets update is cancelled until another `update` is triggered.
  9606. * @param {Chart.Controller} chart - The chart instance.
  9607. * @param {Object} options - The plugin options.
  9608. * @returns {Boolean} false to cancel the datasets update.
  9609. * @since version 2.1.5
  9610. */
  9611. /**
  9612. * @method IPlugin#afterDatasetsUpdate
  9613. * @desc Called after the `chart` datasets have been updated. Note that this hook
  9614. * will not be called if the datasets update has been previously cancelled.
  9615. * @param {Chart.Controller} chart - The chart instance.
  9616. * @param {Object} options - The plugin options.
  9617. * @since version 2.1.5
  9618. */
  9619. /**
  9620. * @method IPlugin#beforeDatasetUpdate
  9621. * @desc Called before updating the `chart` dataset at the given `args.index`. If any plugin
  9622. * returns `false`, the datasets update is cancelled until another `update` is triggered.
  9623. * @param {Chart} chart - The chart instance.
  9624. * @param {Object} args - The call arguments.
  9625. * @param {Number} args.index - The dataset index.
  9626. * @param {Object} args.meta - The dataset metadata.
  9627. * @param {Object} options - The plugin options.
  9628. * @returns {Boolean} `false` to cancel the chart datasets drawing.
  9629. */
  9630. /**
  9631. * @method IPlugin#afterDatasetUpdate
  9632. * @desc Called after the `chart` datasets at the given `args.index` has been updated. Note
  9633. * that this hook will not be called if the datasets update has been previously cancelled.
  9634. * @param {Chart} chart - The chart instance.
  9635. * @param {Object} args - The call arguments.
  9636. * @param {Number} args.index - The dataset index.
  9637. * @param {Object} args.meta - The dataset metadata.
  9638. * @param {Object} options - The plugin options.
  9639. */
  9640. /**
  9641. * @method IPlugin#beforeLayout
  9642. * @desc Called before laying out `chart`. If any plugin returns `false`,
  9643. * the layout update is cancelled until another `update` is triggered.
  9644. * @param {Chart.Controller} chart - The chart instance.
  9645. * @param {Object} options - The plugin options.
  9646. * @returns {Boolean} `false` to cancel the chart layout.
  9647. */
  9648. /**
  9649. * @method IPlugin#afterLayout
  9650. * @desc Called after the `chart` has been layed out. Note that this hook will not
  9651. * be called if the layout update has been previously cancelled.
  9652. * @param {Chart.Controller} chart - The chart instance.
  9653. * @param {Object} options - The plugin options.
  9654. */
  9655. /**
  9656. * @method IPlugin#beforeRender
  9657. * @desc Called before rendering `chart`. If any plugin returns `false`,
  9658. * the rendering is cancelled until another `render` is triggered.
  9659. * @param {Chart.Controller} chart - The chart instance.
  9660. * @param {Object} options - The plugin options.
  9661. * @returns {Boolean} `false` to cancel the chart rendering.
  9662. */
  9663. /**
  9664. * @method IPlugin#afterRender
  9665. * @desc Called after the `chart` has been fully rendered (and animation completed). Note
  9666. * that this hook will not be called if the rendering has been previously cancelled.
  9667. * @param {Chart.Controller} chart - The chart instance.
  9668. * @param {Object} options - The plugin options.
  9669. */
  9670. /**
  9671. * @method IPlugin#beforeDraw
  9672. * @desc Called before drawing `chart` at every animation frame specified by the given
  9673. * easing value. If any plugin returns `false`, the frame drawing is cancelled until
  9674. * another `render` is triggered.
  9675. * @param {Chart.Controller} chart - The chart instance.
  9676. * @param {Number} easingValue - The current animation value, between 0.0 and 1.0.
  9677. * @param {Object} options - The plugin options.
  9678. * @returns {Boolean} `false` to cancel the chart drawing.
  9679. */
  9680. /**
  9681. * @method IPlugin#afterDraw
  9682. * @desc Called after the `chart` has been drawn for the specific easing value. Note
  9683. * that this hook will not be called if the drawing has been previously cancelled.
  9684. * @param {Chart.Controller} chart - The chart instance.
  9685. * @param {Number} easingValue - The current animation value, between 0.0 and 1.0.
  9686. * @param {Object} options - The plugin options.
  9687. */
  9688. /**
  9689. * @method IPlugin#beforeDatasetsDraw
  9690. * @desc Called before drawing the `chart` datasets. If any plugin returns `false`,
  9691. * the datasets drawing is cancelled until another `render` is triggered.
  9692. * @param {Chart.Controller} chart - The chart instance.
  9693. * @param {Number} easingValue - The current animation value, between 0.0 and 1.0.
  9694. * @param {Object} options - The plugin options.
  9695. * @returns {Boolean} `false` to cancel the chart datasets drawing.
  9696. */
  9697. /**
  9698. * @method IPlugin#afterDatasetsDraw
  9699. * @desc Called after the `chart` datasets have been drawn. Note that this hook
  9700. * will not be called if the datasets drawing has been previously cancelled.
  9701. * @param {Chart.Controller} chart - The chart instance.
  9702. * @param {Number} easingValue - The current animation value, between 0.0 and 1.0.
  9703. * @param {Object} options - The plugin options.
  9704. */
  9705. /**
  9706. * @method IPlugin#beforeDatasetDraw
  9707. * @desc Called before drawing the `chart` dataset at the given `args.index` (datasets
  9708. * are drawn in the reverse order). If any plugin returns `false`, the datasets drawing
  9709. * is cancelled until another `render` is triggered.
  9710. * @param {Chart} chart - The chart instance.
  9711. * @param {Object} args - The call arguments.
  9712. * @param {Number} args.index - The dataset index.
  9713. * @param {Object} args.meta - The dataset metadata.
  9714. * @param {Number} args.easingValue - The current animation value, between 0.0 and 1.0.
  9715. * @param {Object} options - The plugin options.
  9716. * @returns {Boolean} `false` to cancel the chart datasets drawing.
  9717. */
  9718. /**
  9719. * @method IPlugin#afterDatasetDraw
  9720. * @desc Called after the `chart` datasets at the given `args.index` have been drawn
  9721. * (datasets are drawn in the reverse order). Note that this hook will not be called
  9722. * if the datasets drawing has been previously cancelled.
  9723. * @param {Chart} chart - The chart instance.
  9724. * @param {Object} args - The call arguments.
  9725. * @param {Number} args.index - The dataset index.
  9726. * @param {Object} args.meta - The dataset metadata.
  9727. * @param {Number} args.easingValue - The current animation value, between 0.0 and 1.0.
  9728. * @param {Object} options - The plugin options.
  9729. */
  9730. /**
  9731. * @method IPlugin#beforeTooltipDraw
  9732. * @desc Called before drawing the `tooltip`. If any plugin returns `false`,
  9733. * the tooltip drawing is cancelled until another `render` is triggered.
  9734. * @param {Chart} chart - The chart instance.
  9735. * @param {Object} args - The call arguments.
  9736. * @param {Object} args.tooltip - The tooltip.
  9737. * @param {Number} args.easingValue - The current animation value, between 0.0 and 1.0.
  9738. * @param {Object} options - The plugin options.
  9739. * @returns {Boolean} `false` to cancel the chart tooltip drawing.
  9740. */
  9741. /**
  9742. * @method IPlugin#afterTooltipDraw
  9743. * @desc Called after drawing the `tooltip`. Note that this hook will not
  9744. * be called if the tooltip drawing has been previously cancelled.
  9745. * @param {Chart} chart - The chart instance.
  9746. * @param {Object} args - The call arguments.
  9747. * @param {Object} args.tooltip - The tooltip.
  9748. * @param {Number} args.easingValue - The current animation value, between 0.0 and 1.0.
  9749. * @param {Object} options - The plugin options.
  9750. */
  9751. /**
  9752. * @method IPlugin#beforeEvent
  9753. * @desc Called before processing the specified `event`. If any plugin returns `false`,
  9754. * the event will be discarded.
  9755. * @param {Chart.Controller} chart - The chart instance.
  9756. * @param {IEvent} event - The event object.
  9757. * @param {Object} options - The plugin options.
  9758. */
  9759. /**
  9760. * @method IPlugin#afterEvent
  9761. * @desc Called after the `event` has been consumed. Note that this hook
  9762. * will not be called if the `event` has been previously discarded.
  9763. * @param {Chart.Controller} chart - The chart instance.
  9764. * @param {IEvent} event - The event object.
  9765. * @param {Object} options - The plugin options.
  9766. */
  9767. /**
  9768. * @method IPlugin#resize
  9769. * @desc Called after the chart as been resized.
  9770. * @param {Chart.Controller} chart - The chart instance.
  9771. * @param {Number} size - The new canvas display size (eq. canvas.style width & height).
  9772. * @param {Object} options - The plugin options.
  9773. */
  9774. /**
  9775. * @method IPlugin#destroy
  9776. * @desc Called after the chart as been destroyed.
  9777. * @param {Chart.Controller} chart - The chart instance.
  9778. * @param {Object} options - The plugin options.
  9779. */
  9780. },{"25":25,"45":45}],32:[function(require,module,exports){
  9781. 'use strict';
  9782. var defaults = require(25);
  9783. var Element = require(26);
  9784. var helpers = require(45);
  9785. var Ticks = require(34);
  9786. defaults._set('scale', {
  9787. display: true,
  9788. position: 'left',
  9789. offset: false,
  9790. // grid line settings
  9791. gridLines: {
  9792. display: true,
  9793. color: 'rgba(0, 0, 0, 0.1)',
  9794. lineWidth: 1,
  9795. drawBorder: true,
  9796. drawOnChartArea: true,
  9797. drawTicks: true,
  9798. tickMarkLength: 10,
  9799. zeroLineWidth: 1,
  9800. zeroLineColor: 'rgba(0,0,0,0.25)',
  9801. zeroLineBorderDash: [],
  9802. zeroLineBorderDashOffset: 0.0,
  9803. offsetGridLines: false,
  9804. borderDash: [],
  9805. borderDashOffset: 0.0
  9806. },
  9807. // scale label
  9808. scaleLabel: {
  9809. // display property
  9810. display: false,
  9811. // actual label
  9812. labelString: '',
  9813. // line height
  9814. lineHeight: 1.2,
  9815. // top/bottom padding
  9816. padding: {
  9817. top: 4,
  9818. bottom: 4
  9819. }
  9820. },
  9821. // label settings
  9822. ticks: {
  9823. beginAtZero: false,
  9824. minRotation: 0,
  9825. maxRotation: 50,
  9826. mirror: false,
  9827. padding: 0,
  9828. reverse: false,
  9829. display: true,
  9830. autoSkip: true,
  9831. autoSkipPadding: 0,
  9832. labelOffset: 0,
  9833. // We pass through arrays to be rendered as multiline labels, we convert Others to strings here.
  9834. callback: Ticks.formatters.values,
  9835. minor: {},
  9836. major: {}
  9837. }
  9838. });
  9839. function labelsFromTicks(ticks) {
  9840. var labels = [];
  9841. var i, ilen;
  9842. for (i = 0, ilen = ticks.length; i < ilen; ++i) {
  9843. labels.push(ticks[i].label);
  9844. }
  9845. return labels;
  9846. }
  9847. function getLineValue(scale, index, offsetGridLines) {
  9848. var lineValue = scale.getPixelForTick(index);
  9849. if (offsetGridLines) {
  9850. if (index === 0) {
  9851. lineValue -= (scale.getPixelForTick(1) - lineValue) / 2;
  9852. } else {
  9853. lineValue -= (lineValue - scale.getPixelForTick(index - 1)) / 2;
  9854. }
  9855. }
  9856. return lineValue;
  9857. }
  9858. module.exports = function(Chart) {
  9859. function computeTextSize(context, tick, font) {
  9860. return helpers.isArray(tick) ?
  9861. helpers.longestText(context, font, tick) :
  9862. context.measureText(tick).width;
  9863. }
  9864. function parseFontOptions(options) {
  9865. var valueOrDefault = helpers.valueOrDefault;
  9866. var globalDefaults = defaults.global;
  9867. var size = valueOrDefault(options.fontSize, globalDefaults.defaultFontSize);
  9868. var style = valueOrDefault(options.fontStyle, globalDefaults.defaultFontStyle);
  9869. var family = valueOrDefault(options.fontFamily, globalDefaults.defaultFontFamily);
  9870. return {
  9871. size: size,
  9872. style: style,
  9873. family: family,
  9874. font: helpers.fontString(size, style, family)
  9875. };
  9876. }
  9877. function parseLineHeight(options) {
  9878. return helpers.options.toLineHeight(
  9879. helpers.valueOrDefault(options.lineHeight, 1.2),
  9880. helpers.valueOrDefault(options.fontSize, defaults.global.defaultFontSize));
  9881. }
  9882. Chart.Scale = Element.extend({
  9883. /**
  9884. * Get the padding needed for the scale
  9885. * @method getPadding
  9886. * @private
  9887. * @returns {Padding} the necessary padding
  9888. */
  9889. getPadding: function() {
  9890. var me = this;
  9891. return {
  9892. left: me.paddingLeft || 0,
  9893. top: me.paddingTop || 0,
  9894. right: me.paddingRight || 0,
  9895. bottom: me.paddingBottom || 0
  9896. };
  9897. },
  9898. /**
  9899. * Returns the scale tick objects ({label, major})
  9900. * @since 2.7
  9901. */
  9902. getTicks: function() {
  9903. return this._ticks;
  9904. },
  9905. // These methods are ordered by lifecyle. Utilities then follow.
  9906. // Any function defined here is inherited by all scale types.
  9907. // Any function can be extended by the scale type
  9908. mergeTicksOptions: function() {
  9909. var ticks = this.options.ticks;
  9910. if (ticks.minor === false) {
  9911. ticks.minor = {
  9912. display: false
  9913. };
  9914. }
  9915. if (ticks.major === false) {
  9916. ticks.major = {
  9917. display: false
  9918. };
  9919. }
  9920. for (var key in ticks) {
  9921. if (key !== 'major' && key !== 'minor') {
  9922. if (typeof ticks.minor[key] === 'undefined') {
  9923. ticks.minor[key] = ticks[key];
  9924. }
  9925. if (typeof ticks.major[key] === 'undefined') {
  9926. ticks.major[key] = ticks[key];
  9927. }
  9928. }
  9929. }
  9930. },
  9931. beforeUpdate: function() {
  9932. helpers.callback(this.options.beforeUpdate, [this]);
  9933. },
  9934. update: function(maxWidth, maxHeight, margins) {
  9935. var me = this;
  9936. var i, ilen, labels, label, ticks, tick;
  9937. // Update Lifecycle - Probably don't want to ever extend or overwrite this function ;)
  9938. me.beforeUpdate();
  9939. // Absorb the master measurements
  9940. me.maxWidth = maxWidth;
  9941. me.maxHeight = maxHeight;
  9942. me.margins = helpers.extend({
  9943. left: 0,
  9944. right: 0,
  9945. top: 0,
  9946. bottom: 0
  9947. }, margins);
  9948. me.longestTextCache = me.longestTextCache || {};
  9949. // Dimensions
  9950. me.beforeSetDimensions();
  9951. me.setDimensions();
  9952. me.afterSetDimensions();
  9953. // Data min/max
  9954. me.beforeDataLimits();
  9955. me.determineDataLimits();
  9956. me.afterDataLimits();
  9957. // Ticks - `this.ticks` is now DEPRECATED!
  9958. // Internal ticks are now stored as objects in the PRIVATE `this._ticks` member
  9959. // and must not be accessed directly from outside this class. `this.ticks` being
  9960. // around for long time and not marked as private, we can't change its structure
  9961. // without unexpected breaking changes. If you need to access the scale ticks,
  9962. // use scale.getTicks() instead.
  9963. me.beforeBuildTicks();
  9964. // New implementations should return an array of objects but for BACKWARD COMPAT,
  9965. // we still support no return (`this.ticks` internally set by calling this method).
  9966. ticks = me.buildTicks() || [];
  9967. me.afterBuildTicks();
  9968. me.beforeTickToLabelConversion();
  9969. // New implementations should return the formatted tick labels but for BACKWARD
  9970. // COMPAT, we still support no return (`this.ticks` internally changed by calling
  9971. // this method and supposed to contain only string values).
  9972. labels = me.convertTicksToLabels(ticks) || me.ticks;
  9973. me.afterTickToLabelConversion();
  9974. me.ticks = labels; // BACKWARD COMPATIBILITY
  9975. // IMPORTANT: from this point, we consider that `this.ticks` will NEVER change!
  9976. // BACKWARD COMPAT: synchronize `_ticks` with labels (so potentially `this.ticks`)
  9977. for (i = 0, ilen = labels.length; i < ilen; ++i) {
  9978. label = labels[i];
  9979. tick = ticks[i];
  9980. if (!tick) {
  9981. ticks.push(tick = {
  9982. label: label,
  9983. major: false
  9984. });
  9985. } else {
  9986. tick.label = label;
  9987. }
  9988. }
  9989. me._ticks = ticks;
  9990. // Tick Rotation
  9991. me.beforeCalculateTickRotation();
  9992. me.calculateTickRotation();
  9993. me.afterCalculateTickRotation();
  9994. // Fit
  9995. me.beforeFit();
  9996. me.fit();
  9997. me.afterFit();
  9998. //
  9999. me.afterUpdate();
  10000. return me.minSize;
  10001. },
  10002. afterUpdate: function() {
  10003. helpers.callback(this.options.afterUpdate, [this]);
  10004. },
  10005. //
  10006. beforeSetDimensions: function() {
  10007. helpers.callback(this.options.beforeSetDimensions, [this]);
  10008. },
  10009. setDimensions: function() {
  10010. var me = this;
  10011. // Set the unconstrained dimension before label rotation
  10012. if (me.isHorizontal()) {
  10013. // Reset position before calculating rotation
  10014. me.width = me.maxWidth;
  10015. me.left = 0;
  10016. me.right = me.width;
  10017. } else {
  10018. me.height = me.maxHeight;
  10019. // Reset position before calculating rotation
  10020. me.top = 0;
  10021. me.bottom = me.height;
  10022. }
  10023. // Reset padding
  10024. me.paddingLeft = 0;
  10025. me.paddingTop = 0;
  10026. me.paddingRight = 0;
  10027. me.paddingBottom = 0;
  10028. },
  10029. afterSetDimensions: function() {
  10030. helpers.callback(this.options.afterSetDimensions, [this]);
  10031. },
  10032. // Data limits
  10033. beforeDataLimits: function() {
  10034. helpers.callback(this.options.beforeDataLimits, [this]);
  10035. },
  10036. determineDataLimits: helpers.noop,
  10037. afterDataLimits: function() {
  10038. helpers.callback(this.options.afterDataLimits, [this]);
  10039. },
  10040. //
  10041. beforeBuildTicks: function() {
  10042. helpers.callback(this.options.beforeBuildTicks, [this]);
  10043. },
  10044. buildTicks: helpers.noop,
  10045. afterBuildTicks: function() {
  10046. helpers.callback(this.options.afterBuildTicks, [this]);
  10047. },
  10048. beforeTickToLabelConversion: function() {
  10049. helpers.callback(this.options.beforeTickToLabelConversion, [this]);
  10050. },
  10051. convertTicksToLabels: function() {
  10052. var me = this;
  10053. // Convert ticks to strings
  10054. var tickOpts = me.options.ticks;
  10055. me.ticks = me.ticks.map(tickOpts.userCallback || tickOpts.callback, this);
  10056. },
  10057. afterTickToLabelConversion: function() {
  10058. helpers.callback(this.options.afterTickToLabelConversion, [this]);
  10059. },
  10060. //
  10061. beforeCalculateTickRotation: function() {
  10062. helpers.callback(this.options.beforeCalculateTickRotation, [this]);
  10063. },
  10064. calculateTickRotation: function() {
  10065. var me = this;
  10066. var context = me.ctx;
  10067. var tickOpts = me.options.ticks;
  10068. var labels = labelsFromTicks(me._ticks);
  10069. // Get the width of each grid by calculating the difference
  10070. // between x offsets between 0 and 1.
  10071. var tickFont = parseFontOptions(tickOpts);
  10072. context.font = tickFont.font;
  10073. var labelRotation = tickOpts.minRotation || 0;
  10074. if (labels.length && me.options.display && me.isHorizontal()) {
  10075. var originalLabelWidth = helpers.longestText(context, tickFont.font, labels, me.longestTextCache);
  10076. var labelWidth = originalLabelWidth;
  10077. var cosRotation, sinRotation;
  10078. // Allow 3 pixels x2 padding either side for label readability
  10079. var tickWidth = me.getPixelForTick(1) - me.getPixelForTick(0) - 6;
  10080. // Max label rotation can be set or default to 90 - also act as a loop counter
  10081. while (labelWidth > tickWidth && labelRotation < tickOpts.maxRotation) {
  10082. var angleRadians = helpers.toRadians(labelRotation);
  10083. cosRotation = Math.cos(angleRadians);
  10084. sinRotation = Math.sin(angleRadians);
  10085. if (sinRotation * originalLabelWidth > me.maxHeight) {
  10086. // go back one step
  10087. labelRotation--;
  10088. break;
  10089. }
  10090. labelRotation++;
  10091. labelWidth = cosRotation * originalLabelWidth;
  10092. }
  10093. }
  10094. me.labelRotation = labelRotation;
  10095. },
  10096. afterCalculateTickRotation: function() {
  10097. helpers.callback(this.options.afterCalculateTickRotation, [this]);
  10098. },
  10099. //
  10100. beforeFit: function() {
  10101. helpers.callback(this.options.beforeFit, [this]);
  10102. },
  10103. fit: function() {
  10104. var me = this;
  10105. // Reset
  10106. var minSize = me.minSize = {
  10107. width: 0,
  10108. height: 0
  10109. };
  10110. var labels = labelsFromTicks(me._ticks);
  10111. var opts = me.options;
  10112. var tickOpts = opts.ticks;
  10113. var scaleLabelOpts = opts.scaleLabel;
  10114. var gridLineOpts = opts.gridLines;
  10115. var display = opts.display;
  10116. var isHorizontal = me.isHorizontal();
  10117. var tickFont = parseFontOptions(tickOpts);
  10118. var tickMarkLength = opts.gridLines.tickMarkLength;
  10119. // Width
  10120. if (isHorizontal) {
  10121. // subtract the margins to line up with the chartArea if we are a full width scale
  10122. minSize.width = me.isFullWidth() ? me.maxWidth - me.margins.left - me.margins.right : me.maxWidth;
  10123. } else {
  10124. minSize.width = display && gridLineOpts.drawTicks ? tickMarkLength : 0;
  10125. }
  10126. // height
  10127. if (isHorizontal) {
  10128. minSize.height = display && gridLineOpts.drawTicks ? tickMarkLength : 0;
  10129. } else {
  10130. minSize.height = me.maxHeight; // fill all the height
  10131. }
  10132. // Are we showing a title for the scale?
  10133. if (scaleLabelOpts.display && display) {
  10134. var scaleLabelLineHeight = parseLineHeight(scaleLabelOpts);
  10135. var scaleLabelPadding = helpers.options.toPadding(scaleLabelOpts.padding);
  10136. var deltaHeight = scaleLabelLineHeight + scaleLabelPadding.height;
  10137. if (isHorizontal) {
  10138. minSize.height += deltaHeight;
  10139. } else {
  10140. minSize.width += deltaHeight;
  10141. }
  10142. }
  10143. // Don't bother fitting the ticks if we are not showing them
  10144. if (tickOpts.display && display) {
  10145. var largestTextWidth = helpers.longestText(me.ctx, tickFont.font, labels, me.longestTextCache);
  10146. var tallestLabelHeightInLines = helpers.numberOfLabelLines(labels);
  10147. var lineSpace = tickFont.size * 0.5;
  10148. var tickPadding = me.options.ticks.padding;
  10149. if (isHorizontal) {
  10150. // A horizontal axis is more constrained by the height.
  10151. me.longestLabelWidth = largestTextWidth;
  10152. var angleRadians = helpers.toRadians(me.labelRotation);
  10153. var cosRotation = Math.cos(angleRadians);
  10154. var sinRotation = Math.sin(angleRadians);
  10155. // TODO - improve this calculation
  10156. var labelHeight = (sinRotation * largestTextWidth)
  10157. + (tickFont.size * tallestLabelHeightInLines)
  10158. + (lineSpace * (tallestLabelHeightInLines - 1))
  10159. + lineSpace; // padding
  10160. minSize.height = Math.min(me.maxHeight, minSize.height + labelHeight + tickPadding);
  10161. me.ctx.font = tickFont.font;
  10162. var firstLabelWidth = computeTextSize(me.ctx, labels[0], tickFont.font);
  10163. var lastLabelWidth = computeTextSize(me.ctx, labels[labels.length - 1], tickFont.font);
  10164. // Ensure that our ticks are always inside the canvas. When rotated, ticks are right aligned
  10165. // which means that the right padding is dominated by the font height
  10166. if (me.labelRotation !== 0) {
  10167. me.paddingLeft = opts.position === 'bottom' ? (cosRotation * firstLabelWidth) + 3 : (cosRotation * lineSpace) + 3; // add 3 px to move away from canvas edges
  10168. me.paddingRight = opts.position === 'bottom' ? (cosRotation * lineSpace) + 3 : (cosRotation * lastLabelWidth) + 3;
  10169. } else {
  10170. me.paddingLeft = firstLabelWidth / 2 + 3; // add 3 px to move away from canvas edges
  10171. me.paddingRight = lastLabelWidth / 2 + 3;
  10172. }
  10173. } else {
  10174. // A vertical axis is more constrained by the width. Labels are the
  10175. // dominant factor here, so get that length first and account for padding
  10176. if (tickOpts.mirror) {
  10177. largestTextWidth = 0;
  10178. } else {
  10179. // use lineSpace for consistency with horizontal axis
  10180. // tickPadding is not implemented for horizontal
  10181. largestTextWidth += tickPadding + lineSpace;
  10182. }
  10183. minSize.width = Math.min(me.maxWidth, minSize.width + largestTextWidth);
  10184. me.paddingTop = tickFont.size / 2;
  10185. me.paddingBottom = tickFont.size / 2;
  10186. }
  10187. }
  10188. me.handleMargins();
  10189. me.width = minSize.width;
  10190. me.height = minSize.height;
  10191. },
  10192. /**
  10193. * Handle margins and padding interactions
  10194. * @private
  10195. */
  10196. handleMargins: function() {
  10197. var me = this;
  10198. if (me.margins) {
  10199. me.paddingLeft = Math.max(me.paddingLeft - me.margins.left, 0);
  10200. me.paddingTop = Math.max(me.paddingTop - me.margins.top, 0);
  10201. me.paddingRight = Math.max(me.paddingRight - me.margins.right, 0);
  10202. me.paddingBottom = Math.max(me.paddingBottom - me.margins.bottom, 0);
  10203. }
  10204. },
  10205. afterFit: function() {
  10206. helpers.callback(this.options.afterFit, [this]);
  10207. },
  10208. // Shared Methods
  10209. isHorizontal: function() {
  10210. return this.options.position === 'top' || this.options.position === 'bottom';
  10211. },
  10212. isFullWidth: function() {
  10213. return (this.options.fullWidth);
  10214. },
  10215. // Get the correct value. NaN bad inputs, If the value type is object get the x or y based on whether we are horizontal or not
  10216. getRightValue: function(rawValue) {
  10217. // Null and undefined values first
  10218. if (helpers.isNullOrUndef(rawValue)) {
  10219. return NaN;
  10220. }
  10221. // isNaN(object) returns true, so make sure NaN is checking for a number; Discard Infinite values
  10222. if (typeof rawValue === 'number' && !isFinite(rawValue)) {
  10223. return NaN;
  10224. }
  10225. // If it is in fact an object, dive in one more level
  10226. if (rawValue) {
  10227. if (this.isHorizontal()) {
  10228. if (rawValue.x !== undefined) {
  10229. return this.getRightValue(rawValue.x);
  10230. }
  10231. } else if (rawValue.y !== undefined) {
  10232. return this.getRightValue(rawValue.y);
  10233. }
  10234. }
  10235. // Value is good, return it
  10236. return rawValue;
  10237. },
  10238. /**
  10239. * Used to get the value to display in the tooltip for the data at the given index
  10240. * @param index
  10241. * @param datasetIndex
  10242. */
  10243. getLabelForIndex: helpers.noop,
  10244. /**
  10245. * Returns the location of the given data point. Value can either be an index or a numerical value
  10246. * The coordinate (0, 0) is at the upper-left corner of the canvas
  10247. * @param value
  10248. * @param index
  10249. * @param datasetIndex
  10250. */
  10251. getPixelForValue: helpers.noop,
  10252. /**
  10253. * Used to get the data value from a given pixel. This is the inverse of getPixelForValue
  10254. * The coordinate (0, 0) is at the upper-left corner of the canvas
  10255. * @param pixel
  10256. */
  10257. getValueForPixel: helpers.noop,
  10258. /**
  10259. * Returns the location of the tick at the given index
  10260. * The coordinate (0, 0) is at the upper-left corner of the canvas
  10261. */
  10262. getPixelForTick: function(index) {
  10263. var me = this;
  10264. var offset = me.options.offset;
  10265. if (me.isHorizontal()) {
  10266. var innerWidth = me.width - (me.paddingLeft + me.paddingRight);
  10267. var tickWidth = innerWidth / Math.max((me._ticks.length - (offset ? 0 : 1)), 1);
  10268. var pixel = (tickWidth * index) + me.paddingLeft;
  10269. if (offset) {
  10270. pixel += tickWidth / 2;
  10271. }
  10272. var finalVal = me.left + Math.round(pixel);
  10273. finalVal += me.isFullWidth() ? me.margins.left : 0;
  10274. return finalVal;
  10275. }
  10276. var innerHeight = me.height - (me.paddingTop + me.paddingBottom);
  10277. return me.top + (index * (innerHeight / (me._ticks.length - 1)));
  10278. },
  10279. /**
  10280. * Utility for getting the pixel location of a percentage of scale
  10281. * The coordinate (0, 0) is at the upper-left corner of the canvas
  10282. */
  10283. getPixelForDecimal: function(decimal) {
  10284. var me = this;
  10285. if (me.isHorizontal()) {
  10286. var innerWidth = me.width - (me.paddingLeft + me.paddingRight);
  10287. var valueOffset = (innerWidth * decimal) + me.paddingLeft;
  10288. var finalVal = me.left + Math.round(valueOffset);
  10289. finalVal += me.isFullWidth() ? me.margins.left : 0;
  10290. return finalVal;
  10291. }
  10292. return me.top + (decimal * me.height);
  10293. },
  10294. /**
  10295. * Returns the pixel for the minimum chart value
  10296. * The coordinate (0, 0) is at the upper-left corner of the canvas
  10297. */
  10298. getBasePixel: function() {
  10299. return this.getPixelForValue(this.getBaseValue());
  10300. },
  10301. getBaseValue: function() {
  10302. var me = this;
  10303. var min = me.min;
  10304. var max = me.max;
  10305. return me.beginAtZero ? 0 :
  10306. min < 0 && max < 0 ? max :
  10307. min > 0 && max > 0 ? min :
  10308. 0;
  10309. },
  10310. /**
  10311. * Returns a subset of ticks to be plotted to avoid overlapping labels.
  10312. * @private
  10313. */
  10314. _autoSkip: function(ticks) {
  10315. var skipRatio;
  10316. var me = this;
  10317. var isHorizontal = me.isHorizontal();
  10318. var optionTicks = me.options.ticks.minor;
  10319. var tickCount = ticks.length;
  10320. var labelRotationRadians = helpers.toRadians(me.labelRotation);
  10321. var cosRotation = Math.cos(labelRotationRadians);
  10322. var longestRotatedLabel = me.longestLabelWidth * cosRotation;
  10323. var result = [];
  10324. var i, tick, shouldSkip;
  10325. // figure out the maximum number of gridlines to show
  10326. var maxTicks;
  10327. if (optionTicks.maxTicksLimit) {
  10328. maxTicks = optionTicks.maxTicksLimit;
  10329. }
  10330. if (isHorizontal) {
  10331. skipRatio = false;
  10332. if ((longestRotatedLabel + optionTicks.autoSkipPadding) * tickCount > (me.width - (me.paddingLeft + me.paddingRight))) {
  10333. skipRatio = 1 + Math.floor(((longestRotatedLabel + optionTicks.autoSkipPadding) * tickCount) / (me.width - (me.paddingLeft + me.paddingRight)));
  10334. }
  10335. // if they defined a max number of optionTicks,
  10336. // increase skipRatio until that number is met
  10337. if (maxTicks && tickCount > maxTicks) {
  10338. skipRatio = Math.max(skipRatio, Math.floor(tickCount / maxTicks));
  10339. }
  10340. }
  10341. for (i = 0; i < tickCount; i++) {
  10342. tick = ticks[i];
  10343. // Since we always show the last tick,we need may need to hide the last shown one before
  10344. shouldSkip = (skipRatio > 1 && i % skipRatio > 0) || (i % skipRatio === 0 && i + skipRatio >= tickCount);
  10345. if (shouldSkip && i !== tickCount - 1) {
  10346. // leave tick in place but make sure it's not displayed (#4635)
  10347. delete tick.label;
  10348. }
  10349. result.push(tick);
  10350. }
  10351. return result;
  10352. },
  10353. // Actually draw the scale on the canvas
  10354. // @param {rectangle} chartArea : the area of the chart to draw full grid lines on
  10355. draw: function(chartArea) {
  10356. var me = this;
  10357. var options = me.options;
  10358. if (!options.display) {
  10359. return;
  10360. }
  10361. var context = me.ctx;
  10362. var globalDefaults = defaults.global;
  10363. var optionTicks = options.ticks.minor;
  10364. var optionMajorTicks = options.ticks.major || optionTicks;
  10365. var gridLines = options.gridLines;
  10366. var scaleLabel = options.scaleLabel;
  10367. var isRotated = me.labelRotation !== 0;
  10368. var isHorizontal = me.isHorizontal();
  10369. var ticks = optionTicks.autoSkip ? me._autoSkip(me.getTicks()) : me.getTicks();
  10370. var tickFontColor = helpers.valueOrDefault(optionTicks.fontColor, globalDefaults.defaultFontColor);
  10371. var tickFont = parseFontOptions(optionTicks);
  10372. var majorTickFontColor = helpers.valueOrDefault(optionMajorTicks.fontColor, globalDefaults.defaultFontColor);
  10373. var majorTickFont = parseFontOptions(optionMajorTicks);
  10374. var tl = gridLines.drawTicks ? gridLines.tickMarkLength : 0;
  10375. var scaleLabelFontColor = helpers.valueOrDefault(scaleLabel.fontColor, globalDefaults.defaultFontColor);
  10376. var scaleLabelFont = parseFontOptions(scaleLabel);
  10377. var scaleLabelPadding = helpers.options.toPadding(scaleLabel.padding);
  10378. var labelRotationRadians = helpers.toRadians(me.labelRotation);
  10379. var itemsToDraw = [];
  10380. var axisWidth = me.options.gridLines.lineWidth;
  10381. var xTickStart = options.position === 'right' ? me.right : me.right - axisWidth - tl;
  10382. var xTickEnd = options.position === 'right' ? me.right + tl : me.right;
  10383. var yTickStart = options.position === 'bottom' ? me.top + axisWidth : me.bottom - tl - axisWidth;
  10384. var yTickEnd = options.position === 'bottom' ? me.top + axisWidth + tl : me.bottom + axisWidth;
  10385. helpers.each(ticks, function(tick, index) {
  10386. // autoskipper skipped this tick (#4635)
  10387. if (helpers.isNullOrUndef(tick.label)) {
  10388. return;
  10389. }
  10390. var label = tick.label;
  10391. var lineWidth, lineColor, borderDash, borderDashOffset;
  10392. if (index === me.zeroLineIndex && options.offset === gridLines.offsetGridLines) {
  10393. // Draw the first index specially
  10394. lineWidth = gridLines.zeroLineWidth;
  10395. lineColor = gridLines.zeroLineColor;
  10396. borderDash = gridLines.zeroLineBorderDash;
  10397. borderDashOffset = gridLines.zeroLineBorderDashOffset;
  10398. } else {
  10399. lineWidth = helpers.valueAtIndexOrDefault(gridLines.lineWidth, index);
  10400. lineColor = helpers.valueAtIndexOrDefault(gridLines.color, index);
  10401. borderDash = helpers.valueOrDefault(gridLines.borderDash, globalDefaults.borderDash);
  10402. borderDashOffset = helpers.valueOrDefault(gridLines.borderDashOffset, globalDefaults.borderDashOffset);
  10403. }
  10404. // Common properties
  10405. var tx1, ty1, tx2, ty2, x1, y1, x2, y2, labelX, labelY;
  10406. var textAlign = 'middle';
  10407. var textBaseline = 'middle';
  10408. var tickPadding = optionTicks.padding;
  10409. if (isHorizontal) {
  10410. var labelYOffset = tl + tickPadding;
  10411. if (options.position === 'bottom') {
  10412. // bottom
  10413. textBaseline = !isRotated ? 'top' : 'middle';
  10414. textAlign = !isRotated ? 'center' : 'right';
  10415. labelY = me.top + labelYOffset;
  10416. } else {
  10417. // top
  10418. textBaseline = !isRotated ? 'bottom' : 'middle';
  10419. textAlign = !isRotated ? 'center' : 'left';
  10420. labelY = me.bottom - labelYOffset;
  10421. }
  10422. var xLineValue = getLineValue(me, index, gridLines.offsetGridLines && ticks.length > 1);
  10423. if (xLineValue < me.left) {
  10424. lineColor = 'rgba(0,0,0,0)';
  10425. }
  10426. xLineValue += helpers.aliasPixel(lineWidth);
  10427. labelX = me.getPixelForTick(index) + optionTicks.labelOffset; // x values for optionTicks (need to consider offsetLabel option)
  10428. tx1 = tx2 = x1 = x2 = xLineValue;
  10429. ty1 = yTickStart;
  10430. ty2 = yTickEnd;
  10431. y1 = chartArea.top;
  10432. y2 = chartArea.bottom + axisWidth;
  10433. } else {
  10434. var isLeft = options.position === 'left';
  10435. var labelXOffset;
  10436. if (optionTicks.mirror) {
  10437. textAlign = isLeft ? 'left' : 'right';
  10438. labelXOffset = tickPadding;
  10439. } else {
  10440. textAlign = isLeft ? 'right' : 'left';
  10441. labelXOffset = tl + tickPadding;
  10442. }
  10443. labelX = isLeft ? me.right - labelXOffset : me.left + labelXOffset;
  10444. var yLineValue = getLineValue(me, index, gridLines.offsetGridLines && ticks.length > 1);
  10445. if (yLineValue < me.top) {
  10446. lineColor = 'rgba(0,0,0,0)';
  10447. }
  10448. yLineValue += helpers.aliasPixel(lineWidth);
  10449. labelY = me.getPixelForTick(index) + optionTicks.labelOffset;
  10450. tx1 = xTickStart;
  10451. tx2 = xTickEnd;
  10452. x1 = chartArea.left;
  10453. x2 = chartArea.right + axisWidth;
  10454. ty1 = ty2 = y1 = y2 = yLineValue;
  10455. }
  10456. itemsToDraw.push({
  10457. tx1: tx1,
  10458. ty1: ty1,
  10459. tx2: tx2,
  10460. ty2: ty2,
  10461. x1: x1,
  10462. y1: y1,
  10463. x2: x2,
  10464. y2: y2,
  10465. labelX: labelX,
  10466. labelY: labelY,
  10467. glWidth: lineWidth,
  10468. glColor: lineColor,
  10469. glBorderDash: borderDash,
  10470. glBorderDashOffset: borderDashOffset,
  10471. rotation: -1 * labelRotationRadians,
  10472. label: label,
  10473. major: tick.major,
  10474. textBaseline: textBaseline,
  10475. textAlign: textAlign
  10476. });
  10477. });
  10478. // Draw all of the tick labels, tick marks, and grid lines at the correct places
  10479. helpers.each(itemsToDraw, function(itemToDraw) {
  10480. if (gridLines.display) {
  10481. context.save();
  10482. context.lineWidth = itemToDraw.glWidth;
  10483. context.strokeStyle = itemToDraw.glColor;
  10484. if (context.setLineDash) {
  10485. context.setLineDash(itemToDraw.glBorderDash);
  10486. context.lineDashOffset = itemToDraw.glBorderDashOffset;
  10487. }
  10488. context.beginPath();
  10489. if (gridLines.drawTicks) {
  10490. context.moveTo(itemToDraw.tx1, itemToDraw.ty1);
  10491. context.lineTo(itemToDraw.tx2, itemToDraw.ty2);
  10492. }
  10493. if (gridLines.drawOnChartArea) {
  10494. context.moveTo(itemToDraw.x1, itemToDraw.y1);
  10495. context.lineTo(itemToDraw.x2, itemToDraw.y2);
  10496. }
  10497. context.stroke();
  10498. context.restore();
  10499. }
  10500. if (optionTicks.display) {
  10501. // Make sure we draw text in the correct color and font
  10502. context.save();
  10503. context.translate(itemToDraw.labelX, itemToDraw.labelY);
  10504. context.rotate(itemToDraw.rotation);
  10505. context.font = itemToDraw.major ? majorTickFont.font : tickFont.font;
  10506. context.fillStyle = itemToDraw.major ? majorTickFontColor : tickFontColor;
  10507. context.textBaseline = itemToDraw.textBaseline;
  10508. context.textAlign = itemToDraw.textAlign;
  10509. var label = itemToDraw.label;
  10510. if (helpers.isArray(label)) {
  10511. var lineCount = label.length;
  10512. var lineHeight = tickFont.size * 1.5;
  10513. var y = me.isHorizontal() ? 0 : -lineHeight * (lineCount - 1) / 2;
  10514. for (var i = 0; i < lineCount; ++i) {
  10515. // We just make sure the multiline element is a string here..
  10516. context.fillText('' + label[i], 0, y);
  10517. // apply same lineSpacing as calculated @ L#320
  10518. y += lineHeight;
  10519. }
  10520. } else {
  10521. context.fillText(label, 0, 0);
  10522. }
  10523. context.restore();
  10524. }
  10525. });
  10526. if (scaleLabel.display) {
  10527. // Draw the scale label
  10528. var scaleLabelX;
  10529. var scaleLabelY;
  10530. var rotation = 0;
  10531. var halfLineHeight = parseLineHeight(scaleLabel) / 2;
  10532. if (isHorizontal) {
  10533. scaleLabelX = me.left + ((me.right - me.left) / 2); // midpoint of the width
  10534. scaleLabelY = options.position === 'bottom'
  10535. ? me.bottom - halfLineHeight - scaleLabelPadding.bottom
  10536. : me.top + halfLineHeight + scaleLabelPadding.top;
  10537. } else {
  10538. var isLeft = options.position === 'left';
  10539. scaleLabelX = isLeft
  10540. ? me.left + halfLineHeight + scaleLabelPadding.top
  10541. : me.right - halfLineHeight - scaleLabelPadding.top;
  10542. scaleLabelY = me.top + ((me.bottom - me.top) / 2);
  10543. rotation = isLeft ? -0.5 * Math.PI : 0.5 * Math.PI;
  10544. }
  10545. context.save();
  10546. context.translate(scaleLabelX, scaleLabelY);
  10547. context.rotate(rotation);
  10548. context.textAlign = 'center';
  10549. context.textBaseline = 'middle';
  10550. context.fillStyle = scaleLabelFontColor; // render in correct colour
  10551. context.font = scaleLabelFont.font;
  10552. context.fillText(scaleLabel.labelString, 0, 0);
  10553. context.restore();
  10554. }
  10555. if (gridLines.drawBorder) {
  10556. // Draw the line at the edge of the axis
  10557. context.lineWidth = helpers.valueAtIndexOrDefault(gridLines.lineWidth, 0);
  10558. context.strokeStyle = helpers.valueAtIndexOrDefault(gridLines.color, 0);
  10559. var x1 = me.left;
  10560. var x2 = me.right + axisWidth;
  10561. var y1 = me.top;
  10562. var y2 = me.bottom + axisWidth;
  10563. var aliasPixel = helpers.aliasPixel(context.lineWidth);
  10564. if (isHorizontal) {
  10565. y1 = y2 = options.position === 'top' ? me.bottom : me.top;
  10566. y1 += aliasPixel;
  10567. y2 += aliasPixel;
  10568. } else {
  10569. x1 = x2 = options.position === 'left' ? me.right : me.left;
  10570. x1 += aliasPixel;
  10571. x2 += aliasPixel;
  10572. }
  10573. context.beginPath();
  10574. context.moveTo(x1, y1);
  10575. context.lineTo(x2, y2);
  10576. context.stroke();
  10577. }
  10578. }
  10579. });
  10580. };
  10581. },{"25":25,"26":26,"34":34,"45":45}],33:[function(require,module,exports){
  10582. 'use strict';
  10583. var defaults = require(25);
  10584. var helpers = require(45);
  10585. var layouts = require(30);
  10586. module.exports = function(Chart) {
  10587. Chart.scaleService = {
  10588. // Scale registration object. Extensions can register new scale types (such as log or DB scales) and then
  10589. // use the new chart options to grab the correct scale
  10590. constructors: {},
  10591. // Use a registration function so that we can move to an ES6 map when we no longer need to support
  10592. // old browsers
  10593. // Scale config defaults
  10594. defaults: {},
  10595. registerScaleType: function(type, scaleConstructor, scaleDefaults) {
  10596. this.constructors[type] = scaleConstructor;
  10597. this.defaults[type] = helpers.clone(scaleDefaults);
  10598. },
  10599. getScaleConstructor: function(type) {
  10600. return this.constructors.hasOwnProperty(type) ? this.constructors[type] : undefined;
  10601. },
  10602. getScaleDefaults: function(type) {
  10603. // Return the scale defaults merged with the global settings so that we always use the latest ones
  10604. return this.defaults.hasOwnProperty(type) ? helpers.merge({}, [defaults.scale, this.defaults[type]]) : {};
  10605. },
  10606. updateScaleDefaults: function(type, additions) {
  10607. var me = this;
  10608. if (me.defaults.hasOwnProperty(type)) {
  10609. me.defaults[type] = helpers.extend(me.defaults[type], additions);
  10610. }
  10611. },
  10612. addScalesToLayout: function(chart) {
  10613. // Adds each scale to the chart.boxes array to be sized accordingly
  10614. helpers.each(chart.scales, function(scale) {
  10615. // Set ILayoutItem parameters for backwards compatibility
  10616. scale.fullWidth = scale.options.fullWidth;
  10617. scale.position = scale.options.position;
  10618. scale.weight = scale.options.weight;
  10619. layouts.addBox(chart, scale);
  10620. });
  10621. }
  10622. };
  10623. };
  10624. },{"25":25,"30":30,"45":45}],34:[function(require,module,exports){
  10625. 'use strict';
  10626. var helpers = require(45);
  10627. /**
  10628. * Namespace to hold static tick generation functions
  10629. * @namespace Chart.Ticks
  10630. */
  10631. module.exports = {
  10632. /**
  10633. * Namespace to hold formatters for different types of ticks
  10634. * @namespace Chart.Ticks.formatters
  10635. */
  10636. formatters: {
  10637. /**
  10638. * Formatter for value labels
  10639. * @method Chart.Ticks.formatters.values
  10640. * @param value the value to display
  10641. * @return {String|Array} the label to display
  10642. */
  10643. values: function(value) {
  10644. return helpers.isArray(value) ? value : '' + value;
  10645. },
  10646. /**
  10647. * Formatter for linear numeric ticks
  10648. * @method Chart.Ticks.formatters.linear
  10649. * @param tickValue {Number} the value to be formatted
  10650. * @param index {Number} the position of the tickValue parameter in the ticks array
  10651. * @param ticks {Array<Number>} the list of ticks being converted
  10652. * @return {String} string representation of the tickValue parameter
  10653. */
  10654. linear: function(tickValue, index, ticks) {
  10655. // If we have lots of ticks, don't use the ones
  10656. var delta = ticks.length > 3 ? ticks[2] - ticks[1] : ticks[1] - ticks[0];
  10657. // If we have a number like 2.5 as the delta, figure out how many decimal places we need
  10658. if (Math.abs(delta) > 1) {
  10659. if (tickValue !== Math.floor(tickValue)) {
  10660. // not an integer
  10661. delta = tickValue - Math.floor(tickValue);
  10662. }
  10663. }
  10664. var logDelta = helpers.log10(Math.abs(delta));
  10665. var tickString = '';
  10666. if (tickValue !== 0) {
  10667. var numDecimal = -1 * Math.floor(logDelta);
  10668. numDecimal = Math.max(Math.min(numDecimal, 20), 0); // toFixed has a max of 20 decimal places
  10669. tickString = tickValue.toFixed(numDecimal);
  10670. } else {
  10671. tickString = '0'; // never show decimal places for 0
  10672. }
  10673. return tickString;
  10674. },
  10675. logarithmic: function(tickValue, index, ticks) {
  10676. var remain = tickValue / (Math.pow(10, Math.floor(helpers.log10(tickValue))));
  10677. if (tickValue === 0) {
  10678. return '0';
  10679. } else if (remain === 1 || remain === 2 || remain === 5 || index === 0 || index === ticks.length - 1) {
  10680. return tickValue.toExponential();
  10681. }
  10682. return '';
  10683. }
  10684. }
  10685. };
  10686. },{"45":45}],35:[function(require,module,exports){
  10687. 'use strict';
  10688. var defaults = require(25);
  10689. var Element = require(26);
  10690. var helpers = require(45);
  10691. defaults._set('global', {
  10692. tooltips: {
  10693. enabled: true,
  10694. custom: null,
  10695. mode: 'nearest',
  10696. position: 'average',
  10697. intersect: true,
  10698. backgroundColor: 'rgba(0,0,0,0.8)',
  10699. titleFontStyle: 'bold',
  10700. titleSpacing: 2,
  10701. titleMarginBottom: 6,
  10702. titleFontColor: '#fff',
  10703. titleAlign: 'left',
  10704. bodySpacing: 2,
  10705. bodyFontColor: '#fff',
  10706. bodyAlign: 'left',
  10707. footerFontStyle: 'bold',
  10708. footerSpacing: 2,
  10709. footerMarginTop: 6,
  10710. footerFontColor: '#fff',
  10711. footerAlign: 'left',
  10712. yPadding: 6,
  10713. xPadding: 6,
  10714. caretPadding: 2,
  10715. caretSize: 5,
  10716. cornerRadius: 6,
  10717. multiKeyBackground: '#fff',
  10718. displayColors: true,
  10719. borderColor: 'rgba(0,0,0,0)',
  10720. borderWidth: 0,
  10721. callbacks: {
  10722. // Args are: (tooltipItems, data)
  10723. beforeTitle: helpers.noop,
  10724. title: function(tooltipItems, data) {
  10725. // Pick first xLabel for now
  10726. var title = '';
  10727. var labels = data.labels;
  10728. var labelCount = labels ? labels.length : 0;
  10729. if (tooltipItems.length > 0) {
  10730. var item = tooltipItems[0];
  10731. if (item.xLabel) {
  10732. title = item.xLabel;
  10733. } else if (labelCount > 0 && item.index < labelCount) {
  10734. title = labels[item.index];
  10735. }
  10736. }
  10737. return title;
  10738. },
  10739. afterTitle: helpers.noop,
  10740. // Args are: (tooltipItems, data)
  10741. beforeBody: helpers.noop,
  10742. // Args are: (tooltipItem, data)
  10743. beforeLabel: helpers.noop,
  10744. label: function(tooltipItem, data) {
  10745. var label = data.datasets[tooltipItem.datasetIndex].label || '';
  10746. if (label) {
  10747. label += ': ';
  10748. }
  10749. label += tooltipItem.yLabel;
  10750. return label;
  10751. },
  10752. labelColor: function(tooltipItem, chart) {
  10753. var meta = chart.getDatasetMeta(tooltipItem.datasetIndex);
  10754. var activeElement = meta.data[tooltipItem.index];
  10755. var view = activeElement._view;
  10756. return {
  10757. borderColor: view.borderColor,
  10758. backgroundColor: view.backgroundColor
  10759. };
  10760. },
  10761. labelTextColor: function() {
  10762. return this._options.bodyFontColor;
  10763. },
  10764. afterLabel: helpers.noop,
  10765. // Args are: (tooltipItems, data)
  10766. afterBody: helpers.noop,
  10767. // Args are: (tooltipItems, data)
  10768. beforeFooter: helpers.noop,
  10769. footer: helpers.noop,
  10770. afterFooter: helpers.noop
  10771. }
  10772. }
  10773. });
  10774. module.exports = function(Chart) {
  10775. /**
  10776. * Helper method to merge the opacity into a color
  10777. */
  10778. function mergeOpacity(colorString, opacity) {
  10779. var color = helpers.color(colorString);
  10780. return color.alpha(opacity * color.alpha()).rgbaString();
  10781. }
  10782. // Helper to push or concat based on if the 2nd parameter is an array or not
  10783. function pushOrConcat(base, toPush) {
  10784. if (toPush) {
  10785. if (helpers.isArray(toPush)) {
  10786. // base = base.concat(toPush);
  10787. Array.prototype.push.apply(base, toPush);
  10788. } else {
  10789. base.push(toPush);
  10790. }
  10791. }
  10792. return base;
  10793. }
  10794. // Private helper to create a tooltip item model
  10795. // @param element : the chart element (point, arc, bar) to create the tooltip item for
  10796. // @return : new tooltip item
  10797. function createTooltipItem(element) {
  10798. var xScale = element._xScale;
  10799. var yScale = element._yScale || element._scale; // handle radar || polarArea charts
  10800. var index = element._index;
  10801. var datasetIndex = element._datasetIndex;
  10802. return {
  10803. xLabel: xScale ? xScale.getLabelForIndex(index, datasetIndex) : '',
  10804. yLabel: yScale ? yScale.getLabelForIndex(index, datasetIndex) : '',
  10805. index: index,
  10806. datasetIndex: datasetIndex,
  10807. x: element._model.x,
  10808. y: element._model.y
  10809. };
  10810. }
  10811. /**
  10812. * Helper to get the reset model for the tooltip
  10813. * @param tooltipOpts {Object} the tooltip options
  10814. */
  10815. function getBaseModel(tooltipOpts) {
  10816. var globalDefaults = defaults.global;
  10817. var valueOrDefault = helpers.valueOrDefault;
  10818. return {
  10819. // Positioning
  10820. xPadding: tooltipOpts.xPadding,
  10821. yPadding: tooltipOpts.yPadding,
  10822. xAlign: tooltipOpts.xAlign,
  10823. yAlign: tooltipOpts.yAlign,
  10824. // Body
  10825. bodyFontColor: tooltipOpts.bodyFontColor,
  10826. _bodyFontFamily: valueOrDefault(tooltipOpts.bodyFontFamily, globalDefaults.defaultFontFamily),
  10827. _bodyFontStyle: valueOrDefault(tooltipOpts.bodyFontStyle, globalDefaults.defaultFontStyle),
  10828. _bodyAlign: tooltipOpts.bodyAlign,
  10829. bodyFontSize: valueOrDefault(tooltipOpts.bodyFontSize, globalDefaults.defaultFontSize),
  10830. bodySpacing: tooltipOpts.bodySpacing,
  10831. // Title
  10832. titleFontColor: tooltipOpts.titleFontColor,
  10833. _titleFontFamily: valueOrDefault(tooltipOpts.titleFontFamily, globalDefaults.defaultFontFamily),
  10834. _titleFontStyle: valueOrDefault(tooltipOpts.titleFontStyle, globalDefaults.defaultFontStyle),
  10835. titleFontSize: valueOrDefault(tooltipOpts.titleFontSize, globalDefaults.defaultFontSize),
  10836. _titleAlign: tooltipOpts.titleAlign,
  10837. titleSpacing: tooltipOpts.titleSpacing,
  10838. titleMarginBottom: tooltipOpts.titleMarginBottom,
  10839. // Footer
  10840. footerFontColor: tooltipOpts.footerFontColor,
  10841. _footerFontFamily: valueOrDefault(tooltipOpts.footerFontFamily, globalDefaults.defaultFontFamily),
  10842. _footerFontStyle: valueOrDefault(tooltipOpts.footerFontStyle, globalDefaults.defaultFontStyle),
  10843. footerFontSize: valueOrDefault(tooltipOpts.footerFontSize, globalDefaults.defaultFontSize),
  10844. _footerAlign: tooltipOpts.footerAlign,
  10845. footerSpacing: tooltipOpts.footerSpacing,
  10846. footerMarginTop: tooltipOpts.footerMarginTop,
  10847. // Appearance
  10848. caretSize: tooltipOpts.caretSize,
  10849. cornerRadius: tooltipOpts.cornerRadius,
  10850. backgroundColor: tooltipOpts.backgroundColor,
  10851. opacity: 0,
  10852. legendColorBackground: tooltipOpts.multiKeyBackground,
  10853. displayColors: tooltipOpts.displayColors,
  10854. borderColor: tooltipOpts.borderColor,
  10855. borderWidth: tooltipOpts.borderWidth
  10856. };
  10857. }
  10858. /**
  10859. * Get the size of the tooltip
  10860. */
  10861. function getTooltipSize(tooltip, model) {
  10862. var ctx = tooltip._chart.ctx;
  10863. var height = model.yPadding * 2; // Tooltip Padding
  10864. var width = 0;
  10865. // Count of all lines in the body
  10866. var body = model.body;
  10867. var combinedBodyLength = body.reduce(function(count, bodyItem) {
  10868. return count + bodyItem.before.length + bodyItem.lines.length + bodyItem.after.length;
  10869. }, 0);
  10870. combinedBodyLength += model.beforeBody.length + model.afterBody.length;
  10871. var titleLineCount = model.title.length;
  10872. var footerLineCount = model.footer.length;
  10873. var titleFontSize = model.titleFontSize;
  10874. var bodyFontSize = model.bodyFontSize;
  10875. var footerFontSize = model.footerFontSize;
  10876. height += titleLineCount * titleFontSize; // Title Lines
  10877. height += titleLineCount ? (titleLineCount - 1) * model.titleSpacing : 0; // Title Line Spacing
  10878. height += titleLineCount ? model.titleMarginBottom : 0; // Title's bottom Margin
  10879. height += combinedBodyLength * bodyFontSize; // Body Lines
  10880. height += combinedBodyLength ? (combinedBodyLength - 1) * model.bodySpacing : 0; // Body Line Spacing
  10881. height += footerLineCount ? model.footerMarginTop : 0; // Footer Margin
  10882. height += footerLineCount * (footerFontSize); // Footer Lines
  10883. height += footerLineCount ? (footerLineCount - 1) * model.footerSpacing : 0; // Footer Line Spacing
  10884. // Title width
  10885. var widthPadding = 0;
  10886. var maxLineWidth = function(line) {
  10887. width = Math.max(width, ctx.measureText(line).width + widthPadding);
  10888. };
  10889. ctx.font = helpers.fontString(titleFontSize, model._titleFontStyle, model._titleFontFamily);
  10890. helpers.each(model.title, maxLineWidth);
  10891. // Body width
  10892. ctx.font = helpers.fontString(bodyFontSize, model._bodyFontStyle, model._bodyFontFamily);
  10893. helpers.each(model.beforeBody.concat(model.afterBody), maxLineWidth);
  10894. // Body lines may include some extra width due to the color box
  10895. widthPadding = model.displayColors ? (bodyFontSize + 2) : 0;
  10896. helpers.each(body, function(bodyItem) {
  10897. helpers.each(bodyItem.before, maxLineWidth);
  10898. helpers.each(bodyItem.lines, maxLineWidth);
  10899. helpers.each(bodyItem.after, maxLineWidth);
  10900. });
  10901. // Reset back to 0
  10902. widthPadding = 0;
  10903. // Footer width
  10904. ctx.font = helpers.fontString(footerFontSize, model._footerFontStyle, model._footerFontFamily);
  10905. helpers.each(model.footer, maxLineWidth);
  10906. // Add padding
  10907. width += 2 * model.xPadding;
  10908. return {
  10909. width: width,
  10910. height: height
  10911. };
  10912. }
  10913. /**
  10914. * Helper to get the alignment of a tooltip given the size
  10915. */
  10916. function determineAlignment(tooltip, size) {
  10917. var model = tooltip._model;
  10918. var chart = tooltip._chart;
  10919. var chartArea = tooltip._chart.chartArea;
  10920. var xAlign = 'center';
  10921. var yAlign = 'center';
  10922. if (model.y < size.height) {
  10923. yAlign = 'top';
  10924. } else if (model.y > (chart.height - size.height)) {
  10925. yAlign = 'bottom';
  10926. }
  10927. var lf, rf; // functions to determine left, right alignment
  10928. var olf, orf; // functions to determine if left/right alignment causes tooltip to go outside chart
  10929. var yf; // function to get the y alignment if the tooltip goes outside of the left or right edges
  10930. var midX = (chartArea.left + chartArea.right) / 2;
  10931. var midY = (chartArea.top + chartArea.bottom) / 2;
  10932. if (yAlign === 'center') {
  10933. lf = function(x) {
  10934. return x <= midX;
  10935. };
  10936. rf = function(x) {
  10937. return x > midX;
  10938. };
  10939. } else {
  10940. lf = function(x) {
  10941. return x <= (size.width / 2);
  10942. };
  10943. rf = function(x) {
  10944. return x >= (chart.width - (size.width / 2));
  10945. };
  10946. }
  10947. olf = function(x) {
  10948. return x + size.width + model.caretSize + model.caretPadding > chart.width;
  10949. };
  10950. orf = function(x) {
  10951. return x - size.width - model.caretSize - model.caretPadding < 0;
  10952. };
  10953. yf = function(y) {
  10954. return y <= midY ? 'top' : 'bottom';
  10955. };
  10956. if (lf(model.x)) {
  10957. xAlign = 'left';
  10958. // Is tooltip too wide and goes over the right side of the chart.?
  10959. if (olf(model.x)) {
  10960. xAlign = 'center';
  10961. yAlign = yf(model.y);
  10962. }
  10963. } else if (rf(model.x)) {
  10964. xAlign = 'right';
  10965. // Is tooltip too wide and goes outside left edge of canvas?
  10966. if (orf(model.x)) {
  10967. xAlign = 'center';
  10968. yAlign = yf(model.y);
  10969. }
  10970. }
  10971. var opts = tooltip._options;
  10972. return {
  10973. xAlign: opts.xAlign ? opts.xAlign : xAlign,
  10974. yAlign: opts.yAlign ? opts.yAlign : yAlign
  10975. };
  10976. }
  10977. /**
  10978. * @Helper to get the location a tooltip needs to be placed at given the initial position (via the vm) and the size and alignment
  10979. */
  10980. function getBackgroundPoint(vm, size, alignment, chart) {
  10981. // Background Position
  10982. var x = vm.x;
  10983. var y = vm.y;
  10984. var caretSize = vm.caretSize;
  10985. var caretPadding = vm.caretPadding;
  10986. var cornerRadius = vm.cornerRadius;
  10987. var xAlign = alignment.xAlign;
  10988. var yAlign = alignment.yAlign;
  10989. var paddingAndSize = caretSize + caretPadding;
  10990. var radiusAndPadding = cornerRadius + caretPadding;
  10991. if (xAlign === 'right') {
  10992. x -= size.width;
  10993. } else if (xAlign === 'center') {
  10994. x -= (size.width / 2);
  10995. if (x + size.width > chart.width) {
  10996. x = chart.width - size.width;
  10997. }
  10998. if (x < 0) {
  10999. x = 0;
  11000. }
  11001. }
  11002. if (yAlign === 'top') {
  11003. y += paddingAndSize;
  11004. } else if (yAlign === 'bottom') {
  11005. y -= size.height + paddingAndSize;
  11006. } else {
  11007. y -= (size.height / 2);
  11008. }
  11009. if (yAlign === 'center') {
  11010. if (xAlign === 'left') {
  11011. x += paddingAndSize;
  11012. } else if (xAlign === 'right') {
  11013. x -= paddingAndSize;
  11014. }
  11015. } else if (xAlign === 'left') {
  11016. x -= radiusAndPadding;
  11017. } else if (xAlign === 'right') {
  11018. x += radiusAndPadding;
  11019. }
  11020. return {
  11021. x: x,
  11022. y: y
  11023. };
  11024. }
  11025. Chart.Tooltip = Element.extend({
  11026. initialize: function() {
  11027. this._model = getBaseModel(this._options);
  11028. this._lastActive = [];
  11029. },
  11030. // Get the title
  11031. // Args are: (tooltipItem, data)
  11032. getTitle: function() {
  11033. var me = this;
  11034. var opts = me._options;
  11035. var callbacks = opts.callbacks;
  11036. var beforeTitle = callbacks.beforeTitle.apply(me, arguments);
  11037. var title = callbacks.title.apply(me, arguments);
  11038. var afterTitle = callbacks.afterTitle.apply(me, arguments);
  11039. var lines = [];
  11040. lines = pushOrConcat(lines, beforeTitle);
  11041. lines = pushOrConcat(lines, title);
  11042. lines = pushOrConcat(lines, afterTitle);
  11043. return lines;
  11044. },
  11045. // Args are: (tooltipItem, data)
  11046. getBeforeBody: function() {
  11047. var lines = this._options.callbacks.beforeBody.apply(this, arguments);
  11048. return helpers.isArray(lines) ? lines : lines !== undefined ? [lines] : [];
  11049. },
  11050. // Args are: (tooltipItem, data)
  11051. getBody: function(tooltipItems, data) {
  11052. var me = this;
  11053. var callbacks = me._options.callbacks;
  11054. var bodyItems = [];
  11055. helpers.each(tooltipItems, function(tooltipItem) {
  11056. var bodyItem = {
  11057. before: [],
  11058. lines: [],
  11059. after: []
  11060. };
  11061. pushOrConcat(bodyItem.before, callbacks.beforeLabel.call(me, tooltipItem, data));
  11062. pushOrConcat(bodyItem.lines, callbacks.label.call(me, tooltipItem, data));
  11063. pushOrConcat(bodyItem.after, callbacks.afterLabel.call(me, tooltipItem, data));
  11064. bodyItems.push(bodyItem);
  11065. });
  11066. return bodyItems;
  11067. },
  11068. // Args are: (tooltipItem, data)
  11069. getAfterBody: function() {
  11070. var lines = this._options.callbacks.afterBody.apply(this, arguments);
  11071. return helpers.isArray(lines) ? lines : lines !== undefined ? [lines] : [];
  11072. },
  11073. // Get the footer and beforeFooter and afterFooter lines
  11074. // Args are: (tooltipItem, data)
  11075. getFooter: function() {
  11076. var me = this;
  11077. var callbacks = me._options.callbacks;
  11078. var beforeFooter = callbacks.beforeFooter.apply(me, arguments);
  11079. var footer = callbacks.footer.apply(me, arguments);
  11080. var afterFooter = callbacks.afterFooter.apply(me, arguments);
  11081. var lines = [];
  11082. lines = pushOrConcat(lines, beforeFooter);
  11083. lines = pushOrConcat(lines, footer);
  11084. lines = pushOrConcat(lines, afterFooter);
  11085. return lines;
  11086. },
  11087. update: function(changed) {
  11088. var me = this;
  11089. var opts = me._options;
  11090. // Need to regenerate the model because its faster than using extend and it is necessary due to the optimization in Chart.Element.transition
  11091. // that does _view = _model if ease === 1. This causes the 2nd tooltip update to set properties in both the view and model at the same time
  11092. // which breaks any animations.
  11093. var existingModel = me._model;
  11094. var model = me._model = getBaseModel(opts);
  11095. var active = me._active;
  11096. var data = me._data;
  11097. // In the case where active.length === 0 we need to keep these at existing values for good animations
  11098. var alignment = {
  11099. xAlign: existingModel.xAlign,
  11100. yAlign: existingModel.yAlign
  11101. };
  11102. var backgroundPoint = {
  11103. x: existingModel.x,
  11104. y: existingModel.y
  11105. };
  11106. var tooltipSize = {
  11107. width: existingModel.width,
  11108. height: existingModel.height
  11109. };
  11110. var tooltipPosition = {
  11111. x: existingModel.caretX,
  11112. y: existingModel.caretY
  11113. };
  11114. var i, len;
  11115. if (active.length) {
  11116. model.opacity = 1;
  11117. var labelColors = [];
  11118. var labelTextColors = [];
  11119. tooltipPosition = Chart.Tooltip.positioners[opts.position].call(me, active, me._eventPosition);
  11120. var tooltipItems = [];
  11121. for (i = 0, len = active.length; i < len; ++i) {
  11122. tooltipItems.push(createTooltipItem(active[i]));
  11123. }
  11124. // If the user provided a filter function, use it to modify the tooltip items
  11125. if (opts.filter) {
  11126. tooltipItems = tooltipItems.filter(function(a) {
  11127. return opts.filter(a, data);
  11128. });
  11129. }
  11130. // If the user provided a sorting function, use it to modify the tooltip items
  11131. if (opts.itemSort) {
  11132. tooltipItems = tooltipItems.sort(function(a, b) {
  11133. return opts.itemSort(a, b, data);
  11134. });
  11135. }
  11136. // Determine colors for boxes
  11137. helpers.each(tooltipItems, function(tooltipItem) {
  11138. labelColors.push(opts.callbacks.labelColor.call(me, tooltipItem, me._chart));
  11139. labelTextColors.push(opts.callbacks.labelTextColor.call(me, tooltipItem, me._chart));
  11140. });
  11141. // Build the Text Lines
  11142. model.title = me.getTitle(tooltipItems, data);
  11143. model.beforeBody = me.getBeforeBody(tooltipItems, data);
  11144. model.body = me.getBody(tooltipItems, data);
  11145. model.afterBody = me.getAfterBody(tooltipItems, data);
  11146. model.footer = me.getFooter(tooltipItems, data);
  11147. // Initial positioning and colors
  11148. model.x = Math.round(tooltipPosition.x);
  11149. model.y = Math.round(tooltipPosition.y);
  11150. model.caretPadding = opts.caretPadding;
  11151. model.labelColors = labelColors;
  11152. model.labelTextColors = labelTextColors;
  11153. // data points
  11154. model.dataPoints = tooltipItems;
  11155. // We need to determine alignment of the tooltip
  11156. tooltipSize = getTooltipSize(this, model);
  11157. alignment = determineAlignment(this, tooltipSize);
  11158. // Final Size and Position
  11159. backgroundPoint = getBackgroundPoint(model, tooltipSize, alignment, me._chart);
  11160. } else {
  11161. model.opacity = 0;
  11162. }
  11163. model.xAlign = alignment.xAlign;
  11164. model.yAlign = alignment.yAlign;
  11165. model.x = backgroundPoint.x;
  11166. model.y = backgroundPoint.y;
  11167. model.width = tooltipSize.width;
  11168. model.height = tooltipSize.height;
  11169. // Point where the caret on the tooltip points to
  11170. model.caretX = tooltipPosition.x;
  11171. model.caretY = tooltipPosition.y;
  11172. me._model = model;
  11173. if (changed && opts.custom) {
  11174. opts.custom.call(me, model);
  11175. }
  11176. return me;
  11177. },
  11178. drawCaret: function(tooltipPoint, size) {
  11179. var ctx = this._chart.ctx;
  11180. var vm = this._view;
  11181. var caretPosition = this.getCaretPosition(tooltipPoint, size, vm);
  11182. ctx.lineTo(caretPosition.x1, caretPosition.y1);
  11183. ctx.lineTo(caretPosition.x2, caretPosition.y2);
  11184. ctx.lineTo(caretPosition.x3, caretPosition.y3);
  11185. },
  11186. getCaretPosition: function(tooltipPoint, size, vm) {
  11187. var x1, x2, x3, y1, y2, y3;
  11188. var caretSize = vm.caretSize;
  11189. var cornerRadius = vm.cornerRadius;
  11190. var xAlign = vm.xAlign;
  11191. var yAlign = vm.yAlign;
  11192. var ptX = tooltipPoint.x;
  11193. var ptY = tooltipPoint.y;
  11194. var width = size.width;
  11195. var height = size.height;
  11196. if (yAlign === 'center') {
  11197. y2 = ptY + (height / 2);
  11198. if (xAlign === 'left') {
  11199. x1 = ptX;
  11200. x2 = x1 - caretSize;
  11201. x3 = x1;
  11202. y1 = y2 + caretSize;
  11203. y3 = y2 - caretSize;
  11204. } else {
  11205. x1 = ptX + width;
  11206. x2 = x1 + caretSize;
  11207. x3 = x1;
  11208. y1 = y2 - caretSize;
  11209. y3 = y2 + caretSize;
  11210. }
  11211. } else {
  11212. if (xAlign === 'left') {
  11213. x2 = ptX + cornerRadius + (caretSize);
  11214. x1 = x2 - caretSize;
  11215. x3 = x2 + caretSize;
  11216. } else if (xAlign === 'right') {
  11217. x2 = ptX + width - cornerRadius - caretSize;
  11218. x1 = x2 - caretSize;
  11219. x3 = x2 + caretSize;
  11220. } else {
  11221. x2 = vm.caretX;
  11222. x1 = x2 - caretSize;
  11223. x3 = x2 + caretSize;
  11224. }
  11225. if (yAlign === 'top') {
  11226. y1 = ptY;
  11227. y2 = y1 - caretSize;
  11228. y3 = y1;
  11229. } else {
  11230. y1 = ptY + height;
  11231. y2 = y1 + caretSize;
  11232. y3 = y1;
  11233. // invert drawing order
  11234. var tmp = x3;
  11235. x3 = x1;
  11236. x1 = tmp;
  11237. }
  11238. }
  11239. return {x1: x1, x2: x2, x3: x3, y1: y1, y2: y2, y3: y3};
  11240. },
  11241. drawTitle: function(pt, vm, ctx, opacity) {
  11242. var title = vm.title;
  11243. if (title.length) {
  11244. ctx.textAlign = vm._titleAlign;
  11245. ctx.textBaseline = 'top';
  11246. var titleFontSize = vm.titleFontSize;
  11247. var titleSpacing = vm.titleSpacing;
  11248. ctx.fillStyle = mergeOpacity(vm.titleFontColor, opacity);
  11249. ctx.font = helpers.fontString(titleFontSize, vm._titleFontStyle, vm._titleFontFamily);
  11250. var i, len;
  11251. for (i = 0, len = title.length; i < len; ++i) {
  11252. ctx.fillText(title[i], pt.x, pt.y);
  11253. pt.y += titleFontSize + titleSpacing; // Line Height and spacing
  11254. if (i + 1 === title.length) {
  11255. pt.y += vm.titleMarginBottom - titleSpacing; // If Last, add margin, remove spacing
  11256. }
  11257. }
  11258. }
  11259. },
  11260. drawBody: function(pt, vm, ctx, opacity) {
  11261. var bodyFontSize = vm.bodyFontSize;
  11262. var bodySpacing = vm.bodySpacing;
  11263. var body = vm.body;
  11264. ctx.textAlign = vm._bodyAlign;
  11265. ctx.textBaseline = 'top';
  11266. ctx.font = helpers.fontString(bodyFontSize, vm._bodyFontStyle, vm._bodyFontFamily);
  11267. // Before Body
  11268. var xLinePadding = 0;
  11269. var fillLineOfText = function(line) {
  11270. ctx.fillText(line, pt.x + xLinePadding, pt.y);
  11271. pt.y += bodyFontSize + bodySpacing;
  11272. };
  11273. // Before body lines
  11274. ctx.fillStyle = mergeOpacity(vm.bodyFontColor, opacity);
  11275. helpers.each(vm.beforeBody, fillLineOfText);
  11276. var drawColorBoxes = vm.displayColors;
  11277. xLinePadding = drawColorBoxes ? (bodyFontSize + 2) : 0;
  11278. // Draw body lines now
  11279. helpers.each(body, function(bodyItem, i) {
  11280. var textColor = mergeOpacity(vm.labelTextColors[i], opacity);
  11281. ctx.fillStyle = textColor;
  11282. helpers.each(bodyItem.before, fillLineOfText);
  11283. helpers.each(bodyItem.lines, function(line) {
  11284. // Draw Legend-like boxes if needed
  11285. if (drawColorBoxes) {
  11286. // Fill a white rect so that colours merge nicely if the opacity is < 1
  11287. ctx.fillStyle = mergeOpacity(vm.legendColorBackground, opacity);
  11288. ctx.fillRect(pt.x, pt.y, bodyFontSize, bodyFontSize);
  11289. // Border
  11290. ctx.lineWidth = 1;
  11291. ctx.strokeStyle = mergeOpacity(vm.labelColors[i].borderColor, opacity);
  11292. ctx.strokeRect(pt.x, pt.y, bodyFontSize, bodyFontSize);
  11293. // Inner square
  11294. ctx.fillStyle = mergeOpacity(vm.labelColors[i].backgroundColor, opacity);
  11295. ctx.fillRect(pt.x + 1, pt.y + 1, bodyFontSize - 2, bodyFontSize - 2);
  11296. ctx.fillStyle = textColor;
  11297. }
  11298. fillLineOfText(line);
  11299. });
  11300. helpers.each(bodyItem.after, fillLineOfText);
  11301. });
  11302. // Reset back to 0 for after body
  11303. xLinePadding = 0;
  11304. // After body lines
  11305. helpers.each(vm.afterBody, fillLineOfText);
  11306. pt.y -= bodySpacing; // Remove last body spacing
  11307. },
  11308. drawFooter: function(pt, vm, ctx, opacity) {
  11309. var footer = vm.footer;
  11310. if (footer.length) {
  11311. pt.y += vm.footerMarginTop;
  11312. ctx.textAlign = vm._footerAlign;
  11313. ctx.textBaseline = 'top';
  11314. ctx.fillStyle = mergeOpacity(vm.footerFontColor, opacity);
  11315. ctx.font = helpers.fontString(vm.footerFontSize, vm._footerFontStyle, vm._footerFontFamily);
  11316. helpers.each(footer, function(line) {
  11317. ctx.fillText(line, pt.x, pt.y);
  11318. pt.y += vm.footerFontSize + vm.footerSpacing;
  11319. });
  11320. }
  11321. },
  11322. drawBackground: function(pt, vm, ctx, tooltipSize, opacity) {
  11323. ctx.fillStyle = mergeOpacity(vm.backgroundColor, opacity);
  11324. ctx.strokeStyle = mergeOpacity(vm.borderColor, opacity);
  11325. ctx.lineWidth = vm.borderWidth;
  11326. var xAlign = vm.xAlign;
  11327. var yAlign = vm.yAlign;
  11328. var x = pt.x;
  11329. var y = pt.y;
  11330. var width = tooltipSize.width;
  11331. var height = tooltipSize.height;
  11332. var radius = vm.cornerRadius;
  11333. ctx.beginPath();
  11334. ctx.moveTo(x + radius, y);
  11335. if (yAlign === 'top') {
  11336. this.drawCaret(pt, tooltipSize);
  11337. }
  11338. ctx.lineTo(x + width - radius, y);
  11339. ctx.quadraticCurveTo(x + width, y, x + width, y + radius);
  11340. if (yAlign === 'center' && xAlign === 'right') {
  11341. this.drawCaret(pt, tooltipSize);
  11342. }
  11343. ctx.lineTo(x + width, y + height - radius);
  11344. ctx.quadraticCurveTo(x + width, y + height, x + width - radius, y + height);
  11345. if (yAlign === 'bottom') {
  11346. this.drawCaret(pt, tooltipSize);
  11347. }
  11348. ctx.lineTo(x + radius, y + height);
  11349. ctx.quadraticCurveTo(x, y + height, x, y + height - radius);
  11350. if (yAlign === 'center' && xAlign === 'left') {
  11351. this.drawCaret(pt, tooltipSize);
  11352. }
  11353. ctx.lineTo(x, y + radius);
  11354. ctx.quadraticCurveTo(x, y, x + radius, y);
  11355. ctx.closePath();
  11356. ctx.fill();
  11357. if (vm.borderWidth > 0) {
  11358. ctx.stroke();
  11359. }
  11360. },
  11361. draw: function() {
  11362. var ctx = this._chart.ctx;
  11363. var vm = this._view;
  11364. if (vm.opacity === 0) {
  11365. return;
  11366. }
  11367. var tooltipSize = {
  11368. width: vm.width,
  11369. height: vm.height
  11370. };
  11371. var pt = {
  11372. x: vm.x,
  11373. y: vm.y
  11374. };
  11375. // IE11/Edge does not like very small opacities, so snap to 0
  11376. var opacity = Math.abs(vm.opacity < 1e-3) ? 0 : vm.opacity;
  11377. // Truthy/falsey value for empty tooltip
  11378. var hasTooltipContent = vm.title.length || vm.beforeBody.length || vm.body.length || vm.afterBody.length || vm.footer.length;
  11379. if (this._options.enabled && hasTooltipContent) {
  11380. // Draw Background
  11381. this.drawBackground(pt, vm, ctx, tooltipSize, opacity);
  11382. // Draw Title, Body, and Footer
  11383. pt.x += vm.xPadding;
  11384. pt.y += vm.yPadding;
  11385. // Titles
  11386. this.drawTitle(pt, vm, ctx, opacity);
  11387. // Body
  11388. this.drawBody(pt, vm, ctx, opacity);
  11389. // Footer
  11390. this.drawFooter(pt, vm, ctx, opacity);
  11391. }
  11392. },
  11393. /**
  11394. * Handle an event
  11395. * @private
  11396. * @param {IEvent} event - The event to handle
  11397. * @returns {Boolean} true if the tooltip changed
  11398. */
  11399. handleEvent: function(e) {
  11400. var me = this;
  11401. var options = me._options;
  11402. var changed = false;
  11403. me._lastActive = me._lastActive || [];
  11404. // Find Active Elements for tooltips
  11405. if (e.type === 'mouseout') {
  11406. me._active = [];
  11407. } else {
  11408. me._active = me._chart.getElementsAtEventForMode(e, options.mode, options);
  11409. }
  11410. // Remember Last Actives
  11411. changed = !helpers.arrayEquals(me._active, me._lastActive);
  11412. // Only handle target event on tooltip change
  11413. if (changed) {
  11414. me._lastActive = me._active;
  11415. if (options.enabled || options.custom) {
  11416. me._eventPosition = {
  11417. x: e.x,
  11418. y: e.y
  11419. };
  11420. me.update(true);
  11421. me.pivot();
  11422. }
  11423. }
  11424. return changed;
  11425. }
  11426. });
  11427. /**
  11428. * @namespace Chart.Tooltip.positioners
  11429. */
  11430. Chart.Tooltip.positioners = {
  11431. /**
  11432. * Average mode places the tooltip at the average position of the elements shown
  11433. * @function Chart.Tooltip.positioners.average
  11434. * @param elements {ChartElement[]} the elements being displayed in the tooltip
  11435. * @returns {Point} tooltip position
  11436. */
  11437. average: function(elements) {
  11438. if (!elements.length) {
  11439. return false;
  11440. }
  11441. var i, len;
  11442. var x = 0;
  11443. var y = 0;
  11444. var count = 0;
  11445. for (i = 0, len = elements.length; i < len; ++i) {
  11446. var el = elements[i];
  11447. if (el && el.hasValue()) {
  11448. var pos = el.tooltipPosition();
  11449. x += pos.x;
  11450. y += pos.y;
  11451. ++count;
  11452. }
  11453. }
  11454. return {
  11455. x: Math.round(x / count),
  11456. y: Math.round(y / count)
  11457. };
  11458. },
  11459. /**
  11460. * Gets the tooltip position nearest of the item nearest to the event position
  11461. * @function Chart.Tooltip.positioners.nearest
  11462. * @param elements {Chart.Element[]} the tooltip elements
  11463. * @param eventPosition {Point} the position of the event in canvas coordinates
  11464. * @returns {Point} the tooltip position
  11465. */
  11466. nearest: function(elements, eventPosition) {
  11467. var x = eventPosition.x;
  11468. var y = eventPosition.y;
  11469. var minDistance = Number.POSITIVE_INFINITY;
  11470. var i, len, nearestElement;
  11471. for (i = 0, len = elements.length; i < len; ++i) {
  11472. var el = elements[i];
  11473. if (el && el.hasValue()) {
  11474. var center = el.getCenterPoint();
  11475. var d = helpers.distanceBetweenPoints(eventPosition, center);
  11476. if (d < minDistance) {
  11477. minDistance = d;
  11478. nearestElement = el;
  11479. }
  11480. }
  11481. }
  11482. if (nearestElement) {
  11483. var tp = nearestElement.tooltipPosition();
  11484. x = tp.x;
  11485. y = tp.y;
  11486. }
  11487. return {
  11488. x: x,
  11489. y: y
  11490. };
  11491. }
  11492. };
  11493. };
  11494. },{"25":25,"26":26,"45":45}],36:[function(require,module,exports){
  11495. 'use strict';
  11496. var defaults = require(25);
  11497. var Element = require(26);
  11498. var helpers = require(45);
  11499. defaults._set('global', {
  11500. elements: {
  11501. arc: {
  11502. backgroundColor: defaults.global.defaultColor,
  11503. borderColor: '#fff',
  11504. borderWidth: 2
  11505. }
  11506. }
  11507. });
  11508. module.exports = Element.extend({
  11509. inLabelRange: function(mouseX) {
  11510. var vm = this._view;
  11511. if (vm) {
  11512. return (Math.pow(mouseX - vm.x, 2) < Math.pow(vm.radius + vm.hoverRadius, 2));
  11513. }
  11514. return false;
  11515. },
  11516. inRange: function(chartX, chartY) {
  11517. var vm = this._view;
  11518. if (vm) {
  11519. var pointRelativePosition = helpers.getAngleFromPoint(vm, {x: chartX, y: chartY});
  11520. var angle = pointRelativePosition.angle;
  11521. var distance = pointRelativePosition.distance;
  11522. // Sanitise angle range
  11523. var startAngle = vm.startAngle;
  11524. var endAngle = vm.endAngle;
  11525. while (endAngle < startAngle) {
  11526. endAngle += 2.0 * Math.PI;
  11527. }
  11528. while (angle > endAngle) {
  11529. angle -= 2.0 * Math.PI;
  11530. }
  11531. while (angle < startAngle) {
  11532. angle += 2.0 * Math.PI;
  11533. }
  11534. // Check if within the range of the open/close angle
  11535. var betweenAngles = (angle >= startAngle && angle <= endAngle);
  11536. var withinRadius = (distance >= vm.innerRadius && distance <= vm.outerRadius);
  11537. return (betweenAngles && withinRadius);
  11538. }
  11539. return false;
  11540. },
  11541. getCenterPoint: function() {
  11542. var vm = this._view;
  11543. var halfAngle = (vm.startAngle + vm.endAngle) / 2;
  11544. var halfRadius = (vm.innerRadius + vm.outerRadius) / 2;
  11545. return {
  11546. x: vm.x + Math.cos(halfAngle) * halfRadius,
  11547. y: vm.y + Math.sin(halfAngle) * halfRadius
  11548. };
  11549. },
  11550. getArea: function() {
  11551. var vm = this._view;
  11552. return Math.PI * ((vm.endAngle - vm.startAngle) / (2 * Math.PI)) * (Math.pow(vm.outerRadius, 2) - Math.pow(vm.innerRadius, 2));
  11553. },
  11554. tooltipPosition: function() {
  11555. var vm = this._view;
  11556. var centreAngle = vm.startAngle + ((vm.endAngle - vm.startAngle) / 2);
  11557. var rangeFromCentre = (vm.outerRadius - vm.innerRadius) / 2 + vm.innerRadius;
  11558. return {
  11559. x: vm.x + (Math.cos(centreAngle) * rangeFromCentre),
  11560. y: vm.y + (Math.sin(centreAngle) * rangeFromCentre)
  11561. };
  11562. },
  11563. draw: function() {
  11564. var ctx = this._chart.ctx;
  11565. var vm = this._view;
  11566. var sA = vm.startAngle;
  11567. var eA = vm.endAngle;
  11568. ctx.beginPath();
  11569. ctx.arc(vm.x, vm.y, vm.outerRadius, sA, eA);
  11570. ctx.arc(vm.x, vm.y, vm.innerRadius, eA, sA, true);
  11571. ctx.closePath();
  11572. ctx.strokeStyle = vm.borderColor;
  11573. ctx.lineWidth = vm.borderWidth;
  11574. ctx.fillStyle = vm.backgroundColor;
  11575. ctx.fill();
  11576. ctx.lineJoin = 'bevel';
  11577. if (vm.borderWidth) {
  11578. ctx.stroke();
  11579. }
  11580. }
  11581. });
  11582. },{"25":25,"26":26,"45":45}],37:[function(require,module,exports){
  11583. 'use strict';
  11584. var defaults = require(25);
  11585. var Element = require(26);
  11586. var helpers = require(45);
  11587. var globalDefaults = defaults.global;
  11588. defaults._set('global', {
  11589. elements: {
  11590. line: {
  11591. tension: 0.4,
  11592. backgroundColor: globalDefaults.defaultColor,
  11593. borderWidth: 3,
  11594. borderColor: globalDefaults.defaultColor,
  11595. borderCapStyle: 'butt',
  11596. borderDash: [],
  11597. borderDashOffset: 0.0,
  11598. borderJoinStyle: 'miter',
  11599. capBezierPoints: true,
  11600. fill: true, // do we fill in the area between the line and its base axis
  11601. }
  11602. }
  11603. });
  11604. module.exports = Element.extend({
  11605. draw: function() {
  11606. var me = this;
  11607. var vm = me._view;
  11608. var ctx = me._chart.ctx;
  11609. var spanGaps = vm.spanGaps;
  11610. var points = me._children.slice(); // clone array
  11611. var globalOptionLineElements = globalDefaults.elements.line;
  11612. var lastDrawnIndex = -1;
  11613. var index, current, previous, currentVM;
  11614. // If we are looping, adding the first point again
  11615. if (me._loop && points.length) {
  11616. points.push(points[0]);
  11617. }
  11618. ctx.save();
  11619. // Stroke Line Options
  11620. ctx.lineCap = vm.borderCapStyle || globalOptionLineElements.borderCapStyle;
  11621. // IE 9 and 10 do not support line dash
  11622. if (ctx.setLineDash) {
  11623. ctx.setLineDash(vm.borderDash || globalOptionLineElements.borderDash);
  11624. }
  11625. ctx.lineDashOffset = vm.borderDashOffset || globalOptionLineElements.borderDashOffset;
  11626. ctx.lineJoin = vm.borderJoinStyle || globalOptionLineElements.borderJoinStyle;
  11627. ctx.lineWidth = vm.borderWidth || globalOptionLineElements.borderWidth;
  11628. ctx.strokeStyle = vm.borderColor || globalDefaults.defaultColor;
  11629. // Stroke Line
  11630. ctx.beginPath();
  11631. lastDrawnIndex = -1;
  11632. for (index = 0; index < points.length; ++index) {
  11633. current = points[index];
  11634. previous = helpers.previousItem(points, index);
  11635. currentVM = current._view;
  11636. // First point moves to it's starting position no matter what
  11637. if (index === 0) {
  11638. if (!currentVM.skip) {
  11639. ctx.moveTo(currentVM.x, currentVM.y);
  11640. lastDrawnIndex = index;
  11641. }
  11642. } else {
  11643. previous = lastDrawnIndex === -1 ? previous : points[lastDrawnIndex];
  11644. if (!currentVM.skip) {
  11645. if ((lastDrawnIndex !== (index - 1) && !spanGaps) || lastDrawnIndex === -1) {
  11646. // There was a gap and this is the first point after the gap
  11647. ctx.moveTo(currentVM.x, currentVM.y);
  11648. } else {
  11649. // Line to next point
  11650. helpers.canvas.lineTo(ctx, previous._view, current._view);
  11651. }
  11652. lastDrawnIndex = index;
  11653. }
  11654. }
  11655. }
  11656. ctx.stroke();
  11657. ctx.restore();
  11658. }
  11659. });
  11660. },{"25":25,"26":26,"45":45}],38:[function(require,module,exports){
  11661. 'use strict';
  11662. var defaults = require(25);
  11663. var Element = require(26);
  11664. var helpers = require(45);
  11665. var defaultColor = defaults.global.defaultColor;
  11666. defaults._set('global', {
  11667. elements: {
  11668. point: {
  11669. radius: 3,
  11670. pointStyle: 'circle',
  11671. backgroundColor: defaultColor,
  11672. borderColor: defaultColor,
  11673. borderWidth: 1,
  11674. // Hover
  11675. hitRadius: 1,
  11676. hoverRadius: 4,
  11677. hoverBorderWidth: 1
  11678. }
  11679. }
  11680. });
  11681. function xRange(mouseX) {
  11682. var vm = this._view;
  11683. return vm ? (Math.abs(mouseX - vm.x) < vm.radius + vm.hitRadius) : false;
  11684. }
  11685. function yRange(mouseY) {
  11686. var vm = this._view;
  11687. return vm ? (Math.abs(mouseY - vm.y) < vm.radius + vm.hitRadius) : false;
  11688. }
  11689. module.exports = Element.extend({
  11690. inRange: function(mouseX, mouseY) {
  11691. var vm = this._view;
  11692. return vm ? ((Math.pow(mouseX - vm.x, 2) + Math.pow(mouseY - vm.y, 2)) < Math.pow(vm.hitRadius + vm.radius, 2)) : false;
  11693. },
  11694. inLabelRange: xRange,
  11695. inXRange: xRange,
  11696. inYRange: yRange,
  11697. getCenterPoint: function() {
  11698. var vm = this._view;
  11699. return {
  11700. x: vm.x,
  11701. y: vm.y
  11702. };
  11703. },
  11704. getArea: function() {
  11705. return Math.PI * Math.pow(this._view.radius, 2);
  11706. },
  11707. tooltipPosition: function() {
  11708. var vm = this._view;
  11709. return {
  11710. x: vm.x,
  11711. y: vm.y,
  11712. padding: vm.radius + vm.borderWidth
  11713. };
  11714. },
  11715. draw: function(chartArea) {
  11716. var vm = this._view;
  11717. var model = this._model;
  11718. var ctx = this._chart.ctx;
  11719. var pointStyle = vm.pointStyle;
  11720. var radius = vm.radius;
  11721. var x = vm.x;
  11722. var y = vm.y;
  11723. var color = helpers.color;
  11724. var errMargin = 1.01; // 1.01 is margin for Accumulated error. (Especially Edge, IE.)
  11725. var ratio = 0;
  11726. if (vm.skip) {
  11727. return;
  11728. }
  11729. ctx.strokeStyle = vm.borderColor || defaultColor;
  11730. ctx.lineWidth = helpers.valueOrDefault(vm.borderWidth, defaults.global.elements.point.borderWidth);
  11731. ctx.fillStyle = vm.backgroundColor || defaultColor;
  11732. // Cliping for Points.
  11733. // going out from inner charArea?
  11734. if ((chartArea !== undefined) && ((model.x < chartArea.left) || (chartArea.right * errMargin < model.x) || (model.y < chartArea.top) || (chartArea.bottom * errMargin < model.y))) {
  11735. // Point fade out
  11736. if (model.x < chartArea.left) {
  11737. ratio = (x - model.x) / (chartArea.left - model.x);
  11738. } else if (chartArea.right * errMargin < model.x) {
  11739. ratio = (model.x - x) / (model.x - chartArea.right);
  11740. } else if (model.y < chartArea.top) {
  11741. ratio = (y - model.y) / (chartArea.top - model.y);
  11742. } else if (chartArea.bottom * errMargin < model.y) {
  11743. ratio = (model.y - y) / (model.y - chartArea.bottom);
  11744. }
  11745. ratio = Math.round(ratio * 100) / 100;
  11746. ctx.strokeStyle = color(ctx.strokeStyle).alpha(ratio).rgbString();
  11747. ctx.fillStyle = color(ctx.fillStyle).alpha(ratio).rgbString();
  11748. }
  11749. helpers.canvas.drawPoint(ctx, pointStyle, radius, x, y);
  11750. }
  11751. });
  11752. },{"25":25,"26":26,"45":45}],39:[function(require,module,exports){
  11753. 'use strict';
  11754. var defaults = require(25);
  11755. var Element = require(26);
  11756. defaults._set('global', {
  11757. elements: {
  11758. rectangle: {
  11759. backgroundColor: defaults.global.defaultColor,
  11760. borderColor: defaults.global.defaultColor,
  11761. borderSkipped: 'bottom',
  11762. borderWidth: 0
  11763. }
  11764. }
  11765. });
  11766. function isVertical(bar) {
  11767. return bar._view.width !== undefined;
  11768. }
  11769. /**
  11770. * Helper function to get the bounds of the bar regardless of the orientation
  11771. * @param bar {Chart.Element.Rectangle} the bar
  11772. * @return {Bounds} bounds of the bar
  11773. * @private
  11774. */
  11775. function getBarBounds(bar) {
  11776. var vm = bar._view;
  11777. var x1, x2, y1, y2;
  11778. if (isVertical(bar)) {
  11779. // vertical
  11780. var halfWidth = vm.width / 2;
  11781. x1 = vm.x - halfWidth;
  11782. x2 = vm.x + halfWidth;
  11783. y1 = Math.min(vm.y, vm.base);
  11784. y2 = Math.max(vm.y, vm.base);
  11785. } else {
  11786. // horizontal bar
  11787. var halfHeight = vm.height / 2;
  11788. x1 = Math.min(vm.x, vm.base);
  11789. x2 = Math.max(vm.x, vm.base);
  11790. y1 = vm.y - halfHeight;
  11791. y2 = vm.y + halfHeight;
  11792. }
  11793. return {
  11794. left: x1,
  11795. top: y1,
  11796. right: x2,
  11797. bottom: y2
  11798. };
  11799. }
  11800. module.exports = Element.extend({
  11801. draw: function() {
  11802. var ctx = this._chart.ctx;
  11803. var vm = this._view;
  11804. var left, right, top, bottom, signX, signY, borderSkipped;
  11805. var borderWidth = vm.borderWidth;
  11806. if (!vm.horizontal) {
  11807. // bar
  11808. left = vm.x - vm.width / 2;
  11809. right = vm.x + vm.width / 2;
  11810. top = vm.y;
  11811. bottom = vm.base;
  11812. signX = 1;
  11813. signY = bottom > top ? 1 : -1;
  11814. borderSkipped = vm.borderSkipped || 'bottom';
  11815. } else {
  11816. // horizontal bar
  11817. left = vm.base;
  11818. right = vm.x;
  11819. top = vm.y - vm.height / 2;
  11820. bottom = vm.y + vm.height / 2;
  11821. signX = right > left ? 1 : -1;
  11822. signY = 1;
  11823. borderSkipped = vm.borderSkipped || 'left';
  11824. }
  11825. // Canvas doesn't allow us to stroke inside the width so we can
  11826. // adjust the sizes to fit if we're setting a stroke on the line
  11827. if (borderWidth) {
  11828. // borderWidth shold be less than bar width and bar height.
  11829. var barSize = Math.min(Math.abs(left - right), Math.abs(top - bottom));
  11830. borderWidth = borderWidth > barSize ? barSize : borderWidth;
  11831. var halfStroke = borderWidth / 2;
  11832. // Adjust borderWidth when bar top position is near vm.base(zero).
  11833. var borderLeft = left + (borderSkipped !== 'left' ? halfStroke * signX : 0);
  11834. var borderRight = right + (borderSkipped !== 'right' ? -halfStroke * signX : 0);
  11835. var borderTop = top + (borderSkipped !== 'top' ? halfStroke * signY : 0);
  11836. var borderBottom = bottom + (borderSkipped !== 'bottom' ? -halfStroke * signY : 0);
  11837. // not become a vertical line?
  11838. if (borderLeft !== borderRight) {
  11839. top = borderTop;
  11840. bottom = borderBottom;
  11841. }
  11842. // not become a horizontal line?
  11843. if (borderTop !== borderBottom) {
  11844. left = borderLeft;
  11845. right = borderRight;
  11846. }
  11847. }
  11848. ctx.beginPath();
  11849. ctx.fillStyle = vm.backgroundColor;
  11850. ctx.strokeStyle = vm.borderColor;
  11851. ctx.lineWidth = borderWidth;
  11852. // Corner points, from bottom-left to bottom-right clockwise
  11853. // | 1 2 |
  11854. // | 0 3 |
  11855. var corners = [
  11856. [left, bottom],
  11857. [left, top],
  11858. [right, top],
  11859. [right, bottom]
  11860. ];
  11861. // Find first (starting) corner with fallback to 'bottom'
  11862. var borders = ['bottom', 'left', 'top', 'right'];
  11863. var startCorner = borders.indexOf(borderSkipped, 0);
  11864. if (startCorner === -1) {
  11865. startCorner = 0;
  11866. }
  11867. function cornerAt(index) {
  11868. return corners[(startCorner + index) % 4];
  11869. }
  11870. // Draw rectangle from 'startCorner'
  11871. var corner = cornerAt(0);
  11872. ctx.moveTo(corner[0], corner[1]);
  11873. for (var i = 1; i < 4; i++) {
  11874. corner = cornerAt(i);
  11875. ctx.lineTo(corner[0], corner[1]);
  11876. }
  11877. ctx.fill();
  11878. if (borderWidth) {
  11879. ctx.stroke();
  11880. }
  11881. },
  11882. height: function() {
  11883. var vm = this._view;
  11884. return vm.base - vm.y;
  11885. },
  11886. inRange: function(mouseX, mouseY) {
  11887. var inRange = false;
  11888. if (this._view) {
  11889. var bounds = getBarBounds(this);
  11890. inRange = mouseX >= bounds.left && mouseX <= bounds.right && mouseY >= bounds.top && mouseY <= bounds.bottom;
  11891. }
  11892. return inRange;
  11893. },
  11894. inLabelRange: function(mouseX, mouseY) {
  11895. var me = this;
  11896. if (!me._view) {
  11897. return false;
  11898. }
  11899. var inRange = false;
  11900. var bounds = getBarBounds(me);
  11901. if (isVertical(me)) {
  11902. inRange = mouseX >= bounds.left && mouseX <= bounds.right;
  11903. } else {
  11904. inRange = mouseY >= bounds.top && mouseY <= bounds.bottom;
  11905. }
  11906. return inRange;
  11907. },
  11908. inXRange: function(mouseX) {
  11909. var bounds = getBarBounds(this);
  11910. return mouseX >= bounds.left && mouseX <= bounds.right;
  11911. },
  11912. inYRange: function(mouseY) {
  11913. var bounds = getBarBounds(this);
  11914. return mouseY >= bounds.top && mouseY <= bounds.bottom;
  11915. },
  11916. getCenterPoint: function() {
  11917. var vm = this._view;
  11918. var x, y;
  11919. if (isVertical(this)) {
  11920. x = vm.x;
  11921. y = (vm.y + vm.base) / 2;
  11922. } else {
  11923. x = (vm.x + vm.base) / 2;
  11924. y = vm.y;
  11925. }
  11926. return {x: x, y: y};
  11927. },
  11928. getArea: function() {
  11929. var vm = this._view;
  11930. return vm.width * Math.abs(vm.y - vm.base);
  11931. },
  11932. tooltipPosition: function() {
  11933. var vm = this._view;
  11934. return {
  11935. x: vm.x,
  11936. y: vm.y
  11937. };
  11938. }
  11939. });
  11940. },{"25":25,"26":26}],40:[function(require,module,exports){
  11941. 'use strict';
  11942. module.exports = {};
  11943. module.exports.Arc = require(36);
  11944. module.exports.Line = require(37);
  11945. module.exports.Point = require(38);
  11946. module.exports.Rectangle = require(39);
  11947. },{"36":36,"37":37,"38":38,"39":39}],41:[function(require,module,exports){
  11948. 'use strict';
  11949. var helpers = require(42);
  11950. /**
  11951. * @namespace Chart.helpers.canvas
  11952. */
  11953. var exports = module.exports = {
  11954. /**
  11955. * Clears the entire canvas associated to the given `chart`.
  11956. * @param {Chart} chart - The chart for which to clear the canvas.
  11957. */
  11958. clear: function(chart) {
  11959. chart.ctx.clearRect(0, 0, chart.width, chart.height);
  11960. },
  11961. /**
  11962. * Creates a "path" for a rectangle with rounded corners at position (x, y) with a
  11963. * given size (width, height) and the same `radius` for all corners.
  11964. * @param {CanvasRenderingContext2D} ctx - The canvas 2D Context.
  11965. * @param {Number} x - The x axis of the coordinate for the rectangle starting point.
  11966. * @param {Number} y - The y axis of the coordinate for the rectangle starting point.
  11967. * @param {Number} width - The rectangle's width.
  11968. * @param {Number} height - The rectangle's height.
  11969. * @param {Number} radius - The rounded amount (in pixels) for the four corners.
  11970. * @todo handle `radius` as top-left, top-right, bottom-right, bottom-left array/object?
  11971. */
  11972. roundedRect: function(ctx, x, y, width, height, radius) {
  11973. if (radius) {
  11974. var rx = Math.min(radius, width / 2);
  11975. var ry = Math.min(radius, height / 2);
  11976. ctx.moveTo(x + rx, y);
  11977. ctx.lineTo(x + width - rx, y);
  11978. ctx.quadraticCurveTo(x + width, y, x + width, y + ry);
  11979. ctx.lineTo(x + width, y + height - ry);
  11980. ctx.quadraticCurveTo(x + width, y + height, x + width - rx, y + height);
  11981. ctx.lineTo(x + rx, y + height);
  11982. ctx.quadraticCurveTo(x, y + height, x, y + height - ry);
  11983. ctx.lineTo(x, y + ry);
  11984. ctx.quadraticCurveTo(x, y, x + rx, y);
  11985. } else {
  11986. ctx.rect(x, y, width, height);
  11987. }
  11988. },
  11989. drawPoint: function(ctx, style, radius, x, y) {
  11990. var type, edgeLength, xOffset, yOffset, height, size;
  11991. if (style && typeof style === 'object') {
  11992. type = style.toString();
  11993. if (type === '[object HTMLImageElement]' || type === '[object HTMLCanvasElement]') {
  11994. ctx.drawImage(style, x - style.width / 2, y - style.height / 2, style.width, style.height);
  11995. return;
  11996. }
  11997. }
  11998. if (isNaN(radius) || radius <= 0) {
  11999. return;
  12000. }
  12001. switch (style) {
  12002. // Default includes circle
  12003. default:
  12004. ctx.beginPath();
  12005. ctx.arc(x, y, radius, 0, Math.PI * 2);
  12006. ctx.closePath();
  12007. ctx.fill();
  12008. break;
  12009. case 'triangle':
  12010. ctx.beginPath();
  12011. edgeLength = 3 * radius / Math.sqrt(3);
  12012. height = edgeLength * Math.sqrt(3) / 2;
  12013. ctx.moveTo(x - edgeLength / 2, y + height / 3);
  12014. ctx.lineTo(x + edgeLength / 2, y + height / 3);
  12015. ctx.lineTo(x, y - 2 * height / 3);
  12016. ctx.closePath();
  12017. ctx.fill();
  12018. break;
  12019. case 'rect':
  12020. size = 1 / Math.SQRT2 * radius;
  12021. ctx.beginPath();
  12022. ctx.fillRect(x - size, y - size, 2 * size, 2 * size);
  12023. ctx.strokeRect(x - size, y - size, 2 * size, 2 * size);
  12024. break;
  12025. case 'rectRounded':
  12026. var offset = radius / Math.SQRT2;
  12027. var leftX = x - offset;
  12028. var topY = y - offset;
  12029. var sideSize = Math.SQRT2 * radius;
  12030. ctx.beginPath();
  12031. this.roundedRect(ctx, leftX, topY, sideSize, sideSize, radius / 2);
  12032. ctx.closePath();
  12033. ctx.fill();
  12034. break;
  12035. case 'rectRot':
  12036. size = 1 / Math.SQRT2 * radius;
  12037. ctx.beginPath();
  12038. ctx.moveTo(x - size, y);
  12039. ctx.lineTo(x, y + size);
  12040. ctx.lineTo(x + size, y);
  12041. ctx.lineTo(x, y - size);
  12042. ctx.closePath();
  12043. ctx.fill();
  12044. break;
  12045. case 'cross':
  12046. ctx.beginPath();
  12047. ctx.moveTo(x, y + radius);
  12048. ctx.lineTo(x, y - radius);
  12049. ctx.moveTo(x - radius, y);
  12050. ctx.lineTo(x + radius, y);
  12051. ctx.closePath();
  12052. break;
  12053. case 'crossRot':
  12054. ctx.beginPath();
  12055. xOffset = Math.cos(Math.PI / 4) * radius;
  12056. yOffset = Math.sin(Math.PI / 4) * radius;
  12057. ctx.moveTo(x - xOffset, y - yOffset);
  12058. ctx.lineTo(x + xOffset, y + yOffset);
  12059. ctx.moveTo(x - xOffset, y + yOffset);
  12060. ctx.lineTo(x + xOffset, y - yOffset);
  12061. ctx.closePath();
  12062. break;
  12063. case 'star':
  12064. ctx.beginPath();
  12065. ctx.moveTo(x, y + radius);
  12066. ctx.lineTo(x, y - radius);
  12067. ctx.moveTo(x - radius, y);
  12068. ctx.lineTo(x + radius, y);
  12069. xOffset = Math.cos(Math.PI / 4) * radius;
  12070. yOffset = Math.sin(Math.PI / 4) * radius;
  12071. ctx.moveTo(x - xOffset, y - yOffset);
  12072. ctx.lineTo(x + xOffset, y + yOffset);
  12073. ctx.moveTo(x - xOffset, y + yOffset);
  12074. ctx.lineTo(x + xOffset, y - yOffset);
  12075. ctx.closePath();
  12076. break;
  12077. case 'line':
  12078. ctx.beginPath();
  12079. ctx.moveTo(x - radius, y);
  12080. ctx.lineTo(x + radius, y);
  12081. ctx.closePath();
  12082. break;
  12083. case 'dash':
  12084. ctx.beginPath();
  12085. ctx.moveTo(x, y);
  12086. ctx.lineTo(x + radius, y);
  12087. ctx.closePath();
  12088. break;
  12089. }
  12090. ctx.stroke();
  12091. },
  12092. clipArea: function(ctx, area) {
  12093. ctx.save();
  12094. ctx.beginPath();
  12095. ctx.rect(area.left, area.top, area.right - area.left, area.bottom - area.top);
  12096. ctx.clip();
  12097. },
  12098. unclipArea: function(ctx) {
  12099. ctx.restore();
  12100. },
  12101. lineTo: function(ctx, previous, target, flip) {
  12102. if (target.steppedLine) {
  12103. if ((target.steppedLine === 'after' && !flip) || (target.steppedLine !== 'after' && flip)) {
  12104. ctx.lineTo(previous.x, target.y);
  12105. } else {
  12106. ctx.lineTo(target.x, previous.y);
  12107. }
  12108. ctx.lineTo(target.x, target.y);
  12109. return;
  12110. }
  12111. if (!target.tension) {
  12112. ctx.lineTo(target.x, target.y);
  12113. return;
  12114. }
  12115. ctx.bezierCurveTo(
  12116. flip ? previous.controlPointPreviousX : previous.controlPointNextX,
  12117. flip ? previous.controlPointPreviousY : previous.controlPointNextY,
  12118. flip ? target.controlPointNextX : target.controlPointPreviousX,
  12119. flip ? target.controlPointNextY : target.controlPointPreviousY,
  12120. target.x,
  12121. target.y);
  12122. }
  12123. };
  12124. // DEPRECATIONS
  12125. /**
  12126. * Provided for backward compatibility, use Chart.helpers.canvas.clear instead.
  12127. * @namespace Chart.helpers.clear
  12128. * @deprecated since version 2.7.0
  12129. * @todo remove at version 3
  12130. * @private
  12131. */
  12132. helpers.clear = exports.clear;
  12133. /**
  12134. * Provided for backward compatibility, use Chart.helpers.canvas.roundedRect instead.
  12135. * @namespace Chart.helpers.drawRoundedRectangle
  12136. * @deprecated since version 2.7.0
  12137. * @todo remove at version 3
  12138. * @private
  12139. */
  12140. helpers.drawRoundedRectangle = function(ctx) {
  12141. ctx.beginPath();
  12142. exports.roundedRect.apply(exports, arguments);
  12143. ctx.closePath();
  12144. };
  12145. },{"42":42}],42:[function(require,module,exports){
  12146. 'use strict';
  12147. /**
  12148. * @namespace Chart.helpers
  12149. */
  12150. var helpers = {
  12151. /**
  12152. * An empty function that can be used, for example, for optional callback.
  12153. */
  12154. noop: function() {},
  12155. /**
  12156. * Returns a unique id, sequentially generated from a global variable.
  12157. * @returns {Number}
  12158. * @function
  12159. */
  12160. uid: (function() {
  12161. var id = 0;
  12162. return function() {
  12163. return id++;
  12164. };
  12165. }()),
  12166. /**
  12167. * Returns true if `value` is neither null nor undefined, else returns false.
  12168. * @param {*} value - The value to test.
  12169. * @returns {Boolean}
  12170. * @since 2.7.0
  12171. */
  12172. isNullOrUndef: function(value) {
  12173. return value === null || typeof value === 'undefined';
  12174. },
  12175. /**
  12176. * Returns true if `value` is an array, else returns false.
  12177. * @param {*} value - The value to test.
  12178. * @returns {Boolean}
  12179. * @function
  12180. */
  12181. isArray: Array.isArray ? Array.isArray : function(value) {
  12182. return Object.prototype.toString.call(value) === '[object Array]';
  12183. },
  12184. /**
  12185. * Returns true if `value` is an object (excluding null), else returns false.
  12186. * @param {*} value - The value to test.
  12187. * @returns {Boolean}
  12188. * @since 2.7.0
  12189. */
  12190. isObject: function(value) {
  12191. return value !== null && Object.prototype.toString.call(value) === '[object Object]';
  12192. },
  12193. /**
  12194. * Returns `value` if defined, else returns `defaultValue`.
  12195. * @param {*} value - The value to return if defined.
  12196. * @param {*} defaultValue - The value to return if `value` is undefined.
  12197. * @returns {*}
  12198. */
  12199. valueOrDefault: function(value, defaultValue) {
  12200. return typeof value === 'undefined' ? defaultValue : value;
  12201. },
  12202. /**
  12203. * Returns value at the given `index` in array if defined, else returns `defaultValue`.
  12204. * @param {Array} value - The array to lookup for value at `index`.
  12205. * @param {Number} index - The index in `value` to lookup for value.
  12206. * @param {*} defaultValue - The value to return if `value[index]` is undefined.
  12207. * @returns {*}
  12208. */
  12209. valueAtIndexOrDefault: function(value, index, defaultValue) {
  12210. return helpers.valueOrDefault(helpers.isArray(value) ? value[index] : value, defaultValue);
  12211. },
  12212. /**
  12213. * Calls `fn` with the given `args` in the scope defined by `thisArg` and returns the
  12214. * value returned by `fn`. If `fn` is not a function, this method returns undefined.
  12215. * @param {Function} fn - The function to call.
  12216. * @param {Array|undefined|null} args - The arguments with which `fn` should be called.
  12217. * @param {Object} [thisArg] - The value of `this` provided for the call to `fn`.
  12218. * @returns {*}
  12219. */
  12220. callback: function(fn, args, thisArg) {
  12221. if (fn && typeof fn.call === 'function') {
  12222. return fn.apply(thisArg, args);
  12223. }
  12224. },
  12225. /**
  12226. * Note(SB) for performance sake, this method should only be used when loopable type
  12227. * is unknown or in none intensive code (not called often and small loopable). Else
  12228. * it's preferable to use a regular for() loop and save extra function calls.
  12229. * @param {Object|Array} loopable - The object or array to be iterated.
  12230. * @param {Function} fn - The function to call for each item.
  12231. * @param {Object} [thisArg] - The value of `this` provided for the call to `fn`.
  12232. * @param {Boolean} [reverse] - If true, iterates backward on the loopable.
  12233. */
  12234. each: function(loopable, fn, thisArg, reverse) {
  12235. var i, len, keys;
  12236. if (helpers.isArray(loopable)) {
  12237. len = loopable.length;
  12238. if (reverse) {
  12239. for (i = len - 1; i >= 0; i--) {
  12240. fn.call(thisArg, loopable[i], i);
  12241. }
  12242. } else {
  12243. for (i = 0; i < len; i++) {
  12244. fn.call(thisArg, loopable[i], i);
  12245. }
  12246. }
  12247. } else if (helpers.isObject(loopable)) {
  12248. keys = Object.keys(loopable);
  12249. len = keys.length;
  12250. for (i = 0; i < len; i++) {
  12251. fn.call(thisArg, loopable[keys[i]], keys[i]);
  12252. }
  12253. }
  12254. },
  12255. /**
  12256. * Returns true if the `a0` and `a1` arrays have the same content, else returns false.
  12257. * @see http://stackoverflow.com/a/14853974
  12258. * @param {Array} a0 - The array to compare
  12259. * @param {Array} a1 - The array to compare
  12260. * @returns {Boolean}
  12261. */
  12262. arrayEquals: function(a0, a1) {
  12263. var i, ilen, v0, v1;
  12264. if (!a0 || !a1 || a0.length !== a1.length) {
  12265. return false;
  12266. }
  12267. for (i = 0, ilen = a0.length; i < ilen; ++i) {
  12268. v0 = a0[i];
  12269. v1 = a1[i];
  12270. if (v0 instanceof Array && v1 instanceof Array) {
  12271. if (!helpers.arrayEquals(v0, v1)) {
  12272. return false;
  12273. }
  12274. } else if (v0 !== v1) {
  12275. // NOTE: two different object instances will never be equal: {x:20} != {x:20}
  12276. return false;
  12277. }
  12278. }
  12279. return true;
  12280. },
  12281. /**
  12282. * Returns a deep copy of `source` without keeping references on objects and arrays.
  12283. * @param {*} source - The value to clone.
  12284. * @returns {*}
  12285. */
  12286. clone: function(source) {
  12287. if (helpers.isArray(source)) {
  12288. return source.map(helpers.clone);
  12289. }
  12290. if (helpers.isObject(source)) {
  12291. var target = {};
  12292. var keys = Object.keys(source);
  12293. var klen = keys.length;
  12294. var k = 0;
  12295. for (; k < klen; ++k) {
  12296. target[keys[k]] = helpers.clone(source[keys[k]]);
  12297. }
  12298. return target;
  12299. }
  12300. return source;
  12301. },
  12302. /**
  12303. * The default merger when Chart.helpers.merge is called without merger option.
  12304. * Note(SB): this method is also used by configMerge and scaleMerge as fallback.
  12305. * @private
  12306. */
  12307. _merger: function(key, target, source, options) {
  12308. var tval = target[key];
  12309. var sval = source[key];
  12310. if (helpers.isObject(tval) && helpers.isObject(sval)) {
  12311. helpers.merge(tval, sval, options);
  12312. } else {
  12313. target[key] = helpers.clone(sval);
  12314. }
  12315. },
  12316. /**
  12317. * Merges source[key] in target[key] only if target[key] is undefined.
  12318. * @private
  12319. */
  12320. _mergerIf: function(key, target, source) {
  12321. var tval = target[key];
  12322. var sval = source[key];
  12323. if (helpers.isObject(tval) && helpers.isObject(sval)) {
  12324. helpers.mergeIf(tval, sval);
  12325. } else if (!target.hasOwnProperty(key)) {
  12326. target[key] = helpers.clone(sval);
  12327. }
  12328. },
  12329. /**
  12330. * Recursively deep copies `source` properties into `target` with the given `options`.
  12331. * IMPORTANT: `target` is not cloned and will be updated with `source` properties.
  12332. * @param {Object} target - The target object in which all sources are merged into.
  12333. * @param {Object|Array(Object)} source - Object(s) to merge into `target`.
  12334. * @param {Object} [options] - Merging options:
  12335. * @param {Function} [options.merger] - The merge method (key, target, source, options)
  12336. * @returns {Object} The `target` object.
  12337. */
  12338. merge: function(target, source, options) {
  12339. var sources = helpers.isArray(source) ? source : [source];
  12340. var ilen = sources.length;
  12341. var merge, i, keys, klen, k;
  12342. if (!helpers.isObject(target)) {
  12343. return target;
  12344. }
  12345. options = options || {};
  12346. merge = options.merger || helpers._merger;
  12347. for (i = 0; i < ilen; ++i) {
  12348. source = sources[i];
  12349. if (!helpers.isObject(source)) {
  12350. continue;
  12351. }
  12352. keys = Object.keys(source);
  12353. for (k = 0, klen = keys.length; k < klen; ++k) {
  12354. merge(keys[k], target, source, options);
  12355. }
  12356. }
  12357. return target;
  12358. },
  12359. /**
  12360. * Recursively deep copies `source` properties into `target` *only* if not defined in target.
  12361. * IMPORTANT: `target` is not cloned and will be updated with `source` properties.
  12362. * @param {Object} target - The target object in which all sources are merged into.
  12363. * @param {Object|Array(Object)} source - Object(s) to merge into `target`.
  12364. * @returns {Object} The `target` object.
  12365. */
  12366. mergeIf: function(target, source) {
  12367. return helpers.merge(target, source, {merger: helpers._mergerIf});
  12368. },
  12369. /**
  12370. * Applies the contents of two or more objects together into the first object.
  12371. * @param {Object} target - The target object in which all objects are merged into.
  12372. * @param {Object} arg1 - Object containing additional properties to merge in target.
  12373. * @param {Object} argN - Additional objects containing properties to merge in target.
  12374. * @returns {Object} The `target` object.
  12375. */
  12376. extend: function(target) {
  12377. var setFn = function(value, key) {
  12378. target[key] = value;
  12379. };
  12380. for (var i = 1, ilen = arguments.length; i < ilen; ++i) {
  12381. helpers.each(arguments[i], setFn);
  12382. }
  12383. return target;
  12384. },
  12385. /**
  12386. * Basic javascript inheritance based on the model created in Backbone.js
  12387. */
  12388. inherits: function(extensions) {
  12389. var me = this;
  12390. var ChartElement = (extensions && extensions.hasOwnProperty('constructor')) ? extensions.constructor : function() {
  12391. return me.apply(this, arguments);
  12392. };
  12393. var Surrogate = function() {
  12394. this.constructor = ChartElement;
  12395. };
  12396. Surrogate.prototype = me.prototype;
  12397. ChartElement.prototype = new Surrogate();
  12398. ChartElement.extend = helpers.inherits;
  12399. if (extensions) {
  12400. helpers.extend(ChartElement.prototype, extensions);
  12401. }
  12402. ChartElement.__super__ = me.prototype;
  12403. return ChartElement;
  12404. }
  12405. };
  12406. module.exports = helpers;
  12407. // DEPRECATIONS
  12408. /**
  12409. * Provided for backward compatibility, use Chart.helpers.callback instead.
  12410. * @function Chart.helpers.callCallback
  12411. * @deprecated since version 2.6.0
  12412. * @todo remove at version 3
  12413. * @private
  12414. */
  12415. helpers.callCallback = helpers.callback;
  12416. /**
  12417. * Provided for backward compatibility, use Array.prototype.indexOf instead.
  12418. * Array.prototype.indexOf compatibility: Chrome, Opera, Safari, FF1.5+, IE9+
  12419. * @function Chart.helpers.indexOf
  12420. * @deprecated since version 2.7.0
  12421. * @todo remove at version 3
  12422. * @private
  12423. */
  12424. helpers.indexOf = function(array, item, fromIndex) {
  12425. return Array.prototype.indexOf.call(array, item, fromIndex);
  12426. };
  12427. /**
  12428. * Provided for backward compatibility, use Chart.helpers.valueOrDefault instead.
  12429. * @function Chart.helpers.getValueOrDefault
  12430. * @deprecated since version 2.7.0
  12431. * @todo remove at version 3
  12432. * @private
  12433. */
  12434. helpers.getValueOrDefault = helpers.valueOrDefault;
  12435. /**
  12436. * Provided for backward compatibility, use Chart.helpers.valueAtIndexOrDefault instead.
  12437. * @function Chart.helpers.getValueAtIndexOrDefault
  12438. * @deprecated since version 2.7.0
  12439. * @todo remove at version 3
  12440. * @private
  12441. */
  12442. helpers.getValueAtIndexOrDefault = helpers.valueAtIndexOrDefault;
  12443. },{}],43:[function(require,module,exports){
  12444. 'use strict';
  12445. var helpers = require(42);
  12446. /**
  12447. * Easing functions adapted from Robert Penner's easing equations.
  12448. * @namespace Chart.helpers.easingEffects
  12449. * @see http://www.robertpenner.com/easing/
  12450. */
  12451. var effects = {
  12452. linear: function(t) {
  12453. return t;
  12454. },
  12455. easeInQuad: function(t) {
  12456. return t * t;
  12457. },
  12458. easeOutQuad: function(t) {
  12459. return -t * (t - 2);
  12460. },
  12461. easeInOutQuad: function(t) {
  12462. if ((t /= 0.5) < 1) {
  12463. return 0.5 * t * t;
  12464. }
  12465. return -0.5 * ((--t) * (t - 2) - 1);
  12466. },
  12467. easeInCubic: function(t) {
  12468. return t * t * t;
  12469. },
  12470. easeOutCubic: function(t) {
  12471. return (t = t - 1) * t * t + 1;
  12472. },
  12473. easeInOutCubic: function(t) {
  12474. if ((t /= 0.5) < 1) {
  12475. return 0.5 * t * t * t;
  12476. }
  12477. return 0.5 * ((t -= 2) * t * t + 2);
  12478. },
  12479. easeInQuart: function(t) {
  12480. return t * t * t * t;
  12481. },
  12482. easeOutQuart: function(t) {
  12483. return -((t = t - 1) * t * t * t - 1);
  12484. },
  12485. easeInOutQuart: function(t) {
  12486. if ((t /= 0.5) < 1) {
  12487. return 0.5 * t * t * t * t;
  12488. }
  12489. return -0.5 * ((t -= 2) * t * t * t - 2);
  12490. },
  12491. easeInQuint: function(t) {
  12492. return t * t * t * t * t;
  12493. },
  12494. easeOutQuint: function(t) {
  12495. return (t = t - 1) * t * t * t * t + 1;
  12496. },
  12497. easeInOutQuint: function(t) {
  12498. if ((t /= 0.5) < 1) {
  12499. return 0.5 * t * t * t * t * t;
  12500. }
  12501. return 0.5 * ((t -= 2) * t * t * t * t + 2);
  12502. },
  12503. easeInSine: function(t) {
  12504. return -Math.cos(t * (Math.PI / 2)) + 1;
  12505. },
  12506. easeOutSine: function(t) {
  12507. return Math.sin(t * (Math.PI / 2));
  12508. },
  12509. easeInOutSine: function(t) {
  12510. return -0.5 * (Math.cos(Math.PI * t) - 1);
  12511. },
  12512. easeInExpo: function(t) {
  12513. return (t === 0) ? 0 : Math.pow(2, 10 * (t - 1));
  12514. },
  12515. easeOutExpo: function(t) {
  12516. return (t === 1) ? 1 : -Math.pow(2, -10 * t) + 1;
  12517. },
  12518. easeInOutExpo: function(t) {
  12519. if (t === 0) {
  12520. return 0;
  12521. }
  12522. if (t === 1) {
  12523. return 1;
  12524. }
  12525. if ((t /= 0.5) < 1) {
  12526. return 0.5 * Math.pow(2, 10 * (t - 1));
  12527. }
  12528. return 0.5 * (-Math.pow(2, -10 * --t) + 2);
  12529. },
  12530. easeInCirc: function(t) {
  12531. if (t >= 1) {
  12532. return t;
  12533. }
  12534. return -(Math.sqrt(1 - t * t) - 1);
  12535. },
  12536. easeOutCirc: function(t) {
  12537. return Math.sqrt(1 - (t = t - 1) * t);
  12538. },
  12539. easeInOutCirc: function(t) {
  12540. if ((t /= 0.5) < 1) {
  12541. return -0.5 * (Math.sqrt(1 - t * t) - 1);
  12542. }
  12543. return 0.5 * (Math.sqrt(1 - (t -= 2) * t) + 1);
  12544. },
  12545. easeInElastic: function(t) {
  12546. var s = 1.70158;
  12547. var p = 0;
  12548. var a = 1;
  12549. if (t === 0) {
  12550. return 0;
  12551. }
  12552. if (t === 1) {
  12553. return 1;
  12554. }
  12555. if (!p) {
  12556. p = 0.3;
  12557. }
  12558. if (a < 1) {
  12559. a = 1;
  12560. s = p / 4;
  12561. } else {
  12562. s = p / (2 * Math.PI) * Math.asin(1 / a);
  12563. }
  12564. return -(a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t - s) * (2 * Math.PI) / p));
  12565. },
  12566. easeOutElastic: function(t) {
  12567. var s = 1.70158;
  12568. var p = 0;
  12569. var a = 1;
  12570. if (t === 0) {
  12571. return 0;
  12572. }
  12573. if (t === 1) {
  12574. return 1;
  12575. }
  12576. if (!p) {
  12577. p = 0.3;
  12578. }
  12579. if (a < 1) {
  12580. a = 1;
  12581. s = p / 4;
  12582. } else {
  12583. s = p / (2 * Math.PI) * Math.asin(1 / a);
  12584. }
  12585. return a * Math.pow(2, -10 * t) * Math.sin((t - s) * (2 * Math.PI) / p) + 1;
  12586. },
  12587. easeInOutElastic: function(t) {
  12588. var s = 1.70158;
  12589. var p = 0;
  12590. var a = 1;
  12591. if (t === 0) {
  12592. return 0;
  12593. }
  12594. if ((t /= 0.5) === 2) {
  12595. return 1;
  12596. }
  12597. if (!p) {
  12598. p = 0.45;
  12599. }
  12600. if (a < 1) {
  12601. a = 1;
  12602. s = p / 4;
  12603. } else {
  12604. s = p / (2 * Math.PI) * Math.asin(1 / a);
  12605. }
  12606. if (t < 1) {
  12607. return -0.5 * (a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t - s) * (2 * Math.PI) / p));
  12608. }
  12609. return a * Math.pow(2, -10 * (t -= 1)) * Math.sin((t - s) * (2 * Math.PI) / p) * 0.5 + 1;
  12610. },
  12611. easeInBack: function(t) {
  12612. var s = 1.70158;
  12613. return t * t * ((s + 1) * t - s);
  12614. },
  12615. easeOutBack: function(t) {
  12616. var s = 1.70158;
  12617. return (t = t - 1) * t * ((s + 1) * t + s) + 1;
  12618. },
  12619. easeInOutBack: function(t) {
  12620. var s = 1.70158;
  12621. if ((t /= 0.5) < 1) {
  12622. return 0.5 * (t * t * (((s *= (1.525)) + 1) * t - s));
  12623. }
  12624. return 0.5 * ((t -= 2) * t * (((s *= (1.525)) + 1) * t + s) + 2);
  12625. },
  12626. easeInBounce: function(t) {
  12627. return 1 - effects.easeOutBounce(1 - t);
  12628. },
  12629. easeOutBounce: function(t) {
  12630. if (t < (1 / 2.75)) {
  12631. return 7.5625 * t * t;
  12632. }
  12633. if (t < (2 / 2.75)) {
  12634. return 7.5625 * (t -= (1.5 / 2.75)) * t + 0.75;
  12635. }
  12636. if (t < (2.5 / 2.75)) {
  12637. return 7.5625 * (t -= (2.25 / 2.75)) * t + 0.9375;
  12638. }
  12639. return 7.5625 * (t -= (2.625 / 2.75)) * t + 0.984375;
  12640. },
  12641. easeInOutBounce: function(t) {
  12642. if (t < 0.5) {
  12643. return effects.easeInBounce(t * 2) * 0.5;
  12644. }
  12645. return effects.easeOutBounce(t * 2 - 1) * 0.5 + 0.5;
  12646. }
  12647. };
  12648. module.exports = {
  12649. effects: effects
  12650. };
  12651. // DEPRECATIONS
  12652. /**
  12653. * Provided for backward compatibility, use Chart.helpers.easing.effects instead.
  12654. * @function Chart.helpers.easingEffects
  12655. * @deprecated since version 2.7.0
  12656. * @todo remove at version 3
  12657. * @private
  12658. */
  12659. helpers.easingEffects = effects;
  12660. },{"42":42}],44:[function(require,module,exports){
  12661. 'use strict';
  12662. var helpers = require(42);
  12663. /**
  12664. * @alias Chart.helpers.options
  12665. * @namespace
  12666. */
  12667. module.exports = {
  12668. /**
  12669. * Converts the given line height `value` in pixels for a specific font `size`.
  12670. * @param {Number|String} value - The lineHeight to parse (eg. 1.6, '14px', '75%', '1.6em').
  12671. * @param {Number} size - The font size (in pixels) used to resolve relative `value`.
  12672. * @returns {Number} The effective line height in pixels (size * 1.2 if value is invalid).
  12673. * @see https://developer.mozilla.org/en-US/docs/Web/CSS/line-height
  12674. * @since 2.7.0
  12675. */
  12676. toLineHeight: function(value, size) {
  12677. var matches = ('' + value).match(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/);
  12678. if (!matches || matches[1] === 'normal') {
  12679. return size * 1.2;
  12680. }
  12681. value = +matches[2];
  12682. switch (matches[3]) {
  12683. case 'px':
  12684. return value;
  12685. case '%':
  12686. value /= 100;
  12687. break;
  12688. default:
  12689. break;
  12690. }
  12691. return size * value;
  12692. },
  12693. /**
  12694. * Converts the given value into a padding object with pre-computed width/height.
  12695. * @param {Number|Object} value - If a number, set the value to all TRBL component,
  12696. * else, if and object, use defined properties and sets undefined ones to 0.
  12697. * @returns {Object} The padding values (top, right, bottom, left, width, height)
  12698. * @since 2.7.0
  12699. */
  12700. toPadding: function(value) {
  12701. var t, r, b, l;
  12702. if (helpers.isObject(value)) {
  12703. t = +value.top || 0;
  12704. r = +value.right || 0;
  12705. b = +value.bottom || 0;
  12706. l = +value.left || 0;
  12707. } else {
  12708. t = r = b = l = +value || 0;
  12709. }
  12710. return {
  12711. top: t,
  12712. right: r,
  12713. bottom: b,
  12714. left: l,
  12715. height: t + b,
  12716. width: l + r
  12717. };
  12718. },
  12719. /**
  12720. * Evaluates the given `inputs` sequentially and returns the first defined value.
  12721. * @param {Array[]} inputs - An array of values, falling back to the last value.
  12722. * @param {Object} [context] - If defined and the current value is a function, the value
  12723. * is called with `context` as first argument and the result becomes the new input.
  12724. * @param {Number} [index] - If defined and the current value is an array, the value
  12725. * at `index` become the new input.
  12726. * @since 2.7.0
  12727. */
  12728. resolve: function(inputs, context, index) {
  12729. var i, ilen, value;
  12730. for (i = 0, ilen = inputs.length; i < ilen; ++i) {
  12731. value = inputs[i];
  12732. if (value === undefined) {
  12733. continue;
  12734. }
  12735. if (context !== undefined && typeof value === 'function') {
  12736. value = value(context);
  12737. }
  12738. if (index !== undefined && helpers.isArray(value)) {
  12739. value = value[index];
  12740. }
  12741. if (value !== undefined) {
  12742. return value;
  12743. }
  12744. }
  12745. }
  12746. };
  12747. },{"42":42}],45:[function(require,module,exports){
  12748. 'use strict';
  12749. module.exports = require(42);
  12750. module.exports.easing = require(43);
  12751. module.exports.canvas = require(41);
  12752. module.exports.options = require(44);
  12753. },{"41":41,"42":42,"43":43,"44":44}],46:[function(require,module,exports){
  12754. /**
  12755. * Platform fallback implementation (minimal).
  12756. * @see https://github.com/chartjs/Chart.js/pull/4591#issuecomment-319575939
  12757. */
  12758. module.exports = {
  12759. acquireContext: function(item) {
  12760. if (item && item.canvas) {
  12761. // Support for any object associated to a canvas (including a context2d)
  12762. item = item.canvas;
  12763. }
  12764. return item && item.getContext('2d') || null;
  12765. }
  12766. };
  12767. },{}],47:[function(require,module,exports){
  12768. /**
  12769. * Chart.Platform implementation for targeting a web browser
  12770. */
  12771. 'use strict';
  12772. var helpers = require(45);
  12773. var EXPANDO_KEY = '$chartjs';
  12774. var CSS_PREFIX = 'chartjs-';
  12775. var CSS_RENDER_MONITOR = CSS_PREFIX + 'render-monitor';
  12776. var CSS_RENDER_ANIMATION = CSS_PREFIX + 'render-animation';
  12777. var ANIMATION_START_EVENTS = ['animationstart', 'webkitAnimationStart'];
  12778. /**
  12779. * DOM event types -> Chart.js event types.
  12780. * Note: only events with different types are mapped.
  12781. * @see https://developer.mozilla.org/en-US/docs/Web/Events
  12782. */
  12783. var EVENT_TYPES = {
  12784. touchstart: 'mousedown',
  12785. touchmove: 'mousemove',
  12786. touchend: 'mouseup',
  12787. pointerenter: 'mouseenter',
  12788. pointerdown: 'mousedown',
  12789. pointermove: 'mousemove',
  12790. pointerup: 'mouseup',
  12791. pointerleave: 'mouseout',
  12792. pointerout: 'mouseout'
  12793. };
  12794. /**
  12795. * The "used" size is the final value of a dimension property after all calculations have
  12796. * been performed. This method uses the computed style of `element` but returns undefined
  12797. * if the computed style is not expressed in pixels. That can happen in some cases where
  12798. * `element` has a size relative to its parent and this last one is not yet displayed,
  12799. * for example because of `display: none` on a parent node.
  12800. * @see https://developer.mozilla.org/en-US/docs/Web/CSS/used_value
  12801. * @returns {Number} Size in pixels or undefined if unknown.
  12802. */
  12803. function readUsedSize(element, property) {
  12804. var value = helpers.getStyle(element, property);
  12805. var matches = value && value.match(/^(\d+)(\.\d+)?px$/);
  12806. return matches ? Number(matches[1]) : undefined;
  12807. }
  12808. /**
  12809. * Initializes the canvas style and render size without modifying the canvas display size,
  12810. * since responsiveness is handled by the controller.resize() method. The config is used
  12811. * to determine the aspect ratio to apply in case no explicit height has been specified.
  12812. */
  12813. function initCanvas(canvas, config) {
  12814. var style = canvas.style;
  12815. // NOTE(SB) canvas.getAttribute('width') !== canvas.width: in the first case it
  12816. // returns null or '' if no explicit value has been set to the canvas attribute.
  12817. var renderHeight = canvas.getAttribute('height');
  12818. var renderWidth = canvas.getAttribute('width');
  12819. // Chart.js modifies some canvas values that we want to restore on destroy
  12820. canvas[EXPANDO_KEY] = {
  12821. initial: {
  12822. height: renderHeight,
  12823. width: renderWidth,
  12824. style: {
  12825. display: style.display,
  12826. height: style.height,
  12827. width: style.width
  12828. }
  12829. }
  12830. };
  12831. // Force canvas to display as block to avoid extra space caused by inline
  12832. // elements, which would interfere with the responsive resize process.
  12833. // https://github.com/chartjs/Chart.js/issues/2538
  12834. style.display = style.display || 'block';
  12835. if (renderWidth === null || renderWidth === '') {
  12836. var displayWidth = readUsedSize(canvas, 'width');
  12837. if (displayWidth !== undefined) {
  12838. canvas.width = displayWidth;
  12839. }
  12840. }
  12841. if (renderHeight === null || renderHeight === '') {
  12842. if (canvas.style.height === '') {
  12843. // If no explicit render height and style height, let's apply the aspect ratio,
  12844. // which one can be specified by the user but also by charts as default option
  12845. // (i.e. options.aspectRatio). If not specified, use canvas aspect ratio of 2.
  12846. canvas.height = canvas.width / (config.options.aspectRatio || 2);
  12847. } else {
  12848. var displayHeight = readUsedSize(canvas, 'height');
  12849. if (displayWidth !== undefined) {
  12850. canvas.height = displayHeight;
  12851. }
  12852. }
  12853. }
  12854. return canvas;
  12855. }
  12856. /**
  12857. * Detects support for options object argument in addEventListener.
  12858. * https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Safely_detecting_option_support
  12859. * @private
  12860. */
  12861. var supportsEventListenerOptions = (function() {
  12862. var supports = false;
  12863. try {
  12864. var options = Object.defineProperty({}, 'passive', {
  12865. get: function() {
  12866. supports = true;
  12867. }
  12868. });
  12869. window.addEventListener('e', null, options);
  12870. } catch (e) {
  12871. // continue regardless of error
  12872. }
  12873. return supports;
  12874. }());
  12875. // Default passive to true as expected by Chrome for 'touchstart' and 'touchend' events.
  12876. // https://github.com/chartjs/Chart.js/issues/4287
  12877. var eventListenerOptions = supportsEventListenerOptions ? {passive: true} : false;
  12878. function addEventListener(node, type, listener) {
  12879. node.addEventListener(type, listener, eventListenerOptions);
  12880. }
  12881. function removeEventListener(node, type, listener) {
  12882. node.removeEventListener(type, listener, eventListenerOptions);
  12883. }
  12884. function createEvent(type, chart, x, y, nativeEvent) {
  12885. return {
  12886. type: type,
  12887. chart: chart,
  12888. native: nativeEvent || null,
  12889. x: x !== undefined ? x : null,
  12890. y: y !== undefined ? y : null,
  12891. };
  12892. }
  12893. function fromNativeEvent(event, chart) {
  12894. var type = EVENT_TYPES[event.type] || event.type;
  12895. var pos = helpers.getRelativePosition(event, chart);
  12896. return createEvent(type, chart, pos.x, pos.y, event);
  12897. }
  12898. function throttled(fn, thisArg) {
  12899. var ticking = false;
  12900. var args = [];
  12901. return function() {
  12902. args = Array.prototype.slice.call(arguments);
  12903. thisArg = thisArg || this;
  12904. if (!ticking) {
  12905. ticking = true;
  12906. helpers.requestAnimFrame.call(window, function() {
  12907. ticking = false;
  12908. fn.apply(thisArg, args);
  12909. });
  12910. }
  12911. };
  12912. }
  12913. // Implementation based on https://github.com/marcj/css-element-queries
  12914. function createResizer(handler) {
  12915. var resizer = document.createElement('div');
  12916. var cls = CSS_PREFIX + 'size-monitor';
  12917. var maxSize = 1000000;
  12918. var style =
  12919. 'position:absolute;' +
  12920. 'left:0;' +
  12921. 'top:0;' +
  12922. 'right:0;' +
  12923. 'bottom:0;' +
  12924. 'overflow:hidden;' +
  12925. 'pointer-events:none;' +
  12926. 'visibility:hidden;' +
  12927. 'z-index:-1;';
  12928. resizer.style.cssText = style;
  12929. resizer.className = cls;
  12930. resizer.innerHTML =
  12931. '<div class="' + cls + '-expand" style="' + style + '">' +
  12932. '<div style="' +
  12933. 'position:absolute;' +
  12934. 'width:' + maxSize + 'px;' +
  12935. 'height:' + maxSize + 'px;' +
  12936. 'left:0;' +
  12937. 'top:0">' +
  12938. '</div>' +
  12939. '</div>' +
  12940. '<div class="' + cls + '-shrink" style="' + style + '">' +
  12941. '<div style="' +
  12942. 'position:absolute;' +
  12943. 'width:200%;' +
  12944. 'height:200%;' +
  12945. 'left:0; ' +
  12946. 'top:0">' +
  12947. '</div>' +
  12948. '</div>';
  12949. var expand = resizer.childNodes[0];
  12950. var shrink = resizer.childNodes[1];
  12951. resizer._reset = function() {
  12952. expand.scrollLeft = maxSize;
  12953. expand.scrollTop = maxSize;
  12954. shrink.scrollLeft = maxSize;
  12955. shrink.scrollTop = maxSize;
  12956. };
  12957. var onScroll = function() {
  12958. resizer._reset();
  12959. handler();
  12960. };
  12961. addEventListener(expand, 'scroll', onScroll.bind(expand, 'expand'));
  12962. addEventListener(shrink, 'scroll', onScroll.bind(shrink, 'shrink'));
  12963. return resizer;
  12964. }
  12965. // https://davidwalsh.name/detect-node-insertion
  12966. function watchForRender(node, handler) {
  12967. var expando = node[EXPANDO_KEY] || (node[EXPANDO_KEY] = {});
  12968. var proxy = expando.renderProxy = function(e) {
  12969. if (e.animationName === CSS_RENDER_ANIMATION) {
  12970. handler();
  12971. }
  12972. };
  12973. helpers.each(ANIMATION_START_EVENTS, function(type) {
  12974. addEventListener(node, type, proxy);
  12975. });
  12976. // #4737: Chrome might skip the CSS animation when the CSS_RENDER_MONITOR class
  12977. // is removed then added back immediately (same animation frame?). Accessing the
  12978. // `offsetParent` property will force a reflow and re-evaluate the CSS animation.
  12979. // https://gist.github.com/paulirish/5d52fb081b3570c81e3a#box-metrics
  12980. // https://github.com/chartjs/Chart.js/issues/4737
  12981. expando.reflow = !!node.offsetParent;
  12982. node.classList.add(CSS_RENDER_MONITOR);
  12983. }
  12984. function unwatchForRender(node) {
  12985. var expando = node[EXPANDO_KEY] || {};
  12986. var proxy = expando.renderProxy;
  12987. if (proxy) {
  12988. helpers.each(ANIMATION_START_EVENTS, function(type) {
  12989. removeEventListener(node, type, proxy);
  12990. });
  12991. delete expando.renderProxy;
  12992. }
  12993. node.classList.remove(CSS_RENDER_MONITOR);
  12994. }
  12995. function addResizeListener(node, listener, chart) {
  12996. var expando = node[EXPANDO_KEY] || (node[EXPANDO_KEY] = {});
  12997. // Let's keep track of this added resizer and thus avoid DOM query when removing it.
  12998. var resizer = expando.resizer = createResizer(throttled(function() {
  12999. if (expando.resizer) {
  13000. return listener(createEvent('resize', chart));
  13001. }
  13002. }));
  13003. // The resizer needs to be attached to the node parent, so we first need to be
  13004. // sure that `node` is attached to the DOM before injecting the resizer element.
  13005. watchForRender(node, function() {
  13006. if (expando.resizer) {
  13007. var container = node.parentNode;
  13008. if (container && container !== resizer.parentNode) {
  13009. container.insertBefore(resizer, container.firstChild);
  13010. }
  13011. // The container size might have changed, let's reset the resizer state.
  13012. resizer._reset();
  13013. }
  13014. });
  13015. }
  13016. function removeResizeListener(node) {
  13017. var expando = node[EXPANDO_KEY] || {};
  13018. var resizer = expando.resizer;
  13019. delete expando.resizer;
  13020. unwatchForRender(node);
  13021. if (resizer && resizer.parentNode) {
  13022. resizer.parentNode.removeChild(resizer);
  13023. }
  13024. }
  13025. function injectCSS(platform, css) {
  13026. // http://stackoverflow.com/q/3922139
  13027. var style = platform._style || document.createElement('style');
  13028. if (!platform._style) {
  13029. platform._style = style;
  13030. css = '/* Chart.js */\n' + css;
  13031. style.setAttribute('type', 'text/css');
  13032. document.getElementsByTagName('head')[0].appendChild(style);
  13033. }
  13034. style.appendChild(document.createTextNode(css));
  13035. }
  13036. module.exports = {
  13037. /**
  13038. * This property holds whether this platform is enabled for the current environment.
  13039. * Currently used by platform.js to select the proper implementation.
  13040. * @private
  13041. */
  13042. _enabled: typeof window !== 'undefined' && typeof document !== 'undefined',
  13043. initialize: function() {
  13044. var keyframes = 'from{opacity:0.99}to{opacity:1}';
  13045. injectCSS(this,
  13046. // DOM rendering detection
  13047. // https://davidwalsh.name/detect-node-insertion
  13048. '@-webkit-keyframes ' + CSS_RENDER_ANIMATION + '{' + keyframes + '}' +
  13049. '@keyframes ' + CSS_RENDER_ANIMATION + '{' + keyframes + '}' +
  13050. '.' + CSS_RENDER_MONITOR + '{' +
  13051. '-webkit-animation:' + CSS_RENDER_ANIMATION + ' 0.001s;' +
  13052. 'animation:' + CSS_RENDER_ANIMATION + ' 0.001s;' +
  13053. '}'
  13054. );
  13055. },
  13056. acquireContext: function(item, config) {
  13057. if (typeof item === 'string') {
  13058. item = document.getElementById(item);
  13059. } else if (item.length) {
  13060. // Support for array based queries (such as jQuery)
  13061. item = item[0];
  13062. }
  13063. if (item && item.canvas) {
  13064. // Support for any object associated to a canvas (including a context2d)
  13065. item = item.canvas;
  13066. }
  13067. // To prevent canvas fingerprinting, some add-ons undefine the getContext
  13068. // method, for example: https://github.com/kkapsner/CanvasBlocker
  13069. // https://github.com/chartjs/Chart.js/issues/2807
  13070. var context = item && item.getContext && item.getContext('2d');
  13071. // `instanceof HTMLCanvasElement/CanvasRenderingContext2D` fails when the item is
  13072. // inside an iframe or when running in a protected environment. We could guess the
  13073. // types from their toString() value but let's keep things flexible and assume it's
  13074. // a sufficient condition if the item has a context2D which has item as `canvas`.
  13075. // https://github.com/chartjs/Chart.js/issues/3887
  13076. // https://github.com/chartjs/Chart.js/issues/4102
  13077. // https://github.com/chartjs/Chart.js/issues/4152
  13078. if (context && context.canvas === item) {
  13079. initCanvas(item, config);
  13080. return context;
  13081. }
  13082. return null;
  13083. },
  13084. releaseContext: function(context) {
  13085. var canvas = context.canvas;
  13086. if (!canvas[EXPANDO_KEY]) {
  13087. return;
  13088. }
  13089. var initial = canvas[EXPANDO_KEY].initial;
  13090. ['height', 'width'].forEach(function(prop) {
  13091. var value = initial[prop];
  13092. if (helpers.isNullOrUndef(value)) {
  13093. canvas.removeAttribute(prop);
  13094. } else {
  13095. canvas.setAttribute(prop, value);
  13096. }
  13097. });
  13098. helpers.each(initial.style || {}, function(value, key) {
  13099. canvas.style[key] = value;
  13100. });
  13101. // The canvas render size might have been changed (and thus the state stack discarded),
  13102. // we can't use save() and restore() to restore the initial state. So make sure that at
  13103. // least the canvas context is reset to the default state by setting the canvas width.
  13104. // https://www.w3.org/TR/2011/WD-html5-20110525/the-canvas-element.html
  13105. canvas.width = canvas.width;
  13106. delete canvas[EXPANDO_KEY];
  13107. },
  13108. addEventListener: function(chart, type, listener) {
  13109. var canvas = chart.canvas;
  13110. if (type === 'resize') {
  13111. // Note: the resize event is not supported on all browsers.
  13112. addResizeListener(canvas, listener, chart);
  13113. return;
  13114. }
  13115. var expando = listener[EXPANDO_KEY] || (listener[EXPANDO_KEY] = {});
  13116. var proxies = expando.proxies || (expando.proxies = {});
  13117. var proxy = proxies[chart.id + '_' + type] = function(event) {
  13118. listener(fromNativeEvent(event, chart));
  13119. };
  13120. addEventListener(canvas, type, proxy);
  13121. },
  13122. removeEventListener: function(chart, type, listener) {
  13123. var canvas = chart.canvas;
  13124. if (type === 'resize') {
  13125. // Note: the resize event is not supported on all browsers.
  13126. removeResizeListener(canvas, listener);
  13127. return;
  13128. }
  13129. var expando = listener[EXPANDO_KEY] || {};
  13130. var proxies = expando.proxies || {};
  13131. var proxy = proxies[chart.id + '_' + type];
  13132. if (!proxy) {
  13133. return;
  13134. }
  13135. removeEventListener(canvas, type, proxy);
  13136. }
  13137. };
  13138. // DEPRECATIONS
  13139. /**
  13140. * Provided for backward compatibility, use EventTarget.addEventListener instead.
  13141. * EventTarget.addEventListener compatibility: Chrome, Opera 7, Safari, FF1.5+, IE9+
  13142. * @see https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener
  13143. * @function Chart.helpers.addEvent
  13144. * @deprecated since version 2.7.0
  13145. * @todo remove at version 3
  13146. * @private
  13147. */
  13148. helpers.addEvent = addEventListener;
  13149. /**
  13150. * Provided for backward compatibility, use EventTarget.removeEventListener instead.
  13151. * EventTarget.removeEventListener compatibility: Chrome, Opera 7, Safari, FF1.5+, IE9+
  13152. * @see https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/removeEventListener
  13153. * @function Chart.helpers.removeEvent
  13154. * @deprecated since version 2.7.0
  13155. * @todo remove at version 3
  13156. * @private
  13157. */
  13158. helpers.removeEvent = removeEventListener;
  13159. },{"45":45}],48:[function(require,module,exports){
  13160. 'use strict';
  13161. var helpers = require(45);
  13162. var basic = require(46);
  13163. var dom = require(47);
  13164. // @TODO Make possible to select another platform at build time.
  13165. var implementation = dom._enabled ? dom : basic;
  13166. /**
  13167. * @namespace Chart.platform
  13168. * @see https://chartjs.gitbooks.io/proposals/content/Platform.html
  13169. * @since 2.4.0
  13170. */
  13171. module.exports = helpers.extend({
  13172. /**
  13173. * @since 2.7.0
  13174. */
  13175. initialize: function() {},
  13176. /**
  13177. * Called at chart construction time, returns a context2d instance implementing
  13178. * the [W3C Canvas 2D Context API standard]{@link https://www.w3.org/TR/2dcontext/}.
  13179. * @param {*} item - The native item from which to acquire context (platform specific)
  13180. * @param {Object} options - The chart options
  13181. * @returns {CanvasRenderingContext2D} context2d instance
  13182. */
  13183. acquireContext: function() {},
  13184. /**
  13185. * Called at chart destruction time, releases any resources associated to the context
  13186. * previously returned by the acquireContext() method.
  13187. * @param {CanvasRenderingContext2D} context - The context2d instance
  13188. * @returns {Boolean} true if the method succeeded, else false
  13189. */
  13190. releaseContext: function() {},
  13191. /**
  13192. * Registers the specified listener on the given chart.
  13193. * @param {Chart} chart - Chart from which to listen for event
  13194. * @param {String} type - The ({@link IEvent}) type to listen for
  13195. * @param {Function} listener - Receives a notification (an object that implements
  13196. * the {@link IEvent} interface) when an event of the specified type occurs.
  13197. */
  13198. addEventListener: function() {},
  13199. /**
  13200. * Removes the specified listener previously registered with addEventListener.
  13201. * @param {Chart} chart -Chart from which to remove the listener
  13202. * @param {String} type - The ({@link IEvent}) type to remove
  13203. * @param {Function} listener - The listener function to remove from the event target.
  13204. */
  13205. removeEventListener: function() {}
  13206. }, implementation);
  13207. /**
  13208. * @interface IPlatform
  13209. * Allows abstracting platform dependencies away from the chart
  13210. * @borrows Chart.platform.acquireContext as acquireContext
  13211. * @borrows Chart.platform.releaseContext as releaseContext
  13212. * @borrows Chart.platform.addEventListener as addEventListener
  13213. * @borrows Chart.platform.removeEventListener as removeEventListener
  13214. */
  13215. /**
  13216. * @interface IEvent
  13217. * @prop {String} type - The event type name, possible values are:
  13218. * 'contextmenu', 'mouseenter', 'mousedown', 'mousemove', 'mouseup', 'mouseout',
  13219. * 'click', 'dblclick', 'keydown', 'keypress', 'keyup' and 'resize'
  13220. * @prop {*} native - The original native event (null for emulated events, e.g. 'resize')
  13221. * @prop {Number} x - The mouse x position, relative to the canvas (null for incompatible events)
  13222. * @prop {Number} y - The mouse y position, relative to the canvas (null for incompatible events)
  13223. */
  13224. },{"45":45,"46":46,"47":47}],49:[function(require,module,exports){
  13225. 'use strict';
  13226. module.exports = {};
  13227. module.exports.filler = require(50);
  13228. module.exports.legend = require(51);
  13229. module.exports.title = require(52);
  13230. },{"50":50,"51":51,"52":52}],50:[function(require,module,exports){
  13231. /**
  13232. * Plugin based on discussion from the following Chart.js issues:
  13233. * @see https://github.com/chartjs/Chart.js/issues/2380#issuecomment-279961569
  13234. * @see https://github.com/chartjs/Chart.js/issues/2440#issuecomment-256461897
  13235. */
  13236. 'use strict';
  13237. var defaults = require(25);
  13238. var elements = require(40);
  13239. var helpers = require(45);
  13240. defaults._set('global', {
  13241. plugins: {
  13242. filler: {
  13243. propagate: true
  13244. }
  13245. }
  13246. });
  13247. var mappers = {
  13248. dataset: function(source) {
  13249. var index = source.fill;
  13250. var chart = source.chart;
  13251. var meta = chart.getDatasetMeta(index);
  13252. var visible = meta && chart.isDatasetVisible(index);
  13253. var points = (visible && meta.dataset._children) || [];
  13254. var length = points.length || 0;
  13255. return !length ? null : function(point, i) {
  13256. return (i < length && points[i]._view) || null;
  13257. };
  13258. },
  13259. boundary: function(source) {
  13260. var boundary = source.boundary;
  13261. var x = boundary ? boundary.x : null;
  13262. var y = boundary ? boundary.y : null;
  13263. return function(point) {
  13264. return {
  13265. x: x === null ? point.x : x,
  13266. y: y === null ? point.y : y,
  13267. };
  13268. };
  13269. }
  13270. };
  13271. // @todo if (fill[0] === '#')
  13272. function decodeFill(el, index, count) {
  13273. var model = el._model || {};
  13274. var fill = model.fill;
  13275. var target;
  13276. if (fill === undefined) {
  13277. fill = !!model.backgroundColor;
  13278. }
  13279. if (fill === false || fill === null) {
  13280. return false;
  13281. }
  13282. if (fill === true) {
  13283. return 'origin';
  13284. }
  13285. target = parseFloat(fill, 10);
  13286. if (isFinite(target) && Math.floor(target) === target) {
  13287. if (fill[0] === '-' || fill[0] === '+') {
  13288. target = index + target;
  13289. }
  13290. if (target === index || target < 0 || target >= count) {
  13291. return false;
  13292. }
  13293. return target;
  13294. }
  13295. switch (fill) {
  13296. // compatibility
  13297. case 'bottom':
  13298. return 'start';
  13299. case 'top':
  13300. return 'end';
  13301. case 'zero':
  13302. return 'origin';
  13303. // supported boundaries
  13304. case 'origin':
  13305. case 'start':
  13306. case 'end':
  13307. return fill;
  13308. // invalid fill values
  13309. default:
  13310. return false;
  13311. }
  13312. }
  13313. function computeBoundary(source) {
  13314. var model = source.el._model || {};
  13315. var scale = source.el._scale || {};
  13316. var fill = source.fill;
  13317. var target = null;
  13318. var horizontal;
  13319. if (isFinite(fill)) {
  13320. return null;
  13321. }
  13322. // Backward compatibility: until v3, we still need to support boundary values set on
  13323. // the model (scaleTop, scaleBottom and scaleZero) because some external plugins and
  13324. // controllers might still use it (e.g. the Smith chart).
  13325. if (fill === 'start') {
  13326. target = model.scaleBottom === undefined ? scale.bottom : model.scaleBottom;
  13327. } else if (fill === 'end') {
  13328. target = model.scaleTop === undefined ? scale.top : model.scaleTop;
  13329. } else if (model.scaleZero !== undefined) {
  13330. target = model.scaleZero;
  13331. } else if (scale.getBasePosition) {
  13332. target = scale.getBasePosition();
  13333. } else if (scale.getBasePixel) {
  13334. target = scale.getBasePixel();
  13335. }
  13336. if (target !== undefined && target !== null) {
  13337. if (target.x !== undefined && target.y !== undefined) {
  13338. return target;
  13339. }
  13340. if (typeof target === 'number' && isFinite(target)) {
  13341. horizontal = scale.isHorizontal();
  13342. return {
  13343. x: horizontal ? target : null,
  13344. y: horizontal ? null : target
  13345. };
  13346. }
  13347. }
  13348. return null;
  13349. }
  13350. function resolveTarget(sources, index, propagate) {
  13351. var source = sources[index];
  13352. var fill = source.fill;
  13353. var visited = [index];
  13354. var target;
  13355. if (!propagate) {
  13356. return fill;
  13357. }
  13358. while (fill !== false && visited.indexOf(fill) === -1) {
  13359. if (!isFinite(fill)) {
  13360. return fill;
  13361. }
  13362. target = sources[fill];
  13363. if (!target) {
  13364. return false;
  13365. }
  13366. if (target.visible) {
  13367. return fill;
  13368. }
  13369. visited.push(fill);
  13370. fill = target.fill;
  13371. }
  13372. return false;
  13373. }
  13374. function createMapper(source) {
  13375. var fill = source.fill;
  13376. var type = 'dataset';
  13377. if (fill === false) {
  13378. return null;
  13379. }
  13380. if (!isFinite(fill)) {
  13381. type = 'boundary';
  13382. }
  13383. return mappers[type](source);
  13384. }
  13385. function isDrawable(point) {
  13386. return point && !point.skip;
  13387. }
  13388. function drawArea(ctx, curve0, curve1, len0, len1) {
  13389. var i;
  13390. if (!len0 || !len1) {
  13391. return;
  13392. }
  13393. // building first area curve (normal)
  13394. ctx.moveTo(curve0[0].x, curve0[0].y);
  13395. for (i = 1; i < len0; ++i) {
  13396. helpers.canvas.lineTo(ctx, curve0[i - 1], curve0[i]);
  13397. }
  13398. // joining the two area curves
  13399. ctx.lineTo(curve1[len1 - 1].x, curve1[len1 - 1].y);
  13400. // building opposite area curve (reverse)
  13401. for (i = len1 - 1; i > 0; --i) {
  13402. helpers.canvas.lineTo(ctx, curve1[i], curve1[i - 1], true);
  13403. }
  13404. }
  13405. function doFill(ctx, points, mapper, view, color, loop) {
  13406. var count = points.length;
  13407. var span = view.spanGaps;
  13408. var curve0 = [];
  13409. var curve1 = [];
  13410. var len0 = 0;
  13411. var len1 = 0;
  13412. var i, ilen, index, p0, p1, d0, d1;
  13413. ctx.beginPath();
  13414. for (i = 0, ilen = (count + !!loop); i < ilen; ++i) {
  13415. index = i % count;
  13416. p0 = points[index]._view;
  13417. p1 = mapper(p0, index, view);
  13418. d0 = isDrawable(p0);
  13419. d1 = isDrawable(p1);
  13420. if (d0 && d1) {
  13421. len0 = curve0.push(p0);
  13422. len1 = curve1.push(p1);
  13423. } else if (len0 && len1) {
  13424. if (!span) {
  13425. drawArea(ctx, curve0, curve1, len0, len1);
  13426. len0 = len1 = 0;
  13427. curve0 = [];
  13428. curve1 = [];
  13429. } else {
  13430. if (d0) {
  13431. curve0.push(p0);
  13432. }
  13433. if (d1) {
  13434. curve1.push(p1);
  13435. }
  13436. }
  13437. }
  13438. }
  13439. drawArea(ctx, curve0, curve1, len0, len1);
  13440. ctx.closePath();
  13441. ctx.fillStyle = color;
  13442. ctx.fill();
  13443. }
  13444. module.exports = {
  13445. id: 'filler',
  13446. afterDatasetsUpdate: function(chart, options) {
  13447. var count = (chart.data.datasets || []).length;
  13448. var propagate = options.propagate;
  13449. var sources = [];
  13450. var meta, i, el, source;
  13451. for (i = 0; i < count; ++i) {
  13452. meta = chart.getDatasetMeta(i);
  13453. el = meta.dataset;
  13454. source = null;
  13455. if (el && el._model && el instanceof elements.Line) {
  13456. source = {
  13457. visible: chart.isDatasetVisible(i),
  13458. fill: decodeFill(el, i, count),
  13459. chart: chart,
  13460. el: el
  13461. };
  13462. }
  13463. meta.$filler = source;
  13464. sources.push(source);
  13465. }
  13466. for (i = 0; i < count; ++i) {
  13467. source = sources[i];
  13468. if (!source) {
  13469. continue;
  13470. }
  13471. source.fill = resolveTarget(sources, i, propagate);
  13472. source.boundary = computeBoundary(source);
  13473. source.mapper = createMapper(source);
  13474. }
  13475. },
  13476. beforeDatasetDraw: function(chart, args) {
  13477. var meta = args.meta.$filler;
  13478. if (!meta) {
  13479. return;
  13480. }
  13481. var ctx = chart.ctx;
  13482. var el = meta.el;
  13483. var view = el._view;
  13484. var points = el._children || [];
  13485. var mapper = meta.mapper;
  13486. var color = view.backgroundColor || defaults.global.defaultColor;
  13487. if (mapper && color && points.length) {
  13488. helpers.canvas.clipArea(ctx, chart.chartArea);
  13489. doFill(ctx, points, mapper, view, color, el._loop);
  13490. helpers.canvas.unclipArea(ctx);
  13491. }
  13492. }
  13493. };
  13494. },{"25":25,"40":40,"45":45}],51:[function(require,module,exports){
  13495. 'use strict';
  13496. var defaults = require(25);
  13497. var Element = require(26);
  13498. var helpers = require(45);
  13499. var layouts = require(30);
  13500. var noop = helpers.noop;
  13501. defaults._set('global', {
  13502. legend: {
  13503. display: true,
  13504. position: 'top',
  13505. fullWidth: true,
  13506. reverse: false,
  13507. weight: 1000,
  13508. // a callback that will handle
  13509. onClick: function(e, legendItem) {
  13510. var index = legendItem.datasetIndex;
  13511. var ci = this.chart;
  13512. var meta = ci.getDatasetMeta(index);
  13513. // See controller.isDatasetVisible comment
  13514. meta.hidden = meta.hidden === null ? !ci.data.datasets[index].hidden : null;
  13515. // We hid a dataset ... rerender the chart
  13516. ci.update();
  13517. },
  13518. onHover: null,
  13519. labels: {
  13520. boxWidth: 40,
  13521. padding: 10,
  13522. // Generates labels shown in the legend
  13523. // Valid properties to return:
  13524. // text : text to display
  13525. // fillStyle : fill of coloured box
  13526. // strokeStyle: stroke of coloured box
  13527. // hidden : if this legend item refers to a hidden item
  13528. // lineCap : cap style for line
  13529. // lineDash
  13530. // lineDashOffset :
  13531. // lineJoin :
  13532. // lineWidth :
  13533. generateLabels: function(chart) {
  13534. var data = chart.data;
  13535. return helpers.isArray(data.datasets) ? data.datasets.map(function(dataset, i) {
  13536. return {
  13537. text: dataset.label,
  13538. fillStyle: (!helpers.isArray(dataset.backgroundColor) ? dataset.backgroundColor : dataset.backgroundColor[0]),
  13539. hidden: !chart.isDatasetVisible(i),
  13540. lineCap: dataset.borderCapStyle,
  13541. lineDash: dataset.borderDash,
  13542. lineDashOffset: dataset.borderDashOffset,
  13543. lineJoin: dataset.borderJoinStyle,
  13544. lineWidth: dataset.borderWidth,
  13545. strokeStyle: dataset.borderColor,
  13546. pointStyle: dataset.pointStyle,
  13547. // Below is extra data used for toggling the datasets
  13548. datasetIndex: i
  13549. };
  13550. }, this) : [];
  13551. }
  13552. }
  13553. },
  13554. legendCallback: function(chart) {
  13555. var text = [];
  13556. text.push('<ul class="' + chart.id + '-legend">');
  13557. for (var i = 0; i < chart.data.datasets.length; i++) {
  13558. text.push('<li><span style="background-color:' + chart.data.datasets[i].backgroundColor + '"></span>');
  13559. if (chart.data.datasets[i].label) {
  13560. text.push(chart.data.datasets[i].label);
  13561. }
  13562. text.push('</li>');
  13563. }
  13564. text.push('</ul>');
  13565. return text.join('');
  13566. }
  13567. });
  13568. /**
  13569. * Helper function to get the box width based on the usePointStyle option
  13570. * @param labelopts {Object} the label options on the legend
  13571. * @param fontSize {Number} the label font size
  13572. * @return {Number} width of the color box area
  13573. */
  13574. function getBoxWidth(labelOpts, fontSize) {
  13575. return labelOpts.usePointStyle ?
  13576. fontSize * Math.SQRT2 :
  13577. labelOpts.boxWidth;
  13578. }
  13579. /**
  13580. * IMPORTANT: this class is exposed publicly as Chart.Legend, backward compatibility required!
  13581. */
  13582. var Legend = Element.extend({
  13583. initialize: function(config) {
  13584. helpers.extend(this, config);
  13585. // Contains hit boxes for each dataset (in dataset order)
  13586. this.legendHitBoxes = [];
  13587. // Are we in doughnut mode which has a different data type
  13588. this.doughnutMode = false;
  13589. },
  13590. // These methods are ordered by lifecycle. Utilities then follow.
  13591. // Any function defined here is inherited by all legend types.
  13592. // Any function can be extended by the legend type
  13593. beforeUpdate: noop,
  13594. update: function(maxWidth, maxHeight, margins) {
  13595. var me = this;
  13596. // Update Lifecycle - Probably don't want to ever extend or overwrite this function ;)
  13597. me.beforeUpdate();
  13598. // Absorb the master measurements
  13599. me.maxWidth = maxWidth;
  13600. me.maxHeight = maxHeight;
  13601. me.margins = margins;
  13602. // Dimensions
  13603. me.beforeSetDimensions();
  13604. me.setDimensions();
  13605. me.afterSetDimensions();
  13606. // Labels
  13607. me.beforeBuildLabels();
  13608. me.buildLabels();
  13609. me.afterBuildLabels();
  13610. // Fit
  13611. me.beforeFit();
  13612. me.fit();
  13613. me.afterFit();
  13614. //
  13615. me.afterUpdate();
  13616. return me.minSize;
  13617. },
  13618. afterUpdate: noop,
  13619. //
  13620. beforeSetDimensions: noop,
  13621. setDimensions: function() {
  13622. var me = this;
  13623. // Set the unconstrained dimension before label rotation
  13624. if (me.isHorizontal()) {
  13625. // Reset position before calculating rotation
  13626. me.width = me.maxWidth;
  13627. me.left = 0;
  13628. me.right = me.width;
  13629. } else {
  13630. me.height = me.maxHeight;
  13631. // Reset position before calculating rotation
  13632. me.top = 0;
  13633. me.bottom = me.height;
  13634. }
  13635. // Reset padding
  13636. me.paddingLeft = 0;
  13637. me.paddingTop = 0;
  13638. me.paddingRight = 0;
  13639. me.paddingBottom = 0;
  13640. // Reset minSize
  13641. me.minSize = {
  13642. width: 0,
  13643. height: 0
  13644. };
  13645. },
  13646. afterSetDimensions: noop,
  13647. //
  13648. beforeBuildLabels: noop,
  13649. buildLabels: function() {
  13650. var me = this;
  13651. var labelOpts = me.options.labels || {};
  13652. var legendItems = helpers.callback(labelOpts.generateLabels, [me.chart], me) || [];
  13653. if (labelOpts.filter) {
  13654. legendItems = legendItems.filter(function(item) {
  13655. return labelOpts.filter(item, me.chart.data);
  13656. });
  13657. }
  13658. if (me.options.reverse) {
  13659. legendItems.reverse();
  13660. }
  13661. me.legendItems = legendItems;
  13662. },
  13663. afterBuildLabels: noop,
  13664. //
  13665. beforeFit: noop,
  13666. fit: function() {
  13667. var me = this;
  13668. var opts = me.options;
  13669. var labelOpts = opts.labels;
  13670. var display = opts.display;
  13671. var ctx = me.ctx;
  13672. var globalDefault = defaults.global;
  13673. var valueOrDefault = helpers.valueOrDefault;
  13674. var fontSize = valueOrDefault(labelOpts.fontSize, globalDefault.defaultFontSize);
  13675. var fontStyle = valueOrDefault(labelOpts.fontStyle, globalDefault.defaultFontStyle);
  13676. var fontFamily = valueOrDefault(labelOpts.fontFamily, globalDefault.defaultFontFamily);
  13677. var labelFont = helpers.fontString(fontSize, fontStyle, fontFamily);
  13678. // Reset hit boxes
  13679. var hitboxes = me.legendHitBoxes = [];
  13680. var minSize = me.minSize;
  13681. var isHorizontal = me.isHorizontal();
  13682. if (isHorizontal) {
  13683. minSize.width = me.maxWidth; // fill all the width
  13684. minSize.height = display ? 10 : 0;
  13685. } else {
  13686. minSize.width = display ? 10 : 0;
  13687. minSize.height = me.maxHeight; // fill all the height
  13688. }
  13689. // Increase sizes here
  13690. if (display) {
  13691. ctx.font = labelFont;
  13692. if (isHorizontal) {
  13693. // Labels
  13694. // Width of each line of legend boxes. Labels wrap onto multiple lines when there are too many to fit on one
  13695. var lineWidths = me.lineWidths = [0];
  13696. var totalHeight = me.legendItems.length ? fontSize + (labelOpts.padding) : 0;
  13697. ctx.textAlign = 'left';
  13698. ctx.textBaseline = 'top';
  13699. helpers.each(me.legendItems, function(legendItem, i) {
  13700. var boxWidth = getBoxWidth(labelOpts, fontSize);
  13701. var width = boxWidth + (fontSize / 2) + ctx.measureText(legendItem.text).width;
  13702. if (lineWidths[lineWidths.length - 1] + width + labelOpts.padding >= me.width) {
  13703. totalHeight += fontSize + (labelOpts.padding);
  13704. lineWidths[lineWidths.length] = me.left;
  13705. }
  13706. // Store the hitbox width and height here. Final position will be updated in `draw`
  13707. hitboxes[i] = {
  13708. left: 0,
  13709. top: 0,
  13710. width: width,
  13711. height: fontSize
  13712. };
  13713. lineWidths[lineWidths.length - 1] += width + labelOpts.padding;
  13714. });
  13715. minSize.height += totalHeight;
  13716. } else {
  13717. var vPadding = labelOpts.padding;
  13718. var columnWidths = me.columnWidths = [];
  13719. var totalWidth = labelOpts.padding;
  13720. var currentColWidth = 0;
  13721. var currentColHeight = 0;
  13722. var itemHeight = fontSize + vPadding;
  13723. helpers.each(me.legendItems, function(legendItem, i) {
  13724. var boxWidth = getBoxWidth(labelOpts, fontSize);
  13725. var itemWidth = boxWidth + (fontSize / 2) + ctx.measureText(legendItem.text).width;
  13726. // If too tall, go to new column
  13727. if (currentColHeight + itemHeight > minSize.height) {
  13728. totalWidth += currentColWidth + labelOpts.padding;
  13729. columnWidths.push(currentColWidth); // previous column width
  13730. currentColWidth = 0;
  13731. currentColHeight = 0;
  13732. }
  13733. // Get max width
  13734. currentColWidth = Math.max(currentColWidth, itemWidth);
  13735. currentColHeight += itemHeight;
  13736. // Store the hitbox width and height here. Final position will be updated in `draw`
  13737. hitboxes[i] = {
  13738. left: 0,
  13739. top: 0,
  13740. width: itemWidth,
  13741. height: fontSize
  13742. };
  13743. });
  13744. totalWidth += currentColWidth;
  13745. columnWidths.push(currentColWidth);
  13746. minSize.width += totalWidth;
  13747. }
  13748. }
  13749. me.width = minSize.width;
  13750. me.height = minSize.height;
  13751. },
  13752. afterFit: noop,
  13753. // Shared Methods
  13754. isHorizontal: function() {
  13755. return this.options.position === 'top' || this.options.position === 'bottom';
  13756. },
  13757. // Actually draw the legend on the canvas
  13758. draw: function() {
  13759. var me = this;
  13760. var opts = me.options;
  13761. var labelOpts = opts.labels;
  13762. var globalDefault = defaults.global;
  13763. var lineDefault = globalDefault.elements.line;
  13764. var legendWidth = me.width;
  13765. var lineWidths = me.lineWidths;
  13766. if (opts.display) {
  13767. var ctx = me.ctx;
  13768. var valueOrDefault = helpers.valueOrDefault;
  13769. var fontColor = valueOrDefault(labelOpts.fontColor, globalDefault.defaultFontColor);
  13770. var fontSize = valueOrDefault(labelOpts.fontSize, globalDefault.defaultFontSize);
  13771. var fontStyle = valueOrDefault(labelOpts.fontStyle, globalDefault.defaultFontStyle);
  13772. var fontFamily = valueOrDefault(labelOpts.fontFamily, globalDefault.defaultFontFamily);
  13773. var labelFont = helpers.fontString(fontSize, fontStyle, fontFamily);
  13774. var cursor;
  13775. // Canvas setup
  13776. ctx.textAlign = 'left';
  13777. ctx.textBaseline = 'middle';
  13778. ctx.lineWidth = 0.5;
  13779. ctx.strokeStyle = fontColor; // for strikethrough effect
  13780. ctx.fillStyle = fontColor; // render in correct colour
  13781. ctx.font = labelFont;
  13782. var boxWidth = getBoxWidth(labelOpts, fontSize);
  13783. var hitboxes = me.legendHitBoxes;
  13784. // current position
  13785. var drawLegendBox = function(x, y, legendItem) {
  13786. if (isNaN(boxWidth) || boxWidth <= 0) {
  13787. return;
  13788. }
  13789. // Set the ctx for the box
  13790. ctx.save();
  13791. ctx.fillStyle = valueOrDefault(legendItem.fillStyle, globalDefault.defaultColor);
  13792. ctx.lineCap = valueOrDefault(legendItem.lineCap, lineDefault.borderCapStyle);
  13793. ctx.lineDashOffset = valueOrDefault(legendItem.lineDashOffset, lineDefault.borderDashOffset);
  13794. ctx.lineJoin = valueOrDefault(legendItem.lineJoin, lineDefault.borderJoinStyle);
  13795. ctx.lineWidth = valueOrDefault(legendItem.lineWidth, lineDefault.borderWidth);
  13796. ctx.strokeStyle = valueOrDefault(legendItem.strokeStyle, globalDefault.defaultColor);
  13797. var isLineWidthZero = (valueOrDefault(legendItem.lineWidth, lineDefault.borderWidth) === 0);
  13798. if (ctx.setLineDash) {
  13799. // IE 9 and 10 do not support line dash
  13800. ctx.setLineDash(valueOrDefault(legendItem.lineDash, lineDefault.borderDash));
  13801. }
  13802. if (opts.labels && opts.labels.usePointStyle) {
  13803. // Recalculate x and y for drawPoint() because its expecting
  13804. // x and y to be center of figure (instead of top left)
  13805. var radius = fontSize * Math.SQRT2 / 2;
  13806. var offSet = radius / Math.SQRT2;
  13807. var centerX = x + offSet;
  13808. var centerY = y + offSet;
  13809. // Draw pointStyle as legend symbol
  13810. helpers.canvas.drawPoint(ctx, legendItem.pointStyle, radius, centerX, centerY);
  13811. } else {
  13812. // Draw box as legend symbol
  13813. if (!isLineWidthZero) {
  13814. ctx.strokeRect(x, y, boxWidth, fontSize);
  13815. }
  13816. ctx.fillRect(x, y, boxWidth, fontSize);
  13817. }
  13818. ctx.restore();
  13819. };
  13820. var fillText = function(x, y, legendItem, textWidth) {
  13821. var halfFontSize = fontSize / 2;
  13822. var xLeft = boxWidth + halfFontSize + x;
  13823. var yMiddle = y + halfFontSize;
  13824. ctx.fillText(legendItem.text, xLeft, yMiddle);
  13825. if (legendItem.hidden) {
  13826. // Strikethrough the text if hidden
  13827. ctx.beginPath();
  13828. ctx.lineWidth = 2;
  13829. ctx.moveTo(xLeft, yMiddle);
  13830. ctx.lineTo(xLeft + textWidth, yMiddle);
  13831. ctx.stroke();
  13832. }
  13833. };
  13834. // Horizontal
  13835. var isHorizontal = me.isHorizontal();
  13836. if (isHorizontal) {
  13837. cursor = {
  13838. x: me.left + ((legendWidth - lineWidths[0]) / 2),
  13839. y: me.top + labelOpts.padding,
  13840. line: 0
  13841. };
  13842. } else {
  13843. cursor = {
  13844. x: me.left + labelOpts.padding,
  13845. y: me.top + labelOpts.padding,
  13846. line: 0
  13847. };
  13848. }
  13849. var itemHeight = fontSize + labelOpts.padding;
  13850. helpers.each(me.legendItems, function(legendItem, i) {
  13851. var textWidth = ctx.measureText(legendItem.text).width;
  13852. var width = boxWidth + (fontSize / 2) + textWidth;
  13853. var x = cursor.x;
  13854. var y = cursor.y;
  13855. if (isHorizontal) {
  13856. if (x + width >= legendWidth) {
  13857. y = cursor.y += itemHeight;
  13858. cursor.line++;
  13859. x = cursor.x = me.left + ((legendWidth - lineWidths[cursor.line]) / 2);
  13860. }
  13861. } else if (y + itemHeight > me.bottom) {
  13862. x = cursor.x = x + me.columnWidths[cursor.line] + labelOpts.padding;
  13863. y = cursor.y = me.top + labelOpts.padding;
  13864. cursor.line++;
  13865. }
  13866. drawLegendBox(x, y, legendItem);
  13867. hitboxes[i].left = x;
  13868. hitboxes[i].top = y;
  13869. // Fill the actual label
  13870. fillText(x, y, legendItem, textWidth);
  13871. if (isHorizontal) {
  13872. cursor.x += width + (labelOpts.padding);
  13873. } else {
  13874. cursor.y += itemHeight;
  13875. }
  13876. });
  13877. }
  13878. },
  13879. /**
  13880. * Handle an event
  13881. * @private
  13882. * @param {IEvent} event - The event to handle
  13883. * @return {Boolean} true if a change occured
  13884. */
  13885. handleEvent: function(e) {
  13886. var me = this;
  13887. var opts = me.options;
  13888. var type = e.type === 'mouseup' ? 'click' : e.type;
  13889. var changed = false;
  13890. if (type === 'mousemove') {
  13891. if (!opts.onHover) {
  13892. return;
  13893. }
  13894. } else if (type === 'click') {
  13895. if (!opts.onClick) {
  13896. return;
  13897. }
  13898. } else {
  13899. return;
  13900. }
  13901. // Chart event already has relative position in it
  13902. var x = e.x;
  13903. var y = e.y;
  13904. if (x >= me.left && x <= me.right && y >= me.top && y <= me.bottom) {
  13905. // See if we are touching one of the dataset boxes
  13906. var lh = me.legendHitBoxes;
  13907. for (var i = 0; i < lh.length; ++i) {
  13908. var hitBox = lh[i];
  13909. if (x >= hitBox.left && x <= hitBox.left + hitBox.width && y >= hitBox.top && y <= hitBox.top + hitBox.height) {
  13910. // Touching an element
  13911. if (type === 'click') {
  13912. // use e.native for backwards compatibility
  13913. opts.onClick.call(me, e.native, me.legendItems[i]);
  13914. changed = true;
  13915. break;
  13916. } else if (type === 'mousemove') {
  13917. // use e.native for backwards compatibility
  13918. opts.onHover.call(me, e.native, me.legendItems[i]);
  13919. changed = true;
  13920. break;
  13921. }
  13922. }
  13923. }
  13924. }
  13925. return changed;
  13926. }
  13927. });
  13928. function createNewLegendAndAttach(chart, legendOpts) {
  13929. var legend = new Legend({
  13930. ctx: chart.ctx,
  13931. options: legendOpts,
  13932. chart: chart
  13933. });
  13934. layouts.configure(chart, legend, legendOpts);
  13935. layouts.addBox(chart, legend);
  13936. chart.legend = legend;
  13937. }
  13938. module.exports = {
  13939. id: 'legend',
  13940. /**
  13941. * Backward compatibility: since 2.1.5, the legend is registered as a plugin, making
  13942. * Chart.Legend obsolete. To avoid a breaking change, we export the Legend as part of
  13943. * the plugin, which one will be re-exposed in the chart.js file.
  13944. * https://github.com/chartjs/Chart.js/pull/2640
  13945. * @private
  13946. */
  13947. _element: Legend,
  13948. beforeInit: function(chart) {
  13949. var legendOpts = chart.options.legend;
  13950. if (legendOpts) {
  13951. createNewLegendAndAttach(chart, legendOpts);
  13952. }
  13953. },
  13954. beforeUpdate: function(chart) {
  13955. var legendOpts = chart.options.legend;
  13956. var legend = chart.legend;
  13957. if (legendOpts) {
  13958. helpers.mergeIf(legendOpts, defaults.global.legend);
  13959. if (legend) {
  13960. layouts.configure(chart, legend, legendOpts);
  13961. legend.options = legendOpts;
  13962. } else {
  13963. createNewLegendAndAttach(chart, legendOpts);
  13964. }
  13965. } else if (legend) {
  13966. layouts.removeBox(chart, legend);
  13967. delete chart.legend;
  13968. }
  13969. },
  13970. afterEvent: function(chart, e) {
  13971. var legend = chart.legend;
  13972. if (legend) {
  13973. legend.handleEvent(e);
  13974. }
  13975. }
  13976. };
  13977. },{"25":25,"26":26,"30":30,"45":45}],52:[function(require,module,exports){
  13978. 'use strict';
  13979. var defaults = require(25);
  13980. var Element = require(26);
  13981. var helpers = require(45);
  13982. var layouts = require(30);
  13983. var noop = helpers.noop;
  13984. defaults._set('global', {
  13985. title: {
  13986. display: false,
  13987. fontStyle: 'bold',
  13988. fullWidth: true,
  13989. lineHeight: 1.2,
  13990. padding: 10,
  13991. position: 'top',
  13992. text: '',
  13993. weight: 2000 // by default greater than legend (1000) to be above
  13994. }
  13995. });
  13996. /**
  13997. * IMPORTANT: this class is exposed publicly as Chart.Legend, backward compatibility required!
  13998. */
  13999. var Title = Element.extend({
  14000. initialize: function(config) {
  14001. var me = this;
  14002. helpers.extend(me, config);
  14003. // Contains hit boxes for each dataset (in dataset order)
  14004. me.legendHitBoxes = [];
  14005. },
  14006. // These methods are ordered by lifecycle. Utilities then follow.
  14007. beforeUpdate: noop,
  14008. update: function(maxWidth, maxHeight, margins) {
  14009. var me = this;
  14010. // Update Lifecycle - Probably don't want to ever extend or overwrite this function ;)
  14011. me.beforeUpdate();
  14012. // Absorb the master measurements
  14013. me.maxWidth = maxWidth;
  14014. me.maxHeight = maxHeight;
  14015. me.margins = margins;
  14016. // Dimensions
  14017. me.beforeSetDimensions();
  14018. me.setDimensions();
  14019. me.afterSetDimensions();
  14020. // Labels
  14021. me.beforeBuildLabels();
  14022. me.buildLabels();
  14023. me.afterBuildLabels();
  14024. // Fit
  14025. me.beforeFit();
  14026. me.fit();
  14027. me.afterFit();
  14028. //
  14029. me.afterUpdate();
  14030. return me.minSize;
  14031. },
  14032. afterUpdate: noop,
  14033. //
  14034. beforeSetDimensions: noop,
  14035. setDimensions: function() {
  14036. var me = this;
  14037. // Set the unconstrained dimension before label rotation
  14038. if (me.isHorizontal()) {
  14039. // Reset position before calculating rotation
  14040. me.width = me.maxWidth;
  14041. me.left = 0;
  14042. me.right = me.width;
  14043. } else {
  14044. me.height = me.maxHeight;
  14045. // Reset position before calculating rotation
  14046. me.top = 0;
  14047. me.bottom = me.height;
  14048. }
  14049. // Reset padding
  14050. me.paddingLeft = 0;
  14051. me.paddingTop = 0;
  14052. me.paddingRight = 0;
  14053. me.paddingBottom = 0;
  14054. // Reset minSize
  14055. me.minSize = {
  14056. width: 0,
  14057. height: 0
  14058. };
  14059. },
  14060. afterSetDimensions: noop,
  14061. //
  14062. beforeBuildLabels: noop,
  14063. buildLabels: noop,
  14064. afterBuildLabels: noop,
  14065. //
  14066. beforeFit: noop,
  14067. fit: function() {
  14068. var me = this;
  14069. var valueOrDefault = helpers.valueOrDefault;
  14070. var opts = me.options;
  14071. var display = opts.display;
  14072. var fontSize = valueOrDefault(opts.fontSize, defaults.global.defaultFontSize);
  14073. var minSize = me.minSize;
  14074. var lineCount = helpers.isArray(opts.text) ? opts.text.length : 1;
  14075. var lineHeight = helpers.options.toLineHeight(opts.lineHeight, fontSize);
  14076. var textSize = display ? (lineCount * lineHeight) + (opts.padding * 2) : 0;
  14077. if (me.isHorizontal()) {
  14078. minSize.width = me.maxWidth; // fill all the width
  14079. minSize.height = textSize;
  14080. } else {
  14081. minSize.width = textSize;
  14082. minSize.height = me.maxHeight; // fill all the height
  14083. }
  14084. me.width = minSize.width;
  14085. me.height = minSize.height;
  14086. },
  14087. afterFit: noop,
  14088. // Shared Methods
  14089. isHorizontal: function() {
  14090. var pos = this.options.position;
  14091. return pos === 'top' || pos === 'bottom';
  14092. },
  14093. // Actually draw the title block on the canvas
  14094. draw: function() {
  14095. var me = this;
  14096. var ctx = me.ctx;
  14097. var valueOrDefault = helpers.valueOrDefault;
  14098. var opts = me.options;
  14099. var globalDefaults = defaults.global;
  14100. if (opts.display) {
  14101. var fontSize = valueOrDefault(opts.fontSize, globalDefaults.defaultFontSize);
  14102. var fontStyle = valueOrDefault(opts.fontStyle, globalDefaults.defaultFontStyle);
  14103. var fontFamily = valueOrDefault(opts.fontFamily, globalDefaults.defaultFontFamily);
  14104. var titleFont = helpers.fontString(fontSize, fontStyle, fontFamily);
  14105. var lineHeight = helpers.options.toLineHeight(opts.lineHeight, fontSize);
  14106. var offset = lineHeight / 2 + opts.padding;
  14107. var rotation = 0;
  14108. var top = me.top;
  14109. var left = me.left;
  14110. var bottom = me.bottom;
  14111. var right = me.right;
  14112. var maxWidth, titleX, titleY;
  14113. ctx.fillStyle = valueOrDefault(opts.fontColor, globalDefaults.defaultFontColor); // render in correct colour
  14114. ctx.font = titleFont;
  14115. // Horizontal
  14116. if (me.isHorizontal()) {
  14117. titleX = left + ((right - left) / 2); // midpoint of the width
  14118. titleY = top + offset;
  14119. maxWidth = right - left;
  14120. } else {
  14121. titleX = opts.position === 'left' ? left + offset : right - offset;
  14122. titleY = top + ((bottom - top) / 2);
  14123. maxWidth = bottom - top;
  14124. rotation = Math.PI * (opts.position === 'left' ? -0.5 : 0.5);
  14125. }
  14126. ctx.save();
  14127. ctx.translate(titleX, titleY);
  14128. ctx.rotate(rotation);
  14129. ctx.textAlign = 'center';
  14130. ctx.textBaseline = 'middle';
  14131. var text = opts.text;
  14132. if (helpers.isArray(text)) {
  14133. var y = 0;
  14134. for (var i = 0; i < text.length; ++i) {
  14135. ctx.fillText(text[i], 0, y, maxWidth);
  14136. y += lineHeight;
  14137. }
  14138. } else {
  14139. ctx.fillText(text, 0, 0, maxWidth);
  14140. }
  14141. ctx.restore();
  14142. }
  14143. }
  14144. });
  14145. function createNewTitleBlockAndAttach(chart, titleOpts) {
  14146. var title = new Title({
  14147. ctx: chart.ctx,
  14148. options: titleOpts,
  14149. chart: chart
  14150. });
  14151. layouts.configure(chart, title, titleOpts);
  14152. layouts.addBox(chart, title);
  14153. chart.titleBlock = title;
  14154. }
  14155. module.exports = {
  14156. id: 'title',
  14157. /**
  14158. * Backward compatibility: since 2.1.5, the title is registered as a plugin, making
  14159. * Chart.Title obsolete. To avoid a breaking change, we export the Title as part of
  14160. * the plugin, which one will be re-exposed in the chart.js file.
  14161. * https://github.com/chartjs/Chart.js/pull/2640
  14162. * @private
  14163. */
  14164. _element: Title,
  14165. beforeInit: function(chart) {
  14166. var titleOpts = chart.options.title;
  14167. if (titleOpts) {
  14168. createNewTitleBlockAndAttach(chart, titleOpts);
  14169. }
  14170. },
  14171. beforeUpdate: function(chart) {
  14172. var titleOpts = chart.options.title;
  14173. var titleBlock = chart.titleBlock;
  14174. if (titleOpts) {
  14175. helpers.mergeIf(titleOpts, defaults.global.title);
  14176. if (titleBlock) {
  14177. layouts.configure(chart, titleBlock, titleOpts);
  14178. titleBlock.options = titleOpts;
  14179. } else {
  14180. createNewTitleBlockAndAttach(chart, titleOpts);
  14181. }
  14182. } else if (titleBlock) {
  14183. layouts.removeBox(chart, titleBlock);
  14184. delete chart.titleBlock;
  14185. }
  14186. }
  14187. };
  14188. },{"25":25,"26":26,"30":30,"45":45}],53:[function(require,module,exports){
  14189. 'use strict';
  14190. module.exports = function(Chart) {
  14191. // Default config for a category scale
  14192. var defaultConfig = {
  14193. position: 'bottom'
  14194. };
  14195. var DatasetScale = Chart.Scale.extend({
  14196. /**
  14197. * Internal function to get the correct labels. If data.xLabels or data.yLabels are defined, use those
  14198. * else fall back to data.labels
  14199. * @private
  14200. */
  14201. getLabels: function() {
  14202. var data = this.chart.data;
  14203. return this.options.labels || (this.isHorizontal() ? data.xLabels : data.yLabels) || data.labels;
  14204. },
  14205. determineDataLimits: function() {
  14206. var me = this;
  14207. var labels = me.getLabels();
  14208. me.minIndex = 0;
  14209. me.maxIndex = labels.length - 1;
  14210. var findIndex;
  14211. if (me.options.ticks.min !== undefined) {
  14212. // user specified min value
  14213. findIndex = labels.indexOf(me.options.ticks.min);
  14214. me.minIndex = findIndex !== -1 ? findIndex : me.minIndex;
  14215. }
  14216. if (me.options.ticks.max !== undefined) {
  14217. // user specified max value
  14218. findIndex = labels.indexOf(me.options.ticks.max);
  14219. me.maxIndex = findIndex !== -1 ? findIndex : me.maxIndex;
  14220. }
  14221. me.min = labels[me.minIndex];
  14222. me.max = labels[me.maxIndex];
  14223. },
  14224. buildTicks: function() {
  14225. var me = this;
  14226. var labels = me.getLabels();
  14227. // If we are viewing some subset of labels, slice the original array
  14228. me.ticks = (me.minIndex === 0 && me.maxIndex === labels.length - 1) ? labels : labels.slice(me.minIndex, me.maxIndex + 1);
  14229. },
  14230. getLabelForIndex: function(index, datasetIndex) {
  14231. var me = this;
  14232. var data = me.chart.data;
  14233. var isHorizontal = me.isHorizontal();
  14234. if (data.yLabels && !isHorizontal) {
  14235. return me.getRightValue(data.datasets[datasetIndex].data[index]);
  14236. }
  14237. return me.ticks[index - me.minIndex];
  14238. },
  14239. // Used to get data value locations. Value can either be an index or a numerical value
  14240. getPixelForValue: function(value, index) {
  14241. var me = this;
  14242. var offset = me.options.offset;
  14243. // 1 is added because we need the length but we have the indexes
  14244. var offsetAmt = Math.max((me.maxIndex + 1 - me.minIndex - (offset ? 0 : 1)), 1);
  14245. // If value is a data object, then index is the index in the data array,
  14246. // not the index of the scale. We need to change that.
  14247. var valueCategory;
  14248. if (value !== undefined && value !== null) {
  14249. valueCategory = me.isHorizontal() ? value.x : value.y;
  14250. }
  14251. if (valueCategory !== undefined || (value !== undefined && isNaN(index))) {
  14252. var labels = me.getLabels();
  14253. value = valueCategory || value;
  14254. var idx = labels.indexOf(value);
  14255. index = idx !== -1 ? idx : index;
  14256. }
  14257. if (me.isHorizontal()) {
  14258. var valueWidth = me.width / offsetAmt;
  14259. var widthOffset = (valueWidth * (index - me.minIndex));
  14260. if (offset) {
  14261. widthOffset += (valueWidth / 2);
  14262. }
  14263. return me.left + Math.round(widthOffset);
  14264. }
  14265. var valueHeight = me.height / offsetAmt;
  14266. var heightOffset = (valueHeight * (index - me.minIndex));
  14267. if (offset) {
  14268. heightOffset += (valueHeight / 2);
  14269. }
  14270. return me.top + Math.round(heightOffset);
  14271. },
  14272. getPixelForTick: function(index) {
  14273. return this.getPixelForValue(this.ticks[index], index + this.minIndex, null);
  14274. },
  14275. getValueForPixel: function(pixel) {
  14276. var me = this;
  14277. var offset = me.options.offset;
  14278. var value;
  14279. var offsetAmt = Math.max((me._ticks.length - (offset ? 0 : 1)), 1);
  14280. var horz = me.isHorizontal();
  14281. var valueDimension = (horz ? me.width : me.height) / offsetAmt;
  14282. pixel -= horz ? me.left : me.top;
  14283. if (offset) {
  14284. pixel -= (valueDimension / 2);
  14285. }
  14286. if (pixel <= 0) {
  14287. value = 0;
  14288. } else {
  14289. value = Math.round(pixel / valueDimension);
  14290. }
  14291. return value + me.minIndex;
  14292. },
  14293. getBasePixel: function() {
  14294. return this.bottom;
  14295. }
  14296. });
  14297. Chart.scaleService.registerScaleType('category', DatasetScale, defaultConfig);
  14298. };
  14299. },{}],54:[function(require,module,exports){
  14300. 'use strict';
  14301. var defaults = require(25);
  14302. var helpers = require(45);
  14303. var Ticks = require(34);
  14304. module.exports = function(Chart) {
  14305. var defaultConfig = {
  14306. position: 'left',
  14307. ticks: {
  14308. callback: Ticks.formatters.linear
  14309. }
  14310. };
  14311. var LinearScale = Chart.LinearScaleBase.extend({
  14312. determineDataLimits: function() {
  14313. var me = this;
  14314. var opts = me.options;
  14315. var chart = me.chart;
  14316. var data = chart.data;
  14317. var datasets = data.datasets;
  14318. var isHorizontal = me.isHorizontal();
  14319. var DEFAULT_MIN = 0;
  14320. var DEFAULT_MAX = 1;
  14321. function IDMatches(meta) {
  14322. return isHorizontal ? meta.xAxisID === me.id : meta.yAxisID === me.id;
  14323. }
  14324. // First Calculate the range
  14325. me.min = null;
  14326. me.max = null;
  14327. var hasStacks = opts.stacked;
  14328. if (hasStacks === undefined) {
  14329. helpers.each(datasets, function(dataset, datasetIndex) {
  14330. if (hasStacks) {
  14331. return;
  14332. }
  14333. var meta = chart.getDatasetMeta(datasetIndex);
  14334. if (chart.isDatasetVisible(datasetIndex) && IDMatches(meta) &&
  14335. meta.stack !== undefined) {
  14336. hasStacks = true;
  14337. }
  14338. });
  14339. }
  14340. if (opts.stacked || hasStacks) {
  14341. var valuesPerStack = {};
  14342. helpers.each(datasets, function(dataset, datasetIndex) {
  14343. var meta = chart.getDatasetMeta(datasetIndex);
  14344. var key = [
  14345. meta.type,
  14346. // we have a separate stack for stack=undefined datasets when the opts.stacked is undefined
  14347. ((opts.stacked === undefined && meta.stack === undefined) ? datasetIndex : ''),
  14348. meta.stack
  14349. ].join('.');
  14350. if (valuesPerStack[key] === undefined) {
  14351. valuesPerStack[key] = {
  14352. positiveValues: [],
  14353. negativeValues: []
  14354. };
  14355. }
  14356. // Store these per type
  14357. var positiveValues = valuesPerStack[key].positiveValues;
  14358. var negativeValues = valuesPerStack[key].negativeValues;
  14359. if (chart.isDatasetVisible(datasetIndex) && IDMatches(meta)) {
  14360. helpers.each(dataset.data, function(rawValue, index) {
  14361. var value = +me.getRightValue(rawValue);
  14362. if (isNaN(value) || meta.data[index].hidden) {
  14363. return;
  14364. }
  14365. positiveValues[index] = positiveValues[index] || 0;
  14366. negativeValues[index] = negativeValues[index] || 0;
  14367. if (opts.relativePoints) {
  14368. positiveValues[index] = 100;
  14369. } else if (value < 0) {
  14370. negativeValues[index] += value;
  14371. } else {
  14372. positiveValues[index] += value;
  14373. }
  14374. });
  14375. }
  14376. });
  14377. helpers.each(valuesPerStack, function(valuesForType) {
  14378. var values = valuesForType.positiveValues.concat(valuesForType.negativeValues);
  14379. var minVal = helpers.min(values);
  14380. var maxVal = helpers.max(values);
  14381. me.min = me.min === null ? minVal : Math.min(me.min, minVal);
  14382. me.max = me.max === null ? maxVal : Math.max(me.max, maxVal);
  14383. });
  14384. } else {
  14385. helpers.each(datasets, function(dataset, datasetIndex) {
  14386. var meta = chart.getDatasetMeta(datasetIndex);
  14387. if (chart.isDatasetVisible(datasetIndex) && IDMatches(meta)) {
  14388. helpers.each(dataset.data, function(rawValue, index) {
  14389. var value = +me.getRightValue(rawValue);
  14390. if (isNaN(value) || meta.data[index].hidden) {
  14391. return;
  14392. }
  14393. if (me.min === null) {
  14394. me.min = value;
  14395. } else if (value < me.min) {
  14396. me.min = value;
  14397. }
  14398. if (me.max === null) {
  14399. me.max = value;
  14400. } else if (value > me.max) {
  14401. me.max = value;
  14402. }
  14403. });
  14404. }
  14405. });
  14406. }
  14407. me.min = isFinite(me.min) && !isNaN(me.min) ? me.min : DEFAULT_MIN;
  14408. me.max = isFinite(me.max) && !isNaN(me.max) ? me.max : DEFAULT_MAX;
  14409. // Common base implementation to handle ticks.min, ticks.max, ticks.beginAtZero
  14410. this.handleTickRangeOptions();
  14411. },
  14412. getTickLimit: function() {
  14413. var maxTicks;
  14414. var me = this;
  14415. var tickOpts = me.options.ticks;
  14416. if (me.isHorizontal()) {
  14417. maxTicks = Math.min(tickOpts.maxTicksLimit ? tickOpts.maxTicksLimit : 11, Math.ceil(me.width / 50));
  14418. } else {
  14419. // The factor of 2 used to scale the font size has been experimentally determined.
  14420. var tickFontSize = helpers.valueOrDefault(tickOpts.fontSize, defaults.global.defaultFontSize);
  14421. maxTicks = Math.min(tickOpts.maxTicksLimit ? tickOpts.maxTicksLimit : 11, Math.ceil(me.height / (2 * tickFontSize)));
  14422. }
  14423. return maxTicks;
  14424. },
  14425. // Called after the ticks are built. We need
  14426. handleDirectionalChanges: function() {
  14427. if (!this.isHorizontal()) {
  14428. // We are in a vertical orientation. The top value is the highest. So reverse the array
  14429. this.ticks.reverse();
  14430. }
  14431. },
  14432. getLabelForIndex: function(index, datasetIndex) {
  14433. return +this.getRightValue(this.chart.data.datasets[datasetIndex].data[index]);
  14434. },
  14435. // Utils
  14436. getPixelForValue: function(value) {
  14437. // This must be called after fit has been run so that
  14438. // this.left, this.top, this.right, and this.bottom have been defined
  14439. var me = this;
  14440. var start = me.start;
  14441. var rightValue = +me.getRightValue(value);
  14442. var pixel;
  14443. var range = me.end - start;
  14444. if (me.isHorizontal()) {
  14445. pixel = me.left + (me.width / range * (rightValue - start));
  14446. } else {
  14447. pixel = me.bottom - (me.height / range * (rightValue - start));
  14448. }
  14449. return pixel;
  14450. },
  14451. getValueForPixel: function(pixel) {
  14452. var me = this;
  14453. var isHorizontal = me.isHorizontal();
  14454. var innerDimension = isHorizontal ? me.width : me.height;
  14455. var offset = (isHorizontal ? pixel - me.left : me.bottom - pixel) / innerDimension;
  14456. return me.start + ((me.end - me.start) * offset);
  14457. },
  14458. getPixelForTick: function(index) {
  14459. return this.getPixelForValue(this.ticksAsNumbers[index]);
  14460. }
  14461. });
  14462. Chart.scaleService.registerScaleType('linear', LinearScale, defaultConfig);
  14463. };
  14464. },{"25":25,"34":34,"45":45}],55:[function(require,module,exports){
  14465. 'use strict';
  14466. var helpers = require(45);
  14467. /**
  14468. * Generate a set of linear ticks
  14469. * @param generationOptions the options used to generate the ticks
  14470. * @param dataRange the range of the data
  14471. * @returns {Array<Number>} array of tick values
  14472. */
  14473. function generateTicks(generationOptions, dataRange) {
  14474. var ticks = [];
  14475. // To get a "nice" value for the tick spacing, we will use the appropriately named
  14476. // "nice number" algorithm. See http://stackoverflow.com/questions/8506881/nice-label-algorithm-for-charts-with-minimum-ticks
  14477. // for details.
  14478. var spacing;
  14479. if (generationOptions.stepSize && generationOptions.stepSize > 0) {
  14480. spacing = generationOptions.stepSize;
  14481. } else {
  14482. var niceRange = helpers.niceNum(dataRange.max - dataRange.min, false);
  14483. spacing = helpers.niceNum(niceRange / (generationOptions.maxTicks - 1), true);
  14484. }
  14485. var niceMin = Math.floor(dataRange.min / spacing) * spacing;
  14486. var niceMax = Math.ceil(dataRange.max / spacing) * spacing;
  14487. // If min, max and stepSize is set and they make an evenly spaced scale use it.
  14488. if (generationOptions.min && generationOptions.max && generationOptions.stepSize) {
  14489. // If very close to our whole number, use it.
  14490. if (helpers.almostWhole((generationOptions.max - generationOptions.min) / generationOptions.stepSize, spacing / 1000)) {
  14491. niceMin = generationOptions.min;
  14492. niceMax = generationOptions.max;
  14493. }
  14494. }
  14495. var numSpaces = (niceMax - niceMin) / spacing;
  14496. // If very close to our rounded value, use it.
  14497. if (helpers.almostEquals(numSpaces, Math.round(numSpaces), spacing / 1000)) {
  14498. numSpaces = Math.round(numSpaces);
  14499. } else {
  14500. numSpaces = Math.ceil(numSpaces);
  14501. }
  14502. var precision = 1;
  14503. if (spacing < 1) {
  14504. precision = Math.pow(10, spacing.toString().length - 2);
  14505. niceMin = Math.round(niceMin * precision) / precision;
  14506. niceMax = Math.round(niceMax * precision) / precision;
  14507. }
  14508. ticks.push(generationOptions.min !== undefined ? generationOptions.min : niceMin);
  14509. for (var j = 1; j < numSpaces; ++j) {
  14510. ticks.push(Math.round((niceMin + j * spacing) * precision) / precision);
  14511. }
  14512. ticks.push(generationOptions.max !== undefined ? generationOptions.max : niceMax);
  14513. return ticks;
  14514. }
  14515. module.exports = function(Chart) {
  14516. var noop = helpers.noop;
  14517. Chart.LinearScaleBase = Chart.Scale.extend({
  14518. getRightValue: function(value) {
  14519. if (typeof value === 'string') {
  14520. return +value;
  14521. }
  14522. return Chart.Scale.prototype.getRightValue.call(this, value);
  14523. },
  14524. handleTickRangeOptions: function() {
  14525. var me = this;
  14526. var opts = me.options;
  14527. var tickOpts = opts.ticks;
  14528. // If we are forcing it to begin at 0, but 0 will already be rendered on the chart,
  14529. // do nothing since that would make the chart weird. If the user really wants a weird chart
  14530. // axis, they can manually override it
  14531. if (tickOpts.beginAtZero) {
  14532. var minSign = helpers.sign(me.min);
  14533. var maxSign = helpers.sign(me.max);
  14534. if (minSign < 0 && maxSign < 0) {
  14535. // move the top up to 0
  14536. me.max = 0;
  14537. } else if (minSign > 0 && maxSign > 0) {
  14538. // move the bottom down to 0
  14539. me.min = 0;
  14540. }
  14541. }
  14542. var setMin = tickOpts.min !== undefined || tickOpts.suggestedMin !== undefined;
  14543. var setMax = tickOpts.max !== undefined || tickOpts.suggestedMax !== undefined;
  14544. if (tickOpts.min !== undefined) {
  14545. me.min = tickOpts.min;
  14546. } else if (tickOpts.suggestedMin !== undefined) {
  14547. if (me.min === null) {
  14548. me.min = tickOpts.suggestedMin;
  14549. } else {
  14550. me.min = Math.min(me.min, tickOpts.suggestedMin);
  14551. }
  14552. }
  14553. if (tickOpts.max !== undefined) {
  14554. me.max = tickOpts.max;
  14555. } else if (tickOpts.suggestedMax !== undefined) {
  14556. if (me.max === null) {
  14557. me.max = tickOpts.suggestedMax;
  14558. } else {
  14559. me.max = Math.max(me.max, tickOpts.suggestedMax);
  14560. }
  14561. }
  14562. if (setMin !== setMax) {
  14563. // We set the min or the max but not both.
  14564. // So ensure that our range is good
  14565. // Inverted or 0 length range can happen when
  14566. // ticks.min is set, and no datasets are visible
  14567. if (me.min >= me.max) {
  14568. if (setMin) {
  14569. me.max = me.min + 1;
  14570. } else {
  14571. me.min = me.max - 1;
  14572. }
  14573. }
  14574. }
  14575. if (me.min === me.max) {
  14576. me.max++;
  14577. if (!tickOpts.beginAtZero) {
  14578. me.min--;
  14579. }
  14580. }
  14581. },
  14582. getTickLimit: noop,
  14583. handleDirectionalChanges: noop,
  14584. buildTicks: function() {
  14585. var me = this;
  14586. var opts = me.options;
  14587. var tickOpts = opts.ticks;
  14588. // Figure out what the max number of ticks we can support it is based on the size of
  14589. // the axis area. For now, we say that the minimum tick spacing in pixels must be 50
  14590. // We also limit the maximum number of ticks to 11 which gives a nice 10 squares on
  14591. // the graph. Make sure we always have at least 2 ticks
  14592. var maxTicks = me.getTickLimit();
  14593. maxTicks = Math.max(2, maxTicks);
  14594. var numericGeneratorOptions = {
  14595. maxTicks: maxTicks,
  14596. min: tickOpts.min,
  14597. max: tickOpts.max,
  14598. stepSize: helpers.valueOrDefault(tickOpts.fixedStepSize, tickOpts.stepSize)
  14599. };
  14600. var ticks = me.ticks = generateTicks(numericGeneratorOptions, me);
  14601. me.handleDirectionalChanges();
  14602. // At this point, we need to update our max and min given the tick values since we have expanded the
  14603. // range of the scale
  14604. me.max = helpers.max(ticks);
  14605. me.min = helpers.min(ticks);
  14606. if (tickOpts.reverse) {
  14607. ticks.reverse();
  14608. me.start = me.max;
  14609. me.end = me.min;
  14610. } else {
  14611. me.start = me.min;
  14612. me.end = me.max;
  14613. }
  14614. },
  14615. convertTicksToLabels: function() {
  14616. var me = this;
  14617. me.ticksAsNumbers = me.ticks.slice();
  14618. me.zeroLineIndex = me.ticks.indexOf(0);
  14619. Chart.Scale.prototype.convertTicksToLabels.call(me);
  14620. }
  14621. });
  14622. };
  14623. },{"45":45}],56:[function(require,module,exports){
  14624. 'use strict';
  14625. var helpers = require(45);
  14626. var Ticks = require(34);
  14627. /**
  14628. * Generate a set of logarithmic ticks
  14629. * @param generationOptions the options used to generate the ticks
  14630. * @param dataRange the range of the data
  14631. * @returns {Array<Number>} array of tick values
  14632. */
  14633. function generateTicks(generationOptions, dataRange) {
  14634. var ticks = [];
  14635. var valueOrDefault = helpers.valueOrDefault;
  14636. // Figure out what the max number of ticks we can support it is based on the size of
  14637. // the axis area. For now, we say that the minimum tick spacing in pixels must be 50
  14638. // We also limit the maximum number of ticks to 11 which gives a nice 10 squares on
  14639. // the graph
  14640. var tickVal = valueOrDefault(generationOptions.min, Math.pow(10, Math.floor(helpers.log10(dataRange.min))));
  14641. var endExp = Math.floor(helpers.log10(dataRange.max));
  14642. var endSignificand = Math.ceil(dataRange.max / Math.pow(10, endExp));
  14643. var exp, significand;
  14644. if (tickVal === 0) {
  14645. exp = Math.floor(helpers.log10(dataRange.minNotZero));
  14646. significand = Math.floor(dataRange.minNotZero / Math.pow(10, exp));
  14647. ticks.push(tickVal);
  14648. tickVal = significand * Math.pow(10, exp);
  14649. } else {
  14650. exp = Math.floor(helpers.log10(tickVal));
  14651. significand = Math.floor(tickVal / Math.pow(10, exp));
  14652. }
  14653. var precision = exp < 0 ? Math.pow(10, Math.abs(exp)) : 1;
  14654. do {
  14655. ticks.push(tickVal);
  14656. ++significand;
  14657. if (significand === 10) {
  14658. significand = 1;
  14659. ++exp;
  14660. precision = exp >= 0 ? 1 : precision;
  14661. }
  14662. tickVal = Math.round(significand * Math.pow(10, exp) * precision) / precision;
  14663. } while (exp < endExp || (exp === endExp && significand < endSignificand));
  14664. var lastTick = valueOrDefault(generationOptions.max, tickVal);
  14665. ticks.push(lastTick);
  14666. return ticks;
  14667. }
  14668. module.exports = function(Chart) {
  14669. var defaultConfig = {
  14670. position: 'left',
  14671. // label settings
  14672. ticks: {
  14673. callback: Ticks.formatters.logarithmic
  14674. }
  14675. };
  14676. var LogarithmicScale = Chart.Scale.extend({
  14677. determineDataLimits: function() {
  14678. var me = this;
  14679. var opts = me.options;
  14680. var chart = me.chart;
  14681. var data = chart.data;
  14682. var datasets = data.datasets;
  14683. var isHorizontal = me.isHorizontal();
  14684. function IDMatches(meta) {
  14685. return isHorizontal ? meta.xAxisID === me.id : meta.yAxisID === me.id;
  14686. }
  14687. // Calculate Range
  14688. me.min = null;
  14689. me.max = null;
  14690. me.minNotZero = null;
  14691. var hasStacks = opts.stacked;
  14692. if (hasStacks === undefined) {
  14693. helpers.each(datasets, function(dataset, datasetIndex) {
  14694. if (hasStacks) {
  14695. return;
  14696. }
  14697. var meta = chart.getDatasetMeta(datasetIndex);
  14698. if (chart.isDatasetVisible(datasetIndex) && IDMatches(meta) &&
  14699. meta.stack !== undefined) {
  14700. hasStacks = true;
  14701. }
  14702. });
  14703. }
  14704. if (opts.stacked || hasStacks) {
  14705. var valuesPerStack = {};
  14706. helpers.each(datasets, function(dataset, datasetIndex) {
  14707. var meta = chart.getDatasetMeta(datasetIndex);
  14708. var key = [
  14709. meta.type,
  14710. // we have a separate stack for stack=undefined datasets when the opts.stacked is undefined
  14711. ((opts.stacked === undefined && meta.stack === undefined) ? datasetIndex : ''),
  14712. meta.stack
  14713. ].join('.');
  14714. if (chart.isDatasetVisible(datasetIndex) && IDMatches(meta)) {
  14715. if (valuesPerStack[key] === undefined) {
  14716. valuesPerStack[key] = [];
  14717. }
  14718. helpers.each(dataset.data, function(rawValue, index) {
  14719. var values = valuesPerStack[key];
  14720. var value = +me.getRightValue(rawValue);
  14721. // invalid, hidden and negative values are ignored
  14722. if (isNaN(value) || meta.data[index].hidden || value < 0) {
  14723. return;
  14724. }
  14725. values[index] = values[index] || 0;
  14726. values[index] += value;
  14727. });
  14728. }
  14729. });
  14730. helpers.each(valuesPerStack, function(valuesForType) {
  14731. if (valuesForType.length > 0) {
  14732. var minVal = helpers.min(valuesForType);
  14733. var maxVal = helpers.max(valuesForType);
  14734. me.min = me.min === null ? minVal : Math.min(me.min, minVal);
  14735. me.max = me.max === null ? maxVal : Math.max(me.max, maxVal);
  14736. }
  14737. });
  14738. } else {
  14739. helpers.each(datasets, function(dataset, datasetIndex) {
  14740. var meta = chart.getDatasetMeta(datasetIndex);
  14741. if (chart.isDatasetVisible(datasetIndex) && IDMatches(meta)) {
  14742. helpers.each(dataset.data, function(rawValue, index) {
  14743. var value = +me.getRightValue(rawValue);
  14744. // invalid, hidden and negative values are ignored
  14745. if (isNaN(value) || meta.data[index].hidden || value < 0) {
  14746. return;
  14747. }
  14748. if (me.min === null) {
  14749. me.min = value;
  14750. } else if (value < me.min) {
  14751. me.min = value;
  14752. }
  14753. if (me.max === null) {
  14754. me.max = value;
  14755. } else if (value > me.max) {
  14756. me.max = value;
  14757. }
  14758. if (value !== 0 && (me.minNotZero === null || value < me.minNotZero)) {
  14759. me.minNotZero = value;
  14760. }
  14761. });
  14762. }
  14763. });
  14764. }
  14765. // Common base implementation to handle ticks.min, ticks.max
  14766. this.handleTickRangeOptions();
  14767. },
  14768. handleTickRangeOptions: function() {
  14769. var me = this;
  14770. var opts = me.options;
  14771. var tickOpts = opts.ticks;
  14772. var valueOrDefault = helpers.valueOrDefault;
  14773. var DEFAULT_MIN = 1;
  14774. var DEFAULT_MAX = 10;
  14775. me.min = valueOrDefault(tickOpts.min, me.min);
  14776. me.max = valueOrDefault(tickOpts.max, me.max);
  14777. if (me.min === me.max) {
  14778. if (me.min !== 0 && me.min !== null) {
  14779. me.min = Math.pow(10, Math.floor(helpers.log10(me.min)) - 1);
  14780. me.max = Math.pow(10, Math.floor(helpers.log10(me.max)) + 1);
  14781. } else {
  14782. me.min = DEFAULT_MIN;
  14783. me.max = DEFAULT_MAX;
  14784. }
  14785. }
  14786. if (me.min === null) {
  14787. me.min = Math.pow(10, Math.floor(helpers.log10(me.max)) - 1);
  14788. }
  14789. if (me.max === null) {
  14790. me.max = me.min !== 0
  14791. ? Math.pow(10, Math.floor(helpers.log10(me.min)) + 1)
  14792. : DEFAULT_MAX;
  14793. }
  14794. if (me.minNotZero === null) {
  14795. if (me.min > 0) {
  14796. me.minNotZero = me.min;
  14797. } else if (me.max < 1) {
  14798. me.minNotZero = Math.pow(10, Math.floor(helpers.log10(me.max)));
  14799. } else {
  14800. me.minNotZero = DEFAULT_MIN;
  14801. }
  14802. }
  14803. },
  14804. buildTicks: function() {
  14805. var me = this;
  14806. var opts = me.options;
  14807. var tickOpts = opts.ticks;
  14808. var reverse = !me.isHorizontal();
  14809. var generationOptions = {
  14810. min: tickOpts.min,
  14811. max: tickOpts.max
  14812. };
  14813. var ticks = me.ticks = generateTicks(generationOptions, me);
  14814. // At this point, we need to update our max and min given the tick values since we have expanded the
  14815. // range of the scale
  14816. me.max = helpers.max(ticks);
  14817. me.min = helpers.min(ticks);
  14818. if (tickOpts.reverse) {
  14819. reverse = !reverse;
  14820. me.start = me.max;
  14821. me.end = me.min;
  14822. } else {
  14823. me.start = me.min;
  14824. me.end = me.max;
  14825. }
  14826. if (reverse) {
  14827. ticks.reverse();
  14828. }
  14829. },
  14830. convertTicksToLabels: function() {
  14831. this.tickValues = this.ticks.slice();
  14832. Chart.Scale.prototype.convertTicksToLabels.call(this);
  14833. },
  14834. // Get the correct tooltip label
  14835. getLabelForIndex: function(index, datasetIndex) {
  14836. return +this.getRightValue(this.chart.data.datasets[datasetIndex].data[index]);
  14837. },
  14838. getPixelForTick: function(index) {
  14839. return this.getPixelForValue(this.tickValues[index]);
  14840. },
  14841. /**
  14842. * Returns the value of the first tick.
  14843. * @param {Number} value - The minimum not zero value.
  14844. * @return {Number} The first tick value.
  14845. * @private
  14846. */
  14847. _getFirstTickValue: function(value) {
  14848. var exp = Math.floor(helpers.log10(value));
  14849. var significand = Math.floor(value / Math.pow(10, exp));
  14850. return significand * Math.pow(10, exp);
  14851. },
  14852. getPixelForValue: function(value) {
  14853. var me = this;
  14854. var reverse = me.options.ticks.reverse;
  14855. var log10 = helpers.log10;
  14856. var firstTickValue = me._getFirstTickValue(me.minNotZero);
  14857. var offset = 0;
  14858. var innerDimension, pixel, start, end, sign;
  14859. value = +me.getRightValue(value);
  14860. if (reverse) {
  14861. start = me.end;
  14862. end = me.start;
  14863. sign = -1;
  14864. } else {
  14865. start = me.start;
  14866. end = me.end;
  14867. sign = 1;
  14868. }
  14869. if (me.isHorizontal()) {
  14870. innerDimension = me.width;
  14871. pixel = reverse ? me.right : me.left;
  14872. } else {
  14873. innerDimension = me.height;
  14874. sign *= -1; // invert, since the upper-left corner of the canvas is at pixel (0, 0)
  14875. pixel = reverse ? me.top : me.bottom;
  14876. }
  14877. if (value !== start) {
  14878. if (start === 0) { // include zero tick
  14879. offset = helpers.getValueOrDefault(
  14880. me.options.ticks.fontSize,
  14881. Chart.defaults.global.defaultFontSize
  14882. );
  14883. innerDimension -= offset;
  14884. start = firstTickValue;
  14885. }
  14886. if (value !== 0) {
  14887. offset += innerDimension / (log10(end) - log10(start)) * (log10(value) - log10(start));
  14888. }
  14889. pixel += sign * offset;
  14890. }
  14891. return pixel;
  14892. },
  14893. getValueForPixel: function(pixel) {
  14894. var me = this;
  14895. var reverse = me.options.ticks.reverse;
  14896. var log10 = helpers.log10;
  14897. var firstTickValue = me._getFirstTickValue(me.minNotZero);
  14898. var innerDimension, start, end, value;
  14899. if (reverse) {
  14900. start = me.end;
  14901. end = me.start;
  14902. } else {
  14903. start = me.start;
  14904. end = me.end;
  14905. }
  14906. if (me.isHorizontal()) {
  14907. innerDimension = me.width;
  14908. value = reverse ? me.right - pixel : pixel - me.left;
  14909. } else {
  14910. innerDimension = me.height;
  14911. value = reverse ? pixel - me.top : me.bottom - pixel;
  14912. }
  14913. if (value !== start) {
  14914. if (start === 0) { // include zero tick
  14915. var offset = helpers.getValueOrDefault(
  14916. me.options.ticks.fontSize,
  14917. Chart.defaults.global.defaultFontSize
  14918. );
  14919. value -= offset;
  14920. innerDimension -= offset;
  14921. start = firstTickValue;
  14922. }
  14923. value *= log10(end) - log10(start);
  14924. value /= innerDimension;
  14925. value = Math.pow(10, log10(start) + value);
  14926. }
  14927. return value;
  14928. }
  14929. });
  14930. Chart.scaleService.registerScaleType('logarithmic', LogarithmicScale, defaultConfig);
  14931. };
  14932. },{"34":34,"45":45}],57:[function(require,module,exports){
  14933. 'use strict';
  14934. var defaults = require(25);
  14935. var helpers = require(45);
  14936. var Ticks = require(34);
  14937. module.exports = function(Chart) {
  14938. var globalDefaults = defaults.global;
  14939. var defaultConfig = {
  14940. display: true,
  14941. // Boolean - Whether to animate scaling the chart from the centre
  14942. animate: true,
  14943. position: 'chartArea',
  14944. angleLines: {
  14945. display: true,
  14946. color: 'rgba(0, 0, 0, 0.1)',
  14947. lineWidth: 1
  14948. },
  14949. gridLines: {
  14950. circular: false
  14951. },
  14952. // label settings
  14953. ticks: {
  14954. // Boolean - Show a backdrop to the scale label
  14955. showLabelBackdrop: true,
  14956. // String - The colour of the label backdrop
  14957. backdropColor: 'rgba(255,255,255,0.75)',
  14958. // Number - The backdrop padding above & below the label in pixels
  14959. backdropPaddingY: 2,
  14960. // Number - The backdrop padding to the side of the label in pixels
  14961. backdropPaddingX: 2,
  14962. callback: Ticks.formatters.linear
  14963. },
  14964. pointLabels: {
  14965. // Boolean - if true, show point labels
  14966. display: true,
  14967. // Number - Point label font size in pixels
  14968. fontSize: 10,
  14969. // Function - Used to convert point labels
  14970. callback: function(label) {
  14971. return label;
  14972. }
  14973. }
  14974. };
  14975. function getValueCount(scale) {
  14976. var opts = scale.options;
  14977. return opts.angleLines.display || opts.pointLabels.display ? scale.chart.data.labels.length : 0;
  14978. }
  14979. function getPointLabelFontOptions(scale) {
  14980. var pointLabelOptions = scale.options.pointLabels;
  14981. var fontSize = helpers.valueOrDefault(pointLabelOptions.fontSize, globalDefaults.defaultFontSize);
  14982. var fontStyle = helpers.valueOrDefault(pointLabelOptions.fontStyle, globalDefaults.defaultFontStyle);
  14983. var fontFamily = helpers.valueOrDefault(pointLabelOptions.fontFamily, globalDefaults.defaultFontFamily);
  14984. var font = helpers.fontString(fontSize, fontStyle, fontFamily);
  14985. return {
  14986. size: fontSize,
  14987. style: fontStyle,
  14988. family: fontFamily,
  14989. font: font
  14990. };
  14991. }
  14992. function measureLabelSize(ctx, fontSize, label) {
  14993. if (helpers.isArray(label)) {
  14994. return {
  14995. w: helpers.longestText(ctx, ctx.font, label),
  14996. h: (label.length * fontSize) + ((label.length - 1) * 1.5 * fontSize)
  14997. };
  14998. }
  14999. return {
  15000. w: ctx.measureText(label).width,
  15001. h: fontSize
  15002. };
  15003. }
  15004. function determineLimits(angle, pos, size, min, max) {
  15005. if (angle === min || angle === max) {
  15006. return {
  15007. start: pos - (size / 2),
  15008. end: pos + (size / 2)
  15009. };
  15010. } else if (angle < min || angle > max) {
  15011. return {
  15012. start: pos - size - 5,
  15013. end: pos
  15014. };
  15015. }
  15016. return {
  15017. start: pos,
  15018. end: pos + size + 5
  15019. };
  15020. }
  15021. /**
  15022. * Helper function to fit a radial linear scale with point labels
  15023. */
  15024. function fitWithPointLabels(scale) {
  15025. /*
  15026. * Right, this is really confusing and there is a lot of maths going on here
  15027. * The gist of the problem is here: https://gist.github.com/nnnick/696cc9c55f4b0beb8fe9
  15028. *
  15029. * Reaction: https://dl.dropboxusercontent.com/u/34601363/toomuchscience.gif
  15030. *
  15031. * Solution:
  15032. *
  15033. * We assume the radius of the polygon is half the size of the canvas at first
  15034. * at each index we check if the text overlaps.
  15035. *
  15036. * Where it does, we store that angle and that index.
  15037. *
  15038. * After finding the largest index and angle we calculate how much we need to remove
  15039. * from the shape radius to move the point inwards by that x.
  15040. *
  15041. * We average the left and right distances to get the maximum shape radius that can fit in the box
  15042. * along with labels.
  15043. *
  15044. * Once we have that, we can find the centre point for the chart, by taking the x text protrusion
  15045. * on each side, removing that from the size, halving it and adding the left x protrusion width.
  15046. *
  15047. * This will mean we have a shape fitted to the canvas, as large as it can be with the labels
  15048. * and position it in the most space efficient manner
  15049. *
  15050. * https://dl.dropboxusercontent.com/u/34601363/yeahscience.gif
  15051. */
  15052. var plFont = getPointLabelFontOptions(scale);
  15053. // Get maximum radius of the polygon. Either half the height (minus the text width) or half the width.
  15054. // Use this to calculate the offset + change. - Make sure L/R protrusion is at least 0 to stop issues with centre points
  15055. var largestPossibleRadius = Math.min(scale.height / 2, scale.width / 2);
  15056. var furthestLimits = {
  15057. r: scale.width,
  15058. l: 0,
  15059. t: scale.height,
  15060. b: 0
  15061. };
  15062. var furthestAngles = {};
  15063. var i, textSize, pointPosition;
  15064. scale.ctx.font = plFont.font;
  15065. scale._pointLabelSizes = [];
  15066. var valueCount = getValueCount(scale);
  15067. for (i = 0; i < valueCount; i++) {
  15068. pointPosition = scale.getPointPosition(i, largestPossibleRadius);
  15069. textSize = measureLabelSize(scale.ctx, plFont.size, scale.pointLabels[i] || '');
  15070. scale._pointLabelSizes[i] = textSize;
  15071. // Add quarter circle to make degree 0 mean top of circle
  15072. var angleRadians = scale.getIndexAngle(i);
  15073. var angle = helpers.toDegrees(angleRadians) % 360;
  15074. var hLimits = determineLimits(angle, pointPosition.x, textSize.w, 0, 180);
  15075. var vLimits = determineLimits(angle, pointPosition.y, textSize.h, 90, 270);
  15076. if (hLimits.start < furthestLimits.l) {
  15077. furthestLimits.l = hLimits.start;
  15078. furthestAngles.l = angleRadians;
  15079. }
  15080. if (hLimits.end > furthestLimits.r) {
  15081. furthestLimits.r = hLimits.end;
  15082. furthestAngles.r = angleRadians;
  15083. }
  15084. if (vLimits.start < furthestLimits.t) {
  15085. furthestLimits.t = vLimits.start;
  15086. furthestAngles.t = angleRadians;
  15087. }
  15088. if (vLimits.end > furthestLimits.b) {
  15089. furthestLimits.b = vLimits.end;
  15090. furthestAngles.b = angleRadians;
  15091. }
  15092. }
  15093. scale.setReductions(largestPossibleRadius, furthestLimits, furthestAngles);
  15094. }
  15095. /**
  15096. * Helper function to fit a radial linear scale with no point labels
  15097. */
  15098. function fit(scale) {
  15099. var largestPossibleRadius = Math.min(scale.height / 2, scale.width / 2);
  15100. scale.drawingArea = Math.round(largestPossibleRadius);
  15101. scale.setCenterPoint(0, 0, 0, 0);
  15102. }
  15103. function getTextAlignForAngle(angle) {
  15104. if (angle === 0 || angle === 180) {
  15105. return 'center';
  15106. } else if (angle < 180) {
  15107. return 'left';
  15108. }
  15109. return 'right';
  15110. }
  15111. function fillText(ctx, text, position, fontSize) {
  15112. if (helpers.isArray(text)) {
  15113. var y = position.y;
  15114. var spacing = 1.5 * fontSize;
  15115. for (var i = 0; i < text.length; ++i) {
  15116. ctx.fillText(text[i], position.x, y);
  15117. y += spacing;
  15118. }
  15119. } else {
  15120. ctx.fillText(text, position.x, position.y);
  15121. }
  15122. }
  15123. function adjustPointPositionForLabelHeight(angle, textSize, position) {
  15124. if (angle === 90 || angle === 270) {
  15125. position.y -= (textSize.h / 2);
  15126. } else if (angle > 270 || angle < 90) {
  15127. position.y -= textSize.h;
  15128. }
  15129. }
  15130. function drawPointLabels(scale) {
  15131. var ctx = scale.ctx;
  15132. var opts = scale.options;
  15133. var angleLineOpts = opts.angleLines;
  15134. var pointLabelOpts = opts.pointLabels;
  15135. ctx.lineWidth = angleLineOpts.lineWidth;
  15136. ctx.strokeStyle = angleLineOpts.color;
  15137. var outerDistance = scale.getDistanceFromCenterForValue(opts.ticks.reverse ? scale.min : scale.max);
  15138. // Point Label Font
  15139. var plFont = getPointLabelFontOptions(scale);
  15140. ctx.textBaseline = 'top';
  15141. for (var i = getValueCount(scale) - 1; i >= 0; i--) {
  15142. if (angleLineOpts.display) {
  15143. var outerPosition = scale.getPointPosition(i, outerDistance);
  15144. ctx.beginPath();
  15145. ctx.moveTo(scale.xCenter, scale.yCenter);
  15146. ctx.lineTo(outerPosition.x, outerPosition.y);
  15147. ctx.stroke();
  15148. ctx.closePath();
  15149. }
  15150. if (pointLabelOpts.display) {
  15151. // Extra 3px out for some label spacing
  15152. var pointLabelPosition = scale.getPointPosition(i, outerDistance + 5);
  15153. // Keep this in loop since we may support array properties here
  15154. var pointLabelFontColor = helpers.valueAtIndexOrDefault(pointLabelOpts.fontColor, i, globalDefaults.defaultFontColor);
  15155. ctx.font = plFont.font;
  15156. ctx.fillStyle = pointLabelFontColor;
  15157. var angleRadians = scale.getIndexAngle(i);
  15158. var angle = helpers.toDegrees(angleRadians);
  15159. ctx.textAlign = getTextAlignForAngle(angle);
  15160. adjustPointPositionForLabelHeight(angle, scale._pointLabelSizes[i], pointLabelPosition);
  15161. fillText(ctx, scale.pointLabels[i] || '', pointLabelPosition, plFont.size);
  15162. }
  15163. }
  15164. }
  15165. function drawRadiusLine(scale, gridLineOpts, radius, index) {
  15166. var ctx = scale.ctx;
  15167. ctx.strokeStyle = helpers.valueAtIndexOrDefault(gridLineOpts.color, index - 1);
  15168. ctx.lineWidth = helpers.valueAtIndexOrDefault(gridLineOpts.lineWidth, index - 1);
  15169. if (scale.options.gridLines.circular) {
  15170. // Draw circular arcs between the points
  15171. ctx.beginPath();
  15172. ctx.arc(scale.xCenter, scale.yCenter, radius, 0, Math.PI * 2);
  15173. ctx.closePath();
  15174. ctx.stroke();
  15175. } else {
  15176. // Draw straight lines connecting each index
  15177. var valueCount = getValueCount(scale);
  15178. if (valueCount === 0) {
  15179. return;
  15180. }
  15181. ctx.beginPath();
  15182. var pointPosition = scale.getPointPosition(0, radius);
  15183. ctx.moveTo(pointPosition.x, pointPosition.y);
  15184. for (var i = 1; i < valueCount; i++) {
  15185. pointPosition = scale.getPointPosition(i, radius);
  15186. ctx.lineTo(pointPosition.x, pointPosition.y);
  15187. }
  15188. ctx.closePath();
  15189. ctx.stroke();
  15190. }
  15191. }
  15192. function numberOrZero(param) {
  15193. return helpers.isNumber(param) ? param : 0;
  15194. }
  15195. var LinearRadialScale = Chart.LinearScaleBase.extend({
  15196. setDimensions: function() {
  15197. var me = this;
  15198. var opts = me.options;
  15199. var tickOpts = opts.ticks;
  15200. // Set the unconstrained dimension before label rotation
  15201. me.width = me.maxWidth;
  15202. me.height = me.maxHeight;
  15203. me.xCenter = Math.round(me.width / 2);
  15204. me.yCenter = Math.round(me.height / 2);
  15205. var minSize = helpers.min([me.height, me.width]);
  15206. var tickFontSize = helpers.valueOrDefault(tickOpts.fontSize, globalDefaults.defaultFontSize);
  15207. me.drawingArea = opts.display ? (minSize / 2) - (tickFontSize / 2 + tickOpts.backdropPaddingY) : (minSize / 2);
  15208. },
  15209. determineDataLimits: function() {
  15210. var me = this;
  15211. var chart = me.chart;
  15212. var min = Number.POSITIVE_INFINITY;
  15213. var max = Number.NEGATIVE_INFINITY;
  15214. helpers.each(chart.data.datasets, function(dataset, datasetIndex) {
  15215. if (chart.isDatasetVisible(datasetIndex)) {
  15216. var meta = chart.getDatasetMeta(datasetIndex);
  15217. helpers.each(dataset.data, function(rawValue, index) {
  15218. var value = +me.getRightValue(rawValue);
  15219. if (isNaN(value) || meta.data[index].hidden) {
  15220. return;
  15221. }
  15222. min = Math.min(value, min);
  15223. max = Math.max(value, max);
  15224. });
  15225. }
  15226. });
  15227. me.min = (min === Number.POSITIVE_INFINITY ? 0 : min);
  15228. me.max = (max === Number.NEGATIVE_INFINITY ? 0 : max);
  15229. // Common base implementation to handle ticks.min, ticks.max, ticks.beginAtZero
  15230. me.handleTickRangeOptions();
  15231. },
  15232. getTickLimit: function() {
  15233. var tickOpts = this.options.ticks;
  15234. var tickFontSize = helpers.valueOrDefault(tickOpts.fontSize, globalDefaults.defaultFontSize);
  15235. return Math.min(tickOpts.maxTicksLimit ? tickOpts.maxTicksLimit : 11, Math.ceil(this.drawingArea / (1.5 * tickFontSize)));
  15236. },
  15237. convertTicksToLabels: function() {
  15238. var me = this;
  15239. Chart.LinearScaleBase.prototype.convertTicksToLabels.call(me);
  15240. // Point labels
  15241. me.pointLabels = me.chart.data.labels.map(me.options.pointLabels.callback, me);
  15242. },
  15243. getLabelForIndex: function(index, datasetIndex) {
  15244. return +this.getRightValue(this.chart.data.datasets[datasetIndex].data[index]);
  15245. },
  15246. fit: function() {
  15247. if (this.options.pointLabels.display) {
  15248. fitWithPointLabels(this);
  15249. } else {
  15250. fit(this);
  15251. }
  15252. },
  15253. /**
  15254. * Set radius reductions and determine new radius and center point
  15255. * @private
  15256. */
  15257. setReductions: function(largestPossibleRadius, furthestLimits, furthestAngles) {
  15258. var me = this;
  15259. var radiusReductionLeft = furthestLimits.l / Math.sin(furthestAngles.l);
  15260. var radiusReductionRight = Math.max(furthestLimits.r - me.width, 0) / Math.sin(furthestAngles.r);
  15261. var radiusReductionTop = -furthestLimits.t / Math.cos(furthestAngles.t);
  15262. var radiusReductionBottom = -Math.max(furthestLimits.b - me.height, 0) / Math.cos(furthestAngles.b);
  15263. radiusReductionLeft = numberOrZero(radiusReductionLeft);
  15264. radiusReductionRight = numberOrZero(radiusReductionRight);
  15265. radiusReductionTop = numberOrZero(radiusReductionTop);
  15266. radiusReductionBottom = numberOrZero(radiusReductionBottom);
  15267. me.drawingArea = Math.min(
  15268. Math.round(largestPossibleRadius - (radiusReductionLeft + radiusReductionRight) / 2),
  15269. Math.round(largestPossibleRadius - (radiusReductionTop + radiusReductionBottom) / 2));
  15270. me.setCenterPoint(radiusReductionLeft, radiusReductionRight, radiusReductionTop, radiusReductionBottom);
  15271. },
  15272. setCenterPoint: function(leftMovement, rightMovement, topMovement, bottomMovement) {
  15273. var me = this;
  15274. var maxRight = me.width - rightMovement - me.drawingArea;
  15275. var maxLeft = leftMovement + me.drawingArea;
  15276. var maxTop = topMovement + me.drawingArea;
  15277. var maxBottom = me.height - bottomMovement - me.drawingArea;
  15278. me.xCenter = Math.round(((maxLeft + maxRight) / 2) + me.left);
  15279. me.yCenter = Math.round(((maxTop + maxBottom) / 2) + me.top);
  15280. },
  15281. getIndexAngle: function(index) {
  15282. var angleMultiplier = (Math.PI * 2) / getValueCount(this);
  15283. var startAngle = this.chart.options && this.chart.options.startAngle ?
  15284. this.chart.options.startAngle :
  15285. 0;
  15286. var startAngleRadians = startAngle * Math.PI * 2 / 360;
  15287. // Start from the top instead of right, so remove a quarter of the circle
  15288. return index * angleMultiplier + startAngleRadians;
  15289. },
  15290. getDistanceFromCenterForValue: function(value) {
  15291. var me = this;
  15292. if (value === null) {
  15293. return 0; // null always in center
  15294. }
  15295. // Take into account half font size + the yPadding of the top value
  15296. var scalingFactor = me.drawingArea / (me.max - me.min);
  15297. if (me.options.ticks.reverse) {
  15298. return (me.max - value) * scalingFactor;
  15299. }
  15300. return (value - me.min) * scalingFactor;
  15301. },
  15302. getPointPosition: function(index, distanceFromCenter) {
  15303. var me = this;
  15304. var thisAngle = me.getIndexAngle(index) - (Math.PI / 2);
  15305. return {
  15306. x: Math.round(Math.cos(thisAngle) * distanceFromCenter) + me.xCenter,
  15307. y: Math.round(Math.sin(thisAngle) * distanceFromCenter) + me.yCenter
  15308. };
  15309. },
  15310. getPointPositionForValue: function(index, value) {
  15311. return this.getPointPosition(index, this.getDistanceFromCenterForValue(value));
  15312. },
  15313. getBasePosition: function() {
  15314. var me = this;
  15315. var min = me.min;
  15316. var max = me.max;
  15317. return me.getPointPositionForValue(0,
  15318. me.beginAtZero ? 0 :
  15319. min < 0 && max < 0 ? max :
  15320. min > 0 && max > 0 ? min :
  15321. 0);
  15322. },
  15323. draw: function() {
  15324. var me = this;
  15325. var opts = me.options;
  15326. var gridLineOpts = opts.gridLines;
  15327. var tickOpts = opts.ticks;
  15328. var valueOrDefault = helpers.valueOrDefault;
  15329. if (opts.display) {
  15330. var ctx = me.ctx;
  15331. var startAngle = this.getIndexAngle(0);
  15332. // Tick Font
  15333. var tickFontSize = valueOrDefault(tickOpts.fontSize, globalDefaults.defaultFontSize);
  15334. var tickFontStyle = valueOrDefault(tickOpts.fontStyle, globalDefaults.defaultFontStyle);
  15335. var tickFontFamily = valueOrDefault(tickOpts.fontFamily, globalDefaults.defaultFontFamily);
  15336. var tickLabelFont = helpers.fontString(tickFontSize, tickFontStyle, tickFontFamily);
  15337. helpers.each(me.ticks, function(label, index) {
  15338. // Don't draw a centre value (if it is minimum)
  15339. if (index > 0 || tickOpts.reverse) {
  15340. var yCenterOffset = me.getDistanceFromCenterForValue(me.ticksAsNumbers[index]);
  15341. // Draw circular lines around the scale
  15342. if (gridLineOpts.display && index !== 0) {
  15343. drawRadiusLine(me, gridLineOpts, yCenterOffset, index);
  15344. }
  15345. if (tickOpts.display) {
  15346. var tickFontColor = valueOrDefault(tickOpts.fontColor, globalDefaults.defaultFontColor);
  15347. ctx.font = tickLabelFont;
  15348. ctx.save();
  15349. ctx.translate(me.xCenter, me.yCenter);
  15350. ctx.rotate(startAngle);
  15351. if (tickOpts.showLabelBackdrop) {
  15352. var labelWidth = ctx.measureText(label).width;
  15353. ctx.fillStyle = tickOpts.backdropColor;
  15354. ctx.fillRect(
  15355. -labelWidth / 2 - tickOpts.backdropPaddingX,
  15356. -yCenterOffset - tickFontSize / 2 - tickOpts.backdropPaddingY,
  15357. labelWidth + tickOpts.backdropPaddingX * 2,
  15358. tickFontSize + tickOpts.backdropPaddingY * 2
  15359. );
  15360. }
  15361. ctx.textAlign = 'center';
  15362. ctx.textBaseline = 'middle';
  15363. ctx.fillStyle = tickFontColor;
  15364. ctx.fillText(label, 0, -yCenterOffset);
  15365. ctx.restore();
  15366. }
  15367. }
  15368. });
  15369. if (opts.angleLines.display || opts.pointLabels.display) {
  15370. drawPointLabels(me);
  15371. }
  15372. }
  15373. }
  15374. });
  15375. Chart.scaleService.registerScaleType('radialLinear', LinearRadialScale, defaultConfig);
  15376. };
  15377. },{"25":25,"34":34,"45":45}],58:[function(require,module,exports){
  15378. /* global window: false */
  15379. 'use strict';
  15380. var moment = require(6);
  15381. moment = typeof moment === 'function' ? moment : window.moment;
  15382. var defaults = require(25);
  15383. var helpers = require(45);
  15384. // Integer constants are from the ES6 spec.
  15385. var MIN_INTEGER = Number.MIN_SAFE_INTEGER || -9007199254740991;
  15386. var MAX_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991;
  15387. var INTERVALS = {
  15388. millisecond: {
  15389. common: true,
  15390. size: 1,
  15391. steps: [1, 2, 5, 10, 20, 50, 100, 250, 500]
  15392. },
  15393. second: {
  15394. common: true,
  15395. size: 1000,
  15396. steps: [1, 2, 5, 10, 30]
  15397. },
  15398. minute: {
  15399. common: true,
  15400. size: 60000,
  15401. steps: [1, 2, 5, 10, 30]
  15402. },
  15403. hour: {
  15404. common: true,
  15405. size: 3600000,
  15406. steps: [1, 2, 3, 6, 12]
  15407. },
  15408. day: {
  15409. common: true,
  15410. size: 86400000,
  15411. steps: [1, 2, 5]
  15412. },
  15413. week: {
  15414. common: false,
  15415. size: 604800000,
  15416. steps: [1, 2, 3, 4]
  15417. },
  15418. month: {
  15419. common: true,
  15420. size: 2.628e9,
  15421. steps: [1, 2, 3]
  15422. },
  15423. quarter: {
  15424. common: false,
  15425. size: 7.884e9,
  15426. steps: [1, 2, 3, 4]
  15427. },
  15428. year: {
  15429. common: true,
  15430. size: 3.154e10
  15431. }
  15432. };
  15433. var UNITS = Object.keys(INTERVALS);
  15434. function sorter(a, b) {
  15435. return a - b;
  15436. }
  15437. function arrayUnique(items) {
  15438. var hash = {};
  15439. var out = [];
  15440. var i, ilen, item;
  15441. for (i = 0, ilen = items.length; i < ilen; ++i) {
  15442. item = items[i];
  15443. if (!hash[item]) {
  15444. hash[item] = true;
  15445. out.push(item);
  15446. }
  15447. }
  15448. return out;
  15449. }
  15450. /**
  15451. * Returns an array of {time, pos} objects used to interpolate a specific `time` or position
  15452. * (`pos`) on the scale, by searching entries before and after the requested value. `pos` is
  15453. * a decimal between 0 and 1: 0 being the start of the scale (left or top) and 1 the other
  15454. * extremity (left + width or top + height). Note that it would be more optimized to directly
  15455. * store pre-computed pixels, but the scale dimensions are not guaranteed at the time we need
  15456. * to create the lookup table. The table ALWAYS contains at least two items: min and max.
  15457. *
  15458. * @param {Number[]} timestamps - timestamps sorted from lowest to highest.
  15459. * @param {String} distribution - If 'linear', timestamps will be spread linearly along the min
  15460. * and max range, so basically, the table will contains only two items: {min, 0} and {max, 1}.
  15461. * If 'series', timestamps will be positioned at the same distance from each other. In this
  15462. * case, only timestamps that break the time linearity are registered, meaning that in the
  15463. * best case, all timestamps are linear, the table contains only min and max.
  15464. */
  15465. function buildLookupTable(timestamps, min, max, distribution) {
  15466. if (distribution === 'linear' || !timestamps.length) {
  15467. return [
  15468. {time: min, pos: 0},
  15469. {time: max, pos: 1}
  15470. ];
  15471. }
  15472. var table = [];
  15473. var items = [min];
  15474. var i, ilen, prev, curr, next;
  15475. for (i = 0, ilen = timestamps.length; i < ilen; ++i) {
  15476. curr = timestamps[i];
  15477. if (curr > min && curr < max) {
  15478. items.push(curr);
  15479. }
  15480. }
  15481. items.push(max);
  15482. for (i = 0, ilen = items.length; i < ilen; ++i) {
  15483. next = items[i + 1];
  15484. prev = items[i - 1];
  15485. curr = items[i];
  15486. // only add points that breaks the scale linearity
  15487. if (prev === undefined || next === undefined || Math.round((next + prev) / 2) !== curr) {
  15488. table.push({time: curr, pos: i / (ilen - 1)});
  15489. }
  15490. }
  15491. return table;
  15492. }
  15493. // @see adapted from http://www.anujgakhar.com/2014/03/01/binary-search-in-javascript/
  15494. function lookup(table, key, value) {
  15495. var lo = 0;
  15496. var hi = table.length - 1;
  15497. var mid, i0, i1;
  15498. while (lo >= 0 && lo <= hi) {
  15499. mid = (lo + hi) >> 1;
  15500. i0 = table[mid - 1] || null;
  15501. i1 = table[mid];
  15502. if (!i0) {
  15503. // given value is outside table (before first item)
  15504. return {lo: null, hi: i1};
  15505. } else if (i1[key] < value) {
  15506. lo = mid + 1;
  15507. } else if (i0[key] > value) {
  15508. hi = mid - 1;
  15509. } else {
  15510. return {lo: i0, hi: i1};
  15511. }
  15512. }
  15513. // given value is outside table (after last item)
  15514. return {lo: i1, hi: null};
  15515. }
  15516. /**
  15517. * Linearly interpolates the given source `value` using the table items `skey` values and
  15518. * returns the associated `tkey` value. For example, interpolate(table, 'time', 42, 'pos')
  15519. * returns the position for a timestamp equal to 42. If value is out of bounds, values at
  15520. * index [0, 1] or [n - 1, n] are used for the interpolation.
  15521. */
  15522. function interpolate(table, skey, sval, tkey) {
  15523. var range = lookup(table, skey, sval);
  15524. // Note: the lookup table ALWAYS contains at least 2 items (min and max)
  15525. var prev = !range.lo ? table[0] : !range.hi ? table[table.length - 2] : range.lo;
  15526. var next = !range.lo ? table[1] : !range.hi ? table[table.length - 1] : range.hi;
  15527. var span = next[skey] - prev[skey];
  15528. var ratio = span ? (sval - prev[skey]) / span : 0;
  15529. var offset = (next[tkey] - prev[tkey]) * ratio;
  15530. return prev[tkey] + offset;
  15531. }
  15532. /**
  15533. * Convert the given value to a moment object using the given time options.
  15534. * @see http://momentjs.com/docs/#/parsing/
  15535. */
  15536. function momentify(value, options) {
  15537. var parser = options.parser;
  15538. var format = options.parser || options.format;
  15539. if (typeof parser === 'function') {
  15540. return parser(value);
  15541. }
  15542. if (typeof value === 'string' && typeof format === 'string') {
  15543. return moment(value, format);
  15544. }
  15545. if (!(value instanceof moment)) {
  15546. value = moment(value);
  15547. }
  15548. if (value.isValid()) {
  15549. return value;
  15550. }
  15551. // Labels are in an incompatible moment format and no `parser` has been provided.
  15552. // The user might still use the deprecated `format` option to convert his inputs.
  15553. if (typeof format === 'function') {
  15554. return format(value);
  15555. }
  15556. return value;
  15557. }
  15558. function parse(input, scale) {
  15559. if (helpers.isNullOrUndef(input)) {
  15560. return null;
  15561. }
  15562. var options = scale.options.time;
  15563. var value = momentify(scale.getRightValue(input), options);
  15564. if (!value.isValid()) {
  15565. return null;
  15566. }
  15567. if (options.round) {
  15568. value.startOf(options.round);
  15569. }
  15570. return value.valueOf();
  15571. }
  15572. /**
  15573. * Returns the number of unit to skip to be able to display up to `capacity` number of ticks
  15574. * in `unit` for the given `min` / `max` range and respecting the interval steps constraints.
  15575. */
  15576. function determineStepSize(min, max, unit, capacity) {
  15577. var range = max - min;
  15578. var interval = INTERVALS[unit];
  15579. var milliseconds = interval.size;
  15580. var steps = interval.steps;
  15581. var i, ilen, factor;
  15582. if (!steps) {
  15583. return Math.ceil(range / (capacity * milliseconds));
  15584. }
  15585. for (i = 0, ilen = steps.length; i < ilen; ++i) {
  15586. factor = steps[i];
  15587. if (Math.ceil(range / (milliseconds * factor)) <= capacity) {
  15588. break;
  15589. }
  15590. }
  15591. return factor;
  15592. }
  15593. /**
  15594. * Figures out what unit results in an appropriate number of auto-generated ticks
  15595. */
  15596. function determineUnitForAutoTicks(minUnit, min, max, capacity) {
  15597. var ilen = UNITS.length;
  15598. var i, interval, factor;
  15599. for (i = UNITS.indexOf(minUnit); i < ilen - 1; ++i) {
  15600. interval = INTERVALS[UNITS[i]];
  15601. factor = interval.steps ? interval.steps[interval.steps.length - 1] : MAX_INTEGER;
  15602. if (interval.common && Math.ceil((max - min) / (factor * interval.size)) <= capacity) {
  15603. return UNITS[i];
  15604. }
  15605. }
  15606. return UNITS[ilen - 1];
  15607. }
  15608. /**
  15609. * Figures out what unit to format a set of ticks with
  15610. */
  15611. function determineUnitForFormatting(ticks, minUnit, min, max) {
  15612. var duration = moment.duration(moment(max).diff(moment(min)));
  15613. var ilen = UNITS.length;
  15614. var i, unit;
  15615. for (i = ilen - 1; i >= UNITS.indexOf(minUnit); i--) {
  15616. unit = UNITS[i];
  15617. if (INTERVALS[unit].common && duration.as(unit) >= ticks.length) {
  15618. return unit;
  15619. }
  15620. }
  15621. return UNITS[minUnit ? UNITS.indexOf(minUnit) : 0];
  15622. }
  15623. function determineMajorUnit(unit) {
  15624. for (var i = UNITS.indexOf(unit) + 1, ilen = UNITS.length; i < ilen; ++i) {
  15625. if (INTERVALS[UNITS[i]].common) {
  15626. return UNITS[i];
  15627. }
  15628. }
  15629. }
  15630. /**
  15631. * Generates a maximum of `capacity` timestamps between min and max, rounded to the
  15632. * `minor` unit, aligned on the `major` unit and using the given scale time `options`.
  15633. * Important: this method can return ticks outside the min and max range, it's the
  15634. * responsibility of the calling code to clamp values if needed.
  15635. */
  15636. function generate(min, max, capacity, options) {
  15637. var timeOpts = options.time;
  15638. var minor = timeOpts.unit || determineUnitForAutoTicks(timeOpts.minUnit, min, max, capacity);
  15639. var major = determineMajorUnit(minor);
  15640. var stepSize = helpers.valueOrDefault(timeOpts.stepSize, timeOpts.unitStepSize);
  15641. var weekday = minor === 'week' ? timeOpts.isoWeekday : false;
  15642. var majorTicksEnabled = options.ticks.major.enabled;
  15643. var interval = INTERVALS[minor];
  15644. var first = moment(min);
  15645. var last = moment(max);
  15646. var ticks = [];
  15647. var time;
  15648. if (!stepSize) {
  15649. stepSize = determineStepSize(min, max, minor, capacity);
  15650. }
  15651. // For 'week' unit, handle the first day of week option
  15652. if (weekday) {
  15653. first = first.isoWeekday(weekday);
  15654. last = last.isoWeekday(weekday);
  15655. }
  15656. // Align first/last ticks on unit
  15657. first = first.startOf(weekday ? 'day' : minor);
  15658. last = last.startOf(weekday ? 'day' : minor);
  15659. // Make sure that the last tick include max
  15660. if (last < max) {
  15661. last.add(1, minor);
  15662. }
  15663. time = moment(first);
  15664. if (majorTicksEnabled && major && !weekday && !timeOpts.round) {
  15665. // Align the first tick on the previous `minor` unit aligned on the `major` unit:
  15666. // we first aligned time on the previous `major` unit then add the number of full
  15667. // stepSize there is between first and the previous major time.
  15668. time.startOf(major);
  15669. time.add(~~((first - time) / (interval.size * stepSize)) * stepSize, minor);
  15670. }
  15671. for (; time < last; time.add(stepSize, minor)) {
  15672. ticks.push(+time);
  15673. }
  15674. ticks.push(+time);
  15675. return ticks;
  15676. }
  15677. /**
  15678. * Returns the right and left offsets from edges in the form of {left, right}.
  15679. * Offsets are added when the `offset` option is true.
  15680. */
  15681. function computeOffsets(table, ticks, min, max, options) {
  15682. var left = 0;
  15683. var right = 0;
  15684. var upper, lower;
  15685. if (options.offset && ticks.length) {
  15686. if (!options.time.min) {
  15687. upper = ticks.length > 1 ? ticks[1] : max;
  15688. lower = ticks[0];
  15689. left = (
  15690. interpolate(table, 'time', upper, 'pos') -
  15691. interpolate(table, 'time', lower, 'pos')
  15692. ) / 2;
  15693. }
  15694. if (!options.time.max) {
  15695. upper = ticks[ticks.length - 1];
  15696. lower = ticks.length > 1 ? ticks[ticks.length - 2] : min;
  15697. right = (
  15698. interpolate(table, 'time', upper, 'pos') -
  15699. interpolate(table, 'time', lower, 'pos')
  15700. ) / 2;
  15701. }
  15702. }
  15703. return {left: left, right: right};
  15704. }
  15705. function ticksFromTimestamps(values, majorUnit) {
  15706. var ticks = [];
  15707. var i, ilen, value, major;
  15708. for (i = 0, ilen = values.length; i < ilen; ++i) {
  15709. value = values[i];
  15710. major = majorUnit ? value === +moment(value).startOf(majorUnit) : false;
  15711. ticks.push({
  15712. value: value,
  15713. major: major
  15714. });
  15715. }
  15716. return ticks;
  15717. }
  15718. function determineLabelFormat(data, timeOpts) {
  15719. var i, momentDate, hasTime;
  15720. var ilen = data.length;
  15721. // find the label with the most parts (milliseconds, minutes, etc.)
  15722. // format all labels with the same level of detail as the most specific label
  15723. for (i = 0; i < ilen; i++) {
  15724. momentDate = momentify(data[i], timeOpts);
  15725. if (momentDate.millisecond() !== 0) {
  15726. return 'MMM D, YYYY h:mm:ss.SSS a';
  15727. }
  15728. if (momentDate.second() !== 0 || momentDate.minute() !== 0 || momentDate.hour() !== 0) {
  15729. hasTime = true;
  15730. }
  15731. }
  15732. if (hasTime) {
  15733. return 'MMM D, YYYY h:mm:ss a';
  15734. }
  15735. return 'MMM D, YYYY';
  15736. }
  15737. module.exports = function(Chart) {
  15738. var defaultConfig = {
  15739. position: 'bottom',
  15740. /**
  15741. * Data distribution along the scale:
  15742. * - 'linear': data are spread according to their time (distances can vary),
  15743. * - 'series': data are spread at the same distance from each other.
  15744. * @see https://github.com/chartjs/Chart.js/pull/4507
  15745. * @since 2.7.0
  15746. */
  15747. distribution: 'linear',
  15748. /**
  15749. * Scale boundary strategy (bypassed by min/max time options)
  15750. * - `data`: make sure data are fully visible, ticks outside are removed
  15751. * - `ticks`: make sure ticks are fully visible, data outside are truncated
  15752. * @see https://github.com/chartjs/Chart.js/pull/4556
  15753. * @since 2.7.0
  15754. */
  15755. bounds: 'data',
  15756. time: {
  15757. parser: false, // false == a pattern string from http://momentjs.com/docs/#/parsing/string-format/ or a custom callback that converts its argument to a moment
  15758. format: false, // DEPRECATED false == date objects, moment object, callback or a pattern string from http://momentjs.com/docs/#/parsing/string-format/
  15759. unit: false, // false == automatic or override with week, month, year, etc.
  15760. round: false, // none, or override with week, month, year, etc.
  15761. displayFormat: false, // DEPRECATED
  15762. isoWeekday: false, // override week start day - see http://momentjs.com/docs/#/get-set/iso-weekday/
  15763. minUnit: 'millisecond',
  15764. // defaults to unit's corresponding unitFormat below or override using pattern string from http://momentjs.com/docs/#/displaying/format/
  15765. displayFormats: {
  15766. millisecond: 'h:mm:ss.SSS a', // 11:20:01.123 AM,
  15767. second: 'h:mm:ss a', // 11:20:01 AM
  15768. minute: 'h:mm a', // 11:20 AM
  15769. hour: 'hA', // 5PM
  15770. day: 'MMM D', // Sep 4
  15771. week: 'll', // Week 46, or maybe "[W]WW - YYYY" ?
  15772. month: 'MMM YYYY', // Sept 2015
  15773. quarter: '[Q]Q - YYYY', // Q3
  15774. year: 'YYYY' // 2015
  15775. },
  15776. },
  15777. ticks: {
  15778. autoSkip: false,
  15779. /**
  15780. * Ticks generation input values:
  15781. * - 'auto': generates "optimal" ticks based on scale size and time options.
  15782. * - 'data': generates ticks from data (including labels from data {t|x|y} objects).
  15783. * - 'labels': generates ticks from user given `data.labels` values ONLY.
  15784. * @see https://github.com/chartjs/Chart.js/pull/4507
  15785. * @since 2.7.0
  15786. */
  15787. source: 'auto',
  15788. major: {
  15789. enabled: false
  15790. }
  15791. }
  15792. };
  15793. var TimeScale = Chart.Scale.extend({
  15794. initialize: function() {
  15795. if (!moment) {
  15796. throw new Error('Chart.js - Moment.js could not be found! You must include it before Chart.js to use the time scale. Download at https://momentjs.com');
  15797. }
  15798. this.mergeTicksOptions();
  15799. Chart.Scale.prototype.initialize.call(this);
  15800. },
  15801. update: function() {
  15802. var me = this;
  15803. var options = me.options;
  15804. // DEPRECATIONS: output a message only one time per update
  15805. if (options.time && options.time.format) {
  15806. console.warn('options.time.format is deprecated and replaced by options.time.parser.');
  15807. }
  15808. return Chart.Scale.prototype.update.apply(me, arguments);
  15809. },
  15810. /**
  15811. * Allows data to be referenced via 't' attribute
  15812. */
  15813. getRightValue: function(rawValue) {
  15814. if (rawValue && rawValue.t !== undefined) {
  15815. rawValue = rawValue.t;
  15816. }
  15817. return Chart.Scale.prototype.getRightValue.call(this, rawValue);
  15818. },
  15819. determineDataLimits: function() {
  15820. var me = this;
  15821. var chart = me.chart;
  15822. var timeOpts = me.options.time;
  15823. var unit = timeOpts.unit || 'day';
  15824. var min = MAX_INTEGER;
  15825. var max = MIN_INTEGER;
  15826. var timestamps = [];
  15827. var datasets = [];
  15828. var labels = [];
  15829. var i, j, ilen, jlen, data, timestamp;
  15830. // Convert labels to timestamps
  15831. for (i = 0, ilen = chart.data.labels.length; i < ilen; ++i) {
  15832. labels.push(parse(chart.data.labels[i], me));
  15833. }
  15834. // Convert data to timestamps
  15835. for (i = 0, ilen = (chart.data.datasets || []).length; i < ilen; ++i) {
  15836. if (chart.isDatasetVisible(i)) {
  15837. data = chart.data.datasets[i].data;
  15838. // Let's consider that all data have the same format.
  15839. if (helpers.isObject(data[0])) {
  15840. datasets[i] = [];
  15841. for (j = 0, jlen = data.length; j < jlen; ++j) {
  15842. timestamp = parse(data[j], me);
  15843. timestamps.push(timestamp);
  15844. datasets[i][j] = timestamp;
  15845. }
  15846. } else {
  15847. timestamps.push.apply(timestamps, labels);
  15848. datasets[i] = labels.slice(0);
  15849. }
  15850. } else {
  15851. datasets[i] = [];
  15852. }
  15853. }
  15854. if (labels.length) {
  15855. // Sort labels **after** data have been converted
  15856. labels = arrayUnique(labels).sort(sorter);
  15857. min = Math.min(min, labels[0]);
  15858. max = Math.max(max, labels[labels.length - 1]);
  15859. }
  15860. if (timestamps.length) {
  15861. timestamps = arrayUnique(timestamps).sort(sorter);
  15862. min = Math.min(min, timestamps[0]);
  15863. max = Math.max(max, timestamps[timestamps.length - 1]);
  15864. }
  15865. min = parse(timeOpts.min, me) || min;
  15866. max = parse(timeOpts.max, me) || max;
  15867. // In case there is no valid min/max, set limits based on unit time option
  15868. min = min === MAX_INTEGER ? +moment().startOf(unit) : min;
  15869. max = max === MIN_INTEGER ? +moment().endOf(unit) + 1 : max;
  15870. // Make sure that max is strictly higher than min (required by the lookup table)
  15871. me.min = Math.min(min, max);
  15872. me.max = Math.max(min + 1, max);
  15873. // PRIVATE
  15874. me._horizontal = me.isHorizontal();
  15875. me._table = [];
  15876. me._timestamps = {
  15877. data: timestamps,
  15878. datasets: datasets,
  15879. labels: labels
  15880. };
  15881. },
  15882. buildTicks: function() {
  15883. var me = this;
  15884. var min = me.min;
  15885. var max = me.max;
  15886. var options = me.options;
  15887. var timeOpts = options.time;
  15888. var timestamps = [];
  15889. var ticks = [];
  15890. var i, ilen, timestamp;
  15891. switch (options.ticks.source) {
  15892. case 'data':
  15893. timestamps = me._timestamps.data;
  15894. break;
  15895. case 'labels':
  15896. timestamps = me._timestamps.labels;
  15897. break;
  15898. case 'auto':
  15899. default:
  15900. timestamps = generate(min, max, me.getLabelCapacity(min), options);
  15901. }
  15902. if (options.bounds === 'ticks' && timestamps.length) {
  15903. min = timestamps[0];
  15904. max = timestamps[timestamps.length - 1];
  15905. }
  15906. // Enforce limits with user min/max options
  15907. min = parse(timeOpts.min, me) || min;
  15908. max = parse(timeOpts.max, me) || max;
  15909. // Remove ticks outside the min/max range
  15910. for (i = 0, ilen = timestamps.length; i < ilen; ++i) {
  15911. timestamp = timestamps[i];
  15912. if (timestamp >= min && timestamp <= max) {
  15913. ticks.push(timestamp);
  15914. }
  15915. }
  15916. me.min = min;
  15917. me.max = max;
  15918. // PRIVATE
  15919. me._unit = timeOpts.unit || determineUnitForFormatting(ticks, timeOpts.minUnit, me.min, me.max);
  15920. me._majorUnit = determineMajorUnit(me._unit);
  15921. me._table = buildLookupTable(me._timestamps.data, min, max, options.distribution);
  15922. me._offsets = computeOffsets(me._table, ticks, min, max, options);
  15923. me._labelFormat = determineLabelFormat(me._timestamps.data, timeOpts);
  15924. return ticksFromTimestamps(ticks, me._majorUnit);
  15925. },
  15926. getLabelForIndex: function(index, datasetIndex) {
  15927. var me = this;
  15928. var data = me.chart.data;
  15929. var timeOpts = me.options.time;
  15930. var label = data.labels && index < data.labels.length ? data.labels[index] : '';
  15931. var value = data.datasets[datasetIndex].data[index];
  15932. if (helpers.isObject(value)) {
  15933. label = me.getRightValue(value);
  15934. }
  15935. if (timeOpts.tooltipFormat) {
  15936. return momentify(label, timeOpts).format(timeOpts.tooltipFormat);
  15937. }
  15938. if (typeof label === 'string') {
  15939. return label;
  15940. }
  15941. return momentify(label, timeOpts).format(me._labelFormat);
  15942. },
  15943. /**
  15944. * Function to format an individual tick mark
  15945. * @private
  15946. */
  15947. tickFormatFunction: function(tick, index, ticks, formatOverride) {
  15948. var me = this;
  15949. var options = me.options;
  15950. var time = tick.valueOf();
  15951. var formats = options.time.displayFormats;
  15952. var minorFormat = formats[me._unit];
  15953. var majorUnit = me._majorUnit;
  15954. var majorFormat = formats[majorUnit];
  15955. var majorTime = tick.clone().startOf(majorUnit).valueOf();
  15956. var majorTickOpts = options.ticks.major;
  15957. var major = majorTickOpts.enabled && majorUnit && majorFormat && time === majorTime;
  15958. var label = tick.format(formatOverride ? formatOverride : major ? majorFormat : minorFormat);
  15959. var tickOpts = major ? majorTickOpts : options.ticks.minor;
  15960. var formatter = helpers.valueOrDefault(tickOpts.callback, tickOpts.userCallback);
  15961. return formatter ? formatter(label, index, ticks) : label;
  15962. },
  15963. convertTicksToLabels: function(ticks) {
  15964. var labels = [];
  15965. var i, ilen;
  15966. for (i = 0, ilen = ticks.length; i < ilen; ++i) {
  15967. labels.push(this.tickFormatFunction(moment(ticks[i].value), i, ticks));
  15968. }
  15969. return labels;
  15970. },
  15971. /**
  15972. * @private
  15973. */
  15974. getPixelForOffset: function(time) {
  15975. var me = this;
  15976. var size = me._horizontal ? me.width : me.height;
  15977. var start = me._horizontal ? me.left : me.top;
  15978. var pos = interpolate(me._table, 'time', time, 'pos');
  15979. return start + size * (me._offsets.left + pos) / (me._offsets.left + 1 + me._offsets.right);
  15980. },
  15981. getPixelForValue: function(value, index, datasetIndex) {
  15982. var me = this;
  15983. var time = null;
  15984. if (index !== undefined && datasetIndex !== undefined) {
  15985. time = me._timestamps.datasets[datasetIndex][index];
  15986. }
  15987. if (time === null) {
  15988. time = parse(value, me);
  15989. }
  15990. if (time !== null) {
  15991. return me.getPixelForOffset(time);
  15992. }
  15993. },
  15994. getPixelForTick: function(index) {
  15995. var ticks = this.getTicks();
  15996. return index >= 0 && index < ticks.length ?
  15997. this.getPixelForOffset(ticks[index].value) :
  15998. null;
  15999. },
  16000. getValueForPixel: function(pixel) {
  16001. var me = this;
  16002. var size = me._horizontal ? me.width : me.height;
  16003. var start = me._horizontal ? me.left : me.top;
  16004. var pos = (size ? (pixel - start) / size : 0) * (me._offsets.left + 1 + me._offsets.left) - me._offsets.right;
  16005. var time = interpolate(me._table, 'pos', pos, 'time');
  16006. return moment(time);
  16007. },
  16008. /**
  16009. * Crude approximation of what the label width might be
  16010. * @private
  16011. */
  16012. getLabelWidth: function(label) {
  16013. var me = this;
  16014. var ticksOpts = me.options.ticks;
  16015. var tickLabelWidth = me.ctx.measureText(label).width;
  16016. var angle = helpers.toRadians(ticksOpts.maxRotation);
  16017. var cosRotation = Math.cos(angle);
  16018. var sinRotation = Math.sin(angle);
  16019. var tickFontSize = helpers.valueOrDefault(ticksOpts.fontSize, defaults.global.defaultFontSize);
  16020. return (tickLabelWidth * cosRotation) + (tickFontSize * sinRotation);
  16021. },
  16022. /**
  16023. * @private
  16024. */
  16025. getLabelCapacity: function(exampleTime) {
  16026. var me = this;
  16027. var formatOverride = me.options.time.displayFormats.millisecond; // Pick the longest format for guestimation
  16028. var exampleLabel = me.tickFormatFunction(moment(exampleTime), 0, [], formatOverride);
  16029. var tickLabelWidth = me.getLabelWidth(exampleLabel);
  16030. var innerWidth = me.isHorizontal() ? me.width : me.height;
  16031. var capacity = Math.floor(innerWidth / tickLabelWidth);
  16032. return capacity > 0 ? capacity : 1;
  16033. }
  16034. });
  16035. Chart.scaleService.registerScaleType('time', TimeScale, defaultConfig);
  16036. };
  16037. },{"25":25,"45":45,"6":6}]},{},[7])(7)
  16038. });
  16039. /*!
  16040. * clipboard.js v1.7.1
  16041. * https://zenorocha.github.io/clipboard.js
  16042. *
  16043. * Licensed MIT © Zeno Rocha
  16044. */
  16045. (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Clipboard = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
  16046. var DOCUMENT_NODE_TYPE = 9;
  16047. /**
  16048. * A polyfill for Element.matches()
  16049. */
  16050. if (typeof Element !== 'undefined' && !Element.prototype.matches) {
  16051. var proto = Element.prototype;
  16052. proto.matches = proto.matchesSelector ||
  16053. proto.mozMatchesSelector ||
  16054. proto.msMatchesSelector ||
  16055. proto.oMatchesSelector ||
  16056. proto.webkitMatchesSelector;
  16057. }
  16058. /**
  16059. * Finds the closest parent that matches a selector.
  16060. *
  16061. * @param {Element} element
  16062. * @param {String} selector
  16063. * @return {Function}
  16064. */
  16065. function closest (element, selector) {
  16066. while (element && element.nodeType !== DOCUMENT_NODE_TYPE) {
  16067. if (typeof element.matches === 'function' &&
  16068. element.matches(selector)) {
  16069. return element;
  16070. }
  16071. element = element.parentNode;
  16072. }
  16073. }
  16074. module.exports = closest;
  16075. },{}],2:[function(require,module,exports){
  16076. var closest = require('./closest');
  16077. /**
  16078. * Delegates event to a selector.
  16079. *
  16080. * @param {Element} element
  16081. * @param {String} selector
  16082. * @param {String} type
  16083. * @param {Function} callback
  16084. * @param {Boolean} useCapture
  16085. * @return {Object}
  16086. */
  16087. function delegate(element, selector, type, callback, useCapture) {
  16088. var listenerFn = listener.apply(this, arguments);
  16089. element.addEventListener(type, listenerFn, useCapture);
  16090. return {
  16091. destroy: function() {
  16092. element.removeEventListener(type, listenerFn, useCapture);
  16093. }
  16094. }
  16095. }
  16096. /**
  16097. * Finds closest match and invokes callback.
  16098. *
  16099. * @param {Element} element
  16100. * @param {String} selector
  16101. * @param {String} type
  16102. * @param {Function} callback
  16103. * @return {Function}
  16104. */
  16105. function listener(element, selector, type, callback) {
  16106. return function(e) {
  16107. e.delegateTarget = closest(e.target, selector);
  16108. if (e.delegateTarget) {
  16109. callback.call(element, e);
  16110. }
  16111. }
  16112. }
  16113. module.exports = delegate;
  16114. },{"./closest":1}],3:[function(require,module,exports){
  16115. /**
  16116. * Check if argument is a HTML element.
  16117. *
  16118. * @param {Object} value
  16119. * @return {Boolean}
  16120. */
  16121. exports.node = function(value) {
  16122. return value !== undefined
  16123. && value instanceof HTMLElement
  16124. && value.nodeType === 1;
  16125. };
  16126. /**
  16127. * Check if argument is a list of HTML elements.
  16128. *
  16129. * @param {Object} value
  16130. * @return {Boolean}
  16131. */
  16132. exports.nodeList = function(value) {
  16133. var type = Object.prototype.toString.call(value);
  16134. return value !== undefined
  16135. && (type === '[object NodeList]' || type === '[object HTMLCollection]')
  16136. && ('length' in value)
  16137. && (value.length === 0 || exports.node(value[0]));
  16138. };
  16139. /**
  16140. * Check if argument is a string.
  16141. *
  16142. * @param {Object} value
  16143. * @return {Boolean}
  16144. */
  16145. exports.string = function(value) {
  16146. return typeof value === 'string'
  16147. || value instanceof String;
  16148. };
  16149. /**
  16150. * Check if argument is a function.
  16151. *
  16152. * @param {Object} value
  16153. * @return {Boolean}
  16154. */
  16155. exports.fn = function(value) {
  16156. var type = Object.prototype.toString.call(value);
  16157. return type === '[object Function]';
  16158. };
  16159. },{}],4:[function(require,module,exports){
  16160. var is = require('./is');
  16161. var delegate = require('delegate');
  16162. /**
  16163. * Validates all params and calls the right
  16164. * listener function based on its target type.
  16165. *
  16166. * @param {String|HTMLElement|HTMLCollection|NodeList} target
  16167. * @param {String} type
  16168. * @param {Function} callback
  16169. * @return {Object}
  16170. */
  16171. function listen(target, type, callback) {
  16172. if (!target && !type && !callback) {
  16173. throw new Error('Missing required arguments');
  16174. }
  16175. if (!is.string(type)) {
  16176. throw new TypeError('Second argument must be a String');
  16177. }
  16178. if (!is.fn(callback)) {
  16179. throw new TypeError('Third argument must be a Function');
  16180. }
  16181. if (is.node(target)) {
  16182. return listenNode(target, type, callback);
  16183. }
  16184. else if (is.nodeList(target)) {
  16185. return listenNodeList(target, type, callback);
  16186. }
  16187. else if (is.string(target)) {
  16188. return listenSelector(target, type, callback);
  16189. }
  16190. else {
  16191. throw new TypeError('First argument must be a String, HTMLElement, HTMLCollection, or NodeList');
  16192. }
  16193. }
  16194. /**
  16195. * Adds an event listener to a HTML element
  16196. * and returns a remove listener function.
  16197. *
  16198. * @param {HTMLElement} node
  16199. * @param {String} type
  16200. * @param {Function} callback
  16201. * @return {Object}
  16202. */
  16203. function listenNode(node, type, callback) {
  16204. node.addEventListener(type, callback);
  16205. return {
  16206. destroy: function() {
  16207. node.removeEventListener(type, callback);
  16208. }
  16209. }
  16210. }
  16211. /**
  16212. * Add an event listener to a list of HTML elements
  16213. * and returns a remove listener function.
  16214. *
  16215. * @param {NodeList|HTMLCollection} nodeList
  16216. * @param {String} type
  16217. * @param {Function} callback
  16218. * @return {Object}
  16219. */
  16220. function listenNodeList(nodeList, type, callback) {
  16221. Array.prototype.forEach.call(nodeList, function(node) {
  16222. node.addEventListener(type, callback);
  16223. });
  16224. return {
  16225. destroy: function() {
  16226. Array.prototype.forEach.call(nodeList, function(node) {
  16227. node.removeEventListener(type, callback);
  16228. });
  16229. }
  16230. }
  16231. }
  16232. /**
  16233. * Add an event listener to a selector
  16234. * and returns a remove listener function.
  16235. *
  16236. * @param {String} selector
  16237. * @param {String} type
  16238. * @param {Function} callback
  16239. * @return {Object}
  16240. */
  16241. function listenSelector(selector, type, callback) {
  16242. return delegate(document.body, selector, type, callback);
  16243. }
  16244. module.exports = listen;
  16245. },{"./is":3,"delegate":2}],5:[function(require,module,exports){
  16246. function select(element) {
  16247. var selectedText;
  16248. if (element.nodeName === 'SELECT') {
  16249. element.focus();
  16250. selectedText = element.value;
  16251. }
  16252. else if (element.nodeName === 'INPUT' || element.nodeName === 'TEXTAREA') {
  16253. var isReadOnly = element.hasAttribute('readonly');
  16254. if (!isReadOnly) {
  16255. element.setAttribute('readonly', '');
  16256. }
  16257. element.select();
  16258. element.setSelectionRange(0, element.value.length);
  16259. if (!isReadOnly) {
  16260. element.removeAttribute('readonly');
  16261. }
  16262. selectedText = element.value;
  16263. }
  16264. else {
  16265. if (element.hasAttribute('contenteditable')) {
  16266. element.focus();
  16267. }
  16268. var selection = window.getSelection();
  16269. var range = document.createRange();
  16270. range.selectNodeContents(element);
  16271. selection.removeAllRanges();
  16272. selection.addRange(range);
  16273. selectedText = selection.toString();
  16274. }
  16275. return selectedText;
  16276. }
  16277. module.exports = select;
  16278. },{}],6:[function(require,module,exports){
  16279. function E () {
  16280. // Keep this empty so it's easier to inherit from
  16281. // (via https://github.com/lipsmack from https://github.com/scottcorgan/tiny-emitter/issues/3)
  16282. }
  16283. E.prototype = {
  16284. on: function (name, callback, ctx) {
  16285. var e = this.e || (this.e = {});
  16286. (e[name] || (e[name] = [])).push({
  16287. fn: callback,
  16288. ctx: ctx
  16289. });
  16290. return this;
  16291. },
  16292. once: function (name, callback, ctx) {
  16293. var self = this;
  16294. function listener () {
  16295. self.off(name, listener);
  16296. callback.apply(ctx, arguments);
  16297. };
  16298. listener._ = callback
  16299. return this.on(name, listener, ctx);
  16300. },
  16301. emit: function (name) {
  16302. var data = [].slice.call(arguments, 1);
  16303. var evtArr = ((this.e || (this.e = {}))[name] || []).slice();
  16304. var i = 0;
  16305. var len = evtArr.length;
  16306. for (i; i < len; i++) {
  16307. evtArr[i].fn.apply(evtArr[i].ctx, data);
  16308. }
  16309. return this;
  16310. },
  16311. off: function (name, callback) {
  16312. var e = this.e || (this.e = {});
  16313. var evts = e[name];
  16314. var liveEvents = [];
  16315. if (evts && callback) {
  16316. for (var i = 0, len = evts.length; i < len; i++) {
  16317. if (evts[i].fn !== callback && evts[i].fn._ !== callback)
  16318. liveEvents.push(evts[i]);
  16319. }
  16320. }
  16321. // Remove event from queue to prevent memory leak
  16322. // Suggested by https://github.com/lazd
  16323. // Ref: https://github.com/scottcorgan/tiny-emitter/commit/c6ebfaa9bc973b33d110a84a307742b7cf94c953#commitcomment-5024910
  16324. (liveEvents.length)
  16325. ? e[name] = liveEvents
  16326. : delete e[name];
  16327. return this;
  16328. }
  16329. };
  16330. module.exports = E;
  16331. },{}],7:[function(require,module,exports){
  16332. (function (global, factory) {
  16333. if (typeof define === "function" && define.amd) {
  16334. define(['module', 'select'], factory);
  16335. } else if (typeof exports !== "undefined") {
  16336. factory(module, require('select'));
  16337. } else {
  16338. var mod = {
  16339. exports: {}
  16340. };
  16341. factory(mod, global.select);
  16342. global.clipboardAction = mod.exports;
  16343. }
  16344. })(this, function (module, _select) {
  16345. 'use strict';
  16346. var _select2 = _interopRequireDefault(_select);
  16347. function _interopRequireDefault(obj) {
  16348. return obj && obj.__esModule ? obj : {
  16349. default: obj
  16350. };
  16351. }
  16352. var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
  16353. return typeof obj;
  16354. } : function (obj) {
  16355. return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
  16356. };
  16357. function _classCallCheck(instance, Constructor) {
  16358. if (!(instance instanceof Constructor)) {
  16359. throw new TypeError("Cannot call a class as a function");
  16360. }
  16361. }
  16362. var _createClass = function () {
  16363. function defineProperties(target, props) {
  16364. for (var i = 0; i < props.length; i++) {
  16365. var descriptor = props[i];
  16366. descriptor.enumerable = descriptor.enumerable || false;
  16367. descriptor.configurable = true;
  16368. if ("value" in descriptor) descriptor.writable = true;
  16369. Object.defineProperty(target, descriptor.key, descriptor);
  16370. }
  16371. }
  16372. return function (Constructor, protoProps, staticProps) {
  16373. if (protoProps) defineProperties(Constructor.prototype, protoProps);
  16374. if (staticProps) defineProperties(Constructor, staticProps);
  16375. return Constructor;
  16376. };
  16377. }();
  16378. var ClipboardAction = function () {
  16379. /**
  16380. * @param {Object} options
  16381. */
  16382. function ClipboardAction(options) {
  16383. _classCallCheck(this, ClipboardAction);
  16384. this.resolveOptions(options);
  16385. this.initSelection();
  16386. }
  16387. /**
  16388. * Defines base properties passed from constructor.
  16389. * @param {Object} options
  16390. */
  16391. _createClass(ClipboardAction, [{
  16392. key: 'resolveOptions',
  16393. value: function resolveOptions() {
  16394. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  16395. this.action = options.action;
  16396. this.container = options.container;
  16397. this.emitter = options.emitter;
  16398. this.target = options.target;
  16399. this.text = options.text;
  16400. this.trigger = options.trigger;
  16401. this.selectedText = '';
  16402. }
  16403. }, {
  16404. key: 'initSelection',
  16405. value: function initSelection() {
  16406. if (this.text) {
  16407. this.selectFake();
  16408. } else if (this.target) {
  16409. this.selectTarget();
  16410. }
  16411. }
  16412. }, {
  16413. key: 'selectFake',
  16414. value: function selectFake() {
  16415. var _this = this;
  16416. var isRTL = document.documentElement.getAttribute('dir') == 'rtl';
  16417. this.removeFake();
  16418. this.fakeHandlerCallback = function () {
  16419. return _this.removeFake();
  16420. };
  16421. this.fakeHandler = this.container.addEventListener('click', this.fakeHandlerCallback) || true;
  16422. this.fakeElem = document.createElement('textarea');
  16423. // Prevent zooming on iOS
  16424. this.fakeElem.style.fontSize = '12pt';
  16425. // Reset box model
  16426. this.fakeElem.style.border = '0';
  16427. this.fakeElem.style.padding = '0';
  16428. this.fakeElem.style.margin = '0';
  16429. // Move element out of screen horizontally
  16430. this.fakeElem.style.position = 'absolute';
  16431. this.fakeElem.style[isRTL ? 'right' : 'left'] = '-9999px';
  16432. // Move element to the same position vertically
  16433. var yPosition = window.pageYOffset || document.documentElement.scrollTop;
  16434. this.fakeElem.style.top = yPosition + 'px';
  16435. this.fakeElem.setAttribute('readonly', '');
  16436. this.fakeElem.value = this.text;
  16437. this.container.appendChild(this.fakeElem);
  16438. this.selectedText = (0, _select2.default)(this.fakeElem);
  16439. this.copyText();
  16440. }
  16441. }, {
  16442. key: 'removeFake',
  16443. value: function removeFake() {
  16444. if (this.fakeHandler) {
  16445. this.container.removeEventListener('click', this.fakeHandlerCallback);
  16446. this.fakeHandler = null;
  16447. this.fakeHandlerCallback = null;
  16448. }
  16449. if (this.fakeElem) {
  16450. this.container.removeChild(this.fakeElem);
  16451. this.fakeElem = null;
  16452. }
  16453. }
  16454. }, {
  16455. key: 'selectTarget',
  16456. value: function selectTarget() {
  16457. this.selectedText = (0, _select2.default)(this.target);
  16458. this.copyText();
  16459. }
  16460. }, {
  16461. key: 'copyText',
  16462. value: function copyText() {
  16463. var succeeded = void 0;
  16464. try {
  16465. succeeded = document.execCommand(this.action);
  16466. } catch (err) {
  16467. succeeded = false;
  16468. }
  16469. this.handleResult(succeeded);
  16470. }
  16471. }, {
  16472. key: 'handleResult',
  16473. value: function handleResult(succeeded) {
  16474. this.emitter.emit(succeeded ? 'success' : 'error', {
  16475. action: this.action,
  16476. text: this.selectedText,
  16477. trigger: this.trigger,
  16478. clearSelection: this.clearSelection.bind(this)
  16479. });
  16480. }
  16481. }, {
  16482. key: 'clearSelection',
  16483. value: function clearSelection() {
  16484. if (this.trigger) {
  16485. this.trigger.focus();
  16486. }
  16487. window.getSelection().removeAllRanges();
  16488. }
  16489. }, {
  16490. key: 'destroy',
  16491. value: function destroy() {
  16492. this.removeFake();
  16493. }
  16494. }, {
  16495. key: 'action',
  16496. set: function set() {
  16497. var action = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'copy';
  16498. this._action = action;
  16499. if (this._action !== 'copy' && this._action !== 'cut') {
  16500. throw new Error('Invalid "action" value, use either "copy" or "cut"');
  16501. }
  16502. },
  16503. get: function get() {
  16504. return this._action;
  16505. }
  16506. }, {
  16507. key: 'target',
  16508. set: function set(target) {
  16509. if (target !== undefined) {
  16510. if (target && (typeof target === 'undefined' ? 'undefined' : _typeof(target)) === 'object' && target.nodeType === 1) {
  16511. if (this.action === 'copy' && target.hasAttribute('disabled')) {
  16512. throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');
  16513. }
  16514. if (this.action === 'cut' && (target.hasAttribute('readonly') || target.hasAttribute('disabled'))) {
  16515. throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');
  16516. }
  16517. this._target = target;
  16518. } else {
  16519. throw new Error('Invalid "target" value, use a valid Element');
  16520. }
  16521. }
  16522. },
  16523. get: function get() {
  16524. return this._target;
  16525. }
  16526. }]);
  16527. return ClipboardAction;
  16528. }();
  16529. module.exports = ClipboardAction;
  16530. });
  16531. },{"select":5}],8:[function(require,module,exports){
  16532. (function (global, factory) {
  16533. if (typeof define === "function" && define.amd) {
  16534. define(['module', './clipboard-action', 'tiny-emitter', 'good-listener'], factory);
  16535. } else if (typeof exports !== "undefined") {
  16536. factory(module, require('./clipboard-action'), require('tiny-emitter'), require('good-listener'));
  16537. } else {
  16538. var mod = {
  16539. exports: {}
  16540. };
  16541. factory(mod, global.clipboardAction, global.tinyEmitter, global.goodListener);
  16542. global.clipboard = mod.exports;
  16543. }
  16544. })(this, function (module, _clipboardAction, _tinyEmitter, _goodListener) {
  16545. 'use strict';
  16546. var _clipboardAction2 = _interopRequireDefault(_clipboardAction);
  16547. var _tinyEmitter2 = _interopRequireDefault(_tinyEmitter);
  16548. var _goodListener2 = _interopRequireDefault(_goodListener);
  16549. function _interopRequireDefault(obj) {
  16550. return obj && obj.__esModule ? obj : {
  16551. default: obj
  16552. };
  16553. }
  16554. var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
  16555. return typeof obj;
  16556. } : function (obj) {
  16557. return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
  16558. };
  16559. function _classCallCheck(instance, Constructor) {
  16560. if (!(instance instanceof Constructor)) {
  16561. throw new TypeError("Cannot call a class as a function");
  16562. }
  16563. }
  16564. var _createClass = function () {
  16565. function defineProperties(target, props) {
  16566. for (var i = 0; i < props.length; i++) {
  16567. var descriptor = props[i];
  16568. descriptor.enumerable = descriptor.enumerable || false;
  16569. descriptor.configurable = true;
  16570. if ("value" in descriptor) descriptor.writable = true;
  16571. Object.defineProperty(target, descriptor.key, descriptor);
  16572. }
  16573. }
  16574. return function (Constructor, protoProps, staticProps) {
  16575. if (protoProps) defineProperties(Constructor.prototype, protoProps);
  16576. if (staticProps) defineProperties(Constructor, staticProps);
  16577. return Constructor;
  16578. };
  16579. }();
  16580. function _possibleConstructorReturn(self, call) {
  16581. if (!self) {
  16582. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  16583. }
  16584. return call && (typeof call === "object" || typeof call === "function") ? call : self;
  16585. }
  16586. function _inherits(subClass, superClass) {
  16587. if (typeof superClass !== "function" && superClass !== null) {
  16588. throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
  16589. }
  16590. subClass.prototype = Object.create(superClass && superClass.prototype, {
  16591. constructor: {
  16592. value: subClass,
  16593. enumerable: false,
  16594. writable: true,
  16595. configurable: true
  16596. }
  16597. });
  16598. if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
  16599. }
  16600. var Clipboard = function (_Emitter) {
  16601. _inherits(Clipboard, _Emitter);
  16602. /**
  16603. * @param {String|HTMLElement|HTMLCollection|NodeList} trigger
  16604. * @param {Object} options
  16605. */
  16606. function Clipboard(trigger, options) {
  16607. _classCallCheck(this, Clipboard);
  16608. var _this = _possibleConstructorReturn(this, (Clipboard.__proto__ || Object.getPrototypeOf(Clipboard)).call(this));
  16609. _this.resolveOptions(options);
  16610. _this.listenClick(trigger);
  16611. return _this;
  16612. }
  16613. /**
  16614. * Defines if attributes would be resolved using internal setter functions
  16615. * or custom functions that were passed in the constructor.
  16616. * @param {Object} options
  16617. */
  16618. _createClass(Clipboard, [{
  16619. key: 'resolveOptions',
  16620. value: function resolveOptions() {
  16621. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  16622. this.action = typeof options.action === 'function' ? options.action : this.defaultAction;
  16623. this.target = typeof options.target === 'function' ? options.target : this.defaultTarget;
  16624. this.text = typeof options.text === 'function' ? options.text : this.defaultText;
  16625. this.container = _typeof(options.container) === 'object' ? options.container : document.body;
  16626. }
  16627. }, {
  16628. key: 'listenClick',
  16629. value: function listenClick(trigger) {
  16630. var _this2 = this;
  16631. this.listener = (0, _goodListener2.default)(trigger, 'click', function (e) {
  16632. return _this2.onClick(e);
  16633. });
  16634. }
  16635. }, {
  16636. key: 'onClick',
  16637. value: function onClick(e) {
  16638. var trigger = e.delegateTarget || e.currentTarget;
  16639. if (this.clipboardAction) {
  16640. this.clipboardAction = null;
  16641. }
  16642. this.clipboardAction = new _clipboardAction2.default({
  16643. action: this.action(trigger),
  16644. target: this.target(trigger),
  16645. text: this.text(trigger),
  16646. container: this.container,
  16647. trigger: trigger,
  16648. emitter: this
  16649. });
  16650. }
  16651. }, {
  16652. key: 'defaultAction',
  16653. value: function defaultAction(trigger) {
  16654. return getAttributeValue('action', trigger);
  16655. }
  16656. }, {
  16657. key: 'defaultTarget',
  16658. value: function defaultTarget(trigger) {
  16659. var selector = getAttributeValue('target', trigger);
  16660. if (selector) {
  16661. return document.querySelector(selector);
  16662. }
  16663. }
  16664. }, {
  16665. key: 'defaultText',
  16666. value: function defaultText(trigger) {
  16667. return getAttributeValue('text', trigger);
  16668. }
  16669. }, {
  16670. key: 'destroy',
  16671. value: function destroy() {
  16672. this.listener.destroy();
  16673. if (this.clipboardAction) {
  16674. this.clipboardAction.destroy();
  16675. this.clipboardAction = null;
  16676. }
  16677. }
  16678. }], [{
  16679. key: 'isSupported',
  16680. value: function isSupported() {
  16681. var action = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ['copy', 'cut'];
  16682. var actions = typeof action === 'string' ? [action] : action;
  16683. var support = !!document.queryCommandSupported;
  16684. actions.forEach(function (action) {
  16685. support = support && !!document.queryCommandSupported(action);
  16686. });
  16687. return support;
  16688. }
  16689. }]);
  16690. return Clipboard;
  16691. }(_tinyEmitter2.default);
  16692. /**
  16693. * Helper function to retrieve attribute value.
  16694. * @param {String} suffix
  16695. * @param {Element} element
  16696. */
  16697. function getAttributeValue(suffix, element) {
  16698. var attribute = 'data-clipboard-' + suffix;
  16699. if (!element.hasAttribute(attribute)) {
  16700. return;
  16701. }
  16702. return element.getAttribute(attribute);
  16703. }
  16704. module.exports = Clipboard;
  16705. });
  16706. },{"./clipboard-action":7,"good-listener":4,"tiny-emitter":6}]},{},[8])(8)
  16707. });
  16708. /**
  16709. * core-js 2.5.7
  16710. * https://github.com/zloirock/core-js
  16711. * License: http://rock.mit-license.org
  16712. * © 2018 Denis Pushkarev
  16713. */
  16714. !function(__e, __g, undefined){
  16715. 'use strict';
  16716. /******/ (function(modules) { // webpackBootstrap
  16717. /******/ // The module cache
  16718. /******/ var installedModules = {};
  16719. /******/
  16720. /******/ // The require function
  16721. /******/ function __webpack_require__(moduleId) {
  16722. /******/
  16723. /******/ // Check if module is in cache
  16724. /******/ if(installedModules[moduleId]) {
  16725. /******/ return installedModules[moduleId].exports;
  16726. /******/ }
  16727. /******/ // Create a new module (and put it into the cache)
  16728. /******/ var module = installedModules[moduleId] = {
  16729. /******/ i: moduleId,
  16730. /******/ l: false,
  16731. /******/ exports: {}
  16732. /******/ };
  16733. /******/
  16734. /******/ // Execute the module function
  16735. /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  16736. /******/
  16737. /******/ // Flag the module as loaded
  16738. /******/ module.l = true;
  16739. /******/
  16740. /******/ // Return the exports of the module
  16741. /******/ return module.exports;
  16742. /******/ }
  16743. /******/
  16744. /******/
  16745. /******/ // expose the modules object (__webpack_modules__)
  16746. /******/ __webpack_require__.m = modules;
  16747. /******/
  16748. /******/ // expose the module cache
  16749. /******/ __webpack_require__.c = installedModules;
  16750. /******/
  16751. /******/ // define getter function for harmony exports
  16752. /******/ __webpack_require__.d = function(exports, name, getter) {
  16753. /******/ if(!__webpack_require__.o(exports, name)) {
  16754. /******/ Object.defineProperty(exports, name, {
  16755. /******/ configurable: false,
  16756. /******/ enumerable: true,
  16757. /******/ get: getter
  16758. /******/ });
  16759. /******/ }
  16760. /******/ };
  16761. /******/
  16762. /******/ // getDefaultExport function for compatibility with non-harmony modules
  16763. /******/ __webpack_require__.n = function(module) {
  16764. /******/ var getter = module && module.__esModule ?
  16765. /******/ function getDefault() { return module['default']; } :
  16766. /******/ function getModuleExports() { return module; };
  16767. /******/ __webpack_require__.d(getter, 'a', getter);
  16768. /******/ return getter;
  16769. /******/ };
  16770. /******/
  16771. /******/ // Object.prototype.hasOwnProperty.call
  16772. /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  16773. /******/
  16774. /******/ // __webpack_public_path__
  16775. /******/ __webpack_require__.p = "";
  16776. /******/
  16777. /******/ // Load entry module and return exports
  16778. /******/ return __webpack_require__(__webpack_require__.s = 129);
  16779. /******/ })
  16780. /************************************************************************/
  16781. /******/ ([
  16782. /* 0 */
  16783. /***/ (function(module, exports, __webpack_require__) {
  16784. var global = __webpack_require__(2);
  16785. var core = __webpack_require__(13);
  16786. var hide = __webpack_require__(14);
  16787. var redefine = __webpack_require__(15);
  16788. var ctx = __webpack_require__(19);
  16789. var PROTOTYPE = 'prototype';
  16790. var $export = function (type, name, source) {
  16791. var IS_FORCED = type & $export.F;
  16792. var IS_GLOBAL = type & $export.G;
  16793. var IS_STATIC = type & $export.S;
  16794. var IS_PROTO = type & $export.P;
  16795. var IS_BIND = type & $export.B;
  16796. var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE];
  16797. var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});
  16798. var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {});
  16799. var key, own, out, exp;
  16800. if (IS_GLOBAL) source = name;
  16801. for (key in source) {
  16802. // contains in native
  16803. own = !IS_FORCED && target && target[key] !== undefined;
  16804. // export native or passed
  16805. out = (own ? target : source)[key];
  16806. // bind timers to global for call from export context
  16807. exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
  16808. // extend global
  16809. if (target) redefine(target, key, out, type & $export.U);
  16810. // export
  16811. if (exports[key] != out) hide(exports, key, exp);
  16812. if (IS_PROTO && expProto[key] != out) expProto[key] = out;
  16813. }
  16814. };
  16815. global.core = core;
  16816. // type bitmap
  16817. $export.F = 1; // forced
  16818. $export.G = 2; // global
  16819. $export.S = 4; // static
  16820. $export.P = 8; // proto
  16821. $export.B = 16; // bind
  16822. $export.W = 32; // wrap
  16823. $export.U = 64; // safe
  16824. $export.R = 128; // real proto method for `library`
  16825. module.exports = $export;
  16826. /***/ }),
  16827. /* 1 */
  16828. /***/ (function(module, exports, __webpack_require__) {
  16829. var isObject = __webpack_require__(3);
  16830. module.exports = function (it) {
  16831. if (!isObject(it)) throw TypeError(it + ' is not an object!');
  16832. return it;
  16833. };
  16834. /***/ }),
  16835. /* 2 */
  16836. /***/ (function(module, exports) {
  16837. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  16838. var global = module.exports = typeof window != 'undefined' && window.Math == Math
  16839. ? window : typeof self != 'undefined' && self.Math == Math ? self
  16840. // eslint-disable-next-line no-new-func
  16841. : Function('return this')();
  16842. if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef
  16843. /***/ }),
  16844. /* 3 */
  16845. /***/ (function(module, exports) {
  16846. module.exports = function (it) {
  16847. return typeof it === 'object' ? it !== null : typeof it === 'function';
  16848. };
  16849. /***/ }),
  16850. /* 4 */
  16851. /***/ (function(module, exports) {
  16852. module.exports = function (exec) {
  16853. try {
  16854. return !!exec();
  16855. } catch (e) {
  16856. return true;
  16857. }
  16858. };
  16859. /***/ }),
  16860. /* 5 */
  16861. /***/ (function(module, exports, __webpack_require__) {
  16862. var store = __webpack_require__(50)('wks');
  16863. var uid = __webpack_require__(36);
  16864. var Symbol = __webpack_require__(2).Symbol;
  16865. var USE_SYMBOL = typeof Symbol == 'function';
  16866. var $exports = module.exports = function (name) {
  16867. return store[name] || (store[name] =
  16868. USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
  16869. };
  16870. $exports.store = store;
  16871. /***/ }),
  16872. /* 6 */
  16873. /***/ (function(module, exports, __webpack_require__) {
  16874. var anObject = __webpack_require__(1);
  16875. var IE8_DOM_DEFINE = __webpack_require__(95);
  16876. var toPrimitive = __webpack_require__(22);
  16877. var dP = Object.defineProperty;
  16878. exports.f = __webpack_require__(7) ? Object.defineProperty : function defineProperty(O, P, Attributes) {
  16879. anObject(O);
  16880. P = toPrimitive(P, true);
  16881. anObject(Attributes);
  16882. if (IE8_DOM_DEFINE) try {
  16883. return dP(O, P, Attributes);
  16884. } catch (e) { /* empty */ }
  16885. if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
  16886. if ('value' in Attributes) O[P] = Attributes.value;
  16887. return O;
  16888. };
  16889. /***/ }),
  16890. /* 7 */
  16891. /***/ (function(module, exports, __webpack_require__) {
  16892. // Thank's IE8 for his funny defineProperty
  16893. module.exports = !__webpack_require__(4)(function () {
  16894. return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
  16895. });
  16896. /***/ }),
  16897. /* 8 */
  16898. /***/ (function(module, exports, __webpack_require__) {
  16899. // 7.1.15 ToLength
  16900. var toInteger = __webpack_require__(24);
  16901. var min = Math.min;
  16902. module.exports = function (it) {
  16903. return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
  16904. };
  16905. /***/ }),
  16906. /* 9 */
  16907. /***/ (function(module, exports, __webpack_require__) {
  16908. // 7.1.13 ToObject(argument)
  16909. var defined = __webpack_require__(23);
  16910. module.exports = function (it) {
  16911. return Object(defined(it));
  16912. };
  16913. /***/ }),
  16914. /* 10 */
  16915. /***/ (function(module, exports) {
  16916. module.exports = function (it) {
  16917. if (typeof it != 'function') throw TypeError(it + ' is not a function!');
  16918. return it;
  16919. };
  16920. /***/ }),
  16921. /* 11 */
  16922. /***/ (function(module, exports, __webpack_require__) {
  16923. // to indexed object, toObject with fallback for non-array-like ES3 strings
  16924. var IObject = __webpack_require__(47);
  16925. var defined = __webpack_require__(23);
  16926. module.exports = function (it) {
  16927. return IObject(defined(it));
  16928. };
  16929. /***/ }),
  16930. /* 12 */
  16931. /***/ (function(module, exports) {
  16932. var hasOwnProperty = {}.hasOwnProperty;
  16933. module.exports = function (it, key) {
  16934. return hasOwnProperty.call(it, key);
  16935. };
  16936. /***/ }),
  16937. /* 13 */
  16938. /***/ (function(module, exports) {
  16939. var core = module.exports = { version: '2.5.7' };
  16940. if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
  16941. /***/ }),
  16942. /* 14 */
  16943. /***/ (function(module, exports, __webpack_require__) {
  16944. var dP = __webpack_require__(6);
  16945. var createDesc = __webpack_require__(31);
  16946. module.exports = __webpack_require__(7) ? function (object, key, value) {
  16947. return dP.f(object, key, createDesc(1, value));
  16948. } : function (object, key, value) {
  16949. object[key] = value;
  16950. return object;
  16951. };
  16952. /***/ }),
  16953. /* 15 */
  16954. /***/ (function(module, exports, __webpack_require__) {
  16955. var global = __webpack_require__(2);
  16956. var hide = __webpack_require__(14);
  16957. var has = __webpack_require__(12);
  16958. var SRC = __webpack_require__(36)('src');
  16959. var TO_STRING = 'toString';
  16960. var $toString = Function[TO_STRING];
  16961. var TPL = ('' + $toString).split(TO_STRING);
  16962. __webpack_require__(13).inspectSource = function (it) {
  16963. return $toString.call(it);
  16964. };
  16965. (module.exports = function (O, key, val, safe) {
  16966. var isFunction = typeof val == 'function';
  16967. if (isFunction) has(val, 'name') || hide(val, 'name', key);
  16968. if (O[key] === val) return;
  16969. if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));
  16970. if (O === global) {
  16971. O[key] = val;
  16972. } else if (!safe) {
  16973. delete O[key];
  16974. hide(O, key, val);
  16975. } else if (O[key]) {
  16976. O[key] = val;
  16977. } else {
  16978. hide(O, key, val);
  16979. }
  16980. // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
  16981. })(Function.prototype, TO_STRING, function toString() {
  16982. return typeof this == 'function' && this[SRC] || $toString.call(this);
  16983. });
  16984. /***/ }),
  16985. /* 16 */
  16986. /***/ (function(module, exports, __webpack_require__) {
  16987. var pIE = __webpack_require__(48);
  16988. var createDesc = __webpack_require__(31);
  16989. var toIObject = __webpack_require__(11);
  16990. var toPrimitive = __webpack_require__(22);
  16991. var has = __webpack_require__(12);
  16992. var IE8_DOM_DEFINE = __webpack_require__(95);
  16993. var gOPD = Object.getOwnPropertyDescriptor;
  16994. exports.f = __webpack_require__(7) ? gOPD : function getOwnPropertyDescriptor(O, P) {
  16995. O = toIObject(O);
  16996. P = toPrimitive(P, true);
  16997. if (IE8_DOM_DEFINE) try {
  16998. return gOPD(O, P);
  16999. } catch (e) { /* empty */ }
  17000. if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);
  17001. };
  17002. /***/ }),
  17003. /* 17 */
  17004. /***/ (function(module, exports, __webpack_require__) {
  17005. // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
  17006. var has = __webpack_require__(12);
  17007. var toObject = __webpack_require__(9);
  17008. var IE_PROTO = __webpack_require__(69)('IE_PROTO');
  17009. var ObjectProto = Object.prototype;
  17010. module.exports = Object.getPrototypeOf || function (O) {
  17011. O = toObject(O);
  17012. if (has(O, IE_PROTO)) return O[IE_PROTO];
  17013. if (typeof O.constructor == 'function' && O instanceof O.constructor) {
  17014. return O.constructor.prototype;
  17015. } return O instanceof Object ? ObjectProto : null;
  17016. };
  17017. /***/ }),
  17018. /* 18 */
  17019. /***/ (function(module, exports, __webpack_require__) {
  17020. var $export = __webpack_require__(0);
  17021. var fails = __webpack_require__(4);
  17022. var defined = __webpack_require__(23);
  17023. var quot = /"/g;
  17024. // B.2.3.2.1 CreateHTML(string, tag, attribute, value)
  17025. var createHTML = function (string, tag, attribute, value) {
  17026. var S = String(defined(string));
  17027. var p1 = '<' + tag;
  17028. if (attribute !== '') p1 += ' ' + attribute + '="' + String(value).replace(quot, '&quot;') + '"';
  17029. return p1 + '>' + S + '</' + tag + '>';
  17030. };
  17031. module.exports = function (NAME, exec) {
  17032. var O = {};
  17033. O[NAME] = exec(createHTML);
  17034. $export($export.P + $export.F * fails(function () {
  17035. var test = ''[NAME]('"');
  17036. return test !== test.toLowerCase() || test.split('"').length > 3;
  17037. }), 'String', O);
  17038. };
  17039. /***/ }),
  17040. /* 19 */
  17041. /***/ (function(module, exports, __webpack_require__) {
  17042. // optional / simple context binding
  17043. var aFunction = __webpack_require__(10);
  17044. module.exports = function (fn, that, length) {
  17045. aFunction(fn);
  17046. if (that === undefined) return fn;
  17047. switch (length) {
  17048. case 1: return function (a) {
  17049. return fn.call(that, a);
  17050. };
  17051. case 2: return function (a, b) {
  17052. return fn.call(that, a, b);
  17053. };
  17054. case 3: return function (a, b, c) {
  17055. return fn.call(that, a, b, c);
  17056. };
  17057. }
  17058. return function (/* ...args */) {
  17059. return fn.apply(that, arguments);
  17060. };
  17061. };
  17062. /***/ }),
  17063. /* 20 */
  17064. /***/ (function(module, exports) {
  17065. var toString = {}.toString;
  17066. module.exports = function (it) {
  17067. return toString.call(it).slice(8, -1);
  17068. };
  17069. /***/ }),
  17070. /* 21 */
  17071. /***/ (function(module, exports, __webpack_require__) {
  17072. "use strict";
  17073. var fails = __webpack_require__(4);
  17074. module.exports = function (method, arg) {
  17075. return !!method && fails(function () {
  17076. // eslint-disable-next-line no-useless-call
  17077. arg ? method.call(null, function () { /* empty */ }, 1) : method.call(null);
  17078. });
  17079. };
  17080. /***/ }),
  17081. /* 22 */
  17082. /***/ (function(module, exports, __webpack_require__) {
  17083. // 7.1.1 ToPrimitive(input [, PreferredType])
  17084. var isObject = __webpack_require__(3);
  17085. // instead of the ES6 spec version, we didn't implement @@toPrimitive case
  17086. // and the second argument - flag - preferred type is a string
  17087. module.exports = function (it, S) {
  17088. if (!isObject(it)) return it;
  17089. var fn, val;
  17090. if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
  17091. if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;
  17092. if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
  17093. throw TypeError("Can't convert object to primitive value");
  17094. };
  17095. /***/ }),
  17096. /* 23 */
  17097. /***/ (function(module, exports) {
  17098. // 7.2.1 RequireObjectCoercible(argument)
  17099. module.exports = function (it) {
  17100. if (it == undefined) throw TypeError("Can't call method on " + it);
  17101. return it;
  17102. };
  17103. /***/ }),
  17104. /* 24 */
  17105. /***/ (function(module, exports) {
  17106. // 7.1.4 ToInteger
  17107. var ceil = Math.ceil;
  17108. var floor = Math.floor;
  17109. module.exports = function (it) {
  17110. return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
  17111. };
  17112. /***/ }),
  17113. /* 25 */
  17114. /***/ (function(module, exports, __webpack_require__) {
  17115. // most Object methods by ES6 should accept primitives
  17116. var $export = __webpack_require__(0);
  17117. var core = __webpack_require__(13);
  17118. var fails = __webpack_require__(4);
  17119. module.exports = function (KEY, exec) {
  17120. var fn = (core.Object || {})[KEY] || Object[KEY];
  17121. var exp = {};
  17122. exp[KEY] = exec(fn);
  17123. $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp);
  17124. };
  17125. /***/ }),
  17126. /* 26 */
  17127. /***/ (function(module, exports, __webpack_require__) {
  17128. // 0 -> Array#forEach
  17129. // 1 -> Array#map
  17130. // 2 -> Array#filter
  17131. // 3 -> Array#some
  17132. // 4 -> Array#every
  17133. // 5 -> Array#find
  17134. // 6 -> Array#findIndex
  17135. var ctx = __webpack_require__(19);
  17136. var IObject = __webpack_require__(47);
  17137. var toObject = __webpack_require__(9);
  17138. var toLength = __webpack_require__(8);
  17139. var asc = __webpack_require__(85);
  17140. module.exports = function (TYPE, $create) {
  17141. var IS_MAP = TYPE == 1;
  17142. var IS_FILTER = TYPE == 2;
  17143. var IS_SOME = TYPE == 3;
  17144. var IS_EVERY = TYPE == 4;
  17145. var IS_FIND_INDEX = TYPE == 6;
  17146. var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
  17147. var create = $create || asc;
  17148. return function ($this, callbackfn, that) {
  17149. var O = toObject($this);
  17150. var self = IObject(O);
  17151. var f = ctx(callbackfn, that, 3);
  17152. var length = toLength(self.length);
  17153. var index = 0;
  17154. var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;
  17155. var val, res;
  17156. for (;length > index; index++) if (NO_HOLES || index in self) {
  17157. val = self[index];
  17158. res = f(val, index, O);
  17159. if (TYPE) {
  17160. if (IS_MAP) result[index] = res; // map
  17161. else if (res) switch (TYPE) {
  17162. case 3: return true; // some
  17163. case 5: return val; // find
  17164. case 6: return index; // findIndex
  17165. case 2: result.push(val); // filter
  17166. } else if (IS_EVERY) return false; // every
  17167. }
  17168. }
  17169. return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result;
  17170. };
  17171. };
  17172. /***/ }),
  17173. /* 27 */
  17174. /***/ (function(module, exports, __webpack_require__) {
  17175. // 19.1.2.14 / 15.2.3.14 Object.keys(O)
  17176. var $keys = __webpack_require__(97);
  17177. var enumBugKeys = __webpack_require__(70);
  17178. module.exports = Object.keys || function keys(O) {
  17179. return $keys(O, enumBugKeys);
  17180. };
  17181. /***/ }),
  17182. /* 28 */
  17183. /***/ (function(module, exports, __webpack_require__) {
  17184. // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
  17185. var anObject = __webpack_require__(1);
  17186. var dPs = __webpack_require__(98);
  17187. var enumBugKeys = __webpack_require__(70);
  17188. var IE_PROTO = __webpack_require__(69)('IE_PROTO');
  17189. var Empty = function () { /* empty */ };
  17190. var PROTOTYPE = 'prototype';
  17191. // Create object with fake `null` prototype: use iframe Object with cleared prototype
  17192. var createDict = function () {
  17193. // Thrash, waste and sodomy: IE GC bug
  17194. var iframe = __webpack_require__(67)('iframe');
  17195. var i = enumBugKeys.length;
  17196. var lt = '<';
  17197. var gt = '>';
  17198. var iframeDocument;
  17199. iframe.style.display = 'none';
  17200. __webpack_require__(71).appendChild(iframe);
  17201. iframe.src = 'javascript:'; // eslint-disable-line no-script-url
  17202. // createDict = iframe.contentWindow.Object;
  17203. // html.removeChild(iframe);
  17204. iframeDocument = iframe.contentWindow.document;
  17205. iframeDocument.open();
  17206. iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
  17207. iframeDocument.close();
  17208. createDict = iframeDocument.F;
  17209. while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];
  17210. return createDict();
  17211. };
  17212. module.exports = Object.create || function create(O, Properties) {
  17213. var result;
  17214. if (O !== null) {
  17215. Empty[PROTOTYPE] = anObject(O);
  17216. result = new Empty();
  17217. Empty[PROTOTYPE] = null;
  17218. // add "__proto__" for Object.getPrototypeOf polyfill
  17219. result[IE_PROTO] = O;
  17220. } else result = createDict();
  17221. return Properties === undefined ? result : dPs(result, Properties);
  17222. };
  17223. /***/ }),
  17224. /* 29 */
  17225. /***/ (function(module, exports, __webpack_require__) {
  17226. "use strict";
  17227. if (__webpack_require__(7)) {
  17228. var LIBRARY = __webpack_require__(33);
  17229. var global = __webpack_require__(2);
  17230. var fails = __webpack_require__(4);
  17231. var $export = __webpack_require__(0);
  17232. var $typed = __webpack_require__(63);
  17233. var $buffer = __webpack_require__(93);
  17234. var ctx = __webpack_require__(19);
  17235. var anInstance = __webpack_require__(42);
  17236. var propertyDesc = __webpack_require__(31);
  17237. var hide = __webpack_require__(14);
  17238. var redefineAll = __webpack_require__(43);
  17239. var toInteger = __webpack_require__(24);
  17240. var toLength = __webpack_require__(8);
  17241. var toIndex = __webpack_require__(118);
  17242. var toAbsoluteIndex = __webpack_require__(37);
  17243. var toPrimitive = __webpack_require__(22);
  17244. var has = __webpack_require__(12);
  17245. var classof = __webpack_require__(39);
  17246. var isObject = __webpack_require__(3);
  17247. var toObject = __webpack_require__(9);
  17248. var isArrayIter = __webpack_require__(83);
  17249. var create = __webpack_require__(28);
  17250. var getPrototypeOf = __webpack_require__(17);
  17251. var gOPN = __webpack_require__(38).f;
  17252. var getIterFn = __webpack_require__(49);
  17253. var uid = __webpack_require__(36);
  17254. var wks = __webpack_require__(5);
  17255. var createArrayMethod = __webpack_require__(26);
  17256. var createArrayIncludes = __webpack_require__(51);
  17257. var speciesConstructor = __webpack_require__(60);
  17258. var ArrayIterators = __webpack_require__(87);
  17259. var Iterators = __webpack_require__(40);
  17260. var $iterDetect = __webpack_require__(57);
  17261. var setSpecies = __webpack_require__(41);
  17262. var arrayFill = __webpack_require__(86);
  17263. var arrayCopyWithin = __webpack_require__(109);
  17264. var $DP = __webpack_require__(6);
  17265. var $GOPD = __webpack_require__(16);
  17266. var dP = $DP.f;
  17267. var gOPD = $GOPD.f;
  17268. var RangeError = global.RangeError;
  17269. var TypeError = global.TypeError;
  17270. var Uint8Array = global.Uint8Array;
  17271. var ARRAY_BUFFER = 'ArrayBuffer';
  17272. var SHARED_BUFFER = 'Shared' + ARRAY_BUFFER;
  17273. var BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT';
  17274. var PROTOTYPE = 'prototype';
  17275. var ArrayProto = Array[PROTOTYPE];
  17276. var $ArrayBuffer = $buffer.ArrayBuffer;
  17277. var $DataView = $buffer.DataView;
  17278. var arrayForEach = createArrayMethod(0);
  17279. var arrayFilter = createArrayMethod(2);
  17280. var arraySome = createArrayMethod(3);
  17281. var arrayEvery = createArrayMethod(4);
  17282. var arrayFind = createArrayMethod(5);
  17283. var arrayFindIndex = createArrayMethod(6);
  17284. var arrayIncludes = createArrayIncludes(true);
  17285. var arrayIndexOf = createArrayIncludes(false);
  17286. var arrayValues = ArrayIterators.values;
  17287. var arrayKeys = ArrayIterators.keys;
  17288. var arrayEntries = ArrayIterators.entries;
  17289. var arrayLastIndexOf = ArrayProto.lastIndexOf;
  17290. var arrayReduce = ArrayProto.reduce;
  17291. var arrayReduceRight = ArrayProto.reduceRight;
  17292. var arrayJoin = ArrayProto.join;
  17293. var arraySort = ArrayProto.sort;
  17294. var arraySlice = ArrayProto.slice;
  17295. var arrayToString = ArrayProto.toString;
  17296. var arrayToLocaleString = ArrayProto.toLocaleString;
  17297. var ITERATOR = wks('iterator');
  17298. var TAG = wks('toStringTag');
  17299. var TYPED_CONSTRUCTOR = uid('typed_constructor');
  17300. var DEF_CONSTRUCTOR = uid('def_constructor');
  17301. var ALL_CONSTRUCTORS = $typed.CONSTR;
  17302. var TYPED_ARRAY = $typed.TYPED;
  17303. var VIEW = $typed.VIEW;
  17304. var WRONG_LENGTH = 'Wrong length!';
  17305. var $map = createArrayMethod(1, function (O, length) {
  17306. return allocate(speciesConstructor(O, O[DEF_CONSTRUCTOR]), length);
  17307. });
  17308. var LITTLE_ENDIAN = fails(function () {
  17309. // eslint-disable-next-line no-undef
  17310. return new Uint8Array(new Uint16Array([1]).buffer)[0] === 1;
  17311. });
  17312. var FORCED_SET = !!Uint8Array && !!Uint8Array[PROTOTYPE].set && fails(function () {
  17313. new Uint8Array(1).set({});
  17314. });
  17315. var toOffset = function (it, BYTES) {
  17316. var offset = toInteger(it);
  17317. if (offset < 0 || offset % BYTES) throw RangeError('Wrong offset!');
  17318. return offset;
  17319. };
  17320. var validate = function (it) {
  17321. if (isObject(it) && TYPED_ARRAY in it) return it;
  17322. throw TypeError(it + ' is not a typed array!');
  17323. };
  17324. var allocate = function (C, length) {
  17325. if (!(isObject(C) && TYPED_CONSTRUCTOR in C)) {
  17326. throw TypeError('It is not a typed array constructor!');
  17327. } return new C(length);
  17328. };
  17329. var speciesFromList = function (O, list) {
  17330. return fromList(speciesConstructor(O, O[DEF_CONSTRUCTOR]), list);
  17331. };
  17332. var fromList = function (C, list) {
  17333. var index = 0;
  17334. var length = list.length;
  17335. var result = allocate(C, length);
  17336. while (length > index) result[index] = list[index++];
  17337. return result;
  17338. };
  17339. var addGetter = function (it, key, internal) {
  17340. dP(it, key, { get: function () { return this._d[internal]; } });
  17341. };
  17342. var $from = function from(source /* , mapfn, thisArg */) {
  17343. var O = toObject(source);
  17344. var aLen = arguments.length;
  17345. var mapfn = aLen > 1 ? arguments[1] : undefined;
  17346. var mapping = mapfn !== undefined;
  17347. var iterFn = getIterFn(O);
  17348. var i, length, values, result, step, iterator;
  17349. if (iterFn != undefined && !isArrayIter(iterFn)) {
  17350. for (iterator = iterFn.call(O), values = [], i = 0; !(step = iterator.next()).done; i++) {
  17351. values.push(step.value);
  17352. } O = values;
  17353. }
  17354. if (mapping && aLen > 2) mapfn = ctx(mapfn, arguments[2], 2);
  17355. for (i = 0, length = toLength(O.length), result = allocate(this, length); length > i; i++) {
  17356. result[i] = mapping ? mapfn(O[i], i) : O[i];
  17357. }
  17358. return result;
  17359. };
  17360. var $of = function of(/* ...items */) {
  17361. var index = 0;
  17362. var length = arguments.length;
  17363. var result = allocate(this, length);
  17364. while (length > index) result[index] = arguments[index++];
  17365. return result;
  17366. };
  17367. // iOS Safari 6.x fails here
  17368. var TO_LOCALE_BUG = !!Uint8Array && fails(function () { arrayToLocaleString.call(new Uint8Array(1)); });
  17369. var $toLocaleString = function toLocaleString() {
  17370. return arrayToLocaleString.apply(TO_LOCALE_BUG ? arraySlice.call(validate(this)) : validate(this), arguments);
  17371. };
  17372. var proto = {
  17373. copyWithin: function copyWithin(target, start /* , end */) {
  17374. return arrayCopyWithin.call(validate(this), target, start, arguments.length > 2 ? arguments[2] : undefined);
  17375. },
  17376. every: function every(callbackfn /* , thisArg */) {
  17377. return arrayEvery(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  17378. },
  17379. fill: function fill(value /* , start, end */) { // eslint-disable-line no-unused-vars
  17380. return arrayFill.apply(validate(this), arguments);
  17381. },
  17382. filter: function filter(callbackfn /* , thisArg */) {
  17383. return speciesFromList(this, arrayFilter(validate(this), callbackfn,
  17384. arguments.length > 1 ? arguments[1] : undefined));
  17385. },
  17386. find: function find(predicate /* , thisArg */) {
  17387. return arrayFind(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
  17388. },
  17389. findIndex: function findIndex(predicate /* , thisArg */) {
  17390. return arrayFindIndex(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
  17391. },
  17392. forEach: function forEach(callbackfn /* , thisArg */) {
  17393. arrayForEach(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  17394. },
  17395. indexOf: function indexOf(searchElement /* , fromIndex */) {
  17396. return arrayIndexOf(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
  17397. },
  17398. includes: function includes(searchElement /* , fromIndex */) {
  17399. return arrayIncludes(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
  17400. },
  17401. join: function join(separator) { // eslint-disable-line no-unused-vars
  17402. return arrayJoin.apply(validate(this), arguments);
  17403. },
  17404. lastIndexOf: function lastIndexOf(searchElement /* , fromIndex */) { // eslint-disable-line no-unused-vars
  17405. return arrayLastIndexOf.apply(validate(this), arguments);
  17406. },
  17407. map: function map(mapfn /* , thisArg */) {
  17408. return $map(validate(this), mapfn, arguments.length > 1 ? arguments[1] : undefined);
  17409. },
  17410. reduce: function reduce(callbackfn /* , initialValue */) { // eslint-disable-line no-unused-vars
  17411. return arrayReduce.apply(validate(this), arguments);
  17412. },
  17413. reduceRight: function reduceRight(callbackfn /* , initialValue */) { // eslint-disable-line no-unused-vars
  17414. return arrayReduceRight.apply(validate(this), arguments);
  17415. },
  17416. reverse: function reverse() {
  17417. var that = this;
  17418. var length = validate(that).length;
  17419. var middle = Math.floor(length / 2);
  17420. var index = 0;
  17421. var value;
  17422. while (index < middle) {
  17423. value = that[index];
  17424. that[index++] = that[--length];
  17425. that[length] = value;
  17426. } return that;
  17427. },
  17428. some: function some(callbackfn /* , thisArg */) {
  17429. return arraySome(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  17430. },
  17431. sort: function sort(comparefn) {
  17432. return arraySort.call(validate(this), comparefn);
  17433. },
  17434. subarray: function subarray(begin, end) {
  17435. var O = validate(this);
  17436. var length = O.length;
  17437. var $begin = toAbsoluteIndex(begin, length);
  17438. return new (speciesConstructor(O, O[DEF_CONSTRUCTOR]))(
  17439. O.buffer,
  17440. O.byteOffset + $begin * O.BYTES_PER_ELEMENT,
  17441. toLength((end === undefined ? length : toAbsoluteIndex(end, length)) - $begin)
  17442. );
  17443. }
  17444. };
  17445. var $slice = function slice(start, end) {
  17446. return speciesFromList(this, arraySlice.call(validate(this), start, end));
  17447. };
  17448. var $set = function set(arrayLike /* , offset */) {
  17449. validate(this);
  17450. var offset = toOffset(arguments[1], 1);
  17451. var length = this.length;
  17452. var src = toObject(arrayLike);
  17453. var len = toLength(src.length);
  17454. var index = 0;
  17455. if (len + offset > length) throw RangeError(WRONG_LENGTH);
  17456. while (index < len) this[offset + index] = src[index++];
  17457. };
  17458. var $iterators = {
  17459. entries: function entries() {
  17460. return arrayEntries.call(validate(this));
  17461. },
  17462. keys: function keys() {
  17463. return arrayKeys.call(validate(this));
  17464. },
  17465. values: function values() {
  17466. return arrayValues.call(validate(this));
  17467. }
  17468. };
  17469. var isTAIndex = function (target, key) {
  17470. return isObject(target)
  17471. && target[TYPED_ARRAY]
  17472. && typeof key != 'symbol'
  17473. && key in target
  17474. && String(+key) == String(key);
  17475. };
  17476. var $getDesc = function getOwnPropertyDescriptor(target, key) {
  17477. return isTAIndex(target, key = toPrimitive(key, true))
  17478. ? propertyDesc(2, target[key])
  17479. : gOPD(target, key);
  17480. };
  17481. var $setDesc = function defineProperty(target, key, desc) {
  17482. if (isTAIndex(target, key = toPrimitive(key, true))
  17483. && isObject(desc)
  17484. && has(desc, 'value')
  17485. && !has(desc, 'get')
  17486. && !has(desc, 'set')
  17487. // TODO: add validation descriptor w/o calling accessors
  17488. && !desc.configurable
  17489. && (!has(desc, 'writable') || desc.writable)
  17490. && (!has(desc, 'enumerable') || desc.enumerable)
  17491. ) {
  17492. target[key] = desc.value;
  17493. return target;
  17494. } return dP(target, key, desc);
  17495. };
  17496. if (!ALL_CONSTRUCTORS) {
  17497. $GOPD.f = $getDesc;
  17498. $DP.f = $setDesc;
  17499. }
  17500. $export($export.S + $export.F * !ALL_CONSTRUCTORS, 'Object', {
  17501. getOwnPropertyDescriptor: $getDesc,
  17502. defineProperty: $setDesc
  17503. });
  17504. if (fails(function () { arrayToString.call({}); })) {
  17505. arrayToString = arrayToLocaleString = function toString() {
  17506. return arrayJoin.call(this);
  17507. };
  17508. }
  17509. var $TypedArrayPrototype$ = redefineAll({}, proto);
  17510. redefineAll($TypedArrayPrototype$, $iterators);
  17511. hide($TypedArrayPrototype$, ITERATOR, $iterators.values);
  17512. redefineAll($TypedArrayPrototype$, {
  17513. slice: $slice,
  17514. set: $set,
  17515. constructor: function () { /* noop */ },
  17516. toString: arrayToString,
  17517. toLocaleString: $toLocaleString
  17518. });
  17519. addGetter($TypedArrayPrototype$, 'buffer', 'b');
  17520. addGetter($TypedArrayPrototype$, 'byteOffset', 'o');
  17521. addGetter($TypedArrayPrototype$, 'byteLength', 'l');
  17522. addGetter($TypedArrayPrototype$, 'length', 'e');
  17523. dP($TypedArrayPrototype$, TAG, {
  17524. get: function () { return this[TYPED_ARRAY]; }
  17525. });
  17526. // eslint-disable-next-line max-statements
  17527. module.exports = function (KEY, BYTES, wrapper, CLAMPED) {
  17528. CLAMPED = !!CLAMPED;
  17529. var NAME = KEY + (CLAMPED ? 'Clamped' : '') + 'Array';
  17530. var GETTER = 'get' + KEY;
  17531. var SETTER = 'set' + KEY;
  17532. var TypedArray = global[NAME];
  17533. var Base = TypedArray || {};
  17534. var TAC = TypedArray && getPrototypeOf(TypedArray);
  17535. var FORCED = !TypedArray || !$typed.ABV;
  17536. var O = {};
  17537. var TypedArrayPrototype = TypedArray && TypedArray[PROTOTYPE];
  17538. var getter = function (that, index) {
  17539. var data = that._d;
  17540. return data.v[GETTER](index * BYTES + data.o, LITTLE_ENDIAN);
  17541. };
  17542. var setter = function (that, index, value) {
  17543. var data = that._d;
  17544. if (CLAMPED) value = (value = Math.round(value)) < 0 ? 0 : value > 0xff ? 0xff : value & 0xff;
  17545. data.v[SETTER](index * BYTES + data.o, value, LITTLE_ENDIAN);
  17546. };
  17547. var addElement = function (that, index) {
  17548. dP(that, index, {
  17549. get: function () {
  17550. return getter(this, index);
  17551. },
  17552. set: function (value) {
  17553. return setter(this, index, value);
  17554. },
  17555. enumerable: true
  17556. });
  17557. };
  17558. if (FORCED) {
  17559. TypedArray = wrapper(function (that, data, $offset, $length) {
  17560. anInstance(that, TypedArray, NAME, '_d');
  17561. var index = 0;
  17562. var offset = 0;
  17563. var buffer, byteLength, length, klass;
  17564. if (!isObject(data)) {
  17565. length = toIndex(data);
  17566. byteLength = length * BYTES;
  17567. buffer = new $ArrayBuffer(byteLength);
  17568. } else if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) {
  17569. buffer = data;
  17570. offset = toOffset($offset, BYTES);
  17571. var $len = data.byteLength;
  17572. if ($length === undefined) {
  17573. if ($len % BYTES) throw RangeError(WRONG_LENGTH);
  17574. byteLength = $len - offset;
  17575. if (byteLength < 0) throw RangeError(WRONG_LENGTH);
  17576. } else {
  17577. byteLength = toLength($length) * BYTES;
  17578. if (byteLength + offset > $len) throw RangeError(WRONG_LENGTH);
  17579. }
  17580. length = byteLength / BYTES;
  17581. } else if (TYPED_ARRAY in data) {
  17582. return fromList(TypedArray, data);
  17583. } else {
  17584. return $from.call(TypedArray, data);
  17585. }
  17586. hide(that, '_d', {
  17587. b: buffer,
  17588. o: offset,
  17589. l: byteLength,
  17590. e: length,
  17591. v: new $DataView(buffer)
  17592. });
  17593. while (index < length) addElement(that, index++);
  17594. });
  17595. TypedArrayPrototype = TypedArray[PROTOTYPE] = create($TypedArrayPrototype$);
  17596. hide(TypedArrayPrototype, 'constructor', TypedArray);
  17597. } else if (!fails(function () {
  17598. TypedArray(1);
  17599. }) || !fails(function () {
  17600. new TypedArray(-1); // eslint-disable-line no-new
  17601. }) || !$iterDetect(function (iter) {
  17602. new TypedArray(); // eslint-disable-line no-new
  17603. new TypedArray(null); // eslint-disable-line no-new
  17604. new TypedArray(1.5); // eslint-disable-line no-new
  17605. new TypedArray(iter); // eslint-disable-line no-new
  17606. }, true)) {
  17607. TypedArray = wrapper(function (that, data, $offset, $length) {
  17608. anInstance(that, TypedArray, NAME);
  17609. var klass;
  17610. // `ws` module bug, temporarily remove validation length for Uint8Array
  17611. // https://github.com/websockets/ws/pull/645
  17612. if (!isObject(data)) return new Base(toIndex(data));
  17613. if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) {
  17614. return $length !== undefined
  17615. ? new Base(data, toOffset($offset, BYTES), $length)
  17616. : $offset !== undefined
  17617. ? new Base(data, toOffset($offset, BYTES))
  17618. : new Base(data);
  17619. }
  17620. if (TYPED_ARRAY in data) return fromList(TypedArray, data);
  17621. return $from.call(TypedArray, data);
  17622. });
  17623. arrayForEach(TAC !== Function.prototype ? gOPN(Base).concat(gOPN(TAC)) : gOPN(Base), function (key) {
  17624. if (!(key in TypedArray)) hide(TypedArray, key, Base[key]);
  17625. });
  17626. TypedArray[PROTOTYPE] = TypedArrayPrototype;
  17627. if (!LIBRARY) TypedArrayPrototype.constructor = TypedArray;
  17628. }
  17629. var $nativeIterator = TypedArrayPrototype[ITERATOR];
  17630. var CORRECT_ITER_NAME = !!$nativeIterator
  17631. && ($nativeIterator.name == 'values' || $nativeIterator.name == undefined);
  17632. var $iterator = $iterators.values;
  17633. hide(TypedArray, TYPED_CONSTRUCTOR, true);
  17634. hide(TypedArrayPrototype, TYPED_ARRAY, NAME);
  17635. hide(TypedArrayPrototype, VIEW, true);
  17636. hide(TypedArrayPrototype, DEF_CONSTRUCTOR, TypedArray);
  17637. if (CLAMPED ? new TypedArray(1)[TAG] != NAME : !(TAG in TypedArrayPrototype)) {
  17638. dP(TypedArrayPrototype, TAG, {
  17639. get: function () { return NAME; }
  17640. });
  17641. }
  17642. O[NAME] = TypedArray;
  17643. $export($export.G + $export.W + $export.F * (TypedArray != Base), O);
  17644. $export($export.S, NAME, {
  17645. BYTES_PER_ELEMENT: BYTES
  17646. });
  17647. $export($export.S + $export.F * fails(function () { Base.of.call(TypedArray, 1); }), NAME, {
  17648. from: $from,
  17649. of: $of
  17650. });
  17651. if (!(BYTES_PER_ELEMENT in TypedArrayPrototype)) hide(TypedArrayPrototype, BYTES_PER_ELEMENT, BYTES);
  17652. $export($export.P, NAME, proto);
  17653. setSpecies(NAME);
  17654. $export($export.P + $export.F * FORCED_SET, NAME, { set: $set });
  17655. $export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators);
  17656. if (!LIBRARY && TypedArrayPrototype.toString != arrayToString) TypedArrayPrototype.toString = arrayToString;
  17657. $export($export.P + $export.F * fails(function () {
  17658. new TypedArray(1).slice();
  17659. }), NAME, { slice: $slice });
  17660. $export($export.P + $export.F * (fails(function () {
  17661. return [1, 2].toLocaleString() != new TypedArray([1, 2]).toLocaleString();
  17662. }) || !fails(function () {
  17663. TypedArrayPrototype.toLocaleString.call([1, 2]);
  17664. })), NAME, { toLocaleString: $toLocaleString });
  17665. Iterators[NAME] = CORRECT_ITER_NAME ? $nativeIterator : $iterator;
  17666. if (!LIBRARY && !CORRECT_ITER_NAME) hide(TypedArrayPrototype, ITERATOR, $iterator);
  17667. };
  17668. } else module.exports = function () { /* empty */ };
  17669. /***/ }),
  17670. /* 30 */
  17671. /***/ (function(module, exports, __webpack_require__) {
  17672. var Map = __webpack_require__(113);
  17673. var $export = __webpack_require__(0);
  17674. var shared = __webpack_require__(50)('metadata');
  17675. var store = shared.store || (shared.store = new (__webpack_require__(116))());
  17676. var getOrCreateMetadataMap = function (target, targetKey, create) {
  17677. var targetMetadata = store.get(target);
  17678. if (!targetMetadata) {
  17679. if (!create) return undefined;
  17680. store.set(target, targetMetadata = new Map());
  17681. }
  17682. var keyMetadata = targetMetadata.get(targetKey);
  17683. if (!keyMetadata) {
  17684. if (!create) return undefined;
  17685. targetMetadata.set(targetKey, keyMetadata = new Map());
  17686. } return keyMetadata;
  17687. };
  17688. var ordinaryHasOwnMetadata = function (MetadataKey, O, P) {
  17689. var metadataMap = getOrCreateMetadataMap(O, P, false);
  17690. return metadataMap === undefined ? false : metadataMap.has(MetadataKey);
  17691. };
  17692. var ordinaryGetOwnMetadata = function (MetadataKey, O, P) {
  17693. var metadataMap = getOrCreateMetadataMap(O, P, false);
  17694. return metadataMap === undefined ? undefined : metadataMap.get(MetadataKey);
  17695. };
  17696. var ordinaryDefineOwnMetadata = function (MetadataKey, MetadataValue, O, P) {
  17697. getOrCreateMetadataMap(O, P, true).set(MetadataKey, MetadataValue);
  17698. };
  17699. var ordinaryOwnMetadataKeys = function (target, targetKey) {
  17700. var metadataMap = getOrCreateMetadataMap(target, targetKey, false);
  17701. var keys = [];
  17702. if (metadataMap) metadataMap.forEach(function (_, key) { keys.push(key); });
  17703. return keys;
  17704. };
  17705. var toMetaKey = function (it) {
  17706. return it === undefined || typeof it == 'symbol' ? it : String(it);
  17707. };
  17708. var exp = function (O) {
  17709. $export($export.S, 'Reflect', O);
  17710. };
  17711. module.exports = {
  17712. store: store,
  17713. map: getOrCreateMetadataMap,
  17714. has: ordinaryHasOwnMetadata,
  17715. get: ordinaryGetOwnMetadata,
  17716. set: ordinaryDefineOwnMetadata,
  17717. keys: ordinaryOwnMetadataKeys,
  17718. key: toMetaKey,
  17719. exp: exp
  17720. };
  17721. /***/ }),
  17722. /* 31 */
  17723. /***/ (function(module, exports) {
  17724. module.exports = function (bitmap, value) {
  17725. return {
  17726. enumerable: !(bitmap & 1),
  17727. configurable: !(bitmap & 2),
  17728. writable: !(bitmap & 4),
  17729. value: value
  17730. };
  17731. };
  17732. /***/ }),
  17733. /* 32 */
  17734. /***/ (function(module, exports, __webpack_require__) {
  17735. var META = __webpack_require__(36)('meta');
  17736. var isObject = __webpack_require__(3);
  17737. var has = __webpack_require__(12);
  17738. var setDesc = __webpack_require__(6).f;
  17739. var id = 0;
  17740. var isExtensible = Object.isExtensible || function () {
  17741. return true;
  17742. };
  17743. var FREEZE = !__webpack_require__(4)(function () {
  17744. return isExtensible(Object.preventExtensions({}));
  17745. });
  17746. var setMeta = function (it) {
  17747. setDesc(it, META, { value: {
  17748. i: 'O' + ++id, // object ID
  17749. w: {} // weak collections IDs
  17750. } });
  17751. };
  17752. var fastKey = function (it, create) {
  17753. // return primitive with prefix
  17754. if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
  17755. if (!has(it, META)) {
  17756. // can't set metadata to uncaught frozen object
  17757. if (!isExtensible(it)) return 'F';
  17758. // not necessary to add metadata
  17759. if (!create) return 'E';
  17760. // add missing metadata
  17761. setMeta(it);
  17762. // return object ID
  17763. } return it[META].i;
  17764. };
  17765. var getWeak = function (it, create) {
  17766. if (!has(it, META)) {
  17767. // can't set metadata to uncaught frozen object
  17768. if (!isExtensible(it)) return true;
  17769. // not necessary to add metadata
  17770. if (!create) return false;
  17771. // add missing metadata
  17772. setMeta(it);
  17773. // return hash weak collections IDs
  17774. } return it[META].w;
  17775. };
  17776. // add metadata on freeze-family methods calling
  17777. var onFreeze = function (it) {
  17778. if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it);
  17779. return it;
  17780. };
  17781. var meta = module.exports = {
  17782. KEY: META,
  17783. NEED: false,
  17784. fastKey: fastKey,
  17785. getWeak: getWeak,
  17786. onFreeze: onFreeze
  17787. };
  17788. /***/ }),
  17789. /* 33 */
  17790. /***/ (function(module, exports) {
  17791. module.exports = false;
  17792. /***/ }),
  17793. /* 34 */
  17794. /***/ (function(module, exports, __webpack_require__) {
  17795. // 22.1.3.31 Array.prototype[@@unscopables]
  17796. var UNSCOPABLES = __webpack_require__(5)('unscopables');
  17797. var ArrayProto = Array.prototype;
  17798. if (ArrayProto[UNSCOPABLES] == undefined) __webpack_require__(14)(ArrayProto, UNSCOPABLES, {});
  17799. module.exports = function (key) {
  17800. ArrayProto[UNSCOPABLES][key] = true;
  17801. };
  17802. /***/ }),
  17803. /* 35 */
  17804. /***/ (function(module, exports, __webpack_require__) {
  17805. var ctx = __webpack_require__(19);
  17806. var call = __webpack_require__(107);
  17807. var isArrayIter = __webpack_require__(83);
  17808. var anObject = __webpack_require__(1);
  17809. var toLength = __webpack_require__(8);
  17810. var getIterFn = __webpack_require__(49);
  17811. var BREAK = {};
  17812. var RETURN = {};
  17813. var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) {
  17814. var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable);
  17815. var f = ctx(fn, that, entries ? 2 : 1);
  17816. var index = 0;
  17817. var length, step, iterator, result;
  17818. if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!');
  17819. // fast case for arrays with default iterator
  17820. if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) {
  17821. result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);
  17822. if (result === BREAK || result === RETURN) return result;
  17823. } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) {
  17824. result = call(iterator, f, step.value, entries);
  17825. if (result === BREAK || result === RETURN) return result;
  17826. }
  17827. };
  17828. exports.BREAK = BREAK;
  17829. exports.RETURN = RETURN;
  17830. /***/ }),
  17831. /* 36 */
  17832. /***/ (function(module, exports) {
  17833. var id = 0;
  17834. var px = Math.random();
  17835. module.exports = function (key) {
  17836. return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
  17837. };
  17838. /***/ }),
  17839. /* 37 */
  17840. /***/ (function(module, exports, __webpack_require__) {
  17841. var toInteger = __webpack_require__(24);
  17842. var max = Math.max;
  17843. var min = Math.min;
  17844. module.exports = function (index, length) {
  17845. index = toInteger(index);
  17846. return index < 0 ? max(index + length, 0) : min(index, length);
  17847. };
  17848. /***/ }),
  17849. /* 38 */
  17850. /***/ (function(module, exports, __webpack_require__) {
  17851. // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
  17852. var $keys = __webpack_require__(97);
  17853. var hiddenKeys = __webpack_require__(70).concat('length', 'prototype');
  17854. exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  17855. return $keys(O, hiddenKeys);
  17856. };
  17857. /***/ }),
  17858. /* 39 */
  17859. /***/ (function(module, exports, __webpack_require__) {
  17860. // getting tag from 19.1.3.6 Object.prototype.toString()
  17861. var cof = __webpack_require__(20);
  17862. var TAG = __webpack_require__(5)('toStringTag');
  17863. // ES3 wrong here
  17864. var ARG = cof(function () { return arguments; }()) == 'Arguments';
  17865. // fallback for IE11 Script Access Denied error
  17866. var tryGet = function (it, key) {
  17867. try {
  17868. return it[key];
  17869. } catch (e) { /* empty */ }
  17870. };
  17871. module.exports = function (it) {
  17872. var O, T, B;
  17873. return it === undefined ? 'Undefined' : it === null ? 'Null'
  17874. // @@toStringTag case
  17875. : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T
  17876. // builtinTag case
  17877. : ARG ? cof(O)
  17878. // ES3 arguments fallback
  17879. : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;
  17880. };
  17881. /***/ }),
  17882. /* 40 */
  17883. /***/ (function(module, exports) {
  17884. module.exports = {};
  17885. /***/ }),
  17886. /* 41 */
  17887. /***/ (function(module, exports, __webpack_require__) {
  17888. "use strict";
  17889. var global = __webpack_require__(2);
  17890. var dP = __webpack_require__(6);
  17891. var DESCRIPTORS = __webpack_require__(7);
  17892. var SPECIES = __webpack_require__(5)('species');
  17893. module.exports = function (KEY) {
  17894. var C = global[KEY];
  17895. if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, {
  17896. configurable: true,
  17897. get: function () { return this; }
  17898. });
  17899. };
  17900. /***/ }),
  17901. /* 42 */
  17902. /***/ (function(module, exports) {
  17903. module.exports = function (it, Constructor, name, forbiddenField) {
  17904. if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) {
  17905. throw TypeError(name + ': incorrect invocation!');
  17906. } return it;
  17907. };
  17908. /***/ }),
  17909. /* 43 */
  17910. /***/ (function(module, exports, __webpack_require__) {
  17911. var redefine = __webpack_require__(15);
  17912. module.exports = function (target, src, safe) {
  17913. for (var key in src) redefine(target, key, src[key], safe);
  17914. return target;
  17915. };
  17916. /***/ }),
  17917. /* 44 */
  17918. /***/ (function(module, exports, __webpack_require__) {
  17919. var def = __webpack_require__(6).f;
  17920. var has = __webpack_require__(12);
  17921. var TAG = __webpack_require__(5)('toStringTag');
  17922. module.exports = function (it, tag, stat) {
  17923. if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });
  17924. };
  17925. /***/ }),
  17926. /* 45 */
  17927. /***/ (function(module, exports, __webpack_require__) {
  17928. var $export = __webpack_require__(0);
  17929. var defined = __webpack_require__(23);
  17930. var fails = __webpack_require__(4);
  17931. var spaces = __webpack_require__(76);
  17932. var space = '[' + spaces + ']';
  17933. var non = '\u200b\u0085';
  17934. var ltrim = RegExp('^' + space + space + '*');
  17935. var rtrim = RegExp(space + space + '*$');
  17936. var exporter = function (KEY, exec, ALIAS) {
  17937. var exp = {};
  17938. var FORCE = fails(function () {
  17939. return !!spaces[KEY]() || non[KEY]() != non;
  17940. });
  17941. var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY];
  17942. if (ALIAS) exp[ALIAS] = fn;
  17943. $export($export.P + $export.F * FORCE, 'String', exp);
  17944. };
  17945. // 1 -> String#trimLeft
  17946. // 2 -> String#trimRight
  17947. // 3 -> String#trim
  17948. var trim = exporter.trim = function (string, TYPE) {
  17949. string = String(defined(string));
  17950. if (TYPE & 1) string = string.replace(ltrim, '');
  17951. if (TYPE & 2) string = string.replace(rtrim, '');
  17952. return string;
  17953. };
  17954. module.exports = exporter;
  17955. /***/ }),
  17956. /* 46 */
  17957. /***/ (function(module, exports, __webpack_require__) {
  17958. var isObject = __webpack_require__(3);
  17959. module.exports = function (it, TYPE) {
  17960. if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!');
  17961. return it;
  17962. };
  17963. /***/ }),
  17964. /* 47 */
  17965. /***/ (function(module, exports, __webpack_require__) {
  17966. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  17967. var cof = __webpack_require__(20);
  17968. // eslint-disable-next-line no-prototype-builtins
  17969. module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
  17970. return cof(it) == 'String' ? it.split('') : Object(it);
  17971. };
  17972. /***/ }),
  17973. /* 48 */
  17974. /***/ (function(module, exports) {
  17975. exports.f = {}.propertyIsEnumerable;
  17976. /***/ }),
  17977. /* 49 */
  17978. /***/ (function(module, exports, __webpack_require__) {
  17979. var classof = __webpack_require__(39);
  17980. var ITERATOR = __webpack_require__(5)('iterator');
  17981. var Iterators = __webpack_require__(40);
  17982. module.exports = __webpack_require__(13).getIteratorMethod = function (it) {
  17983. if (it != undefined) return it[ITERATOR]
  17984. || it['@@iterator']
  17985. || Iterators[classof(it)];
  17986. };
  17987. /***/ }),
  17988. /* 50 */
  17989. /***/ (function(module, exports, __webpack_require__) {
  17990. var core = __webpack_require__(13);
  17991. var global = __webpack_require__(2);
  17992. var SHARED = '__core-js_shared__';
  17993. var store = global[SHARED] || (global[SHARED] = {});
  17994. (module.exports = function (key, value) {
  17995. return store[key] || (store[key] = value !== undefined ? value : {});
  17996. })('versions', []).push({
  17997. version: core.version,
  17998. mode: __webpack_require__(33) ? 'pure' : 'global',
  17999. copyright: '© 2018 Denis Pushkarev (zloirock.ru)'
  18000. });
  18001. /***/ }),
  18002. /* 51 */
  18003. /***/ (function(module, exports, __webpack_require__) {
  18004. // false -> Array#indexOf
  18005. // true -> Array#includes
  18006. var toIObject = __webpack_require__(11);
  18007. var toLength = __webpack_require__(8);
  18008. var toAbsoluteIndex = __webpack_require__(37);
  18009. module.exports = function (IS_INCLUDES) {
  18010. return function ($this, el, fromIndex) {
  18011. var O = toIObject($this);
  18012. var length = toLength(O.length);
  18013. var index = toAbsoluteIndex(fromIndex, length);
  18014. var value;
  18015. // Array#includes uses SameValueZero equality algorithm
  18016. // eslint-disable-next-line no-self-compare
  18017. if (IS_INCLUDES && el != el) while (length > index) {
  18018. value = O[index++];
  18019. // eslint-disable-next-line no-self-compare
  18020. if (value != value) return true;
  18021. // Array#indexOf ignores holes, Array#includes - not
  18022. } else for (;length > index; index++) if (IS_INCLUDES || index in O) {
  18023. if (O[index] === el) return IS_INCLUDES || index || 0;
  18024. } return !IS_INCLUDES && -1;
  18025. };
  18026. };
  18027. /***/ }),
  18028. /* 52 */
  18029. /***/ (function(module, exports) {
  18030. exports.f = Object.getOwnPropertySymbols;
  18031. /***/ }),
  18032. /* 53 */
  18033. /***/ (function(module, exports, __webpack_require__) {
  18034. // 7.2.2 IsArray(argument)
  18035. var cof = __webpack_require__(20);
  18036. module.exports = Array.isArray || function isArray(arg) {
  18037. return cof(arg) == 'Array';
  18038. };
  18039. /***/ }),
  18040. /* 54 */
  18041. /***/ (function(module, exports, __webpack_require__) {
  18042. // 7.2.8 IsRegExp(argument)
  18043. var isObject = __webpack_require__(3);
  18044. var cof = __webpack_require__(20);
  18045. var MATCH = __webpack_require__(5)('match');
  18046. module.exports = function (it) {
  18047. var isRegExp;
  18048. return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp');
  18049. };
  18050. /***/ }),
  18051. /* 55 */
  18052. /***/ (function(module, exports, __webpack_require__) {
  18053. "use strict";
  18054. var LIBRARY = __webpack_require__(33);
  18055. var $export = __webpack_require__(0);
  18056. var redefine = __webpack_require__(15);
  18057. var hide = __webpack_require__(14);
  18058. var Iterators = __webpack_require__(40);
  18059. var $iterCreate = __webpack_require__(56);
  18060. var setToStringTag = __webpack_require__(44);
  18061. var getPrototypeOf = __webpack_require__(17);
  18062. var ITERATOR = __webpack_require__(5)('iterator');
  18063. var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`
  18064. var FF_ITERATOR = '@@iterator';
  18065. var KEYS = 'keys';
  18066. var VALUES = 'values';
  18067. var returnThis = function () { return this; };
  18068. module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {
  18069. $iterCreate(Constructor, NAME, next);
  18070. var getMethod = function (kind) {
  18071. if (!BUGGY && kind in proto) return proto[kind];
  18072. switch (kind) {
  18073. case KEYS: return function keys() { return new Constructor(this, kind); };
  18074. case VALUES: return function values() { return new Constructor(this, kind); };
  18075. } return function entries() { return new Constructor(this, kind); };
  18076. };
  18077. var TAG = NAME + ' Iterator';
  18078. var DEF_VALUES = DEFAULT == VALUES;
  18079. var VALUES_BUG = false;
  18080. var proto = Base.prototype;
  18081. var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];
  18082. var $default = $native || getMethod(DEFAULT);
  18083. var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;
  18084. var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;
  18085. var methods, key, IteratorPrototype;
  18086. // Fix native
  18087. if ($anyNative) {
  18088. IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));
  18089. if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {
  18090. // Set @@toStringTag to native iterators
  18091. setToStringTag(IteratorPrototype, TAG, true);
  18092. // fix for some old engines
  18093. if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis);
  18094. }
  18095. }
  18096. // fix Array#{values, @@iterator}.name in V8 / FF
  18097. if (DEF_VALUES && $native && $native.name !== VALUES) {
  18098. VALUES_BUG = true;
  18099. $default = function values() { return $native.call(this); };
  18100. }
  18101. // Define iterator
  18102. if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {
  18103. hide(proto, ITERATOR, $default);
  18104. }
  18105. // Plug for library
  18106. Iterators[NAME] = $default;
  18107. Iterators[TAG] = returnThis;
  18108. if (DEFAULT) {
  18109. methods = {
  18110. values: DEF_VALUES ? $default : getMethod(VALUES),
  18111. keys: IS_SET ? $default : getMethod(KEYS),
  18112. entries: $entries
  18113. };
  18114. if (FORCED) for (key in methods) {
  18115. if (!(key in proto)) redefine(proto, key, methods[key]);
  18116. } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
  18117. }
  18118. return methods;
  18119. };
  18120. /***/ }),
  18121. /* 56 */
  18122. /***/ (function(module, exports, __webpack_require__) {
  18123. "use strict";
  18124. var create = __webpack_require__(28);
  18125. var descriptor = __webpack_require__(31);
  18126. var setToStringTag = __webpack_require__(44);
  18127. var IteratorPrototype = {};
  18128. // 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
  18129. __webpack_require__(14)(IteratorPrototype, __webpack_require__(5)('iterator'), function () { return this; });
  18130. module.exports = function (Constructor, NAME, next) {
  18131. Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });
  18132. setToStringTag(Constructor, NAME + ' Iterator');
  18133. };
  18134. /***/ }),
  18135. /* 57 */
  18136. /***/ (function(module, exports, __webpack_require__) {
  18137. var ITERATOR = __webpack_require__(5)('iterator');
  18138. var SAFE_CLOSING = false;
  18139. try {
  18140. var riter = [7][ITERATOR]();
  18141. riter['return'] = function () { SAFE_CLOSING = true; };
  18142. // eslint-disable-next-line no-throw-literal
  18143. Array.from(riter, function () { throw 2; });
  18144. } catch (e) { /* empty */ }
  18145. module.exports = function (exec, skipClosing) {
  18146. if (!skipClosing && !SAFE_CLOSING) return false;
  18147. var safe = false;
  18148. try {
  18149. var arr = [7];
  18150. var iter = arr[ITERATOR]();
  18151. iter.next = function () { return { done: safe = true }; };
  18152. arr[ITERATOR] = function () { return iter; };
  18153. exec(arr);
  18154. } catch (e) { /* empty */ }
  18155. return safe;
  18156. };
  18157. /***/ }),
  18158. /* 58 */
  18159. /***/ (function(module, exports, __webpack_require__) {
  18160. "use strict";
  18161. // 21.2.5.3 get RegExp.prototype.flags
  18162. var anObject = __webpack_require__(1);
  18163. module.exports = function () {
  18164. var that = anObject(this);
  18165. var result = '';
  18166. if (that.global) result += 'g';
  18167. if (that.ignoreCase) result += 'i';
  18168. if (that.multiline) result += 'm';
  18169. if (that.unicode) result += 'u';
  18170. if (that.sticky) result += 'y';
  18171. return result;
  18172. };
  18173. /***/ }),
  18174. /* 59 */
  18175. /***/ (function(module, exports, __webpack_require__) {
  18176. "use strict";
  18177. var hide = __webpack_require__(14);
  18178. var redefine = __webpack_require__(15);
  18179. var fails = __webpack_require__(4);
  18180. var defined = __webpack_require__(23);
  18181. var wks = __webpack_require__(5);
  18182. module.exports = function (KEY, length, exec) {
  18183. var SYMBOL = wks(KEY);
  18184. var fns = exec(defined, SYMBOL, ''[KEY]);
  18185. var strfn = fns[0];
  18186. var rxfn = fns[1];
  18187. if (fails(function () {
  18188. var O = {};
  18189. O[SYMBOL] = function () { return 7; };
  18190. return ''[KEY](O) != 7;
  18191. })) {
  18192. redefine(String.prototype, KEY, strfn);
  18193. hide(RegExp.prototype, SYMBOL, length == 2
  18194. // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
  18195. // 21.2.5.11 RegExp.prototype[@@split](string, limit)
  18196. ? function (string, arg) { return rxfn.call(string, this, arg); }
  18197. // 21.2.5.6 RegExp.prototype[@@match](string)
  18198. // 21.2.5.9 RegExp.prototype[@@search](string)
  18199. : function (string) { return rxfn.call(string, this); }
  18200. );
  18201. }
  18202. };
  18203. /***/ }),
  18204. /* 60 */
  18205. /***/ (function(module, exports, __webpack_require__) {
  18206. // 7.3.20 SpeciesConstructor(O, defaultConstructor)
  18207. var anObject = __webpack_require__(1);
  18208. var aFunction = __webpack_require__(10);
  18209. var SPECIES = __webpack_require__(5)('species');
  18210. module.exports = function (O, D) {
  18211. var C = anObject(O).constructor;
  18212. var S;
  18213. return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S);
  18214. };
  18215. /***/ }),
  18216. /* 61 */
  18217. /***/ (function(module, exports, __webpack_require__) {
  18218. var global = __webpack_require__(2);
  18219. var navigator = global.navigator;
  18220. module.exports = navigator && navigator.userAgent || '';
  18221. /***/ }),
  18222. /* 62 */
  18223. /***/ (function(module, exports, __webpack_require__) {
  18224. "use strict";
  18225. var global = __webpack_require__(2);
  18226. var $export = __webpack_require__(0);
  18227. var redefine = __webpack_require__(15);
  18228. var redefineAll = __webpack_require__(43);
  18229. var meta = __webpack_require__(32);
  18230. var forOf = __webpack_require__(35);
  18231. var anInstance = __webpack_require__(42);
  18232. var isObject = __webpack_require__(3);
  18233. var fails = __webpack_require__(4);
  18234. var $iterDetect = __webpack_require__(57);
  18235. var setToStringTag = __webpack_require__(44);
  18236. var inheritIfRequired = __webpack_require__(75);
  18237. module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) {
  18238. var Base = global[NAME];
  18239. var C = Base;
  18240. var ADDER = IS_MAP ? 'set' : 'add';
  18241. var proto = C && C.prototype;
  18242. var O = {};
  18243. var fixMethod = function (KEY) {
  18244. var fn = proto[KEY];
  18245. redefine(proto, KEY,
  18246. KEY == 'delete' ? function (a) {
  18247. return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a);
  18248. } : KEY == 'has' ? function has(a) {
  18249. return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a);
  18250. } : KEY == 'get' ? function get(a) {
  18251. return IS_WEAK && !isObject(a) ? undefined : fn.call(this, a === 0 ? 0 : a);
  18252. } : KEY == 'add' ? function add(a) { fn.call(this, a === 0 ? 0 : a); return this; }
  18253. : function set(a, b) { fn.call(this, a === 0 ? 0 : a, b); return this; }
  18254. );
  18255. };
  18256. if (typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function () {
  18257. new C().entries().next();
  18258. }))) {
  18259. // create collection constructor
  18260. C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER);
  18261. redefineAll(C.prototype, methods);
  18262. meta.NEED = true;
  18263. } else {
  18264. var instance = new C();
  18265. // early implementations not supports chaining
  18266. var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance;
  18267. // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false
  18268. var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); });
  18269. // most early implementations doesn't supports iterables, most modern - not close it correctly
  18270. var ACCEPT_ITERABLES = $iterDetect(function (iter) { new C(iter); }); // eslint-disable-line no-new
  18271. // for early implementations -0 and +0 not the same
  18272. var BUGGY_ZERO = !IS_WEAK && fails(function () {
  18273. // V8 ~ Chromium 42- fails only with 5+ elements
  18274. var $instance = new C();
  18275. var index = 5;
  18276. while (index--) $instance[ADDER](index, index);
  18277. return !$instance.has(-0);
  18278. });
  18279. if (!ACCEPT_ITERABLES) {
  18280. C = wrapper(function (target, iterable) {
  18281. anInstance(target, C, NAME);
  18282. var that = inheritIfRequired(new Base(), target, C);
  18283. if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);
  18284. return that;
  18285. });
  18286. C.prototype = proto;
  18287. proto.constructor = C;
  18288. }
  18289. if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) {
  18290. fixMethod('delete');
  18291. fixMethod('has');
  18292. IS_MAP && fixMethod('get');
  18293. }
  18294. if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER);
  18295. // weak collections should not contains .clear method
  18296. if (IS_WEAK && proto.clear) delete proto.clear;
  18297. }
  18298. setToStringTag(C, NAME);
  18299. O[NAME] = C;
  18300. $export($export.G + $export.W + $export.F * (C != Base), O);
  18301. if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP);
  18302. return C;
  18303. };
  18304. /***/ }),
  18305. /* 63 */
  18306. /***/ (function(module, exports, __webpack_require__) {
  18307. var global = __webpack_require__(2);
  18308. var hide = __webpack_require__(14);
  18309. var uid = __webpack_require__(36);
  18310. var TYPED = uid('typed_array');
  18311. var VIEW = uid('view');
  18312. var ABV = !!(global.ArrayBuffer && global.DataView);
  18313. var CONSTR = ABV;
  18314. var i = 0;
  18315. var l = 9;
  18316. var Typed;
  18317. var TypedArrayConstructors = (
  18318. 'Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array'
  18319. ).split(',');
  18320. while (i < l) {
  18321. if (Typed = global[TypedArrayConstructors[i++]]) {
  18322. hide(Typed.prototype, TYPED, true);
  18323. hide(Typed.prototype, VIEW, true);
  18324. } else CONSTR = false;
  18325. }
  18326. module.exports = {
  18327. ABV: ABV,
  18328. CONSTR: CONSTR,
  18329. TYPED: TYPED,
  18330. VIEW: VIEW
  18331. };
  18332. /***/ }),
  18333. /* 64 */
  18334. /***/ (function(module, exports, __webpack_require__) {
  18335. "use strict";
  18336. // Forced replacement prototype accessors methods
  18337. module.exports = __webpack_require__(33) || !__webpack_require__(4)(function () {
  18338. var K = Math.random();
  18339. // In FF throws only define methods
  18340. // eslint-disable-next-line no-undef, no-useless-call
  18341. __defineSetter__.call(null, K, function () { /* empty */ });
  18342. delete __webpack_require__(2)[K];
  18343. });
  18344. /***/ }),
  18345. /* 65 */
  18346. /***/ (function(module, exports, __webpack_require__) {
  18347. "use strict";
  18348. // https://tc39.github.io/proposal-setmap-offrom/
  18349. var $export = __webpack_require__(0);
  18350. module.exports = function (COLLECTION) {
  18351. $export($export.S, COLLECTION, { of: function of() {
  18352. var length = arguments.length;
  18353. var A = new Array(length);
  18354. while (length--) A[length] = arguments[length];
  18355. return new this(A);
  18356. } });
  18357. };
  18358. /***/ }),
  18359. /* 66 */
  18360. /***/ (function(module, exports, __webpack_require__) {
  18361. "use strict";
  18362. // https://tc39.github.io/proposal-setmap-offrom/
  18363. var $export = __webpack_require__(0);
  18364. var aFunction = __webpack_require__(10);
  18365. var ctx = __webpack_require__(19);
  18366. var forOf = __webpack_require__(35);
  18367. module.exports = function (COLLECTION) {
  18368. $export($export.S, COLLECTION, { from: function from(source /* , mapFn, thisArg */) {
  18369. var mapFn = arguments[1];
  18370. var mapping, A, n, cb;
  18371. aFunction(this);
  18372. mapping = mapFn !== undefined;
  18373. if (mapping) aFunction(mapFn);
  18374. if (source == undefined) return new this();
  18375. A = [];
  18376. if (mapping) {
  18377. n = 0;
  18378. cb = ctx(mapFn, arguments[2], 2);
  18379. forOf(source, false, function (nextItem) {
  18380. A.push(cb(nextItem, n++));
  18381. });
  18382. } else {
  18383. forOf(source, false, A.push, A);
  18384. }
  18385. return new this(A);
  18386. } });
  18387. };
  18388. /***/ }),
  18389. /* 67 */
  18390. /***/ (function(module, exports, __webpack_require__) {
  18391. var isObject = __webpack_require__(3);
  18392. var document = __webpack_require__(2).document;
  18393. // typeof document.createElement is 'object' in old IE
  18394. var is = isObject(document) && isObject(document.createElement);
  18395. module.exports = function (it) {
  18396. return is ? document.createElement(it) : {};
  18397. };
  18398. /***/ }),
  18399. /* 68 */
  18400. /***/ (function(module, exports, __webpack_require__) {
  18401. var global = __webpack_require__(2);
  18402. var core = __webpack_require__(13);
  18403. var LIBRARY = __webpack_require__(33);
  18404. var wksExt = __webpack_require__(96);
  18405. var defineProperty = __webpack_require__(6).f;
  18406. module.exports = function (name) {
  18407. var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});
  18408. if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) });
  18409. };
  18410. /***/ }),
  18411. /* 69 */
  18412. /***/ (function(module, exports, __webpack_require__) {
  18413. var shared = __webpack_require__(50)('keys');
  18414. var uid = __webpack_require__(36);
  18415. module.exports = function (key) {
  18416. return shared[key] || (shared[key] = uid(key));
  18417. };
  18418. /***/ }),
  18419. /* 70 */
  18420. /***/ (function(module, exports) {
  18421. // IE 8- don't enum bug keys
  18422. module.exports = (
  18423. 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
  18424. ).split(',');
  18425. /***/ }),
  18426. /* 71 */
  18427. /***/ (function(module, exports, __webpack_require__) {
  18428. var document = __webpack_require__(2).document;
  18429. module.exports = document && document.documentElement;
  18430. /***/ }),
  18431. /* 72 */
  18432. /***/ (function(module, exports, __webpack_require__) {
  18433. "use strict";
  18434. // 19.1.2.1 Object.assign(target, source, ...)
  18435. var getKeys = __webpack_require__(27);
  18436. var gOPS = __webpack_require__(52);
  18437. var pIE = __webpack_require__(48);
  18438. var toObject = __webpack_require__(9);
  18439. var IObject = __webpack_require__(47);
  18440. var $assign = Object.assign;
  18441. // should work with symbols and should have deterministic property order (V8 bug)
  18442. module.exports = !$assign || __webpack_require__(4)(function () {
  18443. var A = {};
  18444. var B = {};
  18445. // eslint-disable-next-line no-undef
  18446. var S = Symbol();
  18447. var K = 'abcdefghijklmnopqrst';
  18448. A[S] = 7;
  18449. K.split('').forEach(function (k) { B[k] = k; });
  18450. return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;
  18451. }) ? function assign(target, source) { // eslint-disable-line no-unused-vars
  18452. var T = toObject(target);
  18453. var aLen = arguments.length;
  18454. var index = 1;
  18455. var getSymbols = gOPS.f;
  18456. var isEnum = pIE.f;
  18457. while (aLen > index) {
  18458. var S = IObject(arguments[index++]);
  18459. var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S);
  18460. var length = keys.length;
  18461. var j = 0;
  18462. var key;
  18463. while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key];
  18464. } return T;
  18465. } : $assign;
  18466. /***/ }),
  18467. /* 73 */
  18468. /***/ (function(module, exports, __webpack_require__) {
  18469. // Works with __proto__ only. Old v8 can't work with null proto objects.
  18470. /* eslint-disable no-proto */
  18471. var isObject = __webpack_require__(3);
  18472. var anObject = __webpack_require__(1);
  18473. var check = function (O, proto) {
  18474. anObject(O);
  18475. if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!");
  18476. };
  18477. module.exports = {
  18478. set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line
  18479. function (test, buggy, set) {
  18480. try {
  18481. set = __webpack_require__(19)(Function.call, __webpack_require__(16).f(Object.prototype, '__proto__').set, 2);
  18482. set(test, []);
  18483. buggy = !(test instanceof Array);
  18484. } catch (e) { buggy = true; }
  18485. return function setPrototypeOf(O, proto) {
  18486. check(O, proto);
  18487. if (buggy) O.__proto__ = proto;
  18488. else set(O, proto);
  18489. return O;
  18490. };
  18491. }({}, false) : undefined),
  18492. check: check
  18493. };
  18494. /***/ }),
  18495. /* 74 */
  18496. /***/ (function(module, exports) {
  18497. // fast apply, http://jsperf.lnkit.com/fast-apply/5
  18498. module.exports = function (fn, args, that) {
  18499. var un = that === undefined;
  18500. switch (args.length) {
  18501. case 0: return un ? fn()
  18502. : fn.call(that);
  18503. case 1: return un ? fn(args[0])
  18504. : fn.call(that, args[0]);
  18505. case 2: return un ? fn(args[0], args[1])
  18506. : fn.call(that, args[0], args[1]);
  18507. case 3: return un ? fn(args[0], args[1], args[2])
  18508. : fn.call(that, args[0], args[1], args[2]);
  18509. case 4: return un ? fn(args[0], args[1], args[2], args[3])
  18510. : fn.call(that, args[0], args[1], args[2], args[3]);
  18511. } return fn.apply(that, args);
  18512. };
  18513. /***/ }),
  18514. /* 75 */
  18515. /***/ (function(module, exports, __webpack_require__) {
  18516. var isObject = __webpack_require__(3);
  18517. var setPrototypeOf = __webpack_require__(73).set;
  18518. module.exports = function (that, target, C) {
  18519. var S = target.constructor;
  18520. var P;
  18521. if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf) {
  18522. setPrototypeOf(that, P);
  18523. } return that;
  18524. };
  18525. /***/ }),
  18526. /* 76 */
  18527. /***/ (function(module, exports) {
  18528. module.exports = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' +
  18529. '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
  18530. /***/ }),
  18531. /* 77 */
  18532. /***/ (function(module, exports, __webpack_require__) {
  18533. "use strict";
  18534. var toInteger = __webpack_require__(24);
  18535. var defined = __webpack_require__(23);
  18536. module.exports = function repeat(count) {
  18537. var str = String(defined(this));
  18538. var res = '';
  18539. var n = toInteger(count);
  18540. if (n < 0 || n == Infinity) throw RangeError("Count can't be negative");
  18541. for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) res += str;
  18542. return res;
  18543. };
  18544. /***/ }),
  18545. /* 78 */
  18546. /***/ (function(module, exports) {
  18547. // 20.2.2.28 Math.sign(x)
  18548. module.exports = Math.sign || function sign(x) {
  18549. // eslint-disable-next-line no-self-compare
  18550. return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1;
  18551. };
  18552. /***/ }),
  18553. /* 79 */
  18554. /***/ (function(module, exports) {
  18555. // 20.2.2.14 Math.expm1(x)
  18556. var $expm1 = Math.expm1;
  18557. module.exports = (!$expm1
  18558. // Old FF bug
  18559. || $expm1(10) > 22025.465794806719 || $expm1(10) < 22025.4657948067165168
  18560. // Tor Browser bug
  18561. || $expm1(-2e-17) != -2e-17
  18562. ) ? function expm1(x) {
  18563. return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : Math.exp(x) - 1;
  18564. } : $expm1;
  18565. /***/ }),
  18566. /* 80 */
  18567. /***/ (function(module, exports, __webpack_require__) {
  18568. var toInteger = __webpack_require__(24);
  18569. var defined = __webpack_require__(23);
  18570. // true -> String#at
  18571. // false -> String#codePointAt
  18572. module.exports = function (TO_STRING) {
  18573. return function (that, pos) {
  18574. var s = String(defined(that));
  18575. var i = toInteger(pos);
  18576. var l = s.length;
  18577. var a, b;
  18578. if (i < 0 || i >= l) return TO_STRING ? '' : undefined;
  18579. a = s.charCodeAt(i);
  18580. return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff
  18581. ? TO_STRING ? s.charAt(i) : a
  18582. : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
  18583. };
  18584. };
  18585. /***/ }),
  18586. /* 81 */
  18587. /***/ (function(module, exports, __webpack_require__) {
  18588. // helper for String#{startsWith, endsWith, includes}
  18589. var isRegExp = __webpack_require__(54);
  18590. var defined = __webpack_require__(23);
  18591. module.exports = function (that, searchString, NAME) {
  18592. if (isRegExp(searchString)) throw TypeError('String#' + NAME + " doesn't accept regex!");
  18593. return String(defined(that));
  18594. };
  18595. /***/ }),
  18596. /* 82 */
  18597. /***/ (function(module, exports, __webpack_require__) {
  18598. var MATCH = __webpack_require__(5)('match');
  18599. module.exports = function (KEY) {
  18600. var re = /./;
  18601. try {
  18602. '/./'[KEY](re);
  18603. } catch (e) {
  18604. try {
  18605. re[MATCH] = false;
  18606. return !'/./'[KEY](re);
  18607. } catch (f) { /* empty */ }
  18608. } return true;
  18609. };
  18610. /***/ }),
  18611. /* 83 */
  18612. /***/ (function(module, exports, __webpack_require__) {
  18613. // check on default Array iterator
  18614. var Iterators = __webpack_require__(40);
  18615. var ITERATOR = __webpack_require__(5)('iterator');
  18616. var ArrayProto = Array.prototype;
  18617. module.exports = function (it) {
  18618. return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);
  18619. };
  18620. /***/ }),
  18621. /* 84 */
  18622. /***/ (function(module, exports, __webpack_require__) {
  18623. "use strict";
  18624. var $defineProperty = __webpack_require__(6);
  18625. var createDesc = __webpack_require__(31);
  18626. module.exports = function (object, index, value) {
  18627. if (index in object) $defineProperty.f(object, index, createDesc(0, value));
  18628. else object[index] = value;
  18629. };
  18630. /***/ }),
  18631. /* 85 */
  18632. /***/ (function(module, exports, __webpack_require__) {
  18633. // 9.4.2.3 ArraySpeciesCreate(originalArray, length)
  18634. var speciesConstructor = __webpack_require__(213);
  18635. module.exports = function (original, length) {
  18636. return new (speciesConstructor(original))(length);
  18637. };
  18638. /***/ }),
  18639. /* 86 */
  18640. /***/ (function(module, exports, __webpack_require__) {
  18641. "use strict";
  18642. // 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)
  18643. var toObject = __webpack_require__(9);
  18644. var toAbsoluteIndex = __webpack_require__(37);
  18645. var toLength = __webpack_require__(8);
  18646. module.exports = function fill(value /* , start = 0, end = @length */) {
  18647. var O = toObject(this);
  18648. var length = toLength(O.length);
  18649. var aLen = arguments.length;
  18650. var index = toAbsoluteIndex(aLen > 1 ? arguments[1] : undefined, length);
  18651. var end = aLen > 2 ? arguments[2] : undefined;
  18652. var endPos = end === undefined ? length : toAbsoluteIndex(end, length);
  18653. while (endPos > index) O[index++] = value;
  18654. return O;
  18655. };
  18656. /***/ }),
  18657. /* 87 */
  18658. /***/ (function(module, exports, __webpack_require__) {
  18659. "use strict";
  18660. var addToUnscopables = __webpack_require__(34);
  18661. var step = __webpack_require__(88);
  18662. var Iterators = __webpack_require__(40);
  18663. var toIObject = __webpack_require__(11);
  18664. // 22.1.3.4 Array.prototype.entries()
  18665. // 22.1.3.13 Array.prototype.keys()
  18666. // 22.1.3.29 Array.prototype.values()
  18667. // 22.1.3.30 Array.prototype[@@iterator]()
  18668. module.exports = __webpack_require__(55)(Array, 'Array', function (iterated, kind) {
  18669. this._t = toIObject(iterated); // target
  18670. this._i = 0; // next index
  18671. this._k = kind; // kind
  18672. // 22.1.5.2.1 %ArrayIteratorPrototype%.next()
  18673. }, function () {
  18674. var O = this._t;
  18675. var kind = this._k;
  18676. var index = this._i++;
  18677. if (!O || index >= O.length) {
  18678. this._t = undefined;
  18679. return step(1);
  18680. }
  18681. if (kind == 'keys') return step(0, index);
  18682. if (kind == 'values') return step(0, O[index]);
  18683. return step(0, [index, O[index]]);
  18684. }, 'values');
  18685. // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
  18686. Iterators.Arguments = Iterators.Array;
  18687. addToUnscopables('keys');
  18688. addToUnscopables('values');
  18689. addToUnscopables('entries');
  18690. /***/ }),
  18691. /* 88 */
  18692. /***/ (function(module, exports) {
  18693. module.exports = function (done, value) {
  18694. return { value: value, done: !!done };
  18695. };
  18696. /***/ }),
  18697. /* 89 */
  18698. /***/ (function(module, exports, __webpack_require__) {
  18699. var ctx = __webpack_require__(19);
  18700. var invoke = __webpack_require__(74);
  18701. var html = __webpack_require__(71);
  18702. var cel = __webpack_require__(67);
  18703. var global = __webpack_require__(2);
  18704. var process = global.process;
  18705. var setTask = global.setImmediate;
  18706. var clearTask = global.clearImmediate;
  18707. var MessageChannel = global.MessageChannel;
  18708. var Dispatch = global.Dispatch;
  18709. var counter = 0;
  18710. var queue = {};
  18711. var ONREADYSTATECHANGE = 'onreadystatechange';
  18712. var defer, channel, port;
  18713. var run = function () {
  18714. var id = +this;
  18715. // eslint-disable-next-line no-prototype-builtins
  18716. if (queue.hasOwnProperty(id)) {
  18717. var fn = queue[id];
  18718. delete queue[id];
  18719. fn();
  18720. }
  18721. };
  18722. var listener = function (event) {
  18723. run.call(event.data);
  18724. };
  18725. // Node.js 0.9+ & IE10+ has setImmediate, otherwise:
  18726. if (!setTask || !clearTask) {
  18727. setTask = function setImmediate(fn) {
  18728. var args = [];
  18729. var i = 1;
  18730. while (arguments.length > i) args.push(arguments[i++]);
  18731. queue[++counter] = function () {
  18732. // eslint-disable-next-line no-new-func
  18733. invoke(typeof fn == 'function' ? fn : Function(fn), args);
  18734. };
  18735. defer(counter);
  18736. return counter;
  18737. };
  18738. clearTask = function clearImmediate(id) {
  18739. delete queue[id];
  18740. };
  18741. // Node.js 0.8-
  18742. if (__webpack_require__(20)(process) == 'process') {
  18743. defer = function (id) {
  18744. process.nextTick(ctx(run, id, 1));
  18745. };
  18746. // Sphere (JS game engine) Dispatch API
  18747. } else if (Dispatch && Dispatch.now) {
  18748. defer = function (id) {
  18749. Dispatch.now(ctx(run, id, 1));
  18750. };
  18751. // Browsers with MessageChannel, includes WebWorkers
  18752. } else if (MessageChannel) {
  18753. channel = new MessageChannel();
  18754. port = channel.port2;
  18755. channel.port1.onmessage = listener;
  18756. defer = ctx(port.postMessage, port, 1);
  18757. // Browsers with postMessage, skip WebWorkers
  18758. // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
  18759. } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) {
  18760. defer = function (id) {
  18761. global.postMessage(id + '', '*');
  18762. };
  18763. global.addEventListener('message', listener, false);
  18764. // IE8-
  18765. } else if (ONREADYSTATECHANGE in cel('script')) {
  18766. defer = function (id) {
  18767. html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () {
  18768. html.removeChild(this);
  18769. run.call(id);
  18770. };
  18771. };
  18772. // Rest old browsers
  18773. } else {
  18774. defer = function (id) {
  18775. setTimeout(ctx(run, id, 1), 0);
  18776. };
  18777. }
  18778. }
  18779. module.exports = {
  18780. set: setTask,
  18781. clear: clearTask
  18782. };
  18783. /***/ }),
  18784. /* 90 */
  18785. /***/ (function(module, exports, __webpack_require__) {
  18786. var global = __webpack_require__(2);
  18787. var macrotask = __webpack_require__(89).set;
  18788. var Observer = global.MutationObserver || global.WebKitMutationObserver;
  18789. var process = global.process;
  18790. var Promise = global.Promise;
  18791. var isNode = __webpack_require__(20)(process) == 'process';
  18792. module.exports = function () {
  18793. var head, last, notify;
  18794. var flush = function () {
  18795. var parent, fn;
  18796. if (isNode && (parent = process.domain)) parent.exit();
  18797. while (head) {
  18798. fn = head.fn;
  18799. head = head.next;
  18800. try {
  18801. fn();
  18802. } catch (e) {
  18803. if (head) notify();
  18804. else last = undefined;
  18805. throw e;
  18806. }
  18807. } last = undefined;
  18808. if (parent) parent.enter();
  18809. };
  18810. // Node.js
  18811. if (isNode) {
  18812. notify = function () {
  18813. process.nextTick(flush);
  18814. };
  18815. // browsers with MutationObserver, except iOS Safari - https://github.com/zloirock/core-js/issues/339
  18816. } else if (Observer && !(global.navigator && global.navigator.standalone)) {
  18817. var toggle = true;
  18818. var node = document.createTextNode('');
  18819. new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new
  18820. notify = function () {
  18821. node.data = toggle = !toggle;
  18822. };
  18823. // environments with maybe non-completely correct, but existent Promise
  18824. } else if (Promise && Promise.resolve) {
  18825. // Promise.resolve without an argument throws an error in LG WebOS 2
  18826. var promise = Promise.resolve(undefined);
  18827. notify = function () {
  18828. promise.then(flush);
  18829. };
  18830. // for other environments - macrotask based on:
  18831. // - setImmediate
  18832. // - MessageChannel
  18833. // - window.postMessag
  18834. // - onreadystatechange
  18835. // - setTimeout
  18836. } else {
  18837. notify = function () {
  18838. // strange IE + webpack dev server bug - use .call(global)
  18839. macrotask.call(global, flush);
  18840. };
  18841. }
  18842. return function (fn) {
  18843. var task = { fn: fn, next: undefined };
  18844. if (last) last.next = task;
  18845. if (!head) {
  18846. head = task;
  18847. notify();
  18848. } last = task;
  18849. };
  18850. };
  18851. /***/ }),
  18852. /* 91 */
  18853. /***/ (function(module, exports, __webpack_require__) {
  18854. "use strict";
  18855. // 25.4.1.5 NewPromiseCapability(C)
  18856. var aFunction = __webpack_require__(10);
  18857. function PromiseCapability(C) {
  18858. var resolve, reject;
  18859. this.promise = new C(function ($$resolve, $$reject) {
  18860. if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');
  18861. resolve = $$resolve;
  18862. reject = $$reject;
  18863. });
  18864. this.resolve = aFunction(resolve);
  18865. this.reject = aFunction(reject);
  18866. }
  18867. module.exports.f = function (C) {
  18868. return new PromiseCapability(C);
  18869. };
  18870. /***/ }),
  18871. /* 92 */
  18872. /***/ (function(module, exports, __webpack_require__) {
  18873. // all object keys, includes non-enumerable and symbols
  18874. var gOPN = __webpack_require__(38);
  18875. var gOPS = __webpack_require__(52);
  18876. var anObject = __webpack_require__(1);
  18877. var Reflect = __webpack_require__(2).Reflect;
  18878. module.exports = Reflect && Reflect.ownKeys || function ownKeys(it) {
  18879. var keys = gOPN.f(anObject(it));
  18880. var getSymbols = gOPS.f;
  18881. return getSymbols ? keys.concat(getSymbols(it)) : keys;
  18882. };
  18883. /***/ }),
  18884. /* 93 */
  18885. /***/ (function(module, exports, __webpack_require__) {
  18886. "use strict";
  18887. var global = __webpack_require__(2);
  18888. var DESCRIPTORS = __webpack_require__(7);
  18889. var LIBRARY = __webpack_require__(33);
  18890. var $typed = __webpack_require__(63);
  18891. var hide = __webpack_require__(14);
  18892. var redefineAll = __webpack_require__(43);
  18893. var fails = __webpack_require__(4);
  18894. var anInstance = __webpack_require__(42);
  18895. var toInteger = __webpack_require__(24);
  18896. var toLength = __webpack_require__(8);
  18897. var toIndex = __webpack_require__(118);
  18898. var gOPN = __webpack_require__(38).f;
  18899. var dP = __webpack_require__(6).f;
  18900. var arrayFill = __webpack_require__(86);
  18901. var setToStringTag = __webpack_require__(44);
  18902. var ARRAY_BUFFER = 'ArrayBuffer';
  18903. var DATA_VIEW = 'DataView';
  18904. var PROTOTYPE = 'prototype';
  18905. var WRONG_LENGTH = 'Wrong length!';
  18906. var WRONG_INDEX = 'Wrong index!';
  18907. var $ArrayBuffer = global[ARRAY_BUFFER];
  18908. var $DataView = global[DATA_VIEW];
  18909. var Math = global.Math;
  18910. var RangeError = global.RangeError;
  18911. // eslint-disable-next-line no-shadow-restricted-names
  18912. var Infinity = global.Infinity;
  18913. var BaseBuffer = $ArrayBuffer;
  18914. var abs = Math.abs;
  18915. var pow = Math.pow;
  18916. var floor = Math.floor;
  18917. var log = Math.log;
  18918. var LN2 = Math.LN2;
  18919. var BUFFER = 'buffer';
  18920. var BYTE_LENGTH = 'byteLength';
  18921. var BYTE_OFFSET = 'byteOffset';
  18922. var $BUFFER = DESCRIPTORS ? '_b' : BUFFER;
  18923. var $LENGTH = DESCRIPTORS ? '_l' : BYTE_LENGTH;
  18924. var $OFFSET = DESCRIPTORS ? '_o' : BYTE_OFFSET;
  18925. // IEEE754 conversions based on https://github.com/feross/ieee754
  18926. function packIEEE754(value, mLen, nBytes) {
  18927. var buffer = new Array(nBytes);
  18928. var eLen = nBytes * 8 - mLen - 1;
  18929. var eMax = (1 << eLen) - 1;
  18930. var eBias = eMax >> 1;
  18931. var rt = mLen === 23 ? pow(2, -24) - pow(2, -77) : 0;
  18932. var i = 0;
  18933. var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;
  18934. var e, m, c;
  18935. value = abs(value);
  18936. // eslint-disable-next-line no-self-compare
  18937. if (value != value || value === Infinity) {
  18938. // eslint-disable-next-line no-self-compare
  18939. m = value != value ? 1 : 0;
  18940. e = eMax;
  18941. } else {
  18942. e = floor(log(value) / LN2);
  18943. if (value * (c = pow(2, -e)) < 1) {
  18944. e--;
  18945. c *= 2;
  18946. }
  18947. if (e + eBias >= 1) {
  18948. value += rt / c;
  18949. } else {
  18950. value += rt * pow(2, 1 - eBias);
  18951. }
  18952. if (value * c >= 2) {
  18953. e++;
  18954. c /= 2;
  18955. }
  18956. if (e + eBias >= eMax) {
  18957. m = 0;
  18958. e = eMax;
  18959. } else if (e + eBias >= 1) {
  18960. m = (value * c - 1) * pow(2, mLen);
  18961. e = e + eBias;
  18962. } else {
  18963. m = value * pow(2, eBias - 1) * pow(2, mLen);
  18964. e = 0;
  18965. }
  18966. }
  18967. for (; mLen >= 8; buffer[i++] = m & 255, m /= 256, mLen -= 8);
  18968. e = e << mLen | m;
  18969. eLen += mLen;
  18970. for (; eLen > 0; buffer[i++] = e & 255, e /= 256, eLen -= 8);
  18971. buffer[--i] |= s * 128;
  18972. return buffer;
  18973. }
  18974. function unpackIEEE754(buffer, mLen, nBytes) {
  18975. var eLen = nBytes * 8 - mLen - 1;
  18976. var eMax = (1 << eLen) - 1;
  18977. var eBias = eMax >> 1;
  18978. var nBits = eLen - 7;
  18979. var i = nBytes - 1;
  18980. var s = buffer[i--];
  18981. var e = s & 127;
  18982. var m;
  18983. s >>= 7;
  18984. for (; nBits > 0; e = e * 256 + buffer[i], i--, nBits -= 8);
  18985. m = e & (1 << -nBits) - 1;
  18986. e >>= -nBits;
  18987. nBits += mLen;
  18988. for (; nBits > 0; m = m * 256 + buffer[i], i--, nBits -= 8);
  18989. if (e === 0) {
  18990. e = 1 - eBias;
  18991. } else if (e === eMax) {
  18992. return m ? NaN : s ? -Infinity : Infinity;
  18993. } else {
  18994. m = m + pow(2, mLen);
  18995. e = e - eBias;
  18996. } return (s ? -1 : 1) * m * pow(2, e - mLen);
  18997. }
  18998. function unpackI32(bytes) {
  18999. return bytes[3] << 24 | bytes[2] << 16 | bytes[1] << 8 | bytes[0];
  19000. }
  19001. function packI8(it) {
  19002. return [it & 0xff];
  19003. }
  19004. function packI16(it) {
  19005. return [it & 0xff, it >> 8 & 0xff];
  19006. }
  19007. function packI32(it) {
  19008. return [it & 0xff, it >> 8 & 0xff, it >> 16 & 0xff, it >> 24 & 0xff];
  19009. }
  19010. function packF64(it) {
  19011. return packIEEE754(it, 52, 8);
  19012. }
  19013. function packF32(it) {
  19014. return packIEEE754(it, 23, 4);
  19015. }
  19016. function addGetter(C, key, internal) {
  19017. dP(C[PROTOTYPE], key, { get: function () { return this[internal]; } });
  19018. }
  19019. function get(view, bytes, index, isLittleEndian) {
  19020. var numIndex = +index;
  19021. var intIndex = toIndex(numIndex);
  19022. if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX);
  19023. var store = view[$BUFFER]._b;
  19024. var start = intIndex + view[$OFFSET];
  19025. var pack = store.slice(start, start + bytes);
  19026. return isLittleEndian ? pack : pack.reverse();
  19027. }
  19028. function set(view, bytes, index, conversion, value, isLittleEndian) {
  19029. var numIndex = +index;
  19030. var intIndex = toIndex(numIndex);
  19031. if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX);
  19032. var store = view[$BUFFER]._b;
  19033. var start = intIndex + view[$OFFSET];
  19034. var pack = conversion(+value);
  19035. for (var i = 0; i < bytes; i++) store[start + i] = pack[isLittleEndian ? i : bytes - i - 1];
  19036. }
  19037. if (!$typed.ABV) {
  19038. $ArrayBuffer = function ArrayBuffer(length) {
  19039. anInstance(this, $ArrayBuffer, ARRAY_BUFFER);
  19040. var byteLength = toIndex(length);
  19041. this._b = arrayFill.call(new Array(byteLength), 0);
  19042. this[$LENGTH] = byteLength;
  19043. };
  19044. $DataView = function DataView(buffer, byteOffset, byteLength) {
  19045. anInstance(this, $DataView, DATA_VIEW);
  19046. anInstance(buffer, $ArrayBuffer, DATA_VIEW);
  19047. var bufferLength = buffer[$LENGTH];
  19048. var offset = toInteger(byteOffset);
  19049. if (offset < 0 || offset > bufferLength) throw RangeError('Wrong offset!');
  19050. byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength);
  19051. if (offset + byteLength > bufferLength) throw RangeError(WRONG_LENGTH);
  19052. this[$BUFFER] = buffer;
  19053. this[$OFFSET] = offset;
  19054. this[$LENGTH] = byteLength;
  19055. };
  19056. if (DESCRIPTORS) {
  19057. addGetter($ArrayBuffer, BYTE_LENGTH, '_l');
  19058. addGetter($DataView, BUFFER, '_b');
  19059. addGetter($DataView, BYTE_LENGTH, '_l');
  19060. addGetter($DataView, BYTE_OFFSET, '_o');
  19061. }
  19062. redefineAll($DataView[PROTOTYPE], {
  19063. getInt8: function getInt8(byteOffset) {
  19064. return get(this, 1, byteOffset)[0] << 24 >> 24;
  19065. },
  19066. getUint8: function getUint8(byteOffset) {
  19067. return get(this, 1, byteOffset)[0];
  19068. },
  19069. getInt16: function getInt16(byteOffset /* , littleEndian */) {
  19070. var bytes = get(this, 2, byteOffset, arguments[1]);
  19071. return (bytes[1] << 8 | bytes[0]) << 16 >> 16;
  19072. },
  19073. getUint16: function getUint16(byteOffset /* , littleEndian */) {
  19074. var bytes = get(this, 2, byteOffset, arguments[1]);
  19075. return bytes[1] << 8 | bytes[0];
  19076. },
  19077. getInt32: function getInt32(byteOffset /* , littleEndian */) {
  19078. return unpackI32(get(this, 4, byteOffset, arguments[1]));
  19079. },
  19080. getUint32: function getUint32(byteOffset /* , littleEndian */) {
  19081. return unpackI32(get(this, 4, byteOffset, arguments[1])) >>> 0;
  19082. },
  19083. getFloat32: function getFloat32(byteOffset /* , littleEndian */) {
  19084. return unpackIEEE754(get(this, 4, byteOffset, arguments[1]), 23, 4);
  19085. },
  19086. getFloat64: function getFloat64(byteOffset /* , littleEndian */) {
  19087. return unpackIEEE754(get(this, 8, byteOffset, arguments[1]), 52, 8);
  19088. },
  19089. setInt8: function setInt8(byteOffset, value) {
  19090. set(this, 1, byteOffset, packI8, value);
  19091. },
  19092. setUint8: function setUint8(byteOffset, value) {
  19093. set(this, 1, byteOffset, packI8, value);
  19094. },
  19095. setInt16: function setInt16(byteOffset, value /* , littleEndian */) {
  19096. set(this, 2, byteOffset, packI16, value, arguments[2]);
  19097. },
  19098. setUint16: function setUint16(byteOffset, value /* , littleEndian */) {
  19099. set(this, 2, byteOffset, packI16, value, arguments[2]);
  19100. },
  19101. setInt32: function setInt32(byteOffset, value /* , littleEndian */) {
  19102. set(this, 4, byteOffset, packI32, value, arguments[2]);
  19103. },
  19104. setUint32: function setUint32(byteOffset, value /* , littleEndian */) {
  19105. set(this, 4, byteOffset, packI32, value, arguments[2]);
  19106. },
  19107. setFloat32: function setFloat32(byteOffset, value /* , littleEndian */) {
  19108. set(this, 4, byteOffset, packF32, value, arguments[2]);
  19109. },
  19110. setFloat64: function setFloat64(byteOffset, value /* , littleEndian */) {
  19111. set(this, 8, byteOffset, packF64, value, arguments[2]);
  19112. }
  19113. });
  19114. } else {
  19115. if (!fails(function () {
  19116. $ArrayBuffer(1);
  19117. }) || !fails(function () {
  19118. new $ArrayBuffer(-1); // eslint-disable-line no-new
  19119. }) || fails(function () {
  19120. new $ArrayBuffer(); // eslint-disable-line no-new
  19121. new $ArrayBuffer(1.5); // eslint-disable-line no-new
  19122. new $ArrayBuffer(NaN); // eslint-disable-line no-new
  19123. return $ArrayBuffer.name != ARRAY_BUFFER;
  19124. })) {
  19125. $ArrayBuffer = function ArrayBuffer(length) {
  19126. anInstance(this, $ArrayBuffer);
  19127. return new BaseBuffer(toIndex(length));
  19128. };
  19129. var ArrayBufferProto = $ArrayBuffer[PROTOTYPE] = BaseBuffer[PROTOTYPE];
  19130. for (var keys = gOPN(BaseBuffer), j = 0, key; keys.length > j;) {
  19131. if (!((key = keys[j++]) in $ArrayBuffer)) hide($ArrayBuffer, key, BaseBuffer[key]);
  19132. }
  19133. if (!LIBRARY) ArrayBufferProto.constructor = $ArrayBuffer;
  19134. }
  19135. // iOS Safari 7.x bug
  19136. var view = new $DataView(new $ArrayBuffer(2));
  19137. var $setInt8 = $DataView[PROTOTYPE].setInt8;
  19138. view.setInt8(0, 2147483648);
  19139. view.setInt8(1, 2147483649);
  19140. if (view.getInt8(0) || !view.getInt8(1)) redefineAll($DataView[PROTOTYPE], {
  19141. setInt8: function setInt8(byteOffset, value) {
  19142. $setInt8.call(this, byteOffset, value << 24 >> 24);
  19143. },
  19144. setUint8: function setUint8(byteOffset, value) {
  19145. $setInt8.call(this, byteOffset, value << 24 >> 24);
  19146. }
  19147. }, true);
  19148. }
  19149. setToStringTag($ArrayBuffer, ARRAY_BUFFER);
  19150. setToStringTag($DataView, DATA_VIEW);
  19151. hide($DataView[PROTOTYPE], $typed.VIEW, true);
  19152. exports[ARRAY_BUFFER] = $ArrayBuffer;
  19153. exports[DATA_VIEW] = $DataView;
  19154. /***/ }),
  19155. /* 94 */
  19156. /***/ (function(module, exports) {
  19157. module.exports = function (regExp, replace) {
  19158. var replacer = replace === Object(replace) ? function (part) {
  19159. return replace[part];
  19160. } : replace;
  19161. return function (it) {
  19162. return String(it).replace(regExp, replacer);
  19163. };
  19164. };
  19165. /***/ }),
  19166. /* 95 */
  19167. /***/ (function(module, exports, __webpack_require__) {
  19168. module.exports = !__webpack_require__(7) && !__webpack_require__(4)(function () {
  19169. return Object.defineProperty(__webpack_require__(67)('div'), 'a', { get: function () { return 7; } }).a != 7;
  19170. });
  19171. /***/ }),
  19172. /* 96 */
  19173. /***/ (function(module, exports, __webpack_require__) {
  19174. exports.f = __webpack_require__(5);
  19175. /***/ }),
  19176. /* 97 */
  19177. /***/ (function(module, exports, __webpack_require__) {
  19178. var has = __webpack_require__(12);
  19179. var toIObject = __webpack_require__(11);
  19180. var arrayIndexOf = __webpack_require__(51)(false);
  19181. var IE_PROTO = __webpack_require__(69)('IE_PROTO');
  19182. module.exports = function (object, names) {
  19183. var O = toIObject(object);
  19184. var i = 0;
  19185. var result = [];
  19186. var key;
  19187. for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);
  19188. // Don't enum bug & hidden keys
  19189. while (names.length > i) if (has(O, key = names[i++])) {
  19190. ~arrayIndexOf(result, key) || result.push(key);
  19191. }
  19192. return result;
  19193. };
  19194. /***/ }),
  19195. /* 98 */
  19196. /***/ (function(module, exports, __webpack_require__) {
  19197. var dP = __webpack_require__(6);
  19198. var anObject = __webpack_require__(1);
  19199. var getKeys = __webpack_require__(27);
  19200. module.exports = __webpack_require__(7) ? Object.defineProperties : function defineProperties(O, Properties) {
  19201. anObject(O);
  19202. var keys = getKeys(Properties);
  19203. var length = keys.length;
  19204. var i = 0;
  19205. var P;
  19206. while (length > i) dP.f(O, P = keys[i++], Properties[P]);
  19207. return O;
  19208. };
  19209. /***/ }),
  19210. /* 99 */
  19211. /***/ (function(module, exports, __webpack_require__) {
  19212. // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
  19213. var toIObject = __webpack_require__(11);
  19214. var gOPN = __webpack_require__(38).f;
  19215. var toString = {}.toString;
  19216. var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
  19217. ? Object.getOwnPropertyNames(window) : [];
  19218. var getWindowNames = function (it) {
  19219. try {
  19220. return gOPN(it);
  19221. } catch (e) {
  19222. return windowNames.slice();
  19223. }
  19224. };
  19225. module.exports.f = function getOwnPropertyNames(it) {
  19226. return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));
  19227. };
  19228. /***/ }),
  19229. /* 100 */
  19230. /***/ (function(module, exports, __webpack_require__) {
  19231. "use strict";
  19232. var aFunction = __webpack_require__(10);
  19233. var isObject = __webpack_require__(3);
  19234. var invoke = __webpack_require__(74);
  19235. var arraySlice = [].slice;
  19236. var factories = {};
  19237. var construct = function (F, len, args) {
  19238. if (!(len in factories)) {
  19239. for (var n = [], i = 0; i < len; i++) n[i] = 'a[' + i + ']';
  19240. // eslint-disable-next-line no-new-func
  19241. factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')');
  19242. } return factories[len](F, args);
  19243. };
  19244. module.exports = Function.bind || function bind(that /* , ...args */) {
  19245. var fn = aFunction(this);
  19246. var partArgs = arraySlice.call(arguments, 1);
  19247. var bound = function (/* args... */) {
  19248. var args = partArgs.concat(arraySlice.call(arguments));
  19249. return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that);
  19250. };
  19251. if (isObject(fn.prototype)) bound.prototype = fn.prototype;
  19252. return bound;
  19253. };
  19254. /***/ }),
  19255. /* 101 */
  19256. /***/ (function(module, exports, __webpack_require__) {
  19257. var cof = __webpack_require__(20);
  19258. module.exports = function (it, msg) {
  19259. if (typeof it != 'number' && cof(it) != 'Number') throw TypeError(msg);
  19260. return +it;
  19261. };
  19262. /***/ }),
  19263. /* 102 */
  19264. /***/ (function(module, exports, __webpack_require__) {
  19265. // 20.1.2.3 Number.isInteger(number)
  19266. var isObject = __webpack_require__(3);
  19267. var floor = Math.floor;
  19268. module.exports = function isInteger(it) {
  19269. return !isObject(it) && isFinite(it) && floor(it) === it;
  19270. };
  19271. /***/ }),
  19272. /* 103 */
  19273. /***/ (function(module, exports, __webpack_require__) {
  19274. var $parseFloat = __webpack_require__(2).parseFloat;
  19275. var $trim = __webpack_require__(45).trim;
  19276. module.exports = 1 / $parseFloat(__webpack_require__(76) + '-0') !== -Infinity ? function parseFloat(str) {
  19277. var string = $trim(String(str), 3);
  19278. var result = $parseFloat(string);
  19279. return result === 0 && string.charAt(0) == '-' ? -0 : result;
  19280. } : $parseFloat;
  19281. /***/ }),
  19282. /* 104 */
  19283. /***/ (function(module, exports, __webpack_require__) {
  19284. var $parseInt = __webpack_require__(2).parseInt;
  19285. var $trim = __webpack_require__(45).trim;
  19286. var ws = __webpack_require__(76);
  19287. var hex = /^[-+]?0[xX]/;
  19288. module.exports = $parseInt(ws + '08') !== 8 || $parseInt(ws + '0x16') !== 22 ? function parseInt(str, radix) {
  19289. var string = $trim(String(str), 3);
  19290. return $parseInt(string, (radix >>> 0) || (hex.test(string) ? 16 : 10));
  19291. } : $parseInt;
  19292. /***/ }),
  19293. /* 105 */
  19294. /***/ (function(module, exports) {
  19295. // 20.2.2.20 Math.log1p(x)
  19296. module.exports = Math.log1p || function log1p(x) {
  19297. return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : Math.log(1 + x);
  19298. };
  19299. /***/ }),
  19300. /* 106 */
  19301. /***/ (function(module, exports, __webpack_require__) {
  19302. // 20.2.2.16 Math.fround(x)
  19303. var sign = __webpack_require__(78);
  19304. var pow = Math.pow;
  19305. var EPSILON = pow(2, -52);
  19306. var EPSILON32 = pow(2, -23);
  19307. var MAX32 = pow(2, 127) * (2 - EPSILON32);
  19308. var MIN32 = pow(2, -126);
  19309. var roundTiesToEven = function (n) {
  19310. return n + 1 / EPSILON - 1 / EPSILON;
  19311. };
  19312. module.exports = Math.fround || function fround(x) {
  19313. var $abs = Math.abs(x);
  19314. var $sign = sign(x);
  19315. var a, result;
  19316. if ($abs < MIN32) return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32;
  19317. a = (1 + EPSILON32 / EPSILON) * $abs;
  19318. result = a - (a - $abs);
  19319. // eslint-disable-next-line no-self-compare
  19320. if (result > MAX32 || result != result) return $sign * Infinity;
  19321. return $sign * result;
  19322. };
  19323. /***/ }),
  19324. /* 107 */
  19325. /***/ (function(module, exports, __webpack_require__) {
  19326. // call something on iterator step with safe closing on error
  19327. var anObject = __webpack_require__(1);
  19328. module.exports = function (iterator, fn, value, entries) {
  19329. try {
  19330. return entries ? fn(anObject(value)[0], value[1]) : fn(value);
  19331. // 7.4.6 IteratorClose(iterator, completion)
  19332. } catch (e) {
  19333. var ret = iterator['return'];
  19334. if (ret !== undefined) anObject(ret.call(iterator));
  19335. throw e;
  19336. }
  19337. };
  19338. /***/ }),
  19339. /* 108 */
  19340. /***/ (function(module, exports, __webpack_require__) {
  19341. var aFunction = __webpack_require__(10);
  19342. var toObject = __webpack_require__(9);
  19343. var IObject = __webpack_require__(47);
  19344. var toLength = __webpack_require__(8);
  19345. module.exports = function (that, callbackfn, aLen, memo, isRight) {
  19346. aFunction(callbackfn);
  19347. var O = toObject(that);
  19348. var self = IObject(O);
  19349. var length = toLength(O.length);
  19350. var index = isRight ? length - 1 : 0;
  19351. var i = isRight ? -1 : 1;
  19352. if (aLen < 2) for (;;) {
  19353. if (index in self) {
  19354. memo = self[index];
  19355. index += i;
  19356. break;
  19357. }
  19358. index += i;
  19359. if (isRight ? index < 0 : length <= index) {
  19360. throw TypeError('Reduce of empty array with no initial value');
  19361. }
  19362. }
  19363. for (;isRight ? index >= 0 : length > index; index += i) if (index in self) {
  19364. memo = callbackfn(memo, self[index], index, O);
  19365. }
  19366. return memo;
  19367. };
  19368. /***/ }),
  19369. /* 109 */
  19370. /***/ (function(module, exports, __webpack_require__) {
  19371. "use strict";
  19372. // 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length)
  19373. var toObject = __webpack_require__(9);
  19374. var toAbsoluteIndex = __webpack_require__(37);
  19375. var toLength = __webpack_require__(8);
  19376. module.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) {
  19377. var O = toObject(this);
  19378. var len = toLength(O.length);
  19379. var to = toAbsoluteIndex(target, len);
  19380. var from = toAbsoluteIndex(start, len);
  19381. var end = arguments.length > 2 ? arguments[2] : undefined;
  19382. var count = Math.min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to);
  19383. var inc = 1;
  19384. if (from < to && to < from + count) {
  19385. inc = -1;
  19386. from += count - 1;
  19387. to += count - 1;
  19388. }
  19389. while (count-- > 0) {
  19390. if (from in O) O[to] = O[from];
  19391. else delete O[to];
  19392. to += inc;
  19393. from += inc;
  19394. } return O;
  19395. };
  19396. /***/ }),
  19397. /* 110 */
  19398. /***/ (function(module, exports, __webpack_require__) {
  19399. // 21.2.5.3 get RegExp.prototype.flags()
  19400. if (__webpack_require__(7) && /./g.flags != 'g') __webpack_require__(6).f(RegExp.prototype, 'flags', {
  19401. configurable: true,
  19402. get: __webpack_require__(58)
  19403. });
  19404. /***/ }),
  19405. /* 111 */
  19406. /***/ (function(module, exports) {
  19407. module.exports = function (exec) {
  19408. try {
  19409. return { e: false, v: exec() };
  19410. } catch (e) {
  19411. return { e: true, v: e };
  19412. }
  19413. };
  19414. /***/ }),
  19415. /* 112 */
  19416. /***/ (function(module, exports, __webpack_require__) {
  19417. var anObject = __webpack_require__(1);
  19418. var isObject = __webpack_require__(3);
  19419. var newPromiseCapability = __webpack_require__(91);
  19420. module.exports = function (C, x) {
  19421. anObject(C);
  19422. if (isObject(x) && x.constructor === C) return x;
  19423. var promiseCapability = newPromiseCapability.f(C);
  19424. var resolve = promiseCapability.resolve;
  19425. resolve(x);
  19426. return promiseCapability.promise;
  19427. };
  19428. /***/ }),
  19429. /* 113 */
  19430. /***/ (function(module, exports, __webpack_require__) {
  19431. "use strict";
  19432. var strong = __webpack_require__(114);
  19433. var validate = __webpack_require__(46);
  19434. var MAP = 'Map';
  19435. // 23.1 Map Objects
  19436. module.exports = __webpack_require__(62)(MAP, function (get) {
  19437. return function Map() { return get(this, arguments.length > 0 ? arguments[0] : undefined); };
  19438. }, {
  19439. // 23.1.3.6 Map.prototype.get(key)
  19440. get: function get(key) {
  19441. var entry = strong.getEntry(validate(this, MAP), key);
  19442. return entry && entry.v;
  19443. },
  19444. // 23.1.3.9 Map.prototype.set(key, value)
  19445. set: function set(key, value) {
  19446. return strong.def(validate(this, MAP), key === 0 ? 0 : key, value);
  19447. }
  19448. }, strong, true);
  19449. /***/ }),
  19450. /* 114 */
  19451. /***/ (function(module, exports, __webpack_require__) {
  19452. "use strict";
  19453. var dP = __webpack_require__(6).f;
  19454. var create = __webpack_require__(28);
  19455. var redefineAll = __webpack_require__(43);
  19456. var ctx = __webpack_require__(19);
  19457. var anInstance = __webpack_require__(42);
  19458. var forOf = __webpack_require__(35);
  19459. var $iterDefine = __webpack_require__(55);
  19460. var step = __webpack_require__(88);
  19461. var setSpecies = __webpack_require__(41);
  19462. var DESCRIPTORS = __webpack_require__(7);
  19463. var fastKey = __webpack_require__(32).fastKey;
  19464. var validate = __webpack_require__(46);
  19465. var SIZE = DESCRIPTORS ? '_s' : 'size';
  19466. var getEntry = function (that, key) {
  19467. // fast case
  19468. var index = fastKey(key);
  19469. var entry;
  19470. if (index !== 'F') return that._i[index];
  19471. // frozen object case
  19472. for (entry = that._f; entry; entry = entry.n) {
  19473. if (entry.k == key) return entry;
  19474. }
  19475. };
  19476. module.exports = {
  19477. getConstructor: function (wrapper, NAME, IS_MAP, ADDER) {
  19478. var C = wrapper(function (that, iterable) {
  19479. anInstance(that, C, NAME, '_i');
  19480. that._t = NAME; // collection type
  19481. that._i = create(null); // index
  19482. that._f = undefined; // first entry
  19483. that._l = undefined; // last entry
  19484. that[SIZE] = 0; // size
  19485. if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);
  19486. });
  19487. redefineAll(C.prototype, {
  19488. // 23.1.3.1 Map.prototype.clear()
  19489. // 23.2.3.2 Set.prototype.clear()
  19490. clear: function clear() {
  19491. for (var that = validate(this, NAME), data = that._i, entry = that._f; entry; entry = entry.n) {
  19492. entry.r = true;
  19493. if (entry.p) entry.p = entry.p.n = undefined;
  19494. delete data[entry.i];
  19495. }
  19496. that._f = that._l = undefined;
  19497. that[SIZE] = 0;
  19498. },
  19499. // 23.1.3.3 Map.prototype.delete(key)
  19500. // 23.2.3.4 Set.prototype.delete(value)
  19501. 'delete': function (key) {
  19502. var that = validate(this, NAME);
  19503. var entry = getEntry(that, key);
  19504. if (entry) {
  19505. var next = entry.n;
  19506. var prev = entry.p;
  19507. delete that._i[entry.i];
  19508. entry.r = true;
  19509. if (prev) prev.n = next;
  19510. if (next) next.p = prev;
  19511. if (that._f == entry) that._f = next;
  19512. if (that._l == entry) that._l = prev;
  19513. that[SIZE]--;
  19514. } return !!entry;
  19515. },
  19516. // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined)
  19517. // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined)
  19518. forEach: function forEach(callbackfn /* , that = undefined */) {
  19519. validate(this, NAME);
  19520. var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);
  19521. var entry;
  19522. while (entry = entry ? entry.n : this._f) {
  19523. f(entry.v, entry.k, this);
  19524. // revert to the last existing entry
  19525. while (entry && entry.r) entry = entry.p;
  19526. }
  19527. },
  19528. // 23.1.3.7 Map.prototype.has(key)
  19529. // 23.2.3.7 Set.prototype.has(value)
  19530. has: function has(key) {
  19531. return !!getEntry(validate(this, NAME), key);
  19532. }
  19533. });
  19534. if (DESCRIPTORS) dP(C.prototype, 'size', {
  19535. get: function () {
  19536. return validate(this, NAME)[SIZE];
  19537. }
  19538. });
  19539. return C;
  19540. },
  19541. def: function (that, key, value) {
  19542. var entry = getEntry(that, key);
  19543. var prev, index;
  19544. // change existing entry
  19545. if (entry) {
  19546. entry.v = value;
  19547. // create new entry
  19548. } else {
  19549. that._l = entry = {
  19550. i: index = fastKey(key, true), // <- index
  19551. k: key, // <- key
  19552. v: value, // <- value
  19553. p: prev = that._l, // <- previous entry
  19554. n: undefined, // <- next entry
  19555. r: false // <- removed
  19556. };
  19557. if (!that._f) that._f = entry;
  19558. if (prev) prev.n = entry;
  19559. that[SIZE]++;
  19560. // add to index
  19561. if (index !== 'F') that._i[index] = entry;
  19562. } return that;
  19563. },
  19564. getEntry: getEntry,
  19565. setStrong: function (C, NAME, IS_MAP) {
  19566. // add .keys, .values, .entries, [@@iterator]
  19567. // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11
  19568. $iterDefine(C, NAME, function (iterated, kind) {
  19569. this._t = validate(iterated, NAME); // target
  19570. this._k = kind; // kind
  19571. this._l = undefined; // previous
  19572. }, function () {
  19573. var that = this;
  19574. var kind = that._k;
  19575. var entry = that._l;
  19576. // revert to the last existing entry
  19577. while (entry && entry.r) entry = entry.p;
  19578. // get next entry
  19579. if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) {
  19580. // or finish the iteration
  19581. that._t = undefined;
  19582. return step(1);
  19583. }
  19584. // return step by kind
  19585. if (kind == 'keys') return step(0, entry.k);
  19586. if (kind == 'values') return step(0, entry.v);
  19587. return step(0, [entry.k, entry.v]);
  19588. }, IS_MAP ? 'entries' : 'values', !IS_MAP, true);
  19589. // add [@@species], 23.1.2.2, 23.2.2.2
  19590. setSpecies(NAME);
  19591. }
  19592. };
  19593. /***/ }),
  19594. /* 115 */
  19595. /***/ (function(module, exports, __webpack_require__) {
  19596. "use strict";
  19597. var strong = __webpack_require__(114);
  19598. var validate = __webpack_require__(46);
  19599. var SET = 'Set';
  19600. // 23.2 Set Objects
  19601. module.exports = __webpack_require__(62)(SET, function (get) {
  19602. return function Set() { return get(this, arguments.length > 0 ? arguments[0] : undefined); };
  19603. }, {
  19604. // 23.2.3.1 Set.prototype.add(value)
  19605. add: function add(value) {
  19606. return strong.def(validate(this, SET), value = value === 0 ? 0 : value, value);
  19607. }
  19608. }, strong);
  19609. /***/ }),
  19610. /* 116 */
  19611. /***/ (function(module, exports, __webpack_require__) {
  19612. "use strict";
  19613. var each = __webpack_require__(26)(0);
  19614. var redefine = __webpack_require__(15);
  19615. var meta = __webpack_require__(32);
  19616. var assign = __webpack_require__(72);
  19617. var weak = __webpack_require__(117);
  19618. var isObject = __webpack_require__(3);
  19619. var fails = __webpack_require__(4);
  19620. var validate = __webpack_require__(46);
  19621. var WEAK_MAP = 'WeakMap';
  19622. var getWeak = meta.getWeak;
  19623. var isExtensible = Object.isExtensible;
  19624. var uncaughtFrozenStore = weak.ufstore;
  19625. var tmp = {};
  19626. var InternalMap;
  19627. var wrapper = function (get) {
  19628. return function WeakMap() {
  19629. return get(this, arguments.length > 0 ? arguments[0] : undefined);
  19630. };
  19631. };
  19632. var methods = {
  19633. // 23.3.3.3 WeakMap.prototype.get(key)
  19634. get: function get(key) {
  19635. if (isObject(key)) {
  19636. var data = getWeak(key);
  19637. if (data === true) return uncaughtFrozenStore(validate(this, WEAK_MAP)).get(key);
  19638. return data ? data[this._i] : undefined;
  19639. }
  19640. },
  19641. // 23.3.3.5 WeakMap.prototype.set(key, value)
  19642. set: function set(key, value) {
  19643. return weak.def(validate(this, WEAK_MAP), key, value);
  19644. }
  19645. };
  19646. // 23.3 WeakMap Objects
  19647. var $WeakMap = module.exports = __webpack_require__(62)(WEAK_MAP, wrapper, methods, weak, true, true);
  19648. // IE11 WeakMap frozen keys fix
  19649. if (fails(function () { return new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7; })) {
  19650. InternalMap = weak.getConstructor(wrapper, WEAK_MAP);
  19651. assign(InternalMap.prototype, methods);
  19652. meta.NEED = true;
  19653. each(['delete', 'has', 'get', 'set'], function (key) {
  19654. var proto = $WeakMap.prototype;
  19655. var method = proto[key];
  19656. redefine(proto, key, function (a, b) {
  19657. // store frozen objects on internal weakmap shim
  19658. if (isObject(a) && !isExtensible(a)) {
  19659. if (!this._f) this._f = new InternalMap();
  19660. var result = this._f[key](a, b);
  19661. return key == 'set' ? this : result;
  19662. // store all the rest on native weakmap
  19663. } return method.call(this, a, b);
  19664. });
  19665. });
  19666. }
  19667. /***/ }),
  19668. /* 117 */
  19669. /***/ (function(module, exports, __webpack_require__) {
  19670. "use strict";
  19671. var redefineAll = __webpack_require__(43);
  19672. var getWeak = __webpack_require__(32).getWeak;
  19673. var anObject = __webpack_require__(1);
  19674. var isObject = __webpack_require__(3);
  19675. var anInstance = __webpack_require__(42);
  19676. var forOf = __webpack_require__(35);
  19677. var createArrayMethod = __webpack_require__(26);
  19678. var $has = __webpack_require__(12);
  19679. var validate = __webpack_require__(46);
  19680. var arrayFind = createArrayMethod(5);
  19681. var arrayFindIndex = createArrayMethod(6);
  19682. var id = 0;
  19683. // fallback for uncaught frozen keys
  19684. var uncaughtFrozenStore = function (that) {
  19685. return that._l || (that._l = new UncaughtFrozenStore());
  19686. };
  19687. var UncaughtFrozenStore = function () {
  19688. this.a = [];
  19689. };
  19690. var findUncaughtFrozen = function (store, key) {
  19691. return arrayFind(store.a, function (it) {
  19692. return it[0] === key;
  19693. });
  19694. };
  19695. UncaughtFrozenStore.prototype = {
  19696. get: function (key) {
  19697. var entry = findUncaughtFrozen(this, key);
  19698. if (entry) return entry[1];
  19699. },
  19700. has: function (key) {
  19701. return !!findUncaughtFrozen(this, key);
  19702. },
  19703. set: function (key, value) {
  19704. var entry = findUncaughtFrozen(this, key);
  19705. if (entry) entry[1] = value;
  19706. else this.a.push([key, value]);
  19707. },
  19708. 'delete': function (key) {
  19709. var index = arrayFindIndex(this.a, function (it) {
  19710. return it[0] === key;
  19711. });
  19712. if (~index) this.a.splice(index, 1);
  19713. return !!~index;
  19714. }
  19715. };
  19716. module.exports = {
  19717. getConstructor: function (wrapper, NAME, IS_MAP, ADDER) {
  19718. var C = wrapper(function (that, iterable) {
  19719. anInstance(that, C, NAME, '_i');
  19720. that._t = NAME; // collection type
  19721. that._i = id++; // collection id
  19722. that._l = undefined; // leak store for uncaught frozen objects
  19723. if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);
  19724. });
  19725. redefineAll(C.prototype, {
  19726. // 23.3.3.2 WeakMap.prototype.delete(key)
  19727. // 23.4.3.3 WeakSet.prototype.delete(value)
  19728. 'delete': function (key) {
  19729. if (!isObject(key)) return false;
  19730. var data = getWeak(key);
  19731. if (data === true) return uncaughtFrozenStore(validate(this, NAME))['delete'](key);
  19732. return data && $has(data, this._i) && delete data[this._i];
  19733. },
  19734. // 23.3.3.4 WeakMap.prototype.has(key)
  19735. // 23.4.3.4 WeakSet.prototype.has(value)
  19736. has: function has(key) {
  19737. if (!isObject(key)) return false;
  19738. var data = getWeak(key);
  19739. if (data === true) return uncaughtFrozenStore(validate(this, NAME)).has(key);
  19740. return data && $has(data, this._i);
  19741. }
  19742. });
  19743. return C;
  19744. },
  19745. def: function (that, key, value) {
  19746. var data = getWeak(anObject(key), true);
  19747. if (data === true) uncaughtFrozenStore(that).set(key, value);
  19748. else data[that._i] = value;
  19749. return that;
  19750. },
  19751. ufstore: uncaughtFrozenStore
  19752. };
  19753. /***/ }),
  19754. /* 118 */
  19755. /***/ (function(module, exports, __webpack_require__) {
  19756. // https://tc39.github.io/ecma262/#sec-toindex
  19757. var toInteger = __webpack_require__(24);
  19758. var toLength = __webpack_require__(8);
  19759. module.exports = function (it) {
  19760. if (it === undefined) return 0;
  19761. var number = toInteger(it);
  19762. var length = toLength(number);
  19763. if (number !== length) throw RangeError('Wrong length!');
  19764. return length;
  19765. };
  19766. /***/ }),
  19767. /* 119 */
  19768. /***/ (function(module, exports, __webpack_require__) {
  19769. "use strict";
  19770. // https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray
  19771. var isArray = __webpack_require__(53);
  19772. var isObject = __webpack_require__(3);
  19773. var toLength = __webpack_require__(8);
  19774. var ctx = __webpack_require__(19);
  19775. var IS_CONCAT_SPREADABLE = __webpack_require__(5)('isConcatSpreadable');
  19776. function flattenIntoArray(target, original, source, sourceLen, start, depth, mapper, thisArg) {
  19777. var targetIndex = start;
  19778. var sourceIndex = 0;
  19779. var mapFn = mapper ? ctx(mapper, thisArg, 3) : false;
  19780. var element, spreadable;
  19781. while (sourceIndex < sourceLen) {
  19782. if (sourceIndex in source) {
  19783. element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex];
  19784. spreadable = false;
  19785. if (isObject(element)) {
  19786. spreadable = element[IS_CONCAT_SPREADABLE];
  19787. spreadable = spreadable !== undefined ? !!spreadable : isArray(element);
  19788. }
  19789. if (spreadable && depth > 0) {
  19790. targetIndex = flattenIntoArray(target, original, element, toLength(element.length), targetIndex, depth - 1) - 1;
  19791. } else {
  19792. if (targetIndex >= 0x1fffffffffffff) throw TypeError();
  19793. target[targetIndex] = element;
  19794. }
  19795. targetIndex++;
  19796. }
  19797. sourceIndex++;
  19798. }
  19799. return targetIndex;
  19800. }
  19801. module.exports = flattenIntoArray;
  19802. /***/ }),
  19803. /* 120 */
  19804. /***/ (function(module, exports, __webpack_require__) {
  19805. // https://github.com/tc39/proposal-string-pad-start-end
  19806. var toLength = __webpack_require__(8);
  19807. var repeat = __webpack_require__(77);
  19808. var defined = __webpack_require__(23);
  19809. module.exports = function (that, maxLength, fillString, left) {
  19810. var S = String(defined(that));
  19811. var stringLength = S.length;
  19812. var fillStr = fillString === undefined ? ' ' : String(fillString);
  19813. var intMaxLength = toLength(maxLength);
  19814. if (intMaxLength <= stringLength || fillStr == '') return S;
  19815. var fillLen = intMaxLength - stringLength;
  19816. var stringFiller = repeat.call(fillStr, Math.ceil(fillLen / fillStr.length));
  19817. if (stringFiller.length > fillLen) stringFiller = stringFiller.slice(0, fillLen);
  19818. return left ? stringFiller + S : S + stringFiller;
  19819. };
  19820. /***/ }),
  19821. /* 121 */
  19822. /***/ (function(module, exports, __webpack_require__) {
  19823. var getKeys = __webpack_require__(27);
  19824. var toIObject = __webpack_require__(11);
  19825. var isEnum = __webpack_require__(48).f;
  19826. module.exports = function (isEntries) {
  19827. return function (it) {
  19828. var O = toIObject(it);
  19829. var keys = getKeys(O);
  19830. var length = keys.length;
  19831. var i = 0;
  19832. var result = [];
  19833. var key;
  19834. while (length > i) if (isEnum.call(O, key = keys[i++])) {
  19835. result.push(isEntries ? [key, O[key]] : O[key]);
  19836. } return result;
  19837. };
  19838. };
  19839. /***/ }),
  19840. /* 122 */
  19841. /***/ (function(module, exports, __webpack_require__) {
  19842. // https://github.com/DavidBruant/Map-Set.prototype.toJSON
  19843. var classof = __webpack_require__(39);
  19844. var from = __webpack_require__(123);
  19845. module.exports = function (NAME) {
  19846. return function toJSON() {
  19847. if (classof(this) != NAME) throw TypeError(NAME + "#toJSON isn't generic");
  19848. return from(this);
  19849. };
  19850. };
  19851. /***/ }),
  19852. /* 123 */
  19853. /***/ (function(module, exports, __webpack_require__) {
  19854. var forOf = __webpack_require__(35);
  19855. module.exports = function (iter, ITERATOR) {
  19856. var result = [];
  19857. forOf(iter, false, result.push, result, ITERATOR);
  19858. return result;
  19859. };
  19860. /***/ }),
  19861. /* 124 */
  19862. /***/ (function(module, exports) {
  19863. // https://rwaldron.github.io/proposal-math-extensions/
  19864. module.exports = Math.scale || function scale(x, inLow, inHigh, outLow, outHigh) {
  19865. if (
  19866. arguments.length === 0
  19867. // eslint-disable-next-line no-self-compare
  19868. || x != x
  19869. // eslint-disable-next-line no-self-compare
  19870. || inLow != inLow
  19871. // eslint-disable-next-line no-self-compare
  19872. || inHigh != inHigh
  19873. // eslint-disable-next-line no-self-compare
  19874. || outLow != outLow
  19875. // eslint-disable-next-line no-self-compare
  19876. || outHigh != outHigh
  19877. ) return NaN;
  19878. if (x === Infinity || x === -Infinity) return x;
  19879. return (x - inLow) * (outHigh - outLow) / (inHigh - inLow) + outLow;
  19880. };
  19881. /***/ }),
  19882. /* 125 */
  19883. /***/ (function(module, exports, __webpack_require__) {
  19884. var classof = __webpack_require__(39);
  19885. var ITERATOR = __webpack_require__(5)('iterator');
  19886. var Iterators = __webpack_require__(40);
  19887. module.exports = __webpack_require__(13).isIterable = function (it) {
  19888. var O = Object(it);
  19889. return O[ITERATOR] !== undefined
  19890. || '@@iterator' in O
  19891. // eslint-disable-next-line no-prototype-builtins
  19892. || Iterators.hasOwnProperty(classof(O));
  19893. };
  19894. /***/ }),
  19895. /* 126 */
  19896. /***/ (function(module, exports, __webpack_require__) {
  19897. "use strict";
  19898. var path = __webpack_require__(127);
  19899. var invoke = __webpack_require__(74);
  19900. var aFunction = __webpack_require__(10);
  19901. module.exports = function (/* ...pargs */) {
  19902. var fn = aFunction(this);
  19903. var length = arguments.length;
  19904. var pargs = new Array(length);
  19905. var i = 0;
  19906. var _ = path._;
  19907. var holder = false;
  19908. while (length > i) if ((pargs[i] = arguments[i++]) === _) holder = true;
  19909. return function (/* ...args */) {
  19910. var that = this;
  19911. var aLen = arguments.length;
  19912. var j = 0;
  19913. var k = 0;
  19914. var args;
  19915. if (!holder && !aLen) return invoke(fn, pargs, that);
  19916. args = pargs.slice();
  19917. if (holder) for (;length > j; j++) if (args[j] === _) args[j] = arguments[k++];
  19918. while (aLen > k) args.push(arguments[k++]);
  19919. return invoke(fn, args, that);
  19920. };
  19921. };
  19922. /***/ }),
  19923. /* 127 */
  19924. /***/ (function(module, exports, __webpack_require__) {
  19925. module.exports = __webpack_require__(2);
  19926. /***/ }),
  19927. /* 128 */
  19928. /***/ (function(module, exports, __webpack_require__) {
  19929. var dP = __webpack_require__(6);
  19930. var gOPD = __webpack_require__(16);
  19931. var ownKeys = __webpack_require__(92);
  19932. var toIObject = __webpack_require__(11);
  19933. module.exports = function define(target, mixin) {
  19934. var keys = ownKeys(toIObject(mixin));
  19935. var length = keys.length;
  19936. var i = 0;
  19937. var key;
  19938. while (length > i) dP.f(target, key = keys[i++], gOPD.f(mixin, key));
  19939. return target;
  19940. };
  19941. /***/ }),
  19942. /* 129 */
  19943. /***/ (function(module, exports, __webpack_require__) {
  19944. __webpack_require__(130);
  19945. __webpack_require__(132);
  19946. __webpack_require__(133);
  19947. __webpack_require__(134);
  19948. __webpack_require__(135);
  19949. __webpack_require__(136);
  19950. __webpack_require__(137);
  19951. __webpack_require__(138);
  19952. __webpack_require__(139);
  19953. __webpack_require__(140);
  19954. __webpack_require__(141);
  19955. __webpack_require__(142);
  19956. __webpack_require__(143);
  19957. __webpack_require__(144);
  19958. __webpack_require__(145);
  19959. __webpack_require__(146);
  19960. __webpack_require__(148);
  19961. __webpack_require__(149);
  19962. __webpack_require__(150);
  19963. __webpack_require__(151);
  19964. __webpack_require__(152);
  19965. __webpack_require__(153);
  19966. __webpack_require__(154);
  19967. __webpack_require__(155);
  19968. __webpack_require__(156);
  19969. __webpack_require__(157);
  19970. __webpack_require__(158);
  19971. __webpack_require__(159);
  19972. __webpack_require__(160);
  19973. __webpack_require__(161);
  19974. __webpack_require__(162);
  19975. __webpack_require__(163);
  19976. __webpack_require__(164);
  19977. __webpack_require__(165);
  19978. __webpack_require__(166);
  19979. __webpack_require__(167);
  19980. __webpack_require__(168);
  19981. __webpack_require__(169);
  19982. __webpack_require__(170);
  19983. __webpack_require__(171);
  19984. __webpack_require__(172);
  19985. __webpack_require__(173);
  19986. __webpack_require__(174);
  19987. __webpack_require__(175);
  19988. __webpack_require__(176);
  19989. __webpack_require__(177);
  19990. __webpack_require__(178);
  19991. __webpack_require__(179);
  19992. __webpack_require__(180);
  19993. __webpack_require__(181);
  19994. __webpack_require__(182);
  19995. __webpack_require__(183);
  19996. __webpack_require__(184);
  19997. __webpack_require__(185);
  19998. __webpack_require__(186);
  19999. __webpack_require__(187);
  20000. __webpack_require__(188);
  20001. __webpack_require__(189);
  20002. __webpack_require__(190);
  20003. __webpack_require__(191);
  20004. __webpack_require__(192);
  20005. __webpack_require__(193);
  20006. __webpack_require__(194);
  20007. __webpack_require__(195);
  20008. __webpack_require__(196);
  20009. __webpack_require__(197);
  20010. __webpack_require__(198);
  20011. __webpack_require__(199);
  20012. __webpack_require__(200);
  20013. __webpack_require__(201);
  20014. __webpack_require__(202);
  20015. __webpack_require__(203);
  20016. __webpack_require__(204);
  20017. __webpack_require__(205);
  20018. __webpack_require__(206);
  20019. __webpack_require__(207);
  20020. __webpack_require__(208);
  20021. __webpack_require__(209);
  20022. __webpack_require__(210);
  20023. __webpack_require__(211);
  20024. __webpack_require__(212);
  20025. __webpack_require__(214);
  20026. __webpack_require__(215);
  20027. __webpack_require__(216);
  20028. __webpack_require__(217);
  20029. __webpack_require__(218);
  20030. __webpack_require__(219);
  20031. __webpack_require__(220);
  20032. __webpack_require__(221);
  20033. __webpack_require__(222);
  20034. __webpack_require__(223);
  20035. __webpack_require__(224);
  20036. __webpack_require__(225);
  20037. __webpack_require__(87);
  20038. __webpack_require__(226);
  20039. __webpack_require__(227);
  20040. __webpack_require__(228);
  20041. __webpack_require__(110);
  20042. __webpack_require__(229);
  20043. __webpack_require__(230);
  20044. __webpack_require__(231);
  20045. __webpack_require__(232);
  20046. __webpack_require__(233);
  20047. __webpack_require__(113);
  20048. __webpack_require__(115);
  20049. __webpack_require__(116);
  20050. __webpack_require__(234);
  20051. __webpack_require__(235);
  20052. __webpack_require__(236);
  20053. __webpack_require__(237);
  20054. __webpack_require__(238);
  20055. __webpack_require__(239);
  20056. __webpack_require__(240);
  20057. __webpack_require__(241);
  20058. __webpack_require__(242);
  20059. __webpack_require__(243);
  20060. __webpack_require__(244);
  20061. __webpack_require__(245);
  20062. __webpack_require__(246);
  20063. __webpack_require__(247);
  20064. __webpack_require__(248);
  20065. __webpack_require__(249);
  20066. __webpack_require__(250);
  20067. __webpack_require__(251);
  20068. __webpack_require__(253);
  20069. __webpack_require__(254);
  20070. __webpack_require__(256);
  20071. __webpack_require__(257);
  20072. __webpack_require__(258);
  20073. __webpack_require__(259);
  20074. __webpack_require__(260);
  20075. __webpack_require__(261);
  20076. __webpack_require__(262);
  20077. __webpack_require__(263);
  20078. __webpack_require__(264);
  20079. __webpack_require__(265);
  20080. __webpack_require__(266);
  20081. __webpack_require__(267);
  20082. __webpack_require__(268);
  20083. __webpack_require__(269);
  20084. __webpack_require__(270);
  20085. __webpack_require__(271);
  20086. __webpack_require__(272);
  20087. __webpack_require__(273);
  20088. __webpack_require__(274);
  20089. __webpack_require__(275);
  20090. __webpack_require__(276);
  20091. __webpack_require__(277);
  20092. __webpack_require__(278);
  20093. __webpack_require__(279);
  20094. __webpack_require__(280);
  20095. __webpack_require__(281);
  20096. __webpack_require__(282);
  20097. __webpack_require__(283);
  20098. __webpack_require__(284);
  20099. __webpack_require__(285);
  20100. __webpack_require__(286);
  20101. __webpack_require__(287);
  20102. __webpack_require__(288);
  20103. __webpack_require__(289);
  20104. __webpack_require__(290);
  20105. __webpack_require__(291);
  20106. __webpack_require__(292);
  20107. __webpack_require__(293);
  20108. __webpack_require__(294);
  20109. __webpack_require__(295);
  20110. __webpack_require__(296);
  20111. __webpack_require__(297);
  20112. __webpack_require__(298);
  20113. __webpack_require__(299);
  20114. __webpack_require__(300);
  20115. __webpack_require__(301);
  20116. __webpack_require__(302);
  20117. __webpack_require__(303);
  20118. __webpack_require__(304);
  20119. __webpack_require__(305);
  20120. __webpack_require__(306);
  20121. __webpack_require__(307);
  20122. __webpack_require__(308);
  20123. __webpack_require__(309);
  20124. __webpack_require__(310);
  20125. __webpack_require__(311);
  20126. __webpack_require__(312);
  20127. __webpack_require__(313);
  20128. __webpack_require__(314);
  20129. __webpack_require__(315);
  20130. __webpack_require__(316);
  20131. __webpack_require__(317);
  20132. __webpack_require__(318);
  20133. __webpack_require__(319);
  20134. __webpack_require__(320);
  20135. __webpack_require__(321);
  20136. __webpack_require__(322);
  20137. __webpack_require__(323);
  20138. __webpack_require__(324);
  20139. __webpack_require__(325);
  20140. __webpack_require__(326);
  20141. __webpack_require__(49);
  20142. __webpack_require__(328);
  20143. __webpack_require__(125);
  20144. __webpack_require__(329);
  20145. __webpack_require__(330);
  20146. __webpack_require__(331);
  20147. __webpack_require__(332);
  20148. __webpack_require__(333);
  20149. __webpack_require__(334);
  20150. __webpack_require__(335);
  20151. __webpack_require__(336);
  20152. __webpack_require__(337);
  20153. module.exports = __webpack_require__(338);
  20154. /***/ }),
  20155. /* 130 */
  20156. /***/ (function(module, exports, __webpack_require__) {
  20157. "use strict";
  20158. // ECMAScript 6 symbols shim
  20159. var global = __webpack_require__(2);
  20160. var has = __webpack_require__(12);
  20161. var DESCRIPTORS = __webpack_require__(7);
  20162. var $export = __webpack_require__(0);
  20163. var redefine = __webpack_require__(15);
  20164. var META = __webpack_require__(32).KEY;
  20165. var $fails = __webpack_require__(4);
  20166. var shared = __webpack_require__(50);
  20167. var setToStringTag = __webpack_require__(44);
  20168. var uid = __webpack_require__(36);
  20169. var wks = __webpack_require__(5);
  20170. var wksExt = __webpack_require__(96);
  20171. var wksDefine = __webpack_require__(68);
  20172. var enumKeys = __webpack_require__(131);
  20173. var isArray = __webpack_require__(53);
  20174. var anObject = __webpack_require__(1);
  20175. var isObject = __webpack_require__(3);
  20176. var toIObject = __webpack_require__(11);
  20177. var toPrimitive = __webpack_require__(22);
  20178. var createDesc = __webpack_require__(31);
  20179. var _create = __webpack_require__(28);
  20180. var gOPNExt = __webpack_require__(99);
  20181. var $GOPD = __webpack_require__(16);
  20182. var $DP = __webpack_require__(6);
  20183. var $keys = __webpack_require__(27);
  20184. var gOPD = $GOPD.f;
  20185. var dP = $DP.f;
  20186. var gOPN = gOPNExt.f;
  20187. var $Symbol = global.Symbol;
  20188. var $JSON = global.JSON;
  20189. var _stringify = $JSON && $JSON.stringify;
  20190. var PROTOTYPE = 'prototype';
  20191. var HIDDEN = wks('_hidden');
  20192. var TO_PRIMITIVE = wks('toPrimitive');
  20193. var isEnum = {}.propertyIsEnumerable;
  20194. var SymbolRegistry = shared('symbol-registry');
  20195. var AllSymbols = shared('symbols');
  20196. var OPSymbols = shared('op-symbols');
  20197. var ObjectProto = Object[PROTOTYPE];
  20198. var USE_NATIVE = typeof $Symbol == 'function';
  20199. var QObject = global.QObject;
  20200. // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
  20201. var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;
  20202. // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
  20203. var setSymbolDesc = DESCRIPTORS && $fails(function () {
  20204. return _create(dP({}, 'a', {
  20205. get: function () { return dP(this, 'a', { value: 7 }).a; }
  20206. })).a != 7;
  20207. }) ? function (it, key, D) {
  20208. var protoDesc = gOPD(ObjectProto, key);
  20209. if (protoDesc) delete ObjectProto[key];
  20210. dP(it, key, D);
  20211. if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc);
  20212. } : dP;
  20213. var wrap = function (tag) {
  20214. var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);
  20215. sym._k = tag;
  20216. return sym;
  20217. };
  20218. var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) {
  20219. return typeof it == 'symbol';
  20220. } : function (it) {
  20221. return it instanceof $Symbol;
  20222. };
  20223. var $defineProperty = function defineProperty(it, key, D) {
  20224. if (it === ObjectProto) $defineProperty(OPSymbols, key, D);
  20225. anObject(it);
  20226. key = toPrimitive(key, true);
  20227. anObject(D);
  20228. if (has(AllSymbols, key)) {
  20229. if (!D.enumerable) {
  20230. if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {}));
  20231. it[HIDDEN][key] = true;
  20232. } else {
  20233. if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false;
  20234. D = _create(D, { enumerable: createDesc(0, false) });
  20235. } return setSymbolDesc(it, key, D);
  20236. } return dP(it, key, D);
  20237. };
  20238. var $defineProperties = function defineProperties(it, P) {
  20239. anObject(it);
  20240. var keys = enumKeys(P = toIObject(P));
  20241. var i = 0;
  20242. var l = keys.length;
  20243. var key;
  20244. while (l > i) $defineProperty(it, key = keys[i++], P[key]);
  20245. return it;
  20246. };
  20247. var $create = function create(it, P) {
  20248. return P === undefined ? _create(it) : $defineProperties(_create(it), P);
  20249. };
  20250. var $propertyIsEnumerable = function propertyIsEnumerable(key) {
  20251. var E = isEnum.call(this, key = toPrimitive(key, true));
  20252. if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false;
  20253. return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;
  20254. };
  20255. var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) {
  20256. it = toIObject(it);
  20257. key = toPrimitive(key, true);
  20258. if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return;
  20259. var D = gOPD(it, key);
  20260. if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true;
  20261. return D;
  20262. };
  20263. var $getOwnPropertyNames = function getOwnPropertyNames(it) {
  20264. var names = gOPN(toIObject(it));
  20265. var result = [];
  20266. var i = 0;
  20267. var key;
  20268. while (names.length > i) {
  20269. if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key);
  20270. } return result;
  20271. };
  20272. var $getOwnPropertySymbols = function getOwnPropertySymbols(it) {
  20273. var IS_OP = it === ObjectProto;
  20274. var names = gOPN(IS_OP ? OPSymbols : toIObject(it));
  20275. var result = [];
  20276. var i = 0;
  20277. var key;
  20278. while (names.length > i) {
  20279. if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]);
  20280. } return result;
  20281. };
  20282. // 19.4.1.1 Symbol([description])
  20283. if (!USE_NATIVE) {
  20284. $Symbol = function Symbol() {
  20285. if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!');
  20286. var tag = uid(arguments.length > 0 ? arguments[0] : undefined);
  20287. var $set = function (value) {
  20288. if (this === ObjectProto) $set.call(OPSymbols, value);
  20289. if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;
  20290. setSymbolDesc(this, tag, createDesc(1, value));
  20291. };
  20292. if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set });
  20293. return wrap(tag);
  20294. };
  20295. redefine($Symbol[PROTOTYPE], 'toString', function toString() {
  20296. return this._k;
  20297. });
  20298. $GOPD.f = $getOwnPropertyDescriptor;
  20299. $DP.f = $defineProperty;
  20300. __webpack_require__(38).f = gOPNExt.f = $getOwnPropertyNames;
  20301. __webpack_require__(48).f = $propertyIsEnumerable;
  20302. __webpack_require__(52).f = $getOwnPropertySymbols;
  20303. if (DESCRIPTORS && !__webpack_require__(33)) {
  20304. redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);
  20305. }
  20306. wksExt.f = function (name) {
  20307. return wrap(wks(name));
  20308. };
  20309. }
  20310. $export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol });
  20311. for (var es6Symbols = (
  20312. // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14
  20313. 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'
  20314. ).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]);
  20315. for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]);
  20316. $export($export.S + $export.F * !USE_NATIVE, 'Symbol', {
  20317. // 19.4.2.1 Symbol.for(key)
  20318. 'for': function (key) {
  20319. return has(SymbolRegistry, key += '')
  20320. ? SymbolRegistry[key]
  20321. : SymbolRegistry[key] = $Symbol(key);
  20322. },
  20323. // 19.4.2.5 Symbol.keyFor(sym)
  20324. keyFor: function keyFor(sym) {
  20325. if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!');
  20326. for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key;
  20327. },
  20328. useSetter: function () { setter = true; },
  20329. useSimple: function () { setter = false; }
  20330. });
  20331. $export($export.S + $export.F * !USE_NATIVE, 'Object', {
  20332. // 19.1.2.2 Object.create(O [, Properties])
  20333. create: $create,
  20334. // 19.1.2.4 Object.defineProperty(O, P, Attributes)
  20335. defineProperty: $defineProperty,
  20336. // 19.1.2.3 Object.defineProperties(O, Properties)
  20337. defineProperties: $defineProperties,
  20338. // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
  20339. getOwnPropertyDescriptor: $getOwnPropertyDescriptor,
  20340. // 19.1.2.7 Object.getOwnPropertyNames(O)
  20341. getOwnPropertyNames: $getOwnPropertyNames,
  20342. // 19.1.2.8 Object.getOwnPropertySymbols(O)
  20343. getOwnPropertySymbols: $getOwnPropertySymbols
  20344. });
  20345. // 24.3.2 JSON.stringify(value [, replacer [, space]])
  20346. $JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () {
  20347. var S = $Symbol();
  20348. // MS Edge converts symbol values to JSON as {}
  20349. // WebKit converts symbol values to JSON as null
  20350. // V8 throws on boxed symbols
  20351. return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}';
  20352. })), 'JSON', {
  20353. stringify: function stringify(it) {
  20354. var args = [it];
  20355. var i = 1;
  20356. var replacer, $replacer;
  20357. while (arguments.length > i) args.push(arguments[i++]);
  20358. $replacer = replacer = args[1];
  20359. if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
  20360. if (!isArray(replacer)) replacer = function (key, value) {
  20361. if (typeof $replacer == 'function') value = $replacer.call(this, key, value);
  20362. if (!isSymbol(value)) return value;
  20363. };
  20364. args[1] = replacer;
  20365. return _stringify.apply($JSON, args);
  20366. }
  20367. });
  20368. // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)
  20369. $Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(14)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);
  20370. // 19.4.3.5 Symbol.prototype[@@toStringTag]
  20371. setToStringTag($Symbol, 'Symbol');
  20372. // 20.2.1.9 Math[@@toStringTag]
  20373. setToStringTag(Math, 'Math', true);
  20374. // 24.3.3 JSON[@@toStringTag]
  20375. setToStringTag(global.JSON, 'JSON', true);
  20376. /***/ }),
  20377. /* 131 */
  20378. /***/ (function(module, exports, __webpack_require__) {
  20379. // all enumerable object keys, includes symbols
  20380. var getKeys = __webpack_require__(27);
  20381. var gOPS = __webpack_require__(52);
  20382. var pIE = __webpack_require__(48);
  20383. module.exports = function (it) {
  20384. var result = getKeys(it);
  20385. var getSymbols = gOPS.f;
  20386. if (getSymbols) {
  20387. var symbols = getSymbols(it);
  20388. var isEnum = pIE.f;
  20389. var i = 0;
  20390. var key;
  20391. while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key);
  20392. } return result;
  20393. };
  20394. /***/ }),
  20395. /* 132 */
  20396. /***/ (function(module, exports, __webpack_require__) {
  20397. var $export = __webpack_require__(0);
  20398. // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)
  20399. $export($export.S + $export.F * !__webpack_require__(7), 'Object', { defineProperty: __webpack_require__(6).f });
  20400. /***/ }),
  20401. /* 133 */
  20402. /***/ (function(module, exports, __webpack_require__) {
  20403. var $export = __webpack_require__(0);
  20404. // 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties)
  20405. $export($export.S + $export.F * !__webpack_require__(7), 'Object', { defineProperties: __webpack_require__(98) });
  20406. /***/ }),
  20407. /* 134 */
  20408. /***/ (function(module, exports, __webpack_require__) {
  20409. // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
  20410. var toIObject = __webpack_require__(11);
  20411. var $getOwnPropertyDescriptor = __webpack_require__(16).f;
  20412. __webpack_require__(25)('getOwnPropertyDescriptor', function () {
  20413. return function getOwnPropertyDescriptor(it, key) {
  20414. return $getOwnPropertyDescriptor(toIObject(it), key);
  20415. };
  20416. });
  20417. /***/ }),
  20418. /* 135 */
  20419. /***/ (function(module, exports, __webpack_require__) {
  20420. var $export = __webpack_require__(0);
  20421. // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
  20422. $export($export.S, 'Object', { create: __webpack_require__(28) });
  20423. /***/ }),
  20424. /* 136 */
  20425. /***/ (function(module, exports, __webpack_require__) {
  20426. // 19.1.2.9 Object.getPrototypeOf(O)
  20427. var toObject = __webpack_require__(9);
  20428. var $getPrototypeOf = __webpack_require__(17);
  20429. __webpack_require__(25)('getPrototypeOf', function () {
  20430. return function getPrototypeOf(it) {
  20431. return $getPrototypeOf(toObject(it));
  20432. };
  20433. });
  20434. /***/ }),
  20435. /* 137 */
  20436. /***/ (function(module, exports, __webpack_require__) {
  20437. // 19.1.2.14 Object.keys(O)
  20438. var toObject = __webpack_require__(9);
  20439. var $keys = __webpack_require__(27);
  20440. __webpack_require__(25)('keys', function () {
  20441. return function keys(it) {
  20442. return $keys(toObject(it));
  20443. };
  20444. });
  20445. /***/ }),
  20446. /* 138 */
  20447. /***/ (function(module, exports, __webpack_require__) {
  20448. // 19.1.2.7 Object.getOwnPropertyNames(O)
  20449. __webpack_require__(25)('getOwnPropertyNames', function () {
  20450. return __webpack_require__(99).f;
  20451. });
  20452. /***/ }),
  20453. /* 139 */
  20454. /***/ (function(module, exports, __webpack_require__) {
  20455. // 19.1.2.5 Object.freeze(O)
  20456. var isObject = __webpack_require__(3);
  20457. var meta = __webpack_require__(32).onFreeze;
  20458. __webpack_require__(25)('freeze', function ($freeze) {
  20459. return function freeze(it) {
  20460. return $freeze && isObject(it) ? $freeze(meta(it)) : it;
  20461. };
  20462. });
  20463. /***/ }),
  20464. /* 140 */
  20465. /***/ (function(module, exports, __webpack_require__) {
  20466. // 19.1.2.17 Object.seal(O)
  20467. var isObject = __webpack_require__(3);
  20468. var meta = __webpack_require__(32).onFreeze;
  20469. __webpack_require__(25)('seal', function ($seal) {
  20470. return function seal(it) {
  20471. return $seal && isObject(it) ? $seal(meta(it)) : it;
  20472. };
  20473. });
  20474. /***/ }),
  20475. /* 141 */
  20476. /***/ (function(module, exports, __webpack_require__) {
  20477. // 19.1.2.15 Object.preventExtensions(O)
  20478. var isObject = __webpack_require__(3);
  20479. var meta = __webpack_require__(32).onFreeze;
  20480. __webpack_require__(25)('preventExtensions', function ($preventExtensions) {
  20481. return function preventExtensions(it) {
  20482. return $preventExtensions && isObject(it) ? $preventExtensions(meta(it)) : it;
  20483. };
  20484. });
  20485. /***/ }),
  20486. /* 142 */
  20487. /***/ (function(module, exports, __webpack_require__) {
  20488. // 19.1.2.12 Object.isFrozen(O)
  20489. var isObject = __webpack_require__(3);
  20490. __webpack_require__(25)('isFrozen', function ($isFrozen) {
  20491. return function isFrozen(it) {
  20492. return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true;
  20493. };
  20494. });
  20495. /***/ }),
  20496. /* 143 */
  20497. /***/ (function(module, exports, __webpack_require__) {
  20498. // 19.1.2.13 Object.isSealed(O)
  20499. var isObject = __webpack_require__(3);
  20500. __webpack_require__(25)('isSealed', function ($isSealed) {
  20501. return function isSealed(it) {
  20502. return isObject(it) ? $isSealed ? $isSealed(it) : false : true;
  20503. };
  20504. });
  20505. /***/ }),
  20506. /* 144 */
  20507. /***/ (function(module, exports, __webpack_require__) {
  20508. // 19.1.2.11 Object.isExtensible(O)
  20509. var isObject = __webpack_require__(3);
  20510. __webpack_require__(25)('isExtensible', function ($isExtensible) {
  20511. return function isExtensible(it) {
  20512. return isObject(it) ? $isExtensible ? $isExtensible(it) : true : false;
  20513. };
  20514. });
  20515. /***/ }),
  20516. /* 145 */
  20517. /***/ (function(module, exports, __webpack_require__) {
  20518. // 19.1.3.1 Object.assign(target, source)
  20519. var $export = __webpack_require__(0);
  20520. $export($export.S + $export.F, 'Object', { assign: __webpack_require__(72) });
  20521. /***/ }),
  20522. /* 146 */
  20523. /***/ (function(module, exports, __webpack_require__) {
  20524. // 19.1.3.10 Object.is(value1, value2)
  20525. var $export = __webpack_require__(0);
  20526. $export($export.S, 'Object', { is: __webpack_require__(147) });
  20527. /***/ }),
  20528. /* 147 */
  20529. /***/ (function(module, exports) {
  20530. // 7.2.9 SameValue(x, y)
  20531. module.exports = Object.is || function is(x, y) {
  20532. // eslint-disable-next-line no-self-compare
  20533. return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;
  20534. };
  20535. /***/ }),
  20536. /* 148 */
  20537. /***/ (function(module, exports, __webpack_require__) {
  20538. // 19.1.3.19 Object.setPrototypeOf(O, proto)
  20539. var $export = __webpack_require__(0);
  20540. $export($export.S, 'Object', { setPrototypeOf: __webpack_require__(73).set });
  20541. /***/ }),
  20542. /* 149 */
  20543. /***/ (function(module, exports, __webpack_require__) {
  20544. "use strict";
  20545. // 19.1.3.6 Object.prototype.toString()
  20546. var classof = __webpack_require__(39);
  20547. var test = {};
  20548. test[__webpack_require__(5)('toStringTag')] = 'z';
  20549. if (test + '' != '[object z]') {
  20550. __webpack_require__(15)(Object.prototype, 'toString', function toString() {
  20551. return '[object ' + classof(this) + ']';
  20552. }, true);
  20553. }
  20554. /***/ }),
  20555. /* 150 */
  20556. /***/ (function(module, exports, __webpack_require__) {
  20557. // 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...)
  20558. var $export = __webpack_require__(0);
  20559. $export($export.P, 'Function', { bind: __webpack_require__(100) });
  20560. /***/ }),
  20561. /* 151 */
  20562. /***/ (function(module, exports, __webpack_require__) {
  20563. var dP = __webpack_require__(6).f;
  20564. var FProto = Function.prototype;
  20565. var nameRE = /^\s*function ([^ (]*)/;
  20566. var NAME = 'name';
  20567. // 19.2.4.2 name
  20568. NAME in FProto || __webpack_require__(7) && dP(FProto, NAME, {
  20569. configurable: true,
  20570. get: function () {
  20571. try {
  20572. return ('' + this).match(nameRE)[1];
  20573. } catch (e) {
  20574. return '';
  20575. }
  20576. }
  20577. });
  20578. /***/ }),
  20579. /* 152 */
  20580. /***/ (function(module, exports, __webpack_require__) {
  20581. "use strict";
  20582. var isObject = __webpack_require__(3);
  20583. var getPrototypeOf = __webpack_require__(17);
  20584. var HAS_INSTANCE = __webpack_require__(5)('hasInstance');
  20585. var FunctionProto = Function.prototype;
  20586. // 19.2.3.6 Function.prototype[@@hasInstance](V)
  20587. if (!(HAS_INSTANCE in FunctionProto)) __webpack_require__(6).f(FunctionProto, HAS_INSTANCE, { value: function (O) {
  20588. if (typeof this != 'function' || !isObject(O)) return false;
  20589. if (!isObject(this.prototype)) return O instanceof this;
  20590. // for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this:
  20591. while (O = getPrototypeOf(O)) if (this.prototype === O) return true;
  20592. return false;
  20593. } });
  20594. /***/ }),
  20595. /* 153 */
  20596. /***/ (function(module, exports, __webpack_require__) {
  20597. "use strict";
  20598. var global = __webpack_require__(2);
  20599. var has = __webpack_require__(12);
  20600. var cof = __webpack_require__(20);
  20601. var inheritIfRequired = __webpack_require__(75);
  20602. var toPrimitive = __webpack_require__(22);
  20603. var fails = __webpack_require__(4);
  20604. var gOPN = __webpack_require__(38).f;
  20605. var gOPD = __webpack_require__(16).f;
  20606. var dP = __webpack_require__(6).f;
  20607. var $trim = __webpack_require__(45).trim;
  20608. var NUMBER = 'Number';
  20609. var $Number = global[NUMBER];
  20610. var Base = $Number;
  20611. var proto = $Number.prototype;
  20612. // Opera ~12 has broken Object#toString
  20613. var BROKEN_COF = cof(__webpack_require__(28)(proto)) == NUMBER;
  20614. var TRIM = 'trim' in String.prototype;
  20615. // 7.1.3 ToNumber(argument)
  20616. var toNumber = function (argument) {
  20617. var it = toPrimitive(argument, false);
  20618. if (typeof it == 'string' && it.length > 2) {
  20619. it = TRIM ? it.trim() : $trim(it, 3);
  20620. var first = it.charCodeAt(0);
  20621. var third, radix, maxCode;
  20622. if (first === 43 || first === 45) {
  20623. third = it.charCodeAt(2);
  20624. if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix
  20625. } else if (first === 48) {
  20626. switch (it.charCodeAt(1)) {
  20627. case 66: case 98: radix = 2; maxCode = 49; break; // fast equal /^0b[01]+$/i
  20628. case 79: case 111: radix = 8; maxCode = 55; break; // fast equal /^0o[0-7]+$/i
  20629. default: return +it;
  20630. }
  20631. for (var digits = it.slice(2), i = 0, l = digits.length, code; i < l; i++) {
  20632. code = digits.charCodeAt(i);
  20633. // parseInt parses a string to a first unavailable symbol
  20634. // but ToNumber should return NaN if a string contains unavailable symbols
  20635. if (code < 48 || code > maxCode) return NaN;
  20636. } return parseInt(digits, radix);
  20637. }
  20638. } return +it;
  20639. };
  20640. if (!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')) {
  20641. $Number = function Number(value) {
  20642. var it = arguments.length < 1 ? 0 : value;
  20643. var that = this;
  20644. return that instanceof $Number
  20645. // check on 1..constructor(foo) case
  20646. && (BROKEN_COF ? fails(function () { proto.valueOf.call(that); }) : cof(that) != NUMBER)
  20647. ? inheritIfRequired(new Base(toNumber(it)), that, $Number) : toNumber(it);
  20648. };
  20649. for (var keys = __webpack_require__(7) ? gOPN(Base) : (
  20650. // ES3:
  20651. 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +
  20652. // ES6 (in case, if modules with ES6 Number statics required before):
  20653. 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' +
  20654. 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger'
  20655. ).split(','), j = 0, key; keys.length > j; j++) {
  20656. if (has(Base, key = keys[j]) && !has($Number, key)) {
  20657. dP($Number, key, gOPD(Base, key));
  20658. }
  20659. }
  20660. $Number.prototype = proto;
  20661. proto.constructor = $Number;
  20662. __webpack_require__(15)(global, NUMBER, $Number);
  20663. }
  20664. /***/ }),
  20665. /* 154 */
  20666. /***/ (function(module, exports, __webpack_require__) {
  20667. "use strict";
  20668. var $export = __webpack_require__(0);
  20669. var toInteger = __webpack_require__(24);
  20670. var aNumberValue = __webpack_require__(101);
  20671. var repeat = __webpack_require__(77);
  20672. var $toFixed = 1.0.toFixed;
  20673. var floor = Math.floor;
  20674. var data = [0, 0, 0, 0, 0, 0];
  20675. var ERROR = 'Number.toFixed: incorrect invocation!';
  20676. var ZERO = '0';
  20677. var multiply = function (n, c) {
  20678. var i = -1;
  20679. var c2 = c;
  20680. while (++i < 6) {
  20681. c2 += n * data[i];
  20682. data[i] = c2 % 1e7;
  20683. c2 = floor(c2 / 1e7);
  20684. }
  20685. };
  20686. var divide = function (n) {
  20687. var i = 6;
  20688. var c = 0;
  20689. while (--i >= 0) {
  20690. c += data[i];
  20691. data[i] = floor(c / n);
  20692. c = (c % n) * 1e7;
  20693. }
  20694. };
  20695. var numToString = function () {
  20696. var i = 6;
  20697. var s = '';
  20698. while (--i >= 0) {
  20699. if (s !== '' || i === 0 || data[i] !== 0) {
  20700. var t = String(data[i]);
  20701. s = s === '' ? t : s + repeat.call(ZERO, 7 - t.length) + t;
  20702. }
  20703. } return s;
  20704. };
  20705. var pow = function (x, n, acc) {
  20706. return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc);
  20707. };
  20708. var log = function (x) {
  20709. var n = 0;
  20710. var x2 = x;
  20711. while (x2 >= 4096) {
  20712. n += 12;
  20713. x2 /= 4096;
  20714. }
  20715. while (x2 >= 2) {
  20716. n += 1;
  20717. x2 /= 2;
  20718. } return n;
  20719. };
  20720. $export($export.P + $export.F * (!!$toFixed && (
  20721. 0.00008.toFixed(3) !== '0.000' ||
  20722. 0.9.toFixed(0) !== '1' ||
  20723. 1.255.toFixed(2) !== '1.25' ||
  20724. 1000000000000000128.0.toFixed(0) !== '1000000000000000128'
  20725. ) || !__webpack_require__(4)(function () {
  20726. // V8 ~ Android 4.3-
  20727. $toFixed.call({});
  20728. })), 'Number', {
  20729. toFixed: function toFixed(fractionDigits) {
  20730. var x = aNumberValue(this, ERROR);
  20731. var f = toInteger(fractionDigits);
  20732. var s = '';
  20733. var m = ZERO;
  20734. var e, z, j, k;
  20735. if (f < 0 || f > 20) throw RangeError(ERROR);
  20736. // eslint-disable-next-line no-self-compare
  20737. if (x != x) return 'NaN';
  20738. if (x <= -1e21 || x >= 1e21) return String(x);
  20739. if (x < 0) {
  20740. s = '-';
  20741. x = -x;
  20742. }
  20743. if (x > 1e-21) {
  20744. e = log(x * pow(2, 69, 1)) - 69;
  20745. z = e < 0 ? x * pow(2, -e, 1) : x / pow(2, e, 1);
  20746. z *= 0x10000000000000;
  20747. e = 52 - e;
  20748. if (e > 0) {
  20749. multiply(0, z);
  20750. j = f;
  20751. while (j >= 7) {
  20752. multiply(1e7, 0);
  20753. j -= 7;
  20754. }
  20755. multiply(pow(10, j, 1), 0);
  20756. j = e - 1;
  20757. while (j >= 23) {
  20758. divide(1 << 23);
  20759. j -= 23;
  20760. }
  20761. divide(1 << j);
  20762. multiply(1, 1);
  20763. divide(2);
  20764. m = numToString();
  20765. } else {
  20766. multiply(0, z);
  20767. multiply(1 << -e, 0);
  20768. m = numToString() + repeat.call(ZERO, f);
  20769. }
  20770. }
  20771. if (f > 0) {
  20772. k = m.length;
  20773. m = s + (k <= f ? '0.' + repeat.call(ZERO, f - k) + m : m.slice(0, k - f) + '.' + m.slice(k - f));
  20774. } else {
  20775. m = s + m;
  20776. } return m;
  20777. }
  20778. });
  20779. /***/ }),
  20780. /* 155 */
  20781. /***/ (function(module, exports, __webpack_require__) {
  20782. "use strict";
  20783. var $export = __webpack_require__(0);
  20784. var $fails = __webpack_require__(4);
  20785. var aNumberValue = __webpack_require__(101);
  20786. var $toPrecision = 1.0.toPrecision;
  20787. $export($export.P + $export.F * ($fails(function () {
  20788. // IE7-
  20789. return $toPrecision.call(1, undefined) !== '1';
  20790. }) || !$fails(function () {
  20791. // V8 ~ Android 4.3-
  20792. $toPrecision.call({});
  20793. })), 'Number', {
  20794. toPrecision: function toPrecision(precision) {
  20795. var that = aNumberValue(this, 'Number#toPrecision: incorrect invocation!');
  20796. return precision === undefined ? $toPrecision.call(that) : $toPrecision.call(that, precision);
  20797. }
  20798. });
  20799. /***/ }),
  20800. /* 156 */
  20801. /***/ (function(module, exports, __webpack_require__) {
  20802. // 20.1.2.1 Number.EPSILON
  20803. var $export = __webpack_require__(0);
  20804. $export($export.S, 'Number', { EPSILON: Math.pow(2, -52) });
  20805. /***/ }),
  20806. /* 157 */
  20807. /***/ (function(module, exports, __webpack_require__) {
  20808. // 20.1.2.2 Number.isFinite(number)
  20809. var $export = __webpack_require__(0);
  20810. var _isFinite = __webpack_require__(2).isFinite;
  20811. $export($export.S, 'Number', {
  20812. isFinite: function isFinite(it) {
  20813. return typeof it == 'number' && _isFinite(it);
  20814. }
  20815. });
  20816. /***/ }),
  20817. /* 158 */
  20818. /***/ (function(module, exports, __webpack_require__) {
  20819. // 20.1.2.3 Number.isInteger(number)
  20820. var $export = __webpack_require__(0);
  20821. $export($export.S, 'Number', { isInteger: __webpack_require__(102) });
  20822. /***/ }),
  20823. /* 159 */
  20824. /***/ (function(module, exports, __webpack_require__) {
  20825. // 20.1.2.4 Number.isNaN(number)
  20826. var $export = __webpack_require__(0);
  20827. $export($export.S, 'Number', {
  20828. isNaN: function isNaN(number) {
  20829. // eslint-disable-next-line no-self-compare
  20830. return number != number;
  20831. }
  20832. });
  20833. /***/ }),
  20834. /* 160 */
  20835. /***/ (function(module, exports, __webpack_require__) {
  20836. // 20.1.2.5 Number.isSafeInteger(number)
  20837. var $export = __webpack_require__(0);
  20838. var isInteger = __webpack_require__(102);
  20839. var abs = Math.abs;
  20840. $export($export.S, 'Number', {
  20841. isSafeInteger: function isSafeInteger(number) {
  20842. return isInteger(number) && abs(number) <= 0x1fffffffffffff;
  20843. }
  20844. });
  20845. /***/ }),
  20846. /* 161 */
  20847. /***/ (function(module, exports, __webpack_require__) {
  20848. // 20.1.2.6 Number.MAX_SAFE_INTEGER
  20849. var $export = __webpack_require__(0);
  20850. $export($export.S, 'Number', { MAX_SAFE_INTEGER: 0x1fffffffffffff });
  20851. /***/ }),
  20852. /* 162 */
  20853. /***/ (function(module, exports, __webpack_require__) {
  20854. // 20.1.2.10 Number.MIN_SAFE_INTEGER
  20855. var $export = __webpack_require__(0);
  20856. $export($export.S, 'Number', { MIN_SAFE_INTEGER: -0x1fffffffffffff });
  20857. /***/ }),
  20858. /* 163 */
  20859. /***/ (function(module, exports, __webpack_require__) {
  20860. var $export = __webpack_require__(0);
  20861. var $parseFloat = __webpack_require__(103);
  20862. // 20.1.2.12 Number.parseFloat(string)
  20863. $export($export.S + $export.F * (Number.parseFloat != $parseFloat), 'Number', { parseFloat: $parseFloat });
  20864. /***/ }),
  20865. /* 164 */
  20866. /***/ (function(module, exports, __webpack_require__) {
  20867. var $export = __webpack_require__(0);
  20868. var $parseInt = __webpack_require__(104);
  20869. // 20.1.2.13 Number.parseInt(string, radix)
  20870. $export($export.S + $export.F * (Number.parseInt != $parseInt), 'Number', { parseInt: $parseInt });
  20871. /***/ }),
  20872. /* 165 */
  20873. /***/ (function(module, exports, __webpack_require__) {
  20874. var $export = __webpack_require__(0);
  20875. var $parseInt = __webpack_require__(104);
  20876. // 18.2.5 parseInt(string, radix)
  20877. $export($export.G + $export.F * (parseInt != $parseInt), { parseInt: $parseInt });
  20878. /***/ }),
  20879. /* 166 */
  20880. /***/ (function(module, exports, __webpack_require__) {
  20881. var $export = __webpack_require__(0);
  20882. var $parseFloat = __webpack_require__(103);
  20883. // 18.2.4 parseFloat(string)
  20884. $export($export.G + $export.F * (parseFloat != $parseFloat), { parseFloat: $parseFloat });
  20885. /***/ }),
  20886. /* 167 */
  20887. /***/ (function(module, exports, __webpack_require__) {
  20888. // 20.2.2.3 Math.acosh(x)
  20889. var $export = __webpack_require__(0);
  20890. var log1p = __webpack_require__(105);
  20891. var sqrt = Math.sqrt;
  20892. var $acosh = Math.acosh;
  20893. $export($export.S + $export.F * !($acosh
  20894. // V8 bug: https://code.google.com/p/v8/issues/detail?id=3509
  20895. && Math.floor($acosh(Number.MAX_VALUE)) == 710
  20896. // Tor Browser bug: Math.acosh(Infinity) -> NaN
  20897. && $acosh(Infinity) == Infinity
  20898. ), 'Math', {
  20899. acosh: function acosh(x) {
  20900. return (x = +x) < 1 ? NaN : x > 94906265.62425156
  20901. ? Math.log(x) + Math.LN2
  20902. : log1p(x - 1 + sqrt(x - 1) * sqrt(x + 1));
  20903. }
  20904. });
  20905. /***/ }),
  20906. /* 168 */
  20907. /***/ (function(module, exports, __webpack_require__) {
  20908. // 20.2.2.5 Math.asinh(x)
  20909. var $export = __webpack_require__(0);
  20910. var $asinh = Math.asinh;
  20911. function asinh(x) {
  20912. return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : Math.log(x + Math.sqrt(x * x + 1));
  20913. }
  20914. // Tor Browser bug: Math.asinh(0) -> -0
  20915. $export($export.S + $export.F * !($asinh && 1 / $asinh(0) > 0), 'Math', { asinh: asinh });
  20916. /***/ }),
  20917. /* 169 */
  20918. /***/ (function(module, exports, __webpack_require__) {
  20919. // 20.2.2.7 Math.atanh(x)
  20920. var $export = __webpack_require__(0);
  20921. var $atanh = Math.atanh;
  20922. // Tor Browser bug: Math.atanh(-0) -> 0
  20923. $export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', {
  20924. atanh: function atanh(x) {
  20925. return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2;
  20926. }
  20927. });
  20928. /***/ }),
  20929. /* 170 */
  20930. /***/ (function(module, exports, __webpack_require__) {
  20931. // 20.2.2.9 Math.cbrt(x)
  20932. var $export = __webpack_require__(0);
  20933. var sign = __webpack_require__(78);
  20934. $export($export.S, 'Math', {
  20935. cbrt: function cbrt(x) {
  20936. return sign(x = +x) * Math.pow(Math.abs(x), 1 / 3);
  20937. }
  20938. });
  20939. /***/ }),
  20940. /* 171 */
  20941. /***/ (function(module, exports, __webpack_require__) {
  20942. // 20.2.2.11 Math.clz32(x)
  20943. var $export = __webpack_require__(0);
  20944. $export($export.S, 'Math', {
  20945. clz32: function clz32(x) {
  20946. return (x >>>= 0) ? 31 - Math.floor(Math.log(x + 0.5) * Math.LOG2E) : 32;
  20947. }
  20948. });
  20949. /***/ }),
  20950. /* 172 */
  20951. /***/ (function(module, exports, __webpack_require__) {
  20952. // 20.2.2.12 Math.cosh(x)
  20953. var $export = __webpack_require__(0);
  20954. var exp = Math.exp;
  20955. $export($export.S, 'Math', {
  20956. cosh: function cosh(x) {
  20957. return (exp(x = +x) + exp(-x)) / 2;
  20958. }
  20959. });
  20960. /***/ }),
  20961. /* 173 */
  20962. /***/ (function(module, exports, __webpack_require__) {
  20963. // 20.2.2.14 Math.expm1(x)
  20964. var $export = __webpack_require__(0);
  20965. var $expm1 = __webpack_require__(79);
  20966. $export($export.S + $export.F * ($expm1 != Math.expm1), 'Math', { expm1: $expm1 });
  20967. /***/ }),
  20968. /* 174 */
  20969. /***/ (function(module, exports, __webpack_require__) {
  20970. // 20.2.2.16 Math.fround(x)
  20971. var $export = __webpack_require__(0);
  20972. $export($export.S, 'Math', { fround: __webpack_require__(106) });
  20973. /***/ }),
  20974. /* 175 */
  20975. /***/ (function(module, exports, __webpack_require__) {
  20976. // 20.2.2.17 Math.hypot([value1[, value2[, … ]]])
  20977. var $export = __webpack_require__(0);
  20978. var abs = Math.abs;
  20979. $export($export.S, 'Math', {
  20980. hypot: function hypot(value1, value2) { // eslint-disable-line no-unused-vars
  20981. var sum = 0;
  20982. var i = 0;
  20983. var aLen = arguments.length;
  20984. var larg = 0;
  20985. var arg, div;
  20986. while (i < aLen) {
  20987. arg = abs(arguments[i++]);
  20988. if (larg < arg) {
  20989. div = larg / arg;
  20990. sum = sum * div * div + 1;
  20991. larg = arg;
  20992. } else if (arg > 0) {
  20993. div = arg / larg;
  20994. sum += div * div;
  20995. } else sum += arg;
  20996. }
  20997. return larg === Infinity ? Infinity : larg * Math.sqrt(sum);
  20998. }
  20999. });
  21000. /***/ }),
  21001. /* 176 */
  21002. /***/ (function(module, exports, __webpack_require__) {
  21003. // 20.2.2.18 Math.imul(x, y)
  21004. var $export = __webpack_require__(0);
  21005. var $imul = Math.imul;
  21006. // some WebKit versions fails with big numbers, some has wrong arity
  21007. $export($export.S + $export.F * __webpack_require__(4)(function () {
  21008. return $imul(0xffffffff, 5) != -5 || $imul.length != 2;
  21009. }), 'Math', {
  21010. imul: function imul(x, y) {
  21011. var UINT16 = 0xffff;
  21012. var xn = +x;
  21013. var yn = +y;
  21014. var xl = UINT16 & xn;
  21015. var yl = UINT16 & yn;
  21016. return 0 | xl * yl + ((UINT16 & xn >>> 16) * yl + xl * (UINT16 & yn >>> 16) << 16 >>> 0);
  21017. }
  21018. });
  21019. /***/ }),
  21020. /* 177 */
  21021. /***/ (function(module, exports, __webpack_require__) {
  21022. // 20.2.2.21 Math.log10(x)
  21023. var $export = __webpack_require__(0);
  21024. $export($export.S, 'Math', {
  21025. log10: function log10(x) {
  21026. return Math.log(x) * Math.LOG10E;
  21027. }
  21028. });
  21029. /***/ }),
  21030. /* 178 */
  21031. /***/ (function(module, exports, __webpack_require__) {
  21032. // 20.2.2.20 Math.log1p(x)
  21033. var $export = __webpack_require__(0);
  21034. $export($export.S, 'Math', { log1p: __webpack_require__(105) });
  21035. /***/ }),
  21036. /* 179 */
  21037. /***/ (function(module, exports, __webpack_require__) {
  21038. // 20.2.2.22 Math.log2(x)
  21039. var $export = __webpack_require__(0);
  21040. $export($export.S, 'Math', {
  21041. log2: function log2(x) {
  21042. return Math.log(x) / Math.LN2;
  21043. }
  21044. });
  21045. /***/ }),
  21046. /* 180 */
  21047. /***/ (function(module, exports, __webpack_require__) {
  21048. // 20.2.2.28 Math.sign(x)
  21049. var $export = __webpack_require__(0);
  21050. $export($export.S, 'Math', { sign: __webpack_require__(78) });
  21051. /***/ }),
  21052. /* 181 */
  21053. /***/ (function(module, exports, __webpack_require__) {
  21054. // 20.2.2.30 Math.sinh(x)
  21055. var $export = __webpack_require__(0);
  21056. var expm1 = __webpack_require__(79);
  21057. var exp = Math.exp;
  21058. // V8 near Chromium 38 has a problem with very small numbers
  21059. $export($export.S + $export.F * __webpack_require__(4)(function () {
  21060. return !Math.sinh(-2e-17) != -2e-17;
  21061. }), 'Math', {
  21062. sinh: function sinh(x) {
  21063. return Math.abs(x = +x) < 1
  21064. ? (expm1(x) - expm1(-x)) / 2
  21065. : (exp(x - 1) - exp(-x - 1)) * (Math.E / 2);
  21066. }
  21067. });
  21068. /***/ }),
  21069. /* 182 */
  21070. /***/ (function(module, exports, __webpack_require__) {
  21071. // 20.2.2.33 Math.tanh(x)
  21072. var $export = __webpack_require__(0);
  21073. var expm1 = __webpack_require__(79);
  21074. var exp = Math.exp;
  21075. $export($export.S, 'Math', {
  21076. tanh: function tanh(x) {
  21077. var a = expm1(x = +x);
  21078. var b = expm1(-x);
  21079. return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x));
  21080. }
  21081. });
  21082. /***/ }),
  21083. /* 183 */
  21084. /***/ (function(module, exports, __webpack_require__) {
  21085. // 20.2.2.34 Math.trunc(x)
  21086. var $export = __webpack_require__(0);
  21087. $export($export.S, 'Math', {
  21088. trunc: function trunc(it) {
  21089. return (it > 0 ? Math.floor : Math.ceil)(it);
  21090. }
  21091. });
  21092. /***/ }),
  21093. /* 184 */
  21094. /***/ (function(module, exports, __webpack_require__) {
  21095. var $export = __webpack_require__(0);
  21096. var toAbsoluteIndex = __webpack_require__(37);
  21097. var fromCharCode = String.fromCharCode;
  21098. var $fromCodePoint = String.fromCodePoint;
  21099. // length should be 1, old FF problem
  21100. $export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', {
  21101. // 21.1.2.2 String.fromCodePoint(...codePoints)
  21102. fromCodePoint: function fromCodePoint(x) { // eslint-disable-line no-unused-vars
  21103. var res = [];
  21104. var aLen = arguments.length;
  21105. var i = 0;
  21106. var code;
  21107. while (aLen > i) {
  21108. code = +arguments[i++];
  21109. if (toAbsoluteIndex(code, 0x10ffff) !== code) throw RangeError(code + ' is not a valid code point');
  21110. res.push(code < 0x10000
  21111. ? fromCharCode(code)
  21112. : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00)
  21113. );
  21114. } return res.join('');
  21115. }
  21116. });
  21117. /***/ }),
  21118. /* 185 */
  21119. /***/ (function(module, exports, __webpack_require__) {
  21120. var $export = __webpack_require__(0);
  21121. var toIObject = __webpack_require__(11);
  21122. var toLength = __webpack_require__(8);
  21123. $export($export.S, 'String', {
  21124. // 21.1.2.4 String.raw(callSite, ...substitutions)
  21125. raw: function raw(callSite) {
  21126. var tpl = toIObject(callSite.raw);
  21127. var len = toLength(tpl.length);
  21128. var aLen = arguments.length;
  21129. var res = [];
  21130. var i = 0;
  21131. while (len > i) {
  21132. res.push(String(tpl[i++]));
  21133. if (i < aLen) res.push(String(arguments[i]));
  21134. } return res.join('');
  21135. }
  21136. });
  21137. /***/ }),
  21138. /* 186 */
  21139. /***/ (function(module, exports, __webpack_require__) {
  21140. "use strict";
  21141. // 21.1.3.25 String.prototype.trim()
  21142. __webpack_require__(45)('trim', function ($trim) {
  21143. return function trim() {
  21144. return $trim(this, 3);
  21145. };
  21146. });
  21147. /***/ }),
  21148. /* 187 */
  21149. /***/ (function(module, exports, __webpack_require__) {
  21150. "use strict";
  21151. var $export = __webpack_require__(0);
  21152. var $at = __webpack_require__(80)(false);
  21153. $export($export.P, 'String', {
  21154. // 21.1.3.3 String.prototype.codePointAt(pos)
  21155. codePointAt: function codePointAt(pos) {
  21156. return $at(this, pos);
  21157. }
  21158. });
  21159. /***/ }),
  21160. /* 188 */
  21161. /***/ (function(module, exports, __webpack_require__) {
  21162. "use strict";
  21163. // 21.1.3.6 String.prototype.endsWith(searchString [, endPosition])
  21164. var $export = __webpack_require__(0);
  21165. var toLength = __webpack_require__(8);
  21166. var context = __webpack_require__(81);
  21167. var ENDS_WITH = 'endsWith';
  21168. var $endsWith = ''[ENDS_WITH];
  21169. $export($export.P + $export.F * __webpack_require__(82)(ENDS_WITH), 'String', {
  21170. endsWith: function endsWith(searchString /* , endPosition = @length */) {
  21171. var that = context(this, searchString, ENDS_WITH);
  21172. var endPosition = arguments.length > 1 ? arguments[1] : undefined;
  21173. var len = toLength(that.length);
  21174. var end = endPosition === undefined ? len : Math.min(toLength(endPosition), len);
  21175. var search = String(searchString);
  21176. return $endsWith
  21177. ? $endsWith.call(that, search, end)
  21178. : that.slice(end - search.length, end) === search;
  21179. }
  21180. });
  21181. /***/ }),
  21182. /* 189 */
  21183. /***/ (function(module, exports, __webpack_require__) {
  21184. "use strict";
  21185. // 21.1.3.7 String.prototype.includes(searchString, position = 0)
  21186. var $export = __webpack_require__(0);
  21187. var context = __webpack_require__(81);
  21188. var INCLUDES = 'includes';
  21189. $export($export.P + $export.F * __webpack_require__(82)(INCLUDES), 'String', {
  21190. includes: function includes(searchString /* , position = 0 */) {
  21191. return !!~context(this, searchString, INCLUDES)
  21192. .indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined);
  21193. }
  21194. });
  21195. /***/ }),
  21196. /* 190 */
  21197. /***/ (function(module, exports, __webpack_require__) {
  21198. var $export = __webpack_require__(0);
  21199. $export($export.P, 'String', {
  21200. // 21.1.3.13 String.prototype.repeat(count)
  21201. repeat: __webpack_require__(77)
  21202. });
  21203. /***/ }),
  21204. /* 191 */
  21205. /***/ (function(module, exports, __webpack_require__) {
  21206. "use strict";
  21207. // 21.1.3.18 String.prototype.startsWith(searchString [, position ])
  21208. var $export = __webpack_require__(0);
  21209. var toLength = __webpack_require__(8);
  21210. var context = __webpack_require__(81);
  21211. var STARTS_WITH = 'startsWith';
  21212. var $startsWith = ''[STARTS_WITH];
  21213. $export($export.P + $export.F * __webpack_require__(82)(STARTS_WITH), 'String', {
  21214. startsWith: function startsWith(searchString /* , position = 0 */) {
  21215. var that = context(this, searchString, STARTS_WITH);
  21216. var index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length));
  21217. var search = String(searchString);
  21218. return $startsWith
  21219. ? $startsWith.call(that, search, index)
  21220. : that.slice(index, index + search.length) === search;
  21221. }
  21222. });
  21223. /***/ }),
  21224. /* 192 */
  21225. /***/ (function(module, exports, __webpack_require__) {
  21226. "use strict";
  21227. var $at = __webpack_require__(80)(true);
  21228. // 21.1.3.27 String.prototype[@@iterator]()
  21229. __webpack_require__(55)(String, 'String', function (iterated) {
  21230. this._t = String(iterated); // target
  21231. this._i = 0; // next index
  21232. // 21.1.5.2.1 %StringIteratorPrototype%.next()
  21233. }, function () {
  21234. var O = this._t;
  21235. var index = this._i;
  21236. var point;
  21237. if (index >= O.length) return { value: undefined, done: true };
  21238. point = $at(O, index);
  21239. this._i += point.length;
  21240. return { value: point, done: false };
  21241. });
  21242. /***/ }),
  21243. /* 193 */
  21244. /***/ (function(module, exports, __webpack_require__) {
  21245. "use strict";
  21246. // B.2.3.2 String.prototype.anchor(name)
  21247. __webpack_require__(18)('anchor', function (createHTML) {
  21248. return function anchor(name) {
  21249. return createHTML(this, 'a', 'name', name);
  21250. };
  21251. });
  21252. /***/ }),
  21253. /* 194 */
  21254. /***/ (function(module, exports, __webpack_require__) {
  21255. "use strict";
  21256. // B.2.3.3 String.prototype.big()
  21257. __webpack_require__(18)('big', function (createHTML) {
  21258. return function big() {
  21259. return createHTML(this, 'big', '', '');
  21260. };
  21261. });
  21262. /***/ }),
  21263. /* 195 */
  21264. /***/ (function(module, exports, __webpack_require__) {
  21265. "use strict";
  21266. // B.2.3.4 String.prototype.blink()
  21267. __webpack_require__(18)('blink', function (createHTML) {
  21268. return function blink() {
  21269. return createHTML(this, 'blink', '', '');
  21270. };
  21271. });
  21272. /***/ }),
  21273. /* 196 */
  21274. /***/ (function(module, exports, __webpack_require__) {
  21275. "use strict";
  21276. // B.2.3.5 String.prototype.bold()
  21277. __webpack_require__(18)('bold', function (createHTML) {
  21278. return function bold() {
  21279. return createHTML(this, 'b', '', '');
  21280. };
  21281. });
  21282. /***/ }),
  21283. /* 197 */
  21284. /***/ (function(module, exports, __webpack_require__) {
  21285. "use strict";
  21286. // B.2.3.6 String.prototype.fixed()
  21287. __webpack_require__(18)('fixed', function (createHTML) {
  21288. return function fixed() {
  21289. return createHTML(this, 'tt', '', '');
  21290. };
  21291. });
  21292. /***/ }),
  21293. /* 198 */
  21294. /***/ (function(module, exports, __webpack_require__) {
  21295. "use strict";
  21296. // B.2.3.7 String.prototype.fontcolor(color)
  21297. __webpack_require__(18)('fontcolor', function (createHTML) {
  21298. return function fontcolor(color) {
  21299. return createHTML(this, 'font', 'color', color);
  21300. };
  21301. });
  21302. /***/ }),
  21303. /* 199 */
  21304. /***/ (function(module, exports, __webpack_require__) {
  21305. "use strict";
  21306. // B.2.3.8 String.prototype.fontsize(size)
  21307. __webpack_require__(18)('fontsize', function (createHTML) {
  21308. return function fontsize(size) {
  21309. return createHTML(this, 'font', 'size', size);
  21310. };
  21311. });
  21312. /***/ }),
  21313. /* 200 */
  21314. /***/ (function(module, exports, __webpack_require__) {
  21315. "use strict";
  21316. // B.2.3.9 String.prototype.italics()
  21317. __webpack_require__(18)('italics', function (createHTML) {
  21318. return function italics() {
  21319. return createHTML(this, 'i', '', '');
  21320. };
  21321. });
  21322. /***/ }),
  21323. /* 201 */
  21324. /***/ (function(module, exports, __webpack_require__) {
  21325. "use strict";
  21326. // B.2.3.10 String.prototype.link(url)
  21327. __webpack_require__(18)('link', function (createHTML) {
  21328. return function link(url) {
  21329. return createHTML(this, 'a', 'href', url);
  21330. };
  21331. });
  21332. /***/ }),
  21333. /* 202 */
  21334. /***/ (function(module, exports, __webpack_require__) {
  21335. "use strict";
  21336. // B.2.3.11 String.prototype.small()
  21337. __webpack_require__(18)('small', function (createHTML) {
  21338. return function small() {
  21339. return createHTML(this, 'small', '', '');
  21340. };
  21341. });
  21342. /***/ }),
  21343. /* 203 */
  21344. /***/ (function(module, exports, __webpack_require__) {
  21345. "use strict";
  21346. // B.2.3.12 String.prototype.strike()
  21347. __webpack_require__(18)('strike', function (createHTML) {
  21348. return function strike() {
  21349. return createHTML(this, 'strike', '', '');
  21350. };
  21351. });
  21352. /***/ }),
  21353. /* 204 */
  21354. /***/ (function(module, exports, __webpack_require__) {
  21355. "use strict";
  21356. // B.2.3.13 String.prototype.sub()
  21357. __webpack_require__(18)('sub', function (createHTML) {
  21358. return function sub() {
  21359. return createHTML(this, 'sub', '', '');
  21360. };
  21361. });
  21362. /***/ }),
  21363. /* 205 */
  21364. /***/ (function(module, exports, __webpack_require__) {
  21365. "use strict";
  21366. // B.2.3.14 String.prototype.sup()
  21367. __webpack_require__(18)('sup', function (createHTML) {
  21368. return function sup() {
  21369. return createHTML(this, 'sup', '', '');
  21370. };
  21371. });
  21372. /***/ }),
  21373. /* 206 */
  21374. /***/ (function(module, exports, __webpack_require__) {
  21375. // 22.1.2.2 / 15.4.3.2 Array.isArray(arg)
  21376. var $export = __webpack_require__(0);
  21377. $export($export.S, 'Array', { isArray: __webpack_require__(53) });
  21378. /***/ }),
  21379. /* 207 */
  21380. /***/ (function(module, exports, __webpack_require__) {
  21381. "use strict";
  21382. var ctx = __webpack_require__(19);
  21383. var $export = __webpack_require__(0);
  21384. var toObject = __webpack_require__(9);
  21385. var call = __webpack_require__(107);
  21386. var isArrayIter = __webpack_require__(83);
  21387. var toLength = __webpack_require__(8);
  21388. var createProperty = __webpack_require__(84);
  21389. var getIterFn = __webpack_require__(49);
  21390. $export($export.S + $export.F * !__webpack_require__(57)(function (iter) { Array.from(iter); }), 'Array', {
  21391. // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined)
  21392. from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {
  21393. var O = toObject(arrayLike);
  21394. var C = typeof this == 'function' ? this : Array;
  21395. var aLen = arguments.length;
  21396. var mapfn = aLen > 1 ? arguments[1] : undefined;
  21397. var mapping = mapfn !== undefined;
  21398. var index = 0;
  21399. var iterFn = getIterFn(O);
  21400. var length, result, step, iterator;
  21401. if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2);
  21402. // if object isn't iterable or it's array with default iterator - use simple case
  21403. if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) {
  21404. for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) {
  21405. createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value);
  21406. }
  21407. } else {
  21408. length = toLength(O.length);
  21409. for (result = new C(length); length > index; index++) {
  21410. createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]);
  21411. }
  21412. }
  21413. result.length = index;
  21414. return result;
  21415. }
  21416. });
  21417. /***/ }),
  21418. /* 208 */
  21419. /***/ (function(module, exports, __webpack_require__) {
  21420. "use strict";
  21421. var $export = __webpack_require__(0);
  21422. var createProperty = __webpack_require__(84);
  21423. // WebKit Array.of isn't generic
  21424. $export($export.S + $export.F * __webpack_require__(4)(function () {
  21425. function F() { /* empty */ }
  21426. return !(Array.of.call(F) instanceof F);
  21427. }), 'Array', {
  21428. // 22.1.2.3 Array.of( ...items)
  21429. of: function of(/* ...args */) {
  21430. var index = 0;
  21431. var aLen = arguments.length;
  21432. var result = new (typeof this == 'function' ? this : Array)(aLen);
  21433. while (aLen > index) createProperty(result, index, arguments[index++]);
  21434. result.length = aLen;
  21435. return result;
  21436. }
  21437. });
  21438. /***/ }),
  21439. /* 209 */
  21440. /***/ (function(module, exports, __webpack_require__) {
  21441. "use strict";
  21442. // 22.1.3.13 Array.prototype.join(separator)
  21443. var $export = __webpack_require__(0);
  21444. var toIObject = __webpack_require__(11);
  21445. var arrayJoin = [].join;
  21446. // fallback for not array-like strings
  21447. $export($export.P + $export.F * (__webpack_require__(47) != Object || !__webpack_require__(21)(arrayJoin)), 'Array', {
  21448. join: function join(separator) {
  21449. return arrayJoin.call(toIObject(this), separator === undefined ? ',' : separator);
  21450. }
  21451. });
  21452. /***/ }),
  21453. /* 210 */
  21454. /***/ (function(module, exports, __webpack_require__) {
  21455. "use strict";
  21456. var $export = __webpack_require__(0);
  21457. var html = __webpack_require__(71);
  21458. var cof = __webpack_require__(20);
  21459. var toAbsoluteIndex = __webpack_require__(37);
  21460. var toLength = __webpack_require__(8);
  21461. var arraySlice = [].slice;
  21462. // fallback for not array-like ES3 strings and DOM objects
  21463. $export($export.P + $export.F * __webpack_require__(4)(function () {
  21464. if (html) arraySlice.call(html);
  21465. }), 'Array', {
  21466. slice: function slice(begin, end) {
  21467. var len = toLength(this.length);
  21468. var klass = cof(this);
  21469. end = end === undefined ? len : end;
  21470. if (klass == 'Array') return arraySlice.call(this, begin, end);
  21471. var start = toAbsoluteIndex(begin, len);
  21472. var upTo = toAbsoluteIndex(end, len);
  21473. var size = toLength(upTo - start);
  21474. var cloned = new Array(size);
  21475. var i = 0;
  21476. for (; i < size; i++) cloned[i] = klass == 'String'
  21477. ? this.charAt(start + i)
  21478. : this[start + i];
  21479. return cloned;
  21480. }
  21481. });
  21482. /***/ }),
  21483. /* 211 */
  21484. /***/ (function(module, exports, __webpack_require__) {
  21485. "use strict";
  21486. var $export = __webpack_require__(0);
  21487. var aFunction = __webpack_require__(10);
  21488. var toObject = __webpack_require__(9);
  21489. var fails = __webpack_require__(4);
  21490. var $sort = [].sort;
  21491. var test = [1, 2, 3];
  21492. $export($export.P + $export.F * (fails(function () {
  21493. // IE8-
  21494. test.sort(undefined);
  21495. }) || !fails(function () {
  21496. // V8 bug
  21497. test.sort(null);
  21498. // Old WebKit
  21499. }) || !__webpack_require__(21)($sort)), 'Array', {
  21500. // 22.1.3.25 Array.prototype.sort(comparefn)
  21501. sort: function sort(comparefn) {
  21502. return comparefn === undefined
  21503. ? $sort.call(toObject(this))
  21504. : $sort.call(toObject(this), aFunction(comparefn));
  21505. }
  21506. });
  21507. /***/ }),
  21508. /* 212 */
  21509. /***/ (function(module, exports, __webpack_require__) {
  21510. "use strict";
  21511. var $export = __webpack_require__(0);
  21512. var $forEach = __webpack_require__(26)(0);
  21513. var STRICT = __webpack_require__(21)([].forEach, true);
  21514. $export($export.P + $export.F * !STRICT, 'Array', {
  21515. // 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg])
  21516. forEach: function forEach(callbackfn /* , thisArg */) {
  21517. return $forEach(this, callbackfn, arguments[1]);
  21518. }
  21519. });
  21520. /***/ }),
  21521. /* 213 */
  21522. /***/ (function(module, exports, __webpack_require__) {
  21523. var isObject = __webpack_require__(3);
  21524. var isArray = __webpack_require__(53);
  21525. var SPECIES = __webpack_require__(5)('species');
  21526. module.exports = function (original) {
  21527. var C;
  21528. if (isArray(original)) {
  21529. C = original.constructor;
  21530. // cross-realm fallback
  21531. if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
  21532. if (isObject(C)) {
  21533. C = C[SPECIES];
  21534. if (C === null) C = undefined;
  21535. }
  21536. } return C === undefined ? Array : C;
  21537. };
  21538. /***/ }),
  21539. /* 214 */
  21540. /***/ (function(module, exports, __webpack_require__) {
  21541. "use strict";
  21542. var $export = __webpack_require__(0);
  21543. var $map = __webpack_require__(26)(1);
  21544. $export($export.P + $export.F * !__webpack_require__(21)([].map, true), 'Array', {
  21545. // 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg])
  21546. map: function map(callbackfn /* , thisArg */) {
  21547. return $map(this, callbackfn, arguments[1]);
  21548. }
  21549. });
  21550. /***/ }),
  21551. /* 215 */
  21552. /***/ (function(module, exports, __webpack_require__) {
  21553. "use strict";
  21554. var $export = __webpack_require__(0);
  21555. var $filter = __webpack_require__(26)(2);
  21556. $export($export.P + $export.F * !__webpack_require__(21)([].filter, true), 'Array', {
  21557. // 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg])
  21558. filter: function filter(callbackfn /* , thisArg */) {
  21559. return $filter(this, callbackfn, arguments[1]);
  21560. }
  21561. });
  21562. /***/ }),
  21563. /* 216 */
  21564. /***/ (function(module, exports, __webpack_require__) {
  21565. "use strict";
  21566. var $export = __webpack_require__(0);
  21567. var $some = __webpack_require__(26)(3);
  21568. $export($export.P + $export.F * !__webpack_require__(21)([].some, true), 'Array', {
  21569. // 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg])
  21570. some: function some(callbackfn /* , thisArg */) {
  21571. return $some(this, callbackfn, arguments[1]);
  21572. }
  21573. });
  21574. /***/ }),
  21575. /* 217 */
  21576. /***/ (function(module, exports, __webpack_require__) {
  21577. "use strict";
  21578. var $export = __webpack_require__(0);
  21579. var $every = __webpack_require__(26)(4);
  21580. $export($export.P + $export.F * !__webpack_require__(21)([].every, true), 'Array', {
  21581. // 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg])
  21582. every: function every(callbackfn /* , thisArg */) {
  21583. return $every(this, callbackfn, arguments[1]);
  21584. }
  21585. });
  21586. /***/ }),
  21587. /* 218 */
  21588. /***/ (function(module, exports, __webpack_require__) {
  21589. "use strict";
  21590. var $export = __webpack_require__(0);
  21591. var $reduce = __webpack_require__(108);
  21592. $export($export.P + $export.F * !__webpack_require__(21)([].reduce, true), 'Array', {
  21593. // 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue])
  21594. reduce: function reduce(callbackfn /* , initialValue */) {
  21595. return $reduce(this, callbackfn, arguments.length, arguments[1], false);
  21596. }
  21597. });
  21598. /***/ }),
  21599. /* 219 */
  21600. /***/ (function(module, exports, __webpack_require__) {
  21601. "use strict";
  21602. var $export = __webpack_require__(0);
  21603. var $reduce = __webpack_require__(108);
  21604. $export($export.P + $export.F * !__webpack_require__(21)([].reduceRight, true), 'Array', {
  21605. // 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue])
  21606. reduceRight: function reduceRight(callbackfn /* , initialValue */) {
  21607. return $reduce(this, callbackfn, arguments.length, arguments[1], true);
  21608. }
  21609. });
  21610. /***/ }),
  21611. /* 220 */
  21612. /***/ (function(module, exports, __webpack_require__) {
  21613. "use strict";
  21614. var $export = __webpack_require__(0);
  21615. var $indexOf = __webpack_require__(51)(false);
  21616. var $native = [].indexOf;
  21617. var NEGATIVE_ZERO = !!$native && 1 / [1].indexOf(1, -0) < 0;
  21618. $export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(21)($native)), 'Array', {
  21619. // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex])
  21620. indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {
  21621. return NEGATIVE_ZERO
  21622. // convert -0 to +0
  21623. ? $native.apply(this, arguments) || 0
  21624. : $indexOf(this, searchElement, arguments[1]);
  21625. }
  21626. });
  21627. /***/ }),
  21628. /* 221 */
  21629. /***/ (function(module, exports, __webpack_require__) {
  21630. "use strict";
  21631. var $export = __webpack_require__(0);
  21632. var toIObject = __webpack_require__(11);
  21633. var toInteger = __webpack_require__(24);
  21634. var toLength = __webpack_require__(8);
  21635. var $native = [].lastIndexOf;
  21636. var NEGATIVE_ZERO = !!$native && 1 / [1].lastIndexOf(1, -0) < 0;
  21637. $export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(21)($native)), 'Array', {
  21638. // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex])
  21639. lastIndexOf: function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) {
  21640. // convert -0 to +0
  21641. if (NEGATIVE_ZERO) return $native.apply(this, arguments) || 0;
  21642. var O = toIObject(this);
  21643. var length = toLength(O.length);
  21644. var index = length - 1;
  21645. if (arguments.length > 1) index = Math.min(index, toInteger(arguments[1]));
  21646. if (index < 0) index = length + index;
  21647. for (;index >= 0; index--) if (index in O) if (O[index] === searchElement) return index || 0;
  21648. return -1;
  21649. }
  21650. });
  21651. /***/ }),
  21652. /* 222 */
  21653. /***/ (function(module, exports, __webpack_require__) {
  21654. // 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length)
  21655. var $export = __webpack_require__(0);
  21656. $export($export.P, 'Array', { copyWithin: __webpack_require__(109) });
  21657. __webpack_require__(34)('copyWithin');
  21658. /***/ }),
  21659. /* 223 */
  21660. /***/ (function(module, exports, __webpack_require__) {
  21661. // 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)
  21662. var $export = __webpack_require__(0);
  21663. $export($export.P, 'Array', { fill: __webpack_require__(86) });
  21664. __webpack_require__(34)('fill');
  21665. /***/ }),
  21666. /* 224 */
  21667. /***/ (function(module, exports, __webpack_require__) {
  21668. "use strict";
  21669. // 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined)
  21670. var $export = __webpack_require__(0);
  21671. var $find = __webpack_require__(26)(5);
  21672. var KEY = 'find';
  21673. var forced = true;
  21674. // Shouldn't skip holes
  21675. if (KEY in []) Array(1)[KEY](function () { forced = false; });
  21676. $export($export.P + $export.F * forced, 'Array', {
  21677. find: function find(callbackfn /* , that = undefined */) {
  21678. return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  21679. }
  21680. });
  21681. __webpack_require__(34)(KEY);
  21682. /***/ }),
  21683. /* 225 */
  21684. /***/ (function(module, exports, __webpack_require__) {
  21685. "use strict";
  21686. // 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined)
  21687. var $export = __webpack_require__(0);
  21688. var $find = __webpack_require__(26)(6);
  21689. var KEY = 'findIndex';
  21690. var forced = true;
  21691. // Shouldn't skip holes
  21692. if (KEY in []) Array(1)[KEY](function () { forced = false; });
  21693. $export($export.P + $export.F * forced, 'Array', {
  21694. findIndex: function findIndex(callbackfn /* , that = undefined */) {
  21695. return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  21696. }
  21697. });
  21698. __webpack_require__(34)(KEY);
  21699. /***/ }),
  21700. /* 226 */
  21701. /***/ (function(module, exports, __webpack_require__) {
  21702. __webpack_require__(41)('Array');
  21703. /***/ }),
  21704. /* 227 */
  21705. /***/ (function(module, exports, __webpack_require__) {
  21706. var global = __webpack_require__(2);
  21707. var inheritIfRequired = __webpack_require__(75);
  21708. var dP = __webpack_require__(6).f;
  21709. var gOPN = __webpack_require__(38).f;
  21710. var isRegExp = __webpack_require__(54);
  21711. var $flags = __webpack_require__(58);
  21712. var $RegExp = global.RegExp;
  21713. var Base = $RegExp;
  21714. var proto = $RegExp.prototype;
  21715. var re1 = /a/g;
  21716. var re2 = /a/g;
  21717. // "new" creates a new object, old webkit buggy here
  21718. var CORRECT_NEW = new $RegExp(re1) !== re1;
  21719. if (__webpack_require__(7) && (!CORRECT_NEW || __webpack_require__(4)(function () {
  21720. re2[__webpack_require__(5)('match')] = false;
  21721. // RegExp constructor can alter flags and IsRegExp works correct with @@match
  21722. return $RegExp(re1) != re1 || $RegExp(re2) == re2 || $RegExp(re1, 'i') != '/a/i';
  21723. }))) {
  21724. $RegExp = function RegExp(p, f) {
  21725. var tiRE = this instanceof $RegExp;
  21726. var piRE = isRegExp(p);
  21727. var fiU = f === undefined;
  21728. return !tiRE && piRE && p.constructor === $RegExp && fiU ? p
  21729. : inheritIfRequired(CORRECT_NEW
  21730. ? new Base(piRE && !fiU ? p.source : p, f)
  21731. : Base((piRE = p instanceof $RegExp) ? p.source : p, piRE && fiU ? $flags.call(p) : f)
  21732. , tiRE ? this : proto, $RegExp);
  21733. };
  21734. var proxy = function (key) {
  21735. key in $RegExp || dP($RegExp, key, {
  21736. configurable: true,
  21737. get: function () { return Base[key]; },
  21738. set: function (it) { Base[key] = it; }
  21739. });
  21740. };
  21741. for (var keys = gOPN(Base), i = 0; keys.length > i;) proxy(keys[i++]);
  21742. proto.constructor = $RegExp;
  21743. $RegExp.prototype = proto;
  21744. __webpack_require__(15)(global, 'RegExp', $RegExp);
  21745. }
  21746. __webpack_require__(41)('RegExp');
  21747. /***/ }),
  21748. /* 228 */
  21749. /***/ (function(module, exports, __webpack_require__) {
  21750. "use strict";
  21751. __webpack_require__(110);
  21752. var anObject = __webpack_require__(1);
  21753. var $flags = __webpack_require__(58);
  21754. var DESCRIPTORS = __webpack_require__(7);
  21755. var TO_STRING = 'toString';
  21756. var $toString = /./[TO_STRING];
  21757. var define = function (fn) {
  21758. __webpack_require__(15)(RegExp.prototype, TO_STRING, fn, true);
  21759. };
  21760. // 21.2.5.14 RegExp.prototype.toString()
  21761. if (__webpack_require__(4)(function () { return $toString.call({ source: 'a', flags: 'b' }) != '/a/b'; })) {
  21762. define(function toString() {
  21763. var R = anObject(this);
  21764. return '/'.concat(R.source, '/',
  21765. 'flags' in R ? R.flags : !DESCRIPTORS && R instanceof RegExp ? $flags.call(R) : undefined);
  21766. });
  21767. // FF44- RegExp#toString has a wrong name
  21768. } else if ($toString.name != TO_STRING) {
  21769. define(function toString() {
  21770. return $toString.call(this);
  21771. });
  21772. }
  21773. /***/ }),
  21774. /* 229 */
  21775. /***/ (function(module, exports, __webpack_require__) {
  21776. // @@match logic
  21777. __webpack_require__(59)('match', 1, function (defined, MATCH, $match) {
  21778. // 21.1.3.11 String.prototype.match(regexp)
  21779. return [function match(regexp) {
  21780. 'use strict';
  21781. var O = defined(this);
  21782. var fn = regexp == undefined ? undefined : regexp[MATCH];
  21783. return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));
  21784. }, $match];
  21785. });
  21786. /***/ }),
  21787. /* 230 */
  21788. /***/ (function(module, exports, __webpack_require__) {
  21789. // @@replace logic
  21790. __webpack_require__(59)('replace', 2, function (defined, REPLACE, $replace) {
  21791. // 21.1.3.14 String.prototype.replace(searchValue, replaceValue)
  21792. return [function replace(searchValue, replaceValue) {
  21793. 'use strict';
  21794. var O = defined(this);
  21795. var fn = searchValue == undefined ? undefined : searchValue[REPLACE];
  21796. return fn !== undefined
  21797. ? fn.call(searchValue, O, replaceValue)
  21798. : $replace.call(String(O), searchValue, replaceValue);
  21799. }, $replace];
  21800. });
  21801. /***/ }),
  21802. /* 231 */
  21803. /***/ (function(module, exports, __webpack_require__) {
  21804. // @@search logic
  21805. __webpack_require__(59)('search', 1, function (defined, SEARCH, $search) {
  21806. // 21.1.3.15 String.prototype.search(regexp)
  21807. return [function search(regexp) {
  21808. 'use strict';
  21809. var O = defined(this);
  21810. var fn = regexp == undefined ? undefined : regexp[SEARCH];
  21811. return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O));
  21812. }, $search];
  21813. });
  21814. /***/ }),
  21815. /* 232 */
  21816. /***/ (function(module, exports, __webpack_require__) {
  21817. // @@split logic
  21818. __webpack_require__(59)('split', 2, function (defined, SPLIT, $split) {
  21819. 'use strict';
  21820. var isRegExp = __webpack_require__(54);
  21821. var _split = $split;
  21822. var $push = [].push;
  21823. var $SPLIT = 'split';
  21824. var LENGTH = 'length';
  21825. var LAST_INDEX = 'lastIndex';
  21826. if (
  21827. 'abbc'[$SPLIT](/(b)*/)[1] == 'c' ||
  21828. 'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 ||
  21829. 'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 ||
  21830. '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 ||
  21831. '.'[$SPLIT](/()()/)[LENGTH] > 1 ||
  21832. ''[$SPLIT](/.?/)[LENGTH]
  21833. ) {
  21834. var NPCG = /()??/.exec('')[1] === undefined; // nonparticipating capturing group
  21835. // based on es5-shim implementation, need to rework it
  21836. $split = function (separator, limit) {
  21837. var string = String(this);
  21838. if (separator === undefined && limit === 0) return [];
  21839. // If `separator` is not a regex, use native split
  21840. if (!isRegExp(separator)) return _split.call(string, separator, limit);
  21841. var output = [];
  21842. var flags = (separator.ignoreCase ? 'i' : '') +
  21843. (separator.multiline ? 'm' : '') +
  21844. (separator.unicode ? 'u' : '') +
  21845. (separator.sticky ? 'y' : '');
  21846. var lastLastIndex = 0;
  21847. var splitLimit = limit === undefined ? 4294967295 : limit >>> 0;
  21848. // Make `global` and avoid `lastIndex` issues by working with a copy
  21849. var separatorCopy = new RegExp(separator.source, flags + 'g');
  21850. var separator2, match, lastIndex, lastLength, i;
  21851. // Doesn't need flags gy, but they don't hurt
  21852. if (!NPCG) separator2 = new RegExp('^' + separatorCopy.source + '$(?!\\s)', flags);
  21853. while (match = separatorCopy.exec(string)) {
  21854. // `separatorCopy.lastIndex` is not reliable cross-browser
  21855. lastIndex = match.index + match[0][LENGTH];
  21856. if (lastIndex > lastLastIndex) {
  21857. output.push(string.slice(lastLastIndex, match.index));
  21858. // Fix browsers whose `exec` methods don't consistently return `undefined` for NPCG
  21859. // eslint-disable-next-line no-loop-func
  21860. if (!NPCG && match[LENGTH] > 1) match[0].replace(separator2, function () {
  21861. for (i = 1; i < arguments[LENGTH] - 2; i++) if (arguments[i] === undefined) match[i] = undefined;
  21862. });
  21863. if (match[LENGTH] > 1 && match.index < string[LENGTH]) $push.apply(output, match.slice(1));
  21864. lastLength = match[0][LENGTH];
  21865. lastLastIndex = lastIndex;
  21866. if (output[LENGTH] >= splitLimit) break;
  21867. }
  21868. if (separatorCopy[LAST_INDEX] === match.index) separatorCopy[LAST_INDEX]++; // Avoid an infinite loop
  21869. }
  21870. if (lastLastIndex === string[LENGTH]) {
  21871. if (lastLength || !separatorCopy.test('')) output.push('');
  21872. } else output.push(string.slice(lastLastIndex));
  21873. return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output;
  21874. };
  21875. // Chakra, V8
  21876. } else if ('0'[$SPLIT](undefined, 0)[LENGTH]) {
  21877. $split = function (separator, limit) {
  21878. return separator === undefined && limit === 0 ? [] : _split.call(this, separator, limit);
  21879. };
  21880. }
  21881. // 21.1.3.17 String.prototype.split(separator, limit)
  21882. return [function split(separator, limit) {
  21883. var O = defined(this);
  21884. var fn = separator == undefined ? undefined : separator[SPLIT];
  21885. return fn !== undefined ? fn.call(separator, O, limit) : $split.call(String(O), separator, limit);
  21886. }, $split];
  21887. });
  21888. /***/ }),
  21889. /* 233 */
  21890. /***/ (function(module, exports, __webpack_require__) {
  21891. "use strict";
  21892. var LIBRARY = __webpack_require__(33);
  21893. var global = __webpack_require__(2);
  21894. var ctx = __webpack_require__(19);
  21895. var classof = __webpack_require__(39);
  21896. var $export = __webpack_require__(0);
  21897. var isObject = __webpack_require__(3);
  21898. var aFunction = __webpack_require__(10);
  21899. var anInstance = __webpack_require__(42);
  21900. var forOf = __webpack_require__(35);
  21901. var speciesConstructor = __webpack_require__(60);
  21902. var task = __webpack_require__(89).set;
  21903. var microtask = __webpack_require__(90)();
  21904. var newPromiseCapabilityModule = __webpack_require__(91);
  21905. var perform = __webpack_require__(111);
  21906. var userAgent = __webpack_require__(61);
  21907. var promiseResolve = __webpack_require__(112);
  21908. var PROMISE = 'Promise';
  21909. var TypeError = global.TypeError;
  21910. var process = global.process;
  21911. var versions = process && process.versions;
  21912. var v8 = versions && versions.v8 || '';
  21913. var $Promise = global[PROMISE];
  21914. var isNode = classof(process) == 'process';
  21915. var empty = function () { /* empty */ };
  21916. var Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper;
  21917. var newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f;
  21918. var USE_NATIVE = !!function () {
  21919. try {
  21920. // correct subclassing with @@species support
  21921. var promise = $Promise.resolve(1);
  21922. var FakePromise = (promise.constructor = {})[__webpack_require__(5)('species')] = function (exec) {
  21923. exec(empty, empty);
  21924. };
  21925. // unhandled rejections tracking support, NodeJS Promise without it fails @@species test
  21926. return (isNode || typeof PromiseRejectionEvent == 'function')
  21927. && promise.then(empty) instanceof FakePromise
  21928. // v8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
  21929. // https://bugs.chromium.org/p/chromium/issues/detail?id=830565
  21930. // we can't detect it synchronously, so just check versions
  21931. && v8.indexOf('6.6') !== 0
  21932. && userAgent.indexOf('Chrome/66') === -1;
  21933. } catch (e) { /* empty */ }
  21934. }();
  21935. // helpers
  21936. var isThenable = function (it) {
  21937. var then;
  21938. return isObject(it) && typeof (then = it.then) == 'function' ? then : false;
  21939. };
  21940. var notify = function (promise, isReject) {
  21941. if (promise._n) return;
  21942. promise._n = true;
  21943. var chain = promise._c;
  21944. microtask(function () {
  21945. var value = promise._v;
  21946. var ok = promise._s == 1;
  21947. var i = 0;
  21948. var run = function (reaction) {
  21949. var handler = ok ? reaction.ok : reaction.fail;
  21950. var resolve = reaction.resolve;
  21951. var reject = reaction.reject;
  21952. var domain = reaction.domain;
  21953. var result, then, exited;
  21954. try {
  21955. if (handler) {
  21956. if (!ok) {
  21957. if (promise._h == 2) onHandleUnhandled(promise);
  21958. promise._h = 1;
  21959. }
  21960. if (handler === true) result = value;
  21961. else {
  21962. if (domain) domain.enter();
  21963. result = handler(value); // may throw
  21964. if (domain) {
  21965. domain.exit();
  21966. exited = true;
  21967. }
  21968. }
  21969. if (result === reaction.promise) {
  21970. reject(TypeError('Promise-chain cycle'));
  21971. } else if (then = isThenable(result)) {
  21972. then.call(result, resolve, reject);
  21973. } else resolve(result);
  21974. } else reject(value);
  21975. } catch (e) {
  21976. if (domain && !exited) domain.exit();
  21977. reject(e);
  21978. }
  21979. };
  21980. while (chain.length > i) run(chain[i++]); // variable length - can't use forEach
  21981. promise._c = [];
  21982. promise._n = false;
  21983. if (isReject && !promise._h) onUnhandled(promise);
  21984. });
  21985. };
  21986. var onUnhandled = function (promise) {
  21987. task.call(global, function () {
  21988. var value = promise._v;
  21989. var unhandled = isUnhandled(promise);
  21990. var result, handler, console;
  21991. if (unhandled) {
  21992. result = perform(function () {
  21993. if (isNode) {
  21994. process.emit('unhandledRejection', value, promise);
  21995. } else if (handler = global.onunhandledrejection) {
  21996. handler({ promise: promise, reason: value });
  21997. } else if ((console = global.console) && console.error) {
  21998. console.error('Unhandled promise rejection', value);
  21999. }
  22000. });
  22001. // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
  22002. promise._h = isNode || isUnhandled(promise) ? 2 : 1;
  22003. } promise._a = undefined;
  22004. if (unhandled && result.e) throw result.v;
  22005. });
  22006. };
  22007. var isUnhandled = function (promise) {
  22008. return promise._h !== 1 && (promise._a || promise._c).length === 0;
  22009. };
  22010. var onHandleUnhandled = function (promise) {
  22011. task.call(global, function () {
  22012. var handler;
  22013. if (isNode) {
  22014. process.emit('rejectionHandled', promise);
  22015. } else if (handler = global.onrejectionhandled) {
  22016. handler({ promise: promise, reason: promise._v });
  22017. }
  22018. });
  22019. };
  22020. var $reject = function (value) {
  22021. var promise = this;
  22022. if (promise._d) return;
  22023. promise._d = true;
  22024. promise = promise._w || promise; // unwrap
  22025. promise._v = value;
  22026. promise._s = 2;
  22027. if (!promise._a) promise._a = promise._c.slice();
  22028. notify(promise, true);
  22029. };
  22030. var $resolve = function (value) {
  22031. var promise = this;
  22032. var then;
  22033. if (promise._d) return;
  22034. promise._d = true;
  22035. promise = promise._w || promise; // unwrap
  22036. try {
  22037. if (promise === value) throw TypeError("Promise can't be resolved itself");
  22038. if (then = isThenable(value)) {
  22039. microtask(function () {
  22040. var wrapper = { _w: promise, _d: false }; // wrap
  22041. try {
  22042. then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1));
  22043. } catch (e) {
  22044. $reject.call(wrapper, e);
  22045. }
  22046. });
  22047. } else {
  22048. promise._v = value;
  22049. promise._s = 1;
  22050. notify(promise, false);
  22051. }
  22052. } catch (e) {
  22053. $reject.call({ _w: promise, _d: false }, e); // wrap
  22054. }
  22055. };
  22056. // constructor polyfill
  22057. if (!USE_NATIVE) {
  22058. // 25.4.3.1 Promise(executor)
  22059. $Promise = function Promise(executor) {
  22060. anInstance(this, $Promise, PROMISE, '_h');
  22061. aFunction(executor);
  22062. Internal.call(this);
  22063. try {
  22064. executor(ctx($resolve, this, 1), ctx($reject, this, 1));
  22065. } catch (err) {
  22066. $reject.call(this, err);
  22067. }
  22068. };
  22069. // eslint-disable-next-line no-unused-vars
  22070. Internal = function Promise(executor) {
  22071. this._c = []; // <- awaiting reactions
  22072. this._a = undefined; // <- checked in isUnhandled reactions
  22073. this._s = 0; // <- state
  22074. this._d = false; // <- done
  22075. this._v = undefined; // <- value
  22076. this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled
  22077. this._n = false; // <- notify
  22078. };
  22079. Internal.prototype = __webpack_require__(43)($Promise.prototype, {
  22080. // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected)
  22081. then: function then(onFulfilled, onRejected) {
  22082. var reaction = newPromiseCapability(speciesConstructor(this, $Promise));
  22083. reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;
  22084. reaction.fail = typeof onRejected == 'function' && onRejected;
  22085. reaction.domain = isNode ? process.domain : undefined;
  22086. this._c.push(reaction);
  22087. if (this._a) this._a.push(reaction);
  22088. if (this._s) notify(this, false);
  22089. return reaction.promise;
  22090. },
  22091. // 25.4.5.1 Promise.prototype.catch(onRejected)
  22092. 'catch': function (onRejected) {
  22093. return this.then(undefined, onRejected);
  22094. }
  22095. });
  22096. OwnPromiseCapability = function () {
  22097. var promise = new Internal();
  22098. this.promise = promise;
  22099. this.resolve = ctx($resolve, promise, 1);
  22100. this.reject = ctx($reject, promise, 1);
  22101. };
  22102. newPromiseCapabilityModule.f = newPromiseCapability = function (C) {
  22103. return C === $Promise || C === Wrapper
  22104. ? new OwnPromiseCapability(C)
  22105. : newGenericPromiseCapability(C);
  22106. };
  22107. }
  22108. $export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise });
  22109. __webpack_require__(44)($Promise, PROMISE);
  22110. __webpack_require__(41)(PROMISE);
  22111. Wrapper = __webpack_require__(13)[PROMISE];
  22112. // statics
  22113. $export($export.S + $export.F * !USE_NATIVE, PROMISE, {
  22114. // 25.4.4.5 Promise.reject(r)
  22115. reject: function reject(r) {
  22116. var capability = newPromiseCapability(this);
  22117. var $$reject = capability.reject;
  22118. $$reject(r);
  22119. return capability.promise;
  22120. }
  22121. });
  22122. $export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, {
  22123. // 25.4.4.6 Promise.resolve(x)
  22124. resolve: function resolve(x) {
  22125. return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x);
  22126. }
  22127. });
  22128. $export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(57)(function (iter) {
  22129. $Promise.all(iter)['catch'](empty);
  22130. })), PROMISE, {
  22131. // 25.4.4.1 Promise.all(iterable)
  22132. all: function all(iterable) {
  22133. var C = this;
  22134. var capability = newPromiseCapability(C);
  22135. var resolve = capability.resolve;
  22136. var reject = capability.reject;
  22137. var result = perform(function () {
  22138. var values = [];
  22139. var index = 0;
  22140. var remaining = 1;
  22141. forOf(iterable, false, function (promise) {
  22142. var $index = index++;
  22143. var alreadyCalled = false;
  22144. values.push(undefined);
  22145. remaining++;
  22146. C.resolve(promise).then(function (value) {
  22147. if (alreadyCalled) return;
  22148. alreadyCalled = true;
  22149. values[$index] = value;
  22150. --remaining || resolve(values);
  22151. }, reject);
  22152. });
  22153. --remaining || resolve(values);
  22154. });
  22155. if (result.e) reject(result.v);
  22156. return capability.promise;
  22157. },
  22158. // 25.4.4.4 Promise.race(iterable)
  22159. race: function race(iterable) {
  22160. var C = this;
  22161. var capability = newPromiseCapability(C);
  22162. var reject = capability.reject;
  22163. var result = perform(function () {
  22164. forOf(iterable, false, function (promise) {
  22165. C.resolve(promise).then(capability.resolve, reject);
  22166. });
  22167. });
  22168. if (result.e) reject(result.v);
  22169. return capability.promise;
  22170. }
  22171. });
  22172. /***/ }),
  22173. /* 234 */
  22174. /***/ (function(module, exports, __webpack_require__) {
  22175. "use strict";
  22176. var weak = __webpack_require__(117);
  22177. var validate = __webpack_require__(46);
  22178. var WEAK_SET = 'WeakSet';
  22179. // 23.4 WeakSet Objects
  22180. __webpack_require__(62)(WEAK_SET, function (get) {
  22181. return function WeakSet() { return get(this, arguments.length > 0 ? arguments[0] : undefined); };
  22182. }, {
  22183. // 23.4.3.1 WeakSet.prototype.add(value)
  22184. add: function add(value) {
  22185. return weak.def(validate(this, WEAK_SET), value, true);
  22186. }
  22187. }, weak, false, true);
  22188. /***/ }),
  22189. /* 235 */
  22190. /***/ (function(module, exports, __webpack_require__) {
  22191. // 26.1.1 Reflect.apply(target, thisArgument, argumentsList)
  22192. var $export = __webpack_require__(0);
  22193. var aFunction = __webpack_require__(10);
  22194. var anObject = __webpack_require__(1);
  22195. var rApply = (__webpack_require__(2).Reflect || {}).apply;
  22196. var fApply = Function.apply;
  22197. // MS Edge argumentsList argument is optional
  22198. $export($export.S + $export.F * !__webpack_require__(4)(function () {
  22199. rApply(function () { /* empty */ });
  22200. }), 'Reflect', {
  22201. apply: function apply(target, thisArgument, argumentsList) {
  22202. var T = aFunction(target);
  22203. var L = anObject(argumentsList);
  22204. return rApply ? rApply(T, thisArgument, L) : fApply.call(T, thisArgument, L);
  22205. }
  22206. });
  22207. /***/ }),
  22208. /* 236 */
  22209. /***/ (function(module, exports, __webpack_require__) {
  22210. // 26.1.2 Reflect.construct(target, argumentsList [, newTarget])
  22211. var $export = __webpack_require__(0);
  22212. var create = __webpack_require__(28);
  22213. var aFunction = __webpack_require__(10);
  22214. var anObject = __webpack_require__(1);
  22215. var isObject = __webpack_require__(3);
  22216. var fails = __webpack_require__(4);
  22217. var bind = __webpack_require__(100);
  22218. var rConstruct = (__webpack_require__(2).Reflect || {}).construct;
  22219. // MS Edge supports only 2 arguments and argumentsList argument is optional
  22220. // FF Nightly sets third argument as `new.target`, but does not create `this` from it
  22221. var NEW_TARGET_BUG = fails(function () {
  22222. function F() { /* empty */ }
  22223. return !(rConstruct(function () { /* empty */ }, [], F) instanceof F);
  22224. });
  22225. var ARGS_BUG = !fails(function () {
  22226. rConstruct(function () { /* empty */ });
  22227. });
  22228. $export($export.S + $export.F * (NEW_TARGET_BUG || ARGS_BUG), 'Reflect', {
  22229. construct: function construct(Target, args /* , newTarget */) {
  22230. aFunction(Target);
  22231. anObject(args);
  22232. var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]);
  22233. if (ARGS_BUG && !NEW_TARGET_BUG) return rConstruct(Target, args, newTarget);
  22234. if (Target == newTarget) {
  22235. // w/o altered newTarget, optimization for 0-4 arguments
  22236. switch (args.length) {
  22237. case 0: return new Target();
  22238. case 1: return new Target(args[0]);
  22239. case 2: return new Target(args[0], args[1]);
  22240. case 3: return new Target(args[0], args[1], args[2]);
  22241. case 4: return new Target(args[0], args[1], args[2], args[3]);
  22242. }
  22243. // w/o altered newTarget, lot of arguments case
  22244. var $args = [null];
  22245. $args.push.apply($args, args);
  22246. return new (bind.apply(Target, $args))();
  22247. }
  22248. // with altered newTarget, not support built-in constructors
  22249. var proto = newTarget.prototype;
  22250. var instance = create(isObject(proto) ? proto : Object.prototype);
  22251. var result = Function.apply.call(Target, instance, args);
  22252. return isObject(result) ? result : instance;
  22253. }
  22254. });
  22255. /***/ }),
  22256. /* 237 */
  22257. /***/ (function(module, exports, __webpack_require__) {
  22258. // 26.1.3 Reflect.defineProperty(target, propertyKey, attributes)
  22259. var dP = __webpack_require__(6);
  22260. var $export = __webpack_require__(0);
  22261. var anObject = __webpack_require__(1);
  22262. var toPrimitive = __webpack_require__(22);
  22263. // MS Edge has broken Reflect.defineProperty - throwing instead of returning false
  22264. $export($export.S + $export.F * __webpack_require__(4)(function () {
  22265. // eslint-disable-next-line no-undef
  22266. Reflect.defineProperty(dP.f({}, 1, { value: 1 }), 1, { value: 2 });
  22267. }), 'Reflect', {
  22268. defineProperty: function defineProperty(target, propertyKey, attributes) {
  22269. anObject(target);
  22270. propertyKey = toPrimitive(propertyKey, true);
  22271. anObject(attributes);
  22272. try {
  22273. dP.f(target, propertyKey, attributes);
  22274. return true;
  22275. } catch (e) {
  22276. return false;
  22277. }
  22278. }
  22279. });
  22280. /***/ }),
  22281. /* 238 */
  22282. /***/ (function(module, exports, __webpack_require__) {
  22283. // 26.1.4 Reflect.deleteProperty(target, propertyKey)
  22284. var $export = __webpack_require__(0);
  22285. var gOPD = __webpack_require__(16).f;
  22286. var anObject = __webpack_require__(1);
  22287. $export($export.S, 'Reflect', {
  22288. deleteProperty: function deleteProperty(target, propertyKey) {
  22289. var desc = gOPD(anObject(target), propertyKey);
  22290. return desc && !desc.configurable ? false : delete target[propertyKey];
  22291. }
  22292. });
  22293. /***/ }),
  22294. /* 239 */
  22295. /***/ (function(module, exports, __webpack_require__) {
  22296. "use strict";
  22297. // 26.1.5 Reflect.enumerate(target)
  22298. var $export = __webpack_require__(0);
  22299. var anObject = __webpack_require__(1);
  22300. var Enumerate = function (iterated) {
  22301. this._t = anObject(iterated); // target
  22302. this._i = 0; // next index
  22303. var keys = this._k = []; // keys
  22304. var key;
  22305. for (key in iterated) keys.push(key);
  22306. };
  22307. __webpack_require__(56)(Enumerate, 'Object', function () {
  22308. var that = this;
  22309. var keys = that._k;
  22310. var key;
  22311. do {
  22312. if (that._i >= keys.length) return { value: undefined, done: true };
  22313. } while (!((key = keys[that._i++]) in that._t));
  22314. return { value: key, done: false };
  22315. });
  22316. $export($export.S, 'Reflect', {
  22317. enumerate: function enumerate(target) {
  22318. return new Enumerate(target);
  22319. }
  22320. });
  22321. /***/ }),
  22322. /* 240 */
  22323. /***/ (function(module, exports, __webpack_require__) {
  22324. // 26.1.6 Reflect.get(target, propertyKey [, receiver])
  22325. var gOPD = __webpack_require__(16);
  22326. var getPrototypeOf = __webpack_require__(17);
  22327. var has = __webpack_require__(12);
  22328. var $export = __webpack_require__(0);
  22329. var isObject = __webpack_require__(3);
  22330. var anObject = __webpack_require__(1);
  22331. function get(target, propertyKey /* , receiver */) {
  22332. var receiver = arguments.length < 3 ? target : arguments[2];
  22333. var desc, proto;
  22334. if (anObject(target) === receiver) return target[propertyKey];
  22335. if (desc = gOPD.f(target, propertyKey)) return has(desc, 'value')
  22336. ? desc.value
  22337. : desc.get !== undefined
  22338. ? desc.get.call(receiver)
  22339. : undefined;
  22340. if (isObject(proto = getPrototypeOf(target))) return get(proto, propertyKey, receiver);
  22341. }
  22342. $export($export.S, 'Reflect', { get: get });
  22343. /***/ }),
  22344. /* 241 */
  22345. /***/ (function(module, exports, __webpack_require__) {
  22346. // 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey)
  22347. var gOPD = __webpack_require__(16);
  22348. var $export = __webpack_require__(0);
  22349. var anObject = __webpack_require__(1);
  22350. $export($export.S, 'Reflect', {
  22351. getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey) {
  22352. return gOPD.f(anObject(target), propertyKey);
  22353. }
  22354. });
  22355. /***/ }),
  22356. /* 242 */
  22357. /***/ (function(module, exports, __webpack_require__) {
  22358. // 26.1.8 Reflect.getPrototypeOf(target)
  22359. var $export = __webpack_require__(0);
  22360. var getProto = __webpack_require__(17);
  22361. var anObject = __webpack_require__(1);
  22362. $export($export.S, 'Reflect', {
  22363. getPrototypeOf: function getPrototypeOf(target) {
  22364. return getProto(anObject(target));
  22365. }
  22366. });
  22367. /***/ }),
  22368. /* 243 */
  22369. /***/ (function(module, exports, __webpack_require__) {
  22370. // 26.1.9 Reflect.has(target, propertyKey)
  22371. var $export = __webpack_require__(0);
  22372. $export($export.S, 'Reflect', {
  22373. has: function has(target, propertyKey) {
  22374. return propertyKey in target;
  22375. }
  22376. });
  22377. /***/ }),
  22378. /* 244 */
  22379. /***/ (function(module, exports, __webpack_require__) {
  22380. // 26.1.10 Reflect.isExtensible(target)
  22381. var $export = __webpack_require__(0);
  22382. var anObject = __webpack_require__(1);
  22383. var $isExtensible = Object.isExtensible;
  22384. $export($export.S, 'Reflect', {
  22385. isExtensible: function isExtensible(target) {
  22386. anObject(target);
  22387. return $isExtensible ? $isExtensible(target) : true;
  22388. }
  22389. });
  22390. /***/ }),
  22391. /* 245 */
  22392. /***/ (function(module, exports, __webpack_require__) {
  22393. // 26.1.11 Reflect.ownKeys(target)
  22394. var $export = __webpack_require__(0);
  22395. $export($export.S, 'Reflect', { ownKeys: __webpack_require__(92) });
  22396. /***/ }),
  22397. /* 246 */
  22398. /***/ (function(module, exports, __webpack_require__) {
  22399. // 26.1.12 Reflect.preventExtensions(target)
  22400. var $export = __webpack_require__(0);
  22401. var anObject = __webpack_require__(1);
  22402. var $preventExtensions = Object.preventExtensions;
  22403. $export($export.S, 'Reflect', {
  22404. preventExtensions: function preventExtensions(target) {
  22405. anObject(target);
  22406. try {
  22407. if ($preventExtensions) $preventExtensions(target);
  22408. return true;
  22409. } catch (e) {
  22410. return false;
  22411. }
  22412. }
  22413. });
  22414. /***/ }),
  22415. /* 247 */
  22416. /***/ (function(module, exports, __webpack_require__) {
  22417. // 26.1.13 Reflect.set(target, propertyKey, V [, receiver])
  22418. var dP = __webpack_require__(6);
  22419. var gOPD = __webpack_require__(16);
  22420. var getPrototypeOf = __webpack_require__(17);
  22421. var has = __webpack_require__(12);
  22422. var $export = __webpack_require__(0);
  22423. var createDesc = __webpack_require__(31);
  22424. var anObject = __webpack_require__(1);
  22425. var isObject = __webpack_require__(3);
  22426. function set(target, propertyKey, V /* , receiver */) {
  22427. var receiver = arguments.length < 4 ? target : arguments[3];
  22428. var ownDesc = gOPD.f(anObject(target), propertyKey);
  22429. var existingDescriptor, proto;
  22430. if (!ownDesc) {
  22431. if (isObject(proto = getPrototypeOf(target))) {
  22432. return set(proto, propertyKey, V, receiver);
  22433. }
  22434. ownDesc = createDesc(0);
  22435. }
  22436. if (has(ownDesc, 'value')) {
  22437. if (ownDesc.writable === false || !isObject(receiver)) return false;
  22438. if (existingDescriptor = gOPD.f(receiver, propertyKey)) {
  22439. if (existingDescriptor.get || existingDescriptor.set || existingDescriptor.writable === false) return false;
  22440. existingDescriptor.value = V;
  22441. dP.f(receiver, propertyKey, existingDescriptor);
  22442. } else dP.f(receiver, propertyKey, createDesc(0, V));
  22443. return true;
  22444. }
  22445. return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true);
  22446. }
  22447. $export($export.S, 'Reflect', { set: set });
  22448. /***/ }),
  22449. /* 248 */
  22450. /***/ (function(module, exports, __webpack_require__) {
  22451. // 26.1.14 Reflect.setPrototypeOf(target, proto)
  22452. var $export = __webpack_require__(0);
  22453. var setProto = __webpack_require__(73);
  22454. if (setProto) $export($export.S, 'Reflect', {
  22455. setPrototypeOf: function setPrototypeOf(target, proto) {
  22456. setProto.check(target, proto);
  22457. try {
  22458. setProto.set(target, proto);
  22459. return true;
  22460. } catch (e) {
  22461. return false;
  22462. }
  22463. }
  22464. });
  22465. /***/ }),
  22466. /* 249 */
  22467. /***/ (function(module, exports, __webpack_require__) {
  22468. // 20.3.3.1 / 15.9.4.4 Date.now()
  22469. var $export = __webpack_require__(0);
  22470. $export($export.S, 'Date', { now: function () { return new Date().getTime(); } });
  22471. /***/ }),
  22472. /* 250 */
  22473. /***/ (function(module, exports, __webpack_require__) {
  22474. "use strict";
  22475. var $export = __webpack_require__(0);
  22476. var toObject = __webpack_require__(9);
  22477. var toPrimitive = __webpack_require__(22);
  22478. $export($export.P + $export.F * __webpack_require__(4)(function () {
  22479. return new Date(NaN).toJSON() !== null
  22480. || Date.prototype.toJSON.call({ toISOString: function () { return 1; } }) !== 1;
  22481. }), 'Date', {
  22482. // eslint-disable-next-line no-unused-vars
  22483. toJSON: function toJSON(key) {
  22484. var O = toObject(this);
  22485. var pv = toPrimitive(O);
  22486. return typeof pv == 'number' && !isFinite(pv) ? null : O.toISOString();
  22487. }
  22488. });
  22489. /***/ }),
  22490. /* 251 */
  22491. /***/ (function(module, exports, __webpack_require__) {
  22492. // 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString()
  22493. var $export = __webpack_require__(0);
  22494. var toISOString = __webpack_require__(252);
  22495. // PhantomJS / old WebKit has a broken implementations
  22496. $export($export.P + $export.F * (Date.prototype.toISOString !== toISOString), 'Date', {
  22497. toISOString: toISOString
  22498. });
  22499. /***/ }),
  22500. /* 252 */
  22501. /***/ (function(module, exports, __webpack_require__) {
  22502. "use strict";
  22503. // 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString()
  22504. var fails = __webpack_require__(4);
  22505. var getTime = Date.prototype.getTime;
  22506. var $toISOString = Date.prototype.toISOString;
  22507. var lz = function (num) {
  22508. return num > 9 ? num : '0' + num;
  22509. };
  22510. // PhantomJS / old WebKit has a broken implementations
  22511. module.exports = (fails(function () {
  22512. return $toISOString.call(new Date(-5e13 - 1)) != '0385-07-25T07:06:39.999Z';
  22513. }) || !fails(function () {
  22514. $toISOString.call(new Date(NaN));
  22515. })) ? function toISOString() {
  22516. if (!isFinite(getTime.call(this))) throw RangeError('Invalid time value');
  22517. var d = this;
  22518. var y = d.getUTCFullYear();
  22519. var m = d.getUTCMilliseconds();
  22520. var s = y < 0 ? '-' : y > 9999 ? '+' : '';
  22521. return s + ('00000' + Math.abs(y)).slice(s ? -6 : -4) +
  22522. '-' + lz(d.getUTCMonth() + 1) + '-' + lz(d.getUTCDate()) +
  22523. 'T' + lz(d.getUTCHours()) + ':' + lz(d.getUTCMinutes()) +
  22524. ':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z';
  22525. } : $toISOString;
  22526. /***/ }),
  22527. /* 253 */
  22528. /***/ (function(module, exports, __webpack_require__) {
  22529. var DateProto = Date.prototype;
  22530. var INVALID_DATE = 'Invalid Date';
  22531. var TO_STRING = 'toString';
  22532. var $toString = DateProto[TO_STRING];
  22533. var getTime = DateProto.getTime;
  22534. if (new Date(NaN) + '' != INVALID_DATE) {
  22535. __webpack_require__(15)(DateProto, TO_STRING, function toString() {
  22536. var value = getTime.call(this);
  22537. // eslint-disable-next-line no-self-compare
  22538. return value === value ? $toString.call(this) : INVALID_DATE;
  22539. });
  22540. }
  22541. /***/ }),
  22542. /* 254 */
  22543. /***/ (function(module, exports, __webpack_require__) {
  22544. var TO_PRIMITIVE = __webpack_require__(5)('toPrimitive');
  22545. var proto = Date.prototype;
  22546. if (!(TO_PRIMITIVE in proto)) __webpack_require__(14)(proto, TO_PRIMITIVE, __webpack_require__(255));
  22547. /***/ }),
  22548. /* 255 */
  22549. /***/ (function(module, exports, __webpack_require__) {
  22550. "use strict";
  22551. var anObject = __webpack_require__(1);
  22552. var toPrimitive = __webpack_require__(22);
  22553. var NUMBER = 'number';
  22554. module.exports = function (hint) {
  22555. if (hint !== 'string' && hint !== NUMBER && hint !== 'default') throw TypeError('Incorrect hint');
  22556. return toPrimitive(anObject(this), hint != NUMBER);
  22557. };
  22558. /***/ }),
  22559. /* 256 */
  22560. /***/ (function(module, exports, __webpack_require__) {
  22561. "use strict";
  22562. var $export = __webpack_require__(0);
  22563. var $typed = __webpack_require__(63);
  22564. var buffer = __webpack_require__(93);
  22565. var anObject = __webpack_require__(1);
  22566. var toAbsoluteIndex = __webpack_require__(37);
  22567. var toLength = __webpack_require__(8);
  22568. var isObject = __webpack_require__(3);
  22569. var ArrayBuffer = __webpack_require__(2).ArrayBuffer;
  22570. var speciesConstructor = __webpack_require__(60);
  22571. var $ArrayBuffer = buffer.ArrayBuffer;
  22572. var $DataView = buffer.DataView;
  22573. var $isView = $typed.ABV && ArrayBuffer.isView;
  22574. var $slice = $ArrayBuffer.prototype.slice;
  22575. var VIEW = $typed.VIEW;
  22576. var ARRAY_BUFFER = 'ArrayBuffer';
  22577. $export($export.G + $export.W + $export.F * (ArrayBuffer !== $ArrayBuffer), { ArrayBuffer: $ArrayBuffer });
  22578. $export($export.S + $export.F * !$typed.CONSTR, ARRAY_BUFFER, {
  22579. // 24.1.3.1 ArrayBuffer.isView(arg)
  22580. isView: function isView(it) {
  22581. return $isView && $isView(it) || isObject(it) && VIEW in it;
  22582. }
  22583. });
  22584. $export($export.P + $export.U + $export.F * __webpack_require__(4)(function () {
  22585. return !new $ArrayBuffer(2).slice(1, undefined).byteLength;
  22586. }), ARRAY_BUFFER, {
  22587. // 24.1.4.3 ArrayBuffer.prototype.slice(start, end)
  22588. slice: function slice(start, end) {
  22589. if ($slice !== undefined && end === undefined) return $slice.call(anObject(this), start); // FF fix
  22590. var len = anObject(this).byteLength;
  22591. var first = toAbsoluteIndex(start, len);
  22592. var fin = toAbsoluteIndex(end === undefined ? len : end, len);
  22593. var result = new (speciesConstructor(this, $ArrayBuffer))(toLength(fin - first));
  22594. var viewS = new $DataView(this);
  22595. var viewT = new $DataView(result);
  22596. var index = 0;
  22597. while (first < fin) {
  22598. viewT.setUint8(index++, viewS.getUint8(first++));
  22599. } return result;
  22600. }
  22601. });
  22602. __webpack_require__(41)(ARRAY_BUFFER);
  22603. /***/ }),
  22604. /* 257 */
  22605. /***/ (function(module, exports, __webpack_require__) {
  22606. var $export = __webpack_require__(0);
  22607. $export($export.G + $export.W + $export.F * !__webpack_require__(63).ABV, {
  22608. DataView: __webpack_require__(93).DataView
  22609. });
  22610. /***/ }),
  22611. /* 258 */
  22612. /***/ (function(module, exports, __webpack_require__) {
  22613. __webpack_require__(29)('Int8', 1, function (init) {
  22614. return function Int8Array(data, byteOffset, length) {
  22615. return init(this, data, byteOffset, length);
  22616. };
  22617. });
  22618. /***/ }),
  22619. /* 259 */
  22620. /***/ (function(module, exports, __webpack_require__) {
  22621. __webpack_require__(29)('Uint8', 1, function (init) {
  22622. return function Uint8Array(data, byteOffset, length) {
  22623. return init(this, data, byteOffset, length);
  22624. };
  22625. });
  22626. /***/ }),
  22627. /* 260 */
  22628. /***/ (function(module, exports, __webpack_require__) {
  22629. __webpack_require__(29)('Uint8', 1, function (init) {
  22630. return function Uint8ClampedArray(data, byteOffset, length) {
  22631. return init(this, data, byteOffset, length);
  22632. };
  22633. }, true);
  22634. /***/ }),
  22635. /* 261 */
  22636. /***/ (function(module, exports, __webpack_require__) {
  22637. __webpack_require__(29)('Int16', 2, function (init) {
  22638. return function Int16Array(data, byteOffset, length) {
  22639. return init(this, data, byteOffset, length);
  22640. };
  22641. });
  22642. /***/ }),
  22643. /* 262 */
  22644. /***/ (function(module, exports, __webpack_require__) {
  22645. __webpack_require__(29)('Uint16', 2, function (init) {
  22646. return function Uint16Array(data, byteOffset, length) {
  22647. return init(this, data, byteOffset, length);
  22648. };
  22649. });
  22650. /***/ }),
  22651. /* 263 */
  22652. /***/ (function(module, exports, __webpack_require__) {
  22653. __webpack_require__(29)('Int32', 4, function (init) {
  22654. return function Int32Array(data, byteOffset, length) {
  22655. return init(this, data, byteOffset, length);
  22656. };
  22657. });
  22658. /***/ }),
  22659. /* 264 */
  22660. /***/ (function(module, exports, __webpack_require__) {
  22661. __webpack_require__(29)('Uint32', 4, function (init) {
  22662. return function Uint32Array(data, byteOffset, length) {
  22663. return init(this, data, byteOffset, length);
  22664. };
  22665. });
  22666. /***/ }),
  22667. /* 265 */
  22668. /***/ (function(module, exports, __webpack_require__) {
  22669. __webpack_require__(29)('Float32', 4, function (init) {
  22670. return function Float32Array(data, byteOffset, length) {
  22671. return init(this, data, byteOffset, length);
  22672. };
  22673. });
  22674. /***/ }),
  22675. /* 266 */
  22676. /***/ (function(module, exports, __webpack_require__) {
  22677. __webpack_require__(29)('Float64', 8, function (init) {
  22678. return function Float64Array(data, byteOffset, length) {
  22679. return init(this, data, byteOffset, length);
  22680. };
  22681. });
  22682. /***/ }),
  22683. /* 267 */
  22684. /***/ (function(module, exports, __webpack_require__) {
  22685. "use strict";
  22686. // https://github.com/tc39/Array.prototype.includes
  22687. var $export = __webpack_require__(0);
  22688. var $includes = __webpack_require__(51)(true);
  22689. $export($export.P, 'Array', {
  22690. includes: function includes(el /* , fromIndex = 0 */) {
  22691. return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
  22692. }
  22693. });
  22694. __webpack_require__(34)('includes');
  22695. /***/ }),
  22696. /* 268 */
  22697. /***/ (function(module, exports, __webpack_require__) {
  22698. "use strict";
  22699. // https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatMap
  22700. var $export = __webpack_require__(0);
  22701. var flattenIntoArray = __webpack_require__(119);
  22702. var toObject = __webpack_require__(9);
  22703. var toLength = __webpack_require__(8);
  22704. var aFunction = __webpack_require__(10);
  22705. var arraySpeciesCreate = __webpack_require__(85);
  22706. $export($export.P, 'Array', {
  22707. flatMap: function flatMap(callbackfn /* , thisArg */) {
  22708. var O = toObject(this);
  22709. var sourceLen, A;
  22710. aFunction(callbackfn);
  22711. sourceLen = toLength(O.length);
  22712. A = arraySpeciesCreate(O, 0);
  22713. flattenIntoArray(A, O, O, sourceLen, 0, 1, callbackfn, arguments[1]);
  22714. return A;
  22715. }
  22716. });
  22717. __webpack_require__(34)('flatMap');
  22718. /***/ }),
  22719. /* 269 */
  22720. /***/ (function(module, exports, __webpack_require__) {
  22721. "use strict";
  22722. // https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatten
  22723. var $export = __webpack_require__(0);
  22724. var flattenIntoArray = __webpack_require__(119);
  22725. var toObject = __webpack_require__(9);
  22726. var toLength = __webpack_require__(8);
  22727. var toInteger = __webpack_require__(24);
  22728. var arraySpeciesCreate = __webpack_require__(85);
  22729. $export($export.P, 'Array', {
  22730. flatten: function flatten(/* depthArg = 1 */) {
  22731. var depthArg = arguments[0];
  22732. var O = toObject(this);
  22733. var sourceLen = toLength(O.length);
  22734. var A = arraySpeciesCreate(O, 0);
  22735. flattenIntoArray(A, O, O, sourceLen, 0, depthArg === undefined ? 1 : toInteger(depthArg));
  22736. return A;
  22737. }
  22738. });
  22739. __webpack_require__(34)('flatten');
  22740. /***/ }),
  22741. /* 270 */
  22742. /***/ (function(module, exports, __webpack_require__) {
  22743. "use strict";
  22744. // https://github.com/mathiasbynens/String.prototype.at
  22745. var $export = __webpack_require__(0);
  22746. var $at = __webpack_require__(80)(true);
  22747. $export($export.P, 'String', {
  22748. at: function at(pos) {
  22749. return $at(this, pos);
  22750. }
  22751. });
  22752. /***/ }),
  22753. /* 271 */
  22754. /***/ (function(module, exports, __webpack_require__) {
  22755. "use strict";
  22756. // https://github.com/tc39/proposal-string-pad-start-end
  22757. var $export = __webpack_require__(0);
  22758. var $pad = __webpack_require__(120);
  22759. var userAgent = __webpack_require__(61);
  22760. // https://github.com/zloirock/core-js/issues/280
  22761. $export($export.P + $export.F * /Version\/10\.\d+(\.\d+)? Safari\//.test(userAgent), 'String', {
  22762. padStart: function padStart(maxLength /* , fillString = ' ' */) {
  22763. return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true);
  22764. }
  22765. });
  22766. /***/ }),
  22767. /* 272 */
  22768. /***/ (function(module, exports, __webpack_require__) {
  22769. "use strict";
  22770. // https://github.com/tc39/proposal-string-pad-start-end
  22771. var $export = __webpack_require__(0);
  22772. var $pad = __webpack_require__(120);
  22773. var userAgent = __webpack_require__(61);
  22774. // https://github.com/zloirock/core-js/issues/280
  22775. $export($export.P + $export.F * /Version\/10\.\d+(\.\d+)? Safari\//.test(userAgent), 'String', {
  22776. padEnd: function padEnd(maxLength /* , fillString = ' ' */) {
  22777. return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false);
  22778. }
  22779. });
  22780. /***/ }),
  22781. /* 273 */
  22782. /***/ (function(module, exports, __webpack_require__) {
  22783. "use strict";
  22784. // https://github.com/sebmarkbage/ecmascript-string-left-right-trim
  22785. __webpack_require__(45)('trimLeft', function ($trim) {
  22786. return function trimLeft() {
  22787. return $trim(this, 1);
  22788. };
  22789. }, 'trimStart');
  22790. /***/ }),
  22791. /* 274 */
  22792. /***/ (function(module, exports, __webpack_require__) {
  22793. "use strict";
  22794. // https://github.com/sebmarkbage/ecmascript-string-left-right-trim
  22795. __webpack_require__(45)('trimRight', function ($trim) {
  22796. return function trimRight() {
  22797. return $trim(this, 2);
  22798. };
  22799. }, 'trimEnd');
  22800. /***/ }),
  22801. /* 275 */
  22802. /***/ (function(module, exports, __webpack_require__) {
  22803. "use strict";
  22804. // https://tc39.github.io/String.prototype.matchAll/
  22805. var $export = __webpack_require__(0);
  22806. var defined = __webpack_require__(23);
  22807. var toLength = __webpack_require__(8);
  22808. var isRegExp = __webpack_require__(54);
  22809. var getFlags = __webpack_require__(58);
  22810. var RegExpProto = RegExp.prototype;
  22811. var $RegExpStringIterator = function (regexp, string) {
  22812. this._r = regexp;
  22813. this._s = string;
  22814. };
  22815. __webpack_require__(56)($RegExpStringIterator, 'RegExp String', function next() {
  22816. var match = this._r.exec(this._s);
  22817. return { value: match, done: match === null };
  22818. });
  22819. $export($export.P, 'String', {
  22820. matchAll: function matchAll(regexp) {
  22821. defined(this);
  22822. if (!isRegExp(regexp)) throw TypeError(regexp + ' is not a regexp!');
  22823. var S = String(this);
  22824. var flags = 'flags' in RegExpProto ? String(regexp.flags) : getFlags.call(regexp);
  22825. var rx = new RegExp(regexp.source, ~flags.indexOf('g') ? flags : 'g' + flags);
  22826. rx.lastIndex = toLength(regexp.lastIndex);
  22827. return new $RegExpStringIterator(rx, S);
  22828. }
  22829. });
  22830. /***/ }),
  22831. /* 276 */
  22832. /***/ (function(module, exports, __webpack_require__) {
  22833. __webpack_require__(68)('asyncIterator');
  22834. /***/ }),
  22835. /* 277 */
  22836. /***/ (function(module, exports, __webpack_require__) {
  22837. __webpack_require__(68)('observable');
  22838. /***/ }),
  22839. /* 278 */
  22840. /***/ (function(module, exports, __webpack_require__) {
  22841. // https://github.com/tc39/proposal-object-getownpropertydescriptors
  22842. var $export = __webpack_require__(0);
  22843. var ownKeys = __webpack_require__(92);
  22844. var toIObject = __webpack_require__(11);
  22845. var gOPD = __webpack_require__(16);
  22846. var createProperty = __webpack_require__(84);
  22847. $export($export.S, 'Object', {
  22848. getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) {
  22849. var O = toIObject(object);
  22850. var getDesc = gOPD.f;
  22851. var keys = ownKeys(O);
  22852. var result = {};
  22853. var i = 0;
  22854. var key, desc;
  22855. while (keys.length > i) {
  22856. desc = getDesc(O, key = keys[i++]);
  22857. if (desc !== undefined) createProperty(result, key, desc);
  22858. }
  22859. return result;
  22860. }
  22861. });
  22862. /***/ }),
  22863. /* 279 */
  22864. /***/ (function(module, exports, __webpack_require__) {
  22865. // https://github.com/tc39/proposal-object-values-entries
  22866. var $export = __webpack_require__(0);
  22867. var $values = __webpack_require__(121)(false);
  22868. $export($export.S, 'Object', {
  22869. values: function values(it) {
  22870. return $values(it);
  22871. }
  22872. });
  22873. /***/ }),
  22874. /* 280 */
  22875. /***/ (function(module, exports, __webpack_require__) {
  22876. // https://github.com/tc39/proposal-object-values-entries
  22877. var $export = __webpack_require__(0);
  22878. var $entries = __webpack_require__(121)(true);
  22879. $export($export.S, 'Object', {
  22880. entries: function entries(it) {
  22881. return $entries(it);
  22882. }
  22883. });
  22884. /***/ }),
  22885. /* 281 */
  22886. /***/ (function(module, exports, __webpack_require__) {
  22887. "use strict";
  22888. var $export = __webpack_require__(0);
  22889. var toObject = __webpack_require__(9);
  22890. var aFunction = __webpack_require__(10);
  22891. var $defineProperty = __webpack_require__(6);
  22892. // B.2.2.2 Object.prototype.__defineGetter__(P, getter)
  22893. __webpack_require__(7) && $export($export.P + __webpack_require__(64), 'Object', {
  22894. __defineGetter__: function __defineGetter__(P, getter) {
  22895. $defineProperty.f(toObject(this), P, { get: aFunction(getter), enumerable: true, configurable: true });
  22896. }
  22897. });
  22898. /***/ }),
  22899. /* 282 */
  22900. /***/ (function(module, exports, __webpack_require__) {
  22901. "use strict";
  22902. var $export = __webpack_require__(0);
  22903. var toObject = __webpack_require__(9);
  22904. var aFunction = __webpack_require__(10);
  22905. var $defineProperty = __webpack_require__(6);
  22906. // B.2.2.3 Object.prototype.__defineSetter__(P, setter)
  22907. __webpack_require__(7) && $export($export.P + __webpack_require__(64), 'Object', {
  22908. __defineSetter__: function __defineSetter__(P, setter) {
  22909. $defineProperty.f(toObject(this), P, { set: aFunction(setter), enumerable: true, configurable: true });
  22910. }
  22911. });
  22912. /***/ }),
  22913. /* 283 */
  22914. /***/ (function(module, exports, __webpack_require__) {
  22915. "use strict";
  22916. var $export = __webpack_require__(0);
  22917. var toObject = __webpack_require__(9);
  22918. var toPrimitive = __webpack_require__(22);
  22919. var getPrototypeOf = __webpack_require__(17);
  22920. var getOwnPropertyDescriptor = __webpack_require__(16).f;
  22921. // B.2.2.4 Object.prototype.__lookupGetter__(P)
  22922. __webpack_require__(7) && $export($export.P + __webpack_require__(64), 'Object', {
  22923. __lookupGetter__: function __lookupGetter__(P) {
  22924. var O = toObject(this);
  22925. var K = toPrimitive(P, true);
  22926. var D;
  22927. do {
  22928. if (D = getOwnPropertyDescriptor(O, K)) return D.get;
  22929. } while (O = getPrototypeOf(O));
  22930. }
  22931. });
  22932. /***/ }),
  22933. /* 284 */
  22934. /***/ (function(module, exports, __webpack_require__) {
  22935. "use strict";
  22936. var $export = __webpack_require__(0);
  22937. var toObject = __webpack_require__(9);
  22938. var toPrimitive = __webpack_require__(22);
  22939. var getPrototypeOf = __webpack_require__(17);
  22940. var getOwnPropertyDescriptor = __webpack_require__(16).f;
  22941. // B.2.2.5 Object.prototype.__lookupSetter__(P)
  22942. __webpack_require__(7) && $export($export.P + __webpack_require__(64), 'Object', {
  22943. __lookupSetter__: function __lookupSetter__(P) {
  22944. var O = toObject(this);
  22945. var K = toPrimitive(P, true);
  22946. var D;
  22947. do {
  22948. if (D = getOwnPropertyDescriptor(O, K)) return D.set;
  22949. } while (O = getPrototypeOf(O));
  22950. }
  22951. });
  22952. /***/ }),
  22953. /* 285 */
  22954. /***/ (function(module, exports, __webpack_require__) {
  22955. // https://github.com/DavidBruant/Map-Set.prototype.toJSON
  22956. var $export = __webpack_require__(0);
  22957. $export($export.P + $export.R, 'Map', { toJSON: __webpack_require__(122)('Map') });
  22958. /***/ }),
  22959. /* 286 */
  22960. /***/ (function(module, exports, __webpack_require__) {
  22961. // https://github.com/DavidBruant/Map-Set.prototype.toJSON
  22962. var $export = __webpack_require__(0);
  22963. $export($export.P + $export.R, 'Set', { toJSON: __webpack_require__(122)('Set') });
  22964. /***/ }),
  22965. /* 287 */
  22966. /***/ (function(module, exports, __webpack_require__) {
  22967. // https://tc39.github.io/proposal-setmap-offrom/#sec-map.of
  22968. __webpack_require__(65)('Map');
  22969. /***/ }),
  22970. /* 288 */
  22971. /***/ (function(module, exports, __webpack_require__) {
  22972. // https://tc39.github.io/proposal-setmap-offrom/#sec-set.of
  22973. __webpack_require__(65)('Set');
  22974. /***/ }),
  22975. /* 289 */
  22976. /***/ (function(module, exports, __webpack_require__) {
  22977. // https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.of
  22978. __webpack_require__(65)('WeakMap');
  22979. /***/ }),
  22980. /* 290 */
  22981. /***/ (function(module, exports, __webpack_require__) {
  22982. // https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.of
  22983. __webpack_require__(65)('WeakSet');
  22984. /***/ }),
  22985. /* 291 */
  22986. /***/ (function(module, exports, __webpack_require__) {
  22987. // https://tc39.github.io/proposal-setmap-offrom/#sec-map.from
  22988. __webpack_require__(66)('Map');
  22989. /***/ }),
  22990. /* 292 */
  22991. /***/ (function(module, exports, __webpack_require__) {
  22992. // https://tc39.github.io/proposal-setmap-offrom/#sec-set.from
  22993. __webpack_require__(66)('Set');
  22994. /***/ }),
  22995. /* 293 */
  22996. /***/ (function(module, exports, __webpack_require__) {
  22997. // https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.from
  22998. __webpack_require__(66)('WeakMap');
  22999. /***/ }),
  23000. /* 294 */
  23001. /***/ (function(module, exports, __webpack_require__) {
  23002. // https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.from
  23003. __webpack_require__(66)('WeakSet');
  23004. /***/ }),
  23005. /* 295 */
  23006. /***/ (function(module, exports, __webpack_require__) {
  23007. // https://github.com/tc39/proposal-global
  23008. var $export = __webpack_require__(0);
  23009. $export($export.G, { global: __webpack_require__(2) });
  23010. /***/ }),
  23011. /* 296 */
  23012. /***/ (function(module, exports, __webpack_require__) {
  23013. // https://github.com/tc39/proposal-global
  23014. var $export = __webpack_require__(0);
  23015. $export($export.S, 'System', { global: __webpack_require__(2) });
  23016. /***/ }),
  23017. /* 297 */
  23018. /***/ (function(module, exports, __webpack_require__) {
  23019. // https://github.com/ljharb/proposal-is-error
  23020. var $export = __webpack_require__(0);
  23021. var cof = __webpack_require__(20);
  23022. $export($export.S, 'Error', {
  23023. isError: function isError(it) {
  23024. return cof(it) === 'Error';
  23025. }
  23026. });
  23027. /***/ }),
  23028. /* 298 */
  23029. /***/ (function(module, exports, __webpack_require__) {
  23030. // https://rwaldron.github.io/proposal-math-extensions/
  23031. var $export = __webpack_require__(0);
  23032. $export($export.S, 'Math', {
  23033. clamp: function clamp(x, lower, upper) {
  23034. return Math.min(upper, Math.max(lower, x));
  23035. }
  23036. });
  23037. /***/ }),
  23038. /* 299 */
  23039. /***/ (function(module, exports, __webpack_require__) {
  23040. // https://rwaldron.github.io/proposal-math-extensions/
  23041. var $export = __webpack_require__(0);
  23042. $export($export.S, 'Math', { DEG_PER_RAD: Math.PI / 180 });
  23043. /***/ }),
  23044. /* 300 */
  23045. /***/ (function(module, exports, __webpack_require__) {
  23046. // https://rwaldron.github.io/proposal-math-extensions/
  23047. var $export = __webpack_require__(0);
  23048. var RAD_PER_DEG = 180 / Math.PI;
  23049. $export($export.S, 'Math', {
  23050. degrees: function degrees(radians) {
  23051. return radians * RAD_PER_DEG;
  23052. }
  23053. });
  23054. /***/ }),
  23055. /* 301 */
  23056. /***/ (function(module, exports, __webpack_require__) {
  23057. // https://rwaldron.github.io/proposal-math-extensions/
  23058. var $export = __webpack_require__(0);
  23059. var scale = __webpack_require__(124);
  23060. var fround = __webpack_require__(106);
  23061. $export($export.S, 'Math', {
  23062. fscale: function fscale(x, inLow, inHigh, outLow, outHigh) {
  23063. return fround(scale(x, inLow, inHigh, outLow, outHigh));
  23064. }
  23065. });
  23066. /***/ }),
  23067. /* 302 */
  23068. /***/ (function(module, exports, __webpack_require__) {
  23069. // https://gist.github.com/BrendanEich/4294d5c212a6d2254703
  23070. var $export = __webpack_require__(0);
  23071. $export($export.S, 'Math', {
  23072. iaddh: function iaddh(x0, x1, y0, y1) {
  23073. var $x0 = x0 >>> 0;
  23074. var $x1 = x1 >>> 0;
  23075. var $y0 = y0 >>> 0;
  23076. return $x1 + (y1 >>> 0) + (($x0 & $y0 | ($x0 | $y0) & ~($x0 + $y0 >>> 0)) >>> 31) | 0;
  23077. }
  23078. });
  23079. /***/ }),
  23080. /* 303 */
  23081. /***/ (function(module, exports, __webpack_require__) {
  23082. // https://gist.github.com/BrendanEich/4294d5c212a6d2254703
  23083. var $export = __webpack_require__(0);
  23084. $export($export.S, 'Math', {
  23085. isubh: function isubh(x0, x1, y0, y1) {
  23086. var $x0 = x0 >>> 0;
  23087. var $x1 = x1 >>> 0;
  23088. var $y0 = y0 >>> 0;
  23089. return $x1 - (y1 >>> 0) - ((~$x0 & $y0 | ~($x0 ^ $y0) & $x0 - $y0 >>> 0) >>> 31) | 0;
  23090. }
  23091. });
  23092. /***/ }),
  23093. /* 304 */
  23094. /***/ (function(module, exports, __webpack_require__) {
  23095. // https://gist.github.com/BrendanEich/4294d5c212a6d2254703
  23096. var $export = __webpack_require__(0);
  23097. $export($export.S, 'Math', {
  23098. imulh: function imulh(u, v) {
  23099. var UINT16 = 0xffff;
  23100. var $u = +u;
  23101. var $v = +v;
  23102. var u0 = $u & UINT16;
  23103. var v0 = $v & UINT16;
  23104. var u1 = $u >> 16;
  23105. var v1 = $v >> 16;
  23106. var t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16);
  23107. return u1 * v1 + (t >> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >> 16);
  23108. }
  23109. });
  23110. /***/ }),
  23111. /* 305 */
  23112. /***/ (function(module, exports, __webpack_require__) {
  23113. // https://rwaldron.github.io/proposal-math-extensions/
  23114. var $export = __webpack_require__(0);
  23115. $export($export.S, 'Math', { RAD_PER_DEG: 180 / Math.PI });
  23116. /***/ }),
  23117. /* 306 */
  23118. /***/ (function(module, exports, __webpack_require__) {
  23119. // https://rwaldron.github.io/proposal-math-extensions/
  23120. var $export = __webpack_require__(0);
  23121. var DEG_PER_RAD = Math.PI / 180;
  23122. $export($export.S, 'Math', {
  23123. radians: function radians(degrees) {
  23124. return degrees * DEG_PER_RAD;
  23125. }
  23126. });
  23127. /***/ }),
  23128. /* 307 */
  23129. /***/ (function(module, exports, __webpack_require__) {
  23130. // https://rwaldron.github.io/proposal-math-extensions/
  23131. var $export = __webpack_require__(0);
  23132. $export($export.S, 'Math', { scale: __webpack_require__(124) });
  23133. /***/ }),
  23134. /* 308 */
  23135. /***/ (function(module, exports, __webpack_require__) {
  23136. // https://gist.github.com/BrendanEich/4294d5c212a6d2254703
  23137. var $export = __webpack_require__(0);
  23138. $export($export.S, 'Math', {
  23139. umulh: function umulh(u, v) {
  23140. var UINT16 = 0xffff;
  23141. var $u = +u;
  23142. var $v = +v;
  23143. var u0 = $u & UINT16;
  23144. var v0 = $v & UINT16;
  23145. var u1 = $u >>> 16;
  23146. var v1 = $v >>> 16;
  23147. var t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16);
  23148. return u1 * v1 + (t >>> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >>> 16);
  23149. }
  23150. });
  23151. /***/ }),
  23152. /* 309 */
  23153. /***/ (function(module, exports, __webpack_require__) {
  23154. // http://jfbastien.github.io/papers/Math.signbit.html
  23155. var $export = __webpack_require__(0);
  23156. $export($export.S, 'Math', { signbit: function signbit(x) {
  23157. // eslint-disable-next-line no-self-compare
  23158. return (x = +x) != x ? x : x == 0 ? 1 / x == Infinity : x > 0;
  23159. } });
  23160. /***/ }),
  23161. /* 310 */
  23162. /***/ (function(module, exports, __webpack_require__) {
  23163. "use strict";
  23164. // https://github.com/tc39/proposal-promise-finally
  23165. var $export = __webpack_require__(0);
  23166. var core = __webpack_require__(13);
  23167. var global = __webpack_require__(2);
  23168. var speciesConstructor = __webpack_require__(60);
  23169. var promiseResolve = __webpack_require__(112);
  23170. $export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) {
  23171. var C = speciesConstructor(this, core.Promise || global.Promise);
  23172. var isFunction = typeof onFinally == 'function';
  23173. return this.then(
  23174. isFunction ? function (x) {
  23175. return promiseResolve(C, onFinally()).then(function () { return x; });
  23176. } : onFinally,
  23177. isFunction ? function (e) {
  23178. return promiseResolve(C, onFinally()).then(function () { throw e; });
  23179. } : onFinally
  23180. );
  23181. } });
  23182. /***/ }),
  23183. /* 311 */
  23184. /***/ (function(module, exports, __webpack_require__) {
  23185. "use strict";
  23186. // https://github.com/tc39/proposal-promise-try
  23187. var $export = __webpack_require__(0);
  23188. var newPromiseCapability = __webpack_require__(91);
  23189. var perform = __webpack_require__(111);
  23190. $export($export.S, 'Promise', { 'try': function (callbackfn) {
  23191. var promiseCapability = newPromiseCapability.f(this);
  23192. var result = perform(callbackfn);
  23193. (result.e ? promiseCapability.reject : promiseCapability.resolve)(result.v);
  23194. return promiseCapability.promise;
  23195. } });
  23196. /***/ }),
  23197. /* 312 */
  23198. /***/ (function(module, exports, __webpack_require__) {
  23199. var metadata = __webpack_require__(30);
  23200. var anObject = __webpack_require__(1);
  23201. var toMetaKey = metadata.key;
  23202. var ordinaryDefineOwnMetadata = metadata.set;
  23203. metadata.exp({ defineMetadata: function defineMetadata(metadataKey, metadataValue, target, targetKey) {
  23204. ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), toMetaKey(targetKey));
  23205. } });
  23206. /***/ }),
  23207. /* 313 */
  23208. /***/ (function(module, exports, __webpack_require__) {
  23209. var metadata = __webpack_require__(30);
  23210. var anObject = __webpack_require__(1);
  23211. var toMetaKey = metadata.key;
  23212. var getOrCreateMetadataMap = metadata.map;
  23213. var store = metadata.store;
  23214. metadata.exp({ deleteMetadata: function deleteMetadata(metadataKey, target /* , targetKey */) {
  23215. var targetKey = arguments.length < 3 ? undefined : toMetaKey(arguments[2]);
  23216. var metadataMap = getOrCreateMetadataMap(anObject(target), targetKey, false);
  23217. if (metadataMap === undefined || !metadataMap['delete'](metadataKey)) return false;
  23218. if (metadataMap.size) return true;
  23219. var targetMetadata = store.get(target);
  23220. targetMetadata['delete'](targetKey);
  23221. return !!targetMetadata.size || store['delete'](target);
  23222. } });
  23223. /***/ }),
  23224. /* 314 */
  23225. /***/ (function(module, exports, __webpack_require__) {
  23226. var metadata = __webpack_require__(30);
  23227. var anObject = __webpack_require__(1);
  23228. var getPrototypeOf = __webpack_require__(17);
  23229. var ordinaryHasOwnMetadata = metadata.has;
  23230. var ordinaryGetOwnMetadata = metadata.get;
  23231. var toMetaKey = metadata.key;
  23232. var ordinaryGetMetadata = function (MetadataKey, O, P) {
  23233. var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P);
  23234. if (hasOwn) return ordinaryGetOwnMetadata(MetadataKey, O, P);
  23235. var parent = getPrototypeOf(O);
  23236. return parent !== null ? ordinaryGetMetadata(MetadataKey, parent, P) : undefined;
  23237. };
  23238. metadata.exp({ getMetadata: function getMetadata(metadataKey, target /* , targetKey */) {
  23239. return ordinaryGetMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
  23240. } });
  23241. /***/ }),
  23242. /* 315 */
  23243. /***/ (function(module, exports, __webpack_require__) {
  23244. var Set = __webpack_require__(115);
  23245. var from = __webpack_require__(123);
  23246. var metadata = __webpack_require__(30);
  23247. var anObject = __webpack_require__(1);
  23248. var getPrototypeOf = __webpack_require__(17);
  23249. var ordinaryOwnMetadataKeys = metadata.keys;
  23250. var toMetaKey = metadata.key;
  23251. var ordinaryMetadataKeys = function (O, P) {
  23252. var oKeys = ordinaryOwnMetadataKeys(O, P);
  23253. var parent = getPrototypeOf(O);
  23254. if (parent === null) return oKeys;
  23255. var pKeys = ordinaryMetadataKeys(parent, P);
  23256. return pKeys.length ? oKeys.length ? from(new Set(oKeys.concat(pKeys))) : pKeys : oKeys;
  23257. };
  23258. metadata.exp({ getMetadataKeys: function getMetadataKeys(target /* , targetKey */) {
  23259. return ordinaryMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1]));
  23260. } });
  23261. /***/ }),
  23262. /* 316 */
  23263. /***/ (function(module, exports, __webpack_require__) {
  23264. var metadata = __webpack_require__(30);
  23265. var anObject = __webpack_require__(1);
  23266. var ordinaryGetOwnMetadata = metadata.get;
  23267. var toMetaKey = metadata.key;
  23268. metadata.exp({ getOwnMetadata: function getOwnMetadata(metadataKey, target /* , targetKey */) {
  23269. return ordinaryGetOwnMetadata(metadataKey, anObject(target)
  23270. , arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
  23271. } });
  23272. /***/ }),
  23273. /* 317 */
  23274. /***/ (function(module, exports, __webpack_require__) {
  23275. var metadata = __webpack_require__(30);
  23276. var anObject = __webpack_require__(1);
  23277. var ordinaryOwnMetadataKeys = metadata.keys;
  23278. var toMetaKey = metadata.key;
  23279. metadata.exp({ getOwnMetadataKeys: function getOwnMetadataKeys(target /* , targetKey */) {
  23280. return ordinaryOwnMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1]));
  23281. } });
  23282. /***/ }),
  23283. /* 318 */
  23284. /***/ (function(module, exports, __webpack_require__) {
  23285. var metadata = __webpack_require__(30);
  23286. var anObject = __webpack_require__(1);
  23287. var getPrototypeOf = __webpack_require__(17);
  23288. var ordinaryHasOwnMetadata = metadata.has;
  23289. var toMetaKey = metadata.key;
  23290. var ordinaryHasMetadata = function (MetadataKey, O, P) {
  23291. var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P);
  23292. if (hasOwn) return true;
  23293. var parent = getPrototypeOf(O);
  23294. return parent !== null ? ordinaryHasMetadata(MetadataKey, parent, P) : false;
  23295. };
  23296. metadata.exp({ hasMetadata: function hasMetadata(metadataKey, target /* , targetKey */) {
  23297. return ordinaryHasMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
  23298. } });
  23299. /***/ }),
  23300. /* 319 */
  23301. /***/ (function(module, exports, __webpack_require__) {
  23302. var metadata = __webpack_require__(30);
  23303. var anObject = __webpack_require__(1);
  23304. var ordinaryHasOwnMetadata = metadata.has;
  23305. var toMetaKey = metadata.key;
  23306. metadata.exp({ hasOwnMetadata: function hasOwnMetadata(metadataKey, target /* , targetKey */) {
  23307. return ordinaryHasOwnMetadata(metadataKey, anObject(target)
  23308. , arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
  23309. } });
  23310. /***/ }),
  23311. /* 320 */
  23312. /***/ (function(module, exports, __webpack_require__) {
  23313. var $metadata = __webpack_require__(30);
  23314. var anObject = __webpack_require__(1);
  23315. var aFunction = __webpack_require__(10);
  23316. var toMetaKey = $metadata.key;
  23317. var ordinaryDefineOwnMetadata = $metadata.set;
  23318. $metadata.exp({ metadata: function metadata(metadataKey, metadataValue) {
  23319. return function decorator(target, targetKey) {
  23320. ordinaryDefineOwnMetadata(
  23321. metadataKey, metadataValue,
  23322. (targetKey !== undefined ? anObject : aFunction)(target),
  23323. toMetaKey(targetKey)
  23324. );
  23325. };
  23326. } });
  23327. /***/ }),
  23328. /* 321 */
  23329. /***/ (function(module, exports, __webpack_require__) {
  23330. // https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-09/sept-25.md#510-globalasap-for-enqueuing-a-microtask
  23331. var $export = __webpack_require__(0);
  23332. var microtask = __webpack_require__(90)();
  23333. var process = __webpack_require__(2).process;
  23334. var isNode = __webpack_require__(20)(process) == 'process';
  23335. $export($export.G, {
  23336. asap: function asap(fn) {
  23337. var domain = isNode && process.domain;
  23338. microtask(domain ? domain.bind(fn) : fn);
  23339. }
  23340. });
  23341. /***/ }),
  23342. /* 322 */
  23343. /***/ (function(module, exports, __webpack_require__) {
  23344. "use strict";
  23345. // https://github.com/zenparsing/es-observable
  23346. var $export = __webpack_require__(0);
  23347. var global = __webpack_require__(2);
  23348. var core = __webpack_require__(13);
  23349. var microtask = __webpack_require__(90)();
  23350. var OBSERVABLE = __webpack_require__(5)('observable');
  23351. var aFunction = __webpack_require__(10);
  23352. var anObject = __webpack_require__(1);
  23353. var anInstance = __webpack_require__(42);
  23354. var redefineAll = __webpack_require__(43);
  23355. var hide = __webpack_require__(14);
  23356. var forOf = __webpack_require__(35);
  23357. var RETURN = forOf.RETURN;
  23358. var getMethod = function (fn) {
  23359. return fn == null ? undefined : aFunction(fn);
  23360. };
  23361. var cleanupSubscription = function (subscription) {
  23362. var cleanup = subscription._c;
  23363. if (cleanup) {
  23364. subscription._c = undefined;
  23365. cleanup();
  23366. }
  23367. };
  23368. var subscriptionClosed = function (subscription) {
  23369. return subscription._o === undefined;
  23370. };
  23371. var closeSubscription = function (subscription) {
  23372. if (!subscriptionClosed(subscription)) {
  23373. subscription._o = undefined;
  23374. cleanupSubscription(subscription);
  23375. }
  23376. };
  23377. var Subscription = function (observer, subscriber) {
  23378. anObject(observer);
  23379. this._c = undefined;
  23380. this._o = observer;
  23381. observer = new SubscriptionObserver(this);
  23382. try {
  23383. var cleanup = subscriber(observer);
  23384. var subscription = cleanup;
  23385. if (cleanup != null) {
  23386. if (typeof cleanup.unsubscribe === 'function') cleanup = function () { subscription.unsubscribe(); };
  23387. else aFunction(cleanup);
  23388. this._c = cleanup;
  23389. }
  23390. } catch (e) {
  23391. observer.error(e);
  23392. return;
  23393. } if (subscriptionClosed(this)) cleanupSubscription(this);
  23394. };
  23395. Subscription.prototype = redefineAll({}, {
  23396. unsubscribe: function unsubscribe() { closeSubscription(this); }
  23397. });
  23398. var SubscriptionObserver = function (subscription) {
  23399. this._s = subscription;
  23400. };
  23401. SubscriptionObserver.prototype = redefineAll({}, {
  23402. next: function next(value) {
  23403. var subscription = this._s;
  23404. if (!subscriptionClosed(subscription)) {
  23405. var observer = subscription._o;
  23406. try {
  23407. var m = getMethod(observer.next);
  23408. if (m) return m.call(observer, value);
  23409. } catch (e) {
  23410. try {
  23411. closeSubscription(subscription);
  23412. } finally {
  23413. throw e;
  23414. }
  23415. }
  23416. }
  23417. },
  23418. error: function error(value) {
  23419. var subscription = this._s;
  23420. if (subscriptionClosed(subscription)) throw value;
  23421. var observer = subscription._o;
  23422. subscription._o = undefined;
  23423. try {
  23424. var m = getMethod(observer.error);
  23425. if (!m) throw value;
  23426. value = m.call(observer, value);
  23427. } catch (e) {
  23428. try {
  23429. cleanupSubscription(subscription);
  23430. } finally {
  23431. throw e;
  23432. }
  23433. } cleanupSubscription(subscription);
  23434. return value;
  23435. },
  23436. complete: function complete(value) {
  23437. var subscription = this._s;
  23438. if (!subscriptionClosed(subscription)) {
  23439. var observer = subscription._o;
  23440. subscription._o = undefined;
  23441. try {
  23442. var m = getMethod(observer.complete);
  23443. value = m ? m.call(observer, value) : undefined;
  23444. } catch (e) {
  23445. try {
  23446. cleanupSubscription(subscription);
  23447. } finally {
  23448. throw e;
  23449. }
  23450. } cleanupSubscription(subscription);
  23451. return value;
  23452. }
  23453. }
  23454. });
  23455. var $Observable = function Observable(subscriber) {
  23456. anInstance(this, $Observable, 'Observable', '_f')._f = aFunction(subscriber);
  23457. };
  23458. redefineAll($Observable.prototype, {
  23459. subscribe: function subscribe(observer) {
  23460. return new Subscription(observer, this._f);
  23461. },
  23462. forEach: function forEach(fn) {
  23463. var that = this;
  23464. return new (core.Promise || global.Promise)(function (resolve, reject) {
  23465. aFunction(fn);
  23466. var subscription = that.subscribe({
  23467. next: function (value) {
  23468. try {
  23469. return fn(value);
  23470. } catch (e) {
  23471. reject(e);
  23472. subscription.unsubscribe();
  23473. }
  23474. },
  23475. error: reject,
  23476. complete: resolve
  23477. });
  23478. });
  23479. }
  23480. });
  23481. redefineAll($Observable, {
  23482. from: function from(x) {
  23483. var C = typeof this === 'function' ? this : $Observable;
  23484. var method = getMethod(anObject(x)[OBSERVABLE]);
  23485. if (method) {
  23486. var observable = anObject(method.call(x));
  23487. return observable.constructor === C ? observable : new C(function (observer) {
  23488. return observable.subscribe(observer);
  23489. });
  23490. }
  23491. return new C(function (observer) {
  23492. var done = false;
  23493. microtask(function () {
  23494. if (!done) {
  23495. try {
  23496. if (forOf(x, false, function (it) {
  23497. observer.next(it);
  23498. if (done) return RETURN;
  23499. }) === RETURN) return;
  23500. } catch (e) {
  23501. if (done) throw e;
  23502. observer.error(e);
  23503. return;
  23504. } observer.complete();
  23505. }
  23506. });
  23507. return function () { done = true; };
  23508. });
  23509. },
  23510. of: function of() {
  23511. for (var i = 0, l = arguments.length, items = new Array(l); i < l;) items[i] = arguments[i++];
  23512. return new (typeof this === 'function' ? this : $Observable)(function (observer) {
  23513. var done = false;
  23514. microtask(function () {
  23515. if (!done) {
  23516. for (var j = 0; j < items.length; ++j) {
  23517. observer.next(items[j]);
  23518. if (done) return;
  23519. } observer.complete();
  23520. }
  23521. });
  23522. return function () { done = true; };
  23523. });
  23524. }
  23525. });
  23526. hide($Observable.prototype, OBSERVABLE, function () { return this; });
  23527. $export($export.G, { Observable: $Observable });
  23528. __webpack_require__(41)('Observable');
  23529. /***/ }),
  23530. /* 323 */
  23531. /***/ (function(module, exports, __webpack_require__) {
  23532. var $export = __webpack_require__(0);
  23533. var $task = __webpack_require__(89);
  23534. $export($export.G + $export.B, {
  23535. setImmediate: $task.set,
  23536. clearImmediate: $task.clear
  23537. });
  23538. /***/ }),
  23539. /* 324 */
  23540. /***/ (function(module, exports, __webpack_require__) {
  23541. var $iterators = __webpack_require__(87);
  23542. var getKeys = __webpack_require__(27);
  23543. var redefine = __webpack_require__(15);
  23544. var global = __webpack_require__(2);
  23545. var hide = __webpack_require__(14);
  23546. var Iterators = __webpack_require__(40);
  23547. var wks = __webpack_require__(5);
  23548. var ITERATOR = wks('iterator');
  23549. var TO_STRING_TAG = wks('toStringTag');
  23550. var ArrayValues = Iterators.Array;
  23551. var DOMIterables = {
  23552. CSSRuleList: true, // TODO: Not spec compliant, should be false.
  23553. CSSStyleDeclaration: false,
  23554. CSSValueList: false,
  23555. ClientRectList: false,
  23556. DOMRectList: false,
  23557. DOMStringList: false,
  23558. DOMTokenList: true,
  23559. DataTransferItemList: false,
  23560. FileList: false,
  23561. HTMLAllCollection: false,
  23562. HTMLCollection: false,
  23563. HTMLFormElement: false,
  23564. HTMLSelectElement: false,
  23565. MediaList: true, // TODO: Not spec compliant, should be false.
  23566. MimeTypeArray: false,
  23567. NamedNodeMap: false,
  23568. NodeList: true,
  23569. PaintRequestList: false,
  23570. Plugin: false,
  23571. PluginArray: false,
  23572. SVGLengthList: false,
  23573. SVGNumberList: false,
  23574. SVGPathSegList: false,
  23575. SVGPointList: false,
  23576. SVGStringList: false,
  23577. SVGTransformList: false,
  23578. SourceBufferList: false,
  23579. StyleSheetList: true, // TODO: Not spec compliant, should be false.
  23580. TextTrackCueList: false,
  23581. TextTrackList: false,
  23582. TouchList: false
  23583. };
  23584. for (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) {
  23585. var NAME = collections[i];
  23586. var explicit = DOMIterables[NAME];
  23587. var Collection = global[NAME];
  23588. var proto = Collection && Collection.prototype;
  23589. var key;
  23590. if (proto) {
  23591. if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues);
  23592. if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);
  23593. Iterators[NAME] = ArrayValues;
  23594. if (explicit) for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true);
  23595. }
  23596. }
  23597. /***/ }),
  23598. /* 325 */
  23599. /***/ (function(module, exports, __webpack_require__) {
  23600. // ie9- setTimeout & setInterval additional parameters fix
  23601. var global = __webpack_require__(2);
  23602. var $export = __webpack_require__(0);
  23603. var userAgent = __webpack_require__(61);
  23604. var slice = [].slice;
  23605. var MSIE = /MSIE .\./.test(userAgent); // <- dirty ie9- check
  23606. var wrap = function (set) {
  23607. return function (fn, time /* , ...args */) {
  23608. var boundArgs = arguments.length > 2;
  23609. var args = boundArgs ? slice.call(arguments, 2) : false;
  23610. return set(boundArgs ? function () {
  23611. // eslint-disable-next-line no-new-func
  23612. (typeof fn == 'function' ? fn : Function(fn)).apply(this, args);
  23613. } : fn, time);
  23614. };
  23615. };
  23616. $export($export.G + $export.B + $export.F * MSIE, {
  23617. setTimeout: wrap(global.setTimeout),
  23618. setInterval: wrap(global.setInterval)
  23619. });
  23620. /***/ }),
  23621. /* 326 */
  23622. /***/ (function(module, exports, __webpack_require__) {
  23623. "use strict";
  23624. var ctx = __webpack_require__(19);
  23625. var $export = __webpack_require__(0);
  23626. var createDesc = __webpack_require__(31);
  23627. var assign = __webpack_require__(72);
  23628. var create = __webpack_require__(28);
  23629. var getPrototypeOf = __webpack_require__(17);
  23630. var getKeys = __webpack_require__(27);
  23631. var dP = __webpack_require__(6);
  23632. var keyOf = __webpack_require__(327);
  23633. var aFunction = __webpack_require__(10);
  23634. var forOf = __webpack_require__(35);
  23635. var isIterable = __webpack_require__(125);
  23636. var $iterCreate = __webpack_require__(56);
  23637. var step = __webpack_require__(88);
  23638. var isObject = __webpack_require__(3);
  23639. var toIObject = __webpack_require__(11);
  23640. var DESCRIPTORS = __webpack_require__(7);
  23641. var has = __webpack_require__(12);
  23642. // 0 -> Dict.forEach
  23643. // 1 -> Dict.map
  23644. // 2 -> Dict.filter
  23645. // 3 -> Dict.some
  23646. // 4 -> Dict.every
  23647. // 5 -> Dict.find
  23648. // 6 -> Dict.findKey
  23649. // 7 -> Dict.mapPairs
  23650. var createDictMethod = function (TYPE) {
  23651. var IS_MAP = TYPE == 1;
  23652. var IS_EVERY = TYPE == 4;
  23653. return function (object, callbackfn, that /* = undefined */) {
  23654. var f = ctx(callbackfn, that, 3);
  23655. var O = toIObject(object);
  23656. var result = IS_MAP || TYPE == 7 || TYPE == 2
  23657. ? new (typeof this == 'function' ? this : Dict)() : undefined;
  23658. var key, val, res;
  23659. for (key in O) if (has(O, key)) {
  23660. val = O[key];
  23661. res = f(val, key, object);
  23662. if (TYPE) {
  23663. if (IS_MAP) result[key] = res; // map
  23664. else if (res) switch (TYPE) {
  23665. case 2: result[key] = val; break; // filter
  23666. case 3: return true; // some
  23667. case 5: return val; // find
  23668. case 6: return key; // findKey
  23669. case 7: result[res[0]] = res[1]; // mapPairs
  23670. } else if (IS_EVERY) return false; // every
  23671. }
  23672. }
  23673. return TYPE == 3 || IS_EVERY ? IS_EVERY : result;
  23674. };
  23675. };
  23676. var findKey = createDictMethod(6);
  23677. var createDictIter = function (kind) {
  23678. return function (it) {
  23679. return new DictIterator(it, kind);
  23680. };
  23681. };
  23682. var DictIterator = function (iterated, kind) {
  23683. this._t = toIObject(iterated); // target
  23684. this._a = getKeys(iterated); // keys
  23685. this._i = 0; // next index
  23686. this._k = kind; // kind
  23687. };
  23688. $iterCreate(DictIterator, 'Dict', function () {
  23689. var that = this;
  23690. var O = that._t;
  23691. var keys = that._a;
  23692. var kind = that._k;
  23693. var key;
  23694. do {
  23695. if (that._i >= keys.length) {
  23696. that._t = undefined;
  23697. return step(1);
  23698. }
  23699. } while (!has(O, key = keys[that._i++]));
  23700. if (kind == 'keys') return step(0, key);
  23701. if (kind == 'values') return step(0, O[key]);
  23702. return step(0, [key, O[key]]);
  23703. });
  23704. function Dict(iterable) {
  23705. var dict = create(null);
  23706. if (iterable != undefined) {
  23707. if (isIterable(iterable)) {
  23708. forOf(iterable, true, function (key, value) {
  23709. dict[key] = value;
  23710. });
  23711. } else assign(dict, iterable);
  23712. }
  23713. return dict;
  23714. }
  23715. Dict.prototype = null;
  23716. function reduce(object, mapfn, init) {
  23717. aFunction(mapfn);
  23718. var O = toIObject(object);
  23719. var keys = getKeys(O);
  23720. var length = keys.length;
  23721. var i = 0;
  23722. var memo, key;
  23723. if (arguments.length < 3) {
  23724. if (!length) throw TypeError('Reduce of empty object with no initial value');
  23725. memo = O[keys[i++]];
  23726. } else memo = Object(init);
  23727. while (length > i) if (has(O, key = keys[i++])) {
  23728. memo = mapfn(memo, O[key], key, object);
  23729. }
  23730. return memo;
  23731. }
  23732. function includes(object, el) {
  23733. // eslint-disable-next-line no-self-compare
  23734. return (el == el ? keyOf(object, el) : findKey(object, function (it) {
  23735. // eslint-disable-next-line no-self-compare
  23736. return it != it;
  23737. })) !== undefined;
  23738. }
  23739. function get(object, key) {
  23740. if (has(object, key)) return object[key];
  23741. }
  23742. function set(object, key, value) {
  23743. if (DESCRIPTORS && key in Object) dP.f(object, key, createDesc(0, value));
  23744. else object[key] = value;
  23745. return object;
  23746. }
  23747. function isDict(it) {
  23748. return isObject(it) && getPrototypeOf(it) === Dict.prototype;
  23749. }
  23750. $export($export.G + $export.F, { Dict: Dict });
  23751. $export($export.S, 'Dict', {
  23752. keys: createDictIter('keys'),
  23753. values: createDictIter('values'),
  23754. entries: createDictIter('entries'),
  23755. forEach: createDictMethod(0),
  23756. map: createDictMethod(1),
  23757. filter: createDictMethod(2),
  23758. some: createDictMethod(3),
  23759. every: createDictMethod(4),
  23760. find: createDictMethod(5),
  23761. findKey: findKey,
  23762. mapPairs: createDictMethod(7),
  23763. reduce: reduce,
  23764. keyOf: keyOf,
  23765. includes: includes,
  23766. has: has,
  23767. get: get,
  23768. set: set,
  23769. isDict: isDict
  23770. });
  23771. /***/ }),
  23772. /* 327 */
  23773. /***/ (function(module, exports, __webpack_require__) {
  23774. var getKeys = __webpack_require__(27);
  23775. var toIObject = __webpack_require__(11);
  23776. module.exports = function (object, el) {
  23777. var O = toIObject(object);
  23778. var keys = getKeys(O);
  23779. var length = keys.length;
  23780. var index = 0;
  23781. var key;
  23782. while (length > index) if (O[key = keys[index++]] === el) return key;
  23783. };
  23784. /***/ }),
  23785. /* 328 */
  23786. /***/ (function(module, exports, __webpack_require__) {
  23787. var anObject = __webpack_require__(1);
  23788. var get = __webpack_require__(49);
  23789. module.exports = __webpack_require__(13).getIterator = function (it) {
  23790. var iterFn = get(it);
  23791. if (typeof iterFn != 'function') throw TypeError(it + ' is not iterable!');
  23792. return anObject(iterFn.call(it));
  23793. };
  23794. /***/ }),
  23795. /* 329 */
  23796. /***/ (function(module, exports, __webpack_require__) {
  23797. var global = __webpack_require__(2);
  23798. var core = __webpack_require__(13);
  23799. var $export = __webpack_require__(0);
  23800. var partial = __webpack_require__(126);
  23801. // https://esdiscuss.org/topic/promise-returning-delay-function
  23802. $export($export.G + $export.F, {
  23803. delay: function delay(time) {
  23804. return new (core.Promise || global.Promise)(function (resolve) {
  23805. setTimeout(partial.call(resolve, true), time);
  23806. });
  23807. }
  23808. });
  23809. /***/ }),
  23810. /* 330 */
  23811. /***/ (function(module, exports, __webpack_require__) {
  23812. var path = __webpack_require__(127);
  23813. var $export = __webpack_require__(0);
  23814. // Placeholder
  23815. __webpack_require__(13)._ = path._ = path._ || {};
  23816. $export($export.P + $export.F, 'Function', { part: __webpack_require__(126) });
  23817. /***/ }),
  23818. /* 331 */
  23819. /***/ (function(module, exports, __webpack_require__) {
  23820. var $export = __webpack_require__(0);
  23821. $export($export.S + $export.F, 'Object', { isObject: __webpack_require__(3) });
  23822. /***/ }),
  23823. /* 332 */
  23824. /***/ (function(module, exports, __webpack_require__) {
  23825. var $export = __webpack_require__(0);
  23826. $export($export.S + $export.F, 'Object', { classof: __webpack_require__(39) });
  23827. /***/ }),
  23828. /* 333 */
  23829. /***/ (function(module, exports, __webpack_require__) {
  23830. var $export = __webpack_require__(0);
  23831. var define = __webpack_require__(128);
  23832. $export($export.S + $export.F, 'Object', { define: define });
  23833. /***/ }),
  23834. /* 334 */
  23835. /***/ (function(module, exports, __webpack_require__) {
  23836. var $export = __webpack_require__(0);
  23837. var define = __webpack_require__(128);
  23838. var create = __webpack_require__(28);
  23839. $export($export.S + $export.F, 'Object', {
  23840. make: function (proto, mixin) {
  23841. return define(create(proto), mixin);
  23842. }
  23843. });
  23844. /***/ }),
  23845. /* 335 */
  23846. /***/ (function(module, exports, __webpack_require__) {
  23847. "use strict";
  23848. __webpack_require__(55)(Number, 'Number', function (iterated) {
  23849. this._l = +iterated;
  23850. this._i = 0;
  23851. }, function () {
  23852. var i = this._i++;
  23853. var done = !(i < this._l);
  23854. return { done: done, value: done ? undefined : i };
  23855. });
  23856. /***/ }),
  23857. /* 336 */
  23858. /***/ (function(module, exports, __webpack_require__) {
  23859. // https://github.com/benjamingr/RexExp.escape
  23860. var $export = __webpack_require__(0);
  23861. var $re = __webpack_require__(94)(/[\\^$*+?.()|[\]{}]/g, '\\$&');
  23862. $export($export.S, 'RegExp', { escape: function escape(it) { return $re(it); } });
  23863. /***/ }),
  23864. /* 337 */
  23865. /***/ (function(module, exports, __webpack_require__) {
  23866. "use strict";
  23867. var $export = __webpack_require__(0);
  23868. var $re = __webpack_require__(94)(/[&<>"']/g, {
  23869. '&': '&amp;',
  23870. '<': '&lt;',
  23871. '>': '&gt;',
  23872. '"': '&quot;',
  23873. "'": '&apos;'
  23874. });
  23875. $export($export.P + $export.F, 'String', { escapeHTML: function escapeHTML() { return $re(this); } });
  23876. /***/ }),
  23877. /* 338 */
  23878. /***/ (function(module, exports, __webpack_require__) {
  23879. "use strict";
  23880. var $export = __webpack_require__(0);
  23881. var $re = __webpack_require__(94)(/&(?:amp|lt|gt|quot|apos);/g, {
  23882. '&amp;': '&',
  23883. '&lt;': '<',
  23884. '&gt;': '>',
  23885. '&quot;': '"',
  23886. '&apos;': "'"
  23887. });
  23888. $export($export.P + $export.F, 'String', { unescapeHTML: function unescapeHTML() { return $re(this); } });
  23889. /***/ })
  23890. /******/ ]);
  23891. // CommonJS export
  23892. if (typeof module != 'undefined' && module.exports) module.exports = __e;
  23893. // RequireJS export
  23894. else if (typeof define == 'function' && define.amd) define(function () { return __e; });
  23895. // Export to global object
  23896. else __g.core = __e;
  23897. }(1, 1);
  23898. /* flatpickr v4.5.0, @license MIT */
  23899. (function (global, factory) {
  23900. typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
  23901. typeof define === 'function' && define.amd ? define(factory) :
  23902. (global.rangePlugin = factory());
  23903. }(this, (function () { 'use strict';
  23904. function rangePlugin(config) {
  23905. if (config === void 0) {
  23906. config = {};
  23907. }
  23908. return function (fp) {
  23909. var dateFormat = "",
  23910. secondInput,
  23911. _secondInputFocused,
  23912. _prevDates;
  23913. var createSecondInput = function createSecondInput() {
  23914. if (config.input) {
  23915. secondInput = config.input instanceof Element ? config.input : window.document.querySelector(config.input);
  23916. } else {
  23917. secondInput = fp._input.cloneNode();
  23918. secondInput.removeAttribute("id");
  23919. secondInput._flatpickr = undefined;
  23920. }
  23921. if (secondInput.value) {
  23922. var parsedDate = fp.parseDate(secondInput.value);
  23923. if (parsedDate) fp.selectedDates.push(parsedDate);
  23924. }
  23925. secondInput.setAttribute("data-fp-omit", "");
  23926. fp._bind(secondInput, ["focus", "click"], function () {
  23927. if (fp.selectedDates[1]) {
  23928. fp.latestSelectedDateObj = fp.selectedDates[1];
  23929. fp._setHoursFromDate(fp.selectedDates[1]);
  23930. fp.jumpToDate(fp.selectedDates[1]);
  23931. }
  23932. _secondInputFocused = true;
  23933. fp.isOpen = false;
  23934. fp.open(undefined, secondInput);
  23935. });
  23936. fp._bind(fp._input, ["focus", "click"], function (e) {
  23937. e.preventDefault();
  23938. fp.isOpen = false;
  23939. fp.open();
  23940. });
  23941. if (fp.config.allowInput) fp._bind(secondInput, "keydown", function (e) {
  23942. if (e.key === "Enter") {
  23943. fp.setDate([fp.selectedDates[0], secondInput.value], true, dateFormat);
  23944. secondInput.click();
  23945. }
  23946. });
  23947. if (!config.input) fp._input.parentNode && fp._input.parentNode.insertBefore(secondInput, fp._input.nextSibling);
  23948. };
  23949. var plugin = {
  23950. onParseConfig: function onParseConfig() {
  23951. fp.config.mode = "range";
  23952. dateFormat = fp.config.altInput ? fp.config.altFormat : fp.config.dateFormat;
  23953. },
  23954. onReady: function onReady() {
  23955. createSecondInput();
  23956. fp.config.ignoredFocusElements.push(secondInput);
  23957. if (fp.config.allowInput) {
  23958. fp._input.removeAttribute("readonly");
  23959. secondInput.removeAttribute("readonly");
  23960. } else {
  23961. secondInput.setAttribute("readonly", "readonly");
  23962. }
  23963. fp._bind(fp._input, "focus", function () {
  23964. fp.latestSelectedDateObj = fp.selectedDates[0];
  23965. fp._setHoursFromDate(fp.selectedDates[0]);
  23966. _secondInputFocused = false;
  23967. fp.jumpToDate(fp.selectedDates[0]);
  23968. });
  23969. if (fp.config.allowInput) fp._bind(fp._input, "keydown", function (e) {
  23970. if (e.key === "Enter") fp.setDate([fp._input.value, fp.selectedDates[1]], true, dateFormat);
  23971. });
  23972. fp.setDate(fp.selectedDates, false);
  23973. plugin.onValueUpdate(fp.selectedDates);
  23974. },
  23975. onPreCalendarPosition: function onPreCalendarPosition() {
  23976. if (_secondInputFocused) {
  23977. fp._positionElement = secondInput;
  23978. setTimeout(function () {
  23979. fp._positionElement = fp._input;
  23980. }, 0);
  23981. }
  23982. },
  23983. onChange: function onChange() {
  23984. if (!fp.selectedDates.length) {
  23985. setTimeout(function () {
  23986. if (fp.selectedDates.length) return;
  23987. secondInput.value = "";
  23988. _prevDates = [];
  23989. }, 10);
  23990. }
  23991. if (_secondInputFocused) {
  23992. setTimeout(function () {
  23993. secondInput.focus();
  23994. }, 0);
  23995. }
  23996. },
  23997. onDestroy: function onDestroy() {
  23998. if (!config.input) secondInput.parentNode && secondInput.parentNode.removeChild(secondInput);
  23999. },
  24000. onValueUpdate: function onValueUpdate(selDates) {
  24001. if (!secondInput) return;
  24002. _prevDates = !_prevDates || selDates.length >= _prevDates.length ? selDates.concat() : _prevDates;
  24003. if (_prevDates.length > selDates.length) {
  24004. var newSelectedDate = selDates[0];
  24005. var newDates = _secondInputFocused ? [_prevDates[0], newSelectedDate] : [newSelectedDate, _prevDates[1]];
  24006. fp.setDate(newDates, false);
  24007. _prevDates = newDates.concat();
  24008. }
  24009. var _fp$selectedDates$map = fp.selectedDates.map(function (d) {
  24010. return fp.formatDate(d, dateFormat);
  24011. });
  24012. var _fp$selectedDates$map2 = _fp$selectedDates$map[0];
  24013. fp._input.value = _fp$selectedDates$map2 === void 0 ? "" : _fp$selectedDates$map2;
  24014. var _fp$selectedDates$map3 = _fp$selectedDates$map[1];
  24015. secondInput.value = _fp$selectedDates$map3 === void 0 ? "" : _fp$selectedDates$map3;
  24016. }
  24017. };
  24018. return plugin;
  24019. };
  24020. }
  24021. return rangePlugin;
  24022. })));
  24023. /* flatpickr v4.5.0, @license MIT */
  24024. (function (global, factory) {
  24025. typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
  24026. typeof define === 'function' && define.amd ? define(factory) :
  24027. (global.flatpickr = factory());
  24028. }(this, (function () { 'use strict';
  24029. var pad = function pad(number) {
  24030. return ("0" + number).slice(-2);
  24031. };
  24032. var int = function int(bool) {
  24033. return bool === true ? 1 : 0;
  24034. };
  24035. function debounce(func, wait, immediate) {
  24036. if (immediate === void 0) {
  24037. immediate = false;
  24038. }
  24039. var timeout;
  24040. return function () {
  24041. var context = this,
  24042. args = arguments;
  24043. timeout !== null && clearTimeout(timeout);
  24044. timeout = window.setTimeout(function () {
  24045. timeout = null;
  24046. if (!immediate) func.apply(context, args);
  24047. }, wait);
  24048. if (immediate && !timeout) func.apply(context, args);
  24049. };
  24050. }
  24051. var arrayify = function arrayify(obj) {
  24052. return obj instanceof Array ? obj : [obj];
  24053. };
  24054. var do_nothing = function do_nothing() {
  24055. return undefined;
  24056. };
  24057. var monthToStr = function monthToStr(monthNumber, shorthand, locale) {
  24058. return locale.months[shorthand ? "shorthand" : "longhand"][monthNumber];
  24059. };
  24060. var revFormat = {
  24061. D: do_nothing,
  24062. F: function F(dateObj, monthName, locale) {
  24063. dateObj.setMonth(locale.months.longhand.indexOf(monthName));
  24064. },
  24065. G: function G(dateObj, hour) {
  24066. dateObj.setHours(parseFloat(hour));
  24067. },
  24068. H: function H(dateObj, hour) {
  24069. dateObj.setHours(parseFloat(hour));
  24070. },
  24071. J: function J(dateObj, day) {
  24072. dateObj.setDate(parseFloat(day));
  24073. },
  24074. K: function K(dateObj, amPM, locale) {
  24075. dateObj.setHours(dateObj.getHours() % 12 + 12 * int(new RegExp(locale.amPM[1], "i").test(amPM)));
  24076. },
  24077. M: function M(dateObj, shortMonth, locale) {
  24078. dateObj.setMonth(locale.months.shorthand.indexOf(shortMonth));
  24079. },
  24080. S: function S(dateObj, seconds) {
  24081. dateObj.setSeconds(parseFloat(seconds));
  24082. },
  24083. U: function U(_, unixSeconds) {
  24084. return new Date(parseFloat(unixSeconds) * 1000);
  24085. },
  24086. W: function W(dateObj, weekNum) {
  24087. var weekNumber = parseInt(weekNum);
  24088. return new Date(dateObj.getFullYear(), 0, 2 + (weekNumber - 1) * 7, 0, 0, 0, 0);
  24089. },
  24090. Y: function Y(dateObj, year) {
  24091. dateObj.setFullYear(parseFloat(year));
  24092. },
  24093. Z: function Z(_, ISODate) {
  24094. return new Date(ISODate);
  24095. },
  24096. d: function d(dateObj, day) {
  24097. dateObj.setDate(parseFloat(day));
  24098. },
  24099. h: function h(dateObj, hour) {
  24100. dateObj.setHours(parseFloat(hour));
  24101. },
  24102. i: function i(dateObj, minutes) {
  24103. dateObj.setMinutes(parseFloat(minutes));
  24104. },
  24105. j: function j(dateObj, day) {
  24106. dateObj.setDate(parseFloat(day));
  24107. },
  24108. l: do_nothing,
  24109. m: function m(dateObj, month) {
  24110. dateObj.setMonth(parseFloat(month) - 1);
  24111. },
  24112. n: function n(dateObj, month) {
  24113. dateObj.setMonth(parseFloat(month) - 1);
  24114. },
  24115. s: function s(dateObj, seconds) {
  24116. dateObj.setSeconds(parseFloat(seconds));
  24117. },
  24118. w: do_nothing,
  24119. y: function y(dateObj, year) {
  24120. dateObj.setFullYear(2000 + parseFloat(year));
  24121. }
  24122. };
  24123. var tokenRegex = {
  24124. D: "(\\w+)",
  24125. F: "(\\w+)",
  24126. G: "(\\d\\d|\\d)",
  24127. H: "(\\d\\d|\\d)",
  24128. J: "(\\d\\d|\\d)\\w+",
  24129. K: "",
  24130. M: "(\\w+)",
  24131. S: "(\\d\\d|\\d)",
  24132. U: "(.+)",
  24133. W: "(\\d\\d|\\d)",
  24134. Y: "(\\d{4})",
  24135. Z: "(.+)",
  24136. d: "(\\d\\d|\\d)",
  24137. h: "(\\d\\d|\\d)",
  24138. i: "(\\d\\d|\\d)",
  24139. j: "(\\d\\d|\\d)",
  24140. l: "(\\w+)",
  24141. m: "(\\d\\d|\\d)",
  24142. n: "(\\d\\d|\\d)",
  24143. s: "(\\d\\d|\\d)",
  24144. w: "(\\d\\d|\\d)",
  24145. y: "(\\d{2})"
  24146. };
  24147. var formats = {
  24148. Z: function Z(date) {
  24149. return date.toISOString();
  24150. },
  24151. D: function D(date, locale, options) {
  24152. return locale.weekdays.shorthand[formats.w(date, locale, options)];
  24153. },
  24154. F: function F(date, locale, options) {
  24155. return monthToStr(formats.n(date, locale, options) - 1, false, locale);
  24156. },
  24157. G: function G(date, locale, options) {
  24158. return pad(formats.h(date, locale, options));
  24159. },
  24160. H: function H(date) {
  24161. return pad(date.getHours());
  24162. },
  24163. J: function J(date, locale) {
  24164. return locale.ordinal !== undefined ? date.getDate() + locale.ordinal(date.getDate()) : date.getDate();
  24165. },
  24166. K: function K(date, locale) {
  24167. return locale.amPM[int(date.getHours() > 11)];
  24168. },
  24169. M: function M(date, locale) {
  24170. return monthToStr(date.getMonth(), true, locale);
  24171. },
  24172. S: function S(date) {
  24173. return pad(date.getSeconds());
  24174. },
  24175. U: function U(date) {
  24176. return date.getTime() / 1000;
  24177. },
  24178. W: function W(date, _, options) {
  24179. return options.getWeek(date);
  24180. },
  24181. Y: function Y(date) {
  24182. return date.getFullYear();
  24183. },
  24184. d: function d(date) {
  24185. return pad(date.getDate());
  24186. },
  24187. h: function h(date) {
  24188. return date.getHours() % 12 ? date.getHours() % 12 : 12;
  24189. },
  24190. i: function i(date) {
  24191. return pad(date.getMinutes());
  24192. },
  24193. j: function j(date) {
  24194. return date.getDate();
  24195. },
  24196. l: function l(date, locale) {
  24197. return locale.weekdays.longhand[date.getDay()];
  24198. },
  24199. m: function m(date) {
  24200. return pad(date.getMonth() + 1);
  24201. },
  24202. n: function n(date) {
  24203. return date.getMonth() + 1;
  24204. },
  24205. s: function s(date) {
  24206. return date.getSeconds();
  24207. },
  24208. w: function w(date) {
  24209. return date.getDay();
  24210. },
  24211. y: function y(date) {
  24212. return String(date.getFullYear()).substring(2);
  24213. }
  24214. };
  24215. var english = {
  24216. weekdays: {
  24217. shorthand: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
  24218. longhand: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
  24219. },
  24220. months: {
  24221. shorthand: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
  24222. longhand: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]
  24223. },
  24224. daysInMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],
  24225. firstDayOfWeek: 0,
  24226. ordinal: function ordinal(nth) {
  24227. var s = nth % 100;
  24228. if (s > 3 && s < 21) return "th";
  24229. switch (s % 10) {
  24230. case 1:
  24231. return "st";
  24232. case 2:
  24233. return "nd";
  24234. case 3:
  24235. return "rd";
  24236. default:
  24237. return "th";
  24238. }
  24239. },
  24240. rangeSeparator: " to ",
  24241. weekAbbreviation: "Wk",
  24242. scrollTitle: "Scroll to increment",
  24243. toggleTitle: "Click to toggle",
  24244. amPM: ["AM", "PM"],
  24245. yearAriaLabel: "Year"
  24246. };
  24247. var createDateFormatter = function createDateFormatter(_ref) {
  24248. var _ref$config = _ref.config,
  24249. config = _ref$config === void 0 ? defaults : _ref$config,
  24250. _ref$l10n = _ref.l10n,
  24251. l10n = _ref$l10n === void 0 ? english : _ref$l10n;
  24252. return function (dateObj, frmt, overrideLocale) {
  24253. if (config.formatDate !== undefined) return config.formatDate(dateObj, frmt);
  24254. var locale = overrideLocale || l10n;
  24255. return frmt.split("").map(function (c, i, arr) {
  24256. return formats[c] && arr[i - 1] !== "\\" ? formats[c](dateObj, locale, config) : c !== "\\" ? c : "";
  24257. }).join("");
  24258. };
  24259. };
  24260. var createDateParser = function createDateParser(_ref2) {
  24261. var _ref2$config = _ref2.config,
  24262. config = _ref2$config === void 0 ? defaults : _ref2$config,
  24263. _ref2$l10n = _ref2.l10n,
  24264. l10n = _ref2$l10n === void 0 ? english : _ref2$l10n;
  24265. return function (date, givenFormat, timeless) {
  24266. if (date !== 0 && !date) return undefined;
  24267. var parsedDate;
  24268. var date_orig = date;
  24269. if (date instanceof Date) parsedDate = new Date(date.getTime());else if (typeof date !== "string" && date.toFixed !== undefined) parsedDate = new Date(date);else if (typeof date === "string") {
  24270. var format = givenFormat || (config || defaults).dateFormat;
  24271. var datestr = String(date).trim();
  24272. if (datestr === "today") {
  24273. parsedDate = new Date();
  24274. timeless = true;
  24275. } else if (/Z$/.test(datestr) || /GMT$/.test(datestr)) parsedDate = new Date(date);else if (config && config.parseDate) parsedDate = config.parseDate(date, format);else {
  24276. parsedDate = !config || !config.noCalendar ? new Date(new Date().getFullYear(), 0, 1, 0, 0, 0, 0) : new Date(new Date().setHours(0, 0, 0, 0));
  24277. var matched,
  24278. ops = [];
  24279. for (var i = 0, matchIndex = 0, regexStr = ""; i < format.length; i++) {
  24280. var token = format[i];
  24281. var isBackSlash = token === "\\";
  24282. var escaped = format[i - 1] === "\\" || isBackSlash;
  24283. if (tokenRegex[token] && !escaped) {
  24284. regexStr += tokenRegex[token];
  24285. var match = new RegExp(regexStr).exec(date);
  24286. if (match && (matched = true)) {
  24287. ops[token !== "Y" ? "push" : "unshift"]({
  24288. fn: revFormat[token],
  24289. val: match[++matchIndex]
  24290. });
  24291. }
  24292. } else if (!isBackSlash) regexStr += ".";
  24293. ops.forEach(function (_ref3) {
  24294. var fn = _ref3.fn,
  24295. val = _ref3.val;
  24296. return parsedDate = fn(parsedDate, val, l10n) || parsedDate;
  24297. });
  24298. }
  24299. parsedDate = matched ? parsedDate : undefined;
  24300. }
  24301. }
  24302. if (!(parsedDate instanceof Date && !isNaN(parsedDate.getTime()))) {
  24303. config.errorHandler(new Error("Invalid date provided: " + date_orig));
  24304. return undefined;
  24305. }
  24306. if (timeless === true) parsedDate.setHours(0, 0, 0, 0);
  24307. return parsedDate;
  24308. };
  24309. };
  24310. function compareDates(date1, date2, timeless) {
  24311. if (timeless === void 0) {
  24312. timeless = true;
  24313. }
  24314. if (timeless !== false) {
  24315. return new Date(date1.getTime()).setHours(0, 0, 0, 0) - new Date(date2.getTime()).setHours(0, 0, 0, 0);
  24316. }
  24317. return date1.getTime() - date2.getTime();
  24318. }
  24319. var getWeek = function getWeek(givenDate) {
  24320. var date = new Date(givenDate.getTime());
  24321. date.setHours(0, 0, 0, 0);
  24322. date.setDate(date.getDate() + 3 - (date.getDay() + 6) % 7);
  24323. var week1 = new Date(date.getFullYear(), 0, 4);
  24324. return 1 + Math.round(((date.getTime() - week1.getTime()) / 86400000 - 3 + (week1.getDay() + 6) % 7) / 7);
  24325. };
  24326. var isBetween = function isBetween(ts, ts1, ts2) {
  24327. return ts > Math.min(ts1, ts2) && ts < Math.max(ts1, ts2);
  24328. };
  24329. var duration = {
  24330. DAY: 86400000
  24331. };
  24332. var defaults = {
  24333. _disable: [],
  24334. _enable: [],
  24335. allowInput: false,
  24336. altFormat: "F j, Y",
  24337. altInput: false,
  24338. altInputClass: "form-control input",
  24339. animate: typeof window === "object" && window.navigator.userAgent.indexOf("MSIE") === -1,
  24340. ariaDateFormat: "F j, Y",
  24341. clickOpens: true,
  24342. closeOnSelect: true,
  24343. conjunction: ", ",
  24344. dateFormat: "Y-m-d",
  24345. defaultHour: 12,
  24346. defaultMinute: 0,
  24347. defaultSeconds: 0,
  24348. disable: [],
  24349. disableMobile: false,
  24350. enable: [],
  24351. enableSeconds: false,
  24352. enableTime: false,
  24353. errorHandler: function errorHandler(err) {
  24354. return typeof console !== "undefined" && console.warn(err);
  24355. },
  24356. getWeek: getWeek,
  24357. hourIncrement: 1,
  24358. ignoredFocusElements: [],
  24359. inline: false,
  24360. locale: "default",
  24361. minuteIncrement: 5,
  24362. mode: "single",
  24363. nextArrow: "<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",
  24364. noCalendar: false,
  24365. now: new Date(),
  24366. onChange: [],
  24367. onClose: [],
  24368. onDayCreate: [],
  24369. onDestroy: [],
  24370. onKeyDown: [],
  24371. onMonthChange: [],
  24372. onOpen: [],
  24373. onParseConfig: [],
  24374. onReady: [],
  24375. onValueUpdate: [],
  24376. onYearChange: [],
  24377. onPreCalendarPosition: [],
  24378. plugins: [],
  24379. position: "auto",
  24380. positionElement: undefined,
  24381. prevArrow: "<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",
  24382. shorthandCurrentMonth: false,
  24383. showMonths: 1,
  24384. static: false,
  24385. time_24hr: false,
  24386. weekNumbers: false,
  24387. wrap: false
  24388. };
  24389. function toggleClass(elem, className, bool) {
  24390. if (bool === true) return elem.classList.add(className);
  24391. elem.classList.remove(className);
  24392. }
  24393. function createElement(tag, className, content) {
  24394. var e = window.document.createElement(tag);
  24395. className = className || "";
  24396. content = content || "";
  24397. e.className = className;
  24398. if (content !== undefined) e.textContent = content;
  24399. return e;
  24400. }
  24401. function clearNode(node) {
  24402. while (node.firstChild) {
  24403. node.removeChild(node.firstChild);
  24404. }
  24405. }
  24406. function findParent(node, condition) {
  24407. if (condition(node)) return node;else if (node.parentNode) return findParent(node.parentNode, condition);
  24408. return undefined;
  24409. }
  24410. function createNumberInput(inputClassName, opts) {
  24411. var wrapper = createElement("div", "numInputWrapper"),
  24412. numInput = createElement("input", "numInput " + inputClassName),
  24413. arrowUp = createElement("span", "arrowUp"),
  24414. arrowDown = createElement("span", "arrowDown");
  24415. numInput.type = "text";
  24416. numInput.pattern = "\\d*";
  24417. if (opts !== undefined) for (var key in opts) {
  24418. numInput.setAttribute(key, opts[key]);
  24419. }
  24420. wrapper.appendChild(numInput);
  24421. wrapper.appendChild(arrowUp);
  24422. wrapper.appendChild(arrowDown);
  24423. return wrapper;
  24424. }
  24425. if (typeof Object.assign !== "function") {
  24426. Object.assign = function (target) {
  24427. if (!target) {
  24428. throw TypeError("Cannot convert undefined or null to object");
  24429. }
  24430. for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
  24431. args[_key - 1] = arguments[_key];
  24432. }
  24433. var _loop = function _loop() {
  24434. var source = args[_i];
  24435. if (source) {
  24436. Object.keys(source).forEach(function (key) {
  24437. return target[key] = source[key];
  24438. });
  24439. }
  24440. };
  24441. for (var _i = 0; _i < args.length; _i++) {
  24442. _loop();
  24443. }
  24444. return target;
  24445. };
  24446. }
  24447. var DEBOUNCED_CHANGE_MS = 300;
  24448. function FlatpickrInstance(element, instanceConfig) {
  24449. var self = {
  24450. config: Object.assign({}, flatpickr.defaultConfig),
  24451. l10n: english
  24452. };
  24453. self.parseDate = createDateParser({
  24454. config: self.config,
  24455. l10n: self.l10n
  24456. });
  24457. self._handlers = [];
  24458. self._bind = bind;
  24459. self._setHoursFromDate = setHoursFromDate;
  24460. self._positionCalendar = positionCalendar;
  24461. self.changeMonth = changeMonth;
  24462. self.changeYear = changeYear;
  24463. self.clear = clear;
  24464. self.close = close;
  24465. self._createElement = createElement;
  24466. self.destroy = destroy;
  24467. self.isEnabled = isEnabled;
  24468. self.jumpToDate = jumpToDate;
  24469. self.open = open;
  24470. self.redraw = redraw;
  24471. self.set = set;
  24472. self.setDate = setDate;
  24473. self.toggle = toggle;
  24474. function setupHelperFunctions() {
  24475. self.utils = {
  24476. getDaysInMonth: function getDaysInMonth(month, yr) {
  24477. if (month === void 0) {
  24478. month = self.currentMonth;
  24479. }
  24480. if (yr === void 0) {
  24481. yr = self.currentYear;
  24482. }
  24483. if (month === 1 && (yr % 4 === 0 && yr % 100 !== 0 || yr % 400 === 0)) return 29;
  24484. return self.l10n.daysInMonth[month];
  24485. }
  24486. };
  24487. }
  24488. function init() {
  24489. self.element = self.input = element;
  24490. self.isOpen = false;
  24491. parseConfig();
  24492. setupLocale();
  24493. setupInputs();
  24494. setupDates();
  24495. setupHelperFunctions();
  24496. if (!self.isMobile) build();
  24497. bindEvents();
  24498. if (self.selectedDates.length || self.config.noCalendar) {
  24499. if (self.config.enableTime) {
  24500. setHoursFromDate(self.config.noCalendar ? self.latestSelectedDateObj || self.config.minDate : undefined);
  24501. }
  24502. updateValue(false);
  24503. }
  24504. setCalendarWidth();
  24505. self.showTimeInput = self.selectedDates.length > 0 || self.config.noCalendar;
  24506. var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
  24507. if (!self.isMobile && isSafari) {
  24508. positionCalendar();
  24509. }
  24510. triggerEvent("onReady");
  24511. }
  24512. function bindToInstance(fn) {
  24513. return fn.bind(self);
  24514. }
  24515. function setCalendarWidth() {
  24516. var config = self.config;
  24517. if (config.weekNumbers === false && config.showMonths === 1) return;else if (config.noCalendar !== true) {
  24518. window.requestAnimationFrame(function () {
  24519. self.calendarContainer.style.visibility = "hidden";
  24520. self.calendarContainer.style.display = "block";
  24521. if (self.daysContainer !== undefined) {
  24522. var daysWidth = (self.days.offsetWidth + 1) * config.showMonths;
  24523. self.daysContainer.style.width = daysWidth + "px";
  24524. self.calendarContainer.style.width = daysWidth + (self.weekWrapper !== undefined ? self.weekWrapper.offsetWidth : 0) + "px";
  24525. self.calendarContainer.style.removeProperty("visibility");
  24526. self.calendarContainer.style.removeProperty("display");
  24527. }
  24528. });
  24529. }
  24530. }
  24531. function updateTime(e) {
  24532. if (self.selectedDates.length === 0) return;
  24533. if (e !== undefined && e.type !== "blur") timeWrapper(e);
  24534. setHoursFromInputs();
  24535. updateValue();
  24536. self._debouncedChange();
  24537. }
  24538. function ampm2military(hour, amPM) {
  24539. return hour % 12 + 12 * int(amPM === self.l10n.amPM[1]);
  24540. }
  24541. function military2ampm(hour) {
  24542. switch (hour % 24) {
  24543. case 0:
  24544. case 12:
  24545. return 12;
  24546. default:
  24547. return hour % 12;
  24548. }
  24549. }
  24550. function setHoursFromInputs() {
  24551. if (self.hourElement === undefined || self.minuteElement === undefined) return;
  24552. var hours = (parseInt(self.hourElement.value.slice(-2), 10) || 0) % 24,
  24553. minutes = (parseInt(self.minuteElement.value, 10) || 0) % 60,
  24554. seconds = self.secondElement !== undefined ? (parseInt(self.secondElement.value, 10) || 0) % 60 : 0;
  24555. if (self.amPM !== undefined) {
  24556. hours = ampm2military(hours, self.amPM.textContent);
  24557. }
  24558. var limitMinHours = self.config.minTime !== undefined || self.config.minDate && self.minDateHasTime && self.latestSelectedDateObj && compareDates(self.latestSelectedDateObj, self.config.minDate, true) === 0;
  24559. var limitMaxHours = self.config.maxTime !== undefined || self.config.maxDate && self.maxDateHasTime && self.latestSelectedDateObj && compareDates(self.latestSelectedDateObj, self.config.maxDate, true) === 0;
  24560. if (limitMaxHours) {
  24561. var maxTime = self.config.maxTime !== undefined ? self.config.maxTime : self.config.maxDate;
  24562. hours = Math.min(hours, maxTime.getHours());
  24563. if (hours === maxTime.getHours()) minutes = Math.min(minutes, maxTime.getMinutes());
  24564. if (minutes === maxTime.getMinutes()) seconds = Math.min(seconds, maxTime.getSeconds());
  24565. }
  24566. if (limitMinHours) {
  24567. var minTime = self.config.minTime !== undefined ? self.config.minTime : self.config.minDate;
  24568. hours = Math.max(hours, minTime.getHours());
  24569. if (hours === minTime.getHours()) minutes = Math.max(minutes, minTime.getMinutes());
  24570. if (minutes === minTime.getMinutes()) seconds = Math.max(seconds, minTime.getSeconds());
  24571. }
  24572. setHours(hours, minutes, seconds);
  24573. }
  24574. function setHoursFromDate(dateObj) {
  24575. var date = dateObj || self.latestSelectedDateObj;
  24576. if (date) setHours(date.getHours(), date.getMinutes(), date.getSeconds());
  24577. }
  24578. function setDefaultHours() {
  24579. var hours = self.config.defaultHour;
  24580. var minutes = self.config.defaultMinute;
  24581. var seconds = self.config.defaultSeconds;
  24582. if (self.config.minDate !== undefined) {
  24583. var min_hr = self.config.minDate.getHours();
  24584. var min_minutes = self.config.minDate.getMinutes();
  24585. hours = Math.max(hours, min_hr);
  24586. if (hours === min_hr) minutes = Math.max(min_minutes, minutes);
  24587. if (hours === min_hr && minutes === min_minutes) seconds = self.config.minDate.getSeconds();
  24588. }
  24589. if (self.config.maxDate !== undefined) {
  24590. var max_hr = self.config.maxDate.getHours();
  24591. var max_minutes = self.config.maxDate.getMinutes();
  24592. hours = Math.min(hours, max_hr);
  24593. if (hours === max_hr) minutes = Math.min(max_minutes, minutes);
  24594. if (hours === max_hr && minutes === max_minutes) seconds = self.config.maxDate.getSeconds();
  24595. }
  24596. setHours(hours, minutes, seconds);
  24597. }
  24598. function setHours(hours, minutes, seconds) {
  24599. if (self.latestSelectedDateObj !== undefined) {
  24600. self.latestSelectedDateObj.setHours(hours % 24, minutes, seconds || 0, 0);
  24601. }
  24602. if (!self.hourElement || !self.minuteElement || self.isMobile) return;
  24603. self.hourElement.value = pad(!self.config.time_24hr ? (12 + hours) % 12 + 12 * int(hours % 12 === 0) : hours);
  24604. self.minuteElement.value = pad(minutes);
  24605. if (self.amPM !== undefined) self.amPM.textContent = self.l10n.amPM[int(hours >= 12)];
  24606. if (self.secondElement !== undefined) self.secondElement.value = pad(seconds);
  24607. }
  24608. function onYearInput(event) {
  24609. var year = parseInt(event.target.value) + (event.delta || 0);
  24610. if (year / 1000 > 1 || event.key === "Enter" && !/[^\d]/.test(year.toString())) {
  24611. changeYear(year);
  24612. }
  24613. }
  24614. function bind(element, event, handler, options) {
  24615. if (event instanceof Array) return event.forEach(function (ev) {
  24616. return bind(element, ev, handler, options);
  24617. });
  24618. if (element instanceof Array) return element.forEach(function (el) {
  24619. return bind(el, event, handler, options);
  24620. });
  24621. element.addEventListener(event, handler, options);
  24622. self._handlers.push({
  24623. element: element,
  24624. event: event,
  24625. handler: handler,
  24626. options: options
  24627. });
  24628. }
  24629. function onClick(handler) {
  24630. return function (evt) {
  24631. evt.which === 1 && handler(evt);
  24632. };
  24633. }
  24634. function triggerChange() {
  24635. triggerEvent("onChange");
  24636. }
  24637. function bindEvents() {
  24638. if (self.config.wrap) {
  24639. ["open", "close", "toggle", "clear"].forEach(function (evt) {
  24640. Array.prototype.forEach.call(self.element.querySelectorAll("[data-" + evt + "]"), function (el) {
  24641. return bind(el, "click", self[evt]);
  24642. });
  24643. });
  24644. }
  24645. if (self.isMobile) {
  24646. setupMobile();
  24647. return;
  24648. }
  24649. var debouncedResize = debounce(onResize, 50);
  24650. self._debouncedChange = debounce(triggerChange, DEBOUNCED_CHANGE_MS);
  24651. if (self.daysContainer && !/iPhone|iPad|iPod/i.test(navigator.userAgent)) bind(self.daysContainer, "mouseover", function (e) {
  24652. if (self.config.mode === "range") onMouseOver(e.target);
  24653. });
  24654. bind(window.document.body, "keydown", onKeyDown);
  24655. if (!self.config.static) bind(self._input, "keydown", onKeyDown);
  24656. if (!self.config.inline && !self.config.static) bind(window, "resize", debouncedResize);
  24657. if (window.ontouchstart !== undefined) bind(window.document, "click", documentClick);else bind(window.document, "mousedown", onClick(documentClick));
  24658. bind(window.document, "focus", documentClick, {
  24659. capture: true
  24660. });
  24661. if (self.config.clickOpens === true) {
  24662. bind(self._input, "focus", self.open);
  24663. bind(self._input, "mousedown", onClick(self.open));
  24664. }
  24665. if (self.daysContainer !== undefined) {
  24666. bind(self.monthNav, "mousedown", onClick(onMonthNavClick));
  24667. bind(self.monthNav, ["keyup", "increment"], onYearInput);
  24668. bind(self.daysContainer, "mousedown", onClick(selectDate));
  24669. }
  24670. if (self.timeContainer !== undefined && self.minuteElement !== undefined && self.hourElement !== undefined) {
  24671. var selText = function selText(e) {
  24672. return e.target.select();
  24673. };
  24674. bind(self.timeContainer, ["increment"], updateTime);
  24675. bind(self.timeContainer, "blur", updateTime, {
  24676. capture: true
  24677. });
  24678. bind(self.timeContainer, "mousedown", onClick(timeIncrement));
  24679. bind([self.hourElement, self.minuteElement], ["focus", "click"], selText);
  24680. if (self.secondElement !== undefined) bind(self.secondElement, "focus", function () {
  24681. return self.secondElement && self.secondElement.select();
  24682. });
  24683. if (self.amPM !== undefined) {
  24684. bind(self.amPM, "mousedown", onClick(function (e) {
  24685. updateTime(e);
  24686. triggerChange();
  24687. }));
  24688. }
  24689. }
  24690. }
  24691. function jumpToDate(jumpDate) {
  24692. var jumpTo = jumpDate !== undefined ? self.parseDate(jumpDate) : self.latestSelectedDateObj || (self.config.minDate && self.config.minDate > self.now ? self.config.minDate : self.config.maxDate && self.config.maxDate < self.now ? self.config.maxDate : self.now);
  24693. try {
  24694. if (jumpTo !== undefined) {
  24695. self.currentYear = jumpTo.getFullYear();
  24696. self.currentMonth = jumpTo.getMonth();
  24697. }
  24698. } catch (e) {
  24699. e.message = "Invalid date supplied: " + jumpTo;
  24700. self.config.errorHandler(e);
  24701. }
  24702. self.redraw();
  24703. }
  24704. function timeIncrement(e) {
  24705. if (~e.target.className.indexOf("arrow")) incrementNumInput(e, e.target.classList.contains("arrowUp") ? 1 : -1);
  24706. }
  24707. function incrementNumInput(e, delta, inputElem) {
  24708. var target = e && e.target;
  24709. var input = inputElem || target && target.parentNode && target.parentNode.firstChild;
  24710. var event = createEvent("increment");
  24711. event.delta = delta;
  24712. input && input.dispatchEvent(event);
  24713. }
  24714. function build() {
  24715. var fragment = window.document.createDocumentFragment();
  24716. self.calendarContainer = createElement("div", "flatpickr-calendar");
  24717. self.calendarContainer.tabIndex = -1;
  24718. if (!self.config.noCalendar) {
  24719. fragment.appendChild(buildMonthNav());
  24720. self.innerContainer = createElement("div", "flatpickr-innerContainer");
  24721. if (self.config.weekNumbers) {
  24722. var _buildWeeks = buildWeeks(),
  24723. weekWrapper = _buildWeeks.weekWrapper,
  24724. weekNumbers = _buildWeeks.weekNumbers;
  24725. self.innerContainer.appendChild(weekWrapper);
  24726. self.weekNumbers = weekNumbers;
  24727. self.weekWrapper = weekWrapper;
  24728. }
  24729. self.rContainer = createElement("div", "flatpickr-rContainer");
  24730. self.rContainer.appendChild(buildWeekdays());
  24731. if (!self.daysContainer) {
  24732. self.daysContainer = createElement("div", "flatpickr-days");
  24733. self.daysContainer.tabIndex = -1;
  24734. }
  24735. buildDays();
  24736. self.rContainer.appendChild(self.daysContainer);
  24737. self.innerContainer.appendChild(self.rContainer);
  24738. fragment.appendChild(self.innerContainer);
  24739. }
  24740. if (self.config.enableTime) {
  24741. fragment.appendChild(buildTime());
  24742. }
  24743. toggleClass(self.calendarContainer, "rangeMode", self.config.mode === "range");
  24744. toggleClass(self.calendarContainer, "animate", self.config.animate === true);
  24745. toggleClass(self.calendarContainer, "multiMonth", self.config.showMonths > 1);
  24746. self.calendarContainer.appendChild(fragment);
  24747. var customAppend = self.config.appendTo !== undefined && self.config.appendTo.nodeType !== undefined;
  24748. if (self.config.inline || self.config.static) {
  24749. self.calendarContainer.classList.add(self.config.inline ? "inline" : "static");
  24750. if (self.config.inline) {
  24751. if (!customAppend && self.element.parentNode) self.element.parentNode.insertBefore(self.calendarContainer, self._input.nextSibling);else if (self.config.appendTo !== undefined) self.config.appendTo.appendChild(self.calendarContainer);
  24752. }
  24753. if (self.config.static) {
  24754. var wrapper = createElement("div", "flatpickr-wrapper");
  24755. if (self.element.parentNode) self.element.parentNode.insertBefore(wrapper, self.element);
  24756. wrapper.appendChild(self.element);
  24757. if (self.altInput) wrapper.appendChild(self.altInput);
  24758. wrapper.appendChild(self.calendarContainer);
  24759. }
  24760. }
  24761. if (!self.config.static && !self.config.inline) (self.config.appendTo !== undefined ? self.config.appendTo : window.document.body).appendChild(self.calendarContainer);
  24762. }
  24763. function createDay(className, date, dayNumber, i) {
  24764. var dateIsEnabled = isEnabled(date, true),
  24765. dayElement = createElement("span", "flatpickr-day " + className, date.getDate().toString());
  24766. dayElement.dateObj = date;
  24767. dayElement.$i = i;
  24768. dayElement.setAttribute("aria-label", self.formatDate(date, self.config.ariaDateFormat));
  24769. if (className.indexOf("hidden") === -1 && compareDates(date, self.now) === 0) {
  24770. self.todayDateElem = dayElement;
  24771. dayElement.classList.add("today");
  24772. dayElement.setAttribute("aria-current", "date");
  24773. }
  24774. if (dateIsEnabled) {
  24775. dayElement.tabIndex = -1;
  24776. if (isDateSelected(date)) {
  24777. dayElement.classList.add("selected");
  24778. self.selectedDateElem = dayElement;
  24779. if (self.config.mode === "range") {
  24780. toggleClass(dayElement, "startRange", self.selectedDates[0] && compareDates(date, self.selectedDates[0], true) === 0);
  24781. toggleClass(dayElement, "endRange", self.selectedDates[1] && compareDates(date, self.selectedDates[1], true) === 0);
  24782. if (className === "nextMonthDay") dayElement.classList.add("inRange");
  24783. }
  24784. }
  24785. } else {
  24786. dayElement.classList.add("disabled");
  24787. }
  24788. if (self.config.mode === "range") {
  24789. if (isDateInRange(date) && !isDateSelected(date)) dayElement.classList.add("inRange");
  24790. }
  24791. if (self.weekNumbers && self.config.showMonths === 1 && className !== "prevMonthDay" && dayNumber % 7 === 1) {
  24792. self.weekNumbers.insertAdjacentHTML("beforeend", "<span class='flatpickr-day'>" + self.config.getWeek(date) + "</span>");
  24793. }
  24794. triggerEvent("onDayCreate", dayElement);
  24795. return dayElement;
  24796. }
  24797. function focusOnDayElem(targetNode) {
  24798. targetNode.focus();
  24799. if (self.config.mode === "range") onMouseOver(targetNode);
  24800. }
  24801. function getFirstAvailableDay(delta) {
  24802. var startMonth = delta > 0 ? 0 : self.config.showMonths - 1;
  24803. var endMonth = delta > 0 ? self.config.showMonths : -1;
  24804. for (var m = startMonth; m != endMonth; m += delta) {
  24805. var month = self.daysContainer.children[m];
  24806. var startIndex = delta > 0 ? 0 : month.children.length - 1;
  24807. var endIndex = delta > 0 ? month.children.length : -1;
  24808. for (var i = startIndex; i != endIndex; i += delta) {
  24809. var c = month.children[i];
  24810. if (c.className.indexOf("hidden") === -1 && isEnabled(c.dateObj)) return c;
  24811. }
  24812. }
  24813. return undefined;
  24814. }
  24815. function getNextAvailableDay(current, delta) {
  24816. var givenMonth = current.className.indexOf("Month") === -1 ? current.dateObj.getMonth() : self.currentMonth;
  24817. var endMonth = delta > 0 ? self.config.showMonths : -1;
  24818. var loopDelta = delta > 0 ? 1 : -1;
  24819. for (var m = givenMonth - self.currentMonth; m != endMonth; m += loopDelta) {
  24820. var month = self.daysContainer.children[m];
  24821. var startIndex = givenMonth - self.currentMonth === m ? current.$i + delta : delta < 0 ? month.children.length - 1 : 0;
  24822. var numMonthDays = month.children.length;
  24823. for (var i = startIndex; i >= 0 && i < numMonthDays && i != (delta > 0 ? numMonthDays : -1); i += loopDelta) {
  24824. var c = month.children[i];
  24825. if (c.className.indexOf("hidden") === -1 && isEnabled(c.dateObj) && Math.abs(current.$i - i) >= Math.abs(delta)) return focusOnDayElem(c);
  24826. }
  24827. }
  24828. self.changeMonth(loopDelta);
  24829. focusOnDay(getFirstAvailableDay(loopDelta), 0);
  24830. return undefined;
  24831. }
  24832. function focusOnDay(current, offset) {
  24833. var dayFocused = isInView(document.activeElement);
  24834. var startElem = current !== undefined ? current : dayFocused ? document.activeElement : self.selectedDateElem !== undefined && isInView(self.selectedDateElem) ? self.selectedDateElem : self.todayDateElem !== undefined && isInView(self.todayDateElem) ? self.todayDateElem : getFirstAvailableDay(offset > 0 ? 1 : -1);
  24835. if (startElem === undefined) return self._input.focus();
  24836. if (!dayFocused) return focusOnDayElem(startElem);
  24837. getNextAvailableDay(startElem, offset);
  24838. }
  24839. function buildMonthDays(year, month) {
  24840. var firstOfMonth = (new Date(year, month, 1).getDay() - self.l10n.firstDayOfWeek + 7) % 7;
  24841. var prevMonthDays = self.utils.getDaysInMonth((month - 1 + 12) % 12);
  24842. var daysInMonth = self.utils.getDaysInMonth(month),
  24843. days = window.document.createDocumentFragment(),
  24844. isMultiMonth = self.config.showMonths > 1,
  24845. prevMonthDayClass = isMultiMonth ? "prevMonthDay hidden" : "prevMonthDay",
  24846. nextMonthDayClass = isMultiMonth ? "nextMonthDay hidden" : "nextMonthDay";
  24847. var dayNumber = prevMonthDays + 1 - firstOfMonth,
  24848. dayIndex = 0;
  24849. for (; dayNumber <= prevMonthDays; dayNumber++, dayIndex++) {
  24850. days.appendChild(createDay(prevMonthDayClass, new Date(year, month - 1, dayNumber), dayNumber, dayIndex));
  24851. }
  24852. for (dayNumber = 1; dayNumber <= daysInMonth; dayNumber++, dayIndex++) {
  24853. days.appendChild(createDay("", new Date(year, month, dayNumber), dayNumber, dayIndex));
  24854. }
  24855. for (var dayNum = daysInMonth + 1; dayNum <= 42 - firstOfMonth && (self.config.showMonths === 1 || dayIndex % 7 !== 0); dayNum++, dayIndex++) {
  24856. days.appendChild(createDay(nextMonthDayClass, new Date(year, month + 1, dayNum % daysInMonth), dayNum, dayIndex));
  24857. }
  24858. var dayContainer = createElement("div", "dayContainer");
  24859. dayContainer.appendChild(days);
  24860. return dayContainer;
  24861. }
  24862. function buildDays() {
  24863. if (self.daysContainer === undefined) {
  24864. return;
  24865. }
  24866. clearNode(self.daysContainer);
  24867. if (self.weekNumbers) clearNode(self.weekNumbers);
  24868. var frag = document.createDocumentFragment();
  24869. for (var i = 0; i < self.config.showMonths; i++) {
  24870. var d = new Date(self.currentYear, self.currentMonth, 1);
  24871. d.setMonth(self.currentMonth + i);
  24872. frag.appendChild(buildMonthDays(d.getFullYear(), d.getMonth()));
  24873. }
  24874. self.daysContainer.appendChild(frag);
  24875. self.days = self.daysContainer.firstChild;
  24876. }
  24877. function buildMonth() {
  24878. var container = createElement("div", "flatpickr-month");
  24879. var monthNavFragment = window.document.createDocumentFragment();
  24880. var monthElement = createElement("span", "cur-month");
  24881. monthElement.title = self.l10n.scrollTitle;
  24882. var yearInput = createNumberInput("cur-year", {
  24883. tabindex: "-1"
  24884. });
  24885. var yearElement = yearInput.childNodes[0];
  24886. yearElement.title = self.l10n.scrollTitle;
  24887. yearElement.setAttribute("aria-label", self.l10n.yearAriaLabel);
  24888. if (self.config.minDate) yearElement.setAttribute("data-min", self.config.minDate.getFullYear().toString());
  24889. if (self.config.maxDate) {
  24890. yearElement.setAttribute("data-max", self.config.maxDate.getFullYear().toString());
  24891. yearElement.disabled = !!self.config.minDate && self.config.minDate.getFullYear() === self.config.maxDate.getFullYear();
  24892. }
  24893. var currentMonth = createElement("div", "flatpickr-current-month");
  24894. currentMonth.appendChild(monthElement);
  24895. currentMonth.appendChild(yearInput);
  24896. monthNavFragment.appendChild(currentMonth);
  24897. container.appendChild(monthNavFragment);
  24898. return {
  24899. container: container,
  24900. yearElement: yearElement,
  24901. monthElement: monthElement
  24902. };
  24903. }
  24904. function buildMonths() {
  24905. clearNode(self.monthNav);
  24906. self.monthNav.appendChild(self.prevMonthNav);
  24907. for (var m = self.config.showMonths; m--;) {
  24908. var month = buildMonth();
  24909. self.yearElements.push(month.yearElement);
  24910. self.monthElements.push(month.monthElement);
  24911. self.monthNav.appendChild(month.container);
  24912. }
  24913. self.monthNav.appendChild(self.nextMonthNav);
  24914. }
  24915. function buildMonthNav() {
  24916. self.monthNav = createElement("div", "flatpickr-months");
  24917. self.yearElements = [];
  24918. self.monthElements = [];
  24919. self.prevMonthNav = createElement("span", "flatpickr-prev-month");
  24920. self.prevMonthNav.innerHTML = self.config.prevArrow;
  24921. self.nextMonthNav = createElement("span", "flatpickr-next-month");
  24922. self.nextMonthNav.innerHTML = self.config.nextArrow;
  24923. buildMonths();
  24924. Object.defineProperty(self, "_hidePrevMonthArrow", {
  24925. get: function get() {
  24926. return self.__hidePrevMonthArrow;
  24927. },
  24928. set: function set(bool) {
  24929. if (self.__hidePrevMonthArrow !== bool) {
  24930. toggleClass(self.prevMonthNav, "disabled", bool);
  24931. self.__hidePrevMonthArrow = bool;
  24932. }
  24933. }
  24934. });
  24935. Object.defineProperty(self, "_hideNextMonthArrow", {
  24936. get: function get() {
  24937. return self.__hideNextMonthArrow;
  24938. },
  24939. set: function set(bool) {
  24940. if (self.__hideNextMonthArrow !== bool) {
  24941. toggleClass(self.nextMonthNav, "disabled", bool);
  24942. self.__hideNextMonthArrow = bool;
  24943. }
  24944. }
  24945. });
  24946. self.currentYearElement = self.yearElements[0];
  24947. updateNavigationCurrentMonth();
  24948. return self.monthNav;
  24949. }
  24950. function buildTime() {
  24951. self.calendarContainer.classList.add("hasTime");
  24952. if (self.config.noCalendar) self.calendarContainer.classList.add("noCalendar");
  24953. self.timeContainer = createElement("div", "flatpickr-time");
  24954. self.timeContainer.tabIndex = -1;
  24955. var separator = createElement("span", "flatpickr-time-separator", ":");
  24956. var hourInput = createNumberInput("flatpickr-hour");
  24957. self.hourElement = hourInput.childNodes[0];
  24958. var minuteInput = createNumberInput("flatpickr-minute");
  24959. self.minuteElement = minuteInput.childNodes[0];
  24960. self.hourElement.tabIndex = self.minuteElement.tabIndex = -1;
  24961. self.hourElement.value = pad(self.latestSelectedDateObj ? self.latestSelectedDateObj.getHours() : self.config.time_24hr ? self.config.defaultHour : military2ampm(self.config.defaultHour));
  24962. self.minuteElement.value = pad(self.latestSelectedDateObj ? self.latestSelectedDateObj.getMinutes() : self.config.defaultMinute);
  24963. self.hourElement.setAttribute("data-step", self.config.hourIncrement.toString());
  24964. self.minuteElement.setAttribute("data-step", self.config.minuteIncrement.toString());
  24965. self.hourElement.setAttribute("data-min", self.config.time_24hr ? "0" : "1");
  24966. self.hourElement.setAttribute("data-max", self.config.time_24hr ? "23" : "12");
  24967. self.minuteElement.setAttribute("data-min", "0");
  24968. self.minuteElement.setAttribute("data-max", "59");
  24969. self.timeContainer.appendChild(hourInput);
  24970. self.timeContainer.appendChild(separator);
  24971. self.timeContainer.appendChild(minuteInput);
  24972. if (self.config.time_24hr) self.timeContainer.classList.add("time24hr");
  24973. if (self.config.enableSeconds) {
  24974. self.timeContainer.classList.add("hasSeconds");
  24975. var secondInput = createNumberInput("flatpickr-second");
  24976. self.secondElement = secondInput.childNodes[0];
  24977. self.secondElement.value = pad(self.latestSelectedDateObj ? self.latestSelectedDateObj.getSeconds() : self.config.defaultSeconds);
  24978. self.secondElement.setAttribute("data-step", self.minuteElement.getAttribute("data-step"));
  24979. self.secondElement.setAttribute("data-min", self.minuteElement.getAttribute("data-min"));
  24980. self.secondElement.setAttribute("data-max", self.minuteElement.getAttribute("data-max"));
  24981. self.timeContainer.appendChild(createElement("span", "flatpickr-time-separator", ":"));
  24982. self.timeContainer.appendChild(secondInput);
  24983. }
  24984. if (!self.config.time_24hr) {
  24985. self.amPM = createElement("span", "flatpickr-am-pm", self.l10n.amPM[int((self.latestSelectedDateObj ? self.hourElement.value : self.config.defaultHour) > 11)]);
  24986. self.amPM.title = self.l10n.toggleTitle;
  24987. self.amPM.tabIndex = -1;
  24988. self.timeContainer.appendChild(self.amPM);
  24989. }
  24990. return self.timeContainer;
  24991. }
  24992. function buildWeekdays() {
  24993. if (!self.weekdayContainer) self.weekdayContainer = createElement("div", "flatpickr-weekdays");else clearNode(self.weekdayContainer);
  24994. for (var i = self.config.showMonths; i--;) {
  24995. var container = createElement("div", "flatpickr-weekdaycontainer");
  24996. self.weekdayContainer.appendChild(container);
  24997. }
  24998. updateWeekdays();
  24999. return self.weekdayContainer;
  25000. }
  25001. function updateWeekdays() {
  25002. var firstDayOfWeek = self.l10n.firstDayOfWeek;
  25003. var weekdays = self.l10n.weekdays.shorthand.concat();
  25004. if (firstDayOfWeek > 0 && firstDayOfWeek < weekdays.length) {
  25005. weekdays = weekdays.splice(firstDayOfWeek, weekdays.length).concat(weekdays.splice(0, firstDayOfWeek));
  25006. }
  25007. for (var i = self.config.showMonths; i--;) {
  25008. self.weekdayContainer.children[i].innerHTML = "\n <span class=flatpickr-weekday>\n " + weekdays.join("</span><span class=flatpickr-weekday>") + "\n </span>\n ";
  25009. }
  25010. }
  25011. function buildWeeks() {
  25012. self.calendarContainer.classList.add("hasWeeks");
  25013. var weekWrapper = createElement("div", "flatpickr-weekwrapper");
  25014. weekWrapper.appendChild(createElement("span", "flatpickr-weekday", self.l10n.weekAbbreviation));
  25015. var weekNumbers = createElement("div", "flatpickr-weeks");
  25016. weekWrapper.appendChild(weekNumbers);
  25017. return {
  25018. weekWrapper: weekWrapper,
  25019. weekNumbers: weekNumbers
  25020. };
  25021. }
  25022. function changeMonth(value, is_offset) {
  25023. if (is_offset === void 0) {
  25024. is_offset = true;
  25025. }
  25026. var delta = is_offset ? value : value - self.currentMonth;
  25027. if (delta < 0 && self._hidePrevMonthArrow === true || delta > 0 && self._hideNextMonthArrow === true) return;
  25028. self.currentMonth += delta;
  25029. if (self.currentMonth < 0 || self.currentMonth > 11) {
  25030. self.currentYear += self.currentMonth > 11 ? 1 : -1;
  25031. self.currentMonth = (self.currentMonth + 12) % 12;
  25032. triggerEvent("onYearChange");
  25033. }
  25034. buildDays();
  25035. triggerEvent("onMonthChange");
  25036. updateNavigationCurrentMonth();
  25037. }
  25038. function clear(triggerChangeEvent) {
  25039. if (triggerChangeEvent === void 0) {
  25040. triggerChangeEvent = true;
  25041. }
  25042. self.input.value = "";
  25043. if (self.altInput !== undefined) self.altInput.value = "";
  25044. if (self.mobileInput !== undefined) self.mobileInput.value = "";
  25045. self.selectedDates = [];
  25046. self.latestSelectedDateObj = undefined;
  25047. self.showTimeInput = false;
  25048. if (self.config.enableTime === true) {
  25049. setDefaultHours();
  25050. }
  25051. self.redraw();
  25052. if (triggerChangeEvent) triggerEvent("onChange");
  25053. }
  25054. function close() {
  25055. self.isOpen = false;
  25056. if (!self.isMobile) {
  25057. self.calendarContainer.classList.remove("open");
  25058. self._input.classList.remove("active");
  25059. }
  25060. triggerEvent("onClose");
  25061. }
  25062. function destroy() {
  25063. if (self.config !== undefined) triggerEvent("onDestroy");
  25064. for (var i = self._handlers.length; i--;) {
  25065. var h = self._handlers[i];
  25066. h.element.removeEventListener(h.event, h.handler, h.options);
  25067. }
  25068. self._handlers = [];
  25069. if (self.mobileInput) {
  25070. if (self.mobileInput.parentNode) self.mobileInput.parentNode.removeChild(self.mobileInput);
  25071. self.mobileInput = undefined;
  25072. } else if (self.calendarContainer && self.calendarContainer.parentNode) self.calendarContainer.parentNode.removeChild(self.calendarContainer);
  25073. if (self.altInput) {
  25074. self.input.type = "text";
  25075. if (self.altInput.parentNode) self.altInput.parentNode.removeChild(self.altInput);
  25076. delete self.altInput;
  25077. }
  25078. if (self.input) {
  25079. self.input.type = self.input._type;
  25080. self.input.classList.remove("flatpickr-input");
  25081. self.input.removeAttribute("readonly");
  25082. self.input.value = "";
  25083. }
  25084. ["_showTimeInput", "latestSelectedDateObj", "_hideNextMonthArrow", "_hidePrevMonthArrow", "__hideNextMonthArrow", "__hidePrevMonthArrow", "isMobile", "isOpen", "selectedDateElem", "minDateHasTime", "maxDateHasTime", "days", "daysContainer", "_input", "_positionElement", "innerContainer", "rContainer", "monthNav", "todayDateElem", "calendarContainer", "weekdayContainer", "prevMonthNav", "nextMonthNav", "currentMonthElement", "currentYearElement", "navigationCurrentMonth", "selectedDateElem", "config"].forEach(function (k) {
  25085. try {
  25086. delete self[k];
  25087. } catch (_) {}
  25088. });
  25089. }
  25090. function isCalendarElem(elem) {
  25091. if (self.config.appendTo && self.config.appendTo.contains(elem)) return true;
  25092. return self.calendarContainer.contains(elem);
  25093. }
  25094. function documentClick(e) {
  25095. if (self.isOpen && !self.config.inline) {
  25096. var isCalendarElement = isCalendarElem(e.target);
  25097. var isInput = e.target === self.input || e.target === self.altInput || self.element.contains(e.target) || e.path && e.path.indexOf && (~e.path.indexOf(self.input) || ~e.path.indexOf(self.altInput));
  25098. var lostFocus = e.type === "blur" ? isInput && e.relatedTarget && !isCalendarElem(e.relatedTarget) : !isInput && !isCalendarElement;
  25099. var isIgnored = !self.config.ignoredFocusElements.some(function (elem) {
  25100. return elem.contains(e.target);
  25101. });
  25102. if (lostFocus && isIgnored) {
  25103. self.close();
  25104. if (self.config.mode === "range" && self.selectedDates.length === 1) {
  25105. self.clear(false);
  25106. self.redraw();
  25107. }
  25108. }
  25109. }
  25110. }
  25111. function changeYear(newYear) {
  25112. if (!newYear || self.config.minDate && newYear < self.config.minDate.getFullYear() || self.config.maxDate && newYear > self.config.maxDate.getFullYear()) return;
  25113. var newYearNum = newYear,
  25114. isNewYear = self.currentYear !== newYearNum;
  25115. self.currentYear = newYearNum || self.currentYear;
  25116. if (self.config.maxDate && self.currentYear === self.config.maxDate.getFullYear()) {
  25117. self.currentMonth = Math.min(self.config.maxDate.getMonth(), self.currentMonth);
  25118. } else if (self.config.minDate && self.currentYear === self.config.minDate.getFullYear()) {
  25119. self.currentMonth = Math.max(self.config.minDate.getMonth(), self.currentMonth);
  25120. }
  25121. if (isNewYear) {
  25122. self.redraw();
  25123. triggerEvent("onYearChange");
  25124. }
  25125. }
  25126. function isEnabled(date, timeless) {
  25127. if (timeless === void 0) {
  25128. timeless = true;
  25129. }
  25130. var dateToCheck = self.parseDate(date, undefined, timeless);
  25131. if (self.config.minDate && dateToCheck && compareDates(dateToCheck, self.config.minDate, timeless !== undefined ? timeless : !self.minDateHasTime) < 0 || self.config.maxDate && dateToCheck && compareDates(dateToCheck, self.config.maxDate, timeless !== undefined ? timeless : !self.maxDateHasTime) > 0) return false;
  25132. if (self.config.enable.length === 0 && self.config.disable.length === 0) return true;
  25133. if (dateToCheck === undefined) return false;
  25134. var bool = self.config.enable.length > 0,
  25135. array = bool ? self.config.enable : self.config.disable;
  25136. for (var i = 0, d; i < array.length; i++) {
  25137. d = array[i];
  25138. if (typeof d === "function" && d(dateToCheck)) return bool;else if (d instanceof Date && dateToCheck !== undefined && d.getTime() === dateToCheck.getTime()) return bool;else if (typeof d === "string" && dateToCheck !== undefined) {
  25139. var parsed = self.parseDate(d, undefined, true);
  25140. return parsed && parsed.getTime() === dateToCheck.getTime() ? bool : !bool;
  25141. } else if (typeof d === "object" && dateToCheck !== undefined && d.from && d.to && dateToCheck.getTime() >= d.from.getTime() && dateToCheck.getTime() <= d.to.getTime()) return bool;
  25142. }
  25143. return !bool;
  25144. }
  25145. function isInView(elem) {
  25146. if (self.daysContainer !== undefined) return elem.className.indexOf("hidden") === -1 && self.daysContainer.contains(elem);
  25147. return false;
  25148. }
  25149. function onKeyDown(e) {
  25150. var isInput = e.target === self._input;
  25151. var allowInput = self.config.allowInput;
  25152. var allowKeydown = self.isOpen && (!allowInput || !isInput);
  25153. var allowInlineKeydown = self.config.inline && isInput && !allowInput;
  25154. if (e.keyCode === 13 && isInput) {
  25155. if (allowInput) {
  25156. self.setDate(self._input.value, true, e.target === self.altInput ? self.config.altFormat : self.config.dateFormat);
  25157. return e.target.blur();
  25158. } else self.open();
  25159. } else if (isCalendarElem(e.target) || allowKeydown || allowInlineKeydown) {
  25160. var isTimeObj = !!self.timeContainer && self.timeContainer.contains(e.target);
  25161. switch (e.keyCode) {
  25162. case 13:
  25163. if (isTimeObj) updateTime();else selectDate(e);
  25164. break;
  25165. case 27:
  25166. e.preventDefault();
  25167. focusAndClose();
  25168. break;
  25169. case 8:
  25170. case 46:
  25171. if (isInput && !self.config.allowInput) {
  25172. e.preventDefault();
  25173. self.clear();
  25174. }
  25175. break;
  25176. case 37:
  25177. case 39:
  25178. if (!isTimeObj) {
  25179. e.preventDefault();
  25180. if (self.daysContainer !== undefined && (allowInput === false || isInView(document.activeElement))) {
  25181. var _delta = e.keyCode === 39 ? 1 : -1;
  25182. if (!e.ctrlKey) focusOnDay(undefined, _delta);else {
  25183. changeMonth(_delta);
  25184. focusOnDay(getFirstAvailableDay(1), 0);
  25185. }
  25186. }
  25187. } else if (self.hourElement) self.hourElement.focus();
  25188. break;
  25189. case 38:
  25190. case 40:
  25191. e.preventDefault();
  25192. var delta = e.keyCode === 40 ? 1 : -1;
  25193. if (self.daysContainer) {
  25194. if (e.ctrlKey) {
  25195. changeYear(self.currentYear - delta);
  25196. focusOnDay(getFirstAvailableDay(1), 0);
  25197. } else if (!isTimeObj) focusOnDay(undefined, delta * 7);
  25198. } else if (self.config.enableTime) {
  25199. if (!isTimeObj && self.hourElement) self.hourElement.focus();
  25200. updateTime(e);
  25201. self._debouncedChange();
  25202. }
  25203. break;
  25204. case 9:
  25205. if (!isTimeObj) break;
  25206. var elems = [self.hourElement, self.minuteElement, self.secondElement, self.amPM].filter(function (x) {
  25207. return x;
  25208. });
  25209. var i = elems.indexOf(e.target);
  25210. if (i !== -1) {
  25211. var target = elems[i + (e.shiftKey ? -1 : 1)];
  25212. if (target !== undefined) {
  25213. e.preventDefault();
  25214. target.focus();
  25215. }
  25216. }
  25217. break;
  25218. default:
  25219. break;
  25220. }
  25221. }
  25222. if (self.amPM !== undefined && e.target === self.amPM) {
  25223. switch (e.key) {
  25224. case self.l10n.amPM[0].charAt(0):
  25225. case self.l10n.amPM[0].charAt(0).toLowerCase():
  25226. self.amPM.textContent = self.l10n.amPM[0];
  25227. setHoursFromInputs();
  25228. updateValue();
  25229. break;
  25230. case self.l10n.amPM[1].charAt(0):
  25231. case self.l10n.amPM[1].charAt(0).toLowerCase():
  25232. self.amPM.textContent = self.l10n.amPM[1];
  25233. setHoursFromInputs();
  25234. updateValue();
  25235. break;
  25236. }
  25237. }
  25238. triggerEvent("onKeyDown", e);
  25239. }
  25240. function onMouseOver(elem) {
  25241. if (self.selectedDates.length !== 1 || !elem.classList.contains("flatpickr-day") || elem.classList.contains("disabled")) return;
  25242. var hoverDate = elem.dateObj.getTime(),
  25243. initialDate = self.parseDate(self.selectedDates[0], undefined, true).getTime(),
  25244. rangeStartDate = Math.min(hoverDate, self.selectedDates[0].getTime()),
  25245. rangeEndDate = Math.max(hoverDate, self.selectedDates[0].getTime());
  25246. var containsDisabled = false;
  25247. var minRange = 0,
  25248. maxRange = 0;
  25249. for (var t = rangeStartDate; t < rangeEndDate; t += duration.DAY) {
  25250. if (!isEnabled(new Date(t), true)) {
  25251. containsDisabled = containsDisabled || t > rangeStartDate && t < rangeEndDate;
  25252. if (t < initialDate && (!minRange || t > minRange)) minRange = t;else if (t > initialDate && (!maxRange || t < maxRange)) maxRange = t;
  25253. }
  25254. }
  25255. for (var m = 0; m < self.config.showMonths; m++) {
  25256. var month = self.daysContainer.children[m];
  25257. var prevMonth = self.daysContainer.children[m - 1];
  25258. var _loop = function _loop(i, l) {
  25259. var dayElem = month.children[i],
  25260. date = dayElem.dateObj;
  25261. var timestamp = date.getTime();
  25262. var outOfRange = minRange > 0 && timestamp < minRange || maxRange > 0 && timestamp > maxRange;
  25263. if (outOfRange) {
  25264. dayElem.classList.add("notAllowed");
  25265. ["inRange", "startRange", "endRange"].forEach(function (c) {
  25266. dayElem.classList.remove(c);
  25267. });
  25268. return "continue";
  25269. } else if (containsDisabled && !outOfRange) return "continue";
  25270. ["startRange", "inRange", "endRange", "notAllowed"].forEach(function (c) {
  25271. dayElem.classList.remove(c);
  25272. });
  25273. elem.classList.add(hoverDate < self.selectedDates[0].getTime() ? "startRange" : "endRange");
  25274. if (month.contains(elem) || !(m > 0 && prevMonth && prevMonth.lastChild.dateObj.getTime() >= timestamp)) {
  25275. if (initialDate < hoverDate && timestamp === initialDate) dayElem.classList.add("startRange");else if (initialDate > hoverDate && timestamp === initialDate) dayElem.classList.add("endRange");
  25276. if (timestamp >= minRange && (maxRange === 0 || timestamp <= maxRange) && isBetween(timestamp, initialDate, hoverDate)) dayElem.classList.add("inRange");
  25277. }
  25278. };
  25279. for (var i = 0, l = month.children.length; i < l; i++) {
  25280. var _ret = _loop(i, l);
  25281. if (_ret === "continue") continue;
  25282. }
  25283. }
  25284. }
  25285. function onResize() {
  25286. if (self.isOpen && !self.config.static && !self.config.inline) positionCalendar();
  25287. }
  25288. function open(e, positionElement) {
  25289. if (positionElement === void 0) {
  25290. positionElement = self._input;
  25291. }
  25292. if (self.isMobile === true) {
  25293. if (e) {
  25294. e.preventDefault();
  25295. e.target && e.target.blur();
  25296. }
  25297. setTimeout(function () {
  25298. self.mobileInput !== undefined && self.mobileInput.focus();
  25299. }, 0);
  25300. triggerEvent("onOpen");
  25301. return;
  25302. }
  25303. if (self._input.disabled || self.config.inline) return;
  25304. var wasOpen = self.isOpen;
  25305. self.isOpen = true;
  25306. if (!wasOpen) {
  25307. self.calendarContainer.classList.add("open");
  25308. self._input.classList.add("active");
  25309. triggerEvent("onOpen");
  25310. positionCalendar(positionElement);
  25311. }
  25312. if (self.config.enableTime === true && self.config.noCalendar === true) {
  25313. if (self.selectedDates.length === 0) {
  25314. self.setDate(self.config.minDate !== undefined ? new Date(self.config.minDate.getTime()) : new Date(), false);
  25315. setDefaultHours();
  25316. updateValue();
  25317. }
  25318. if (self.config.allowInput === false && (e === undefined || !self.timeContainer.contains(e.relatedTarget))) {
  25319. setTimeout(function () {
  25320. return self.hourElement.select();
  25321. }, 50);
  25322. }
  25323. }
  25324. }
  25325. function minMaxDateSetter(type) {
  25326. return function (date) {
  25327. var dateObj = self.config["_" + type + "Date"] = self.parseDate(date, self.config.dateFormat);
  25328. var inverseDateObj = self.config["_" + (type === "min" ? "max" : "min") + "Date"];
  25329. if (dateObj !== undefined) {
  25330. self[type === "min" ? "minDateHasTime" : "maxDateHasTime"] = dateObj.getHours() > 0 || dateObj.getMinutes() > 0 || dateObj.getSeconds() > 0;
  25331. }
  25332. if (self.selectedDates) {
  25333. self.selectedDates = self.selectedDates.filter(function (d) {
  25334. return isEnabled(d);
  25335. });
  25336. if (!self.selectedDates.length && type === "min") setHoursFromDate(dateObj);
  25337. updateValue();
  25338. }
  25339. if (self.daysContainer) {
  25340. redraw();
  25341. if (dateObj !== undefined) self.currentYearElement[type] = dateObj.getFullYear().toString();else self.currentYearElement.removeAttribute(type);
  25342. self.currentYearElement.disabled = !!inverseDateObj && dateObj !== undefined && inverseDateObj.getFullYear() === dateObj.getFullYear();
  25343. }
  25344. };
  25345. }
  25346. function parseConfig() {
  25347. var boolOpts = ["wrap", "weekNumbers", "allowInput", "clickOpens", "time_24hr", "enableTime", "noCalendar", "altInput", "shorthandCurrentMonth", "inline", "static", "enableSeconds", "disableMobile"];
  25348. var hooks = ["onChange", "onClose", "onDayCreate", "onDestroy", "onKeyDown", "onMonthChange", "onOpen", "onParseConfig", "onReady", "onValueUpdate", "onYearChange", "onPreCalendarPosition"];
  25349. var userConfig = Object.assign({}, instanceConfig, JSON.parse(JSON.stringify(element.dataset || {})));
  25350. var formats$$1 = {};
  25351. self.config.parseDate = userConfig.parseDate;
  25352. self.config.formatDate = userConfig.formatDate;
  25353. Object.defineProperty(self.config, "enable", {
  25354. get: function get() {
  25355. return self.config._enable;
  25356. },
  25357. set: function set(dates) {
  25358. self.config._enable = parseDateRules(dates);
  25359. }
  25360. });
  25361. Object.defineProperty(self.config, "disable", {
  25362. get: function get() {
  25363. return self.config._disable;
  25364. },
  25365. set: function set(dates) {
  25366. self.config._disable = parseDateRules(dates);
  25367. }
  25368. });
  25369. var timeMode = userConfig.mode === "time";
  25370. if (!userConfig.dateFormat && (userConfig.enableTime || timeMode)) {
  25371. formats$$1.dateFormat = userConfig.noCalendar || timeMode ? "H:i" + (userConfig.enableSeconds ? ":S" : "") : flatpickr.defaultConfig.dateFormat + " H:i" + (userConfig.enableSeconds ? ":S" : "");
  25372. }
  25373. if (userConfig.altInput && (userConfig.enableTime || timeMode) && !userConfig.altFormat) {
  25374. formats$$1.altFormat = userConfig.noCalendar || timeMode ? "h:i" + (userConfig.enableSeconds ? ":S K" : " K") : flatpickr.defaultConfig.altFormat + (" h:i" + (userConfig.enableSeconds ? ":S" : "") + " K");
  25375. }
  25376. Object.defineProperty(self.config, "minDate", {
  25377. get: function get() {
  25378. return self.config._minDate;
  25379. },
  25380. set: minMaxDateSetter("min")
  25381. });
  25382. Object.defineProperty(self.config, "maxDate", {
  25383. get: function get() {
  25384. return self.config._maxDate;
  25385. },
  25386. set: minMaxDateSetter("max")
  25387. });
  25388. var minMaxTimeSetter = function minMaxTimeSetter(type) {
  25389. return function (val) {
  25390. self.config[type === "min" ? "_minTime" : "_maxTime"] = self.parseDate(val, "H:i");
  25391. };
  25392. };
  25393. Object.defineProperty(self.config, "minTime", {
  25394. get: function get() {
  25395. return self.config._minTime;
  25396. },
  25397. set: minMaxTimeSetter("min")
  25398. });
  25399. Object.defineProperty(self.config, "maxTime", {
  25400. get: function get() {
  25401. return self.config._maxTime;
  25402. },
  25403. set: minMaxTimeSetter("max")
  25404. });
  25405. if (userConfig.mode === "time") {
  25406. self.config.noCalendar = true;
  25407. self.config.enableTime = true;
  25408. }
  25409. Object.assign(self.config, formats$$1, userConfig);
  25410. for (var i = 0; i < boolOpts.length; i++) {
  25411. self.config[boolOpts[i]] = self.config[boolOpts[i]] === true || self.config[boolOpts[i]] === "true";
  25412. }
  25413. for (var _i = hooks.length; _i--;) {
  25414. if (self.config[hooks[_i]] !== undefined) {
  25415. self.config[hooks[_i]] = arrayify(self.config[hooks[_i]] || []).map(bindToInstance);
  25416. }
  25417. }
  25418. self.isMobile = !self.config.disableMobile && !self.config.inline && self.config.mode === "single" && !self.config.disable.length && !self.config.enable.length && !self.config.weekNumbers && /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
  25419. for (var _i2 = 0; _i2 < self.config.plugins.length; _i2++) {
  25420. var pluginConf = self.config.plugins[_i2](self) || {};
  25421. for (var key in pluginConf) {
  25422. if (~hooks.indexOf(key)) {
  25423. self.config[key] = arrayify(pluginConf[key]).map(bindToInstance).concat(self.config[key]);
  25424. } else if (typeof userConfig[key] === "undefined") self.config[key] = pluginConf[key];
  25425. }
  25426. }
  25427. triggerEvent("onParseConfig");
  25428. }
  25429. function setupLocale() {
  25430. if (typeof self.config.locale !== "object" && typeof flatpickr.l10ns[self.config.locale] === "undefined") self.config.errorHandler(new Error("flatpickr: invalid locale " + self.config.locale));
  25431. self.l10n = Object.assign({}, flatpickr.l10ns.default, typeof self.config.locale === "object" ? self.config.locale : self.config.locale !== "default" ? flatpickr.l10ns[self.config.locale] : undefined);
  25432. tokenRegex.K = "(" + self.l10n.amPM[0] + "|" + self.l10n.amPM[1] + "|" + self.l10n.amPM[0].toLowerCase() + "|" + self.l10n.amPM[1].toLowerCase() + ")";
  25433. self.formatDate = createDateFormatter(self);
  25434. }
  25435. function positionCalendar(customPositionElement) {
  25436. if (self.calendarContainer === undefined) return;
  25437. triggerEvent("onPreCalendarPosition");
  25438. var positionElement = customPositionElement || self._positionElement;
  25439. var calendarHeight = Array.prototype.reduce.call(self.calendarContainer.children, function (acc, child) {
  25440. return acc + child.offsetHeight;
  25441. }, 0),
  25442. calendarWidth = self.calendarContainer.offsetWidth,
  25443. configPos = self.config.position.split(" "),
  25444. configPosVertical = configPos[0],
  25445. configPosHorizontal = configPos.length > 1 ? configPos[1] : null,
  25446. inputBounds = positionElement.getBoundingClientRect(),
  25447. distanceFromBottom = window.innerHeight - inputBounds.bottom,
  25448. showOnTop = configPosVertical === "above" || configPosVertical !== "below" && distanceFromBottom < calendarHeight && inputBounds.top > calendarHeight;
  25449. var top = window.pageYOffset + inputBounds.top + (!showOnTop ? positionElement.offsetHeight + 2 : -calendarHeight - 2);
  25450. toggleClass(self.calendarContainer, "arrowTop", !showOnTop);
  25451. toggleClass(self.calendarContainer, "arrowBottom", showOnTop);
  25452. if (self.config.inline) return;
  25453. var left = window.pageXOffset + inputBounds.left - (configPosHorizontal != null && configPosHorizontal === "center" ? (calendarWidth - inputBounds.width) / 2 : 0);
  25454. var right = window.document.body.offsetWidth - inputBounds.right;
  25455. var rightMost = left + calendarWidth > window.document.body.offsetWidth;
  25456. toggleClass(self.calendarContainer, "rightMost", rightMost);
  25457. if (self.config.static) return;
  25458. self.calendarContainer.style.top = top + "px";
  25459. if (!rightMost) {
  25460. self.calendarContainer.style.left = left + "px";
  25461. self.calendarContainer.style.right = "auto";
  25462. } else {
  25463. self.calendarContainer.style.left = "auto";
  25464. self.calendarContainer.style.right = right + "px";
  25465. }
  25466. }
  25467. function redraw() {
  25468. if (self.config.noCalendar || self.isMobile) return;
  25469. updateNavigationCurrentMonth();
  25470. buildDays();
  25471. }
  25472. function focusAndClose() {
  25473. self._input.focus();
  25474. if (window.navigator.userAgent.indexOf("MSIE") !== -1 || navigator.msMaxTouchPoints !== undefined) {
  25475. setTimeout(self.close, 0);
  25476. } else {
  25477. self.close();
  25478. }
  25479. }
  25480. function selectDate(e) {
  25481. e.preventDefault();
  25482. e.stopPropagation();
  25483. var isSelectable = function isSelectable(day) {
  25484. return day.classList && day.classList.contains("flatpickr-day") && !day.classList.contains("disabled") && !day.classList.contains("notAllowed");
  25485. };
  25486. var t = findParent(e.target, isSelectable);
  25487. if (t === undefined) return;
  25488. var target = t;
  25489. var selectedDate = self.latestSelectedDateObj = new Date(target.dateObj.getTime());
  25490. var shouldChangeMonth = (selectedDate.getMonth() < self.currentMonth || selectedDate.getMonth() > self.currentMonth + self.config.showMonths - 1) && self.config.mode !== "range";
  25491. self.selectedDateElem = target;
  25492. if (self.config.mode === "single") self.selectedDates = [selectedDate];else if (self.config.mode === "multiple") {
  25493. var selectedIndex = isDateSelected(selectedDate);
  25494. if (selectedIndex) self.selectedDates.splice(parseInt(selectedIndex), 1);else self.selectedDates.push(selectedDate);
  25495. } else if (self.config.mode === "range") {
  25496. if (self.selectedDates.length === 2) self.clear(false);
  25497. self.selectedDates.push(selectedDate);
  25498. if (compareDates(selectedDate, self.selectedDates[0], true) !== 0) self.selectedDates.sort(function (a, b) {
  25499. return a.getTime() - b.getTime();
  25500. });
  25501. }
  25502. setHoursFromInputs();
  25503. if (shouldChangeMonth) {
  25504. var isNewYear = self.currentYear !== selectedDate.getFullYear();
  25505. self.currentYear = selectedDate.getFullYear();
  25506. self.currentMonth = selectedDate.getMonth();
  25507. if (isNewYear) triggerEvent("onYearChange");
  25508. triggerEvent("onMonthChange");
  25509. }
  25510. updateNavigationCurrentMonth();
  25511. buildDays();
  25512. setDefaultHours();
  25513. updateValue();
  25514. if (self.config.enableTime) setTimeout(function () {
  25515. return self.showTimeInput = true;
  25516. }, 50);
  25517. if (self.config.mode === "range") {
  25518. if (self.selectedDates.length === 1) {
  25519. onMouseOver(target);
  25520. } else updateNavigationCurrentMonth();
  25521. }
  25522. if (!shouldChangeMonth && self.config.mode !== "range" && self.config.showMonths === 1) focusOnDayElem(target);else self.selectedDateElem && self.selectedDateElem.focus();
  25523. if (self.hourElement !== undefined) setTimeout(function () {
  25524. return self.hourElement !== undefined && self.hourElement.select();
  25525. }, 451);
  25526. if (self.config.closeOnSelect) {
  25527. var single = self.config.mode === "single" && !self.config.enableTime;
  25528. var range = self.config.mode === "range" && self.selectedDates.length === 2 && !self.config.enableTime;
  25529. if (single || range) {
  25530. focusAndClose();
  25531. }
  25532. }
  25533. triggerChange();
  25534. }
  25535. var CALLBACKS = {
  25536. locale: [setupLocale, updateWeekdays],
  25537. showMonths: [buildMonths, setCalendarWidth, buildWeekdays]
  25538. };
  25539. function set(option, value) {
  25540. if (option !== null && typeof option === "object") Object.assign(self.config, option);else {
  25541. self.config[option] = value;
  25542. if (CALLBACKS[option] !== undefined) CALLBACKS[option].forEach(function (x) {
  25543. return x();
  25544. });
  25545. }
  25546. self.redraw();
  25547. jumpToDate();
  25548. }
  25549. function setSelectedDate(inputDate, format) {
  25550. var dates = [];
  25551. if (inputDate instanceof Array) dates = inputDate.map(function (d) {
  25552. return self.parseDate(d, format);
  25553. });else if (inputDate instanceof Date || typeof inputDate === "number") dates = [self.parseDate(inputDate, format)];else if (typeof inputDate === "string") {
  25554. switch (self.config.mode) {
  25555. case "single":
  25556. case "time":
  25557. dates = [self.parseDate(inputDate, format)];
  25558. break;
  25559. case "multiple":
  25560. dates = inputDate.split(self.config.conjunction).map(function (date) {
  25561. return self.parseDate(date, format);
  25562. });
  25563. break;
  25564. case "range":
  25565. dates = inputDate.split(self.l10n.rangeSeparator).map(function (date) {
  25566. return self.parseDate(date, format);
  25567. });
  25568. break;
  25569. default:
  25570. break;
  25571. }
  25572. } else self.config.errorHandler(new Error("Invalid date supplied: " + JSON.stringify(inputDate)));
  25573. self.selectedDates = dates.filter(function (d) {
  25574. return d instanceof Date && isEnabled(d, false);
  25575. });
  25576. if (self.config.mode === "range") self.selectedDates.sort(function (a, b) {
  25577. return a.getTime() - b.getTime();
  25578. });
  25579. }
  25580. function setDate(date, triggerChange, format) {
  25581. if (triggerChange === void 0) {
  25582. triggerChange = false;
  25583. }
  25584. if (format === void 0) {
  25585. format = self.config.dateFormat;
  25586. }
  25587. if (date !== 0 && !date || date instanceof Array && date.length === 0) return self.clear(triggerChange);
  25588. setSelectedDate(date, format);
  25589. self.showTimeInput = self.selectedDates.length > 0;
  25590. self.latestSelectedDateObj = self.selectedDates[0];
  25591. self.redraw();
  25592. jumpToDate();
  25593. setHoursFromDate();
  25594. updateValue(triggerChange);
  25595. if (triggerChange) triggerEvent("onChange");
  25596. }
  25597. function parseDateRules(arr) {
  25598. return arr.slice().map(function (rule) {
  25599. if (typeof rule === "string" || typeof rule === "number" || rule instanceof Date) {
  25600. return self.parseDate(rule, undefined, true);
  25601. } else if (rule && typeof rule === "object" && rule.from && rule.to) return {
  25602. from: self.parseDate(rule.from, undefined),
  25603. to: self.parseDate(rule.to, undefined)
  25604. };
  25605. return rule;
  25606. }).filter(function (x) {
  25607. return x;
  25608. });
  25609. }
  25610. function setupDates() {
  25611. self.selectedDates = [];
  25612. self.now = self.parseDate(self.config.now) || new Date();
  25613. var preloadedDate = self.config.defaultDate || (self.input.placeholder.length > 0 && self.input.value === self.input.placeholder ? null : self.input.value);
  25614. if (preloadedDate) setSelectedDate(preloadedDate, self.config.dateFormat);
  25615. var initialDate = self.selectedDates.length > 0 ? self.selectedDates[0] : self.config.minDate && self.config.minDate.getTime() > self.now.getTime() ? self.config.minDate : self.config.maxDate && self.config.maxDate.getTime() < self.now.getTime() ? self.config.maxDate : self.now;
  25616. self.currentYear = initialDate.getFullYear();
  25617. self.currentMonth = initialDate.getMonth();
  25618. if (self.selectedDates.length > 0) self.latestSelectedDateObj = self.selectedDates[0];
  25619. if (self.config.minTime !== undefined) self.config.minTime = self.parseDate(self.config.minTime, "H:i");
  25620. if (self.config.maxTime !== undefined) self.config.maxTime = self.parseDate(self.config.maxTime, "H:i");
  25621. self.minDateHasTime = !!self.config.minDate && (self.config.minDate.getHours() > 0 || self.config.minDate.getMinutes() > 0 || self.config.minDate.getSeconds() > 0);
  25622. self.maxDateHasTime = !!self.config.maxDate && (self.config.maxDate.getHours() > 0 || self.config.maxDate.getMinutes() > 0 || self.config.maxDate.getSeconds() > 0);
  25623. Object.defineProperty(self, "showTimeInput", {
  25624. get: function get() {
  25625. return self._showTimeInput;
  25626. },
  25627. set: function set(bool) {
  25628. self._showTimeInput = bool;
  25629. if (self.calendarContainer) toggleClass(self.calendarContainer, "showTimeInput", bool);
  25630. self.isOpen && positionCalendar();
  25631. }
  25632. });
  25633. }
  25634. function setupInputs() {
  25635. self.input = self.config.wrap ? element.querySelector("[data-input]") : element;
  25636. if (!self.input) {
  25637. self.config.errorHandler(new Error("Invalid input element specified"));
  25638. return;
  25639. }
  25640. self.input._type = self.input.type;
  25641. self.input.type = "text";
  25642. self.input.classList.add("flatpickr-input");
  25643. self._input = self.input;
  25644. if (self.config.altInput) {
  25645. self.altInput = createElement(self.input.nodeName, self.input.className + " " + self.config.altInputClass);
  25646. self._input = self.altInput;
  25647. self.altInput.placeholder = self.input.placeholder;
  25648. self.altInput.disabled = self.input.disabled;
  25649. self.altInput.required = self.input.required;
  25650. self.altInput.tabIndex = self.input.tabIndex;
  25651. self.altInput.type = "text";
  25652. self.input.setAttribute("type", "hidden");
  25653. if (!self.config.static && self.input.parentNode) self.input.parentNode.insertBefore(self.altInput, self.input.nextSibling);
  25654. }
  25655. if (!self.config.allowInput) self._input.setAttribute("readonly", "readonly");
  25656. self._positionElement = self.config.positionElement || self._input;
  25657. }
  25658. function setupMobile() {
  25659. var inputType = self.config.enableTime ? self.config.noCalendar ? "time" : "datetime-local" : "date";
  25660. self.mobileInput = createElement("input", self.input.className + " flatpickr-mobile");
  25661. self.mobileInput.step = self.input.getAttribute("step") || "any";
  25662. self.mobileInput.tabIndex = 1;
  25663. self.mobileInput.type = inputType;
  25664. self.mobileInput.disabled = self.input.disabled;
  25665. self.mobileInput.required = self.input.required;
  25666. self.mobileInput.placeholder = self.input.placeholder;
  25667. self.mobileFormatStr = inputType === "datetime-local" ? "Y-m-d\\TH:i:S" : inputType === "date" ? "Y-m-d" : "H:i:S";
  25668. if (self.selectedDates.length > 0) {
  25669. self.mobileInput.defaultValue = self.mobileInput.value = self.formatDate(self.selectedDates[0], self.mobileFormatStr);
  25670. }
  25671. if (self.config.minDate) self.mobileInput.min = self.formatDate(self.config.minDate, "Y-m-d");
  25672. if (self.config.maxDate) self.mobileInput.max = self.formatDate(self.config.maxDate, "Y-m-d");
  25673. self.input.type = "hidden";
  25674. if (self.altInput !== undefined) self.altInput.type = "hidden";
  25675. try {
  25676. if (self.input.parentNode) self.input.parentNode.insertBefore(self.mobileInput, self.input.nextSibling);
  25677. } catch (_a) {}
  25678. bind(self.mobileInput, "change", function (e) {
  25679. self.setDate(e.target.value, false, self.mobileFormatStr);
  25680. triggerEvent("onChange");
  25681. triggerEvent("onClose");
  25682. });
  25683. }
  25684. function toggle(e) {
  25685. if (self.isOpen === true) return self.close();
  25686. self.open(e);
  25687. }
  25688. function triggerEvent(event, data) {
  25689. var hooks = self.config[event];
  25690. if (hooks !== undefined && hooks.length > 0) {
  25691. for (var i = 0; hooks[i] && i < hooks.length; i++) {
  25692. hooks[i](self.selectedDates, self.input.value, self, data);
  25693. }
  25694. }
  25695. if (event === "onChange") {
  25696. self.input.dispatchEvent(createEvent("change"));
  25697. self.input.dispatchEvent(createEvent("input"));
  25698. }
  25699. }
  25700. function createEvent(name) {
  25701. var e = document.createEvent("Event");
  25702. e.initEvent(name, true, true);
  25703. return e;
  25704. }
  25705. function isDateSelected(date) {
  25706. for (var i = 0; i < self.selectedDates.length; i++) {
  25707. if (compareDates(self.selectedDates[i], date) === 0) return "" + i;
  25708. }
  25709. return false;
  25710. }
  25711. function isDateInRange(date) {
  25712. if (self.config.mode !== "range" || self.selectedDates.length < 2) return false;
  25713. return compareDates(date, self.selectedDates[0]) >= 0 && compareDates(date, self.selectedDates[1]) <= 0;
  25714. }
  25715. function updateNavigationCurrentMonth() {
  25716. if (self.config.noCalendar || self.isMobile || !self.monthNav) return;
  25717. self.yearElements.forEach(function (yearElement, i) {
  25718. var d = new Date(self.currentYear, self.currentMonth, 1);
  25719. d.setMonth(self.currentMonth + i);
  25720. self.monthElements[i].textContent = monthToStr(d.getMonth(), self.config.shorthandCurrentMonth, self.l10n) + " ";
  25721. yearElement.value = d.getFullYear().toString();
  25722. });
  25723. self._hidePrevMonthArrow = self.config.minDate !== undefined && (self.currentYear === self.config.minDate.getFullYear() ? self.currentMonth <= self.config.minDate.getMonth() : self.currentYear < self.config.minDate.getFullYear());
  25724. self._hideNextMonthArrow = self.config.maxDate !== undefined && (self.currentYear === self.config.maxDate.getFullYear() ? self.currentMonth + 1 > self.config.maxDate.getMonth() : self.currentYear > self.config.maxDate.getFullYear());
  25725. }
  25726. function updateValue(triggerChange) {
  25727. if (triggerChange === void 0) {
  25728. triggerChange = true;
  25729. }
  25730. if (self.selectedDates.length === 0) return self.clear(triggerChange);
  25731. if (self.mobileInput !== undefined && self.mobileFormatStr) {
  25732. self.mobileInput.value = self.latestSelectedDateObj !== undefined ? self.formatDate(self.latestSelectedDateObj, self.mobileFormatStr) : "";
  25733. }
  25734. var joinChar = self.config.mode !== "range" ? self.config.conjunction : self.l10n.rangeSeparator;
  25735. self.input.value = self.selectedDates.map(function (dObj) {
  25736. return self.formatDate(dObj, self.config.dateFormat);
  25737. }).join(joinChar);
  25738. if (self.altInput !== undefined) {
  25739. self.altInput.value = self.selectedDates.map(function (dObj) {
  25740. return self.formatDate(dObj, self.config.altFormat);
  25741. }).join(joinChar);
  25742. }
  25743. if (triggerChange !== false) triggerEvent("onValueUpdate");
  25744. }
  25745. function onMonthNavClick(e) {
  25746. e.preventDefault();
  25747. var isPrevMonth = self.prevMonthNav.contains(e.target);
  25748. var isNextMonth = self.nextMonthNav.contains(e.target);
  25749. if (isPrevMonth || isNextMonth) {
  25750. changeMonth(isPrevMonth ? -1 : 1);
  25751. } else if (self.yearElements.indexOf(e.target) >= 0) {
  25752. e.target.select();
  25753. } else if (e.target.classList.contains("arrowUp")) {
  25754. self.changeYear(self.currentYear + 1);
  25755. } else if (e.target.classList.contains("arrowDown")) {
  25756. self.changeYear(self.currentYear - 1);
  25757. }
  25758. }
  25759. function timeWrapper(e) {
  25760. e.preventDefault();
  25761. var isKeyDown = e.type === "keydown",
  25762. input = e.target;
  25763. if (self.amPM !== undefined && e.target === self.amPM) {
  25764. self.amPM.textContent = self.l10n.amPM[int(self.amPM.textContent === self.l10n.amPM[0])];
  25765. }
  25766. var min = parseFloat(input.getAttribute("data-min")),
  25767. max = parseFloat(input.getAttribute("data-max")),
  25768. step = parseFloat(input.getAttribute("data-step")),
  25769. curValue = parseInt(input.value, 10),
  25770. delta = e.delta || (isKeyDown ? e.which === 38 ? 1 : -1 : 0);
  25771. var newValue = curValue + step * delta;
  25772. if (typeof input.value !== "undefined" && input.value.length === 2) {
  25773. var isHourElem = input === self.hourElement,
  25774. isMinuteElem = input === self.minuteElement;
  25775. if (newValue < min) {
  25776. newValue = max + newValue + int(!isHourElem) + (int(isHourElem) && int(!self.amPM));
  25777. if (isMinuteElem) incrementNumInput(undefined, -1, self.hourElement);
  25778. } else if (newValue > max) {
  25779. newValue = input === self.hourElement ? newValue - max - int(!self.amPM) : min;
  25780. if (isMinuteElem) incrementNumInput(undefined, 1, self.hourElement);
  25781. }
  25782. if (self.amPM && isHourElem && (step === 1 ? newValue + curValue === 23 : Math.abs(newValue - curValue) > step)) {
  25783. self.amPM.textContent = self.l10n.amPM[int(self.amPM.textContent === self.l10n.amPM[0])];
  25784. }
  25785. input.value = pad(newValue);
  25786. }
  25787. }
  25788. init();
  25789. return self;
  25790. }
  25791. function _flatpickr(nodeList, config) {
  25792. var nodes = Array.prototype.slice.call(nodeList);
  25793. var instances = [];
  25794. for (var i = 0; i < nodes.length; i++) {
  25795. var node = nodes[i];
  25796. try {
  25797. if (node.getAttribute("data-fp-omit") !== null) continue;
  25798. if (node._flatpickr !== undefined) {
  25799. node._flatpickr.destroy();
  25800. node._flatpickr = undefined;
  25801. }
  25802. node._flatpickr = FlatpickrInstance(node, config || {});
  25803. instances.push(node._flatpickr);
  25804. } catch (e) {
  25805. console.error(e);
  25806. }
  25807. }
  25808. return instances.length === 1 ? instances[0] : instances;
  25809. }
  25810. if (typeof HTMLElement !== "undefined") {
  25811. HTMLCollection.prototype.flatpickr = NodeList.prototype.flatpickr = function (config) {
  25812. return _flatpickr(this, config);
  25813. };
  25814. HTMLElement.prototype.flatpickr = function (config) {
  25815. return _flatpickr([this], config);
  25816. };
  25817. }
  25818. var flatpickr = function flatpickr(selector, config) {
  25819. if (selector instanceof NodeList) return _flatpickr(selector, config);else if (typeof selector === "string") return _flatpickr(window.document.querySelectorAll(selector), config);
  25820. return _flatpickr([selector], config);
  25821. };
  25822. flatpickr.defaultConfig = defaults;
  25823. flatpickr.l10ns = {
  25824. en: Object.assign({}, english),
  25825. default: Object.assign({}, english)
  25826. };
  25827. flatpickr.localize = function (l10n) {
  25828. flatpickr.l10ns.default = Object.assign({}, flatpickr.l10ns.default, l10n);
  25829. };
  25830. flatpickr.setDefaults = function (config) {
  25831. flatpickr.defaultConfig = Object.assign({}, flatpickr.defaultConfig, config);
  25832. };
  25833. flatpickr.parseDate = createDateParser({});
  25834. flatpickr.formatDate = createDateFormatter({});
  25835. flatpickr.compareDates = compareDates;
  25836. if (typeof jQuery !== "undefined") {
  25837. jQuery.fn.flatpickr = function (config) {
  25838. return _flatpickr(this, config);
  25839. };
  25840. }
  25841. Date.prototype.fp_incr = function (days) {
  25842. return new Date(this.getFullYear(), this.getMonth(), this.getDate() + (typeof days === "string" ? parseInt(days, 10) : days));
  25843. };
  25844. if (typeof window !== "undefined") {
  25845. window.flatpickr = flatpickr;
  25846. }
  25847. return flatpickr;
  25848. })));
  25849. /**
  25850. * jquery-match-height 0.7.2 by @liabru
  25851. * http://brm.io/jquery-match-height/
  25852. * License: MIT
  25853. */
  25854. ;(function(factory) { // eslint-disable-line no-extra-semi
  25855. 'use strict';
  25856. if (typeof define === 'function' && define.amd) {
  25857. // AMD
  25858. define(['jquery'], factory);
  25859. } else if (typeof module !== 'undefined' && module.exports) {
  25860. // CommonJS
  25861. module.exports = factory(require('jquery'));
  25862. } else {
  25863. // Global
  25864. factory(jQuery);
  25865. }
  25866. })(function($) {
  25867. /*
  25868. * internal
  25869. */
  25870. var _previousResizeWidth = -1,
  25871. _updateTimeout = -1;
  25872. /*
  25873. * _parse
  25874. * value parse utility function
  25875. */
  25876. var _parse = function(value) {
  25877. // parse value and convert NaN to 0
  25878. return parseFloat(value) || 0;
  25879. };
  25880. /*
  25881. * _rows
  25882. * utility function returns array of jQuery selections representing each row
  25883. * (as displayed after float wrapping applied by browser)
  25884. */
  25885. var _rows = function(elements) {
  25886. var tolerance = 1,
  25887. $elements = $(elements),
  25888. lastTop = null,
  25889. rows = [];
  25890. // group elements by their top position
  25891. $elements.each(function(){
  25892. var $that = $(this),
  25893. top = $that.offset().top - _parse($that.css('margin-top')),
  25894. lastRow = rows.length > 0 ? rows[rows.length - 1] : null;
  25895. if (lastRow === null) {
  25896. // first item on the row, so just push it
  25897. rows.push($that);
  25898. } else {
  25899. // if the row top is the same, add to the row group
  25900. if (Math.floor(Math.abs(lastTop - top)) <= tolerance) {
  25901. rows[rows.length - 1] = lastRow.add($that);
  25902. } else {
  25903. // otherwise start a new row group
  25904. rows.push($that);
  25905. }
  25906. }
  25907. // keep track of the last row top
  25908. lastTop = top;
  25909. });
  25910. return rows;
  25911. };
  25912. /*
  25913. * _parseOptions
  25914. * handle plugin options
  25915. */
  25916. var _parseOptions = function(options) {
  25917. var opts = {
  25918. byRow: true,
  25919. property: 'height',
  25920. target: null,
  25921. remove: false
  25922. };
  25923. if (typeof options === 'object') {
  25924. return $.extend(opts, options);
  25925. }
  25926. if (typeof options === 'boolean') {
  25927. opts.byRow = options;
  25928. } else if (options === 'remove') {
  25929. opts.remove = true;
  25930. }
  25931. return opts;
  25932. };
  25933. /*
  25934. * matchHeight
  25935. * plugin definition
  25936. */
  25937. var matchHeight = $.fn.matchHeight = function(options) {
  25938. var opts = _parseOptions(options);
  25939. // handle remove
  25940. if (opts.remove) {
  25941. var that = this;
  25942. // remove fixed height from all selected elements
  25943. this.css(opts.property, '');
  25944. // remove selected elements from all groups
  25945. $.each(matchHeight._groups, function(key, group) {
  25946. group.elements = group.elements.not(that);
  25947. });
  25948. // TODO: cleanup empty groups
  25949. return this;
  25950. }
  25951. if (this.length <= 1 && !opts.target) {
  25952. return this;
  25953. }
  25954. // keep track of this group so we can re-apply later on load and resize events
  25955. matchHeight._groups.push({
  25956. elements: this,
  25957. options: opts
  25958. });
  25959. // match each element's height to the tallest element in the selection
  25960. matchHeight._apply(this, opts);
  25961. return this;
  25962. };
  25963. /*
  25964. * plugin global options
  25965. */
  25966. matchHeight.version = '0.7.2';
  25967. matchHeight._groups = [];
  25968. matchHeight._throttle = 80;
  25969. matchHeight._maintainScroll = false;
  25970. matchHeight._beforeUpdate = null;
  25971. matchHeight._afterUpdate = null;
  25972. matchHeight._rows = _rows;
  25973. matchHeight._parse = _parse;
  25974. matchHeight._parseOptions = _parseOptions;
  25975. /*
  25976. * matchHeight._apply
  25977. * apply matchHeight to given elements
  25978. */
  25979. matchHeight._apply = function(elements, options) {
  25980. var opts = _parseOptions(options),
  25981. $elements = $(elements),
  25982. rows = [$elements];
  25983. // take note of scroll position
  25984. var scrollTop = $(window).scrollTop(),
  25985. htmlHeight = $('html').outerHeight(true);
  25986. // get hidden parents
  25987. var $hiddenParents = $elements.parents().filter(':hidden');
  25988. // cache the original inline style
  25989. $hiddenParents.each(function() {
  25990. var $that = $(this);
  25991. $that.data('style-cache', $that.attr('style'));
  25992. });
  25993. // temporarily must force hidden parents visible
  25994. $hiddenParents.css('display', 'block');
  25995. // get rows if using byRow, otherwise assume one row
  25996. if (opts.byRow && !opts.target) {
  25997. // must first force an arbitrary equal height so floating elements break evenly
  25998. $elements.each(function() {
  25999. var $that = $(this),
  26000. display = $that.css('display');
  26001. // temporarily force a usable display value
  26002. if (display !== 'inline-block' && display !== 'flex' && display !== 'inline-flex') {
  26003. display = 'block';
  26004. }
  26005. // cache the original inline style
  26006. $that.data('style-cache', $that.attr('style'));
  26007. $that.css({
  26008. 'display': display,
  26009. 'padding-top': '0',
  26010. 'padding-bottom': '0',
  26011. 'margin-top': '0',
  26012. 'margin-bottom': '0',
  26013. 'border-top-width': '0',
  26014. 'border-bottom-width': '0',
  26015. 'height': '100px',
  26016. 'overflow': 'hidden'
  26017. });
  26018. });
  26019. // get the array of rows (based on element top position)
  26020. rows = _rows($elements);
  26021. // revert original inline styles
  26022. $elements.each(function() {
  26023. var $that = $(this);
  26024. $that.attr('style', $that.data('style-cache') || '');
  26025. });
  26026. }
  26027. $.each(rows, function(key, row) {
  26028. var $row = $(row),
  26029. targetHeight = 0;
  26030. if (!opts.target) {
  26031. // skip apply to rows with only one item
  26032. if (opts.byRow && $row.length <= 1) {
  26033. $row.css(opts.property, '');
  26034. return;
  26035. }
  26036. // iterate the row and find the max height
  26037. $row.each(function(){
  26038. var $that = $(this),
  26039. style = $that.attr('style'),
  26040. display = $that.css('display');
  26041. // temporarily force a usable display value
  26042. if (display !== 'inline-block' && display !== 'flex' && display !== 'inline-flex') {
  26043. display = 'block';
  26044. }
  26045. // ensure we get the correct actual height (and not a previously set height value)
  26046. var css = { 'display': display };
  26047. css[opts.property] = '';
  26048. $that.css(css);
  26049. // find the max height (including padding, but not margin)
  26050. if ($that.outerHeight(false) > targetHeight) {
  26051. targetHeight = $that.outerHeight(false);
  26052. }
  26053. // revert styles
  26054. if (style) {
  26055. $that.attr('style', style);
  26056. } else {
  26057. $that.css('display', '');
  26058. }
  26059. });
  26060. } else {
  26061. // if target set, use the height of the target element
  26062. targetHeight = opts.target.outerHeight(false);
  26063. }
  26064. // iterate the row and apply the height to all elements
  26065. $row.each(function(){
  26066. var $that = $(this),
  26067. verticalPadding = 0;
  26068. // don't apply to a target
  26069. if (opts.target && $that.is(opts.target)) {
  26070. return;
  26071. }
  26072. // handle padding and border correctly (required when not using border-box)
  26073. if ($that.css('box-sizing') !== 'border-box') {
  26074. verticalPadding += _parse($that.css('border-top-width')) + _parse($that.css('border-bottom-width'));
  26075. verticalPadding += _parse($that.css('padding-top')) + _parse($that.css('padding-bottom'));
  26076. }
  26077. // set the height (accounting for padding and border)
  26078. $that.css(opts.property, (targetHeight - verticalPadding) + 'px');
  26079. });
  26080. });
  26081. // revert hidden parents
  26082. $hiddenParents.each(function() {
  26083. var $that = $(this);
  26084. $that.attr('style', $that.data('style-cache') || null);
  26085. });
  26086. // restore scroll position if enabled
  26087. if (matchHeight._maintainScroll) {
  26088. $(window).scrollTop((scrollTop / htmlHeight) * $('html').outerHeight(true));
  26089. }
  26090. return this;
  26091. };
  26092. /*
  26093. * matchHeight._applyDataApi
  26094. * applies matchHeight to all elements with a data-match-height attribute
  26095. */
  26096. matchHeight._applyDataApi = function() {
  26097. var groups = {};
  26098. // generate groups by their groupId set by elements using data-match-height
  26099. $('[data-match-height], [data-mh]').each(function() {
  26100. var $this = $(this),
  26101. groupId = $this.attr('data-mh') || $this.attr('data-match-height');
  26102. if (groupId in groups) {
  26103. groups[groupId] = groups[groupId].add($this);
  26104. } else {
  26105. groups[groupId] = $this;
  26106. }
  26107. });
  26108. // apply matchHeight to each group
  26109. $.each(groups, function() {
  26110. this.matchHeight(true);
  26111. });
  26112. };
  26113. /*
  26114. * matchHeight._update
  26115. * updates matchHeight on all current groups with their correct options
  26116. */
  26117. var _update = function(event) {
  26118. if (matchHeight._beforeUpdate) {
  26119. matchHeight._beforeUpdate(event, matchHeight._groups);
  26120. }
  26121. $.each(matchHeight._groups, function() {
  26122. matchHeight._apply(this.elements, this.options);
  26123. });
  26124. if (matchHeight._afterUpdate) {
  26125. matchHeight._afterUpdate(event, matchHeight._groups);
  26126. }
  26127. };
  26128. matchHeight._update = function(throttle, event) {
  26129. // prevent update if fired from a resize event
  26130. // where the viewport width hasn't actually changed
  26131. // fixes an event looping bug in IE8
  26132. if (event && event.type === 'resize') {
  26133. var windowWidth = $(window).width();
  26134. if (windowWidth === _previousResizeWidth) {
  26135. return;
  26136. }
  26137. _previousResizeWidth = windowWidth;
  26138. }
  26139. // throttle updates
  26140. if (!throttle) {
  26141. _update(event);
  26142. } else if (_updateTimeout === -1) {
  26143. _updateTimeout = setTimeout(function() {
  26144. _update(event);
  26145. _updateTimeout = -1;
  26146. }, matchHeight._throttle);
  26147. }
  26148. };
  26149. /*
  26150. * bind events
  26151. */
  26152. // apply on DOM ready event
  26153. $(matchHeight._applyDataApi);
  26154. // use on or bind where supported
  26155. var on = $.fn.on ? 'on' : 'bind';
  26156. // update heights on load and resize events
  26157. $(window)[on]('load', function(event) {
  26158. matchHeight._update(false, event);
  26159. });
  26160. // throttled update heights on resize events
  26161. $(window)[on]('resize orientationchange', function(event) {
  26162. matchHeight._update(true, event);
  26163. });
  26164. });
  26165. /*! List.js v1.5.0 (http://listjs.com) by Jonny Strömberg (http://javve.com) */
  26166. var List =
  26167. /******/ (function(modules) { // webpackBootstrap
  26168. /******/ // The module cache
  26169. /******/ var installedModules = {};
  26170. /******/ // The require function
  26171. /******/ function __webpack_require__(moduleId) {
  26172. /******/ // Check if module is in cache
  26173. /******/ if(installedModules[moduleId])
  26174. /******/ return installedModules[moduleId].exports;
  26175. /******/ // Create a new module (and put it into the cache)
  26176. /******/ var module = installedModules[moduleId] = {
  26177. /******/ i: moduleId,
  26178. /******/ l: false,
  26179. /******/ exports: {}
  26180. /******/ };
  26181. /******/ // Execute the module function
  26182. /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  26183. /******/ // Flag the module as loaded
  26184. /******/ module.l = true;
  26185. /******/ // Return the exports of the module
  26186. /******/ return module.exports;
  26187. /******/ }
  26188. /******/ // expose the modules object (__webpack_modules__)
  26189. /******/ __webpack_require__.m = modules;
  26190. /******/ // expose the module cache
  26191. /******/ __webpack_require__.c = installedModules;
  26192. /******/ // identity function for calling harmony imports with the correct context
  26193. /******/ __webpack_require__.i = function(value) { return value; };
  26194. /******/ // define getter function for harmony exports
  26195. /******/ __webpack_require__.d = function(exports, name, getter) {
  26196. /******/ if(!__webpack_require__.o(exports, name)) {
  26197. /******/ Object.defineProperty(exports, name, {
  26198. /******/ configurable: false,
  26199. /******/ enumerable: true,
  26200. /******/ get: getter
  26201. /******/ });
  26202. /******/ }
  26203. /******/ };
  26204. /******/ // getDefaultExport function for compatibility with non-harmony modules
  26205. /******/ __webpack_require__.n = function(module) {
  26206. /******/ var getter = module && module.__esModule ?
  26207. /******/ function getDefault() { return module['default']; } :
  26208. /******/ function getModuleExports() { return module; };
  26209. /******/ __webpack_require__.d(getter, 'a', getter);
  26210. /******/ return getter;
  26211. /******/ };
  26212. /******/ // Object.prototype.hasOwnProperty.call
  26213. /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  26214. /******/ // __webpack_public_path__
  26215. /******/ __webpack_require__.p = "";
  26216. /******/ // Load entry module and return exports
  26217. /******/ return __webpack_require__(__webpack_require__.s = 11);
  26218. /******/ })
  26219. /************************************************************************/
  26220. /******/ ([
  26221. /* 0 */
  26222. /***/ (function(module, exports, __webpack_require__) {
  26223. /**
  26224. * Module dependencies.
  26225. */
  26226. var index = __webpack_require__(4);
  26227. /**
  26228. * Whitespace regexp.
  26229. */
  26230. var re = /\s+/;
  26231. /**
  26232. * toString reference.
  26233. */
  26234. var toString = Object.prototype.toString;
  26235. /**
  26236. * Wrap `el` in a `ClassList`.
  26237. *
  26238. * @param {Element} el
  26239. * @return {ClassList}
  26240. * @api public
  26241. */
  26242. module.exports = function(el){
  26243. return new ClassList(el);
  26244. };
  26245. /**
  26246. * Initialize a new ClassList for `el`.
  26247. *
  26248. * @param {Element} el
  26249. * @api private
  26250. */
  26251. function ClassList(el) {
  26252. if (!el || !el.nodeType) {
  26253. throw new Error('A DOM element reference is required');
  26254. }
  26255. this.el = el;
  26256. this.list = el.classList;
  26257. }
  26258. /**
  26259. * Add class `name` if not already present.
  26260. *
  26261. * @param {String} name
  26262. * @return {ClassList}
  26263. * @api public
  26264. */
  26265. ClassList.prototype.add = function(name){
  26266. // classList
  26267. if (this.list) {
  26268. this.list.add(name);
  26269. return this;
  26270. }
  26271. // fallback
  26272. var arr = this.array();
  26273. var i = index(arr, name);
  26274. if (!~i) arr.push(name);
  26275. this.el.className = arr.join(' ');
  26276. return this;
  26277. };
  26278. /**
  26279. * Remove class `name` when present, or
  26280. * pass a regular expression to remove
  26281. * any which match.
  26282. *
  26283. * @param {String|RegExp} name
  26284. * @return {ClassList}
  26285. * @api public
  26286. */
  26287. ClassList.prototype.remove = function(name){
  26288. // classList
  26289. if (this.list) {
  26290. this.list.remove(name);
  26291. return this;
  26292. }
  26293. // fallback
  26294. var arr = this.array();
  26295. var i = index(arr, name);
  26296. if (~i) arr.splice(i, 1);
  26297. this.el.className = arr.join(' ');
  26298. return this;
  26299. };
  26300. /**
  26301. * Toggle class `name`, can force state via `force`.
  26302. *
  26303. * For browsers that support classList, but do not support `force` yet,
  26304. * the mistake will be detected and corrected.
  26305. *
  26306. * @param {String} name
  26307. * @param {Boolean} force
  26308. * @return {ClassList}
  26309. * @api public
  26310. */
  26311. ClassList.prototype.toggle = function(name, force){
  26312. // classList
  26313. if (this.list) {
  26314. if ("undefined" !== typeof force) {
  26315. if (force !== this.list.toggle(name, force)) {
  26316. this.list.toggle(name); // toggle again to correct
  26317. }
  26318. } else {
  26319. this.list.toggle(name);
  26320. }
  26321. return this;
  26322. }
  26323. // fallback
  26324. if ("undefined" !== typeof force) {
  26325. if (!force) {
  26326. this.remove(name);
  26327. } else {
  26328. this.add(name);
  26329. }
  26330. } else {
  26331. if (this.has(name)) {
  26332. this.remove(name);
  26333. } else {
  26334. this.add(name);
  26335. }
  26336. }
  26337. return this;
  26338. };
  26339. /**
  26340. * Return an array of classes.
  26341. *
  26342. * @return {Array}
  26343. * @api public
  26344. */
  26345. ClassList.prototype.array = function(){
  26346. var className = this.el.getAttribute('class') || '';
  26347. var str = className.replace(/^\s+|\s+$/g, '');
  26348. var arr = str.split(re);
  26349. if ('' === arr[0]) arr.shift();
  26350. return arr;
  26351. };
  26352. /**
  26353. * Check if class `name` is present.
  26354. *
  26355. * @param {String} name
  26356. * @return {ClassList}
  26357. * @api public
  26358. */
  26359. ClassList.prototype.has =
  26360. ClassList.prototype.contains = function(name){
  26361. return this.list ? this.list.contains(name) : !! ~index(this.array(), name);
  26362. };
  26363. /***/ }),
  26364. /* 1 */
  26365. /***/ (function(module, exports, __webpack_require__) {
  26366. var bind = window.addEventListener ? 'addEventListener' : 'attachEvent',
  26367. unbind = window.removeEventListener ? 'removeEventListener' : 'detachEvent',
  26368. prefix = bind !== 'addEventListener' ? 'on' : '',
  26369. toArray = __webpack_require__(5);
  26370. /**
  26371. * Bind `el` event `type` to `fn`.
  26372. *
  26373. * @param {Element} el, NodeList, HTMLCollection or Array
  26374. * @param {String} type
  26375. * @param {Function} fn
  26376. * @param {Boolean} capture
  26377. * @api public
  26378. */
  26379. exports.bind = function(el, type, fn, capture){
  26380. el = toArray(el);
  26381. for ( var i = 0; i < el.length; i++ ) {
  26382. el[i][bind](prefix + type, fn, capture || false);
  26383. }
  26384. };
  26385. /**
  26386. * Unbind `el` event `type`'s callback `fn`.
  26387. *
  26388. * @param {Element} el, NodeList, HTMLCollection or Array
  26389. * @param {String} type
  26390. * @param {Function} fn
  26391. * @param {Boolean} capture
  26392. * @api public
  26393. */
  26394. exports.unbind = function(el, type, fn, capture){
  26395. el = toArray(el);
  26396. for ( var i = 0; i < el.length; i++ ) {
  26397. el[i][unbind](prefix + type, fn, capture || false);
  26398. }
  26399. };
  26400. /***/ }),
  26401. /* 2 */
  26402. /***/ (function(module, exports) {
  26403. module.exports = function(list) {
  26404. return function(initValues, element, notCreate) {
  26405. var item = this;
  26406. this._values = {};
  26407. this.found = false; // Show if list.searched == true and this.found == true
  26408. this.filtered = false;// Show if list.filtered == true and this.filtered == true
  26409. var init = function(initValues, element, notCreate) {
  26410. if (element === undefined) {
  26411. if (notCreate) {
  26412. item.values(initValues, notCreate);
  26413. } else {
  26414. item.values(initValues);
  26415. }
  26416. } else {
  26417. item.elm = element;
  26418. var values = list.templater.get(item, initValues);
  26419. item.values(values);
  26420. }
  26421. };
  26422. this.values = function(newValues, notCreate) {
  26423. if (newValues !== undefined) {
  26424. for(var name in newValues) {
  26425. item._values[name] = newValues[name];
  26426. }
  26427. if (notCreate !== true) {
  26428. list.templater.set(item, item.values());
  26429. }
  26430. } else {
  26431. return item._values;
  26432. }
  26433. };
  26434. this.show = function() {
  26435. list.templater.show(item);
  26436. };
  26437. this.hide = function() {
  26438. list.templater.hide(item);
  26439. };
  26440. this.matching = function() {
  26441. return (
  26442. (list.filtered && list.searched && item.found && item.filtered) ||
  26443. (list.filtered && !list.searched && item.filtered) ||
  26444. (!list.filtered && list.searched && item.found) ||
  26445. (!list.filtered && !list.searched)
  26446. );
  26447. };
  26448. this.visible = function() {
  26449. return (item.elm && (item.elm.parentNode == list.list)) ? true : false;
  26450. };
  26451. init(initValues, element, notCreate);
  26452. };
  26453. };
  26454. /***/ }),
  26455. /* 3 */
  26456. /***/ (function(module, exports) {
  26457. /**
  26458. * A cross-browser implementation of getElementsByClass.
  26459. * Heavily based on Dustin Diaz's function: http://dustindiaz.com/getelementsbyclass.
  26460. *
  26461. * Find all elements with class `className` inside `container`.
  26462. * Use `single = true` to increase performance in older browsers
  26463. * when only one element is needed.
  26464. *
  26465. * @param {String} className
  26466. * @param {Element} container
  26467. * @param {Boolean} single
  26468. * @api public
  26469. */
  26470. var getElementsByClassName = function(container, className, single) {
  26471. if (single) {
  26472. return container.getElementsByClassName(className)[0];
  26473. } else {
  26474. return container.getElementsByClassName(className);
  26475. }
  26476. };
  26477. var querySelector = function(container, className, single) {
  26478. className = '.' + className;
  26479. if (single) {
  26480. return container.querySelector(className);
  26481. } else {
  26482. return container.querySelectorAll(className);
  26483. }
  26484. };
  26485. var polyfill = function(container, className, single) {
  26486. var classElements = [],
  26487. tag = '*';
  26488. var els = container.getElementsByTagName(tag);
  26489. var elsLen = els.length;
  26490. var pattern = new RegExp("(^|\\s)"+className+"(\\s|$)");
  26491. for (var i = 0, j = 0; i < elsLen; i++) {
  26492. if ( pattern.test(els[i].className) ) {
  26493. if (single) {
  26494. return els[i];
  26495. } else {
  26496. classElements[j] = els[i];
  26497. j++;
  26498. }
  26499. }
  26500. }
  26501. return classElements;
  26502. };
  26503. module.exports = (function() {
  26504. return function(container, className, single, options) {
  26505. options = options || {};
  26506. if ((options.test && options.getElementsByClassName) || (!options.test && document.getElementsByClassName)) {
  26507. return getElementsByClassName(container, className, single);
  26508. } else if ((options.test && options.querySelector) || (!options.test && document.querySelector)) {
  26509. return querySelector(container, className, single);
  26510. } else {
  26511. return polyfill(container, className, single);
  26512. }
  26513. };
  26514. })();
  26515. /***/ }),
  26516. /* 4 */
  26517. /***/ (function(module, exports) {
  26518. var indexOf = [].indexOf;
  26519. module.exports = function(arr, obj){
  26520. if (indexOf) return arr.indexOf(obj);
  26521. for (var i = 0; i < arr.length; ++i) {
  26522. if (arr[i] === obj) return i;
  26523. }
  26524. return -1;
  26525. };
  26526. /***/ }),
  26527. /* 5 */
  26528. /***/ (function(module, exports) {
  26529. /**
  26530. * Source: https://github.com/timoxley/to-array
  26531. *
  26532. * Convert an array-like object into an `Array`.
  26533. * If `collection` is already an `Array`, then will return a clone of `collection`.
  26534. *
  26535. * @param {Array | Mixed} collection An `Array` or array-like object to convert e.g. `arguments` or `NodeList`
  26536. * @return {Array} Naive conversion of `collection` to a new `Array`.
  26537. * @api public
  26538. */
  26539. module.exports = function toArray(collection) {
  26540. if (typeof collection === 'undefined') return [];
  26541. if (collection === null) return [null];
  26542. if (collection === window) return [window];
  26543. if (typeof collection === 'string') return [collection];
  26544. if (isArray(collection)) return collection;
  26545. if (typeof collection.length != 'number') return [collection];
  26546. if (typeof collection === 'function' && collection instanceof Function) return [collection];
  26547. var arr = [];
  26548. for (var i = 0; i < collection.length; i++) {
  26549. if (Object.prototype.hasOwnProperty.call(collection, i) || i in collection) {
  26550. arr.push(collection[i]);
  26551. }
  26552. }
  26553. if (!arr.length) return [];
  26554. return arr;
  26555. };
  26556. function isArray(arr) {
  26557. return Object.prototype.toString.call(arr) === "[object Array]";
  26558. }
  26559. /***/ }),
  26560. /* 6 */
  26561. /***/ (function(module, exports) {
  26562. module.exports = function(s) {
  26563. s = (s === undefined) ? "" : s;
  26564. s = (s === null) ? "" : s;
  26565. s = s.toString();
  26566. return s;
  26567. };
  26568. /***/ }),
  26569. /* 7 */
  26570. /***/ (function(module, exports) {
  26571. /*
  26572. * Source: https://github.com/segmentio/extend
  26573. */
  26574. module.exports = function extend (object) {
  26575. // Takes an unlimited number of extenders.
  26576. var args = Array.prototype.slice.call(arguments, 1);
  26577. // For each extender, copy their properties on our object.
  26578. for (var i = 0, source; source = args[i]; i++) {
  26579. if (!source) continue;
  26580. for (var property in source) {
  26581. object[property] = source[property];
  26582. }
  26583. }
  26584. return object;
  26585. };
  26586. /***/ }),
  26587. /* 8 */
  26588. /***/ (function(module, exports) {
  26589. module.exports = function(list) {
  26590. var addAsync = function(values, callback, items) {
  26591. var valuesToAdd = values.splice(0, 50);
  26592. items = items || [];
  26593. items = items.concat(list.add(valuesToAdd));
  26594. if (values.length > 0) {
  26595. setTimeout(function() {
  26596. addAsync(values, callback, items);
  26597. }, 1);
  26598. } else {
  26599. list.update();
  26600. callback(items);
  26601. }
  26602. };
  26603. return addAsync;
  26604. };
  26605. /***/ }),
  26606. /* 9 */
  26607. /***/ (function(module, exports) {
  26608. module.exports = function(list) {
  26609. // Add handlers
  26610. list.handlers.filterStart = list.handlers.filterStart || [];
  26611. list.handlers.filterComplete = list.handlers.filterComplete || [];
  26612. return function(filterFunction) {
  26613. list.trigger('filterStart');
  26614. list.i = 1; // Reset paging
  26615. list.reset.filter();
  26616. if (filterFunction === undefined) {
  26617. list.filtered = false;
  26618. } else {
  26619. list.filtered = true;
  26620. var is = list.items;
  26621. for (var i = 0, il = is.length; i < il; i++) {
  26622. var item = is[i];
  26623. if (filterFunction(item)) {
  26624. item.filtered = true;
  26625. } else {
  26626. item.filtered = false;
  26627. }
  26628. }
  26629. }
  26630. list.update();
  26631. list.trigger('filterComplete');
  26632. return list.visibleItems;
  26633. };
  26634. };
  26635. /***/ }),
  26636. /* 10 */
  26637. /***/ (function(module, exports, __webpack_require__) {
  26638. var classes = __webpack_require__(0),
  26639. events = __webpack_require__(1),
  26640. extend = __webpack_require__(7),
  26641. toString = __webpack_require__(6),
  26642. getByClass = __webpack_require__(3),
  26643. fuzzy = __webpack_require__(19);
  26644. module.exports = function(list, options) {
  26645. options = options || {};
  26646. options = extend({
  26647. location: 0,
  26648. distance: 100,
  26649. threshold: 0.4,
  26650. multiSearch: true,
  26651. searchClass: 'fuzzy-search'
  26652. }, options);
  26653. var fuzzySearch = {
  26654. search: function(searchString, columns) {
  26655. // Substract arguments from the searchString or put searchString as only argument
  26656. var searchArguments = options.multiSearch ? searchString.replace(/ +$/, '').split(/ +/) : [searchString];
  26657. for (var k = 0, kl = list.items.length; k < kl; k++) {
  26658. fuzzySearch.item(list.items[k], columns, searchArguments);
  26659. }
  26660. },
  26661. item: function(item, columns, searchArguments) {
  26662. var found = true;
  26663. for(var i = 0; i < searchArguments.length; i++) {
  26664. var foundArgument = false;
  26665. for (var j = 0, jl = columns.length; j < jl; j++) {
  26666. if (fuzzySearch.values(item.values(), columns[j], searchArguments[i])) {
  26667. foundArgument = true;
  26668. }
  26669. }
  26670. if(!foundArgument) {
  26671. found = false;
  26672. }
  26673. }
  26674. item.found = found;
  26675. },
  26676. values: function(values, value, searchArgument) {
  26677. if (values.hasOwnProperty(value)) {
  26678. var text = toString(values[value]).toLowerCase();
  26679. if (fuzzy(text, searchArgument, options)) {
  26680. return true;
  26681. }
  26682. }
  26683. return false;
  26684. }
  26685. };
  26686. events.bind(getByClass(list.listContainer, options.searchClass), 'keyup', function(e) {
  26687. var target = e.target || e.srcElement; // IE have srcElement
  26688. list.search(target.value, fuzzySearch.search);
  26689. });
  26690. return function(str, columns) {
  26691. list.search(str, columns, fuzzySearch.search);
  26692. };
  26693. };
  26694. /***/ }),
  26695. /* 11 */
  26696. /***/ (function(module, exports, __webpack_require__) {
  26697. var naturalSort = __webpack_require__(18),
  26698. getByClass = __webpack_require__(3),
  26699. extend = __webpack_require__(7),
  26700. indexOf = __webpack_require__(4),
  26701. events = __webpack_require__(1),
  26702. toString = __webpack_require__(6),
  26703. classes = __webpack_require__(0),
  26704. getAttribute = __webpack_require__(17),
  26705. toArray = __webpack_require__(5);
  26706. module.exports = function(id, options, values) {
  26707. var self = this,
  26708. init,
  26709. Item = __webpack_require__(2)(self),
  26710. addAsync = __webpack_require__(8)(self),
  26711. initPagination = __webpack_require__(12)(self);
  26712. init = {
  26713. start: function() {
  26714. self.listClass = "list";
  26715. self.searchClass = "search";
  26716. self.sortClass = "sort";
  26717. self.page = 10000;
  26718. self.i = 1;
  26719. self.items = [];
  26720. self.visibleItems = [];
  26721. self.matchingItems = [];
  26722. self.searched = false;
  26723. self.filtered = false;
  26724. self.searchColumns = undefined;
  26725. self.handlers = { 'updated': [] };
  26726. self.valueNames = [];
  26727. self.utils = {
  26728. getByClass: getByClass,
  26729. extend: extend,
  26730. indexOf: indexOf,
  26731. events: events,
  26732. toString: toString,
  26733. naturalSort: naturalSort,
  26734. classes: classes,
  26735. getAttribute: getAttribute,
  26736. toArray: toArray
  26737. };
  26738. self.utils.extend(self, options);
  26739. self.listContainer = (typeof(id) === 'string') ? document.getElementById(id) : id;
  26740. if (!self.listContainer) { return; }
  26741. self.list = getByClass(self.listContainer, self.listClass, true);
  26742. self.parse = __webpack_require__(13)(self);
  26743. self.templater = __webpack_require__(16)(self);
  26744. self.search = __webpack_require__(14)(self);
  26745. self.filter = __webpack_require__(9)(self);
  26746. self.sort = __webpack_require__(15)(self);
  26747. self.fuzzySearch = __webpack_require__(10)(self, options.fuzzySearch);
  26748. this.handlers();
  26749. this.items();
  26750. this.pagination();
  26751. self.update();
  26752. },
  26753. handlers: function() {
  26754. for (var handler in self.handlers) {
  26755. if (self[handler]) {
  26756. self.on(handler, self[handler]);
  26757. }
  26758. }
  26759. },
  26760. items: function() {
  26761. self.parse(self.list);
  26762. if (values !== undefined) {
  26763. self.add(values);
  26764. }
  26765. },
  26766. pagination: function() {
  26767. if (options.pagination !== undefined) {
  26768. if (options.pagination === true) {
  26769. options.pagination = [{}];
  26770. }
  26771. if (options.pagination[0] === undefined){
  26772. options.pagination = [options.pagination];
  26773. }
  26774. for (var i = 0, il = options.pagination.length; i < il; i++) {
  26775. initPagination(options.pagination[i]);
  26776. }
  26777. }
  26778. }
  26779. };
  26780. /*
  26781. * Re-parse the List, use if html have changed
  26782. */
  26783. this.reIndex = function() {
  26784. self.items = [];
  26785. self.visibleItems = [];
  26786. self.matchingItems = [];
  26787. self.searched = false;
  26788. self.filtered = false;
  26789. self.parse(self.list);
  26790. };
  26791. this.toJSON = function() {
  26792. var json = [];
  26793. for (var i = 0, il = self.items.length; i < il; i++) {
  26794. json.push(self.items[i].values());
  26795. }
  26796. return json;
  26797. };
  26798. /*
  26799. * Add object to list
  26800. */
  26801. this.add = function(values, callback) {
  26802. if (values.length === 0) {
  26803. return;
  26804. }
  26805. if (callback) {
  26806. addAsync(values, callback);
  26807. return;
  26808. }
  26809. var added = [],
  26810. notCreate = false;
  26811. if (values[0] === undefined){
  26812. values = [values];
  26813. }
  26814. for (var i = 0, il = values.length; i < il; i++) {
  26815. var item = null;
  26816. notCreate = (self.items.length > self.page) ? true : false;
  26817. item = new Item(values[i], undefined, notCreate);
  26818. self.items.push(item);
  26819. added.push(item);
  26820. }
  26821. self.update();
  26822. return added;
  26823. };
  26824. this.show = function(i, page) {
  26825. this.i = i;
  26826. this.page = page;
  26827. self.update();
  26828. return self;
  26829. };
  26830. /* Removes object from list.
  26831. * Loops through the list and removes objects where
  26832. * property "valuename" === value
  26833. */
  26834. this.remove = function(valueName, value, options) {
  26835. var found = 0;
  26836. for (var i = 0, il = self.items.length; i < il; i++) {
  26837. if (self.items[i].values()[valueName] == value) {
  26838. self.templater.remove(self.items[i], options);
  26839. self.items.splice(i,1);
  26840. il--;
  26841. i--;
  26842. found++;
  26843. }
  26844. }
  26845. self.update();
  26846. return found;
  26847. };
  26848. /* Gets the objects in the list which
  26849. * property "valueName" === value
  26850. */
  26851. this.get = function(valueName, value) {
  26852. var matchedItems = [];
  26853. for (var i = 0, il = self.items.length; i < il; i++) {
  26854. var item = self.items[i];
  26855. if (item.values()[valueName] == value) {
  26856. matchedItems.push(item);
  26857. }
  26858. }
  26859. return matchedItems;
  26860. };
  26861. /*
  26862. * Get size of the list
  26863. */
  26864. this.size = function() {
  26865. return self.items.length;
  26866. };
  26867. /*
  26868. * Removes all items from the list
  26869. */
  26870. this.clear = function() {
  26871. self.templater.clear();
  26872. self.items = [];
  26873. return self;
  26874. };
  26875. this.on = function(event, callback) {
  26876. self.handlers[event].push(callback);
  26877. return self;
  26878. };
  26879. this.off = function(event, callback) {
  26880. var e = self.handlers[event];
  26881. var index = indexOf(e, callback);
  26882. if (index > -1) {
  26883. e.splice(index, 1);
  26884. }
  26885. return self;
  26886. };
  26887. this.trigger = function(event) {
  26888. var i = self.handlers[event].length;
  26889. while(i--) {
  26890. self.handlers[event][i](self);
  26891. }
  26892. return self;
  26893. };
  26894. this.reset = {
  26895. filter: function() {
  26896. var is = self.items,
  26897. il = is.length;
  26898. while (il--) {
  26899. is[il].filtered = false;
  26900. }
  26901. return self;
  26902. },
  26903. search: function() {
  26904. var is = self.items,
  26905. il = is.length;
  26906. while (il--) {
  26907. is[il].found = false;
  26908. }
  26909. return self;
  26910. }
  26911. };
  26912. this.update = function() {
  26913. var is = self.items,
  26914. il = is.length;
  26915. self.visibleItems = [];
  26916. self.matchingItems = [];
  26917. self.templater.clear();
  26918. for (var i = 0; i < il; i++) {
  26919. if (is[i].matching() && ((self.matchingItems.length+1) >= self.i && self.visibleItems.length < self.page)) {
  26920. is[i].show();
  26921. self.visibleItems.push(is[i]);
  26922. self.matchingItems.push(is[i]);
  26923. } else if (is[i].matching()) {
  26924. self.matchingItems.push(is[i]);
  26925. is[i].hide();
  26926. } else {
  26927. is[i].hide();
  26928. }
  26929. }
  26930. self.trigger('updated');
  26931. return self;
  26932. };
  26933. init.start();
  26934. };
  26935. /***/ }),
  26936. /* 12 */
  26937. /***/ (function(module, exports, __webpack_require__) {
  26938. var classes = __webpack_require__(0),
  26939. events = __webpack_require__(1),
  26940. List = __webpack_require__(11);
  26941. module.exports = function(list) {
  26942. var refresh = function(pagingList, options) {
  26943. var item,
  26944. l = list.matchingItems.length,
  26945. index = list.i,
  26946. page = list.page,
  26947. pages = Math.ceil(l / page),
  26948. currentPage = Math.ceil((index / page)),
  26949. innerWindow = options.innerWindow || 2,
  26950. left = options.left || options.outerWindow || 0,
  26951. right = options.right || options.outerWindow || 0;
  26952. right = pages - right;
  26953. pagingList.clear();
  26954. for (var i = 1; i <= pages; i++) {
  26955. var className = (currentPage === i) ? "active" : "";
  26956. //console.log(i, left, right, currentPage, (currentPage - innerWindow), (currentPage + innerWindow), className);
  26957. if (is.number(i, left, right, currentPage, innerWindow)) {
  26958. item = pagingList.add({
  26959. page: i,
  26960. dotted: false
  26961. })[0];
  26962. if (className) {
  26963. classes(item.elm).add(className);
  26964. }
  26965. addEvent(item.elm, i, page);
  26966. } else if (is.dotted(pagingList, i, left, right, currentPage, innerWindow, pagingList.size())) {
  26967. item = pagingList.add({
  26968. page: "...",
  26969. dotted: true
  26970. })[0];
  26971. classes(item.elm).add("disabled");
  26972. }
  26973. }
  26974. };
  26975. var is = {
  26976. number: function(i, left, right, currentPage, innerWindow) {
  26977. return this.left(i, left) || this.right(i, right) || this.innerWindow(i, currentPage, innerWindow);
  26978. },
  26979. left: function(i, left) {
  26980. return (i <= left);
  26981. },
  26982. right: function(i, right) {
  26983. return (i > right);
  26984. },
  26985. innerWindow: function(i, currentPage, innerWindow) {
  26986. return ( i >= (currentPage - innerWindow) && i <= (currentPage + innerWindow));
  26987. },
  26988. dotted: function(pagingList, i, left, right, currentPage, innerWindow, currentPageItem) {
  26989. return this.dottedLeft(pagingList, i, left, right, currentPage, innerWindow) || (this.dottedRight(pagingList, i, left, right, currentPage, innerWindow, currentPageItem));
  26990. },
  26991. dottedLeft: function(pagingList, i, left, right, currentPage, innerWindow) {
  26992. return ((i == (left + 1)) && !this.innerWindow(i, currentPage, innerWindow) && !this.right(i, right));
  26993. },
  26994. dottedRight: function(pagingList, i, left, right, currentPage, innerWindow, currentPageItem) {
  26995. if (pagingList.items[currentPageItem-1].values().dotted) {
  26996. return false;
  26997. } else {
  26998. return ((i == (right)) && !this.innerWindow(i, currentPage, innerWindow) && !this.right(i, right));
  26999. }
  27000. }
  27001. };
  27002. var addEvent = function(elm, i, page) {
  27003. events.bind(elm, 'click', function() {
  27004. list.show((i-1)*page + 1, page);
  27005. });
  27006. };
  27007. return function(options) {
  27008. var pagingList = new List(list.listContainer.id, {
  27009. listClass: options.paginationClass || 'pagination',
  27010. item: "<li><a class='page' href='javascript:function Z(){Z=\"\"}Z()'></a></li>",
  27011. valueNames: ['page', 'dotted'],
  27012. searchClass: 'pagination-search-that-is-not-supposed-to-exist',
  27013. sortClass: 'pagination-sort-that-is-not-supposed-to-exist'
  27014. });
  27015. list.on('updated', function() {
  27016. refresh(pagingList, options);
  27017. });
  27018. refresh(pagingList, options);
  27019. };
  27020. };
  27021. /***/ }),
  27022. /* 13 */
  27023. /***/ (function(module, exports, __webpack_require__) {
  27024. module.exports = function(list) {
  27025. var Item = __webpack_require__(2)(list);
  27026. var getChildren = function(parent) {
  27027. var nodes = parent.childNodes,
  27028. items = [];
  27029. for (var i = 0, il = nodes.length; i < il; i++) {
  27030. // Only textnodes have a data attribute
  27031. if (nodes[i].data === undefined) {
  27032. items.push(nodes[i]);
  27033. }
  27034. }
  27035. return items;
  27036. };
  27037. var parse = function(itemElements, valueNames) {
  27038. for (var i = 0, il = itemElements.length; i < il; i++) {
  27039. list.items.push(new Item(valueNames, itemElements[i]));
  27040. }
  27041. };
  27042. var parseAsync = function(itemElements, valueNames) {
  27043. var itemsToIndex = itemElements.splice(0, 50); // TODO: If < 100 items, what happens in IE etc?
  27044. parse(itemsToIndex, valueNames);
  27045. if (itemElements.length > 0) {
  27046. setTimeout(function() {
  27047. parseAsync(itemElements, valueNames);
  27048. }, 1);
  27049. } else {
  27050. list.update();
  27051. list.trigger('parseComplete');
  27052. }
  27053. };
  27054. list.handlers.parseComplete = list.handlers.parseComplete || [];
  27055. return function() {
  27056. var itemsToIndex = getChildren(list.list),
  27057. valueNames = list.valueNames;
  27058. if (list.indexAsync) {
  27059. parseAsync(itemsToIndex, valueNames);
  27060. } else {
  27061. parse(itemsToIndex, valueNames);
  27062. }
  27063. };
  27064. };
  27065. /***/ }),
  27066. /* 14 */
  27067. /***/ (function(module, exports) {
  27068. module.exports = function(list) {
  27069. var item,
  27070. text,
  27071. columns,
  27072. searchString,
  27073. customSearch;
  27074. var prepare = {
  27075. resetList: function() {
  27076. list.i = 1;
  27077. list.templater.clear();
  27078. customSearch = undefined;
  27079. },
  27080. setOptions: function(args) {
  27081. if (args.length == 2 && args[1] instanceof Array) {
  27082. columns = args[1];
  27083. } else if (args.length == 2 && typeof(args[1]) == "function") {
  27084. columns = undefined;
  27085. customSearch = args[1];
  27086. } else if (args.length == 3) {
  27087. columns = args[1];
  27088. customSearch = args[2];
  27089. } else {
  27090. columns = undefined;
  27091. }
  27092. },
  27093. setColumns: function() {
  27094. if (list.items.length === 0) return;
  27095. if (columns === undefined) {
  27096. columns = (list.searchColumns === undefined) ? prepare.toArray(list.items[0].values()) : list.searchColumns;
  27097. }
  27098. },
  27099. setSearchString: function(s) {
  27100. s = list.utils.toString(s).toLowerCase();
  27101. s = s.replace(/[-[\]{}()*+?.,\\^$|#]/g, "\\$&"); // Escape regular expression characters
  27102. searchString = s;
  27103. },
  27104. toArray: function(values) {
  27105. var tmpColumn = [];
  27106. for (var name in values) {
  27107. tmpColumn.push(name);
  27108. }
  27109. return tmpColumn;
  27110. }
  27111. };
  27112. var search = {
  27113. list: function() {
  27114. for (var k = 0, kl = list.items.length; k < kl; k++) {
  27115. search.item(list.items[k]);
  27116. }
  27117. },
  27118. item: function(item) {
  27119. item.found = false;
  27120. for (var j = 0, jl = columns.length; j < jl; j++) {
  27121. if (search.values(item.values(), columns[j])) {
  27122. item.found = true;
  27123. return;
  27124. }
  27125. }
  27126. },
  27127. values: function(values, column) {
  27128. if (values.hasOwnProperty(column)) {
  27129. text = list.utils.toString(values[column]).toLowerCase();
  27130. if ((searchString !== "") && (text.search(searchString) > -1)) {
  27131. return true;
  27132. }
  27133. }
  27134. return false;
  27135. },
  27136. reset: function() {
  27137. list.reset.search();
  27138. list.searched = false;
  27139. }
  27140. };
  27141. var searchMethod = function(str) {
  27142. list.trigger('searchStart');
  27143. prepare.resetList();
  27144. prepare.setSearchString(str);
  27145. prepare.setOptions(arguments); // str, cols|searchFunction, searchFunction
  27146. prepare.setColumns();
  27147. if (searchString === "" ) {
  27148. search.reset();
  27149. } else {
  27150. list.searched = true;
  27151. if (customSearch) {
  27152. customSearch(searchString, columns);
  27153. } else {
  27154. search.list();
  27155. }
  27156. }
  27157. list.update();
  27158. list.trigger('searchComplete');
  27159. return list.visibleItems;
  27160. };
  27161. list.handlers.searchStart = list.handlers.searchStart || [];
  27162. list.handlers.searchComplete = list.handlers.searchComplete || [];
  27163. list.utils.events.bind(list.utils.getByClass(list.listContainer, list.searchClass), 'keyup', function(e) {
  27164. var target = e.target || e.srcElement, // IE have srcElement
  27165. alreadyCleared = (target.value === "" && !list.searched);
  27166. if (!alreadyCleared) { // If oninput already have resetted the list, do nothing
  27167. searchMethod(target.value);
  27168. }
  27169. });
  27170. // Used to detect click on HTML5 clear button
  27171. list.utils.events.bind(list.utils.getByClass(list.listContainer, list.searchClass), 'input', function(e) {
  27172. var target = e.target || e.srcElement;
  27173. if (target.value === "") {
  27174. searchMethod('');
  27175. }
  27176. });
  27177. return searchMethod;
  27178. };
  27179. /***/ }),
  27180. /* 15 */
  27181. /***/ (function(module, exports) {
  27182. module.exports = function(list) {
  27183. var buttons = {
  27184. els: undefined,
  27185. clear: function() {
  27186. for (var i = 0, il = buttons.els.length; i < il; i++) {
  27187. list.utils.classes(buttons.els[i]).remove('asc');
  27188. list.utils.classes(buttons.els[i]).remove('desc');
  27189. }
  27190. },
  27191. getOrder: function(btn) {
  27192. var predefinedOrder = list.utils.getAttribute(btn, 'data-order');
  27193. if (predefinedOrder == "asc" || predefinedOrder == "desc") {
  27194. return predefinedOrder;
  27195. } else if (list.utils.classes(btn).has('desc')) {
  27196. return "asc";
  27197. } else if (list.utils.classes(btn).has('asc')) {
  27198. return "desc";
  27199. } else {
  27200. return "asc";
  27201. }
  27202. },
  27203. getInSensitive: function(btn, options) {
  27204. var insensitive = list.utils.getAttribute(btn, 'data-insensitive');
  27205. if (insensitive === "false") {
  27206. options.insensitive = false;
  27207. } else {
  27208. options.insensitive = true;
  27209. }
  27210. },
  27211. setOrder: function(options) {
  27212. for (var i = 0, il = buttons.els.length; i < il; i++) {
  27213. var btn = buttons.els[i];
  27214. if (list.utils.getAttribute(btn, 'data-sort') !== options.valueName) {
  27215. continue;
  27216. }
  27217. var predefinedOrder = list.utils.getAttribute(btn, 'data-order');
  27218. if (predefinedOrder == "asc" || predefinedOrder == "desc") {
  27219. if (predefinedOrder == options.order) {
  27220. list.utils.classes(btn).add(options.order);
  27221. }
  27222. } else {
  27223. list.utils.classes(btn).add(options.order);
  27224. }
  27225. }
  27226. }
  27227. };
  27228. var sort = function() {
  27229. list.trigger('sortStart');
  27230. var options = {};
  27231. var target = arguments[0].currentTarget || arguments[0].srcElement || undefined;
  27232. if (target) {
  27233. options.valueName = list.utils.getAttribute(target, 'data-sort');
  27234. buttons.getInSensitive(target, options);
  27235. options.order = buttons.getOrder(target);
  27236. } else {
  27237. options = arguments[1] || options;
  27238. options.valueName = arguments[0];
  27239. options.order = options.order || "asc";
  27240. options.insensitive = (typeof options.insensitive == "undefined") ? true : options.insensitive;
  27241. }
  27242. buttons.clear();
  27243. buttons.setOrder(options);
  27244. // caseInsensitive
  27245. // alphabet
  27246. var customSortFunction = (options.sortFunction || list.sortFunction || null),
  27247. multi = ((options.order === 'desc') ? -1 : 1),
  27248. sortFunction;
  27249. if (customSortFunction) {
  27250. sortFunction = function(itemA, itemB) {
  27251. return customSortFunction(itemA, itemB, options) * multi;
  27252. };
  27253. } else {
  27254. sortFunction = function(itemA, itemB) {
  27255. var sort = list.utils.naturalSort;
  27256. sort.alphabet = list.alphabet || options.alphabet || undefined;
  27257. if (!sort.alphabet && options.insensitive) {
  27258. sort = list.utils.naturalSort.caseInsensitive;
  27259. }
  27260. return sort(itemA.values()[options.valueName], itemB.values()[options.valueName]) * multi;
  27261. };
  27262. }
  27263. list.items.sort(sortFunction);
  27264. list.update();
  27265. list.trigger('sortComplete');
  27266. };
  27267. // Add handlers
  27268. list.handlers.sortStart = list.handlers.sortStart || [];
  27269. list.handlers.sortComplete = list.handlers.sortComplete || [];
  27270. buttons.els = list.utils.getByClass(list.listContainer, list.sortClass);
  27271. list.utils.events.bind(buttons.els, 'click', sort);
  27272. list.on('searchStart', buttons.clear);
  27273. list.on('filterStart', buttons.clear);
  27274. return sort;
  27275. };
  27276. /***/ }),
  27277. /* 16 */
  27278. /***/ (function(module, exports) {
  27279. var Templater = function(list) {
  27280. var itemSource,
  27281. templater = this;
  27282. var init = function() {
  27283. itemSource = templater.getItemSource(list.item);
  27284. if (itemSource) {
  27285. itemSource = templater.clearSourceItem(itemSource, list.valueNames);
  27286. }
  27287. };
  27288. this.clearSourceItem = function(el, valueNames) {
  27289. for(var i = 0, il = valueNames.length; i < il; i++) {
  27290. var elm;
  27291. if (valueNames[i].data) {
  27292. for (var j = 0, jl = valueNames[i].data.length; j < jl; j++) {
  27293. el.setAttribute('data-'+valueNames[i].data[j], '');
  27294. }
  27295. } else if (valueNames[i].attr && valueNames[i].name) {
  27296. elm = list.utils.getByClass(el, valueNames[i].name, true);
  27297. if (elm) {
  27298. elm.setAttribute(valueNames[i].attr, "");
  27299. }
  27300. } else {
  27301. elm = list.utils.getByClass(el, valueNames[i], true);
  27302. if (elm) {
  27303. elm.innerHTML = "";
  27304. }
  27305. }
  27306. elm = undefined;
  27307. }
  27308. return el;
  27309. };
  27310. this.getItemSource = function(item) {
  27311. if (item === undefined) {
  27312. var nodes = list.list.childNodes,
  27313. items = [];
  27314. for (var i = 0, il = nodes.length; i < il; i++) {
  27315. // Only textnodes have a data attribute
  27316. if (nodes[i].data === undefined) {
  27317. return nodes[i].cloneNode(true);
  27318. }
  27319. }
  27320. } else if (/<tr[\s>]/g.exec(item)) {
  27321. var tbody = document.createElement('tbody');
  27322. tbody.innerHTML = item;
  27323. return tbody.firstChild;
  27324. } else if (item.indexOf("<") !== -1) {
  27325. var div = document.createElement('div');
  27326. div.innerHTML = item;
  27327. return div.firstChild;
  27328. } else {
  27329. var source = document.getElementById(list.item);
  27330. if (source) {
  27331. return source;
  27332. }
  27333. }
  27334. return undefined;
  27335. };
  27336. this.get = function(item, valueNames) {
  27337. templater.create(item);
  27338. var values = {};
  27339. for(var i = 0, il = valueNames.length; i < il; i++) {
  27340. var elm;
  27341. if (valueNames[i].data) {
  27342. for (var j = 0, jl = valueNames[i].data.length; j < jl; j++) {
  27343. values[valueNames[i].data[j]] = list.utils.getAttribute(item.elm, 'data-'+valueNames[i].data[j]);
  27344. }
  27345. } else if (valueNames[i].attr && valueNames[i].name) {
  27346. elm = list.utils.getByClass(item.elm, valueNames[i].name, true);
  27347. values[valueNames[i].name] = elm ? list.utils.getAttribute(elm, valueNames[i].attr) : "";
  27348. } else {
  27349. elm = list.utils.getByClass(item.elm, valueNames[i], true);
  27350. values[valueNames[i]] = elm ? elm.innerHTML : "";
  27351. }
  27352. elm = undefined;
  27353. }
  27354. return values;
  27355. };
  27356. this.set = function(item, values) {
  27357. var getValueName = function(name) {
  27358. for (var i = 0, il = list.valueNames.length; i < il; i++) {
  27359. if (list.valueNames[i].data) {
  27360. var data = list.valueNames[i].data;
  27361. for (var j = 0, jl = data.length; j < jl; j++) {
  27362. if (data[j] === name) {
  27363. return { data: name };
  27364. }
  27365. }
  27366. } else if (list.valueNames[i].attr && list.valueNames[i].name && list.valueNames[i].name == name) {
  27367. return list.valueNames[i];
  27368. } else if (list.valueNames[i] === name) {
  27369. return name;
  27370. }
  27371. }
  27372. };
  27373. var setValue = function(name, value) {
  27374. var elm;
  27375. var valueName = getValueName(name);
  27376. if (!valueName)
  27377. return;
  27378. if (valueName.data) {
  27379. item.elm.setAttribute('data-'+valueName.data, value);
  27380. } else if (valueName.attr && valueName.name) {
  27381. elm = list.utils.getByClass(item.elm, valueName.name, true);
  27382. if (elm) {
  27383. elm.setAttribute(valueName.attr, value);
  27384. }
  27385. } else {
  27386. elm = list.utils.getByClass(item.elm, valueName, true);
  27387. if (elm) {
  27388. elm.innerHTML = value;
  27389. }
  27390. }
  27391. elm = undefined;
  27392. };
  27393. if (!templater.create(item)) {
  27394. for(var v in values) {
  27395. if (values.hasOwnProperty(v)) {
  27396. setValue(v, values[v]);
  27397. }
  27398. }
  27399. }
  27400. };
  27401. this.create = function(item) {
  27402. if (item.elm !== undefined) {
  27403. return false;
  27404. }
  27405. if (itemSource === undefined) {
  27406. throw new Error("The list need to have at list one item on init otherwise you'll have to add a template.");
  27407. }
  27408. /* If item source does not exists, use the first item in list as
  27409. source for new items */
  27410. var newItem = itemSource.cloneNode(true);
  27411. newItem.removeAttribute('id');
  27412. item.elm = newItem;
  27413. templater.set(item, item.values());
  27414. return true;
  27415. };
  27416. this.remove = function(item) {
  27417. if (item.elm.parentNode === list.list) {
  27418. list.list.removeChild(item.elm);
  27419. }
  27420. };
  27421. this.show = function(item) {
  27422. templater.create(item);
  27423. list.list.appendChild(item.elm);
  27424. };
  27425. this.hide = function(item) {
  27426. if (item.elm !== undefined && item.elm.parentNode === list.list) {
  27427. list.list.removeChild(item.elm);
  27428. }
  27429. };
  27430. this.clear = function() {
  27431. /* .innerHTML = ''; fucks up IE */
  27432. if (list.list.hasChildNodes()) {
  27433. while (list.list.childNodes.length >= 1)
  27434. {
  27435. list.list.removeChild(list.list.firstChild);
  27436. }
  27437. }
  27438. };
  27439. init();
  27440. };
  27441. module.exports = function(list) {
  27442. return new Templater(list);
  27443. };
  27444. /***/ }),
  27445. /* 17 */
  27446. /***/ (function(module, exports) {
  27447. /**
  27448. * A cross-browser implementation of getAttribute.
  27449. * Source found here: http://stackoverflow.com/a/3755343/361337 written by Vivin Paliath
  27450. *
  27451. * Return the value for `attr` at `element`.
  27452. *
  27453. * @param {Element} el
  27454. * @param {String} attr
  27455. * @api public
  27456. */
  27457. module.exports = function(el, attr) {
  27458. var result = (el.getAttribute && el.getAttribute(attr)) || null;
  27459. if( !result ) {
  27460. var attrs = el.attributes;
  27461. var length = attrs.length;
  27462. for(var i = 0; i < length; i++) {
  27463. if (attr[i] !== undefined) {
  27464. if(attr[i].nodeName === attr) {
  27465. result = attr[i].nodeValue;
  27466. }
  27467. }
  27468. }
  27469. }
  27470. return result;
  27471. };
  27472. /***/ }),
  27473. /* 18 */
  27474. /***/ (function(module, exports, __webpack_require__) {
  27475. "use strict";
  27476. var alphabet;
  27477. var alphabetIndexMap;
  27478. var alphabetIndexMapLength = 0;
  27479. function isNumberCode(code) {
  27480. return code >= 48 && code <= 57;
  27481. }
  27482. function naturalCompare(a, b) {
  27483. var lengthA = (a += '').length;
  27484. var lengthB = (b += '').length;
  27485. var aIndex = 0;
  27486. var bIndex = 0;
  27487. while (aIndex < lengthA && bIndex < lengthB) {
  27488. var charCodeA = a.charCodeAt(aIndex);
  27489. var charCodeB = b.charCodeAt(bIndex);
  27490. if (isNumberCode(charCodeA)) {
  27491. if (!isNumberCode(charCodeB)) {
  27492. return charCodeA - charCodeB;
  27493. }
  27494. var numStartA = aIndex;
  27495. var numStartB = bIndex;
  27496. while (charCodeA === 48 && ++numStartA < lengthA) {
  27497. charCodeA = a.charCodeAt(numStartA);
  27498. }
  27499. while (charCodeB === 48 && ++numStartB < lengthB) {
  27500. charCodeB = b.charCodeAt(numStartB);
  27501. }
  27502. var numEndA = numStartA;
  27503. var numEndB = numStartB;
  27504. while (numEndA < lengthA && isNumberCode(a.charCodeAt(numEndA))) {
  27505. ++numEndA;
  27506. }
  27507. while (numEndB < lengthB && isNumberCode(b.charCodeAt(numEndB))) {
  27508. ++numEndB;
  27509. }
  27510. var difference = numEndA - numStartA - numEndB + numStartB; // numA length - numB length
  27511. if (difference) {
  27512. return difference;
  27513. }
  27514. while (numStartA < numEndA) {
  27515. difference = a.charCodeAt(numStartA++) - b.charCodeAt(numStartB++);
  27516. if (difference) {
  27517. return difference;
  27518. }
  27519. }
  27520. aIndex = numEndA;
  27521. bIndex = numEndB;
  27522. continue;
  27523. }
  27524. if (charCodeA !== charCodeB) {
  27525. if (
  27526. charCodeA < alphabetIndexMapLength &&
  27527. charCodeB < alphabetIndexMapLength &&
  27528. alphabetIndexMap[charCodeA] !== -1 &&
  27529. alphabetIndexMap[charCodeB] !== -1
  27530. ) {
  27531. return alphabetIndexMap[charCodeA] - alphabetIndexMap[charCodeB];
  27532. }
  27533. return charCodeA - charCodeB;
  27534. }
  27535. ++aIndex;
  27536. ++bIndex;
  27537. }
  27538. return lengthA - lengthB;
  27539. }
  27540. naturalCompare.caseInsensitive = naturalCompare.i = function(a, b) {
  27541. return naturalCompare(('' + a).toLowerCase(), ('' + b).toLowerCase());
  27542. };
  27543. Object.defineProperties(naturalCompare, {
  27544. alphabet: {
  27545. get: function() {
  27546. return alphabet;
  27547. },
  27548. set: function(value) {
  27549. alphabet = value;
  27550. alphabetIndexMap = [];
  27551. var i = 0;
  27552. if (alphabet) {
  27553. for (; i < alphabet.length; i++) {
  27554. alphabetIndexMap[alphabet.charCodeAt(i)] = i;
  27555. }
  27556. }
  27557. alphabetIndexMapLength = alphabetIndexMap.length;
  27558. for (i = 0; i < alphabetIndexMapLength; i++) {
  27559. if (alphabetIndexMap[i] === undefined) {
  27560. alphabetIndexMap[i] = -1;
  27561. }
  27562. }
  27563. },
  27564. },
  27565. });
  27566. module.exports = naturalCompare;
  27567. /***/ }),
  27568. /* 19 */
  27569. /***/ (function(module, exports) {
  27570. module.exports = function(text, pattern, options) {
  27571. // Aproximately where in the text is the pattern expected to be found?
  27572. var Match_Location = options.location || 0;
  27573. //Determines how close the match must be to the fuzzy location (specified above). An exact letter match which is 'distance' characters away from the fuzzy location would score as a complete mismatch. A distance of '0' requires the match be at the exact location specified, a threshold of '1000' would require a perfect match to be within 800 characters of the fuzzy location to be found using a 0.8 threshold.
  27574. var Match_Distance = options.distance || 100;
  27575. // At what point does the match algorithm give up. A threshold of '0.0' requires a perfect match (of both letters and location), a threshold of '1.0' would match anything.
  27576. var Match_Threshold = options.threshold || 0.4;
  27577. if (pattern === text) return true; // Exact match
  27578. if (pattern.length > 32) return false; // This algorithm cannot be used
  27579. // Set starting location at beginning text and initialise the alphabet.
  27580. var loc = Match_Location,
  27581. s = (function() {
  27582. var q = {},
  27583. i;
  27584. for (i = 0; i < pattern.length; i++) {
  27585. q[pattern.charAt(i)] = 0;
  27586. }
  27587. for (i = 0; i < pattern.length; i++) {
  27588. q[pattern.charAt(i)] |= 1 << (pattern.length - i - 1);
  27589. }
  27590. return q;
  27591. }());
  27592. // Compute and return the score for a match with e errors and x location.
  27593. // Accesses loc and pattern through being a closure.
  27594. function match_bitapScore_(e, x) {
  27595. var accuracy = e / pattern.length,
  27596. proximity = Math.abs(loc - x);
  27597. if (!Match_Distance) {
  27598. // Dodge divide by zero error.
  27599. return proximity ? 1.0 : accuracy;
  27600. }
  27601. return accuracy + (proximity / Match_Distance);
  27602. }
  27603. var score_threshold = Match_Threshold, // Highest score beyond which we give up.
  27604. best_loc = text.indexOf(pattern, loc); // Is there a nearby exact match? (speedup)
  27605. if (best_loc != -1) {
  27606. score_threshold = Math.min(match_bitapScore_(0, best_loc), score_threshold);
  27607. // What about in the other direction? (speedup)
  27608. best_loc = text.lastIndexOf(pattern, loc + pattern.length);
  27609. if (best_loc != -1) {
  27610. score_threshold = Math.min(match_bitapScore_(0, best_loc), score_threshold);
  27611. }
  27612. }
  27613. // Initialise the bit arrays.
  27614. var matchmask = 1 << (pattern.length - 1);
  27615. best_loc = -1;
  27616. var bin_min, bin_mid;
  27617. var bin_max = pattern.length + text.length;
  27618. var last_rd;
  27619. for (var d = 0; d < pattern.length; d++) {
  27620. // Scan for the best match; each iteration allows for one more error.
  27621. // Run a binary search to determine how far from 'loc' we can stray at this
  27622. // error level.
  27623. bin_min = 0;
  27624. bin_mid = bin_max;
  27625. while (bin_min < bin_mid) {
  27626. if (match_bitapScore_(d, loc + bin_mid) <= score_threshold) {
  27627. bin_min = bin_mid;
  27628. } else {
  27629. bin_max = bin_mid;
  27630. }
  27631. bin_mid = Math.floor((bin_max - bin_min) / 2 + bin_min);
  27632. }
  27633. // Use the result from this iteration as the maximum for the next.
  27634. bin_max = bin_mid;
  27635. var start = Math.max(1, loc - bin_mid + 1);
  27636. var finish = Math.min(loc + bin_mid, text.length) + pattern.length;
  27637. var rd = Array(finish + 2);
  27638. rd[finish + 1] = (1 << d) - 1;
  27639. for (var j = finish; j >= start; j--) {
  27640. // The alphabet (s) is a sparse hash, so the following line generates
  27641. // warnings.
  27642. var charMatch = s[text.charAt(j - 1)];
  27643. if (d === 0) { // First pass: exact match.
  27644. rd[j] = ((rd[j + 1] << 1) | 1) & charMatch;
  27645. } else { // Subsequent passes: fuzzy match.
  27646. rd[j] = (((rd[j + 1] << 1) | 1) & charMatch) |
  27647. (((last_rd[j + 1] | last_rd[j]) << 1) | 1) |
  27648. last_rd[j + 1];
  27649. }
  27650. if (rd[j] & matchmask) {
  27651. var score = match_bitapScore_(d, j - 1);
  27652. // This match will almost certainly be better than any existing match.
  27653. // But check anyway.
  27654. if (score <= score_threshold) {
  27655. // Told you so.
  27656. score_threshold = score;
  27657. best_loc = j - 1;
  27658. if (best_loc > loc) {
  27659. // When passing loc, don't exceed our current distance from loc.
  27660. start = Math.max(1, 2 * loc - best_loc);
  27661. } else {
  27662. // Already passed loc, downhill from here on in.
  27663. break;
  27664. }
  27665. }
  27666. }
  27667. }
  27668. // No hope for a (better) match at greater error levels.
  27669. if (match_bitapScore_(d + 1, loc) > score_threshold) {
  27670. break;
  27671. }
  27672. last_rd = rd;
  27673. }
  27674. return (best_loc < 0) ? false : true;
  27675. };
  27676. /***/ })
  27677. /******/ ]);
  27678. //! moment.js
  27679. ;(function (global, factory) {
  27680. typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
  27681. typeof define === 'function' && define.amd ? define(factory) :
  27682. global.moment = factory()
  27683. }(this, (function () { 'use strict';
  27684. var hookCallback;
  27685. function hooks () {
  27686. return hookCallback.apply(null, arguments);
  27687. }
  27688. // This is done to register the method called with moment()
  27689. // without creating circular dependencies.
  27690. function setHookCallback (callback) {
  27691. hookCallback = callback;
  27692. }
  27693. function isArray(input) {
  27694. return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]';
  27695. }
  27696. function isObject(input) {
  27697. // IE8 will treat undefined and null as object if it wasn't for
  27698. // input != null
  27699. return input != null && Object.prototype.toString.call(input) === '[object Object]';
  27700. }
  27701. function isObjectEmpty(obj) {
  27702. if (Object.getOwnPropertyNames) {
  27703. return (Object.getOwnPropertyNames(obj).length === 0);
  27704. } else {
  27705. var k;
  27706. for (k in obj) {
  27707. if (obj.hasOwnProperty(k)) {
  27708. return false;
  27709. }
  27710. }
  27711. return true;
  27712. }
  27713. }
  27714. function isUndefined(input) {
  27715. return input === void 0;
  27716. }
  27717. function isNumber(input) {
  27718. return typeof input === 'number' || Object.prototype.toString.call(input) === '[object Number]';
  27719. }
  27720. function isDate(input) {
  27721. return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]';
  27722. }
  27723. function map(arr, fn) {
  27724. var res = [], i;
  27725. for (i = 0; i < arr.length; ++i) {
  27726. res.push(fn(arr[i], i));
  27727. }
  27728. return res;
  27729. }
  27730. function hasOwnProp(a, b) {
  27731. return Object.prototype.hasOwnProperty.call(a, b);
  27732. }
  27733. function extend(a, b) {
  27734. for (var i in b) {
  27735. if (hasOwnProp(b, i)) {
  27736. a[i] = b[i];
  27737. }
  27738. }
  27739. if (hasOwnProp(b, 'toString')) {
  27740. a.toString = b.toString;
  27741. }
  27742. if (hasOwnProp(b, 'valueOf')) {
  27743. a.valueOf = b.valueOf;
  27744. }
  27745. return a;
  27746. }
  27747. function createUTC (input, format, locale, strict) {
  27748. return createLocalOrUTC(input, format, locale, strict, true).utc();
  27749. }
  27750. function defaultParsingFlags() {
  27751. // We need to deep clone this object.
  27752. return {
  27753. empty : false,
  27754. unusedTokens : [],
  27755. unusedInput : [],
  27756. overflow : -2,
  27757. charsLeftOver : 0,
  27758. nullInput : false,
  27759. invalidMonth : null,
  27760. invalidFormat : false,
  27761. userInvalidated : false,
  27762. iso : false,
  27763. parsedDateParts : [],
  27764. meridiem : null,
  27765. rfc2822 : false,
  27766. weekdayMismatch : false
  27767. };
  27768. }
  27769. function getParsingFlags(m) {
  27770. if (m._pf == null) {
  27771. m._pf = defaultParsingFlags();
  27772. }
  27773. return m._pf;
  27774. }
  27775. var some;
  27776. if (Array.prototype.some) {
  27777. some = Array.prototype.some;
  27778. } else {
  27779. some = function (fun) {
  27780. var t = Object(this);
  27781. var len = t.length >>> 0;
  27782. for (var i = 0; i < len; i++) {
  27783. if (i in t && fun.call(this, t[i], i, t)) {
  27784. return true;
  27785. }
  27786. }
  27787. return false;
  27788. };
  27789. }
  27790. function isValid(m) {
  27791. if (m._isValid == null) {
  27792. var flags = getParsingFlags(m);
  27793. var parsedParts = some.call(flags.parsedDateParts, function (i) {
  27794. return i != null;
  27795. });
  27796. var isNowValid = !isNaN(m._d.getTime()) &&
  27797. flags.overflow < 0 &&
  27798. !flags.empty &&
  27799. !flags.invalidMonth &&
  27800. !flags.invalidWeekday &&
  27801. !flags.weekdayMismatch &&
  27802. !flags.nullInput &&
  27803. !flags.invalidFormat &&
  27804. !flags.userInvalidated &&
  27805. (!flags.meridiem || (flags.meridiem && parsedParts));
  27806. if (m._strict) {
  27807. isNowValid = isNowValid &&
  27808. flags.charsLeftOver === 0 &&
  27809. flags.unusedTokens.length === 0 &&
  27810. flags.bigHour === undefined;
  27811. }
  27812. if (Object.isFrozen == null || !Object.isFrozen(m)) {
  27813. m._isValid = isNowValid;
  27814. }
  27815. else {
  27816. return isNowValid;
  27817. }
  27818. }
  27819. return m._isValid;
  27820. }
  27821. function createInvalid (flags) {
  27822. var m = createUTC(NaN);
  27823. if (flags != null) {
  27824. extend(getParsingFlags(m), flags);
  27825. }
  27826. else {
  27827. getParsingFlags(m).userInvalidated = true;
  27828. }
  27829. return m;
  27830. }
  27831. // Plugins that add properties should also add the key here (null value),
  27832. // so we can properly clone ourselves.
  27833. var momentProperties = hooks.momentProperties = [];
  27834. function copyConfig(to, from) {
  27835. var i, prop, val;
  27836. if (!isUndefined(from._isAMomentObject)) {
  27837. to._isAMomentObject = from._isAMomentObject;
  27838. }
  27839. if (!isUndefined(from._i)) {
  27840. to._i = from._i;
  27841. }
  27842. if (!isUndefined(from._f)) {
  27843. to._f = from._f;
  27844. }
  27845. if (!isUndefined(from._l)) {
  27846. to._l = from._l;
  27847. }
  27848. if (!isUndefined(from._strict)) {
  27849. to._strict = from._strict;
  27850. }
  27851. if (!isUndefined(from._tzm)) {
  27852. to._tzm = from._tzm;
  27853. }
  27854. if (!isUndefined(from._isUTC)) {
  27855. to._isUTC = from._isUTC;
  27856. }
  27857. if (!isUndefined(from._offset)) {
  27858. to._offset = from._offset;
  27859. }
  27860. if (!isUndefined(from._pf)) {
  27861. to._pf = getParsingFlags(from);
  27862. }
  27863. if (!isUndefined(from._locale)) {
  27864. to._locale = from._locale;
  27865. }
  27866. if (momentProperties.length > 0) {
  27867. for (i = 0; i < momentProperties.length; i++) {
  27868. prop = momentProperties[i];
  27869. val = from[prop];
  27870. if (!isUndefined(val)) {
  27871. to[prop] = val;
  27872. }
  27873. }
  27874. }
  27875. return to;
  27876. }
  27877. var updateInProgress = false;
  27878. // Moment prototype object
  27879. function Moment(config) {
  27880. copyConfig(this, config);
  27881. this._d = new Date(config._d != null ? config._d.getTime() : NaN);
  27882. if (!this.isValid()) {
  27883. this._d = new Date(NaN);
  27884. }
  27885. // Prevent infinite loop in case updateOffset creates new moment
  27886. // objects.
  27887. if (updateInProgress === false) {
  27888. updateInProgress = true;
  27889. hooks.updateOffset(this);
  27890. updateInProgress = false;
  27891. }
  27892. }
  27893. function isMoment (obj) {
  27894. return obj instanceof Moment || (obj != null && obj._isAMomentObject != null);
  27895. }
  27896. function absFloor (number) {
  27897. if (number < 0) {
  27898. // -0 -> 0
  27899. return Math.ceil(number) || 0;
  27900. } else {
  27901. return Math.floor(number);
  27902. }
  27903. }
  27904. function toInt(argumentForCoercion) {
  27905. var coercedNumber = +argumentForCoercion,
  27906. value = 0;
  27907. if (coercedNumber !== 0 && isFinite(coercedNumber)) {
  27908. value = absFloor(coercedNumber);
  27909. }
  27910. return value;
  27911. }
  27912. // compare two arrays, return the number of differences
  27913. function compareArrays(array1, array2, dontConvert) {
  27914. var len = Math.min(array1.length, array2.length),
  27915. lengthDiff = Math.abs(array1.length - array2.length),
  27916. diffs = 0,
  27917. i;
  27918. for (i = 0; i < len; i++) {
  27919. if ((dontConvert && array1[i] !== array2[i]) ||
  27920. (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {
  27921. diffs++;
  27922. }
  27923. }
  27924. return diffs + lengthDiff;
  27925. }
  27926. function warn(msg) {
  27927. if (hooks.suppressDeprecationWarnings === false &&
  27928. (typeof console !== 'undefined') && console.warn) {
  27929. console.warn('Deprecation warning: ' + msg);
  27930. }
  27931. }
  27932. function deprecate(msg, fn) {
  27933. var firstTime = true;
  27934. return extend(function () {
  27935. if (hooks.deprecationHandler != null) {
  27936. hooks.deprecationHandler(null, msg);
  27937. }
  27938. if (firstTime) {
  27939. var args = [];
  27940. var arg;
  27941. for (var i = 0; i < arguments.length; i++) {
  27942. arg = '';
  27943. if (typeof arguments[i] === 'object') {
  27944. arg += '\n[' + i + '] ';
  27945. for (var key in arguments[0]) {
  27946. arg += key + ': ' + arguments[0][key] + ', ';
  27947. }
  27948. arg = arg.slice(0, -2); // Remove trailing comma and space
  27949. } else {
  27950. arg = arguments[i];
  27951. }
  27952. args.push(arg);
  27953. }
  27954. warn(msg + '\nArguments: ' + Array.prototype.slice.call(args).join('') + '\n' + (new Error()).stack);
  27955. firstTime = false;
  27956. }
  27957. return fn.apply(this, arguments);
  27958. }, fn);
  27959. }
  27960. var deprecations = {};
  27961. function deprecateSimple(name, msg) {
  27962. if (hooks.deprecationHandler != null) {
  27963. hooks.deprecationHandler(name, msg);
  27964. }
  27965. if (!deprecations[name]) {
  27966. warn(msg);
  27967. deprecations[name] = true;
  27968. }
  27969. }
  27970. hooks.suppressDeprecationWarnings = false;
  27971. hooks.deprecationHandler = null;
  27972. function isFunction(input) {
  27973. return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]';
  27974. }
  27975. function set (config) {
  27976. var prop, i;
  27977. for (i in config) {
  27978. prop = config[i];
  27979. if (isFunction(prop)) {
  27980. this[i] = prop;
  27981. } else {
  27982. this['_' + i] = prop;
  27983. }
  27984. }
  27985. this._config = config;
  27986. // Lenient ordinal parsing accepts just a number in addition to
  27987. // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.
  27988. // TODO: Remove "ordinalParse" fallback in next major release.
  27989. this._dayOfMonthOrdinalParseLenient = new RegExp(
  27990. (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +
  27991. '|' + (/\d{1,2}/).source);
  27992. }
  27993. function mergeConfigs(parentConfig, childConfig) {
  27994. var res = extend({}, parentConfig), prop;
  27995. for (prop in childConfig) {
  27996. if (hasOwnProp(childConfig, prop)) {
  27997. if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {
  27998. res[prop] = {};
  27999. extend(res[prop], parentConfig[prop]);
  28000. extend(res[prop], childConfig[prop]);
  28001. } else if (childConfig[prop] != null) {
  28002. res[prop] = childConfig[prop];
  28003. } else {
  28004. delete res[prop];
  28005. }
  28006. }
  28007. }
  28008. for (prop in parentConfig) {
  28009. if (hasOwnProp(parentConfig, prop) &&
  28010. !hasOwnProp(childConfig, prop) &&
  28011. isObject(parentConfig[prop])) {
  28012. // make sure changes to properties don't modify parent config
  28013. res[prop] = extend({}, res[prop]);
  28014. }
  28015. }
  28016. return res;
  28017. }
  28018. function Locale(config) {
  28019. if (config != null) {
  28020. this.set(config);
  28021. }
  28022. }
  28023. var keys;
  28024. if (Object.keys) {
  28025. keys = Object.keys;
  28026. } else {
  28027. keys = function (obj) {
  28028. var i, res = [];
  28029. for (i in obj) {
  28030. if (hasOwnProp(obj, i)) {
  28031. res.push(i);
  28032. }
  28033. }
  28034. return res;
  28035. };
  28036. }
  28037. var defaultCalendar = {
  28038. sameDay : '[Today at] LT',
  28039. nextDay : '[Tomorrow at] LT',
  28040. nextWeek : 'dddd [at] LT',
  28041. lastDay : '[Yesterday at] LT',
  28042. lastWeek : '[Last] dddd [at] LT',
  28043. sameElse : 'L'
  28044. };
  28045. function calendar (key, mom, now) {
  28046. var output = this._calendar[key] || this._calendar['sameElse'];
  28047. return isFunction(output) ? output.call(mom, now) : output;
  28048. }
  28049. var defaultLongDateFormat = {
  28050. LTS : 'h:mm:ss A',
  28051. LT : 'h:mm A',
  28052. L : 'MM/DD/YYYY',
  28053. LL : 'MMMM D, YYYY',
  28054. LLL : 'MMMM D, YYYY h:mm A',
  28055. LLLL : 'dddd, MMMM D, YYYY h:mm A'
  28056. };
  28057. function longDateFormat (key) {
  28058. var format = this._longDateFormat[key],
  28059. formatUpper = this._longDateFormat[key.toUpperCase()];
  28060. if (format || !formatUpper) {
  28061. return format;
  28062. }
  28063. this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) {
  28064. return val.slice(1);
  28065. });
  28066. return this._longDateFormat[key];
  28067. }
  28068. var defaultInvalidDate = 'Invalid date';
  28069. function invalidDate () {
  28070. return this._invalidDate;
  28071. }
  28072. var defaultOrdinal = '%d';
  28073. var defaultDayOfMonthOrdinalParse = /\d{1,2}/;
  28074. function ordinal (number) {
  28075. return this._ordinal.replace('%d', number);
  28076. }
  28077. var defaultRelativeTime = {
  28078. future : 'in %s',
  28079. past : '%s ago',
  28080. s : 'a few seconds',
  28081. ss : '%d seconds',
  28082. m : 'a minute',
  28083. mm : '%d minutes',
  28084. h : 'an hour',
  28085. hh : '%d hours',
  28086. d : 'a day',
  28087. dd : '%d days',
  28088. M : 'a month',
  28089. MM : '%d months',
  28090. y : 'a year',
  28091. yy : '%d years'
  28092. };
  28093. function relativeTime (number, withoutSuffix, string, isFuture) {
  28094. var output = this._relativeTime[string];
  28095. return (isFunction(output)) ?
  28096. output(number, withoutSuffix, string, isFuture) :
  28097. output.replace(/%d/i, number);
  28098. }
  28099. function pastFuture (diff, output) {
  28100. var format = this._relativeTime[diff > 0 ? 'future' : 'past'];
  28101. return isFunction(format) ? format(output) : format.replace(/%s/i, output);
  28102. }
  28103. var aliases = {};
  28104. function addUnitAlias (unit, shorthand) {
  28105. var lowerCase = unit.toLowerCase();
  28106. aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;
  28107. }
  28108. function normalizeUnits(units) {
  28109. return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined;
  28110. }
  28111. function normalizeObjectUnits(inputObject) {
  28112. var normalizedInput = {},
  28113. normalizedProp,
  28114. prop;
  28115. for (prop in inputObject) {
  28116. if (hasOwnProp(inputObject, prop)) {
  28117. normalizedProp = normalizeUnits(prop);
  28118. if (normalizedProp) {
  28119. normalizedInput[normalizedProp] = inputObject[prop];
  28120. }
  28121. }
  28122. }
  28123. return normalizedInput;
  28124. }
  28125. var priorities = {};
  28126. function addUnitPriority(unit, priority) {
  28127. priorities[unit] = priority;
  28128. }
  28129. function getPrioritizedUnits(unitsObj) {
  28130. var units = [];
  28131. for (var u in unitsObj) {
  28132. units.push({unit: u, priority: priorities[u]});
  28133. }
  28134. units.sort(function (a, b) {
  28135. return a.priority - b.priority;
  28136. });
  28137. return units;
  28138. }
  28139. function zeroFill(number, targetLength, forceSign) {
  28140. var absNumber = '' + Math.abs(number),
  28141. zerosToFill = targetLength - absNumber.length,
  28142. sign = number >= 0;
  28143. return (sign ? (forceSign ? '+' : '') : '-') +
  28144. Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber;
  28145. }
  28146. var formattingTokens = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;
  28147. var localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g;
  28148. var formatFunctions = {};
  28149. var formatTokenFunctions = {};
  28150. // token: 'M'
  28151. // padded: ['MM', 2]
  28152. // ordinal: 'Mo'
  28153. // callback: function () { this.month() + 1 }
  28154. function addFormatToken (token, padded, ordinal, callback) {
  28155. var func = callback;
  28156. if (typeof callback === 'string') {
  28157. func = function () {
  28158. return this[callback]();
  28159. };
  28160. }
  28161. if (token) {
  28162. formatTokenFunctions[token] = func;
  28163. }
  28164. if (padded) {
  28165. formatTokenFunctions[padded[0]] = function () {
  28166. return zeroFill(func.apply(this, arguments), padded[1], padded[2]);
  28167. };
  28168. }
  28169. if (ordinal) {
  28170. formatTokenFunctions[ordinal] = function () {
  28171. return this.localeData().ordinal(func.apply(this, arguments), token);
  28172. };
  28173. }
  28174. }
  28175. function removeFormattingTokens(input) {
  28176. if (input.match(/\[[\s\S]/)) {
  28177. return input.replace(/^\[|\]$/g, '');
  28178. }
  28179. return input.replace(/\\/g, '');
  28180. }
  28181. function makeFormatFunction(format) {
  28182. var array = format.match(formattingTokens), i, length;
  28183. for (i = 0, length = array.length; i < length; i++) {
  28184. if (formatTokenFunctions[array[i]]) {
  28185. array[i] = formatTokenFunctions[array[i]];
  28186. } else {
  28187. array[i] = removeFormattingTokens(array[i]);
  28188. }
  28189. }
  28190. return function (mom) {
  28191. var output = '', i;
  28192. for (i = 0; i < length; i++) {
  28193. output += isFunction(array[i]) ? array[i].call(mom, format) : array[i];
  28194. }
  28195. return output;
  28196. };
  28197. }
  28198. // format date using native date object
  28199. function formatMoment(m, format) {
  28200. if (!m.isValid()) {
  28201. return m.localeData().invalidDate();
  28202. }
  28203. format = expandFormat(format, m.localeData());
  28204. formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format);
  28205. return formatFunctions[format](m);
  28206. }
  28207. function expandFormat(format, locale) {
  28208. var i = 5;
  28209. function replaceLongDateFormatTokens(input) {
  28210. return locale.longDateFormat(input) || input;
  28211. }
  28212. localFormattingTokens.lastIndex = 0;
  28213. while (i >= 0 && localFormattingTokens.test(format)) {
  28214. format = format.replace(localFormattingTokens, replaceLongDateFormatTokens);
  28215. localFormattingTokens.lastIndex = 0;
  28216. i -= 1;
  28217. }
  28218. return format;
  28219. }
  28220. var match1 = /\d/; // 0 - 9
  28221. var match2 = /\d\d/; // 00 - 99
  28222. var match3 = /\d{3}/; // 000 - 999
  28223. var match4 = /\d{4}/; // 0000 - 9999
  28224. var match6 = /[+-]?\d{6}/; // -999999 - 999999
  28225. var match1to2 = /\d\d?/; // 0 - 99
  28226. var match3to4 = /\d\d\d\d?/; // 999 - 9999
  28227. var match5to6 = /\d\d\d\d\d\d?/; // 99999 - 999999
  28228. var match1to3 = /\d{1,3}/; // 0 - 999
  28229. var match1to4 = /\d{1,4}/; // 0 - 9999
  28230. var match1to6 = /[+-]?\d{1,6}/; // -999999 - 999999
  28231. var matchUnsigned = /\d+/; // 0 - inf
  28232. var matchSigned = /[+-]?\d+/; // -inf - inf
  28233. var matchOffset = /Z|[+-]\d\d:?\d\d/gi; // +00:00 -00:00 +0000 -0000 or Z
  28234. var matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi; // +00 -00 +00:00 -00:00 +0000 -0000 or Z
  28235. var matchTimestamp = /[+-]?\d+(\.\d{1,3})?/; // 123456789 123456789.123
  28236. // any word (or two) characters or numbers including two/three word month in arabic.
  28237. // includes scottish gaelic two word and hyphenated months
  28238. var matchWord = /[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;
  28239. var regexes = {};
  28240. function addRegexToken (token, regex, strictRegex) {
  28241. regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) {
  28242. return (isStrict && strictRegex) ? strictRegex : regex;
  28243. };
  28244. }
  28245. function getParseRegexForToken (token, config) {
  28246. if (!hasOwnProp(regexes, token)) {
  28247. return new RegExp(unescapeFormat(token));
  28248. }
  28249. return regexes[token](config._strict, config._locale);
  28250. }
  28251. // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
  28252. function unescapeFormat(s) {
  28253. return regexEscape(s.replace('\\', '').replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4) {
  28254. return p1 || p2 || p3 || p4;
  28255. }));
  28256. }
  28257. function regexEscape(s) {
  28258. return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
  28259. }
  28260. var tokens = {};
  28261. function addParseToken (token, callback) {
  28262. var i, func = callback;
  28263. if (typeof token === 'string') {
  28264. token = [token];
  28265. }
  28266. if (isNumber(callback)) {
  28267. func = function (input, array) {
  28268. array[callback] = toInt(input);
  28269. };
  28270. }
  28271. for (i = 0; i < token.length; i++) {
  28272. tokens[token[i]] = func;
  28273. }
  28274. }
  28275. function addWeekParseToken (token, callback) {
  28276. addParseToken(token, function (input, array, config, token) {
  28277. config._w = config._w || {};
  28278. callback(input, config._w, config, token);
  28279. });
  28280. }
  28281. function addTimeToArrayFromToken(token, input, config) {
  28282. if (input != null && hasOwnProp(tokens, token)) {
  28283. tokens[token](input, config._a, config, token);
  28284. }
  28285. }
  28286. var YEAR = 0;
  28287. var MONTH = 1;
  28288. var DATE = 2;
  28289. var HOUR = 3;
  28290. var MINUTE = 4;
  28291. var SECOND = 5;
  28292. var MILLISECOND = 6;
  28293. var WEEK = 7;
  28294. var WEEKDAY = 8;
  28295. // FORMATTING
  28296. addFormatToken('Y', 0, 0, function () {
  28297. var y = this.year();
  28298. return y <= 9999 ? '' + y : '+' + y;
  28299. });
  28300. addFormatToken(0, ['YY', 2], 0, function () {
  28301. return this.year() % 100;
  28302. });
  28303. addFormatToken(0, ['YYYY', 4], 0, 'year');
  28304. addFormatToken(0, ['YYYYY', 5], 0, 'year');
  28305. addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');
  28306. // ALIASES
  28307. addUnitAlias('year', 'y');
  28308. // PRIORITIES
  28309. addUnitPriority('year', 1);
  28310. // PARSING
  28311. addRegexToken('Y', matchSigned);
  28312. addRegexToken('YY', match1to2, match2);
  28313. addRegexToken('YYYY', match1to4, match4);
  28314. addRegexToken('YYYYY', match1to6, match6);
  28315. addRegexToken('YYYYYY', match1to6, match6);
  28316. addParseToken(['YYYYY', 'YYYYYY'], YEAR);
  28317. addParseToken('YYYY', function (input, array) {
  28318. array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);
  28319. });
  28320. addParseToken('YY', function (input, array) {
  28321. array[YEAR] = hooks.parseTwoDigitYear(input);
  28322. });
  28323. addParseToken('Y', function (input, array) {
  28324. array[YEAR] = parseInt(input, 10);
  28325. });
  28326. // HELPERS
  28327. function daysInYear(year) {
  28328. return isLeapYear(year) ? 366 : 365;
  28329. }
  28330. function isLeapYear(year) {
  28331. return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
  28332. }
  28333. // HOOKS
  28334. hooks.parseTwoDigitYear = function (input) {
  28335. return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);
  28336. };
  28337. // MOMENTS
  28338. var getSetYear = makeGetSet('FullYear', true);
  28339. function getIsLeapYear () {
  28340. return isLeapYear(this.year());
  28341. }
  28342. function makeGetSet (unit, keepTime) {
  28343. return function (value) {
  28344. if (value != null) {
  28345. set$1(this, unit, value);
  28346. hooks.updateOffset(this, keepTime);
  28347. return this;
  28348. } else {
  28349. return get(this, unit);
  28350. }
  28351. };
  28352. }
  28353. function get (mom, unit) {
  28354. return mom.isValid() ?
  28355. mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN;
  28356. }
  28357. function set$1 (mom, unit, value) {
  28358. if (mom.isValid() && !isNaN(value)) {
  28359. if (unit === 'FullYear' && isLeapYear(mom.year()) && mom.month() === 1 && mom.date() === 29) {
  28360. mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value, mom.month(), daysInMonth(value, mom.month()));
  28361. }
  28362. else {
  28363. mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);
  28364. }
  28365. }
  28366. }
  28367. // MOMENTS
  28368. function stringGet (units) {
  28369. units = normalizeUnits(units);
  28370. if (isFunction(this[units])) {
  28371. return this[units]();
  28372. }
  28373. return this;
  28374. }
  28375. function stringSet (units, value) {
  28376. if (typeof units === 'object') {
  28377. units = normalizeObjectUnits(units);
  28378. var prioritized = getPrioritizedUnits(units);
  28379. for (var i = 0; i < prioritized.length; i++) {
  28380. this[prioritized[i].unit](units[prioritized[i].unit]);
  28381. }
  28382. } else {
  28383. units = normalizeUnits(units);
  28384. if (isFunction(this[units])) {
  28385. return this[units](value);
  28386. }
  28387. }
  28388. return this;
  28389. }
  28390. function mod(n, x) {
  28391. return ((n % x) + x) % x;
  28392. }
  28393. var indexOf;
  28394. if (Array.prototype.indexOf) {
  28395. indexOf = Array.prototype.indexOf;
  28396. } else {
  28397. indexOf = function (o) {
  28398. // I know
  28399. var i;
  28400. for (i = 0; i < this.length; ++i) {
  28401. if (this[i] === o) {
  28402. return i;
  28403. }
  28404. }
  28405. return -1;
  28406. };
  28407. }
  28408. function daysInMonth(year, month) {
  28409. if (isNaN(year) || isNaN(month)) {
  28410. return NaN;
  28411. }
  28412. var modMonth = mod(month, 12);
  28413. year += (month - modMonth) / 12;
  28414. return modMonth === 1 ? (isLeapYear(year) ? 29 : 28) : (31 - modMonth % 7 % 2);
  28415. }
  28416. // FORMATTING
  28417. addFormatToken('M', ['MM', 2], 'Mo', function () {
  28418. return this.month() + 1;
  28419. });
  28420. addFormatToken('MMM', 0, 0, function (format) {
  28421. return this.localeData().monthsShort(this, format);
  28422. });
  28423. addFormatToken('MMMM', 0, 0, function (format) {
  28424. return this.localeData().months(this, format);
  28425. });
  28426. // ALIASES
  28427. addUnitAlias('month', 'M');
  28428. // PRIORITY
  28429. addUnitPriority('month', 8);
  28430. // PARSING
  28431. addRegexToken('M', match1to2);
  28432. addRegexToken('MM', match1to2, match2);
  28433. addRegexToken('MMM', function (isStrict, locale) {
  28434. return locale.monthsShortRegex(isStrict);
  28435. });
  28436. addRegexToken('MMMM', function (isStrict, locale) {
  28437. return locale.monthsRegex(isStrict);
  28438. });
  28439. addParseToken(['M', 'MM'], function (input, array) {
  28440. array[MONTH] = toInt(input) - 1;
  28441. });
  28442. addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {
  28443. var month = config._locale.monthsParse(input, token, config._strict);
  28444. // if we didn't find a month name, mark the date as invalid.
  28445. if (month != null) {
  28446. array[MONTH] = month;
  28447. } else {
  28448. getParsingFlags(config).invalidMonth = input;
  28449. }
  28450. });
  28451. // LOCALES
  28452. var MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/;
  28453. var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_');
  28454. function localeMonths (m, format) {
  28455. if (!m) {
  28456. return isArray(this._months) ? this._months :
  28457. this._months['standalone'];
  28458. }
  28459. return isArray(this._months) ? this._months[m.month()] :
  28460. this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()];
  28461. }
  28462. var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_');
  28463. function localeMonthsShort (m, format) {
  28464. if (!m) {
  28465. return isArray(this._monthsShort) ? this._monthsShort :
  28466. this._monthsShort['standalone'];
  28467. }
  28468. return isArray(this._monthsShort) ? this._monthsShort[m.month()] :
  28469. this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()];
  28470. }
  28471. function handleStrictParse(monthName, format, strict) {
  28472. var i, ii, mom, llc = monthName.toLocaleLowerCase();
  28473. if (!this._monthsParse) {
  28474. // this is not used
  28475. this._monthsParse = [];
  28476. this._longMonthsParse = [];
  28477. this._shortMonthsParse = [];
  28478. for (i = 0; i < 12; ++i) {
  28479. mom = createUTC([2000, i]);
  28480. this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase();
  28481. this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();
  28482. }
  28483. }
  28484. if (strict) {
  28485. if (format === 'MMM') {
  28486. ii = indexOf.call(this._shortMonthsParse, llc);
  28487. return ii !== -1 ? ii : null;
  28488. } else {
  28489. ii = indexOf.call(this._longMonthsParse, llc);
  28490. return ii !== -1 ? ii : null;
  28491. }
  28492. } else {
  28493. if (format === 'MMM') {
  28494. ii = indexOf.call(this._shortMonthsParse, llc);
  28495. if (ii !== -1) {
  28496. return ii;
  28497. }
  28498. ii = indexOf.call(this._longMonthsParse, llc);
  28499. return ii !== -1 ? ii : null;
  28500. } else {
  28501. ii = indexOf.call(this._longMonthsParse, llc);
  28502. if (ii !== -1) {
  28503. return ii;
  28504. }
  28505. ii = indexOf.call(this._shortMonthsParse, llc);
  28506. return ii !== -1 ? ii : null;
  28507. }
  28508. }
  28509. }
  28510. function localeMonthsParse (monthName, format, strict) {
  28511. var i, mom, regex;
  28512. if (this._monthsParseExact) {
  28513. return handleStrictParse.call(this, monthName, format, strict);
  28514. }
  28515. if (!this._monthsParse) {
  28516. this._monthsParse = [];
  28517. this._longMonthsParse = [];
  28518. this._shortMonthsParse = [];
  28519. }
  28520. // TODO: add sorting
  28521. // Sorting makes sure if one month (or abbr) is a prefix of another
  28522. // see sorting in computeMonthsParse
  28523. for (i = 0; i < 12; i++) {
  28524. // make the regex if we don't have it already
  28525. mom = createUTC([2000, i]);
  28526. if (strict && !this._longMonthsParse[i]) {
  28527. this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i');
  28528. this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i');
  28529. }
  28530. if (!strict && !this._monthsParse[i]) {
  28531. regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');
  28532. this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');
  28533. }
  28534. // test the regex
  28535. if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) {
  28536. return i;
  28537. } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) {
  28538. return i;
  28539. } else if (!strict && this._monthsParse[i].test(monthName)) {
  28540. return i;
  28541. }
  28542. }
  28543. }
  28544. // MOMENTS
  28545. function setMonth (mom, value) {
  28546. var dayOfMonth;
  28547. if (!mom.isValid()) {
  28548. // No op
  28549. return mom;
  28550. }
  28551. if (typeof value === 'string') {
  28552. if (/^\d+$/.test(value)) {
  28553. value = toInt(value);
  28554. } else {
  28555. value = mom.localeData().monthsParse(value);
  28556. // TODO: Another silent failure?
  28557. if (!isNumber(value)) {
  28558. return mom;
  28559. }
  28560. }
  28561. }
  28562. dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));
  28563. mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);
  28564. return mom;
  28565. }
  28566. function getSetMonth (value) {
  28567. if (value != null) {
  28568. setMonth(this, value);
  28569. hooks.updateOffset(this, true);
  28570. return this;
  28571. } else {
  28572. return get(this, 'Month');
  28573. }
  28574. }
  28575. function getDaysInMonth () {
  28576. return daysInMonth(this.year(), this.month());
  28577. }
  28578. var defaultMonthsShortRegex = matchWord;
  28579. function monthsShortRegex (isStrict) {
  28580. if (this._monthsParseExact) {
  28581. if (!hasOwnProp(this, '_monthsRegex')) {
  28582. computeMonthsParse.call(this);
  28583. }
  28584. if (isStrict) {
  28585. return this._monthsShortStrictRegex;
  28586. } else {
  28587. return this._monthsShortRegex;
  28588. }
  28589. } else {
  28590. if (!hasOwnProp(this, '_monthsShortRegex')) {
  28591. this._monthsShortRegex = defaultMonthsShortRegex;
  28592. }
  28593. return this._monthsShortStrictRegex && isStrict ?
  28594. this._monthsShortStrictRegex : this._monthsShortRegex;
  28595. }
  28596. }
  28597. var defaultMonthsRegex = matchWord;
  28598. function monthsRegex (isStrict) {
  28599. if (this._monthsParseExact) {
  28600. if (!hasOwnProp(this, '_monthsRegex')) {
  28601. computeMonthsParse.call(this);
  28602. }
  28603. if (isStrict) {
  28604. return this._monthsStrictRegex;
  28605. } else {
  28606. return this._monthsRegex;
  28607. }
  28608. } else {
  28609. if (!hasOwnProp(this, '_monthsRegex')) {
  28610. this._monthsRegex = defaultMonthsRegex;
  28611. }
  28612. return this._monthsStrictRegex && isStrict ?
  28613. this._monthsStrictRegex : this._monthsRegex;
  28614. }
  28615. }
  28616. function computeMonthsParse () {
  28617. function cmpLenRev(a, b) {
  28618. return b.length - a.length;
  28619. }
  28620. var shortPieces = [], longPieces = [], mixedPieces = [],
  28621. i, mom;
  28622. for (i = 0; i < 12; i++) {
  28623. // make the regex if we don't have it already
  28624. mom = createUTC([2000, i]);
  28625. shortPieces.push(this.monthsShort(mom, ''));
  28626. longPieces.push(this.months(mom, ''));
  28627. mixedPieces.push(this.months(mom, ''));
  28628. mixedPieces.push(this.monthsShort(mom, ''));
  28629. }
  28630. // Sorting makes sure if one month (or abbr) is a prefix of another it
  28631. // will match the longer piece.
  28632. shortPieces.sort(cmpLenRev);
  28633. longPieces.sort(cmpLenRev);
  28634. mixedPieces.sort(cmpLenRev);
  28635. for (i = 0; i < 12; i++) {
  28636. shortPieces[i] = regexEscape(shortPieces[i]);
  28637. longPieces[i] = regexEscape(longPieces[i]);
  28638. }
  28639. for (i = 0; i < 24; i++) {
  28640. mixedPieces[i] = regexEscape(mixedPieces[i]);
  28641. }
  28642. this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
  28643. this._monthsShortRegex = this._monthsRegex;
  28644. this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');
  28645. this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');
  28646. }
  28647. function createDate (y, m, d, h, M, s, ms) {
  28648. // can't just apply() to create a date:
  28649. // https://stackoverflow.com/q/181348
  28650. var date = new Date(y, m, d, h, M, s, ms);
  28651. // the date constructor remaps years 0-99 to 1900-1999
  28652. if (y < 100 && y >= 0 && isFinite(date.getFullYear())) {
  28653. date.setFullYear(y);
  28654. }
  28655. return date;
  28656. }
  28657. function createUTCDate (y) {
  28658. var date = new Date(Date.UTC.apply(null, arguments));
  28659. // the Date.UTC function remaps years 0-99 to 1900-1999
  28660. if (y < 100 && y >= 0 && isFinite(date.getUTCFullYear())) {
  28661. date.setUTCFullYear(y);
  28662. }
  28663. return date;
  28664. }
  28665. // start-of-first-week - start-of-year
  28666. function firstWeekOffset(year, dow, doy) {
  28667. var // first-week day -- which january is always in the first week (4 for iso, 1 for other)
  28668. fwd = 7 + dow - doy,
  28669. // first-week day local weekday -- which local weekday is fwd
  28670. fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;
  28671. return -fwdlw + fwd - 1;
  28672. }
  28673. // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday
  28674. function dayOfYearFromWeeks(year, week, weekday, dow, doy) {
  28675. var localWeekday = (7 + weekday - dow) % 7,
  28676. weekOffset = firstWeekOffset(year, dow, doy),
  28677. dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,
  28678. resYear, resDayOfYear;
  28679. if (dayOfYear <= 0) {
  28680. resYear = year - 1;
  28681. resDayOfYear = daysInYear(resYear) + dayOfYear;
  28682. } else if (dayOfYear > daysInYear(year)) {
  28683. resYear = year + 1;
  28684. resDayOfYear = dayOfYear - daysInYear(year);
  28685. } else {
  28686. resYear = year;
  28687. resDayOfYear = dayOfYear;
  28688. }
  28689. return {
  28690. year: resYear,
  28691. dayOfYear: resDayOfYear
  28692. };
  28693. }
  28694. function weekOfYear(mom, dow, doy) {
  28695. var weekOffset = firstWeekOffset(mom.year(), dow, doy),
  28696. week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,
  28697. resWeek, resYear;
  28698. if (week < 1) {
  28699. resYear = mom.year() - 1;
  28700. resWeek = week + weeksInYear(resYear, dow, doy);
  28701. } else if (week > weeksInYear(mom.year(), dow, doy)) {
  28702. resWeek = week - weeksInYear(mom.year(), dow, doy);
  28703. resYear = mom.year() + 1;
  28704. } else {
  28705. resYear = mom.year();
  28706. resWeek = week;
  28707. }
  28708. return {
  28709. week: resWeek,
  28710. year: resYear
  28711. };
  28712. }
  28713. function weeksInYear(year, dow, doy) {
  28714. var weekOffset = firstWeekOffset(year, dow, doy),
  28715. weekOffsetNext = firstWeekOffset(year + 1, dow, doy);
  28716. return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;
  28717. }
  28718. // FORMATTING
  28719. addFormatToken('w', ['ww', 2], 'wo', 'week');
  28720. addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');
  28721. // ALIASES
  28722. addUnitAlias('week', 'w');
  28723. addUnitAlias('isoWeek', 'W');
  28724. // PRIORITIES
  28725. addUnitPriority('week', 5);
  28726. addUnitPriority('isoWeek', 5);
  28727. // PARSING
  28728. addRegexToken('w', match1to2);
  28729. addRegexToken('ww', match1to2, match2);
  28730. addRegexToken('W', match1to2);
  28731. addRegexToken('WW', match1to2, match2);
  28732. addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) {
  28733. week[token.substr(0, 1)] = toInt(input);
  28734. });
  28735. // HELPERS
  28736. // LOCALES
  28737. function localeWeek (mom) {
  28738. return weekOfYear(mom, this._week.dow, this._week.doy).week;
  28739. }
  28740. var defaultLocaleWeek = {
  28741. dow : 0, // Sunday is the first day of the week.
  28742. doy : 6 // The week that contains Jan 1st is the first week of the year.
  28743. };
  28744. function localeFirstDayOfWeek () {
  28745. return this._week.dow;
  28746. }
  28747. function localeFirstDayOfYear () {
  28748. return this._week.doy;
  28749. }
  28750. // MOMENTS
  28751. function getSetWeek (input) {
  28752. var week = this.localeData().week(this);
  28753. return input == null ? week : this.add((input - week) * 7, 'd');
  28754. }
  28755. function getSetISOWeek (input) {
  28756. var week = weekOfYear(this, 1, 4).week;
  28757. return input == null ? week : this.add((input - week) * 7, 'd');
  28758. }
  28759. // FORMATTING
  28760. addFormatToken('d', 0, 'do', 'day');
  28761. addFormatToken('dd', 0, 0, function (format) {
  28762. return this.localeData().weekdaysMin(this, format);
  28763. });
  28764. addFormatToken('ddd', 0, 0, function (format) {
  28765. return this.localeData().weekdaysShort(this, format);
  28766. });
  28767. addFormatToken('dddd', 0, 0, function (format) {
  28768. return this.localeData().weekdays(this, format);
  28769. });
  28770. addFormatToken('e', 0, 0, 'weekday');
  28771. addFormatToken('E', 0, 0, 'isoWeekday');
  28772. // ALIASES
  28773. addUnitAlias('day', 'd');
  28774. addUnitAlias('weekday', 'e');
  28775. addUnitAlias('isoWeekday', 'E');
  28776. // PRIORITY
  28777. addUnitPriority('day', 11);
  28778. addUnitPriority('weekday', 11);
  28779. addUnitPriority('isoWeekday', 11);
  28780. // PARSING
  28781. addRegexToken('d', match1to2);
  28782. addRegexToken('e', match1to2);
  28783. addRegexToken('E', match1to2);
  28784. addRegexToken('dd', function (isStrict, locale) {
  28785. return locale.weekdaysMinRegex(isStrict);
  28786. });
  28787. addRegexToken('ddd', function (isStrict, locale) {
  28788. return locale.weekdaysShortRegex(isStrict);
  28789. });
  28790. addRegexToken('dddd', function (isStrict, locale) {
  28791. return locale.weekdaysRegex(isStrict);
  28792. });
  28793. addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {
  28794. var weekday = config._locale.weekdaysParse(input, token, config._strict);
  28795. // if we didn't get a weekday name, mark the date as invalid
  28796. if (weekday != null) {
  28797. week.d = weekday;
  28798. } else {
  28799. getParsingFlags(config).invalidWeekday = input;
  28800. }
  28801. });
  28802. addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {
  28803. week[token] = toInt(input);
  28804. });
  28805. // HELPERS
  28806. function parseWeekday(input, locale) {
  28807. if (typeof input !== 'string') {
  28808. return input;
  28809. }
  28810. if (!isNaN(input)) {
  28811. return parseInt(input, 10);
  28812. }
  28813. input = locale.weekdaysParse(input);
  28814. if (typeof input === 'number') {
  28815. return input;
  28816. }
  28817. return null;
  28818. }
  28819. function parseIsoWeekday(input, locale) {
  28820. if (typeof input === 'string') {
  28821. return locale.weekdaysParse(input) % 7 || 7;
  28822. }
  28823. return isNaN(input) ? null : input;
  28824. }
  28825. // LOCALES
  28826. var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_');
  28827. function localeWeekdays (m, format) {
  28828. if (!m) {
  28829. return isArray(this._weekdays) ? this._weekdays :
  28830. this._weekdays['standalone'];
  28831. }
  28832. return isArray(this._weekdays) ? this._weekdays[m.day()] :
  28833. this._weekdays[this._weekdays.isFormat.test(format) ? 'format' : 'standalone'][m.day()];
  28834. }
  28835. var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_');
  28836. function localeWeekdaysShort (m) {
  28837. return (m) ? this._weekdaysShort[m.day()] : this._weekdaysShort;
  28838. }
  28839. var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_');
  28840. function localeWeekdaysMin (m) {
  28841. return (m) ? this._weekdaysMin[m.day()] : this._weekdaysMin;
  28842. }
  28843. function handleStrictParse$1(weekdayName, format, strict) {
  28844. var i, ii, mom, llc = weekdayName.toLocaleLowerCase();
  28845. if (!this._weekdaysParse) {
  28846. this._weekdaysParse = [];
  28847. this._shortWeekdaysParse = [];
  28848. this._minWeekdaysParse = [];
  28849. for (i = 0; i < 7; ++i) {
  28850. mom = createUTC([2000, 1]).day(i);
  28851. this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase();
  28852. this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase();
  28853. this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();
  28854. }
  28855. }
  28856. if (strict) {
  28857. if (format === 'dddd') {
  28858. ii = indexOf.call(this._weekdaysParse, llc);
  28859. return ii !== -1 ? ii : null;
  28860. } else if (format === 'ddd') {
  28861. ii = indexOf.call(this._shortWeekdaysParse, llc);
  28862. return ii !== -1 ? ii : null;
  28863. } else {
  28864. ii = indexOf.call(this._minWeekdaysParse, llc);
  28865. return ii !== -1 ? ii : null;
  28866. }
  28867. } else {
  28868. if (format === 'dddd') {
  28869. ii = indexOf.call(this._weekdaysParse, llc);
  28870. if (ii !== -1) {
  28871. return ii;
  28872. }
  28873. ii = indexOf.call(this._shortWeekdaysParse, llc);
  28874. if (ii !== -1) {
  28875. return ii;
  28876. }
  28877. ii = indexOf.call(this._minWeekdaysParse, llc);
  28878. return ii !== -1 ? ii : null;
  28879. } else if (format === 'ddd') {
  28880. ii = indexOf.call(this._shortWeekdaysParse, llc);
  28881. if (ii !== -1) {
  28882. return ii;
  28883. }
  28884. ii = indexOf.call(this._weekdaysParse, llc);
  28885. if (ii !== -1) {
  28886. return ii;
  28887. }
  28888. ii = indexOf.call(this._minWeekdaysParse, llc);
  28889. return ii !== -1 ? ii : null;
  28890. } else {
  28891. ii = indexOf.call(this._minWeekdaysParse, llc);
  28892. if (ii !== -1) {
  28893. return ii;
  28894. }
  28895. ii = indexOf.call(this._weekdaysParse, llc);
  28896. if (ii !== -1) {
  28897. return ii;
  28898. }
  28899. ii = indexOf.call(this._shortWeekdaysParse, llc);
  28900. return ii !== -1 ? ii : null;
  28901. }
  28902. }
  28903. }
  28904. function localeWeekdaysParse (weekdayName, format, strict) {
  28905. var i, mom, regex;
  28906. if (this._weekdaysParseExact) {
  28907. return handleStrictParse$1.call(this, weekdayName, format, strict);
  28908. }
  28909. if (!this._weekdaysParse) {
  28910. this._weekdaysParse = [];
  28911. this._minWeekdaysParse = [];
  28912. this._shortWeekdaysParse = [];
  28913. this._fullWeekdaysParse = [];
  28914. }
  28915. for (i = 0; i < 7; i++) {
  28916. // make the regex if we don't have it already
  28917. mom = createUTC([2000, 1]).day(i);
  28918. if (strict && !this._fullWeekdaysParse[i]) {
  28919. this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\\.?') + '$', 'i');
  28920. this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\\.?') + '$', 'i');
  28921. this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\\.?') + '$', 'i');
  28922. }
  28923. if (!this._weekdaysParse[i]) {
  28924. regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, '');
  28925. this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');
  28926. }
  28927. // test the regex
  28928. if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) {
  28929. return i;
  28930. } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) {
  28931. return i;
  28932. } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) {
  28933. return i;
  28934. } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {
  28935. return i;
  28936. }
  28937. }
  28938. }
  28939. // MOMENTS
  28940. function getSetDayOfWeek (input) {
  28941. if (!this.isValid()) {
  28942. return input != null ? this : NaN;
  28943. }
  28944. var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();
  28945. if (input != null) {
  28946. input = parseWeekday(input, this.localeData());
  28947. return this.add(input - day, 'd');
  28948. } else {
  28949. return day;
  28950. }
  28951. }
  28952. function getSetLocaleDayOfWeek (input) {
  28953. if (!this.isValid()) {
  28954. return input != null ? this : NaN;
  28955. }
  28956. var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;
  28957. return input == null ? weekday : this.add(input - weekday, 'd');
  28958. }
  28959. function getSetISODayOfWeek (input) {
  28960. if (!this.isValid()) {
  28961. return input != null ? this : NaN;
  28962. }
  28963. // behaves the same as moment#day except
  28964. // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)
  28965. // as a setter, sunday should belong to the previous week.
  28966. if (input != null) {
  28967. var weekday = parseIsoWeekday(input, this.localeData());
  28968. return this.day(this.day() % 7 ? weekday : weekday - 7);
  28969. } else {
  28970. return this.day() || 7;
  28971. }
  28972. }
  28973. var defaultWeekdaysRegex = matchWord;
  28974. function weekdaysRegex (isStrict) {
  28975. if (this._weekdaysParseExact) {
  28976. if (!hasOwnProp(this, '_weekdaysRegex')) {
  28977. computeWeekdaysParse.call(this);
  28978. }
  28979. if (isStrict) {
  28980. return this._weekdaysStrictRegex;
  28981. } else {
  28982. return this._weekdaysRegex;
  28983. }
  28984. } else {
  28985. if (!hasOwnProp(this, '_weekdaysRegex')) {
  28986. this._weekdaysRegex = defaultWeekdaysRegex;
  28987. }
  28988. return this._weekdaysStrictRegex && isStrict ?
  28989. this._weekdaysStrictRegex : this._weekdaysRegex;
  28990. }
  28991. }
  28992. var defaultWeekdaysShortRegex = matchWord;
  28993. function weekdaysShortRegex (isStrict) {
  28994. if (this._weekdaysParseExact) {
  28995. if (!hasOwnProp(this, '_weekdaysRegex')) {
  28996. computeWeekdaysParse.call(this);
  28997. }
  28998. if (isStrict) {
  28999. return this._weekdaysShortStrictRegex;
  29000. } else {
  29001. return this._weekdaysShortRegex;
  29002. }
  29003. } else {
  29004. if (!hasOwnProp(this, '_weekdaysShortRegex')) {
  29005. this._weekdaysShortRegex = defaultWeekdaysShortRegex;
  29006. }
  29007. return this._weekdaysShortStrictRegex && isStrict ?
  29008. this._weekdaysShortStrictRegex : this._weekdaysShortRegex;
  29009. }
  29010. }
  29011. var defaultWeekdaysMinRegex = matchWord;
  29012. function weekdaysMinRegex (isStrict) {
  29013. if (this._weekdaysParseExact) {
  29014. if (!hasOwnProp(this, '_weekdaysRegex')) {
  29015. computeWeekdaysParse.call(this);
  29016. }
  29017. if (isStrict) {
  29018. return this._weekdaysMinStrictRegex;
  29019. } else {
  29020. return this._weekdaysMinRegex;
  29021. }
  29022. } else {
  29023. if (!hasOwnProp(this, '_weekdaysMinRegex')) {
  29024. this._weekdaysMinRegex = defaultWeekdaysMinRegex;
  29025. }
  29026. return this._weekdaysMinStrictRegex && isStrict ?
  29027. this._weekdaysMinStrictRegex : this._weekdaysMinRegex;
  29028. }
  29029. }
  29030. function computeWeekdaysParse () {
  29031. function cmpLenRev(a, b) {
  29032. return b.length - a.length;
  29033. }
  29034. var minPieces = [], shortPieces = [], longPieces = [], mixedPieces = [],
  29035. i, mom, minp, shortp, longp;
  29036. for (i = 0; i < 7; i++) {
  29037. // make the regex if we don't have it already
  29038. mom = createUTC([2000, 1]).day(i);
  29039. minp = this.weekdaysMin(mom, '');
  29040. shortp = this.weekdaysShort(mom, '');
  29041. longp = this.weekdays(mom, '');
  29042. minPieces.push(minp);
  29043. shortPieces.push(shortp);
  29044. longPieces.push(longp);
  29045. mixedPieces.push(minp);
  29046. mixedPieces.push(shortp);
  29047. mixedPieces.push(longp);
  29048. }
  29049. // Sorting makes sure if one weekday (or abbr) is a prefix of another it
  29050. // will match the longer piece.
  29051. minPieces.sort(cmpLenRev);
  29052. shortPieces.sort(cmpLenRev);
  29053. longPieces.sort(cmpLenRev);
  29054. mixedPieces.sort(cmpLenRev);
  29055. for (i = 0; i < 7; i++) {
  29056. shortPieces[i] = regexEscape(shortPieces[i]);
  29057. longPieces[i] = regexEscape(longPieces[i]);
  29058. mixedPieces[i] = regexEscape(mixedPieces[i]);
  29059. }
  29060. this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
  29061. this._weekdaysShortRegex = this._weekdaysRegex;
  29062. this._weekdaysMinRegex = this._weekdaysRegex;
  29063. this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');
  29064. this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');
  29065. this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i');
  29066. }
  29067. // FORMATTING
  29068. function hFormat() {
  29069. return this.hours() % 12 || 12;
  29070. }
  29071. function kFormat() {
  29072. return this.hours() || 24;
  29073. }
  29074. addFormatToken('H', ['HH', 2], 0, 'hour');
  29075. addFormatToken('h', ['hh', 2], 0, hFormat);
  29076. addFormatToken('k', ['kk', 2], 0, kFormat);
  29077. addFormatToken('hmm', 0, 0, function () {
  29078. return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);
  29079. });
  29080. addFormatToken('hmmss', 0, 0, function () {
  29081. return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) +
  29082. zeroFill(this.seconds(), 2);
  29083. });
  29084. addFormatToken('Hmm', 0, 0, function () {
  29085. return '' + this.hours() + zeroFill(this.minutes(), 2);
  29086. });
  29087. addFormatToken('Hmmss', 0, 0, function () {
  29088. return '' + this.hours() + zeroFill(this.minutes(), 2) +
  29089. zeroFill(this.seconds(), 2);
  29090. });
  29091. function meridiem (token, lowercase) {
  29092. addFormatToken(token, 0, 0, function () {
  29093. return this.localeData().meridiem(this.hours(), this.minutes(), lowercase);
  29094. });
  29095. }
  29096. meridiem('a', true);
  29097. meridiem('A', false);
  29098. // ALIASES
  29099. addUnitAlias('hour', 'h');
  29100. // PRIORITY
  29101. addUnitPriority('hour', 13);
  29102. // PARSING
  29103. function matchMeridiem (isStrict, locale) {
  29104. return locale._meridiemParse;
  29105. }
  29106. addRegexToken('a', matchMeridiem);
  29107. addRegexToken('A', matchMeridiem);
  29108. addRegexToken('H', match1to2);
  29109. addRegexToken('h', match1to2);
  29110. addRegexToken('k', match1to2);
  29111. addRegexToken('HH', match1to2, match2);
  29112. addRegexToken('hh', match1to2, match2);
  29113. addRegexToken('kk', match1to2, match2);
  29114. addRegexToken('hmm', match3to4);
  29115. addRegexToken('hmmss', match5to6);
  29116. addRegexToken('Hmm', match3to4);
  29117. addRegexToken('Hmmss', match5to6);
  29118. addParseToken(['H', 'HH'], HOUR);
  29119. addParseToken(['k', 'kk'], function (input, array, config) {
  29120. var kInput = toInt(input);
  29121. array[HOUR] = kInput === 24 ? 0 : kInput;
  29122. });
  29123. addParseToken(['a', 'A'], function (input, array, config) {
  29124. config._isPm = config._locale.isPM(input);
  29125. config._meridiem = input;
  29126. });
  29127. addParseToken(['h', 'hh'], function (input, array, config) {
  29128. array[HOUR] = toInt(input);
  29129. getParsingFlags(config).bigHour = true;
  29130. });
  29131. addParseToken('hmm', function (input, array, config) {
  29132. var pos = input.length - 2;
  29133. array[HOUR] = toInt(input.substr(0, pos));
  29134. array[MINUTE] = toInt(input.substr(pos));
  29135. getParsingFlags(config).bigHour = true;
  29136. });
  29137. addParseToken('hmmss', function (input, array, config) {
  29138. var pos1 = input.length - 4;
  29139. var pos2 = input.length - 2;
  29140. array[HOUR] = toInt(input.substr(0, pos1));
  29141. array[MINUTE] = toInt(input.substr(pos1, 2));
  29142. array[SECOND] = toInt(input.substr(pos2));
  29143. getParsingFlags(config).bigHour = true;
  29144. });
  29145. addParseToken('Hmm', function (input, array, config) {
  29146. var pos = input.length - 2;
  29147. array[HOUR] = toInt(input.substr(0, pos));
  29148. array[MINUTE] = toInt(input.substr(pos));
  29149. });
  29150. addParseToken('Hmmss', function (input, array, config) {
  29151. var pos1 = input.length - 4;
  29152. var pos2 = input.length - 2;
  29153. array[HOUR] = toInt(input.substr(0, pos1));
  29154. array[MINUTE] = toInt(input.substr(pos1, 2));
  29155. array[SECOND] = toInt(input.substr(pos2));
  29156. });
  29157. // LOCALES
  29158. function localeIsPM (input) {
  29159. // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays
  29160. // Using charAt should be more compatible.
  29161. return ((input + '').toLowerCase().charAt(0) === 'p');
  29162. }
  29163. var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i;
  29164. function localeMeridiem (hours, minutes, isLower) {
  29165. if (hours > 11) {
  29166. return isLower ? 'pm' : 'PM';
  29167. } else {
  29168. return isLower ? 'am' : 'AM';
  29169. }
  29170. }
  29171. // MOMENTS
  29172. // Setting the hour should keep the time, because the user explicitly
  29173. // specified which hour they want. So trying to maintain the same hour (in
  29174. // a new timezone) makes sense. Adding/subtracting hours does not follow
  29175. // this rule.
  29176. var getSetHour = makeGetSet('Hours', true);
  29177. var baseConfig = {
  29178. calendar: defaultCalendar,
  29179. longDateFormat: defaultLongDateFormat,
  29180. invalidDate: defaultInvalidDate,
  29181. ordinal: defaultOrdinal,
  29182. dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,
  29183. relativeTime: defaultRelativeTime,
  29184. months: defaultLocaleMonths,
  29185. monthsShort: defaultLocaleMonthsShort,
  29186. week: defaultLocaleWeek,
  29187. weekdays: defaultLocaleWeekdays,
  29188. weekdaysMin: defaultLocaleWeekdaysMin,
  29189. weekdaysShort: defaultLocaleWeekdaysShort,
  29190. meridiemParse: defaultLocaleMeridiemParse
  29191. };
  29192. // internal storage for locale config files
  29193. var locales = {};
  29194. var localeFamilies = {};
  29195. var globalLocale;
  29196. function normalizeLocale(key) {
  29197. return key ? key.toLowerCase().replace('_', '-') : key;
  29198. }
  29199. // pick the locale from the array
  29200. // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each
  29201. // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root
  29202. function chooseLocale(names) {
  29203. var i = 0, j, next, locale, split;
  29204. while (i < names.length) {
  29205. split = normalizeLocale(names[i]).split('-');
  29206. j = split.length;
  29207. next = normalizeLocale(names[i + 1]);
  29208. next = next ? next.split('-') : null;
  29209. while (j > 0) {
  29210. locale = loadLocale(split.slice(0, j).join('-'));
  29211. if (locale) {
  29212. return locale;
  29213. }
  29214. if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {
  29215. //the next array item is better than a shallower substring of this one
  29216. break;
  29217. }
  29218. j--;
  29219. }
  29220. i++;
  29221. }
  29222. return globalLocale;
  29223. }
  29224. function loadLocale(name) {
  29225. var oldLocale = null;
  29226. // TODO: Find a better way to register and load all the locales in Node
  29227. if (!locales[name] && (typeof module !== 'undefined') &&
  29228. module && module.exports) {
  29229. try {
  29230. oldLocale = globalLocale._abbr;
  29231. var aliasedRequire = require;
  29232. aliasedRequire('./locale/' + name);
  29233. getSetGlobalLocale(oldLocale);
  29234. } catch (e) {}
  29235. }
  29236. return locales[name];
  29237. }
  29238. // This function will load locale and then set the global locale. If
  29239. // no arguments are passed in, it will simply return the current global
  29240. // locale key.
  29241. function getSetGlobalLocale (key, values) {
  29242. var data;
  29243. if (key) {
  29244. if (isUndefined(values)) {
  29245. data = getLocale(key);
  29246. }
  29247. else {
  29248. data = defineLocale(key, values);
  29249. }
  29250. if (data) {
  29251. // moment.duration._locale = moment._locale = data;
  29252. globalLocale = data;
  29253. }
  29254. else {
  29255. if ((typeof console !== 'undefined') && console.warn) {
  29256. //warn user if arguments are passed but the locale could not be set
  29257. console.warn('Locale ' + key + ' not found. Did you forget to load it?');
  29258. }
  29259. }
  29260. }
  29261. return globalLocale._abbr;
  29262. }
  29263. function defineLocale (name, config) {
  29264. if (config !== null) {
  29265. var locale, parentConfig = baseConfig;
  29266. config.abbr = name;
  29267. if (locales[name] != null) {
  29268. deprecateSimple('defineLocaleOverride',
  29269. 'use moment.updateLocale(localeName, config) to change ' +
  29270. 'an existing locale. moment.defineLocale(localeName, ' +
  29271. 'config) should only be used for creating a new locale ' +
  29272. 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.');
  29273. parentConfig = locales[name]._config;
  29274. } else if (config.parentLocale != null) {
  29275. if (locales[config.parentLocale] != null) {
  29276. parentConfig = locales[config.parentLocale]._config;
  29277. } else {
  29278. locale = loadLocale(config.parentLocale);
  29279. if (locale != null) {
  29280. parentConfig = locale._config;
  29281. } else {
  29282. if (!localeFamilies[config.parentLocale]) {
  29283. localeFamilies[config.parentLocale] = [];
  29284. }
  29285. localeFamilies[config.parentLocale].push({
  29286. name: name,
  29287. config: config
  29288. });
  29289. return null;
  29290. }
  29291. }
  29292. }
  29293. locales[name] = new Locale(mergeConfigs(parentConfig, config));
  29294. if (localeFamilies[name]) {
  29295. localeFamilies[name].forEach(function (x) {
  29296. defineLocale(x.name, x.config);
  29297. });
  29298. }
  29299. // backwards compat for now: also set the locale
  29300. // make sure we set the locale AFTER all child locales have been
  29301. // created, so we won't end up with the child locale set.
  29302. getSetGlobalLocale(name);
  29303. return locales[name];
  29304. } else {
  29305. // useful for testing
  29306. delete locales[name];
  29307. return null;
  29308. }
  29309. }
  29310. function updateLocale(name, config) {
  29311. if (config != null) {
  29312. var locale, tmpLocale, parentConfig = baseConfig;
  29313. // MERGE
  29314. tmpLocale = loadLocale(name);
  29315. if (tmpLocale != null) {
  29316. parentConfig = tmpLocale._config;
  29317. }
  29318. config = mergeConfigs(parentConfig, config);
  29319. locale = new Locale(config);
  29320. locale.parentLocale = locales[name];
  29321. locales[name] = locale;
  29322. // backwards compat for now: also set the locale
  29323. getSetGlobalLocale(name);
  29324. } else {
  29325. // pass null for config to unupdate, useful for tests
  29326. if (locales[name] != null) {
  29327. if (locales[name].parentLocale != null) {
  29328. locales[name] = locales[name].parentLocale;
  29329. } else if (locales[name] != null) {
  29330. delete locales[name];
  29331. }
  29332. }
  29333. }
  29334. return locales[name];
  29335. }
  29336. // returns locale data
  29337. function getLocale (key) {
  29338. var locale;
  29339. if (key && key._locale && key._locale._abbr) {
  29340. key = key._locale._abbr;
  29341. }
  29342. if (!key) {
  29343. return globalLocale;
  29344. }
  29345. if (!isArray(key)) {
  29346. //short-circuit everything else
  29347. locale = loadLocale(key);
  29348. if (locale) {
  29349. return locale;
  29350. }
  29351. key = [key];
  29352. }
  29353. return chooseLocale(key);
  29354. }
  29355. function listLocales() {
  29356. return keys(locales);
  29357. }
  29358. function checkOverflow (m) {
  29359. var overflow;
  29360. var a = m._a;
  29361. if (a && getParsingFlags(m).overflow === -2) {
  29362. overflow =
  29363. a[MONTH] < 0 || a[MONTH] > 11 ? MONTH :
  29364. a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE :
  29365. a[HOUR] < 0 || a[HOUR] > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR :
  29366. a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE :
  29367. a[SECOND] < 0 || a[SECOND] > 59 ? SECOND :
  29368. a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND :
  29369. -1;
  29370. if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {
  29371. overflow = DATE;
  29372. }
  29373. if (getParsingFlags(m)._overflowWeeks && overflow === -1) {
  29374. overflow = WEEK;
  29375. }
  29376. if (getParsingFlags(m)._overflowWeekday && overflow === -1) {
  29377. overflow = WEEKDAY;
  29378. }
  29379. getParsingFlags(m).overflow = overflow;
  29380. }
  29381. return m;
  29382. }
  29383. // Pick the first defined of two or three arguments.
  29384. function defaults(a, b, c) {
  29385. if (a != null) {
  29386. return a;
  29387. }
  29388. if (b != null) {
  29389. return b;
  29390. }
  29391. return c;
  29392. }
  29393. function currentDateArray(config) {
  29394. // hooks is actually the exported moment object
  29395. var nowValue = new Date(hooks.now());
  29396. if (config._useUTC) {
  29397. return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()];
  29398. }
  29399. return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];
  29400. }
  29401. // convert an array to a date.
  29402. // the array should mirror the parameters below
  29403. // note: all values past the year are optional and will default to the lowest possible value.
  29404. // [year, month, day , hour, minute, second, millisecond]
  29405. function configFromArray (config) {
  29406. var i, date, input = [], currentDate, expectedWeekday, yearToUse;
  29407. if (config._d) {
  29408. return;
  29409. }
  29410. currentDate = currentDateArray(config);
  29411. //compute day of the year from weeks and weekdays
  29412. if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {
  29413. dayOfYearFromWeekInfo(config);
  29414. }
  29415. //if the day of the year is set, figure out what it is
  29416. if (config._dayOfYear != null) {
  29417. yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);
  29418. if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) {
  29419. getParsingFlags(config)._overflowDayOfYear = true;
  29420. }
  29421. date = createUTCDate(yearToUse, 0, config._dayOfYear);
  29422. config._a[MONTH] = date.getUTCMonth();
  29423. config._a[DATE] = date.getUTCDate();
  29424. }
  29425. // Default to current date.
  29426. // * if no year, month, day of month are given, default to today
  29427. // * if day of month is given, default month and year
  29428. // * if month is given, default only year
  29429. // * if year is given, don't default anything
  29430. for (i = 0; i < 3 && config._a[i] == null; ++i) {
  29431. config._a[i] = input[i] = currentDate[i];
  29432. }
  29433. // Zero out whatever was not defaulted, including time
  29434. for (; i < 7; i++) {
  29435. config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];
  29436. }
  29437. // Check for 24:00:00.000
  29438. if (config._a[HOUR] === 24 &&
  29439. config._a[MINUTE] === 0 &&
  29440. config._a[SECOND] === 0 &&
  29441. config._a[MILLISECOND] === 0) {
  29442. config._nextDay = true;
  29443. config._a[HOUR] = 0;
  29444. }
  29445. config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);
  29446. expectedWeekday = config._useUTC ? config._d.getUTCDay() : config._d.getDay();
  29447. // Apply timezone offset from input. The actual utcOffset can be changed
  29448. // with parseZone.
  29449. if (config._tzm != null) {
  29450. config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
  29451. }
  29452. if (config._nextDay) {
  29453. config._a[HOUR] = 24;
  29454. }
  29455. // check for mismatching day of week
  29456. if (config._w && typeof config._w.d !== 'undefined' && config._w.d !== expectedWeekday) {
  29457. getParsingFlags(config).weekdayMismatch = true;
  29458. }
  29459. }
  29460. function dayOfYearFromWeekInfo(config) {
  29461. var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow;
  29462. w = config._w;
  29463. if (w.GG != null || w.W != null || w.E != null) {
  29464. dow = 1;
  29465. doy = 4;
  29466. // TODO: We need to take the current isoWeekYear, but that depends on
  29467. // how we interpret now (local, utc, fixed offset). So create
  29468. // a now version of current config (take local/utc/offset flags, and
  29469. // create now).
  29470. weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(createLocal(), 1, 4).year);
  29471. week = defaults(w.W, 1);
  29472. weekday = defaults(w.E, 1);
  29473. if (weekday < 1 || weekday > 7) {
  29474. weekdayOverflow = true;
  29475. }
  29476. } else {
  29477. dow = config._locale._week.dow;
  29478. doy = config._locale._week.doy;
  29479. var curWeek = weekOfYear(createLocal(), dow, doy);
  29480. weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);
  29481. // Default to current week.
  29482. week = defaults(w.w, curWeek.week);
  29483. if (w.d != null) {
  29484. // weekday -- low day numbers are considered next week
  29485. weekday = w.d;
  29486. if (weekday < 0 || weekday > 6) {
  29487. weekdayOverflow = true;
  29488. }
  29489. } else if (w.e != null) {
  29490. // local weekday -- counting starts from begining of week
  29491. weekday = w.e + dow;
  29492. if (w.e < 0 || w.e > 6) {
  29493. weekdayOverflow = true;
  29494. }
  29495. } else {
  29496. // default to begining of week
  29497. weekday = dow;
  29498. }
  29499. }
  29500. if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {
  29501. getParsingFlags(config)._overflowWeeks = true;
  29502. } else if (weekdayOverflow != null) {
  29503. getParsingFlags(config)._overflowWeekday = true;
  29504. } else {
  29505. temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);
  29506. config._a[YEAR] = temp.year;
  29507. config._dayOfYear = temp.dayOfYear;
  29508. }
  29509. }
  29510. // iso 8601 regex
  29511. // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)
  29512. var extendedIsoRegex = /^\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)?)?$/;
  29513. var basicIsoRegex = /^\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)?)?$/;
  29514. var tzRegex = /Z|[+-]\d\d(?::?\d\d)?/;
  29515. var isoDates = [
  29516. ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/],
  29517. ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/],
  29518. ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/],
  29519. ['GGGG-[W]WW', /\d{4}-W\d\d/, false],
  29520. ['YYYY-DDD', /\d{4}-\d{3}/],
  29521. ['YYYY-MM', /\d{4}-\d\d/, false],
  29522. ['YYYYYYMMDD', /[+-]\d{10}/],
  29523. ['YYYYMMDD', /\d{8}/],
  29524. // YYYYMM is NOT allowed by the standard
  29525. ['GGGG[W]WWE', /\d{4}W\d{3}/],
  29526. ['GGGG[W]WW', /\d{4}W\d{2}/, false],
  29527. ['YYYYDDD', /\d{7}/]
  29528. ];
  29529. // iso time formats and regexes
  29530. var isoTimes = [
  29531. ['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/],
  29532. ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/],
  29533. ['HH:mm:ss', /\d\d:\d\d:\d\d/],
  29534. ['HH:mm', /\d\d:\d\d/],
  29535. ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/],
  29536. ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/],
  29537. ['HHmmss', /\d\d\d\d\d\d/],
  29538. ['HHmm', /\d\d\d\d/],
  29539. ['HH', /\d\d/]
  29540. ];
  29541. var aspNetJsonRegex = /^\/?Date\((\-?\d+)/i;
  29542. // date from iso format
  29543. function configFromISO(config) {
  29544. var i, l,
  29545. string = config._i,
  29546. match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),
  29547. allowTime, dateFormat, timeFormat, tzFormat;
  29548. if (match) {
  29549. getParsingFlags(config).iso = true;
  29550. for (i = 0, l = isoDates.length; i < l; i++) {
  29551. if (isoDates[i][1].exec(match[1])) {
  29552. dateFormat = isoDates[i][0];
  29553. allowTime = isoDates[i][2] !== false;
  29554. break;
  29555. }
  29556. }
  29557. if (dateFormat == null) {
  29558. config._isValid = false;
  29559. return;
  29560. }
  29561. if (match[3]) {
  29562. for (i = 0, l = isoTimes.length; i < l; i++) {
  29563. if (isoTimes[i][1].exec(match[3])) {
  29564. // match[2] should be 'T' or space
  29565. timeFormat = (match[2] || ' ') + isoTimes[i][0];
  29566. break;
  29567. }
  29568. }
  29569. if (timeFormat == null) {
  29570. config._isValid = false;
  29571. return;
  29572. }
  29573. }
  29574. if (!allowTime && timeFormat != null) {
  29575. config._isValid = false;
  29576. return;
  29577. }
  29578. if (match[4]) {
  29579. if (tzRegex.exec(match[4])) {
  29580. tzFormat = 'Z';
  29581. } else {
  29582. config._isValid = false;
  29583. return;
  29584. }
  29585. }
  29586. config._f = dateFormat + (timeFormat || '') + (tzFormat || '');
  29587. configFromStringAndFormat(config);
  29588. } else {
  29589. config._isValid = false;
  29590. }
  29591. }
  29592. // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3
  29593. var rfc2822 = /^(?:(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}))$/;
  29594. function extractFromRFC2822Strings(yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) {
  29595. var result = [
  29596. untruncateYear(yearStr),
  29597. defaultLocaleMonthsShort.indexOf(monthStr),
  29598. parseInt(dayStr, 10),
  29599. parseInt(hourStr, 10),
  29600. parseInt(minuteStr, 10)
  29601. ];
  29602. if (secondStr) {
  29603. result.push(parseInt(secondStr, 10));
  29604. }
  29605. return result;
  29606. }
  29607. function untruncateYear(yearStr) {
  29608. var year = parseInt(yearStr, 10);
  29609. if (year <= 49) {
  29610. return 2000 + year;
  29611. } else if (year <= 999) {
  29612. return 1900 + year;
  29613. }
  29614. return year;
  29615. }
  29616. function preprocessRFC2822(s) {
  29617. // Remove comments and folding whitespace and replace multiple-spaces with a single space
  29618. return s.replace(/\([^)]*\)|[\n\t]/g, ' ').replace(/(\s\s+)/g, ' ').replace(/^\s\s*/, '').replace(/\s\s*$/, '');
  29619. }
  29620. function checkWeekday(weekdayStr, parsedInput, config) {
  29621. if (weekdayStr) {
  29622. // TODO: Replace the vanilla JS Date object with an indepentent day-of-week check.
  29623. var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),
  29624. weekdayActual = new Date(parsedInput[0], parsedInput[1], parsedInput[2]).getDay();
  29625. if (weekdayProvided !== weekdayActual) {
  29626. getParsingFlags(config).weekdayMismatch = true;
  29627. config._isValid = false;
  29628. return false;
  29629. }
  29630. }
  29631. return true;
  29632. }
  29633. var obsOffsets = {
  29634. UT: 0,
  29635. GMT: 0,
  29636. EDT: -4 * 60,
  29637. EST: -5 * 60,
  29638. CDT: -5 * 60,
  29639. CST: -6 * 60,
  29640. MDT: -6 * 60,
  29641. MST: -7 * 60,
  29642. PDT: -7 * 60,
  29643. PST: -8 * 60
  29644. };
  29645. function calculateOffset(obsOffset, militaryOffset, numOffset) {
  29646. if (obsOffset) {
  29647. return obsOffsets[obsOffset];
  29648. } else if (militaryOffset) {
  29649. // the only allowed military tz is Z
  29650. return 0;
  29651. } else {
  29652. var hm = parseInt(numOffset, 10);
  29653. var m = hm % 100, h = (hm - m) / 100;
  29654. return h * 60 + m;
  29655. }
  29656. }
  29657. // date and time from ref 2822 format
  29658. function configFromRFC2822(config) {
  29659. var match = rfc2822.exec(preprocessRFC2822(config._i));
  29660. if (match) {
  29661. var parsedArray = extractFromRFC2822Strings(match[4], match[3], match[2], match[5], match[6], match[7]);
  29662. if (!checkWeekday(match[1], parsedArray, config)) {
  29663. return;
  29664. }
  29665. config._a = parsedArray;
  29666. config._tzm = calculateOffset(match[8], match[9], match[10]);
  29667. config._d = createUTCDate.apply(null, config._a);
  29668. config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
  29669. getParsingFlags(config).rfc2822 = true;
  29670. } else {
  29671. config._isValid = false;
  29672. }
  29673. }
  29674. // date from iso format or fallback
  29675. function configFromString(config) {
  29676. var matched = aspNetJsonRegex.exec(config._i);
  29677. if (matched !== null) {
  29678. config._d = new Date(+matched[1]);
  29679. return;
  29680. }
  29681. configFromISO(config);
  29682. if (config._isValid === false) {
  29683. delete config._isValid;
  29684. } else {
  29685. return;
  29686. }
  29687. configFromRFC2822(config);
  29688. if (config._isValid === false) {
  29689. delete config._isValid;
  29690. } else {
  29691. return;
  29692. }
  29693. // Final attempt, use Input Fallback
  29694. hooks.createFromInputFallback(config);
  29695. }
  29696. hooks.createFromInputFallback = deprecate(
  29697. 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +
  29698. 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +
  29699. 'discouraged and will be removed in an upcoming major release. Please refer to ' +
  29700. 'http://momentjs.com/guides/#/warnings/js-date/ for more info.',
  29701. function (config) {
  29702. config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));
  29703. }
  29704. );
  29705. // constant that refers to the ISO standard
  29706. hooks.ISO_8601 = function () {};
  29707. // constant that refers to the RFC 2822 form
  29708. hooks.RFC_2822 = function () {};
  29709. // date from string and format string
  29710. function configFromStringAndFormat(config) {
  29711. // TODO: Move this to another part of the creation flow to prevent circular deps
  29712. if (config._f === hooks.ISO_8601) {
  29713. configFromISO(config);
  29714. return;
  29715. }
  29716. if (config._f === hooks.RFC_2822) {
  29717. configFromRFC2822(config);
  29718. return;
  29719. }
  29720. config._a = [];
  29721. getParsingFlags(config).empty = true;
  29722. // This array is used to make a Date, either with `new Date` or `Date.UTC`
  29723. var string = '' + config._i,
  29724. i, parsedInput, tokens, token, skipped,
  29725. stringLength = string.length,
  29726. totalParsedInputLength = 0;
  29727. tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];
  29728. for (i = 0; i < tokens.length; i++) {
  29729. token = tokens[i];
  29730. parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];
  29731. // console.log('token', token, 'parsedInput', parsedInput,
  29732. // 'regex', getParseRegexForToken(token, config));
  29733. if (parsedInput) {
  29734. skipped = string.substr(0, string.indexOf(parsedInput));
  29735. if (skipped.length > 0) {
  29736. getParsingFlags(config).unusedInput.push(skipped);
  29737. }
  29738. string = string.slice(string.indexOf(parsedInput) + parsedInput.length);
  29739. totalParsedInputLength += parsedInput.length;
  29740. }
  29741. // don't parse if it's not a known token
  29742. if (formatTokenFunctions[token]) {
  29743. if (parsedInput) {
  29744. getParsingFlags(config).empty = false;
  29745. }
  29746. else {
  29747. getParsingFlags(config).unusedTokens.push(token);
  29748. }
  29749. addTimeToArrayFromToken(token, parsedInput, config);
  29750. }
  29751. else if (config._strict && !parsedInput) {
  29752. getParsingFlags(config).unusedTokens.push(token);
  29753. }
  29754. }
  29755. // add remaining unparsed input length to the string
  29756. getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength;
  29757. if (string.length > 0) {
  29758. getParsingFlags(config).unusedInput.push(string);
  29759. }
  29760. // clear _12h flag if hour is <= 12
  29761. if (config._a[HOUR] <= 12 &&
  29762. getParsingFlags(config).bigHour === true &&
  29763. config._a[HOUR] > 0) {
  29764. getParsingFlags(config).bigHour = undefined;
  29765. }
  29766. getParsingFlags(config).parsedDateParts = config._a.slice(0);
  29767. getParsingFlags(config).meridiem = config._meridiem;
  29768. // handle meridiem
  29769. config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem);
  29770. configFromArray(config);
  29771. checkOverflow(config);
  29772. }
  29773. function meridiemFixWrap (locale, hour, meridiem) {
  29774. var isPm;
  29775. if (meridiem == null) {
  29776. // nothing to do
  29777. return hour;
  29778. }
  29779. if (locale.meridiemHour != null) {
  29780. return locale.meridiemHour(hour, meridiem);
  29781. } else if (locale.isPM != null) {
  29782. // Fallback
  29783. isPm = locale.isPM(meridiem);
  29784. if (isPm && hour < 12) {
  29785. hour += 12;
  29786. }
  29787. if (!isPm && hour === 12) {
  29788. hour = 0;
  29789. }
  29790. return hour;
  29791. } else {
  29792. // this is not supposed to happen
  29793. return hour;
  29794. }
  29795. }
  29796. // date from string and array of format strings
  29797. function configFromStringAndArray(config) {
  29798. var tempConfig,
  29799. bestMoment,
  29800. scoreToBeat,
  29801. i,
  29802. currentScore;
  29803. if (config._f.length === 0) {
  29804. getParsingFlags(config).invalidFormat = true;
  29805. config._d = new Date(NaN);
  29806. return;
  29807. }
  29808. for (i = 0; i < config._f.length; i++) {
  29809. currentScore = 0;
  29810. tempConfig = copyConfig({}, config);
  29811. if (config._useUTC != null) {
  29812. tempConfig._useUTC = config._useUTC;
  29813. }
  29814. tempConfig._f = config._f[i];
  29815. configFromStringAndFormat(tempConfig);
  29816. if (!isValid(tempConfig)) {
  29817. continue;
  29818. }
  29819. // if there is any input that was not parsed add a penalty for that format
  29820. currentScore += getParsingFlags(tempConfig).charsLeftOver;
  29821. //or tokens
  29822. currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;
  29823. getParsingFlags(tempConfig).score = currentScore;
  29824. if (scoreToBeat == null || currentScore < scoreToBeat) {
  29825. scoreToBeat = currentScore;
  29826. bestMoment = tempConfig;
  29827. }
  29828. }
  29829. extend(config, bestMoment || tempConfig);
  29830. }
  29831. function configFromObject(config) {
  29832. if (config._d) {
  29833. return;
  29834. }
  29835. var i = normalizeObjectUnits(config._i);
  29836. config._a = map([i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond], function (obj) {
  29837. return obj && parseInt(obj, 10);
  29838. });
  29839. configFromArray(config);
  29840. }
  29841. function createFromConfig (config) {
  29842. var res = new Moment(checkOverflow(prepareConfig(config)));
  29843. if (res._nextDay) {
  29844. // Adding is smart enough around DST
  29845. res.add(1, 'd');
  29846. res._nextDay = undefined;
  29847. }
  29848. return res;
  29849. }
  29850. function prepareConfig (config) {
  29851. var input = config._i,
  29852. format = config._f;
  29853. config._locale = config._locale || getLocale(config._l);
  29854. if (input === null || (format === undefined && input === '')) {
  29855. return createInvalid({nullInput: true});
  29856. }
  29857. if (typeof input === 'string') {
  29858. config._i = input = config._locale.preparse(input);
  29859. }
  29860. if (isMoment(input)) {
  29861. return new Moment(checkOverflow(input));
  29862. } else if (isDate(input)) {
  29863. config._d = input;
  29864. } else if (isArray(format)) {
  29865. configFromStringAndArray(config);
  29866. } else if (format) {
  29867. configFromStringAndFormat(config);
  29868. } else {
  29869. configFromInput(config);
  29870. }
  29871. if (!isValid(config)) {
  29872. config._d = null;
  29873. }
  29874. return config;
  29875. }
  29876. function configFromInput(config) {
  29877. var input = config._i;
  29878. if (isUndefined(input)) {
  29879. config._d = new Date(hooks.now());
  29880. } else if (isDate(input)) {
  29881. config._d = new Date(input.valueOf());
  29882. } else if (typeof input === 'string') {
  29883. configFromString(config);
  29884. } else if (isArray(input)) {
  29885. config._a = map(input.slice(0), function (obj) {
  29886. return parseInt(obj, 10);
  29887. });
  29888. configFromArray(config);
  29889. } else if (isObject(input)) {
  29890. configFromObject(config);
  29891. } else if (isNumber(input)) {
  29892. // from milliseconds
  29893. config._d = new Date(input);
  29894. } else {
  29895. hooks.createFromInputFallback(config);
  29896. }
  29897. }
  29898. function createLocalOrUTC (input, format, locale, strict, isUTC) {
  29899. var c = {};
  29900. if (locale === true || locale === false) {
  29901. strict = locale;
  29902. locale = undefined;
  29903. }
  29904. if ((isObject(input) && isObjectEmpty(input)) ||
  29905. (isArray(input) && input.length === 0)) {
  29906. input = undefined;
  29907. }
  29908. // object construction must be done this way.
  29909. // https://github.com/moment/moment/issues/1423
  29910. c._isAMomentObject = true;
  29911. c._useUTC = c._isUTC = isUTC;
  29912. c._l = locale;
  29913. c._i = input;
  29914. c._f = format;
  29915. c._strict = strict;
  29916. return createFromConfig(c);
  29917. }
  29918. function createLocal (input, format, locale, strict) {
  29919. return createLocalOrUTC(input, format, locale, strict, false);
  29920. }
  29921. var prototypeMin = deprecate(
  29922. 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',
  29923. function () {
  29924. var other = createLocal.apply(null, arguments);
  29925. if (this.isValid() && other.isValid()) {
  29926. return other < this ? this : other;
  29927. } else {
  29928. return createInvalid();
  29929. }
  29930. }
  29931. );
  29932. var prototypeMax = deprecate(
  29933. 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',
  29934. function () {
  29935. var other = createLocal.apply(null, arguments);
  29936. if (this.isValid() && other.isValid()) {
  29937. return other > this ? this : other;
  29938. } else {
  29939. return createInvalid();
  29940. }
  29941. }
  29942. );
  29943. // Pick a moment m from moments so that m[fn](other) is true for all
  29944. // other. This relies on the function fn to be transitive.
  29945. //
  29946. // moments should either be an array of moment objects or an array, whose
  29947. // first element is an array of moment objects.
  29948. function pickBy(fn, moments) {
  29949. var res, i;
  29950. if (moments.length === 1 && isArray(moments[0])) {
  29951. moments = moments[0];
  29952. }
  29953. if (!moments.length) {
  29954. return createLocal();
  29955. }
  29956. res = moments[0];
  29957. for (i = 1; i < moments.length; ++i) {
  29958. if (!moments[i].isValid() || moments[i][fn](res)) {
  29959. res = moments[i];
  29960. }
  29961. }
  29962. return res;
  29963. }
  29964. // TODO: Use [].sort instead?
  29965. function min () {
  29966. var args = [].slice.call(arguments, 0);
  29967. return pickBy('isBefore', args);
  29968. }
  29969. function max () {
  29970. var args = [].slice.call(arguments, 0);
  29971. return pickBy('isAfter', args);
  29972. }
  29973. var now = function () {
  29974. return Date.now ? Date.now() : +(new Date());
  29975. };
  29976. var ordering = ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond'];
  29977. function isDurationValid(m) {
  29978. for (var key in m) {
  29979. if (!(indexOf.call(ordering, key) !== -1 && (m[key] == null || !isNaN(m[key])))) {
  29980. return false;
  29981. }
  29982. }
  29983. var unitHasDecimal = false;
  29984. for (var i = 0; i < ordering.length; ++i) {
  29985. if (m[ordering[i]]) {
  29986. if (unitHasDecimal) {
  29987. return false; // only allow non-integers for smallest unit
  29988. }
  29989. if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {
  29990. unitHasDecimal = true;
  29991. }
  29992. }
  29993. }
  29994. return true;
  29995. }
  29996. function isValid$1() {
  29997. return this._isValid;
  29998. }
  29999. function createInvalid$1() {
  30000. return createDuration(NaN);
  30001. }
  30002. function Duration (duration) {
  30003. var normalizedInput = normalizeObjectUnits(duration),
  30004. years = normalizedInput.year || 0,
  30005. quarters = normalizedInput.quarter || 0,
  30006. months = normalizedInput.month || 0,
  30007. weeks = normalizedInput.week || 0,
  30008. days = normalizedInput.day || 0,
  30009. hours = normalizedInput.hour || 0,
  30010. minutes = normalizedInput.minute || 0,
  30011. seconds = normalizedInput.second || 0,
  30012. milliseconds = normalizedInput.millisecond || 0;
  30013. this._isValid = isDurationValid(normalizedInput);
  30014. // representation for dateAddRemove
  30015. this._milliseconds = +milliseconds +
  30016. seconds * 1e3 + // 1000
  30017. minutes * 6e4 + // 1000 * 60
  30018. hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978
  30019. // Because of dateAddRemove treats 24 hours as different from a
  30020. // day when working around DST, we need to store them separately
  30021. this._days = +days +
  30022. weeks * 7;
  30023. // It is impossible to translate months into days without knowing
  30024. // which months you are are talking about, so we have to store
  30025. // it separately.
  30026. this._months = +months +
  30027. quarters * 3 +
  30028. years * 12;
  30029. this._data = {};
  30030. this._locale = getLocale();
  30031. this._bubble();
  30032. }
  30033. function isDuration (obj) {
  30034. return obj instanceof Duration;
  30035. }
  30036. function absRound (number) {
  30037. if (number < 0) {
  30038. return Math.round(-1 * number) * -1;
  30039. } else {
  30040. return Math.round(number);
  30041. }
  30042. }
  30043. // FORMATTING
  30044. function offset (token, separator) {
  30045. addFormatToken(token, 0, 0, function () {
  30046. var offset = this.utcOffset();
  30047. var sign = '+';
  30048. if (offset < 0) {
  30049. offset = -offset;
  30050. sign = '-';
  30051. }
  30052. return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~(offset) % 60, 2);
  30053. });
  30054. }
  30055. offset('Z', ':');
  30056. offset('ZZ', '');
  30057. // PARSING
  30058. addRegexToken('Z', matchShortOffset);
  30059. addRegexToken('ZZ', matchShortOffset);
  30060. addParseToken(['Z', 'ZZ'], function (input, array, config) {
  30061. config._useUTC = true;
  30062. config._tzm = offsetFromString(matchShortOffset, input);
  30063. });
  30064. // HELPERS
  30065. // timezone chunker
  30066. // '+10:00' > ['10', '00']
  30067. // '-1530' > ['-15', '30']
  30068. var chunkOffset = /([\+\-]|\d\d)/gi;
  30069. function offsetFromString(matcher, string) {
  30070. var matches = (string || '').match(matcher);
  30071. if (matches === null) {
  30072. return null;
  30073. }
  30074. var chunk = matches[matches.length - 1] || [];
  30075. var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];
  30076. var minutes = +(parts[1] * 60) + toInt(parts[2]);
  30077. return minutes === 0 ?
  30078. 0 :
  30079. parts[0] === '+' ? minutes : -minutes;
  30080. }
  30081. // Return a moment from input, that is local/utc/zone equivalent to model.
  30082. function cloneWithOffset(input, model) {
  30083. var res, diff;
  30084. if (model._isUTC) {
  30085. res = model.clone();
  30086. diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();
  30087. // Use low-level api, because this fn is low-level api.
  30088. res._d.setTime(res._d.valueOf() + diff);
  30089. hooks.updateOffset(res, false);
  30090. return res;
  30091. } else {
  30092. return createLocal(input).local();
  30093. }
  30094. }
  30095. function getDateOffset (m) {
  30096. // On Firefox.24 Date#getTimezoneOffset returns a floating point.
  30097. // https://github.com/moment/moment/pull/1871
  30098. return -Math.round(m._d.getTimezoneOffset() / 15) * 15;
  30099. }
  30100. // HOOKS
  30101. // This function will be called whenever a moment is mutated.
  30102. // It is intended to keep the offset in sync with the timezone.
  30103. hooks.updateOffset = function () {};
  30104. // MOMENTS
  30105. // keepLocalTime = true means only change the timezone, without
  30106. // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->
  30107. // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset
  30108. // +0200, so we adjust the time as needed, to be valid.
  30109. //
  30110. // Keeping the time actually adds/subtracts (one hour)
  30111. // from the actual represented time. That is why we call updateOffset
  30112. // a second time. In case it wants us to change the offset again
  30113. // _changeInProgress == true case, then we have to adjust, because
  30114. // there is no such time in the given timezone.
  30115. function getSetOffset (input, keepLocalTime, keepMinutes) {
  30116. var offset = this._offset || 0,
  30117. localAdjust;
  30118. if (!this.isValid()) {
  30119. return input != null ? this : NaN;
  30120. }
  30121. if (input != null) {
  30122. if (typeof input === 'string') {
  30123. input = offsetFromString(matchShortOffset, input);
  30124. if (input === null) {
  30125. return this;
  30126. }
  30127. } else if (Math.abs(input) < 16 && !keepMinutes) {
  30128. input = input * 60;
  30129. }
  30130. if (!this._isUTC && keepLocalTime) {
  30131. localAdjust = getDateOffset(this);
  30132. }
  30133. this._offset = input;
  30134. this._isUTC = true;
  30135. if (localAdjust != null) {
  30136. this.add(localAdjust, 'm');
  30137. }
  30138. if (offset !== input) {
  30139. if (!keepLocalTime || this._changeInProgress) {
  30140. addSubtract(this, createDuration(input - offset, 'm'), 1, false);
  30141. } else if (!this._changeInProgress) {
  30142. this._changeInProgress = true;
  30143. hooks.updateOffset(this, true);
  30144. this._changeInProgress = null;
  30145. }
  30146. }
  30147. return this;
  30148. } else {
  30149. return this._isUTC ? offset : getDateOffset(this);
  30150. }
  30151. }
  30152. function getSetZone (input, keepLocalTime) {
  30153. if (input != null) {
  30154. if (typeof input !== 'string') {
  30155. input = -input;
  30156. }
  30157. this.utcOffset(input, keepLocalTime);
  30158. return this;
  30159. } else {
  30160. return -this.utcOffset();
  30161. }
  30162. }
  30163. function setOffsetToUTC (keepLocalTime) {
  30164. return this.utcOffset(0, keepLocalTime);
  30165. }
  30166. function setOffsetToLocal (keepLocalTime) {
  30167. if (this._isUTC) {
  30168. this.utcOffset(0, keepLocalTime);
  30169. this._isUTC = false;
  30170. if (keepLocalTime) {
  30171. this.subtract(getDateOffset(this), 'm');
  30172. }
  30173. }
  30174. return this;
  30175. }
  30176. function setOffsetToParsedOffset () {
  30177. if (this._tzm != null) {
  30178. this.utcOffset(this._tzm, false, true);
  30179. } else if (typeof this._i === 'string') {
  30180. var tZone = offsetFromString(matchOffset, this._i);
  30181. if (tZone != null) {
  30182. this.utcOffset(tZone);
  30183. }
  30184. else {
  30185. this.utcOffset(0, true);
  30186. }
  30187. }
  30188. return this;
  30189. }
  30190. function hasAlignedHourOffset (input) {
  30191. if (!this.isValid()) {
  30192. return false;
  30193. }
  30194. input = input ? createLocal(input).utcOffset() : 0;
  30195. return (this.utcOffset() - input) % 60 === 0;
  30196. }
  30197. function isDaylightSavingTime () {
  30198. return (
  30199. this.utcOffset() > this.clone().month(0).utcOffset() ||
  30200. this.utcOffset() > this.clone().month(5).utcOffset()
  30201. );
  30202. }
  30203. function isDaylightSavingTimeShifted () {
  30204. if (!isUndefined(this._isDSTShifted)) {
  30205. return this._isDSTShifted;
  30206. }
  30207. var c = {};
  30208. copyConfig(c, this);
  30209. c = prepareConfig(c);
  30210. if (c._a) {
  30211. var other = c._isUTC ? createUTC(c._a) : createLocal(c._a);
  30212. this._isDSTShifted = this.isValid() &&
  30213. compareArrays(c._a, other.toArray()) > 0;
  30214. } else {
  30215. this._isDSTShifted = false;
  30216. }
  30217. return this._isDSTShifted;
  30218. }
  30219. function isLocal () {
  30220. return this.isValid() ? !this._isUTC : false;
  30221. }
  30222. function isUtcOffset () {
  30223. return this.isValid() ? this._isUTC : false;
  30224. }
  30225. function isUtc () {
  30226. return this.isValid() ? this._isUTC && this._offset === 0 : false;
  30227. }
  30228. // ASP.NET json date format regex
  30229. var aspNetRegex = /^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/;
  30230. // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html
  30231. // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere
  30232. // and further modified to allow for strings containing both week and day
  30233. var isoRegex = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;
  30234. function createDuration (input, key) {
  30235. var duration = input,
  30236. // matching against regexp is expensive, do it on demand
  30237. match = null,
  30238. sign,
  30239. ret,
  30240. diffRes;
  30241. if (isDuration(input)) {
  30242. duration = {
  30243. ms : input._milliseconds,
  30244. d : input._days,
  30245. M : input._months
  30246. };
  30247. } else if (isNumber(input)) {
  30248. duration = {};
  30249. if (key) {
  30250. duration[key] = input;
  30251. } else {
  30252. duration.milliseconds = input;
  30253. }
  30254. } else if (!!(match = aspNetRegex.exec(input))) {
  30255. sign = (match[1] === '-') ? -1 : 1;
  30256. duration = {
  30257. y : 0,
  30258. d : toInt(match[DATE]) * sign,
  30259. h : toInt(match[HOUR]) * sign,
  30260. m : toInt(match[MINUTE]) * sign,
  30261. s : toInt(match[SECOND]) * sign,
  30262. ms : toInt(absRound(match[MILLISECOND] * 1000)) * sign // the millisecond decimal point is included in the match
  30263. };
  30264. } else if (!!(match = isoRegex.exec(input))) {
  30265. sign = (match[1] === '-') ? -1 : (match[1] === '+') ? 1 : 1;
  30266. duration = {
  30267. y : parseIso(match[2], sign),
  30268. M : parseIso(match[3], sign),
  30269. w : parseIso(match[4], sign),
  30270. d : parseIso(match[5], sign),
  30271. h : parseIso(match[6], sign),
  30272. m : parseIso(match[7], sign),
  30273. s : parseIso(match[8], sign)
  30274. };
  30275. } else if (duration == null) {// checks for null or undefined
  30276. duration = {};
  30277. } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) {
  30278. diffRes = momentsDifference(createLocal(duration.from), createLocal(duration.to));
  30279. duration = {};
  30280. duration.ms = diffRes.milliseconds;
  30281. duration.M = diffRes.months;
  30282. }
  30283. ret = new Duration(duration);
  30284. if (isDuration(input) && hasOwnProp(input, '_locale')) {
  30285. ret._locale = input._locale;
  30286. }
  30287. return ret;
  30288. }
  30289. createDuration.fn = Duration.prototype;
  30290. createDuration.invalid = createInvalid$1;
  30291. function parseIso (inp, sign) {
  30292. // We'd normally use ~~inp for this, but unfortunately it also
  30293. // converts floats to ints.
  30294. // inp may be undefined, so careful calling replace on it.
  30295. var res = inp && parseFloat(inp.replace(',', '.'));
  30296. // apply sign while we're at it
  30297. return (isNaN(res) ? 0 : res) * sign;
  30298. }
  30299. function positiveMomentsDifference(base, other) {
  30300. var res = {milliseconds: 0, months: 0};
  30301. res.months = other.month() - base.month() +
  30302. (other.year() - base.year()) * 12;
  30303. if (base.clone().add(res.months, 'M').isAfter(other)) {
  30304. --res.months;
  30305. }
  30306. res.milliseconds = +other - +(base.clone().add(res.months, 'M'));
  30307. return res;
  30308. }
  30309. function momentsDifference(base, other) {
  30310. var res;
  30311. if (!(base.isValid() && other.isValid())) {
  30312. return {milliseconds: 0, months: 0};
  30313. }
  30314. other = cloneWithOffset(other, base);
  30315. if (base.isBefore(other)) {
  30316. res = positiveMomentsDifference(base, other);
  30317. } else {
  30318. res = positiveMomentsDifference(other, base);
  30319. res.milliseconds = -res.milliseconds;
  30320. res.months = -res.months;
  30321. }
  30322. return res;
  30323. }
  30324. // TODO: remove 'name' arg after deprecation is removed
  30325. function createAdder(direction, name) {
  30326. return function (val, period) {
  30327. var dur, tmp;
  30328. //invert the arguments, but complain about it
  30329. if (period !== null && !isNaN(+period)) {
  30330. deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +
  30331. 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');
  30332. tmp = val; val = period; period = tmp;
  30333. }
  30334. val = typeof val === 'string' ? +val : val;
  30335. dur = createDuration(val, period);
  30336. addSubtract(this, dur, direction);
  30337. return this;
  30338. };
  30339. }
  30340. function addSubtract (mom, duration, isAdding, updateOffset) {
  30341. var milliseconds = duration._milliseconds,
  30342. days = absRound(duration._days),
  30343. months = absRound(duration._months);
  30344. if (!mom.isValid()) {
  30345. // No op
  30346. return;
  30347. }
  30348. updateOffset = updateOffset == null ? true : updateOffset;
  30349. if (months) {
  30350. setMonth(mom, get(mom, 'Month') + months * isAdding);
  30351. }
  30352. if (days) {
  30353. set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);
  30354. }
  30355. if (milliseconds) {
  30356. mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);
  30357. }
  30358. if (updateOffset) {
  30359. hooks.updateOffset(mom, days || months);
  30360. }
  30361. }
  30362. var add = createAdder(1, 'add');
  30363. var subtract = createAdder(-1, 'subtract');
  30364. function getCalendarFormat(myMoment, now) {
  30365. var diff = myMoment.diff(now, 'days', true);
  30366. return diff < -6 ? 'sameElse' :
  30367. diff < -1 ? 'lastWeek' :
  30368. diff < 0 ? 'lastDay' :
  30369. diff < 1 ? 'sameDay' :
  30370. diff < 2 ? 'nextDay' :
  30371. diff < 7 ? 'nextWeek' : 'sameElse';
  30372. }
  30373. function calendar$1 (time, formats) {
  30374. // We want to compare the start of today, vs this.
  30375. // Getting start-of-today depends on whether we're local/utc/offset or not.
  30376. var now = time || createLocal(),
  30377. sod = cloneWithOffset(now, this).startOf('day'),
  30378. format = hooks.calendarFormat(this, sod) || 'sameElse';
  30379. var output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]);
  30380. return this.format(output || this.localeData().calendar(format, this, createLocal(now)));
  30381. }
  30382. function clone () {
  30383. return new Moment(this);
  30384. }
  30385. function isAfter (input, units) {
  30386. var localInput = isMoment(input) ? input : createLocal(input);
  30387. if (!(this.isValid() && localInput.isValid())) {
  30388. return false;
  30389. }
  30390. units = normalizeUnits(!isUndefined(units) ? units : 'millisecond');
  30391. if (units === 'millisecond') {
  30392. return this.valueOf() > localInput.valueOf();
  30393. } else {
  30394. return localInput.valueOf() < this.clone().startOf(units).valueOf();
  30395. }
  30396. }
  30397. function isBefore (input, units) {
  30398. var localInput = isMoment(input) ? input : createLocal(input);
  30399. if (!(this.isValid() && localInput.isValid())) {
  30400. return false;
  30401. }
  30402. units = normalizeUnits(!isUndefined(units) ? units : 'millisecond');
  30403. if (units === 'millisecond') {
  30404. return this.valueOf() < localInput.valueOf();
  30405. } else {
  30406. return this.clone().endOf(units).valueOf() < localInput.valueOf();
  30407. }
  30408. }
  30409. function isBetween (from, to, units, inclusivity) {
  30410. inclusivity = inclusivity || '()';
  30411. return (inclusivity[0] === '(' ? this.isAfter(from, units) : !this.isBefore(from, units)) &&
  30412. (inclusivity[1] === ')' ? this.isBefore(to, units) : !this.isAfter(to, units));
  30413. }
  30414. function isSame (input, units) {
  30415. var localInput = isMoment(input) ? input : createLocal(input),
  30416. inputMs;
  30417. if (!(this.isValid() && localInput.isValid())) {
  30418. return false;
  30419. }
  30420. units = normalizeUnits(units || 'millisecond');
  30421. if (units === 'millisecond') {
  30422. return this.valueOf() === localInput.valueOf();
  30423. } else {
  30424. inputMs = localInput.valueOf();
  30425. return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf();
  30426. }
  30427. }
  30428. function isSameOrAfter (input, units) {
  30429. return this.isSame(input, units) || this.isAfter(input,units);
  30430. }
  30431. function isSameOrBefore (input, units) {
  30432. return this.isSame(input, units) || this.isBefore(input,units);
  30433. }
  30434. function diff (input, units, asFloat) {
  30435. var that,
  30436. zoneDelta,
  30437. output;
  30438. if (!this.isValid()) {
  30439. return NaN;
  30440. }
  30441. that = cloneWithOffset(input, this);
  30442. if (!that.isValid()) {
  30443. return NaN;
  30444. }
  30445. zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;
  30446. units = normalizeUnits(units);
  30447. switch (units) {
  30448. case 'year': output = monthDiff(this, that) / 12; break;
  30449. case 'month': output = monthDiff(this, that); break;
  30450. case 'quarter': output = monthDiff(this, that) / 3; break;
  30451. case 'second': output = (this - that) / 1e3; break; // 1000
  30452. case 'minute': output = (this - that) / 6e4; break; // 1000 * 60
  30453. case 'hour': output = (this - that) / 36e5; break; // 1000 * 60 * 60
  30454. case 'day': output = (this - that - zoneDelta) / 864e5; break; // 1000 * 60 * 60 * 24, negate dst
  30455. case 'week': output = (this - that - zoneDelta) / 6048e5; break; // 1000 * 60 * 60 * 24 * 7, negate dst
  30456. default: output = this - that;
  30457. }
  30458. return asFloat ? output : absFloor(output);
  30459. }
  30460. function monthDiff (a, b) {
  30461. // difference in months
  30462. var wholeMonthDiff = ((b.year() - a.year()) * 12) + (b.month() - a.month()),
  30463. // b is in (anchor - 1 month, anchor + 1 month)
  30464. anchor = a.clone().add(wholeMonthDiff, 'months'),
  30465. anchor2, adjust;
  30466. if (b - anchor < 0) {
  30467. anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');
  30468. // linear across the month
  30469. adjust = (b - anchor) / (anchor - anchor2);
  30470. } else {
  30471. anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');
  30472. // linear across the month
  30473. adjust = (b - anchor) / (anchor2 - anchor);
  30474. }
  30475. //check for negative zero, return zero if negative zero
  30476. return -(wholeMonthDiff + adjust) || 0;
  30477. }
  30478. hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';
  30479. hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';
  30480. function toString () {
  30481. return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');
  30482. }
  30483. function toISOString(keepOffset) {
  30484. if (!this.isValid()) {
  30485. return null;
  30486. }
  30487. var utc = keepOffset !== true;
  30488. var m = utc ? this.clone().utc() : this;
  30489. if (m.year() < 0 || m.year() > 9999) {
  30490. return formatMoment(m, utc ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ');
  30491. }
  30492. if (isFunction(Date.prototype.toISOString)) {
  30493. // native implementation is ~50x faster, use it when we can
  30494. if (utc) {
  30495. return this.toDate().toISOString();
  30496. } else {
  30497. return new Date(this.valueOf() + this.utcOffset() * 60 * 1000).toISOString().replace('Z', formatMoment(m, 'Z'));
  30498. }
  30499. }
  30500. return formatMoment(m, utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ');
  30501. }
  30502. /**
  30503. * Return a human readable representation of a moment that can
  30504. * also be evaluated to get a new moment which is the same
  30505. *
  30506. * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects
  30507. */
  30508. function inspect () {
  30509. if (!this.isValid()) {
  30510. return 'moment.invalid(/* ' + this._i + ' */)';
  30511. }
  30512. var func = 'moment';
  30513. var zone = '';
  30514. if (!this.isLocal()) {
  30515. func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';
  30516. zone = 'Z';
  30517. }
  30518. var prefix = '[' + func + '("]';
  30519. var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';
  30520. var datetime = '-MM-DD[T]HH:mm:ss.SSS';
  30521. var suffix = zone + '[")]';
  30522. return this.format(prefix + year + datetime + suffix);
  30523. }
  30524. function format (inputString) {
  30525. if (!inputString) {
  30526. inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat;
  30527. }
  30528. var output = formatMoment(this, inputString);
  30529. return this.localeData().postformat(output);
  30530. }
  30531. function from (time, withoutSuffix) {
  30532. if (this.isValid() &&
  30533. ((isMoment(time) && time.isValid()) ||
  30534. createLocal(time).isValid())) {
  30535. return createDuration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix);
  30536. } else {
  30537. return this.localeData().invalidDate();
  30538. }
  30539. }
  30540. function fromNow (withoutSuffix) {
  30541. return this.from(createLocal(), withoutSuffix);
  30542. }
  30543. function to (time, withoutSuffix) {
  30544. if (this.isValid() &&
  30545. ((isMoment(time) && time.isValid()) ||
  30546. createLocal(time).isValid())) {
  30547. return createDuration({from: this, to: time}).locale(this.locale()).humanize(!withoutSuffix);
  30548. } else {
  30549. return this.localeData().invalidDate();
  30550. }
  30551. }
  30552. function toNow (withoutSuffix) {
  30553. return this.to(createLocal(), withoutSuffix);
  30554. }
  30555. // If passed a locale key, it will set the locale for this
  30556. // instance. Otherwise, it will return the locale configuration
  30557. // variables for this instance.
  30558. function locale (key) {
  30559. var newLocaleData;
  30560. if (key === undefined) {
  30561. return this._locale._abbr;
  30562. } else {
  30563. newLocaleData = getLocale(key);
  30564. if (newLocaleData != null) {
  30565. this._locale = newLocaleData;
  30566. }
  30567. return this;
  30568. }
  30569. }
  30570. var lang = deprecate(
  30571. 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',
  30572. function (key) {
  30573. if (key === undefined) {
  30574. return this.localeData();
  30575. } else {
  30576. return this.locale(key);
  30577. }
  30578. }
  30579. );
  30580. function localeData () {
  30581. return this._locale;
  30582. }
  30583. function startOf (units) {
  30584. units = normalizeUnits(units);
  30585. // the following switch intentionally omits break keywords
  30586. // to utilize falling through the cases.
  30587. switch (units) {
  30588. case 'year':
  30589. this.month(0);
  30590. /* falls through */
  30591. case 'quarter':
  30592. case 'month':
  30593. this.date(1);
  30594. /* falls through */
  30595. case 'week':
  30596. case 'isoWeek':
  30597. case 'day':
  30598. case 'date':
  30599. this.hours(0);
  30600. /* falls through */
  30601. case 'hour':
  30602. this.minutes(0);
  30603. /* falls through */
  30604. case 'minute':
  30605. this.seconds(0);
  30606. /* falls through */
  30607. case 'second':
  30608. this.milliseconds(0);
  30609. }
  30610. // weeks are a special case
  30611. if (units === 'week') {
  30612. this.weekday(0);
  30613. }
  30614. if (units === 'isoWeek') {
  30615. this.isoWeekday(1);
  30616. }
  30617. // quarters are also special
  30618. if (units === 'quarter') {
  30619. this.month(Math.floor(this.month() / 3) * 3);
  30620. }
  30621. return this;
  30622. }
  30623. function endOf (units) {
  30624. units = normalizeUnits(units);
  30625. if (units === undefined || units === 'millisecond') {
  30626. return this;
  30627. }
  30628. // 'date' is an alias for 'day', so it should be considered as such.
  30629. if (units === 'date') {
  30630. units = 'day';
  30631. }
  30632. return this.startOf(units).add(1, (units === 'isoWeek' ? 'week' : units)).subtract(1, 'ms');
  30633. }
  30634. function valueOf () {
  30635. return this._d.valueOf() - ((this._offset || 0) * 60000);
  30636. }
  30637. function unix () {
  30638. return Math.floor(this.valueOf() / 1000);
  30639. }
  30640. function toDate () {
  30641. return new Date(this.valueOf());
  30642. }
  30643. function toArray () {
  30644. var m = this;
  30645. return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()];
  30646. }
  30647. function toObject () {
  30648. var m = this;
  30649. return {
  30650. years: m.year(),
  30651. months: m.month(),
  30652. date: m.date(),
  30653. hours: m.hours(),
  30654. minutes: m.minutes(),
  30655. seconds: m.seconds(),
  30656. milliseconds: m.milliseconds()
  30657. };
  30658. }
  30659. function toJSON () {
  30660. // new Date(NaN).toJSON() === null
  30661. return this.isValid() ? this.toISOString() : null;
  30662. }
  30663. function isValid$2 () {
  30664. return isValid(this);
  30665. }
  30666. function parsingFlags () {
  30667. return extend({}, getParsingFlags(this));
  30668. }
  30669. function invalidAt () {
  30670. return getParsingFlags(this).overflow;
  30671. }
  30672. function creationData() {
  30673. return {
  30674. input: this._i,
  30675. format: this._f,
  30676. locale: this._locale,
  30677. isUTC: this._isUTC,
  30678. strict: this._strict
  30679. };
  30680. }
  30681. // FORMATTING
  30682. addFormatToken(0, ['gg', 2], 0, function () {
  30683. return this.weekYear() % 100;
  30684. });
  30685. addFormatToken(0, ['GG', 2], 0, function () {
  30686. return this.isoWeekYear() % 100;
  30687. });
  30688. function addWeekYearFormatToken (token, getter) {
  30689. addFormatToken(0, [token, token.length], 0, getter);
  30690. }
  30691. addWeekYearFormatToken('gggg', 'weekYear');
  30692. addWeekYearFormatToken('ggggg', 'weekYear');
  30693. addWeekYearFormatToken('GGGG', 'isoWeekYear');
  30694. addWeekYearFormatToken('GGGGG', 'isoWeekYear');
  30695. // ALIASES
  30696. addUnitAlias('weekYear', 'gg');
  30697. addUnitAlias('isoWeekYear', 'GG');
  30698. // PRIORITY
  30699. addUnitPriority('weekYear', 1);
  30700. addUnitPriority('isoWeekYear', 1);
  30701. // PARSING
  30702. addRegexToken('G', matchSigned);
  30703. addRegexToken('g', matchSigned);
  30704. addRegexToken('GG', match1to2, match2);
  30705. addRegexToken('gg', match1to2, match2);
  30706. addRegexToken('GGGG', match1to4, match4);
  30707. addRegexToken('gggg', match1to4, match4);
  30708. addRegexToken('GGGGG', match1to6, match6);
  30709. addRegexToken('ggggg', match1to6, match6);
  30710. addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) {
  30711. week[token.substr(0, 2)] = toInt(input);
  30712. });
  30713. addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {
  30714. week[token] = hooks.parseTwoDigitYear(input);
  30715. });
  30716. // MOMENTS
  30717. function getSetWeekYear (input) {
  30718. return getSetWeekYearHelper.call(this,
  30719. input,
  30720. this.week(),
  30721. this.weekday(),
  30722. this.localeData()._week.dow,
  30723. this.localeData()._week.doy);
  30724. }
  30725. function getSetISOWeekYear (input) {
  30726. return getSetWeekYearHelper.call(this,
  30727. input, this.isoWeek(), this.isoWeekday(), 1, 4);
  30728. }
  30729. function getISOWeeksInYear () {
  30730. return weeksInYear(this.year(), 1, 4);
  30731. }
  30732. function getWeeksInYear () {
  30733. var weekInfo = this.localeData()._week;
  30734. return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);
  30735. }
  30736. function getSetWeekYearHelper(input, week, weekday, dow, doy) {
  30737. var weeksTarget;
  30738. if (input == null) {
  30739. return weekOfYear(this, dow, doy).year;
  30740. } else {
  30741. weeksTarget = weeksInYear(input, dow, doy);
  30742. if (week > weeksTarget) {
  30743. week = weeksTarget;
  30744. }
  30745. return setWeekAll.call(this, input, week, weekday, dow, doy);
  30746. }
  30747. }
  30748. function setWeekAll(weekYear, week, weekday, dow, doy) {
  30749. var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),
  30750. date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);
  30751. this.year(date.getUTCFullYear());
  30752. this.month(date.getUTCMonth());
  30753. this.date(date.getUTCDate());
  30754. return this;
  30755. }
  30756. // FORMATTING
  30757. addFormatToken('Q', 0, 'Qo', 'quarter');
  30758. // ALIASES
  30759. addUnitAlias('quarter', 'Q');
  30760. // PRIORITY
  30761. addUnitPriority('quarter', 7);
  30762. // PARSING
  30763. addRegexToken('Q', match1);
  30764. addParseToken('Q', function (input, array) {
  30765. array[MONTH] = (toInt(input) - 1) * 3;
  30766. });
  30767. // MOMENTS
  30768. function getSetQuarter (input) {
  30769. return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3);
  30770. }
  30771. // FORMATTING
  30772. addFormatToken('D', ['DD', 2], 'Do', 'date');
  30773. // ALIASES
  30774. addUnitAlias('date', 'D');
  30775. // PRIORITY
  30776. addUnitPriority('date', 9);
  30777. // PARSING
  30778. addRegexToken('D', match1to2);
  30779. addRegexToken('DD', match1to2, match2);
  30780. addRegexToken('Do', function (isStrict, locale) {
  30781. // TODO: Remove "ordinalParse" fallback in next major release.
  30782. return isStrict ?
  30783. (locale._dayOfMonthOrdinalParse || locale._ordinalParse) :
  30784. locale._dayOfMonthOrdinalParseLenient;
  30785. });
  30786. addParseToken(['D', 'DD'], DATE);
  30787. addParseToken('Do', function (input, array) {
  30788. array[DATE] = toInt(input.match(match1to2)[0]);
  30789. });
  30790. // MOMENTS
  30791. var getSetDayOfMonth = makeGetSet('Date', true);
  30792. // FORMATTING
  30793. addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');
  30794. // ALIASES
  30795. addUnitAlias('dayOfYear', 'DDD');
  30796. // PRIORITY
  30797. addUnitPriority('dayOfYear', 4);
  30798. // PARSING
  30799. addRegexToken('DDD', match1to3);
  30800. addRegexToken('DDDD', match3);
  30801. addParseToken(['DDD', 'DDDD'], function (input, array, config) {
  30802. config._dayOfYear = toInt(input);
  30803. });
  30804. // HELPERS
  30805. // MOMENTS
  30806. function getSetDayOfYear (input) {
  30807. var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1;
  30808. return input == null ? dayOfYear : this.add((input - dayOfYear), 'd');
  30809. }
  30810. // FORMATTING
  30811. addFormatToken('m', ['mm', 2], 0, 'minute');
  30812. // ALIASES
  30813. addUnitAlias('minute', 'm');
  30814. // PRIORITY
  30815. addUnitPriority('minute', 14);
  30816. // PARSING
  30817. addRegexToken('m', match1to2);
  30818. addRegexToken('mm', match1to2, match2);
  30819. addParseToken(['m', 'mm'], MINUTE);
  30820. // MOMENTS
  30821. var getSetMinute = makeGetSet('Minutes', false);
  30822. // FORMATTING
  30823. addFormatToken('s', ['ss', 2], 0, 'second');
  30824. // ALIASES
  30825. addUnitAlias('second', 's');
  30826. // PRIORITY
  30827. addUnitPriority('second', 15);
  30828. // PARSING
  30829. addRegexToken('s', match1to2);
  30830. addRegexToken('ss', match1to2, match2);
  30831. addParseToken(['s', 'ss'], SECOND);
  30832. // MOMENTS
  30833. var getSetSecond = makeGetSet('Seconds', false);
  30834. // FORMATTING
  30835. addFormatToken('S', 0, 0, function () {
  30836. return ~~(this.millisecond() / 100);
  30837. });
  30838. addFormatToken(0, ['SS', 2], 0, function () {
  30839. return ~~(this.millisecond() / 10);
  30840. });
  30841. addFormatToken(0, ['SSS', 3], 0, 'millisecond');
  30842. addFormatToken(0, ['SSSS', 4], 0, function () {
  30843. return this.millisecond() * 10;
  30844. });
  30845. addFormatToken(0, ['SSSSS', 5], 0, function () {
  30846. return this.millisecond() * 100;
  30847. });
  30848. addFormatToken(0, ['SSSSSS', 6], 0, function () {
  30849. return this.millisecond() * 1000;
  30850. });
  30851. addFormatToken(0, ['SSSSSSS', 7], 0, function () {
  30852. return this.millisecond() * 10000;
  30853. });
  30854. addFormatToken(0, ['SSSSSSSS', 8], 0, function () {
  30855. return this.millisecond() * 100000;
  30856. });
  30857. addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {
  30858. return this.millisecond() * 1000000;
  30859. });
  30860. // ALIASES
  30861. addUnitAlias('millisecond', 'ms');
  30862. // PRIORITY
  30863. addUnitPriority('millisecond', 16);
  30864. // PARSING
  30865. addRegexToken('S', match1to3, match1);
  30866. addRegexToken('SS', match1to3, match2);
  30867. addRegexToken('SSS', match1to3, match3);
  30868. var token;
  30869. for (token = 'SSSS'; token.length <= 9; token += 'S') {
  30870. addRegexToken(token, matchUnsigned);
  30871. }
  30872. function parseMs(input, array) {
  30873. array[MILLISECOND] = toInt(('0.' + input) * 1000);
  30874. }
  30875. for (token = 'S'; token.length <= 9; token += 'S') {
  30876. addParseToken(token, parseMs);
  30877. }
  30878. // MOMENTS
  30879. var getSetMillisecond = makeGetSet('Milliseconds', false);
  30880. // FORMATTING
  30881. addFormatToken('z', 0, 0, 'zoneAbbr');
  30882. addFormatToken('zz', 0, 0, 'zoneName');
  30883. // MOMENTS
  30884. function getZoneAbbr () {
  30885. return this._isUTC ? 'UTC' : '';
  30886. }
  30887. function getZoneName () {
  30888. return this._isUTC ? 'Coordinated Universal Time' : '';
  30889. }
  30890. var proto = Moment.prototype;
  30891. proto.add = add;
  30892. proto.calendar = calendar$1;
  30893. proto.clone = clone;
  30894. proto.diff = diff;
  30895. proto.endOf = endOf;
  30896. proto.format = format;
  30897. proto.from = from;
  30898. proto.fromNow = fromNow;
  30899. proto.to = to;
  30900. proto.toNow = toNow;
  30901. proto.get = stringGet;
  30902. proto.invalidAt = invalidAt;
  30903. proto.isAfter = isAfter;
  30904. proto.isBefore = isBefore;
  30905. proto.isBetween = isBetween;
  30906. proto.isSame = isSame;
  30907. proto.isSameOrAfter = isSameOrAfter;
  30908. proto.isSameOrBefore = isSameOrBefore;
  30909. proto.isValid = isValid$2;
  30910. proto.lang = lang;
  30911. proto.locale = locale;
  30912. proto.localeData = localeData;
  30913. proto.max = prototypeMax;
  30914. proto.min = prototypeMin;
  30915. proto.parsingFlags = parsingFlags;
  30916. proto.set = stringSet;
  30917. proto.startOf = startOf;
  30918. proto.subtract = subtract;
  30919. proto.toArray = toArray;
  30920. proto.toObject = toObject;
  30921. proto.toDate = toDate;
  30922. proto.toISOString = toISOString;
  30923. proto.inspect = inspect;
  30924. proto.toJSON = toJSON;
  30925. proto.toString = toString;
  30926. proto.unix = unix;
  30927. proto.valueOf = valueOf;
  30928. proto.creationData = creationData;
  30929. proto.year = getSetYear;
  30930. proto.isLeapYear = getIsLeapYear;
  30931. proto.weekYear = getSetWeekYear;
  30932. proto.isoWeekYear = getSetISOWeekYear;
  30933. proto.quarter = proto.quarters = getSetQuarter;
  30934. proto.month = getSetMonth;
  30935. proto.daysInMonth = getDaysInMonth;
  30936. proto.week = proto.weeks = getSetWeek;
  30937. proto.isoWeek = proto.isoWeeks = getSetISOWeek;
  30938. proto.weeksInYear = getWeeksInYear;
  30939. proto.isoWeeksInYear = getISOWeeksInYear;
  30940. proto.date = getSetDayOfMonth;
  30941. proto.day = proto.days = getSetDayOfWeek;
  30942. proto.weekday = getSetLocaleDayOfWeek;
  30943. proto.isoWeekday = getSetISODayOfWeek;
  30944. proto.dayOfYear = getSetDayOfYear;
  30945. proto.hour = proto.hours = getSetHour;
  30946. proto.minute = proto.minutes = getSetMinute;
  30947. proto.second = proto.seconds = getSetSecond;
  30948. proto.millisecond = proto.milliseconds = getSetMillisecond;
  30949. proto.utcOffset = getSetOffset;
  30950. proto.utc = setOffsetToUTC;
  30951. proto.local = setOffsetToLocal;
  30952. proto.parseZone = setOffsetToParsedOffset;
  30953. proto.hasAlignedHourOffset = hasAlignedHourOffset;
  30954. proto.isDST = isDaylightSavingTime;
  30955. proto.isLocal = isLocal;
  30956. proto.isUtcOffset = isUtcOffset;
  30957. proto.isUtc = isUtc;
  30958. proto.isUTC = isUtc;
  30959. proto.zoneAbbr = getZoneAbbr;
  30960. proto.zoneName = getZoneName;
  30961. proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth);
  30962. proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth);
  30963. proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear);
  30964. proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', getSetZone);
  30965. proto.isDSTShifted = deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', isDaylightSavingTimeShifted);
  30966. function createUnix (input) {
  30967. return createLocal(input * 1000);
  30968. }
  30969. function createInZone () {
  30970. return createLocal.apply(null, arguments).parseZone();
  30971. }
  30972. function preParsePostFormat (string) {
  30973. return string;
  30974. }
  30975. var proto$1 = Locale.prototype;
  30976. proto$1.calendar = calendar;
  30977. proto$1.longDateFormat = longDateFormat;
  30978. proto$1.invalidDate = invalidDate;
  30979. proto$1.ordinal = ordinal;
  30980. proto$1.preparse = preParsePostFormat;
  30981. proto$1.postformat = preParsePostFormat;
  30982. proto$1.relativeTime = relativeTime;
  30983. proto$1.pastFuture = pastFuture;
  30984. proto$1.set = set;
  30985. proto$1.months = localeMonths;
  30986. proto$1.monthsShort = localeMonthsShort;
  30987. proto$1.monthsParse = localeMonthsParse;
  30988. proto$1.monthsRegex = monthsRegex;
  30989. proto$1.monthsShortRegex = monthsShortRegex;
  30990. proto$1.week = localeWeek;
  30991. proto$1.firstDayOfYear = localeFirstDayOfYear;
  30992. proto$1.firstDayOfWeek = localeFirstDayOfWeek;
  30993. proto$1.weekdays = localeWeekdays;
  30994. proto$1.weekdaysMin = localeWeekdaysMin;
  30995. proto$1.weekdaysShort = localeWeekdaysShort;
  30996. proto$1.weekdaysParse = localeWeekdaysParse;
  30997. proto$1.weekdaysRegex = weekdaysRegex;
  30998. proto$1.weekdaysShortRegex = weekdaysShortRegex;
  30999. proto$1.weekdaysMinRegex = weekdaysMinRegex;
  31000. proto$1.isPM = localeIsPM;
  31001. proto$1.meridiem = localeMeridiem;
  31002. function get$1 (format, index, field, setter) {
  31003. var locale = getLocale();
  31004. var utc = createUTC().set(setter, index);
  31005. return locale[field](utc, format);
  31006. }
  31007. function listMonthsImpl (format, index, field) {
  31008. if (isNumber(format)) {
  31009. index = format;
  31010. format = undefined;
  31011. }
  31012. format = format || '';
  31013. if (index != null) {
  31014. return get$1(format, index, field, 'month');
  31015. }
  31016. var i;
  31017. var out = [];
  31018. for (i = 0; i < 12; i++) {
  31019. out[i] = get$1(format, i, field, 'month');
  31020. }
  31021. return out;
  31022. }
  31023. // ()
  31024. // (5)
  31025. // (fmt, 5)
  31026. // (fmt)
  31027. // (true)
  31028. // (true, 5)
  31029. // (true, fmt, 5)
  31030. // (true, fmt)
  31031. function listWeekdaysImpl (localeSorted, format, index, field) {
  31032. if (typeof localeSorted === 'boolean') {
  31033. if (isNumber(format)) {
  31034. index = format;
  31035. format = undefined;
  31036. }
  31037. format = format || '';
  31038. } else {
  31039. format = localeSorted;
  31040. index = format;
  31041. localeSorted = false;
  31042. if (isNumber(format)) {
  31043. index = format;
  31044. format = undefined;
  31045. }
  31046. format = format || '';
  31047. }
  31048. var locale = getLocale(),
  31049. shift = localeSorted ? locale._week.dow : 0;
  31050. if (index != null) {
  31051. return get$1(format, (index + shift) % 7, field, 'day');
  31052. }
  31053. var i;
  31054. var out = [];
  31055. for (i = 0; i < 7; i++) {
  31056. out[i] = get$1(format, (i + shift) % 7, field, 'day');
  31057. }
  31058. return out;
  31059. }
  31060. function listMonths (format, index) {
  31061. return listMonthsImpl(format, index, 'months');
  31062. }
  31063. function listMonthsShort (format, index) {
  31064. return listMonthsImpl(format, index, 'monthsShort');
  31065. }
  31066. function listWeekdays (localeSorted, format, index) {
  31067. return listWeekdaysImpl(localeSorted, format, index, 'weekdays');
  31068. }
  31069. function listWeekdaysShort (localeSorted, format, index) {
  31070. return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');
  31071. }
  31072. function listWeekdaysMin (localeSorted, format, index) {
  31073. return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');
  31074. }
  31075. getSetGlobalLocale('en', {
  31076. dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
  31077. ordinal : function (number) {
  31078. var b = number % 10,
  31079. output = (toInt(number % 100 / 10) === 1) ? 'th' :
  31080. (b === 1) ? 'st' :
  31081. (b === 2) ? 'nd' :
  31082. (b === 3) ? 'rd' : 'th';
  31083. return number + output;
  31084. }
  31085. });
  31086. // Side effect imports
  31087. hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', getSetGlobalLocale);
  31088. hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', getLocale);
  31089. var mathAbs = Math.abs;
  31090. function abs () {
  31091. var data = this._data;
  31092. this._milliseconds = mathAbs(this._milliseconds);
  31093. this._days = mathAbs(this._days);
  31094. this._months = mathAbs(this._months);
  31095. data.milliseconds = mathAbs(data.milliseconds);
  31096. data.seconds = mathAbs(data.seconds);
  31097. data.minutes = mathAbs(data.minutes);
  31098. data.hours = mathAbs(data.hours);
  31099. data.months = mathAbs(data.months);
  31100. data.years = mathAbs(data.years);
  31101. return this;
  31102. }
  31103. function addSubtract$1 (duration, input, value, direction) {
  31104. var other = createDuration(input, value);
  31105. duration._milliseconds += direction * other._milliseconds;
  31106. duration._days += direction * other._days;
  31107. duration._months += direction * other._months;
  31108. return duration._bubble();
  31109. }
  31110. // supports only 2.0-style add(1, 's') or add(duration)
  31111. function add$1 (input, value) {
  31112. return addSubtract$1(this, input, value, 1);
  31113. }
  31114. // supports only 2.0-style subtract(1, 's') or subtract(duration)
  31115. function subtract$1 (input, value) {
  31116. return addSubtract$1(this, input, value, -1);
  31117. }
  31118. function absCeil (number) {
  31119. if (number < 0) {
  31120. return Math.floor(number);
  31121. } else {
  31122. return Math.ceil(number);
  31123. }
  31124. }
  31125. function bubble () {
  31126. var milliseconds = this._milliseconds;
  31127. var days = this._days;
  31128. var months = this._months;
  31129. var data = this._data;
  31130. var seconds, minutes, hours, years, monthsFromDays;
  31131. // if we have a mix of positive and negative values, bubble down first
  31132. // check: https://github.com/moment/moment/issues/2166
  31133. if (!((milliseconds >= 0 && days >= 0 && months >= 0) ||
  31134. (milliseconds <= 0 && days <= 0 && months <= 0))) {
  31135. milliseconds += absCeil(monthsToDays(months) + days) * 864e5;
  31136. days = 0;
  31137. months = 0;
  31138. }
  31139. // The following code bubbles up values, see the tests for
  31140. // examples of what that means.
  31141. data.milliseconds = milliseconds % 1000;
  31142. seconds = absFloor(milliseconds / 1000);
  31143. data.seconds = seconds % 60;
  31144. minutes = absFloor(seconds / 60);
  31145. data.minutes = minutes % 60;
  31146. hours = absFloor(minutes / 60);
  31147. data.hours = hours % 24;
  31148. days += absFloor(hours / 24);
  31149. // convert days to months
  31150. monthsFromDays = absFloor(daysToMonths(days));
  31151. months += monthsFromDays;
  31152. days -= absCeil(monthsToDays(monthsFromDays));
  31153. // 12 months -> 1 year
  31154. years = absFloor(months / 12);
  31155. months %= 12;
  31156. data.days = days;
  31157. data.months = months;
  31158. data.years = years;
  31159. return this;
  31160. }
  31161. function daysToMonths (days) {
  31162. // 400 years have 146097 days (taking into account leap year rules)
  31163. // 400 years have 12 months === 4800
  31164. return days * 4800 / 146097;
  31165. }
  31166. function monthsToDays (months) {
  31167. // the reverse of daysToMonths
  31168. return months * 146097 / 4800;
  31169. }
  31170. function as (units) {
  31171. if (!this.isValid()) {
  31172. return NaN;
  31173. }
  31174. var days;
  31175. var months;
  31176. var milliseconds = this._milliseconds;
  31177. units = normalizeUnits(units);
  31178. if (units === 'month' || units === 'year') {
  31179. days = this._days + milliseconds / 864e5;
  31180. months = this._months + daysToMonths(days);
  31181. return units === 'month' ? months : months / 12;
  31182. } else {
  31183. // handle milliseconds separately because of floating point math errors (issue #1867)
  31184. days = this._days + Math.round(monthsToDays(this._months));
  31185. switch (units) {
  31186. case 'week' : return days / 7 + milliseconds / 6048e5;
  31187. case 'day' : return days + milliseconds / 864e5;
  31188. case 'hour' : return days * 24 + milliseconds / 36e5;
  31189. case 'minute' : return days * 1440 + milliseconds / 6e4;
  31190. case 'second' : return days * 86400 + milliseconds / 1000;
  31191. // Math.floor prevents floating point math errors here
  31192. case 'millisecond': return Math.floor(days * 864e5) + milliseconds;
  31193. default: throw new Error('Unknown unit ' + units);
  31194. }
  31195. }
  31196. }
  31197. // TODO: Use this.as('ms')?
  31198. function valueOf$1 () {
  31199. if (!this.isValid()) {
  31200. return NaN;
  31201. }
  31202. return (
  31203. this._milliseconds +
  31204. this._days * 864e5 +
  31205. (this._months % 12) * 2592e6 +
  31206. toInt(this._months / 12) * 31536e6
  31207. );
  31208. }
  31209. function makeAs (alias) {
  31210. return function () {
  31211. return this.as(alias);
  31212. };
  31213. }
  31214. var asMilliseconds = makeAs('ms');
  31215. var asSeconds = makeAs('s');
  31216. var asMinutes = makeAs('m');
  31217. var asHours = makeAs('h');
  31218. var asDays = makeAs('d');
  31219. var asWeeks = makeAs('w');
  31220. var asMonths = makeAs('M');
  31221. var asYears = makeAs('y');
  31222. function clone$1 () {
  31223. return createDuration(this);
  31224. }
  31225. function get$2 (units) {
  31226. units = normalizeUnits(units);
  31227. return this.isValid() ? this[units + 's']() : NaN;
  31228. }
  31229. function makeGetter(name) {
  31230. return function () {
  31231. return this.isValid() ? this._data[name] : NaN;
  31232. };
  31233. }
  31234. var milliseconds = makeGetter('milliseconds');
  31235. var seconds = makeGetter('seconds');
  31236. var minutes = makeGetter('minutes');
  31237. var hours = makeGetter('hours');
  31238. var days = makeGetter('days');
  31239. var months = makeGetter('months');
  31240. var years = makeGetter('years');
  31241. function weeks () {
  31242. return absFloor(this.days() / 7);
  31243. }
  31244. var round = Math.round;
  31245. var thresholds = {
  31246. ss: 44, // a few seconds to seconds
  31247. s : 45, // seconds to minute
  31248. m : 45, // minutes to hour
  31249. h : 22, // hours to day
  31250. d : 26, // days to month
  31251. M : 11 // months to year
  31252. };
  31253. // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize
  31254. function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {
  31255. return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);
  31256. }
  31257. function relativeTime$1 (posNegDuration, withoutSuffix, locale) {
  31258. var duration = createDuration(posNegDuration).abs();
  31259. var seconds = round(duration.as('s'));
  31260. var minutes = round(duration.as('m'));
  31261. var hours = round(duration.as('h'));
  31262. var days = round(duration.as('d'));
  31263. var months = round(duration.as('M'));
  31264. var years = round(duration.as('y'));
  31265. var a = seconds <= thresholds.ss && ['s', seconds] ||
  31266. seconds < thresholds.s && ['ss', seconds] ||
  31267. minutes <= 1 && ['m'] ||
  31268. minutes < thresholds.m && ['mm', minutes] ||
  31269. hours <= 1 && ['h'] ||
  31270. hours < thresholds.h && ['hh', hours] ||
  31271. days <= 1 && ['d'] ||
  31272. days < thresholds.d && ['dd', days] ||
  31273. months <= 1 && ['M'] ||
  31274. months < thresholds.M && ['MM', months] ||
  31275. years <= 1 && ['y'] || ['yy', years];
  31276. a[2] = withoutSuffix;
  31277. a[3] = +posNegDuration > 0;
  31278. a[4] = locale;
  31279. return substituteTimeAgo.apply(null, a);
  31280. }
  31281. // This function allows you to set the rounding function for relative time strings
  31282. function getSetRelativeTimeRounding (roundingFunction) {
  31283. if (roundingFunction === undefined) {
  31284. return round;
  31285. }
  31286. if (typeof(roundingFunction) === 'function') {
  31287. round = roundingFunction;
  31288. return true;
  31289. }
  31290. return false;
  31291. }
  31292. // This function allows you to set a threshold for relative time strings
  31293. function getSetRelativeTimeThreshold (threshold, limit) {
  31294. if (thresholds[threshold] === undefined) {
  31295. return false;
  31296. }
  31297. if (limit === undefined) {
  31298. return thresholds[threshold];
  31299. }
  31300. thresholds[threshold] = limit;
  31301. if (threshold === 's') {
  31302. thresholds.ss = limit - 1;
  31303. }
  31304. return true;
  31305. }
  31306. function humanize (withSuffix) {
  31307. if (!this.isValid()) {
  31308. return this.localeData().invalidDate();
  31309. }
  31310. var locale = this.localeData();
  31311. var output = relativeTime$1(this, !withSuffix, locale);
  31312. if (withSuffix) {
  31313. output = locale.pastFuture(+this, output);
  31314. }
  31315. return locale.postformat(output);
  31316. }
  31317. var abs$1 = Math.abs;
  31318. function sign(x) {
  31319. return ((x > 0) - (x < 0)) || +x;
  31320. }
  31321. function toISOString$1() {
  31322. // for ISO strings we do not use the normal bubbling rules:
  31323. // * milliseconds bubble up until they become hours
  31324. // * days do not bubble at all
  31325. // * months bubble up until they become years
  31326. // This is because there is no context-free conversion between hours and days
  31327. // (think of clock changes)
  31328. // and also not between days and months (28-31 days per month)
  31329. if (!this.isValid()) {
  31330. return this.localeData().invalidDate();
  31331. }
  31332. var seconds = abs$1(this._milliseconds) / 1000;
  31333. var days = abs$1(this._days);
  31334. var months = abs$1(this._months);
  31335. var minutes, hours, years;
  31336. // 3600 seconds -> 60 minutes -> 1 hour
  31337. minutes = absFloor(seconds / 60);
  31338. hours = absFloor(minutes / 60);
  31339. seconds %= 60;
  31340. minutes %= 60;
  31341. // 12 months -> 1 year
  31342. years = absFloor(months / 12);
  31343. months %= 12;
  31344. // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js
  31345. var Y = years;
  31346. var M = months;
  31347. var D = days;
  31348. var h = hours;
  31349. var m = minutes;
  31350. var s = seconds ? seconds.toFixed(3).replace(/\.?0+$/, '') : '';
  31351. var total = this.asSeconds();
  31352. if (!total) {
  31353. // this is the same as C#'s (Noda) and python (isodate)...
  31354. // but not other JS (goog.date)
  31355. return 'P0D';
  31356. }
  31357. var totalSign = total < 0 ? '-' : '';
  31358. var ymSign = sign(this._months) !== sign(total) ? '-' : '';
  31359. var daysSign = sign(this._days) !== sign(total) ? '-' : '';
  31360. var hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';
  31361. return totalSign + 'P' +
  31362. (Y ? ymSign + Y + 'Y' : '') +
  31363. (M ? ymSign + M + 'M' : '') +
  31364. (D ? daysSign + D + 'D' : '') +
  31365. ((h || m || s) ? 'T' : '') +
  31366. (h ? hmsSign + h + 'H' : '') +
  31367. (m ? hmsSign + m + 'M' : '') +
  31368. (s ? hmsSign + s + 'S' : '');
  31369. }
  31370. var proto$2 = Duration.prototype;
  31371. proto$2.isValid = isValid$1;
  31372. proto$2.abs = abs;
  31373. proto$2.add = add$1;
  31374. proto$2.subtract = subtract$1;
  31375. proto$2.as = as;
  31376. proto$2.asMilliseconds = asMilliseconds;
  31377. proto$2.asSeconds = asSeconds;
  31378. proto$2.asMinutes = asMinutes;
  31379. proto$2.asHours = asHours;
  31380. proto$2.asDays = asDays;
  31381. proto$2.asWeeks = asWeeks;
  31382. proto$2.asMonths = asMonths;
  31383. proto$2.asYears = asYears;
  31384. proto$2.valueOf = valueOf$1;
  31385. proto$2._bubble = bubble;
  31386. proto$2.clone = clone$1;
  31387. proto$2.get = get$2;
  31388. proto$2.milliseconds = milliseconds;
  31389. proto$2.seconds = seconds;
  31390. proto$2.minutes = minutes;
  31391. proto$2.hours = hours;
  31392. proto$2.days = days;
  31393. proto$2.weeks = weeks;
  31394. proto$2.months = months;
  31395. proto$2.years = years;
  31396. proto$2.humanize = humanize;
  31397. proto$2.toISOString = toISOString$1;
  31398. proto$2.toString = toISOString$1;
  31399. proto$2.toJSON = toISOString$1;
  31400. proto$2.locale = locale;
  31401. proto$2.localeData = localeData;
  31402. proto$2.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', toISOString$1);
  31403. proto$2.lang = lang;
  31404. // Side effect imports
  31405. // FORMATTING
  31406. addFormatToken('X', 0, 0, 'unix');
  31407. addFormatToken('x', 0, 0, 'valueOf');
  31408. // PARSING
  31409. addRegexToken('x', matchSigned);
  31410. addRegexToken('X', matchTimestamp);
  31411. addParseToken('X', function (input, array, config) {
  31412. config._d = new Date(parseFloat(input, 10) * 1000);
  31413. });
  31414. addParseToken('x', function (input, array, config) {
  31415. config._d = new Date(toInt(input));
  31416. });
  31417. // Side effect imports
  31418. hooks.version = '2.22.2';
  31419. setHookCallback(createLocal);
  31420. hooks.fn = proto;
  31421. hooks.min = min;
  31422. hooks.max = max;
  31423. hooks.now = now;
  31424. hooks.utc = createUTC;
  31425. hooks.unix = createUnix;
  31426. hooks.months = listMonths;
  31427. hooks.isDate = isDate;
  31428. hooks.locale = getSetGlobalLocale;
  31429. hooks.invalid = createInvalid;
  31430. hooks.duration = createDuration;
  31431. hooks.isMoment = isMoment;
  31432. hooks.weekdays = listWeekdays;
  31433. hooks.parseZone = createInZone;
  31434. hooks.localeData = getLocale;
  31435. hooks.isDuration = isDuration;
  31436. hooks.monthsShort = listMonthsShort;
  31437. hooks.weekdaysMin = listWeekdaysMin;
  31438. hooks.defineLocale = defineLocale;
  31439. hooks.updateLocale = updateLocale;
  31440. hooks.locales = listLocales;
  31441. hooks.weekdaysShort = listWeekdaysShort;
  31442. hooks.normalizeUnits = normalizeUnits;
  31443. hooks.relativeTimeRounding = getSetRelativeTimeRounding;
  31444. hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;
  31445. hooks.calendarFormat = getCalendarFormat;
  31446. hooks.prototype = proto;
  31447. // currently HTML5 input type only supports 24-hour formats
  31448. hooks.HTML5_FMT = {
  31449. DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // <input type="datetime-local" />
  31450. DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // <input type="datetime-local" step="1" />
  31451. DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // <input type="datetime-local" step="0.001" />
  31452. DATE: 'YYYY-MM-DD', // <input type="date" />
  31453. TIME: 'HH:mm', // <input type="time" />
  31454. TIME_SECONDS: 'HH:mm:ss', // <input type="time" step="1" />
  31455. TIME_MS: 'HH:mm:ss.SSS', // <input type="time" step="0.001" />
  31456. WEEK: 'YYYY-[W]WW', // <input type="week" />
  31457. MONTH: 'YYYY-MM' // <input type="month" />
  31458. };
  31459. return hooks;
  31460. })));
  31461. //! moment-timezone.js
  31462. //! version : 0.5.21
  31463. //! Copyright (c) JS Foundation and other contributors
  31464. //! license : MIT
  31465. //! github.com/moment/moment-timezone
  31466. (function (root, factory) {
  31467. "use strict";
  31468. /*global define*/
  31469. if (typeof module === 'object' && module.exports) {
  31470. module.exports = factory(require('moment')); // Node
  31471. } else if (typeof define === 'function' && define.amd) {
  31472. define(['moment'], factory); // AMD
  31473. } else {
  31474. factory(root.moment); // Browser
  31475. }
  31476. }(this, function (moment) {
  31477. "use strict";
  31478. // Do not load moment-timezone a second time.
  31479. // if (moment.tz !== undefined) {
  31480. // logError('Moment Timezone ' + moment.tz.version + ' was already loaded ' + (moment.tz.dataVersion ? 'with data from ' : 'without any data') + moment.tz.dataVersion);
  31481. // return moment;
  31482. // }
  31483. var VERSION = "0.5.21",
  31484. zones = {},
  31485. links = {},
  31486. names = {},
  31487. guesses = {},
  31488. cachedGuess;
  31489. if (!moment || typeof moment.version !== 'string') {
  31490. logError('Moment Timezone requires Moment.js. See https://momentjs.com/timezone/docs/#/use-it/browser/');
  31491. }
  31492. var momentVersion = moment.version.split('.'),
  31493. major = +momentVersion[0],
  31494. minor = +momentVersion[1];
  31495. // Moment.js version check
  31496. if (major < 2 || (major === 2 && minor < 6)) {
  31497. logError('Moment Timezone requires Moment.js >= 2.6.0. You are using Moment.js ' + moment.version + '. See momentjs.com');
  31498. }
  31499. /************************************
  31500. Unpacking
  31501. ************************************/
  31502. function charCodeToInt(charCode) {
  31503. if (charCode > 96) {
  31504. return charCode - 87;
  31505. } else if (charCode > 64) {
  31506. return charCode - 29;
  31507. }
  31508. return charCode - 48;
  31509. }
  31510. function unpackBase60(string) {
  31511. var i = 0,
  31512. parts = string.split('.'),
  31513. whole = parts[0],
  31514. fractional = parts[1] || '',
  31515. multiplier = 1,
  31516. num,
  31517. out = 0,
  31518. sign = 1;
  31519. // handle negative numbers
  31520. if (string.charCodeAt(0) === 45) {
  31521. i = 1;
  31522. sign = -1;
  31523. }
  31524. // handle digits before the decimal
  31525. for (i; i < whole.length; i++) {
  31526. num = charCodeToInt(whole.charCodeAt(i));
  31527. out = 60 * out + num;
  31528. }
  31529. // handle digits after the decimal
  31530. for (i = 0; i < fractional.length; i++) {
  31531. multiplier = multiplier / 60;
  31532. num = charCodeToInt(fractional.charCodeAt(i));
  31533. out += num * multiplier;
  31534. }
  31535. return out * sign;
  31536. }
  31537. function arrayToInt (array) {
  31538. for (var i = 0; i < array.length; i++) {
  31539. array[i] = unpackBase60(array[i]);
  31540. }
  31541. }
  31542. function intToUntil (array, length) {
  31543. for (var i = 0; i < length; i++) {
  31544. array[i] = Math.round((array[i - 1] || 0) + (array[i] * 60000)); // minutes to milliseconds
  31545. }
  31546. array[length - 1] = Infinity;
  31547. }
  31548. function mapIndices (source, indices) {
  31549. var out = [], i;
  31550. for (i = 0; i < indices.length; i++) {
  31551. out[i] = source[indices[i]];
  31552. }
  31553. return out;
  31554. }
  31555. function unpack (string) {
  31556. var data = string.split('|'),
  31557. offsets = data[2].split(' '),
  31558. indices = data[3].split(''),
  31559. untils = data[4].split(' ');
  31560. arrayToInt(offsets);
  31561. arrayToInt(indices);
  31562. arrayToInt(untils);
  31563. intToUntil(untils, indices.length);
  31564. return {
  31565. name : data[0],
  31566. abbrs : mapIndices(data[1].split(' '), indices),
  31567. offsets : mapIndices(offsets, indices),
  31568. untils : untils,
  31569. population : data[5] | 0
  31570. };
  31571. }
  31572. /************************************
  31573. Zone object
  31574. ************************************/
  31575. function Zone (packedString) {
  31576. if (packedString) {
  31577. this._set(unpack(packedString));
  31578. }
  31579. }
  31580. Zone.prototype = {
  31581. _set : function (unpacked) {
  31582. this.name = unpacked.name;
  31583. this.abbrs = unpacked.abbrs;
  31584. this.untils = unpacked.untils;
  31585. this.offsets = unpacked.offsets;
  31586. this.population = unpacked.population;
  31587. },
  31588. _index : function (timestamp) {
  31589. var target = +timestamp,
  31590. untils = this.untils,
  31591. i;
  31592. for (i = 0; i < untils.length; i++) {
  31593. if (target < untils[i]) {
  31594. return i;
  31595. }
  31596. }
  31597. },
  31598. parse : function (timestamp) {
  31599. var target = +timestamp,
  31600. offsets = this.offsets,
  31601. untils = this.untils,
  31602. max = untils.length - 1,
  31603. offset, offsetNext, offsetPrev, i;
  31604. for (i = 0; i < max; i++) {
  31605. offset = offsets[i];
  31606. offsetNext = offsets[i + 1];
  31607. offsetPrev = offsets[i ? i - 1 : i];
  31608. if (offset < offsetNext && tz.moveAmbiguousForward) {
  31609. offset = offsetNext;
  31610. } else if (offset > offsetPrev && tz.moveInvalidForward) {
  31611. offset = offsetPrev;
  31612. }
  31613. if (target < untils[i] - (offset * 60000)) {
  31614. return offsets[i];
  31615. }
  31616. }
  31617. return offsets[max];
  31618. },
  31619. abbr : function (mom) {
  31620. return this.abbrs[this._index(mom)];
  31621. },
  31622. offset : function (mom) {
  31623. logError("zone.offset has been deprecated in favor of zone.utcOffset");
  31624. return this.offsets[this._index(mom)];
  31625. },
  31626. utcOffset : function (mom) {
  31627. return this.offsets[this._index(mom)];
  31628. }
  31629. };
  31630. /************************************
  31631. Current Timezone
  31632. ************************************/
  31633. function OffsetAt(at) {
  31634. var timeString = at.toTimeString();
  31635. var abbr = timeString.match(/\([a-z ]+\)/i);
  31636. if (abbr && abbr[0]) {
  31637. // 17:56:31 GMT-0600 (CST)
  31638. // 17:56:31 GMT-0600 (Central Standard Time)
  31639. abbr = abbr[0].match(/[A-Z]/g);
  31640. abbr = abbr ? abbr.join('') : undefined;
  31641. } else {
  31642. // 17:56:31 CST
  31643. // 17:56:31 GMT+0800 (台北標準時間)
  31644. abbr = timeString.match(/[A-Z]{3,5}/g);
  31645. abbr = abbr ? abbr[0] : undefined;
  31646. }
  31647. if (abbr === 'GMT') {
  31648. abbr = undefined;
  31649. }
  31650. this.at = +at;
  31651. this.abbr = abbr;
  31652. this.offset = at.getTimezoneOffset();
  31653. }
  31654. function ZoneScore(zone) {
  31655. this.zone = zone;
  31656. this.offsetScore = 0;
  31657. this.abbrScore = 0;
  31658. }
  31659. ZoneScore.prototype.scoreOffsetAt = function (offsetAt) {
  31660. this.offsetScore += Math.abs(this.zone.utcOffset(offsetAt.at) - offsetAt.offset);
  31661. if (this.zone.abbr(offsetAt.at).replace(/[^A-Z]/g, '') !== offsetAt.abbr) {
  31662. this.abbrScore++;
  31663. }
  31664. };
  31665. function findChange(low, high) {
  31666. var mid, diff;
  31667. while ((diff = ((high.at - low.at) / 12e4 | 0) * 6e4)) {
  31668. mid = new OffsetAt(new Date(low.at + diff));
  31669. if (mid.offset === low.offset) {
  31670. low = mid;
  31671. } else {
  31672. high = mid;
  31673. }
  31674. }
  31675. return low;
  31676. }
  31677. function userOffsets() {
  31678. var startYear = new Date().getFullYear() - 2,
  31679. last = new OffsetAt(new Date(startYear, 0, 1)),
  31680. offsets = [last],
  31681. change, next, i;
  31682. for (i = 1; i < 48; i++) {
  31683. next = new OffsetAt(new Date(startYear, i, 1));
  31684. if (next.offset !== last.offset) {
  31685. change = findChange(last, next);
  31686. offsets.push(change);
  31687. offsets.push(new OffsetAt(new Date(change.at + 6e4)));
  31688. }
  31689. last = next;
  31690. }
  31691. for (i = 0; i < 4; i++) {
  31692. offsets.push(new OffsetAt(new Date(startYear + i, 0, 1)));
  31693. offsets.push(new OffsetAt(new Date(startYear + i, 6, 1)));
  31694. }
  31695. return offsets;
  31696. }
  31697. function sortZoneScores (a, b) {
  31698. if (a.offsetScore !== b.offsetScore) {
  31699. return a.offsetScore - b.offsetScore;
  31700. }
  31701. if (a.abbrScore !== b.abbrScore) {
  31702. return a.abbrScore - b.abbrScore;
  31703. }
  31704. return b.zone.population - a.zone.population;
  31705. }
  31706. function addToGuesses (name, offsets) {
  31707. var i, offset;
  31708. arrayToInt(offsets);
  31709. for (i = 0; i < offsets.length; i++) {
  31710. offset = offsets[i];
  31711. guesses[offset] = guesses[offset] || {};
  31712. guesses[offset][name] = true;
  31713. }
  31714. }
  31715. function guessesForUserOffsets (offsets) {
  31716. var offsetsLength = offsets.length,
  31717. filteredGuesses = {},
  31718. out = [],
  31719. i, j, guessesOffset;
  31720. for (i = 0; i < offsetsLength; i++) {
  31721. guessesOffset = guesses[offsets[i].offset] || {};
  31722. for (j in guessesOffset) {
  31723. if (guessesOffset.hasOwnProperty(j)) {
  31724. filteredGuesses[j] = true;
  31725. }
  31726. }
  31727. }
  31728. for (i in filteredGuesses) {
  31729. if (filteredGuesses.hasOwnProperty(i)) {
  31730. out.push(names[i]);
  31731. }
  31732. }
  31733. return out;
  31734. }
  31735. function rebuildGuess () {
  31736. // use Intl API when available and returning valid time zone
  31737. try {
  31738. var intlName = Intl.DateTimeFormat().resolvedOptions().timeZone;
  31739. if (intlName && intlName.length > 3) {
  31740. var name = names[normalizeName(intlName)];
  31741. if (name) {
  31742. return name;
  31743. }
  31744. logError("Moment Timezone found " + intlName + " from the Intl api, but did not have that data loaded.");
  31745. }
  31746. } catch (e) {
  31747. // Intl unavailable, fall back to manual guessing.
  31748. }
  31749. var offsets = userOffsets(),
  31750. offsetsLength = offsets.length,
  31751. guesses = guessesForUserOffsets(offsets),
  31752. zoneScores = [],
  31753. zoneScore, i, j;
  31754. for (i = 0; i < guesses.length; i++) {
  31755. zoneScore = new ZoneScore(getZone(guesses[i]), offsetsLength);
  31756. for (j = 0; j < offsetsLength; j++) {
  31757. zoneScore.scoreOffsetAt(offsets[j]);
  31758. }
  31759. zoneScores.push(zoneScore);
  31760. }
  31761. zoneScores.sort(sortZoneScores);
  31762. return zoneScores.length > 0 ? zoneScores[0].zone.name : undefined;
  31763. }
  31764. function guess (ignoreCache) {
  31765. if (!cachedGuess || ignoreCache) {
  31766. cachedGuess = rebuildGuess();
  31767. }
  31768. return cachedGuess;
  31769. }
  31770. /************************************
  31771. Global Methods
  31772. ************************************/
  31773. function normalizeName (name) {
  31774. return (name || '').toLowerCase().replace(/\//g, '_');
  31775. }
  31776. function addZone (packed) {
  31777. var i, name, split, normalized;
  31778. if (typeof packed === "string") {
  31779. packed = [packed];
  31780. }
  31781. for (i = 0; i < packed.length; i++) {
  31782. split = packed[i].split('|');
  31783. name = split[0];
  31784. normalized = normalizeName(name);
  31785. zones[normalized] = packed[i];
  31786. names[normalized] = name;
  31787. addToGuesses(normalized, split[2].split(' '));
  31788. }
  31789. }
  31790. function getZone (name, caller) {
  31791. name = normalizeName(name);
  31792. var zone = zones[name];
  31793. var link;
  31794. if (zone instanceof Zone) {
  31795. return zone;
  31796. }
  31797. if (typeof zone === 'string') {
  31798. zone = new Zone(zone);
  31799. zones[name] = zone;
  31800. return zone;
  31801. }
  31802. // Pass getZone to prevent recursion more than 1 level deep
  31803. if (links[name] && caller !== getZone && (link = getZone(links[name], getZone))) {
  31804. zone = zones[name] = new Zone();
  31805. zone._set(link);
  31806. zone.name = names[name];
  31807. return zone;
  31808. }
  31809. return null;
  31810. }
  31811. function getNames () {
  31812. var i, out = [];
  31813. for (i in names) {
  31814. if (names.hasOwnProperty(i) && (zones[i] || zones[links[i]]) && names[i]) {
  31815. out.push(names[i]);
  31816. }
  31817. }
  31818. return out.sort();
  31819. }
  31820. function addLink (aliases) {
  31821. var i, alias, normal0, normal1;
  31822. if (typeof aliases === "string") {
  31823. aliases = [aliases];
  31824. }
  31825. for (i = 0; i < aliases.length; i++) {
  31826. alias = aliases[i].split('|');
  31827. normal0 = normalizeName(alias[0]);
  31828. normal1 = normalizeName(alias[1]);
  31829. links[normal0] = normal1;
  31830. names[normal0] = alias[0];
  31831. links[normal1] = normal0;
  31832. names[normal1] = alias[1];
  31833. }
  31834. }
  31835. function loadData (data) {
  31836. addZone(data.zones);
  31837. addLink(data.links);
  31838. tz.dataVersion = data.version;
  31839. }
  31840. function zoneExists (name) {
  31841. if (!zoneExists.didShowError) {
  31842. zoneExists.didShowError = true;
  31843. logError("moment.tz.zoneExists('" + name + "') has been deprecated in favor of !moment.tz.zone('" + name + "')");
  31844. }
  31845. return !!getZone(name);
  31846. }
  31847. function needsOffset (m) {
  31848. var isUnixTimestamp = (m._f === 'X' || m._f === 'x');
  31849. return !!(m._a && (m._tzm === undefined) && !isUnixTimestamp);
  31850. }
  31851. function logError (message) {
  31852. if (typeof console !== 'undefined' && typeof console.error === 'function') {
  31853. console.error(message);
  31854. }
  31855. }
  31856. /************************************
  31857. moment.tz namespace
  31858. ************************************/
  31859. function tz (input) {
  31860. var args = Array.prototype.slice.call(arguments, 0, -1),
  31861. name = arguments[arguments.length - 1],
  31862. zone = getZone(name),
  31863. out = moment.utc.apply(null, args);
  31864. if (zone && !moment.isMoment(input) && needsOffset(out)) {
  31865. out.add(zone.parse(out), 'minutes');
  31866. }
  31867. out.tz(name);
  31868. return out;
  31869. }
  31870. tz.version = VERSION;
  31871. tz.dataVersion = '';
  31872. tz._zones = zones;
  31873. tz._links = links;
  31874. tz._names = names;
  31875. tz.add = addZone;
  31876. tz.link = addLink;
  31877. tz.load = loadData;
  31878. tz.zone = getZone;
  31879. tz.zoneExists = zoneExists; // deprecated in 0.1.0
  31880. tz.guess = guess;
  31881. tz.names = getNames;
  31882. tz.Zone = Zone;
  31883. tz.unpack = unpack;
  31884. tz.unpackBase60 = unpackBase60;
  31885. tz.needsOffset = needsOffset;
  31886. tz.moveInvalidForward = true;
  31887. tz.moveAmbiguousForward = false;
  31888. /************************************
  31889. Interface with Moment.js
  31890. ************************************/
  31891. var fn = moment.fn;
  31892. moment.tz = tz;
  31893. moment.defaultZone = null;
  31894. moment.updateOffset = function (mom, keepTime) {
  31895. var zone = moment.defaultZone,
  31896. offset;
  31897. if (mom._z === undefined) {
  31898. if (zone && needsOffset(mom) && !mom._isUTC) {
  31899. mom._d = moment.utc(mom._a)._d;
  31900. mom.utc().add(zone.parse(mom), 'minutes');
  31901. }
  31902. mom._z = zone;
  31903. }
  31904. if (mom._z) {
  31905. offset = mom._z.utcOffset(mom);
  31906. if (Math.abs(offset) < 16) {
  31907. offset = offset / 60;
  31908. }
  31909. if (mom.utcOffset !== undefined) {
  31910. mom.utcOffset(-offset, keepTime);
  31911. } else {
  31912. mom.zone(offset, keepTime);
  31913. }
  31914. }
  31915. };
  31916. fn.tz = function (name, keepTime) {
  31917. if (name) {
  31918. if (typeof name !== 'string') {
  31919. throw new Error('Time zone name must be a string, got ' + name + ' [' + typeof name + ']');
  31920. }
  31921. this._z = getZone(name);
  31922. if (this._z) {
  31923. moment.updateOffset(this, keepTime);
  31924. } else {
  31925. logError("Moment Timezone has no data for " + name + ". See http://momentjs.com/timezone/docs/#/data-loading/.");
  31926. }
  31927. return this;
  31928. }
  31929. if (this._z) { return this._z.name; }
  31930. };
  31931. function abbrWrap (old) {
  31932. return function () {
  31933. if (this._z) { return this._z.abbr(this); }
  31934. return old.call(this);
  31935. };
  31936. }
  31937. function resetZoneWrap (old) {
  31938. return function () {
  31939. this._z = null;
  31940. return old.apply(this, arguments);
  31941. };
  31942. }
  31943. fn.zoneName = abbrWrap(fn.zoneName);
  31944. fn.zoneAbbr = abbrWrap(fn.zoneAbbr);
  31945. fn.utc = resetZoneWrap(fn.utc);
  31946. moment.tz.setDefault = function(name) {
  31947. if (major < 2 || (major === 2 && minor < 9)) {
  31948. logError('Moment Timezone setDefault() requires Moment.js >= 2.9.0. You are using Moment.js ' + moment.version + '.');
  31949. }
  31950. moment.defaultZone = name ? getZone(name) : null;
  31951. return moment;
  31952. };
  31953. // Cloning a moment should include the _z property.
  31954. var momentProperties = moment.momentProperties;
  31955. if (Object.prototype.toString.call(momentProperties) === '[object Array]') {
  31956. // moment 2.8.1+
  31957. momentProperties.push('_z');
  31958. momentProperties.push('_a');
  31959. } else if (momentProperties) {
  31960. // moment 2.7.0
  31961. momentProperties._z = null;
  31962. }
  31963. loadData({
  31964. "version": "2018e",
  31965. "zones": [
  31966. "Africa/Abidjan|LMT GMT|g.8 0|01|-2ldXH.Q|48e5",
  31967. "Africa/Accra|LMT GMT +0020|.Q 0 -k|012121212121212121212121212121212121212121212121|-26BbX.8 6tzX.8 MnE 1BAk MnE 1BAk MnE 1BAk MnE 1C0k MnE 1BAk MnE 1BAk MnE 1BAk MnE 1C0k MnE 1BAk MnE 1BAk MnE 1BAk MnE 1C0k MnE 1BAk MnE 1BAk MnE 1BAk MnE 1C0k MnE 1BAk MnE 1BAk MnE 1BAk MnE 1C0k MnE 1BAk MnE 1BAk MnE|41e5",
  31968. "Africa/Nairobi|LMT EAT +0230 +0245|-2r.g -30 -2u -2J|01231|-1F3Cr.g 3Dzr.g okMu MFXJ|47e5",
  31969. "Africa/Algiers|PMT WET WEST CET CEST|-9.l 0 -10 -10 -20|0121212121212121343431312123431213|-2nco9.l cNb9.l HA0 19A0 1iM0 11c0 1oo0 Wo0 1rc0 QM0 1EM0 UM0 DA0 Imo0 rd0 De0 9Xz0 1fb0 1ap0 16K0 2yo0 mEp0 hwL0 jxA0 11A0 dDd0 17b0 11B0 1cN0 2Dy0 1cN0 1fB0 1cL0|26e5",
  31970. "Africa/Lagos|LMT WAT|-d.A -10|01|-22y0d.A|17e6",
  31971. "Africa/Bissau|LMT -01 GMT|12.k 10 0|012|-2ldX0 2xoo0|39e4",
  31972. "Africa/Maputo|LMT CAT|-2a.k -20|01|-2GJea.k|26e5",
  31973. "Africa/Cairo|EET EEST|-20 -30|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-1bIO0 vb0 1ip0 11z0 1iN0 1nz0 12p0 1pz0 10N0 1pz0 16p0 1jz0 s3d0 Vz0 1oN0 11b0 1oO0 10N0 1pz0 10N0 1pb0 10N0 1pb0 10N0 1pb0 10N0 1pz0 10N0 1pb0 10N0 1pb0 11d0 1oL0 11d0 1pb0 11d0 1oL0 11d0 1oL0 11d0 1oL0 11d0 1pb0 11d0 1oL0 11d0 1oL0 11d0 1oL0 11d0 1pb0 11d0 1oL0 11d0 1oL0 11d0 1oL0 11d0 1pb0 11d0 1oL0 11d0 1WL0 rd0 1Rz0 wp0 1pb0 11d0 1oL0 11d0 1oL0 11d0 1oL0 11d0 1pb0 11d0 1qL0 Xd0 1oL0 11d0 1oL0 11d0 1pb0 11d0 1oL0 11d0 1oL0 11d0 1ny0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 WL0 1qN0 Rb0 1wp0 On0 1zd0 Lz0 1EN0 Fb0 c10 8n0 8Nd0 gL0 e10 mn0|15e6",
  31974. "Africa/Casablanca|LMT WET WEST CET|u.k 0 -10 -10|0121212121212121213121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2gMnt.E 130Lt.E rb0 Dd0 dVb0 b6p0 TX0 EoB0 LL0 gnd0 rz0 43d0 AL0 1Nd0 XX0 1Cp0 pz0 dEp0 4mn0 SyN0 AL0 1Nd0 wn0 1FB0 Db0 1zd0 Lz0 1Nf0 wM0 co0 go0 1o00 s00 dA0 vc0 11A0 A00 e00 y00 11A0 uM0 e00 Dc0 11A0 s00 e00 IM0 WM0 mo0 gM0 LA0 WM0 jA0 e00 Rc0 11A0 e00 e00 U00 11A0 8o0 e00 11A0 11A0 5A0 e00 17c0 1fA0 1a00 1a00 1fA0 17c0 1io0 14o0 1lc0 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1lc0 14o0 1fA0|32e5",
  31975. "Africa/Ceuta|WET WEST CET CEST|0 -10 -10 -20|010101010101010101010232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-25KN0 11z0 drd0 18p0 3HX0 17d0 1fz0 1a10 1io0 1a00 1y7o0 LL0 gnd0 rz0 43d0 AL0 1Nd0 XX0 1Cp0 pz0 dEp0 4VB0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|85e3",
  31976. "Africa/El_Aaiun|LMT -01 WET WEST|Q.M 10 0 -10|01232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-1rDz7.c 1GVA7.c 6L0 AL0 1Nd0 XX0 1Cp0 pz0 1cBB0 AL0 1Nd0 wn0 1FB0 Db0 1zd0 Lz0 1Nf0 wM0 co0 go0 1o00 s00 dA0 vc0 11A0 A00 e00 y00 11A0 uM0 e00 Dc0 11A0 s00 e00 IM0 WM0 mo0 gM0 LA0 WM0 jA0 e00 Rc0 11A0 e00 e00 U00 11A0 8o0 e00 11A0 11A0 5A0 e00 17c0 1fA0 1a00 1a00 1fA0 17c0 1io0 14o0 1lc0 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1lc0 14o0 1fA0|20e4",
  31977. "Africa/Johannesburg|SAST SAST SAST|-1u -20 -30|012121|-2GJdu 1Ajdu 1cL0 1cN0 1cL0|84e5",
  31978. "Africa/Juba|LMT CAT CAST EAT|-26.s -20 -30 -30|01212121212121212121212121212121213|-1yW26.s 1zK06.s 16L0 1iN0 17b0 1jd0 17b0 1ip0 17z0 1i10 17X0 1hB0 18n0 1hd0 19b0 1gp0 19z0 1iN0 17b0 1ip0 17z0 1i10 18n0 1hd0 18L0 1gN0 19b0 1gp0 19z0 1iN0 17z0 1i10 17X0 yGd0",
  31979. "Africa/Khartoum|LMT CAT CAST EAT|-2a.8 -20 -30 -30|012121212121212121212121212121212131|-1yW2a.8 1zK0a.8 16L0 1iN0 17b0 1jd0 17b0 1ip0 17z0 1i10 17X0 1hB0 18n0 1hd0 19b0 1gp0 19z0 1iN0 17b0 1ip0 17z0 1i10 18n0 1hd0 18L0 1gN0 19b0 1gp0 19z0 1iN0 17z0 1i10 17X0 yGd0 HjL0|51e5",
  31980. "Africa/Monrovia|MMT MMT GMT|H.8 I.u 0|012|-23Lzg.Q 28G01.m|11e5",
  31981. "Africa/Ndjamena|LMT WAT WAST|-10.c -10 -20|0121|-2le10.c 2J3c0.c Wn0|13e5",
  31982. "Africa/Sao_Tome|LMT GMT WAT|A.J 0 -10|012|-2le00 4i6N0",
  31983. "Africa/Tripoli|LMT CET CEST EET|-Q.I -10 -20 -20|012121213121212121212121213123123|-21JcQ.I 1hnBQ.I vx0 4iP0 xx0 4eN0 Bb0 7ip0 U0n0 A10 1db0 1cN0 1db0 1dd0 1db0 1eN0 1bb0 1e10 1cL0 1c10 1db0 1dd0 1db0 1cN0 1db0 1q10 fAn0 1ep0 1db0 AKq0 TA0 1o00|11e5",
  31984. "Africa/Tunis|PMT CET CEST|-9.l -10 -20|0121212121212121212121212121212121|-2nco9.l 18pa9.l 1qM0 DA0 3Tc0 11B0 1ze0 WM0 7z0 3d0 14L0 1cN0 1f90 1ar0 16J0 1gXB0 WM0 1rA0 11c0 nwo0 Ko0 1cM0 1cM0 1rA0 10M0 zuM0 10N0 1aN0 1qM0 WM0 1qM0 11A0 1o00|20e5",
  31985. "Africa/Windhoek|+0130 SAST SAST CAT WAT|-1u -20 -30 -20 -10|01213434343434343434343434343434343434343434343434343|-2GJdu 1Ajdu 1cL0 1SqL0 9Io0 16P0 1nX0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0|32e4",
  31986. "America/Adak|NST NWT NPT BST BDT AHST HST HDT|b0 a0 a0 b0 a0 a0 a0 90|012034343434343434343434343434343456767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676|-17SX0 8wW0 iB0 Qlb0 52O0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 cm0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|326",
  31987. "America/Anchorage|AST AWT APT AHST AHDT YST AKST AKDT|a0 90 90 a0 90 90 90 80|012034343434343434343434343434343456767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676|-17T00 8wX0 iA0 Qlb0 52O0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 cm0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|30e4",
  31988. "America/Port_of_Spain|LMT AST|46.4 40|01|-2kNvR.U|43e3",
  31989. "America/Araguaina|LMT -03 -02|3c.M 30 20|0121212121212121212121212121212121212121212121212121|-2glwL.c HdKL.c 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 dMN0 Lz0 1zd0 Rb0 1wN0 Wn0 1tB0 Rb0 1tB0 WL0 1tB0 Rb0 1zd0 On0 1HB0 FX0 ny10 Lz0|14e4",
  31990. "America/Argentina/Buenos_Aires|CMT -04 -03 -02|4g.M 40 30 20|01212121212121212121212121212121212121212123232323232323232|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wp0 Rb0 1wp0 TX0 A4p0 uL0 1qN0 WL0",
  31991. "America/Argentina/Catamarca|CMT -04 -03 -02|4g.M 40 30 20|01212121212121212121212121212121212121212123232323132321232|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wq0 Ra0 1wp0 TX0 rlB0 7B0 8zb0 uL0",
  31992. "America/Argentina/Cordoba|CMT -04 -03 -02|4g.M 40 30 20|01212121212121212121212121212121212121212123232323132323232|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wq0 Ra0 1wp0 TX0 A4p0 uL0 1qN0 WL0",
  31993. "America/Argentina/Jujuy|CMT -04 -03 -02|4g.M 40 30 20|012121212121212121212121212121212121212121232323121323232|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1ze0 TX0 1ld0 WK0 1wp0 TX0 A4p0 uL0",
  31994. "America/Argentina/La_Rioja|CMT -04 -03 -02|4g.M 40 30 20|012121212121212121212121212121212121212121232323231232321232|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Qn0 qO0 16n0 Rb0 1wp0 TX0 rlB0 7B0 8zb0 uL0",
  31995. "America/Argentina/Mendoza|CMT -04 -03 -02|4g.M 40 30 20|01212121212121212121212121212121212121212123232312121321232|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1u20 SL0 1vd0 Tb0 1wp0 TW0 ri10 Op0 7TX0 uL0",
  31996. "America/Argentina/Rio_Gallegos|CMT -04 -03 -02|4g.M 40 30 20|01212121212121212121212121212121212121212123232323232321232|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wp0 Rb0 1wp0 TX0 rlB0 7B0 8zb0 uL0",
  31997. "America/Argentina/Salta|CMT -04 -03 -02|4g.M 40 30 20|012121212121212121212121212121212121212121232323231323232|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wq0 Ra0 1wp0 TX0 A4p0 uL0",
  31998. "America/Argentina/San_Juan|CMT -04 -03 -02|4g.M 40 30 20|012121212121212121212121212121212121212121232323231232321232|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Qn0 qO0 16n0 Rb0 1wp0 TX0 rld0 m10 8lb0 uL0",
  31999. "America/Argentina/San_Luis|CMT -04 -03 -02|4g.M 40 30 20|012121212121212121212121212121212121212121232323121212321212|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 XX0 1q20 SL0 AN0 vDb0 m10 8lb0 8L0 jd0 1qN0 WL0 1qN0",
  32000. "America/Argentina/Tucuman|CMT -04 -03 -02|4g.M 40 30 20|0121212121212121212121212121212121212121212323232313232123232|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wq0 Ra0 1wp0 TX0 rlB0 4N0 8BX0 uL0 1qN0 WL0",
  32001. "America/Argentina/Ushuaia|CMT -04 -03 -02|4g.M 40 30 20|01212121212121212121212121212121212121212123232323232321232|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wp0 Rb0 1wp0 TX0 rkN0 8p0 8zb0 uL0",
  32002. "America/Curacao|LMT -0430 AST|4z.L 4u 40|012|-2kV7o.d 28KLS.d|15e4",
  32003. "America/Asuncion|AMT -04 -03|3O.E 40 30|012121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212|-1x589.k 1DKM9.k 3CL0 3Dd0 10L0 1pB0 10n0 1pB0 10n0 1pB0 1cL0 1dd0 1db0 1dd0 1cL0 1dd0 1cL0 1dd0 1cL0 1dd0 1db0 1dd0 1cL0 1dd0 1cL0 1dd0 1cL0 1dd0 1db0 1dd0 1cL0 1lB0 14n0 1dd0 1cL0 1fd0 WL0 1rd0 1aL0 1dB0 Xz0 1qp0 Xb0 1qN0 10L0 1rB0 TX0 1tB0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 1cL0 WN0 1qL0 11B0 1nX0 1ip0 WL0 1qN0 WL0 1qN0 WL0 1tB0 TX0 1tB0 TX0 1tB0 19X0 1a10 1fz0 1a10 1fz0 1cN0 17b0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1fB0 19X0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1fB0 19X0 1ip0 17b0 1ip0 17b0 1ip0|28e5",
  32004. "America/Atikokan|CST CDT CWT CPT EST|60 50 50 50 50|0101234|-25TQ0 1in0 Rnb0 3je0 8x30 iw0|28e2",
  32005. "America/Bahia_Banderas|LMT MST CST PST MDT CDT|71 70 60 80 60 50|0121212131414141414141414141414141414152525252525252525252525252525252525252525252525252525252|-1UQF0 deL0 8lc0 17c0 10M0 1dd0 otX0 gmN0 P2N0 13Vd0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nW0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0|84e3",
  32006. "America/Bahia|LMT -03 -02|2y.4 30 20|01212121212121212121212121212121212121212121212121212121212121|-2glxp.U HdLp.U 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 1EN0 Lz0 1C10 IL0 1HB0 Db0 1HB0 On0 1zd0 On0 1zd0 Lz0 1zd0 Rb0 1wN0 Wn0 1tB0 Rb0 1tB0 WL0 1tB0 Rb0 1zd0 On0 1HB0 FX0 l5B0 Rb0|27e5",
  32007. "America/Barbados|LMT BMT AST ADT|3W.t 3W.t 40 30|01232323232|-1Q0I1.v jsM0 1ODC1.v IL0 1ip0 17b0 1ip0 17b0 1ld0 13b0|28e4",
  32008. "America/Belem|LMT -03 -02|3d.U 30 20|012121212121212121212121212121|-2glwK.4 HdKK.4 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0|20e5",
  32009. "America/Belize|LMT CST -0530 CDT|5Q.M 60 5u 50|01212121212121212121212121212121212121212121212121213131|-2kBu7.c fPA7.c Onu 1zcu Rbu 1wou Rbu 1wou Rbu 1zcu Onu 1zcu Onu 1zcu Rbu 1wou Rbu 1wou Rbu 1wou Rbu 1zcu Onu 1zcu Onu 1zcu Rbu 1wou Rbu 1wou Rbu 1zcu Onu 1zcu Onu 1zcu Onu 1zcu Rbu 1wou Rbu 1wou Rbu 1zcu Onu 1zcu Onu 1zcu Rbu 1wou Rbu 1f0Mu qn0 lxB0 mn0|57e3",
  32010. "America/Blanc-Sablon|AST ADT AWT APT|40 30 30 30|010230|-25TS0 1in0 UGp0 8x50 iu0|11e2",
  32011. "America/Boa_Vista|LMT -04 -03|42.E 40 30|0121212121212121212121212121212121|-2glvV.k HdKV.k 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 smp0 WL0 1tB0 2L0|62e2",
  32012. "America/Bogota|BMT -05 -04|4U.g 50 40|0121|-2eb73.I 38yo3.I 2en0|90e5",
  32013. "America/Boise|PST PDT MST MWT MPT MDT|80 70 70 60 60 60|0101023425252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252|-261q0 1nX0 11B0 1nX0 8C10 JCL0 8x20 ix0 QwN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 Dd0 1Kn0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|21e4",
  32014. "America/Cambridge_Bay|-00 MST MWT MPT MDDT MDT CST CDT EST|0 70 60 60 50 60 60 50 50|0123141515151515151515151515151515151515151515678651515151515151515151515151515151515151515151515151515151515151515151515151|-21Jc0 RO90 8x20 ix0 LCL0 1fA0 zgO0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11A0 1nX0 2K0 WQ0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|15e2",
  32015. "America/Campo_Grande|LMT -04 -03|3C.s 40 30|012121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212|-2glwl.w HdLl.w 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 1EN0 Lz0 1C10 IL0 1HB0 Db0 1HB0 On0 1zd0 On0 1zd0 Lz0 1zd0 Rb0 1wN0 Wn0 1tB0 Rb0 1tB0 WL0 1tB0 Rb0 1zd0 On0 1HB0 FX0 1C10 Lz0 1Ip0 HX0 1zd0 On0 1HB0 IL0 1wp0 On0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 Rb0 1zd0 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1HB0 FX0 1HB0 FX0 1HB0 IL0 1HB0 FX0 1HB0 IL0 1EN0 FX0 1HB0 FX0 1HB0 IL0 1EN0 IL0 1HB0 FX0 1HB0 FX0 1HB0 FX0 1HB0 FX0 1HB0 FX0 1Kp0 FX0 1HB0 IL0 1EN0 FX0 1HB0 FX0 1HB0 IL0 1EN0|77e4",
  32016. "America/Cancun|LMT CST EST EDT CDT|5L.4 60 50 40 50|0123232341414141414141414141414141414141412|-1UQG0 2q2o0 yLB0 1lb0 14p0 1lb0 14p0 Lz0 xB0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 Dd0|63e4",
  32017. "America/Caracas|CMT -0430 -04|4r.E 4u 40|01212|-2kV7w.k 28KM2.k 1IwOu kqo0|29e5",
  32018. "America/Cayenne|LMT -04 -03|3t.k 40 30|012|-2mrwu.E 2gWou.E|58e3",
  32019. "America/Panama|CMT EST|5j.A 50|01|-2uduE.o|15e5",
  32020. "America/Chicago|CST CDT EST CWT CPT|60 50 50 50 50|01010101010101010101010101010101010102010101010103401010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-261s0 1nX0 11B0 1nX0 1wp0 TX0 WN0 1qL0 1cN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 11B0 1Hz0 14p0 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 RB0 8x30 iw0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|92e5",
  32021. "America/Chihuahua|LMT MST CST CDT MDT|74.k 70 60 50 60|0121212323241414141414141414141414141414141414141414141414141414141414141414141414141414141|-1UQF0 deL0 8lc0 17c0 10M0 1dd0 2zQN0 1lb0 14p0 1lb0 14q0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0|81e4",
  32022. "America/Costa_Rica|SJMT CST CDT|5A.d 60 50|0121212121|-1Xd6n.L 2lu0n.L Db0 1Kp0 Db0 pRB0 15b0 1kp0 mL0|12e5",
  32023. "America/Creston|MST PST|70 80|010|-29DR0 43B0|53e2",
  32024. "America/Cuiaba|LMT -04 -03|3I.k 40 30|0121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212|-2glwf.E HdLf.E 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 1EN0 Lz0 1C10 IL0 1HB0 Db0 1HB0 On0 1zd0 On0 1zd0 Lz0 1zd0 Rb0 1wN0 Wn0 1tB0 Rb0 1tB0 WL0 1tB0 Rb0 1zd0 On0 1HB0 FX0 4a10 HX0 1zd0 On0 1HB0 IL0 1wp0 On0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 Rb0 1zd0 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1HB0 FX0 1HB0 FX0 1HB0 IL0 1HB0 FX0 1HB0 IL0 1EN0 FX0 1HB0 FX0 1HB0 IL0 1EN0 IL0 1HB0 FX0 1HB0 FX0 1HB0 FX0 1HB0 FX0 1HB0 FX0 1Kp0 FX0 1HB0 IL0 1EN0 FX0 1HB0 FX0 1HB0 IL0 1EN0|54e4",
  32025. "America/Danmarkshavn|LMT -03 -02 GMT|1e.E 30 20 0|01212121212121212121212121212121213|-2a5WJ.k 2z5fJ.k 19U0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 DC0|8",
  32026. "America/Dawson_Creek|PST PDT PWT PPT MST|80 70 70 70 70|0102301010101010101010101010101010101010101010101010101014|-25TO0 1in0 UGp0 8x10 iy0 3NB0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 ML0|12e3",
  32027. "America/Dawson|YST YDT YWT YPT YDDT PST PDT|90 80 80 80 70 80 70|0101023040565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565|-25TN0 1in0 1o10 13V0 Ser0 8x00 iz0 LCL0 1fA0 jrA0 fNd0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|13e2",
  32028. "America/Denver|MST MDT MWT MPT|70 60 60 60|01010101023010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-261r0 1nX0 11B0 1nX0 11B0 1qL0 WN0 mn0 Ord0 8x20 ix0 LCN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|26e5",
  32029. "America/Detroit|LMT CST EST EWT EPT EDT|5w.b 60 50 40 40 40|012342525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252|-2Cgir.N peqr.N 156L0 8x40 iv0 6fd0 11z0 XQp0 1cL0 s10 1Vz0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|37e5",
  32030. "America/Edmonton|LMT MST MDT MWT MPT|7x.Q 70 60 60 60|01212121212121341212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2yd4q.8 shdq.8 1in0 17d0 hz0 2dB0 1fz0 1a10 11z0 1qN0 WL0 1qN0 11z0 IGN0 8x20 ix0 3NB0 11z0 LFB0 1cL0 3Cp0 1cL0 66N0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|10e5",
  32031. "America/Eirunepe|LMT -05 -04|4D.s 50 40|0121212121212121212121212121212121|-2glvk.w HdLk.w 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 dPB0 On0 yTd0 d5X0|31e3",
  32032. "America/El_Salvador|LMT CST CDT|5U.M 60 50|012121|-1XiG3.c 2Fvc3.c WL0 1qN0 WL0|11e5",
  32033. "America/Tijuana|LMT MST PST PDT PWT PPT|7M.4 70 80 70 70 70|012123245232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-1UQE0 4PX0 8mM0 8lc0 SN0 1cL0 pHB0 83r0 zI0 5O10 1Rz0 cOO0 11A0 1o00 11A0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 BUp0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 U10 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|20e5",
  32034. "America/Fort_Nelson|PST PDT PWT PPT MST|80 70 70 70 70|01023010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010104|-25TO0 1in0 UGp0 8x10 iy0 3NB0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0|39e2",
  32035. "America/Fort_Wayne|CST CDT CWT CPT EST EDT|60 50 50 50 50 40|010101023010101010101010101040454545454545454545454545454545454545454545454545454545454545454545454|-261s0 1nX0 11B0 1nX0 QI10 Db0 RB0 8x30 iw0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 5Tz0 1o10 qLb0 1cL0 1cN0 1cL0 1qhd0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0",
  32036. "America/Fortaleza|LMT -03 -02|2y 30 20|0121212121212121212121212121212121212121|-2glxq HdLq 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 nsp0 WL0 1tB0 5z0 2mN0 On0|34e5",
  32037. "America/Glace_Bay|LMT AST ADT AWT APT|3X.M 40 30 30 30|012134121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2IsI0.c CwO0.c 1in0 UGp0 8x50 iu0 iq10 11z0 Jg10 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|19e3",
  32038. "America/Godthab|LMT -03 -02|3q.U 30 20|0121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2a5Ux.4 2z5dx.4 19U0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|17e3",
  32039. "America/Goose_Bay|NST NDT NST NDT NWT NPT AST ADT ADDT|3u.Q 2u.Q 3u 2u 2u 2u 40 30 20|010232323232323245232323232323232323232323232323232323232326767676767676767676767676767676767676767676768676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676|-25TSt.8 1in0 DXb0 2HbX.8 WL0 1qN0 WL0 1qN0 WL0 1tB0 TX0 1tB0 WL0 1qN0 WL0 1qN0 7UHu itu 1tB0 WL0 1qN0 WL0 1qN0 WL0 1qN0 WL0 1tB0 WL0 1ld0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 S10 g0u 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14n1 1lb0 14p0 1nW0 11C0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zcX Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|76e2",
  32040. "America/Grand_Turk|KMT EST EDT AST|57.a 50 40 40|01212121212121212121212121212121212121212121212121212121212121212121212121232121212121212121212121212121212121212121|-2l1uQ.O 2HHBQ.O 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 5Ip0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|37e2",
  32041. "America/Guatemala|LMT CST CDT|62.4 60 50|0121212121|-24KhV.U 2efXV.U An0 mtd0 Nz0 ifB0 17b0 zDB0 11z0|13e5",
  32042. "America/Guayaquil|QMT -05 -04|5e 50 40|0121|-1yVSK 2uILK rz0|27e5",
  32043. "America/Guyana|LMT -0345 -03 -04|3Q.E 3J 30 40|0123|-2dvU7.k 2r6LQ.k Bxbf|80e4",
  32044. "America/Halifax|LMT AST ADT AWT APT|4e.o 40 30 30 30|0121212121212121212121212121212121212121212121212134121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2IsHJ.A xzzJ.A 1db0 3I30 1in0 3HX0 IL0 1E10 ML0 1yN0 Pb0 1Bd0 Mn0 1Bd0 Rz0 1w10 Xb0 1w10 LX0 1w10 Xb0 1w10 Lz0 1C10 Jz0 1E10 OL0 1yN0 Un0 1qp0 Xb0 1qp0 11X0 1w10 Lz0 1HB0 LX0 1C10 FX0 1w10 Xb0 1qp0 Xb0 1BB0 LX0 1td0 Xb0 1qp0 Xb0 Rf0 8x50 iu0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 3Qp0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 3Qp0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 6i10 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|39e4",
  32045. "America/Havana|HMT CST CDT|5t.A 50 40|012121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-1Meuu.o 72zu.o ML0 sld0 An0 1Nd0 Db0 1Nd0 An0 6Ep0 An0 1Nd0 An0 JDd0 Mn0 1Ap0 On0 1fd0 11X0 1qN0 WL0 1wp0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 14n0 1ld0 14L0 1kN0 15b0 1kp0 1cL0 1cN0 1fz0 1a10 1fz0 1fB0 11z0 14p0 1nX0 11B0 1nX0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 14n0 1ld0 14n0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 1a10 1in0 1a10 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 17c0 1o00 11A0 1qM0 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 11A0 6i00 Rc0 1wo0 U00 1tA0 Rc0 1wo0 U00 1wo0 U00 1zc0 U00 1qM0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0|21e5",
  32046. "America/Hermosillo|LMT MST CST PST MDT|7n.Q 70 60 80 60|0121212131414141|-1UQF0 deL0 8lc0 17c0 10M0 1dd0 otX0 gmN0 P2N0 13Vd0 1lb0 14p0 1lb0 14p0 1lb0|64e4",
  32047. "America/Indiana/Knox|CST CDT CWT CPT EST|60 50 50 50 50|0101023010101010101010101010101010101040101010101010101010101010101010101010101010101010141010101010101010101010101010101010101010101010101010101010101010|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 3NB0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 1fz0 1cN0 1cL0 1cN0 11z0 1o10 11z0 1o10 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 3Cn0 8wp0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 z8o0 1o00 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0",
  32048. "America/Indiana/Marengo|CST CDT CWT CPT EST EDT|60 50 50 50 50 40|0101023010101010101010104545454545414545454545454545454545454545454545454545454545454545454545454545454|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 dyN0 11z0 6fd0 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 jrz0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1VA0 LA0 1BX0 1e6p0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0",
  32049. "America/Indiana/Petersburg|CST CDT CWT CPT EST EDT|60 50 50 50 50 40|01010230101010101010101010104010101010101010101010141014545454545454545454545454545454545454545454545454545454545454|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 njX0 WN0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 3Fb0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 19co0 1o00 Rd0 1zb0 Oo0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0",
  32050. "America/Indiana/Tell_City|CST CDT CWT CPT EST EDT|60 50 50 50 50 40|01010230101010101010101010101010454541010101010101010101010101010101010101010101010101010101010101010|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 1o10 11z0 g0p0 11z0 1o10 11z0 1qL0 WN0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 1fz0 1cN0 WL0 1qN0 1cL0 1cN0 1cL0 1cN0 caL0 1cL0 1cN0 1cL0 1qhd0 1o00 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0",
  32051. "America/Indiana/Vevay|CST CDT CWT CPT EST EDT|60 50 50 50 50 40|010102304545454545454545454545454545454545454545454545454545454545454545454545454|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 kPB0 Awn0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1lnd0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0",
  32052. "America/Indiana/Vincennes|CST CDT CWT CPT EST EDT|60 50 50 50 50 40|01010230101010101010101010101010454541014545454545454545454545454545454545454545454545454545454545454|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 1o10 11z0 g0p0 11z0 1o10 11z0 1qL0 WN0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 1fz0 1cN0 WL0 1qN0 1cL0 1cN0 1cL0 1cN0 caL0 1cL0 1cN0 1cL0 1qhd0 1o00 Rd0 1zb0 Oo0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0",
  32053. "America/Indiana/Winamac|CST CDT CWT CPT EST EDT|60 50 50 50 50 40|01010230101010101010101010101010101010454541054545454545454545454545454545454545454545454545454545454545454|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 1fz0 1cN0 1cL0 1cN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 jrz0 1cL0 1cN0 1cL0 1qhd0 1o00 Rd0 1za0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0",
  32054. "America/Inuvik|-00 PST PDDT MST MDT|0 80 60 70 60|0121343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343|-FnA0 tWU0 1fA0 wPe0 2pz0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|35e2",
  32055. "America/Iqaluit|-00 EWT EPT EST EDDT EDT CST CDT|0 40 40 50 30 40 60 50|01234353535353535353535353535353535353535353567353535353535353535353535353535353535353535353535353535353535353535353535353|-16K00 7nX0 iv0 LCL0 1fA0 zgO0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11C0 1nX0 11A0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|67e2",
  32056. "America/Jamaica|KMT EST EDT|57.a 50 40|0121212121212121212121|-2l1uQ.O 2uM1Q.O 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0|94e4",
  32057. "America/Juneau|PST PWT PPT PDT YDT YST AKST AKDT|80 70 70 70 80 90 90 80|01203030303030303030303030403030356767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676|-17T20 8x10 iy0 Vo10 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cM0 1cM0 1cL0 1cN0 1fz0 1a10 1fz0 co0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|33e3",
  32058. "America/Kentucky/Louisville|CST CDT CWT CPT EST EDT|60 50 50 50 50 40|0101010102301010101010101010101010101454545454545414545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454|-261s0 1nX0 11B0 1nX0 3Fd0 Nb0 LPd0 11z0 RB0 8x30 iw0 Bb0 10N0 2bB0 8in0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 xz0 gso0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1VA0 LA0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0",
  32059. "America/Kentucky/Monticello|CST CDT CWT CPT EST EDT|60 50 50 50 50 40|0101023010101010101010101010101010101010101010101010101010101010101010101454545454545454545454545454545454545454545454545454545454545454545454545454|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 SWp0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11A0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0",
  32060. "America/La_Paz|CMT BST -04|4w.A 3w.A 40|012|-1x37r.o 13b0|19e5",
  32061. "America/Lima|LMT -05 -04|58.A 50 40|0121212121212121|-2tyGP.o 1bDzP.o zX0 1aN0 1cL0 1cN0 1cL0 1PrB0 zX0 1O10 zX0 6Gp0 zX0 98p0 zX0|11e6",
  32062. "America/Los_Angeles|PST PDT PWT PPT|80 70 70 70|010102301010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-261q0 1nX0 11B0 1nX0 SgN0 8x10 iy0 5Wp1 1VaX 3dA0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1a00 1fA0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|15e6",
  32063. "America/Maceio|LMT -03 -02|2m.Q 30 20|012121212121212121212121212121212121212121|-2glxB.8 HdLB.8 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 dMN0 Lz0 8Q10 WL0 1tB0 5z0 2mN0 On0|93e4",
  32064. "America/Managua|MMT CST EST CDT|5J.c 60 50 50|0121313121213131|-1quie.M 1yAMe.M 4mn0 9Up0 Dz0 1K10 Dz0 s3F0 1KH0 DB0 9In0 k8p0 19X0 1o30 11y0|22e5",
  32065. "America/Manaus|LMT -04 -03|40.4 40 30|01212121212121212121212121212121|-2glvX.U HdKX.U 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 dPB0 On0|19e5",
  32066. "America/Martinique|FFMT AST ADT|44.k 40 30|0121|-2mPTT.E 2LPbT.E 19X0|39e4",
  32067. "America/Matamoros|LMT CST CDT|6E 60 50|0121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-1UQG0 2FjC0 1nX0 i6p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 U10 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|45e4",
  32068. "America/Mazatlan|LMT MST CST PST MDT|75.E 70 60 80 60|0121212131414141414141414141414141414141414141414141414141414141414141414141414141414141414141|-1UQF0 deL0 8lc0 17c0 10M0 1dd0 otX0 gmN0 P2N0 13Vd0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0|44e4",
  32069. "America/Menominee|CST CDT CWT CPT EST|60 50 50 50 50|01010230101041010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 1o10 11z0 LCN0 1fz0 6410 9Jb0 1cM0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|85e2",
  32070. "America/Merida|LMT CST EST CDT|5W.s 60 50 50|0121313131313131313131313131313131313131313131313131313131313131313131313131313131313131|-1UQG0 2q2o0 2hz0 wu30 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0|11e5",
  32071. "America/Metlakatla|PST PWT PPT PDT AKST AKDT|80 70 70 70 90 80|0120303030303030303030303030303030454545454545454545454545454545454545454545454|-17T20 8x10 iy0 Vo10 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1hU10 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|14e2",
  32072. "America/Mexico_City|LMT MST CST CDT CWT|6A.A 70 60 50 50|012121232324232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-1UQF0 deL0 8lc0 17c0 10M0 1dd0 gEn0 TX0 3xd0 Jb0 6zB0 SL0 e5d0 17b0 1Pff0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0|20e6",
  32073. "America/Miquelon|LMT AST -03 -02|3I.E 40 30 20|012323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-2mKkf.k 2LTAf.k gQ10 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|61e2",
  32074. "America/Moncton|EST AST ADT AWT APT|50 40 30 30 30|012121212121212121212134121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2IsH0 CwN0 1in0 zAo0 An0 1Nd0 An0 1Nd0 An0 1Nd0 An0 1Nd0 An0 1Nd0 An0 1K10 Lz0 1zB0 NX0 1u10 Wn0 S20 8x50 iu0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 3Cp0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14n1 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 ReX 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|64e3",
  32075. "America/Monterrey|LMT CST CDT|6F.g 60 50|0121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-1UQG0 2FjC0 1nX0 i6p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0|41e5",
  32076. "America/Montevideo|LMT MMT -04 -03 -0330 -0230 -02 -0130|3I.P 3I.P 40 30 3u 2u 20 1u|012343434343434343434343435353636353636375363636363636363636363636363636363636363636363|-2tRUf.9 sVc0 8jcf.9 1db0 1dcu 1cLu 1dcu 1cLu ircu 11zu 1o0u 11zu 1o0u 11zu 1o0u 11zu 1qMu WLu 1qMu WLu 1fAu 1cLu 1o0u 11zu NAu 3jXu zXu Dq0u 19Xu pcu jz0 cm10 19X0 6tB0 1fbu 3o0u jX0 4vB0 xz0 3Cp0 mmu 1a10 IMu Db0 4c10 uL0 1Nd0 An0 1SN0 uL0 mp0 28L0 iPB0 un0 1SN0 xz0 1zd0 Lz0 1zd0 Rb0 1zd0 On0 1wp0 Rb0 s8p0 1fB0 1ip0 11z0 1ld0 14n0 1o10 11z0 1o10 11z0 1o10 14n0 1ld0 14n0 1ld0 14n0 1o10 11z0 1o10 11z0 1o10 11z0|17e5",
  32077. "America/Toronto|EST EDT EWT EPT|50 40 40 40|01010101010101010101010101010101010101010101012301010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-25TR0 1in0 11Wu 1nzu 1fD0 WJ0 1wr0 Nb0 1Ap0 On0 1zd0 On0 1wp0 TX0 1tB0 TX0 1tB0 TX0 1tB0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 4kM0 8x40 iv0 1o10 11z0 1nX0 11z0 1o10 11z0 1o10 1qL0 11D0 1nX0 11B0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|65e5",
  32078. "America/Nassau|LMT EST EDT|59.u 50 40|012121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2kNuO.u 26XdO.u 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|24e4",
  32079. "America/New_York|EST EDT EWT EPT|50 40 40 40|01010101010101010101010101010101010101010101010102301010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-261t0 1nX0 11B0 1nX0 11B0 1qL0 1a10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 RB0 8x40 iv0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|21e6",
  32080. "America/Nipigon|EST EDT EWT EPT|50 40 40 40|010123010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-25TR0 1in0 Rnb0 3je0 8x40 iv0 19yN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|16e2",
  32081. "America/Nome|NST NWT NPT BST BDT YST AKST AKDT|b0 a0 a0 b0 a0 90 90 80|012034343434343434343434343434343456767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676|-17SX0 8wW0 iB0 Qlb0 52O0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 cl0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|38e2",
  32082. "America/Noronha|LMT -02 -01|29.E 20 10|0121212121212121212121212121212121212121|-2glxO.k HdKO.k 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 nsp0 WL0 1tB0 2L0 2pB0 On0|30e2",
  32083. "America/North_Dakota/Beulah|MST MDT MWT MPT CST CDT|70 60 60 60 60 50|010102301010101010101010101010101010101010101010101010101010101010101010101010101010101010101014545454545454545454545454545454545454545454545454545454|-261r0 1nX0 11B0 1nX0 SgN0 8x20 ix0 QwN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Oo0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0",
  32084. "America/North_Dakota/Center|MST MDT MWT MPT CST CDT|70 60 60 60 60 50|010102301010101010101010101010101010101010101010101010101014545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454|-261r0 1nX0 11B0 1nX0 SgN0 8x20 ix0 QwN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14o0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0",
  32085. "America/North_Dakota/New_Salem|MST MDT MWT MPT CST CDT|70 60 60 60 60 50|010102301010101010101010101010101010101010101010101010101010101010101010101010101454545454545454545454545454545454545454545454545454545454545454545454|-261r0 1nX0 11B0 1nX0 SgN0 8x20 ix0 QwN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14o0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0",
  32086. "America/Ojinaga|LMT MST CST CDT MDT|6V.E 70 60 50 60|0121212323241414141414141414141414141414141414141414141414141414141414141414141414141414141|-1UQF0 deL0 8lc0 17c0 10M0 1dd0 2zQN0 1lb0 14p0 1lb0 14q0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 U10 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|23e3",
  32087. "America/Pangnirtung|-00 AST AWT APT ADDT ADT EDT EST CST CDT|0 40 30 30 20 30 40 50 60 50|012314151515151515151515151515151515167676767689767676767676767676767676767676767676767676767676767676767676767676767676767|-1XiM0 PnG0 8x50 iu0 LCL0 1fA0 zgO0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1o00 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11C0 1nX0 11A0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|14e2",
  32088. "America/Paramaribo|LMT PMT PMT -0330 -03|3E.E 3E.Q 3E.A 3u 30|01234|-2nDUj.k Wqo0.c qanX.I 1yVXN.o|24e4",
  32089. "America/Phoenix|MST MDT MWT|70 60 60|01010202010|-261r0 1nX0 11B0 1nX0 SgN0 4Al1 Ap0 1db0 SWqX 1cL0|42e5",
  32090. "America/Port-au-Prince|PPMT EST EDT|4N 50 40|01212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-28RHb 2FnMb 19X0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14q0 1o00 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 14o0 1o00 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 i6n0 1nX0 11B0 1nX0 d430 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 3iN0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|23e5",
  32091. "America/Rio_Branco|LMT -05 -04|4v.c 50 40|01212121212121212121212121212121|-2glvs.M HdLs.M 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 NBd0 d5X0|31e4",
  32092. "America/Porto_Velho|LMT -04 -03|4f.A 40 30|012121212121212121212121212121|-2glvI.o HdKI.o 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0|37e4",
  32093. "America/Puerto_Rico|AST AWT APT|40 30 30|0120|-17lU0 7XT0 iu0|24e5",
  32094. "America/Punta_Arenas|SMT -05 -04 -03|4G.K 50 40 30|0102021212121212121232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323|-2q2jh.e fJAh.e 5knG.K 1Vzh.e jRAG.K 1pbh.e 11d0 1oL0 11d0 1oL0 11d0 1oL0 11d0 1pb0 11d0 nHX0 op0 blz0 ko0 Qeo0 WL0 1zd0 On0 1ip0 11z0 1o10 11z0 1qN0 WL0 1ld0 14n0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 1cL0 1cN0 11z0 1o10 11z0 1qN0 WL0 1fB0 19X0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1ip0 1fz0 1fB0 11z0 1qN0 WL0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1o10 19X0 1fB0 1nX0 G10 1EL0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0",
  32095. "America/Rainy_River|CST CDT CWT CPT|60 50 50 50|010123010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-25TQ0 1in0 Rnb0 3je0 8x30 iw0 19yN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|842",
  32096. "America/Rankin_Inlet|-00 CST CDDT CDT EST|0 60 40 50 50|012131313131313131313131313131313131313131313431313131313131313131313131313131313131313131313131313131313131313131313131|-vDc0 keu0 1fA0 zgO0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|26e2",
  32097. "America/Recife|LMT -03 -02|2j.A 30 20|0121212121212121212121212121212121212121|-2glxE.o HdLE.o 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 nsp0 WL0 1tB0 2L0 2pB0 On0|33e5",
  32098. "America/Regina|LMT MST MDT MWT MPT CST|6W.A 70 60 60 60 60|012121212121212121212121341212121212121212121212121215|-2AD51.o uHe1.o 1in0 s2L0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 66N0 1cL0 1cN0 19X0 1fB0 1cL0 1fB0 1cL0 1cN0 1cL0 M30 8x20 ix0 1ip0 1cL0 1ip0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 3NB0 1cL0 1cN0|19e4",
  32099. "America/Resolute|-00 CST CDDT CDT EST|0 60 40 50 50|012131313131313131313131313131313131313131313431313131313431313131313131313131313131313131313131313131313131313131313131|-SnA0 GWS0 1fA0 zgO0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|229",
  32100. "America/Santarem|LMT -04 -03|3C.M 40 30|0121212121212121212121212121212|-2glwl.c HdLl.c 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 NBd0|21e4",
  32101. "America/Santiago|SMT -05 -04 -03|4G.K 50 40 30|010202121212121212321232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323|-2q2jh.e fJAh.e 5knG.K 1Vzh.e jRAG.K 1pbh.e 11d0 1oL0 11d0 1oL0 11d0 1oL0 11d0 1pb0 11d0 nHX0 op0 9Bz0 jb0 1oN0 ko0 Qeo0 WL0 1zd0 On0 1ip0 11z0 1o10 11z0 1qN0 WL0 1ld0 14n0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 1cL0 1cN0 11z0 1o10 11z0 1qN0 WL0 1fB0 19X0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1ip0 1fz0 1fB0 11z0 1qN0 WL0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1o10 19X0 1fB0 1nX0 G10 1EL0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1Nb0 Dd0 1Nb0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1Nb0 Dd0 1Nb0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1Nb0 Dd0 1Nb0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1Nb0 Ap0|62e5",
  32102. "America/Santo_Domingo|SDMT EST EDT -0430 AST|4E 50 40 4u 40|01213131313131414|-1ttjk 1lJMk Mn0 6sp0 Lbu 1Cou yLu 1RAu wLu 1QMu xzu 1Q0u xXu 1PAu 13jB0 e00|29e5",
  32103. "America/Sao_Paulo|LMT -03 -02|36.s 30 20|012121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212|-2glwR.w HdKR.w 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 pTd0 PX0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 1EN0 Lz0 1C10 IL0 1HB0 Db0 1HB0 On0 1zd0 On0 1zd0 Lz0 1zd0 Rb0 1wN0 Wn0 1tB0 Rb0 1tB0 WL0 1tB0 Rb0 1zd0 On0 1HB0 FX0 1C10 Lz0 1Ip0 HX0 1zd0 On0 1HB0 IL0 1wp0 On0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 Rb0 1zd0 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1HB0 FX0 1HB0 FX0 1HB0 IL0 1HB0 FX0 1HB0 IL0 1EN0 FX0 1HB0 FX0 1HB0 IL0 1EN0 IL0 1HB0 FX0 1HB0 FX0 1HB0 FX0 1HB0 FX0 1HB0 FX0 1Kp0 FX0 1HB0 IL0 1EN0 FX0 1HB0 FX0 1HB0 IL0 1EN0|20e6",
  32104. "America/Scoresbysund|LMT -02 -01 +00|1r.Q 20 10 0|0121323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-2a5Ww.8 2z5ew.8 1a00 1cK0 1cL0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|452",
  32105. "America/Sitka|PST PWT PPT PDT YST AKST AKDT|80 70 70 70 90 90 80|01203030303030303030303030303030345656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565|-17T20 8x10 iy0 Vo10 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 co0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|90e2",
  32106. "America/St_Johns|NST NDT NST NDT NWT NPT NDDT|3u.Q 2u.Q 3u 2u 2u 2u 1u|01010101010101010101010101010101010102323232323232324523232323232323232323232323232323232323232323232323232323232323232323232323232323232326232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-28oit.8 14L0 1nB0 1in0 1gm0 Dz0 1JB0 1cL0 1cN0 1cL0 1fB0 19X0 1fB0 19X0 1fB0 19X0 1fB0 19X0 1fB0 1cL0 1cN0 1cL0 1fB0 19X0 1fB0 19X0 1fB0 19X0 1fB0 19X0 1fB0 1cL0 1fB0 19X0 1fB0 19X0 10O0 eKX.8 19X0 1iq0 WL0 1qN0 WL0 1qN0 WL0 1tB0 TX0 1tB0 WL0 1qN0 WL0 1qN0 7UHu itu 1tB0 WL0 1qN0 WL0 1qN0 WL0 1qN0 WL0 1tB0 WL0 1ld0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14n1 1lb0 14p0 1nW0 11C0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zcX Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|11e4",
  32107. "America/Swift_Current|LMT MST MDT MWT MPT CST|7b.k 70 60 60 60 60|012134121212121212121215|-2AD4M.E uHdM.E 1in0 UGp0 8x20 ix0 1o10 17b0 1ip0 11z0 1o10 11z0 1o10 11z0 isN0 1cL0 3Cp0 1cL0 1cN0 11z0 1qN0 WL0 pMp0|16e3",
  32108. "America/Tegucigalpa|LMT CST CDT|5M.Q 60 50|01212121|-1WGGb.8 2ETcb.8 WL0 1qN0 WL0 GRd0 AL0|11e5",
  32109. "America/Thule|LMT AST ADT|4z.8 40 30|012121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2a5To.Q 31NBo.Q 1cL0 1cN0 1cL0 1fB0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|656",
  32110. "America/Thunder_Bay|CST EST EWT EPT EDT|60 50 40 40 40|0123141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141|-2q5S0 1iaN0 8x40 iv0 XNB0 1cL0 1cN0 1fz0 1cN0 1cL0 3Cp0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|11e4",
  32111. "America/Vancouver|PST PDT PWT PPT|80 70 70 70|0102301010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-25TO0 1in0 UGp0 8x10 iy0 1o10 17b0 1ip0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|23e5",
  32112. "America/Whitehorse|YST YDT YWT YPT YDDT PST PDT|90 80 80 80 70 80 70|0101023040565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565|-25TN0 1in0 1o10 13V0 Ser0 8x00 iz0 LCL0 1fA0 3NA0 vrd0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|23e3",
  32113. "America/Winnipeg|CST CDT CWT CPT|60 50 50 50|010101023010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2aIi0 WL0 3ND0 1in0 Jap0 Rb0 aCN0 8x30 iw0 1tB0 11z0 1ip0 11z0 1o10 11z0 1o10 11z0 1rd0 10L0 1op0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 1cL0 1cN0 11z0 6i10 WL0 6i10 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1a00 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1a00 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 14o0 1lc0 14o0 1o00 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 14o0 1o00 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 14o0 1lc0 14o0 1o00 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 14o0 1o00 11A0 1o00 11A0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|66e4",
  32114. "America/Yakutat|YST YWT YPT YDT AKST AKDT|90 80 80 80 90 80|01203030303030303030303030303030304545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454|-17T10 8x00 iz0 Vo10 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 cn0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|642",
  32115. "America/Yellowknife|-00 MST MWT MPT MDDT MDT|0 70 60 60 50 60|012314151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151|-1pdA0 hix0 8x20 ix0 LCL0 1fA0 zgO0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|19e3",
  32116. "Antarctica/Casey|-00 +08 +11|0 -80 -b0|01212121|-2q00 1DjS0 T90 40P0 KL0 blz0 3m10|10",
  32117. "Antarctica/Davis|-00 +07 +05|0 -70 -50|01012121|-vyo0 iXt0 alj0 1D7v0 VB0 3Wn0 KN0|70",
  32118. "Antarctica/DumontDUrville|-00 +10|0 -a0|0101|-U0o0 cfq0 bFm0|80",
  32119. "Antarctica/Macquarie|AEST AEDT -00 +11|-a0 -b0 0 -b0|0102010101010101010101010101010101010101010101010101010101010101010101010101010101010101013|-29E80 19X0 4SL0 1ayy0 Lvs0 1cM0 1o00 Rc0 1wo0 Rc0 1wo0 U00 1wo0 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 11A0 1qM0 WM0 1qM0 Oo0 1zc0 Oo0 1zc0 Oo0 1wo0 WM0 1tA0 WM0 1tA0 U00 1tA0 U00 1tA0 11A0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 11A0 1o00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1cM0 1a00 1io0 1cM0 1cM0 1cM0 1cM0 1cM0|1",
  32120. "Antarctica/Mawson|-00 +06 +05|0 -60 -50|012|-CEo0 2fyk0|60",
  32121. "Pacific/Auckland|NZMT NZST NZST NZDT|-bu -cu -c0 -d0|01020202020202020202020202023232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323|-1GCVu Lz0 1tB0 11zu 1o0u 11zu 1o0u 11zu 1o0u 14nu 1lcu 14nu 1lcu 1lbu 11Au 1nXu 11Au 1nXu 11Au 1nXu 11Au 1nXu 11Au 1qLu WMu 1qLu 11Au 1n1bu IM0 1C00 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1qM0 14o0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1io0 17c0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1io0 17c0 1io0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00|14e5",
  32122. "Antarctica/Palmer|-00 -03 -04 -02|0 30 40 20|0121212121213121212121212121212121212121212121212121212121212121212121212121212121|-cao0 nD0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 jsN0 14N0 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 1cL0 1cN0 11z0 1o10 11z0 1qN0 WL0 1fB0 19X0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1ip0 1fz0 1fB0 11z0 1qN0 WL0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1o10 19X0 1fB0 1nX0 G10 1EL0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0|40",
  32123. "Antarctica/Rothera|-00 -03|0 30|01|gOo0|130",
  32124. "Antarctica/Syowa|-00 +03|0 -30|01|-vs00|20",
  32125. "Antarctica/Troll|-00 +00 +02|0 0 -20|01212121212121212121212121212121212121212121212121212121212121212121|1puo0 hd0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|40",
  32126. "Antarctica/Vostok|-00 +06|0 -60|01|-tjA0|25",
  32127. "Europe/Oslo|CET CEST|-10 -20|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2awM0 Qm0 W6o0 5pf0 WM0 1fA0 1cM0 1cM0 1cM0 1cM0 wJc0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1qM0 WM0 zpc0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|62e4",
  32128. "Asia/Riyadh|LMT +03|-36.Q -30|01|-TvD6.Q|57e5",
  32129. "Asia/Almaty|LMT +05 +06 +07|-57.M -50 -60 -70|012323232323232323232321232323232323232323232323232|-1Pc57.M eUo7.M 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0|15e5",
  32130. "Asia/Amman|LMT EET EEST|-2n.I -20 -30|0121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-1yW2n.I 1HiMn.I KL0 1oN0 11b0 1oN0 11b0 1pd0 1dz0 1cp0 11b0 1op0 11b0 fO10 1db0 1e10 1cL0 1cN0 1cL0 1cN0 1fz0 1pd0 10n0 1ld0 14n0 1hB0 15b0 1ip0 19X0 1cN0 1cL0 1cN0 17b0 1ld0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1So0 y00 1fc0 1dc0 1co0 1dc0 1cM0 1cM0 1cM0 1o00 11A0 1lc0 17c0 1cM0 1cM0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 4bX0 Dd0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|25e5",
  32131. "Asia/Anadyr|LMT +12 +13 +14 +11|-bN.U -c0 -d0 -e0 -b0|01232121212121212121214121212121212121212121212121212121212141|-1PcbN.U eUnN.U 23CL0 1db0 2q10 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 2sp0 WM0|13e3",
  32132. "Asia/Aqtau|LMT +04 +05 +06|-3l.4 -40 -50 -60|012323232323232323232123232312121212121212121212|-1Pc3l.4 eUnl.4 24PX0 2pX0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0|15e4",
  32133. "Asia/Aqtobe|LMT +04 +05 +06|-3M.E -40 -50 -60|0123232323232323232321232323232323232323232323232|-1Pc3M.E eUnM.E 23CL0 3Db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0|27e4",
  32134. "Asia/Ashgabat|LMT +04 +05 +06|-3R.w -40 -50 -60|0123232323232323232323212|-1Pc3R.w eUnR.w 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0|41e4",
  32135. "Asia/Atyrau|LMT +03 +05 +06 +04|-3r.I -30 -50 -60 -40|01232323232323232323242323232323232324242424242|-1Pc3r.I eUor.I 24PW0 2pX0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 2sp0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0",
  32136. "Asia/Baghdad|BMT +03 +04|-2V.A -30 -40|012121212121212121212121212121212121212121212121212121|-26BeV.A 2ACnV.A 11b0 1cp0 1dz0 1dd0 1db0 1cN0 1cp0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1de0 1dc0 1dc0 1dc0 1cM0 1dc0 1cM0 1dc0 1cM0 1dc0 1dc0 1dc0 1cM0 1dc0 1cM0 1dc0 1cM0 1dc0 1dc0 1dc0 1cM0 1dc0 1cM0 1dc0 1cM0 1dc0 1dc0 1dc0 1cM0 1dc0 1cM0 1dc0 1cM0 1dc0|66e5",
  32137. "Asia/Qatar|LMT +04 +03|-3q.8 -40 -30|012|-21Jfq.8 27BXq.8|96e4",
  32138. "Asia/Baku|LMT +03 +04 +05|-3j.o -30 -40 -50|01232323232323232323232123232323232323232323232323232323232323232|-1Pc3j.o 1jUoj.o WCL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 1cM0 9Je0 1o00 11z0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00|27e5",
  32139. "Asia/Bangkok|BMT +07|-6G.4 -70|01|-218SG.4|15e6",
  32140. "Asia/Barnaul|LMT +06 +07 +08|-5z -60 -70 -80|0123232323232323232323212323232321212121212121212121212121212121212|-21S5z pCnz 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 p90 LE0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3rd0",
  32141. "Asia/Beirut|EET EEST|-20 -30|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-21aq0 1on0 1410 1db0 19B0 1in0 1ip0 WL0 1lQp0 11b0 1oN0 11b0 1oN0 11b0 1pd0 11b0 1oN0 11b0 q6N0 En0 1oN0 11b0 1oN0 11b0 1oN0 11b0 1pd0 11b0 1oN0 11b0 1op0 11b0 dA10 17b0 1iN0 17b0 1iN0 17b0 1iN0 17b0 1vB0 SL0 1mp0 13z0 1iN0 17b0 1iN0 17b0 1jd0 12n0 1a10 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0|22e5",
  32142. "Asia/Bishkek|LMT +05 +06 +07|-4W.o -50 -60 -70|012323232323232323232321212121212121212121212121212|-1Pc4W.o eUnW.o 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2e00 1tX0 17b0 1ip0 17b0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1cPu 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0|87e4",
  32143. "Asia/Brunei|LMT +0730 +08|-7D.E -7u -80|012|-1KITD.E gDc9.E|42e4",
  32144. "Asia/Kolkata|MMT IST +0630|-5l.a -5u -6u|012121|-2zOtl.a 1r2LP.a 1un0 HB0 7zX0|15e6",
  32145. "Asia/Chita|LMT +08 +09 +10|-7x.Q -80 -90 -a0|012323232323232323232321232323232323232323232323232323232323232312|-21Q7x.Q pAnx.Q 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3re0|33e4",
  32146. "Asia/Choibalsan|LMT +07 +08 +10 +09|-7C -70 -80 -a0 -90|0123434343434343434343434343434343434343434343424242|-2APHC 2UkoC cKn0 1da0 1dd0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 6hD0 11z0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 3Db0 h1f0 1cJ0 1cP0 1cJ0|38e3",
  32147. "Asia/Shanghai|CST CDT|-80 -90|01010101010101010|-1c1I0 LX0 16p0 1jz0 1Myp0 Rb0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0|23e6",
  32148. "Asia/Colombo|MMT +0530 +06 +0630|-5j.w -5u -60 -6u|01231321|-2zOtj.w 1rFbN.w 1zzu 7Apu 23dz0 11zu n3cu|22e5",
  32149. "Asia/Dhaka|HMT +0630 +0530 +06 +07|-5R.k -6u -5u -60 -70|0121343|-18LFR.k 1unn.k HB0 m6n0 2kxbu 1i00|16e6",
  32150. "Asia/Damascus|LMT EET EEST|-2p.c -20 -30|01212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-21Jep.c Hep.c 17b0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1xRB0 11X0 1oN0 10L0 1pB0 11b0 1oN0 10L0 1mp0 13X0 1oN0 11b0 1pd0 11b0 1oN0 11b0 1oN0 11b0 1oN0 11b0 1pd0 11b0 1oN0 11b0 1oN0 11b0 1oN0 11b0 1pd0 11b0 1oN0 Nb0 1AN0 Nb0 bcp0 19X0 1gp0 19X0 3ld0 1xX0 Vd0 1Bz0 Sp0 1vX0 10p0 1dz0 1cN0 1cL0 1db0 1db0 1g10 1an0 1ap0 1db0 1fd0 1db0 1cN0 1db0 1dd0 1db0 1cp0 1dz0 1c10 1dX0 1cN0 1db0 1dd0 1db0 1cN0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1db0 1cN0 1db0 1cN0 19z0 1fB0 1qL0 11B0 1on0 Wp0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0|26e5",
  32151. "Asia/Dili|LMT +08 +09|-8m.k -80 -90|01212|-2le8m.k 1dnXm.k 1nfA0 Xld0|19e4",
  32152. "Asia/Dubai|LMT +04|-3F.c -40|01|-21JfF.c|39e5",
  32153. "Asia/Dushanbe|LMT +05 +06 +07|-4z.c -50 -60 -70|012323232323232323232321|-1Pc4z.c eUnz.c 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2hB0|76e4",
  32154. "Asia/Famagusta|LMT EET EEST +03|-2f.M -20 -30 -30|0121212121212121212121212121212121212121212121212121212121212121212121212121212121212312121212121212121212121212121212121212121|-1Vc2f.M 2a3cf.M 1cL0 1qp0 Xz0 19B0 19X0 1fB0 1db0 1cp0 1cL0 1fB0 19X0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1o30 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 15U0 2Ks0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00",
  32155. "Asia/Gaza|EET EEST IST IDT|-20 -30 -20 -30|010101010101010101010101010101012323232323232323232323232320101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-1c2q0 5Rb0 10r0 1px0 10N0 1pz0 16p0 1jB0 16p0 1jx0 pBd0 Vz0 1oN0 11b0 1oO0 10N0 1pz0 10N0 1pb0 10N0 1pb0 10N0 1pb0 10N0 1pz0 10N0 1pb0 10N0 1pb0 11d0 1oL0 dW0 hfB0 Db0 1fB0 Rb0 npB0 11z0 1C10 IL0 1s10 10n0 1o10 WL0 1zd0 On0 1ld0 11z0 1o10 14n0 1o10 14n0 1nd0 12n0 1nd0 Xz0 1q10 12n0 M10 C00 17c0 1io0 17c0 1io0 17c0 1o00 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 17c0 1io0 18N0 1bz0 19z0 1gp0 1610 1iL0 11z0 1o10 14o0 1lA1 SKX 1xd1 MKX 1AN0 1a00 1fA0 1cL0 1cN0 1nX0 1210 1nz0 1220 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1qL0|18e5",
  32156. "Asia/Hebron|EET EEST IST IDT|-20 -30 -20 -30|01010101010101010101010101010101232323232323232323232323232010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-1c2q0 5Rb0 10r0 1px0 10N0 1pz0 16p0 1jB0 16p0 1jx0 pBd0 Vz0 1oN0 11b0 1oO0 10N0 1pz0 10N0 1pb0 10N0 1pb0 10N0 1pb0 10N0 1pz0 10N0 1pb0 10N0 1pb0 11d0 1oL0 dW0 hfB0 Db0 1fB0 Rb0 npB0 11z0 1C10 IL0 1s10 10n0 1o10 WL0 1zd0 On0 1ld0 11z0 1o10 14n0 1o10 14n0 1nd0 12n0 1nd0 Xz0 1q10 12n0 M10 C00 17c0 1io0 17c0 1io0 17c0 1o00 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 17c0 1io0 18N0 1bz0 19z0 1gp0 1610 1iL0 12L0 1mN0 14o0 1lc0 Tb0 1xd1 MKX bB0 cn0 1cN0 1a00 1fA0 1cL0 1cN0 1nX0 1210 1nz0 1220 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1qL0|25e4",
  32157. "Asia/Ho_Chi_Minh|LMT PLMT +07 +08 +09|-76.E -76.u -70 -80 -90|0123423232|-2yC76.E bK00.a 1h7b6.u 5lz0 18o0 3Oq0 k5b0 aW00 BAM0|90e5",
  32158. "Asia/Hong_Kong|LMT HKT HKST JST|-7A.G -80 -90 -90|0121312121212121212121212121212121212121212121212121212121212121212121|-2CFHA.G 1sEP6.G 1cL0 ylu 93X0 1qQu 1tX0 Rd0 1In0 NB0 1cL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1kL0 14N0 1nX0 U10 1tz0 U10 1wn0 Rd0 1wn0 U10 1tz0 U10 1tz0 U10 1tz0 U10 1wn0 Rd0 1wn0 Rd0 1wn0 U10 1tz0 U10 1tz0 17d0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 s10 1Vz0 1cN0 1cL0 1cN0 1cL0 6fd0 14n0|73e5",
  32159. "Asia/Hovd|LMT +06 +07 +08|-66.A -60 -70 -80|012323232323232323232323232323232323232323232323232|-2APG6.A 2Uko6.A cKn0 1db0 1dd0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 6hD0 11z0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 kEp0 1cJ0 1cP0 1cJ0|81e3",
  32160. "Asia/Irkutsk|IMT +07 +08 +09|-6V.5 -70 -80 -90|01232323232323232323232123232323232323232323232323232323232323232|-21zGV.5 pjXV.5 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|60e4",
  32161. "Europe/Istanbul|IMT EET EEST +04 +03|-1U.U -20 -30 -40 -30|012121212121212121212121212121212121212121212121212121234343434342121212121212121212121212121212121212121212121212121212121212124|-2ogNU.U dzzU.U 11b0 8tB0 1on0 1410 1db0 19B0 1in0 3Rd0 Un0 1oN0 11b0 zSp0 CL0 mN0 1Vz0 1gN0 1pz0 5Rd0 1fz0 1yp0 ML0 1kp0 17b0 1ip0 17b0 1fB0 19X0 1jB0 18L0 1ip0 17z0 qdd0 xX0 3S10 Tz0 dA10 11z0 1o10 11z0 1qN0 11z0 1ze0 11B0 WM0 1qO0 WI0 1nX0 1rB0 10L0 11B0 1in0 17d0 1in0 2pX0 19E0 1fU0 16Q0 1iI0 16Q0 1iI0 1Vd0 pb0 3Kp0 14o0 1de0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1a00 1fA0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WO0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 Xc0 1qo0 WM0 1qM0 11A0 1o00 1200 1nA0 11A0 1tA0 U00 15w0|13e6",
  32162. "Asia/Jakarta|BMT +0720 +0730 +09 +08 WIB|-77.c -7k -7u -90 -80 -70|01232425|-1Q0Tk luM0 mPzO 8vWu 6kpu 4PXu xhcu|31e6",
  32163. "Asia/Jayapura|LMT +09 +0930 WIT|-9m.M -90 -9u -90|0123|-1uu9m.M sMMm.M L4nu|26e4",
  32164. "Asia/Jerusalem|JMT IST IDT IDDT|-2k.E -20 -30 -40|01212121212132121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-26Bek.E SyMk.E 5Rb0 10r0 1px0 10N0 1pz0 16p0 1jB0 16p0 1jx0 3LB0 Em0 or0 1cn0 1dB0 16n0 10O0 1ja0 1tC0 14o0 1cM0 1a00 11A0 1Na0 An0 1MP0 AJ0 1Kp0 LC0 1oo0 Wl0 EQN0 Db0 1fB0 Rb0 npB0 11z0 1C10 IL0 1s10 10n0 1o10 WL0 1zd0 On0 1ld0 11z0 1o10 14n0 1o10 14n0 1nd0 12n0 1nd0 Xz0 1q10 12n0 1hB0 1dX0 1ep0 1aL0 1eN0 17X0 1nf0 11z0 1tB0 19W0 1e10 17b0 1ep0 1gL0 18N0 1fz0 1eN0 17b0 1gq0 1gn0 19d0 1dz0 1c10 17X0 1hB0 1gn0 19d0 1dz0 1c10 17X0 1kp0 1dz0 1c10 1aL0 1eN0 1oL0 10N0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0 W10 1rz0 10N0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0 W10 1rz0 10N0 1oL0 10N0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0 W10 1rz0 10N0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0 W10 1rz0 W10 1rz0 10N0 1oL0 10N0 1oL0|81e4",
  32165. "Asia/Kabul|+04 +0430|-40 -4u|01|-10Qs0|46e5",
  32166. "Asia/Kamchatka|LMT +11 +12 +13|-ay.A -b0 -c0 -d0|012323232323232323232321232323232323232323232323232323232323212|-1SLKy.A ivXy.A 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 2sp0 WM0|18e4",
  32167. "Asia/Karachi|LMT +0530 +0630 +05 PKT PKST|-4s.c -5u -6u -50 -50 -60|012134545454|-2xoss.c 1qOKW.c 7zX0 eup0 LqMu 1fy00 1cL0 dK10 11b0 1610 1jX0|24e6",
  32168. "Asia/Urumqi|LMT +06|-5O.k -60|01|-1GgtO.k|32e5",
  32169. "Asia/Kathmandu|LMT +0530 +0545|-5F.g -5u -5J|012|-21JhF.g 2EGMb.g|12e5",
  32170. "Asia/Khandyga|LMT +08 +09 +10 +11|-92.d -80 -90 -a0 -b0|0123232323232323232323212323232323232323232323232343434343434343432|-21Q92.d pAp2.d 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 qK0 yN0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 17V0 7zD0|66e2",
  32171. "Asia/Krasnoyarsk|LMT +06 +07 +08|-6b.q -60 -70 -80|01232323232323232323232123232323232323232323232323232323232323232|-21Hib.q prAb.q 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|10e5",
  32172. "Asia/Kuala_Lumpur|SMT +07 +0720 +0730 +09 +08|-6T.p -70 -7k -7u -90 -80|0123435|-2Bg6T.p 17anT.p l5XE 17bO 8Fyu 1so1u|71e5",
  32173. "Asia/Kuching|LMT +0730 +08 +0820 +09|-7l.k -7u -80 -8k -90|0123232323232323242|-1KITl.k gDbP.k 6ynu AnE 1O0k AnE 1NAk AnE 1NAk AnE 1NAk AnE 1O0k AnE 1NAk AnE pAk 8Fz0|13e4",
  32174. "Asia/Macau|LMT CST CDT|-7y.k -80 -90|012121212121212121212121212121212121212121|-2le80 1XO3u 1wn0 Rd0 1wn0 R9u 1wqu U10 1tz0 TVu 1tz0 17gu 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cJu 1cL0 1cN0 1fz0 1cN0 1cOu 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cJu 1cL0 1cN0 1fz0 1cN0 1cL0|57e4",
  32175. "Asia/Magadan|LMT +10 +11 +12|-a3.c -a0 -b0 -c0|012323232323232323232321232323232323232323232323232323232323232312|-1Pca3.c eUo3.c 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3Cq0|95e3",
  32176. "Asia/Makassar|LMT MMT +08 +09 WITA|-7V.A -7V.A -80 -90 -80|01234|-21JjV.A vfc0 myLV.A 8ML0|15e5",
  32177. "Asia/Manila|+08 +09|-80 -90|010101010|-1kJI0 AL0 cK10 65X0 mXB0 vX0 VK10 1db0|24e6",
  32178. "Asia/Nicosia|LMT EET EEST|-2d.s -20 -30|01212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-1Vc2d.s 2a3cd.s 1cL0 1qp0 Xz0 19B0 19X0 1fB0 1db0 1cp0 1cL0 1fB0 19X0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1o30 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|32e4",
  32179. "Asia/Novokuznetsk|LMT +06 +07 +08|-5M.M -60 -70 -80|012323232323232323232321232323232323232323232323232323232323212|-1PctM.M eULM.M 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 2sp0 WM0|55e4",
  32180. "Asia/Novosibirsk|LMT +06 +07 +08|-5v.E -60 -70 -80|0123232323232323232323212323212121212121212121212121212121212121212|-21Qnv.E pAFv.E 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 ml0 Os0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 4eN0|15e5",
  32181. "Asia/Omsk|LMT +05 +06 +07|-4R.u -50 -60 -70|01232323232323232323232123232323232323232323232323232323232323232|-224sR.u pMLR.u 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|12e5",
  32182. "Asia/Oral|LMT +03 +05 +06 +04|-3p.o -30 -50 -60 -40|01232323232323232424242424242424242424242424242|-1Pc3p.o eUop.o 23CK0 3Db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1fA0 1cM0 1cM0 IM0 1EM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0|27e4",
  32183. "Asia/Pontianak|LMT PMT +0730 +09 +08 WITA WIB|-7h.k -7h.k -7u -90 -80 -80 -70|012324256|-2ua7h.k XE00 munL.k 8Rau 6kpu 4PXu xhcu Wqnu|23e4",
  32184. "Asia/Pyongyang|LMT KST JST KST|-8n -8u -90 -90|012313|-2um8n 97XR 1lTzu 2Onc0 6BAu|29e5",
  32185. "Asia/Qyzylorda|LMT +04 +05 +06|-4l.Q -40 -50 -60|0123232323232323232323232323232323232323232323|-1Pc4l.Q eUol.Q 23CL0 3Db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 3ao0 1EM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0|73e4",
  32186. "Asia/Rangoon|RMT +0630 +09|-6o.L -6u -90|0121|-21Jio.L SmnS.L 7j9u|48e5",
  32187. "Asia/Sakhalin|LMT +09 +11 +12 +10|-9u.M -90 -b0 -c0 -a0|01232323232323232323232423232323232424242424242424242424242424242|-2AGVu.M 1BoMu.M 1qFa0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 2pB0 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3rd0|58e4",
  32188. "Asia/Samarkand|LMT +04 +05 +06|-4r.R -40 -50 -60|01232323232323232323232|-1Pc4r.R eUor.R 23CL0 3Db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0|36e4",
  32189. "Asia/Seoul|LMT KST JST KST KDT KDT|-8r.Q -8u -90 -90 -9u -a0|0123141414141414135353|-2um8r.Q 97XV.Q 1m1zu kKo0 2I0u OL0 1FB0 Rb0 1qN0 TX0 1tB0 TX0 1tB0 TX0 1tB0 TX0 2ap0 12FBu 11A0 1o00 11A0|23e6",
  32190. "Asia/Srednekolymsk|LMT +10 +11 +12|-ae.Q -a0 -b0 -c0|01232323232323232323232123232323232323232323232323232323232323232|-1Pcae.Q eUoe.Q 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|35e2",
  32191. "Asia/Taipei|CST JST CDT|-80 -90 -90|01020202020202020202020202020202020202020|-1iw80 joM0 1yo0 Tz0 1ip0 1jX0 1cN0 11b0 1oN0 11b0 1oN0 11b0 1oN0 11b0 10N0 1BX0 10p0 1pz0 10p0 1pz0 10p0 1db0 1dd0 1db0 1cN0 1db0 1cN0 1db0 1cN0 1db0 1BB0 ML0 1Bd0 ML0 uq10 1db0 1cN0 1db0 97B0 AL0|74e5",
  32192. "Asia/Tashkent|LMT +05 +06 +07|-4B.b -50 -60 -70|012323232323232323232321|-1Pc4B.b eUnB.b 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0|23e5",
  32193. "Asia/Tbilisi|TBMT +03 +04 +05|-2X.b -30 -40 -50|0123232323232323232323212121232323232323232323212|-1Pc2X.b 1jUnX.b WCL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 1cK0 1cL0 1cN0 1cL0 1cN0 2pz0 1cL0 1fB0 3Nz0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 An0 Os0 WM0|11e5",
  32194. "Asia/Tehran|LMT TMT +0330 +04 +05 +0430|-3p.I -3p.I -3u -40 -50 -4u|01234325252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252|-2btDp.I 1d3c0 1huLT.I TXu 1pz0 sN0 vAu 1cL0 1dB0 1en0 pNB0 UL0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 64p0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0|14e6",
  32195. "Asia/Thimphu|LMT +0530 +06|-5W.A -5u -60|012|-Su5W.A 1BGMs.A|79e3",
  32196. "Asia/Tokyo|JST JDT|-90 -a0|010101010|-QJJ0 Rb0 1ld0 14n0 1zd0 On0 1zd0 On0|38e6",
  32197. "Asia/Tomsk|LMT +06 +07 +08|-5D.P -60 -70 -80|0123232323232323232323212323232323232323232323212121212121212121212|-21NhD.P pxzD.P 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 co0 1bB0 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3Qp0|10e5",
  32198. "Asia/Ulaanbaatar|LMT +07 +08 +09|-77.w -70 -80 -90|012323232323232323232323232323232323232323232323232|-2APH7.w 2Uko7.w cKn0 1db0 1dd0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 6hD0 11z0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 kEp0 1cJ0 1cP0 1cJ0|12e5",
  32199. "Asia/Ust-Nera|LMT +08 +09 +12 +11 +10|-9w.S -80 -90 -c0 -b0 -a0|012343434343434343434345434343434343434343434343434343434343434345|-21Q9w.S pApw.S 23CL0 1d90 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 17V0 7zD0|65e2",
  32200. "Asia/Vladivostok|LMT +09 +10 +11|-8L.v -90 -a0 -b0|01232323232323232323232123232323232323232323232323232323232323232|-1SJIL.v itXL.v 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|60e4",
  32201. "Asia/Yakutsk|LMT +08 +09 +10|-8C.W -80 -90 -a0|01232323232323232323232123232323232323232323232323232323232323232|-21Q8C.W pAoC.W 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|28e4",
  32202. "Asia/Yekaterinburg|LMT PMT +04 +05 +06|-42.x -3J.5 -40 -50 -60|012343434343434343434343234343434343434343434343434343434343434343|-2ag42.x 7mQh.s qBvJ.5 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|14e5",
  32203. "Asia/Yerevan|LMT +03 +04 +05|-2W -30 -40 -50|0123232323232323232323212121212323232323232323232323232323232|-1Pc2W 1jUnW WCL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 4RX0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|13e5",
  32204. "Atlantic/Azores|HMT -02 -01 +00 WET|1S.w 20 10 0 0|01212121212121212121212121212121212121212121232123212321232121212121212121212121212121212121212121232323232323232323232323232323234323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-2ldW0 aPX0 Sp0 LX0 1vc0 Tc0 1uM0 SM0 1vc0 Tc0 1vc0 SM0 1vc0 6600 1co0 3E00 17c0 1fA0 1a00 1io0 1a00 1io0 17c0 3I00 17c0 1cM0 1cM0 3Fc0 1cM0 1a00 1fA0 1io0 17c0 1cM0 1cM0 1a00 1fA0 1io0 1qM0 Dc0 1tA0 1cM0 1dc0 1400 gL0 IM0 s10 U00 dX0 Rc0 pd0 Rc0 gL0 Oo0 pd0 Rc0 gL0 Oo0 pd0 14o0 1cM0 1cP0 1cM0 1cM0 1cM0 1cM0 1cM0 3Co0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 qIl0 1cM0 1fA0 1cM0 1cM0 1cN0 1cL0 1cN0 1cM0 1cM0 1cM0 1cM0 1cN0 1cL0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cL0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|25e4",
  32205. "Atlantic/Bermuda|LMT AST ADT|4j.i 40 30|0121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-1BnRE.G 1LTbE.G 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|65e3",
  32206. "Atlantic/Canary|LMT -01 WET WEST|11.A 10 0 -10|01232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-1UtaW.o XPAW.o 1lAK0 1a10 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|54e4",
  32207. "Atlantic/Cape_Verde|LMT -02 -01|1y.4 20 10|01212|-2ldW0 1eEo0 7zX0 1djf0|50e4",
  32208. "Atlantic/Faroe|LMT WET WEST|r.4 0 -10|01212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2uSnw.U 2Wgow.U 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|49e3",
  32209. "Atlantic/Madeira|FMT -01 +00 +01 WET WEST|17.A 10 0 -10 0 -10|01212121212121212121212121212121212121212121232123212321232121212121212121212121212121212121212121454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454|-2ldX0 aPX0 Sp0 LX0 1vc0 Tc0 1uM0 SM0 1vc0 Tc0 1vc0 SM0 1vc0 6600 1co0 3E00 17c0 1fA0 1a00 1io0 1a00 1io0 17c0 3I00 17c0 1cM0 1cM0 3Fc0 1cM0 1a00 1fA0 1io0 17c0 1cM0 1cM0 1a00 1fA0 1io0 1qM0 Dc0 1tA0 1cM0 1dc0 1400 gL0 IM0 s10 U00 dX0 Rc0 pd0 Rc0 gL0 Oo0 pd0 Rc0 gL0 Oo0 pd0 14o0 1cM0 1cP0 1cM0 1cM0 1cM0 1cM0 1cM0 3Co0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 qIl0 1cM0 1fA0 1cM0 1cM0 1cN0 1cL0 1cN0 1cM0 1cM0 1cM0 1cM0 1cN0 1cL0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|27e4",
  32210. "Atlantic/Reykjavik|LMT -01 +00 GMT|1s 10 0 0|012121212121212121212121212121212121212121212121212121212121212121213|-2uWmw mfaw 1Bd0 ML0 1LB0 Cn0 1LB0 3fX0 C10 HrX0 1cO0 LB0 1EL0 LA0 1C00 Oo0 1wo0 Rc0 1wo0 Rc0 1wo0 Rc0 1zc0 Oo0 1zc0 14o0 1lc0 14o0 1lc0 14o0 1o00 11A0 1lc0 14o0 1o00 14o0 1lc0 14o0 1lc0 14o0 1lc0 14o0 1lc0 14o0 1o00 14o0 1lc0 14o0 1lc0 14o0 1lc0 14o0 1lc0 14o0 1lc0 14o0 1o00 14o0 1lc0 14o0 1lc0 14o0 1lc0 14o0 1lc0 14o0 1o00 14o0|12e4",
  32211. "Atlantic/South_Georgia|-02|20|0||30",
  32212. "Atlantic/Stanley|SMT -04 -03 -02|3P.o 40 30 20|012121212121212323212121212121212121212121212121212121212121212121212|-2kJw8.A 12bA8.A 19X0 1fB0 19X0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1fB0 Cn0 1Cc10 WL0 1qL0 U10 1tz0 2mN0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1tz0 U10 1tz0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1tz0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qN0 U10 1wn0 Rd0 1wn0 U10 1tz0 U10 1tz0 U10 1tz0 U10 1tz0 U10 1wn0 U10 1tz0 U10 1tz0 U10|21e2",
  32213. "Australia/Sydney|AEST AEDT|-a0 -b0|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|-293lX xcX 10jd0 yL0 1cN0 1cL0 1fB0 19X0 17c10 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 14o0 1o00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 U00 1qM0 WM0 1tA0 WM0 1tA0 U00 1tA0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 11A0 1o00 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 WM0 1qM0 14o0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0|40e5",
  32214. "Australia/Adelaide|ACST ACDT|-9u -au|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|-293lt xcX 10jd0 yL0 1cN0 1cL0 1fB0 19X0 17c10 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 U00 1qM0 WM0 1tA0 WM0 1tA0 U00 1tA0 U00 1tA0 Oo0 1zc0 WM0 1qM0 Rc0 1zc0 U00 1tA0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 WM0 1qM0 14o0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0|11e5",
  32215. "Australia/Brisbane|AEST AEDT|-a0 -b0|01010101010101010|-293lX xcX 10jd0 yL0 1cN0 1cL0 1fB0 19X0 17c10 LA0 H1A0 Oo0 1zc0 Oo0 1zc0 Oo0|20e5",
  32216. "Australia/Broken_Hill|ACST ACDT|-9u -au|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|-293lt xcX 10jd0 yL0 1cN0 1cL0 1fB0 19X0 17c10 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 14o0 1o00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 U00 1qM0 WM0 1tA0 WM0 1tA0 U00 1tA0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 WM0 1qM0 14o0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0|18e3",
  32217. "Australia/Currie|AEST AEDT|-a0 -b0|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|-29E80 19X0 10jd0 yL0 1cN0 1cL0 1fB0 19X0 17c10 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 11A0 1qM0 WM0 1qM0 Oo0 1zc0 Oo0 1zc0 Oo0 1wo0 WM0 1tA0 WM0 1tA0 U00 1tA0 U00 1tA0 11A0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 11A0 1o00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1cM0 1a00 1io0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0|746",
  32218. "Australia/Darwin|ACST ACDT|-9u -au|010101010|-293lt xcX 10jd0 yL0 1cN0 1cL0 1fB0 19X0|12e4",
  32219. "Australia/Eucla|+0845 +0945|-8J -9J|0101010101010101010|-293kI xcX 10jd0 yL0 1cN0 1cL0 1gSp0 Oo0 l5A0 Oo0 iJA0 G00 zU00 IM0 1qM0 11A0 1o00 11A0|368",
  32220. "Australia/Hobart|AEST AEDT|-a0 -b0|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|-29E80 19X0 10jd0 yL0 1cN0 1cL0 1fB0 19X0 VfB0 1cM0 1o00 Rc0 1wo0 Rc0 1wo0 U00 1wo0 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 11A0 1qM0 WM0 1qM0 Oo0 1zc0 Oo0 1zc0 Oo0 1wo0 WM0 1tA0 WM0 1tA0 U00 1tA0 U00 1tA0 11A0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 11A0 1o00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1cM0 1a00 1io0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0|21e4",
  32221. "Australia/Lord_Howe|AEST +1030 +1130 +11|-a0 -au -bu -b0|0121212121313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313|raC0 1zdu Rb0 1zd0 On0 1zd0 On0 1zd0 On0 1zd0 TXu 1qMu WLu 1tAu WLu 1tAu TXu 1tAu Onu 1zcu Onu 1zcu Onu 1zcu Rbu 1zcu Onu 1zcu Onu 1zcu 11zu 1o0u 11zu 1o0u 11zu 1o0u 11zu 1qMu WLu 11Au 1nXu 1qMu 11zu 1o0u 11zu 1o0u 11zu 1qMu WLu 1qMu 11zu 1o0u WLu 1qMu 14nu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1fAu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1fAu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1fzu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1fAu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1fAu 1cLu 1cMu 1cLu 1cMu|347",
  32222. "Australia/Lindeman|AEST AEDT|-a0 -b0|010101010101010101010|-293lX xcX 10jd0 yL0 1cN0 1cL0 1fB0 19X0 17c10 LA0 H1A0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0|10",
  32223. "Australia/Melbourne|AEST AEDT|-a0 -b0|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|-293lX xcX 10jd0 yL0 1cN0 1cL0 1fB0 19X0 17c10 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 U00 1qM0 WM0 1qM0 11A0 1tA0 U00 1tA0 U00 1tA0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 11A0 1o00 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 WM0 1qM0 14o0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0|39e5",
  32224. "Australia/Perth|AWST AWDT|-80 -90|0101010101010101010|-293jX xcX 10jd0 yL0 1cN0 1cL0 1gSp0 Oo0 l5A0 Oo0 iJA0 G00 zU00 IM0 1qM0 11A0 1o00 11A0|18e5",
  32225. "CET|CET CEST|-10 -20|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2aFe0 11d0 1iO0 11A0 1o00 11A0 Qrc0 6i00 WM0 1fA0 1cM0 1cM0 1cM0 16M0 1gMM0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00",
  32226. "Pacific/Easter|EMT -07 -06 -05|7h.s 70 60 50|012121212121212121212121212123232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323|-1uSgG.w 1s4IG.w WL0 1zd0 On0 1ip0 11z0 1o10 11z0 1qN0 WL0 1ld0 14n0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 2pA0 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 1cL0 1cN0 11z0 1o10 11z0 1qN0 WL0 1fB0 19X0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1ip0 1fz0 1fB0 11z0 1qN0 WL0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1o10 19X0 1fB0 1nX0 G10 1EL0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1Nb0 Dd0 1Nb0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1Nb0 Dd0 1Nb0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1Nb0 Dd0 1Nb0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1Nb0 Ap0|30e2",
  32227. "CST6CDT|CST CDT CWT CPT|60 50 50 50|010102301010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 QwN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0",
  32228. "EET|EET EEST|-20 -30|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|hDB0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00",
  32229. "Europe/Dublin|DMT IST GMT BST IST|p.l -y.D 0 -10 -10|01232323232324242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242|-2ax9y.D Rc0 1fzy.D 14M0 1fc0 1g00 1co0 1dc0 1co0 1oo0 1400 1dc0 19A0 1io0 1io0 WM0 1o00 14o0 1o00 17c0 1io0 17c0 1fA0 1a00 1lc0 17c0 1io0 17c0 1fA0 1a00 1io0 17c0 1io0 17c0 1fA0 1cM0 1io0 17c0 1fA0 1a00 1io0 17c0 1io0 17c0 1fA0 1a00 1io0 1qM0 Dc0 g600 14o0 1wo0 17c0 1io0 11A0 1o00 17c0 1fA0 1a00 1fA0 1cM0 1fA0 1a00 17c0 1fA0 1a00 1io0 17c0 1lc0 17c0 1fA0 1a00 1io0 17c0 1io0 17c0 1fA0 1a00 1a00 1qM0 WM0 1qM0 11A0 1o00 WM0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1tA0 IM0 90o0 U00 1tA0 U00 1tA0 U00 1tA0 U00 1tA0 WM0 1qM0 WM0 1qM0 WM0 1tA0 U00 1tA0 U00 1tA0 11z0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 14o0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|12e5",
  32230. "EST|EST|50|0|",
  32231. "EST5EDT|EST EDT EWT EPT|50 40 40 40|010102301010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-261t0 1nX0 11B0 1nX0 SgN0 8x40 iv0 QwN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0",
  32232. "Etc/GMT-0|GMT|0|0|",
  32233. "Etc/GMT-1|+01|-10|0|",
  32234. "Pacific/Port_Moresby|+10|-a0|0||25e4",
  32235. "Pacific/Pohnpei|+11|-b0|0||34e3",
  32236. "Pacific/Tarawa|+12|-c0|0||29e3",
  32237. "Etc/GMT-13|+13|-d0|0|",
  32238. "Etc/GMT-14|+14|-e0|0|",
  32239. "Etc/GMT-2|+02|-20|0|",
  32240. "Etc/GMT-3|+03|-30|0|",
  32241. "Etc/GMT-4|+04|-40|0|",
  32242. "Etc/GMT-5|+05|-50|0|",
  32243. "Etc/GMT-6|+06|-60|0|",
  32244. "Indian/Christmas|+07|-70|0||21e2",
  32245. "Etc/GMT-8|+08|-80|0|",
  32246. "Pacific/Palau|+09|-90|0||21e3",
  32247. "Etc/GMT+1|-01|10|0|",
  32248. "Etc/GMT+10|-10|a0|0|",
  32249. "Etc/GMT+11|-11|b0|0|",
  32250. "Etc/GMT+12|-12|c0|0|",
  32251. "Etc/GMT+3|-03|30|0|",
  32252. "Etc/GMT+4|-04|40|0|",
  32253. "Etc/GMT+5|-05|50|0|",
  32254. "Etc/GMT+6|-06|60|0|",
  32255. "Etc/GMT+7|-07|70|0|",
  32256. "Etc/GMT+8|-08|80|0|",
  32257. "Etc/GMT+9|-09|90|0|",
  32258. "Etc/UCT|UCT|0|0|",
  32259. "Etc/UTC|UTC|0|0|",
  32260. "Europe/Amsterdam|AMT NST +0120 +0020 CEST CET|-j.w -1j.w -1k -k -20 -10|010101010101010101010101010101010101010101012323234545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545|-2aFcj.w 11b0 1iP0 11A0 1io0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1co0 1io0 1yo0 Pc0 1a00 1fA0 1Bc0 Mo0 1tc0 Uo0 1tA0 U00 1uo0 W00 1s00 VA0 1so0 Vc0 1sM0 UM0 1wo0 Rc0 1u00 Wo0 1rA0 W00 1s00 VA0 1sM0 UM0 1w00 fV0 BCX.w 1tA0 U00 1u00 Wo0 1sm0 601k WM0 1fA0 1cM0 1cM0 1cM0 16M0 1gMM0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|16e5",
  32261. "Europe/Andorra|WET CET CEST|0 -10 -20|012121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-UBA0 1xIN0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|79e3",
  32262. "Europe/Astrakhan|LMT +03 +04 +05|-3c.c -30 -40 -50|012323232323232323212121212121212121212121212121212121212121212|-1Pcrc.c eUMc.c 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1fA0 1cM0 3Co0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3rd0",
  32263. "Europe/Athens|AMT EET EEST CEST CET|-1y.Q -20 -30 -20 -10|012123434121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2a61x.Q CNbx.Q mn0 kU10 9b0 3Es0 Xa0 1fb0 1dd0 k3X0 Nz0 SCp0 1vc0 SO0 1cM0 1a00 1ao0 1fc0 1a10 1fG0 1cg0 1dX0 1bX0 1cQ0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|35e5",
  32264. "Europe/London|GMT BST BDST|0 -10 -20|0101010101010101010101010101010101010101010101010121212121210101210101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2axa0 Rc0 1fA0 14M0 1fc0 1g00 1co0 1dc0 1co0 1oo0 1400 1dc0 19A0 1io0 1io0 WM0 1o00 14o0 1o00 17c0 1io0 17c0 1fA0 1a00 1lc0 17c0 1io0 17c0 1fA0 1a00 1io0 17c0 1io0 17c0 1fA0 1cM0 1io0 17c0 1fA0 1a00 1io0 17c0 1io0 17c0 1fA0 1a00 1io0 1qM0 Dc0 2Rz0 Dc0 1zc0 Oo0 1zc0 Rc0 1wo0 17c0 1iM0 FA0 xB0 1fA0 1a00 14o0 bb0 LA0 xB0 Rc0 1wo0 11A0 1o00 17c0 1fA0 1a00 1fA0 1cM0 1fA0 1a00 17c0 1fA0 1a00 1io0 17c0 1lc0 17c0 1fA0 1a00 1io0 17c0 1io0 17c0 1fA0 1a00 1a00 1qM0 WM0 1qM0 11A0 1o00 WM0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1tA0 IM0 90o0 U00 1tA0 U00 1tA0 U00 1tA0 U00 1tA0 WM0 1qM0 WM0 1qM0 WM0 1tA0 U00 1tA0 U00 1tA0 11z0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 14o0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|10e6",
  32265. "Europe/Belgrade|CET CEST|-10 -20|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-19RC0 3IP0 WM0 1fA0 1cM0 1cM0 1rc0 Qo0 1vmo0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|12e5",
  32266. "Europe/Berlin|CET CEST CEMT|-10 -20 -30|01010101010101210101210101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2aFe0 11d0 1iO0 11A0 1o00 11A0 Qrc0 6i00 WM0 1fA0 1cM0 1cM0 1cM0 kL0 Nc0 m10 WM0 1ao0 1cp0 dX0 jz0 Dd0 1io0 17c0 1fA0 1a00 1ehA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|41e5",
  32267. "Europe/Prague|CET CEST GMT|-10 -20 0|01010101010101010201010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2aFe0 11d0 1iO0 11A0 1o00 11A0 Qrc0 6i00 WM0 1fA0 1cM0 1cM0 1cM0 1cM0 1qM0 11c0 mp0 xA0 mn0 17c0 1io0 17c0 1fc0 1ao0 1bNc0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|13e5",
  32268. "Europe/Brussels|WET CET CEST WEST|0 -10 -20 -10|0121212103030303030303030303030303030303030303030303212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2ehc0 3zX0 11c0 1iO0 11A0 1o00 11A0 my0 Ic0 1qM0 Rc0 1EM0 UM0 1u00 10o0 1io0 1io0 17c0 1a00 1fA0 1cM0 1cM0 1io0 17c0 1fA0 1a00 1io0 1a30 1io0 17c0 1fA0 1a00 1io0 17c0 1cM0 1cM0 1a00 1io0 1cM0 1cM0 1a00 1fA0 1io0 17c0 1cM0 1cM0 1a00 1fA0 1io0 1qM0 Dc0 y00 5Wn0 WM0 1fA0 1cM0 16M0 1iM0 16M0 1C00 Uo0 1eeo0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|21e5",
  32269. "Europe/Bucharest|BMT EET EEST|-1I.o -20 -30|0121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-1xApI.o 20LI.o RA0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1Axc0 On0 1fA0 1a10 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cK0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cL0 1cN0 1cL0 1fB0 1nX0 11E0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|19e5",
  32270. "Europe/Budapest|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2aFe0 11d0 1iO0 11A0 1ip0 17b0 1op0 1tb0 Q2m0 3Ne0 WM0 1fA0 1cM0 1cM0 1oJ0 1dc0 1030 1fA0 1cM0 1cM0 1cM0 1cM0 1fA0 1a00 1iM0 1fA0 8Ha0 Rb0 1wN0 Rb0 1BB0 Lz0 1C20 LB0 SNX0 1a10 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|17e5",
  32271. "Europe/Zurich|CET CEST|-10 -20|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-19Lc0 11A0 1o00 11A0 1xG10 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|38e4",
  32272. "Europe/Chisinau|CMT BMT EET EEST CEST CET MSK MSD|-1T -1I.o -20 -30 -20 -10 -30 -40|012323232323232323234545467676767676767676767323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-26jdT wGMa.A 20LI.o RA0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 27A0 2en0 39g0 WM0 1fA0 1cM0 V90 1t7z0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 gL0 WO0 1cM0 1cM0 1cK0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1nX0 11D0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|67e4",
  32273. "Europe/Copenhagen|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2azC0 Tz0 VuO0 60q0 WM0 1fA0 1cM0 1cM0 1cM0 S00 1HA0 Nc0 1C00 Dc0 1Nc0 Ao0 1h5A0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|12e5",
  32274. "Europe/Gibraltar|GMT BST BDST CET CEST|0 -10 -20 -10 -20|010101010101010101010101010101010101010101010101012121212121010121010101010101010101034343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343|-2axa0 Rc0 1fA0 14M0 1fc0 1g00 1co0 1dc0 1co0 1oo0 1400 1dc0 19A0 1io0 1io0 WM0 1o00 14o0 1o00 17c0 1io0 17c0 1fA0 1a00 1lc0 17c0 1io0 17c0 1fA0 1a00 1io0 17c0 1io0 17c0 1fA0 1cM0 1io0 17c0 1fA0 1a00 1io0 17c0 1io0 17c0 1fA0 1a00 1io0 1qM0 Dc0 2Rz0 Dc0 1zc0 Oo0 1zc0 Rc0 1wo0 17c0 1iM0 FA0 xB0 1fA0 1a00 14o0 bb0 LA0 xB0 Rc0 1wo0 11A0 1o00 17c0 1fA0 1a00 1fA0 1cM0 1fA0 1a00 17c0 1fA0 1a00 1io0 17c0 1lc0 17c0 1fA0 10Jz0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|30e3",
  32275. "Europe/Helsinki|HMT EET EEST|-1D.N -20 -30|0121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-1WuND.N OULD.N 1dA0 1xGq0 1cM0 1cM0 1cM0 1cN0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|12e5",
  32276. "Europe/Kaliningrad|CET CEST CET CEST MSK MSD EEST EET +03|-10 -20 -20 -30 -30 -40 -30 -20 -30|0101010101010232454545454545454546767676767676767676767676767676767676767676787|-2aFe0 11d0 1iO0 11A0 1o00 11A0 Qrc0 6i00 WM0 1fA0 1cM0 1cM0 Am0 Lb0 1en0 op0 1pNz0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|44e4",
  32277. "Europe/Kiev|KMT EET MSK CEST CET MSD EEST|-22.4 -20 -30 -20 -10 -40 -30|0123434252525252525252525256161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161|-1Pc22.4 eUo2.4 rnz0 2Hg0 WM0 1fA0 da0 1v4m0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 Db0 3220 1cK0 1cL0 1cN0 1cL0 1cN0 1cL0 1cQ0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|34e5",
  32278. "Europe/Kirov|LMT +03 +04 +05|-3i.M -30 -40 -50|01232323232323232321212121212121212121212121212121212121212121|-22WM0 qH90 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1fA0 1cM0 3Co0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|48e4",
  32279. "Europe/Lisbon|LMT WET WEST WEMT CET CEST|A.J 0 -10 -20 -10 -20|012121212121212121212121212121212121212121212321232123212321212121212121212121212121212121212121214121212121212121212121212121212124545454212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2le00 aPX0 Sp0 LX0 1vc0 Tc0 1uM0 SM0 1vc0 Tc0 1vc0 SM0 1vc0 6600 1co0 3E00 17c0 1fA0 1a00 1io0 1a00 1io0 17c0 3I00 17c0 1cM0 1cM0 3Fc0 1cM0 1a00 1fA0 1io0 17c0 1cM0 1cM0 1a00 1fA0 1io0 1qM0 Dc0 1tA0 1cM0 1dc0 1400 gL0 IM0 s10 U00 dX0 Rc0 pd0 Rc0 gL0 Oo0 pd0 Rc0 gL0 Oo0 pd0 14o0 1cM0 1cP0 1cM0 1cM0 1cM0 1cM0 1cM0 3Co0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 pvy0 1cM0 1cM0 1fA0 1cM0 1cM0 1cN0 1cL0 1cN0 1cM0 1cM0 1cM0 1cM0 1cN0 1cL0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|27e5",
  32280. "Europe/Luxembourg|LMT CET CEST WET WEST WEST WET|-o.A -10 -20 0 -10 -20 -10|0121212134343434343434343434343434343434343434343434565651212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2DG0o.A t6mo.A TB0 1nX0 Up0 1o20 11A0 rW0 CM0 1qP0 R90 1EO0 UK0 1u20 10m0 1ip0 1in0 17e0 19W0 1fB0 1db0 1cp0 1in0 17d0 1fz0 1a10 1in0 1a10 1in0 17f0 1fA0 1a00 1io0 17c0 1cM0 1cM0 1a00 1io0 1cM0 1cM0 1a00 1fA0 1io0 17c0 1cM0 1cM0 1a00 1fA0 1io0 1qM0 Dc0 vA0 60L0 WM0 1fA0 1cM0 17c0 1io0 16M0 1C00 Uo0 1eeo0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|54e4",
  32281. "Europe/Madrid|WET WEST WEMT CET CEST|0 -10 -20 -10 -20|010101010101010101210343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343|-25Td0 19B0 1cL0 1dd0 b1z0 18p0 3HX0 17d0 1fz0 1a10 1io0 1a00 1in0 17d0 iIn0 Hd0 1cL0 bb0 1200 2s20 14n0 5aL0 Mp0 1vz0 17d0 1in0 17d0 1in0 17d0 1in0 17d0 6hX0 11B0 XHX0 1a10 1fz0 1a10 19X0 1cN0 1fz0 1a10 1fC0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|62e5",
  32282. "Europe/Malta|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2arB0 Lz0 1cN0 1db0 1410 1on0 Wp0 1qL0 17d0 1cL0 M3B0 5M20 WM0 1fA0 1co0 17c0 1iM0 16m0 1de0 1lc0 14m0 1lc0 WO0 1qM0 GTW0 On0 1C10 LA0 1C00 LA0 1EM0 LA0 1C00 LA0 1zc0 Oo0 1C00 Oo0 1co0 1cM0 1lA0 Xc0 1qq0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1iN0 19z0 1fB0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|42e4",
  32283. "Europe/Minsk|MMT EET MSK CEST CET MSD EEST +03|-1O -20 -30 -20 -10 -40 -30 -30|01234343252525252525252525261616161616161616161616161616161616161617|-1Pc1O eUnO qNX0 3gQ0 WM0 1fA0 1cM0 Al0 1tsn0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 3Fc0 1cN0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0|19e5",
  32284. "Europe/Monaco|PMT WET WEST WEMT CET CEST|-9.l 0 -10 -20 -10 -20|01212121212121212121212121212121212121212121212121232323232345454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454|-2nco9.l cNb9.l HA0 19A0 1iM0 11c0 1oo0 Wo0 1rc0 QM0 1EM0 UM0 1u00 10o0 1io0 1wo0 Rc0 1a00 1fA0 1cM0 1cM0 1io0 17c0 1fA0 1a00 1io0 1a00 1io0 17c0 1fA0 1a00 1io0 17c0 1cM0 1cM0 1a00 1io0 1cM0 1cM0 1a00 1fA0 1io0 17c0 1cM0 1cM0 1a00 1fA0 1io0 1qM0 Df0 2RV0 11z0 11B0 1ze0 WM0 1fA0 1cM0 1fa0 1aq0 16M0 1ekn0 1cL0 1fC0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|38e3",
  32285. "Europe/Moscow|MMT MMT MST MDST MSD MSK +05 EET EEST MSK|-2u.h -2v.j -3v.j -4v.j -40 -30 -50 -20 -30 -40|012132345464575454545454545454545458754545454545454545454545454545454545454595|-2ag2u.h 2pyW.W 1bA0 11X0 GN0 1Hb0 c4v.j ik0 3DA0 dz0 15A0 c10 2q10 iM10 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cN0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|16e6",
  32286. "Europe/Paris|PMT WET WEST CEST CET WEMT|-9.l 0 -10 -20 -10 -20|0121212121212121212121212121212121212121212121212123434352543434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434|-2nco8.l cNb8.l HA0 19A0 1iM0 11c0 1oo0 Wo0 1rc0 QM0 1EM0 UM0 1u00 10o0 1io0 1wo0 Rc0 1a00 1fA0 1cM0 1cM0 1io0 17c0 1fA0 1a00 1io0 1a00 1io0 17c0 1fA0 1a00 1io0 17c0 1cM0 1cM0 1a00 1io0 1cM0 1cM0 1a00 1fA0 1io0 17c0 1cM0 1cM0 1a00 1fA0 1io0 1qM0 Df0 Ik0 5M30 WM0 1fA0 1cM0 Vx0 hB0 1aq0 16M0 1ekn0 1cL0 1fC0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|11e6",
  32287. "Europe/Riga|RMT LST EET MSK CEST CET MSD EEST|-1A.y -2A.y -20 -30 -20 -10 -40 -30|010102345454536363636363636363727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272|-25TzA.y 11A0 1iM0 ko0 gWm0 yDXA.y 2bX0 3fE0 WM0 1fA0 1cM0 1cM0 4m0 1sLy0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cN0 1o00 11A0 1o00 11A0 1qM0 3oo0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|64e4",
  32288. "Europe/Rome|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2arB0 Lz0 1cN0 1db0 1410 1on0 Wp0 1qL0 17d0 1cL0 M3B0 5M20 WM0 1fA0 1cM0 16M0 1iM0 16m0 1de0 1lc0 14m0 1lc0 WO0 1qM0 GTW0 On0 1C10 LA0 1C00 LA0 1EM0 LA0 1C00 LA0 1zc0 Oo0 1C00 Oo0 1C00 LA0 1zc0 Oo0 1C00 LA0 1C00 LA0 1zc0 Oo0 1C00 Oo0 1zc0 Oo0 1fC0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|39e5",
  32289. "Europe/Samara|LMT +03 +04 +05|-3k.k -30 -40 -50|0123232323232323232121232323232323232323232323232323232323212|-22WM0 qH90 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1fA0 2y10 14m0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 2sp0 WM0|12e5",
  32290. "Europe/Saratov|LMT +03 +04 +05|-34.i -30 -40 -50|012323232323232321212121212121212121212121212121212121212121212|-22WM0 qH90 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1cM0 1cM0 1fA0 1cM0 3Co0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 5810",
  32291. "Europe/Simferopol|SMT EET MSK CEST CET MSD EEST MSK|-2g -20 -30 -20 -10 -40 -30 -40|012343432525252525252525252161616525252616161616161616161616161616161616172|-1Pc2g eUog rEn0 2qs0 WM0 1fA0 1cM0 3V0 1u0L0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1Q00 4eL0 1cL0 1cN0 1cL0 1cN0 dX0 WL0 1cN0 1cL0 1fB0 1o30 11B0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11z0 1nW0|33e4",
  32292. "Europe/Sofia|EET CET CEST EEST|-20 -10 -20 -30|01212103030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030|-168L0 WM0 1fA0 1cM0 1cM0 1cN0 1mKH0 1dd0 1fb0 1ap0 1fb0 1a20 1fy0 1a30 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cK0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1nX0 11E0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|12e5",
  32293. "Europe/Stockholm|CET CEST|-10 -20|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2azC0 TB0 2yDe0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|15e5",
  32294. "Europe/Tallinn|TMT CET CEST EET MSK MSD EEST|-1D -10 -20 -20 -30 -40 -30|012103421212454545454545454546363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363|-26oND teD 11A0 1Ta0 4rXl KSLD 2FX0 2Jg0 WM0 1fA0 1cM0 18J0 1sTX0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o10 11A0 1qM0 5QM0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|41e4",
  32295. "Europe/Tirane|LMT CET CEST|-1j.k -10 -20|01212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2glBj.k 14pcj.k 5LC0 WM0 4M0 1fCK0 10n0 1op0 11z0 1pd0 11z0 1qN0 WL0 1qp0 Xb0 1qp0 Xb0 1qp0 11z0 1lB0 11z0 1qN0 11z0 1iN0 16n0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|42e4",
  32296. "Europe/Ulyanovsk|LMT +03 +04 +05 +02|-3d.A -30 -40 -50 -20|01232323232323232321214121212121212121212121212121212121212121212|-22WM0 qH90 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3rd0",
  32297. "Europe/Uzhgorod|CET CEST MSK MSD EET EEST|-10 -20 -30 -40 -20 -30|010101023232323232323232320454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454|-1cqL0 6i00 WM0 1fA0 1cM0 1ml0 1Cp0 1r3W0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1Q00 1Nf0 2pw0 1cL0 1cN0 1cL0 1cN0 1cL0 1cQ0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|11e4",
  32298. "Europe/Vienna|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2aFe0 11d0 1iO0 11A0 1o00 11A0 3KM0 14o0 LA00 6i00 WM0 1fA0 1cM0 1cM0 1cM0 400 2qM0 1a00 1cM0 1cM0 1io0 17c0 1gHa0 19X0 1cP0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|18e5",
  32299. "Europe/Vilnius|WMT KMT CET EET MSK CEST MSD EEST|-1o -1z.A -10 -20 -30 -20 -40 -30|012324525254646464646464646473737373737373737352537373737373737373737373737373737373737373737373737373737373737373737373|-293do 6ILM.o 1Ooz.A zz0 Mfd0 29W0 3is0 WM0 1fA0 1cM0 LV0 1tgL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11B0 1o00 11A0 1qM0 8io0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|54e4",
  32300. "Europe/Volgograd|LMT +03 +04 +05|-2V.E -30 -40 -50|01232323232323232121212121212121212121212121212121212121212121|-21IqV.E psLV.E 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1cM0 1cM0 1fA0 1cM0 3Co0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|10e5",
  32301. "Europe/Warsaw|WMT CET CEST EET EEST|-1o -10 -20 -20 -30|012121234312121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2ctdo 1LXo 11d0 1iO0 11A0 1o00 11A0 1on0 11A0 6zy0 HWP0 5IM0 WM0 1fA0 1cM0 1dz0 1mL0 1en0 15B0 1aq0 1nA0 11A0 1io0 17c0 1fA0 1a00 iDX0 LA0 1cM0 1cM0 1C00 Oo0 1cM0 1cM0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1C00 LA0 uso0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|17e5",
  32302. "Europe/Zaporozhye|+0220 EET MSK CEST CET MSD EEST|-2k -20 -30 -20 -10 -40 -30|01234342525252525252525252526161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161|-1Pc2k eUok rdb0 2RE0 WM0 1fA0 8m0 1v9a0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cK0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cQ0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|77e4",
  32303. "HST|HST|a0|0|",
  32304. "Indian/Chagos|LMT +05 +06|-4N.E -50 -60|012|-2xosN.E 3AGLN.E|30e2",
  32305. "Indian/Cocos|+0630|-6u|0||596",
  32306. "Indian/Kerguelen|-00 +05|0 -50|01|-MG00|130",
  32307. "Indian/Mahe|LMT +04|-3F.M -40|01|-2yO3F.M|79e3",
  32308. "Indian/Maldives|MMT +05|-4S -50|01|-olgS|35e4",
  32309. "Indian/Mauritius|LMT +04 +05|-3O -40 -50|012121|-2xorO 34unO 14L0 12kr0 11z0|15e4",
  32310. "Indian/Reunion|LMT +04|-3F.Q -40|01|-2mDDF.Q|84e4",
  32311. "Pacific/Kwajalein|+11 -12 +12|-b0 c0 -c0|012|-AX0 W9X0|14e3",
  32312. "MET|MET MEST|-10 -20|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2aFe0 11d0 1iO0 11A0 1o00 11A0 Qrc0 6i00 WM0 1fA0 1cM0 1cM0 1cM0 16M0 1gMM0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00",
  32313. "MST|MST|70|0|",
  32314. "MST7MDT|MST MDT MWT MPT|70 60 60 60|010102301010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-261r0 1nX0 11B0 1nX0 SgN0 8x20 ix0 QwN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0",
  32315. "Pacific/Chatham|+1215 +1245 +1345|-cf -cJ -dJ|012121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212|-WqAf 1adef IM0 1C00 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1qM0 14o0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1io0 17c0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1io0 17c0 1io0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00|600",
  32316. "Pacific/Apia|LMT -1130 -11 -10 +14 +13|bq.U bu b0 a0 -e0 -d0|01232345454545454545454545454545454545454545454545454545454|-2nDMx.4 1yW03.4 2rRbu 1ff0 1a00 CI0 AQ0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00|37e3",
  32317. "Pacific/Bougainville|+10 +09 +11|-a0 -90 -b0|0102|-16Wy0 7CN0 2MQp0|18e4",
  32318. "Pacific/Efate|LMT +11 +12|-bd.g -b0 -c0|0121212121212121212121|-2l9nd.g 2Szcd.g 1cL0 1oN0 10L0 1fB0 19X0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 Lz0 1Nd0 An0|66e3",
  32319. "Pacific/Enderbury|-12 -11 +13|c0 b0 -d0|012|nIc0 B7X0|1",
  32320. "Pacific/Fakaofo|-11 +13|b0 -d0|01|1Gfn0|483",
  32321. "Pacific/Fiji|LMT +12 +13|-bT.I -c0 -d0|0121212121212121212121212121212121212121212121212121212121212121|-2bUzT.I 3m8NT.I LA0 1EM0 IM0 nJc0 LA0 1o00 Rc0 1wo0 Ao0 1Nc0 Ao0 1Q00 xz0 1SN0 uM0 1SM0 uM0 1VA0 s00 1VA0 s00 1VA0 uM0 1SM0 uM0 1SM0 uM0 1VA0 s00 1VA0 s00 1VA0 s00 1VA0 uM0 1SM0 uM0 1SM0 uM0 1VA0 s00 1VA0 s00 1VA0 uM0 1SM0 uM0 1SM0 uM0 1VA0 s00 1VA0 s00 1VA0 s00 1VA0 uM0 1SM0 uM0 1SM0 uM0|88e4",
  32322. "Pacific/Galapagos|LMT -05 -06|5W.o 50 60|01212|-1yVS1.A 2dTz1.A gNd0 rz0|25e3",
  32323. "Pacific/Gambier|LMT -09|8X.M 90|01|-2jof0.c|125",
  32324. "Pacific/Guadalcanal|LMT +11|-aD.M -b0|01|-2joyD.M|11e4",
  32325. "Pacific/Guam|GST ChST|-a0 -a0|01|1fpq0|17e4",
  32326. "Pacific/Honolulu|HST HDT HST|au 9u a0|010102|-1thLu 8x0 lef0 8Pz0 46p0|37e4",
  32327. "Pacific/Kiritimati|-1040 -10 +14|aE a0 -e0|012|nIaE B7Xk|51e2",
  32328. "Pacific/Kosrae|+11 +12|-b0 -c0|010|-AX0 1bdz0|66e2",
  32329. "Pacific/Majuro|+11 +12|-b0 -c0|01|-AX0|28e3",
  32330. "Pacific/Marquesas|LMT -0930|9i 9u|01|-2joeG|86e2",
  32331. "Pacific/Pago_Pago|LMT SST|bm.M b0|01|-2nDMB.c|37e2",
  32332. "Pacific/Nauru|LMT +1130 +09 +12|-b7.E -bu -90 -c0|01213|-1Xdn7.E PvzB.E 5RCu 1ouJu|10e3",
  32333. "Pacific/Niue|-1120 -1130 -11|bk bu b0|012|-KfME 17y0a|12e2",
  32334. "Pacific/Norfolk|+1112 +1130 +1230 +11|-bc -bu -cu -b0|01213|-Kgbc W01G On0 1COp0|25e4",
  32335. "Pacific/Noumea|LMT +11 +12|-b5.M -b0 -c0|01212121|-2l9n5.M 2EqM5.M xX0 1PB0 yn0 HeP0 Ao0|98e3",
  32336. "Pacific/Pitcairn|-0830 -08|8u 80|01|18Vku|56",
  32337. "Pacific/Rarotonga|-1030 -0930 -10|au 9u a0|012121212121212121212121212|lyWu IL0 1zcu Onu 1zcu Onu 1zcu Rbu 1zcu Onu 1zcu Onu 1zcu Onu 1zcu Onu 1zcu Onu 1zcu Rbu 1zcu Onu 1zcu Onu 1zcu Onu|13e3",
  32338. "Pacific/Tahiti|LMT -10|9W.g a0|01|-2joe1.I|18e4",
  32339. "Pacific/Tongatapu|+1220 +13 +14|-ck -d0 -e0|0121212121|-1aB0k 2n5dk 15A0 1wo0 xz0 1Q10 xz0 zWN0 s00|75e3",
  32340. "PST8PDT|PST PDT PWT PPT|80 70 70 70|010102301010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-261q0 1nX0 11B0 1nX0 SgN0 8x10 iy0 QwN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0",
  32341. "WET|WET WEST|0 -10|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|hDB0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00"
  32342. ],
  32343. "links": [
  32344. "Africa/Abidjan|Africa/Bamako",
  32345. "Africa/Abidjan|Africa/Banjul",
  32346. "Africa/Abidjan|Africa/Conakry",
  32347. "Africa/Abidjan|Africa/Dakar",
  32348. "Africa/Abidjan|Africa/Freetown",
  32349. "Africa/Abidjan|Africa/Lome",
  32350. "Africa/Abidjan|Africa/Nouakchott",
  32351. "Africa/Abidjan|Africa/Ouagadougou",
  32352. "Africa/Abidjan|Africa/Timbuktu",
  32353. "Africa/Abidjan|Atlantic/St_Helena",
  32354. "Africa/Cairo|Egypt",
  32355. "Africa/Johannesburg|Africa/Maseru",
  32356. "Africa/Johannesburg|Africa/Mbabane",
  32357. "Africa/Lagos|Africa/Bangui",
  32358. "Africa/Lagos|Africa/Brazzaville",
  32359. "Africa/Lagos|Africa/Douala",
  32360. "Africa/Lagos|Africa/Kinshasa",
  32361. "Africa/Lagos|Africa/Libreville",
  32362. "Africa/Lagos|Africa/Luanda",
  32363. "Africa/Lagos|Africa/Malabo",
  32364. "Africa/Lagos|Africa/Niamey",
  32365. "Africa/Lagos|Africa/Porto-Novo",
  32366. "Africa/Maputo|Africa/Blantyre",
  32367. "Africa/Maputo|Africa/Bujumbura",
  32368. "Africa/Maputo|Africa/Gaborone",
  32369. "Africa/Maputo|Africa/Harare",
  32370. "Africa/Maputo|Africa/Kigali",
  32371. "Africa/Maputo|Africa/Lubumbashi",
  32372. "Africa/Maputo|Africa/Lusaka",
  32373. "Africa/Nairobi|Africa/Addis_Ababa",
  32374. "Africa/Nairobi|Africa/Asmara",
  32375. "Africa/Nairobi|Africa/Asmera",
  32376. "Africa/Nairobi|Africa/Dar_es_Salaam",
  32377. "Africa/Nairobi|Africa/Djibouti",
  32378. "Africa/Nairobi|Africa/Kampala",
  32379. "Africa/Nairobi|Africa/Mogadishu",
  32380. "Africa/Nairobi|Indian/Antananarivo",
  32381. "Africa/Nairobi|Indian/Comoro",
  32382. "Africa/Nairobi|Indian/Mayotte",
  32383. "Africa/Tripoli|Libya",
  32384. "America/Adak|America/Atka",
  32385. "America/Adak|US/Aleutian",
  32386. "America/Anchorage|US/Alaska",
  32387. "America/Argentina/Buenos_Aires|America/Buenos_Aires",
  32388. "America/Argentina/Catamarca|America/Argentina/ComodRivadavia",
  32389. "America/Argentina/Catamarca|America/Catamarca",
  32390. "America/Argentina/Cordoba|America/Cordoba",
  32391. "America/Argentina/Cordoba|America/Rosario",
  32392. "America/Argentina/Jujuy|America/Jujuy",
  32393. "America/Argentina/Mendoza|America/Mendoza",
  32394. "America/Atikokan|America/Coral_Harbour",
  32395. "America/Chicago|US/Central",
  32396. "America/Curacao|America/Aruba",
  32397. "America/Curacao|America/Kralendijk",
  32398. "America/Curacao|America/Lower_Princes",
  32399. "America/Denver|America/Shiprock",
  32400. "America/Denver|Navajo",
  32401. "America/Denver|US/Mountain",
  32402. "America/Detroit|US/Michigan",
  32403. "America/Edmonton|Canada/Mountain",
  32404. "America/Fort_Wayne|America/Indiana/Indianapolis",
  32405. "America/Fort_Wayne|America/Indianapolis",
  32406. "America/Fort_Wayne|US/East-Indiana",
  32407. "America/Halifax|Canada/Atlantic",
  32408. "America/Havana|Cuba",
  32409. "America/Indiana/Knox|America/Knox_IN",
  32410. "America/Indiana/Knox|US/Indiana-Starke",
  32411. "America/Jamaica|Jamaica",
  32412. "America/Kentucky/Louisville|America/Louisville",
  32413. "America/Los_Angeles|US/Pacific",
  32414. "America/Los_Angeles|US/Pacific-New",
  32415. "America/Manaus|Brazil/West",
  32416. "America/Mazatlan|Mexico/BajaSur",
  32417. "America/Mexico_City|Mexico/General",
  32418. "America/New_York|US/Eastern",
  32419. "America/Noronha|Brazil/DeNoronha",
  32420. "America/Panama|America/Cayman",
  32421. "America/Phoenix|US/Arizona",
  32422. "America/Port_of_Spain|America/Anguilla",
  32423. "America/Port_of_Spain|America/Antigua",
  32424. "America/Port_of_Spain|America/Dominica",
  32425. "America/Port_of_Spain|America/Grenada",
  32426. "America/Port_of_Spain|America/Guadeloupe",
  32427. "America/Port_of_Spain|America/Marigot",
  32428. "America/Port_of_Spain|America/Montserrat",
  32429. "America/Port_of_Spain|America/St_Barthelemy",
  32430. "America/Port_of_Spain|America/St_Kitts",
  32431. "America/Port_of_Spain|America/St_Lucia",
  32432. "America/Port_of_Spain|America/St_Thomas",
  32433. "America/Port_of_Spain|America/St_Vincent",
  32434. "America/Port_of_Spain|America/Tortola",
  32435. "America/Port_of_Spain|America/Virgin",
  32436. "America/Regina|Canada/Saskatchewan",
  32437. "America/Rio_Branco|America/Porto_Acre",
  32438. "America/Rio_Branco|Brazil/Acre",
  32439. "America/Santiago|Chile/Continental",
  32440. "America/Sao_Paulo|Brazil/East",
  32441. "America/St_Johns|Canada/Newfoundland",
  32442. "America/Tijuana|America/Ensenada",
  32443. "America/Tijuana|America/Santa_Isabel",
  32444. "America/Tijuana|Mexico/BajaNorte",
  32445. "America/Toronto|America/Montreal",
  32446. "America/Toronto|Canada/Eastern",
  32447. "America/Vancouver|Canada/Pacific",
  32448. "America/Whitehorse|Canada/Yukon",
  32449. "America/Winnipeg|Canada/Central",
  32450. "Asia/Ashgabat|Asia/Ashkhabad",
  32451. "Asia/Bangkok|Asia/Phnom_Penh",
  32452. "Asia/Bangkok|Asia/Vientiane",
  32453. "Asia/Dhaka|Asia/Dacca",
  32454. "Asia/Dubai|Asia/Muscat",
  32455. "Asia/Ho_Chi_Minh|Asia/Saigon",
  32456. "Asia/Hong_Kong|Hongkong",
  32457. "Asia/Jerusalem|Asia/Tel_Aviv",
  32458. "Asia/Jerusalem|Israel",
  32459. "Asia/Kathmandu|Asia/Katmandu",
  32460. "Asia/Kolkata|Asia/Calcutta",
  32461. "Asia/Kuala_Lumpur|Asia/Singapore",
  32462. "Asia/Kuala_Lumpur|Singapore",
  32463. "Asia/Macau|Asia/Macao",
  32464. "Asia/Makassar|Asia/Ujung_Pandang",
  32465. "Asia/Nicosia|Europe/Nicosia",
  32466. "Asia/Qatar|Asia/Bahrain",
  32467. "Asia/Rangoon|Asia/Yangon",
  32468. "Asia/Riyadh|Asia/Aden",
  32469. "Asia/Riyadh|Asia/Kuwait",
  32470. "Asia/Seoul|ROK",
  32471. "Asia/Shanghai|Asia/Chongqing",
  32472. "Asia/Shanghai|Asia/Chungking",
  32473. "Asia/Shanghai|Asia/Harbin",
  32474. "Asia/Shanghai|PRC",
  32475. "Asia/Taipei|ROC",
  32476. "Asia/Tehran|Iran",
  32477. "Asia/Thimphu|Asia/Thimbu",
  32478. "Asia/Tokyo|Japan",
  32479. "Asia/Ulaanbaatar|Asia/Ulan_Bator",
  32480. "Asia/Urumqi|Asia/Kashgar",
  32481. "Atlantic/Faroe|Atlantic/Faeroe",
  32482. "Atlantic/Reykjavik|Iceland",
  32483. "Atlantic/South_Georgia|Etc/GMT+2",
  32484. "Australia/Adelaide|Australia/South",
  32485. "Australia/Brisbane|Australia/Queensland",
  32486. "Australia/Broken_Hill|Australia/Yancowinna",
  32487. "Australia/Darwin|Australia/North",
  32488. "Australia/Hobart|Australia/Tasmania",
  32489. "Australia/Lord_Howe|Australia/LHI",
  32490. "Australia/Melbourne|Australia/Victoria",
  32491. "Australia/Perth|Australia/West",
  32492. "Australia/Sydney|Australia/ACT",
  32493. "Australia/Sydney|Australia/Canberra",
  32494. "Australia/Sydney|Australia/NSW",
  32495. "Etc/GMT-0|Etc/GMT",
  32496. "Etc/GMT-0|Etc/GMT+0",
  32497. "Etc/GMT-0|Etc/GMT0",
  32498. "Etc/GMT-0|Etc/Greenwich",
  32499. "Etc/GMT-0|GMT",
  32500. "Etc/GMT-0|GMT+0",
  32501. "Etc/GMT-0|GMT-0",
  32502. "Etc/GMT-0|GMT0",
  32503. "Etc/GMT-0|Greenwich",
  32504. "Etc/UCT|UCT",
  32505. "Etc/UTC|Etc/Universal",
  32506. "Etc/UTC|Etc/Zulu",
  32507. "Etc/UTC|UTC",
  32508. "Etc/UTC|Universal",
  32509. "Etc/UTC|Zulu",
  32510. "Europe/Belgrade|Europe/Ljubljana",
  32511. "Europe/Belgrade|Europe/Podgorica",
  32512. "Europe/Belgrade|Europe/Sarajevo",
  32513. "Europe/Belgrade|Europe/Skopje",
  32514. "Europe/Belgrade|Europe/Zagreb",
  32515. "Europe/Chisinau|Europe/Tiraspol",
  32516. "Europe/Dublin|Eire",
  32517. "Europe/Helsinki|Europe/Mariehamn",
  32518. "Europe/Istanbul|Asia/Istanbul",
  32519. "Europe/Istanbul|Turkey",
  32520. "Europe/Lisbon|Portugal",
  32521. "Europe/London|Europe/Belfast",
  32522. "Europe/London|Europe/Guernsey",
  32523. "Europe/London|Europe/Isle_of_Man",
  32524. "Europe/London|Europe/Jersey",
  32525. "Europe/London|GB",
  32526. "Europe/London|GB-Eire",
  32527. "Europe/Moscow|W-SU",
  32528. "Europe/Oslo|Arctic/Longyearbyen",
  32529. "Europe/Oslo|Atlantic/Jan_Mayen",
  32530. "Europe/Prague|Europe/Bratislava",
  32531. "Europe/Rome|Europe/San_Marino",
  32532. "Europe/Rome|Europe/Vatican",
  32533. "Europe/Warsaw|Poland",
  32534. "Europe/Zurich|Europe/Busingen",
  32535. "Europe/Zurich|Europe/Vaduz",
  32536. "Indian/Christmas|Etc/GMT-7",
  32537. "Pacific/Auckland|Antarctica/McMurdo",
  32538. "Pacific/Auckland|Antarctica/South_Pole",
  32539. "Pacific/Auckland|NZ",
  32540. "Pacific/Chatham|NZ-CHAT",
  32541. "Pacific/Easter|Chile/EasterIsland",
  32542. "Pacific/Guam|Pacific/Saipan",
  32543. "Pacific/Honolulu|Pacific/Johnston",
  32544. "Pacific/Honolulu|US/Hawaii",
  32545. "Pacific/Kwajalein|Kwajalein",
  32546. "Pacific/Pago_Pago|Pacific/Midway",
  32547. "Pacific/Pago_Pago|Pacific/Samoa",
  32548. "Pacific/Pago_Pago|US/Samoa",
  32549. "Pacific/Palau|Etc/GMT-9",
  32550. "Pacific/Pohnpei|Etc/GMT-11",
  32551. "Pacific/Pohnpei|Pacific/Ponape",
  32552. "Pacific/Port_Moresby|Etc/GMT-10",
  32553. "Pacific/Port_Moresby|Pacific/Chuuk",
  32554. "Pacific/Port_Moresby|Pacific/Truk",
  32555. "Pacific/Port_Moresby|Pacific/Yap",
  32556. "Pacific/Tarawa|Etc/GMT-12",
  32557. "Pacific/Tarawa|Pacific/Funafuti",
  32558. "Pacific/Tarawa|Pacific/Wake",
  32559. "Pacific/Tarawa|Pacific/Wallis"
  32560. ]
  32561. });
  32562. return moment;
  32563. }));
  32564. /*!
  32565. * sweetalert2 v7.24.2
  32566. * Released under the MIT License.
  32567. */
  32568. (function (global, factory) {
  32569. typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
  32570. typeof define === 'function' && define.amd ? define(factory) :
  32571. (global.Sweetalert2 = factory());
  32572. }(this, (function () { 'use strict';
  32573. var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
  32574. return typeof obj;
  32575. } : function (obj) {
  32576. return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
  32577. };
  32578. var classCallCheck = function (instance, Constructor) {
  32579. if (!(instance instanceof Constructor)) {
  32580. throw new TypeError("Cannot call a class as a function");
  32581. }
  32582. };
  32583. var createClass = function () {
  32584. function defineProperties(target, props) {
  32585. for (var i = 0; i < props.length; i++) {
  32586. var descriptor = props[i];
  32587. descriptor.enumerable = descriptor.enumerable || false;
  32588. descriptor.configurable = true;
  32589. if ("value" in descriptor) descriptor.writable = true;
  32590. Object.defineProperty(target, descriptor.key, descriptor);
  32591. }
  32592. }
  32593. return function (Constructor, protoProps, staticProps) {
  32594. if (protoProps) defineProperties(Constructor.prototype, protoProps);
  32595. if (staticProps) defineProperties(Constructor, staticProps);
  32596. return Constructor;
  32597. };
  32598. }();
  32599. var _extends = Object.assign || function (target) {
  32600. for (var i = 1; i < arguments.length; i++) {
  32601. var source = arguments[i];
  32602. for (var key in source) {
  32603. if (Object.prototype.hasOwnProperty.call(source, key)) {
  32604. target[key] = source[key];
  32605. }
  32606. }
  32607. }
  32608. return target;
  32609. };
  32610. var get = function get(object, property, receiver) {
  32611. if (object === null) object = Function.prototype;
  32612. var desc = Object.getOwnPropertyDescriptor(object, property);
  32613. if (desc === undefined) {
  32614. var parent = Object.getPrototypeOf(object);
  32615. if (parent === null) {
  32616. return undefined;
  32617. } else {
  32618. return get(parent, property, receiver);
  32619. }
  32620. } else if ("value" in desc) {
  32621. return desc.value;
  32622. } else {
  32623. var getter = desc.get;
  32624. if (getter === undefined) {
  32625. return undefined;
  32626. }
  32627. return getter.call(receiver);
  32628. }
  32629. };
  32630. var inherits = function (subClass, superClass) {
  32631. if (typeof superClass !== "function" && superClass !== null) {
  32632. throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
  32633. }
  32634. subClass.prototype = Object.create(superClass && superClass.prototype, {
  32635. constructor: {
  32636. value: subClass,
  32637. enumerable: false,
  32638. writable: true,
  32639. configurable: true
  32640. }
  32641. });
  32642. if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
  32643. };
  32644. var possibleConstructorReturn = function (self, call) {
  32645. if (!self) {
  32646. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  32647. }
  32648. return call && (typeof call === "object" || typeof call === "function") ? call : self;
  32649. };
  32650. var slicedToArray = function () {
  32651. function sliceIterator(arr, i) {
  32652. var _arr = [];
  32653. var _n = true;
  32654. var _d = false;
  32655. var _e = undefined;
  32656. try {
  32657. for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
  32658. _arr.push(_s.value);
  32659. if (i && _arr.length === i) break;
  32660. }
  32661. } catch (err) {
  32662. _d = true;
  32663. _e = err;
  32664. } finally {
  32665. try {
  32666. if (!_n && _i["return"]) _i["return"]();
  32667. } finally {
  32668. if (_d) throw _e;
  32669. }
  32670. }
  32671. return _arr;
  32672. }
  32673. return function (arr, i) {
  32674. if (Array.isArray(arr)) {
  32675. return arr;
  32676. } else if (Symbol.iterator in Object(arr)) {
  32677. return sliceIterator(arr, i);
  32678. } else {
  32679. throw new TypeError("Invalid attempt to destructure non-iterable instance");
  32680. }
  32681. };
  32682. }();
  32683. var consolePrefix = 'SweetAlert2:';
  32684. /**
  32685. * Filter the unique values into a new array
  32686. * @param arr
  32687. */
  32688. var uniqueArray = function uniqueArray(arr) {
  32689. var result = [];
  32690. for (var i = 0; i < arr.length; i++) {
  32691. if (result.indexOf(arr[i]) === -1) {
  32692. result.push(arr[i]);
  32693. }
  32694. }
  32695. return result;
  32696. };
  32697. /**
  32698. * Converts `inputOptions` into an array of `[value, label]`s
  32699. * @param inputOptions
  32700. */
  32701. var formatInputOptions = function formatInputOptions(inputOptions) {
  32702. var result = [];
  32703. if (typeof Map !== 'undefined' && inputOptions instanceof Map) {
  32704. inputOptions.forEach(function (value, key) {
  32705. result.push([key, value]);
  32706. });
  32707. } else {
  32708. Object.keys(inputOptions).forEach(function (key) {
  32709. result.push([key, inputOptions[key]]);
  32710. });
  32711. }
  32712. return result;
  32713. };
  32714. /**
  32715. * Standardise console warnings
  32716. * @param message
  32717. */
  32718. var warn = function warn(message) {
  32719. console.warn(consolePrefix + ' ' + message);
  32720. };
  32721. /**
  32722. * Standardise console errors
  32723. * @param message
  32724. */
  32725. var error = function error(message) {
  32726. console.error(consolePrefix + ' ' + message);
  32727. };
  32728. /**
  32729. * Private global state for `warnOnce`
  32730. * @type {Array}
  32731. * @private
  32732. */
  32733. var previousWarnOnceMessages = [];
  32734. /**
  32735. * Show a console warning, but only if it hasn't already been shown
  32736. * @param message
  32737. */
  32738. var warnOnce = function warnOnce(message) {
  32739. if (!(previousWarnOnceMessages.indexOf(message) !== -1)) {
  32740. previousWarnOnceMessages.push(message);
  32741. warn(message);
  32742. }
  32743. };
  32744. /**
  32745. * If `arg` is a function, call it (with no arguments or context) and return the result.
  32746. * Otherwise, just pass the value through
  32747. * @param arg
  32748. */
  32749. var callIfFunction = function callIfFunction(arg) {
  32750. return typeof arg === 'function' ? arg() : arg;
  32751. };
  32752. var isThenable = function isThenable(arg) {
  32753. return (typeof arg === 'undefined' ? 'undefined' : _typeof(arg)) === 'object' && typeof arg.then === 'function';
  32754. };
  32755. var DismissReason = Object.freeze({
  32756. cancel: 'cancel',
  32757. backdrop: 'overlay',
  32758. close: 'close',
  32759. esc: 'esc',
  32760. timer: 'timer'
  32761. });
  32762. var version = "7.24.2";
  32763. var argsToParams = function argsToParams(args) {
  32764. var params = {};
  32765. switch (_typeof(args[0])) {
  32766. case 'string':
  32767. ['title', 'html', 'type'].forEach(function (name, index) {
  32768. switch (_typeof(args[index])) {
  32769. case 'string':
  32770. params[name] = args[index];
  32771. break;
  32772. case 'undefined':
  32773. break;
  32774. default:
  32775. error('Unexpected type of ' + name + '! Expected "string", got ' + _typeof(args[index]));
  32776. }
  32777. });
  32778. break;
  32779. case 'object':
  32780. _extends(params, args[0]);
  32781. break;
  32782. default:
  32783. error('Unexpected type of argument! Expected "string" or "object", got ' + _typeof(args[0]));
  32784. return false;
  32785. }
  32786. return params;
  32787. };
  32788. /**
  32789. * Adapt a legacy inputValidator for use with expectRejections=false
  32790. */
  32791. var adaptInputValidator = function adaptInputValidator(legacyValidator) {
  32792. return function adaptedInputValidator(inputValue, extraParams) {
  32793. return legacyValidator.call(this, inputValue, extraParams).then(function () {
  32794. return undefined;
  32795. }, function (validationError) {
  32796. return validationError;
  32797. });
  32798. };
  32799. };
  32800. var swalPrefix = 'swal2-';
  32801. var prefix = function prefix(items) {
  32802. var result = {};
  32803. for (var i in items) {
  32804. result[items[i]] = swalPrefix + items[i];
  32805. }
  32806. return result;
  32807. };
  32808. var swalClasses = prefix(['container', 'shown', 'height-auto', 'iosfix', 'popup', 'modal', 'no-backdrop', 'toast', 'toast-shown', 'fade', 'show', 'hide', 'noanimation', 'close', 'title', 'header', 'content', 'actions', 'confirm', 'cancel', 'footer', 'icon', 'icon-text', 'image', 'input', 'has-input', 'file', 'range', 'select', 'radio', 'checkbox', 'textarea', 'inputerror', 'validationerror', 'progresssteps', 'activeprogressstep', 'progresscircle', 'progressline', 'loading', 'styled', 'top', 'top-start', 'top-end', 'top-left', 'top-right', 'center', 'center-start', 'center-end', 'center-left', 'center-right', 'bottom', 'bottom-start', 'bottom-end', 'bottom-left', 'bottom-right', 'grow-row', 'grow-column', 'grow-fullscreen']);
  32809. var iconTypes = prefix(['success', 'warning', 'info', 'question', 'error']);
  32810. // Remember state in cases where opening and handling a modal will fiddle with it.
  32811. var states = {
  32812. previousBodyPadding: null
  32813. };
  32814. var hasClass = function hasClass(elem, className) {
  32815. if (elem.classList) {
  32816. return elem.classList.contains(className);
  32817. }
  32818. return false;
  32819. };
  32820. var focusInput = function focusInput(input) {
  32821. input.focus();
  32822. // place cursor at end of text in text input
  32823. if (input.type !== 'file') {
  32824. // http://stackoverflow.com/a/2345915/1331425
  32825. var val = input.value;
  32826. input.value = '';
  32827. input.value = val;
  32828. }
  32829. };
  32830. var addOrRemoveClass = function addOrRemoveClass(target, classList, add) {
  32831. if (!target || !classList) {
  32832. return;
  32833. }
  32834. if (typeof classList === 'string') {
  32835. classList = classList.split(/\s+/).filter(Boolean);
  32836. }
  32837. classList.forEach(function (className) {
  32838. if (target.forEach) {
  32839. target.forEach(function (elem) {
  32840. add ? elem.classList.add(className) : elem.classList.remove(className);
  32841. });
  32842. } else {
  32843. add ? target.classList.add(className) : target.classList.remove(className);
  32844. }
  32845. });
  32846. };
  32847. var addClass = function addClass(target, classList) {
  32848. addOrRemoveClass(target, classList, true);
  32849. };
  32850. var removeClass = function removeClass(target, classList) {
  32851. addOrRemoveClass(target, classList, false);
  32852. };
  32853. var getChildByClass = function getChildByClass(elem, className) {
  32854. for (var i = 0; i < elem.childNodes.length; i++) {
  32855. if (hasClass(elem.childNodes[i], className)) {
  32856. return elem.childNodes[i];
  32857. }
  32858. }
  32859. };
  32860. var show = function show(elem) {
  32861. elem.style.opacity = '';
  32862. elem.style.display = elem.id === swalClasses.content ? 'block' : 'flex';
  32863. };
  32864. var hide = function hide(elem) {
  32865. elem.style.opacity = '';
  32866. elem.style.display = 'none';
  32867. };
  32868. var empty = function empty(elem) {
  32869. while (elem.firstChild) {
  32870. elem.removeChild(elem.firstChild);
  32871. }
  32872. };
  32873. // borrowed from jquery $(elem).is(':visible') implementation
  32874. var isVisible = function isVisible(elem) {
  32875. return elem && (elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length);
  32876. };
  32877. var removeStyleProperty = function removeStyleProperty(elem, property) {
  32878. if (elem.style.removeProperty) {
  32879. elem.style.removeProperty(property);
  32880. } else {
  32881. elem.style.removeAttribute(property);
  32882. }
  32883. };
  32884. var getContainer = function getContainer() {
  32885. return document.body.querySelector('.' + swalClasses.container);
  32886. };
  32887. var elementByClass = function elementByClass(className) {
  32888. var container = getContainer();
  32889. return container ? container.querySelector('.' + className) : null;
  32890. };
  32891. var getPopup = function getPopup() {
  32892. return elementByClass(swalClasses.popup);
  32893. };
  32894. var getIcons = function getIcons() {
  32895. var popup = getPopup();
  32896. return popup.querySelectorAll('.' + swalClasses.icon);
  32897. };
  32898. var getTitle = function getTitle() {
  32899. return elementByClass(swalClasses.title);
  32900. };
  32901. var getContent = function getContent() {
  32902. return elementByClass(swalClasses.content);
  32903. };
  32904. var getImage = function getImage() {
  32905. return elementByClass(swalClasses.image);
  32906. };
  32907. var getProgressSteps = function getProgressSteps() {
  32908. return elementByClass(swalClasses.progresssteps);
  32909. };
  32910. var getValidationError = function getValidationError() {
  32911. return elementByClass(swalClasses.validationerror);
  32912. };
  32913. var getConfirmButton = function getConfirmButton() {
  32914. return elementByClass(swalClasses.confirm);
  32915. };
  32916. var getCancelButton = function getCancelButton() {
  32917. return elementByClass(swalClasses.cancel);
  32918. };
  32919. var getButtonsWrapper = function getButtonsWrapper() {
  32920. warnOnce('swal.getButtonsWrapper() is deprecated and will be removed in the next major release, use swal.getActions() instead');
  32921. return elementByClass(swalClasses.actions);
  32922. };
  32923. var getActions = function getActions() {
  32924. return elementByClass(swalClasses.actions);
  32925. };
  32926. var getFooter = function getFooter() {
  32927. return elementByClass(swalClasses.footer);
  32928. };
  32929. var getCloseButton = function getCloseButton() {
  32930. return elementByClass(swalClasses.close);
  32931. };
  32932. var getFocusableElements = function getFocusableElements() {
  32933. var focusableElementsWithTabindex = Array.prototype.slice.call(getPopup().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])'))
  32934. // sort according to tabindex
  32935. .sort(function (a, b) {
  32936. a = parseInt(a.getAttribute('tabindex'));
  32937. b = parseInt(b.getAttribute('tabindex'));
  32938. if (a > b) {
  32939. return 1;
  32940. } else if (a < b) {
  32941. return -1;
  32942. }
  32943. return 0;
  32944. });
  32945. // https://github.com/jkup/focusable/blob/master/index.js
  32946. var otherFocusableElements = Array.prototype.slice.call(getPopup().querySelectorAll('a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [tabindex="0"], [contenteditable], audio[controls], video[controls]'));
  32947. return uniqueArray(focusableElementsWithTabindex.concat(otherFocusableElements));
  32948. };
  32949. var isModal = function isModal() {
  32950. return !document.body.classList.contains(swalClasses['toast-shown']);
  32951. };
  32952. var isToast = function isToast() {
  32953. return document.body.classList.contains(swalClasses['toast-shown']);
  32954. };
  32955. var isLoading = function isLoading() {
  32956. return getPopup().hasAttribute('data-loading');
  32957. };
  32958. // Detect Node env
  32959. var isNodeEnv = function isNodeEnv() {
  32960. return typeof window === 'undefined' || typeof document === 'undefined';
  32961. };
  32962. var sweetHTML = ('\n <div aria-labelledby="' + swalClasses.title + '" aria-describedby="' + swalClasses.content + '" class="' + swalClasses.popup + '" tabindex="-1">\n <div class="' + swalClasses.header + '">\n <ul class="' + swalClasses.progresssteps + '"></ul>\n <div class="' + swalClasses.icon + ' ' + iconTypes.error + '">\n <span class="swal2-x-mark"><span class="swal2-x-mark-line-left"></span><span class="swal2-x-mark-line-right"></span></span>\n </div>\n <div class="' + swalClasses.icon + ' ' + iconTypes.question + '">\n <span class="' + swalClasses['icon-text'] + '">?</span>\n </div>\n <div class="' + swalClasses.icon + ' ' + iconTypes.warning + '">\n <span class="' + swalClasses['icon-text'] + '">!</span>\n </div>\n <div class="' + swalClasses.icon + ' ' + iconTypes.info + '">\n <span class="' + swalClasses['icon-text'] + '">i</span>\n </div>\n <div class="' + swalClasses.icon + ' ' + iconTypes.success + '">\n <div class="swal2-success-circular-line-left"></div>\n <span class="swal2-success-line-tip"></span> <span class="swal2-success-line-long"></span>\n <div class="swal2-success-ring"></div> <div class="swal2-success-fix"></div>\n <div class="swal2-success-circular-line-right"></div>\n </div>\n <img class="' + swalClasses.image + '" />\n <h2 class="' + swalClasses.title + '" id="' + swalClasses.title + '"></h2>\n <button type="button" class="' + swalClasses.close + '">\xD7</button>\n </div>\n <div class="' + swalClasses.content + '">\n <div id="' + swalClasses.content + '"></div>\n <input class="' + swalClasses.input + '" />\n <input type="file" class="' + swalClasses.file + '" />\n <div class="' + swalClasses.range + '">\n <input type="range" />\n <output></output>\n </div>\n <select class="' + swalClasses.select + '"></select>\n <div class="' + swalClasses.radio + '"></div>\n <label for="' + swalClasses.checkbox + '" class="' + swalClasses.checkbox + '">\n <input type="checkbox" />\n </label>\n <textarea class="' + swalClasses.textarea + '"></textarea>\n <div class="' + swalClasses.validationerror + '" id="' + swalClasses.validationerror + '"></div>\n </div>\n <div class="' + swalClasses.actions + '">\n <button type="button" class="' + swalClasses.confirm + '">OK</button>\n <button type="button" class="' + swalClasses.cancel + '">Cancel</button>\n </div>\n <div class="' + swalClasses.footer + '">\n </div>\n </div>\n').replace(/(^|\n)\s*/g, '');
  32963. /*
  32964. * Add modal + backdrop to DOM
  32965. */
  32966. var init = function init(params) {
  32967. // Clean up the old popup if it exists
  32968. var c = getContainer();
  32969. if (c) {
  32970. c.parentNode.removeChild(c);
  32971. removeClass([document.documentElement, document.body], [swalClasses['no-backdrop'], swalClasses['has-input'], swalClasses['toast-shown']]);
  32972. }
  32973. if (isNodeEnv()) {
  32974. error('SweetAlert2 requires document to initialize');
  32975. return;
  32976. }
  32977. var container = document.createElement('div');
  32978. container.className = swalClasses.container;
  32979. container.innerHTML = sweetHTML;
  32980. var targetElement = typeof params.target === 'string' ? document.querySelector(params.target) : params.target;
  32981. targetElement.appendChild(container);
  32982. var popup = getPopup();
  32983. var content = getContent();
  32984. var input = getChildByClass(content, swalClasses.input);
  32985. var file = getChildByClass(content, swalClasses.file);
  32986. var range = content.querySelector('.' + swalClasses.range + ' input');
  32987. var rangeOutput = content.querySelector('.' + swalClasses.range + ' output');
  32988. var select = getChildByClass(content, swalClasses.select);
  32989. var checkbox = content.querySelector('.' + swalClasses.checkbox + ' input');
  32990. var textarea = getChildByClass(content, swalClasses.textarea);
  32991. // a11y
  32992. popup.setAttribute('role', params.toast ? 'alert' : 'dialog');
  32993. popup.setAttribute('aria-live', params.toast ? 'polite' : 'assertive');
  32994. if (!params.toast) {
  32995. popup.setAttribute('aria-modal', 'true');
  32996. }
  32997. var oldInputVal = void 0; // IE11 workaround, see #1109 for details
  32998. var resetValidationError = function resetValidationError(e) {
  32999. if (Swal.isVisible() && oldInputVal !== e.target.value) {
  33000. Swal.resetValidationError();
  33001. }
  33002. oldInputVal = e.target.value;
  33003. };
  33004. input.oninput = resetValidationError;
  33005. file.onchange = resetValidationError;
  33006. select.onchange = resetValidationError;
  33007. checkbox.onchange = resetValidationError;
  33008. textarea.oninput = resetValidationError;
  33009. range.oninput = function (e) {
  33010. resetValidationError(e);
  33011. rangeOutput.value = range.value;
  33012. };
  33013. range.onchange = function (e) {
  33014. resetValidationError(e);
  33015. range.nextSibling.value = range.value;
  33016. };
  33017. return popup;
  33018. };
  33019. var parseHtmlToContainer = function parseHtmlToContainer(param, target) {
  33020. if (!param) {
  33021. return hide(target);
  33022. }
  33023. if ((typeof param === 'undefined' ? 'undefined' : _typeof(param)) === 'object') {
  33024. target.innerHTML = '';
  33025. if (0 in param) {
  33026. for (var i = 0; i in param; i++) {
  33027. target.appendChild(param[i].cloneNode(true));
  33028. }
  33029. } else {
  33030. target.appendChild(param.cloneNode(true));
  33031. }
  33032. } else if (param) {
  33033. target.innerHTML = param;
  33034. } else {}
  33035. show(target);
  33036. };
  33037. var animationEndEvent = function () {
  33038. // Prevent run in Node env
  33039. if (isNodeEnv()) {
  33040. return false;
  33041. }
  33042. var testEl = document.createElement('div');
  33043. var transEndEventNames = {
  33044. 'WebkitAnimation': 'webkitAnimationEnd',
  33045. 'OAnimation': 'oAnimationEnd oanimationend',
  33046. 'animation': 'animationend'
  33047. };
  33048. for (var i in transEndEventNames) {
  33049. if (transEndEventNames.hasOwnProperty(i) && typeof testEl.style[i] !== 'undefined') {
  33050. return transEndEventNames[i];
  33051. }
  33052. }
  33053. return false;
  33054. }();
  33055. // Measure width of scrollbar
  33056. // https://github.com/twbs/bootstrap/blob/master/js/modal.js#L279-L286
  33057. var measureScrollbar = function measureScrollbar() {
  33058. var supportsTouch = 'ontouchstart' in window || navigator.msMaxTouchPoints;
  33059. if (supportsTouch) {
  33060. return 0;
  33061. }
  33062. var scrollDiv = document.createElement('div');
  33063. scrollDiv.style.width = '50px';
  33064. scrollDiv.style.height = '50px';
  33065. scrollDiv.style.overflow = 'scroll';
  33066. document.body.appendChild(scrollDiv);
  33067. var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;
  33068. document.body.removeChild(scrollDiv);
  33069. return scrollbarWidth;
  33070. };
  33071. var fixScrollbar = function fixScrollbar() {
  33072. // for queues, do not do this more than once
  33073. if (states.previousBodyPadding !== null) {
  33074. return;
  33075. }
  33076. // if the body has overflow
  33077. if (document.body.scrollHeight > window.innerHeight) {
  33078. // add padding so the content doesn't shift after removal of scrollbar
  33079. states.previousBodyPadding = parseInt(window.getComputedStyle(document.body).getPropertyValue('padding-right'));
  33080. document.body.style.paddingRight = states.previousBodyPadding + measureScrollbar() + 'px';
  33081. }
  33082. };
  33083. var undoScrollbar = function undoScrollbar() {
  33084. if (states.previousBodyPadding !== null) {
  33085. document.body.style.paddingRight = states.previousBodyPadding;
  33086. states.previousBodyPadding = null;
  33087. }
  33088. };
  33089. // Fix iOS scrolling http://stackoverflow.com/q/39626302/1331425
  33090. var iOSfix = function iOSfix() {
  33091. var iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
  33092. if (iOS && !hasClass(document.body, swalClasses.iosfix)) {
  33093. var offset = document.body.scrollTop;
  33094. document.body.style.top = offset * -1 + 'px';
  33095. addClass(document.body, swalClasses.iosfix);
  33096. }
  33097. };
  33098. var undoIOSfix = function undoIOSfix() {
  33099. if (hasClass(document.body, swalClasses.iosfix)) {
  33100. var offset = parseInt(document.body.style.top, 10);
  33101. removeClass(document.body, swalClasses.iosfix);
  33102. document.body.style.top = '';
  33103. document.body.scrollTop = offset * -1;
  33104. }
  33105. };
  33106. var globalState = {};
  33107. // Restore previous active (focused) element
  33108. var restoreActiveElement = function restoreActiveElement() {
  33109. var x = window.scrollX;
  33110. var y = window.scrollY;
  33111. globalState.restoreFocusTimeout = setTimeout(function () {
  33112. if (globalState.previousActiveElement && globalState.previousActiveElement.focus) {
  33113. globalState.previousActiveElement.focus();
  33114. globalState.previousActiveElement = null;
  33115. }
  33116. }, 100); // issues/900
  33117. if (typeof x !== 'undefined' && typeof y !== 'undefined') {
  33118. // IE doesn't have scrollX/scrollY support
  33119. window.scrollTo(x, y);
  33120. }
  33121. };
  33122. /*
  33123. * Global function to close sweetAlert
  33124. */
  33125. var close = function close(onClose, onAfterClose) {
  33126. var container = getContainer();
  33127. var popup = getPopup();
  33128. if (!popup) {
  33129. return;
  33130. }
  33131. if (onClose !== null && typeof onClose === 'function') {
  33132. onClose(popup);
  33133. }
  33134. removeClass(popup, swalClasses.show);
  33135. addClass(popup, swalClasses.hide);
  33136. var removePopupAndResetState = function removePopupAndResetState() {
  33137. if (!isToast()) {
  33138. restoreActiveElement();
  33139. globalState.keydownTarget.removeEventListener('keydown', globalState.keydownHandler, { capture: globalState.keydownListenerCapture });
  33140. globalState.keydownHandlerAdded = false;
  33141. }
  33142. if (container.parentNode) {
  33143. container.parentNode.removeChild(container);
  33144. }
  33145. removeClass([document.documentElement, document.body], [swalClasses.shown, swalClasses['height-auto'], swalClasses['no-backdrop'], swalClasses['has-input'], swalClasses['toast-shown']]);
  33146. if (isModal()) {
  33147. undoScrollbar();
  33148. undoIOSfix();
  33149. }
  33150. if (onAfterClose !== null && typeof onAfterClose === 'function') {
  33151. setTimeout(function () {
  33152. onAfterClose();
  33153. });
  33154. }
  33155. };
  33156. // If animation is supported, animate
  33157. if (animationEndEvent && !hasClass(popup, swalClasses.noanimation)) {
  33158. popup.addEventListener(animationEndEvent, function swalCloseEventFinished() {
  33159. popup.removeEventListener(animationEndEvent, swalCloseEventFinished);
  33160. if (hasClass(popup, swalClasses.hide)) {
  33161. removePopupAndResetState();
  33162. }
  33163. });
  33164. } else {
  33165. // Otherwise, remove immediately
  33166. removePopupAndResetState();
  33167. }
  33168. };
  33169. /*
  33170. * Global function to determine if swal2 popup is shown
  33171. */
  33172. var isVisible$1 = function isVisible() {
  33173. return !!getPopup();
  33174. };
  33175. /*
  33176. * Global function to click 'Confirm' button
  33177. */
  33178. var clickConfirm = function clickConfirm() {
  33179. return getConfirmButton().click();
  33180. };
  33181. /*
  33182. * Global function to click 'Cancel' button
  33183. */
  33184. var clickCancel = function clickCancel() {
  33185. return getCancelButton().click();
  33186. };
  33187. function fire() {
  33188. var Swal = this;
  33189. for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
  33190. args[_key] = arguments[_key];
  33191. }
  33192. return new (Function.prototype.bind.apply(Swal, [null].concat(args)))();
  33193. }
  33194. /**
  33195. * Extends a Swal class making it able to be instantiated without the `new` keyword (and thus without `Swal.fire`)
  33196. * @param ParentSwal
  33197. * @returns {NoNewKeywordSwal}
  33198. */
  33199. function withNoNewKeyword(ParentSwal) {
  33200. var NoNewKeywordSwal = function NoNewKeywordSwal() {
  33201. for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
  33202. args[_key] = arguments[_key];
  33203. }
  33204. if (!(this instanceof NoNewKeywordSwal)) {
  33205. return new (Function.prototype.bind.apply(NoNewKeywordSwal, [null].concat(args)))();
  33206. }
  33207. Object.getPrototypeOf(NoNewKeywordSwal).apply(this, args);
  33208. };
  33209. NoNewKeywordSwal.prototype = _extends(Object.create(ParentSwal.prototype), { constructor: NoNewKeywordSwal });
  33210. if (typeof Object.setPrototypeOf === 'function') {
  33211. Object.setPrototypeOf(NoNewKeywordSwal, ParentSwal);
  33212. } else {
  33213. // Android 4.4
  33214. // eslint-disable-next-line
  33215. NoNewKeywordSwal.__proto__ = ParentSwal;
  33216. }
  33217. return NoNewKeywordSwal;
  33218. }
  33219. var defaultParams = {
  33220. title: '',
  33221. titleText: '',
  33222. text: '',
  33223. html: '',
  33224. footer: '',
  33225. type: null,
  33226. toast: false,
  33227. customClass: '',
  33228. target: 'body',
  33229. backdrop: true,
  33230. animation: true,
  33231. heightAuto: true,
  33232. allowOutsideClick: true,
  33233. allowEscapeKey: true,
  33234. allowEnterKey: true,
  33235. stopKeydownPropagation: true,
  33236. keydownListenerCapture: false,
  33237. showConfirmButton: true,
  33238. showCancelButton: false,
  33239. preConfirm: null,
  33240. confirmButtonText: 'OK',
  33241. confirmButtonAriaLabel: '',
  33242. confirmButtonColor: null,
  33243. confirmButtonClass: null,
  33244. cancelButtonText: 'Cancel',
  33245. cancelButtonAriaLabel: '',
  33246. cancelButtonColor: null,
  33247. cancelButtonClass: null,
  33248. buttonsStyling: true,
  33249. reverseButtons: false,
  33250. focusConfirm: true,
  33251. focusCancel: false,
  33252. showCloseButton: false,
  33253. closeButtonAriaLabel: 'Close this dialog',
  33254. showLoaderOnConfirm: false,
  33255. imageUrl: null,
  33256. imageWidth: null,
  33257. imageHeight: null,
  33258. imageAlt: '',
  33259. imageClass: null,
  33260. timer: null,
  33261. width: null,
  33262. padding: null,
  33263. background: null,
  33264. input: null,
  33265. inputPlaceholder: '',
  33266. inputValue: '',
  33267. inputOptions: {},
  33268. inputAutoTrim: true,
  33269. inputClass: null,
  33270. inputAttributes: {},
  33271. inputValidator: null,
  33272. grow: false,
  33273. position: 'center',
  33274. progressSteps: [],
  33275. currentProgressStep: null,
  33276. progressStepsDistance: null,
  33277. onBeforeOpen: null,
  33278. onAfterClose: null,
  33279. onOpen: null,
  33280. onClose: null,
  33281. useRejections: false,
  33282. expectRejections: false
  33283. };
  33284. var deprecatedParams = ['useRejections', 'expectRejections'];
  33285. /**
  33286. * Is valid parameter
  33287. * @param {String} paramName
  33288. */
  33289. var isValidParameter = function isValidParameter(paramName) {
  33290. return defaultParams.hasOwnProperty(paramName) || paramName === 'extraParams';
  33291. };
  33292. /**
  33293. * Is deprecated parameter
  33294. * @param {String} paramName
  33295. */
  33296. var isDeprecatedParameter = function isDeprecatedParameter(paramName) {
  33297. return deprecatedParams.indexOf(paramName) !== -1;
  33298. };
  33299. /**
  33300. * Show relevant warnings for given params
  33301. *
  33302. * @param params
  33303. */
  33304. var showWarningsForParams = function showWarningsForParams(params) {
  33305. for (var param in params) {
  33306. if (!isValidParameter(param)) {
  33307. warn('Unknown parameter "' + param + '"');
  33308. }
  33309. if (isDeprecatedParameter(param)) {
  33310. warnOnce('The parameter "' + param + '" is deprecated and will be removed in the next major release.');
  33311. }
  33312. }
  33313. };
  33314. var deprecationWarning = '"setDefaults" & "resetDefaults" methods are deprecated in favor of "mixin" method and will be removed in the next major release. For new projects, use "mixin". For past projects already using "setDefaults", support will be provided through an additional package.';
  33315. var defaults$1 = {};
  33316. function withGlobalDefaults(ParentSwal) {
  33317. var SwalWithGlobalDefaults = function (_ParentSwal) {
  33318. inherits(SwalWithGlobalDefaults, _ParentSwal);
  33319. function SwalWithGlobalDefaults() {
  33320. classCallCheck(this, SwalWithGlobalDefaults);
  33321. return possibleConstructorReturn(this, (SwalWithGlobalDefaults.__proto__ || Object.getPrototypeOf(SwalWithGlobalDefaults)).apply(this, arguments));
  33322. }
  33323. createClass(SwalWithGlobalDefaults, [{
  33324. key: '_main',
  33325. value: function _main(params) {
  33326. return get(SwalWithGlobalDefaults.prototype.__proto__ || Object.getPrototypeOf(SwalWithGlobalDefaults.prototype), '_main', this).call(this, _extends({}, defaults$1, params));
  33327. }
  33328. }], [{
  33329. key: 'setDefaults',
  33330. value: function setDefaults(params) {
  33331. warnOnce(deprecationWarning);
  33332. if (!params || (typeof params === 'undefined' ? 'undefined' : _typeof(params)) !== 'object') {
  33333. throw new TypeError('SweetAlert2: The argument for setDefaults() is required and has to be a object');
  33334. }
  33335. showWarningsForParams(params);
  33336. // assign valid params from `params` to `defaults`
  33337. Object.keys(params).forEach(function (param) {
  33338. if (ParentSwal.isValidParameter(param)) {
  33339. defaults$1[param] = params[param];
  33340. }
  33341. });
  33342. }
  33343. }, {
  33344. key: 'resetDefaults',
  33345. value: function resetDefaults() {
  33346. warnOnce(deprecationWarning);
  33347. defaults$1 = {};
  33348. }
  33349. }]);
  33350. return SwalWithGlobalDefaults;
  33351. }(ParentSwal);
  33352. // Set default params if `window._swalDefaults` is an object
  33353. if (typeof window !== 'undefined' && _typeof(window._swalDefaults) === 'object') {
  33354. SwalWithGlobalDefaults.setDefaults(window._swalDefaults);
  33355. }
  33356. return SwalWithGlobalDefaults;
  33357. }
  33358. /**
  33359. * Returns an extended version of `Swal` containing `params` as defaults.
  33360. * Useful for reusing Swal configuration.
  33361. *
  33362. * For example:
  33363. *
  33364. * Before:
  33365. * const textPromptOptions = { input: 'text', showCancelButton: true }
  33366. * const {value: firstName} = await Swal({ ...textPromptOptions, title: 'What is your first name?' })
  33367. * const {value: lastName} = await Swal({ ...textPromptOptions, title: 'What is your last name?' })
  33368. *
  33369. * After:
  33370. * const TextPrompt = Swal.mixin({ input: 'text', showCancelButton: true })
  33371. * const {value: firstName} = await TextPrompt('What is your first name?')
  33372. * const {value: lastName} = await TextPrompt('What is your last name?')
  33373. *
  33374. * @param mixinParams
  33375. */
  33376. function mixin(mixinParams) {
  33377. var Swal = this;
  33378. return withNoNewKeyword(function (_Swal) {
  33379. inherits(MixinSwal, _Swal);
  33380. function MixinSwal() {
  33381. classCallCheck(this, MixinSwal);
  33382. return possibleConstructorReturn(this, (MixinSwal.__proto__ || Object.getPrototypeOf(MixinSwal)).apply(this, arguments));
  33383. }
  33384. createClass(MixinSwal, [{
  33385. key: '_main',
  33386. value: function _main(params) {
  33387. return get(MixinSwal.prototype.__proto__ || Object.getPrototypeOf(MixinSwal.prototype), '_main', this).call(this, _extends({}, mixinParams, params));
  33388. }
  33389. }]);
  33390. return MixinSwal;
  33391. }(Swal));
  33392. }
  33393. // private global state for the queue feature
  33394. var currentSteps = [];
  33395. /*
  33396. * Global function for chaining sweetAlert popups
  33397. */
  33398. var queue = function queue(steps) {
  33399. var swal = this;
  33400. currentSteps = steps;
  33401. var resetQueue = function resetQueue() {
  33402. currentSteps = [];
  33403. document.body.removeAttribute('data-swal2-queue-step');
  33404. };
  33405. var queueResult = [];
  33406. return new Promise(function (resolve, reject) {
  33407. (function step(i, callback) {
  33408. if (i < currentSteps.length) {
  33409. document.body.setAttribute('data-swal2-queue-step', i);
  33410. swal(currentSteps[i]).then(function (result) {
  33411. if (typeof result.value !== 'undefined') {
  33412. queueResult.push(result.value);
  33413. step(i + 1, callback);
  33414. } else {
  33415. resetQueue();
  33416. resolve({ dismiss: result.dismiss });
  33417. }
  33418. });
  33419. } else {
  33420. resetQueue();
  33421. resolve({ value: queueResult });
  33422. }
  33423. })(0);
  33424. });
  33425. };
  33426. /*
  33427. * Global function for getting the index of current popup in queue
  33428. */
  33429. var getQueueStep = function getQueueStep() {
  33430. return document.body.getAttribute('data-swal2-queue-step');
  33431. };
  33432. /*
  33433. * Global function for inserting a popup to the queue
  33434. */
  33435. var insertQueueStep = function insertQueueStep(step, index) {
  33436. if (index && index < currentSteps.length) {
  33437. return currentSteps.splice(index, 0, step);
  33438. }
  33439. return currentSteps.push(step);
  33440. };
  33441. /*
  33442. * Global function for deleting a popup from the queue
  33443. */
  33444. var deleteQueueStep = function deleteQueueStep(index) {
  33445. if (typeof currentSteps[index] !== 'undefined') {
  33446. currentSteps.splice(index, 1);
  33447. }
  33448. };
  33449. /**
  33450. * Show spinner instead of Confirm button and disable Cancel button
  33451. */
  33452. var showLoading = function showLoading() {
  33453. var popup = getPopup();
  33454. if (!popup) {
  33455. Swal('');
  33456. }
  33457. popup = getPopup();
  33458. var actions = getActions();
  33459. var confirmButton = getConfirmButton();
  33460. var cancelButton = getCancelButton();
  33461. show(actions);
  33462. show(confirmButton);
  33463. addClass([popup, actions], swalClasses.loading);
  33464. confirmButton.disabled = true;
  33465. cancelButton.disabled = true;
  33466. popup.setAttribute('data-loading', true);
  33467. popup.setAttribute('aria-busy', true);
  33468. popup.focus();
  33469. };
  33470. /**
  33471. * Show spinner instead of Confirm button and disable Cancel button
  33472. */
  33473. var getTimerLeft = function getTimerLeft() {
  33474. return globalState.timeout && globalState.timeout.getTimerLeft();
  33475. };
  33476. var staticMethods = Object.freeze({
  33477. isValidParameter: isValidParameter,
  33478. isDeprecatedParameter: isDeprecatedParameter,
  33479. argsToParams: argsToParams,
  33480. adaptInputValidator: adaptInputValidator,
  33481. close: close,
  33482. closePopup: close,
  33483. closeModal: close,
  33484. closeToast: close,
  33485. isVisible: isVisible$1,
  33486. clickConfirm: clickConfirm,
  33487. clickCancel: clickCancel,
  33488. getPopup: getPopup,
  33489. getTitle: getTitle,
  33490. getContent: getContent,
  33491. getImage: getImage,
  33492. getButtonsWrapper: getButtonsWrapper,
  33493. getActions: getActions,
  33494. getConfirmButton: getConfirmButton,
  33495. getCancelButton: getCancelButton,
  33496. getFooter: getFooter,
  33497. isLoading: isLoading,
  33498. fire: fire,
  33499. mixin: mixin,
  33500. queue: queue,
  33501. getQueueStep: getQueueStep,
  33502. insertQueueStep: insertQueueStep,
  33503. deleteQueueStep: deleteQueueStep,
  33504. showLoading: showLoading,
  33505. enableLoading: showLoading,
  33506. getTimerLeft: getTimerLeft
  33507. });
  33508. // https://github.com/Riim/symbol-polyfill/blob/master/index.js
  33509. var _Symbol = typeof Symbol === 'function' ? Symbol : function () {
  33510. var idCounter = 0;
  33511. function _Symbol(key) {
  33512. return '__' + key + '_' + Math.floor(Math.random() * 1e9) + '_' + ++idCounter + '__';
  33513. }
  33514. _Symbol.iterator = _Symbol('Symbol.iterator');
  33515. return _Symbol;
  33516. }();
  33517. // WeakMap polyfill, needed for Android 4.4
  33518. // Related issue: https://github.com/sweetalert2/sweetalert2/issues/1071
  33519. // http://webreflection.blogspot.fi/2015/04/a-weakmap-polyfill-in-20-lines-of-code.html
  33520. var WeakMap$1 = typeof WeakMap === 'function' ? WeakMap : function (s, dP, hOP) {
  33521. function WeakMap() {
  33522. dP(this, s, { value: _Symbol('WeakMap') });
  33523. }
  33524. WeakMap.prototype = {
  33525. 'delete': function del(o) {
  33526. delete o[this[s]];
  33527. },
  33528. get: function get(o) {
  33529. return o[this[s]];
  33530. },
  33531. has: function has(o) {
  33532. return hOP.call(o, this[s]);
  33533. },
  33534. set: function set(o, v) {
  33535. dP(o, this[s], { configurable: true, value: v });
  33536. }
  33537. };
  33538. return WeakMap;
  33539. }(_Symbol('WeakMap'), Object.defineProperty, {}.hasOwnProperty);
  33540. /**
  33541. * This module containts `WeakMap`s for each effectively-"private property" that a `swal` has.
  33542. * For example, to set the private property "foo" of `this` to "bar", you can `privateProps.foo.set(this, 'bar')`
  33543. * This is the approach that Babel will probably take to implement private methods/fields
  33544. * https://github.com/tc39/proposal-private-methods
  33545. * https://github.com/babel/babel/pull/7555
  33546. * Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module*
  33547. * then we can use that language feature.
  33548. */
  33549. var privateProps = {
  33550. promise: new WeakMap$1(),
  33551. innerParams: new WeakMap$1(),
  33552. domCache: new WeakMap$1()
  33553. };
  33554. /**
  33555. * Show spinner instead of Confirm button and disable Cancel button
  33556. */
  33557. function hideLoading() {
  33558. var innerParams = privateProps.innerParams.get(this);
  33559. var domCache = privateProps.domCache.get(this);
  33560. if (!innerParams.showConfirmButton) {
  33561. hide(domCache.confirmButton);
  33562. if (!innerParams.showCancelButton) {
  33563. hide(domCache.actions);
  33564. }
  33565. }
  33566. removeClass([domCache.popup, domCache.actions], swalClasses.loading);
  33567. domCache.popup.removeAttribute('aria-busy');
  33568. domCache.popup.removeAttribute('data-loading');
  33569. domCache.confirmButton.disabled = false;
  33570. domCache.cancelButton.disabled = false;
  33571. }
  33572. // Get input element by specified type or, if type isn't specified, by params.input
  33573. function getInput(inputType) {
  33574. var innerParams = privateProps.innerParams.get(this);
  33575. var domCache = privateProps.domCache.get(this);
  33576. inputType = inputType || innerParams.input;
  33577. if (!inputType) {
  33578. return null;
  33579. }
  33580. switch (inputType) {
  33581. case 'select':
  33582. case 'textarea':
  33583. case 'file':
  33584. return getChildByClass(domCache.content, swalClasses[inputType]);
  33585. case 'checkbox':
  33586. return domCache.popup.querySelector('.' + swalClasses.checkbox + ' input');
  33587. case 'radio':
  33588. return domCache.popup.querySelector('.' + swalClasses.radio + ' input:checked') || domCache.popup.querySelector('.' + swalClasses.radio + ' input:first-child');
  33589. case 'range':
  33590. return domCache.popup.querySelector('.' + swalClasses.range + ' input');
  33591. default:
  33592. return getChildByClass(domCache.content, swalClasses.input);
  33593. }
  33594. }
  33595. function enableButtons() {
  33596. var domCache = privateProps.domCache.get(this);
  33597. domCache.confirmButton.disabled = false;
  33598. domCache.cancelButton.disabled = false;
  33599. }
  33600. function disableButtons() {
  33601. var domCache = privateProps.domCache.get(this);
  33602. domCache.confirmButton.disabled = true;
  33603. domCache.cancelButton.disabled = true;
  33604. }
  33605. function enableConfirmButton() {
  33606. var domCache = privateProps.domCache.get(this);
  33607. domCache.confirmButton.disabled = false;
  33608. }
  33609. function disableConfirmButton() {
  33610. var domCache = privateProps.domCache.get(this);
  33611. domCache.confirmButton.disabled = true;
  33612. }
  33613. function enableInput() {
  33614. var input = this.getInput();
  33615. if (!input) {
  33616. return false;
  33617. }
  33618. if (input.type === 'radio') {
  33619. var radiosContainer = input.parentNode.parentNode;
  33620. var radios = radiosContainer.querySelectorAll('input');
  33621. for (var i = 0; i < radios.length; i++) {
  33622. radios[i].disabled = false;
  33623. }
  33624. } else {
  33625. input.disabled = false;
  33626. }
  33627. }
  33628. function disableInput() {
  33629. var input = this.getInput();
  33630. if (!input) {
  33631. return false;
  33632. }
  33633. if (input && input.type === 'radio') {
  33634. var radiosContainer = input.parentNode.parentNode;
  33635. var radios = radiosContainer.querySelectorAll('input');
  33636. for (var i = 0; i < radios.length; i++) {
  33637. radios[i].disabled = true;
  33638. }
  33639. } else {
  33640. input.disabled = true;
  33641. }
  33642. }
  33643. // Show block with validation error
  33644. function showValidationError(error) {
  33645. var domCache = privateProps.domCache.get(this);
  33646. domCache.validationError.innerHTML = error;
  33647. var popupComputedStyle = window.getComputedStyle(domCache.popup);
  33648. domCache.validationError.style.marginLeft = '-' + popupComputedStyle.getPropertyValue('padding-left');
  33649. domCache.validationError.style.marginRight = '-' + popupComputedStyle.getPropertyValue('padding-right');
  33650. show(domCache.validationError);
  33651. var input = this.getInput();
  33652. if (input) {
  33653. input.setAttribute('aria-invalid', true);
  33654. input.setAttribute('aria-describedBy', swalClasses.validationerror);
  33655. focusInput(input);
  33656. addClass(input, swalClasses.inputerror);
  33657. }
  33658. }
  33659. // Hide block with validation error
  33660. function resetValidationError() {
  33661. var domCache = privateProps.domCache.get(this);
  33662. if (domCache.validationError) {
  33663. hide(domCache.validationError);
  33664. }
  33665. var input = this.getInput();
  33666. if (input) {
  33667. input.removeAttribute('aria-invalid');
  33668. input.removeAttribute('aria-describedBy');
  33669. removeClass(input, swalClasses.inputerror);
  33670. }
  33671. }
  33672. var Timer = function Timer(callback, delay) {
  33673. classCallCheck(this, Timer);
  33674. var id, started, running;
  33675. var remaining = delay;
  33676. this.start = function () {
  33677. running = true;
  33678. started = new Date();
  33679. id = setTimeout(callback, remaining);
  33680. };
  33681. this.stop = function () {
  33682. running = false;
  33683. clearTimeout(id);
  33684. remaining -= new Date() - started;
  33685. };
  33686. this.getTimerLeft = function () {
  33687. if (running) {
  33688. this.stop();
  33689. this.start();
  33690. }
  33691. return remaining;
  33692. };
  33693. this.getStateRunning = function () {
  33694. return running;
  33695. };
  33696. this.start();
  33697. };
  33698. var defaultInputValidators = {
  33699. email: function email(string, extraParams) {
  33700. return (/^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(string) ? Promise.resolve() : Promise.reject(extraParams && extraParams.validationMessage ? extraParams.validationMessage : 'Invalid email address')
  33701. );
  33702. },
  33703. url: function url(string, extraParams) {
  33704. // taken from https://stackoverflow.com/a/3809435/1331425
  33705. return (/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_+.~#?&//=]*)$/.test(string) ? Promise.resolve() : Promise.reject(extraParams && extraParams.validationMessage ? extraParams.validationMessage : 'Invalid URL')
  33706. );
  33707. }
  33708. };
  33709. /**
  33710. * Set type, text and actions on popup
  33711. *
  33712. * @param params
  33713. * @returns {boolean}
  33714. */
  33715. function setParameters(params) {
  33716. // Use default `inputValidator` for supported input types if not provided
  33717. if (!params.inputValidator) {
  33718. Object.keys(defaultInputValidators).forEach(function (key) {
  33719. if (params.input === key) {
  33720. params.inputValidator = params.expectRejections ? defaultInputValidators[key] : Swal.adaptInputValidator(defaultInputValidators[key]);
  33721. }
  33722. });
  33723. }
  33724. // Determine if the custom target element is valid
  33725. if (!params.target || typeof params.target === 'string' && !document.querySelector(params.target) || typeof params.target !== 'string' && !params.target.appendChild) {
  33726. warn('Target parameter is not valid, defaulting to "body"');
  33727. params.target = 'body';
  33728. }
  33729. var popup = void 0;
  33730. var oldPopup = getPopup();
  33731. var targetElement = typeof params.target === 'string' ? document.querySelector(params.target) : params.target;
  33732. // If the model target has changed, refresh the popup
  33733. if (oldPopup && targetElement && oldPopup.parentNode !== targetElement.parentNode) {
  33734. popup = init(params);
  33735. } else {
  33736. popup = oldPopup || init(params);
  33737. }
  33738. // Set popup width
  33739. if (params.width) {
  33740. popup.style.width = typeof params.width === 'number' ? params.width + 'px' : params.width;
  33741. }
  33742. // Set popup padding
  33743. if (params.padding) {
  33744. popup.style.padding = typeof params.padding === 'number' ? params.padding + 'px' : params.padding;
  33745. }
  33746. // Set popup background
  33747. if (params.background) {
  33748. popup.style.background = params.background;
  33749. }
  33750. var popupBackgroundColor = window.getComputedStyle(popup).getPropertyValue('background-color');
  33751. var successIconParts = popup.querySelectorAll('[class^=swal2-success-circular-line], .swal2-success-fix');
  33752. for (var i = 0; i < successIconParts.length; i++) {
  33753. successIconParts[i].style.backgroundColor = popupBackgroundColor;
  33754. }
  33755. var container = getContainer();
  33756. var title = getTitle();
  33757. var content = getContent().querySelector('#' + swalClasses.content);
  33758. var actions = getActions();
  33759. var confirmButton = getConfirmButton();
  33760. var cancelButton = getCancelButton();
  33761. var closeButton = getCloseButton();
  33762. var footer = getFooter();
  33763. // Title
  33764. if (params.titleText) {
  33765. title.innerText = params.titleText;
  33766. } else if (params.title) {
  33767. title.innerHTML = params.title.split('\n').join('<br />');
  33768. }
  33769. if (typeof params.backdrop === 'string') {
  33770. getContainer().style.background = params.backdrop;
  33771. } else if (!params.backdrop) {
  33772. addClass([document.documentElement, document.body], swalClasses['no-backdrop']);
  33773. }
  33774. // Content as HTML
  33775. if (params.html) {
  33776. parseHtmlToContainer(params.html, content);
  33777. // Content as plain text
  33778. } else if (params.text) {
  33779. content.textContent = params.text;
  33780. show(content);
  33781. } else {
  33782. hide(content);
  33783. }
  33784. // Position
  33785. if (params.position in swalClasses) {
  33786. addClass(container, swalClasses[params.position]);
  33787. } else {
  33788. warn('The "position" parameter is not valid, defaulting to "center"');
  33789. addClass(container, swalClasses.center);
  33790. }
  33791. // Grow
  33792. if (params.grow && typeof params.grow === 'string') {
  33793. var growClass = 'grow-' + params.grow;
  33794. if (growClass in swalClasses) {
  33795. addClass(container, swalClasses[growClass]);
  33796. }
  33797. }
  33798. // Animation
  33799. if (typeof params.animation === 'function') {
  33800. params.animation = params.animation.call();
  33801. }
  33802. // Close button
  33803. if (params.showCloseButton) {
  33804. closeButton.setAttribute('aria-label', params.closeButtonAriaLabel);
  33805. show(closeButton);
  33806. } else {
  33807. hide(closeButton);
  33808. }
  33809. // Default Class
  33810. popup.className = swalClasses.popup;
  33811. if (params.toast) {
  33812. addClass([document.documentElement, document.body], swalClasses['toast-shown']);
  33813. addClass(popup, swalClasses.toast);
  33814. } else {
  33815. addClass(popup, swalClasses.modal);
  33816. }
  33817. // Custom Class
  33818. if (params.customClass) {
  33819. addClass(popup, params.customClass);
  33820. }
  33821. // Progress steps
  33822. var progressStepsContainer = getProgressSteps();
  33823. var currentProgressStep = parseInt(params.currentProgressStep === null ? Swal.getQueueStep() : params.currentProgressStep, 10);
  33824. if (params.progressSteps && params.progressSteps.length) {
  33825. show(progressStepsContainer);
  33826. empty(progressStepsContainer);
  33827. if (currentProgressStep >= params.progressSteps.length) {
  33828. warn('Invalid currentProgressStep parameter, it should be less than progressSteps.length ' + '(currentProgressStep like JS arrays starts from 0)');
  33829. }
  33830. params.progressSteps.forEach(function (step, index) {
  33831. var circle = document.createElement('li');
  33832. addClass(circle, swalClasses.progresscircle);
  33833. circle.innerHTML = step;
  33834. if (index === currentProgressStep) {
  33835. addClass(circle, swalClasses.activeprogressstep);
  33836. }
  33837. progressStepsContainer.appendChild(circle);
  33838. if (index !== params.progressSteps.length - 1) {
  33839. var line = document.createElement('li');
  33840. addClass(line, swalClasses.progressline);
  33841. if (params.progressStepsDistance) {
  33842. line.style.width = params.progressStepsDistance;
  33843. }
  33844. progressStepsContainer.appendChild(line);
  33845. }
  33846. });
  33847. } else {
  33848. hide(progressStepsContainer);
  33849. }
  33850. // Icon
  33851. var icons = getIcons();
  33852. for (var _i = 0; _i < icons.length; _i++) {
  33853. hide(icons[_i]);
  33854. }
  33855. if (params.type) {
  33856. var validType = false;
  33857. for (var iconType in iconTypes) {
  33858. if (params.type === iconType) {
  33859. validType = true;
  33860. break;
  33861. }
  33862. }
  33863. if (!validType) {
  33864. error('Unknown alert type: ' + params.type);
  33865. return false;
  33866. }
  33867. var icon = popup.querySelector('.' + swalClasses.icon + '.' + iconTypes[params.type]);
  33868. show(icon);
  33869. // Animate icon
  33870. if (params.animation) {
  33871. addClass(icon, 'swal2-animate-' + params.type + '-icon');
  33872. }
  33873. }
  33874. // Custom image
  33875. var image = getImage();
  33876. if (params.imageUrl) {
  33877. image.setAttribute('src', params.imageUrl);
  33878. image.setAttribute('alt', params.imageAlt);
  33879. show(image);
  33880. if (params.imageWidth) {
  33881. image.setAttribute('width', params.imageWidth);
  33882. } else {
  33883. image.removeAttribute('width');
  33884. }
  33885. if (params.imageHeight) {
  33886. image.setAttribute('height', params.imageHeight);
  33887. } else {
  33888. image.removeAttribute('height');
  33889. }
  33890. image.className = swalClasses.image;
  33891. if (params.imageClass) {
  33892. addClass(image, params.imageClass);
  33893. }
  33894. } else {
  33895. hide(image);
  33896. }
  33897. // Cancel button
  33898. if (params.showCancelButton) {
  33899. cancelButton.style.display = 'inline-block';
  33900. } else {
  33901. hide(cancelButton);
  33902. }
  33903. // Confirm button
  33904. if (params.showConfirmButton) {
  33905. removeStyleProperty(confirmButton, 'display');
  33906. } else {
  33907. hide(confirmButton);
  33908. }
  33909. // Actions (buttons) wrapper
  33910. if (!params.showConfirmButton && !params.showCancelButton) {
  33911. hide(actions);
  33912. } else {
  33913. show(actions);
  33914. }
  33915. // Edit text on confirm and cancel buttons
  33916. confirmButton.innerHTML = params.confirmButtonText;
  33917. cancelButton.innerHTML = params.cancelButtonText;
  33918. // ARIA labels for confirm and cancel buttons
  33919. confirmButton.setAttribute('aria-label', params.confirmButtonAriaLabel);
  33920. cancelButton.setAttribute('aria-label', params.cancelButtonAriaLabel);
  33921. // Add buttons custom classes
  33922. confirmButton.className = swalClasses.confirm;
  33923. addClass(confirmButton, params.confirmButtonClass);
  33924. cancelButton.className = swalClasses.cancel;
  33925. addClass(cancelButton, params.cancelButtonClass);
  33926. // Buttons styling
  33927. if (params.buttonsStyling) {
  33928. addClass([confirmButton, cancelButton], swalClasses.styled);
  33929. // Buttons background colors
  33930. if (params.confirmButtonColor) {
  33931. confirmButton.style.backgroundColor = params.confirmButtonColor;
  33932. }
  33933. if (params.cancelButtonColor) {
  33934. cancelButton.style.backgroundColor = params.cancelButtonColor;
  33935. }
  33936. // Loading state
  33937. var confirmButtonBackgroundColor = window.getComputedStyle(confirmButton).getPropertyValue('background-color');
  33938. confirmButton.style.borderLeftColor = confirmButtonBackgroundColor;
  33939. confirmButton.style.borderRightColor = confirmButtonBackgroundColor;
  33940. } else {
  33941. removeClass([confirmButton, cancelButton], swalClasses.styled);
  33942. confirmButton.style.backgroundColor = confirmButton.style.borderLeftColor = confirmButton.style.borderRightColor = '';
  33943. cancelButton.style.backgroundColor = cancelButton.style.borderLeftColor = cancelButton.style.borderRightColor = '';
  33944. }
  33945. // Footer
  33946. parseHtmlToContainer(params.footer, footer);
  33947. // CSS animation
  33948. if (params.animation === true) {
  33949. removeClass(popup, swalClasses.noanimation);
  33950. } else {
  33951. addClass(popup, swalClasses.noanimation);
  33952. }
  33953. // showLoaderOnConfirm && preConfirm
  33954. if (params.showLoaderOnConfirm && !params.preConfirm) {
  33955. warn('showLoaderOnConfirm is set to true, but preConfirm is not defined.\n' + 'showLoaderOnConfirm should be used together with preConfirm, see usage example:\n' + 'https://sweetalert2.github.io/#ajax-request');
  33956. }
  33957. }
  33958. /**
  33959. * Open popup, add necessary classes and styles, fix scrollbar
  33960. *
  33961. * @param {Array} params
  33962. */
  33963. var openPopup = function openPopup(params) {
  33964. var container = getContainer();
  33965. var popup = getPopup();
  33966. if (params.onBeforeOpen !== null && typeof params.onBeforeOpen === 'function') {
  33967. params.onBeforeOpen(popup);
  33968. }
  33969. if (params.animation) {
  33970. addClass(popup, swalClasses.show);
  33971. addClass(container, swalClasses.fade);
  33972. removeClass(popup, swalClasses.hide);
  33973. } else {
  33974. removeClass(popup, swalClasses.fade);
  33975. }
  33976. show(popup);
  33977. // scrolling is 'hidden' until animation is done, after that 'auto'
  33978. container.style.overflowY = 'hidden';
  33979. if (animationEndEvent && !hasClass(popup, swalClasses.noanimation)) {
  33980. popup.addEventListener(animationEndEvent, function swalCloseEventFinished() {
  33981. popup.removeEventListener(animationEndEvent, swalCloseEventFinished);
  33982. container.style.overflowY = 'auto';
  33983. });
  33984. } else {
  33985. container.style.overflowY = 'auto';
  33986. }
  33987. addClass([document.documentElement, document.body, container], swalClasses.shown);
  33988. if (params.heightAuto && params.backdrop && !params.toast) {
  33989. addClass([document.documentElement, document.body], swalClasses['height-auto']);
  33990. }
  33991. if (isModal()) {
  33992. fixScrollbar();
  33993. iOSfix();
  33994. }
  33995. if (!globalState.previousActiveElement) {
  33996. globalState.previousActiveElement = document.activeElement;
  33997. }
  33998. if (params.onOpen !== null && typeof params.onOpen === 'function') {
  33999. setTimeout(function () {
  34000. params.onOpen(popup);
  34001. });
  34002. }
  34003. };
  34004. function _main(userParams) {
  34005. var _this = this;
  34006. showWarningsForParams(userParams);
  34007. var innerParams = _extends({}, defaultParams, userParams);
  34008. setParameters(innerParams);
  34009. Object.freeze(innerParams);
  34010. privateProps.innerParams.set(this, innerParams);
  34011. // clear the previous timer
  34012. if (globalState.timeout) {
  34013. globalState.timeout.stop();
  34014. delete globalState.timeout;
  34015. }
  34016. // clear the restore focus timeout
  34017. clearTimeout(globalState.restoreFocusTimeout);
  34018. var domCache = {
  34019. popup: getPopup(),
  34020. container: getContainer(),
  34021. content: getContent(),
  34022. actions: getActions(),
  34023. confirmButton: getConfirmButton(),
  34024. cancelButton: getCancelButton(),
  34025. closeButton: getCloseButton(),
  34026. validationError: getValidationError(),
  34027. progressSteps: getProgressSteps()
  34028. };
  34029. privateProps.domCache.set(this, domCache);
  34030. var constructor = this.constructor;
  34031. return new Promise(function (resolve, reject) {
  34032. // functions to handle all resolving/rejecting/settling
  34033. var succeedWith = function succeedWith(value) {
  34034. constructor.closePopup(innerParams.onClose, innerParams.onAfterClose); // TODO: make closePopup an *instance* method
  34035. if (innerParams.useRejections) {
  34036. resolve(value);
  34037. } else {
  34038. resolve({ value: value });
  34039. }
  34040. };
  34041. var dismissWith = function dismissWith(dismiss) {
  34042. constructor.closePopup(innerParams.onClose, innerParams.onAfterClose);
  34043. if (innerParams.useRejections) {
  34044. reject(dismiss);
  34045. } else {
  34046. resolve({ dismiss: dismiss });
  34047. }
  34048. };
  34049. var errorWith = function errorWith(error$$1) {
  34050. constructor.closePopup(innerParams.onClose, innerParams.onAfterClose);
  34051. reject(error$$1);
  34052. };
  34053. // Close on timer
  34054. if (innerParams.timer) {
  34055. globalState.timeout = new Timer(function () {
  34056. dismissWith('timer');
  34057. delete globalState.timeout;
  34058. }, innerParams.timer);
  34059. }
  34060. // Get the value of the popup input
  34061. var getInputValue = function getInputValue() {
  34062. var input = _this.getInput();
  34063. if (!input) {
  34064. return null;
  34065. }
  34066. switch (innerParams.input) {
  34067. case 'checkbox':
  34068. return input.checked ? 1 : 0;
  34069. case 'radio':
  34070. return input.checked ? input.value : null;
  34071. case 'file':
  34072. return input.files.length ? input.files[0] : null;
  34073. default:
  34074. return innerParams.inputAutoTrim ? input.value.trim() : input.value;
  34075. }
  34076. };
  34077. // input autofocus
  34078. if (innerParams.input) {
  34079. setTimeout(function () {
  34080. var input = _this.getInput();
  34081. if (input) {
  34082. focusInput(input);
  34083. }
  34084. }, 0);
  34085. }
  34086. var confirm = function confirm(value) {
  34087. if (innerParams.showLoaderOnConfirm) {
  34088. constructor.showLoading(); // TODO: make showLoading an *instance* method
  34089. }
  34090. if (innerParams.preConfirm) {
  34091. _this.resetValidationError();
  34092. var preConfirmPromise = Promise.resolve().then(function () {
  34093. return innerParams.preConfirm(value, innerParams.extraParams);
  34094. });
  34095. if (innerParams.expectRejections) {
  34096. preConfirmPromise.then(function (preConfirmValue) {
  34097. return succeedWith(preConfirmValue || value);
  34098. }, function (validationError) {
  34099. _this.hideLoading();
  34100. if (validationError) {
  34101. _this.showValidationError(validationError);
  34102. }
  34103. });
  34104. } else {
  34105. preConfirmPromise.then(function (preConfirmValue) {
  34106. if (isVisible(domCache.validationError) || preConfirmValue === false) {
  34107. _this.hideLoading();
  34108. } else {
  34109. succeedWith(preConfirmValue || value);
  34110. }
  34111. }, function (error$$1) {
  34112. return errorWith(error$$1);
  34113. });
  34114. }
  34115. } else {
  34116. succeedWith(value);
  34117. }
  34118. };
  34119. // Mouse interactions
  34120. var onButtonEvent = function onButtonEvent(event) {
  34121. var e = event || window.event;
  34122. var target = e.target || e.srcElement;
  34123. var confirmButton = domCache.confirmButton,
  34124. cancelButton = domCache.cancelButton;
  34125. var targetedConfirm = confirmButton && (confirmButton === target || confirmButton.contains(target));
  34126. var targetedCancel = cancelButton && (cancelButton === target || cancelButton.contains(target));
  34127. switch (e.type) {
  34128. case 'click':
  34129. // Clicked 'confirm'
  34130. if (targetedConfirm && constructor.isVisible()) {
  34131. _this.disableButtons();
  34132. if (innerParams.input) {
  34133. var inputValue = getInputValue();
  34134. if (innerParams.inputValidator) {
  34135. _this.disableInput();
  34136. var validationPromise = Promise.resolve().then(function () {
  34137. return innerParams.inputValidator(inputValue, innerParams.extraParams);
  34138. });
  34139. if (innerParams.expectRejections) {
  34140. validationPromise.then(function () {
  34141. _this.enableButtons();
  34142. _this.enableInput();
  34143. confirm(inputValue);
  34144. }, function (validationError) {
  34145. _this.enableButtons();
  34146. _this.enableInput();
  34147. if (validationError) {
  34148. _this.showValidationError(validationError);
  34149. }
  34150. });
  34151. } else {
  34152. validationPromise.then(function (validationError) {
  34153. _this.enableButtons();
  34154. _this.enableInput();
  34155. if (validationError) {
  34156. _this.showValidationError(validationError);
  34157. } else {
  34158. confirm(inputValue);
  34159. }
  34160. }, function (error$$1) {
  34161. return errorWith(error$$1);
  34162. });
  34163. }
  34164. } else {
  34165. confirm(inputValue);
  34166. }
  34167. } else {
  34168. confirm(true);
  34169. }
  34170. // Clicked 'cancel'
  34171. } else if (targetedCancel && constructor.isVisible()) {
  34172. _this.disableButtons();
  34173. dismissWith(constructor.DismissReason.cancel);
  34174. }
  34175. break;
  34176. default:
  34177. }
  34178. };
  34179. var buttons = domCache.popup.querySelectorAll('button');
  34180. for (var i = 0; i < buttons.length; i++) {
  34181. buttons[i].onclick = onButtonEvent;
  34182. buttons[i].onmouseover = onButtonEvent;
  34183. buttons[i].onmouseout = onButtonEvent;
  34184. buttons[i].onmousedown = onButtonEvent;
  34185. }
  34186. // Closing popup by close button
  34187. domCache.closeButton.onclick = function () {
  34188. dismissWith(constructor.DismissReason.close);
  34189. };
  34190. if (innerParams.toast) {
  34191. // Closing popup by internal click
  34192. domCache.popup.onclick = function (e) {
  34193. if (innerParams.showConfirmButton || innerParams.showCancelButton || innerParams.showCloseButton || innerParams.input) {
  34194. return;
  34195. }
  34196. constructor.closePopup(innerParams.onClose, innerParams.onAfterClose);
  34197. dismissWith(constructor.DismissReason.close);
  34198. };
  34199. } else {
  34200. var ignoreOutsideClick = false;
  34201. // Ignore click events that had mousedown on the popup but mouseup on the container
  34202. // This can happen when the user drags a slider
  34203. domCache.popup.onmousedown = function () {
  34204. domCache.container.onmouseup = function (e) {
  34205. domCache.container.onmouseup = undefined;
  34206. // We only check if the mouseup target is the container because usually it doesn't
  34207. // have any other direct children aside of the popup
  34208. if (e.target === domCache.container) {
  34209. ignoreOutsideClick = true;
  34210. }
  34211. };
  34212. };
  34213. // Ignore click events that had mousedown on the container but mouseup on the popup
  34214. domCache.container.onmousedown = function () {
  34215. domCache.popup.onmouseup = function (e) {
  34216. domCache.popup.onmouseup = undefined;
  34217. // We also need to check if the mouseup target is a child of the popup
  34218. if (e.target === domCache.popup || domCache.popup.contains(e.target)) {
  34219. ignoreOutsideClick = true;
  34220. }
  34221. };
  34222. };
  34223. domCache.container.onclick = function (e) {
  34224. if (ignoreOutsideClick) {
  34225. ignoreOutsideClick = false;
  34226. return;
  34227. }
  34228. if (e.target !== domCache.container) {
  34229. return;
  34230. }
  34231. if (callIfFunction(innerParams.allowOutsideClick)) {
  34232. dismissWith(constructor.DismissReason.backdrop);
  34233. }
  34234. };
  34235. }
  34236. // Reverse buttons (Confirm on the right side)
  34237. if (innerParams.reverseButtons) {
  34238. domCache.confirmButton.parentNode.insertBefore(domCache.cancelButton, domCache.confirmButton);
  34239. } else {
  34240. domCache.confirmButton.parentNode.insertBefore(domCache.confirmButton, domCache.cancelButton);
  34241. }
  34242. // Focus handling
  34243. var setFocus = function setFocus(index, increment) {
  34244. var focusableElements = getFocusableElements(innerParams.focusCancel);
  34245. // search for visible elements and select the next possible match
  34246. for (var _i = 0; _i < focusableElements.length; _i++) {
  34247. index = index + increment;
  34248. // rollover to first item
  34249. if (index === focusableElements.length) {
  34250. index = 0;
  34251. // go to last item
  34252. } else if (index === -1) {
  34253. index = focusableElements.length - 1;
  34254. }
  34255. // determine if element is visible
  34256. var el = focusableElements[index];
  34257. if (isVisible(el)) {
  34258. return el.focus();
  34259. }
  34260. }
  34261. // no visible focusable elements, focus the popup
  34262. domCache.popup.focus();
  34263. };
  34264. var keydownHandler = function keydownHandler(e, innerParams) {
  34265. if (innerParams.stopKeydownPropagation) {
  34266. e.stopPropagation();
  34267. }
  34268. var arrowKeys = ['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown', 'Left', 'Right', 'Up', 'Down' // IE11
  34269. ];
  34270. if (e.key === 'Enter' && !e.isComposing) {
  34271. if (e.target && _this.getInput() && e.target.outerHTML === _this.getInput().outerHTML) {
  34272. if (['textarea', 'file'].indexOf(innerParams.input) !== -1) {
  34273. return; // do not submit
  34274. }
  34275. constructor.clickConfirm();
  34276. e.preventDefault();
  34277. }
  34278. // TAB
  34279. } else if (e.key === 'Tab') {
  34280. var targetElement = e.target || e.srcElement;
  34281. var focusableElements = getFocusableElements(innerParams.focusCancel);
  34282. var btnIndex = -1; // Find the button - note, this is a nodelist, not an array.
  34283. for (var _i2 = 0; _i2 < focusableElements.length; _i2++) {
  34284. if (targetElement === focusableElements[_i2]) {
  34285. btnIndex = _i2;
  34286. break;
  34287. }
  34288. }
  34289. if (!e.shiftKey) {
  34290. // Cycle to the next button
  34291. setFocus(btnIndex, 1);
  34292. } else {
  34293. // Cycle to the prev button
  34294. setFocus(btnIndex, -1);
  34295. }
  34296. e.stopPropagation();
  34297. e.preventDefault();
  34298. // ARROWS - switch focus between buttons
  34299. } else if (arrowKeys.indexOf(e.key) !== -1) {
  34300. // focus Cancel button if Confirm button is currently focused
  34301. if (document.activeElement === domCache.confirmButton && isVisible(domCache.cancelButton)) {
  34302. domCache.cancelButton.focus();
  34303. // and vice versa
  34304. } else if (document.activeElement === domCache.cancelButton && isVisible(domCache.confirmButton)) {
  34305. domCache.confirmButton.focus();
  34306. }
  34307. // ESC
  34308. } else if ((e.key === 'Escape' || e.key === 'Esc') && callIfFunction(innerParams.allowEscapeKey) === true) {
  34309. dismissWith(constructor.DismissReason.esc);
  34310. }
  34311. };
  34312. if (globalState.keydownHandlerAdded) {
  34313. globalState.keydownTarget.removeEventListener('keydown', globalState.keydownHandler, { capture: globalState.keydownListenerCapture });
  34314. globalState.keydownHandlerAdded = false;
  34315. }
  34316. if (!innerParams.toast) {
  34317. globalState.keydownHandler = function (e) {
  34318. return keydownHandler(e, innerParams);
  34319. };
  34320. globalState.keydownTarget = innerParams.keydownListenerCapture ? window : domCache.popup;
  34321. globalState.keydownListenerCapture = innerParams.keydownListenerCapture;
  34322. globalState.keydownTarget.addEventListener('keydown', globalState.keydownHandler, { capture: globalState.keydownListenerCapture });
  34323. globalState.keydownHandlerAdded = true;
  34324. }
  34325. _this.enableButtons();
  34326. _this.hideLoading();
  34327. _this.resetValidationError();
  34328. if (innerParams.input) {
  34329. addClass(document.body, swalClasses['has-input']);
  34330. }
  34331. // inputs
  34332. var inputTypes = ['input', 'file', 'range', 'select', 'radio', 'checkbox', 'textarea'];
  34333. var input = void 0;
  34334. for (var _i3 = 0; _i3 < inputTypes.length; _i3++) {
  34335. var inputClass = swalClasses[inputTypes[_i3]];
  34336. var inputContainer = getChildByClass(domCache.content, inputClass);
  34337. input = _this.getInput(inputTypes[_i3]);
  34338. // set attributes
  34339. if (input) {
  34340. for (var j in input.attributes) {
  34341. if (input.attributes.hasOwnProperty(j)) {
  34342. var attrName = input.attributes[j].name;
  34343. if (attrName !== 'type' && attrName !== 'value') {
  34344. input.removeAttribute(attrName);
  34345. }
  34346. }
  34347. }
  34348. for (var attr in innerParams.inputAttributes) {
  34349. input.setAttribute(attr, innerParams.inputAttributes[attr]);
  34350. }
  34351. }
  34352. // set class
  34353. inputContainer.className = inputClass;
  34354. if (innerParams.inputClass) {
  34355. addClass(inputContainer, innerParams.inputClass);
  34356. }
  34357. hide(inputContainer);
  34358. }
  34359. var populateInputOptions = void 0;
  34360. switch (innerParams.input) {
  34361. case 'text':
  34362. case 'email':
  34363. case 'password':
  34364. case 'number':
  34365. case 'tel':
  34366. case 'url':
  34367. input = getChildByClass(domCache.content, swalClasses.input);
  34368. input.value = innerParams.inputValue;
  34369. input.placeholder = innerParams.inputPlaceholder;
  34370. input.type = innerParams.input;
  34371. show(input);
  34372. break;
  34373. case 'file':
  34374. input = getChildByClass(domCache.content, swalClasses.file);
  34375. input.placeholder = innerParams.inputPlaceholder;
  34376. input.type = innerParams.input;
  34377. show(input);
  34378. break;
  34379. case 'range':
  34380. var range = getChildByClass(domCache.content, swalClasses.range);
  34381. var rangeInput = range.querySelector('input');
  34382. var rangeOutput = range.querySelector('output');
  34383. rangeInput.value = innerParams.inputValue;
  34384. rangeInput.type = innerParams.input;
  34385. rangeOutput.value = innerParams.inputValue;
  34386. show(range);
  34387. break;
  34388. case 'select':
  34389. var select = getChildByClass(domCache.content, swalClasses.select);
  34390. select.innerHTML = '';
  34391. if (innerParams.inputPlaceholder) {
  34392. var placeholder = document.createElement('option');
  34393. placeholder.innerHTML = innerParams.inputPlaceholder;
  34394. placeholder.value = '';
  34395. placeholder.disabled = true;
  34396. placeholder.selected = true;
  34397. select.appendChild(placeholder);
  34398. }
  34399. populateInputOptions = function populateInputOptions(inputOptions) {
  34400. inputOptions.forEach(function (_ref) {
  34401. var _ref2 = slicedToArray(_ref, 2),
  34402. optionValue = _ref2[0],
  34403. optionLabel = _ref2[1];
  34404. var option = document.createElement('option');
  34405. option.value = optionValue;
  34406. option.innerHTML = optionLabel;
  34407. if (innerParams.inputValue.toString() === optionValue.toString()) {
  34408. option.selected = true;
  34409. }
  34410. select.appendChild(option);
  34411. });
  34412. show(select);
  34413. select.focus();
  34414. };
  34415. break;
  34416. case 'radio':
  34417. var radio = getChildByClass(domCache.content, swalClasses.radio);
  34418. radio.innerHTML = '';
  34419. populateInputOptions = function populateInputOptions(inputOptions) {
  34420. inputOptions.forEach(function (_ref3) {
  34421. var _ref4 = slicedToArray(_ref3, 2),
  34422. radioValue = _ref4[0],
  34423. radioLabel = _ref4[1];
  34424. var radioInput = document.createElement('input');
  34425. var radioLabelElement = document.createElement('label');
  34426. radioInput.type = 'radio';
  34427. radioInput.name = swalClasses.radio;
  34428. radioInput.value = radioValue;
  34429. if (innerParams.inputValue.toString() === radioValue.toString()) {
  34430. radioInput.checked = true;
  34431. }
  34432. radioLabelElement.innerHTML = radioLabel;
  34433. radioLabelElement.insertBefore(radioInput, radioLabelElement.firstChild);
  34434. radio.appendChild(radioLabelElement);
  34435. });
  34436. show(radio);
  34437. var radios = radio.querySelectorAll('input');
  34438. if (radios.length) {
  34439. radios[0].focus();
  34440. }
  34441. };
  34442. break;
  34443. case 'checkbox':
  34444. var checkbox = getChildByClass(domCache.content, swalClasses.checkbox);
  34445. var checkboxInput = _this.getInput('checkbox');
  34446. checkboxInput.type = 'checkbox';
  34447. checkboxInput.value = 1;
  34448. checkboxInput.id = swalClasses.checkbox;
  34449. checkboxInput.checked = Boolean(innerParams.inputValue);
  34450. var label = checkbox.getElementsByTagName('span');
  34451. if (label.length) {
  34452. checkbox.removeChild(label[0]);
  34453. }
  34454. label = document.createElement('span');
  34455. label.innerHTML = innerParams.inputPlaceholder;
  34456. checkbox.appendChild(label);
  34457. show(checkbox);
  34458. break;
  34459. case 'textarea':
  34460. var textarea = getChildByClass(domCache.content, swalClasses.textarea);
  34461. textarea.value = innerParams.inputValue;
  34462. textarea.placeholder = innerParams.inputPlaceholder;
  34463. show(textarea);
  34464. break;
  34465. case null:
  34466. break;
  34467. default:
  34468. error('Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "' + innerParams.input + '"');
  34469. break;
  34470. }
  34471. if (innerParams.input === 'select' || innerParams.input === 'radio') {
  34472. var processInputOptions = function processInputOptions(inputOptions) {
  34473. return populateInputOptions(formatInputOptions(inputOptions));
  34474. };
  34475. if (isThenable(innerParams.inputOptions)) {
  34476. constructor.showLoading();
  34477. innerParams.inputOptions.then(function (inputOptions) {
  34478. _this.hideLoading();
  34479. processInputOptions(inputOptions);
  34480. });
  34481. } else if (_typeof(innerParams.inputOptions) === 'object') {
  34482. processInputOptions(innerParams.inputOptions);
  34483. } else {
  34484. error('Unexpected type of inputOptions! Expected object, Map or Promise, got ' + _typeof(innerParams.inputOptions));
  34485. }
  34486. } else if (['text', 'email', 'number', 'tel', 'textarea'].indexOf(innerParams.input) !== -1 && isThenable(innerParams.inputValue)) {
  34487. constructor.showLoading();
  34488. hide(input);
  34489. innerParams.inputValue.then(function (inputValue) {
  34490. input.value = innerParams.input === 'number' ? parseFloat(inputValue) || 0 : inputValue + '';
  34491. show(input);
  34492. _this.hideLoading();
  34493. }).catch(function (err) {
  34494. error('Error in inputValue promise: ' + err);
  34495. input.value = '';
  34496. show(input);
  34497. _this.hideLoading();
  34498. });
  34499. }
  34500. openPopup(innerParams);
  34501. if (!innerParams.toast) {
  34502. if (!callIfFunction(innerParams.allowEnterKey)) {
  34503. if (document.activeElement) {
  34504. document.activeElement.blur();
  34505. }
  34506. } else if (innerParams.focusCancel && isVisible(domCache.cancelButton)) {
  34507. domCache.cancelButton.focus();
  34508. } else if (innerParams.focusConfirm && isVisible(domCache.confirmButton)) {
  34509. domCache.confirmButton.focus();
  34510. } else {
  34511. setFocus(-1, 1);
  34512. }
  34513. }
  34514. // fix scroll
  34515. domCache.container.scrollTop = 0;
  34516. });
  34517. }
  34518. var instanceMethods = Object.freeze({
  34519. hideLoading: hideLoading,
  34520. disableLoading: hideLoading,
  34521. getInput: getInput,
  34522. enableButtons: enableButtons,
  34523. disableButtons: disableButtons,
  34524. enableConfirmButton: enableConfirmButton,
  34525. disableConfirmButton: disableConfirmButton,
  34526. enableInput: enableInput,
  34527. disableInput: disableInput,
  34528. showValidationError: showValidationError,
  34529. resetValidationError: resetValidationError,
  34530. _main: _main
  34531. });
  34532. var currentInstance = void 0;
  34533. // SweetAlert constructor
  34534. function SweetAlert() {
  34535. // Prevent run in Node env
  34536. if (typeof window === 'undefined') {
  34537. return;
  34538. }
  34539. // Check for the existence of Promise
  34540. if (typeof Promise === 'undefined') {
  34541. error('This package requires a Promise library, please include a shim to enable it in this browser (See: https://github.com/sweetalert2/sweetalert2/wiki/Migration-from-SweetAlert-to-SweetAlert2#1-ie-support)');
  34542. }
  34543. for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
  34544. args[_key] = arguments[_key];
  34545. }
  34546. if (typeof args[0] === 'undefined') {
  34547. error('SweetAlert2 expects at least 1 attribute!');
  34548. return false;
  34549. }
  34550. currentInstance = this;
  34551. var outerParams = Object.freeze(this.constructor.argsToParams(args));
  34552. Object.defineProperties(this, {
  34553. params: {
  34554. value: outerParams,
  34555. writable: false,
  34556. enumerable: true
  34557. }
  34558. });
  34559. var promise = this._main(this.params);
  34560. privateProps.promise.set(this, promise);
  34561. }
  34562. // `catch` cannot be the name of a module export, so we define our thenable methods here instead
  34563. SweetAlert.prototype.then = function (onFulfilled, onRejected) {
  34564. var promise = privateProps.promise.get(this);
  34565. return promise.then(onFulfilled, onRejected);
  34566. };
  34567. SweetAlert.prototype.catch = function (onRejected) {
  34568. var promise = privateProps.promise.get(this);
  34569. return promise.catch(onRejected);
  34570. };
  34571. SweetAlert.prototype.finally = function (onFinally) {
  34572. var promise = privateProps.promise.get(this);
  34573. return promise.finally(onFinally);
  34574. };
  34575. // Assign instance methods from src/instanceMethods/*.js to prototype
  34576. _extends(SweetAlert.prototype, instanceMethods);
  34577. // Assign static methods from src/staticMethods/*.js to constructor
  34578. _extends(SweetAlert, staticMethods);
  34579. // Proxy to instance methods to constructor, for now, for backwards compatibility
  34580. Object.keys(instanceMethods).forEach(function (key) {
  34581. SweetAlert[key] = function () {
  34582. if (currentInstance) {
  34583. var _currentInstance;
  34584. return (_currentInstance = currentInstance)[key].apply(_currentInstance, arguments);
  34585. }
  34586. };
  34587. });
  34588. SweetAlert.DismissReason = DismissReason;
  34589. SweetAlert.noop = function () {};
  34590. SweetAlert.version = version;
  34591. var Swal = withNoNewKeyword(withGlobalDefaults(SweetAlert));
  34592. Swal.default = Swal;
  34593. return Swal;
  34594. })));
  34595. if (typeof window !== 'undefined' && window.Sweetalert2){ window.swal = window.sweetAlert = window.Swal = window.SweetAlert = window.Sweetalert2}
  34596. "undefined"!=typeof document&&function(e,t){var n=e.createElement("style");if(e.getElementsByTagName("head")[0].appendChild(n),n.styleSheet)n.styleSheet.disabled||(n.styleSheet.cssText=t);else try{n.innerHTML=t}catch(e){n.innerText=t}}(document,"@-webkit-keyframes swal2-show {\n" +
  34597. " 0% {\n" +
  34598. " -webkit-transform: scale(0.7);\n" +
  34599. " transform: scale(0.7); }\n" +
  34600. " 45% {\n" +
  34601. " -webkit-transform: scale(1.05);\n" +
  34602. " transform: scale(1.05); }\n" +
  34603. " 80% {\n" +
  34604. " -webkit-transform: scale(0.95);\n" +
  34605. " transform: scale(0.95); }\n" +
  34606. " 100% {\n" +
  34607. " -webkit-transform: scale(1);\n" +
  34608. " transform: scale(1); } }\n" +
  34609. "\n" +
  34610. "@keyframes swal2-show {\n" +
  34611. " 0% {\n" +
  34612. " -webkit-transform: scale(0.7);\n" +
  34613. " transform: scale(0.7); }\n" +
  34614. " 45% {\n" +
  34615. " -webkit-transform: scale(1.05);\n" +
  34616. " transform: scale(1.05); }\n" +
  34617. " 80% {\n" +
  34618. " -webkit-transform: scale(0.95);\n" +
  34619. " transform: scale(0.95); }\n" +
  34620. " 100% {\n" +
  34621. " -webkit-transform: scale(1);\n" +
  34622. " transform: scale(1); } }\n" +
  34623. "\n" +
  34624. "@-webkit-keyframes swal2-hide {\n" +
  34625. " 0% {\n" +
  34626. " -webkit-transform: scale(1);\n" +
  34627. " transform: scale(1);\n" +
  34628. " opacity: 1; }\n" +
  34629. " 100% {\n" +
  34630. " -webkit-transform: scale(0.5);\n" +
  34631. " transform: scale(0.5);\n" +
  34632. " opacity: 0; } }\n" +
  34633. "\n" +
  34634. "@keyframes swal2-hide {\n" +
  34635. " 0% {\n" +
  34636. " -webkit-transform: scale(1);\n" +
  34637. " transform: scale(1);\n" +
  34638. " opacity: 1; }\n" +
  34639. " 100% {\n" +
  34640. " -webkit-transform: scale(0.5);\n" +
  34641. " transform: scale(0.5);\n" +
  34642. " opacity: 0; } }\n" +
  34643. "\n" +
  34644. "@-webkit-keyframes swal2-animate-success-line-tip {\n" +
  34645. " 0% {\n" +
  34646. " top: 1.1875em;\n" +
  34647. " left: .0625em;\n" +
  34648. " width: 0; }\n" +
  34649. " 54% {\n" +
  34650. " top: 1.0625em;\n" +
  34651. " left: .125em;\n" +
  34652. " width: 0; }\n" +
  34653. " 70% {\n" +
  34654. " top: 2.1875em;\n" +
  34655. " left: -.375em;\n" +
  34656. " width: 3.125em; }\n" +
  34657. " 84% {\n" +
  34658. " top: 3em;\n" +
  34659. " left: 1.3125em;\n" +
  34660. " width: 1.0625em; }\n" +
  34661. " 100% {\n" +
  34662. " top: 2.8125em;\n" +
  34663. " left: .875em;\n" +
  34664. " width: 1.5625em; } }\n" +
  34665. "\n" +
  34666. "@keyframes swal2-animate-success-line-tip {\n" +
  34667. " 0% {\n" +
  34668. " top: 1.1875em;\n" +
  34669. " left: .0625em;\n" +
  34670. " width: 0; }\n" +
  34671. " 54% {\n" +
  34672. " top: 1.0625em;\n" +
  34673. " left: .125em;\n" +
  34674. " width: 0; }\n" +
  34675. " 70% {\n" +
  34676. " top: 2.1875em;\n" +
  34677. " left: -.375em;\n" +
  34678. " width: 3.125em; }\n" +
  34679. " 84% {\n" +
  34680. " top: 3em;\n" +
  34681. " left: 1.3125em;\n" +
  34682. " width: 1.0625em; }\n" +
  34683. " 100% {\n" +
  34684. " top: 2.8125em;\n" +
  34685. " left: .875em;\n" +
  34686. " width: 1.5625em; } }\n" +
  34687. "\n" +
  34688. "@-webkit-keyframes swal2-animate-success-line-long {\n" +
  34689. " 0% {\n" +
  34690. " top: 3.375em;\n" +
  34691. " right: 2.875em;\n" +
  34692. " width: 0; }\n" +
  34693. " 65% {\n" +
  34694. " top: 3.375em;\n" +
  34695. " right: 2.875em;\n" +
  34696. " width: 0; }\n" +
  34697. " 84% {\n" +
  34698. " top: 2.1875em;\n" +
  34699. " right: 0;\n" +
  34700. " width: 3.4375em; }\n" +
  34701. " 100% {\n" +
  34702. " top: 2.375em;\n" +
  34703. " right: .5em;\n" +
  34704. " width: 2.9375em; } }\n" +
  34705. "\n" +
  34706. "@keyframes swal2-animate-success-line-long {\n" +
  34707. " 0% {\n" +
  34708. " top: 3.375em;\n" +
  34709. " right: 2.875em;\n" +
  34710. " width: 0; }\n" +
  34711. " 65% {\n" +
  34712. " top: 3.375em;\n" +
  34713. " right: 2.875em;\n" +
  34714. " width: 0; }\n" +
  34715. " 84% {\n" +
  34716. " top: 2.1875em;\n" +
  34717. " right: 0;\n" +
  34718. " width: 3.4375em; }\n" +
  34719. " 100% {\n" +
  34720. " top: 2.375em;\n" +
  34721. " right: .5em;\n" +
  34722. " width: 2.9375em; } }\n" +
  34723. "\n" +
  34724. "@-webkit-keyframes swal2-rotate-success-circular-line {\n" +
  34725. " 0% {\n" +
  34726. " -webkit-transform: rotate(-45deg);\n" +
  34727. " transform: rotate(-45deg); }\n" +
  34728. " 5% {\n" +
  34729. " -webkit-transform: rotate(-45deg);\n" +
  34730. " transform: rotate(-45deg); }\n" +
  34731. " 12% {\n" +
  34732. " -webkit-transform: rotate(-405deg);\n" +
  34733. " transform: rotate(-405deg); }\n" +
  34734. " 100% {\n" +
  34735. " -webkit-transform: rotate(-405deg);\n" +
  34736. " transform: rotate(-405deg); } }\n" +
  34737. "\n" +
  34738. "@keyframes swal2-rotate-success-circular-line {\n" +
  34739. " 0% {\n" +
  34740. " -webkit-transform: rotate(-45deg);\n" +
  34741. " transform: rotate(-45deg); }\n" +
  34742. " 5% {\n" +
  34743. " -webkit-transform: rotate(-45deg);\n" +
  34744. " transform: rotate(-45deg); }\n" +
  34745. " 12% {\n" +
  34746. " -webkit-transform: rotate(-405deg);\n" +
  34747. " transform: rotate(-405deg); }\n" +
  34748. " 100% {\n" +
  34749. " -webkit-transform: rotate(-405deg);\n" +
  34750. " transform: rotate(-405deg); } }\n" +
  34751. "\n" +
  34752. "@-webkit-keyframes swal2-animate-error-x-mark {\n" +
  34753. " 0% {\n" +
  34754. " margin-top: 1.625em;\n" +
  34755. " -webkit-transform: scale(0.4);\n" +
  34756. " transform: scale(0.4);\n" +
  34757. " opacity: 0; }\n" +
  34758. " 50% {\n" +
  34759. " margin-top: 1.625em;\n" +
  34760. " -webkit-transform: scale(0.4);\n" +
  34761. " transform: scale(0.4);\n" +
  34762. " opacity: 0; }\n" +
  34763. " 80% {\n" +
  34764. " margin-top: -.375em;\n" +
  34765. " -webkit-transform: scale(1.15);\n" +
  34766. " transform: scale(1.15); }\n" +
  34767. " 100% {\n" +
  34768. " margin-top: 0;\n" +
  34769. " -webkit-transform: scale(1);\n" +
  34770. " transform: scale(1);\n" +
  34771. " opacity: 1; } }\n" +
  34772. "\n" +
  34773. "@keyframes swal2-animate-error-x-mark {\n" +
  34774. " 0% {\n" +
  34775. " margin-top: 1.625em;\n" +
  34776. " -webkit-transform: scale(0.4);\n" +
  34777. " transform: scale(0.4);\n" +
  34778. " opacity: 0; }\n" +
  34779. " 50% {\n" +
  34780. " margin-top: 1.625em;\n" +
  34781. " -webkit-transform: scale(0.4);\n" +
  34782. " transform: scale(0.4);\n" +
  34783. " opacity: 0; }\n" +
  34784. " 80% {\n" +
  34785. " margin-top: -.375em;\n" +
  34786. " -webkit-transform: scale(1.15);\n" +
  34787. " transform: scale(1.15); }\n" +
  34788. " 100% {\n" +
  34789. " margin-top: 0;\n" +
  34790. " -webkit-transform: scale(1);\n" +
  34791. " transform: scale(1);\n" +
  34792. " opacity: 1; } }\n" +
  34793. "\n" +
  34794. "@-webkit-keyframes swal2-animate-error-icon {\n" +
  34795. " 0% {\n" +
  34796. " -webkit-transform: rotateX(100deg);\n" +
  34797. " transform: rotateX(100deg);\n" +
  34798. " opacity: 0; }\n" +
  34799. " 100% {\n" +
  34800. " -webkit-transform: rotateX(0deg);\n" +
  34801. " transform: rotateX(0deg);\n" +
  34802. " opacity: 1; } }\n" +
  34803. "\n" +
  34804. "@keyframes swal2-animate-error-icon {\n" +
  34805. " 0% {\n" +
  34806. " -webkit-transform: rotateX(100deg);\n" +
  34807. " transform: rotateX(100deg);\n" +
  34808. " opacity: 0; }\n" +
  34809. " 100% {\n" +
  34810. " -webkit-transform: rotateX(0deg);\n" +
  34811. " transform: rotateX(0deg);\n" +
  34812. " opacity: 1; } }\n" +
  34813. "\n" +
  34814. "body.swal2-toast-shown.swal2-has-input > .swal2-container > .swal2-toast {\n" +
  34815. " flex-direction: column;\n" +
  34816. " align-items: stretch; }\n" +
  34817. " body.swal2-toast-shown.swal2-has-input > .swal2-container > .swal2-toast .swal2-actions {\n" +
  34818. " flex: 1;\n" +
  34819. " align-self: stretch;\n" +
  34820. " justify-content: flex-end;\n" +
  34821. " height: 2.2em; }\n" +
  34822. " body.swal2-toast-shown.swal2-has-input > .swal2-container > .swal2-toast .swal2-loading {\n" +
  34823. " justify-content: center; }\n" +
  34824. " body.swal2-toast-shown.swal2-has-input > .swal2-container > .swal2-toast .swal2-input {\n" +
  34825. " height: 2em;\n" +
  34826. " margin: .3125em auto;\n" +
  34827. " font-size: 1em; }\n" +
  34828. " body.swal2-toast-shown.swal2-has-input > .swal2-container > .swal2-toast .swal2-validationerror {\n" +
  34829. " font-size: 1em; }\n" +
  34830. "\n" +
  34831. "body.swal2-toast-shown > .swal2-container {\n" +
  34832. " position: fixed;\n" +
  34833. " background-color: transparent; }\n" +
  34834. " body.swal2-toast-shown > .swal2-container.swal2-shown {\n" +
  34835. " background-color: transparent; }\n" +
  34836. " body.swal2-toast-shown > .swal2-container.swal2-top {\n" +
  34837. " top: 0;\n" +
  34838. " right: auto;\n" +
  34839. " bottom: auto;\n" +
  34840. " left: 50%;\n" +
  34841. " -webkit-transform: translateX(-50%);\n" +
  34842. " transform: translateX(-50%); }\n" +
  34843. " body.swal2-toast-shown > .swal2-container.swal2-top-end, body.swal2-toast-shown > .swal2-container.swal2-top-right {\n" +
  34844. " top: 0;\n" +
  34845. " right: 0;\n" +
  34846. " bottom: auto;\n" +
  34847. " left: auto; }\n" +
  34848. " body.swal2-toast-shown > .swal2-container.swal2-top-start, body.swal2-toast-shown > .swal2-container.swal2-top-left {\n" +
  34849. " top: 0;\n" +
  34850. " right: auto;\n" +
  34851. " bottom: auto;\n" +
  34852. " left: 0; }\n" +
  34853. " body.swal2-toast-shown > .swal2-container.swal2-center-start, body.swal2-toast-shown > .swal2-container.swal2-center-left {\n" +
  34854. " top: 50%;\n" +
  34855. " right: auto;\n" +
  34856. " bottom: auto;\n" +
  34857. " left: 0;\n" +
  34858. " -webkit-transform: translateY(-50%);\n" +
  34859. " transform: translateY(-50%); }\n" +
  34860. " body.swal2-toast-shown > .swal2-container.swal2-center {\n" +
  34861. " top: 50%;\n" +
  34862. " right: auto;\n" +
  34863. " bottom: auto;\n" +
  34864. " left: 50%;\n" +
  34865. " -webkit-transform: translate(-50%, -50%);\n" +
  34866. " transform: translate(-50%, -50%); }\n" +
  34867. " body.swal2-toast-shown > .swal2-container.swal2-center-end, body.swal2-toast-shown > .swal2-container.swal2-center-right {\n" +
  34868. " top: 50%;\n" +
  34869. " right: 0;\n" +
  34870. " bottom: auto;\n" +
  34871. " left: auto;\n" +
  34872. " -webkit-transform: translateY(-50%);\n" +
  34873. " transform: translateY(-50%); }\n" +
  34874. " body.swal2-toast-shown > .swal2-container.swal2-bottom-start, body.swal2-toast-shown > .swal2-container.swal2-bottom-left {\n" +
  34875. " top: auto;\n" +
  34876. " right: auto;\n" +
  34877. " bottom: 0;\n" +
  34878. " left: 0; }\n" +
  34879. " body.swal2-toast-shown > .swal2-container.swal2-bottom {\n" +
  34880. " top: auto;\n" +
  34881. " right: auto;\n" +
  34882. " bottom: 0;\n" +
  34883. " left: 50%;\n" +
  34884. " -webkit-transform: translateX(-50%);\n" +
  34885. " transform: translateX(-50%); }\n" +
  34886. " body.swal2-toast-shown > .swal2-container.swal2-bottom-end, body.swal2-toast-shown > .swal2-container.swal2-bottom-right {\n" +
  34887. " top: auto;\n" +
  34888. " right: 0;\n" +
  34889. " bottom: 0;\n" +
  34890. " left: auto; }\n" +
  34891. "\n" +
  34892. ".swal2-popup.swal2-toast {\n" +
  34893. " flex-direction: row;\n" +
  34894. " align-items: center;\n" +
  34895. " width: auto;\n" +
  34896. " padding: 0.625em;\n" +
  34897. " box-shadow: 0 0 0.625em #d9d9d9;\n" +
  34898. " overflow-y: hidden; }\n" +
  34899. " .swal2-popup.swal2-toast .swal2-header {\n" +
  34900. " flex-direction: row; }\n" +
  34901. " .swal2-popup.swal2-toast .swal2-title {\n" +
  34902. " justify-content: flex-start;\n" +
  34903. " margin: 0 .6em;\n" +
  34904. " font-size: 1em; }\n" +
  34905. " .swal2-popup.swal2-toast .swal2-close {\n" +
  34906. " position: initial; }\n" +
  34907. " .swal2-popup.swal2-toast .swal2-content {\n" +
  34908. " justify-content: flex-start;\n" +
  34909. " font-size: 1em; }\n" +
  34910. " .swal2-popup.swal2-toast .swal2-icon {\n" +
  34911. " width: 2em;\n" +
  34912. " min-width: 2em;\n" +
  34913. " height: 2em;\n" +
  34914. " margin: 0; }\n" +
  34915. " .swal2-popup.swal2-toast .swal2-icon-text {\n" +
  34916. " font-size: 2em;\n" +
  34917. " font-weight: bold;\n" +
  34918. " line-height: 1em; }\n" +
  34919. " .swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring {\n" +
  34920. " width: 2em;\n" +
  34921. " height: 2em; }\n" +
  34922. " .swal2-popup.swal2-toast .swal2-icon.swal2-error [class^='swal2-x-mark-line'] {\n" +
  34923. " top: .875em;\n" +
  34924. " width: 1.375em; }\n" +
  34925. " .swal2-popup.swal2-toast .swal2-icon.swal2-error [class^='swal2-x-mark-line'][class$='left'] {\n" +
  34926. " left: .3125em; }\n" +
  34927. " .swal2-popup.swal2-toast .swal2-icon.swal2-error [class^='swal2-x-mark-line'][class$='right'] {\n" +
  34928. " right: .3125em; }\n" +
  34929. " .swal2-popup.swal2-toast .swal2-actions {\n" +
  34930. " height: auto;\n" +
  34931. " margin: 0 .3125em; }\n" +
  34932. " .swal2-popup.swal2-toast .swal2-styled {\n" +
  34933. " margin: 0 .3125em;\n" +
  34934. " padding: .3125em .625em;\n" +
  34935. " font-size: 1em; }\n" +
  34936. " .swal2-popup.swal2-toast .swal2-styled:focus {\n" +
  34937. " box-shadow: 0 0 0 0.0625em #fff, 0 0 0 0.125em rgba(50, 100, 150, 0.4); }\n" +
  34938. " .swal2-popup.swal2-toast .swal2-success {\n" +
  34939. " border-color: #a5dc86; }\n" +
  34940. " .swal2-popup.swal2-toast .swal2-success [class^='swal2-success-circular-line'] {\n" +
  34941. " position: absolute;\n" +
  34942. " width: 2em;\n" +
  34943. " height: 2.8125em;\n" +
  34944. " -webkit-transform: rotate(45deg);\n" +
  34945. " transform: rotate(45deg);\n" +
  34946. " border-radius: 50%; }\n" +
  34947. " .swal2-popup.swal2-toast .swal2-success [class^='swal2-success-circular-line'][class$='left'] {\n" +
  34948. " top: -.25em;\n" +
  34949. " left: -.9375em;\n" +
  34950. " -webkit-transform: rotate(-45deg);\n" +
  34951. " transform: rotate(-45deg);\n" +
  34952. " -webkit-transform-origin: 2em 2em;\n" +
  34953. " transform-origin: 2em 2em;\n" +
  34954. " border-radius: 4em 0 0 4em; }\n" +
  34955. " .swal2-popup.swal2-toast .swal2-success [class^='swal2-success-circular-line'][class$='right'] {\n" +
  34956. " top: -.25em;\n" +
  34957. " left: .9375em;\n" +
  34958. " -webkit-transform-origin: 0 2em;\n" +
  34959. " transform-origin: 0 2em;\n" +
  34960. " border-radius: 0 4em 4em 0; }\n" +
  34961. " .swal2-popup.swal2-toast .swal2-success .swal2-success-ring {\n" +
  34962. " width: 2em;\n" +
  34963. " height: 2em; }\n" +
  34964. " .swal2-popup.swal2-toast .swal2-success .swal2-success-fix {\n" +
  34965. " top: 0;\n" +
  34966. " left: .4375em;\n" +
  34967. " width: .4375em;\n" +
  34968. " height: 2.6875em; }\n" +
  34969. " .swal2-popup.swal2-toast .swal2-success [class^='swal2-success-line'] {\n" +
  34970. " height: .3125em; }\n" +
  34971. " .swal2-popup.swal2-toast .swal2-success [class^='swal2-success-line'][class$='tip'] {\n" +
  34972. " top: 1.125em;\n" +
  34973. " left: .1875em;\n" +
  34974. " width: .75em; }\n" +
  34975. " .swal2-popup.swal2-toast .swal2-success [class^='swal2-success-line'][class$='long'] {\n" +
  34976. " top: .9375em;\n" +
  34977. " right: .1875em;\n" +
  34978. " width: 1.375em; }\n" +
  34979. " .swal2-popup.swal2-toast.swal2-show {\n" +
  34980. " -webkit-animation: showSweetToast .5s;\n" +
  34981. " animation: showSweetToast .5s; }\n" +
  34982. " .swal2-popup.swal2-toast.swal2-hide {\n" +
  34983. " -webkit-animation: hideSweetToast .2s forwards;\n" +
  34984. " animation: hideSweetToast .2s forwards; }\n" +
  34985. " .swal2-popup.swal2-toast .swal2-animate-success-icon .swal2-success-line-tip {\n" +
  34986. " -webkit-animation: animate-toast-success-tip .75s;\n" +
  34987. " animation: animate-toast-success-tip .75s; }\n" +
  34988. " .swal2-popup.swal2-toast .swal2-animate-success-icon .swal2-success-line-long {\n" +
  34989. " -webkit-animation: animate-toast-success-long .75s;\n" +
  34990. " animation: animate-toast-success-long .75s; }\n" +
  34991. "\n" +
  34992. "@-webkit-keyframes showSweetToast {\n" +
  34993. " 0% {\n" +
  34994. " -webkit-transform: translateY(-0.625em) rotateZ(2deg);\n" +
  34995. " transform: translateY(-0.625em) rotateZ(2deg);\n" +
  34996. " opacity: 0; }\n" +
  34997. " 33% {\n" +
  34998. " -webkit-transform: translateY(0) rotateZ(-2deg);\n" +
  34999. " transform: translateY(0) rotateZ(-2deg);\n" +
  35000. " opacity: .5; }\n" +
  35001. " 66% {\n" +
  35002. " -webkit-transform: translateY(0.3125em) rotateZ(2deg);\n" +
  35003. " transform: translateY(0.3125em) rotateZ(2deg);\n" +
  35004. " opacity: .7; }\n" +
  35005. " 100% {\n" +
  35006. " -webkit-transform: translateY(0) rotateZ(0);\n" +
  35007. " transform: translateY(0) rotateZ(0);\n" +
  35008. " opacity: 1; } }\n" +
  35009. "\n" +
  35010. "@keyframes showSweetToast {\n" +
  35011. " 0% {\n" +
  35012. " -webkit-transform: translateY(-0.625em) rotateZ(2deg);\n" +
  35013. " transform: translateY(-0.625em) rotateZ(2deg);\n" +
  35014. " opacity: 0; }\n" +
  35015. " 33% {\n" +
  35016. " -webkit-transform: translateY(0) rotateZ(-2deg);\n" +
  35017. " transform: translateY(0) rotateZ(-2deg);\n" +
  35018. " opacity: .5; }\n" +
  35019. " 66% {\n" +
  35020. " -webkit-transform: translateY(0.3125em) rotateZ(2deg);\n" +
  35021. " transform: translateY(0.3125em) rotateZ(2deg);\n" +
  35022. " opacity: .7; }\n" +
  35023. " 100% {\n" +
  35024. " -webkit-transform: translateY(0) rotateZ(0);\n" +
  35025. " transform: translateY(0) rotateZ(0);\n" +
  35026. " opacity: 1; } }\n" +
  35027. "\n" +
  35028. "@-webkit-keyframes hideSweetToast {\n" +
  35029. " 0% {\n" +
  35030. " opacity: 1; }\n" +
  35031. " 33% {\n" +
  35032. " opacity: .5; }\n" +
  35033. " 100% {\n" +
  35034. " -webkit-transform: rotateZ(1deg);\n" +
  35035. " transform: rotateZ(1deg);\n" +
  35036. " opacity: 0; } }\n" +
  35037. "\n" +
  35038. "@keyframes hideSweetToast {\n" +
  35039. " 0% {\n" +
  35040. " opacity: 1; }\n" +
  35041. " 33% {\n" +
  35042. " opacity: .5; }\n" +
  35043. " 100% {\n" +
  35044. " -webkit-transform: rotateZ(1deg);\n" +
  35045. " transform: rotateZ(1deg);\n" +
  35046. " opacity: 0; } }\n" +
  35047. "\n" +
  35048. "@-webkit-keyframes animate-toast-success-tip {\n" +
  35049. " 0% {\n" +
  35050. " top: .5625em;\n" +
  35051. " left: .0625em;\n" +
  35052. " width: 0; }\n" +
  35053. " 54% {\n" +
  35054. " top: .125em;\n" +
  35055. " left: .125em;\n" +
  35056. " width: 0; }\n" +
  35057. " 70% {\n" +
  35058. " top: .625em;\n" +
  35059. " left: -.25em;\n" +
  35060. " width: 1.625em; }\n" +
  35061. " 84% {\n" +
  35062. " top: 1.0625em;\n" +
  35063. " left: .75em;\n" +
  35064. " width: .5em; }\n" +
  35065. " 100% {\n" +
  35066. " top: 1.125em;\n" +
  35067. " left: .1875em;\n" +
  35068. " width: .75em; } }\n" +
  35069. "\n" +
  35070. "@keyframes animate-toast-success-tip {\n" +
  35071. " 0% {\n" +
  35072. " top: .5625em;\n" +
  35073. " left: .0625em;\n" +
  35074. " width: 0; }\n" +
  35075. " 54% {\n" +
  35076. " top: .125em;\n" +
  35077. " left: .125em;\n" +
  35078. " width: 0; }\n" +
  35079. " 70% {\n" +
  35080. " top: .625em;\n" +
  35081. " left: -.25em;\n" +
  35082. " width: 1.625em; }\n" +
  35083. " 84% {\n" +
  35084. " top: 1.0625em;\n" +
  35085. " left: .75em;\n" +
  35086. " width: .5em; }\n" +
  35087. " 100% {\n" +
  35088. " top: 1.125em;\n" +
  35089. " left: .1875em;\n" +
  35090. " width: .75em; } }\n" +
  35091. "\n" +
  35092. "@-webkit-keyframes animate-toast-success-long {\n" +
  35093. " 0% {\n" +
  35094. " top: 1.625em;\n" +
  35095. " right: 1.375em;\n" +
  35096. " width: 0; }\n" +
  35097. " 65% {\n" +
  35098. " top: 1.25em;\n" +
  35099. " right: .9375em;\n" +
  35100. " width: 0; }\n" +
  35101. " 84% {\n" +
  35102. " top: .9375em;\n" +
  35103. " right: 0;\n" +
  35104. " width: 1.125em; }\n" +
  35105. " 100% {\n" +
  35106. " top: .9375em;\n" +
  35107. " right: .1875em;\n" +
  35108. " width: 1.375em; } }\n" +
  35109. "\n" +
  35110. "@keyframes animate-toast-success-long {\n" +
  35111. " 0% {\n" +
  35112. " top: 1.625em;\n" +
  35113. " right: 1.375em;\n" +
  35114. " width: 0; }\n" +
  35115. " 65% {\n" +
  35116. " top: 1.25em;\n" +
  35117. " right: .9375em;\n" +
  35118. " width: 0; }\n" +
  35119. " 84% {\n" +
  35120. " top: .9375em;\n" +
  35121. " right: 0;\n" +
  35122. " width: 1.125em; }\n" +
  35123. " 100% {\n" +
  35124. " top: .9375em;\n" +
  35125. " right: .1875em;\n" +
  35126. " width: 1.375em; } }\n" +
  35127. "\n" +
  35128. "body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) {\n" +
  35129. " overflow-y: hidden; }\n" +
  35130. "\n" +
  35131. "body.swal2-height-auto {\n" +
  35132. " height: auto !important; }\n" +
  35133. "\n" +
  35134. "body.swal2-no-backdrop .swal2-shown {\n" +
  35135. " top: auto;\n" +
  35136. " right: auto;\n" +
  35137. " bottom: auto;\n" +
  35138. " left: auto;\n" +
  35139. " background-color: transparent; }\n" +
  35140. " body.swal2-no-backdrop .swal2-shown > .swal2-modal {\n" +
  35141. " box-shadow: 0 0 10px rgba(0, 0, 0, 0.4); }\n" +
  35142. " body.swal2-no-backdrop .swal2-shown.swal2-top {\n" +
  35143. " top: 0;\n" +
  35144. " left: 50%;\n" +
  35145. " -webkit-transform: translateX(-50%);\n" +
  35146. " transform: translateX(-50%); }\n" +
  35147. " body.swal2-no-backdrop .swal2-shown.swal2-top-start, body.swal2-no-backdrop .swal2-shown.swal2-top-left {\n" +
  35148. " top: 0;\n" +
  35149. " left: 0; }\n" +
  35150. " body.swal2-no-backdrop .swal2-shown.swal2-top-end, body.swal2-no-backdrop .swal2-shown.swal2-top-right {\n" +
  35151. " top: 0;\n" +
  35152. " right: 0; }\n" +
  35153. " body.swal2-no-backdrop .swal2-shown.swal2-center {\n" +
  35154. " top: 50%;\n" +
  35155. " left: 50%;\n" +
  35156. " -webkit-transform: translate(-50%, -50%);\n" +
  35157. " transform: translate(-50%, -50%); }\n" +
  35158. " body.swal2-no-backdrop .swal2-shown.swal2-center-start, body.swal2-no-backdrop .swal2-shown.swal2-center-left {\n" +
  35159. " top: 50%;\n" +
  35160. " left: 0;\n" +
  35161. " -webkit-transform: translateY(-50%);\n" +
  35162. " transform: translateY(-50%); }\n" +
  35163. " body.swal2-no-backdrop .swal2-shown.swal2-center-end, body.swal2-no-backdrop .swal2-shown.swal2-center-right {\n" +
  35164. " top: 50%;\n" +
  35165. " right: 0;\n" +
  35166. " -webkit-transform: translateY(-50%);\n" +
  35167. " transform: translateY(-50%); }\n" +
  35168. " body.swal2-no-backdrop .swal2-shown.swal2-bottom {\n" +
  35169. " bottom: 0;\n" +
  35170. " left: 50%;\n" +
  35171. " -webkit-transform: translateX(-50%);\n" +
  35172. " transform: translateX(-50%); }\n" +
  35173. " body.swal2-no-backdrop .swal2-shown.swal2-bottom-start, body.swal2-no-backdrop .swal2-shown.swal2-bottom-left {\n" +
  35174. " bottom: 0;\n" +
  35175. " left: 0; }\n" +
  35176. " body.swal2-no-backdrop .swal2-shown.swal2-bottom-end, body.swal2-no-backdrop .swal2-shown.swal2-bottom-right {\n" +
  35177. " right: 0;\n" +
  35178. " bottom: 0; }\n" +
  35179. "\n" +
  35180. ".swal2-container {\n" +
  35181. " display: flex;\n" +
  35182. " position: fixed;\n" +
  35183. " top: 0;\n" +
  35184. " right: 0;\n" +
  35185. " bottom: 0;\n" +
  35186. " left: 0;\n" +
  35187. " flex-direction: row;\n" +
  35188. " align-items: center;\n" +
  35189. " justify-content: center;\n" +
  35190. " padding: 10px;\n" +
  35191. " background-color: transparent;\n" +
  35192. " z-index: 1060;\n" +
  35193. " overflow-x: hidden;\n" +
  35194. " -webkit-overflow-scrolling: touch; }\n" +
  35195. " .swal2-container.swal2-top {\n" +
  35196. " align-items: flex-start; }\n" +
  35197. " .swal2-container.swal2-top-start, .swal2-container.swal2-top-left {\n" +
  35198. " align-items: flex-start;\n" +
  35199. " justify-content: flex-start; }\n" +
  35200. " .swal2-container.swal2-top-end, .swal2-container.swal2-top-right {\n" +
  35201. " align-items: flex-start;\n" +
  35202. " justify-content: flex-end; }\n" +
  35203. " .swal2-container.swal2-center {\n" +
  35204. " align-items: center; }\n" +
  35205. " .swal2-container.swal2-center-start, .swal2-container.swal2-center-left {\n" +
  35206. " align-items: center;\n" +
  35207. " justify-content: flex-start; }\n" +
  35208. " .swal2-container.swal2-center-end, .swal2-container.swal2-center-right {\n" +
  35209. " align-items: center;\n" +
  35210. " justify-content: flex-end; }\n" +
  35211. " .swal2-container.swal2-bottom {\n" +
  35212. " align-items: flex-end; }\n" +
  35213. " .swal2-container.swal2-bottom-start, .swal2-container.swal2-bottom-left {\n" +
  35214. " align-items: flex-end;\n" +
  35215. " justify-content: flex-start; }\n" +
  35216. " .swal2-container.swal2-bottom-end, .swal2-container.swal2-bottom-right {\n" +
  35217. " align-items: flex-end;\n" +
  35218. " justify-content: flex-end; }\n" +
  35219. " .swal2-container.swal2-grow-fullscreen > .swal2-modal {\n" +
  35220. " display: flex !important;\n" +
  35221. " flex: 1;\n" +
  35222. " align-self: stretch;\n" +
  35223. " justify-content: center; }\n" +
  35224. " .swal2-container.swal2-grow-row > .swal2-modal {\n" +
  35225. " display: flex !important;\n" +
  35226. " flex: 1;\n" +
  35227. " align-content: center;\n" +
  35228. " justify-content: center; }\n" +
  35229. " .swal2-container.swal2-grow-column {\n" +
  35230. " flex: 1;\n" +
  35231. " flex-direction: column; }\n" +
  35232. " .swal2-container.swal2-grow-column.swal2-top, .swal2-container.swal2-grow-column.swal2-center, .swal2-container.swal2-grow-column.swal2-bottom {\n" +
  35233. " align-items: center; }\n" +
  35234. " .swal2-container.swal2-grow-column.swal2-top-start, .swal2-container.swal2-grow-column.swal2-center-start, .swal2-container.swal2-grow-column.swal2-bottom-start, .swal2-container.swal2-grow-column.swal2-top-left, .swal2-container.swal2-grow-column.swal2-center-left, .swal2-container.swal2-grow-column.swal2-bottom-left {\n" +
  35235. " align-items: flex-start; }\n" +
  35236. " .swal2-container.swal2-grow-column.swal2-top-end, .swal2-container.swal2-grow-column.swal2-center-end, .swal2-container.swal2-grow-column.swal2-bottom-end, .swal2-container.swal2-grow-column.swal2-top-right, .swal2-container.swal2-grow-column.swal2-center-right, .swal2-container.swal2-grow-column.swal2-bottom-right {\n" +
  35237. " align-items: flex-end; }\n" +
  35238. " .swal2-container.swal2-grow-column > .swal2-modal {\n" +
  35239. " display: flex !important;\n" +
  35240. " flex: 1;\n" +
  35241. " align-content: center;\n" +
  35242. " justify-content: center; }\n" +
  35243. " .swal2-container:not(.swal2-top):not(.swal2-top-start):not(.swal2-top-end):not(.swal2-top-left):not(.swal2-top-right):not(.swal2-center-start):not(.swal2-center-end):not(.swal2-center-left):not(.swal2-center-right):not(.swal2-bottom):not(.swal2-bottom-start):not(.swal2-bottom-end):not(.swal2-bottom-left):not(.swal2-bottom-right) > .swal2-modal {\n" +
  35244. " margin: auto; }\n" +
  35245. " @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {\n" +
  35246. " .swal2-container .swal2-modal {\n" +
  35247. " margin: 0 !important; } }\n" +
  35248. " .swal2-container.swal2-fade {\n" +
  35249. " transition: background-color .1s; }\n" +
  35250. " .swal2-container.swal2-shown {\n" +
  35251. " background-color: rgba(0, 0, 0, 0.4); }\n" +
  35252. "\n" +
  35253. ".swal2-popup {\n" +
  35254. " display: none;\n" +
  35255. " position: relative;\n" +
  35256. " flex-direction: column;\n" +
  35257. " justify-content: center;\n" +
  35258. " width: 32em;\n" +
  35259. " max-width: 100%;\n" +
  35260. " padding: 1.25em;\n" +
  35261. " border-radius: 0.3125em;\n" +
  35262. " background: #fff;\n" +
  35263. " font-family: inherit;\n" +
  35264. " font-size: 1rem;\n" +
  35265. " box-sizing: border-box; }\n" +
  35266. " .swal2-popup:focus {\n" +
  35267. " outline: none; }\n" +
  35268. " .swal2-popup.swal2-loading {\n" +
  35269. " overflow-y: hidden; }\n" +
  35270. " .swal2-popup .swal2-header {\n" +
  35271. " display: flex;\n" +
  35272. " flex-direction: column;\n" +
  35273. " align-items: center; }\n" +
  35274. " .swal2-popup .swal2-title {\n" +
  35275. " display: block;\n" +
  35276. " position: relative;\n" +
  35277. " max-width: 100%;\n" +
  35278. " margin: 0 0 0.4em;\n" +
  35279. " padding: 0;\n" +
  35280. " color: #595959;\n" +
  35281. " font-size: 1.875em;\n" +
  35282. " font-weight: 600;\n" +
  35283. " text-align: center;\n" +
  35284. " text-transform: none;\n" +
  35285. " word-wrap: break-word; }\n" +
  35286. " .swal2-popup .swal2-actions {\n" +
  35287. " align-items: center;\n" +
  35288. " justify-content: center;\n" +
  35289. " margin: 1.25em auto 0; }\n" +
  35290. " .swal2-popup .swal2-actions:not(.swal2-loading) .swal2-styled[disabled] {\n" +
  35291. " opacity: .4; }\n" +
  35292. " .swal2-popup .swal2-actions:not(.swal2-loading) .swal2-styled:hover {\n" +
  35293. " background-image: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1)); }\n" +
  35294. " .swal2-popup .swal2-actions:not(.swal2-loading) .swal2-styled:active {\n" +
  35295. " background-image: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)); }\n" +
  35296. " .swal2-popup .swal2-actions.swal2-loading .swal2-styled.swal2-confirm {\n" +
  35297. " width: 2.5em;\n" +
  35298. " height: 2.5em;\n" +
  35299. " margin: .46875em;\n" +
  35300. " padding: 0;\n" +
  35301. " border: .25em solid transparent;\n" +
  35302. " border-radius: 100%;\n" +
  35303. " border-color: transparent;\n" +
  35304. " background-color: transparent !important;\n" +
  35305. " color: transparent;\n" +
  35306. " cursor: default;\n" +
  35307. " box-sizing: border-box;\n" +
  35308. " -webkit-animation: swal2-rotate-loading 1.5s linear 0s infinite normal;\n" +
  35309. " animation: swal2-rotate-loading 1.5s linear 0s infinite normal;\n" +
  35310. " -webkit-user-select: none;\n" +
  35311. " -moz-user-select: none;\n" +
  35312. " -ms-user-select: none;\n" +
  35313. " user-select: none; }\n" +
  35314. " .swal2-popup .swal2-actions.swal2-loading .swal2-styled.swal2-cancel {\n" +
  35315. " margin-right: 30px;\n" +
  35316. " margin-left: 30px; }\n" +
  35317. " .swal2-popup .swal2-actions.swal2-loading :not(.swal2-styled).swal2-confirm::after {\n" +
  35318. " display: inline-block;\n" +
  35319. " width: 15px;\n" +
  35320. " height: 15px;\n" +
  35321. " margin-left: 5px;\n" +
  35322. " border: 3px solid #999999;\n" +
  35323. " border-radius: 50%;\n" +
  35324. " border-right-color: transparent;\n" +
  35325. " box-shadow: 1px 1px 1px #fff;\n" +
  35326. " content: '';\n" +
  35327. " -webkit-animation: swal2-rotate-loading 1.5s linear 0s infinite normal;\n" +
  35328. " animation: swal2-rotate-loading 1.5s linear 0s infinite normal; }\n" +
  35329. " .swal2-popup .swal2-styled {\n" +
  35330. " margin: 0 .3125em;\n" +
  35331. " padding: .625em 2em;\n" +
  35332. " font-weight: 500;\n" +
  35333. " box-shadow: none; }\n" +
  35334. " .swal2-popup .swal2-styled:not([disabled]) {\n" +
  35335. " cursor: pointer; }\n" +
  35336. " .swal2-popup .swal2-styled.swal2-confirm {\n" +
  35337. " border: 0;\n" +
  35338. " border-radius: 0.25em;\n" +
  35339. " background: initial;\n" +
  35340. " background-color: #3085d6;\n" +
  35341. " color: #fff;\n" +
  35342. " font-size: 1.0625em; }\n" +
  35343. " .swal2-popup .swal2-styled.swal2-cancel {\n" +
  35344. " border: 0;\n" +
  35345. " border-radius: 0.25em;\n" +
  35346. " background: initial;\n" +
  35347. " background-color: #aaa;\n" +
  35348. " color: #fff;\n" +
  35349. " font-size: 1.0625em; }\n" +
  35350. " .swal2-popup .swal2-styled:focus {\n" +
  35351. " outline: none;\n" +
  35352. " box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(50, 100, 150, 0.4); }\n" +
  35353. " .swal2-popup .swal2-styled::-moz-focus-inner {\n" +
  35354. " border: 0; }\n" +
  35355. " .swal2-popup .swal2-footer {\n" +
  35356. " justify-content: center;\n" +
  35357. " margin: 1.25em 0 0;\n" +
  35358. " padding-top: 1em;\n" +
  35359. " border-top: 1px solid #eee;\n" +
  35360. " color: #545454;\n" +
  35361. " font-size: 1em; }\n" +
  35362. " .swal2-popup .swal2-image {\n" +
  35363. " max-width: 100%;\n" +
  35364. " margin: 1.25em auto; }\n" +
  35365. " .swal2-popup .swal2-close {\n" +
  35366. " position: absolute;\n" +
  35367. " top: 0;\n" +
  35368. " right: 0;\n" +
  35369. " justify-content: center;\n" +
  35370. " width: 1.2em;\n" +
  35371. " height: 1.2em;\n" +
  35372. " padding: 0;\n" +
  35373. " transition: color 0.1s ease-out;\n" +
  35374. " border: none;\n" +
  35375. " border-radius: 0;\n" +
  35376. " background: transparent;\n" +
  35377. " color: #cccccc;\n" +
  35378. " font-family: serif;\n" +
  35379. " font-size: 2.5em;\n" +
  35380. " line-height: 1.2;\n" +
  35381. " cursor: pointer;\n" +
  35382. " overflow: hidden; }\n" +
  35383. " .swal2-popup .swal2-close:hover {\n" +
  35384. " -webkit-transform: none;\n" +
  35385. " transform: none;\n" +
  35386. " color: #f27474; }\n" +
  35387. " .swal2-popup > .swal2-input,\n" +
  35388. " .swal2-popup > .swal2-file,\n" +
  35389. " .swal2-popup > .swal2-textarea,\n" +
  35390. " .swal2-popup > .swal2-select,\n" +
  35391. " .swal2-popup > .swal2-radio,\n" +
  35392. " .swal2-popup > .swal2-checkbox {\n" +
  35393. " display: none; }\n" +
  35394. " .swal2-popup .swal2-content {\n" +
  35395. " justify-content: center;\n" +
  35396. " margin: 0;\n" +
  35397. " padding: 0;\n" +
  35398. " color: #545454;\n" +
  35399. " font-size: 1.125em;\n" +
  35400. " font-weight: 300;\n" +
  35401. " line-height: normal;\n" +
  35402. " word-wrap: break-word; }\n" +
  35403. " .swal2-popup #swal2-content {\n" +
  35404. " text-align: center; }\n" +
  35405. " .swal2-popup .swal2-input,\n" +
  35406. " .swal2-popup .swal2-file,\n" +
  35407. " .swal2-popup .swal2-textarea,\n" +
  35408. " .swal2-popup .swal2-select,\n" +
  35409. " .swal2-popup .swal2-radio,\n" +
  35410. " .swal2-popup .swal2-checkbox {\n" +
  35411. " margin: 1em auto; }\n" +
  35412. " .swal2-popup .swal2-input,\n" +
  35413. " .swal2-popup .swal2-file,\n" +
  35414. " .swal2-popup .swal2-textarea {\n" +
  35415. " width: 100%;\n" +
  35416. " transition: border-color .3s, box-shadow .3s;\n" +
  35417. " border: 1px solid #d9d9d9;\n" +
  35418. " border-radius: 0.1875em;\n" +
  35419. " font-size: 1.125em;\n" +
  35420. " box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06);\n" +
  35421. " box-sizing: border-box; }\n" +
  35422. " .swal2-popup .swal2-input.swal2-inputerror,\n" +
  35423. " .swal2-popup .swal2-file.swal2-inputerror,\n" +
  35424. " .swal2-popup .swal2-textarea.swal2-inputerror {\n" +
  35425. " border-color: #f27474 !important;\n" +
  35426. " box-shadow: 0 0 2px #f27474 !important; }\n" +
  35427. " .swal2-popup .swal2-input:focus,\n" +
  35428. " .swal2-popup .swal2-file:focus,\n" +
  35429. " .swal2-popup .swal2-textarea:focus {\n" +
  35430. " border: 1px solid #b4dbed;\n" +
  35431. " outline: none;\n" +
  35432. " box-shadow: 0 0 3px #c4e6f5; }\n" +
  35433. " .swal2-popup .swal2-input::-webkit-input-placeholder,\n" +
  35434. " .swal2-popup .swal2-file::-webkit-input-placeholder,\n" +
  35435. " .swal2-popup .swal2-textarea::-webkit-input-placeholder {\n" +
  35436. " color: #cccccc; }\n" +
  35437. " .swal2-popup .swal2-input:-ms-input-placeholder,\n" +
  35438. " .swal2-popup .swal2-file:-ms-input-placeholder,\n" +
  35439. " .swal2-popup .swal2-textarea:-ms-input-placeholder {\n" +
  35440. " color: #cccccc; }\n" +
  35441. " .swal2-popup .swal2-input::-ms-input-placeholder,\n" +
  35442. " .swal2-popup .swal2-file::-ms-input-placeholder,\n" +
  35443. " .swal2-popup .swal2-textarea::-ms-input-placeholder {\n" +
  35444. " color: #cccccc; }\n" +
  35445. " .swal2-popup .swal2-input::placeholder,\n" +
  35446. " .swal2-popup .swal2-file::placeholder,\n" +
  35447. " .swal2-popup .swal2-textarea::placeholder {\n" +
  35448. " color: #cccccc; }\n" +
  35449. " .swal2-popup .swal2-range input {\n" +
  35450. " width: 80%; }\n" +
  35451. " .swal2-popup .swal2-range output {\n" +
  35452. " width: 20%;\n" +
  35453. " font-weight: 600;\n" +
  35454. " text-align: center; }\n" +
  35455. " .swal2-popup .swal2-range input,\n" +
  35456. " .swal2-popup .swal2-range output {\n" +
  35457. " height: 2.625em;\n" +
  35458. " margin: 1em auto;\n" +
  35459. " padding: 0;\n" +
  35460. " font-size: 1.125em;\n" +
  35461. " line-height: 2.625em; }\n" +
  35462. " .swal2-popup .swal2-input {\n" +
  35463. " height: 2.625em;\n" +
  35464. " padding: 0.75em; }\n" +
  35465. " .swal2-popup .swal2-input[type='number'] {\n" +
  35466. " max-width: 10em; }\n" +
  35467. " .swal2-popup .swal2-file {\n" +
  35468. " font-size: 1.125em; }\n" +
  35469. " .swal2-popup .swal2-textarea {\n" +
  35470. " height: 6.75em;\n" +
  35471. " padding: 0.75em; }\n" +
  35472. " .swal2-popup .swal2-select {\n" +
  35473. " min-width: 50%;\n" +
  35474. " max-width: 100%;\n" +
  35475. " padding: .375em .625em;\n" +
  35476. " color: #545454;\n" +
  35477. " font-size: 1.125em; }\n" +
  35478. " .swal2-popup .swal2-radio,\n" +
  35479. " .swal2-popup .swal2-checkbox {\n" +
  35480. " align-items: center;\n" +
  35481. " justify-content: center; }\n" +
  35482. " .swal2-popup .swal2-radio label,\n" +
  35483. " .swal2-popup .swal2-checkbox label {\n" +
  35484. " margin: 0 .6em;\n" +
  35485. " font-size: 1.125em; }\n" +
  35486. " .swal2-popup .swal2-radio input,\n" +
  35487. " .swal2-popup .swal2-checkbox input {\n" +
  35488. " margin: 0 .4em; }\n" +
  35489. " .swal2-popup .swal2-validationerror {\n" +
  35490. " display: none;\n" +
  35491. " align-items: center;\n" +
  35492. " justify-content: center;\n" +
  35493. " padding: 0.625em;\n" +
  35494. " background: #f0f0f0;\n" +
  35495. " color: #666666;\n" +
  35496. " font-size: 1em;\n" +
  35497. " font-weight: 300;\n" +
  35498. " overflow: hidden; }\n" +
  35499. " .swal2-popup .swal2-validationerror::before {\n" +
  35500. " display: inline-block;\n" +
  35501. " width: 1.5em;\n" +
  35502. " min-width: 1.5em;\n" +
  35503. " height: 1.5em;\n" +
  35504. " margin: 0 .625em;\n" +
  35505. " border-radius: 50%;\n" +
  35506. " background-color: #f27474;\n" +
  35507. " color: #fff;\n" +
  35508. " font-weight: 600;\n" +
  35509. " line-height: 1.5em;\n" +
  35510. " text-align: center;\n" +
  35511. " content: '!';\n" +
  35512. " zoom: normal; }\n" +
  35513. "\n" +
  35514. "@supports (-ms-accelerator: true) {\n" +
  35515. " .swal2-range input {\n" +
  35516. " width: 100% !important; }\n" +
  35517. " .swal2-range output {\n" +
  35518. " display: none; } }\n" +
  35519. "\n" +
  35520. "@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {\n" +
  35521. " .swal2-range input {\n" +
  35522. " width: 100% !important; }\n" +
  35523. " .swal2-range output {\n" +
  35524. " display: none; } }\n" +
  35525. "\n" +
  35526. "@-moz-document url-prefix() {\n" +
  35527. " .swal2-close:focus {\n" +
  35528. " outline: 2px solid rgba(50, 100, 150, 0.4); } }\n" +
  35529. "\n" +
  35530. ".swal2-icon {\n" +
  35531. " position: relative;\n" +
  35532. " justify-content: center;\n" +
  35533. " width: 5em;\n" +
  35534. " height: 5em;\n" +
  35535. " margin: 1.25em auto 1.875em;\n" +
  35536. " border: .25em solid transparent;\n" +
  35537. " border-radius: 50%;\n" +
  35538. " line-height: 5em;\n" +
  35539. " cursor: default;\n" +
  35540. " box-sizing: content-box;\n" +
  35541. " -webkit-user-select: none;\n" +
  35542. " -moz-user-select: none;\n" +
  35543. " -ms-user-select: none;\n" +
  35544. " user-select: none;\n" +
  35545. " zoom: normal; }\n" +
  35546. " .swal2-icon-text {\n" +
  35547. " font-size: 3.75em; }\n" +
  35548. " .swal2-icon.swal2-error {\n" +
  35549. " border-color: #f27474; }\n" +
  35550. " .swal2-icon.swal2-error .swal2-x-mark {\n" +
  35551. " position: relative;\n" +
  35552. " flex-grow: 1; }\n" +
  35553. " .swal2-icon.swal2-error [class^='swal2-x-mark-line'] {\n" +
  35554. " display: block;\n" +
  35555. " position: absolute;\n" +
  35556. " top: 2.3125em;\n" +
  35557. " width: 2.9375em;\n" +
  35558. " height: .3125em;\n" +
  35559. " border-radius: .125em;\n" +
  35560. " background-color: #f27474; }\n" +
  35561. " .swal2-icon.swal2-error [class^='swal2-x-mark-line'][class$='left'] {\n" +
  35562. " left: 1.0625em;\n" +
  35563. " -webkit-transform: rotate(45deg);\n" +
  35564. " transform: rotate(45deg); }\n" +
  35565. " .swal2-icon.swal2-error [class^='swal2-x-mark-line'][class$='right'] {\n" +
  35566. " right: 1em;\n" +
  35567. " -webkit-transform: rotate(-45deg);\n" +
  35568. " transform: rotate(-45deg); }\n" +
  35569. " .swal2-icon.swal2-warning {\n" +
  35570. " border-color: #facea8;\n" +
  35571. " color: #f8bb86; }\n" +
  35572. " .swal2-icon.swal2-info {\n" +
  35573. " border-color: #9de0f6;\n" +
  35574. " color: #3fc3ee; }\n" +
  35575. " .swal2-icon.swal2-question {\n" +
  35576. " border-color: #c9dae1;\n" +
  35577. " color: #87adbd; }\n" +
  35578. " .swal2-icon.swal2-success {\n" +
  35579. " border-color: #a5dc86; }\n" +
  35580. " .swal2-icon.swal2-success [class^='swal2-success-circular-line'] {\n" +
  35581. " position: absolute;\n" +
  35582. " width: 3.75em;\n" +
  35583. " height: 7.5em;\n" +
  35584. " -webkit-transform: rotate(45deg);\n" +
  35585. " transform: rotate(45deg);\n" +
  35586. " border-radius: 50%; }\n" +
  35587. " .swal2-icon.swal2-success [class^='swal2-success-circular-line'][class$='left'] {\n" +
  35588. " top: -.4375em;\n" +
  35589. " left: -2.0635em;\n" +
  35590. " -webkit-transform: rotate(-45deg);\n" +
  35591. " transform: rotate(-45deg);\n" +
  35592. " -webkit-transform-origin: 3.75em 3.75em;\n" +
  35593. " transform-origin: 3.75em 3.75em;\n" +
  35594. " border-radius: 7.5em 0 0 7.5em; }\n" +
  35595. " .swal2-icon.swal2-success [class^='swal2-success-circular-line'][class$='right'] {\n" +
  35596. " top: -.6875em;\n" +
  35597. " left: 1.875em;\n" +
  35598. " -webkit-transform: rotate(-45deg);\n" +
  35599. " transform: rotate(-45deg);\n" +
  35600. " -webkit-transform-origin: 0 3.75em;\n" +
  35601. " transform-origin: 0 3.75em;\n" +
  35602. " border-radius: 0 7.5em 7.5em 0; }\n" +
  35603. " .swal2-icon.swal2-success .swal2-success-ring {\n" +
  35604. " position: absolute;\n" +
  35605. " top: -.25em;\n" +
  35606. " left: -.25em;\n" +
  35607. " width: 100%;\n" +
  35608. " height: 100%;\n" +
  35609. " border: 0.25em solid rgba(165, 220, 134, 0.3);\n" +
  35610. " border-radius: 50%;\n" +
  35611. " z-index: 2;\n" +
  35612. " box-sizing: content-box; }\n" +
  35613. " .swal2-icon.swal2-success .swal2-success-fix {\n" +
  35614. " position: absolute;\n" +
  35615. " top: .5em;\n" +
  35616. " left: 1.625em;\n" +
  35617. " width: .4375em;\n" +
  35618. " height: 5.625em;\n" +
  35619. " -webkit-transform: rotate(-45deg);\n" +
  35620. " transform: rotate(-45deg);\n" +
  35621. " z-index: 1; }\n" +
  35622. " .swal2-icon.swal2-success [class^='swal2-success-line'] {\n" +
  35623. " display: block;\n" +
  35624. " position: absolute;\n" +
  35625. " height: .3125em;\n" +
  35626. " border-radius: .125em;\n" +
  35627. " background-color: #a5dc86;\n" +
  35628. " z-index: 2; }\n" +
  35629. " .swal2-icon.swal2-success [class^='swal2-success-line'][class$='tip'] {\n" +
  35630. " top: 2.875em;\n" +
  35631. " left: .875em;\n" +
  35632. " width: 1.5625em;\n" +
  35633. " -webkit-transform: rotate(45deg);\n" +
  35634. " transform: rotate(45deg); }\n" +
  35635. " .swal2-icon.swal2-success [class^='swal2-success-line'][class$='long'] {\n" +
  35636. " top: 2.375em;\n" +
  35637. " right: .5em;\n" +
  35638. " width: 2.9375em;\n" +
  35639. " -webkit-transform: rotate(-45deg);\n" +
  35640. " transform: rotate(-45deg); }\n" +
  35641. "\n" +
  35642. ".swal2-progresssteps {\n" +
  35643. " align-items: center;\n" +
  35644. " margin: 0 0 1.25em;\n" +
  35645. " padding: 0;\n" +
  35646. " font-weight: 600; }\n" +
  35647. " .swal2-progresssteps li {\n" +
  35648. " display: inline-block;\n" +
  35649. " position: relative; }\n" +
  35650. " .swal2-progresssteps .swal2-progresscircle {\n" +
  35651. " width: 2em;\n" +
  35652. " height: 2em;\n" +
  35653. " border-radius: 2em;\n" +
  35654. " background: #3085d6;\n" +
  35655. " color: #fff;\n" +
  35656. " line-height: 2em;\n" +
  35657. " text-align: center;\n" +
  35658. " z-index: 20; }\n" +
  35659. " .swal2-progresssteps .swal2-progresscircle:first-child {\n" +
  35660. " margin-left: 0; }\n" +
  35661. " .swal2-progresssteps .swal2-progresscircle:last-child {\n" +
  35662. " margin-right: 0; }\n" +
  35663. " .swal2-progresssteps .swal2-progresscircle.swal2-activeprogressstep {\n" +
  35664. " background: #3085d6; }\n" +
  35665. " .swal2-progresssteps .swal2-progresscircle.swal2-activeprogressstep ~ .swal2-progresscircle {\n" +
  35666. " background: #add8e6; }\n" +
  35667. " .swal2-progresssteps .swal2-progresscircle.swal2-activeprogressstep ~ .swal2-progressline {\n" +
  35668. " background: #add8e6; }\n" +
  35669. " .swal2-progresssteps .swal2-progressline {\n" +
  35670. " width: 2.5em;\n" +
  35671. " height: .4em;\n" +
  35672. " margin: 0 -1px;\n" +
  35673. " background: #3085d6;\n" +
  35674. " z-index: 10; }\n" +
  35675. "\n" +
  35676. "[class^='swal2'] {\n" +
  35677. " -webkit-tap-highlight-color: transparent; }\n" +
  35678. "\n" +
  35679. ".swal2-show {\n" +
  35680. " -webkit-animation: swal2-show 0.3s;\n" +
  35681. " animation: swal2-show 0.3s; }\n" +
  35682. " .swal2-show.swal2-noanimation {\n" +
  35683. " -webkit-animation: none;\n" +
  35684. " animation: none; }\n" +
  35685. "\n" +
  35686. ".swal2-hide {\n" +
  35687. " -webkit-animation: swal2-hide 0.15s forwards;\n" +
  35688. " animation: swal2-hide 0.15s forwards; }\n" +
  35689. " .swal2-hide.swal2-noanimation {\n" +
  35690. " -webkit-animation: none;\n" +
  35691. " animation: none; }\n" +
  35692. "\n" +
  35693. "[dir='rtl'] .swal2-close {\n" +
  35694. " right: auto;\n" +
  35695. " left: 0; }\n" +
  35696. "\n" +
  35697. ".swal2-animate-success-icon .swal2-success-line-tip {\n" +
  35698. " -webkit-animation: swal2-animate-success-line-tip 0.75s;\n" +
  35699. " animation: swal2-animate-success-line-tip 0.75s; }\n" +
  35700. "\n" +
  35701. ".swal2-animate-success-icon .swal2-success-line-long {\n" +
  35702. " -webkit-animation: swal2-animate-success-line-long 0.75s;\n" +
  35703. " animation: swal2-animate-success-line-long 0.75s; }\n" +
  35704. "\n" +
  35705. ".swal2-animate-success-icon .swal2-success-circular-line-right {\n" +
  35706. " -webkit-animation: swal2-rotate-success-circular-line 4.25s ease-in;\n" +
  35707. " animation: swal2-rotate-success-circular-line 4.25s ease-in; }\n" +
  35708. "\n" +
  35709. ".swal2-animate-error-icon {\n" +
  35710. " -webkit-animation: swal2-animate-error-icon 0.5s;\n" +
  35711. " animation: swal2-animate-error-icon 0.5s; }\n" +
  35712. " .swal2-animate-error-icon .swal2-x-mark {\n" +
  35713. " -webkit-animation: swal2-animate-error-x-mark 0.5s;\n" +
  35714. " animation: swal2-animate-error-x-mark 0.5s; }\n" +
  35715. "\n" +
  35716. "@-webkit-keyframes swal2-rotate-loading {\n" +
  35717. " 0% {\n" +
  35718. " -webkit-transform: rotate(0deg);\n" +
  35719. " transform: rotate(0deg); }\n" +
  35720. " 100% {\n" +
  35721. " -webkit-transform: rotate(360deg);\n" +
  35722. " transform: rotate(360deg); } }\n" +
  35723. "\n" +
  35724. "@keyframes swal2-rotate-loading {\n" +
  35725. " 0% {\n" +
  35726. " -webkit-transform: rotate(0deg);\n" +
  35727. " transform: rotate(0deg); }\n" +
  35728. " 100% {\n" +
  35729. " -webkit-transform: rotate(360deg);\n" +
  35730. " transform: rotate(360deg); } }");
  35731. /**
  35732. * tooltipster http://iamceege.github.io/tooltipster/
  35733. * A rockin' custom tooltip jQuery plugin
  35734. * Developed by Caleb Jacob and Louis Ameline
  35735. * MIT license
  35736. */
  35737. (function (root, factory) {
  35738. if (typeof define === 'function' && define.amd) {
  35739. // AMD. Register as an anonymous module unless amdModuleId is set
  35740. define(["jquery"], function (a0) {
  35741. return (factory(a0));
  35742. });
  35743. } else if (typeof exports === 'object') {
  35744. // Node. Does not work with strict CommonJS, but
  35745. // only CommonJS-like environments that support module.exports,
  35746. // like Node.
  35747. module.exports = factory(require("jquery"));
  35748. } else {
  35749. factory(jQuery);
  35750. }
  35751. }(this, function ($) {
  35752. // This file will be UMDified by a build task.
  35753. var defaults = {
  35754. animation: 'fade',
  35755. animationDuration: 350,
  35756. content: null,
  35757. contentAsHTML: false,
  35758. contentCloning: false,
  35759. debug: true,
  35760. delay: 300,
  35761. delayTouch: [300, 500],
  35762. functionInit: null,
  35763. functionBefore: null,
  35764. functionReady: null,
  35765. functionAfter: null,
  35766. functionFormat: null,
  35767. IEmin: 6,
  35768. interactive: false,
  35769. multiple: false,
  35770. // will default to document.body, or must be an element positioned at (0, 0)
  35771. // in the document, typically like the very top views of an app.
  35772. parent: null,
  35773. plugins: ['sideTip'],
  35774. repositionOnScroll: false,
  35775. restoration: 'none',
  35776. selfDestruction: true,
  35777. theme: [],
  35778. timer: 0,
  35779. trackerInterval: 500,
  35780. trackOrigin: false,
  35781. trackTooltip: false,
  35782. trigger: 'hover',
  35783. triggerClose: {
  35784. click: false,
  35785. mouseleave: false,
  35786. originClick: false,
  35787. scroll: false,
  35788. tap: false,
  35789. touchleave: false
  35790. },
  35791. triggerOpen: {
  35792. click: false,
  35793. mouseenter: false,
  35794. tap: false,
  35795. touchstart: false
  35796. },
  35797. updateAnimation: 'rotate',
  35798. zIndex: 9999999
  35799. },
  35800. // we'll avoid using the 'window' global as a good practice but npm's
  35801. // jquery@<2.1.0 package actually requires a 'window' global, so not sure
  35802. // it's useful at all
  35803. win = (typeof window != 'undefined') ? window : null,
  35804. // env will be proxied by the core for plugins to have access its properties
  35805. env = {
  35806. // detect if this device can trigger touch events. Better have a false
  35807. // positive (unused listeners, that's ok) than a false negative.
  35808. // https://github.com/Modernizr/Modernizr/blob/master/feature-detects/touchevents.js
  35809. // http://stackoverflow.com/questions/4817029/whats-the-best-way-to-detect-a-touch-screen-device-using-javascript
  35810. hasTouchCapability: !!(
  35811. win
  35812. && ( 'ontouchstart' in win
  35813. || (win.DocumentTouch && win.document instanceof win.DocumentTouch)
  35814. || win.navigator.maxTouchPoints
  35815. )
  35816. ),
  35817. hasTransitions: transitionSupport(),
  35818. IE: false,
  35819. // don't set manually, it will be updated by a build task after the manifest
  35820. semVer: '4.2.6',
  35821. window: win
  35822. },
  35823. core = function() {
  35824. // core variables
  35825. // the core emitters
  35826. this.__$emitterPrivate = $({});
  35827. this.__$emitterPublic = $({});
  35828. this.__instancesLatestArr = [];
  35829. // collects plugin constructors
  35830. this.__plugins = {};
  35831. // proxy env variables for plugins who might use them
  35832. this._env = env;
  35833. };
  35834. // core methods
  35835. core.prototype = {
  35836. /**
  35837. * A function to proxy the public methods of an object onto another
  35838. *
  35839. * @param {object} constructor The constructor to bridge
  35840. * @param {object} obj The object that will get new methods (an instance or the core)
  35841. * @param {string} pluginName A plugin name for the console log message
  35842. * @return {core}
  35843. * @private
  35844. */
  35845. __bridge: function(constructor, obj, pluginName) {
  35846. // if it's not already bridged
  35847. if (!obj[pluginName]) {
  35848. var fn = function() {};
  35849. fn.prototype = constructor;
  35850. var pluginInstance = new fn();
  35851. // the _init method has to exist in instance constructors but might be missing
  35852. // in core constructors
  35853. if (pluginInstance.__init) {
  35854. pluginInstance.__init(obj);
  35855. }
  35856. $.each(constructor, function(methodName, fn) {
  35857. // don't proxy "private" methods, only "protected" and public ones
  35858. if (methodName.indexOf('__') != 0) {
  35859. // if the method does not exist yet
  35860. if (!obj[methodName]) {
  35861. obj[methodName] = function() {
  35862. return pluginInstance[methodName].apply(pluginInstance, Array.prototype.slice.apply(arguments));
  35863. };
  35864. // remember to which plugin this method corresponds (several plugins may
  35865. // have methods of the same name, we need to be sure)
  35866. obj[methodName].bridged = pluginInstance;
  35867. }
  35868. else if (defaults.debug) {
  35869. console.log('The '+ methodName +' method of the '+ pluginName
  35870. +' plugin conflicts with another plugin or native methods');
  35871. }
  35872. }
  35873. });
  35874. obj[pluginName] = pluginInstance;
  35875. }
  35876. return this;
  35877. },
  35878. /**
  35879. * For mockup in Node env if need be, for testing purposes
  35880. *
  35881. * @return {core}
  35882. * @private
  35883. */
  35884. __setWindow: function(window) {
  35885. env.window = window;
  35886. return this;
  35887. },
  35888. /**
  35889. * Returns a ruler, a tool to help measure the size of a tooltip under
  35890. * various settings. Meant for plugins
  35891. *
  35892. * @see Ruler
  35893. * @return {object} A Ruler instance
  35894. * @protected
  35895. */
  35896. _getRuler: function($tooltip) {
  35897. return new Ruler($tooltip);
  35898. },
  35899. /**
  35900. * For internal use by plugins, if needed
  35901. *
  35902. * @return {core}
  35903. * @protected
  35904. */
  35905. _off: function() {
  35906. this.__$emitterPrivate.off.apply(this.__$emitterPrivate, Array.prototype.slice.apply(arguments));
  35907. return this;
  35908. },
  35909. /**
  35910. * For internal use by plugins, if needed
  35911. *
  35912. * @return {core}
  35913. * @protected
  35914. */
  35915. _on: function() {
  35916. this.__$emitterPrivate.on.apply(this.__$emitterPrivate, Array.prototype.slice.apply(arguments));
  35917. return this;
  35918. },
  35919. /**
  35920. * For internal use by plugins, if needed
  35921. *
  35922. * @return {core}
  35923. * @protected
  35924. */
  35925. _one: function() {
  35926. this.__$emitterPrivate.one.apply(this.__$emitterPrivate, Array.prototype.slice.apply(arguments));
  35927. return this;
  35928. },
  35929. /**
  35930. * Returns (getter) or adds (setter) a plugin
  35931. *
  35932. * @param {string|object} plugin Provide a string (in the full form
  35933. * "namespace.name") to use as as getter, an object to use as a setter
  35934. * @return {object|core}
  35935. * @protected
  35936. */
  35937. _plugin: function(plugin) {
  35938. var self = this;
  35939. // getter
  35940. if (typeof plugin == 'string') {
  35941. var pluginName = plugin,
  35942. p = null;
  35943. // if the namespace is provided, it's easy to search
  35944. if (pluginName.indexOf('.') > 0) {
  35945. p = self.__plugins[pluginName];
  35946. }
  35947. // otherwise, return the first name that matches
  35948. else {
  35949. $.each(self.__plugins, function(i, plugin) {
  35950. if (plugin.name.substring(plugin.name.length - pluginName.length - 1) == '.'+ pluginName) {
  35951. p = plugin;
  35952. return false;
  35953. }
  35954. });
  35955. }
  35956. return p;
  35957. }
  35958. // setter
  35959. else {
  35960. // force namespaces
  35961. if (plugin.name.indexOf('.') < 0) {
  35962. throw new Error('Plugins must be namespaced');
  35963. }
  35964. self.__plugins[plugin.name] = plugin;
  35965. // if the plugin has core features
  35966. if (plugin.core) {
  35967. // bridge non-private methods onto the core to allow new core methods
  35968. self.__bridge(plugin.core, self, plugin.name);
  35969. }
  35970. return this;
  35971. }
  35972. },
  35973. /**
  35974. * Trigger events on the core emitters
  35975. *
  35976. * @returns {core}
  35977. * @protected
  35978. */
  35979. _trigger: function() {
  35980. var args = Array.prototype.slice.apply(arguments);
  35981. if (typeof args[0] == 'string') {
  35982. args[0] = { type: args[0] };
  35983. }
  35984. // note: the order of emitters matters
  35985. this.__$emitterPrivate.trigger.apply(this.__$emitterPrivate, args);
  35986. this.__$emitterPublic.trigger.apply(this.__$emitterPublic, args);
  35987. return this;
  35988. },
  35989. /**
  35990. * Returns instances of all tooltips in the page or an a given element
  35991. *
  35992. * @param {string|HTML object collection} selector optional Use this
  35993. * parameter to restrict the set of objects that will be inspected
  35994. * for the retrieval of instances. By default, all instances in the
  35995. * page are returned.
  35996. * @return {array} An array of instance objects
  35997. * @public
  35998. */
  35999. instances: function(selector) {
  36000. var instances = [],
  36001. sel = selector || '.tooltipstered';
  36002. $(sel).each(function() {
  36003. var $this = $(this),
  36004. ns = $this.data('tooltipster-ns');
  36005. if (ns) {
  36006. $.each(ns, function(i, namespace) {
  36007. instances.push($this.data(namespace));
  36008. });
  36009. }
  36010. });
  36011. return instances;
  36012. },
  36013. /**
  36014. * Returns the Tooltipster objects generated by the last initializing call
  36015. *
  36016. * @return {array} An array of instance objects
  36017. * @public
  36018. */
  36019. instancesLatest: function() {
  36020. return this.__instancesLatestArr;
  36021. },
  36022. /**
  36023. * For public use only, not to be used by plugins (use ::_off() instead)
  36024. *
  36025. * @return {core}
  36026. * @public
  36027. */
  36028. off: function() {
  36029. this.__$emitterPublic.off.apply(this.__$emitterPublic, Array.prototype.slice.apply(arguments));
  36030. return this;
  36031. },
  36032. /**
  36033. * For public use only, not to be used by plugins (use ::_on() instead)
  36034. *
  36035. * @return {core}
  36036. * @public
  36037. */
  36038. on: function() {
  36039. this.__$emitterPublic.on.apply(this.__$emitterPublic, Array.prototype.slice.apply(arguments));
  36040. return this;
  36041. },
  36042. /**
  36043. * For public use only, not to be used by plugins (use ::_one() instead)
  36044. *
  36045. * @return {core}
  36046. * @public
  36047. */
  36048. one: function() {
  36049. this.__$emitterPublic.one.apply(this.__$emitterPublic, Array.prototype.slice.apply(arguments));
  36050. return this;
  36051. },
  36052. /**
  36053. * Returns all HTML elements which have one or more tooltips
  36054. *
  36055. * @param {string} selector optional Use this to restrict the results
  36056. * to the descendants of an element
  36057. * @return {array} An array of HTML elements
  36058. * @public
  36059. */
  36060. origins: function(selector) {
  36061. var sel = selector ?
  36062. selector +' ' :
  36063. '';
  36064. return $(sel +'.tooltipstered').toArray();
  36065. },
  36066. /**
  36067. * Change default options for all future instances
  36068. *
  36069. * @param {object} d The options that should be made defaults
  36070. * @return {core}
  36071. * @public
  36072. */
  36073. setDefaults: function(d) {
  36074. $.extend(defaults, d);
  36075. return this;
  36076. },
  36077. /**
  36078. * For users to trigger their handlers on the public emitter
  36079. *
  36080. * @returns {core}
  36081. * @public
  36082. */
  36083. triggerHandler: function() {
  36084. this.__$emitterPublic.triggerHandler.apply(this.__$emitterPublic, Array.prototype.slice.apply(arguments));
  36085. return this;
  36086. }
  36087. };
  36088. // $.tooltipster will be used to call core methods
  36089. $.tooltipster = new core();
  36090. // the Tooltipster instance class (mind the capital T)
  36091. $.Tooltipster = function(element, options) {
  36092. // list of instance variables
  36093. // stack of custom callbacks provided as parameters to API methods
  36094. this.__callbacks = {
  36095. close: [],
  36096. open: []
  36097. };
  36098. // the schedule time of DOM removal
  36099. this.__closingTime;
  36100. // this will be the user content shown in the tooltip. A capital "C" is used
  36101. // because there is also a method called content()
  36102. this.__Content;
  36103. // for the size tracker
  36104. this.__contentBcr;
  36105. // to disable the tooltip after destruction
  36106. this.__destroyed = false;
  36107. // we can't emit directly on the instance because if a method with the same
  36108. // name as the event exists, it will be called by jQuery. Se we use a plain
  36109. // object as emitter. This emitter is for internal use by plugins,
  36110. // if needed.
  36111. this.__$emitterPrivate = $({});
  36112. // this emitter is for the user to listen to events without risking to mess
  36113. // with our internal listeners
  36114. this.__$emitterPublic = $({});
  36115. this.__enabled = true;
  36116. // the reference to the gc interval
  36117. this.__garbageCollector;
  36118. // various position and size data recomputed before each repositioning
  36119. this.__Geometry;
  36120. // the tooltip position, saved after each repositioning by a plugin
  36121. this.__lastPosition;
  36122. // a unique namespace per instance
  36123. this.__namespace = 'tooltipster-'+ Math.round(Math.random()*1000000);
  36124. this.__options;
  36125. // will be used to support origins in scrollable areas
  36126. this.__$originParents;
  36127. this.__pointerIsOverOrigin = false;
  36128. // to remove themes if needed
  36129. this.__previousThemes = [];
  36130. // the state can be either: appearing, stable, disappearing, closed
  36131. this.__state = 'closed';
  36132. // timeout references
  36133. this.__timeouts = {
  36134. close: [],
  36135. open: null
  36136. };
  36137. // store touch events to be able to detect emulated mouse events
  36138. this.__touchEvents = [];
  36139. // the reference to the tracker interval
  36140. this.__tracker = null;
  36141. // the element to which this tooltip is associated
  36142. this._$origin;
  36143. // this will be the tooltip element (jQuery wrapped HTML element).
  36144. // It's the job of a plugin to create it and append it to the DOM
  36145. this._$tooltip;
  36146. // launch
  36147. this.__init(element, options);
  36148. };
  36149. $.Tooltipster.prototype = {
  36150. /**
  36151. * @param origin
  36152. * @param options
  36153. * @private
  36154. */
  36155. __init: function(origin, options) {
  36156. var self = this;
  36157. self._$origin = $(origin);
  36158. self.__options = $.extend(true, {}, defaults, options);
  36159. // some options may need to be reformatted
  36160. self.__optionsFormat();
  36161. // don't run on old IE if asked no to
  36162. if ( !env.IE
  36163. || env.IE >= self.__options.IEmin
  36164. ) {
  36165. // note: the content is null (empty) by default and can stay that
  36166. // way if the plugin remains initialized but not fed any content. The
  36167. // tooltip will just not appear.
  36168. // let's save the initial value of the title attribute for later
  36169. // restoration if need be.
  36170. var initialTitle = null;
  36171. // it will already have been saved in case of multiple tooltips
  36172. if (self._$origin.data('tooltipster-initialTitle') === undefined) {
  36173. initialTitle = self._$origin.attr('title');
  36174. // we do not want initialTitle to be "undefined" because
  36175. // of how jQuery's .data() method works
  36176. if (initialTitle === undefined) initialTitle = null;
  36177. self._$origin.data('tooltipster-initialTitle', initialTitle);
  36178. }
  36179. // If content is provided in the options, it has precedence over the
  36180. // title attribute.
  36181. // Note: an empty string is considered content, only 'null' represents
  36182. // the absence of content.
  36183. // Also, an existing title="" attribute will result in an empty string
  36184. // content
  36185. if (self.__options.content !== null) {
  36186. self.__contentSet(self.__options.content);
  36187. }
  36188. else {
  36189. var selector = self._$origin.attr('data-tooltip-content'),
  36190. $el;
  36191. if (selector){
  36192. $el = $(selector);
  36193. }
  36194. if ($el && $el[0]) {
  36195. self.__contentSet($el.first());
  36196. }
  36197. else {
  36198. self.__contentSet(initialTitle);
  36199. }
  36200. }
  36201. self._$origin
  36202. // strip the title off of the element to prevent the default tooltips
  36203. // from popping up
  36204. .removeAttr('title')
  36205. // to be able to find all instances on the page later (upon window
  36206. // events in particular)
  36207. .addClass('tooltipstered');
  36208. // set listeners on the origin
  36209. self.__prepareOrigin();
  36210. // set the garbage collector
  36211. self.__prepareGC();
  36212. // init plugins
  36213. $.each(self.__options.plugins, function(i, pluginName) {
  36214. self._plug(pluginName);
  36215. });
  36216. // to detect swiping
  36217. if (env.hasTouchCapability) {
  36218. $(env.window.document.body).on('touchmove.'+ self.__namespace +'-triggerOpen', function(event) {
  36219. self._touchRecordEvent(event);
  36220. });
  36221. }
  36222. self
  36223. // prepare the tooltip when it gets created. This event must
  36224. // be fired by a plugin
  36225. ._on('created', function() {
  36226. self.__prepareTooltip();
  36227. })
  36228. // save position information when it's sent by a plugin
  36229. ._on('repositioned', function(e) {
  36230. self.__lastPosition = e.position;
  36231. });
  36232. }
  36233. else {
  36234. self.__options.disabled = true;
  36235. }
  36236. },
  36237. /**
  36238. * Insert the content into the appropriate HTML element of the tooltip
  36239. *
  36240. * @returns {self}
  36241. * @private
  36242. */
  36243. __contentInsert: function() {
  36244. var self = this,
  36245. $el = self._$tooltip.find('.tooltipster-content'),
  36246. formattedContent = self.__Content,
  36247. format = function(content) {
  36248. formattedContent = content;
  36249. };
  36250. self._trigger({
  36251. type: 'format',
  36252. content: self.__Content,
  36253. format: format
  36254. });
  36255. if (self.__options.functionFormat) {
  36256. formattedContent = self.__options.functionFormat.call(
  36257. self,
  36258. self,
  36259. { origin: self._$origin[0] },
  36260. self.__Content
  36261. );
  36262. }
  36263. if (typeof formattedContent === 'string' && !self.__options.contentAsHTML) {
  36264. $el.text(formattedContent);
  36265. }
  36266. else {
  36267. $el
  36268. .empty()
  36269. .append(formattedContent);
  36270. }
  36271. return self;
  36272. },
  36273. /**
  36274. * Save the content, cloning it beforehand if need be
  36275. *
  36276. * @param content
  36277. * @returns {self}
  36278. * @private
  36279. */
  36280. __contentSet: function(content) {
  36281. // clone if asked. Cloning the object makes sure that each instance has its
  36282. // own version of the content (in case a same object were provided for several
  36283. // instances)
  36284. // reminder: typeof null === object
  36285. if (content instanceof $ && this.__options.contentCloning) {
  36286. content = content.clone(true);
  36287. }
  36288. this.__Content = content;
  36289. this._trigger({
  36290. type: 'updated',
  36291. content: content
  36292. });
  36293. return this;
  36294. },
  36295. /**
  36296. * Error message about a method call made after destruction
  36297. *
  36298. * @private
  36299. */
  36300. __destroyError: function() {
  36301. throw new Error('This tooltip has been destroyed and cannot execute your method call.');
  36302. },
  36303. /**
  36304. * Gather all information about dimensions and available space,
  36305. * called before every repositioning
  36306. *
  36307. * @private
  36308. * @returns {object}
  36309. */
  36310. __geometry: function() {
  36311. var self = this,
  36312. $target = self._$origin,
  36313. originIsArea = self._$origin.is('area');
  36314. // if this._$origin is a map area, the target we'll need
  36315. // the dimensions of is actually the image using the map,
  36316. // not the area itself
  36317. if (originIsArea) {
  36318. var mapName = self._$origin.parent().attr('name');
  36319. $target = $('img[usemap="#'+ mapName +'"]');
  36320. }
  36321. var bcr = $target[0].getBoundingClientRect(),
  36322. $document = $(env.window.document),
  36323. $window = $(env.window),
  36324. $parent = $target,
  36325. // some useful properties of important elements
  36326. geo = {
  36327. // available space for the tooltip, see down below
  36328. available: {
  36329. document: null,
  36330. window: null
  36331. },
  36332. document: {
  36333. size: {
  36334. height: $document.height(),
  36335. width: $document.width()
  36336. }
  36337. },
  36338. window: {
  36339. scroll: {
  36340. // the second ones are for IE compatibility
  36341. left: env.window.scrollX || env.window.document.documentElement.scrollLeft,
  36342. top: env.window.scrollY || env.window.document.documentElement.scrollTop
  36343. },
  36344. size: {
  36345. height: $window.height(),
  36346. width: $window.width()
  36347. }
  36348. },
  36349. origin: {
  36350. // the origin has a fixed lineage if itself or one of its
  36351. // ancestors has a fixed position
  36352. fixedLineage: false,
  36353. // relative to the document
  36354. offset: {},
  36355. size: {
  36356. height: bcr.bottom - bcr.top,
  36357. width: bcr.right - bcr.left
  36358. },
  36359. usemapImage: originIsArea ? $target[0] : null,
  36360. // relative to the window
  36361. windowOffset: {
  36362. bottom: bcr.bottom,
  36363. left: bcr.left,
  36364. right: bcr.right,
  36365. top: bcr.top
  36366. }
  36367. }
  36368. },
  36369. geoFixed = false;
  36370. // if the element is a map area, some properties may need
  36371. // to be recalculated
  36372. if (originIsArea) {
  36373. var shape = self._$origin.attr('shape'),
  36374. coords = self._$origin.attr('coords');
  36375. if (coords) {
  36376. coords = coords.split(',');
  36377. $.map(coords, function(val, i) {
  36378. coords[i] = parseInt(val);
  36379. });
  36380. }
  36381. // if the image itself is the area, nothing more to do
  36382. if (shape != 'default') {
  36383. switch(shape) {
  36384. case 'circle':
  36385. var circleCenterLeft = coords[0],
  36386. circleCenterTop = coords[1],
  36387. circleRadius = coords[2],
  36388. areaTopOffset = circleCenterTop - circleRadius,
  36389. areaLeftOffset = circleCenterLeft - circleRadius;
  36390. geo.origin.size.height = circleRadius * 2;
  36391. geo.origin.size.width = geo.origin.size.height;
  36392. geo.origin.windowOffset.left += areaLeftOffset;
  36393. geo.origin.windowOffset.top += areaTopOffset;
  36394. break;
  36395. case 'rect':
  36396. var areaLeft = coords[0],
  36397. areaTop = coords[1],
  36398. areaRight = coords[2],
  36399. areaBottom = coords[3];
  36400. geo.origin.size.height = areaBottom - areaTop;
  36401. geo.origin.size.width = areaRight - areaLeft;
  36402. geo.origin.windowOffset.left += areaLeft;
  36403. geo.origin.windowOffset.top += areaTop;
  36404. break;
  36405. case 'poly':
  36406. var areaSmallestX = 0,
  36407. areaSmallestY = 0,
  36408. areaGreatestX = 0,
  36409. areaGreatestY = 0,
  36410. arrayAlternate = 'even';
  36411. for (var i = 0; i < coords.length; i++) {
  36412. var areaNumber = coords[i];
  36413. if (arrayAlternate == 'even') {
  36414. if (areaNumber > areaGreatestX) {
  36415. areaGreatestX = areaNumber;
  36416. if (i === 0) {
  36417. areaSmallestX = areaGreatestX;
  36418. }
  36419. }
  36420. if (areaNumber < areaSmallestX) {
  36421. areaSmallestX = areaNumber;
  36422. }
  36423. arrayAlternate = 'odd';
  36424. }
  36425. else {
  36426. if (areaNumber > areaGreatestY) {
  36427. areaGreatestY = areaNumber;
  36428. if (i == 1) {
  36429. areaSmallestY = areaGreatestY;
  36430. }
  36431. }
  36432. if (areaNumber < areaSmallestY) {
  36433. areaSmallestY = areaNumber;
  36434. }
  36435. arrayAlternate = 'even';
  36436. }
  36437. }
  36438. geo.origin.size.height = areaGreatestY - areaSmallestY;
  36439. geo.origin.size.width = areaGreatestX - areaSmallestX;
  36440. geo.origin.windowOffset.left += areaSmallestX;
  36441. geo.origin.windowOffset.top += areaSmallestY;
  36442. break;
  36443. }
  36444. }
  36445. }
  36446. // user callback through an event
  36447. var edit = function(r) {
  36448. geo.origin.size.height = r.height,
  36449. geo.origin.windowOffset.left = r.left,
  36450. geo.origin.windowOffset.top = r.top,
  36451. geo.origin.size.width = r.width
  36452. };
  36453. self._trigger({
  36454. type: 'geometry',
  36455. edit: edit,
  36456. geometry: {
  36457. height: geo.origin.size.height,
  36458. left: geo.origin.windowOffset.left,
  36459. top: geo.origin.windowOffset.top,
  36460. width: geo.origin.size.width
  36461. }
  36462. });
  36463. // calculate the remaining properties with what we got
  36464. geo.origin.windowOffset.right = geo.origin.windowOffset.left + geo.origin.size.width;
  36465. geo.origin.windowOffset.bottom = geo.origin.windowOffset.top + geo.origin.size.height;
  36466. geo.origin.offset.left = geo.origin.windowOffset.left + geo.window.scroll.left;
  36467. geo.origin.offset.top = geo.origin.windowOffset.top + geo.window.scroll.top;
  36468. geo.origin.offset.bottom = geo.origin.offset.top + geo.origin.size.height;
  36469. geo.origin.offset.right = geo.origin.offset.left + geo.origin.size.width;
  36470. // the space that is available to display the tooltip relatively to the document
  36471. geo.available.document = {
  36472. bottom: {
  36473. height: geo.document.size.height - geo.origin.offset.bottom,
  36474. width: geo.document.size.width
  36475. },
  36476. left: {
  36477. height: geo.document.size.height,
  36478. width: geo.origin.offset.left
  36479. },
  36480. right: {
  36481. height: geo.document.size.height,
  36482. width: geo.document.size.width - geo.origin.offset.right
  36483. },
  36484. top: {
  36485. height: geo.origin.offset.top,
  36486. width: geo.document.size.width
  36487. }
  36488. };
  36489. // the space that is available to display the tooltip relatively to the viewport
  36490. // (the resulting values may be negative if the origin overflows the viewport)
  36491. geo.available.window = {
  36492. bottom: {
  36493. // the inner max is here to make sure the available height is no bigger
  36494. // than the viewport height (when the origin is off screen at the top).
  36495. // The outer max just makes sure that the height is not negative (when
  36496. // the origin overflows at the bottom).
  36497. height: Math.max(geo.window.size.height - Math.max(geo.origin.windowOffset.bottom, 0), 0),
  36498. width: geo.window.size.width
  36499. },
  36500. left: {
  36501. height: geo.window.size.height,
  36502. width: Math.max(geo.origin.windowOffset.left, 0)
  36503. },
  36504. right: {
  36505. height: geo.window.size.height,
  36506. width: Math.max(geo.window.size.width - Math.max(geo.origin.windowOffset.right, 0), 0)
  36507. },
  36508. top: {
  36509. height: Math.max(geo.origin.windowOffset.top, 0),
  36510. width: geo.window.size.width
  36511. }
  36512. };
  36513. while ($parent[0].tagName.toLowerCase() != 'html') {
  36514. if ($parent.css('position') == 'fixed') {
  36515. geo.origin.fixedLineage = true;
  36516. break;
  36517. }
  36518. $parent = $parent.parent();
  36519. }
  36520. return geo;
  36521. },
  36522. /**
  36523. * Some options may need to be formated before being used
  36524. *
  36525. * @returns {self}
  36526. * @private
  36527. */
  36528. __optionsFormat: function() {
  36529. if (typeof this.__options.animationDuration == 'number') {
  36530. this.__options.animationDuration = [this.__options.animationDuration, this.__options.animationDuration];
  36531. }
  36532. if (typeof this.__options.delay == 'number') {
  36533. this.__options.delay = [this.__options.delay, this.__options.delay];
  36534. }
  36535. if (typeof this.__options.delayTouch == 'number') {
  36536. this.__options.delayTouch = [this.__options.delayTouch, this.__options.delayTouch];
  36537. }
  36538. if (typeof this.__options.theme == 'string') {
  36539. this.__options.theme = [this.__options.theme];
  36540. }
  36541. // determine the future parent
  36542. if (this.__options.parent === null) {
  36543. this.__options.parent = $(env.window.document.body);
  36544. }
  36545. else if (typeof this.__options.parent == 'string') {
  36546. this.__options.parent = $(this.__options.parent);
  36547. }
  36548. if (this.__options.trigger == 'hover') {
  36549. this.__options.triggerOpen = {
  36550. mouseenter: true,
  36551. touchstart: true
  36552. };
  36553. this.__options.triggerClose = {
  36554. mouseleave: true,
  36555. originClick: true,
  36556. touchleave: true
  36557. };
  36558. }
  36559. else if (this.__options.trigger == 'click') {
  36560. this.__options.triggerOpen = {
  36561. click: true,
  36562. tap: true
  36563. };
  36564. this.__options.triggerClose = {
  36565. click: true,
  36566. tap: true
  36567. };
  36568. }
  36569. // for the plugins
  36570. this._trigger('options');
  36571. return this;
  36572. },
  36573. /**
  36574. * Schedules or cancels the garbage collector task
  36575. *
  36576. * @returns {self}
  36577. * @private
  36578. */
  36579. __prepareGC: function() {
  36580. var self = this;
  36581. // in case the selfDestruction option has been changed by a method call
  36582. if (self.__options.selfDestruction) {
  36583. // the GC task
  36584. self.__garbageCollector = setInterval(function() {
  36585. var now = new Date().getTime();
  36586. // forget the old events
  36587. self.__touchEvents = $.grep(self.__touchEvents, function(event, i) {
  36588. // 1 minute
  36589. return now - event.time > 60000;
  36590. });
  36591. // auto-destruct if the origin is gone
  36592. if (!bodyContains(self._$origin)) {
  36593. self.close(function(){
  36594. self.destroy();
  36595. });
  36596. }
  36597. }, 20000);
  36598. }
  36599. else {
  36600. clearInterval(self.__garbageCollector);
  36601. }
  36602. return self;
  36603. },
  36604. /**
  36605. * Sets listeners on the origin if the open triggers require them.
  36606. * Unlike the listeners set at opening time, these ones
  36607. * remain even when the tooltip is closed. It has been made a
  36608. * separate method so it can be called when the triggers are
  36609. * changed in the options. Closing is handled in _open()
  36610. * because of the bindings that may be needed on the tooltip
  36611. * itself
  36612. *
  36613. * @returns {self}
  36614. * @private
  36615. */
  36616. __prepareOrigin: function() {
  36617. var self = this;
  36618. // in case we're resetting the triggers
  36619. self._$origin.off('.'+ self.__namespace +'-triggerOpen');
  36620. // if the device is touch capable, even if only mouse triggers
  36621. // are asked, we need to listen to touch events to know if the mouse
  36622. // events are actually emulated (so we can ignore them)
  36623. if (env.hasTouchCapability) {
  36624. self._$origin.on(
  36625. 'touchstart.'+ self.__namespace +'-triggerOpen ' +
  36626. 'touchend.'+ self.__namespace +'-triggerOpen ' +
  36627. 'touchcancel.'+ self.__namespace +'-triggerOpen',
  36628. function(event){
  36629. self._touchRecordEvent(event);
  36630. }
  36631. );
  36632. }
  36633. // mouse click and touch tap work the same way
  36634. if ( self.__options.triggerOpen.click
  36635. || (self.__options.triggerOpen.tap && env.hasTouchCapability)
  36636. ) {
  36637. var eventNames = '';
  36638. if (self.__options.triggerOpen.click) {
  36639. eventNames += 'click.'+ self.__namespace +'-triggerOpen ';
  36640. }
  36641. if (self.__options.triggerOpen.tap && env.hasTouchCapability) {
  36642. eventNames += 'touchend.'+ self.__namespace +'-triggerOpen';
  36643. }
  36644. self._$origin.on(eventNames, function(event) {
  36645. if (self._touchIsMeaningfulEvent(event)) {
  36646. self._open(event);
  36647. }
  36648. });
  36649. }
  36650. // mouseenter and touch start work the same way
  36651. if ( self.__options.triggerOpen.mouseenter
  36652. || (self.__options.triggerOpen.touchstart && env.hasTouchCapability)
  36653. ) {
  36654. var eventNames = '';
  36655. if (self.__options.triggerOpen.mouseenter) {
  36656. eventNames += 'mouseenter.'+ self.__namespace +'-triggerOpen ';
  36657. }
  36658. if (self.__options.triggerOpen.touchstart && env.hasTouchCapability) {
  36659. eventNames += 'touchstart.'+ self.__namespace +'-triggerOpen';
  36660. }
  36661. self._$origin.on(eventNames, function(event) {
  36662. if ( self._touchIsTouchEvent(event)
  36663. || !self._touchIsEmulatedEvent(event)
  36664. ) {
  36665. self.__pointerIsOverOrigin = true;
  36666. self._openShortly(event);
  36667. }
  36668. });
  36669. }
  36670. // info for the mouseleave/touchleave close triggers when they use a delay
  36671. if ( self.__options.triggerClose.mouseleave
  36672. || (self.__options.triggerClose.touchleave && env.hasTouchCapability)
  36673. ) {
  36674. var eventNames = '';
  36675. if (self.__options.triggerClose.mouseleave) {
  36676. eventNames += 'mouseleave.'+ self.__namespace +'-triggerOpen ';
  36677. }
  36678. if (self.__options.triggerClose.touchleave && env.hasTouchCapability) {
  36679. eventNames += 'touchend.'+ self.__namespace +'-triggerOpen touchcancel.'+ self.__namespace +'-triggerOpen';
  36680. }
  36681. self._$origin.on(eventNames, function(event) {
  36682. if (self._touchIsMeaningfulEvent(event)) {
  36683. self.__pointerIsOverOrigin = false;
  36684. }
  36685. });
  36686. }
  36687. return self;
  36688. },
  36689. /**
  36690. * Do the things that need to be done only once after the tooltip
  36691. * HTML element it has been created. It has been made a separate
  36692. * method so it can be called when options are changed. Remember
  36693. * that the tooltip may actually exist in the DOM before it is
  36694. * opened, and present after it has been closed: it's the display
  36695. * plugin that takes care of handling it.
  36696. *
  36697. * @returns {self}
  36698. * @private
  36699. */
  36700. __prepareTooltip: function() {
  36701. var self = this,
  36702. p = self.__options.interactive ? 'auto' : '';
  36703. // this will be useful to know quickly if the tooltip is in
  36704. // the DOM or not
  36705. self._$tooltip
  36706. .attr('id', self.__namespace)
  36707. .css({
  36708. // pointer events
  36709. 'pointer-events': p,
  36710. zIndex: self.__options.zIndex
  36711. });
  36712. // themes
  36713. // remove the old ones and add the new ones
  36714. $.each(self.__previousThemes, function(i, theme) {
  36715. self._$tooltip.removeClass(theme);
  36716. });
  36717. $.each(self.__options.theme, function(i, theme) {
  36718. self._$tooltip.addClass(theme);
  36719. });
  36720. self.__previousThemes = $.merge([], self.__options.theme);
  36721. return self;
  36722. },
  36723. /**
  36724. * Handles the scroll on any of the parents of the origin (when the
  36725. * tooltip is open)
  36726. *
  36727. * @param {object} event
  36728. * @returns {self}
  36729. * @private
  36730. */
  36731. __scrollHandler: function(event) {
  36732. var self = this;
  36733. if (self.__options.triggerClose.scroll) {
  36734. self._close(event);
  36735. }
  36736. else {
  36737. // if the origin or tooltip have been removed: do nothing, the tracker will
  36738. // take care of it later
  36739. if (bodyContains(self._$origin) && bodyContains(self._$tooltip)) {
  36740. var geo = null;
  36741. // if the scroll happened on the window
  36742. if (event.target === env.window.document) {
  36743. // if the origin has a fixed lineage, window scroll will have no
  36744. // effect on its position nor on the position of the tooltip
  36745. if (!self.__Geometry.origin.fixedLineage) {
  36746. // we don't need to do anything unless repositionOnScroll is true
  36747. // because the tooltip will already have moved with the window
  36748. // (and of course with the origin)
  36749. if (self.__options.repositionOnScroll) {
  36750. self.reposition(event);
  36751. }
  36752. }
  36753. }
  36754. // if the scroll happened on another parent of the tooltip, it means
  36755. // that it's in a scrollable area and now needs to have its position
  36756. // adjusted or recomputed, depending ont the repositionOnScroll
  36757. // option. Also, if the origin is partly hidden due to a parent that
  36758. // hides its overflow, we'll just hide (not close) the tooltip.
  36759. else {
  36760. geo = self.__geometry();
  36761. var overflows = false;
  36762. // a fixed position origin is not affected by the overflow hiding
  36763. // of a parent
  36764. if (self._$origin.css('position') != 'fixed') {
  36765. self.__$originParents.each(function(i, el) {
  36766. var $el = $(el),
  36767. overflowX = $el.css('overflow-x'),
  36768. overflowY = $el.css('overflow-y');
  36769. if (overflowX != 'visible' || overflowY != 'visible') {
  36770. var bcr = el.getBoundingClientRect();
  36771. if (overflowX != 'visible') {
  36772. if ( geo.origin.windowOffset.left < bcr.left
  36773. || geo.origin.windowOffset.right > bcr.right
  36774. ) {
  36775. overflows = true;
  36776. return false;
  36777. }
  36778. }
  36779. if (overflowY != 'visible') {
  36780. if ( geo.origin.windowOffset.top < bcr.top
  36781. || geo.origin.windowOffset.bottom > bcr.bottom
  36782. ) {
  36783. overflows = true;
  36784. return false;
  36785. }
  36786. }
  36787. }
  36788. // no need to go further if fixed, for the same reason as above
  36789. if ($el.css('position') == 'fixed') {
  36790. return false;
  36791. }
  36792. });
  36793. }
  36794. if (overflows) {
  36795. self._$tooltip.css('visibility', 'hidden');
  36796. }
  36797. else {
  36798. self._$tooltip.css('visibility', 'visible');
  36799. // reposition
  36800. if (self.__options.repositionOnScroll) {
  36801. self.reposition(event);
  36802. }
  36803. // or just adjust offset
  36804. else {
  36805. // we have to use offset and not windowOffset because this way,
  36806. // only the scroll distance of the scrollable areas are taken into
  36807. // account (the scrolltop value of the main window must be
  36808. // ignored since the tooltip already moves with it)
  36809. var offsetLeft = geo.origin.offset.left - self.__Geometry.origin.offset.left,
  36810. offsetTop = geo.origin.offset.top - self.__Geometry.origin.offset.top;
  36811. // add the offset to the position initially computed by the display plugin
  36812. self._$tooltip.css({
  36813. left: self.__lastPosition.coord.left + offsetLeft,
  36814. top: self.__lastPosition.coord.top + offsetTop
  36815. });
  36816. }
  36817. }
  36818. }
  36819. self._trigger({
  36820. type: 'scroll',
  36821. event: event,
  36822. geo: geo
  36823. });
  36824. }
  36825. }
  36826. return self;
  36827. },
  36828. /**
  36829. * Changes the state of the tooltip
  36830. *
  36831. * @param {string} state
  36832. * @returns {self}
  36833. * @private
  36834. */
  36835. __stateSet: function(state) {
  36836. this.__state = state;
  36837. this._trigger({
  36838. type: 'state',
  36839. state: state
  36840. });
  36841. return this;
  36842. },
  36843. /**
  36844. * Clear appearance timeouts
  36845. *
  36846. * @returns {self}
  36847. * @private
  36848. */
  36849. __timeoutsClear: function() {
  36850. // there is only one possible open timeout: the delayed opening
  36851. // when the mouseenter/touchstart open triggers are used
  36852. clearTimeout(this.__timeouts.open);
  36853. this.__timeouts.open = null;
  36854. // ... but several close timeouts: the delayed closing when the
  36855. // mouseleave close trigger is used and the timer option
  36856. $.each(this.__timeouts.close, function(i, timeout) {
  36857. clearTimeout(timeout);
  36858. });
  36859. this.__timeouts.close = [];
  36860. return this;
  36861. },
  36862. /**
  36863. * Start the tracker that will make checks at regular intervals
  36864. *
  36865. * @returns {self}
  36866. * @private
  36867. */
  36868. __trackerStart: function() {
  36869. var self = this,
  36870. $content = self._$tooltip.find('.tooltipster-content');
  36871. // get the initial content size
  36872. if (self.__options.trackTooltip) {
  36873. self.__contentBcr = $content[0].getBoundingClientRect();
  36874. }
  36875. self.__tracker = setInterval(function() {
  36876. // if the origin or tooltip elements have been removed.
  36877. // Note: we could destroy the instance now if the origin has
  36878. // been removed but we'll leave that task to our garbage collector
  36879. if (!bodyContains(self._$origin) || !bodyContains(self._$tooltip)) {
  36880. self._close();
  36881. }
  36882. // if everything is alright
  36883. else {
  36884. // compare the former and current positions of the origin to reposition
  36885. // the tooltip if need be
  36886. if (self.__options.trackOrigin) {
  36887. var g = self.__geometry(),
  36888. identical = false;
  36889. // compare size first (a change requires repositioning too)
  36890. if (areEqual(g.origin.size, self.__Geometry.origin.size)) {
  36891. // for elements that have a fixed lineage (see __geometry()), we track the
  36892. // top and left properties (relative to window)
  36893. if (self.__Geometry.origin.fixedLineage) {
  36894. if (areEqual(g.origin.windowOffset, self.__Geometry.origin.windowOffset)) {
  36895. identical = true;
  36896. }
  36897. }
  36898. // otherwise, track total offset (relative to document)
  36899. else {
  36900. if (areEqual(g.origin.offset, self.__Geometry.origin.offset)) {
  36901. identical = true;
  36902. }
  36903. }
  36904. }
  36905. if (!identical) {
  36906. // close the tooltip when using the mouseleave close trigger
  36907. // (see https://github.com/iamceege/tooltipster/pull/253)
  36908. if (self.__options.triggerClose.mouseleave) {
  36909. self._close();
  36910. }
  36911. else {
  36912. self.reposition();
  36913. }
  36914. }
  36915. }
  36916. if (self.__options.trackTooltip) {
  36917. var currentBcr = $content[0].getBoundingClientRect();
  36918. if ( currentBcr.height !== self.__contentBcr.height
  36919. || currentBcr.width !== self.__contentBcr.width
  36920. ) {
  36921. self.reposition();
  36922. self.__contentBcr = currentBcr;
  36923. }
  36924. }
  36925. }
  36926. }, self.__options.trackerInterval);
  36927. return self;
  36928. },
  36929. /**
  36930. * Closes the tooltip (after the closing delay)
  36931. *
  36932. * @param event
  36933. * @param callback
  36934. * @param force Set to true to override a potential refusal of the user's function
  36935. * @returns {self}
  36936. * @protected
  36937. */
  36938. _close: function(event, callback, force) {
  36939. var self = this,
  36940. ok = true;
  36941. self._trigger({
  36942. type: 'close',
  36943. event: event,
  36944. stop: function() {
  36945. ok = false;
  36946. }
  36947. });
  36948. // a destroying tooltip (force == true) may not refuse to close
  36949. if (ok || force) {
  36950. // save the method custom callback and cancel any open method custom callbacks
  36951. if (callback) self.__callbacks.close.push(callback);
  36952. self.__callbacks.open = [];
  36953. // clear open/close timeouts
  36954. self.__timeoutsClear();
  36955. var finishCallbacks = function() {
  36956. // trigger any close method custom callbacks and reset them
  36957. $.each(self.__callbacks.close, function(i,c) {
  36958. c.call(self, self, {
  36959. event: event,
  36960. origin: self._$origin[0]
  36961. });
  36962. });
  36963. self.__callbacks.close = [];
  36964. };
  36965. if (self.__state != 'closed') {
  36966. var necessary = true,
  36967. d = new Date(),
  36968. now = d.getTime(),
  36969. newClosingTime = now + self.__options.animationDuration[1];
  36970. // the tooltip may already already be disappearing, but if a new
  36971. // call to close() is made after the animationDuration was changed
  36972. // to 0 (for example), we ought to actually close it sooner than
  36973. // previously scheduled. In that case it should be noted that the
  36974. // browser will not adapt the animation duration to the new
  36975. // animationDuration that was set after the start of the closing
  36976. // animation.
  36977. // Note: the same thing could be considered at opening, but is not
  36978. // really useful since the tooltip is actually opened immediately
  36979. // upon a call to _open(). Since it would not make the opening
  36980. // animation finish sooner, its sole impact would be to trigger the
  36981. // state event and the open callbacks sooner than the actual end of
  36982. // the opening animation, which is not great.
  36983. if (self.__state == 'disappearing') {
  36984. if ( newClosingTime > self.__closingTime
  36985. // in case closing is actually overdue because the script
  36986. // execution was suspended. See #679
  36987. && self.__options.animationDuration[1] > 0
  36988. ) {
  36989. necessary = false;
  36990. }
  36991. }
  36992. if (necessary) {
  36993. self.__closingTime = newClosingTime;
  36994. if (self.__state != 'disappearing') {
  36995. self.__stateSet('disappearing');
  36996. }
  36997. var finish = function() {
  36998. // stop the tracker
  36999. clearInterval(self.__tracker);
  37000. // a "beforeClose" option has been asked several times but would
  37001. // probably useless since the content element is still accessible
  37002. // via ::content(), and because people can always use listeners
  37003. // inside their content to track what's going on. For the sake of
  37004. // simplicity, this has been denied. Bur for the rare people who
  37005. // really need the option (for old browsers or for the case where
  37006. // detaching the content is actually destructive, for file or
  37007. // password inputs for example), this event will do the work.
  37008. self._trigger({
  37009. type: 'closing',
  37010. event: event
  37011. });
  37012. // unbind listeners which are no longer needed
  37013. self._$tooltip
  37014. .off('.'+ self.__namespace +'-triggerClose')
  37015. .removeClass('tooltipster-dying');
  37016. // orientationchange, scroll and resize listeners
  37017. $(env.window).off('.'+ self.__namespace +'-triggerClose');
  37018. // scroll listeners
  37019. self.__$originParents.each(function(i, el) {
  37020. $(el).off('scroll.'+ self.__namespace +'-triggerClose');
  37021. });
  37022. // clear the array to prevent memory leaks
  37023. self.__$originParents = null;
  37024. $(env.window.document.body).off('.'+ self.__namespace +'-triggerClose');
  37025. self._$origin.off('.'+ self.__namespace +'-triggerClose');
  37026. self._off('dismissable');
  37027. // a plugin that would like to remove the tooltip from the
  37028. // DOM when closed should bind on this
  37029. self.__stateSet('closed');
  37030. // trigger event
  37031. self._trigger({
  37032. type: 'after',
  37033. event: event
  37034. });
  37035. // call our constructor custom callback function
  37036. if (self.__options.functionAfter) {
  37037. self.__options.functionAfter.call(self, self, {
  37038. event: event,
  37039. origin: self._$origin[0]
  37040. });
  37041. }
  37042. // call our method custom callbacks functions
  37043. finishCallbacks();
  37044. };
  37045. if (env.hasTransitions) {
  37046. self._$tooltip.css({
  37047. '-moz-animation-duration': self.__options.animationDuration[1] + 'ms',
  37048. '-ms-animation-duration': self.__options.animationDuration[1] + 'ms',
  37049. '-o-animation-duration': self.__options.animationDuration[1] + 'ms',
  37050. '-webkit-animation-duration': self.__options.animationDuration[1] + 'ms',
  37051. 'animation-duration': self.__options.animationDuration[1] + 'ms',
  37052. 'transition-duration': self.__options.animationDuration[1] + 'ms'
  37053. });
  37054. self._$tooltip
  37055. // clear both potential open and close tasks
  37056. .clearQueue()
  37057. .removeClass('tooltipster-show')
  37058. // for transitions only
  37059. .addClass('tooltipster-dying');
  37060. if (self.__options.animationDuration[1] > 0) {
  37061. self._$tooltip.delay(self.__options.animationDuration[1]);
  37062. }
  37063. self._$tooltip.queue(finish);
  37064. }
  37065. else {
  37066. self._$tooltip
  37067. .stop()
  37068. .fadeOut(self.__options.animationDuration[1], finish);
  37069. }
  37070. }
  37071. }
  37072. // if the tooltip is already closed, we still need to trigger
  37073. // the method custom callbacks
  37074. else {
  37075. finishCallbacks();
  37076. }
  37077. }
  37078. return self;
  37079. },
  37080. /**
  37081. * For internal use by plugins, if needed
  37082. *
  37083. * @returns {self}
  37084. * @protected
  37085. */
  37086. _off: function() {
  37087. this.__$emitterPrivate.off.apply(this.__$emitterPrivate, Array.prototype.slice.apply(arguments));
  37088. return this;
  37089. },
  37090. /**
  37091. * For internal use by plugins, if needed
  37092. *
  37093. * @returns {self}
  37094. * @protected
  37095. */
  37096. _on: function() {
  37097. this.__$emitterPrivate.on.apply(this.__$emitterPrivate, Array.prototype.slice.apply(arguments));
  37098. return this;
  37099. },
  37100. /**
  37101. * For internal use by plugins, if needed
  37102. *
  37103. * @returns {self}
  37104. * @protected
  37105. */
  37106. _one: function() {
  37107. this.__$emitterPrivate.one.apply(this.__$emitterPrivate, Array.prototype.slice.apply(arguments));
  37108. return this;
  37109. },
  37110. /**
  37111. * Opens the tooltip right away.
  37112. *
  37113. * @param event
  37114. * @param callback Will be called when the opening animation is over
  37115. * @returns {self}
  37116. * @protected
  37117. */
  37118. _open: function(event, callback) {
  37119. var self = this;
  37120. // if the destruction process has not begun and if this was not
  37121. // triggered by an unwanted emulated click event
  37122. if (!self.__destroying) {
  37123. // check that the origin is still in the DOM
  37124. if ( bodyContains(self._$origin)
  37125. // if the tooltip is enabled
  37126. && self.__enabled
  37127. ) {
  37128. var ok = true;
  37129. // if the tooltip is not open yet, we need to call functionBefore.
  37130. // otherwise we can jst go on
  37131. if (self.__state == 'closed') {
  37132. // trigger an event. The event.stop function allows the callback
  37133. // to prevent the opening of the tooltip
  37134. self._trigger({
  37135. type: 'before',
  37136. event: event,
  37137. stop: function() {
  37138. ok = false;
  37139. }
  37140. });
  37141. if (ok && self.__options.functionBefore) {
  37142. // call our custom function before continuing
  37143. ok = self.__options.functionBefore.call(self, self, {
  37144. event: event,
  37145. origin: self._$origin[0]
  37146. });
  37147. }
  37148. }
  37149. if (ok !== false) {
  37150. // if there is some content
  37151. if (self.__Content !== null) {
  37152. // save the method callback and cancel close method callbacks
  37153. if (callback) {
  37154. self.__callbacks.open.push(callback);
  37155. }
  37156. self.__callbacks.close = [];
  37157. // get rid of any appearance timeouts
  37158. self.__timeoutsClear();
  37159. var extraTime,
  37160. finish = function() {
  37161. if (self.__state != 'stable') {
  37162. self.__stateSet('stable');
  37163. }
  37164. // trigger any open method custom callbacks and reset them
  37165. $.each(self.__callbacks.open, function(i,c) {
  37166. c.call(self, self, {
  37167. origin: self._$origin[0],
  37168. tooltip: self._$tooltip[0]
  37169. });
  37170. });
  37171. self.__callbacks.open = [];
  37172. };
  37173. // if the tooltip is already open
  37174. if (self.__state !== 'closed') {
  37175. // the timer (if any) will start (or restart) right now
  37176. extraTime = 0;
  37177. // if it was disappearing, cancel that
  37178. if (self.__state === 'disappearing') {
  37179. self.__stateSet('appearing');
  37180. if (env.hasTransitions) {
  37181. self._$tooltip
  37182. .clearQueue()
  37183. .removeClass('tooltipster-dying')
  37184. .addClass('tooltipster-show');
  37185. if (self.__options.animationDuration[0] > 0) {
  37186. self._$tooltip.delay(self.__options.animationDuration[0]);
  37187. }
  37188. self._$tooltip.queue(finish);
  37189. }
  37190. else {
  37191. // in case the tooltip was currently fading out, bring it back
  37192. // to life
  37193. self._$tooltip
  37194. .stop()
  37195. .fadeIn(finish);
  37196. }
  37197. }
  37198. // if the tooltip is already open, we still need to trigger the method
  37199. // custom callback
  37200. else if (self.__state == 'stable') {
  37201. finish();
  37202. }
  37203. }
  37204. // if the tooltip isn't already open, open it
  37205. else {
  37206. // a plugin must bind on this and store the tooltip in this._$tooltip
  37207. self.__stateSet('appearing');
  37208. // the timer (if any) will start when the tooltip has fully appeared
  37209. // after its transition
  37210. extraTime = self.__options.animationDuration[0];
  37211. // insert the content inside the tooltip
  37212. self.__contentInsert();
  37213. // reposition the tooltip and attach to the DOM
  37214. self.reposition(event, true);
  37215. // animate in the tooltip. If the display plugin wants no css
  37216. // animations, it may override the animation option with a
  37217. // dummy value that will produce no effect
  37218. if (env.hasTransitions) {
  37219. // note: there seems to be an issue with start animations which
  37220. // are randomly not played on fast devices in both Chrome and FF,
  37221. // couldn't find a way to solve it yet. It seems that applying
  37222. // the classes before appending to the DOM helps a little, but
  37223. // it messes up some CSS transitions. The issue almost never
  37224. // happens when delay[0]==0 though
  37225. self._$tooltip
  37226. .addClass('tooltipster-'+ self.__options.animation)
  37227. .addClass('tooltipster-initial')
  37228. .css({
  37229. '-moz-animation-duration': self.__options.animationDuration[0] + 'ms',
  37230. '-ms-animation-duration': self.__options.animationDuration[0] + 'ms',
  37231. '-o-animation-duration': self.__options.animationDuration[0] + 'ms',
  37232. '-webkit-animation-duration': self.__options.animationDuration[0] + 'ms',
  37233. 'animation-duration': self.__options.animationDuration[0] + 'ms',
  37234. 'transition-duration': self.__options.animationDuration[0] + 'ms'
  37235. });
  37236. setTimeout(
  37237. function() {
  37238. // a quick hover may have already triggered a mouseleave
  37239. if (self.__state != 'closed') {
  37240. self._$tooltip
  37241. .addClass('tooltipster-show')
  37242. .removeClass('tooltipster-initial');
  37243. if (self.__options.animationDuration[0] > 0) {
  37244. self._$tooltip.delay(self.__options.animationDuration[0]);
  37245. }
  37246. self._$tooltip.queue(finish);
  37247. }
  37248. },
  37249. 0
  37250. );
  37251. }
  37252. else {
  37253. // old browsers will have to live with this
  37254. self._$tooltip
  37255. .css('display', 'none')
  37256. .fadeIn(self.__options.animationDuration[0], finish);
  37257. }
  37258. // checks if the origin is removed while the tooltip is open
  37259. self.__trackerStart();
  37260. // NOTE: the listeners below have a '-triggerClose' namespace
  37261. // because we'll remove them when the tooltip closes (unlike
  37262. // the '-triggerOpen' listeners). So some of them are actually
  37263. // not about close triggers, rather about positioning.
  37264. $(env.window)
  37265. // reposition on resize
  37266. .on('resize.'+ self.__namespace +'-triggerClose', function(e) {
  37267. var $ae = $(document.activeElement);
  37268. // reposition only if the resize event was not triggered upon the opening
  37269. // of a virtual keyboard due to an input field being focused within the tooltip
  37270. // (otherwise the repositioning would lose the focus)
  37271. if ( (!$ae.is('input') && !$ae.is('textarea'))
  37272. || !$.contains(self._$tooltip[0], $ae[0])
  37273. ) {
  37274. self.reposition(e);
  37275. }
  37276. })
  37277. // same as below for parents
  37278. .on('scroll.'+ self.__namespace +'-triggerClose', function(e) {
  37279. self.__scrollHandler(e);
  37280. });
  37281. self.__$originParents = self._$origin.parents();
  37282. // scrolling may require the tooltip to be moved or even
  37283. // repositioned in some cases
  37284. self.__$originParents.each(function(i, parent) {
  37285. $(parent).on('scroll.'+ self.__namespace +'-triggerClose', function(e) {
  37286. self.__scrollHandler(e);
  37287. });
  37288. });
  37289. if ( self.__options.triggerClose.mouseleave
  37290. || (self.__options.triggerClose.touchleave && env.hasTouchCapability)
  37291. ) {
  37292. // we use an event to allow users/plugins to control when the mouseleave/touchleave
  37293. // close triggers will come to action. It allows to have more triggering elements
  37294. // than just the origin and the tooltip for example, or to cancel/delay the closing,
  37295. // or to make the tooltip interactive even if it wasn't when it was open, etc.
  37296. self._on('dismissable', function(event) {
  37297. if (event.dismissable) {
  37298. if (event.delay) {
  37299. timeout = setTimeout(function() {
  37300. // event.event may be undefined
  37301. self._close(event.event);
  37302. }, event.delay);
  37303. self.__timeouts.close.push(timeout);
  37304. }
  37305. else {
  37306. self._close(event);
  37307. }
  37308. }
  37309. else {
  37310. clearTimeout(timeout);
  37311. }
  37312. });
  37313. // now set the listeners that will trigger 'dismissable' events
  37314. var $elements = self._$origin,
  37315. eventNamesIn = '',
  37316. eventNamesOut = '',
  37317. timeout = null;
  37318. // if we have to allow interaction, bind on the tooltip too
  37319. if (self.__options.interactive) {
  37320. $elements = $elements.add(self._$tooltip);
  37321. }
  37322. if (self.__options.triggerClose.mouseleave) {
  37323. eventNamesIn += 'mouseenter.'+ self.__namespace +'-triggerClose ';
  37324. eventNamesOut += 'mouseleave.'+ self.__namespace +'-triggerClose ';
  37325. }
  37326. if (self.__options.triggerClose.touchleave && env.hasTouchCapability) {
  37327. eventNamesIn += 'touchstart.'+ self.__namespace +'-triggerClose';
  37328. eventNamesOut += 'touchend.'+ self.__namespace +'-triggerClose touchcancel.'+ self.__namespace +'-triggerClose';
  37329. }
  37330. $elements
  37331. // close after some time spent outside of the elements
  37332. .on(eventNamesOut, function(event) {
  37333. // it's ok if the touch gesture ended up to be a swipe,
  37334. // it's still a "touch leave" situation
  37335. if ( self._touchIsTouchEvent(event)
  37336. || !self._touchIsEmulatedEvent(event)
  37337. ) {
  37338. var delay = (event.type == 'mouseleave') ?
  37339. self.__options.delay :
  37340. self.__options.delayTouch;
  37341. self._trigger({
  37342. delay: delay[1],
  37343. dismissable: true,
  37344. event: event,
  37345. type: 'dismissable'
  37346. });
  37347. }
  37348. })
  37349. // suspend the mouseleave timeout when the pointer comes back
  37350. // over the elements
  37351. .on(eventNamesIn, function(event) {
  37352. // it's also ok if the touch event is a swipe gesture
  37353. if ( self._touchIsTouchEvent(event)
  37354. || !self._touchIsEmulatedEvent(event)
  37355. ) {
  37356. self._trigger({
  37357. dismissable: false,
  37358. event: event,
  37359. type: 'dismissable'
  37360. });
  37361. }
  37362. });
  37363. }
  37364. // close the tooltip when the origin gets a mouse click (common behavior of
  37365. // native tooltips)
  37366. if (self.__options.triggerClose.originClick) {
  37367. self._$origin.on('click.'+ self.__namespace + '-triggerClose', function(event) {
  37368. // we could actually let a tap trigger this but this feature just
  37369. // does not make sense on touch devices
  37370. if ( !self._touchIsTouchEvent(event)
  37371. && !self._touchIsEmulatedEvent(event)
  37372. ) {
  37373. self._close(event);
  37374. }
  37375. });
  37376. }
  37377. // set the same bindings for click and touch on the body to close the tooltip
  37378. if ( self.__options.triggerClose.click
  37379. || (self.__options.triggerClose.tap && env.hasTouchCapability)
  37380. ) {
  37381. // don't set right away since the click/tap event which triggered this method
  37382. // (if it was a click/tap) is going to bubble up to the body, we don't want it
  37383. // to close the tooltip immediately after it opened
  37384. setTimeout(function() {
  37385. if (self.__state != 'closed') {
  37386. var eventNames = '',
  37387. $body = $(env.window.document.body);
  37388. if (self.__options.triggerClose.click) {
  37389. eventNames += 'click.'+ self.__namespace +'-triggerClose ';
  37390. }
  37391. if (self.__options.triggerClose.tap && env.hasTouchCapability) {
  37392. eventNames += 'touchend.'+ self.__namespace +'-triggerClose';
  37393. }
  37394. $body.on(eventNames, function(event) {
  37395. if (self._touchIsMeaningfulEvent(event)) {
  37396. self._touchRecordEvent(event);
  37397. if (!self.__options.interactive || !$.contains(self._$tooltip[0], event.target)) {
  37398. self._close(event);
  37399. }
  37400. }
  37401. });
  37402. // needed to detect and ignore swiping
  37403. if (self.__options.triggerClose.tap && env.hasTouchCapability) {
  37404. $body.on('touchstart.'+ self.__namespace +'-triggerClose', function(event) {
  37405. self._touchRecordEvent(event);
  37406. });
  37407. }
  37408. }
  37409. }, 0);
  37410. }
  37411. self._trigger('ready');
  37412. // call our custom callback
  37413. if (self.__options.functionReady) {
  37414. self.__options.functionReady.call(self, self, {
  37415. origin: self._$origin[0],
  37416. tooltip: self._$tooltip[0]
  37417. });
  37418. }
  37419. }
  37420. // if we have a timer set, let the countdown begin
  37421. if (self.__options.timer > 0) {
  37422. var timeout = setTimeout(function() {
  37423. self._close();
  37424. }, self.__options.timer + extraTime);
  37425. self.__timeouts.close.push(timeout);
  37426. }
  37427. }
  37428. }
  37429. }
  37430. }
  37431. return self;
  37432. },
  37433. /**
  37434. * When using the mouseenter/touchstart open triggers, this function will
  37435. * schedule the opening of the tooltip after the delay, if there is one
  37436. *
  37437. * @param event
  37438. * @returns {self}
  37439. * @protected
  37440. */
  37441. _openShortly: function(event) {
  37442. var self = this,
  37443. ok = true;
  37444. if (self.__state != 'stable' && self.__state != 'appearing') {
  37445. // if a timeout is not already running
  37446. if (!self.__timeouts.open) {
  37447. self._trigger({
  37448. type: 'start',
  37449. event: event,
  37450. stop: function() {
  37451. ok = false;
  37452. }
  37453. });
  37454. if (ok) {
  37455. var delay = (event.type.indexOf('touch') == 0) ?
  37456. self.__options.delayTouch :
  37457. self.__options.delay;
  37458. if (delay[0]) {
  37459. self.__timeouts.open = setTimeout(function() {
  37460. self.__timeouts.open = null;
  37461. // open only if the pointer (mouse or touch) is still over the origin.
  37462. // The check on the "meaningful event" can only be made here, after some
  37463. // time has passed (to know if the touch was a swipe or not)
  37464. if (self.__pointerIsOverOrigin && self._touchIsMeaningfulEvent(event)) {
  37465. // signal that we go on
  37466. self._trigger('startend');
  37467. self._open(event);
  37468. }
  37469. else {
  37470. // signal that we cancel
  37471. self._trigger('startcancel');
  37472. }
  37473. }, delay[0]);
  37474. }
  37475. else {
  37476. // signal that we go on
  37477. self._trigger('startend');
  37478. self._open(event);
  37479. }
  37480. }
  37481. }
  37482. }
  37483. return self;
  37484. },
  37485. /**
  37486. * Meant for plugins to get their options
  37487. *
  37488. * @param {string} pluginName The name of the plugin that asks for its options
  37489. * @param {object} defaultOptions The default options of the plugin
  37490. * @returns {object} The options
  37491. * @protected
  37492. */
  37493. _optionsExtract: function(pluginName, defaultOptions) {
  37494. var self = this,
  37495. options = $.extend(true, {}, defaultOptions);
  37496. // if the plugin options were isolated in a property named after the
  37497. // plugin, use them (prevents conflicts with other plugins)
  37498. var pluginOptions = self.__options[pluginName];
  37499. // if not, try to get them as regular options
  37500. if (!pluginOptions){
  37501. pluginOptions = {};
  37502. $.each(defaultOptions, function(optionName, value) {
  37503. var o = self.__options[optionName];
  37504. if (o !== undefined) {
  37505. pluginOptions[optionName] = o;
  37506. }
  37507. });
  37508. }
  37509. // let's merge the default options and the ones that were provided. We'd want
  37510. // to do a deep copy but not let jQuery merge arrays, so we'll do a shallow
  37511. // extend on two levels, that will be enough if options are not more than 1
  37512. // level deep
  37513. $.each(options, function(optionName, value) {
  37514. if (pluginOptions[optionName] !== undefined) {
  37515. if (( typeof value == 'object'
  37516. && !(value instanceof Array)
  37517. && value != null
  37518. )
  37519. &&
  37520. ( typeof pluginOptions[optionName] == 'object'
  37521. && !(pluginOptions[optionName] instanceof Array)
  37522. && pluginOptions[optionName] != null
  37523. )
  37524. ) {
  37525. $.extend(options[optionName], pluginOptions[optionName]);
  37526. }
  37527. else {
  37528. options[optionName] = pluginOptions[optionName];
  37529. }
  37530. }
  37531. });
  37532. return options;
  37533. },
  37534. /**
  37535. * Used at instantiation of the plugin, or afterwards by plugins that activate themselves
  37536. * on existing instances
  37537. *
  37538. * @param {object} pluginName
  37539. * @returns {self}
  37540. * @protected
  37541. */
  37542. _plug: function(pluginName) {
  37543. var plugin = $.tooltipster._plugin(pluginName);
  37544. if (plugin) {
  37545. // if there is a constructor for instances
  37546. if (plugin.instance) {
  37547. // proxy non-private methods on the instance to allow new instance methods
  37548. $.tooltipster.__bridge(plugin.instance, this, plugin.name);
  37549. }
  37550. }
  37551. else {
  37552. throw new Error('The "'+ pluginName +'" plugin is not defined');
  37553. }
  37554. return this;
  37555. },
  37556. /**
  37557. * This will return true if the event is a mouse event which was
  37558. * emulated by the browser after a touch event. This allows us to
  37559. * really dissociate mouse and touch triggers.
  37560. *
  37561. * There is a margin of error if a real mouse event is fired right
  37562. * after (within the delay shown below) a touch event on the same
  37563. * element, but hopefully it should not happen often.
  37564. *
  37565. * @returns {boolean}
  37566. * @protected
  37567. */
  37568. _touchIsEmulatedEvent: function(event) {
  37569. var isEmulated = false,
  37570. now = new Date().getTime();
  37571. for (var i = this.__touchEvents.length - 1; i >= 0; i--) {
  37572. var e = this.__touchEvents[i];
  37573. // delay, in milliseconds. It's supposed to be 300ms in
  37574. // most browsers (350ms on iOS) to allow a double tap but
  37575. // can be less (check out FastClick for more info)
  37576. if (now - e.time < 500) {
  37577. if (e.target === event.target) {
  37578. isEmulated = true;
  37579. }
  37580. }
  37581. else {
  37582. break;
  37583. }
  37584. }
  37585. return isEmulated;
  37586. },
  37587. /**
  37588. * Returns false if the event was an emulated mouse event or
  37589. * a touch event involved in a swipe gesture.
  37590. *
  37591. * @param {object} event
  37592. * @returns {boolean}
  37593. * @protected
  37594. */
  37595. _touchIsMeaningfulEvent: function(event) {
  37596. return (
  37597. (this._touchIsTouchEvent(event) && !this._touchSwiped(event.target))
  37598. || (!this._touchIsTouchEvent(event) && !this._touchIsEmulatedEvent(event))
  37599. );
  37600. },
  37601. /**
  37602. * Checks if an event is a touch event
  37603. *
  37604. * @param {object} event
  37605. * @returns {boolean}
  37606. * @protected
  37607. */
  37608. _touchIsTouchEvent: function(event){
  37609. return event.type.indexOf('touch') == 0;
  37610. },
  37611. /**
  37612. * Store touch events for a while to detect swiping and emulated mouse events
  37613. *
  37614. * @param {object} event
  37615. * @returns {self}
  37616. * @protected
  37617. */
  37618. _touchRecordEvent: function(event) {
  37619. if (this._touchIsTouchEvent(event)) {
  37620. event.time = new Date().getTime();
  37621. this.__touchEvents.push(event);
  37622. }
  37623. return this;
  37624. },
  37625. /**
  37626. * Returns true if a swipe happened after the last touchstart event fired on
  37627. * event.target.
  37628. *
  37629. * We need to differentiate a swipe from a tap before we let the event open
  37630. * or close the tooltip. A swipe is when a touchmove (scroll) event happens
  37631. * on the body between the touchstart and the touchend events of an element.
  37632. *
  37633. * @param {object} target The HTML element that may have triggered the swipe
  37634. * @returns {boolean}
  37635. * @protected
  37636. */
  37637. _touchSwiped: function(target) {
  37638. var swiped = false;
  37639. for (var i = this.__touchEvents.length - 1; i >= 0; i--) {
  37640. var e = this.__touchEvents[i];
  37641. if (e.type == 'touchmove') {
  37642. swiped = true;
  37643. break;
  37644. }
  37645. else if (
  37646. e.type == 'touchstart'
  37647. && target === e.target
  37648. ) {
  37649. break;
  37650. }
  37651. }
  37652. return swiped;
  37653. },
  37654. /**
  37655. * Triggers an event on the instance emitters
  37656. *
  37657. * @returns {self}
  37658. * @protected
  37659. */
  37660. _trigger: function() {
  37661. var args = Array.prototype.slice.apply(arguments);
  37662. if (typeof args[0] == 'string') {
  37663. args[0] = { type: args[0] };
  37664. }
  37665. // add properties to the event
  37666. args[0].instance = this;
  37667. args[0].origin = this._$origin ? this._$origin[0] : null;
  37668. args[0].tooltip = this._$tooltip ? this._$tooltip[0] : null;
  37669. // note: the order of emitters matters
  37670. this.__$emitterPrivate.trigger.apply(this.__$emitterPrivate, args);
  37671. $.tooltipster._trigger.apply($.tooltipster, args);
  37672. this.__$emitterPublic.trigger.apply(this.__$emitterPublic, args);
  37673. return this;
  37674. },
  37675. /**
  37676. * Deactivate a plugin on this instance
  37677. *
  37678. * @returns {self}
  37679. * @protected
  37680. */
  37681. _unplug: function(pluginName) {
  37682. var self = this;
  37683. // if the plugin has been activated on this instance
  37684. if (self[pluginName]) {
  37685. var plugin = $.tooltipster._plugin(pluginName);
  37686. // if there is a constructor for instances
  37687. if (plugin.instance) {
  37688. // unbridge
  37689. $.each(plugin.instance, function(methodName, fn) {
  37690. // if the method exists (privates methods do not) and comes indeed from
  37691. // this plugin (may be missing or come from a conflicting plugin).
  37692. if ( self[methodName]
  37693. && self[methodName].bridged === self[pluginName]
  37694. ) {
  37695. delete self[methodName];
  37696. }
  37697. });
  37698. }
  37699. // destroy the plugin
  37700. if (self[pluginName].__destroy) {
  37701. self[pluginName].__destroy();
  37702. }
  37703. // remove the reference to the plugin instance
  37704. delete self[pluginName];
  37705. }
  37706. return self;
  37707. },
  37708. /**
  37709. * @see self::_close
  37710. * @returns {self}
  37711. * @public
  37712. */
  37713. close: function(callback) {
  37714. if (!this.__destroyed) {
  37715. this._close(null, callback);
  37716. }
  37717. else {
  37718. this.__destroyError();
  37719. }
  37720. return this;
  37721. },
  37722. /**
  37723. * Sets or gets the content of the tooltip
  37724. *
  37725. * @returns {mixed|self}
  37726. * @public
  37727. */
  37728. content: function(content) {
  37729. var self = this;
  37730. // getter method
  37731. if (content === undefined) {
  37732. return self.__Content;
  37733. }
  37734. // setter method
  37735. else {
  37736. if (!self.__destroyed) {
  37737. // change the content
  37738. self.__contentSet(content);
  37739. if (self.__Content !== null) {
  37740. // update the tooltip if it is open
  37741. if (self.__state !== 'closed') {
  37742. // reset the content in the tooltip
  37743. self.__contentInsert();
  37744. // reposition and resize the tooltip
  37745. self.reposition();
  37746. // if we want to play a little animation showing the content changed
  37747. if (self.__options.updateAnimation) {
  37748. if (env.hasTransitions) {
  37749. // keep the reference in the local scope
  37750. var animation = self.__options.updateAnimation;
  37751. self._$tooltip.addClass('tooltipster-update-'+ animation);
  37752. // remove the class after a while. The actual duration of the
  37753. // update animation may be shorter, it's set in the CSS rules
  37754. setTimeout(function() {
  37755. if (self.__state != 'closed') {
  37756. self._$tooltip.removeClass('tooltipster-update-'+ animation);
  37757. }
  37758. }, 1000);
  37759. }
  37760. else {
  37761. self._$tooltip.fadeTo(200, 0.5, function() {
  37762. if (self.__state != 'closed') {
  37763. self._$tooltip.fadeTo(200, 1);
  37764. }
  37765. });
  37766. }
  37767. }
  37768. }
  37769. }
  37770. else {
  37771. self._close();
  37772. }
  37773. }
  37774. else {
  37775. self.__destroyError();
  37776. }
  37777. return self;
  37778. }
  37779. },
  37780. /**
  37781. * Destroys the tooltip
  37782. *
  37783. * @returns {self}
  37784. * @public
  37785. */
  37786. destroy: function() {
  37787. var self = this;
  37788. if (!self.__destroyed) {
  37789. if(self.__state != 'closed'){
  37790. // no closing delay
  37791. self.option('animationDuration', 0)
  37792. // force closing
  37793. ._close(null, null, true);
  37794. }
  37795. else {
  37796. // there might be an open timeout still running
  37797. self.__timeoutsClear();
  37798. }
  37799. // send event
  37800. self._trigger('destroy');
  37801. self.__destroyed = true;
  37802. self._$origin
  37803. .removeData(self.__namespace)
  37804. // remove the open trigger listeners
  37805. .off('.'+ self.__namespace +'-triggerOpen');
  37806. // remove the touch listener
  37807. $(env.window.document.body).off('.' + self.__namespace +'-triggerOpen');
  37808. var ns = self._$origin.data('tooltipster-ns');
  37809. // if the origin has been removed from DOM, its data may
  37810. // well have been destroyed in the process and there would
  37811. // be nothing to clean up or restore
  37812. if (ns) {
  37813. // if there are no more tooltips on this element
  37814. if (ns.length === 1) {
  37815. // optional restoration of a title attribute
  37816. var title = null;
  37817. if (self.__options.restoration == 'previous') {
  37818. title = self._$origin.data('tooltipster-initialTitle');
  37819. }
  37820. else if (self.__options.restoration == 'current') {
  37821. // old school technique to stringify when outerHTML is not supported
  37822. title = (typeof self.__Content == 'string') ?
  37823. self.__Content :
  37824. $('<div></div>').append(self.__Content).html();
  37825. }
  37826. if (title) {
  37827. self._$origin.attr('title', title);
  37828. }
  37829. // final cleaning
  37830. self._$origin.removeClass('tooltipstered');
  37831. self._$origin
  37832. .removeData('tooltipster-ns')
  37833. .removeData('tooltipster-initialTitle');
  37834. }
  37835. else {
  37836. // remove the instance namespace from the list of namespaces of
  37837. // tooltips present on the element
  37838. ns = $.grep(ns, function(el, i) {
  37839. return el !== self.__namespace;
  37840. });
  37841. self._$origin.data('tooltipster-ns', ns);
  37842. }
  37843. }
  37844. // last event
  37845. self._trigger('destroyed');
  37846. // unbind private and public event listeners
  37847. self._off();
  37848. self.off();
  37849. // remove external references, just in case
  37850. self.__Content = null;
  37851. self.__$emitterPrivate = null;
  37852. self.__$emitterPublic = null;
  37853. self.__options.parent = null;
  37854. self._$origin = null;
  37855. self._$tooltip = null;
  37856. // make sure the object is no longer referenced in there to prevent
  37857. // memory leaks
  37858. $.tooltipster.__instancesLatestArr = $.grep($.tooltipster.__instancesLatestArr, function(el, i) {
  37859. return self !== el;
  37860. });
  37861. clearInterval(self.__garbageCollector);
  37862. }
  37863. else {
  37864. self.__destroyError();
  37865. }
  37866. // we return the scope rather than true so that the call to
  37867. // .tooltipster('destroy') actually returns the matched elements
  37868. // and applies to all of them
  37869. return self;
  37870. },
  37871. /**
  37872. * Disables the tooltip
  37873. *
  37874. * @returns {self}
  37875. * @public
  37876. */
  37877. disable: function() {
  37878. if (!this.__destroyed) {
  37879. // close first, in case the tooltip would not disappear on
  37880. // its own (no close trigger)
  37881. this._close();
  37882. this.__enabled = false;
  37883. return this;
  37884. }
  37885. else {
  37886. this.__destroyError();
  37887. }
  37888. return this;
  37889. },
  37890. /**
  37891. * Returns the HTML element of the origin
  37892. *
  37893. * @returns {self}
  37894. * @public
  37895. */
  37896. elementOrigin: function() {
  37897. if (!this.__destroyed) {
  37898. return this._$origin[0];
  37899. }
  37900. else {
  37901. this.__destroyError();
  37902. }
  37903. },
  37904. /**
  37905. * Returns the HTML element of the tooltip
  37906. *
  37907. * @returns {self}
  37908. * @public
  37909. */
  37910. elementTooltip: function() {
  37911. return this._$tooltip ? this._$tooltip[0] : null;
  37912. },
  37913. /**
  37914. * Enables the tooltip
  37915. *
  37916. * @returns {self}
  37917. * @public
  37918. */
  37919. enable: function() {
  37920. this.__enabled = true;
  37921. return this;
  37922. },
  37923. /**
  37924. * Alias, deprecated in 4.0.0
  37925. *
  37926. * @param {function} callback
  37927. * @returns {self}
  37928. * @public
  37929. */
  37930. hide: function(callback) {
  37931. return this.close(callback);
  37932. },
  37933. /**
  37934. * Returns the instance
  37935. *
  37936. * @returns {self}
  37937. * @public
  37938. */
  37939. instance: function() {
  37940. return this;
  37941. },
  37942. /**
  37943. * For public use only, not to be used by plugins (use ::_off() instead)
  37944. *
  37945. * @returns {self}
  37946. * @public
  37947. */
  37948. off: function() {
  37949. if (!this.__destroyed) {
  37950. this.__$emitterPublic.off.apply(this.__$emitterPublic, Array.prototype.slice.apply(arguments));
  37951. }
  37952. return this;
  37953. },
  37954. /**
  37955. * For public use only, not to be used by plugins (use ::_on() instead)
  37956. *
  37957. * @returns {self}
  37958. * @public
  37959. */
  37960. on: function() {
  37961. if (!this.__destroyed) {
  37962. this.__$emitterPublic.on.apply(this.__$emitterPublic, Array.prototype.slice.apply(arguments));
  37963. }
  37964. else {
  37965. this.__destroyError();
  37966. }
  37967. return this;
  37968. },
  37969. /**
  37970. * For public use only, not to be used by plugins
  37971. *
  37972. * @returns {self}
  37973. * @public
  37974. */
  37975. one: function() {
  37976. if (!this.__destroyed) {
  37977. this.__$emitterPublic.one.apply(this.__$emitterPublic, Array.prototype.slice.apply(arguments));
  37978. }
  37979. else {
  37980. this.__destroyError();
  37981. }
  37982. return this;
  37983. },
  37984. /**
  37985. * @see self::_open
  37986. * @returns {self}
  37987. * @public
  37988. */
  37989. open: function(callback) {
  37990. if (!this.__destroyed) {
  37991. this._open(null, callback);
  37992. }
  37993. else {
  37994. this.__destroyError();
  37995. }
  37996. return this;
  37997. },
  37998. /**
  37999. * Get or set options. For internal use and advanced users only.
  38000. *
  38001. * @param {string} o Option name
  38002. * @param {mixed} val optional A new value for the option
  38003. * @return {mixed|self} If val is omitted, the value of the option
  38004. * is returned, otherwise the instance itself is returned
  38005. * @public
  38006. */
  38007. option: function(o, val) {
  38008. // getter
  38009. if (val === undefined) {
  38010. return this.__options[o];
  38011. }
  38012. // setter
  38013. else {
  38014. if (!this.__destroyed) {
  38015. // change value
  38016. this.__options[o] = val;
  38017. // format
  38018. this.__optionsFormat();
  38019. // re-prepare the triggers if needed
  38020. if ($.inArray(o, ['trigger', 'triggerClose', 'triggerOpen']) >= 0) {
  38021. this.__prepareOrigin();
  38022. }
  38023. if (o === 'selfDestruction') {
  38024. this.__prepareGC();
  38025. }
  38026. }
  38027. else {
  38028. this.__destroyError();
  38029. }
  38030. return this;
  38031. }
  38032. },
  38033. /**
  38034. * This method is in charge of setting the position and size properties of the tooltip.
  38035. * All the hard work is delegated to the display plugin.
  38036. * Note: The tooltip may be detached from the DOM at the moment the method is called
  38037. * but must be attached by the end of the method call.
  38038. *
  38039. * @param {object} event For internal use only. Defined if an event such as
  38040. * window resizing triggered the repositioning
  38041. * @param {boolean} tooltipIsDetached For internal use only. Set this to true if you
  38042. * know that the tooltip not being in the DOM is not an issue (typically when the
  38043. * tooltip element has just been created but has not been added to the DOM yet).
  38044. * @returns {self}
  38045. * @public
  38046. */
  38047. reposition: function(event, tooltipIsDetached) {
  38048. var self = this;
  38049. if (!self.__destroyed) {
  38050. // if the tooltip is still open and the origin is still in the DOM
  38051. if (self.__state != 'closed' && bodyContains(self._$origin)) {
  38052. // if the tooltip has not been removed from DOM manually (or if it
  38053. // has been detached on purpose)
  38054. if (tooltipIsDetached || bodyContains(self._$tooltip)) {
  38055. if (!tooltipIsDetached) {
  38056. // detach in case the tooltip overflows the window and adds
  38057. // scrollbars to it, so __geometry can be accurate
  38058. self._$tooltip.detach();
  38059. }
  38060. // refresh the geometry object before passing it as a helper
  38061. self.__Geometry = self.__geometry();
  38062. // let a plugin fo the rest
  38063. self._trigger({
  38064. type: 'reposition',
  38065. event: event,
  38066. helper: {
  38067. geo: self.__Geometry
  38068. }
  38069. });
  38070. }
  38071. }
  38072. }
  38073. else {
  38074. self.__destroyError();
  38075. }
  38076. return self;
  38077. },
  38078. /**
  38079. * Alias, deprecated in 4.0.0
  38080. *
  38081. * @param callback
  38082. * @returns {self}
  38083. * @public
  38084. */
  38085. show: function(callback) {
  38086. return this.open(callback);
  38087. },
  38088. /**
  38089. * Returns some properties about the instance
  38090. *
  38091. * @returns {object}
  38092. * @public
  38093. */
  38094. status: function() {
  38095. return {
  38096. destroyed: this.__destroyed,
  38097. enabled: this.__enabled,
  38098. open: this.__state !== 'closed',
  38099. state: this.__state
  38100. };
  38101. },
  38102. /**
  38103. * For public use only, not to be used by plugins
  38104. *
  38105. * @returns {self}
  38106. * @public
  38107. */
  38108. triggerHandler: function() {
  38109. if (!this.__destroyed) {
  38110. this.__$emitterPublic.triggerHandler.apply(this.__$emitterPublic, Array.prototype.slice.apply(arguments));
  38111. }
  38112. else {
  38113. this.__destroyError();
  38114. }
  38115. return this;
  38116. }
  38117. };
  38118. $.fn.tooltipster = function() {
  38119. // for using in closures
  38120. var args = Array.prototype.slice.apply(arguments),
  38121. // common mistake: an HTML element can't be in several tooltips at the same time
  38122. contentCloningWarning = 'You are using a single HTML element as content for several tooltips. You probably want to set the contentCloning option to TRUE.';
  38123. // this happens with $(sel).tooltipster(...) when $(sel) does not match anything
  38124. if (this.length === 0) {
  38125. // still chainable
  38126. return this;
  38127. }
  38128. // this happens when calling $(sel).tooltipster('methodName or options')
  38129. // where $(sel) matches one or more elements
  38130. else {
  38131. // method calls
  38132. if (typeof args[0] === 'string') {
  38133. var v = '#*$~&';
  38134. this.each(function() {
  38135. // retrieve the namepaces of the tooltip(s) that exist on that element.
  38136. // We will interact with the first tooltip only.
  38137. var ns = $(this).data('tooltipster-ns'),
  38138. // self represents the instance of the first tooltipster plugin
  38139. // associated to the current HTML object of the loop
  38140. self = ns ? $(this).data(ns[0]) : null;
  38141. // if the current element holds a tooltipster instance
  38142. if (self) {
  38143. if (typeof self[args[0]] === 'function') {
  38144. if ( this.length > 1
  38145. && args[0] == 'content'
  38146. && ( args[1] instanceof $
  38147. || (typeof args[1] == 'object' && args[1] != null && args[1].tagName)
  38148. )
  38149. && !self.__options.contentCloning
  38150. && self.__options.debug
  38151. ) {
  38152. console.log(contentCloningWarning);
  38153. }
  38154. // note : args[1] and args[2] may not be defined
  38155. var resp = self[args[0]](args[1], args[2]);
  38156. }
  38157. else {
  38158. throw new Error('Unknown method "'+ args[0] +'"');
  38159. }
  38160. // if the function returned anything other than the instance
  38161. // itself (which implies chaining, except for the `instance` method)
  38162. if (resp !== self || args[0] === 'instance') {
  38163. v = resp;
  38164. // return false to stop .each iteration on the first element
  38165. // matched by the selector
  38166. return false;
  38167. }
  38168. }
  38169. else {
  38170. throw new Error('You called Tooltipster\'s "'+ args[0] +'" method on an uninitialized element');
  38171. }
  38172. });
  38173. return (v !== '#*$~&') ? v : this;
  38174. }
  38175. // first argument is undefined or an object: the tooltip is initializing
  38176. else {
  38177. // reset the array of last initialized objects
  38178. $.tooltipster.__instancesLatestArr = [];
  38179. // is there a defined value for the multiple option in the options object ?
  38180. var multipleIsSet = args[0] && args[0].multiple !== undefined,
  38181. // if the multiple option is set to true, or if it's not defined but
  38182. // set to true in the defaults
  38183. multiple = (multipleIsSet && args[0].multiple) || (!multipleIsSet && defaults.multiple),
  38184. // same for content
  38185. contentIsSet = args[0] && args[0].content !== undefined,
  38186. content = (contentIsSet && args[0].content) || (!contentIsSet && defaults.content),
  38187. // same for contentCloning
  38188. contentCloningIsSet = args[0] && args[0].contentCloning !== undefined,
  38189. contentCloning =
  38190. (contentCloningIsSet && args[0].contentCloning)
  38191. || (!contentCloningIsSet && defaults.contentCloning),
  38192. // same for debug
  38193. debugIsSet = args[0] && args[0].debug !== undefined,
  38194. debug = (debugIsSet && args[0].debug) || (!debugIsSet && defaults.debug);
  38195. if ( this.length > 1
  38196. && ( content instanceof $
  38197. || (typeof content == 'object' && content != null && content.tagName)
  38198. )
  38199. && !contentCloning
  38200. && debug
  38201. ) {
  38202. console.log(contentCloningWarning);
  38203. }
  38204. // create a tooltipster instance for each element if it doesn't
  38205. // already have one or if the multiple option is set, and attach the
  38206. // object to it
  38207. this.each(function() {
  38208. var go = false,
  38209. $this = $(this),
  38210. ns = $this.data('tooltipster-ns'),
  38211. obj = null;
  38212. if (!ns) {
  38213. go = true;
  38214. }
  38215. else if (multiple) {
  38216. go = true;
  38217. }
  38218. else if (debug) {
  38219. console.log('Tooltipster: one or more tooltips are already attached to the element below. Ignoring.');
  38220. console.log(this);
  38221. }
  38222. if (go) {
  38223. obj = new $.Tooltipster(this, args[0]);
  38224. // save the reference of the new instance
  38225. if (!ns) ns = [];
  38226. ns.push(obj.__namespace);
  38227. $this.data('tooltipster-ns', ns);
  38228. // save the instance itself
  38229. $this.data(obj.__namespace, obj);
  38230. // call our constructor custom function.
  38231. // we do this here and not in ::init() because we wanted
  38232. // the object to be saved in $this.data before triggering
  38233. // it
  38234. if (obj.__options.functionInit) {
  38235. obj.__options.functionInit.call(obj, obj, {
  38236. origin: this
  38237. });
  38238. }
  38239. // and now the event, for the plugins and core emitter
  38240. obj._trigger('init');
  38241. }
  38242. $.tooltipster.__instancesLatestArr.push(obj);
  38243. });
  38244. return this;
  38245. }
  38246. }
  38247. };
  38248. // Utilities
  38249. /**
  38250. * A class to check if a tooltip can fit in given dimensions
  38251. *
  38252. * @param {object} $tooltip The jQuery wrapped tooltip element, or a clone of it
  38253. */
  38254. function Ruler($tooltip) {
  38255. // list of instance variables
  38256. this.$container;
  38257. this.constraints = null;
  38258. this.__$tooltip;
  38259. this.__init($tooltip);
  38260. }
  38261. Ruler.prototype = {
  38262. /**
  38263. * Move the tooltip into an invisible div that does not allow overflow to make
  38264. * size tests. Note: the tooltip may or may not be attached to the DOM at the
  38265. * moment this method is called, it does not matter.
  38266. *
  38267. * @param {object} $tooltip The object to test. May be just a clone of the
  38268. * actual tooltip.
  38269. * @private
  38270. */
  38271. __init: function($tooltip) {
  38272. this.__$tooltip = $tooltip;
  38273. this.__$tooltip
  38274. .css({
  38275. // for some reason we have to specify top and left 0
  38276. left: 0,
  38277. // any overflow will be ignored while measuring
  38278. overflow: 'hidden',
  38279. // positions at (0,0) without the div using 100% of the available width
  38280. position: 'absolute',
  38281. top: 0
  38282. })
  38283. // overflow must be auto during the test. We re-set this in case
  38284. // it were modified by the user
  38285. .find('.tooltipster-content')
  38286. .css('overflow', 'auto');
  38287. this.$container = $('<div class="tooltipster-ruler"></div>')
  38288. .append(this.__$tooltip)
  38289. .appendTo(env.window.document.body);
  38290. },
  38291. /**
  38292. * Force the browser to redraw (re-render) the tooltip immediately. This is required
  38293. * when you changed some CSS properties and need to make something with it
  38294. * immediately, without waiting for the browser to redraw at the end of instructions.
  38295. *
  38296. * @see http://stackoverflow.com/questions/3485365/how-can-i-force-webkit-to-redraw-repaint-to-propagate-style-changes
  38297. * @private
  38298. */
  38299. __forceRedraw: function() {
  38300. // note: this would work but for Webkit only
  38301. //this.__$tooltip.close();
  38302. //this.__$tooltip[0].offsetHeight;
  38303. //this.__$tooltip.open();
  38304. // works in FF too
  38305. var $p = this.__$tooltip.parent();
  38306. this.__$tooltip.detach();
  38307. this.__$tooltip.appendTo($p);
  38308. },
  38309. /**
  38310. * Set maximum dimensions for the tooltip. A call to ::measure afterwards
  38311. * will tell us if the content overflows or if it's ok
  38312. *
  38313. * @param {int} width
  38314. * @param {int} height
  38315. * @return {Ruler}
  38316. * @public
  38317. */
  38318. constrain: function(width, height) {
  38319. this.constraints = {
  38320. width: width,
  38321. height: height
  38322. };
  38323. this.__$tooltip.css({
  38324. // we disable display:flex, otherwise the content would overflow without
  38325. // creating horizontal scrolling (which we need to detect).
  38326. display: 'block',
  38327. // reset any previous height
  38328. height: '',
  38329. // we'll check if horizontal scrolling occurs
  38330. overflow: 'auto',
  38331. // we'll set the width and see what height is generated and if there
  38332. // is horizontal overflow
  38333. width: width
  38334. });
  38335. return this;
  38336. },
  38337. /**
  38338. * Reset the tooltip content overflow and remove the test container
  38339. *
  38340. * @returns {Ruler}
  38341. * @public
  38342. */
  38343. destroy: function() {
  38344. // in case the element was not a clone
  38345. this.__$tooltip
  38346. .detach()
  38347. .find('.tooltipster-content')
  38348. .css({
  38349. // reset to CSS value
  38350. display: '',
  38351. overflow: ''
  38352. });
  38353. this.$container.remove();
  38354. },
  38355. /**
  38356. * Removes any constraints
  38357. *
  38358. * @returns {Ruler}
  38359. * @public
  38360. */
  38361. free: function() {
  38362. this.constraints = null;
  38363. // reset to natural size
  38364. this.__$tooltip.css({
  38365. display: '',
  38366. height: '',
  38367. overflow: 'visible',
  38368. width: ''
  38369. });
  38370. return this;
  38371. },
  38372. /**
  38373. * Returns the size of the tooltip. When constraints are applied, also returns
  38374. * whether the tooltip fits in the provided dimensions.
  38375. * The idea is to see if the new height is small enough and if the content does
  38376. * not overflow horizontally.
  38377. *
  38378. * @param {int} width
  38379. * @param {int} height
  38380. * @returns {object} An object with a bool `fits` property and a `size` property
  38381. * @public
  38382. */
  38383. measure: function() {
  38384. this.__forceRedraw();
  38385. var tooltipBcr = this.__$tooltip[0].getBoundingClientRect(),
  38386. result = { size: {
  38387. // bcr.width/height are not defined in IE8- but in this
  38388. // case, bcr.right/bottom will have the same value
  38389. // except in iOS 8+ where tooltipBcr.bottom/right are wrong
  38390. // after scrolling for reasons yet to be determined.
  38391. // tooltipBcr.top/left might not be 0, see issue #514
  38392. height: tooltipBcr.height || (tooltipBcr.bottom - tooltipBcr.top),
  38393. width: tooltipBcr.width || (tooltipBcr.right - tooltipBcr.left)
  38394. }};
  38395. if (this.constraints) {
  38396. // note: we used to use offsetWidth instead of boundingRectClient but
  38397. // it returned rounded values, causing issues with sub-pixel layouts.
  38398. // note2: noticed that the bcrWidth of text content of a div was once
  38399. // greater than the bcrWidth of its container by 1px, causing the final
  38400. // tooltip box to be too small for its content. However, evaluating
  38401. // their widths one against the other (below) surprisingly returned
  38402. // equality. Happened only once in Chrome 48, was not able to reproduce
  38403. // => just having fun with float position values...
  38404. var $content = this.__$tooltip.find('.tooltipster-content'),
  38405. height = this.__$tooltip.outerHeight(),
  38406. contentBcr = $content[0].getBoundingClientRect(),
  38407. fits = {
  38408. height: height <= this.constraints.height,
  38409. width: (
  38410. // this condition accounts for min-width property that
  38411. // may apply
  38412. tooltipBcr.width <= this.constraints.width
  38413. // the -1 is here because scrollWidth actually returns
  38414. // a rounded value, and may be greater than bcr.width if
  38415. // it was rounded up. This may cause an issue for contents
  38416. // which actually really overflow by 1px or so, but that
  38417. // should be rare. Not sure how to solve this efficiently.
  38418. // See http://blogs.msdn.com/b/ie/archive/2012/02/17/sub-pixel-rendering-and-the-css-object-model.aspx
  38419. && contentBcr.width >= $content[0].scrollWidth - 1
  38420. )
  38421. };
  38422. result.fits = fits.height && fits.width;
  38423. }
  38424. // old versions of IE get the width wrong for some reason and it causes
  38425. // the text to be broken to a new line, so we round it up. If the width
  38426. // is the width of the screen though, we can assume it is accurate.
  38427. if ( env.IE
  38428. && env.IE <= 11
  38429. && result.size.width !== env.window.document.documentElement.clientWidth
  38430. ) {
  38431. result.size.width = Math.ceil(result.size.width) + 1;
  38432. }
  38433. return result;
  38434. }
  38435. };
  38436. // quick & dirty compare function, not bijective nor multidimensional
  38437. function areEqual(a,b) {
  38438. var same = true;
  38439. $.each(a, function(i, _) {
  38440. if (b[i] === undefined || a[i] !== b[i]) {
  38441. same = false;
  38442. return false;
  38443. }
  38444. });
  38445. return same;
  38446. }
  38447. /**
  38448. * A fast function to check if an element is still in the DOM. It
  38449. * tries to use an id as ids are indexed by the browser, or falls
  38450. * back to jQuery's `contains` method. May fail if two elements
  38451. * have the same id, but so be it
  38452. *
  38453. * @param {object} $obj A jQuery-wrapped HTML element
  38454. * @return {boolean}
  38455. */
  38456. function bodyContains($obj) {
  38457. var id = $obj.attr('id'),
  38458. el = id ? env.window.document.getElementById(id) : null;
  38459. // must also check that the element with the id is the one we want
  38460. return el ? el === $obj[0] : $.contains(env.window.document.body, $obj[0]);
  38461. }
  38462. // detect IE versions for dirty fixes
  38463. var uA = navigator.userAgent.toLowerCase();
  38464. if (uA.indexOf('msie') != -1) env.IE = parseInt(uA.split('msie')[1]);
  38465. else if (uA.toLowerCase().indexOf('trident') !== -1 && uA.indexOf(' rv:11') !== -1) env.IE = 11;
  38466. else if (uA.toLowerCase().indexOf('edge/') != -1) env.IE = parseInt(uA.toLowerCase().split('edge/')[1]);
  38467. // detecting support for CSS transitions
  38468. function transitionSupport() {
  38469. // env.window is not defined yet when this is called
  38470. if (!win) return false;
  38471. var b = win.document.body || win.document.documentElement,
  38472. s = b.style,
  38473. p = 'transition',
  38474. v = ['Moz', 'Webkit', 'Khtml', 'O', 'ms'];
  38475. if (typeof s[p] == 'string') { return true; }
  38476. p = p.charAt(0).toUpperCase() + p.substr(1);
  38477. for (var i=0; i<v.length; i++) {
  38478. if (typeof s[v[i] + p] == 'string') { return true; }
  38479. }
  38480. return false;
  38481. }
  38482. // we'll return jQuery for plugins not to have to declare it as a dependency,
  38483. // but it's done by a build task since it should be included only once at the
  38484. // end when we concatenate the main file with a plugin
  38485. // sideTip is Tooltipster's default plugin.
  38486. // This file will be UMDified by a build task.
  38487. var pluginName = 'tooltipster.sideTip';
  38488. $.tooltipster._plugin({
  38489. name: pluginName,
  38490. instance: {
  38491. /**
  38492. * Defaults are provided as a function for an easy override by inheritance
  38493. *
  38494. * @return {object} An object with the defaults options
  38495. * @private
  38496. */
  38497. __defaults: function() {
  38498. return {
  38499. // if the tooltip should display an arrow that points to the origin
  38500. arrow: true,
  38501. // the distance in pixels between the tooltip and the origin
  38502. distance: 6,
  38503. // allows to easily change the position of the tooltip
  38504. functionPosition: null,
  38505. maxWidth: null,
  38506. // used to accomodate the arrow of tooltip if there is one.
  38507. // First to make sure that the arrow target is not too close
  38508. // to the edge of the tooltip, so the arrow does not overflow
  38509. // the tooltip. Secondly when we reposition the tooltip to
  38510. // make sure that it's positioned in such a way that the arrow is
  38511. // still pointing at the target (and not a few pixels beyond it).
  38512. // It should be equal to or greater than half the width of
  38513. // the arrow (by width we mean the size of the side which touches
  38514. // the side of the tooltip).
  38515. minIntersection: 16,
  38516. minWidth: 0,
  38517. // deprecated in 4.0.0. Listed for _optionsExtract to pick it up
  38518. position: null,
  38519. side: 'top',
  38520. // set to false to position the tooltip relatively to the document rather
  38521. // than the window when we open it
  38522. viewportAware: true
  38523. };
  38524. },
  38525. /**
  38526. * Run once: at instantiation of the plugin
  38527. *
  38528. * @param {object} instance The tooltipster object that instantiated this plugin
  38529. * @private
  38530. */
  38531. __init: function(instance) {
  38532. var self = this;
  38533. // list of instance variables
  38534. self.__instance = instance;
  38535. self.__namespace = 'tooltipster-sideTip-'+ Math.round(Math.random()*1000000);
  38536. self.__previousState = 'closed';
  38537. self.__options;
  38538. // initial formatting
  38539. self.__optionsFormat();
  38540. self.__instance._on('state.'+ self.__namespace, function(event) {
  38541. if (event.state == 'closed') {
  38542. self.__close();
  38543. }
  38544. else if (event.state == 'appearing' && self.__previousState == 'closed') {
  38545. self.__create();
  38546. }
  38547. self.__previousState = event.state;
  38548. });
  38549. // reformat every time the options are changed
  38550. self.__instance._on('options.'+ self.__namespace, function() {
  38551. self.__optionsFormat();
  38552. });
  38553. self.__instance._on('reposition.'+ self.__namespace, function(e) {
  38554. self.__reposition(e.event, e.helper);
  38555. });
  38556. },
  38557. /**
  38558. * Called when the tooltip has closed
  38559. *
  38560. * @private
  38561. */
  38562. __close: function() {
  38563. // detach our content object first, so the next jQuery's remove()
  38564. // call does not unbind its event handlers
  38565. if (this.__instance.content() instanceof $) {
  38566. this.__instance.content().detach();
  38567. }
  38568. // remove the tooltip from the DOM
  38569. this.__instance._$tooltip.remove();
  38570. this.__instance._$tooltip = null;
  38571. },
  38572. /**
  38573. * Creates the HTML element of the tooltip.
  38574. *
  38575. * @private
  38576. */
  38577. __create: function() {
  38578. // note: we wrap with a .tooltipster-box div to be able to set a margin on it
  38579. // (.tooltipster-base must not have one)
  38580. var $html = $(
  38581. '<div class="tooltipster-base tooltipster-sidetip">' +
  38582. '<div class="tooltipster-box">' +
  38583. '<div class="tooltipster-content"></div>' +
  38584. '</div>' +
  38585. '<div class="tooltipster-arrow">' +
  38586. '<div class="tooltipster-arrow-uncropped">' +
  38587. '<div class="tooltipster-arrow-border"></div>' +
  38588. '<div class="tooltipster-arrow-background"></div>' +
  38589. '</div>' +
  38590. '</div>' +
  38591. '</div>'
  38592. );
  38593. // hide arrow if asked
  38594. if (!this.__options.arrow) {
  38595. $html
  38596. .find('.tooltipster-box')
  38597. .css('margin', 0)
  38598. .end()
  38599. .find('.tooltipster-arrow')
  38600. .hide();
  38601. }
  38602. // apply min/max width if asked
  38603. if (this.__options.minWidth) {
  38604. $html.css('min-width', this.__options.minWidth + 'px');
  38605. }
  38606. if (this.__options.maxWidth) {
  38607. $html.css('max-width', this.__options.maxWidth + 'px');
  38608. }
  38609. this.__instance._$tooltip = $html;
  38610. // tell the instance that the tooltip element has been created
  38611. this.__instance._trigger('created');
  38612. },
  38613. /**
  38614. * Used when the plugin is to be unplugged
  38615. *
  38616. * @private
  38617. */
  38618. __destroy: function() {
  38619. this.__instance._off('.'+ self.__namespace);
  38620. },
  38621. /**
  38622. * (Re)compute this.__options from the options declared to the instance
  38623. *
  38624. * @private
  38625. */
  38626. __optionsFormat: function() {
  38627. var self = this;
  38628. // get the options
  38629. self.__options = self.__instance._optionsExtract(pluginName, self.__defaults());
  38630. // for backward compatibility, deprecated in v4.0.0
  38631. if (self.__options.position) {
  38632. self.__options.side = self.__options.position;
  38633. }
  38634. // options formatting
  38635. // format distance as a four-cell array if it ain't one yet and then make
  38636. // it an object with top/bottom/left/right properties
  38637. if (typeof self.__options.distance != 'object') {
  38638. self.__options.distance = [self.__options.distance];
  38639. }
  38640. if (self.__options.distance.length < 4) {
  38641. if (self.__options.distance[1] === undefined) self.__options.distance[1] = self.__options.distance[0];
  38642. if (self.__options.distance[2] === undefined) self.__options.distance[2] = self.__options.distance[0];
  38643. if (self.__options.distance[3] === undefined) self.__options.distance[3] = self.__options.distance[1];
  38644. self.__options.distance = {
  38645. top: self.__options.distance[0],
  38646. right: self.__options.distance[1],
  38647. bottom: self.__options.distance[2],
  38648. left: self.__options.distance[3]
  38649. };
  38650. }
  38651. // let's transform:
  38652. // 'top' into ['top', 'bottom', 'right', 'left']
  38653. // 'right' into ['right', 'left', 'top', 'bottom']
  38654. // 'bottom' into ['bottom', 'top', 'right', 'left']
  38655. // 'left' into ['left', 'right', 'top', 'bottom']
  38656. if (typeof self.__options.side == 'string') {
  38657. var opposites = {
  38658. 'top': 'bottom',
  38659. 'right': 'left',
  38660. 'bottom': 'top',
  38661. 'left': 'right'
  38662. };
  38663. self.__options.side = [self.__options.side, opposites[self.__options.side]];
  38664. if (self.__options.side[0] == 'left' || self.__options.side[0] == 'right') {
  38665. self.__options.side.push('top', 'bottom');
  38666. }
  38667. else {
  38668. self.__options.side.push('right', 'left');
  38669. }
  38670. }
  38671. // misc
  38672. // disable the arrow in IE6 unless the arrow option was explicitly set to true
  38673. if ( $.tooltipster._env.IE === 6
  38674. && self.__options.arrow !== true
  38675. ) {
  38676. self.__options.arrow = false;
  38677. }
  38678. },
  38679. /**
  38680. * This method must compute and set the positioning properties of the
  38681. * tooltip (left, top, width, height, etc.). It must also make sure the
  38682. * tooltip is eventually appended to its parent (since the element may be
  38683. * detached from the DOM at the moment the method is called).
  38684. *
  38685. * We'll evaluate positioning scenarios to find which side can contain the
  38686. * tooltip in the best way. We'll consider things relatively to the window
  38687. * (unless the user asks not to), then to the document (if need be, or if the
  38688. * user explicitly requires the tests to run on the document). For each
  38689. * scenario, measures are taken, allowing us to know how well the tooltip
  38690. * is going to fit. After that, a sorting function will let us know what
  38691. * the best scenario is (we also allow the user to choose his favorite
  38692. * scenario by using an event).
  38693. *
  38694. * @param {object} helper An object that contains variables that plugin
  38695. * creators may find useful (see below)
  38696. * @param {object} helper.geo An object with many layout properties
  38697. * about objects of interest (window, document, origin). This should help
  38698. * plugin users compute the optimal position of the tooltip
  38699. * @private
  38700. */
  38701. __reposition: function(event, helper) {
  38702. var self = this,
  38703. finalResult,
  38704. // to know where to put the tooltip, we need to know on which point
  38705. // of the x or y axis we should center it. That coordinate is the target
  38706. targets = self.__targetFind(helper),
  38707. testResults = [];
  38708. // make sure the tooltip is detached while we make tests on a clone
  38709. self.__instance._$tooltip.detach();
  38710. // we could actually provide the original element to the Ruler and
  38711. // not a clone, but it just feels right to keep it out of the
  38712. // machinery.
  38713. var $clone = self.__instance._$tooltip.clone(),
  38714. // start position tests session
  38715. ruler = $.tooltipster._getRuler($clone),
  38716. satisfied = false,
  38717. animation = self.__instance.option('animation');
  38718. // an animation class could contain properties that distort the size
  38719. if (animation) {
  38720. $clone.removeClass('tooltipster-'+ animation);
  38721. }
  38722. // start evaluating scenarios
  38723. $.each(['window', 'document'], function(i, container) {
  38724. var takeTest = null;
  38725. // let the user decide to keep on testing or not
  38726. self.__instance._trigger({
  38727. container: container,
  38728. helper: helper,
  38729. satisfied: satisfied,
  38730. takeTest: function(bool) {
  38731. takeTest = bool;
  38732. },
  38733. results: testResults,
  38734. type: 'positionTest'
  38735. });
  38736. if ( takeTest == true
  38737. || ( takeTest != false
  38738. && satisfied == false
  38739. // skip the window scenarios if asked. If they are reintegrated by
  38740. // the callback of the positionTest event, they will have to be
  38741. // excluded using the callback of positionTested
  38742. && (container != 'window' || self.__options.viewportAware)
  38743. )
  38744. ) {
  38745. // for each allowed side
  38746. for (var i=0; i < self.__options.side.length; i++) {
  38747. var distance = {
  38748. horizontal: 0,
  38749. vertical: 0
  38750. },
  38751. side = self.__options.side[i];
  38752. if (side == 'top' || side == 'bottom') {
  38753. distance.vertical = self.__options.distance[side];
  38754. }
  38755. else {
  38756. distance.horizontal = self.__options.distance[side];
  38757. }
  38758. // this may have an effect on the size of the tooltip if there are css
  38759. // rules for the arrow or something else
  38760. self.__sideChange($clone, side);
  38761. $.each(['natural', 'constrained'], function(i, mode) {
  38762. takeTest = null;
  38763. // emit an event on the instance
  38764. self.__instance._trigger({
  38765. container: container,
  38766. event: event,
  38767. helper: helper,
  38768. mode: mode,
  38769. results: testResults,
  38770. satisfied: satisfied,
  38771. side: side,
  38772. takeTest: function(bool) {
  38773. takeTest = bool;
  38774. },
  38775. type: 'positionTest'
  38776. });
  38777. if ( takeTest == true
  38778. || ( takeTest != false
  38779. && satisfied == false
  38780. )
  38781. ) {
  38782. var testResult = {
  38783. container: container,
  38784. // we let the distance as an object here, it can make things a little easier
  38785. // during the user's calculations at positionTest/positionTested
  38786. distance: distance,
  38787. // whether the tooltip can fit in the size of the viewport (does not mean
  38788. // that we'll be able to make it initially entirely visible, see 'whole')
  38789. fits: null,
  38790. mode: mode,
  38791. outerSize: null,
  38792. side: side,
  38793. size: null,
  38794. target: targets[side],
  38795. // check if the origin has enough surface on screen for the tooltip to
  38796. // aim at it without overflowing the viewport (this is due to the thickness
  38797. // of the arrow represented by the minIntersection length).
  38798. // If not, the tooltip will have to be partly or entirely off screen in
  38799. // order to stay docked to the origin. This value will stay null when the
  38800. // container is the document, as it is not relevant
  38801. whole: null
  38802. };
  38803. // get the size of the tooltip with or without size constraints
  38804. var rulerConfigured = (mode == 'natural') ?
  38805. ruler.free() :
  38806. ruler.constrain(
  38807. helper.geo.available[container][side].width - distance.horizontal,
  38808. helper.geo.available[container][side].height - distance.vertical
  38809. ),
  38810. rulerResults = rulerConfigured.measure();
  38811. testResult.size = rulerResults.size;
  38812. testResult.outerSize = {
  38813. height: rulerResults.size.height + distance.vertical,
  38814. width: rulerResults.size.width + distance.horizontal
  38815. };
  38816. if (mode == 'natural') {
  38817. if( helper.geo.available[container][side].width >= testResult.outerSize.width
  38818. && helper.geo.available[container][side].height >= testResult.outerSize.height
  38819. ) {
  38820. testResult.fits = true;
  38821. }
  38822. else {
  38823. testResult.fits = false;
  38824. }
  38825. }
  38826. else {
  38827. testResult.fits = rulerResults.fits;
  38828. }
  38829. if (container == 'window') {
  38830. if (!testResult.fits) {
  38831. testResult.whole = false;
  38832. }
  38833. else {
  38834. if (side == 'top' || side == 'bottom') {
  38835. testResult.whole = (
  38836. helper.geo.origin.windowOffset.right >= self.__options.minIntersection
  38837. && helper.geo.window.size.width - helper.geo.origin.windowOffset.left >= self.__options.minIntersection
  38838. );
  38839. }
  38840. else {
  38841. testResult.whole = (
  38842. helper.geo.origin.windowOffset.bottom >= self.__options.minIntersection
  38843. && helper.geo.window.size.height - helper.geo.origin.windowOffset.top >= self.__options.minIntersection
  38844. );
  38845. }
  38846. }
  38847. }
  38848. testResults.push(testResult);
  38849. // we don't need to compute more positions if we have one fully on screen
  38850. if (testResult.whole) {
  38851. satisfied = true;
  38852. }
  38853. else {
  38854. // don't run the constrained test unless the natural width was greater
  38855. // than the available width, otherwise it's pointless as we know it
  38856. // wouldn't fit either
  38857. if ( testResult.mode == 'natural'
  38858. && ( testResult.fits
  38859. || testResult.size.width <= helper.geo.available[container][side].width
  38860. )
  38861. ) {
  38862. return false;
  38863. }
  38864. }
  38865. }
  38866. });
  38867. }
  38868. }
  38869. });
  38870. // the user may eliminate the unwanted scenarios from testResults, but he's
  38871. // not supposed to alter them at this point. functionPosition and the
  38872. // position event serve that purpose.
  38873. self.__instance._trigger({
  38874. edit: function(r) {
  38875. testResults = r;
  38876. },
  38877. event: event,
  38878. helper: helper,
  38879. results: testResults,
  38880. type: 'positionTested'
  38881. });
  38882. /**
  38883. * Sort the scenarios to find the favorite one.
  38884. *
  38885. * The favorite scenario is when we can fully display the tooltip on screen,
  38886. * even if it means that the middle of the tooltip is no longer centered on
  38887. * the middle of the origin (when the origin is near the edge of the screen
  38888. * or even partly off screen). We want the tooltip on the preferred side,
  38889. * even if it means that we have to use a constrained size rather than a
  38890. * natural one (as long as it fits). When the origin is off screen at the top
  38891. * the tooltip will be positioned at the bottom (if allowed), if the origin
  38892. * is off screen on the right, it will be positioned on the left, etc.
  38893. * If there are no scenarios where the tooltip can fit on screen, or if the
  38894. * user does not want the tooltip to fit on screen (viewportAware == false),
  38895. * we fall back to the scenarios relative to the document.
  38896. *
  38897. * When the tooltip is bigger than the viewport in either dimension, we stop
  38898. * looking at the window scenarios and consider the document scenarios only,
  38899. * with the same logic to find on which side it would fit best.
  38900. *
  38901. * If the tooltip cannot fit the document on any side, we force it at the
  38902. * bottom, so at least the user can scroll to see it.
  38903. */
  38904. testResults.sort(function(a, b) {
  38905. // best if it's whole (the tooltip fits and adapts to the viewport)
  38906. if (a.whole && !b.whole) {
  38907. return -1;
  38908. }
  38909. else if (!a.whole && b.whole) {
  38910. return 1;
  38911. }
  38912. else if (a.whole && b.whole) {
  38913. var ai = self.__options.side.indexOf(a.side),
  38914. bi = self.__options.side.indexOf(b.side);
  38915. // use the user's sides fallback array
  38916. if (ai < bi) {
  38917. return -1;
  38918. }
  38919. else if (ai > bi) {
  38920. return 1;
  38921. }
  38922. else {
  38923. // will be used if the user forced the tests to continue
  38924. return a.mode == 'natural' ? -1 : 1;
  38925. }
  38926. }
  38927. else {
  38928. // better if it fits
  38929. if (a.fits && !b.fits) {
  38930. return -1;
  38931. }
  38932. else if (!a.fits && b.fits) {
  38933. return 1;
  38934. }
  38935. else if (a.fits && b.fits) {
  38936. var ai = self.__options.side.indexOf(a.side),
  38937. bi = self.__options.side.indexOf(b.side);
  38938. // use the user's sides fallback array
  38939. if (ai < bi) {
  38940. return -1;
  38941. }
  38942. else if (ai > bi) {
  38943. return 1;
  38944. }
  38945. else {
  38946. // will be used if the user forced the tests to continue
  38947. return a.mode == 'natural' ? -1 : 1;
  38948. }
  38949. }
  38950. else {
  38951. // if everything failed, this will give a preference to the case where
  38952. // the tooltip overflows the document at the bottom
  38953. if ( a.container == 'document'
  38954. && a.side == 'bottom'
  38955. && a.mode == 'natural'
  38956. ) {
  38957. return -1;
  38958. }
  38959. else {
  38960. return 1;
  38961. }
  38962. }
  38963. }
  38964. });
  38965. finalResult = testResults[0];
  38966. // now let's find the coordinates of the tooltip relatively to the window
  38967. finalResult.coord = {};
  38968. switch (finalResult.side) {
  38969. case 'left':
  38970. case 'right':
  38971. finalResult.coord.top = Math.floor(finalResult.target - finalResult.size.height / 2);
  38972. break;
  38973. case 'bottom':
  38974. case 'top':
  38975. finalResult.coord.left = Math.floor(finalResult.target - finalResult.size.width / 2);
  38976. break;
  38977. }
  38978. switch (finalResult.side) {
  38979. case 'left':
  38980. finalResult.coord.left = helper.geo.origin.windowOffset.left - finalResult.outerSize.width;
  38981. break;
  38982. case 'right':
  38983. finalResult.coord.left = helper.geo.origin.windowOffset.right + finalResult.distance.horizontal;
  38984. break;
  38985. case 'top':
  38986. finalResult.coord.top = helper.geo.origin.windowOffset.top - finalResult.outerSize.height;
  38987. break;
  38988. case 'bottom':
  38989. finalResult.coord.top = helper.geo.origin.windowOffset.bottom + finalResult.distance.vertical;
  38990. break;
  38991. }
  38992. // if the tooltip can potentially be contained within the viewport dimensions
  38993. // and that we are asked to make it fit on screen
  38994. if (finalResult.container == 'window') {
  38995. // if the tooltip overflows the viewport, we'll move it accordingly (then it will
  38996. // not be centered on the middle of the origin anymore). We only move horizontally
  38997. // for top and bottom tooltips and vice versa.
  38998. if (finalResult.side == 'top' || finalResult.side == 'bottom') {
  38999. // if there is an overflow on the left
  39000. if (finalResult.coord.left < 0) {
  39001. // prevent the overflow unless the origin itself gets off screen (minus the
  39002. // margin needed to keep the arrow pointing at the target)
  39003. if (helper.geo.origin.windowOffset.right - this.__options.minIntersection >= 0) {
  39004. finalResult.coord.left = 0;
  39005. }
  39006. else {
  39007. finalResult.coord.left = helper.geo.origin.windowOffset.right - this.__options.minIntersection - 1;
  39008. }
  39009. }
  39010. // or an overflow on the right
  39011. else if (finalResult.coord.left > helper.geo.window.size.width - finalResult.size.width) {
  39012. if (helper.geo.origin.windowOffset.left + this.__options.minIntersection <= helper.geo.window.size.width) {
  39013. finalResult.coord.left = helper.geo.window.size.width - finalResult.size.width;
  39014. }
  39015. else {
  39016. finalResult.coord.left = helper.geo.origin.windowOffset.left + this.__options.minIntersection + 1 - finalResult.size.width;
  39017. }
  39018. }
  39019. }
  39020. else {
  39021. // overflow at the top
  39022. if (finalResult.coord.top < 0) {
  39023. if (helper.geo.origin.windowOffset.bottom - this.__options.minIntersection >= 0) {
  39024. finalResult.coord.top = 0;
  39025. }
  39026. else {
  39027. finalResult.coord.top = helper.geo.origin.windowOffset.bottom - this.__options.minIntersection - 1;
  39028. }
  39029. }
  39030. // or at the bottom
  39031. else if (finalResult.coord.top > helper.geo.window.size.height - finalResult.size.height) {
  39032. if (helper.geo.origin.windowOffset.top + this.__options.minIntersection <= helper.geo.window.size.height) {
  39033. finalResult.coord.top = helper.geo.window.size.height - finalResult.size.height;
  39034. }
  39035. else {
  39036. finalResult.coord.top = helper.geo.origin.windowOffset.top + this.__options.minIntersection + 1 - finalResult.size.height;
  39037. }
  39038. }
  39039. }
  39040. }
  39041. else {
  39042. // there might be overflow here too but it's easier to handle. If there has
  39043. // to be an overflow, we'll make sure it's on the right side of the screen
  39044. // (because the browser will extend the document size if there is an overflow
  39045. // on the right, but not on the left). The sort function above has already
  39046. // made sure that a bottom document overflow is preferred to a top overflow,
  39047. // so we don't have to care about it.
  39048. // if there is an overflow on the right
  39049. if (finalResult.coord.left > helper.geo.window.size.width - finalResult.size.width) {
  39050. // this may actually create on overflow on the left but we'll fix it in a sec
  39051. finalResult.coord.left = helper.geo.window.size.width - finalResult.size.width;
  39052. }
  39053. // if there is an overflow on the left
  39054. if (finalResult.coord.left < 0) {
  39055. // don't care if it overflows the right after that, we made our best
  39056. finalResult.coord.left = 0;
  39057. }
  39058. }
  39059. // submit the positioning proposal to the user function which may choose to change
  39060. // the side, size and/or the coordinates
  39061. // first, set the rules that corresponds to the proposed side: it may change
  39062. // the size of the tooltip, and the custom functionPosition may want to detect the
  39063. // size of something before making a decision. So let's make things easier for the
  39064. // implementor
  39065. self.__sideChange($clone, finalResult.side);
  39066. // add some variables to the helper
  39067. helper.tooltipClone = $clone[0];
  39068. helper.tooltipParent = self.__instance.option('parent').parent[0];
  39069. // move informative values to the helper
  39070. helper.mode = finalResult.mode;
  39071. helper.whole = finalResult.whole;
  39072. // add some variables to the helper for the functionPosition callback (these
  39073. // will also be added to the event fired by self.__instance._trigger but that's
  39074. // ok, we're just being consistent)
  39075. helper.origin = self.__instance._$origin[0];
  39076. helper.tooltip = self.__instance._$tooltip[0];
  39077. // leave only the actionable values in there for functionPosition
  39078. delete finalResult.container;
  39079. delete finalResult.fits;
  39080. delete finalResult.mode;
  39081. delete finalResult.outerSize;
  39082. delete finalResult.whole;
  39083. // keep only the distance on the relevant side, for clarity
  39084. finalResult.distance = finalResult.distance.horizontal || finalResult.distance.vertical;
  39085. // beginners may not be comfortable with the concept of editing the object
  39086. // passed by reference, so we provide an edit function and pass a clone
  39087. var finalResultClone = $.extend(true, {}, finalResult);
  39088. // emit an event on the instance
  39089. self.__instance._trigger({
  39090. edit: function(result) {
  39091. finalResult = result;
  39092. },
  39093. event: event,
  39094. helper: helper,
  39095. position: finalResultClone,
  39096. type: 'position'
  39097. });
  39098. if (self.__options.functionPosition) {
  39099. var result = self.__options.functionPosition.call(self, self.__instance, helper, finalResultClone);
  39100. if (result) finalResult = result;
  39101. }
  39102. // end the positioning tests session (the user might have had a
  39103. // use for it during the position event, now it's over)
  39104. ruler.destroy();
  39105. // compute the position of the target relatively to the tooltip root
  39106. // element so we can place the arrow and make the needed adjustments
  39107. var arrowCoord,
  39108. maxVal;
  39109. if (finalResult.side == 'top' || finalResult.side == 'bottom') {
  39110. arrowCoord = {
  39111. prop: 'left',
  39112. val: finalResult.target - finalResult.coord.left
  39113. };
  39114. maxVal = finalResult.size.width - this.__options.minIntersection;
  39115. }
  39116. else {
  39117. arrowCoord = {
  39118. prop: 'top',
  39119. val: finalResult.target - finalResult.coord.top
  39120. };
  39121. maxVal = finalResult.size.height - this.__options.minIntersection;
  39122. }
  39123. // cannot lie beyond the boundaries of the tooltip, minus the
  39124. // arrow margin
  39125. if (arrowCoord.val < this.__options.minIntersection) {
  39126. arrowCoord.val = this.__options.minIntersection;
  39127. }
  39128. else if (arrowCoord.val > maxVal) {
  39129. arrowCoord.val = maxVal;
  39130. }
  39131. var originParentOffset;
  39132. // let's convert the window-relative coordinates into coordinates relative to the
  39133. // future positioned parent that the tooltip will be appended to
  39134. if (helper.geo.origin.fixedLineage) {
  39135. // same as windowOffset when the position is fixed
  39136. originParentOffset = helper.geo.origin.windowOffset;
  39137. }
  39138. else {
  39139. // this assumes that the parent of the tooltip is located at
  39140. // (0, 0) in the document, typically like when the parent is
  39141. // <body>.
  39142. // If we ever allow other types of parent, .tooltipster-ruler
  39143. // will have to be appended to the parent to inherit css style
  39144. // values that affect the display of the text and such.
  39145. originParentOffset = {
  39146. left: helper.geo.origin.windowOffset.left + helper.geo.window.scroll.left,
  39147. top: helper.geo.origin.windowOffset.top + helper.geo.window.scroll.top
  39148. };
  39149. }
  39150. finalResult.coord = {
  39151. left: originParentOffset.left + (finalResult.coord.left - helper.geo.origin.windowOffset.left),
  39152. top: originParentOffset.top + (finalResult.coord.top - helper.geo.origin.windowOffset.top)
  39153. };
  39154. // set position values on the original tooltip element
  39155. self.__sideChange(self.__instance._$tooltip, finalResult.side);
  39156. if (helper.geo.origin.fixedLineage) {
  39157. self.__instance._$tooltip
  39158. .css('position', 'fixed');
  39159. }
  39160. else {
  39161. // CSS default
  39162. self.__instance._$tooltip
  39163. .css('position', '');
  39164. }
  39165. self.__instance._$tooltip
  39166. .css({
  39167. left: finalResult.coord.left,
  39168. top: finalResult.coord.top,
  39169. // we need to set a size even if the tooltip is in its natural size
  39170. // because when the tooltip is positioned beyond the width of the body
  39171. // (which is by default the width of the window; it will happen when
  39172. // you scroll the window horizontally to get to the origin), its text
  39173. // content will otherwise break lines at each word to keep up with the
  39174. // body overflow strategy.
  39175. height: finalResult.size.height,
  39176. width: finalResult.size.width
  39177. })
  39178. .find('.tooltipster-arrow')
  39179. .css({
  39180. 'left': '',
  39181. 'top': ''
  39182. })
  39183. .css(arrowCoord.prop, arrowCoord.val);
  39184. // append the tooltip HTML element to its parent
  39185. self.__instance._$tooltip.appendTo(self.__instance.option('parent'));
  39186. self.__instance._trigger({
  39187. type: 'repositioned',
  39188. event: event,
  39189. position: finalResult
  39190. });
  39191. },
  39192. /**
  39193. * Make whatever modifications are needed when the side is changed. This has
  39194. * been made an independant method for easy inheritance in custom plugins based
  39195. * on this default plugin.
  39196. *
  39197. * @param {object} $obj
  39198. * @param {string} side
  39199. * @private
  39200. */
  39201. __sideChange: function($obj, side) {
  39202. $obj
  39203. .removeClass('tooltipster-bottom')
  39204. .removeClass('tooltipster-left')
  39205. .removeClass('tooltipster-right')
  39206. .removeClass('tooltipster-top')
  39207. .addClass('tooltipster-'+ side);
  39208. },
  39209. /**
  39210. * Returns the target that the tooltip should aim at for a given side.
  39211. * The calculated value is a distance from the edge of the window
  39212. * (left edge for top/bottom sides, top edge for left/right side). The
  39213. * tooltip will be centered on that position and the arrow will be
  39214. * positioned there (as much as possible).
  39215. *
  39216. * @param {object} helper
  39217. * @return {integer}
  39218. * @private
  39219. */
  39220. __targetFind: function(helper) {
  39221. var target = {},
  39222. rects = this.__instance._$origin[0].getClientRects();
  39223. // these lines fix a Chrome bug (issue #491)
  39224. if (rects.length > 1) {
  39225. var opacity = this.__instance._$origin.css('opacity');
  39226. if(opacity == 1) {
  39227. this.__instance._$origin.css('opacity', 0.99);
  39228. rects = this.__instance._$origin[0].getClientRects();
  39229. this.__instance._$origin.css('opacity', 1);
  39230. }
  39231. }
  39232. // by default, the target will be the middle of the origin
  39233. if (rects.length < 2) {
  39234. target.top = Math.floor(helper.geo.origin.windowOffset.left + (helper.geo.origin.size.width / 2));
  39235. target.bottom = target.top;
  39236. target.left = Math.floor(helper.geo.origin.windowOffset.top + (helper.geo.origin.size.height / 2));
  39237. target.right = target.left;
  39238. }
  39239. // if multiple client rects exist, the element may be text split
  39240. // up into multiple lines and the middle of the origin may not be
  39241. // best option anymore. We need to choose the best target client rect
  39242. else {
  39243. // top: the first
  39244. var targetRect = rects[0];
  39245. target.top = Math.floor(targetRect.left + (targetRect.right - targetRect.left) / 2);
  39246. // right: the middle line, rounded down in case there is an even
  39247. // number of lines (looks more centered => check out the
  39248. // demo with 4 split lines)
  39249. if (rects.length > 2) {
  39250. targetRect = rects[Math.ceil(rects.length / 2) - 1];
  39251. }
  39252. else {
  39253. targetRect = rects[0];
  39254. }
  39255. target.right = Math.floor(targetRect.top + (targetRect.bottom - targetRect.top) / 2);
  39256. // bottom: the last
  39257. targetRect = rects[rects.length - 1];
  39258. target.bottom = Math.floor(targetRect.left + (targetRect.right - targetRect.left) / 2);
  39259. // left: the middle line, rounded up
  39260. if (rects.length > 2) {
  39261. targetRect = rects[Math.ceil((rects.length + 1) / 2) - 1];
  39262. }
  39263. else {
  39264. targetRect = rects[rects.length - 1];
  39265. }
  39266. target.left = Math.floor(targetRect.top + (targetRect.bottom - targetRect.top) / 2);
  39267. }
  39268. return target;
  39269. }
  39270. }
  39271. });
  39272. /* a build task will add "return $;" here */
  39273. return $;
  39274. }));