| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082 |
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /**
- * @param {?} n
- * @param {?} x
- * @return {?}
- */
- function mod(n, x) {
- return (n % x + x) % x;
- }
- /**
- * @param {?} num
- * @return {?}
- */
- function absFloor(num) {
- return num < 0 ? Math.ceil(num) || 0 : Math.floor(num);
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /**
- * @param {?} str
- * @return {?}
- */
- function isString(str) {
- return typeof str === 'string';
- }
- /**
- * @param {?} value
- * @return {?}
- */
- function isDate(value) {
- return value instanceof Date || Object.prototype.toString.call(value) === '[object Date]';
- }
- /**
- * @param {?} date
- * @return {?}
- */
- function isDateValid(date) {
- return date && date.getTime && !isNaN(date.getTime());
- }
- /**
- * @param {?} fn
- * @return {?}
- */
- function isFunction(fn) {
- return (fn instanceof Function ||
- Object.prototype.toString.call(fn) === '[object Function]');
- }
- /**
- * @param {?=} value
- * @return {?}
- */
- function isNumber(value) {
- return typeof value === 'number' || Object.prototype.toString.call(value) === '[object Number]';
- }
- /**
- * @template T
- * @param {?=} input
- * @return {?}
- */
- function isArray(input) {
- return (input instanceof Array ||
- Object.prototype.toString.call(input) === '[object Array]');
- }
- /**
- * @template T
- * @param {?} a
- * @param {?} b
- * @return {?}
- */
- function hasOwnProp(a /*object*/, b) {
- return Object.prototype.hasOwnProperty.call(a, b);
- }
- /**
- * @template T
- * @param {?} input
- * @return {?}
- */
- function isObject(input /*object*/) {
- // IE8 will treat undefined and null as object if it wasn't for
- // input != null
- return (input != null && Object.prototype.toString.call(input) === '[object Object]');
- }
- /**
- * @param {?} obj
- * @return {?}
- */
- function isObjectEmpty(obj) {
- if (Object.getOwnPropertyNames) {
- return (Object.getOwnPropertyNames(obj).length === 0);
- }
- /** @type {?} */
- var k;
- for (k in obj) {
- if (obj.hasOwnProperty(k)) {
- return false;
- }
- }
- return true;
- }
- /**
- * @param {?} input
- * @return {?}
- */
- function isUndefined(input) {
- return input === void 0;
- }
- /**
- * @template T
- * @param {?} argumentForCoercion
- * @return {?}
- */
- function toInt(argumentForCoercion) {
- /** @type {?} */
- var coercedNumber = +argumentForCoercion;
- /** @type {?} */
- var value = 0;
- if (coercedNumber !== 0 && isFinite(coercedNumber)) {
- value = absFloor(coercedNumber);
- }
- return value;
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /** @type {?} */
- var aliases = {};
- /** @type {?} */
- var _mapUnits = {
- date: 'day',
- hour: 'hours',
- minute: 'minutes',
- second: 'seconds',
- millisecond: 'milliseconds'
- };
- /**
- * @param {?} unit
- * @param {?} shorthand
- * @return {?}
- */
- function addUnitAlias(unit, shorthand) {
- /** @type {?} */
- var lowerCase = unit.toLowerCase();
- /** @type {?} */
- var _unit = unit;
- if (lowerCase in _mapUnits) {
- _unit = _mapUnits[lowerCase];
- }
- aliases[lowerCase] = aliases[lowerCase + "s"] = aliases[shorthand] = _unit;
- }
- /**
- * @param {?} units
- * @return {?}
- */
- function normalizeUnits(units) {
- return isString(units) ? aliases[units] || aliases[units.toLowerCase()] : undefined;
- }
- /**
- * @param {?} inputObject
- * @return {?}
- */
- function normalizeObjectUnits(inputObject) {
- /** @type {?} */
- var normalizedInput = {};
- /** @type {?} */
- var normalizedProp;
- /** @type {?} */
- var prop;
- for (prop in inputObject) {
- if (hasOwnProp(inputObject, prop)) {
- normalizedProp = normalizeUnits(prop);
- if (normalizedProp) {
- normalizedInput[normalizedProp] = inputObject[prop];
- }
- }
- }
- return (/** @type {?} */ (normalizedInput));
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // place in new Date([array])
- /** @type {?} */
- var YEAR = 0;
- /** @type {?} */
- var MONTH = 1;
- /** @type {?} */
- var DATE = 2;
- /** @type {?} */
- var HOUR = 3;
- /** @type {?} */
- var MINUTE = 4;
- /** @type {?} */
- var SECOND = 5;
- /** @type {?} */
- var MILLISECOND = 6;
- /** @type {?} */
- var WEEK = 7;
- /** @type {?} */
- var WEEKDAY = 8;
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /**
- * @param {?} num
- * @param {?} targetLength
- * @param {?=} forceSign
- * @return {?}
- */
- function zeroFill(num, targetLength, forceSign) {
- /** @type {?} */
- var absNumber = "" + Math.abs(num);
- /** @type {?} */
- var zerosToFill = targetLength - absNumber.length;
- /** @type {?} */
- var sign = num >= 0;
- /** @type {?} */
- var _sign = sign ? (forceSign ? '+' : '') : '-';
- // todo: this is crazy slow
- /** @type {?} */
- var _zeros = Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1);
- return (_sign + _zeros + absNumber);
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /** @type {?} */
- var formatFunctions = {};
- /** @type {?} */
- var formatTokenFunctions = {};
- // tslint:disable-next-line
- /** @type {?} */
- 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;
- // token: 'M'
- // padded: ['MM', 2]
- // ordinal: 'Mo'
- // callback: function () { this.month() + 1 }
- /**
- * @param {?} token
- * @param {?} padded
- * @param {?} ordinal
- * @param {?} callback
- * @return {?}
- */
- function addFormatToken(token, padded, ordinal, callback) {
- if (token) {
- formatTokenFunctions[token] = callback;
- }
- if (padded) {
- formatTokenFunctions[padded[0]] = (/**
- * @return {?}
- */
- function () {
- return zeroFill(callback.apply(null, arguments), padded[1], padded[2]);
- });
- }
- if (ordinal) {
- formatTokenFunctions[ordinal] = (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- return opts.locale.ordinal(callback.apply(null, arguments), token);
- });
- }
- }
- /**
- * @param {?} format
- * @return {?}
- */
- function makeFormatFunction(format) {
- /** @type {?} */
- var array = format.match(formattingTokens);
- /** @type {?} */
- var length = array.length;
- /** @type {?} */
- var formatArr = new Array(length);
- for (var i = 0; i < length; i++) {
- formatArr[i] = formatTokenFunctions[array[i]]
- ? formatTokenFunctions[array[i]]
- : removeFormattingTokens(array[i]);
- }
- return (/**
- * @param {?} date
- * @param {?} locale
- * @param {?} isUTC
- * @param {?=} offset
- * @return {?}
- */
- function (date, locale, isUTC, offset) {
- if (offset === void 0) { offset = 0; }
- /** @type {?} */
- var output = '';
- for (var j = 0; j < length; j++) {
- output += isFunction(formatArr[j])
- ? ((/** @type {?} */ (formatArr[j]))).call(null, date, { format: format, locale: locale, isUTC: isUTC, offset: offset })
- : formatArr[j];
- }
- return output;
- });
- }
- /**
- * @param {?} input
- * @return {?}
- */
- function removeFormattingTokens(input) {
- if (input.match(/\[[\s\S]/)) {
- return input.replace(/^\[|\]$/g, '');
- }
- return input.replace(/\\/g, '');
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /**
- * @param {?=} y
- * @param {?=} m
- * @param {?=} d
- * @return {?}
- */
- function createUTCDate(y, m, d) {
- /** @type {?} */
- var date = new Date(Date.UTC.apply(null, arguments));
- // the Date.UTC function remaps years 0-99 to 1900-1999
- if (y < 100 && y >= 0 && isFinite(date.getUTCFullYear())) {
- date.setUTCFullYear(y);
- }
- return date;
- }
- /**
- * @param {?=} y
- * @param {?=} m
- * @param {?=} d
- * @param {?=} h
- * @param {?=} M
- * @param {?=} s
- * @param {?=} ms
- * @return {?}
- */
- function createDate(y, m, d, h, M, s, ms) {
- if (m === void 0) { m = 0; }
- if (d === void 0) { d = 1; }
- if (h === void 0) { h = 0; }
- if (M === void 0) { M = 0; }
- if (s === void 0) { s = 0; }
- if (ms === void 0) { ms = 0; }
- /** @type {?} */
- var date = new Date(y, m, d, h, M, s, ms);
- // the date constructor remaps years 0-99 to 1900-1999
- if (y < 100 && y >= 0 && isFinite(date.getFullYear())) {
- date.setFullYear(y);
- }
- return date;
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /**
- * @param {?} date
- * @param {?=} isUTC
- * @return {?}
- */
- function getHours(date, isUTC) {
- if (isUTC === void 0) { isUTC = false; }
- return isUTC ? date.getUTCHours() : date.getHours();
- }
- /**
- * @param {?} date
- * @param {?=} isUTC
- * @return {?}
- */
- function getMinutes(date, isUTC) {
- if (isUTC === void 0) { isUTC = false; }
- return isUTC ? date.getUTCMinutes() : date.getMinutes();
- }
- /**
- * @param {?} date
- * @param {?=} isUTC
- * @return {?}
- */
- function getSeconds(date, isUTC) {
- if (isUTC === void 0) { isUTC = false; }
- return isUTC ? date.getUTCSeconds() : date.getSeconds();
- }
- /**
- * @param {?} date
- * @param {?=} isUTC
- * @return {?}
- */
- function getMilliseconds(date, isUTC) {
- if (isUTC === void 0) { isUTC = false; }
- return isUTC ? date.getUTCMilliseconds() : date.getMilliseconds();
- }
- /**
- * @param {?} date
- * @return {?}
- */
- function getTime(date) {
- return date.getTime();
- }
- /**
- * @param {?} date
- * @param {?=} isUTC
- * @return {?}
- */
- function getDay(date, isUTC) {
- if (isUTC === void 0) { isUTC = false; }
- return isUTC ? date.getUTCDay() : date.getDay();
- }
- /**
- * @param {?} date
- * @param {?=} isUTC
- * @return {?}
- */
- function getDate(date, isUTC) {
- if (isUTC === void 0) { isUTC = false; }
- return isUTC ? date.getUTCDate() : date.getDate();
- }
- /**
- * @param {?} date
- * @param {?=} isUTC
- * @return {?}
- */
- function getMonth(date, isUTC) {
- if (isUTC === void 0) { isUTC = false; }
- return isUTC ? date.getUTCMonth() : date.getMonth();
- }
- /**
- * @param {?} date
- * @param {?=} isUTC
- * @return {?}
- */
- function getFullYear(date, isUTC) {
- if (isUTC === void 0) { isUTC = false; }
- return isUTC ? date.getUTCFullYear() : date.getFullYear();
- }
- /**
- * @param {?} date
- * @return {?}
- */
- function unix(date) {
- return Math.floor(date.valueOf() / 1000);
- }
- /**
- * @param {?} date
- * @return {?}
- */
- function getFirstDayOfMonth(date) {
- return createDate(date.getFullYear(), date.getMonth(), 1, date.getHours(), date.getMinutes(), date.getSeconds());
- }
- /**
- * @param {?} date
- * @param {?} firstDayOfWeek
- * @return {?}
- */
- function isFirstDayOfWeek(date, firstDayOfWeek) {
- return date.getDay() === firstDayOfWeek;
- }
- /**
- * @param {?} date1
- * @param {?} date2
- * @return {?}
- */
- function isSameMonth(date1, date2) {
- if (!date1 || !date2) {
- return false;
- }
- return isSameYear(date1, date2) && getMonth(date1) === getMonth(date2);
- }
- /**
- * @param {?} date1
- * @param {?} date2
- * @return {?}
- */
- function isSameYear(date1, date2) {
- if (!date1 || !date2) {
- return false;
- }
- return getFullYear(date1) === getFullYear(date2);
- }
- /**
- * @param {?} date1
- * @param {?} date2
- * @return {?}
- */
- function isSameDay(date1, date2) {
- if (!date1 || !date2) {
- return false;
- }
- return (isSameYear(date1, date2) &&
- isSameMonth(date1, date2) &&
- getDate(date1) === getDate(date2));
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /** @type {?} */
- var match1 = /\d/;
- // 0 - 9
- /** @type {?} */
- var match2 = /\d\d/;
- // 00 - 99
- /** @type {?} */
- var match3 = /\d{3}/;
- // 000 - 999
- /** @type {?} */
- var match4 = /\d{4}/;
- // 0000 - 9999
- /** @type {?} */
- var match6 = /[+-]?\d{6}/;
- // -999999 - 999999
- /** @type {?} */
- var match1to2 = /\d\d?/;
- // 0 - 99
- /** @type {?} */
- var match3to4 = /\d\d\d\d?/;
- // 999 - 9999
- /** @type {?} */
- var match5to6 = /\d\d\d\d\d\d?/;
- // 99999 - 999999
- /** @type {?} */
- var match1to3 = /\d{1,3}/;
- // 0 - 999
- /** @type {?} */
- var match1to4 = /\d{1,4}/;
- // 0 - 9999
- /** @type {?} */
- var match1to6 = /[+-]?\d{1,6}/;
- // -999999 - 999999
- /** @type {?} */
- var matchUnsigned = /\d+/;
- // 0 - inf
- /** @type {?} */
- var matchSigned = /[+-]?\d+/;
- // +00:00 -00:00 +0000 -0000 or Z
- /** @type {?} */
- var matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi;
- // +00 -00 +00:00 -00:00 +0000 -0000 or Z
- /** @type {?} */
- var matchTimestamp = /[+-]?\d+(\.\d{1,3})?/;
- // 123456789 123456789.123
- // any word (or two) characters or numbers including two/three word month in arabic.
- // includes scottish gaelic two word and hyphenated months
- // tslint:disable-next-line
- /** @type {?} */
- var matchWord = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;
- /** @type {?} */
- var regexes = {};
- /**
- * @param {?} token
- * @param {?} regex
- * @param {?=} strictRegex
- * @return {?}
- */
- function addRegexToken(token, regex, strictRegex) {
- if (isFunction(regex)) {
- regexes[token] = regex;
- return;
- }
- regexes[token] = (/**
- * @param {?} isStrict
- * @param {?} locale
- * @return {?}
- */
- function (isStrict, locale) {
- return (isStrict && strictRegex) ? strictRegex : regex;
- });
- }
- /**
- * @param {?} token
- * @param {?} locale
- * @return {?}
- */
- function getParseRegexForToken(token, locale) {
- /** @type {?} */
- var _strict = false;
- if (!hasOwnProp(regexes, token)) {
- return new RegExp(unescapeFormat(token));
- }
- return regexes[token](_strict, locale);
- }
- // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
- /**
- * @param {?} str
- * @return {?}
- */
- function unescapeFormat(str) {
- // tslint:disable-next-line
- return regexEscape(str
- .replace('\\', '')
- .replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, (/**
- * @param {?} matched
- * @param {?} p1
- * @param {?} p2
- * @param {?} p3
- * @param {?} p4
- * @return {?}
- */
- function (matched, p1, p2, p3, p4) { return p1 || p2 || p3 || p4; })));
- }
- /**
- * @param {?} str
- * @return {?}
- */
- function regexEscape(str) {
- return str.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /** @type {?} */
- var tokens = {};
- /**
- * @param {?} token
- * @param {?} callback
- * @return {?}
- */
- function addParseToken(token, callback) {
- /** @type {?} */
- var _token = isString(token) ? [token] : token;
- /** @type {?} */
- var func = callback;
- if (isNumber(callback)) {
- func = (/**
- * @param {?} input
- * @param {?} array
- * @param {?} config
- * @return {?}
- */
- function (input, array, config) {
- array[callback] = toInt(input);
- return config;
- });
- }
- if (isArray(_token) && isFunction(func)) {
- /** @type {?} */
- var i = void 0;
- for (i = 0; i < _token.length; i++) {
- tokens[_token[i]] = func;
- }
- }
- }
- /**
- * @param {?} token
- * @param {?} callback
- * @return {?}
- */
- function addWeekParseToken(token, callback) {
- addParseToken(token, (/**
- * @param {?} input
- * @param {?} array
- * @param {?} config
- * @param {?} _token
- * @return {?}
- */
- function (input, array, config, _token) {
- config._w = config._w || {};
- return callback(input, config._w, config, _token);
- }));
- }
- /**
- * @param {?} token
- * @param {?} input
- * @param {?} config
- * @return {?}
- */
- function addTimeToArrayFromToken(token, input, config) {
- if (input != null && hasOwnProp(tokens, token)) {
- tokens[token](input, config._a, config, token);
- }
- return config;
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /**
- * @return {?}
- */
- function initDayOfMonth() {
- // FORMATTING
- addFormatToken('D', ['DD', 2, false], 'Do', (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- return getDate(date, opts.isUTC)
- .toString(10);
- }));
- // ALIASES
- addUnitAlias('date', 'D');
- // PARSING
- addRegexToken('D', match1to2);
- addRegexToken('DD', match1to2, match2);
- addRegexToken('Do', (/**
- * @param {?} isStrict
- * @param {?} locale
- * @return {?}
- */
- function (isStrict, locale) {
- return locale._dayOfMonthOrdinalParse || locale._ordinalParse;
- }));
- addParseToken(['D', 'DD'], DATE);
- addParseToken('Do', (/**
- * @param {?} input
- * @param {?} array
- * @param {?} config
- * @return {?}
- */
- function (input, array, config) {
- array[DATE] = toInt(input.match(match1to2)[0]);
- return config;
- }));
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /**
- * @return {?}
- */
- function defaultParsingFlags() {
- // We need to deep clone this object.
- return {
- empty: false,
- unusedTokens: [],
- unusedInput: [],
- overflow: -2,
- charsLeftOver: 0,
- nullInput: false,
- invalidMonth: null,
- invalidFormat: false,
- userInvalidated: false,
- iso: false,
- parsedDateParts: [],
- meridiem: null,
- rfc2822: false,
- weekdayMismatch: false
- };
- }
- /**
- * @param {?} config
- * @return {?}
- */
- function getParsingFlags(config) {
- if (config._pf == null) {
- config._pf = defaultParsingFlags();
- }
- return config._pf;
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // FORMATTING
- /**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function getYear(date, opts) {
- return getFullYear(date, opts.isUTC).toString();
- }
- /**
- * @return {?}
- */
- function initYear() {
- addFormatToken('Y', null, null, (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- /** @type {?} */
- var y = getFullYear(date, opts.isUTC);
- return y <= 9999 ? y.toString(10) : "+" + y;
- }));
- addFormatToken(null, ['YY', 2, false], null, (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- return (getFullYear(date, opts.isUTC) % 100).toString(10);
- }));
- addFormatToken(null, ['YYYY', 4, false], null, getYear);
- addFormatToken(null, ['YYYYY', 5, false], null, getYear);
- addFormatToken(null, ['YYYYYY', 6, true], null, getYear);
- // ALIASES
- addUnitAlias('year', 'y');
- // PARSING
- addRegexToken('Y', matchSigned);
- addRegexToken('YY', match1to2, match2);
- addRegexToken('YYYY', match1to4, match4);
- addRegexToken('YYYYY', match1to6, match6);
- addRegexToken('YYYYYY', match1to6, match6);
- addParseToken(['YYYYY', 'YYYYYY'], YEAR);
- addParseToken('YYYY', (/**
- * @param {?} input
- * @param {?} array
- * @param {?} config
- * @return {?}
- */
- function (input, array, config) {
- array[YEAR] = input.length === 2 ? parseTwoDigitYear(input) : toInt(input);
- return config;
- }));
- addParseToken('YY', (/**
- * @param {?} input
- * @param {?} array
- * @param {?} config
- * @return {?}
- */
- function (input, array, config) {
- array[YEAR] = parseTwoDigitYear(input);
- return config;
- }));
- addParseToken('Y', (/**
- * @param {?} input
- * @param {?} array
- * @param {?} config
- * @return {?}
- */
- function (input, array, config) {
- array[YEAR] = parseInt(input, 10);
- return config;
- }));
- }
- /**
- * @param {?} input
- * @return {?}
- */
- function parseTwoDigitYear(input) {
- return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);
- }
- /**
- * @param {?} year
- * @return {?}
- */
- function daysInYear(year) {
- return isLeapYear(year) ? 366 : 365;
- }
- /**
- * @param {?} year
- * @return {?}
- */
- function isLeapYear(year) {
- return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // todo: this is duplicate, source in date-getters.ts
- /**
- * @param {?} year
- * @param {?} month
- * @return {?}
- */
- function daysInMonth(year, month) {
- if (isNaN(year) || isNaN(month)) {
- return NaN;
- }
- /** @type {?} */
- var modMonth = mod(month, 12);
- /** @type {?} */
- var _year = year + (month - modMonth) / 12;
- return modMonth === 1
- ? isLeapYear(_year) ? 29 : 28
- : (31 - modMonth % 7 % 2);
- }
- /**
- * @return {?}
- */
- function initMonth() {
- // FORMATTING
- addFormatToken('M', ['MM', 2, false], 'Mo', (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- return (getMonth(date, opts.isUTC) + 1).toString(10);
- }));
- addFormatToken('MMM', null, null, (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- return opts.locale.monthsShort(date, opts.format, opts.isUTC);
- }));
- addFormatToken('MMMM', null, null, (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- return opts.locale.months(date, opts.format, opts.isUTC);
- }));
- // ALIASES
- addUnitAlias('month', 'M');
- // PARSING
- addRegexToken('M', match1to2);
- addRegexToken('MM', match1to2, match2);
- addRegexToken('MMM', (/**
- * @param {?} isStrict
- * @param {?} locale
- * @return {?}
- */
- function (isStrict, locale) {
- return locale.monthsShortRegex(isStrict);
- }));
- addRegexToken('MMMM', (/**
- * @param {?} isStrict
- * @param {?} locale
- * @return {?}
- */
- function (isStrict, locale) {
- return locale.monthsRegex(isStrict);
- }));
- addParseToken(['M', 'MM'], (/**
- * @param {?} input
- * @param {?} array
- * @param {?} config
- * @return {?}
- */
- function (input, array, config) {
- array[MONTH] = toInt(input) - 1;
- return config;
- }));
- addParseToken(['MMM', 'MMMM'], (/**
- * @param {?} input
- * @param {?} array
- * @param {?} config
- * @param {?} token
- * @return {?}
- */
- function (input, array, config, token) {
- /** @type {?} */
- var month = config._locale.monthsParse(input, token, config._strict);
- // if we didn't find a month name, mark the date as invalid.
- if (month != null) {
- array[MONTH] = month;
- }
- else {
- getParsingFlags(config).invalidMonth = !!input;
- }
- return config;
- }));
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /** @type {?} */
- var defaultTimeUnit = {
- year: 0,
- month: 0,
- day: 0,
- hour: 0,
- minute: 0,
- seconds: 0
- };
- /**
- * @param {?} date
- * @param {?} unit
- * @return {?}
- */
- function shiftDate(date, unit) {
- /** @type {?} */
- var _unit = Object.assign({}, defaultTimeUnit, unit);
- /** @type {?} */
- var year = date.getFullYear() + (_unit.year || 0);
- /** @type {?} */
- var month = date.getMonth() + (_unit.month || 0);
- /** @type {?} */
- var day = date.getDate() + (_unit.day || 0);
- if (_unit.month && !_unit.day) {
- day = Math.min(day, daysInMonth(year, month));
- }
- return createDate(year, month, day, date.getHours() + (_unit.hour || 0), date.getMinutes() + (_unit.minute || 0), date.getSeconds() + (_unit.seconds || 0));
- }
- /**
- * @param {?} date
- * @param {?} unit
- * @return {?}
- */
- function setFullDate(date, unit) {
- return createDate(getNum(date.getFullYear(), unit.year), getNum(date.getMonth(), unit.month), 1, // day, to avoid issue with wrong months selection at the end of current month (#5371)
- getNum(date.getHours(), unit.hour), getNum(date.getMinutes(), unit.minute), getNum(date.getSeconds(), unit.seconds), getNum(date.getMilliseconds(), unit.milliseconds));
- }
- /**
- * @param {?} def
- * @param {?=} num
- * @return {?}
- */
- function getNum(def, num) {
- return isNumber(num) ? num : def;
- }
- /**
- * @param {?} date
- * @param {?} value
- * @param {?=} isUTC
- * @return {?}
- */
- function setMonth(date, value, isUTC) {
- /** @type {?} */
- var dayOfMonth = Math.min(getDate(date), daysInMonth(getFullYear(date), value));
- isUTC ? date.setUTCMonth(value, dayOfMonth) : date.setMonth(value, dayOfMonth);
- return date;
- }
- /**
- * @param {?} date
- * @param {?} value
- * @param {?=} isUTC
- * @return {?}
- */
- function setHours(date, value, isUTC) {
- isUTC ? date.setUTCHours(value) : date.setHours(value);
- return date;
- }
- /**
- * @param {?} date
- * @param {?} value
- * @param {?=} isUTC
- * @return {?}
- */
- function setMinutes(date, value, isUTC) {
- isUTC ? date.setUTCMinutes(value) : date.setMinutes(value);
- return date;
- }
- /**
- * @param {?} date
- * @param {?} value
- * @param {?=} isUTC
- * @return {?}
- */
- function setSeconds(date, value, isUTC) {
- isUTC ? date.setUTCSeconds(value) : date.setSeconds(value);
- return date;
- }
- /**
- * @param {?} date
- * @param {?} value
- * @param {?=} isUTC
- * @return {?}
- */
- function setMilliseconds(date, value, isUTC) {
- isUTC ? date.setUTCMilliseconds(value) : date.setMilliseconds(value);
- return date;
- }
- /**
- * @param {?} date
- * @param {?} value
- * @param {?=} isUTC
- * @return {?}
- */
- function setDate(date, value, isUTC) {
- isUTC ? date.setUTCDate(value) : date.setDate(value);
- return date;
- }
- /**
- * @param {?} date
- * @param {?} value
- * @return {?}
- */
- function setTime(date, value) {
- date.setTime(value);
- return date;
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // fastest way to clone date
- // https://jsperf.com/clone-date-object2
- /**
- * @param {?} date
- * @return {?}
- */
- function cloneDate(date) {
- return new Date(date.getTime());
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /**
- * @param {?} date
- * @param {?} unit
- * @param {?=} isUTC
- * @return {?}
- */
- function startOf(date, unit, isUTC) {
- /** @type {?} */
- var _date = cloneDate(date);
- // the following switch intentionally omits break keywords
- // to utilize falling through the cases.
- switch (unit) {
- case 'year':
- setMonth(_date, 0, isUTC);
- /* falls through */
- case 'quarter':
- case 'month':
- setDate(_date, 1, isUTC);
- /* falls through */
- case 'week':
- case 'isoWeek':
- case 'day':
- case 'date':
- setHours(_date, 0, isUTC);
- /* falls through */
- case 'hours':
- setMinutes(_date, 0, isUTC);
- /* falls through */
- case 'minutes':
- setSeconds(_date, 0, isUTC);
- /* falls through */
- case 'seconds':
- setMilliseconds(_date, 0, isUTC);
- }
- // weeks are a special case
- if (unit === 'week') {
- setLocaleDayOfWeek(_date, 0, { isUTC: isUTC });
- }
- if (unit === 'isoWeek') {
- setISODayOfWeek(_date, 1);
- }
- // quarters are also special
- if (unit === 'quarter') {
- setMonth(_date, Math.floor(getMonth(_date, isUTC) / 3) * 3, isUTC);
- }
- return _date;
- }
- /**
- * @param {?} date
- * @param {?} unit
- * @param {?=} isUTC
- * @return {?}
- */
- function endOf(date, unit, isUTC) {
- /** @type {?} */
- var _unit = unit;
- // 'date' is an alias for 'day', so it should be considered as such.
- if (_unit === 'date') {
- _unit = 'day';
- }
- /** @type {?} */
- var start = startOf(date, _unit, isUTC);
- /** @type {?} */
- var _step = add(start, 1, _unit === 'isoWeek' ? 'week' : _unit, isUTC);
- /** @type {?} */
- var res = subtract(_step, 1, 'milliseconds', isUTC);
- return res;
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /**
- * @return {?}
- */
- function initDayOfYear() {
- // FORMATTING
- addFormatToken('DDD', ['DDDD', 3, false], 'DDDo', (/**
- * @param {?} date
- * @return {?}
- */
- function (date) {
- return getDayOfYear(date)
- .toString(10);
- }));
- // ALIASES
- addUnitAlias('dayOfYear', 'DDD');
- addRegexToken('DDD', match1to3);
- addRegexToken('DDDD', match3);
- addParseToken(['DDD', 'DDDD'], (/**
- * @param {?} input
- * @param {?} array
- * @param {?} config
- * @return {?}
- */
- function (input, array, config) {
- config._dayOfYear = toInt(input);
- return config;
- }));
- }
- /**
- * @param {?} date
- * @param {?=} isUTC
- * @return {?}
- */
- function getDayOfYear(date, isUTC) {
- /** @type {?} */
- var date1 = +startOf(date, 'day', isUTC);
- /** @type {?} */
- var date2 = +startOf(date, 'year', isUTC);
- /** @type {?} */
- var someDate = date1 - date2;
- /** @type {?} */
- var oneDay = 1000 * 60 * 60 * 24;
- return Math.round(someDate / oneDay) + 1;
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /**
- * @param {?} year
- * @param {?} dow
- * @param {?} doy
- * @return {?}
- */
- function firstWeekOffset(year, dow, doy) {
- // first-week day -- which january is always in the first week (4 for iso, 1 for other)
- /** @type {?} */
- var fwd = dow - doy + 7;
- // first-week day local weekday -- which local weekday is fwd
- /** @type {?} */
- var fwdlw = (createUTCDate(year, 0, fwd).getUTCDay() - dow + 7) % 7;
- return -fwdlw + fwd - 1;
- }
- // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday
- /**
- * @param {?} year
- * @param {?} week
- * @param {?} weekday
- * @param {?} dow
- * @param {?} doy
- * @return {?}
- */
- function dayOfYearFromWeeks(year, week, weekday, dow, doy) {
- /** @type {?} */
- var localWeekday = (7 + weekday - dow) % 7;
- /** @type {?} */
- var weekOffset = firstWeekOffset(year, dow, doy);
- /** @type {?} */
- var dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset;
- /** @type {?} */
- var resYear;
- /** @type {?} */
- var resDayOfYear;
- if (dayOfYear <= 0) {
- resYear = year - 1;
- resDayOfYear = daysInYear(resYear) + dayOfYear;
- }
- else if (dayOfYear > daysInYear(year)) {
- resYear = year + 1;
- resDayOfYear = dayOfYear - daysInYear(year);
- }
- else {
- resYear = year;
- resDayOfYear = dayOfYear;
- }
- return {
- year: resYear,
- dayOfYear: resDayOfYear
- };
- }
- /**
- * @param {?} date
- * @param {?} dow
- * @param {?} doy
- * @param {?=} isUTC
- * @return {?}
- */
- function weekOfYear(date, dow, doy, isUTC) {
- /** @type {?} */
- var weekOffset = firstWeekOffset(getFullYear(date, isUTC), dow, doy);
- /** @type {?} */
- var week = Math.floor((getDayOfYear(date, isUTC) - weekOffset - 1) / 7) + 1;
- /** @type {?} */
- var resWeek;
- /** @type {?} */
- var resYear;
- if (week < 1) {
- resYear = getFullYear(date, isUTC) - 1;
- resWeek = week + weeksInYear(resYear, dow, doy);
- }
- else if (week > weeksInYear(getFullYear(date, isUTC), dow, doy)) {
- resWeek = week - weeksInYear(getFullYear(date, isUTC), dow, doy);
- resYear = getFullYear(date, isUTC) + 1;
- }
- else {
- resYear = getFullYear(date, isUTC);
- resWeek = week;
- }
- return {
- week: resWeek,
- year: resYear
- };
- }
- /**
- * @param {?} year
- * @param {?} dow
- * @param {?} doy
- * @return {?}
- */
- function weeksInYear(year, dow, doy) {
- /** @type {?} */
- var weekOffset = firstWeekOffset(year, dow, doy);
- /** @type {?} */
- var weekOffsetNext = firstWeekOffset(year + 1, dow, doy);
- return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /** @type {?} */
- var MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/;
- /** @type {?} */
- var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_');
- /** @type {?} */
- var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_');
- /** @type {?} */
- var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_');
- /** @type {?} */
- var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_');
- /** @type {?} */
- var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_');
- /** @type {?} */
- var defaultLongDateFormat = {
- LTS: 'h:mm:ss A',
- LT: 'h:mm A',
- L: 'MM/DD/YYYY',
- LL: 'MMMM D, YYYY',
- LLL: 'MMMM D, YYYY h:mm A',
- LLLL: 'dddd, MMMM D, YYYY h:mm A'
- };
- /** @type {?} */
- var defaultOrdinal = '%d';
- /** @type {?} */
- var defaultDayOfMonthOrdinalParse = /\d{1,2}/;
- /** @type {?} */
- var defaultMonthsShortRegex = matchWord;
- /** @type {?} */
- var defaultMonthsRegex = matchWord;
- var Locale = /** @class */ (function () {
- function Locale(config) {
- if (!!config) {
- this.set(config);
- }
- }
- /**
- * @param {?} config
- * @return {?}
- */
- Locale.prototype.set = /**
- * @param {?} config
- * @return {?}
- */
- function (config) {
- /** @type {?} */
- var confKey;
- for (confKey in config) {
- if (!config.hasOwnProperty(confKey)) {
- continue;
- }
- /** @type {?} */
- var prop = config[(/** @type {?} */ (confKey))];
- /** @type {?} */
- var key = (/** @type {?} */ ((isFunction(prop) ? confKey : "_" + confKey)));
- this[key] = (/** @type {?} */ (prop));
- }
- this._config = config;
- };
- /**
- * @param {?} key
- * @param {?} date
- * @param {?} now
- * @return {?}
- */
- Locale.prototype.calendar = /**
- * @param {?} key
- * @param {?} date
- * @param {?} now
- * @return {?}
- */
- function (key, date, now) {
- /** @type {?} */
- var output = this._calendar[key] || this._calendar.sameElse;
- return isFunction(output) ? output.call(null, date, now) : output;
- };
- /**
- * @param {?} key
- * @return {?}
- */
- Locale.prototype.longDateFormat = /**
- * @param {?} key
- * @return {?}
- */
- function (key) {
- /** @type {?} */
- var format = this._longDateFormat[key];
- /** @type {?} */
- var formatUpper = this._longDateFormat[key.toUpperCase()];
- if (format || !formatUpper) {
- return format;
- }
- this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, (/**
- * @param {?} val
- * @return {?}
- */
- function (val) {
- return val.slice(1);
- }));
- return this._longDateFormat[key];
- };
- Object.defineProperty(Locale.prototype, "invalidDate", {
- get: /**
- * @return {?}
- */
- function () {
- return this._invalidDate;
- },
- set: /**
- * @param {?} val
- * @return {?}
- */
- function (val) {
- this._invalidDate = val;
- },
- enumerable: true,
- configurable: true
- });
- /**
- * @param {?} num
- * @param {?=} token
- * @return {?}
- */
- Locale.prototype.ordinal = /**
- * @param {?} num
- * @param {?=} token
- * @return {?}
- */
- function (num, token) {
- return this._ordinal.replace('%d', num.toString(10));
- };
- /**
- * @param {?} str
- * @return {?}
- */
- Locale.prototype.preparse = /**
- * @param {?} str
- * @return {?}
- */
- function (str) {
- return str;
- };
- /**
- * @param {?} str
- * @return {?}
- */
- Locale.prototype.postformat = /**
- * @param {?} str
- * @return {?}
- */
- function (str) {
- return str;
- };
- /**
- * @param {?} num
- * @param {?} withoutSuffix
- * @param {?} str
- * @param {?} isFuture
- * @return {?}
- */
- Locale.prototype.relativeTime = /**
- * @param {?} num
- * @param {?} withoutSuffix
- * @param {?} str
- * @param {?} isFuture
- * @return {?}
- */
- function (num, withoutSuffix, str, isFuture) {
- /** @type {?} */
- var output = this._relativeTime[str];
- return (isFunction(output)) ?
- output(num, withoutSuffix, str, isFuture) :
- output.replace(/%d/i, num.toString(10));
- };
- /**
- * @param {?} diff
- * @param {?} output
- * @return {?}
- */
- Locale.prototype.pastFuture = /**
- * @param {?} diff
- * @param {?} output
- * @return {?}
- */
- function (diff, output) {
- /** @type {?} */
- var format = this._relativeTime[diff > 0 ? 'future' : 'past'];
- return isFunction(format) ? format(output) : format.replace(/%s/i, output);
- };
- /**
- * @param {?=} date
- * @param {?=} format
- * @param {?=} isUTC
- * @return {?}
- */
- Locale.prototype.months = /**
- * @param {?=} date
- * @param {?=} format
- * @param {?=} isUTC
- * @return {?}
- */
- function (date, format, isUTC) {
- if (isUTC === void 0) { isUTC = false; }
- if (!date) {
- return isArray(this._months)
- ? this._months
- : this._months.standalone;
- }
- if (isArray(this._months)) {
- return this._months[getMonth(date, isUTC)];
- }
- /** @type {?} */
- var key = (this._months.isFormat || MONTHS_IN_FORMAT).test(format)
- ? 'format'
- : 'standalone';
- return this._months[key][getMonth(date, isUTC)];
- };
- /**
- * @param {?=} date
- * @param {?=} format
- * @param {?=} isUTC
- * @return {?}
- */
- Locale.prototype.monthsShort = /**
- * @param {?=} date
- * @param {?=} format
- * @param {?=} isUTC
- * @return {?}
- */
- function (date, format, isUTC) {
- if (isUTC === void 0) { isUTC = false; }
- if (!date) {
- return isArray(this._monthsShort)
- ? this._monthsShort
- : this._monthsShort.standalone;
- }
- if (isArray(this._monthsShort)) {
- return this._monthsShort[getMonth(date, isUTC)];
- }
- /** @type {?} */
- var key = MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone';
- return this._monthsShort[key][getMonth(date, isUTC)];
- };
- /**
- * @param {?} monthName
- * @param {?=} format
- * @param {?=} strict
- * @return {?}
- */
- Locale.prototype.monthsParse = /**
- * @param {?} monthName
- * @param {?=} format
- * @param {?=} strict
- * @return {?}
- */
- function (monthName, format, strict) {
- /** @type {?} */
- var date;
- /** @type {?} */
- var regex;
- if (this._monthsParseExact) {
- return this.handleMonthStrictParse(monthName, format, strict);
- }
- if (!this._monthsParse) {
- this._monthsParse = [];
- this._longMonthsParse = [];
- this._shortMonthsParse = [];
- }
- // TODO: add sorting
- // Sorting makes sure if one month (or abbr) is a prefix of another
- // see sorting in computeMonthsParse
- /** @type {?} */
- var i;
- for (i = 0; i < 12; i++) {
- // make the regex if we don't have it already
- date = new Date(Date.UTC(2000, i));
- if (strict && !this._longMonthsParse[i]) {
- /** @type {?} */
- var _months = this.months(date, '', true).replace('.', '');
- /** @type {?} */
- var _shortMonths = this.monthsShort(date, '', true).replace('.', '');
- this._longMonthsParse[i] = new RegExp("^" + _months + "$", 'i');
- this._shortMonthsParse[i] = new RegExp("^" + _shortMonths + "$", 'i');
- }
- if (!strict && !this._monthsParse[i]) {
- regex = "^" + this.months(date, '', true) + "|^" + this.monthsShort(date, '', true);
- this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');
- }
- // test the regex
- if (strict && format === 'MMMM' && ((/** @type {?} */ (this._longMonthsParse[i]))).test(monthName)) {
- return i;
- }
- if (strict && format === 'MMM' && ((/** @type {?} */ (this._shortMonthsParse[i]))).test(monthName)) {
- return i;
- }
- if (!strict && this._monthsParse[i].test(monthName)) {
- return i;
- }
- }
- };
- /**
- * @param {?} isStrict
- * @return {?}
- */
- Locale.prototype.monthsRegex = /**
- * @param {?} isStrict
- * @return {?}
- */
- function (isStrict) {
- if (this._monthsParseExact) {
- if (!hasOwnProp(this, '_monthsRegex')) {
- this.computeMonthsParse();
- }
- if (isStrict) {
- return this._monthsStrictRegex;
- }
- return this._monthsRegex;
- }
- if (!hasOwnProp(this, '_monthsRegex')) {
- this._monthsRegex = defaultMonthsRegex;
- }
- return this._monthsStrictRegex && isStrict ?
- this._monthsStrictRegex : this._monthsRegex;
- };
- /**
- * @param {?} isStrict
- * @return {?}
- */
- Locale.prototype.monthsShortRegex = /**
- * @param {?} isStrict
- * @return {?}
- */
- function (isStrict) {
- if (this._monthsParseExact) {
- if (!hasOwnProp(this, '_monthsRegex')) {
- this.computeMonthsParse();
- }
- if (isStrict) {
- return this._monthsShortStrictRegex;
- }
- return this._monthsShortRegex;
- }
- if (!hasOwnProp(this, '_monthsShortRegex')) {
- this._monthsShortRegex = defaultMonthsShortRegex;
- }
- return this._monthsShortStrictRegex && isStrict ?
- this._monthsShortStrictRegex : this._monthsShortRegex;
- };
- /** Week */
- /**
- * Week
- * @param {?} date
- * @param {?=} isUTC
- * @return {?}
- */
- Locale.prototype.week = /**
- * Week
- * @param {?} date
- * @param {?=} isUTC
- * @return {?}
- */
- function (date, isUTC) {
- return weekOfYear(date, this._week.dow, this._week.doy, isUTC).week;
- };
- /**
- * @return {?}
- */
- Locale.prototype.firstDayOfWeek = /**
- * @return {?}
- */
- function () {
- return this._week.dow;
- };
- /**
- * @return {?}
- */
- Locale.prototype.firstDayOfYear = /**
- * @return {?}
- */
- function () {
- return this._week.doy;
- };
- /**
- * @param {?=} date
- * @param {?=} format
- * @param {?=} isUTC
- * @return {?}
- */
- Locale.prototype.weekdays = /**
- * @param {?=} date
- * @param {?=} format
- * @param {?=} isUTC
- * @return {?}
- */
- function (date, format, isUTC) {
- if (!date) {
- return isArray(this._weekdays)
- ? this._weekdays
- : this._weekdays.standalone;
- }
- if (isArray(this._weekdays)) {
- return this._weekdays[getDay(date, isUTC)];
- }
- /** @type {?} */
- var _key = this._weekdays.isFormat.test(format)
- ? 'format'
- : 'standalone';
- return this._weekdays[_key][getDay(date, isUTC)];
- };
- /**
- * @param {?=} date
- * @param {?=} format
- * @param {?=} isUTC
- * @return {?}
- */
- Locale.prototype.weekdaysMin = /**
- * @param {?=} date
- * @param {?=} format
- * @param {?=} isUTC
- * @return {?}
- */
- function (date, format, isUTC) {
- return date ? this._weekdaysMin[getDay(date, isUTC)] : this._weekdaysMin;
- };
- /**
- * @param {?=} date
- * @param {?=} format
- * @param {?=} isUTC
- * @return {?}
- */
- Locale.prototype.weekdaysShort = /**
- * @param {?=} date
- * @param {?=} format
- * @param {?=} isUTC
- * @return {?}
- */
- function (date, format, isUTC) {
- return date ? this._weekdaysShort[getDay(date, isUTC)] : this._weekdaysShort;
- };
- // proto.weekdaysParse = localeWeekdaysParse;
- // proto.weekdaysParse = localeWeekdaysParse;
- /**
- * @param {?=} weekdayName
- * @param {?=} format
- * @param {?=} strict
- * @return {?}
- */
- Locale.prototype.weekdaysParse =
- // proto.weekdaysParse = localeWeekdaysParse;
- /**
- * @param {?=} weekdayName
- * @param {?=} format
- * @param {?=} strict
- * @return {?}
- */
- function (weekdayName, format, strict) {
- /** @type {?} */
- var i;
- /** @type {?} */
- var regex;
- if (this._weekdaysParseExact) {
- return this.handleWeekStrictParse(weekdayName, format, strict);
- }
- if (!this._weekdaysParse) {
- this._weekdaysParse = [];
- this._minWeekdaysParse = [];
- this._shortWeekdaysParse = [];
- this._fullWeekdaysParse = [];
- }
- for (i = 0; i < 7; i++) {
- // make the regex if we don't have it already
- // fix: here is the issue
- /** @type {?} */
- var date = setDayOfWeek(new Date(Date.UTC(2000, 1)), i, null, true);
- if (strict && !this._fullWeekdaysParse[i]) {
- this._fullWeekdaysParse[i] = new RegExp("^" + this.weekdays(date, '', true).replace('.', '\.?') + "$", 'i');
- this._shortWeekdaysParse[i] = new RegExp("^" + this.weekdaysShort(date, '', true).replace('.', '\.?') + "$", 'i');
- this._minWeekdaysParse[i] = new RegExp("^" + this.weekdaysMin(date, '', true).replace('.', '\.?') + "$", 'i');
- }
- if (!this._weekdaysParse[i]) {
- regex = "^" + this.weekdays(date, '', true) + "|^" + this.weekdaysShort(date, '', true) + "|^" + this.weekdaysMin(date, '', true);
- this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');
- }
- if (!isArray(this._fullWeekdaysParse)
- || !isArray(this._shortWeekdaysParse)
- || !isArray(this._minWeekdaysParse)
- || !isArray(this._weekdaysParse)) {
- return;
- }
- // test the regex
- if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) {
- return i;
- }
- else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) {
- return i;
- }
- else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) {
- return i;
- }
- else if (!strict && this._weekdaysParse[i].test(weekdayName)) {
- return i;
- }
- }
- };
- // proto.weekdaysRegex = weekdaysRegex;
- // proto.weekdaysRegex = weekdaysRegex;
- /**
- * @param {?} isStrict
- * @return {?}
- */
- Locale.prototype.weekdaysRegex =
- // proto.weekdaysRegex = weekdaysRegex;
- /**
- * @param {?} isStrict
- * @return {?}
- */
- function (isStrict) {
- if (this._weekdaysParseExact) {
- if (!hasOwnProp(this, '_weekdaysRegex')) {
- this.computeWeekdaysParse();
- }
- if (isStrict) {
- return this._weekdaysStrictRegex;
- }
- else {
- return this._weekdaysRegex;
- }
- }
- else {
- if (!hasOwnProp(this, '_weekdaysRegex')) {
- this._weekdaysRegex = matchWord;
- }
- return this._weekdaysStrictRegex && isStrict ?
- this._weekdaysStrictRegex : this._weekdaysRegex;
- }
- };
- // proto.weekdaysShortRegex = weekdaysShortRegex;
- // proto.weekdaysMinRegex = weekdaysMinRegex;
- // proto.weekdaysShortRegex = weekdaysShortRegex;
- // proto.weekdaysMinRegex = weekdaysMinRegex;
- /**
- * @param {?=} isStrict
- * @return {?}
- */
- Locale.prototype.weekdaysShortRegex =
- // proto.weekdaysShortRegex = weekdaysShortRegex;
- // proto.weekdaysMinRegex = weekdaysMinRegex;
- /**
- * @param {?=} isStrict
- * @return {?}
- */
- function (isStrict) {
- if (this._weekdaysParseExact) {
- if (!hasOwnProp(this, '_weekdaysRegex')) {
- this.computeWeekdaysParse();
- }
- if (isStrict) {
- return this._weekdaysShortStrictRegex;
- }
- else {
- return this._weekdaysShortRegex;
- }
- }
- else {
- if (!hasOwnProp(this, '_weekdaysShortRegex')) {
- this._weekdaysShortRegex = matchWord;
- }
- return this._weekdaysShortStrictRegex && isStrict ?
- this._weekdaysShortStrictRegex : this._weekdaysShortRegex;
- }
- };
- /**
- * @param {?=} isStrict
- * @return {?}
- */
- Locale.prototype.weekdaysMinRegex = /**
- * @param {?=} isStrict
- * @return {?}
- */
- function (isStrict) {
- if (this._weekdaysParseExact) {
- if (!hasOwnProp(this, '_weekdaysRegex')) {
- this.computeWeekdaysParse();
- }
- if (isStrict) {
- return this._weekdaysMinStrictRegex;
- }
- else {
- return this._weekdaysMinRegex;
- }
- }
- else {
- if (!hasOwnProp(this, '_weekdaysMinRegex')) {
- this._weekdaysMinRegex = matchWord;
- }
- return this._weekdaysMinStrictRegex && isStrict ?
- this._weekdaysMinStrictRegex : this._weekdaysMinRegex;
- }
- };
- /**
- * @param {?} input
- * @return {?}
- */
- Locale.prototype.isPM = /**
- * @param {?} input
- * @return {?}
- */
- function (input) {
- // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays
- // Using charAt should be more compatible.
- return input.toLowerCase().charAt(0) === 'p';
- };
- /**
- * @param {?} hours
- * @param {?} minutes
- * @param {?} isLower
- * @return {?}
- */
- Locale.prototype.meridiem = /**
- * @param {?} hours
- * @param {?} minutes
- * @param {?} isLower
- * @return {?}
- */
- function (hours, minutes, isLower) {
- if (hours > 11) {
- return isLower ? 'pm' : 'PM';
- }
- return isLower ? 'am' : 'AM';
- };
- /**
- * @param {?} key
- * @return {?}
- */
- Locale.prototype.formatLongDate = /**
- * @param {?} key
- * @return {?}
- */
- function (key) {
- this._longDateFormat = this._longDateFormat ? this._longDateFormat : defaultLongDateFormat;
- /** @type {?} */
- var format = this._longDateFormat[key];
- /** @type {?} */
- var formatUpper = this._longDateFormat[key.toUpperCase()];
- if (format || !formatUpper) {
- return format;
- }
- this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, (/**
- * @param {?} val
- * @return {?}
- */
- function (val) {
- return val.slice(1);
- }));
- return this._longDateFormat[key];
- };
- /**
- * @private
- * @param {?} monthName
- * @param {?} format
- * @param {?=} strict
- * @return {?}
- */
- Locale.prototype.handleMonthStrictParse = /**
- * @private
- * @param {?} monthName
- * @param {?} format
- * @param {?=} strict
- * @return {?}
- */
- function (monthName, format, strict) {
- /** @type {?} */
- var llc = monthName.toLocaleLowerCase();
- /** @type {?} */
- var i;
- /** @type {?} */
- var ii;
- /** @type {?} */
- var mom;
- if (!this._monthsParse) {
- // this is not used
- this._monthsParse = [];
- this._longMonthsParse = [];
- this._shortMonthsParse = [];
- for (i = 0; i < 12; ++i) {
- mom = new Date(2000, i);
- this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase();
- this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();
- }
- }
- if (strict) {
- if (format === 'MMM') {
- ii = ((/** @type {?} */ (this._shortMonthsParse))).indexOf(llc);
- return ii !== -1 ? ii : null;
- }
- ii = ((/** @type {?} */ (this._longMonthsParse))).indexOf(llc);
- return ii !== -1 ? ii : null;
- }
- if (format === 'MMM') {
- ii = ((/** @type {?} */ (this._shortMonthsParse))).indexOf(llc);
- if (ii !== -1) {
- return ii;
- }
- ii = ((/** @type {?} */ (this._longMonthsParse))).indexOf(llc);
- return ii !== -1 ? ii : null;
- }
- ii = ((/** @type {?} */ (this._longMonthsParse))).indexOf(llc);
- if (ii !== -1) {
- return ii;
- }
- ii = ((/** @type {?} */ (this._shortMonthsParse))).indexOf(llc);
- return ii !== -1 ? ii : null;
- };
- /**
- * @private
- * @param {?} weekdayName
- * @param {?} format
- * @param {?} strict
- * @return {?}
- */
- Locale.prototype.handleWeekStrictParse = /**
- * @private
- * @param {?} weekdayName
- * @param {?} format
- * @param {?} strict
- * @return {?}
- */
- function (weekdayName, format, strict) {
- /** @type {?} */
- var ii;
- /** @type {?} */
- var llc = weekdayName.toLocaleLowerCase();
- if (!this._weekdaysParse) {
- this._weekdaysParse = [];
- this._shortWeekdaysParse = [];
- this._minWeekdaysParse = [];
- /** @type {?} */
- var i = void 0;
- for (i = 0; i < 7; ++i) {
- /** @type {?} */
- var date = setDayOfWeek(new Date(Date.UTC(2000, 1)), i, null, true);
- this._minWeekdaysParse[i] = this.weekdaysMin(date).toLocaleLowerCase();
- this._shortWeekdaysParse[i] = this.weekdaysShort(date).toLocaleLowerCase();
- this._weekdaysParse[i] = this.weekdays(date, '').toLocaleLowerCase();
- }
- }
- if (!isArray(this._weekdaysParse)
- || !isArray(this._shortWeekdaysParse)
- || !isArray(this._minWeekdaysParse)) {
- return;
- }
- if (strict) {
- if (format === 'dddd') {
- ii = this._weekdaysParse.indexOf(llc);
- return ii !== -1 ? ii : null;
- }
- else if (format === 'ddd') {
- ii = this._shortWeekdaysParse.indexOf(llc);
- return ii !== -1 ? ii : null;
- }
- else {
- ii = this._minWeekdaysParse.indexOf(llc);
- return ii !== -1 ? ii : null;
- }
- }
- else {
- if (format === 'dddd') {
- ii = this._weekdaysParse.indexOf(llc);
- if (ii !== -1) {
- return ii;
- }
- ii = this._shortWeekdaysParse.indexOf(llc);
- if (ii !== -1) {
- return ii;
- }
- ii = this._minWeekdaysParse.indexOf(llc);
- return ii !== -1 ? ii : null;
- }
- else if (format === 'ddd') {
- ii = this._shortWeekdaysParse.indexOf(llc);
- if (ii !== -1) {
- return ii;
- }
- ii = this._weekdaysParse.indexOf(llc);
- if (ii !== -1) {
- return ii;
- }
- ii = this._minWeekdaysParse.indexOf(llc);
- return ii !== -1 ? ii : null;
- }
- else {
- ii = this._minWeekdaysParse.indexOf(llc);
- if (ii !== -1) {
- return ii;
- }
- ii = this._weekdaysParse.indexOf(llc);
- if (ii !== -1) {
- return ii;
- }
- ii = this._shortWeekdaysParse.indexOf(llc);
- return ii !== -1 ? ii : null;
- }
- }
- };
- /**
- * @private
- * @return {?}
- */
- Locale.prototype.computeMonthsParse = /**
- * @private
- * @return {?}
- */
- function () {
- /** @type {?} */
- var shortPieces = [];
- /** @type {?} */
- var longPieces = [];
- /** @type {?} */
- var mixedPieces = [];
- /** @type {?} */
- var date;
- /** @type {?} */
- var i;
- for (i = 0; i < 12; i++) {
- // make the regex if we don't have it already
- date = new Date(2000, i);
- shortPieces.push(this.monthsShort(date, ''));
- longPieces.push(this.months(date, ''));
- mixedPieces.push(this.months(date, ''));
- mixedPieces.push(this.monthsShort(date, ''));
- }
- // Sorting makes sure if one month (or abbr) is a prefix of another it
- // will match the longer piece.
- shortPieces.sort(cmpLenRev);
- longPieces.sort(cmpLenRev);
- mixedPieces.sort(cmpLenRev);
- for (i = 0; i < 12; i++) {
- shortPieces[i] = regexEscape(shortPieces[i]);
- longPieces[i] = regexEscape(longPieces[i]);
- }
- for (i = 0; i < 24; i++) {
- mixedPieces[i] = regexEscape(mixedPieces[i]);
- }
- this._monthsRegex = new RegExp("^(" + mixedPieces.join('|') + ")", 'i');
- this._monthsShortRegex = this._monthsRegex;
- this._monthsStrictRegex = new RegExp("^(" + longPieces.join('|') + ")", 'i');
- this._monthsShortStrictRegex = new RegExp("^(" + shortPieces.join('|') + ")", 'i');
- };
- /**
- * @private
- * @return {?}
- */
- Locale.prototype.computeWeekdaysParse = /**
- * @private
- * @return {?}
- */
- function () {
- /** @type {?} */
- var minPieces = [];
- /** @type {?} */
- var shortPieces = [];
- /** @type {?} */
- var longPieces = [];
- /** @type {?} */
- var mixedPieces = [];
- /** @type {?} */
- var i;
- for (i = 0; i < 7; i++) {
- // make the regex if we don't have it already
- // let mom = createUTC([2000, 1]).day(i);
- /** @type {?} */
- var date = setDayOfWeek(new Date(Date.UTC(2000, 1)), i, null, true);
- /** @type {?} */
- var minp = this.weekdaysMin(date);
- /** @type {?} */
- var shortp = this.weekdaysShort(date);
- /** @type {?} */
- var longp = this.weekdays(date);
- minPieces.push(minp);
- shortPieces.push(shortp);
- longPieces.push(longp);
- mixedPieces.push(minp);
- mixedPieces.push(shortp);
- mixedPieces.push(longp);
- }
- // Sorting makes sure if one weekday (or abbr) is a prefix of another it
- // will match the longer piece.
- minPieces.sort(cmpLenRev);
- shortPieces.sort(cmpLenRev);
- longPieces.sort(cmpLenRev);
- mixedPieces.sort(cmpLenRev);
- for (i = 0; i < 7; i++) {
- shortPieces[i] = regexEscape(shortPieces[i]);
- longPieces[i] = regexEscape(longPieces[i]);
- mixedPieces[i] = regexEscape(mixedPieces[i]);
- }
- this._weekdaysRegex = new RegExp("^(" + mixedPieces.join('|') + ")", 'i');
- this._weekdaysShortRegex = this._weekdaysRegex;
- this._weekdaysMinRegex = this._weekdaysRegex;
- this._weekdaysStrictRegex = new RegExp("^(" + longPieces.join('|') + ")", 'i');
- this._weekdaysShortStrictRegex = new RegExp("^(" + shortPieces.join('|') + ")", 'i');
- this._weekdaysMinStrictRegex = new RegExp("^(" + minPieces.join('|') + ")", 'i');
- };
- return Locale;
- }());
- /**
- * @param {?} a
- * @param {?} b
- * @return {?}
- */
- function cmpLenRev(a, b) {
- return b.length - a.length;
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /** @type {?} */
- var defaultCalendar = {
- sameDay: '[Today at] LT',
- nextDay: '[Tomorrow at] LT',
- nextWeek: 'dddd [at] LT',
- lastDay: '[Yesterday at] LT',
- lastWeek: '[Last] dddd [at] LT',
- sameElse: 'L'
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /** @type {?} */
- var defaultInvalidDate = 'Invalid date';
- /** @type {?} */
- var defaultLocaleWeek = {
- dow: 0,
- // Sunday is the first day of the week.
- doy: 6 // The week that contains Jan 1st is the first week of the year.
- };
- /** @type {?} */
- var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i;
- /** @type {?} */
- var defaultRelativeTime = {
- future: 'in %s',
- past: '%s ago',
- s: 'a few seconds',
- ss: '%d seconds',
- m: 'a minute',
- mm: '%d minutes',
- h: 'an hour',
- hh: '%d hours',
- d: 'a day',
- dd: '%d days',
- M: 'a month',
- MM: '%d months',
- y: 'a year',
- yy: '%d years'
- };
- /** @type {?} */
- var baseConfig = {
- calendar: defaultCalendar,
- longDateFormat: defaultLongDateFormat,
- invalidDate: defaultInvalidDate,
- ordinal: defaultOrdinal,
- dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,
- relativeTime: defaultRelativeTime,
- months: defaultLocaleMonths,
- monthsShort: defaultLocaleMonthsShort,
- week: defaultLocaleWeek,
- weekdays: defaultLocaleWeekdays,
- weekdaysMin: defaultLocaleWeekdaysMin,
- weekdaysShort: defaultLocaleWeekdaysShort,
- meridiemParse: defaultLocaleMeridiemParse
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /**
- * @template T
- * @param {?} array1
- * @param {?} array2
- * @param {?} dontConvert
- * @return {?}
- */
- function compareArrays(array1, array2, dontConvert) {
- /** @type {?} */
- var len = Math.min(array1.length, array2.length);
- /** @type {?} */
- var lengthDiff = Math.abs(array1.length - array2.length);
- /** @type {?} */
- var diffs = 0;
- /** @type {?} */
- var i;
- for (i = 0; i < len; i++) {
- if ((dontConvert && array1[i] !== array2[i])
- || (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {
- diffs++;
- }
- }
- return diffs + lengthDiff;
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // FORMATTING
- /**
- * @return {?}
- */
- function initWeek() {
- addFormatToken('w', ['ww', 2, false], 'wo', (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- return getWeek(date, opts.locale)
- .toString(10);
- }));
- addFormatToken('W', ['WW', 2, false], 'Wo', (/**
- * @param {?} date
- * @return {?}
- */
- function (date) {
- return getISOWeek(date)
- .toString(10);
- }));
- // ALIASES
- addUnitAlias('week', 'w');
- addUnitAlias('isoWeek', 'W');
- // PARSING
- addRegexToken('w', match1to2);
- addRegexToken('ww', match1to2, match2);
- addRegexToken('W', match1to2);
- addRegexToken('WW', match1to2, match2);
- addWeekParseToken(['w', 'ww', 'W', 'WW'], (/**
- * @param {?} input
- * @param {?} week
- * @param {?} config
- * @param {?} token
- * @return {?}
- */
- function (input, week, config, token) {
- week[token.substr(0, 1)] = toInt(input);
- return config;
- }));
- // export function getSetWeek (input) {
- // var week = this.localeData().week(this);
- // return input == null ? week : this.add((input - week) * 7, 'd');
- // }
- }
- /**
- * @param {?} date
- * @param {?=} locale
- * @param {?=} isUTC
- * @return {?}
- */
- function getWeek(date, locale, isUTC) {
- if (locale === void 0) { locale = getLocale(); }
- return locale.week(date, isUTC);
- }
- /**
- * @param {?} date
- * @param {?=} isUTC
- * @return {?}
- */
- function getISOWeek(date, isUTC) {
- return weekOfYear(date, 1, 4, isUTC).week;
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // FORMATTING
- /**
- * @return {?}
- */
- function initWeekYear() {
- addFormatToken(null, ['gg', 2, false], null, (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- // return this.weekYear() % 100;
- return (getWeekYear(date, opts.locale) % 100).toString();
- }));
- addFormatToken(null, ['GG', 2, false], null, (/**
- * @param {?} date
- * @return {?}
- */
- function (date) {
- // return this.isoWeekYear() % 100;
- return (getISOWeekYear(date) % 100).toString();
- }));
- addWeekYearFormatToken('gggg', _getWeekYearFormatCb);
- addWeekYearFormatToken('ggggg', _getWeekYearFormatCb);
- addWeekYearFormatToken('GGGG', _getISOWeekYearFormatCb);
- addWeekYearFormatToken('GGGGG', _getISOWeekYearFormatCb);
- // ALIASES
- addUnitAlias('weekYear', 'gg');
- addUnitAlias('isoWeekYear', 'GG');
- // PARSING
- addRegexToken('G', matchSigned);
- addRegexToken('g', matchSigned);
- addRegexToken('GG', match1to2, match2);
- addRegexToken('gg', match1to2, match2);
- addRegexToken('GGGG', match1to4, match4);
- addRegexToken('gggg', match1to4, match4);
- addRegexToken('GGGGG', match1to6, match6);
- addRegexToken('ggggg', match1to6, match6);
- addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], (/**
- * @param {?} input
- * @param {?} week
- * @param {?} config
- * @param {?} token
- * @return {?}
- */
- function (input, week, config, token) {
- week[token.substr(0, 2)] = toInt(input);
- return config;
- }));
- addWeekParseToken(['gg', 'GG'], (/**
- * @param {?} input
- * @param {?} week
- * @param {?} config
- * @param {?} token
- * @return {?}
- */
- function (input, week, config, token) {
- week[token] = parseTwoDigitYear(input);
- return config;
- }));
- }
- /**
- * @param {?} token
- * @param {?} getter
- * @return {?}
- */
- function addWeekYearFormatToken(token, getter) {
- addFormatToken(null, [token, token.length, false], null, getter);
- }
- /**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function _getWeekYearFormatCb(date, opts) {
- return getWeekYear(date, opts.locale).toString();
- }
- /**
- * @param {?} date
- * @return {?}
- */
- function _getISOWeekYearFormatCb(date) {
- return getISOWeekYear(date).toString();
- }
- /**
- * @param {?} date
- * @param {?=} locale
- * @param {?=} isUTC
- * @return {?}
- */
- function getWeekYear(date, locale, isUTC) {
- if (locale === void 0) { locale = getLocale(); }
- return weekOfYear(date, locale.firstDayOfWeek(), locale.firstDayOfYear(), isUTC).year;
- }
- /**
- * @param {?} date
- * @param {?=} isUTC
- * @return {?}
- */
- function getISOWeekYear(date, isUTC) {
- return weekOfYear(date, 1, 4, isUTC).year;
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // todo: add support for timezones
- /**
- * @return {?}
- */
- function initTimezone() {
- // FORMATTING
- addFormatToken('z', null, null, (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- return opts.isUTC ? 'UTC' : '';
- }));
- addFormatToken('zz', null, null, (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- return opts.isUTC ? 'Coordinated Universal Time' : '';
- }));
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /**
- * @return {?}
- */
- function initTimestamp() {
- // FORMATTING
- addFormatToken('X', null, null, (/**
- * @param {?} date
- * @return {?}
- */
- function (date) {
- return unix(date)
- .toString(10);
- }));
- addFormatToken('x', null, null, (/**
- * @param {?} date
- * @return {?}
- */
- function (date) {
- return date.valueOf()
- .toString(10);
- }));
- // PARSING
- addRegexToken('x', matchSigned);
- addRegexToken('X', matchTimestamp);
- addParseToken('X', (/**
- * @param {?} input
- * @param {?} array
- * @param {?} config
- * @return {?}
- */
- function (input, array, config) {
- config._d = new Date(parseFloat(input) * 1000);
- return config;
- }));
- addParseToken('x', (/**
- * @param {?} input
- * @param {?} array
- * @param {?} config
- * @return {?}
- */
- function (input, array, config) {
- config._d = new Date(toInt(input));
- return config;
- }));
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /**
- * @return {?}
- */
- function initSecond() {
- // FORMATTING
- addFormatToken('s', ['ss', 2, false], null, (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- return getSeconds(date, opts.isUTC)
- .toString(10);
- }));
- // ALIASES
- addUnitAlias('second', 's');
- // PARSING
- addRegexToken('s', match1to2);
- addRegexToken('ss', match1to2, match2);
- addParseToken(['s', 'ss'], SECOND);
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /**
- * @return {?}
- */
- function initQuarter() {
- // FORMATTING
- addFormatToken('Q', null, 'Qo', (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- return getQuarter(date, opts.isUTC)
- .toString(10);
- }));
- // ALIASES
- addUnitAlias('quarter', 'Q');
- // PARSING
- addRegexToken('Q', match1);
- addParseToken('Q', (/**
- * @param {?} input
- * @param {?} array
- * @param {?} config
- * @return {?}
- */
- function (input, array, config) {
- array[MONTH] = (toInt(input) - 1) * 3;
- return config;
- }));
- }
- // MOMENTS
- /**
- * @param {?} date
- * @param {?=} isUTC
- * @return {?}
- */
- function getQuarter(date, isUTC) {
- if (isUTC === void 0) { isUTC = false; }
- return Math.ceil((getMonth(date, isUTC) + 1) / 3);
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /**
- * @param {?} token
- * @param {?} separator
- * @return {?}
- */
- function addOffsetFormatToken(token, separator) {
- addFormatToken(token, null, null, (/**
- * @param {?} date
- * @param {?} config
- * @return {?}
- */
- function (date, config) {
- /** @type {?} */
- var offset = getUTCOffset(date, { _isUTC: config.isUTC, _offset: config.offset });
- /** @type {?} */
- var sign = '+';
- if (offset < 0) {
- offset = -offset;
- sign = '-';
- }
- return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~(offset) % 60, 2);
- }));
- }
- /**
- * @return {?}
- */
- function initOffset() {
- addOffsetFormatToken('Z', ':');
- addOffsetFormatToken('ZZ', '');
- // PARSING
- addRegexToken('Z', matchShortOffset);
- addRegexToken('ZZ', matchShortOffset);
- addParseToken(['Z', 'ZZ'], (/**
- * @param {?} input
- * @param {?} array
- * @param {?} config
- * @return {?}
- */
- function (input, array, config) {
- config._useUTC = true;
- config._tzm = offsetFromString(matchShortOffset, input);
- return config;
- }));
- }
- // HELPERS
- // timezone chunker
- // '+10:00' > ['10', '00']
- // '-1530' > ['-15', '30']
- /** @type {?} */
- var chunkOffset = /([\+\-]|\d\d)/gi;
- /**
- * @param {?} matcher
- * @param {?} str
- * @return {?}
- */
- function offsetFromString(matcher, str) {
- /** @type {?} */
- var matches = (str || '').match(matcher);
- if (matches === null) {
- return null;
- }
- /** @type {?} */
- var chunk = matches[matches.length - 1];
- /** @type {?} */
- var parts = chunk.match(chunkOffset) || ['-', '0', '0'];
- /** @type {?} */
- var minutes = parseInt(parts[1], 10) * 60 + toInt(parts[2]);
- /** @type {?} */
- var _min = parts[0] === '+' ? minutes : -minutes;
- return minutes === 0 ? 0 : _min;
- }
- // Return a moment from input, that is local/utc/zone equivalent to model.
- /**
- * @param {?} input
- * @param {?} date
- * @param {?=} config
- * @return {?}
- */
- function cloneWithOffset(input, date, config) {
- if (config === void 0) { config = {}; }
- if (!config._isUTC) {
- return input;
- }
- /** @type {?} */
- var res = cloneDate(date);
- // todo: input._d - res._d + ((res._offset || 0) - (input._offset || 0))*60000
- /** @type {?} */
- var offsetDiff = (config._offset || 0) * 60000;
- /** @type {?} */
- var diff = input.valueOf() - res.valueOf() + offsetDiff;
- // Use low-level api, because this fn is low-level api.
- res.setTime(res.valueOf() + diff);
- // todo: add timezone handling
- // hooks.updateOffset(res, false);
- return res;
- }
- /**
- * @param {?} date
- * @return {?}
- */
- function getDateOffset(date) {
- // On Firefox.24 Date#getTimezoneOffset returns a floating point.
- // https://github.com/moment/moment/pull/1871
- return -Math.round(date.getTimezoneOffset() / 15) * 15;
- }
- // HOOKS
- // This function will be called whenever a moment is mutated.
- // It is intended to keep the offset in sync with the timezone.
- // todo: it's from moment timezones
- // hooks.updateOffset = function () {
- // };
- // MOMENTS
- // keepLocalTime = true means only change the timezone, without
- // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->
- // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset
- // +0200, so we adjust the time as needed, to be valid.
- //
- // Keeping the time actually adds/subtracts (one hour)
- // from the actual represented time. That is why we call updateOffset
- // a second time. In case it wants us to change the offset again
- // _changeInProgress == true case, then we have to adjust, because
- // there is no such time in the given timezone.
- /**
- * @param {?} date
- * @param {?=} config
- * @return {?}
- */
- function getUTCOffset(date, config) {
- if (config === void 0) { config = {}; }
- /** @type {?} */
- var _offset = config._offset || 0;
- return config._isUTC ? _offset : getDateOffset(date);
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /**
- * @return {?}
- */
- function initMinute() {
- // FORMATTING
- addFormatToken('m', ['mm', 2, false], null, (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- return getMinutes(date, opts.isUTC)
- .toString(10);
- }));
- // ALIASES
- addUnitAlias('minute', 'm');
- // PARSING
- addRegexToken('m', match1to2);
- addRegexToken('mm', match1to2, match2);
- addParseToken(['m', 'mm'], MINUTE);
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /**
- * @return {?}
- */
- function initMillisecond() {
- addFormatToken('S', null, null, (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- return (~~(getMilliseconds(date, opts.isUTC) / 100)).toString(10);
- }));
- addFormatToken(null, ['SS', 2, false], null, (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- return (~~(getMilliseconds(date, opts.isUTC) / 10)).toString(10);
- }));
- addFormatToken(null, ['SSS', 3, false], null, (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- return (getMilliseconds(date, opts.isUTC)).toString(10);
- }));
- addFormatToken(null, ['SSSS', 4, false], null, (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- return (getMilliseconds(date, opts.isUTC) * 10).toString(10);
- }));
- addFormatToken(null, ['SSSSS', 5, false], null, (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- return (getMilliseconds(date, opts.isUTC) * 100).toString(10);
- }));
- addFormatToken(null, ['SSSSSS', 6, false], null, (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- return (getMilliseconds(date, opts.isUTC) * 1000).toString(10);
- }));
- addFormatToken(null, ['SSSSSSS', 7, false], null, (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- return (getMilliseconds(date, opts.isUTC) * 10000).toString(10);
- }));
- addFormatToken(null, ['SSSSSSSS', 8, false], null, (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- return (getMilliseconds(date, opts.isUTC) * 100000).toString(10);
- }));
- addFormatToken(null, ['SSSSSSSSS', 9, false], null, (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- return (getMilliseconds(date, opts.isUTC) * 1000000).toString(10);
- }));
- // ALIASES
- addUnitAlias('millisecond', 'ms');
- // PARSING
- addRegexToken('S', match1to3, match1);
- addRegexToken('SS', match1to3, match2);
- addRegexToken('SSS', match1to3, match3);
- /** @type {?} */
- var token;
- for (token = 'SSSS'; token.length <= 9; token += 'S') {
- addRegexToken(token, matchUnsigned);
- }
- /**
- * @param {?} input
- * @param {?} array
- * @param {?} config
- * @return {?}
- */
- function parseMs(input, array, config) {
- array[MILLISECOND] = toInt(parseFloat("0." + input) * 1000);
- return config;
- }
- for (token = 'S'; token.length <= 9; token += 'S') {
- addParseToken(token, parseMs);
- }
- // MOMENTS
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /**
- * @return {?}
- */
- function initHour() {
- // FORMATTING
- // FORMATTING
- /**
- * @param {?} date
- * @param {?} isUTC
- * @return {?}
- */
- function hFormat(date, isUTC) {
- return getHours(date, isUTC) % 12 || 12;
- }
- /**
- * @param {?} date
- * @param {?} isUTC
- * @return {?}
- */
- function kFormat(date, isUTC) {
- return getHours(date, isUTC) || 24;
- }
- addFormatToken('H', ['HH', 2, false], null, (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- return getHours(date, opts.isUTC)
- .toString(10);
- }));
- addFormatToken('h', ['hh', 2, false], null, (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- return hFormat(date, opts.isUTC)
- .toString(10);
- }));
- addFormatToken('k', ['kk', 2, false], null, (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- return kFormat(date, opts.isUTC)
- .toString(10);
- }));
- addFormatToken('hmm', null, null, (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- /** @type {?} */
- var _h = hFormat(date, opts.isUTC);
- /** @type {?} */
- var _mm = zeroFill(getMinutes(date, opts.isUTC), 2);
- return "" + _h + _mm;
- }));
- addFormatToken('hmmss', null, null, (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- /** @type {?} */
- var _h = hFormat(date, opts.isUTC);
- /** @type {?} */
- var _mm = zeroFill(getMinutes(date, opts.isUTC), 2);
- /** @type {?} */
- var _ss = zeroFill(getSeconds(date, opts.isUTC), 2);
- return "" + _h + _mm + _ss;
- }));
- addFormatToken('Hmm', null, null, (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- /** @type {?} */
- var _H = getHours(date, opts.isUTC);
- /** @type {?} */
- var _mm = zeroFill(getMinutes(date, opts.isUTC), 2);
- return "" + _H + _mm;
- }));
- addFormatToken('Hmmss', null, null, (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- /** @type {?} */
- var _H = getHours(date, opts.isUTC);
- /** @type {?} */
- var _mm = zeroFill(getMinutes(date, opts.isUTC), 2);
- /** @type {?} */
- var _ss = zeroFill(getSeconds(date, opts.isUTC), 2);
- return "" + _H + _mm + _ss;
- }));
- /**
- * @param {?} token
- * @param {?} lowercase
- * @return {?}
- */
- function meridiem(token, lowercase) {
- addFormatToken(token, null, null, (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- return opts.locale.meridiem(getHours(date, opts.isUTC), getMinutes(date, opts.isUTC), lowercase);
- }));
- }
- meridiem('a', true);
- meridiem('A', false);
- // ALIASES
- addUnitAlias('hour', 'h');
- // PARSING
- /**
- * @param {?} isStrict
- * @param {?} locale
- * @return {?}
- */
- function matchMeridiem(isStrict, locale) {
- return locale._meridiemParse;
- }
- addRegexToken('a', matchMeridiem);
- addRegexToken('A', matchMeridiem);
- addRegexToken('H', match1to2);
- addRegexToken('h', match1to2);
- addRegexToken('k', match1to2);
- addRegexToken('HH', match1to2, match2);
- addRegexToken('hh', match1to2, match2);
- addRegexToken('kk', match1to2, match2);
- addRegexToken('hmm', match3to4);
- addRegexToken('hmmss', match5to6);
- addRegexToken('Hmm', match3to4);
- addRegexToken('Hmmss', match5to6);
- addParseToken(['H', 'HH'], HOUR);
- addParseToken(['k', 'kk'], (/**
- * @param {?} input
- * @param {?} array
- * @param {?} config
- * @return {?}
- */
- function (input, array, config) {
- /** @type {?} */
- var kInput = toInt(input);
- array[HOUR] = kInput === 24 ? 0 : kInput;
- return config;
- }));
- addParseToken(['a', 'A'], (/**
- * @param {?} input
- * @param {?} array
- * @param {?} config
- * @return {?}
- */
- function (input, array, config) {
- config._isPm = config._locale.isPM(input);
- config._meridiem = input;
- return config;
- }));
- addParseToken(['h', 'hh'], (/**
- * @param {?} input
- * @param {?} array
- * @param {?} config
- * @return {?}
- */
- function (input, array, config) {
- array[HOUR] = toInt(input);
- getParsingFlags(config).bigHour = true;
- return config;
- }));
- addParseToken('hmm', (/**
- * @param {?} input
- * @param {?} array
- * @param {?} config
- * @return {?}
- */
- function (input, array, config) {
- /** @type {?} */
- var pos = input.length - 2;
- array[HOUR] = toInt(input.substr(0, pos));
- array[MINUTE] = toInt(input.substr(pos));
- getParsingFlags(config).bigHour = true;
- return config;
- }));
- addParseToken('hmmss', (/**
- * @param {?} input
- * @param {?} array
- * @param {?} config
- * @return {?}
- */
- function (input, array, config) {
- /** @type {?} */
- var pos1 = input.length - 4;
- /** @type {?} */
- var pos2 = input.length - 2;
- array[HOUR] = toInt(input.substr(0, pos1));
- array[MINUTE] = toInt(input.substr(pos1, 2));
- array[SECOND] = toInt(input.substr(pos2));
- getParsingFlags(config).bigHour = true;
- return config;
- }));
- addParseToken('Hmm', (/**
- * @param {?} input
- * @param {?} array
- * @param {?} config
- * @return {?}
- */
- function (input, array, config) {
- /** @type {?} */
- var pos = input.length - 2;
- array[HOUR] = toInt(input.substr(0, pos));
- array[MINUTE] = toInt(input.substr(pos));
- return config;
- }));
- addParseToken('Hmmss', (/**
- * @param {?} input
- * @param {?} array
- * @param {?} config
- * @return {?}
- */
- function (input, array, config) {
- /** @type {?} */
- var pos1 = input.length - 4;
- /** @type {?} */
- var pos2 = input.length - 2;
- array[HOUR] = toInt(input.substr(0, pos1));
- array[MINUTE] = toInt(input.substr(pos1, 2));
- array[SECOND] = toInt(input.substr(pos2));
- return config;
- }));
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /** @type {?} */
- var locales = {};
- /** @type {?} */
- var localeFamilies = {};
- /** @type {?} */
- var globalLocale;
- /**
- * @param {?} key
- * @return {?}
- */
- function normalizeLocale(key) {
- return key ? key.toLowerCase().replace('_', '-') : key;
- }
- // pick the locale from the array
- // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each
- // substring from most specific to least,
- // but move to the next array item if it's a more specific variant than the current root
- /**
- * @param {?} names
- * @return {?}
- */
- function chooseLocale(names) {
- /** @type {?} */
- var next;
- /** @type {?} */
- var locale;
- /** @type {?} */
- var i = 0;
- while (i < names.length) {
- /** @type {?} */
- var split = normalizeLocale(names[i]).split('-');
- /** @type {?} */
- var j = split.length;
- next = normalizeLocale(names[i + 1]);
- next = next ? next.split('-') : null;
- while (j > 0) {
- locale = loadLocale(split.slice(0, j).join('-'));
- if (locale) {
- return locale;
- }
- if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {
- // the next array item is better than a shallower substring of this one
- break;
- }
- j--;
- }
- i++;
- }
- return null;
- }
- /**
- * @param {?} parentConfig
- * @param {?} childConfig
- * @return {?}
- */
- function mergeConfigs(parentConfig, childConfig) {
- /** @type {?} */
- var res = Object.assign({}, parentConfig);
- for (var childProp in childConfig) {
- if (!hasOwnProp(childConfig, childProp)) {
- continue;
- }
- if (isObject(parentConfig[childProp]) && isObject(childConfig[childProp])) {
- res[(/** @type {?} */ (childProp))] = {};
- Object.assign(res[childProp], parentConfig[childProp]);
- Object.assign(res[childProp], childConfig[childProp]);
- }
- else if (childConfig[childProp] != null) {
- res[(/** @type {?} */ (childProp))] = childConfig[childProp];
- }
- else {
- delete res[(/** @type {?} */ (childProp))];
- }
- }
- for (var parentProp in parentConfig) {
- if (hasOwnProp(parentConfig, parentProp) &&
- !hasOwnProp(childConfig, parentProp) &&
- isObject(parentConfig[(/** @type {?} */ (parentProp))])) {
- // make sure changes to properties don't modify parent config
- res[(/** @type {?} */ (parentProp))] = Object.assign({}, res[(/** @type {?} */ (parentProp))]);
- }
- }
- return res;
- }
- /**
- * @param {?} name
- * @return {?}
- */
- function loadLocale(name) {
- // no way!
- /* var oldLocale = null;
- // TODO: Find a better way to register and load all the locales in Node
- if (!locales[name] && (typeof module !== 'undefined') &&
- module && module.exports) {
- try {
- oldLocale = globalLocale._abbr;
- var aliasedRequire = require;
- aliasedRequire('./locale/' + name);
- getSetGlobalLocale(oldLocale);
- } catch (e) {}
- }*/
- if (!locales[name]) {
- // tslint:disable-next-line
- console.error("Khronos locale error: please load locale \"" + name + "\" before using it");
- // throw new Error(`Khronos locale error: please load locale "${name}" before using it`);
- }
- return locales[name];
- }
- // This function will load locale and then set the global locale. If
- // no arguments are passed in, it will simply return the current global
- // locale key.
- /**
- * @param {?=} key
- * @param {?=} values
- * @return {?}
- */
- function getSetGlobalLocale(key, values) {
- /** @type {?} */
- var data;
- if (key) {
- if (isUndefined(values)) {
- data = getLocale(key);
- }
- else if (isString(key)) {
- data = defineLocale(key, values);
- }
- if (data) {
- globalLocale = data;
- }
- }
- return globalLocale && globalLocale._abbr;
- }
- /**
- * @param {?} name
- * @param {?=} config
- * @return {?}
- */
- function defineLocale(name, config) {
- if (config === null) {
- // useful for testing
- delete locales[name];
- globalLocale = getLocale('en');
- return null;
- }
- if (!config) {
- return;
- }
- /** @type {?} */
- var parentConfig = baseConfig;
- config.abbr = name;
- if (config.parentLocale != null) {
- if (locales[config.parentLocale] != null) {
- parentConfig = locales[config.parentLocale]._config;
- }
- else {
- if (!localeFamilies[config.parentLocale]) {
- localeFamilies[config.parentLocale] = [];
- }
- localeFamilies[config.parentLocale].push({ name: name, config: config });
- return null;
- }
- }
- locales[name] = new Locale(mergeConfigs(parentConfig, config));
- if (localeFamilies[name]) {
- localeFamilies[name].forEach((/**
- * @param {?} x
- * @return {?}
- */
- function (x) {
- defineLocale(x.name, x.config);
- }));
- }
- // backwards compat for now: also set the locale
- // make sure we set the locale AFTER all child locales have been
- // created, so we won't end up with the child locale set.
- getSetGlobalLocale(name);
- return locales[name];
- }
- /**
- * @param {?} name
- * @param {?=} config
- * @return {?}
- */
- function updateLocale(name, config) {
- /** @type {?} */
- var _config = config;
- if (_config != null) {
- /** @type {?} */
- var parentConfig = baseConfig;
- // MERGE
- /** @type {?} */
- var tmpLocale = loadLocale(name);
- if (tmpLocale != null) {
- parentConfig = tmpLocale._config;
- }
- _config = mergeConfigs(parentConfig, _config);
- /** @type {?} */
- var locale = new Locale(_config);
- locale.parentLocale = locales[name];
- locales[name] = locale;
- // backwards compat for now: also set the locale
- getSetGlobalLocale(name);
- }
- else {
- // pass null for config to unupdate, useful for tests
- if (locales[name] != null) {
- if (locales[name].parentLocale != null) {
- locales[name] = locales[name].parentLocale;
- }
- else if (locales[name] != null) {
- delete locales[name];
- }
- }
- }
- return locales[name];
- }
- // returns locale data
- /**
- * @param {?=} key
- * @return {?}
- */
- function getLocale(key) {
- setDefaultLocale();
- if (!key) {
- return globalLocale;
- }
- // let locale;
- /** @type {?} */
- var _key = isArray(key) ? key : [key];
- return chooseLocale(_key);
- }
- /**
- * @return {?}
- */
- function listLocales() {
- return Object.keys(locales);
- }
- /**
- * @return {?}
- */
- function setDefaultLocale() {
- if (locales["en"]) {
- return undefined;
- }
- getSetGlobalLocale('en', {
- dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
- ordinal: /**
- * @param {?} num
- * @return {?}
- */
- function (num) {
- /** @type {?} */
- var b = num % 10;
- /** @type {?} */
- var output = toInt((num % 100) / 10) === 1
- ? 'th'
- : b === 1 ? 'st' : b === 2 ? 'nd' : b === 3 ? 'rd' : 'th';
- return num + output;
- }
- });
- initWeek();
- initWeekYear();
- initYear();
- initTimezone();
- initTimestamp();
- initSecond();
- initQuarter();
- initOffset();
- initMonth();
- initMinute();
- initMillisecond();
- initHour();
- initDayOfYear();
- initDayOfWeek();
- initDayOfMonth();
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /** @type {?} */
- var ordering = ['year', 'quarter', 'month', 'week', 'day', 'hours', 'minutes', 'seconds', 'milliseconds'];
- var ɵ0 = /**
- * @param {?} mem
- * @param {?} order
- * @return {?}
- */
- function (mem, order) {
- mem[order] = true;
- return mem;
- };
- /** @type {?} */
- var orderingHash = ordering.reduce((ɵ0), {});
- /**
- * @param {?} duration
- * @return {?}
- */
- function isDurationValid(duration) {
- /** @type {?} */
- var durationKeys = Object.keys(duration);
- if (durationKeys
- .some((/**
- * @param {?} key
- * @return {?}
- */
- function (key) {
- return (key in orderingHash)
- && duration[key] === null
- || isNaN(duration[key]);
- }))) {
- return false;
- }
- // for (let key in duration) {
- // if (!(indexOf.call(ordering, key) !== -1 && (duration[key] == null || !isNaN(duration[key])))) {
- // return false;
- // }
- // }
- /** @type {?} */
- var unitHasDecimal = false;
- for (var i = 0; i < ordering.length; ++i) {
- if (duration[ordering[i]]) {
- // only allow non-integers for smallest unit
- if (unitHasDecimal) {
- return false;
- }
- if (duration[ordering[i]] !== toInt(duration[ordering[i]])) {
- unitHasDecimal = true;
- }
- }
- }
- return true;
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /**
- * @param {?} number
- * @return {?}
- */
- function absCeil(number) {
- return number < 0 ? Math.floor(number) : Math.ceil(number);
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /**
- * @param {?} dur
- * @return {?}
- */
- function bubble(dur) {
- /** @type {?} */
- var milliseconds = dur._milliseconds;
- /** @type {?} */
- var days = dur._days;
- /** @type {?} */
- var months = dur._months;
- /** @type {?} */
- var data = dur._data;
- // if we have a mix of positive and negative values, bubble down first
- // check: https://github.com/moment/moment/issues/2166
- if (!((milliseconds >= 0 && days >= 0 && months >= 0) ||
- (milliseconds <= 0 && days <= 0 && months <= 0))) {
- milliseconds += absCeil(monthsToDays(months) + days) * 864e5;
- days = 0;
- months = 0;
- }
- // The following code bubbles up values, see the tests for
- // examples of what that means.
- data.milliseconds = milliseconds % 1000;
- /** @type {?} */
- var seconds = absFloor(milliseconds / 1000);
- data.seconds = seconds % 60;
- /** @type {?} */
- var minutes = absFloor(seconds / 60);
- data.minutes = minutes % 60;
- /** @type {?} */
- var hours = absFloor(minutes / 60);
- data.hours = hours % 24;
- days += absFloor(hours / 24);
- // convert days to months
- /** @type {?} */
- var monthsFromDays = absFloor(daysToMonths(days));
- months += monthsFromDays;
- days -= absCeil(monthsToDays(monthsFromDays));
- // 12 months -> 1 year
- /** @type {?} */
- var years = absFloor(months / 12);
- months %= 12;
- data.day = days;
- data.month = months;
- data.year = years;
- return dur;
- }
- /**
- * @param {?} day
- * @return {?}
- */
- function daysToMonths(day) {
- // 400 years have 146097 days (taking into account leap year rules)
- // 400 years have 12 months === 4800
- return day * 4800 / 146097;
- }
- /**
- * @param {?} month
- * @return {?}
- */
- function monthsToDays(month) {
- // the reverse of daysToMonths
- return month * 146097 / 4800;
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /** @type {?} */
- var round = Math.round;
- /** @type {?} */
- var thresholds = {
- ss: 44,
- // a few seconds to seconds
- s: 45,
- // seconds to minute
- m: 45,
- // minutes to hour
- h: 22,
- // hours to day
- d: 26,
- // days to month
- M: 11 // months to year
- };
- // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize
- /**
- * @param {?} str
- * @param {?} num
- * @param {?} withoutSuffix
- * @param {?} isFuture
- * @param {?} locale
- * @return {?}
- */
- function substituteTimeAgo(str, num, withoutSuffix, isFuture, locale) {
- return locale.relativeTime(num || 1, !!withoutSuffix, str, isFuture);
- }
- /**
- * @param {?} posNegDuration
- * @param {?} withoutSuffix
- * @param {?} locale
- * @return {?}
- */
- function relativeTime(posNegDuration, withoutSuffix, locale) {
- /** @type {?} */
- var duration = createDuration(posNegDuration).abs();
- /** @type {?} */
- var seconds = round(duration.as('s'));
- /** @type {?} */
- var minutes = round(duration.as('m'));
- /** @type {?} */
- var hours = round(duration.as('h'));
- /** @type {?} */
- var days = round(duration.as('d'));
- /** @type {?} */
- var months = round(duration.as('M'));
- /** @type {?} */
- var years = round(duration.as('y'));
- /** @type {?} */
- var a = seconds <= thresholds.ss && ['s', seconds] ||
- seconds < thresholds.s && ['ss', seconds] ||
- minutes <= 1 && ['m'] ||
- minutes < thresholds.m && ['mm', minutes] ||
- hours <= 1 && ['h'] ||
- hours < thresholds.h && ['hh', hours] ||
- days <= 1 && ['d'] ||
- days < thresholds.d && ['dd', days] ||
- months <= 1 && ['M'] ||
- months < thresholds.M && ['MM', months] ||
- years <= 1 && ['y'] || ['yy', years];
- /** @type {?} */
- var b = [a[0], a[1], withoutSuffix, +posNegDuration > 0, locale];
- // a[2] = withoutSuffix;
- // a[3] = +posNegDuration > 0;
- // a[4] = locale;
- return substituteTimeAgo.apply(null, b);
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- var Duration = /** @class */ (function () {
- function Duration(duration, config) {
- if (config === void 0) { config = {}; }
- this._data = {};
- this._locale = getLocale();
- this._locale = config && config._locale || getLocale();
- // const normalizedInput = normalizeObjectUnits(duration);
- /** @type {?} */
- var normalizedInput = duration;
- /** @type {?} */
- var years = normalizedInput.year || 0;
- /** @type {?} */
- var quarters = normalizedInput.quarter || 0;
- /** @type {?} */
- var months = normalizedInput.month || 0;
- /** @type {?} */
- var weeks = normalizedInput.week || 0;
- /** @type {?} */
- var days = normalizedInput.day || 0;
- /** @type {?} */
- var hours = normalizedInput.hours || 0;
- /** @type {?} */
- var minutes = normalizedInput.minutes || 0;
- /** @type {?} */
- var seconds = normalizedInput.seconds || 0;
- /** @type {?} */
- var milliseconds = normalizedInput.milliseconds || 0;
- this._isValid = isDurationValid(normalizedInput);
- // representation for dateAddRemove
- this._milliseconds = +milliseconds +
- seconds * 1000 +
- minutes * 60 * 1000 + // 1000 * 60
- hours * 1000 * 60 * 60; // using 1000 * 60 * 60
- // instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978
- // Because of dateAddRemove treats 24 hours as different from a
- // day when working around DST, we need to store them separately
- this._days = +days +
- weeks * 7;
- // It is impossible to translate months into days without knowing
- // which months you are are talking about, so we have to store
- // it separately.
- this._months = +months +
- quarters * 3 +
- years * 12;
- // this._data = {};
- // this._locale = getLocale();
- // this._bubble();
- return bubble(this);
- }
- /**
- * @return {?}
- */
- Duration.prototype.isValid = /**
- * @return {?}
- */
- function () {
- return this._isValid;
- };
- /**
- * @param {?=} withSuffix
- * @return {?}
- */
- Duration.prototype.humanize = /**
- * @param {?=} withSuffix
- * @return {?}
- */
- function (withSuffix) {
- // throw new Error(`TODO: implement`);
- if (!this.isValid()) {
- return this.localeData().invalidDate;
- }
- /** @type {?} */
- var locale = this.localeData();
- /** @type {?} */
- var output = relativeTime(this, !withSuffix, locale);
- if (withSuffix) {
- output = locale.pastFuture(+this, output);
- }
- return locale.postformat(output);
- };
- /**
- * @return {?}
- */
- Duration.prototype.localeData = /**
- * @return {?}
- */
- function () {
- return this._locale;
- };
- /**
- * @param {?=} localeKey
- * @return {?}
- */
- Duration.prototype.locale = /**
- * @param {?=} localeKey
- * @return {?}
- */
- function (localeKey) {
- if (!localeKey) {
- return this._locale._abbr;
- }
- this._locale = getLocale(localeKey) || this._locale;
- return this;
- };
- /**
- * @return {?}
- */
- Duration.prototype.abs = /**
- * @return {?}
- */
- function () {
- /** @type {?} */
- var mathAbs = Math.abs;
- /** @type {?} */
- var data = this._data;
- this._milliseconds = mathAbs(this._milliseconds);
- this._days = mathAbs(this._days);
- this._months = mathAbs(this._months);
- data.milliseconds = mathAbs(data.milliseconds);
- data.seconds = mathAbs(data.seconds);
- data.minutes = mathAbs(data.minutes);
- data.hours = mathAbs(data.hours);
- data.month = mathAbs(data.month);
- data.year = mathAbs(data.year);
- return this;
- };
- /**
- * @param {?} _units
- * @return {?}
- */
- Duration.prototype.as = /**
- * @param {?} _units
- * @return {?}
- */
- function (_units) {
- if (!this.isValid()) {
- return NaN;
- }
- /** @type {?} */
- var days;
- /** @type {?} */
- var months;
- /** @type {?} */
- var milliseconds = this._milliseconds;
- /** @type {?} */
- var units = normalizeUnits(_units);
- if (units === 'month' || units === 'year') {
- days = this._days + milliseconds / 864e5;
- months = this._months + daysToMonths(days);
- return units === 'month' ? months : months / 12;
- }
- // handle milliseconds separately because of floating point math errors (issue #1867)
- days = this._days + Math.round(monthsToDays(this._months));
- switch (units) {
- case 'week':
- return days / 7 + milliseconds / 6048e5;
- case 'day':
- return days + milliseconds / 864e5;
- case 'hours':
- return days * 24 + milliseconds / 36e5;
- case 'minutes':
- return days * 1440 + milliseconds / 6e4;
- case 'seconds':
- return days * 86400 + milliseconds / 1000;
- // Math.floor prevents floating point math errors here
- case 'milliseconds':
- return Math.floor(days * 864e5) + milliseconds;
- default:
- throw new Error("Unknown unit " + units);
- }
- };
- /**
- * @return {?}
- */
- Duration.prototype.valueOf = /**
- * @return {?}
- */
- function () {
- if (!this.isValid()) {
- return NaN;
- }
- return (this._milliseconds +
- this._days * 864e5 +
- (this._months % 12) * 2592e6 +
- toInt(this._months / 12) * 31536e6);
- };
- return Duration;
- }());
- /**
- * @param {?} obj
- * @return {?}
- */
- function isDuration(obj) {
- return obj instanceof Duration;
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /**
- * @param {?} config
- * @return {?}
- */
- function isValid(config) {
- if (config._isValid == null) {
- /** @type {?} */
- var flags = getParsingFlags(config);
- /** @type {?} */
- var parsedParts = Array.prototype.some.call(flags.parsedDateParts, (/**
- * @param {?} i
- * @return {?}
- */
- function (i) {
- return i != null;
- }));
- /** @type {?} */
- var isNowValid = !isNaN(config._d && config._d.getTime()) &&
- flags.overflow < 0 &&
- !flags.empty &&
- !flags.invalidMonth &&
- !flags.invalidWeekday &&
- !flags.weekdayMismatch &&
- !flags.nullInput &&
- !flags.invalidFormat &&
- !flags.userInvalidated &&
- (!flags.meridiem || (flags.meridiem && parsedParts));
- if (config._strict) {
- isNowValid = isNowValid &&
- flags.charsLeftOver === 0 &&
- flags.unusedTokens.length === 0 &&
- flags.bigHour === undefined;
- }
- if (Object.isFrozen == null || !Object.isFrozen(config)) {
- config._isValid = isNowValid;
- }
- else {
- return isNowValid;
- }
- }
- return config._isValid;
- }
- /**
- * @param {?} config
- * @param {?=} flags
- * @return {?}
- */
- function createInvalid(config, flags) {
- config._d = new Date(NaN);
- Object.assign(getParsingFlags(config), flags || { userInvalidated: true });
- return config;
- }
- /**
- * @param {?} config
- * @return {?}
- */
- function markInvalid(config) {
- config._isValid = false;
- return config;
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // iso 8601 regex
- // 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)
- // tslint:disable-next-line
- /** @type {?} */
- 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)?)?$/;
- // tslint:disable-next-line
- /** @type {?} */
- 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)?)?$/;
- /** @type {?} */
- var tzRegex = /Z|[+-]\d\d(?::?\d\d)?/;
- /** @type {?} */
- var isoDates = [
- ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/, true],
- ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/, true],
- ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/, true],
- ['GGGG-[W]WW', /\d{4}-W\d\d/, false],
- ['YYYY-DDD', /\d{4}-\d{3}/, true],
- ['YYYY-MM', /\d{4}-\d\d/, false],
- ['YYYYYYMMDD', /[+-]\d{10}/, true],
- ['YYYYMMDD', /\d{8}/, true],
- // YYYYMM is NOT allowed by the standard
- ['GGGG[W]WWE', /\d{4}W\d{3}/, true],
- ['GGGG[W]WW', /\d{4}W\d{2}/, false],
- ['YYYYDDD', /\d{7}/, true]
- ];
- // iso time formats and regexes
- /** @type {?} */
- var isoTimes = [
- ['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/],
- ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/],
- ['HH:mm:ss', /\d\d:\d\d:\d\d/],
- ['HH:mm', /\d\d:\d\d/],
- ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/],
- ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/],
- ['HHmmss', /\d\d\d\d\d\d/],
- ['HHmm', /\d\d\d\d/],
- ['HH', /\d\d/]
- ];
- /** @type {?} */
- var aspNetJsonRegex = /^\/?Date\((\-?\d+)/i;
- /** @type {?} */
- var obsOffsets = {
- UT: 0,
- GMT: 0,
- EDT: -4 * 60,
- EST: -5 * 60,
- CDT: -5 * 60,
- CST: -6 * 60,
- MDT: -6 * 60,
- MST: -7 * 60,
- PDT: -7 * 60,
- PST: -8 * 60
- };
- // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3
- // tslint:disable-next-line
- /** @type {?} */
- 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}))$/;
- // date from iso format
- /**
- * @param {?} config
- * @return {?}
- */
- function configFromISO(config) {
- if (!isString(config._i)) {
- return config;
- }
- /** @type {?} */
- var input = config._i;
- /** @type {?} */
- var match = extendedIsoRegex.exec(input) || basicIsoRegex.exec(input);
- /** @type {?} */
- var allowTime;
- /** @type {?} */
- var dateFormat;
- /** @type {?} */
- var timeFormat;
- /** @type {?} */
- var tzFormat;
- if (!match) {
- config._isValid = false;
- return config;
- }
- // getParsingFlags(config).iso = true;
- /** @type {?} */
- var i;
- /** @type {?} */
- var l;
- for (i = 0, l = isoDates.length; i < l; i++) {
- if (isoDates[i][1].exec(match[1])) {
- dateFormat = isoDates[i][0];
- allowTime = isoDates[i][2] !== false;
- break;
- }
- }
- if (dateFormat == null) {
- config._isValid = false;
- return config;
- }
- if (match[3]) {
- for (i = 0, l = isoTimes.length; i < l; i++) {
- if (isoTimes[i][1].exec(match[3])) {
- // match[2] should be 'T' or space
- timeFormat = (match[2] || ' ') + isoTimes[i][0];
- break;
- }
- }
- if (timeFormat == null) {
- config._isValid = false;
- return config;
- }
- }
- if (!allowTime && timeFormat != null) {
- config._isValid = false;
- return config;
- }
- if (match[4]) {
- if (tzRegex.exec(match[4])) {
- tzFormat = 'Z';
- }
- else {
- config._isValid = false;
- return config;
- }
- }
- config._f = dateFormat + (timeFormat || '') + (tzFormat || '');
- return configFromStringAndFormat(config);
- }
- // tslint:disable-next-line
- /**
- * @param {?} yearStr
- * @param {?} monthStr
- * @param {?} dayStr
- * @param {?} hourStr
- * @param {?} minuteStr
- * @param {?} secondStr
- * @return {?}
- */
- function extractFromRFC2822Strings(yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) {
- /** @type {?} */
- var result = [
- untruncateYear(yearStr),
- defaultLocaleMonthsShort.indexOf(monthStr),
- parseInt(dayStr, 10),
- parseInt(hourStr, 10),
- parseInt(minuteStr, 10)
- ];
- if (secondStr) {
- result.push(parseInt(secondStr, 10));
- }
- return result;
- }
- /**
- * @param {?} yearStr
- * @return {?}
- */
- function untruncateYear(yearStr) {
- /** @type {?} */
- var year = parseInt(yearStr, 10);
- return year <= 49 ? year + 2000 : year;
- }
- /**
- * @param {?} str
- * @return {?}
- */
- function preprocessRFC2822(str) {
- // Remove comments and folding whitespace and replace multiple-spaces with a single space
- return str
- .replace(/\([^)]*\)|[\n\t]/g, ' ')
- .replace(/(\s\s+)/g, ' ').trim();
- }
- /**
- * @param {?} weekdayStr
- * @param {?} parsedInput
- * @param {?} config
- * @return {?}
- */
- function checkWeekday(weekdayStr, parsedInput, config) {
- if (weekdayStr) {
- // TODO: Replace the vanilla JS Date object with an indepentent day-of-week check.
- /** @type {?} */
- var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr);
- /** @type {?} */
- var weekdayActual = new Date(parsedInput[0], parsedInput[1], parsedInput[2]).getDay();
- if (weekdayProvided !== weekdayActual) {
- getParsingFlags(config).weekdayMismatch = true;
- config._isValid = false;
- return false;
- }
- }
- return true;
- }
- /**
- * @param {?} obsOffset
- * @param {?} militaryOffset
- * @param {?} numOffset
- * @return {?}
- */
- function calculateOffset(obsOffset, militaryOffset, numOffset) {
- if (obsOffset) {
- return obsOffsets[obsOffset];
- }
- else if (militaryOffset) {
- // the only allowed military tz is Z
- return 0;
- }
- else {
- /** @type {?} */
- var hm = parseInt(numOffset, 10);
- /** @type {?} */
- var m = hm % 100;
- /** @type {?} */
- var h = (hm - m) / 100;
- return h * 60 + m;
- }
- }
- // date and time from ref 2822 format
- /**
- * @param {?} config
- * @return {?}
- */
- function configFromRFC2822(config) {
- if (!isString(config._i)) {
- return config;
- }
- /** @type {?} */
- var match = rfc2822.exec(preprocessRFC2822(config._i));
- if (!match) {
- return markInvalid(config);
- }
- /** @type {?} */
- var parsedArray = extractFromRFC2822Strings(match[4], match[3], match[2], match[5], match[6], match[7]);
- if (!checkWeekday(match[1], parsedArray, config)) {
- return config;
- }
- config._a = parsedArray;
- config._tzm = calculateOffset(match[8], match[9], match[10]);
- config._d = createUTCDate.apply(null, config._a);
- config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
- getParsingFlags(config).rfc2822 = true;
- return config;
- }
- // date from iso format or fallback
- /**
- * @param {?} config
- * @return {?}
- */
- function configFromString(config) {
- if (!isString(config._i)) {
- return config;
- }
- /** @type {?} */
- var matched = aspNetJsonRegex.exec(config._i);
- if (matched !== null) {
- config._d = new Date(+matched[1]);
- return config;
- }
- // todo: update logic processing
- // isISO -> configFromISO
- // isRFC -> configFromRFC
- configFromISO(config);
- if (config._isValid === false) {
- delete config._isValid;
- }
- else {
- return config;
- }
- configFromRFC2822(config);
- if (config._isValid === false) {
- delete config._isValid;
- }
- else {
- return config;
- }
- // Final attempt, use Input Fallback
- // hooks.createFromInputFallback(config);
- return createInvalid(config);
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /**
- * @param {?} date
- * @param {?} format
- * @param {?=} locale
- * @param {?=} isUTC
- * @param {?=} offset
- * @return {?}
- */
- function formatDate(date, format, locale, isUTC, offset) {
- if (offset === void 0) { offset = 0; }
- /** @type {?} */
- var _locale = getLocale(locale || 'en');
- if (!_locale) {
- throw new Error("Locale \"" + locale + "\" is not defined, please add it with \"defineLocale(...)\"");
- }
- /** @type {?} */
- var _format = format || (isUTC ? 'YYYY-MM-DDTHH:mm:ss[Z]' : 'YYYY-MM-DDTHH:mm:ssZ');
- /** @type {?} */
- var output = formatMoment(date, _format, _locale, isUTC, offset);
- if (!output) {
- return output;
- }
- return _locale.postformat(output);
- }
- // format date using native date object
- /**
- * @param {?} date
- * @param {?} _format
- * @param {?} locale
- * @param {?=} isUTC
- * @param {?=} offset
- * @return {?}
- */
- function formatMoment(date, _format, locale, isUTC, offset) {
- if (offset === void 0) { offset = 0; }
- if (!isDateValid(date)) {
- return locale.invalidDate;
- }
- /** @type {?} */
- var format = expandFormat(_format, locale);
- formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format);
- return formatFunctions[format](date, locale, isUTC, offset);
- }
- /**
- * @param {?} _format
- * @param {?} locale
- * @return {?}
- */
- function expandFormat(_format, locale) {
- /** @type {?} */
- var format = _format;
- /** @type {?} */
- var i = 5;
- /** @type {?} */
- var localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g;
- /** @type {?} */
- var replaceLongDateFormatTokens = (/**
- * @param {?} input
- * @return {?}
- */
- function (input) {
- return locale.formatLongDate(input) || input;
- });
- localFormattingTokens.lastIndex = 0;
- while (i >= 0 && localFormattingTokens.test(format)) {
- format = format.replace(localFormattingTokens, replaceLongDateFormatTokens);
- localFormattingTokens.lastIndex = 0;
- i -= 1;
- }
- return format;
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // Pick the first defined of two or three arguments.
- /**
- * @template T
- * @param {?=} a
- * @param {?=} b
- * @param {?=} c
- * @return {?}
- */
- function defaults(a, b, c) {
- if (a != null) {
- return a;
- }
- if (b != null) {
- return b;
- }
- return c;
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /**
- * @param {?} config
- * @return {?}
- */
- function currentDateArray(config) {
- /** @type {?} */
- var nowValue = new Date();
- if (config._useUTC) {
- return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()];
- }
- return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];
- }
- // convert an array to a date.
- // the array should mirror the parameters below
- // note: all values past the year are optional and will default to the lowest possible value.
- // [year, month, day , hour, minute, second, millisecond]
- /**
- * @param {?} config
- * @return {?}
- */
- function configFromArray(config) {
- /** @type {?} */
- var input = [];
- /** @type {?} */
- var i;
- /** @type {?} */
- var date;
- /** @type {?} */
- var currentDate;
- /** @type {?} */
- var expectedWeekday;
- /** @type {?} */
- var yearToUse;
- if (config._d) {
- return config;
- }
- currentDate = currentDateArray(config);
- // compute day of the year from weeks and weekdays
- if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {
- dayOfYearFromWeekInfo(config);
- }
- // if the day of the year is set, figure out what it is
- if (config._dayOfYear != null) {
- yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);
- if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) {
- getParsingFlags(config)._overflowDayOfYear = true;
- }
- date = new Date(Date.UTC(yearToUse, 0, config._dayOfYear));
- config._a[MONTH] = date.getUTCMonth();
- config._a[DATE] = date.getUTCDate();
- }
- // Default to current date.
- // * if no year, month, day of month are given, default to today
- // * if day of month is given, default month and year
- // * if month is given, default only year
- // * if year is given, don't default anything
- for (i = 0; i < 3 && config._a[i] == null; ++i) {
- config._a[i] = input[i] = currentDate[i];
- }
- // Zero out whatever was not defaulted, including time
- for (; i < 7; i++) {
- config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];
- }
- // Check for 24:00:00.000
- if (config._a[HOUR] === 24 &&
- config._a[MINUTE] === 0 &&
- config._a[SECOND] === 0 &&
- config._a[MILLISECOND] === 0) {
- config._nextDay = true;
- config._a[HOUR] = 0;
- }
- config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);
- expectedWeekday = config._useUTC ? config._d.getUTCDay() : config._d.getDay();
- // Apply timezone offset from input. The actual utcOffset can be changed
- // with parseZone.
- if (config._tzm != null) {
- config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
- }
- if (config._nextDay) {
- config._a[HOUR] = 24;
- }
- // check for mismatching day of week
- if (config._w && typeof config._w.d !== 'undefined' && config._w.d !== expectedWeekday) {
- getParsingFlags(config).weekdayMismatch = true;
- }
- return config;
- }
- /**
- * @param {?} config
- * @return {?}
- */
- function dayOfYearFromWeekInfo(config) {
- /** @type {?} */
- var w;
- /** @type {?} */
- var weekYear;
- /** @type {?} */
- var week;
- /** @type {?} */
- var weekday;
- /** @type {?} */
- var dow;
- /** @type {?} */
- var doy;
- /** @type {?} */
- var temp;
- /** @type {?} */
- var weekdayOverflow;
- w = config._w;
- if (w.GG != null || w.W != null || w.E != null) {
- dow = 1;
- doy = 4;
- // TODO: We need to take the current isoWeekYear, but that depends on
- // how we interpret now (local, utc, fixed offset). So create
- // a now version of current config (take local/utc/offset flags, and
- // create now).
- weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(new Date(), 1, 4).year);
- week = defaults(w.W, 1);
- weekday = defaults(w.E, 1);
- if (weekday < 1 || weekday > 7) {
- weekdayOverflow = true;
- }
- }
- else {
- dow = config._locale._week.dow;
- doy = config._locale._week.doy;
- /** @type {?} */
- var curWeek = weekOfYear(new Date(), dow, doy);
- weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);
- // Default to current week.
- week = defaults(w.w, curWeek.week);
- if (w.d != null) {
- // weekday -- low day numbers are considered next week
- weekday = w.d;
- if (weekday < 0 || weekday > 6) {
- weekdayOverflow = true;
- }
- }
- else if (w.e != null) {
- // local weekday -- counting starts from begining of week
- weekday = w.e + dow;
- if (w.e < 0 || w.e > 6) {
- weekdayOverflow = true;
- }
- }
- else {
- // default to begining of week
- weekday = dow;
- }
- }
- if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {
- getParsingFlags(config)._overflowWeeks = true;
- }
- else if (weekdayOverflow != null) {
- getParsingFlags(config)._overflowWeekday = true;
- }
- else {
- temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);
- config._a[YEAR] = temp.year;
- config._dayOfYear = temp.dayOfYear;
- }
- return config;
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /**
- * @param {?} config
- * @return {?}
- */
- function checkOverflow(config) {
- /** @type {?} */
- var overflow;
- /** @type {?} */
- var a = config._a;
- if (a && getParsingFlags(config).overflow === -2) {
- // todo: fix this sh*t
- overflow =
- a[MONTH] < 0 || a[MONTH] > 11 ? MONTH :
- a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE :
- a[HOUR] < 0 || a[HOUR] > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR :
- a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE :
- a[SECOND] < 0 || a[SECOND] > 59 ? SECOND :
- a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND :
- -1;
- if (getParsingFlags(config)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {
- overflow = DATE;
- }
- if (getParsingFlags(config)._overflowWeeks && overflow === -1) {
- overflow = WEEK;
- }
- if (getParsingFlags(config)._overflowWeekday && overflow === -1) {
- overflow = WEEKDAY;
- }
- getParsingFlags(config).overflow = overflow;
- }
- return config;
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // constant that refers to the ISO standard
- // hooks.ISO_8601 = function () {};
- /** @type {?} */
- var ISO_8601 = 'ISO_8601';
- // constant that refers to the RFC 2822 form
- // hooks.RFC_2822 = function () {};
- /** @type {?} */
- var RFC_2822 = 'RFC_2822';
- // date from string and format string
- /**
- * @param {?} config
- * @return {?}
- */
- function configFromStringAndFormat(config) {
- // TODO: Move this to another part of the creation flow to prevent circular deps
- if (config._f === ISO_8601) {
- return configFromISO(config);
- }
- if (config._f === RFC_2822) {
- return configFromRFC2822(config);
- }
- config._a = [];
- getParsingFlags(config).empty = true;
- if (isArray(config._f) || (!config._i && config._i !== 0)) {
- return config;
- }
- // This array is used to make a Date, either with `new Date` or `Date.UTC`
- /** @type {?} */
- var input = config._i.toString();
- /** @type {?} */
- var totalParsedInputLength = 0;
- /** @type {?} */
- var inputLength = input.length;
- /** @type {?} */
- var tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];
- /** @type {?} */
- var i;
- /** @type {?} */
- var token;
- /** @type {?} */
- var parsedInput;
- /** @type {?} */
- var skipped;
- for (i = 0; i < tokens.length; i++) {
- token = tokens[i];
- parsedInput = (input.match(getParseRegexForToken(token, config._locale)) || [])[0];
- if (parsedInput) {
- skipped = input.substr(0, input.indexOf(parsedInput));
- if (skipped.length > 0) {
- getParsingFlags(config).unusedInput.push(skipped);
- }
- input = input.slice(input.indexOf(parsedInput) + parsedInput.length);
- totalParsedInputLength += parsedInput.length;
- }
- // don't parse if it's not a known token
- if (formatTokenFunctions[token]) {
- if (parsedInput) {
- getParsingFlags(config).empty = false;
- }
- else {
- getParsingFlags(config).unusedTokens.push(token);
- }
- addTimeToArrayFromToken(token, parsedInput, config);
- }
- else if (config._strict && !parsedInput) {
- getParsingFlags(config).unusedTokens.push(token);
- }
- }
- // add remaining unparsed input length to the string
- getParsingFlags(config).charsLeftOver = inputLength - totalParsedInputLength;
- if (input.length > 0) {
- getParsingFlags(config).unusedInput.push(input);
- }
- // clear _12h flag if hour is <= 12
- if (config._a[HOUR] <= 12 &&
- getParsingFlags(config).bigHour === true &&
- config._a[HOUR] > 0) {
- getParsingFlags(config).bigHour = void 0;
- }
- getParsingFlags(config).parsedDateParts = config._a.slice(0);
- getParsingFlags(config).meridiem = config._meridiem;
- // handle meridiem
- config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem);
- configFromArray(config);
- return checkOverflow(config);
- }
- /**
- * @param {?} locale
- * @param {?} _hour
- * @param {?} meridiem
- * @return {?}
- */
- function meridiemFixWrap(locale, _hour, meridiem) {
- /** @type {?} */
- var hour = _hour;
- if (meridiem == null) {
- // nothing to do
- return hour;
- }
- if (locale.meridiemHour != null) {
- return locale.meridiemHour(hour, meridiem);
- }
- if (locale.isPM == null) {
- // this is not supposed to happen
- return hour;
- }
- // Fallback
- /** @type {?} */
- var isPm = locale.isPM(meridiem);
- if (isPm && hour < 12) {
- hour += 12;
- }
- if (!isPm && hour === 12) {
- hour = 0;
- }
- return hour;
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // date from string and array of format strings
- /**
- * @param {?} config
- * @return {?}
- */
- function configFromStringAndArray(config) {
- /** @type {?} */
- var tempConfig;
- /** @type {?} */
- var bestMoment;
- /** @type {?} */
- var scoreToBeat;
- /** @type {?} */
- var currentScore;
- if (!config._f || config._f.length === 0) {
- getParsingFlags(config).invalidFormat = true;
- return createInvalid(config);
- }
- /** @type {?} */
- var i;
- for (i = 0; i < config._f.length; i++) {
- currentScore = 0;
- tempConfig = Object.assign({}, config);
- if (config._useUTC != null) {
- tempConfig._useUTC = config._useUTC;
- }
- tempConfig._f = config._f[i];
- configFromStringAndFormat(tempConfig);
- if (!isValid(tempConfig)) {
- continue;
- }
- // if there is any input that was not parsed add a penalty for that format
- currentScore += getParsingFlags(tempConfig).charsLeftOver;
- // or tokens
- currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;
- getParsingFlags(tempConfig).score = currentScore;
- if (scoreToBeat == null || currentScore < scoreToBeat) {
- scoreToBeat = currentScore;
- bestMoment = tempConfig;
- }
- }
- return Object.assign(config, bestMoment || tempConfig);
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /**
- * @param {?} config
- * @return {?}
- */
- function configFromObject(config) {
- if (config._d) {
- return config;
- }
- /** @type {?} */
- var input = config._i;
- if (isObject(input)) {
- /** @type {?} */
- var i = normalizeObjectUnits((/** @type {?} */ (input)));
- config._a = [i.year, i.month, i.day, i.hours, i.minutes, i.seconds, i.milliseconds]
- // todo: obsolete -> remove it
- .map((/**
- * @param {?} obj
- * @return {?}
- */
- function (obj) { return isString(obj) ? parseInt(obj, 10) : obj; }));
- }
- return configFromArray(config);
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /**
- * @param {?} config
- * @return {?}
- */
- function createFromConfig(config) {
- /** @type {?} */
- var res = checkOverflow(prepareConfig(config));
- // todo: remove, in moment.js it's never called cuz of moment constructor
- res._d = new Date(res._d != null ? res._d.getTime() : NaN);
- if (!isValid(Object.assign({}, res, { _isValid: null }))) {
- res._d = new Date(NaN);
- }
- // todo: update offset
- /*if (res._nextDay) {
- // Adding is smart enough around DST
- res._d = add(res._d, 1, 'day');
- res._nextDay = undefined;
- }*/
- return res;
- }
- /**
- * @param {?} config
- * @return {?}
- */
- function prepareConfig(config) {
- /** @type {?} */
- var input = config._i;
- /** @type {?} */
- var format = config._f;
- config._locale = config._locale || getLocale(config._l);
- if (input === null || (format === undefined && input === '')) {
- return createInvalid(config, { nullInput: true });
- }
- if (isString(input)) {
- config._i = input = config._locale.preparse(input);
- }
- if (isDate(input)) {
- config._d = cloneDate(input);
- return config;
- }
- // todo: add check for recursion
- if (isArray(format)) {
- configFromStringAndArray(config);
- }
- else if (format) {
- configFromStringAndFormat(config);
- }
- else {
- configFromInput(config);
- }
- if (!isValid(config)) {
- config._d = null;
- }
- return config;
- }
- /**
- * @param {?} config
- * @return {?}
- */
- function configFromInput(config) {
- /** @type {?} */
- var input = config._i;
- if (isUndefined(input)) {
- config._d = new Date();
- }
- else if (isDate(input)) {
- config._d = cloneDate(input);
- }
- else if (isString(input)) {
- configFromString(config);
- }
- else if (isArray(input) && input.length) {
- /** @type {?} */
- var _arr = input.slice(0);
- config._a = _arr.map((/**
- * @param {?} obj
- * @return {?}
- */
- function (obj) { return isString(obj) ? parseInt(obj, 10) : obj; }));
- configFromArray(config);
- }
- else if (isObject(input)) {
- configFromObject(config);
- }
- else if (isNumber(input)) {
- // from milliseconds
- config._d = new Date(input);
- }
- else {
- // hooks.createFromInputFallback(config);
- return createInvalid(config);
- }
- return config;
- }
- /**
- * @param {?} input
- * @param {?=} format
- * @param {?=} localeKey
- * @param {?=} strict
- * @param {?=} isUTC
- * @return {?}
- */
- function createLocalOrUTC(input, format, localeKey, strict, isUTC) {
- /** @type {?} */
- var config = {};
- /** @type {?} */
- var _input = input;
- // params switch -> skip; test it well
- // if (localeKey === true || localeKey === false) {
- // strict = localeKey;
- // localeKey = undefined;
- // }
- // todo: fail fast and return not valid date
- if ((isObject(_input) && isObjectEmpty(_input)) || (isArray(_input) && _input.length === 0)) {
- _input = undefined;
- }
- // object construction must be done this way.
- // https://github.com/moment/moment/issues/1423
- // config._isAMomentObject = true;
- config._useUTC = config._isUTC = isUTC;
- config._l = localeKey;
- config._i = _input;
- config._f = format;
- config._strict = strict;
- return createFromConfig(config);
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /**
- * @param {?} input
- * @param {?=} format
- * @param {?=} localeKey
- * @param {?=} strict
- * @param {?=} isUTC
- * @return {?}
- */
- function parseDate(input, format, localeKey, strict, isUTC) {
- if (isDate(input)) {
- return input;
- }
- /** @type {?} */
- var config = createLocalOrUTC(input, format, localeKey, strict, isUTC);
- return config._d;
- }
- /**
- * @param {?} date
- * @return {?}
- */
- function utcAsLocal(date) {
- if (!(date instanceof Date)) {
- return null;
- }
- return new Date(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds(), date.getUTCMilliseconds());
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /**
- * @param {?} num
- * @return {?}
- */
- function absRound(num) {
- return num < 0 ? Math.round(num * -1) * -1 : Math.round(num);
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /**
- * @param {?} date1
- * @param {?} date2
- * @param {?=} units
- * @return {?}
- */
- function isAfter(date1, date2, units) {
- if (units === void 0) { units = 'milliseconds'; }
- if (!date1 || !date2) {
- return false;
- }
- if (units === 'milliseconds') {
- return date1.valueOf() > date2.valueOf();
- }
- return date2.valueOf() < startOf(date1, units).valueOf();
- }
- /**
- * @param {?} date1
- * @param {?} date2
- * @param {?=} units
- * @return {?}
- */
- function isBefore(date1, date2, units) {
- if (units === void 0) { units = 'milliseconds'; }
- if (!date1 || !date2) {
- return false;
- }
- if (units === 'milliseconds') {
- return date1.valueOf() < date2.valueOf();
- }
- return endOf(date1, units).valueOf() < date2.valueOf();
- }
- /**
- * @param {?} date
- * @param {?} daysDisabled
- * @return {?}
- */
- function isDisabledDay(date, daysDisabled) {
- if (daysDisabled === undefined || !daysDisabled || !daysDisabled.length) {
- return false;
- }
- return daysDisabled.some((/**
- * @param {?} day
- * @return {?}
- */
- function (day) { return day === date.getDay(); }));
- }
- /**
- * @param {?} date1
- * @param {?} date2
- * @param {?=} units
- * @return {?}
- */
- function isSame(date1, date2, units) {
- if (units === void 0) { units = 'milliseconds'; }
- if (!date1 || !date2) {
- return false;
- }
- if (units === 'milliseconds') {
- return date1.valueOf() === date2.valueOf();
- }
- /** @type {?} */
- var inputMs = date2.valueOf();
- return (startOf(date1, units).valueOf() <= inputMs &&
- inputMs <= endOf(date1, units).valueOf());
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /** @type {?} */
- var aspNetRegex = /^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/;
- // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html
- // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere
- // and further modified to allow for strings containing both week and day
- // tslint:disable-next-line
- /** @type {?} */
- 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)?)?$/;
- /**
- * @param {?=} input
- * @param {?=} key
- * @param {?=} config
- * @return {?}
- */
- function createDuration(input, key, config) {
- if (config === void 0) { config = {}; }
- /** @type {?} */
- var duration = convertDuration(input, key);
- // matching against regexp is expensive, do it on demand
- return new Duration(duration, config);
- }
- /**
- * @param {?} input
- * @param {?} key
- * @return {?}
- */
- function convertDuration(input, key) {
- var _a;
- // checks for null or undefined
- if (input == null) {
- return {};
- }
- if (isDuration(input)) {
- return {
- milliseconds: input._milliseconds,
- day: input._days,
- month: input._months
- };
- }
- if (isNumber(input)) {
- // duration = {};
- return key ? (_a = {}, _a[key] = input, _a) : { milliseconds: input };
- }
- if (isString(input)) {
- /** @type {?} */
- var match = aspNetRegex.exec(input);
- if (match) {
- /** @type {?} */
- var sign = (match[1] === '-') ? -1 : 1;
- return {
- year: 0,
- day: toInt(match[DATE]) * sign,
- hours: toInt(match[HOUR]) * sign,
- minutes: toInt(match[MINUTE]) * sign,
- seconds: toInt(match[SECOND]) * sign,
- // the millisecond decimal point is included in the match
- milliseconds: toInt(absRound(toInt(match[MILLISECOND]) * 1000)) * sign
- };
- }
- match = isoRegex.exec(input);
- if (match) {
- /** @type {?} */
- var sign = (match[1] === '-') ? -1 : (match[1] === '+') ? 1 : 1;
- return {
- year: parseIso(match[2], sign),
- month: parseIso(match[3], sign),
- week: parseIso(match[4], sign),
- day: parseIso(match[5], sign),
- hours: parseIso(match[6], sign),
- minutes: parseIso(match[7], sign),
- seconds: parseIso(match[8], sign)
- };
- }
- }
- if (isObject(input) && ('from' in input || 'to' in input)) {
- /** @type {?} */
- var diffRes = momentsDifference(parseDate(input.from), parseDate(input.to));
- return {
- milliseconds: diffRes.milliseconds,
- month: diffRes.months
- };
- }
- return input;
- }
- // createDuration.fn = Duration.prototype;
- // createDuration.invalid = invalid;
- /**
- * @param {?} inp
- * @param {?} sign
- * @return {?}
- */
- function parseIso(inp, sign) {
- // We'd normally use ~~inp for this, but unfortunately it also
- // converts floats to ints.
- // inp may be undefined, so careful calling replace on it.
- /** @type {?} */
- var res = inp && parseFloat(inp.replace(',', '.'));
- // apply sign while we're at it
- return (isNaN(res) ? 0 : res) * sign;
- }
- /**
- * @param {?} base
- * @param {?} other
- * @return {?}
- */
- function positiveMomentsDifference(base, other) {
- /** @type {?} */
- var res = { milliseconds: 0, months: 0 };
- res.months = getMonth(other) - getMonth(base) +
- (getFullYear(other) - getFullYear(base)) * 12;
- /** @type {?} */
- var _basePlus = add(cloneDate(base), res.months, 'month');
- if (isAfter(_basePlus, other)) {
- --res.months;
- }
- res.milliseconds = +other - +(add(cloneDate(base), res.months, 'month'));
- return res;
- }
- /**
- * @param {?} base
- * @param {?} other
- * @return {?}
- */
- function momentsDifference(base, other) {
- if (!(isDateValid(base) && isDateValid(other))) {
- return { milliseconds: 0, months: 0 };
- }
- /** @type {?} */
- var res;
- /** @type {?} */
- var _other = cloneWithOffset(other, base, { _offset: base.getTimezoneOffset() });
- if (isBefore(base, _other)) {
- res = positiveMomentsDifference(base, _other);
- }
- else {
- res = positiveMomentsDifference(_other, base);
- res.milliseconds = -res.milliseconds;
- res.months = -res.months;
- }
- return res;
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /**
- * @param {?} date
- * @param {?} val
- * @param {?} period
- * @param {?=} isUTC
- * @return {?}
- */
- function add(date, val, period, isUTC) {
- /** @type {?} */
- var dur = createDuration(val, period);
- return addSubtract(date, dur, 1, isUTC);
- }
- /**
- * @param {?} date
- * @param {?} val
- * @param {?} period
- * @param {?=} isUTC
- * @return {?}
- */
- function subtract(date, val, period, isUTC) {
- /** @type {?} */
- var dur = createDuration(val, period);
- return addSubtract(date, dur, -1, isUTC);
- }
- /**
- * @param {?} date
- * @param {?} duration
- * @param {?} isAdding
- * @param {?=} isUTC
- * @return {?}
- */
- function addSubtract(date, duration, isAdding, isUTC) {
- /** @type {?} */
- var milliseconds = duration._milliseconds;
- /** @type {?} */
- var days = absRound(duration._days);
- /** @type {?} */
- var months = absRound(duration._months);
- // todo: add timezones support
- // const _updateOffset = updateOffset == null ? true : updateOffset;
- if (months) {
- setMonth(date, getMonth(date, isUTC) + months * isAdding, isUTC);
- }
- if (days) {
- setDate(date, getDate(date, isUTC) + days * isAdding, isUTC);
- }
- if (milliseconds) {
- setTime(date, getTime(date) + milliseconds * isAdding);
- }
- return cloneDate(date);
- // todo: add timezones support
- // if (_updateOffset) {
- // hooks.updateOffset(date, days || months);
- // }
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /**
- * @return {?}
- */
- function initDayOfWeek() {
- // FORMATTING
- addFormatToken('d', null, 'do', (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- return getDay(date, opts.isUTC)
- .toString(10);
- }));
- addFormatToken('dd', null, null, (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- return opts.locale.weekdaysMin(date, opts.format, opts.isUTC);
- }));
- addFormatToken('ddd', null, null, (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- return opts.locale.weekdaysShort(date, opts.format, opts.isUTC);
- }));
- addFormatToken('dddd', null, null, (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- return opts.locale.weekdays(date, opts.format, opts.isUTC);
- }));
- addFormatToken('e', null, null, (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- return getLocaleDayOfWeek(date, opts.locale, opts.isUTC)
- .toString(10);
- // return getDay(date, opts.isUTC).toString(10);
- }));
- addFormatToken('E', null, null, (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- return getISODayOfWeek(date, opts.isUTC)
- .toString(10);
- }));
- // ALIASES
- addUnitAlias('day', 'd');
- addUnitAlias('weekday', 'e');
- addUnitAlias('isoWeekday', 'E');
- // PARSING
- addRegexToken('d', match1to2);
- addRegexToken('e', match1to2);
- addRegexToken('E', match1to2);
- addRegexToken('dd', (/**
- * @param {?} isStrict
- * @param {?} locale
- * @return {?}
- */
- function (isStrict, locale) {
- return locale.weekdaysMinRegex(isStrict);
- }));
- addRegexToken('ddd', (/**
- * @param {?} isStrict
- * @param {?} locale
- * @return {?}
- */
- function (isStrict, locale) {
- return locale.weekdaysShortRegex(isStrict);
- }));
- addRegexToken('dddd', (/**
- * @param {?} isStrict
- * @param {?} locale
- * @return {?}
- */
- function (isStrict, locale) {
- return locale.weekdaysRegex(isStrict);
- }));
- addWeekParseToken(['dd', 'ddd', 'dddd'], (/**
- * @param {?} input
- * @param {?} week
- * @param {?} config
- * @param {?} token
- * @return {?}
- */
- function (input, week, config, token) {
- /** @type {?} */
- var weekday = config._locale.weekdaysParse(input, token, config._strict);
- // if we didn't get a weekday name, mark the date as invalid
- if (weekday != null) {
- week.d = weekday;
- }
- else {
- getParsingFlags(config).invalidWeekday = !!input;
- }
- return config;
- }));
- addWeekParseToken(['d', 'e', 'E'], (/**
- * @param {?} input
- * @param {?} week
- * @param {?} config
- * @param {?} token
- * @return {?}
- */
- function (input, week, config, token) {
- week[token] = toInt(input);
- return config;
- }));
- }
- // HELPERS
- /**
- * @param {?} input
- * @param {?} locale
- * @return {?}
- */
- function parseWeekday(input, locale) {
- if (!isString(input)) {
- return input;
- }
- /** @type {?} */
- var _num = parseInt(input, 10);
- if (!isNaN(_num)) {
- return _num;
- }
- /** @type {?} */
- var _weekDay = locale.weekdaysParse(input);
- if (isNumber(_weekDay)) {
- return _weekDay;
- }
- return null;
- }
- /**
- * @param {?} input
- * @param {?=} locale
- * @return {?}
- */
- function parseIsoWeekday(input, locale) {
- if (locale === void 0) { locale = getLocale(); }
- if (isString(input)) {
- return locale.weekdaysParse(input) % 7 || 7;
- }
- return isNumber(input) && isNaN(input) ? null : input;
- }
- /**
- * @param {?} date
- * @param {?} input
- * @param {?=} locale
- * @param {?=} isUTC
- * @return {?}
- */
- function setDayOfWeek(date, input, locale, isUTC) {
- if (locale === void 0) { locale = getLocale(); }
- /** @type {?} */
- var day = getDay(date, isUTC);
- /** @type {?} */
- var _input = parseWeekday(input, locale);
- return add(date, _input - day, 'day');
- }
- /**
- * @param {?} date
- * @param {?=} isUTC
- * @return {?}
- */
- function getDayOfWeek(date, isUTC) {
- return getDay(date, isUTC);
- }
- /**
- * ****************************************
- * @param {?} date
- * @param {?=} locale
- * @param {?=} isUTC
- * @return {?}
- */
- // todo: utc
- // getSetLocaleDayOfWeek
- function getLocaleDayOfWeek(date, locale, isUTC) {
- if (locale === void 0) { locale = getLocale(); }
- return (getDay(date, isUTC) + 7 - locale.firstDayOfWeek()) % 7;
- }
- /**
- * @param {?} date
- * @param {?} input
- * @param {?=} opts
- * @return {?}
- */
- function setLocaleDayOfWeek(date, input, opts) {
- if (opts === void 0) { opts = {}; }
- /** @type {?} */
- var weekday = getLocaleDayOfWeek(date, opts.locale, opts.isUTC);
- return add(date, input - weekday, 'day');
- }
- // getSetISODayOfWeek
- /**
- * @param {?} date
- * @param {?=} isUTC
- * @return {?}
- */
- function getISODayOfWeek(date, isUTC) {
- return getDay(date, isUTC) || 7;
- }
- /**
- * @param {?} date
- * @param {?} input
- * @param {?=} opts
- * @return {?}
- */
- function setISODayOfWeek(date, input, opts) {
- // behaves the same as moment#day except
- // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)
- // as a setter, sunday should belong to the previous week.
- if (opts === void 0) { opts = {}; }
- // behaves the same as moment#day except
- // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)
- // as a setter, sunday should belong to the previous week.
- /** @type {?} */
- var weekday = parseIsoWeekday(input, opts.locale);
- return setDayOfWeek(date, getDayOfWeek(date) % 7 ? weekday : weekday - 7);
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // tslint:disable:comment-format binary-expression-operand-order max-line-length
- //! moment.js locale configuration
- //! locale : Arabic [ar]
- //! author : Abdel Said: https://github.com/abdelsaid
- //! author : Ahmed Elkhatib
- //! author : forabi https://github.com/forabi
- /** @type {?} */
- var symbolMap = {
- 1: '١',
- 2: '٢',
- 3: '٣',
- 4: '٤',
- 5: '٥',
- 6: '٦',
- 7: '٧',
- 8: '٨',
- 9: '٩',
- 0: '٠'
- };
- /** @type {?} */
- var numberMap = {
- '١': '1',
- '٢': '2',
- '٣': '3',
- '٤': '4',
- '٥': '5',
- '٦': '6',
- '٧': '7',
- '٨': '8',
- '٩': '9',
- '٠': '0'
- };
- /** @type {?} */
- var pluralForm = (/**
- * @param {?} num
- * @return {?}
- */
- function (num) {
- return num === 0 ? 0 : num === 1 ? 1 : num === 2 ? 2 : num % 100 >= 3 && num % 100 <= 10 ? 3 : num % 100 >= 11 ? 4 : 5;
- });
- /** @type {?} */
- var plurals = {
- s: ['أقل من ثانية', 'ثانية واحدة', ['ثانيتان', 'ثانيتين'], '%d ثوان', '%d ثانية', '%d ثانية'],
- m: ['أقل من دقيقة', 'دقيقة واحدة', ['دقيقتان', 'دقيقتين'], '%d دقائق', '%d دقيقة', '%d دقيقة'],
- h: ['أقل من ساعة', 'ساعة واحدة', ['ساعتان', 'ساعتين'], '%d ساعات', '%d ساعة', '%d ساعة'],
- d: ['أقل من يوم', 'يوم واحد', ['يومان', 'يومين'], '%d أيام', '%d يومًا', '%d يوم'],
- M: ['أقل من شهر', 'شهر واحد', ['شهران', 'شهرين'], '%d أشهر', '%d شهرا', '%d شهر'],
- y: ['أقل من عام', 'عام واحد', ['عامان', 'عامين'], '%d أعوام', '%d عامًا', '%d عام']
- };
- /** @type {?} */
- var pluralize = (/**
- * @param {?} u
- * @return {?}
- */
- function (u) {
- return (/**
- * @param {?} num
- * @param {?} withoutSuffix
- * @return {?}
- */
- function (num, withoutSuffix) {
- /** @type {?} */
- var f = pluralForm(num);
- /** @type {?} */
- var str = plurals[u][pluralForm(num)];
- if (f === 2) {
- str = str[withoutSuffix ? 0 : 1];
- }
- return ((/** @type {?} */ (str))).replace(/%d/i, num.toString());
- });
- });
- /** @type {?} */
- var months = [
- 'يناير',
- 'فبراير',
- 'مارس',
- 'أبريل',
- 'مايو',
- 'يونيو',
- 'يوليو',
- 'أغسطس',
- 'سبتمبر',
- 'أكتوبر',
- 'نوفمبر',
- 'ديسمبر'
- ];
- /** @type {?} */
- var arLocale = {
- abbr: 'ar',
- months: months,
- monthsShort: months,
- weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
- weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
- weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'D/\u200FM/\u200FYYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd D MMMM YYYY HH:mm'
- },
- meridiemParse: /ص|م/,
- isPM: /**
- * @param {?} input
- * @return {?}
- */
- function (input) {
- return 'م' === input;
- },
- meridiem: /**
- * @param {?} hour
- * @param {?} minute
- * @param {?} isLower
- * @return {?}
- */
- function (hour, minute, isLower) {
- if (hour < 12) {
- return 'ص';
- }
- else {
- return 'م';
- }
- },
- calendar: {
- sameDay: '[اليوم عند الساعة] LT',
- nextDay: '[غدًا عند الساعة] LT',
- nextWeek: 'dddd [عند الساعة] LT',
- lastDay: '[أمس عند الساعة] LT',
- lastWeek: 'dddd [عند الساعة] LT',
- sameElse: 'L'
- },
- relativeTime: {
- future: 'بعد %s',
- past: 'منذ %s',
- s: pluralize('s'),
- ss: pluralize('s'),
- m: pluralize('m'),
- mm: pluralize('m'),
- h: pluralize('h'),
- hh: pluralize('h'),
- d: pluralize('d'),
- dd: pluralize('d'),
- M: pluralize('M'),
- MM: pluralize('M'),
- y: pluralize('y'),
- yy: pluralize('y')
- },
- preparse: /**
- * @param {?} str
- * @return {?}
- */
- function (str) {
- return str.replace(/[١٢٣٤٥٦٧٨٩٠]/g, (/**
- * @param {?} match
- * @return {?}
- */
- function (match) {
- return numberMap[match];
- })).replace(/،/g, ',');
- },
- postformat: /**
- * @param {?} str
- * @return {?}
- */
- function (str) {
- return str.replace(/\d/g, (/**
- * @param {?} match
- * @return {?}
- */
- function (match) {
- return symbolMap[match];
- })).replace(/,/g, '،');
- },
- week: {
- dow: 6,
- // Saturday is the first day of the week.
- doy: 12 // The week that contains Jan 1st is the first week of the year.
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // tslint:disable:comment-format binary-expression-operand-order max-line-length
- // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
- // tslint:disable:no-shadowed-variable switch-default prefer-const
- // tslint:disable:one-variable-per-declaration newline-before-return
- //! moment.js locale configuration
- //! locale : Bulgarian [bg]
- //! author : Iskren Ivov Chernev : https://github.com/ichernev
- //! author : Kunal Marwaha : https://github.com/marwahaha
- //! author : Matt Grande : https://github.com/mattgrande
- //! author : Isaac Cambron : https://github.com/icambron
- //! author : Venelin Manchev : https://github.com/vmanchev
- var ɵ0$1 = /**
- * @param {?} d
- * @return {?}
- */
- function (d) {
- switch (d) {
- case 0:
- case 3:
- case 6:
- return '[В изминалата] dddd [в] LT';
- case 1:
- case 2:
- case 4:
- case 5:
- return '[В изминалия] dddd [в] LT';
- }
- };
- /** @type {?} */
- var bgLocale = {
- abbr: 'bg',
- months: 'януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември'.split('_'),
- monthsShort: 'янр_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек'.split('_'),
- weekdays: 'неделя_понеделник_вторник_сряда_четвъртък_петък_събота'.split('_'),
- weekdaysShort: 'нед_пон_вто_сря_чет_пет_съб'.split('_'),
- weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
- longDateFormat: {
- LT: 'H:mm',
- LTS: 'H:mm:ss',
- L: 'D.MM.YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY H:mm',
- LLLL: 'dddd, D MMMM YYYY H:mm'
- },
- calendar: {
- sameDay: '[Днес в] LT',
- nextDay: '[Утре в] LT',
- nextWeek: 'dddd [в] LT',
- lastDay: '[Вчера в] LT',
- lastWeek: (ɵ0$1),
- sameElse: 'L'
- },
- relativeTime: {
- future: 'след %s',
- past: 'преди %s',
- s: 'няколко секунди',
- ss: '%d секунди',
- m: 'минута',
- mm: '%d минути',
- h: 'час',
- hh: '%d часа',
- d: 'ден',
- dd: '%d дни',
- M: 'месец',
- MM: '%d месеца',
- y: 'година',
- yy: '%d години'
- },
- dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/,
- ordinal: (/**
- * @param {?} _num
- * @return {?}
- */
- function (_num) {
- /** @type {?} */
- var number = Number(_num);
- /** @type {?} */
- var lastDigit = number % 10;
- /** @type {?} */
- var last2Digits = number % 100;
- if (number === 0) {
- return number + '-ев';
- }
- else if (last2Digits === 0) {
- return number + '-ен';
- }
- else if (last2Digits > 10 && last2Digits < 20) {
- return number + '-ти';
- }
- else if (lastDigit === 1) {
- return number + '-ви';
- }
- else if (lastDigit === 2) {
- return number + '-ри';
- }
- else if (lastDigit === 7 || lastDigit === 8) {
- return number + '-ми';
- }
- else {
- return number + '-ти';
- }
- }),
- week: {
- dow: 1,
- // Monday is the first day of the week.
- doy: 7 // The week that contains Jan 1st is the first week of the year.
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- //! moment.js locale configuration
- //! locale : Catalan [ca]
- //! author : Xavier Arbat : https://github.com/XavisaurusRex
- /** @type {?} */
- var monthsShortDot = 'gen._feb._mar._abr._mai._jun._jul._ago._set._oct._nov._des.'.split('_');
- /** @type {?} */
- var monthsShort = 'ene_feb_mar_abr_mai_jun_jul_ago_set_oct_nov_des'.split('_');
- /** @type {?} */
- var monthsParse = [/^gen/i, /^feb/i, /^mar/i, /^abr/i, /^mai/i, /^jun/i, /^jul/i, /^ago/i, /^set/i, /^oct/i, /^nov/i, /^des/i];
- /** @type {?} */
- var monthsRegex = /^(gener|febrer|març|abril|maig|juny|juliol|agost|setembre|octubre|novembre|desembre|gen\.?|feb\.?|mar\.?|abr\.?|mai\.?|jun\.?|jul\.?|ago\.?|set\.?|oct\.?|nov\.?|des\.?)/i;
- /** @type {?} */
- var caLocale = {
- abbr: 'ca',
- months: 'gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split('_'),
- monthsShort: /**
- * @param {?} date
- * @param {?} format
- * @param {?=} isUTC
- * @return {?}
- */
- function (date, format, isUTC) {
- if (!date) {
- return monthsShortDot;
- }
- if (/-MMM-/.test(format)) {
- return monthsShort[getMonth(date, isUTC)];
- }
- return monthsShortDot[getMonth(date, isUTC)];
- },
- monthsRegex: monthsRegex,
- monthsShortRegex: monthsRegex,
- monthsStrictRegex: /^(gener|febrer|març|abril|maig|juny|juliol|agost|setembre|octubre|novembre|desembre)/i,
- monthsShortStrictRegex: /^(gen\.?|feb\.?|mar\.?|abr\.?|mai\.?|jun\.?|jul\.?|ago\.?|set\.?|oct\.?|nov\.?|des\.?)/i,
- monthsParse: monthsParse,
- longMonthsParse: monthsParse,
- shortMonthsParse: monthsParse,
- weekdays: 'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split('_'),
- weekdaysShort: 'diu._dil._dim._dix._dij._div._dis.'.split('_'),
- weekdaysMin: 'dg_dl_dt_dc_dj_dv_ds'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'H:mm',
- LTS: 'H:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D [de] MMMM [de] YYYY',
- LLL: 'D [de] MMMM [de] YYYY H:mm',
- LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm'
- },
- calendar: {
- sameDay: /**
- * @param {?} date
- * @return {?}
- */
- function (date) {
- return '[avui a ' + ('la' + (getHours(date) !== 1) ? 'les' : '') + '] LT';
- },
- nextDay: /**
- * @param {?} date
- * @return {?}
- */
- function (date) {
- return '[dema a ' + ('la' + (getHours(date) !== 1) ? 'les' : '') + '] LT';
- },
- nextWeek: /**
- * @param {?} date
- * @return {?}
- */
- function (date) {
- return 'dddd [a ' + ('la' + (getHours(date) !== 1) ? 'les' : '') + '] LT';
- },
- lastDay: /**
- * @param {?} date
- * @return {?}
- */
- function (date) {
- return '[ahir a ' + ('la' + (getHours(date) !== 1) ? 'les' : '') + '] LT';
- },
- lastWeek: /**
- * @param {?} date
- * @return {?}
- */
- function (date) {
- return '[el] dddd [' + ('passada la ' + (getHours(date) !== 1) ? 'passades les' : '') + '] LT';
- },
- sameElse: 'L'
- },
- relativeTime: {
- future: 'en %s',
- past: 'fa %s',
- s: 'uns segons',
- ss: '%d segons',
- m: 'un minut',
- mm: '%d minuts',
- h: 'una hora',
- hh: '%d hores',
- d: 'un dia',
- dd: '%d dies',
- M: 'un mes',
- MM: '%d mesos',
- y: 'un any',
- yy: '%d anys'
- },
- dayOfMonthOrdinalParse: /\d{1,2}(er|on|er|rt|é)/,
- ordinal: /**
- * @param {?} _num
- * @return {?}
- */
- function (_num) {
- /** @type {?} */
- var num = Number(_num);
- /** @type {?} */
- var output = (num > 4) ? 'é' :
- (num === 1 || num === 3) ? 'r' :
- (num === 2) ? 'n' :
- (num === 4) ? 't' : 'é';
- return num + output;
- },
- week: {
- dow: 1,
- // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- //! moment.js locale configuration
- //! locale : Czech [cs]
- //! author : petrbela : https://github.com/petrbela
- /** @type {?} */
- var months$1 = 'leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec'.split('_');
- /** @type {?} */
- var monthsShort$1 = 'led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro'.split('_');
- /**
- * @param {?} num
- * @return {?}
- */
- function plural(num) {
- return (num > 1) && (num < 5) && (~~(num / 10) !== 1);
- }
- /**
- * @param {?} num
- * @param {?} withoutSuffix
- * @param {?} key
- * @param {?} isFuture
- * @return {?}
- */
- function translate(num, withoutSuffix, key, isFuture) {
- /** @type {?} */
- var result = num + ' ';
- switch (key) {
- case 's': // a few seconds / in a few seconds / a few seconds ago
- return (withoutSuffix || isFuture) ? 'pár sekund' : 'pár sekundami';
- case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago
- if (withoutSuffix || isFuture) {
- return result + (plural(num) ? 'sekundy' : 'sekund');
- }
- else {
- return result + 'sekundami';
- }
- // break;
- case 'm': // a minute / in a minute / a minute ago
- return withoutSuffix ? 'minuta' : (isFuture ? 'minutu' : 'minutou');
- case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago
- if (withoutSuffix || isFuture) {
- return result + (plural(num) ? 'minuty' : 'minut');
- }
- else {
- return result + 'minutami';
- }
- // break;
- case 'h': // an hour / in an hour / an hour ago
- return withoutSuffix ? 'hodina' : (isFuture ? 'hodinu' : 'hodinou');
- case 'hh': // 9 hours / in 9 hours / 9 hours ago
- if (withoutSuffix || isFuture) {
- return result + (plural(num) ? 'hodiny' : 'hodin');
- }
- else {
- return result + 'hodinami';
- }
- // break;
- case 'd': // a day / in a day / a day ago
- return (withoutSuffix || isFuture) ? 'den' : 'dnem';
- case 'dd': // 9 days / in 9 days / 9 days ago
- if (withoutSuffix || isFuture) {
- return result + (plural(num) ? 'dny' : 'dní');
- }
- else {
- return result + 'dny';
- }
- // break;
- case 'M': // a month / in a month / a month ago
- return (withoutSuffix || isFuture) ? 'měsíc' : 'měsícem';
- case 'MM': // 9 months / in 9 months / 9 months ago
- if (withoutSuffix || isFuture) {
- return result + (plural(num) ? 'měsíce' : 'měsíců');
- }
- else {
- return result + 'měsíci';
- }
- // break;
- case 'y': // a year / in a year / a year ago
- return (withoutSuffix || isFuture) ? 'rok' : 'rokem';
- case 'yy': // 9 years / in 9 years / 9 years ago
- if (withoutSuffix || isFuture) {
- return result + (plural(num) ? 'roky' : 'let');
- }
- else {
- return result + 'lety';
- }
- // break;
- }
- }
- var ɵ0$2 = /**
- * @param {?} months
- * @param {?} monthsShort
- * @return {?}
- */
- function (months, monthsShort) {
- /** @type {?} */
- var i;
- /** @type {?} */
- var _monthsParse = [];
- for (i = 0; i < 12; i++) {
- // use custom parser to solve problem with July (červenec)
- _monthsParse[i] = new RegExp('^' + months[i] + '$|^' + monthsShort[i] + '$', 'i');
- }
- return _monthsParse;
- }, ɵ1 = /**
- * @param {?} monthsShort
- * @return {?}
- */
- function (monthsShort) {
- /** @type {?} */
- var i;
- /** @type {?} */
- var _shortMonthsParse = [];
- for (i = 0; i < 12; i++) {
- _shortMonthsParse[i] = new RegExp('^' + monthsShort[i] + '$', 'i');
- }
- return _shortMonthsParse;
- }, ɵ2 = /**
- * @param {?} months
- * @return {?}
- */
- function (months) {
- /** @type {?} */
- var i;
- /** @type {?} */
- var _longMonthsParse = [];
- for (i = 0; i < 12; i++) {
- _longMonthsParse[i] = new RegExp('^' + months[i] + '$', 'i');
- }
- return _longMonthsParse;
- };
- /** @type {?} */
- var csLocale = {
- abbr: 'cs',
- months: months$1,
- monthsShort: monthsShort$1,
- monthsParse: ((ɵ0$2)(months$1, monthsShort$1)),
- shortMonthsParse: ((ɵ1)(monthsShort$1)),
- longMonthsParse: ((ɵ2)(months$1)),
- weekdays: 'neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota'.split('_'),
- weekdaysShort: 'ne_po_út_st_čt_pá_so'.split('_'),
- weekdaysMin: 'ne_po_út_st_čt_pá_so'.split('_'),
- longDateFormat: {
- LT: 'H:mm',
- LTS: 'H:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D. MMMM YYYY',
- LLL: 'D. MMMM YYYY H:mm',
- LLLL: 'dddd D. MMMM YYYY H:mm',
- l: 'D. M. YYYY'
- },
- calendar: {
- sameDay: '[dnes v] LT',
- nextDay: '[zítra v] LT',
- nextWeek: /**
- * @param {?} date
- * @return {?}
- */
- function (date) {
- switch (getDayOfWeek(date)) {
- case 0:
- return '[v neděli v] LT';
- case 1:
- case 2:
- return '[v] dddd [v] LT';
- case 3:
- return '[ve středu v] LT';
- case 4:
- return '[ve čtvrtek v] LT';
- case 5:
- return '[v pátek v] LT';
- case 6:
- return '[v sobotu v] LT';
- }
- },
- lastDay: '[včera v] LT',
- lastWeek: /**
- * @param {?} date
- * @return {?}
- */
- function (date) {
- switch (getDayOfWeek(date)) {
- case 0:
- return '[minulou neděli v] LT';
- case 1:
- case 2:
- return '[minulé] dddd [v] LT';
- case 3:
- return '[minulou středu v] LT';
- case 4:
- case 5:
- return '[minulý] dddd [v] LT';
- case 6:
- return '[minulou sobotu v] LT';
- }
- },
- sameElse: 'L'
- },
- relativeTime: {
- future: 'za %s',
- past: 'před %s',
- s: translate,
- ss: translate,
- m: translate,
- mm: translate,
- h: translate,
- hh: translate,
- d: translate,
- dd: translate,
- M: translate,
- MM: translate,
- y: translate,
- yy: translate
- },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1,
- // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // tslint:disable:comment-format
- //! moment.js locale configuration
- //! locale : Danish (Denmark) [da]
- //! author : Per Hansen : https://github.com/perhp
- /** @type {?} */
- var daLocale = {
- abbr: 'da',
- months: 'Januar_Februar_Marts_April_Maj_Juni_Juli_August_September_Oktober_November_December'.split('_'),
- monthsShort: 'Jan_Feb_Mar_Apr_Maj_Jun_Jul_Aug_Sep_Okt_Nov_Dec'.split('_'),
- weekdays: 'Søndag_Mandag_Tirsdag_Onsdag_Torsdag_Fredag_Lørdag'.split('_'),
- weekdaysShort: 'Søn_Man_Tir_Ons_Tor_Fre_Lør'.split('_'),
- weekdaysMin: 'Sø_Ma_Ti_On_To_Fr_Lø'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D. MMMM YYYY',
- LLL: 'D. MMMM YYYY HH:mm',
- LLLL: 'dddd [d.] D. MMMM YYYY [kl.] HH:mm'
- },
- calendar: {
- sameDay: '[i dag kl.] LT',
- nextDay: '[i morgen kl.] LT',
- nextWeek: 'på dddd [kl.] LT',
- lastDay: '[i går kl.] LT',
- lastWeek: '[i] dddd[s kl.] LT',
- sameElse: 'L'
- },
- relativeTime: {
- future: 'om %s',
- past: '%s siden',
- s: 'få sekunder',
- m: 'et minut',
- mm: '%d minutter',
- h: 'en time',
- hh: '%d timer',
- d: 'en dag',
- dd: '%d dage',
- M: 'en måned',
- MM: '%d måneder',
- y: 'et år',
- yy: '%d år'
- },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1,
- // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // tslint:disable:comment-format binary-expression-operand-order max-line-length
- // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
- // tslint:disable:no-shadowed-variable switch-default prefer-const
- // tslint:disable:one-variable-per-declaration newline-before-return
- // tslint:disable:object-literal-key-quotes
- //! moment.js locale configuration
- //! locale : German [de]
- //! author : lluchs : https://github.com/lluchs
- //! author: Menelion Elensúle: https://github.com/Oire
- //! author : Mikolaj Dadela : https://github.com/mik01aj
- /**
- * @param {?} num
- * @param {?} withoutSuffix
- * @param {?} key
- * @param {?} isFuture
- * @return {?}
- */
- function processRelativeTime(num, withoutSuffix, key, isFuture) {
- /** @type {?} */
- var format = {
- 'm': ['eine Minute', 'einer Minute'],
- 'h': ['eine Stunde', 'einer Stunde'],
- 'd': ['ein Tag', 'einem Tag'],
- 'dd': [num + ' Tage', num + ' Tagen'],
- 'M': ['ein Monat', 'einem Monat'],
- 'MM': [num + ' Monate', num + ' Monaten'],
- 'y': ['ein Jahr', 'einem Jahr'],
- 'yy': [num + ' Jahre', num + ' Jahren']
- };
- return withoutSuffix ? format[key][0] : format[key][1];
- }
- /** @type {?} */
- var deLocale = {
- abbr: 'de',
- months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'),
- monthsShort: 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),
- monthsParseExact: true,
- weekdays: 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'),
- weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),
- weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D. MMMM YYYY',
- LLL: 'D. MMMM YYYY HH:mm',
- LLLL: 'dddd, D. MMMM YYYY HH:mm'
- },
- calendar: {
- sameDay: '[heute um] LT [Uhr]',
- sameElse: 'L',
- nextDay: '[morgen um] LT [Uhr]',
- nextWeek: 'dddd [um] LT [Uhr]',
- lastDay: '[gestern um] LT [Uhr]',
- lastWeek: '[letzten] dddd [um] LT [Uhr]'
- },
- relativeTime: {
- future: 'in %s',
- past: 'vor %s',
- s: 'ein paar Sekunden',
- ss: '%d Sekunden',
- m: processRelativeTime,
- mm: '%d Minuten',
- h: processRelativeTime,
- hh: '%d Stunden',
- d: processRelativeTime,
- dd: processRelativeTime,
- M: processRelativeTime,
- MM: processRelativeTime,
- y: processRelativeTime,
- yy: processRelativeTime
- },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1,
- // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // tslint:disable:comment-format binary-expression-operand-order max-line-length
- // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
- // tslint:disable:no-shadowed-variable switch-default prefer-const
- // tslint:disable:one-variable-per-declaration newline-before-return
- //! moment.js locale configuration
- //! locale : English (United Kingdom) [en-gb]
- //! author : Chris Gedrim : https://github.com/chrisgedrim
- /** @type {?} */
- var enGbLocale = {
- abbr: 'en-gb',
- months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),
- monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
- weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
- weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
- weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd, D MMMM YYYY HH:mm'
- },
- calendar: {
- sameDay: '[Today at] LT',
- nextDay: '[Tomorrow at] LT',
- nextWeek: 'dddd [at] LT',
- lastDay: '[Yesterday at] LT',
- lastWeek: '[Last] dddd [at] LT',
- sameElse: 'L'
- },
- relativeTime: {
- future: 'in %s',
- past: '%s ago',
- s: 'a few seconds',
- ss: '%d seconds',
- m: 'a minute',
- mm: '%d minutes',
- h: 'an hour',
- hh: '%d hours',
- d: 'a day',
- dd: '%d days',
- M: 'a month',
- MM: '%d months',
- y: 'a year',
- yy: '%d years'
- },
- dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
- ordinal: /**
- * @param {?} _num
- * @return {?}
- */
- function (_num) {
- /** @type {?} */
- var num = Number(_num);
- /** @type {?} */
- var b = num % 10;
- /** @type {?} */
- var output = (~~(num % 100 / 10) === 1) ? 'th' :
- (b === 1) ? 'st' :
- (b === 2) ? 'nd' :
- (b === 3) ? 'rd' : 'th';
- return num + output;
- },
- week: {
- dow: 1,
- // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- //! moment.js locale configuration
- //! locale : Spanish (Dominican Republic) [es-do]
- /** @type {?} */
- var monthsShortDot$1 = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_');
- /** @type {?} */
- var monthsShort$2 = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_');
- /** @type {?} */
- var monthsParse$1 = [/^ene/i, /^feb/i, /^mar/i, /^abr/i, /^may/i, /^jun/i, /^jul/i, /^ago/i, /^sep/i, /^oct/i, /^nov/i, /^dic/i];
- /** @type {?} */
- var monthsRegex$1 = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;
- /** @type {?} */
- var esDoLocale = {
- abbr: 'es-do',
- months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),
- monthsShort: /**
- * @param {?} date
- * @param {?} format
- * @param {?=} isUTC
- * @return {?}
- */
- function (date, format, isUTC) {
- if (!date) {
- return monthsShortDot$1;
- }
- else if (/-MMM-/.test(format)) {
- return monthsShort$2[getMonth(date, isUTC)];
- }
- else {
- return monthsShortDot$1[getMonth(date, isUTC)];
- }
- },
- monthsRegex: monthsRegex$1,
- monthsShortRegex: monthsRegex$1,
- monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
- monthsShortStrictRegex: /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
- monthsParse: monthsParse$1,
- longMonthsParse: monthsParse$1,
- shortMonthsParse: monthsParse$1,
- weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
- weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
- weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'h:mm A',
- LTS: 'h:mm:ss A',
- L: 'DD/MM/YYYY',
- LL: 'D [de] MMMM [de] YYYY',
- LLL: 'D [de] MMMM [de] YYYY h:mm A',
- LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A'
- },
- calendar: {
- sameDay: /**
- * @param {?} date
- * @return {?}
- */
- function (date) {
- return '[hoy a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
- },
- nextDay: /**
- * @param {?} date
- * @return {?}
- */
- function (date) {
- return '[mañana a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
- },
- nextWeek: /**
- * @param {?} date
- * @return {?}
- */
- function (date) {
- return 'dddd [a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
- },
- lastDay: /**
- * @param {?} date
- * @return {?}
- */
- function (date) {
- return '[ayer a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
- },
- lastWeek: /**
- * @param {?} date
- * @return {?}
- */
- function (date) {
- return '[el] dddd [pasado a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
- },
- sameElse: 'L'
- },
- relativeTime: {
- future: 'en %s',
- past: 'hace %s',
- s: 'unos segundos',
- ss: '%d segundos',
- m: 'un minuto',
- mm: '%d minutos',
- h: 'una hora',
- hh: '%d horas',
- d: 'un día',
- dd: '%d días',
- M: 'un mes',
- MM: '%d meses',
- y: 'un año',
- yy: '%d años'
- },
- dayOfMonthOrdinalParse: /\d{1,2}º/,
- ordinal: '%dº',
- week: {
- dow: 1,
- // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- //! moment.js locale configuration
- //! locale : Spanish [es]
- //! author : Julio Napurí : https://github.com/julionc
- /** @type {?} */
- var monthsShortDot$2 = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_');
- /** @type {?} */
- var monthsShort$3 = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_');
- /** @type {?} */
- var monthsParse$2 = [/^ene/i, /^feb/i, /^mar/i, /^abr/i, /^may/i, /^jun/i, /^jul/i, /^ago/i, /^sep/i, /^oct/i, /^nov/i, /^dic/i];
- /** @type {?} */
- var monthsRegex$2 = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;
- /** @type {?} */
- var esLocale = {
- abbr: 'es',
- months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),
- monthsShort: /**
- * @param {?} date
- * @param {?} format
- * @param {?=} isUTC
- * @return {?}
- */
- function (date, format, isUTC) {
- if (!date) {
- return monthsShortDot$2;
- }
- if (/-MMM-/.test(format)) {
- return monthsShort$3[getMonth(date, isUTC)];
- }
- return monthsShortDot$2[getMonth(date, isUTC)];
- },
- monthsRegex: monthsRegex$2,
- monthsShortRegex: monthsRegex$2,
- monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
- monthsShortStrictRegex: /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
- monthsParse: monthsParse$2,
- longMonthsParse: monthsParse$2,
- shortMonthsParse: monthsParse$2,
- weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
- weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
- weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'H:mm',
- LTS: 'H:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D [de] MMMM [de] YYYY',
- LLL: 'D [de] MMMM [de] YYYY H:mm',
- LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm'
- },
- calendar: {
- sameDay: /**
- * @param {?} date
- * @return {?}
- */
- function (date) {
- return '[hoy a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
- },
- nextDay: /**
- * @param {?} date
- * @return {?}
- */
- function (date) {
- return '[mañana a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
- },
- nextWeek: /**
- * @param {?} date
- * @return {?}
- */
- function (date) {
- return 'dddd [a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
- },
- lastDay: /**
- * @param {?} date
- * @return {?}
- */
- function (date) {
- return '[ayer a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
- },
- lastWeek: /**
- * @param {?} date
- * @return {?}
- */
- function (date) {
- return '[el] dddd [pasado a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
- },
- sameElse: 'L'
- },
- relativeTime: {
- future: 'en %s',
- past: 'hace %s',
- s: 'unos segundos',
- ss: '%d segundos',
- m: 'un minuto',
- mm: '%d minutos',
- h: 'una hora',
- hh: '%d horas',
- d: 'un día',
- dd: '%d días',
- M: 'un mes',
- MM: '%d meses',
- y: 'un año',
- yy: '%d años'
- },
- dayOfMonthOrdinalParse: /\d{1,2}º/,
- ordinal: '%dº',
- week: {
- dow: 1,
- // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- //! moment.js locale configuration
- //! locale : Spanish (United States) [es-us]
- //! author : bustta : https://github.com/bustta
- /** @type {?} */
- var monthsShortDot$3 = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_');
- /** @type {?} */
- var monthsShort$4 = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_');
- /** @type {?} */
- var esUsLocale = {
- abbr: 'es-us',
- months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),
- monthsShort: /**
- * @param {?} date
- * @param {?} format
- * @param {?=} isUTC
- * @return {?}
- */
- function (date, format, isUTC) {
- if (!date) {
- return monthsShortDot$3;
- }
- else if (/-MMM-/.test(format)) {
- return monthsShort$4[getMonth(date, isUTC)];
- }
- else {
- return monthsShortDot$3[getMonth(date, isUTC)];
- }
- },
- monthsParseExact: true,
- weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
- weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
- weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'h:mm A',
- LTS: 'h:mm:ss A',
- L: 'MM/DD/YYYY',
- LL: 'MMMM [de] D [de] YYYY',
- LLL: 'MMMM [de] D [de] YYYY h:mm A',
- LLLL: 'dddd, MMMM [de] D [de] YYYY h:mm A'
- },
- calendar: {
- sameDay: /**
- * @param {?} date
- * @return {?}
- */
- function (date) {
- return '[hoy a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
- },
- nextDay: /**
- * @param {?} date
- * @return {?}
- */
- function (date) {
- return '[mañana a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
- },
- nextWeek: /**
- * @param {?} date
- * @return {?}
- */
- function (date) {
- return 'dddd [a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
- },
- lastDay: /**
- * @param {?} date
- * @return {?}
- */
- function (date) {
- return '[ayer a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
- },
- lastWeek: /**
- * @param {?} date
- * @return {?}
- */
- function (date) {
- return '[el] dddd [pasado a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
- },
- sameElse: 'L'
- },
- relativeTime: {
- future: 'en %s',
- past: 'hace %s',
- s: 'unos segundos',
- ss: '%d segundos',
- m: 'un minuto',
- mm: '%d minutos',
- h: 'una hora',
- hh: '%d horas',
- d: 'un día',
- dd: '%d días',
- M: 'un mes',
- MM: '%d meses',
- y: 'un año',
- yy: '%d años'
- },
- dayOfMonthOrdinalParse: /\d{1,2}º/,
- ordinal: '%dº',
- week: {
- dow: 0,
- // Sunday is the first day of the week.
- doy: 6 // The week that contains Jan 1st is the first week of the year.
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // tslint:disable:comment-format binary-expression-operand-order max-line-length
- // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
- // tslint:disable:no-shadowed-variable switch-default prefer-const
- // tslint:disable:one-variable-per-declaration newline-before-return
- //! moment.js locale configuration
- //! locale : Estonian [et]
- //! author : Chris Gedrim : https://github.com/a90machado
- /** @type {?} */
- var processRelativeTime$1 = (/**
- * @param {?} num
- * @param {?} withoutSuffix
- * @param {?} key
- * @param {?} isFuture
- * @return {?}
- */
- function (num, withoutSuffix, key, isFuture) {
- /** @type {?} */
- var format = {
- s: ['mõne sekundi', 'mõni sekund', 'paar sekundit'],
- ss: [num + 'sekundi', num + 'sekundit'],
- m: ['ühe minuti', 'üks minut'],
- mm: [num + ' minuti', num + ' minutit'],
- h: ['ühe tunni', 'tund aega', 'üks tund'],
- hh: [num + ' tunni', num + ' tundi'],
- d: ['ühe päeva', 'üks päev'],
- M: ['kuu aja', 'kuu aega', 'üks kuu'],
- MM: [num + ' kuu', num + ' kuud'],
- y: ['ühe aasta', 'aasta', 'üks aasta'],
- yy: [num + ' aasta', num + ' aastat']
- };
- if (withoutSuffix) {
- return format[key][2] ? format[key][2] : format[key][1];
- }
- return isFuture ? format[key][0] : format[key][1];
- });
- /** @type {?} */
- var etLocale = {
- abbr: 'et',
- months: 'jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember'.split('_'),
- monthsShort: 'jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets'.split('_'),
- weekdays: 'pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev'.split('_'),
- weekdaysShort: 'P_E_T_K_N_R_L'.split('_'),
- weekdaysMin: 'P_E_T_K_N_R_L'.split('_'),
- longDateFormat: {
- LT: 'H:mm',
- LTS: 'H:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D. MMMM YYYY',
- LLL: 'D. MMMM YYYY H:mm',
- LLLL: 'dddd, D. MMMM YYYY H:mm'
- },
- calendar: {
- sameDay: '[Täna,] LT',
- nextDay: '[Homme,] LT',
- nextWeek: '[Järgmine] dddd LT',
- lastDay: '[Eile,] LT',
- lastWeek: '[Eelmine] dddd LT',
- sameElse: 'L'
- },
- relativeTime: {
- future: '%s pärast',
- past: '%s tagasi',
- s: processRelativeTime$1,
- ss: processRelativeTime$1,
- m: processRelativeTime$1,
- mm: processRelativeTime$1,
- h: processRelativeTime$1,
- hh: processRelativeTime$1,
- d: processRelativeTime$1,
- dd: '%d päeva',
- M: processRelativeTime$1,
- MM: processRelativeTime$1,
- y: processRelativeTime$1,
- yy: processRelativeTime$1
- },
- dayOfMonthOrdinalParse: /\d{1,2}./,
- ordinal: '%d.',
- week: {
- dow: 1,
- // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // tslint:disable:comment-format binary-expression-operand-order max-line-length
- // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
- // tslint:disable:no-shadowed-variable switch-default prefer-const
- // tslint:disable:one-variable-per-declaration newline-before-return
- //! moment.js locale configuration
- // https://github.com/moment/moment/blob/develop/locale/fi.js
- /** @type {?} */
- var numbersPast = 'nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän'.split(' ');
- /** @type {?} */
- var numbersFuture = [
- 'nolla', 'yhden', 'kahden', 'kolmen', 'neljän', 'viiden', 'kuuden',
- numbersPast[7], numbersPast[8], numbersPast[9]
- ];
- /**
- * @param {?} num
- * @param {?} withoutSuffix
- * @param {?} key
- * @param {?} isFuture
- * @return {?}
- */
- function translate$1(num, withoutSuffix, key, isFuture) {
- /** @type {?} */
- var result = '';
- switch (key) {
- case 's':
- return isFuture ? 'muutaman sekunnin' : 'muutama sekunti';
- case 'ss':
- return isFuture ? 'sekunnin' : 'sekuntia';
- case 'm':
- return isFuture ? 'minuutin' : 'minuutti';
- case 'mm':
- result = isFuture ? 'minuutin' : 'minuuttia';
- break;
- case 'h':
- return isFuture ? 'tunnin' : 'tunti';
- case 'hh':
- result = isFuture ? 'tunnin' : 'tuntia';
- break;
- case 'd':
- return isFuture ? 'päivän' : 'päivä';
- case 'dd':
- result = isFuture ? 'päivän' : 'päivää';
- break;
- case 'M':
- return isFuture ? 'kuukauden' : 'kuukausi';
- case 'MM':
- result = isFuture ? 'kuukauden' : 'kuukautta';
- break;
- case 'y':
- return isFuture ? 'vuoden' : 'vuosi';
- case 'yy':
- result = isFuture ? 'vuoden' : 'vuotta';
- break;
- }
- result = verbalNumber(num, isFuture) + ' ' + result;
- return result;
- }
- /**
- * @param {?} num
- * @param {?} isFuture
- * @return {?}
- */
- function verbalNumber(num, isFuture) {
- return num < 10 ? (isFuture ? numbersFuture[num] : numbersPast[num]) : num;
- }
- /** @type {?} */
- var fiLocale = {
- abbr: 'fi',
- months: 'tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu'.split('_'),
- monthsShort: 'tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu'.split('_'),
- weekdays: 'sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai'.split('_'),
- weekdaysShort: 'su_ma_ti_ke_to_pe_la'.split('_'),
- weekdaysMin: 'su_ma_ti_ke_to_pe_la'.split('_'),
- longDateFormat: {
- LT: 'HH.mm',
- LTS: 'HH.mm.ss',
- L: 'DD.MM.YYYY',
- LL: 'Do MMMM[ta] YYYY',
- LLL: 'Do MMMM[ta] YYYY, [klo] HH.mm',
- LLLL: 'dddd, Do MMMM[ta] YYYY, [klo] HH.mm',
- l: 'D.M.YYYY',
- ll: 'Do MMM YYYY',
- lll: 'Do MMM YYYY, [klo] HH.mm',
- llll: 'ddd, Do MMM YYYY, [klo] HH.mm'
- },
- calendar: {
- sameDay: '[tänään] [klo] LT',
- nextDay: '[huomenna] [klo] LT',
- nextWeek: 'dddd [klo] LT',
- lastDay: '[eilen] [klo] LT',
- lastWeek: '[viime] dddd[na] [klo] LT',
- sameElse: 'L'
- },
- relativeTime: {
- future: '%s päästä',
- past: '%s sitten',
- s: translate$1,
- ss: translate$1,
- m: translate$1,
- mm: translate$1,
- h: translate$1,
- hh: translate$1,
- d: translate$1,
- dd: translate$1,
- M: translate$1,
- MM: translate$1,
- y: translate$1,
- yy: translate$1
- },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1,
- // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // tslint:disable:comment-format binary-expression-operand-order max-line-length
- // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
- // tslint:disable:no-shadowed-variable switch-default prefer-const
- // tslint:disable:one-variable-per-declaration newline-before-return
- //! moment.js locale configuration
- //! locale : French [fr]
- //! author : John Fischer : https://github.com/jfroffice
- /** @type {?} */
- var frLocale = {
- abbr: 'fr',
- months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'),
- monthsShort: 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'),
- monthsParseExact: true,
- weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),
- weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),
- weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd D MMMM YYYY HH:mm'
- },
- calendar: {
- sameDay: '[Aujourd’hui à] LT',
- nextDay: '[Demain à] LT',
- nextWeek: 'dddd [à] LT',
- lastDay: '[Hier à] LT',
- lastWeek: 'dddd [dernier à] LT',
- sameElse: 'L'
- },
- relativeTime: {
- future: 'dans %s',
- past: 'il y a %s',
- s: 'quelques secondes',
- ss: '%d secondes',
- m: 'une minute',
- mm: '%d minutes',
- h: 'une heure',
- hh: '%d heures',
- d: 'un jour',
- dd: '%d jours',
- M: 'un mois',
- MM: '%d mois',
- y: 'un an',
- yy: '%d ans'
- },
- dayOfMonthOrdinalParse: /\d{1,2}(er|)/,
- ordinal: /**
- * @param {?} _num
- * @param {?} period
- * @return {?}
- */
- function (_num, period) {
- /** @type {?} */
- var num = Number(_num);
- switch (period) {
- // TODO: Return 'e' when day of month > 1. Move this case inside
- // block for masculine words below.
- // See https://github.com/moment/moment/issues/3375
- case 'D':
- return num + (num === 1 ? 'er' : '');
- // Words with masculine grammatical gender: mois, trimestre, jour
- default:
- case 'M':
- case 'Q':
- case 'DDD':
- case 'd':
- return num + (num === 1 ? 'er' : 'e');
- // Words with feminine grammatical gender: semaine
- case 'w':
- case 'W':
- return num + (num === 1 ? 're' : 'e');
- }
- },
- week: {
- dow: 1,
- // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- //! moment.js locale configuration
- //! locale : Galician [gl]
- //! author : Darío Beiró : https://github.com/quinobravo
- /** @type {?} */
- var monthsShortDot$4 = 'xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.'.split('_');
- /** @type {?} */
- var monthsShort$5 = 'xan_feb_mar_abr_mai_xuñ_xul_ago_set_out_nov_dec'.split('_');
- /** @type {?} */
- var monthsParse$3 = [/^xan/i, /^feb/i, /^mar/i, /^abr/i, /^mai/i, /^xuñ/i, /^xul/i, /^ago/i, /^set/i, /^out/i, /^nov/i, /^dec/i];
- /** @type {?} */
- var monthsRegex$3 = /^(xaneiro|febreiro|marzo|abril|maio|xuño|xullo|agosto|setembro|outubro|novembro|decembro|xan\.?|feb\.?|mar\.?|abr\.?|mai\.?|xuñ\.?|xul\.?|ago\.?|set\.?|out\.?|nov\.?|dec\.?)/i;
- /** @type {?} */
- var glLocale = {
- abbr: 'gl',
- months: 'xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro'.split('_'),
- monthsShort: /**
- * @param {?} date
- * @param {?} format
- * @param {?=} isUTC
- * @return {?}
- */
- function (date, format, isUTC) {
- if (!date) {
- return monthsShortDot$4;
- }
- if (/-MMM-/.test(format)) {
- return monthsShort$5[getMonth(date, isUTC)];
- }
- return monthsShortDot$4[getMonth(date, isUTC)];
- },
- monthsRegex: monthsRegex$3,
- monthsShortRegex: monthsRegex$3,
- monthsStrictRegex: /^(xaneiro|febreiro|marzo|abril|maio|xuño|xullo|agosto|setembro|outubro|novembro|decembro)/i,
- monthsShortStrictRegex: /^(xan\.?|feb\.?|mar\.?|abr\.?|mai\.?|xuñ\.?|xul\.?|ago\.?|set\.?|out\.?|nov\.?|dec\.?)/i,
- monthsParse: monthsParse$3,
- longMonthsParse: monthsParse$3,
- shortMonthsParse: monthsParse$3,
- weekdays: 'domingo_luns_martes_mércores_xoves_venres_sábado'.split('_'),
- weekdaysShort: 'dom._lun._mar._mér._xov._ven._sáb.'.split('_'),
- weekdaysMin: 'do_lu_ma_mé_xo_ve_sá'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'H:mm',
- LTS: 'H:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D [de] MMMM [de] YYYY',
- LLL: 'D [de] MMMM [de] YYYY H:mm',
- LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm'
- },
- calendar: {
- sameDay: /**
- * @param {?} date
- * @return {?}
- */
- function (date) {
- return '[hoxe á' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
- },
- nextDay: /**
- * @param {?} date
- * @return {?}
- */
- function (date) {
- return '[mañan á' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
- },
- nextWeek: /**
- * @param {?} date
- * @return {?}
- */
- function (date) {
- return 'dddd [á' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
- },
- lastDay: /**
- * @param {?} date
- * @return {?}
- */
- function (date) {
- return '[onte á' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
- },
- lastWeek: /**
- * @param {?} date
- * @return {?}
- */
- function (date) {
- return '[o] dddd [pasado á' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
- },
- sameElse: 'L'
- },
- relativeTime: {
- future: 'en %s',
- past: 'fai %s',
- s: 'uns segundos',
- ss: '%d segundos',
- m: 'un minuto',
- mm: '%d minutos',
- h: 'unha hora',
- hh: '%d horas',
- d: 'un día',
- dd: '%d días',
- M: 'un mes',
- MM: '%d meses',
- y: 'un ano',
- yy: '%d anos'
- },
- dayOfMonthOrdinalParse: /\d{1,2}º/,
- ordinal: '%dº',
- week: {
- dow: 1,
- // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // tslint:disable:comment-format binary-expression-operand-order max-line-length
- // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
- // tslint:disable:no-shadowed-variable switch-default prefer-const
- // tslint:disable:one-variable-per-declaration newline-before-return
- //! moment.js locale configuration
- //! locale : Hebrew [he]
- //! author : Tomer Cohen : https://github.com/tomer
- //! author : Moshe Simantov : https://github.com/DevelopmentIL
- //! author : Tal Ater : https://github.com/TalAter
- /** @type {?} */
- var heLocale = {
- abbr: 'he',
- months: 'ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר'.split('_'),
- monthsShort: 'ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳'.split('_'),
- weekdays: 'ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת'.split('_'),
- weekdaysShort: 'א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳'.split('_'),
- weekdaysMin: 'א_ב_ג_ד_ה_ו_ש'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D [ב]MMMM YYYY',
- LLL: 'D [ב]MMMM YYYY HH:mm',
- LLLL: 'dddd, D [ב]MMMM YYYY HH:mm',
- l: 'D/M/YYYY',
- ll: 'D MMM YYYY',
- lll: 'D MMM YYYY HH:mm',
- llll: 'ddd, D MMM YYYY HH:mm'
- },
- calendar: {
- sameDay: '[היום ב־]LT',
- nextDay: '[מחר ב־]LT',
- nextWeek: 'dddd [בשעה] LT',
- lastDay: '[אתמול ב־]LT',
- lastWeek: '[ביום] dddd [האחרון בשעה] LT',
- sameElse: 'L'
- },
- relativeTime: {
- future: 'בעוד %s',
- past: 'לפני %s',
- s: 'מספר שניות',
- ss: '%d שניות',
- m: 'דקה',
- mm: '%d דקות',
- h: 'שעה',
- hh: /**
- * @param {?} num
- * @return {?}
- */
- function (num) {
- if (num === 2) {
- return 'שעתיים';
- }
- return num + ' שעות';
- },
- d: 'יום',
- dd: /**
- * @param {?} num
- * @return {?}
- */
- function (num) {
- if (num === 2) {
- return 'יומיים';
- }
- return num + ' ימים';
- },
- M: 'חודש',
- MM: /**
- * @param {?} num
- * @return {?}
- */
- function (num) {
- if (num === 2) {
- return 'חודשיים';
- }
- return num + ' חודשים';
- },
- y: 'שנה',
- yy: /**
- * @param {?} num
- * @return {?}
- */
- function (num) {
- if (num === 2) {
- return 'שנתיים';
- }
- else if (num % 10 === 0 && num !== 10) {
- return num + ' שנה';
- }
- return num + ' שנים';
- }
- },
- meridiemParse: /אחה"צ|לפנה"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,
- isPM: /**
- * @param {?} input
- * @return {?}
- */
- function (input) {
- return /^(אחה"צ|אחרי הצהריים|בערב)$/.test(input);
- },
- meridiem: /**
- * @param {?} hour
- * @param {?} minute
- * @param {?} isLower
- * @return {?}
- */
- function (hour, minute, isLower) {
- if (hour < 5) {
- return 'לפנות בוקר';
- }
- else if (hour < 10) {
- return 'בבוקר';
- }
- else if (hour < 12) {
- return isLower ? 'לפנה"צ' : 'לפני הצהריים';
- }
- else if (hour < 18) {
- return isLower ? 'אחה"צ' : 'אחרי הצהריים';
- }
- else {
- return 'בערב';
- }
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // tslint:disable:comment-format binary-expression-operand-order max-line-length
- // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
- // tslint:disable:no-shadowed-variable switch-default prefer-const
- // tslint:disable:one-variable-per-declaration newline-before-return
- // tslint:disable:no-parameter-reassignment prefer-switch
- //! moment.js locale configuration
- //! locale : Hindi [hi]
- //! author : Mayank Singhal : https://github.com/mayanksinghal
- /** @type {?} */
- var symbolMap$1 = {
- 1: '१',
- 2: '२',
- 3: '३',
- 4: '४',
- 5: '५',
- 6: '६',
- 7: '७',
- 8: '८',
- 9: '९',
- 0: '०'
- };
- /** @type {?} */
- var numberMap$1 = {
- '१': '1',
- '२': '2',
- '३': '3',
- '४': '4',
- '५': '5',
- '६': '6',
- '७': '7',
- '८': '8',
- '९': '9',
- '०': '0'
- };
- /** @type {?} */
- var hiLocale = {
- abbr: 'hi',
- months: 'जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर'.split('_'),
- monthsShort: 'जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.'.split('_'),
- monthsParseExact: true,
- weekdays: 'रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),
- weekdaysShort: 'रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि'.split('_'),
- weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'),
- longDateFormat: {
- LT: 'A h:mm बजे',
- LTS: 'A h:mm:ss बजे',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY, A h:mm बजे',
- LLLL: 'dddd, D MMMM YYYY, A h:mm बजे'
- },
- calendar: {
- sameDay: '[आज] LT',
- nextDay: '[कल] LT',
- nextWeek: 'dddd, LT',
- lastDay: '[कल] LT',
- lastWeek: '[पिछले] dddd, LT',
- sameElse: 'L'
- },
- relativeTime: {
- future: '%s में',
- past: '%s पहले',
- s: 'कुछ ही क्षण',
- ss: '%d सेकंड',
- m: 'एक मिनट',
- mm: '%d मिनट',
- h: 'एक घंटा',
- hh: '%d घंटे',
- d: 'एक दिन',
- dd: '%d दिन',
- M: 'एक महीने',
- MM: '%d महीने',
- y: 'एक वर्ष',
- yy: '%d वर्ष'
- },
- preparse: /**
- * @param {?} str
- * @return {?}
- */
- function (str) {
- return str.replace(/[१२३४५६७८९०]/g, (/**
- * @param {?} match
- * @return {?}
- */
- function (match) {
- return numberMap$1[match];
- }));
- },
- postformat: /**
- * @param {?} str
- * @return {?}
- */
- function (str) {
- return str.replace(/\d/g, (/**
- * @param {?} match
- * @return {?}
- */
- function (match) {
- return symbolMap$1[match];
- }));
- },
- // Hindi notation for meridiems are quite fuzzy in practice. While there exists
- // a rigid notion of a 'Pahar' it is not used as rigidly in modern Hindi.
- meridiemParse: /रात|सुबह|दोपहर|शाम/,
- meridiemHour: /**
- * @param {?} hour
- * @param {?} meridiem
- * @return {?}
- */
- function (hour, meridiem) {
- if (hour === 12) {
- hour = 0;
- }
- if (meridiem === 'रात') {
- return hour < 4 ? hour : hour + 12;
- }
- else if (meridiem === 'सुबह') {
- return hour;
- }
- else if (meridiem === 'दोपहर') {
- return hour >= 10 ? hour : hour + 12;
- }
- else if (meridiem === 'शाम') {
- return hour + 12;
- }
- },
- meridiem: /**
- * @param {?} hour
- * @param {?} minute
- * @param {?} isLower
- * @return {?}
- */
- function (hour, minute, isLower) {
- if (hour < 4) {
- return 'रात';
- }
- else if (hour < 10) {
- return 'सुबह';
- }
- else if (hour < 17) {
- return 'दोपहर';
- }
- else if (hour < 20) {
- return 'शाम';
- }
- else {
- return 'रात';
- }
- },
- week: {
- dow: 0,
- // Sunday is the first day of the week.
- doy: 6 // The week that contains Jan 1st is the first week of the year.
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- //! moment.js locale configuration
- //! locale : Hungarian [hu]
- //! author : Adam Brunner : https://github.com/adambrunner
- /** @type {?} */
- var weekEndings = 'vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton'.split(' ');
- /**
- * @param {?} num
- * @param {?} withoutSuffix
- * @param {?} key
- * @param {?} isFuture
- * @return {?}
- */
- function translate$2(num, withoutSuffix, key, isFuture) {
- switch (key) {
- case 's':
- return (isFuture || withoutSuffix) ? 'néhány másodperc' : 'néhány másodperce';
- case 'ss':
- return num + ((isFuture || withoutSuffix) ? ' másodperc' : ' másodperce');
- case 'm':
- return 'egy' + (isFuture || withoutSuffix ? ' perc' : ' perce');
- case 'mm':
- return num + (isFuture || withoutSuffix ? ' perc' : ' perce');
- case 'h':
- return 'egy' + (isFuture || withoutSuffix ? ' óra' : ' órája');
- case 'hh':
- return num + (isFuture || withoutSuffix ? ' óra' : ' órája');
- case 'd':
- return 'egy' + (isFuture || withoutSuffix ? ' nap' : ' napja');
- case 'dd':
- return num + (isFuture || withoutSuffix ? ' nap' : ' napja');
- case 'M':
- return 'egy' + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');
- case 'MM':
- return num + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');
- case 'y':
- return 'egy' + (isFuture || withoutSuffix ? ' év' : ' éve');
- case 'yy':
- return num + (isFuture || withoutSuffix ? ' év' : ' éve');
- }
- return '';
- }
- /**
- * @param {?} date
- * @param {?} isFuture
- * @return {?}
- */
- function week(date, isFuture) {
- return (isFuture ? '' : '[múlt] ') + '[' + weekEndings[getDayOfWeek(date)] + '] LT[-kor]';
- }
- /** @type {?} */
- var huLocale = {
- abbr: 'hu',
- months: 'január_február_március_április_május_június_július_augusztus_szeptember_október_november_december'.split('_'),
- monthsShort: 'jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec'.split('_'),
- weekdays: 'vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat'.split('_'),
- weekdaysShort: 'vas_hét_kedd_sze_csüt_pén_szo'.split('_'),
- weekdaysMin: 'v_h_k_sze_cs_p_szo'.split('_'),
- longDateFormat: {
- LT: 'H:mm',
- LTS: 'H:mm:ss',
- L: 'YYYY.MM.DD.',
- LL: 'YYYY. MMMM D.',
- LLL: 'YYYY. MMMM D. H:mm',
- LLLL: 'YYYY. MMMM D., dddd H:mm'
- },
- meridiemParse: /de|du/i,
- isPM: /**
- * @param {?} input
- * @return {?}
- */
- function (input) {
- return input.charAt(1).toLowerCase() === 'u';
- },
- meridiem: /**
- * @param {?} hours
- * @param {?} minutes
- * @param {?} isLower
- * @return {?}
- */
- function (hours, minutes, isLower) {
- if (hours < 12) {
- return isLower === true ? 'de' : 'DE';
- }
- else {
- return isLower === true ? 'du' : 'DU';
- }
- },
- calendar: {
- sameDay: '[ma] LT[-kor]',
- nextDay: '[holnap] LT[-kor]',
- nextWeek: /**
- * @param {?} date
- * @return {?}
- */
- function (date) {
- return week(date, true);
- },
- lastDay: '[tegnap] LT[-kor]',
- lastWeek: /**
- * @param {?} date
- * @return {?}
- */
- function (date) {
- return week(date, false);
- },
- sameElse: 'L'
- },
- relativeTime: {
- future: '%s múlva',
- past: '%s',
- s: translate$2,
- ss: translate$2,
- m: translate$2,
- mm: translate$2,
- h: translate$2,
- hh: translate$2,
- d: translate$2,
- dd: translate$2,
- M: translate$2,
- MM: translate$2,
- y: translate$2,
- yy: translate$2
- },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1,
- // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // tslint:disable:comment-format binary-expression-operand-order max-line-length
- // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
- // tslint:disable:no-shadowed-variable switch-default prefer-const
- // tslint:disable:one-variable-per-declaration newline-before-return
- //! moment.js locale configuration
- //! locale : Croatian [hr]
- //! author : Danijel Grmec : https://github.com/cobaltsis
- /** @type {?} */
- var hrLocale = {
- abbr: 'hr',
- months: 'Siječanj_Veljača_Ožujak_Travanj_Svibanj_Lipanj_Srpanj_Kolovoz_Rujan_Listopad_Studeni_Prosinac'.split('_'),
- monthsShort: 'Sij_Velj_Ožu_Tra_Svi_Lip_Srp_Kol_Ruj_Lis_Stu_Pro'.split('_'),
- weekdays: 'Nedjelja_Ponedjeljak_Utorak_Srijeda_Četvrtak_Petak_Subota'.split('_'),
- weekdaysShort: 'Ned_Pon_Uto_Sri_Čet_Pet_Sub'.split('_'),
- weekdaysMin: 'Ne_Po_Ut_Sr_Če_Pe_Su'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd, D MMMM YYYY HH:mm'
- },
- calendar: {
- sameDay: '[Danas u] LT',
- nextDay: '[Sutra u] LT',
- nextWeek: 'dddd [u] LT',
- lastDay: '[Jučer u] LT',
- lastWeek: '[Zadnji] dddd [u] LT',
- sameElse: 'L'
- },
- invalidDate: 'Neispravan datum',
- relativeTime: {
- future: 'za %s',
- past: '%s prije',
- s: 'nekoliko sekundi',
- ss: '%d sekundi',
- m: 'minuta',
- mm: '%d minuta',
- h: 'sat',
- hh: '%d sati',
- d: 'dan',
- dd: '%d dana',
- M: 'mjesec',
- MM: '%d mjeseci',
- y: 'godina',
- yy: '%d godina'
- },
- dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
- ordinal: /**
- * @param {?} _num
- * @return {?}
- */
- function (_num) {
- /** @type {?} */
- var num = Number(_num);
- /** @type {?} */
- var b = num % 10;
- /** @type {?} */
- var output = (~~(num % 100 / 10) === 1) ? '.' :
- (b === 1) ? '.' :
- (b === 2) ? '.' :
- (b === 3) ? '.' : '.';
- return num + output;
- },
- week: {
- dow: 1,
- // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // tslint:disable:comment-format binary-expression-operand-order max-line-length
- // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
- // tslint:disable:no-shadowed-variable switch-default prefer-const
- // tslint:disable:one-variable-per-declaration newline-before-return
- // tslint:disable:no-parameter-reassignment prefer-switch
- //! moment.js locale configuration
- //! locale : Indonesia [id]
- //! author : Romy Kusuma : https://github.com/rkusuma
- //! reference: https://github.com/moment/moment/blob/develop/locale/id.js
- /** @type {?} */
- var idLocale = {
- abbr: 'id',
- months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember'.split('_'),
- monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nov_Des'.split('_'),
- weekdays: 'Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu'.split('_'),
- weekdaysShort: 'Min_Sen_Sel_Rab_Kam_Jum_Sab'.split('_'),
- weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sb'.split('_'),
- longDateFormat: {
- LT: 'HH.mm',
- LTS: 'HH.mm.ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY [pukul] HH.mm',
- LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm'
- },
- meridiemParse: /pagi|siang|sore|malam/,
- meridiemHour: /**
- * @param {?} hour
- * @param {?} meridiem
- * @return {?}
- */
- function (hour, meridiem) {
- if (hour === 12) {
- hour = 0;
- }
- if (meridiem === 'pagi') {
- return hour;
- }
- else if (meridiem === 'siang') {
- return hour >= 11 ? hour : hour + 12;
- }
- else if (meridiem === 'sore' || meridiem === 'malam') {
- return hour + 12;
- }
- },
- meridiem: /**
- * @param {?} hours
- * @param {?} minutes
- * @param {?} isLower
- * @return {?}
- */
- function (hours, minutes, isLower) {
- if (hours < 11) {
- return 'pagi';
- }
- else if (hours < 15) {
- return 'siang';
- }
- else if (hours < 19) {
- return 'sore';
- }
- else {
- return 'malam';
- }
- },
- calendar: {
- sameDay: '[Hari ini pukul] LT',
- nextDay: '[Besok pukul] LT',
- nextWeek: 'dddd [pukul] LT',
- lastDay: '[Kemarin pukul] LT',
- lastWeek: 'dddd [lalu pukul] LT',
- sameElse: 'L'
- },
- relativeTime: {
- future: 'dalam %s',
- past: '%s yang lalu',
- s: 'beberapa detik',
- ss: '%d detik',
- m: 'semenit',
- mm: '%d menit',
- h: 'sejam',
- hh: '%d jam',
- d: 'sehari',
- dd: '%d hari',
- M: 'sebulan',
- MM: '%d bulan',
- y: 'setahun',
- yy: '%d tahun'
- },
- week: {
- dow: 1,
- // Monday is the first day of the week.
- doy: 7 // The week that contains Jan 1st is the first week of the year.
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- //! moment.js locale configuration
- //! locale : Italian [it]
- //! author : Lorenzo : https://github.com/aliem
- //! author: Mattia Larentis: https://github.com/nostalgiaz
- /** @type {?} */
- var itLocale = {
- abbr: 'it',
- months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split('_'),
- monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),
- weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split('_'),
- weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'),
- weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd D MMMM YYYY HH:mm'
- },
- calendar: {
- sameDay: '[Oggi alle] LT',
- nextDay: '[Domani alle] LT',
- nextWeek: 'dddd [alle] LT',
- lastDay: '[Ieri alle] LT',
- lastWeek: /**
- * @param {?} date
- * @return {?}
- */
- function (date) {
- switch (getDayOfWeek(date)) {
- case 0:
- return '[la scorsa] dddd [alle] LT';
- default:
- return '[lo scorso] dddd [alle] LT';
- }
- },
- sameElse: 'L'
- },
- relativeTime: {
- future: /**
- * @param {?} num
- * @return {?}
- */
- function (num) {
- return ((/^[0-9].+$/).test(num.toString(10)) ? 'tra' : 'in') + ' ' + num;
- },
- past: '%s fa',
- s: 'alcuni secondi',
- ss: '%d secondi',
- m: 'un minuto',
- mm: '%d minuti',
- h: 'un\'ora',
- hh: '%d ore',
- d: 'un giorno',
- dd: '%d giorni',
- M: 'un mese',
- MM: '%d mesi',
- y: 'un anno',
- yy: '%d anni'
- },
- dayOfMonthOrdinalParse: /\d{1,2}º/,
- ordinal: '%dº',
- week: {
- dow: 1,
- // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // tslint:disable:comment-format binary-expression-operand-order max-line-length
- // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
- // tslint:disable:no-shadowed-variable switch-default prefer-const
- // tslint:disable:one-variable-per-declaration newline-before-return
- //! moment.js locale configuration
- //! locale : Japanese [ja]
- //! author : LI Long : https://github.com/baryon
- /** @type {?} */
- var jaLocale = {
- abbr: 'ja',
- months: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
- monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
- weekdays: '日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日'.split('_'),
- weekdaysShort: '日_月_火_水_木_金_土'.split('_'),
- weekdaysMin: '日_月_火_水_木_金_土'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'YYYY/MM/DD',
- LL: 'YYYY年M月D日',
- LLL: 'YYYY年M月D日 HH:mm',
- LLLL: 'YYYY年M月D日 HH:mm dddd',
- l: 'YYYY/MM/DD',
- ll: 'YYYY年M月D日',
- lll: 'YYYY年M月D日 HH:mm',
- llll: 'YYYY年M月D日 HH:mm dddd'
- },
- meridiemParse: /午前|午後/i,
- isPM: /**
- * @param {?} input
- * @return {?}
- */
- function (input) {
- return input === '午後';
- },
- meridiem: /**
- * @param {?} hour
- * @param {?} minute
- * @param {?} isLower
- * @return {?}
- */
- function (hour, minute, isLower) {
- if (hour < 12) {
- return '午前';
- }
- else {
- return '午後';
- }
- },
- calendar: {
- sameDay: '[今日] LT',
- nextDay: '[明日] LT',
- nextWeek: '[来週]dddd LT',
- lastDay: '[昨日] LT',
- lastWeek: '[前週]dddd LT',
- sameElse: 'L'
- },
- dayOfMonthOrdinalParse: /\d{1,2}日/,
- ordinal: /**
- * @param {?} num
- * @param {?} period
- * @return {?}
- */
- function (num, period) {
- switch (period) {
- case 'd':
- case 'D':
- case 'DDD':
- return num + '日';
- default:
- return num.toString(10);
- }
- },
- relativeTime: {
- future: '%s後',
- past: '%s前',
- s: '数秒',
- ss: '%d秒',
- m: '1分',
- mm: '%d分',
- h: '1時間',
- hh: '%d時間',
- d: '1日',
- dd: '%d日',
- M: '1ヶ月',
- MM: '%dヶ月',
- y: '1年',
- yy: '%d年'
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // tslint:disable:comment-format binary-expression-operand-order max-line-length
- // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
- // tslint:disable:no-shadowed-variable switch-default prefer-const
- // tslint:disable:one-variable-per-declaration newline-before-return
- // tslint:disable:object-literal-shorthand
- //! moment.js locale configuration
- //! locale : Korean [ko]
- //! author : Kyungwook, Park : https://github.com/kyungw00k
- //! author : Jeeeyul Lee <jeeeyul@gmail.com>
- /** @type {?} */
- var koLocale = {
- abbr: 'ko',
- months: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'),
- monthsShort: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'),
- weekdays: '일요일_월요일_화요일_수요일_목요일_금요일_토요일'.split('_'),
- weekdaysShort: '일_월_화_수_목_금_토'.split('_'),
- weekdaysMin: '일_월_화_수_목_금_토'.split('_'),
- longDateFormat: {
- LT: 'A h:mm',
- LTS: 'A h:mm:ss',
- L: 'YYYY.MM.DD',
- LL: 'YYYY년 MMMM D일',
- LLL: 'YYYY년 MMMM D일 A h:mm',
- LLLL: 'YYYY년 MMMM D일 dddd A h:mm',
- l: 'YYYY.MM.DD',
- ll: 'YYYY년 MMMM D일',
- lll: 'YYYY년 MMMM D일 A h:mm',
- llll: 'YYYY년 MMMM D일 dddd A h:mm'
- },
- calendar: {
- sameDay: '오늘 LT',
- nextDay: '내일 LT',
- nextWeek: 'dddd LT',
- lastDay: '어제 LT',
- lastWeek: '지난주 dddd LT',
- sameElse: 'L'
- },
- relativeTime: {
- future: '%s 후',
- past: '%s 전',
- s: '몇 초',
- ss: '%d초',
- m: '1분',
- mm: '%d분',
- h: '한 시간',
- hh: '%d시간',
- d: '하루',
- dd: '%d일',
- M: '한 달',
- MM: '%d달',
- y: '일 년',
- yy: '%d년'
- },
- dayOfMonthOrdinalParse: /\d{1,2}(일|월|주)/,
- ordinal: (/**
- * @param {?} num
- * @param {?} period
- * @return {?}
- */
- function (num, period) {
- switch (period) {
- case 'd':
- case 'D':
- case 'DDD':
- return num + '일';
- case 'M':
- return num + '월';
- case 'w':
- case 'W':
- return num + '주';
- default:
- return num.toString(10);
- }
- }),
- meridiemParse: /오전|오후/,
- isPM: (/**
- * @param {?} token
- * @return {?}
- */
- function (token) {
- return token === '오후';
- }),
- meridiem: (/**
- * @param {?} hour
- * @param {?} minute
- * @param {?} isUpper
- * @return {?}
- */
- function (hour, minute, isUpper) {
- return hour < 12 ? '오전' : '오후';
- })
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // tslint:disable:comment-format binary-expression-operand-order max-line-length
- // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
- // tslint:disable:no-shadowed-variable switch-default prefer-const
- // tslint:disable:one-variable-per-declaration newline-before-return
- //! moment.js locale configuration
- //! locale : Lithuanian [lt]
- //! author : Stanislavas Guk : https://github.com/ixoster
- /** @type {?} */
- var units = {
- ss: 'sekundė_sekundžių_sekundes',
- m: 'minutė_minutės_minutę',
- mm: 'minutės_minučių_minutes',
- h: 'valanda_valandos_valandą',
- hh: 'valandos_valandų_valandas',
- d: 'diena_dienos_dieną',
- dd: 'dienos_dienų_dienas',
- M: 'mėnuo_mėnesio_mėnesį',
- MM: 'mėnesiai_mėnesių_mėnesius',
- y: 'metai_metų_metus',
- yy: 'metai_metų_metus'
- };
- /**
- * @param {?} num
- * @param {?} withoutSuffix
- * @param {?} key
- * @param {?} isFuture
- * @return {?}
- */
- function translateSeconds(num, withoutSuffix, key, isFuture) {
- if (withoutSuffix) {
- return 'kelios sekundės';
- }
- else {
- return isFuture ? 'kelių sekundžių' : 'kelias sekundes';
- }
- }
- /**
- * @param {?} num
- * @param {?} withoutSuffix
- * @param {?} key
- * @param {?} isFuture
- * @return {?}
- */
- function translateSingular(num, withoutSuffix, key, isFuture) {
- return withoutSuffix ? forms(key)[0] : (isFuture ? forms(key)[1] : forms(key)[2]);
- }
- /**
- * @param {?} num
- * @return {?}
- */
- function special(num) {
- return num % 10 === 0 || (num > 10 && num < 20);
- }
- /**
- * @param {?} key
- * @return {?}
- */
- function forms(key) {
- return ((/** @type {?} */ (units)))[key].split('_');
- }
- /**
- * @param {?} num
- * @param {?} withoutSuffix
- * @param {?} key
- * @param {?} isFuture
- * @return {?}
- */
- function translate$3(num, withoutSuffix, key, isFuture) {
- /** @type {?} */
- var result = num + ' ';
- if (num === 1) {
- return result + translateSingular(num, withoutSuffix, key[0], isFuture);
- }
- else if (withoutSuffix) {
- return result + (special(num) ? forms(key)[1] : forms(key)[0]);
- }
- else {
- if (isFuture) {
- return result + forms(key)[1];
- }
- else {
- return result + (special(num) ? forms(key)[1] : forms(key)[2]);
- }
- }
- }
- /** @type {?} */
- var ltLocale = {
- abbr: 'lt',
- months: {
- format: 'sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio'.split('_'),
- standalone: 'sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis'.split('_'),
- isFormat: /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/
- },
- monthsShort: 'sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd'.split('_'),
- weekdays: {
- format: 'sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį'.split('_'),
- standalone: 'sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis'.split('_'),
- isFormat: /dddd HH:mm/
- },
- weekdaysShort: 'Sek_Pir_Ant_Tre_Ket_Pen_Šeš'.split('_'),
- weekdaysMin: 'S_P_A_T_K_Pn_Š'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'YYYY-MM-DD',
- LL: 'YYYY [m.] MMMM D [d.]',
- LLL: 'YYYY [m.] MMMM D [d.], HH:mm [val.]',
- LLLL: 'YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]',
- l: 'YYYY-MM-DD',
- ll: 'YYYY [m.] MMMM D [d.]',
- lll: 'YYYY [m.] MMMM D [d.], HH:mm [val.]',
- llll: 'YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]'
- },
- calendar: {
- sameDay: '[Šiandien] LT',
- nextDay: '[Rytoj] LT',
- nextWeek: 'dddd LT',
- lastDay: '[Vakar] LT',
- lastWeek: '[Praėjusį] dddd LT',
- sameElse: 'L'
- },
- relativeTime: {
- future: 'po %s',
- past: 'prieš %s',
- s: translateSeconds,
- ss: translate$3,
- m: translateSingular,
- mm: translate$3,
- h: translateSingular,
- hh: translate$3,
- d: translateSingular,
- dd: translate$3,
- M: translateSingular,
- MM: translate$3,
- y: translateSingular,
- yy: translate$3
- },
- dayOfMonthOrdinalParse: /\d{1,2}-oji/,
- ordinal: /**
- * @param {?} num
- * @return {?}
- */
- function (num) {
- return num + '-oji';
- },
- week: {
- dow: 1,
- // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // tslint:disable:comment-format binary-expression-operand-order max-line-length
- // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
- // tslint:disable:no-shadowed-variable switch-default prefer-const
- // tslint:disable:one-variable-per-declaration newline-before-return
- //! moment.js locale configuration
- //! locale : Latvian [lv]
- //! author : Matiss Janis Aboltins : https://github.com/matissjanis
- /** @type {?} */
- var lvLocale = {
- abbr: 'lv',
- months: 'Janvāris_Februāris_Marts_Aprīlis_Maijs_Jūnijs_Jūlijs_Augusts_Septembris_Oktobris_Novembris_Decembris'.split('_'),
- monthsShort: 'Jan_Feb_Mar_Apr_Mai_Jūn_Jūl_Aug_Sep_Okt_Nov_Dec'.split('_'),
- weekdays: 'Svētdiena_Pirmdiena_Otrdiena_Trešdiena_Ceturtdiena_Piektdiena_Sestdiena'.split('_'),
- weekdaysShort: 'Svētd_Pirmd_Otrd_Trešd_Ceturtd_Piektd_Sestd'.split('_'),
- weekdaysMin: 'Sv_Pi_Ot_Tr_Ce_Pk_Se'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd, D MMMM YYYY HH:mm'
- },
- calendar: {
- sameDay: '[Today at] LT',
- nextDay: '[Tomorrow at] LT',
- nextWeek: 'dddd [at] LT',
- lastDay: '[Yesterday at] LT',
- lastWeek: '[Last] dddd [at] LT',
- sameElse: 'L'
- },
- relativeTime: {
- future: 'pēc %s',
- past: 'pirms %s',
- s: 'dažām sekundēm',
- ss: '%d sekundēm',
- m: 'minūtes',
- mm: '%d minūtēm',
- h: 'stundas',
- hh: '%d stundām',
- d: 'dienas',
- dd: '%d dienām',
- M: 'mēneša',
- MM: '%d mēnešiem',
- y: 'gada',
- yy: '%d gadiem'
- },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: /**
- * @param {?} num
- * @return {?}
- */
- function (num) {
- return num + '.';
- },
- week: {
- dow: 1,
- // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // tslint:disable:comment-format binary-expression-operand-order max-line-length
- // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
- // tslint:disable:no-shadowed-variable switch-default prefer-const
- // tslint:disable:one-variable-per-declaration newline-before-return
- // tslint:disable:object-literal-shorthand
- //! moment.js locale configuration
- //! locale : Mongolian [mn]
- //! author : Javkhlantugs Nyamdorj : https://github.com/javkhaanj7
- /**
- * @param {?} num
- * @param {?} withoutSuffix
- * @param {?} key
- * @param {?} isFuture
- * @return {?}
- */
- function translate$4(num, withoutSuffix, key, isFuture) {
- switch (key) {
- case 's':
- return withoutSuffix ? 'хэдхэн секунд' : 'хэдхэн секундын';
- case 'ss':
- return num + (withoutSuffix ? ' секунд' : ' секундын');
- case 'm':
- case 'mm':
- return num + (withoutSuffix ? ' минут' : ' минутын');
- case 'h':
- case 'hh':
- return num + (withoutSuffix ? ' цаг' : ' цагийн');
- case 'd':
- case 'dd':
- return num + (withoutSuffix ? ' өдөр' : ' өдрийн');
- case 'M':
- case 'MM':
- return num + (withoutSuffix ? ' сар' : ' сарын');
- case 'y':
- case 'yy':
- return num + (withoutSuffix ? ' жил' : ' жилийн');
- default:
- return num.toString(10);
- }
- }
- /** @type {?} */
- var mnLocale = {
- abbr: 'mn',
- months: 'Нэгдүгээр сар_Хоёрдугаар сар_Гуравдугаар сар_Дөрөвдүгээр сар_Тавдугаар сар_Зургадугаар сар_Долдугаар сар_Наймдугаар сар_Есдүгээр сар_Аравдугаар сар_Арван нэгдүгээр сар_Арван хоёрдугаар сар'.split('_'),
- monthsShort: '1 сар_2 сар_3 сар_4 сар_5 сар_6 сар_7 сар_8 сар_9 сар_10 сар_11 сар_12 сар'.split('_'),
- monthsParseExact: true,
- weekdays: 'Ням_Даваа_Мягмар_Лхагва_Пүрэв_Баасан_Бямба'.split('_'),
- weekdaysShort: 'Ням_Дав_Мяг_Лха_Пүр_Баа_Бям'.split('_'),
- weekdaysMin: 'Ня_Да_Мя_Лх_Пү_Ба_Бя'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'YYYY-MM-DD',
- LL: 'YYYY оны MMMMын D',
- LLL: 'YYYY оны MMMMын D HH:mm',
- LLLL: 'dddd, YYYY оны MMMMын D HH:mm'
- },
- meridiemParse: /ҮӨ|ҮХ/i,
- isPM: (/**
- * @param {?} input
- * @return {?}
- */
- function (input) {
- return input === 'ҮХ';
- }),
- meridiem: (/**
- * @param {?} hour
- * @param {?} minute
- * @param {?} isLower
- * @return {?}
- */
- function (hour, minute, isLower) {
- if (hour < 12) {
- return 'ҮӨ';
- }
- else {
- return 'ҮХ';
- }
- }),
- calendar: {
- sameDay: '[Өнөөдөр] LT',
- nextDay: '[Маргааш] LT',
- nextWeek: '[Ирэх] dddd LT',
- lastDay: '[Өчигдөр] LT',
- lastWeek: '[Өнгөрсөн] dddd LT',
- sameElse: 'L'
- },
- relativeTime: {
- future: '%s дараа',
- past: '%s өмнө',
- s: translate$4,
- ss: translate$4,
- m: translate$4,
- mm: translate$4,
- h: translate$4,
- hh: translate$4,
- d: translate$4,
- dd: translate$4,
- M: translate$4,
- MM: translate$4,
- y: translate$4,
- yy: translate$4
- },
- dayOfMonthOrdinalParse: /\d{1,2} өдөр/,
- ordinal: (/**
- * @param {?} num
- * @param {?} period
- * @return {?}
- */
- function (num, period) {
- switch (period) {
- case 'd':
- case 'D':
- case 'DDD':
- return num + ' өдөр';
- default:
- return num.toString(10);
- }
- })
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- //! moment.js locale configuration
- //! locale : Norwegian Bokmål [nb]
- //! authors : Espen Hovlandsdal : https://github.com/rexxars
- //! Sigurd Gartmann : https://github.com/sigurdga
- /** @type {?} */
- var nbLocale = {
- abbr: 'nb',
- months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split('_'),
- monthsShort: 'jan._feb._mars_april_mai_juni_juli_aug._sep._okt._nov._des.'.split('_'),
- monthsParseExact: true,
- weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),
- weekdaysShort: 'sø._ma._ti._on._to._fr._lø.'.split('_'),
- weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D. MMMM YYYY',
- LLL: 'D. MMMM YYYY [kl.] HH:mm',
- LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm'
- },
- calendar: {
- sameDay: '[i dag kl.] LT',
- nextDay: '[i morgen kl.] LT',
- nextWeek: 'dddd [kl.] LT',
- lastDay: '[i går kl.] LT',
- lastWeek: '[forrige] dddd [kl.] LT',
- sameElse: 'L'
- },
- relativeTime: {
- future: 'om %s',
- past: '%s siden',
- s: 'noen sekunder',
- ss: '%d sekunder',
- m: 'ett minutt',
- mm: '%d minutter',
- h: 'en time',
- hh: '%d timer',
- d: 'en dag',
- dd: '%d dager',
- M: 'en måned',
- MM: '%d måneder',
- y: 'ett år',
- yy: '%d år'
- },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1,
- // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- //! moment.js locale configuration
- //! locale : Dutch (Belgium) [nl-be]
- //! author : Joris Röling : https://github.com/jorisroling
- //! author : Jacob Middag : https://github.com/middagj
- /** @type {?} */
- var monthsShortWithDots = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_');
- /** @type {?} */
- var monthsShortWithoutDots = 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_');
- /** @type {?} */
- var monthsParse$4 = [/^jan/i, /^feb/i, /^maart|mrt.?$/i, /^apr/i, /^mei$/i, /^jun[i.]?$/i, /^jul[i.]?$/i, /^aug/i, /^sep/i, /^okt/i, /^nov/i, /^dec/i];
- /** @type {?} */
- var monthsRegex$4 = /^(januari|februari|maart|april|mei|april|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;
- /** @type {?} */
- var nlBeLocale = {
- abbr: 'nl-be',
- months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split('_'),
- monthsShort: /**
- * @param {?} date
- * @param {?} format
- * @param {?=} isUTC
- * @return {?}
- */
- function (date, format, isUTC) {
- if (!date) {
- return monthsShortWithDots;
- }
- else if (/-MMM-/.test(format)) {
- return monthsShortWithoutDots[getMonth(date, isUTC)];
- }
- else {
- return monthsShortWithDots[getMonth(date, isUTC)];
- }
- },
- monthsRegex: monthsRegex$4,
- monthsShortRegex: monthsRegex$4,
- monthsStrictRegex: /^(januari|februari|maart|mei|ju[nl]i|april|augustus|september|oktober|november|december)/i,
- monthsShortStrictRegex: /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,
- monthsParse: monthsParse$4,
- longMonthsParse: monthsParse$4,
- shortMonthsParse: monthsParse$4,
- weekdays: 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),
- weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'),
- weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd D MMMM YYYY HH:mm'
- },
- calendar: {
- sameDay: '[vandaag om] LT',
- nextDay: '[morgen om] LT',
- nextWeek: 'dddd [om] LT',
- lastDay: '[gisteren om] LT',
- lastWeek: '[afgelopen] dddd [om] LT',
- sameElse: 'L'
- },
- relativeTime: {
- future: 'over %s',
- past: '%s geleden',
- s: 'een paar seconden',
- ss: '%d seconden',
- m: 'één minuut',
- mm: '%d minuten',
- h: 'één uur',
- hh: '%d uur',
- d: 'één dag',
- dd: '%d dagen',
- M: 'één maand',
- MM: '%d maanden',
- y: 'één jaar',
- yy: '%d jaar'
- },
- dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
- ordinal: /**
- * @param {?} _num
- * @return {?}
- */
- function (_num) {
- /** @type {?} */
- var num = Number(_num);
- return num + ((num === 1 || num === 8 || num >= 20) ? 'ste' : 'de');
- },
- week: {
- dow: 1,
- // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- //! moment.js locale configuration
- //! locale : Dutch [nl]
- //! author : Joris Röling : https://github.com/jorisroling
- //! author : Jacob Middag : https://github.com/middagj
- /** @type {?} */
- var monthsShortWithDots$1 = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_');
- /** @type {?} */
- var monthsShortWithoutDots$1 = 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_');
- /** @type {?} */
- var monthsParse$5 = [/^jan/i, /^feb/i, /^maart|mrt.?$/i, /^apr/i, /^mei$/i, /^jun[i.]?$/i, /^jul[i.]?$/i, /^aug/i, /^sep/i, /^okt/i, /^nov/i, /^dec/i];
- /** @type {?} */
- var monthsRegex$5 = /^(januari|februari|maart|april|mei|april|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;
- /** @type {?} */
- var nlLocale = {
- abbr: 'nl',
- months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split('_'),
- monthsShort: /**
- * @param {?} date
- * @param {?} format
- * @param {?=} isUTC
- * @return {?}
- */
- function (date, format, isUTC) {
- if (!date) {
- return monthsShortWithDots$1;
- }
- else if (/-MMM-/.test(format)) {
- return monthsShortWithoutDots$1[getMonth(date, isUTC)];
- }
- else {
- return monthsShortWithDots$1[getMonth(date, isUTC)];
- }
- },
- monthsRegex: monthsRegex$5,
- monthsShortRegex: monthsRegex$5,
- monthsStrictRegex: /^(januari|februari|maart|mei|ju[nl]i|april|augustus|september|oktober|november|december)/i,
- monthsShortStrictRegex: /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,
- monthsParse: monthsParse$5,
- longMonthsParse: monthsParse$5,
- shortMonthsParse: monthsParse$5,
- weekdays: 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),
- weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'),
- weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD-MM-YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd D MMMM YYYY HH:mm'
- },
- calendar: {
- sameDay: '[vandaag om] LT',
- nextDay: '[morgen om] LT',
- nextWeek: 'dddd [om] LT',
- lastDay: '[gisteren om] LT',
- lastWeek: '[afgelopen] dddd [om] LT',
- sameElse: 'L'
- },
- relativeTime: {
- future: 'over %s',
- past: '%s geleden',
- s: 'een paar seconden',
- ss: '%d seconden',
- m: 'één minuut',
- mm: '%d minuten',
- h: 'één uur',
- hh: '%d uur',
- d: 'één dag',
- dd: '%d dagen',
- M: 'één maand',
- MM: '%d maanden',
- y: 'één jaar',
- yy: '%d jaar'
- },
- dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
- ordinal: /**
- * @param {?} _num
- * @return {?}
- */
- function (_num) {
- /** @type {?} */
- var num = Number(_num);
- return num + ((num === 1 || num === 8 || num >= 20) ? 'ste' : 'de');
- },
- week: {
- dow: 1,
- // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- //! moment.js locale configuration
- //! locale : Polish [pl]
- //! author : Rafal Hirsz : https://github.com/evoL
- /** @type {?} */
- var monthsNominative = 'styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień'.split('_');
- /** @type {?} */
- var monthsSubjective = 'stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia'.split('_');
- /**
- * @param {?} num
- * @return {?}
- */
- function plural$1(num) {
- return (num % 10 < 5) && (num % 10 > 1) && ((~~(num / 10) % 10) !== 1);
- }
- /**
- * @param {?} num
- * @param {?} withoutSuffix
- * @param {?} key
- * @return {?}
- */
- function translate$5(num, withoutSuffix, key) {
- /** @type {?} */
- var result = num + ' ';
- switch (key) {
- case 'ss':
- return result + (plural$1(num) ? 'sekundy' : 'sekund');
- case 'm':
- return withoutSuffix ? 'minuta' : 'minutę';
- case 'mm':
- return result + (plural$1(num) ? 'minuty' : 'minut');
- case 'h':
- return withoutSuffix ? 'godzina' : 'godzinę';
- case 'hh':
- return result + (plural$1(num) ? 'godziny' : 'godzin');
- case 'MM':
- return result + (plural$1(num) ? 'miesiące' : 'miesięcy');
- case 'yy':
- return result + (plural$1(num) ? 'lata' : 'lat');
- }
- }
- /** @type {?} */
- var plLocale = {
- abbr: 'pl',
- months: /**
- * @param {?} date
- * @param {?} format
- * @param {?=} isUTC
- * @return {?}
- */
- function (date, format, isUTC) {
- if (!date) {
- return monthsNominative;
- }
- else if (format === '') {
- // Hack: if format empty we know this is used to generate
- // RegExp by moment. Give then back both valid forms of months
- // in RegExp ready format.
- return '(' + monthsSubjective[getMonth(date, isUTC)] + '|' + monthsNominative[getMonth(date, isUTC)] + ')';
- }
- else if (/D MMMM/.test(format)) {
- return monthsSubjective[getMonth(date, isUTC)];
- }
- else {
- return monthsNominative[getMonth(date, isUTC)];
- }
- },
- monthsShort: 'sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru'.split('_'),
- weekdays: 'niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota'.split('_'),
- weekdaysShort: 'ndz_pon_wt_śr_czw_pt_sob'.split('_'),
- weekdaysMin: 'Nd_Pn_Wt_Śr_Cz_Pt_So'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd, D MMMM YYYY HH:mm'
- },
- calendar: {
- sameDay: '[Dziś o] LT',
- nextDay: '[Jutro o] LT',
- nextWeek: /**
- * @param {?} date
- * @return {?}
- */
- function (date) {
- switch (getDayOfWeek(date)) {
- case 0:
- return '[W niedzielę o] LT';
- case 2:
- return '[We wtorek o] LT';
- case 3:
- return '[W środę o] LT';
- case 5:
- return '[W piątek o] LT';
- case 6:
- return '[W sobotę o] LT';
- default:
- return '[W] dddd [o] LT';
- }
- },
- lastDay: '[Wczoraj o] LT',
- lastWeek: /**
- * @param {?} date
- * @return {?}
- */
- function (date) {
- switch (getDayOfWeek(date)) {
- case 0:
- return '[W zeszłą niedzielę o] LT';
- case 3:
- return '[W zeszłą środę o] LT';
- case 4:
- return '[W zeszłą czwartek o] LT';
- case 5:
- return '[W zeszłą piątek o] LT';
- case 6:
- return '[W zeszłą sobotę o] LT';
- default:
- return '[W zeszły] dddd [o] LT';
- }
- },
- sameElse: 'L'
- },
- relativeTime: {
- future: 'za %s',
- past: '%s temu',
- s: 'kilka sekund',
- ss: translate$5,
- m: translate$5,
- mm: translate$5,
- h: translate$5,
- hh: translate$5,
- d: '1 dzień',
- dd: '%d dni',
- M: 'miesiąc',
- MM: translate$5,
- y: 'rok',
- yy: translate$5
- },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1,
- // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- //! moment.js locale configuration
- //! locale : Portuguese (Brazil) [pt-br]
- //! author : Caio Ribeiro Pereira : https://github.com/caio-ribeiro-pereira
- /** @type {?} */
- var ptBrLocale = {
- abbr: 'pt-br',
- months: 'Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro'.split('_'),
- monthsShort: 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'),
- weekdays: 'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split('_'),
- weekdaysShort: 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'),
- weekdaysMin: 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D [de] MMMM [de] YYYY',
- LLL: 'D [de] MMMM [de] YYYY [às] HH:mm',
- LLLL: 'dddd, D [de] MMMM [de] YYYY [às] HH:mm'
- },
- calendar: {
- sameDay: '[Hoje às] LT',
- nextDay: '[Amanhã às] LT',
- nextWeek: 'dddd [às] LT',
- lastDay: '[Ontem às] LT',
- lastWeek: /**
- * @param {?} date
- * @return {?}
- */
- function (date) {
- return (getDayOfWeek(date) === 0 || getDayOfWeek(date) === 6) ?
- '[Último] dddd [às] LT' : // Saturday + Sunday
- '[Última] dddd [às] LT'; // Monday - Friday
- },
- sameElse: 'L'
- },
- relativeTime: {
- future: 'em %s',
- past: '%s atrás',
- s: 'poucos segundos',
- ss: '%d segundos',
- m: 'um minuto',
- mm: '%d minutos',
- h: 'uma hora',
- hh: '%d horas',
- d: 'um dia',
- dd: '%d dias',
- M: 'um mês',
- MM: '%d meses',
- y: 'um ano',
- yy: '%d anos'
- },
- dayOfMonthOrdinalParse: /\d{1,2}º/,
- ordinal: '%dº'
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // ! moment.js locale configuration
- // ! locale : Romanian [ro]
- //! author : Vlad Gurdiga : https://github.com/gurdiga
- //! author : Valentin Agachi : https://github.com/avaly
- // ! author : Earle white: https://github.com/5earle
- /**
- * @param {?} num
- * @param {?} withoutSuffix
- * @param {?} key
- * @return {?}
- */
- function relativeTimeWithPlural(num, withoutSuffix, key) {
- /** @type {?} */
- var format = {
- ss: 'secunde',
- mm: 'minute',
- hh: 'ore',
- dd: 'zile',
- MM: 'luni',
- yy: 'ani'
- };
- /** @type {?} */
- var separator = ' ';
- if (num % 100 >= 20 || (num >= 100 && num % 100 === 0)) {
- separator = ' de ';
- }
- return num + separator + format[key];
- }
- /** @type {?} */
- var roLocale = {
- abbr: 'ro',
- months: 'ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie'.split('_'),
- monthsShort: 'ian._febr._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.'.split('_'),
- monthsParseExact: true,
- weekdays: 'duminică_luni_marți_miercuri_joi_vineri_sâmbătă'.split('_'),
- weekdaysShort: 'Dum_Lun_Mar_Mie_Joi_Vin_Sâm'.split('_'),
- weekdaysMin: 'Du_Lu_Ma_Mi_Jo_Vi_Sâ'.split('_'),
- longDateFormat: {
- LT: 'H:mm',
- LTS: 'H:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY H:mm',
- LLLL: 'dddd, D MMMM YYYY H:mm'
- },
- calendar: {
- sameDay: '[azi la] LT',
- nextDay: '[mâine la] LT',
- nextWeek: 'dddd [la] LT',
- lastDay: '[ieri la] LT',
- lastWeek: '[fosta] dddd [la] LT',
- sameElse: 'L'
- },
- relativeTime: {
- future: 'peste %s',
- past: '%s în urmă',
- s: 'câteva secunde',
- ss: relativeTimeWithPlural,
- m: 'un minut',
- mm: relativeTimeWithPlural,
- h: 'o oră',
- hh: relativeTimeWithPlural,
- d: 'o zi',
- dd: relativeTimeWithPlural,
- M: 'o lună',
- MM: relativeTimeWithPlural,
- y: 'un an',
- yy: relativeTimeWithPlural
- },
- week: {
- dow: 1,
- // Monday is the first day of the week.
- doy: 7 // The week that contains Jan 1st is the first week of the year.
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- //! moment.js locale configuration
- //! locale : Russian [ru]
- //! author : Viktorminator : https://github.com/Viktorminator
- //! Author : Menelion Elensúle : https://github.com/Oire
- //! author : Коренберг Марк : https://github.com/socketpair
- /**
- * @param {?} word
- * @param {?} num
- * @return {?}
- */
- function plural$2(word, num) {
- /** @type {?} */
- var forms = word.split('_');
- return num % 10 === 1 && num % 100 !== 11 ? forms[0] : (num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]);
- }
- /**
- * @param {?} num
- * @param {?} withoutSuffix
- * @param {?} key
- * @return {?}
- */
- function relativeTimeWithPlural$1(num, withoutSuffix, key) {
- /** @type {?} */
- var format = {
- ss: withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд',
- mm: withoutSuffix ? 'минута_минуты_минут' : 'минуту_минуты_минут',
- hh: 'час_часа_часов',
- dd: 'день_дня_дней',
- MM: 'месяц_месяца_месяцев',
- yy: 'год_года_лет'
- };
- if (key === 'm') {
- return withoutSuffix ? 'минута' : 'минуту';
- }
- return num + ' ' + plural$2(format[key], +num);
- }
- /** @type {?} */
- var monthsParse$6 = [/^янв/i, /^фев/i, /^мар/i, /^апр/i, /^ма[йя]/i, /^июн/i, /^июл/i, /^авг/i, /^сен/i, /^окт/i, /^ноя/i, /^дек/i];
- // http://new.gramota.ru/spravka/rules/139-prop : § 103
- // Сокращения месяцев: http://new.gramota.ru/spravka/buro/search-answer?s=242637
- // CLDR data: http://www.unicode.org/cldr/charts/28/summary/ru.html#1753
- /** @type {?} */
- var ruLocale = {
- abbr: 'ru',
- months: {
- format: 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split('_'),
- standalone: 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split('_')
- },
- monthsShort: {
- // по CLDR именно "июл." и "июн.", но какой смысл менять букву на точку ?
- format: 'янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.'.split('_'),
- standalone: 'янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.'.split('_')
- },
- weekdays: {
- standalone: 'воскресенье_понедельник_вторник_среда_четверг_пятница_суббота'.split('_'),
- format: 'воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу'.split('_'),
- isFormat: /\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?\] ?dddd/
- },
- weekdaysShort: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),
- weekdaysMin: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),
- monthsParse: monthsParse$6,
- longMonthsParse: monthsParse$6,
- shortMonthsParse: monthsParse$6,
- // полные названия с падежами, по три буквы, для некоторых, по 4 буквы, сокращения с точкой и без точки
- monthsRegex: /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,
- // копия предыдущего
- monthsShortRegex: /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,
- // полные названия с падежами
- monthsStrictRegex: /^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,
- // Выражение, которое соотвествует только сокращённым формам
- monthsShortStrictRegex: /^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i,
- longDateFormat: {
- LT: 'H:mm',
- LTS: 'H:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D MMMM YYYY г.',
- LLL: 'D MMMM YYYY г., H:mm',
- LLLL: 'dddd, D MMMM YYYY г., H:mm'
- },
- calendar: {
- sameDay: '[Сегодня в] LT',
- nextDay: '[Завтра в] LT',
- lastDay: '[Вчера в] LT',
- nextWeek: /**
- * @param {?} date
- * @param {?} now
- * @return {?}
- */
- function (date, now) {
- if (getWeek(now) !== getWeek(date)) {
- switch (getDayOfWeek(date)) {
- case 0:
- return '[В следующее] dddd [в] LT';
- case 1:
- case 2:
- case 4:
- return '[В следующий] dddd [в] LT';
- case 3:
- case 5:
- case 6:
- return '[В следующую] dddd [в] LT';
- }
- }
- else {
- if (getDayOfWeek(date) === 2) {
- return '[Во] dddd [в] LT';
- }
- else {
- return '[В] dddd [в] LT';
- }
- }
- },
- lastWeek: /**
- * @param {?} date
- * @param {?} now
- * @return {?}
- */
- function (date, now) {
- if (getWeek(now) !== getWeek(date)) {
- switch (getDayOfWeek(date)) {
- case 0:
- return '[В прошлое] dddd [в] LT';
- case 1:
- case 2:
- case 4:
- return '[В прошлый] dddd [в] LT';
- case 3:
- case 5:
- case 6:
- return '[В прошлую] dddd [в] LT';
- }
- }
- else {
- if (getDayOfWeek(date) === 2) {
- return '[Во] dddd [в] LT';
- }
- else {
- return '[В] dddd [в] LT';
- }
- }
- },
- sameElse: 'L'
- },
- relativeTime: {
- future: 'через %s',
- past: '%s назад',
- s: 'несколько секунд',
- ss: relativeTimeWithPlural$1,
- m: relativeTimeWithPlural$1,
- mm: relativeTimeWithPlural$1,
- h: 'час',
- hh: relativeTimeWithPlural$1,
- d: 'день',
- dd: relativeTimeWithPlural$1,
- M: 'месяц',
- MM: relativeTimeWithPlural$1,
- y: 'год',
- yy: relativeTimeWithPlural$1
- },
- meridiemParse: /ночи|утра|дня|вечера/i,
- isPM: /**
- * @param {?} input
- * @return {?}
- */
- function (input) {
- return /^(дня|вечера)$/.test(input);
- },
- meridiem: /**
- * @param {?} hour
- * @param {?} minute
- * @param {?} isLower
- * @return {?}
- */
- function (hour, minute, isLower) {
- if (hour < 4) {
- return 'ночи';
- }
- else if (hour < 12) {
- return 'утра';
- }
- else if (hour < 17) {
- return 'дня';
- }
- else {
- return 'вечера';
- }
- },
- dayOfMonthOrdinalParse: /\d{1,2}-(й|го|я)/,
- ordinal: /**
- * @param {?} _num
- * @param {?} period
- * @return {?}
- */
- function (_num, period) {
- /** @type {?} */
- var num = Number(_num);
- switch (period) {
- case 'M':
- case 'd':
- case 'DDD':
- return num + '-й';
- case 'D':
- return num + '-го';
- case 'w':
- case 'W':
- return num + '-я';
- default:
- return num.toString(10);
- }
- },
- week: {
- dow: 1,
- // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- //! moment.js locale configuration
- //! locale : Slovak [sk]
- //! author : Jozef Pažin : https://github.com/atiris
- /** @type {?} */
- var months$2 = 'január_február_marec_apríl_máj_jún_júl_august_september_október_november_december'.split('_');
- /** @type {?} */
- var monthsShort$6 = 'jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec'.split('_');
- /**
- * @param {?} num
- * @return {?}
- */
- function plural$3(num) {
- return (num > 1) && (num < 5) && (~~(num / 10) !== 1);
- }
- /**
- * @param {?} num
- * @param {?} withoutSuffix
- * @param {?} key
- * @param {?} isFuture
- * @return {?}
- */
- function translate$6(num, withoutSuffix, key, isFuture) {
- /** @type {?} */
- var result = num + ' ';
- switch (key) {
- case 's': // a few seconds / in a few seconds / a few seconds ago
- return (withoutSuffix || isFuture) ? 'pár sekúnd' : 'pár sekundami';
- case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago
- if (withoutSuffix || isFuture) {
- return result + (plural$3(num) ? 'sekundy' : 'sekúnd');
- }
- else {
- return result + 'sekundami';
- }
- // break;
- case 'm': // a minute / in a minute / a minute ago
- return withoutSuffix ? 'minúta' : (isFuture ? 'minútu' : 'minútou');
- case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago
- if (withoutSuffix || isFuture) {
- return result + (plural$3(num) ? 'minúty' : 'minút');
- }
- else {
- return result + 'minútami';
- }
- // break;
- case 'h': // an hour / in an hour / an hour ago
- return withoutSuffix ? 'hodina' : (isFuture ? 'hodinu' : 'hodinou');
- case 'hh': // 9 hours / in 9 hours / 9 hours ago
- if (withoutSuffix || isFuture) {
- return result + (plural$3(num) ? 'hodiny' : 'hodín');
- }
- else {
- return result + 'hodinami';
- }
- // break;
- case 'd': // a day / in a day / a day ago
- return (withoutSuffix || isFuture) ? 'deň' : 'dňom';
- case 'dd': // 9 days / in 9 days / 9 days ago
- if (withoutSuffix || isFuture) {
- return result + (plural$3(num) ? 'dni' : 'dní');
- }
- else {
- return result + 'dňami';
- }
- // break;
- case 'M': // a month / in a month / a month ago
- return (withoutSuffix || isFuture) ? 'mesiac' : 'mesiacom';
- case 'MM': // 9 months / in 9 months / 9 months ago
- if (withoutSuffix || isFuture) {
- return result + (plural$3(num) ? 'mesiace' : 'mesiacov');
- }
- else {
- return result + 'mesiacmi';
- }
- // break;
- case 'y': // a year / in a year / a year ago
- return (withoutSuffix || isFuture) ? 'rok' : 'rokom';
- case 'yy': // 9 years / in 9 years / 9 years ago
- if (withoutSuffix || isFuture) {
- return result + (plural$3(num) ? 'roky' : 'rokov');
- }
- else {
- return result + 'rokmi';
- }
- // break;
- }
- }
- /** @type {?} */
- var skLocale = {
- abbr: 'sk',
- months: months$2,
- monthsShort: monthsShort$6,
- weekdays: 'nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota'.split('_'),
- weekdaysShort: 'ne_po_ut_st_št_pi_so'.split('_'),
- weekdaysMin: 'ne_po_ut_st_št_pi_so'.split('_'),
- longDateFormat: {
- LT: 'H:mm',
- LTS: 'H:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D. MMMM YYYY',
- LLL: 'D. MMMM YYYY H:mm',
- LLLL: 'dddd D. MMMM YYYY H:mm',
- l: 'D. M. YYYY'
- },
- calendar: {
- sameDay: '[dnes o] LT',
- nextDay: '[zajtra o] LT',
- nextWeek: /**
- * @param {?} date
- * @return {?}
- */
- function (date) {
- switch (getDayOfWeek(date)) {
- case 0:
- return '[v nedeľu o] LT';
- case 1:
- case 2:
- return '[v] dddd [o] LT';
- case 3:
- return '[v stredu o] LT';
- case 4:
- return '[vo štvrtok o] LT';
- case 5:
- return '[v piatok o] LT';
- case 6:
- return '[v sobotu o] LT';
- }
- },
- lastDay: '[včera o] LT',
- lastWeek: /**
- * @param {?} date
- * @return {?}
- */
- function (date) {
- switch (getDayOfWeek(date)) {
- case 0:
- return '[minulú nedeľu o] LT';
- case 1:
- case 2:
- return '[minulý] dddd [o] LT';
- case 3:
- return '[minulú stredu o] LT';
- case 4:
- case 5:
- return '[minulý] dddd [o] LT';
- case 6:
- return '[minulú sobotu o] LT';
- }
- },
- sameElse: 'L'
- },
- relativeTime: {
- future: 'o %s',
- past: 'pred %s',
- s: translate$6,
- ss: translate$6,
- m: translate$6,
- mm: translate$6,
- h: translate$6,
- hh: translate$6,
- d: translate$6,
- dd: translate$6,
- M: translate$6,
- MM: translate$6,
- y: translate$6,
- yy: translate$6
- },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1,
- // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- //! moment.js locale configuration
- //! locale : Slovenian [sl]
- //! author : mihan : https://github.com/mihan
- /**
- * @param {?} number
- * @param {?} withoutSuffix
- * @param {?} key
- * @param {?} isFuture
- * @return {?}
- */
- function processRelativeTime$2(number, withoutSuffix, key, isFuture) {
- /** @type {?} */
- var result = number + ' ';
- switch (key) {
- case 's':
- return withoutSuffix || isFuture ? 'nekaj sekund' : 'nekaj sekundami';
- case 'ss':
- if (number === 1) {
- result += withoutSuffix ? 'sekundo' : 'sekundi';
- }
- else if (number === 2) {
- result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';
- }
- else if (number < 5) {
- result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';
- }
- else {
- result += withoutSuffix || isFuture ? 'sekund' : 'sekund';
- }
- return result;
- case 'm':
- return withoutSuffix ? 'ena minuta' : 'eno minuto';
- case 'mm':
- if (number === 1) {
- result += withoutSuffix ? 'minuta' : 'minuto';
- }
- else if (number === 2) {
- result += withoutSuffix || isFuture ? 'minuti' : 'minutama';
- }
- else if (number < 5) {
- result += withoutSuffix || isFuture ? 'minute' : 'minutami';
- }
- else {
- result += withoutSuffix || isFuture ? 'minut' : 'minutami';
- }
- return result;
- case 'h':
- return withoutSuffix ? 'ena ura' : 'eno uro';
- case 'hh':
- if (number === 1) {
- result += withoutSuffix ? 'ura' : 'uro';
- }
- else if (number === 2) {
- result += withoutSuffix || isFuture ? 'uri' : 'urama';
- }
- else if (number < 5) {
- result += withoutSuffix || isFuture ? 'ure' : 'urami';
- }
- else {
- result += withoutSuffix || isFuture ? 'ur' : 'urami';
- }
- return result;
- case 'd':
- return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';
- case 'dd':
- if (number === 1) {
- result += withoutSuffix || isFuture ? 'dan' : 'dnem';
- }
- else if (number === 2) {
- result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';
- }
- else {
- result += withoutSuffix || isFuture ? 'dni' : 'dnevi';
- }
- return result;
- case 'M':
- return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';
- case 'MM':
- if (number === 1) {
- result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';
- }
- else if (number === 2) {
- result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';
- }
- else if (number < 5) {
- result += withoutSuffix || isFuture ? 'mesece' : 'meseci';
- }
- else {
- result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';
- }
- return result;
- case 'y':
- return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';
- case 'yy':
- if (number === 1) {
- result += withoutSuffix || isFuture ? 'leto' : 'letom';
- }
- else if (number === 2) {
- result += withoutSuffix || isFuture ? 'leti' : 'letoma';
- }
- else if (number < 5) {
- result += withoutSuffix || isFuture ? 'leta' : 'leti';
- }
- else {
- result += withoutSuffix || isFuture ? 'let' : 'leti';
- }
- return result;
- }
- }
- /** @type {?} */
- var slLocale = {
- abbr: 'sl',
- months: 'januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december'.split('_'),
- monthsShort: 'jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.'.split('_'),
- monthsParseExact: true,
- weekdays: 'nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota'.split('_'),
- weekdaysShort: 'ned._pon._tor._sre._čet._pet._sob.'.split('_'),
- weekdaysMin: 'ne_po_to_sr_če_pe_so'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'H:mm',
- LTS: 'H:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D. MMMM YYYY',
- LLL: 'D. MMMM YYYY H:mm',
- LLLL: 'dddd, D. MMMM YYYY H:mm'
- },
- calendar: {
- sameDay: '[danes ob] LT',
- nextDay: '[jutri ob] LT',
- nextWeek: /**
- * @param {?} date
- * @return {?}
- */
- function (date) {
- switch (getDayOfWeek(date)) {
- case 0:
- return '[v] [nedeljo] [ob] LT';
- case 3:
- return '[v] [sredo] [ob] LT';
- case 6:
- return '[v] [soboto] [ob] LT';
- case 1:
- case 2:
- case 4:
- case 5:
- return '[v] dddd [ob] LT';
- }
- },
- lastDay: '[včeraj ob] LT',
- lastWeek: /**
- * @param {?} date
- * @return {?}
- */
- function (date) {
- switch (getDayOfWeek(date)) {
- case 0:
- return '[prejšnjo] [nedeljo] [ob] LT';
- case 3:
- return '[prejšnjo] [sredo] [ob] LT';
- case 6:
- return '[prejšnjo] [soboto] [ob] LT';
- case 1:
- case 2:
- case 4:
- case 5:
- return '[prejšnji] dddd [ob] LT';
- }
- },
- sameElse: 'L'
- },
- relativeTime: {
- future: 'čez %s',
- past: 'pred %s',
- s: processRelativeTime$2,
- ss: processRelativeTime$2,
- m: processRelativeTime$2,
- mm: processRelativeTime$2,
- h: processRelativeTime$2,
- hh: processRelativeTime$2,
- d: processRelativeTime$2,
- dd: processRelativeTime$2,
- M: processRelativeTime$2,
- MM: processRelativeTime$2,
- y: processRelativeTime$2,
- yy: processRelativeTime$2
- },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1,
- // Monday is the first day of the week.
- doy: 7 // The week that contains Jan 1st is the first week of the year.
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // tslint:disable:comment-format binary-expression-operand-order max-line-length
- // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
- // tslint:disable:no-shadowed-variable switch-default prefer-const
- // tslint:disable:one-variable-per-declaration newline-before-return
- //! moment.js locale configuration
- //! locale : Swedish [sv]
- //! author : Jens Alm : https://github.com/ulmus
- /** @type {?} */
- var svLocale = {
- abbr: 'sv',
- months: 'januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december'.split('_'),
- monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),
- weekdays: 'söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag'.split('_'),
- weekdaysShort: 'sön_mån_tis_ons_tor_fre_lör'.split('_'),
- weekdaysMin: 'sö_må_ti_on_to_fr_lö'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'YYYY-MM-DD',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY [kl.] HH:mm',
- LLLL: 'dddd D MMMM YYYY [kl.] HH:mm',
- lll: 'D MMM YYYY HH:mm',
- llll: 'ddd D MMM YYYY HH:mm'
- },
- calendar: {
- sameDay: '[Idag] LT',
- nextDay: '[Imorgon] LT',
- lastDay: '[Igår] LT',
- nextWeek: '[På] dddd LT',
- lastWeek: '[I] dddd[s] LT',
- sameElse: 'L'
- },
- relativeTime: {
- future: 'om %s',
- past: 'för %s sedan',
- s: 'några sekunder',
- ss: '%d sekunder',
- m: 'en minut',
- mm: '%d minuter',
- h: 'en timme',
- hh: '%d timmar',
- d: 'en dag',
- dd: '%d dagar',
- M: 'en månad',
- MM: '%d månader',
- y: 'ett år',
- yy: '%d år'
- },
- dayOfMonthOrdinalParse: /\d{1,2}(e|a)/,
- ordinal: /**
- * @param {?} _num
- * @return {?}
- */
- function (_num) {
- /** @type {?} */
- var num = Number(_num);
- /** @type {?} */
- var b = num % 10;
- /** @type {?} */
- var output = (~~(num % 100 / 10) === 1) ? 'e' :
- (b === 1) ? 'a' :
- (b === 2) ? 'a' :
- (b === 3) ? 'e' : 'e';
- return num + output;
- },
- week: {
- dow: 1,
- // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // tslint:disable:comment-format binary-expression-operand-order max-line-length
- // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
- // tslint:disable:no-shadowed-variable switch-default prefer-const
- // tslint:disable:one-variable-per-declaration newline-before-return
- // moment.js locale configuration
- // locale : Thai [th]
- // author : Watcharapol Sanitwong : https://github.com/tumit
- /** @type {?} */
- var thLocale = {
- abbr: 'th',
- months: 'มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม'.split('_'),
- monthsShort: 'ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.'.split('_'),
- monthsParseExact: true,
- weekdays: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์'.split('_'),
- weekdaysShort: 'อา._จ._อ._พ._พฤ._ศ._ส.'.split('_'),
- // yes, three characters difference
- weekdaysMin: 'อา._จ._อ._พ._พฤ._ศ._ส.'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'H:mm',
- LTS: 'H:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY เวลา H:mm',
- LLLL: 'วันddddที่ D MMMM YYYY เวลา H:mm'
- },
- meridiemParse: /ก่อนเที่ยง|หลังเที่ยง/,
- isPM: /**
- * @param {?} input
- * @return {?}
- */
- function (input) {
- return input === 'หลังเที่ยง';
- },
- meridiem: /**
- * @param {?} hour
- * @param {?} minute
- * @param {?} isLower
- * @return {?}
- */
- function (hour, minute, isLower) {
- if (hour < 12) {
- return 'ก่อนเที่ยง';
- }
- else {
- return 'หลังเที่ยง';
- }
- },
- calendar: {
- sameDay: '[วันนี้ เวลา] LT',
- nextDay: '[พรุ่งนี้ เวลา] LT',
- nextWeek: 'dddd[หน้า เวลา] LT',
- lastDay: '[เมื่อวานนี้ เวลา] LT',
- lastWeek: '[วัน]dddd[ที่แล้ว เวลา] LT',
- sameElse: 'L'
- },
- relativeTime: {
- future: 'อีก %s',
- past: '%sที่แล้ว',
- s: 'ไม่กี่วินาที',
- ss: '%d วินาที',
- m: '1 นาที',
- mm: '%d นาที',
- h: '1 ชั่วโมง',
- hh: '%d ชั่วโมง',
- d: '1 วัน',
- dd: '%d วัน',
- M: '1 เดือน',
- MM: '%d เดือน',
- y: '1 ปี',
- yy: '%d ปี'
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // tslint:disable:comment-format binary-expression-operand-order max-line-length
- // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
- // tslint:disable:no-shadowed-variable switch-default prefer-const
- // tslint:disable:one-variable-per-declaration newline-before-return
- //! moment.js locale configuration
- //! locale : Turkish [tr]
- //! authors : Erhan Gundogan : https://github.com/erhangundogan,
- //! Burak Yiğit Kaya: https://github.com/BYK
- /** @type {?} */
- var suffixes = {
- 1: '\'inci',
- 5: '\'inci',
- 8: '\'inci',
- 70: '\'inci',
- 80: '\'inci',
- 2: '\'nci',
- 7: '\'nci',
- 20: '\'nci',
- 50: '\'nci',
- 3: '\'üncü',
- 4: '\'üncü',
- 100: '\'üncü',
- 6: '\'ncı',
- 9: '\'uncu',
- 10: '\'uncu',
- 30: '\'uncu',
- 60: '\'ıncı',
- 90: '\'ıncı'
- };
- /** @type {?} */
- var trLocale = {
- abbr: 'tr',
- months: 'Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık'.split('_'),
- monthsShort: 'Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara'.split('_'),
- weekdays: 'Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi'.split('_'),
- weekdaysShort: 'Paz_Pts_Sal_Çar_Per_Cum_Cts'.split('_'),
- weekdaysMin: 'Pz_Pt_Sa_Ça_Pe_Cu_Ct'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd, D MMMM YYYY HH:mm'
- },
- calendar: {
- sameDay: '[bugün saat] LT',
- nextDay: '[yarın saat] LT',
- nextWeek: '[gelecek] dddd [saat] LT',
- lastDay: '[dün] LT',
- lastWeek: '[geçen] dddd [saat] LT',
- sameElse: 'L'
- },
- relativeTime: {
- future: '%s sonra',
- past: '%s önce',
- s: 'birkaç saniye',
- ss: '%d saniye',
- m: 'bir dakika',
- mm: '%d dakika',
- h: 'bir saat',
- hh: '%d saat',
- d: 'bir gün',
- dd: '%d gün',
- M: 'bir ay',
- MM: '%d ay',
- y: 'bir yıl',
- yy: '%d yıl'
- },
- dayOfMonthOrdinalParse: /\d{1,2}'(inci|nci|üncü|ncı|uncu|ıncı)/,
- ordinal: /**
- * @param {?} _num
- * @return {?}
- */
- function (_num) {
- /** @type {?} */
- var num = Number(_num);
- if (num === 0) { // special case for zero
- return num + '\'ıncı';
- }
- /** @type {?} */
- var a = num % 10;
- /** @type {?} */
- var b = num % 100 - a;
- /** @type {?} */
- var c = num >= 100 ? 100 : null;
- return num + (suffixes[a] || suffixes[b] || suffixes[c]);
- },
- week: {
- dow: 1,
- // Monday is the first day of the week.
- doy: 7 // The week that contains Jan 1st is the first week of the year.
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- //! moment.js locale configuration
- //! locale : Ukrainian [uk]
- //! author : zemlanin : https://github.com/zemlanin
- //! Author : Menelion Elensúle : https://github.com/Oire
- /**
- * @param {?} word
- * @param {?} num
- * @return {?}
- */
- function plural$4(word, num) {
- /** @type {?} */
- var forms = word.split('_');
- return num % 10 === 1 && num % 100 !== 11 ? forms[0] : (num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]);
- }
- /**
- * @param {?} num
- * @param {?} withoutSuffix
- * @param {?} key
- * @return {?}
- */
- function relativeTimeWithPlural$2(num, withoutSuffix, key) {
- /** @type {?} */
- var format = {
- ss: withoutSuffix ? 'секунда_секунди_секунд' : 'секунду_секунди_секунд',
- mm: withoutSuffix ? 'хвилина_хвилини_хвилин' : 'хвилину_хвилини_хвилин',
- hh: withoutSuffix ? 'година_години_годин' : 'годину_години_годин',
- dd: 'день_дні_днів',
- MM: 'місяць_місяці_місяців',
- yy: 'рік_роки_років'
- };
- if (key === 'm') {
- return withoutSuffix ? 'хвилина' : 'хвилину';
- }
- if (key === 'h') {
- return withoutSuffix ? 'година' : 'годину';
- }
- return num + ' ' + plural$4(format[key], +num);
- }
- /**
- * @param {?} date
- * @param {?} format
- * @param {?=} isUTC
- * @return {?}
- */
- function weekdaysCaseReplace(date, format, isUTC) {
- /** @type {?} */
- var weekdays = {
- nominative: 'неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота'.split('_'),
- accusative: 'неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу'.split('_'),
- genitive: 'неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи'.split('_')
- };
- if (!date) {
- return weekdays.nominative;
- }
- /** @type {?} */
- var nounCase = (/(\[[ВвУу]\]) ?dddd/).test(format) ?
- 'accusative' :
- ((/\[?(?:минулої|наступної)? ?\] ?dddd/).test(format) ?
- 'genitive' :
- 'nominative');
- return weekdays[nounCase][getDayOfWeek(date, isUTC)];
- }
- /**
- * @param {?} str
- * @return {?}
- */
- function processHoursFunction(str) {
- return (/**
- * @param {?} date
- * @return {?}
- */
- function (date) {
- return str + 'о' + (getHours(date) === 11 ? 'б' : '') + '] LT';
- });
- }
- /** @type {?} */
- var ukLocale = {
- abbr: 'uk',
- months: {
- format: 'січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня'.split('_'),
- standalone: 'січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень'.split('_')
- },
- monthsShort: 'січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд'.split('_'),
- weekdays: weekdaysCaseReplace,
- weekdaysShort: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
- weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D MMMM YYYY р.',
- LLL: 'D MMMM YYYY р., HH:mm',
- LLLL: 'dddd, D MMMM YYYY р., HH:mm'
- },
- calendar: {
- sameDay: processHoursFunction('[Сьогодні '),
- nextDay: processHoursFunction('[Завтра '),
- lastDay: processHoursFunction('[Вчора '),
- nextWeek: processHoursFunction('[У] dddd ['),
- lastWeek: /**
- * @param {?} date
- * @return {?}
- */
- function (date) {
- switch (getDayOfWeek(date)) {
- case 0:
- case 3:
- case 5:
- case 6:
- return processHoursFunction('[Минулої] dddd [')(date);
- case 1:
- case 2:
- case 4:
- return processHoursFunction('[Минулого] dddd [')(date);
- }
- },
- sameElse: 'L'
- },
- relativeTime: {
- future: 'за %s',
- past: '%s тому',
- s: 'декілька секунд',
- ss: relativeTimeWithPlural$2,
- m: relativeTimeWithPlural$2,
- mm: relativeTimeWithPlural$2,
- h: 'годину',
- hh: relativeTimeWithPlural$2,
- d: 'день',
- dd: relativeTimeWithPlural$2,
- M: 'місяць',
- MM: relativeTimeWithPlural$2,
- y: 'рік',
- yy: relativeTimeWithPlural$2
- },
- // M. E.: those two are virtually unused but a user might want to implement them for his/her website for some reason
- meridiemParse: /ночі|ранку|дня|вечора/,
- isPM: /**
- * @param {?} input
- * @return {?}
- */
- function (input) {
- return /^(дня|вечора)$/.test(input);
- },
- meridiem: /**
- * @param {?} hour
- * @param {?} minute
- * @param {?} isLower
- * @return {?}
- */
- function (hour, minute, isLower) {
- if (hour < 4) {
- return 'ночі';
- }
- else if (hour < 12) {
- return 'ранку';
- }
- else if (hour < 17) {
- return 'дня';
- }
- else {
- return 'вечора';
- }
- },
- dayOfMonthOrdinalParse: /\d{1,2}-(й|го)/,
- ordinal: /**
- * @param {?} _num
- * @param {?} period
- * @return {?}
- */
- function (_num, period) {
- /** @type {?} */
- var num = Number(_num);
- switch (period) {
- case 'M':
- case 'd':
- case 'DDD':
- case 'w':
- case 'W':
- return num + '-й';
- case 'D':
- return num + '-го';
- default:
- return num.toString();
- }
- },
- week: {
- dow: 1,
- // Monday is the first day of the week.
- doy: 7 // The week that contains Jan 1st is the first week of the year.
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // tslint:disable:comment-format binary-expression-operand-order max-line-length
- // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
- // tslint:disable:no-shadowed-variable switch-default prefer-const
- // tslint:disable:one-variable-per-declaration newline-before-return
- //! moment.js locale configuration
- //! locale : Việt Nam [vi]
- //! author : Chris Gedrim : https://github.com/chrisgedrim
- /** @type {?} */
- var viLocale = {
- abbr: 'vi',
- months: 'tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12'.split('_'),
- monthsShort: 'Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12'.split('_'),
- monthsParseExact: true,
- weekdays: 'chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy'.split('_'),
- weekdaysShort: 'CN_T2_T3_T4_T5_T6_T7'.split('_'),
- weekdaysMin: 'CN_T2_T3_T4_T5_T6_T7'.split('_'),
- weekdaysParseExact: true,
- meridiemParse: /sa|ch/i,
- isPM: /**
- * @param {?} input
- * @return {?}
- */
- function (input) {
- return /^ch$/i.test(input);
- },
- meridiem: /**
- * @param {?} hours
- * @param {?} minutes
- * @param {?} isLower
- * @return {?}
- */
- function (hours, minutes, isLower) {
- if (hours < 12) {
- return isLower ? 'sa' : 'SA';
- }
- else {
- return isLower ? 'ch' : 'CH';
- }
- },
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM [năm] YYYY',
- LLL: 'D MMMM [năm] YYYY HH:mm',
- LLLL: 'dddd, D MMMM [năm] YYYY HH:mm',
- l: 'DD/M/YYYY',
- ll: 'D MMM YYYY',
- lll: 'D MMM YYYY HH:mm',
- llll: 'ddd, D MMM YYYY HH:mm'
- },
- calendar: {
- sameDay: '[Hôm nay lúc] LT',
- nextDay: '[Ngày mai lúc] LT',
- nextWeek: 'dddd [tuần tới lúc] LT',
- lastDay: '[Hôm qua lúc] LT',
- lastWeek: 'dddd [tuần trước lúc] LT',
- sameElse: 'L'
- },
- relativeTime: {
- future: '%s tới',
- past: '%s trước',
- s: 'vài giây',
- ss: '%d giây',
- m: 'một phút',
- mm: '%d phút',
- h: 'một giờ',
- hh: '%d giờ',
- d: 'một ngày',
- dd: '%d ngày',
- M: 'một tháng',
- MM: '%d tháng',
- y: 'một năm',
- yy: '%d năm'
- },
- dayOfMonthOrdinalParse: /\d{1,2}/,
- ordinal: /**
- * @param {?} _num
- * @return {?}
- */
- function (_num) {
- return '' + _num;
- },
- week: {
- dow: 1,
- // Thứ Hai là ngày đầu tuần.
- doy: 4 // Tuần chứa ngày 4 tháng 1 là tuần đầu tiên trong năm.
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // tslint:disable:comment-format binary-expression-operand-order max-line-length
- // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
- // tslint:disable:no-shadowed-variable switch-default prefer-const
- // tslint:disable:one-variable-per-declaration newline-before-return
- // tslint:disable:no-parameter-reassignment prefer-switch
- //! moment.js locale configuration
- //! locale : Chinese (China) [zh-cn]
- //! author : suupic : https://github.com/suupic
- //! author : Zeno Zeng : https://github.com/zenozeng
- /** @type {?} */
- var zhCnLocale = {
- abbr: 'zh-cn',
- months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'),
- monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
- weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
- weekdaysShort: '周日_周一_周二_周三_周四_周五_周六'.split('_'),
- weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'YYYY/MM/DD',
- LL: 'YYYY年M月D日',
- LLL: 'YYYY年M月D日Ah点mm分',
- LLLL: 'YYYY年M月D日ddddAh点mm分',
- l: 'YYYY/M/D',
- ll: 'YYYY年M月D日',
- lll: 'YYYY年M月D日 HH:mm',
- llll: 'YYYY年M月D日dddd HH:mm'
- },
- meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
- meridiemHour: /**
- * @param {?} hour
- * @param {?} meridiem
- * @return {?}
- */
- function (hour, meridiem) {
- if (hour === 12) {
- hour = 0;
- }
- if (meridiem === '凌晨' || meridiem === '早上' ||
- meridiem === '上午') {
- return hour;
- }
- else if (meridiem === '下午' || meridiem === '晚上') {
- return hour + 12;
- }
- else {
- // '中午'
- return hour >= 11 ? hour : hour + 12;
- }
- },
- meridiem: /**
- * @param {?} hour
- * @param {?} minute
- * @param {?} isLower
- * @return {?}
- */
- function (hour, minute, isLower) {
- /** @type {?} */
- var hm = hour * 100 + minute;
- if (hm < 600) {
- return '凌晨';
- }
- else if (hm < 900) {
- return '早上';
- }
- else if (hm < 1130) {
- return '上午';
- }
- else if (hm < 1230) {
- return '中午';
- }
- else if (hm < 1800) {
- return '下午';
- }
- else {
- return '晚上';
- }
- },
- calendar: {
- sameDay: '[今天]LT',
- nextDay: '[明天]LT',
- nextWeek: '[下]ddddLT',
- lastDay: '[昨天]LT',
- lastWeek: '[上]ddddLT',
- sameElse: 'L'
- },
- dayOfMonthOrdinalParse: /\d{1,2}(日|月|周)/,
- ordinal: /**
- * @param {?} _num
- * @param {?} period
- * @return {?}
- */
- function (_num, period) {
- /** @type {?} */
- var num = Number(_num);
- switch (period) {
- case 'd':
- case 'D':
- case 'DDD':
- return num + '日';
- case 'M':
- return num + '月';
- case 'w':
- case 'W':
- return num + '周';
- default:
- return num.toString();
- }
- },
- relativeTime: {
- future: '%s内',
- past: '%s前',
- s: '几秒',
- ss: '%d 秒',
- m: '1 分钟',
- mm: '%d 分钟',
- h: '1 小时',
- hh: '%d 小时',
- d: '1 天',
- dd: '%d 天',
- M: '1 个月',
- MM: '%d 个月',
- y: '1 年',
- yy: '%d 年'
- },
- week: {
- // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效
- dow: 1,
- // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- }
- };
- export { add, arLocale, bgLocale, caLocale, csLocale, daLocale, deLocale, defineLocale, enGbLocale, endOf, esDoLocale, esLocale, esUsLocale, etLocale, fiLocale, formatDate, frLocale, getDay, getFirstDayOfMonth, getFullYear, getLocale, getMonth, getSetGlobalLocale, glLocale, heLocale, hiLocale, hrLocale, huLocale, idLocale, isAfter, isArray, isBefore, isDate, isDateValid, isDisabledDay, isFirstDayOfWeek, isSame, isSameDay, isSameMonth, isSameYear, itLocale, jaLocale, koLocale, listLocales, ltLocale, lvLocale, mnLocale, nbLocale, nlBeLocale, nlLocale, parseDate, plLocale, ptBrLocale, roLocale, ruLocale, setFullDate, shiftDate, skLocale, slLocale, startOf, subtract, svLocale, thLocale, trLocale, ukLocale, updateLocale, utcAsLocal, viLocale, zhCnLocale, createDate as ɵa };
- //# sourceMappingURL=ngx-bootstrap-chronos.js.map
|