forked from wanasit/chrono
-
Notifications
You must be signed in to change notification settings - Fork 0
/
chrono.map.json
1 lines (1 loc) · 487 KB
/
chrono.map.json
1
{"version":3,"sources":["node_modules/browserify/node_modules/browser-pack/_prelude.js","src/chrono.js","src/options.js","src/refiners/refiner.js","src/result.js","src/parsers/parser.js","src/refiners/OverlapRemovalRefiner.js","src/refiners/ExtractTimezoneOffsetRefiner.js","src/refiners/ExtractTimezoneAbbrRefiner.js","src/refiners/ForwardDateRefiner.js","src/refiners/UnlikelyFormatFilter.js","src/refiners/EN/ENMergeDateRangeRefiner.js","src/refiners/EN/ENMergeDateTimeRefiner.js","src/refiners/EN/ENPrioritizeSpecificDateRefiner.js","src/refiners/JP/JPMergeDateRangeRefiner.js","src/refiners/FR/FRMergeDateRangeRefiner.js","src/refiners/FR/FRMergeDateTimeRefiner.js","src/refiners/DE/DEMergeDateRangeRefiner.js","src/refiners/DE/DEMergeDateTimeRefiner.js","src/parsers/EN/ENISOFormatParser.js","src/parsers/EN/ENDeadlineFormatParser.js","src/parsers/EN/ENRelativeDateFormatParser.js","src/parsers/EN/ENMonthNameLittleEndianParser.js","src/parsers/EN/ENMonthNameMiddleEndianParser.js","src/parsers/EN/ENMonthNameParser.js","src/parsers/EN/ENSlashDateFormatParser.js","src/parsers/EN/ENSlashDateFormatStartWithYearParser.js","src/parsers/EN/ENSlashMonthFormatParser.js","src/parsers/EN/ENTimeAgoFormatParser.js","src/parsers/EN/ENTimeExpressionParser.js","src/parsers/EN/ENWeekdayParser.js","src/parsers/EN/ENCasualDateParser.js","src/parsers/EN/ENCasualTimeParser.js","src/parsers/JP/JPStandardParser.js","src/parsers/ES/ESCasualDateParser.js","src/parsers/JP/JPCasualDateParser.js","src/parsers/ES/ESTimeAgoFormatParser.js","src/parsers/ES/ESDeadlineFormatParser.js","src/parsers/ES/ESTimeExpressionParser.js","src/parsers/ES/ESWeekdayParser.js","src/parsers/ES/ESMonthNameLittleEndianParser.js","src/parsers/ES/ESSlashDateFormatParser.js","src/parsers/FR/FRCasualDateParser.js","src/parsers/FR/FRDeadlineFormatParser.js","src/parsers/FR/FRMonthNameLittleEndianParser.js","src/parsers/FR/FRSlashDateFormatParser.js","src/parsers/FR/FRTimeAgoFormatParser.js","src/parsers/FR/FRTimeExpressionParser.js","src/parsers/FR/FRWeekdayParser.js","src/parsers/ZH-Hant/ZHHantDateParser.js","src/parsers/ZH-Hant/ZHHantWeekdayParser.js","src/parsers/ZH-Hant/ZHHantTimeExpressionParser.js","src/parsers/ZH-Hant/ZHHantCasualDateParser.js","src/parsers/ZH-Hant/ZHHantDeadlineFormatParser.js","src/parsers/DE/DEDeadlineFormatParser.js","src/parsers/DE/DEMonthNameLittleEndianParser.js","src/parsers/DE/DEMonthNameParser.js","src/parsers/DE/DESlashDateFormatParser.js","src/parsers/DE/DETimeAgoFormatParser.js","src/parsers/DE/DETimeExpressionParser.js","src/parsers/DE/DECasualDateParser.js","src/parsers/DE/DEWeekdayParser.js","src/utils/ZH-Hant.js","src/utils/EN.js","src/utils/JP.js","src/utils/ES.js","src/utils/FR.js","src/utils/DE.js","node_modules/moment/moment.js"],"names":["options","exports","require","parser","refiner","Parser","Refiner","Filter","ParsedResult","ParsedComponents","Chrono","option","casualOption","this","parsers","Object","refiners","prototype","parse","text","refDate","opt","Date","allResults","forEach","results","execute","concat","sort","a","b","index","refine","parseDate","length","start","date","strict","strictOption","casual","en","mergeOptions","commonPostProcessing","de","es","fr","ja","apply","arguments","addedTypes","mergedOption","call","p","constructor","push","r","ExtractTimezoneOffsetRefiner","ExtractTimezoneAbbrRefiner","UnlikelyFormatFilter","zh","strictMode","DEDeadlineFormatParser","DEMonthNameLittleEndianParser","DEMonthNameParser","DESlashDateFormatParser","DETimeAgoFormatParser","DETimeExpressionParser","OverlapRemovalRefiner","ForwardDateRefiner","DEMergeDateTimeRefiner","DEMergeDateRangeRefiner","unshift","DECasualDateParser","DEWeekdayParser","ENISOFormatParser","ENDeadlineFormatParser","ENMonthNameLittleEndianParser","ENMonthNameMiddleEndianParser","ENMonthNameParser","ENSlashDateFormatParser","ENSlashDateFormatStartWithYearParser","ENSlashMonthFormatParser","ENTimeAgoFormatParser","ENTimeExpressionParser","ENMergeDateTimeRefiner","ENMergeDateRangeRefiner","ENPrioritizeSpecificDateRefiner","ENCasualDateParser","ENCasualTimeParser","ENWeekdayParser","ENRelativeDateFormatParser","JPStandardParser","JPMergeDateRangeRefiner","JPCasualDateParser","ESTimeAgoFormatParser","ESDeadlineFormatParser","ESTimeExpressionParser","ESMonthNameLittleEndianParser","ESSlashDateFormatParser","ESCasualDateParser","ESWeekdayParser","FRDeadlineFormatParser","FRMonthNameLittleEndianParser","FRSlashDateFormatParser","FRTimeAgoFormatParser","FRTimeExpressionParser","FRMergeDateRangeRefiner","FRMergeDateTimeRefiner","FRCasualDateParser","FRWeekdayParser","ZHHantDateParser","ZHHantWeekdayParser","ZHHantTimeExpressionParser","ZHHantCasualDateParser","ZHHantDeadlineFormatParser","isValid","result","filteredResult","i","ref","tags","end","components","knownValues","impliedValues","key","moment","imply","month","year","clone","JSON","stringify","hasPossibleDates","isPossibleDate","component","get","value","assign","isCertain","dateMoment","utcOffset","toDate","set","currentTimezoneOffset","targetTimezoneOffset","adjustTimezoneOffset","add","isStrictMode","pattern","extract","match","regex","remainingText","exec","substring","filteredResults","prevResult","TIMEZONE_OFFSET_PATTERN","RegExp","TIMEZONE_OFFSET_SIGN_GROUP","TIMEZONE_OFFSET_HOUR_OFFSET_GROUP","TIMEZONE_OFFSET_MINUTE_OFFSET_GROUP","hourOffset","parseInt","minuteOffset","timezoneOffset","TIMEZONE_ABBR_MAP","TIMEZONE_NAME_PATTERN","timezoneAbbr","toUpperCase","undefined","ACDT","ACST","ADT","AEDT","AEST","AFT","AKDT","AKST","ALMT","AMST","AMT","ANAST","ANAT","AQTT","ART","AST","AWDT","AWST","AZOST","AZOT","AZST","AZT","BNT","BOT","BRST","BRT","BST","BTT","CAST","CAT","CCT","CDT","CEST","CET","CHADT","CHAST","CKT","CLST","CLT","COT","CST","CVT","CXT","ChST","DAVT","EASST","EAST","EAT","ECT","EDT","EEST","EET","EGST","EGT","EST","ET","FJST","FJT","FKST","FKT","FNT","GALT","GAMT","GET","GFT","GILT","GMT","GST","GYT","HAA","HAC","HADT","HAE","HAP","HAR","HAST","HAT","HAY","HKT","HLV","HNA","HNC","HNE","HNP","HNR","HNT","HNY","HOVT","ICT","IDT","IOT","IRDT","IRKST","IRKT","IRST","IST","JST","KGT","KRAST","KRAT","KST","KUYT","LHDT","LHST","LINT","MAGST","MAGT","MART","MAWT","MDT","MESZ","MEZ","MHT","MMT","MSD","MSK","MST","MUT","MVT","MYT","NCT","NDT","NFT","NOVST","NOVT","NPT","NST","NUT","NZDT","NZST","OMSST","OMST","PDT","PET","PETST","PETT","PGT","PHOT","PHT","PKT","PMDT","PMST","PONT","PST","PT","PWT","PYST","PYT","RET","SAMT","SAST","SBT","SCT","SGT","SRT","SST","TAHT","TFT","TJT","TKT","TLT","TMT","TVT","ULAT","UTC","UYST","UYT","UZT","VET","VLAST","VLAT","VUT","WAST","WAT","WEST","WESZ","WET","WEZ","WFT","WGST","WGT","WIB","WIT","WITA","WST","WT","YAKST","YAKT","YAPT","YEKST","YEKT","refMoment","isAfter","day","replace","mergedResult","currResult","isAbleToMerge","mergeResult","result1","result2","begin","textBetween","isWeekdayResult","fromResult","toResult","getTime","tmp","tag","startIndex","Math","min","endIndex","max","name","isDateOnly","isTimeOnly","curResult","PATTERN","dateResult","timeResult","beginDate","beginTime","beginDateTime","endDate","endTime","endDateTime","isMoreSpecific","moreSpecific","includesRelativeResult","referToSameDate","specificResult","nonSpecificResult","YEAR_NUMBER_GROUP","MONTH_NUMBER_GROUP","DATE_NUMBER_GROUP","HOUR_NUMBER_GROUP","MINUTE_NUMBER_GROUP","SECOND_NUMBER_GROUP","MILLISECOND_NUMBER_GROUP","TZD_HOUR_OFFSET_GROUP","TZD_MINUTE_OFFSET_GROUP","substr","offset","util","INTEGER_WORDS_PATTERN","STRICT_PATTERN","num","toLowerCase","INTEGER_WORDS","hour","minute","second","MODIFIER_WORD_GROUP","MULTIPLIER_WORD_GROUP","RELATIVE_WORD_GROUP","modifier","ORDINAL_WORDS_PATTERN","WEEKDAY_GROUP","DATE_GROUP","DATE_NUM_GROUP","DATE_TO_GROUP","DATE_TO_NUM_GROUP","MONTH_NAME_GROUP","YEAR_GROUP","YEAR_BE_GROUP","MONTH_OFFSET","ORDINAL_WORDS","trim","test","nextYear","lastYear","abs","diff","weekday","WEEKDAY_OFFSET","YEAR_GROUP2","YEAR_BE_GROUP2","yearBE","DAYS_OFFSET","sunday","sun","monday","mon","tuesday","wednesday","wed","thursday","thur","friday","fri","saturday","sat","OPENNING_GROUP","ENDING_GROUP","MONTH_GROUP","DAY_GROUP","argument","indexOf","tday","FIRST_REG_PATTERN","SECOND_REG_PATTERN","HOUR_GROUP","MINUTE_GROUP","SECOND_GROUP","AM_PM_HOUR_GROUP","meridiem","ampm","startAtPM","tues","tue","thurs","thu","keys","join","PREFIX_GROUP","POSTFIX_GROUP","updateParsedComponent","startMoment","startMomentFixed","refOffset","dayOfWeek","prefix","postfix","norm","lowerText","millisecond","TIME_MATCH","ERA_GROUP","toHankaku","secondMatch","firstMatch","isNaN","domingo","dom","lunes","lun","martes","mar","miercoles","miércoles","mie","jueves","jue","viernes","vier","sabado","sábado","sab","dimanche","dim","lundi","mardi","mercredi","mer","jeudi","jeu","vendredi","ven","samedi","sam","NUMBER","zhStringToNumber","zhStringToYear","patternString1","patternString2","DAY_GROUP_1","ZH_AM_PM_HOUR_GROUP_1","ZH_AM_PM_HOUR_GROUP_2","DAY_GROUP_3","ZH_AM_PM_HOUR_GROUP_3","ZHTimeExpressionParser","day1","day3","zhAMPMString1","zhAMPM1","zhAMPMString2","zhAMPM2","zhAMPMString3","zhAMPM3","endMoment","NOW_GROUP","TIME_GROUP_1","TIME_GROUP_2","TIME_GROUP_3","time1","timeString2","time2","timeString3","time3","NUMBER_GROUP","UNIT_GROUP","number","string","unit","unitAbbr","sonntag","so","montag","mo","dienstag","di","mittwoch","mi","donnerstag","do","freitag","samstag","sa","forwardDatesOnly","零","一","二","兩","三","四","五","六","七","八","九","十","廿","卅","天","日","char","january","jan","jan.","february","feb","feb.","march","mar.","april","apr","apr.","may","june","jun","jun.","july","jul","jul.","august","aug","aug.","september","sep","sep.","sept","sept.","october","oct","oct.","november","nov","nov.","december","dec","dec.","one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve","first","third","fourth","fifth","sixth","seventh","eighth","ninth","tenth","eleventh","twelfth","thirteenth","fourteenth","fifteenth","sixteenth","seventeenth","eighteenth","nineteenth","twentieth","twenty first","twenty second","twenty third","twenty fourth","twenty fifth","twenty sixth","twenty seventh","twenty eighth","twenty ninth","thirtieth","thirty first","String","fromCharCode","alphaNum","token","charCodeAt","toZenkaku","vie","enero","ene","ene.","febrero","marzo","abril","abr","abr.","mayo","may.","junio","julio","agosto","ago","ago.","septiembre","octubre","noviembre","diciembre","dic","dic.","janvier","février","fév","fév.","mars","avril","avr","avr.","mai","juin","juillet","août","aout","septembre","octobre","novembre","décembre","un","deux","trois","quatre","cinq","huit","neuf","dix","onze","douze","treize","januar","februar","märz","maerz","mär","mär.","mrz","mrz.","juni","juli","oktober","okt","okt.","dezember","dez","dez.","eins","zwei","drei","fünf","fuenf","sechs","sieben","acht","neun","zehn","elf","zwölf","zwoelf","global","factory","module","define","amd","utils_hooks__hooks","hookCallback","setHookCallback","callback","isArray","input","toString","isDate","map","arr","fn","res","hasOwnProp","hasOwnProperty","extend","valueOf","create_utc__createUTC","format","locale","createLocalOrUTC","utc","defaultParsingFlags","empty","unusedTokens","unusedInput","overflow","charsLeftOver","nullInput","invalidMonth","invalidFormat","userInvalidated","iso","getParsingFlags","m","_pf","valid__isValid","_isValid","flags","_d","invalidWeekday","_strict","bigHour","valid__createInvalid","NaN","copyConfig","to","from","prop","val","_isAMomentObject","_i","_f","_l","_tzm","_isUTC","_offset","_locale","momentProperties","Moment","config","updateInProgress","updateOffset","isMoment","obj","absFloor","ceil","floor","toInt","argumentForCoercion","coercedNumber","isFinite","compareArrays","array1","array2","dontConvert","len","lengthDiff","diffs","Locale","normalizeLocale","chooseLocale","names","j","next","split","loadLocale","slice","oldLocale","locales","globalLocale","_abbr","locale_locales__getSetGlobalLocale","e","values","data","locale_locales__getLocale","defineLocale","abbr","addUnitAlias","shorthand","lowerCase","aliases","normalizeUnits","units","normalizeObjectUnits","inputObject","normalizedProp","normalizedInput","makeGetSet","keepTime","get_set__set","get_set__get","mom","getSet","zeroFill","targetLength","forceSign","absNumber","zerosToFill","sign","pow","addFormatToken","padded","ordinal","func","formatTokenFunctions","localeData","removeFormattingTokens","makeFormatFunction","array","formattingTokens","output","Function","formatMoment","expandFormat","formatFunctions","invalidDate","replaceLongDateFormatTokens","longDateFormat","localFormattingTokens","lastIndex","isFunction","sth","addRegexToken","strictRegex","regexes","isStrict","getParseRegexForToken","unescapeFormat","s","matched","p1","p2","p3","p4","addParseToken","tokens","addWeekParseToken","_w","addTimeToArrayFromToken","_a","daysInMonth","getUTCDate","localeMonths","_months","localeMonthsShort","_monthsShort","localeMonthsParse","monthName","_monthsParse","_longMonthsParse","_shortMonthsParse","months","monthsShort","setMonth","dayOfMonth","monthsParse","getSetMonth","getDaysInMonth","checkOverflow","MONTH","DATE","YEAR","HOUR","MINUTE","SECOND","MILLISECOND","_overflowDayOfYear","warn","msg","suppressDeprecationWarnings","console","deprecate","firstTime","Error","stack","deprecateSimple","deprecations","configFromISO","l","from_string__isoRegex","isoDates","isoTimes","matchOffset","configFromStringAndFormat","configFromString","aspNetJsonRegex","createFromInputFallback","createDate","y","d","h","M","ms","setFullYear","createUTCDate","setUTCFullYear","daysInYear","isLeapYear","getIsLeapYear","weekOfYear","firstDayOfWeek","firstDayOfWeekOfYear","adjustedMoment","daysToDayOfWeek","local__createLocal","week","dayOfYear","localeWeek","_week","dow","doy","localeFirstDayOfWeek","localeFirstDayOfYear","getSetWeek","getSetISOWeek","dayOfYearFromWeeks","week1Jan","janX","getUTCDay","getSetDayOfYear","round","startOf","defaults","c","currentDateArray","now","_useUTC","getUTCFullYear","getUTCMonth","getFullYear","getMonth","getDate","configFromArray","currentDate","yearToUse","dayOfYearFromWeekInfo","_dayOfYear","_nextDay","setUTCMinutes","getUTCMinutes","w","weekYear","temp","GG","W","E","gg","ISO_8601","parsedInput","skipped","stringLength","totalParsedInputLength","meridiemFixWrap","_meridiem","isPm","meridiemHour","isPM","configFromStringAndArray","tempConfig","bestMoment","scoreToBeat","currentScore","score","configFromObject","createFromConfig","prepareConfig","preparse","configFromInput","isUTC","pickBy","moments","args","Duration","duration","years","quarters","quarter","weeks","days","hours","minutes","seconds","milliseconds","_milliseconds","_days","_data","_bubble","isDuration","separator","offsetFromString","matches","chunk","parts","chunkOffset","cloneWithOffset","model","setTime","local","getDateOffset","getTimezoneOffset","getSetOffset","keepLocalTime","localAdjust","_changeInProgress","add_subtract__addSubtract","create__createDuration","getSetZone","setOffsetToUTC","setOffsetToLocal","subtract","setOffsetToParsedOffset","hasAlignedHourOffset","isDaylightSavingTime","isDaylightSavingTimeShifted","_isDSTShifted","other","toArray","isLocal","isUtcOffset","isUtc","ret","diffRes","aspNetRegex","create__isoRegex","parseIso","momentsDifference","inp","parseFloat","positiveMomentsDifference","base","isBefore","createAdder","direction","period","dur","isAdding","moment_calendar__calendar","time","formats","sod","calendar","inputMs","endOf","isBetween","isSame","asFloat","delta","that","zoneDelta","monthDiff","anchor2","adjust","wholeMonthDiff","anchor","moment_format__toISOString","toISOString","inputString","defaultFormat","postformat","withoutSuffix","humanize","fromNow","toNow","newLocaleData","isoWeekday","to_type__valueOf","unix","toObject","moment_valid__isValid","parsingFlags","invalidAt","addWeekYearFormatToken","getter","weeksInYear","getSetWeekYear","getSetISOWeekYear","getISOWeeksInYear","getWeeksInYear","weekInfo","getSetQuarter","parseWeekday","weekdaysParse","localeWeekdays","_weekdays","localeWeekdaysShort","_weekdaysShort","localeWeekdaysMin","_weekdaysMin","localeWeekdaysParse","weekdayName","_weekdaysParse","weekdays","weekdaysShort","weekdaysMin","getSetDayOfWeek","getDay","getSetLocaleDayOfWeek","getSetISODayOfWeek","lowercase","matchMeridiem","_meridiemParse","localeIsPM","charAt","localeMeridiem","isLower","parseMs","getZoneAbbr","getZoneName","moment__createUnix","moment__createInZone","parseZone","locale_calendar__calendar","_calendar","_longDateFormat","formatUpper","_invalidDate","_ordinal","preParsePostFormat","relative__relativeTime","isFuture","_relativeTime","pastFuture","locale_set__set","_ordinalParseLenient","_ordinalParse","source","lists__get","field","setter","list","count","out","lists__listMonths","lists__listMonthsShort","lists__listWeekdays","lists__listWeekdaysShort","lists__listWeekdaysMin","duration_abs__abs","mathAbs","duration_add_subtract__addSubtract","duration_add_subtract__add","duration_add_subtract__subtract","absCeil","bubble","monthsFromDays","monthsToDays","daysToMonths","as","duration_as__valueOf","makeAs","alias","duration_get__get","makeGetter","substituteTimeAgo","relativeTime","duration_humanize__relativeTime","posNegDuration","thresholds","duration_humanize__getSetRelativeTimeThreshold","threshold","limit","withSuffix","iso_string__toISOString","iso_string__abs","Y","D","total","asSeconds","match1","match2","match3","match4","match6","match1to2","match1to3","match1to4","match1to6","matchUnsigned","matchSigned","matchTimestamp","matchWord","defaultLocaleMonths","defaultLocaleMonthsShort","parseTwoDigitYear","getSetYear","defaultLocaleWeek","prototypeMin","prototypeMax","add_subtract__add","add_subtract__subtract","lang","isoWeekYear","getSetDayOfMonth","defaultLocaleWeekdays","defaultLocaleWeekdaysShort","defaultLocaleWeekdaysMin","_isPm","defaultLocaleMeridiemParse","getSetHour","getSetMinute","getSetSecond","getSetMillisecond","momentPrototype__proto","toJSON","isoWeek","isoWeeks","isoWeeksInYear","isDST","isDSTShifted","zoneAbbr","zoneName","dates","zone","momentPrototype","defaultCalendar","sameDay","nextDay","nextWeek","lastDay","lastWeek","sameElse","defaultLongDateFormat","LTS","LT","L","LL","LLL","LLLL","defaultInvalidDate","defaultOrdinal","defaultOrdinalParse","defaultRelativeTime","future","past","mm","hh","dd","MM","yy","prototype__proto","firstDayOfYear","ordinalParse","langData","asMilliseconds","asMinutes","asHours","asDays","asWeeks","asMonths","asYears","duration_prototype__proto","toIsoString","version","invalid","relativeTimeThreshold","_moment"],"mappings":"AAAA;CoEMC,SAAUyvB,EAAQC,GACI,gBAAZzvB,UAA0C,mBAAX0vB,QAAyBA,OAAO1vB,QAAUyvB,IAC9D,kBAAXE,SAAyBA,OAAOC,IAAMD,OAAOF,GACpDD,EAAO3nB,OAAS4nB,KAClB7uB,KAAM,WAAc,YAIlB,SAASivB,KACL,MAAOC,IAAahtB,MAAM,KAAMC,WAKpC,QAASgtB,GAAiBC,GACtBF,GAAeE,EAGnB,QAASC,GAAQC,GACb,MAAiD,mBAA1CpvB,OAAOE,UAAUmvB,SAASjtB,KAAKgtB,GAG1C,QAASE,GAAOF,GACZ,MAAOA,aAAiB7uB,OAAkD,kBAA1CP,OAAOE,UAAUmvB,SAASjtB,KAAKgtB,GAGnE,QAASG,GAAIC,EAAKC,GACd,GAAclpB,GAAVmpB,IACJ,KAAKnpB,EAAI,EAAGA,EAAIipB,EAAIruB,SAAUoF,EAC1BmpB,EAAIntB,KAAKktB,EAAGD,EAAIjpB,GAAIA,GAExB,OAAOmpB,GAGX,QAASC,GAAW7uB,EAAGC,GACnB,MAAOf,QAAOE,UAAU0vB,eAAextB,KAAKtB,EAAGC,GAGnD,QAAS8uB,GAAO/uB,EAAGC,GACf,IAAK,GAAIwF,KAAKxF,GACN4uB,EAAW5uB,EAAGwF,KACdzF,EAAEyF,GAAKxF,EAAEwF,GAYjB,OARIopB,GAAW5uB,EAAG,cACdD,EAAEuuB,SAAWtuB,EAAEsuB,UAGfM,EAAW5uB,EAAG,aACdD,EAAEgvB,QAAU/uB,EAAE+uB,SAGXhvB,EAGX,QAASivB,GAAuBX,EAAOY,EAAQC,EAAQ3uB,GACnD,MAAO4uB,IAAiBd,EAAOY,EAAQC,EAAQ3uB,GAAQ,GAAM6uB,MA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B,GAEhC,IAAI,GADAiiB,GAAS,EACL9b,EAAE,EAAGA,EAAEnG,EAAKe,OAAQoF,IAAI,CAC9B,GAAIge,GAAOnkB,EAAKmG,EACJ,OAATge,EACDlC,EAAmB,IAAVA,EAAc/B,OAAOiE,GAASlC,EAAS/B,OAAOiE,GAEvDlC,GAAU/B,OAAOiE,GAGrB,MAAOlC,IAGTnjB,QAAQshB,eAAe,SAASpgB,GAE9B,IAAI,GADAkiB,GAAS,GACL/b,EAAE,EAAGA,EAAEnG,EAAKe,OAAQoF,IAAI,CAC9B,GAAIge,GAAOnkB,EAAKmG,EAChB+b,IAAkBhC,OAAOiE,GAE3B,MAAOlb,UAASiZ","file":"bundle.js","sourcesContent":["(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})","\nvar options = exports.options = require('./options');\n\nexports.parser = require('./parsers/parser');\nexports.refiner = require('./refiners/refiner');\n\nexports.Parser = exports.parser.Parser;\nexports.Refiner = exports.refiner.Refiner;\nexports.Filter = exports.refiner.Filter;\n\nexports.ParsedResult = require('./result').ParsedResult;\nexports.ParsedComponents = require('./result').ParsedComponents;\n\nvar Chrono = function(option) {\n\n option = option || exports.options.casualOption();\n\n this.option = option;\n this.parsers = new Object(option.parsers);\n this.refiners = new Object(option.refiners);\n};\n\n\nChrono.prototype.parse = function(text, refDate, opt) {\n\n refDate = refDate || new Date();\n opt = opt || {};\n\n var allResults = [];\n\n this.parsers.forEach(function (parser) {\n var results = parser.execute(text, refDate, opt);\n allResults = allResults.concat(results);\n });\n\n allResults.sort(function(a, b) {\n return a.index - b.index;\n });\n\n this.refiners.forEach(function (refiner) {\n allResults = refiner.refine(text, allResults, opt);\n });\n \n return allResults;\n};\n\n\nChrono.prototype.parseDate = function(text, refDate, opt) {\n var results = this.parse(text, refDate, opt);\n if (results.length > 0) {\n return results[0].start.date();\n }\n return null;\n};\n\nexports.Chrono = Chrono;\nexports.strict = new Chrono( options.strictOption() );\nexports.casual = new Chrono( options.casualOption() );\n\nexports.en = new Chrono( options.mergeOptions([\n options.en.casual, options.commonPostProcessing]));\n\nexports.de = new Chrono( options.mergeOptions([\n options.de.casual, options.en, options.commonPostProcessing]));\n\nexports.es = new Chrono( options.mergeOptions([\n options.es.casual, options.en, options.commonPostProcessing]));\n\nexports.fr = new Chrono( options.mergeOptions([\n options.fr.casual, options.en, options.commonPostProcessing]));\n\nexports.ja = new Chrono( options.mergeOptions([ \n options.ja.casual, options.en, options.commonPostProcessing]));\n\n\nexports.parse = function () {\n return exports.casual.parse.apply(exports.casual, arguments);\n};\n\nexports.parseDate = function () {\n return exports.casual.parseDate.apply(exports.casual, arguments);\n};\n\n\n\n\n","var parser = require('./parsers/parser');\nvar refiner = require('./refiners/refiner');\n\n\nexports.mergeOptions = function(options) {\n\n var addedTypes = {};\n var mergedOption = {\n parsers: [],\n refiners: []\n };\n\n options.forEach(function (option) {\n\n if (option.call) {\n option = option.call();\n }\n\n if (option.parsers) {\n option.parsers.forEach(function (p) {\n if (!addedTypes[p.constructor]) {\n mergedOption.parsers.push(p);\n addedTypes[p.constructor] = true;\n }\n });\n }\n\n if (option.refiners) {\n option.refiners.forEach(function (r) {\n if (!addedTypes[r.constructor]) {\n mergedOption.refiners.push(r);\n addedTypes[r.constructor] = true;\n }\n });\n }\n });\n\n return mergedOption;\n};\n\n\nexports.commonPostProcessing = function() {\n return {\n refiners: [\n // These should be after all other refiners\n new refiner.ExtractTimezoneOffsetRefiner(),\n new refiner.ExtractTimezoneAbbrRefiner(),\n new refiner.UnlikelyFormatFilter()\n ]\n }\n};\n\n\n// -------------------------------------------------------------\n\nexports.strictOption = function () {\n return exports.mergeOptions([\n exports.en(true),\n\n exports.de(true),\n exports.es(true),\n exports.fr(true),\n exports.ja(true),\n exports.zh,\n exports.commonPostProcessing\n ]);\n};\n\nexports.casualOption = function () {\n return exports.mergeOptions([\n exports.en.casual,\n\n exports.de(true),\n exports.es.casual,\n exports.fr.casual,\n exports.ja.casual,\n exports.zh,\n exports.commonPostProcessing\n ]);\n};\n\n// -------------------------------------------------------------\n\nexports.de = function(strictMode) {\n return {\n parsers: [\n new parser.DEDeadlineFormatParser(strictMode),\n new parser.DEMonthNameLittleEndianParser(strictMode),\n new parser.DEMonthNameParser(strictMode),\n new parser.DESlashDateFormatParser(strictMode),\n new parser.DETimeAgoFormatParser(strictMode),\n new parser.DETimeExpressionParser(strictMode)\n ],\n refiners: [\n new refiner.OverlapRemovalRefiner(),\n new refiner.ForwardDateRefiner(),\n new refiner.DEMergeDateTimeRefiner(),\n new refiner.DEMergeDateRangeRefiner()\n ]\n }\n};\n\nexports.de.casual = function() {\n var option = exports.de(false);\n option.parsers.unshift(new parser.DECasualDateParser());\n option.parsers.unshift(new parser.DEWeekdayParser());\n return option;\n};\n\n\n\n// -------------------------------------------------------------\n\n\nexports.en = function(strictMode) {\n return {\n parsers: [\n new parser.ENISOFormatParser(strictMode),\n new parser.ENDeadlineFormatParser(strictMode),\n new parser.ENMonthNameLittleEndianParser(strictMode),\n new parser.ENMonthNameMiddleEndianParser(strictMode),\n new parser.ENMonthNameParser(strictMode),\n new parser.ENSlashDateFormatParser(strictMode),\n new parser.ENSlashDateFormatStartWithYearParser(strictMode),\n new parser.ENSlashMonthFormatParser(strictMode),\n new parser.ENTimeAgoFormatParser(strictMode),\n new parser.ENTimeExpressionParser(strictMode)\n ],\n refiners: [\n new refiner.OverlapRemovalRefiner(),\n new refiner.ForwardDateRefiner(),\n\n // English\n new refiner.ENMergeDateTimeRefiner(),\n new refiner.ENMergeDateRangeRefiner(),\n new refiner.ENPrioritizeSpecificDateRefiner()\n ]\n }\n};\n\nexports.en.casual = function() {\n var option = exports.en(false);\n\n // EN\n option.parsers.unshift(new parser.ENCasualDateParser());\n option.parsers.unshift(new parser.ENCasualTimeParser());\n option.parsers.unshift(new parser.ENWeekdayParser());\n option.parsers.unshift(new parser.ENRelativeDateFormatParser());\n return option;\n};\n\n// -------------------------------------------------------------\n\nexports.ja = function() {\n return {\n parsers: [\n new parser.JPStandardParser()\n ],\n refiners: [\n new refiner.OverlapRemovalRefiner(),\n new refiner.ForwardDateRefiner(),\n new refiner.JPMergeDateRangeRefiner()\n ]\n }\n};\n\nexports.ja.casual = function() {\n var option = exports.ja();\n option.parsers.unshift(new parser.JPCasualDateParser());\n return option;\n};\n\n\n// -------------------------------------------------------------\n\n\nexports.es = function(strictMode) {\n return {\n parsers: [\n new parser.ESTimeAgoFormatParser(strictMode),\n new parser.ESDeadlineFormatParser(strictMode),\n new parser.ESTimeExpressionParser(strictMode),\n new parser.ESMonthNameLittleEndianParser(strictMode),\n new parser.ESSlashDateFormatParser(strictMode)\n ],\n refiners: [\n new refiner.OverlapRemovalRefiner(),\n new refiner.ForwardDateRefiner()\n ]\n }\n};\n\nexports.es.casual = function() {\n var option = exports.es(false);\n option.parsers.unshift(new parser.ESCasualDateParser());\n option.parsers.unshift(new parser.ESWeekdayParser());\n return option;\n};\n\n\n// -------------------------------------------------------------\n\nexports.fr = function(strictMode) {\n return {\n parsers: [\n new parser.FRDeadlineFormatParser(strictMode),\n new parser.FRMonthNameLittleEndianParser(strictMode),\n new parser.FRSlashDateFormatParser(strictMode),\n new parser.FRTimeAgoFormatParser(strictMode),\n new parser.FRTimeExpressionParser(strictMode)\n ],\n refiners: [\n new refiner.OverlapRemovalRefiner(),\n new refiner.ForwardDateRefiner(),\n new refiner.FRMergeDateRangeRefiner(),\n new refiner.FRMergeDateTimeRefiner()\n ]\n }\n};\n\nexports.fr.casual = function() {\n var option = exports.fr(false);\n option.parsers.unshift(new parser.FRCasualDateParser());\n option.parsers.unshift(new parser.FRWeekdayParser());\n return option;\n};\n\n\n// -------------------------------------------------------------\n\nexports.zh = function() {\n return {\n parsers: [\n new parser.ZHHantDateParser(),\n new parser.ZHHantWeekdayParser(),\n new parser.ZHHantTimeExpressionParser(),\n new parser.ZHHantCasualDateParser(),\n new parser.ZHHantDeadlineFormatParser()\n ],\n refiners: [\n new refiner.OverlapRemovalRefiner(),\n new refiner.ForwardDateRefiner()\n ]\n }\n};","\nexports.Refiner = function Refiner() { \n\n this.refine = function(text, results, opt) { return results; };\n}\n\nexports.Filter = function Filter() { \n \n exports.Refiner.call(this);\n\n this.isValid = function(text, result, opt) { return true; }\n this.refine = function(text, results, opt) { \n\n var filteredResult = [];\n for (var i=0; i < results.length; i++) {\n\n var result = results[i];\n if (this.isValid(text, result, opt)) {\n filteredResult.push(result);\n }\n }\n\n return filteredResult;\n }\n}\n\n\n// Common refiners\nexports.OverlapRemovalRefiner = require('./OverlapRemovalRefiner').Refiner;\nexports.ExtractTimezoneOffsetRefiner = require('./ExtractTimezoneOffsetRefiner').Refiner;\nexports.ExtractTimezoneAbbrRefiner = require('./ExtractTimezoneAbbrRefiner').Refiner;\nexports.ForwardDateRefiner = require('./ForwardDateRefiner').Refiner;\nexports.UnlikelyFormatFilter = require('./UnlikelyFormatFilter').Refiner;\n\n// EN refiners\nexports.ENMergeDateTimeRefiner = require('./EN/ENMergeDateTimeRefiner').Refiner;\nexports.ENMergeDateRangeRefiner = require('./EN/ENMergeDateRangeRefiner').Refiner;\nexports.ENPrioritizeSpecificDateRefiner = require('./EN/ENPrioritizeSpecificDateRefiner').Refiner;\n\n// JP refiners\nexports.JPMergeDateRangeRefiner = require('./JP/JPMergeDateRangeRefiner').Refiner;\n\n// FR refiners\nexports.FRMergeDateRangeRefiner = require('./FR/FRMergeDateRangeRefiner').Refiner;\nexports.FRMergeDateTimeRefiner = require('./FR/FRMergeDateTimeRefiner').Refiner;\n\n// DE refiners\nexports.DEMergeDateRangeRefiner = require('./DE/DEMergeDateRangeRefiner').Refiner;\nexports.DEMergeDateTimeRefiner = require('./DE/DEMergeDateTimeRefiner').Refiner;\n","var moment = require('moment');\n\nfunction ParsedResult(result){\n result = result || {};\n\n this.ref = result.ref;\n this.index = result.index;\n this.text = result.text;\n this.tags = result.tags || {};\n\n this.start = new ParsedComponents(result.start, result.ref)\n if(result.end){\n this.end = new ParsedComponents(result.end, result.ref)\n }\n}\n\nParsedResult.prototype.clone = function() {\n var result = new ParsedResult(this);\n result.tags = JSON.parse(JSON.stringify(this.tags));\n result.start = this.start.clone();\n if (this.end) {\n result.end = this.end.clone();\n }\n}\n\nParsedResult.prototype.hasPossibleDates = function() {\n return this.start.isPossibleDate() && (!this.end || this.end.isPossibleDate());\n}\n\n\nfunction ParsedComponents (components, ref){\n\n this.knownValues = {};\n this.impliedValues = {};\n\n if (components) {\n for (key in components) {\n this.knownValues[key] = components[key];\n }\n }\n\n if (ref) {\n ref = moment(ref);\n this.imply('day', ref.date())\n this.imply('month', ref.month() + 1)\n this.imply('year', ref.year())\n }\n \n\n this.imply('hour', 12);\n this.imply('minute', 0);\n this.imply('second', 0);\n this.imply('millisecond', 0);\n}\n\nParsedComponents.prototype.clone = function () {\n var component = new ParsedComponents();\n component.knownValues = JSON.parse(JSON.stringify(this.knownValues));\n component.impliedValues = JSON.parse(JSON.stringify(this.impliedValues));\n return component;\n};\n\nParsedComponents.prototype.get = function(component, value) {\n if (component in this.knownValues) return this.knownValues[component];\n if (component in this.impliedValues) return this.impliedValues[component];\n};\n\nParsedComponents.prototype.assign = function(component, value) {\n this.knownValues[component] = value;\n delete this.impliedValues[component];\n};\n\nParsedComponents.prototype.imply = function(component, value) {\n if (component in this.knownValues) return;\n this.impliedValues[component] = value;\n};\n\nParsedComponents.prototype.isCertain = function(component) {\n return component in this.knownValues;\n};\n\nParsedComponents.prototype.isPossibleDate = function() {\n var dateMoment = this.moment();\n if (this.isCertain('timezoneOffset')) {\n dateMoment.utcOffset(this.get('timezoneOffset'))\n }\n\n if (dateMoment.get('year') != this.get('year')) return false;\n if (dateMoment.get('month') != this.get('month')-1) return false;\n if (dateMoment.get('date') != this.get('day')) return false;\n if (dateMoment.get('hour') != this.get('hour')) return false;\n if (dateMoment.get('minute') != this.get('minute')) return false;\n\n return true;\n};\n\nParsedComponents.prototype.date = function() {\n var dateMoment = this.moment();\n return dateMoment.toDate();\n};\n\nParsedComponents.prototype.moment = function() {\n var dateMoment = moment();\n\n dateMoment.set('year', this.get('year'));\n dateMoment.set('month', this.get('month')-1);\n dateMoment.set('date', this.get('day'));\n dateMoment.set('hour', this.get('hour'));\n dateMoment.set('minute', this.get('minute'));\n dateMoment.set('second', this.get('second'));\n dateMoment.set('millisecond', this.get('millisecond'));\n\n // Javascript Date Object return minus timezone offset\n var currentTimezoneOffset = dateMoment.utcOffset();\n var targetTimezoneOffset = this.isCertain('timezoneOffset') ? \n this.get('timezoneOffset') : currentTimezoneOffset;\n\n var adjustTimezoneOffset = targetTimezoneOffset - currentTimezoneOffset;\n dateMoment.add(-adjustTimezoneOffset, 'minutes');\n\n return dateMoment;\n};\n\n\n\nexports.ParsedComponents = ParsedComponents;\nexports.ParsedResult = ParsedResult;\n","\nfunction Parser(strictMode) {\n\n this.isStrictMode = function() { return (strictMode == true) };\n\n this.pattern = function() { return /./i; }\n\n this.extract = function(text, ref, match, opt){ return null; }\n\n this.execute = function(text, ref, opt) {\n\n var results = [];\n var regex = this.pattern();\n\n var remainingText = text;\n var match = regex.exec(remainingText);\n\n while (match) {\n\n // Calculate match index on the full text;\n match.index += text.length - remainingText.length;\n\n var result = this.extract(text, ref, match, opt);\n if (result) {\n\n // If success, start from the end of the result\n remainingText = text.substring(result.index + result.text.length);\n\n if (!this.isStrictMode() || result.hasPossibleDates()) {\n results.push(result);\n }\n\n } else {\n // If fail, move on by 1\n remainingText = text.substring(match.index + 1);\n }\n\n match = regex.exec(remainingText);\n }\n\n if (this.refiners) {\n this.refiners.forEach(function () {\n results = refiner.refine(results, text, options);\n });\n }\n\n return results;\n }\n}\n\nexports.Parser = Parser;\n\nexports.ENISOFormatParser = require('./EN/ENISOFormatParser').Parser;\nexports.ENDeadlineFormatParser = require('./EN/ENDeadlineFormatParser').Parser;\nexports.ENRelativeDateFormatParser = require('./EN/ENRelativeDateFormatParser').Parser;\nexports.ENMonthNameLittleEndianParser = require('./EN/ENMonthNameLittleEndianParser').Parser;\nexports.ENMonthNameMiddleEndianParser = require('./EN/ENMonthNameMiddleEndianParser').Parser;\nexports.ENMonthNameParser = require('./EN/ENMonthNameParser').Parser;\nexports.ENSlashDateFormatParser = require('./EN/ENSlashDateFormatParser').Parser;\nexports.ENSlashDateFormatStartWithYearParser = require('./EN/ENSlashDateFormatStartWithYearParser').Parser;\nexports.ENSlashMonthFormatParser = require('./EN/ENSlashMonthFormatParser').Parser;\nexports.ENTimeAgoFormatParser = require('./EN/ENTimeAgoFormatParser').Parser;\nexports.ENTimeExpressionParser = require('./EN/ENTimeExpressionParser').Parser;\nexports.ENWeekdayParser = require('./EN/ENWeekdayParser').Parser;\nexports.ENCasualDateParser = require('./EN/ENCasualDateParser').Parser;\nexports.ENCasualTimeParser = require('./EN/ENCasualTimeParser').Parser;\n\nexports.JPStandardParser = require('./JP/JPStandardParser').Parser;\nexports.JPCasualDateParser = require('./JP/JPCasualDateParser').Parser;\n\nexports.ESCasualDateParser = require('./ES/ESCasualDateParser').Parser;\nexports.ESDeadlineFormatParser = require('./ES/ESDeadlineFormatParser').Parser;\nexports.ESTimeAgoFormatParser = require('./ES/ESTimeAgoFormatParser').Parser;\nexports.ESTimeExpressionParser = require('./ES/ESTimeExpressionParser').Parser;\nexports.ESWeekdayParser = require('./ES/ESWeekdayParser').Parser;\nexports.ESMonthNameLittleEndianParser = require('./ES/ESMonthNameLittleEndianParser').Parser;\nexports.ESSlashDateFormatParser = require('./ES/ESSlashDateFormatParser').Parser;\n\nexports.FRCasualDateParser = require('./FR/FRCasualDateParser').Parser;\nexports.FRDeadlineFormatParser = require('./FR/FRDeadlineFormatParser').Parser;\nexports.FRMonthNameLittleEndianParser = require('./FR/FRMonthNameLittleEndianParser').Parser;\nexports.FRSlashDateFormatParser = require('./FR/FRSlashDateFormatParser').Parser;\nexports.FRTimeAgoFormatParser = require('./FR/FRTimeAgoFormatParser').Parser;\nexports.FRTimeExpressionParser = require('./FR/FRTimeExpressionParser').Parser;\nexports.FRWeekdayParser = require('./FR/FRWeekdayParser').Parser;\n\nexports.ZHHantDateParser = require('./ZH-Hant/ZHHantDateParser').Parser;\nexports.ZHHantWeekdayParser = require('./ZH-Hant/ZHHantWeekdayParser').Parser;\nexports.ZHHantTimeExpressionParser = require('./ZH-Hant/ZHHantTimeExpressionParser').Parser;\nexports.ZHHantCasualDateParser = require('./ZH-Hant/ZHHantCasualDateParser').Parser;\nexports.ZHHantDeadlineFormatParser = require('./ZH-Hant/ZHHantDeadlineFormatParser').Parser;\n\nexports.DEDeadlineFormatParser = require('./DE/DEDeadlineFormatParser').Parser;\nexports.DEMonthNameLittleEndianParser = require('./DE/DEMonthNameLittleEndianParser').Parser;\nexports.DEMonthNameParser = require('./DE/DEMonthNameParser').Parser;\nexports.DESlashDateFormatParser = require('./DE/DESlashDateFormatParser').Parser;\nexports.DETimeAgoFormatParser = require('./DE/DETimeAgoFormatParser').Parser;\nexports.DETimeExpressionParser = require('./DE/DETimeExpressionParser').Parser;\nexports.DEWeekdayParser = require('./DE/DEWeekdayParser').Parser;\nexports.DECasualDateParser = require('./DE/DECasualDateParser').Parser;\n","/*\n \n*/\nvar Refiner = require('./refiner').Refiner;\n\nexports.Refiner = function OverlapRemovalRefiner() {\n\tRefiner.call(this);\n\t\n\n\tthis.refine = function(text, results, opt) { \n\n if (results.length < 2) return results;\n \n var filteredResults = [];\n var prevResult = results[0];\n \n for (var i=1; i<results.length; i++){\n \n var result = results[i];\n \n // If overlap, compare the length and discard the shorter one\n if (result.index < prevResult.index + prevResult.text.length) {\n\n if (result.text.length > prevResult.text.length){\n prevResult = result;\n }\n \n } else {\n filteredResults.push(prevResult);\n prevResult = result;\n }\n }\n \n // The last one\n if (prevResult != null) {\n filteredResults.push(prevResult);\n }\n\n return filteredResults;\n }\n}","/*\n \n*/\nvar Refiner = require('./refiner').Refiner;\n\n\nvar TIMEZONE_OFFSET_PATTERN = new RegExp(\"^\\\\s*(GMT|UTC)?(\\\\+|\\\\-)(\\\\d{1,2}):?(\\\\d{2})\", 'i');\nvar TIMEZONE_OFFSET_SIGN_GROUP = 2;\nvar TIMEZONE_OFFSET_HOUR_OFFSET_GROUP = 3;\nvar TIMEZONE_OFFSET_MINUTE_OFFSET_GROUP = 4;\n\nexports.Refiner = function ExtractTimezoneOffsetRefiner() {\n Refiner.call(this);\n\n this.refine = function(text, results, opt) {\n\n results.forEach(function(result) {\n\n if (result.start.isCertain('timezoneOffset')) {\n return;\n }\n\n var match = TIMEZONE_OFFSET_PATTERN.exec(text.substring(result.index + result.text.length));\n if (!match) {\n return;\n }\n\n var hourOffset = parseInt(match[TIMEZONE_OFFSET_HOUR_OFFSET_GROUP]);\n var minuteOffset = parseInt(match[TIMEZONE_OFFSET_MINUTE_OFFSET_GROUP]);\n var timezoneOffset = hourOffset * 60 + minuteOffset;\n if (match[TIMEZONE_OFFSET_SIGN_GROUP] === '-') {\n timezoneOffset = -timezoneOffset;\n }\n\n if (result.end != null) {\n result.end.assign('timezoneOffset', timezoneOffset);\n }\n\n result.start.assign('timezoneOffset', timezoneOffset);\n result.text += match[0];\n result.tags['ExtractTimezoneOffsetRefiner'] = true;\n });\n\n return results;\n }\n}\n","/*\n\n*/\nvar Refiner = require('./refiner').Refiner;\n\n// Map ABBR -> Offset in minute\nvar TIMEZONE_ABBR_MAP = {};\nvar TIMEZONE_NAME_PATTERN = new RegExp(\"^\\\\s*\\\\(?([A-Z]{2,4})\\\\)?(?=\\\\W|$)\", 'i');\n\nexports.Refiner = function ExtractTimezoneAbbrRefiner() {\n\tRefiner.call(this);\n\n\tthis.refine = function(text, results, opt) {\n\n\t\tresults.forEach(function(result) {\n\n if (!result.tags['ENTimeExpressionParser'] && !result.tags['ZHTimeExpressionParser'] && !result.tags['FRTimeExpressionParser'] && !result.tags['DETimeExpressionParser']) {\n return;\n }\n\n var match = TIMEZONE_NAME_PATTERN.exec(text.substring(result.index + result.text.length));\n if (match) {\n var timezoneAbbr = match[1].toUpperCase();\n if (TIMEZONE_ABBR_MAP[timezoneAbbr] === undefined) {\n return;\n }\n\n var timezoneOffset = TIMEZONE_ABBR_MAP[timezoneAbbr];\n if (!result.start.isCertain('timezoneOffset')) {\n result.start.assign('timezoneOffset', timezoneOffset);\n }\n\n if (result.end != null && !result.end.isCertain('timezoneOffset')) {\n result.end.assign('timezoneOffset', timezoneOffset);\n }\n\n result.text += match[0];\n result.tags['ExtractTimezoneAbbrRefiner'] = true;\n }\n\t\t});\n\n return results;\n\t}\n}\n\n// TODO: Move this to some configuration\nTIMEZONE_ABBR_MAP = {\"ACDT\":630,\"ACST\":570,\"ADT\":-180,\"AEDT\":660,\"AEST\":600,\"AFT\":270,\"AKDT\":-480,\"AKST\":-540,\"ALMT\":360,\"AMST\":-180,\"AMT\":-240,\"ANAST\":720,\"ANAT\":720,\"AQTT\":300,\"ART\":-180,\"AST\":-240,\"AWDT\":540,\"AWST\":480,\"AZOST\":0,\"AZOT\":-60,\"AZST\":300,\"AZT\":240,\"BNT\":480,\"BOT\":-240,\"BRST\":-120,\"BRT\":-180,\"BST\":60,\"BTT\":360,\"CAST\":480,\"CAT\":120,\"CCT\":390,\"CDT\":-300,\"CEST\":120,\"CET\":60,\"CHADT\":825,\"CHAST\":765,\"CKT\":-600,\"CLST\":-180,\"CLT\":-240,\"COT\":-300,\"CST\":-360,\"CVT\":-60,\"CXT\":420,\"ChST\":600,\"DAVT\":420,\"EASST\":-300,\"EAST\":-360,\"EAT\":180,\"ECT\":-300,\"EDT\":-240,\"EEST\":180,\"EET\":120,\"EGST\":0,\"EGT\":-60,\"EST\":-300,\"ET\":-300,\"FJST\":780,\"FJT\":720,\"FKST\":-180,\"FKT\":-240,\"FNT\":-120,\"GALT\":-360,\"GAMT\":-540,\"GET\":240,\"GFT\":-180,\"GILT\":720,\"GMT\":0,\"GST\":240,\"GYT\":-240,\"HAA\":-180,\"HAC\":-300,\"HADT\":-540,\"HAE\":-240,\"HAP\":-420,\"HAR\":-360,\"HAST\":-600,\"HAT\":-90,\"HAY\":-480,\"HKT\":480,\"HLV\":-210,\"HNA\":-240,\"HNC\":-360,\"HNE\":-300,\"HNP\":-480,\"HNR\":-420,\"HNT\":-150,\"HNY\":-540,\"HOVT\":420,\"ICT\":420,\"IDT\":180,\"IOT\":360,\"IRDT\":270,\"IRKST\":540,\"IRKT\":540,\"IRST\":210,\"IST\":60,\"JST\":540,\"KGT\":360,\"KRAST\":480,\"KRAT\":480,\"KST\":540,\"KUYT\":240,\"LHDT\":660,\"LHST\":630,\"LINT\":840,\"MAGST\":720,\"MAGT\":720,\"MART\":-510,\"MAWT\":300,\"MDT\":-360,\"MESZ\":120,\"MEZ\":60,\"MHT\":720,\"MMT\":390,\"MSD\":240,\"MSK\":240,\"MST\":-420,\"MUT\":240,\"MVT\":300,\"MYT\":480,\"NCT\":660,\"NDT\":-90,\"NFT\":690,\"NOVST\":420,\"NOVT\":360,\"NPT\":345,\"NST\":-150,\"NUT\":-660,\"NZDT\":780,\"NZST\":720,\"OMSST\":420,\"OMST\":420,\"PDT\":-420,\"PET\":-300,\"PETST\":720,\"PETT\":720,\"PGT\":600,\"PHOT\":780,\"PHT\":480,\"PKT\":300,\"PMDT\":-120,\"PMST\":-180,\"PONT\":660,\"PST\":-480,\"PT\":-480,\"PWT\":540,\"PYST\":-180,\"PYT\":-240,\"RET\":240,\"SAMT\":240,\"SAST\":120,\"SBT\":660,\"SCT\":240,\"SGT\":480,\"SRT\":-180,\"SST\":-660,\"TAHT\":-600,\"TFT\":300,\"TJT\":300,\"TKT\":780,\"TLT\":540,\"TMT\":300,\"TVT\":720,\"ULAT\":480,\"UTC\":0,\"UYST\":-120,\"UYT\":-180,\"UZT\":300,\"VET\":-210,\"VLAST\":660,\"VLAT\":660,\"VUT\":660,\"WAST\":120,\"WAT\":60,\"WEST\":60,\"WESZ\":60,\"WET\":0,\"WEZ\":0,\"WFT\":720,\"WGST\":-120,\"WGT\":-180,\"WIB\":420,\"WIT\":540,\"WITA\":480,\"WST\":780,\"WT\":0,\"YAKST\":600,\"YAKT\":600,\"YAPT\":600,\"YEKST\":360,\"YEKT\":360}\n","/*\n Enforce 'forwardDate' option to on the results. When there are missing component,\n e.g. \"March 12-13 (without year)\" or \"Thursday\", the refiner will try to adjust the result\n into the future instead of the past.\n*/\nvar moment = require('moment');\nvar Refiner = require('./refiner').Refiner;\n\nexports.Refiner = function ForwardDateRefiner() {\n Refiner.call(this);\n\n this.refine = function(text, results, opt) {\n\n if (!opt['forwardDate'] && !opt['forwardDatesOnly']) {\n return results;\n }\n\n results.forEach(function(result) {\n\n var refMoment = moment(result.ref);\n\n if (result.start.isCertain('day') && result.start.isCertain('month') &&\n !result.start.isCertain('year') &&\n refMoment.isAfter(result.start.moment())\n ) {\n // Adjust year into the future\n for (var i=0; i < 3 && refMoment.isAfter(result.start.moment()); i++) {\n result.start.imply('year', result.start.get('year') + 1);\n\n if (result.end && !result.end.isCertain('year')) {\n result.end.imply('year', result.end.get('year') + 1);\n }\n }\n\n result.tags['ExtractTimezoneOffsetRefiner'] = true;\n }\n\n if (!result.start.isCertain('day') && !result.start.isCertain('month') && !result.start.isCertain('year') &&\n result.start.isCertain('weekday') &&\n refMoment.isAfter(result.start.moment())\n ) {\n // Adjust date to the coming week\n if (refMoment.day() > result.start.get('weekday')) {\n refMoment.day(result.start.get('weekday') + 7);\n } else {\n refMoment.day(result.start.get('weekday'));\n }\n\n result.start.imply('day', refMoment.date());\n result.start.imply('month', refMoment.month() + 1);\n result.start.imply('year', refMoment.year());\n result.tags['ExtractTimezoneOffsetRefiner'] = true;\n }\n });\n\n return results;\n }\n};\n","/*\n \n*/\nvar Filter = require('./refiner').Filter;\n\nexports.Refiner = function UnlikelyFormatFilter() {\n Filter.call(this);\n \n\n this.isValid = function(text, result, opt) { \n\n if (result.text.replace(' ','').match(/^\\d*(\\.\\d*)?$/)) {\n return false;\n }\n\n return true; \n }\n}","/*\n \n*/\nvar Refiner = require('../refiner').Refiner;\n\nexports.Refiner = function ENMergeDateRangeRefiner() {\n Refiner.call(this);\n\n this.pattern = function () { return /^\\s*(to|\\-)\\s*$/i };\n\n this.refine = function(text, results, opt) {\n\n if (results.length < 2) return results;\n \n var mergedResult = [];\n var currResult = null;\n var prevResult = null;\n \n for (var i=1; i<results.length; i++){\n \n currResult = results[i];\n prevResult = results[i-1];\n \n if (!prevResult.end && !currResult.end \n && this.isAbleToMerge(text, prevResult, currResult)) {\n \n prevResult = this.mergeResult(text, prevResult, currResult);\n currResult = null;\n i += 1;\n }\n \n mergedResult.push(prevResult);\n }\n \n if (currResult != null) {\n mergedResult.push(currResult);\n }\n\n\n return mergedResult;\n };\n\n this.isAbleToMerge = function(text, result1, result2) {\n var begin = result1.index + result1.text.length;\n var end = result2.index;\n var textBetween = text.substring(begin,end);\n\n return textBetween.match(this.pattern());\n };\n\n this.isWeekdayResult = function (result) {\n return result.start.isCertain('weekday') && !result.start.isCertain('day');\n };\n\n this.mergeResult = function(text, fromResult, toResult) {\n\n if (!this.isWeekdayResult(fromResult) && !this.isWeekdayResult(toResult)) {\n\n for (var key in toResult.start.knownValues) {\n if (!fromResult.start.isCertain(key)) {\n fromResult.start.assign(key, toResult.start.get(key));\n }\n }\n\n for (var key in fromResult.start.knownValues) {\n if (!toResult.start.isCertain(key)) {\n toResult.start.assign(key, fromResult.start.get(key));\n }\n }\n }\n\n if (fromResult.start.date().getTime() > toResult.start.date().getTime()) {\n var tmp = toResult;\n toResult = fromResult;\n fromResult = tmp;\n }\n \n fromResult.end = toResult.start;\n\n \n\n for (var tag in toResult.tags) {\n fromResult.tags[tag] = true;\n }\n\n \n var startIndex = Math.min(fromResult.index, toResult.index);\n var endIndex = Math.max(\n fromResult.index + fromResult.text.length, \n toResult.index + toResult.text.length);\n \n fromResult.index = startIndex;\n fromResult.text = text.substring(startIndex, endIndex);\n fromResult.tags[this.constructor.name] = true;\n return fromResult;\n }\n};\n\n","/*\n \n*/\nvar ParsedComponents = require('../../result').ParsedComponents;\nvar Refiner = require('../refiner').Refiner;\n\n\n\nvar PATTERN = new RegExp(\"^\\\\s*(T|at|after|before|on|of|,|-)?\\\\s*$\");\n\nfunction isDateOnly(result) {\n return !result.start.isCertain('hour');\n}\n \nfunction isTimeOnly(result) {\n return !result.start.isCertain('month') && !result.start.isCertain('weekday');\n}\n\n\nfunction isAbleToMerge(text, prevResult, curResult) {\n var textBetween = text.substring(prevResult.index + prevResult.text.length, curResult.index);\n return textBetween.match(PATTERN);\n}\n\nfunction mergeResult(text, dateResult, timeResult){\n\n var beginDate = dateResult.start;\n var beginTime = timeResult.start;\n \n var beginDateTime = beginDate.clone();\n beginDateTime.assign('hour', beginTime.get('hour'));\n beginDateTime.assign('minute', beginTime.get('minute'));\n beginDateTime.assign('second', beginTime.get('second'));\n \n if (beginTime.isCertain('meridiem')) {\n beginDateTime.assign('meridiem', beginTime.get('meridiem'));\n } else if (\n beginTime.get('meridiem') !== undefined &&\n beginDateTime.get('meridiem') === undefined\n ) {\n beginDateTime.imply('meridiem', beginTime.get('meridiem'));\n }\n\n if (beginDateTime.get('meridiem') == 1 && beginDateTime.get('hour') < 12) {\n beginDateTime.assign('hour', beginDateTime.get('hour') + 12);\n }\n\n if (dateResult.end != null || timeResult.end != null) {\n \n var endDate = dateResult.end == null ? dateResult.start : dateResult.end; \n var endTime = timeResult.end == null ? timeResult.start : timeResult.end;\n\n var endDateTime = endDate.clone();\n endDateTime.assign('hour', endTime.get('hour'));\n endDateTime.assign('minute', endTime.get('minute'));\n endDateTime.assign('second', endTime.get('second'));\n \n if (endTime.isCertain('meridiem')) {\n endDateTime.assign('meridiem', endTime.get('meridiem'));\n } else if (beginTime.get('meridiem') != null) {\n endDateTime.imply('meridiem', endTime.get('meridiem'));\n }\n \n if (dateResult.end == null && endDateTime.date().getTime() < beginDateTime.date().getTime()) {\n // Ex. 9pm - 1am\n if (endDateTime.isCertain('day')) {\n endDateTime.assign('day', endDateTime.get('day') + 1);\n } else {\n endDateTime.imply('day', endDateTime.get('day') + 1);\n }\n }\n\n dateResult.end = endDateTime;\n }\n\n dateResult.start = beginDateTime; \n\n var startIndex = Math.min(dateResult.index, timeResult.index);\n var endIndex = Math.max(\n dateResult.index + dateResult.text.length, \n timeResult.index + timeResult.text.length);\n \n dateResult.index = startIndex;\n dateResult.text = text.substring(startIndex, endIndex);\n\n for (var tag in timeResult.tags) {\n dateResult.tags[tag] = true;\n }\n dateResult.tags['ENMergeDateAndTimeRefiner'] = true;\n return dateResult;\n}\n\nexports.Refiner = function ENMergeDateTimeRefiner() {\n Refiner.call(this);\n\n\n this.refine = function(text, results, opt) { \n\n if (results.length < 2) return results;\n\n var mergedResult = [];\n var currResult = null;\n var prevResult = null;\n\n for (var i = 1; i < results.length; i++) {\n\n currResult = results[i];\n prevResult = results[i-1];\n \n if (isDateOnly(prevResult) && isTimeOnly(currResult) \n && isAbleToMerge(text, prevResult, currResult)) {\n \n prevResult = mergeResult(text, prevResult, currResult);\n currResult = null;\n i += 1;\n \n } else if (isDateOnly(currResult) && isTimeOnly(prevResult)\n && isAbleToMerge(text, prevResult, currResult)) {\n \n prevResult = mergeResult(text, currResult, prevResult);\n currResult = null;\n i += 1;\n }\n \n mergedResult.push(prevResult);\n }\n\n if (currResult != null) {\n mergedResult.push(currResult);\n }\n\n return mergedResult;\n }\n}","/*\n\n*/\nvar ParsedComponents = require('../../result').ParsedComponents;\nvar Refiner = require('../refiner').Refiner;\n\n\nvar PATTERN = new RegExp(\"^\\\\s*(at|after|before|on|,|-|\\\\(|\\\\))?\\\\s*$\");\n\nfunction isMoreSpecific(prevResult, currResult) {\n var moreSpecific = false;\n\n if (prevResult.start.isCertain('year')) {\n if (!currResult.start.isCertain('year')) {\n moreSpecific = true;\n } else {\n if (prevResult.start.isCertain('month')) {\n if (!currResult.start.isCertain('month')) {\n moreSpecific = true;\n } else {\n if (prevResult.start.isCertain('day') && !currResult.start.isCertain('day')) {\n moreSpecific = true;\n }\n }\n }\n }\n }\n\n return moreSpecific;\n}\n\n\nfunction isAbleToMerge(text, prevResult, currResult) {\n var textBetween = text.substring(prevResult.index + prevResult.text.length, currResult.index);\n\n // Only accepts merge if one of them comes from casual relative date\n var includesRelativeResult = (prevResult.tags['ENRelativeDateFormatParser'] || currResult.tags['ENRelativeDateFormatParser']);\n\n // We assume they refer to the same date if all date fields are implied\n var referToSameDate = !prevResult.start.isCertain('day') && !prevResult.start.isCertain('month') && !prevResult.start.isCertain('year');\n\n // If both years are certain, that determines if they refer to the same date\n // but with one more specific than the other\n if (prevResult.start.isCertain('year') && currResult.start.isCertain('year'))\n referToSameDate = (prevResult.start.get('year') === currResult.start.get('year'));\n\n // We now test with the next level (month) if they refer to the same date\n if (prevResult.start.isCertain('month') && currResult.start.isCertain('month'))\n referToSameDate = (prevResult.start.get('month') === currResult.start.get('month')) && referToSameDate;\n\n return includesRelativeResult && textBetween.match(PATTERN) && referToSameDate;\n}\n\nfunction mergeResult(text, specificResult, nonSpecificResult){\n\n var specificDate = specificResult.start;\n var nonSpecificDate = nonSpecificResult.start;\n\n var startIndex = Math.min(specificResult.index, nonSpecificResult.index);\n var endIndex = Math.max(\n specificResult.index + specificResult.text.length,\n nonSpecificResult.index + nonSpecificResult.text.length);\n\n specificResult.index = startIndex;\n specificResult.text = text.substring(startIndex, endIndex);\n\n for (var tag in nonSpecificResult.tags) {\n specificResult.tags[tag] = true;\n }\n specificResult.tags['ENPrioritizeSpecificDateRefiner'] = true;\n return specificResult;\n}\n\nexports.Refiner = function ENPrioritizeSpecificDateRefiner() {\n Refiner.call(this);\n\n this.refine = function(text, results, opt) {\n\n if (results.length < 2) return results;\n\n var mergedResult = [];\n var currResult = null;\n var prevResult = null;\n\n for (var i = 1; i < results.length; i++) {\n\n currResult = results[i];\n prevResult = results[i-1];\n\n if (isMoreSpecific(prevResult, currResult)\n && isAbleToMerge(text, prevResult, currResult)) {\n\n prevResult = mergeResult(text, prevResult, currResult);\n currResult = null;\n i += 1;\n\n } else if (isMoreSpecific(currResult, prevResult)\n && isAbleToMerge(text, prevResult, currResult)) {\n\n prevResult = mergeResult(text, currResult, prevResult);\n currResult = null;\n i += 1;\n }\n\n mergedResult.push(prevResult);\n }\n\n if (currResult != null) {\n mergedResult.push(currResult);\n }\n\n return mergedResult;\n }\n}\n","/*\n \n*/\nvar ENMergeDateRangeRefiner = require('../EN/ENMergeDateRangeRefiner').Refiner;\n\nexports.Refiner = function JPMergeDateRangeRefiner() {\n ENMergeDateRangeRefiner.call(this);\n\n this.pattern = function () { return /^\\s*(から|ー)\\s*$/i };\n}\n\n","/*\r\n \r\n*/\r\nvar Refiner = require('../refiner').Refiner;\r\n\r\nexports.Refiner = function FRMergeDateRangeRefiner() {\r\n Refiner.call(this);\r\n\r\n this.pattern = function () { return /^\\s*(à|a|\\-)\\s*$/i };\r\n\r\n this.refine = function(text, results, opt) {\r\n\r\n if (results.length < 2) return results;\r\n \r\n var mergedResult = [];\r\n var currResult = null;\r\n var prevResult = null;\r\n \r\n for (var i=1; i<results.length; i++){\r\n \r\n currResult = results[i];\r\n prevResult = results[i-1];\r\n \r\n if (!prevResult.end && !currResult.end \r\n && this.isAbleToMerge(text, prevResult, currResult)) {\r\n \r\n prevResult = this.mergeResult(text, prevResult, currResult);\r\n currResult = null;\r\n i += 1;\r\n }\r\n \r\n mergedResult.push(prevResult);\r\n }\r\n \r\n if (currResult != null) {\r\n mergedResult.push(currResult);\r\n }\r\n\r\n\r\n return mergedResult;\r\n };\r\n\r\n this.isAbleToMerge = function(text, result1, result2) {\r\n var begin = result1.index + result1.text.length;\r\n var end = result2.index;\r\n var textBetween = text.substring(begin,end);\r\n\r\n return textBetween.match(this.pattern());\r\n };\r\n\r\n this.isWeekdayResult = function (result) {\r\n return result.start.isCertain('weekday') && !result.start.isCertain('day');\r\n };\r\n\r\n this.mergeResult = function(text, fromResult, toResult) {\r\n\r\n if (!this.isWeekdayResult(fromResult) && !this.isWeekdayResult(toResult)) {\r\n\r\n for (var key in toResult.start.knownValues) {\r\n if (!fromResult.start.isCertain(key)) {\r\n fromResult.start.assign(key, toResult.start.get(key));\r\n }\r\n }\r\n\r\n for (var key in fromResult.start.knownValues) {\r\n if (!toResult.start.isCertain(key)) {\r\n toResult.start.assign(key, fromResult.start.get(key));\r\n }\r\n }\r\n }\r\n\r\n if (fromResult.start.date().getTime() > toResult.start.date()) {\r\n var tmp = toResult;\r\n toResult = fromResult;\r\n fromResult = tmp;\r\n }\r\n \r\n fromResult.end = toResult.start;\r\n\r\n \r\n\r\n for (var tag in toResult.tags) {\r\n fromResult.tags[tag] = true;\r\n }\r\n\r\n \r\n var startIndex = Math.min(fromResult.index, toResult.index);\r\n var endIndex = Math.max(\r\n fromResult.index + fromResult.text.length, \r\n toResult.index + toResult.text.length);\r\n \r\n fromResult.index = startIndex;\r\n fromResult.text = text.substring(startIndex, endIndex);\r\n fromResult.tags[this.constructor.name] = true;\r\n return fromResult;\r\n }\r\n};\r\n\r\n","/*\r\n \r\n*/\r\nvar ParsedComponents = require('../../result').ParsedComponents;\r\nvar Refiner = require('../refiner').Refiner;\r\n\r\n\r\n\r\nvar PATTERN = new RegExp(\"^\\\\s*(T|à|a|vers|de|,|-)?\\\\s*$\");\r\n\r\nfunction isDateOnly(result) {\r\n return !result.start.isCertain('hour') || result.tags['FRCasualDateParser'];\r\n}\r\n \r\nfunction isTimeOnly(result) {\r\n return !result.start.isCertain('month') && !result.start.isCertain('weekday');\r\n}\r\n\r\n\r\nfunction isAbleToMerge(text, prevResult, curResult) {\r\n var textBetween = text.substring(prevResult.index + prevResult.text.length, curResult.index);\r\n return textBetween.match(PATTERN);\r\n}\r\n\r\nfunction mergeResult(text, dateResult, timeResult){\r\n\r\n var beginDate = dateResult.start;\r\n var beginTime = timeResult.start;\r\n \r\n var beginDateTime = beginDate.clone();\r\n beginDateTime.assign('hour', beginTime.get('hour'));\r\n beginDateTime.assign('minute', beginTime.get('minute'));\r\n beginDateTime.assign('second', beginTime.get('second'));\r\n \r\n if (beginTime.isCertain('meridiem')) {\r\n beginDateTime.assign('meridiem', beginTime.get('meridiem'));\r\n } else if (\r\n beginTime.get('meridiem') !== undefined &&\r\n beginDateTime.get('meridiem') === undefined\r\n ) {\r\n beginDateTime.imply('meridiem', beginTime.get('meridiem'));\r\n }\r\n\r\n if (beginDateTime.get('meridiem') == 1 && beginDateTime.get('hour') < 12) {\r\n beginDateTime.assign('hour', beginDateTime.get('hour') + 12);\r\n }\r\n\r\n if (dateResult.end != null || timeResult.end != null) {\r\n \r\n var endDate = dateResult.end == null ? dateResult.start : dateResult.end; \r\n var endTime = timeResult.end == null ? timeResult.start : timeResult.end;\r\n\r\n var endDateTime = endDate.clone();\r\n endDateTime.assign('hour', endTime.get('hour'));\r\n endDateTime.assign('minute', endTime.get('minute'));\r\n endDateTime.assign('second', endTime.get('second'));\r\n \r\n if (endTime.isCertain('meridiem')) {\r\n endDateTime.assign('meridiem', endTime.get('meridiem'));\r\n } else if (beginTime.get('meridiem') != null) {\r\n endDateTime.imply('meridiem', endTime.get('meridiem'));\r\n }\r\n \r\n if (dateResult.end == null && endDateTime.date().getTime() < beginDateTime.date().getTime()) {\r\n // Ex. 9pm - 1am\r\n if (endDateTime.isCertain('day')) {\r\n endDateTime.assign('day', endDateTime.get('day') + 1);\r\n } else {\r\n endDateTime.imply('day', endDateTime.get('day') + 1);\r\n }\r\n }\r\n\r\n dateResult.end = endDateTime;\r\n }\r\n\r\n dateResult.start = beginDateTime; \r\n\r\n var startIndex = Math.min(dateResult.index, timeResult.index);\r\n var endIndex = Math.max(\r\n dateResult.index + dateResult.text.length, \r\n timeResult.index + timeResult.text.length);\r\n \r\n dateResult.index = startIndex;\r\n dateResult.text = text.substring(startIndex, endIndex);\r\n\r\n for (var tag in timeResult.tags) {\r\n dateResult.tags[tag] = true;\r\n }\r\n dateResult.tags['FRMergeDateAndTimeRefiner'] = true;\r\n return dateResult;\r\n}\r\n\r\nexports.Refiner = function FRMergeDateTimeRefiner() {\r\n Refiner.call(this);\r\n\r\n\r\n this.refine = function(text, results, opt) { \r\n\r\n if (results.length < 2) return results;\r\n\r\n var mergedResult = [];\r\n var currResult = null;\r\n var prevResult = null;\r\n\r\n for (var i = 1; i < results.length; i++) {\r\n\r\n currResult = results[i];\r\n prevResult = results[i-1];\r\n \r\n if (isDateOnly(prevResult) && isTimeOnly(currResult) \r\n && isAbleToMerge(text, prevResult, currResult)) {\r\n \r\n prevResult = mergeResult(text, prevResult, currResult);\r\n currResult = null;\r\n i += 1;\r\n \r\n } else if (isDateOnly(currResult) && isTimeOnly(prevResult)\r\n && isAbleToMerge(text, prevResult, currResult)) {\r\n \r\n prevResult = mergeResult(text, currResult, prevResult);\r\n currResult = null;\r\n i += 1;\r\n }\r\n \r\n mergedResult.push(prevResult);\r\n }\r\n\r\n if (currResult != null) {\r\n mergedResult.push(currResult);\r\n }\r\n\r\n return mergedResult;\r\n }\r\n}","/*\n \n*/\nvar ENMergeDateRangeRefiner = require('../EN/ENMergeDateRangeRefiner').Refiner;\n\nexports.Refiner = function DEMergeDateRangeRefiner() {\n ENMergeDateRangeRefiner.call(this);\n\n this.pattern = function () {\n return /^\\s*(bis(?:\\s*(?:am|zum))?|\\-)\\s*$/i\n };\n};\n","/*\n \n*/\nvar ParsedComponents = require('../../result').ParsedComponents;\nvar Refiner = require('../refiner').Refiner;\n\n\n\nvar PATTERN = new RegExp(\"^\\\\s*(T|um|am|,|-)?\\\\s*$\");\n\nfunction isDateOnly(result) {\n return !result.start.isCertain('hour');\n}\n \nfunction isTimeOnly(result) {\n return !result.start.isCertain('month') && !result.start.isCertain('weekday');\n}\n\n\nfunction isAbleToMerge(text, prevResult, curResult) {\n var textBetween = text.substring(prevResult.index + prevResult.text.length, curResult.index);\n return textBetween.match(PATTERN);\n}\n\nfunction mergeResult(text, dateResult, timeResult){\n\n var beginDate = dateResult.start;\n var beginTime = timeResult.start;\n \n var beginDateTime = beginDate.clone();\n beginDateTime.assign('hour', beginTime.get('hour'));\n beginDateTime.assign('minute', beginTime.get('minute'));\n beginDateTime.assign('second', beginTime.get('second'));\n \n if (beginTime.isCertain('meridiem')) {\n beginDateTime.assign('meridiem', beginTime.get('meridiem'));\n } else if (\n beginTime.get('meridiem') !== undefined &&\n beginDateTime.get('meridiem') === undefined\n ) {\n beginDateTime.imply('meridiem', beginTime.get('meridiem'));\n }\n\n if (beginDateTime.get('meridiem') == 1 && beginDateTime.get('hour') < 12) {\n beginDateTime.assign('hour', beginDateTime.get('hour') + 12);\n }\n\n if (dateResult.end != null || timeResult.end != null) {\n \n var endDate = dateResult.end == null ? dateResult.start : dateResult.end; \n var endTime = timeResult.end == null ? timeResult.start : timeResult.end;\n\n var endDateTime = endDate.clone();\n endDateTime.assign('hour', endTime.get('hour'));\n endDateTime.assign('minute', endTime.get('minute'));\n endDateTime.assign('second', endTime.get('second'));\n \n if (endTime.isCertain('meridiem')) {\n endDateTime.assign('meridiem', endTime.get('meridiem'));\n } else if (beginTime.get('meridiem') != null) {\n endDateTime.imply('meridiem', endTime.get('meridiem'));\n }\n \n if (dateResult.end == null && endDateTime.date().getTime() < beginDateTime.date().getTime()) {\n // Ex. 9pm - 1am\n if (endDateTime.isCertain('day')) {\n endDateTime.assign('day', endDateTime.get('day') + 1);\n } else {\n endDateTime.imply('day', endDateTime.get('day') + 1);\n }\n }\n\n dateResult.end = endDateTime;\n }\n\n dateResult.start = beginDateTime; \n\n var startIndex = Math.min(dateResult.index, timeResult.index);\n var endIndex = Math.max(\n dateResult.index + dateResult.text.length, \n timeResult.index + timeResult.text.length);\n \n dateResult.index = startIndex;\n dateResult.text = text.substring(startIndex, endIndex);\n\n for (var tag in timeResult.tags) {\n dateResult.tags[tag] = true;\n }\n dateResult.tags['DEMergeDateAndTimeRefiner'] = true;\n return dateResult;\n}\n\nexports.Refiner = function DEMergeDateTimeRefiner() {\n Refiner.call(this);\n\n\n this.refine = function(text, results, opt) { \n\n if (results.length < 2) return results;\n\n var mergedResult = [];\n var currResult = null;\n var prevResult = null;\n\n for (var i = 1; i < results.length; i++) {\n\n currResult = results[i];\n prevResult = results[i-1];\n \n if (isDateOnly(prevResult) && isTimeOnly(currResult) \n && isAbleToMerge(text, prevResult, currResult)) {\n \n prevResult = mergeResult(text, prevResult, currResult);\n currResult = null;\n i += 1;\n \n } else if (isDateOnly(currResult) && isTimeOnly(prevResult)\n && isAbleToMerge(text, prevResult, currResult)) {\n \n prevResult = mergeResult(text, currResult, prevResult);\n currResult = null;\n i += 1;\n }\n \n mergedResult.push(prevResult);\n }\n\n if (currResult != null) {\n mergedResult.push(currResult);\n }\n\n return mergedResult;\n }\n}","/*\n ISO 8601\n http://www.w3.org/TR/NOTE-datetime\n - YYYY-MM-DD\n - YYYY-MM-DDThh:mmTZD\n - YYYY-MM-DDThh:mm:ssTZD\n - YYYY-MM-DDThh:mm:ss.sTZD \n - TZD = (Z or +hh:mm or -hh:mm)\n*/\nvar moment = require('moment');\nvar Parser = require('../parser').Parser;\nvar ParsedResult = require('../../result').ParsedResult;\n\nvar PATTERN = new RegExp('(\\\\W|^)' \n + '([0-9]{4})\\\\-([0-9]{1,2})\\\\-([0-9]{1,2})'\n + '(?:T' //..\n + '([0-9]{1,2}):([0-9]{1,2})' // hh:mm\n + '(?::([0-9]{1,2})(?:\\\\.(\\\\d{1,4}))?)?' // :ss.s\n + '(?:Z|([+-]\\\\d{2}):?(\\\\d{2})?)?' // TZD (Z or ±hh:mm or ±hhmm or ±hh)\n + ')?' //..\n + '(?=\\\\W|$)', 'i');\n\nvar YEAR_NUMBER_GROUP = 2;\nvar MONTH_NUMBER_GROUP = 3;\nvar DATE_NUMBER_GROUP = 4;\nvar HOUR_NUMBER_GROUP = 5;\nvar MINUTE_NUMBER_GROUP = 6;\nvar SECOND_NUMBER_GROUP = 7;\nvar MILLISECOND_NUMBER_GROUP = 8;\nvar TZD_HOUR_OFFSET_GROUP = 9;\nvar TZD_MINUTE_OFFSET_GROUP = 10;\n\nexports.Parser = function ENISOFormatParser(){\n Parser.apply(this, arguments);\n \n this.pattern = function() { return PATTERN; }\n \n this.extract = function(text, ref, match, opt){ \n \n var text = match[0].substr(match[1].length);\n var index = match.index + match[1].length;\n\n var result = new ParsedResult({\n text: text,\n index: index,\n ref: ref,\n })\n \n result.start.assign('year', parseInt(match[YEAR_NUMBER_GROUP]));\n result.start.assign('month', parseInt(match[MONTH_NUMBER_GROUP]));\n result.start.assign('day', parseInt(match[DATE_NUMBER_GROUP]));\n\n if (moment(result.start.get('month')) > 12 || moment(result.start.get('month')) < 1 ||\n moment(result.start.get('day')) > 31 || moment(result.start.get('day')) < 1) {\n return null;\n }\n\n if (match[HOUR_NUMBER_GROUP] != null) {\n \n result.start.assign('hour',\n parseInt(match[HOUR_NUMBER_GROUP]));\n result.start.assign('minute',\n parseInt(match[MINUTE_NUMBER_GROUP]));\n\n if (match[SECOND_NUMBER_GROUP] != null) {\n\n result.start.assign('second',\n parseInt(match[SECOND_NUMBER_GROUP]));\n }\n\n if (match[MILLISECOND_NUMBER_GROUP] != null) {\n\n result.start.assign('millisecond',\n parseInt(match[MILLISECOND_NUMBER_GROUP]));\n }\n\n if (match[TZD_HOUR_OFFSET_GROUP] == null) {\n\n result.start.assign('timezoneOffset', 0);\n } else {\n\n var minuteOffset = 0;\n var hourOffset = parseInt(match[TZD_HOUR_OFFSET_GROUP]);\n if (match[TZD_MINUTE_OFFSET_GROUP] != null)\n minuteOffset = parseInt(match[TZD_MINUTE_OFFSET_GROUP]);\n\n var offset = hourOffset * 60;\n if (offset < 0) {\n offset -= minuteOffset;\n } else {\n offset += minuteOffset;\n }\n\n result.start.assign('timezoneOffset', offset);\n }\n }\n \n result.tags['ENISOFormatParser'] = true;\n return result;\n };\n\n}\n\n","/*\n\n\n*/\n\nvar moment = require('moment');\nvar Parser = require('../parser').Parser;\nvar ParsedResult = require('../../result').ParsedResult;\nvar util = require('../../utils/EN');\n\nvar PATTERN = new RegExp('(\\\\W|^)' +\n '(within|in)\\\\s*' +\n '('+ util.INTEGER_WORDS_PATTERN + '|[0-9]+|an?(?:\\\\s*few)?|half(?:\\\\s*an?)?)\\\\s*' +\n '(seconds?|min(?:ute)?s?|hours?|days?|weeks?|months?|years?)\\\\s*' +\n '(?=\\\\W|$)', 'i'\n);\n\nvar STRICT_PATTERN = new RegExp('(\\\\W|^)' +\n '(within|in)\\\\s*' +\n '('+ util.INTEGER_WORDS_PATTERN + '|[0-9]+|an?)\\\\s*' +\n '(seconds?|minutes?|hours?|days?)\\\\s*' +\n '(?=\\\\W|$)', 'i'\n);\n\nexports.Parser = function ENDeadlineFormatParser(){\n Parser.apply(this, arguments);\n\n this.pattern = function() {\n return this.isStrictMode()? STRICT_PATTERN : PATTERN;\n };\n\n this.extract = function(text, ref, match, opt){\n\n var index = match.index + match[1].length;\n var text = match[0];\n text = match[0].substr(match[1].length, match[0].length - match[1].length);\n\n var result = new ParsedResult({\n index: index,\n text: text,\n ref: ref\n });\n\n var num = match[3].toLowerCase();\n if (util.INTEGER_WORDS[num] !== undefined) {\n num = util.INTEGER_WORDS[num];\n } else if (num === 'a' || num === 'an'){\n num = 1;\n } else if (num.match(/few/i)){\n num = 3;\n } else if (num.match(/half/i)) {\n num = 0.5;\n } else {\n num = parseInt(num);\n }\n\n var date = moment(ref);\n if (match[4].match(/day|week|month|year/i)) {\n\n if (match[4].match(/day/i)) {\n date.add(num, 'd');\n } else if (match[4].match(/week/i)) {\n date.add(num * 7, 'd');\n } else if (match[4].match(/month/i)) {\n date.add(num, 'month');\n } else if (match[4].match(/year/i)) {\n date.add(num, 'year');\n }\n\n result.start.assign('year', date.year());\n result.start.assign('month', date.month() + 1);\n result.start.assign('day', date.date());\n return result;\n }\n\n if (match[4].match(/hour/i)) {\n\n date.add(num, 'hour');\n\n } else if (match[4].match(/min/i)) {\n\n date.add(num, 'minute');\n\n } else if (match[4].match(/second/i)) {\n\n date.add(num, 'second');\n }\n\n result.start.imply('year', date.year());\n result.start.imply('month', date.month() + 1);\n result.start.imply('day', date.date());\n result.start.assign('hour', date.hour());\n result.start.assign('minute', date.minute());\n result.start.assign('second', date.second());\n result.tags['ENDeadlineFormatParser'] = true;\n return result;\n };\n};\n","/*\n\n\n*/\n\nvar moment = require('moment');\nvar Parser = require('../parser').Parser;\nvar ParsedResult = require('../../result').ParsedResult;\nvar util = require('../../utils/EN');\n\nvar PATTERN = new RegExp('(\\\\W|^)' +\n '(next|last|past)\\\\s*' +\n '('+ util.INTEGER_WORDS_PATTERN + '|[0-9]+|few|half(?:\\\\s*an?)?)?\\\\s*' +\n '(seconds?|min(?:ute)?s?|hours?|days?|weeks?|months?|years?)(?=\\\\s*)' +\n '(?=\\\\W|$)', 'i'\n);\n\nvar MODIFIER_WORD_GROUP = 2;\nvar MULTIPLIER_WORD_GROUP = 3;\nvar RELATIVE_WORD_GROUP = 4;\n\nexports.Parser = function ENRelativeDateFormatParser(){\n Parser.apply(this, arguments);\n\n this.pattern = function() { return PATTERN; };\n\n this.extract = function(text, ref, match, opt){\n\n var index = match.index + match[1].length;\n var modifier = match[MODIFIER_WORD_GROUP].toLowerCase().match(/^next/) ? 1 : -1;\n var text = match[0];\n text = match[0].substr(match[1].length, match[0].length - match[1].length);\n\n var result = new ParsedResult({\n index: index,\n text: text,\n ref: ref\n });\n result.tags['ENRelativeDateFormatParser'] = true;\n\n var num = match[MULTIPLIER_WORD_GROUP] === undefined ? '' : match[3].toLowerCase();\n if (util.INTEGER_WORDS[num] !== undefined) {\n num = util.INTEGER_WORDS[num];\n } else if (num === ''){\n num = 1;\n } else if (num.match(/few/i)){\n num = 3;\n } else if (num.match(/half/i)) {\n num = 0.5;\n } else {\n num = parseInt(num);\n }\n\n num *= modifier;\n\n var date = moment(ref);\n if (match[RELATIVE_WORD_GROUP].match(/day|week|month|year/i)) {\n\n if (match[RELATIVE_WORD_GROUP].match(/day/i)) {\n date.add(num, 'd');\n result.start.assign('year', date.year());\n result.start.assign('month', date.month() + 1);\n result.start.assign('day', date.date());\n } else if (match[RELATIVE_WORD_GROUP].match(/week/i)) {\n date.add(num * 7, 'd');\n // We don't know the exact date for next/last week so we imply\n // them\n result.start.imply('day', date.date());\n result.start.imply('month', date.month() + 1);\n result.start.imply('year', date.year());\n } else if (match[RELATIVE_WORD_GROUP].match(/month/i)) {\n date.add(num, 'month');\n // We don't know the exact day for next/last month\n result.start.imply('day', date.date());\n result.start.assign('year', date.year());\n result.start.assign('month', date.month() + 1);\n } else if (match[RELATIVE_WORD_GROUP].match(/year/i)) {\n date.add(num, 'year');\n // We don't know the exact day for month on next/last year\n result.start.imply('day', date.date());\n result.start.imply('month', date.month() + 1);\n result.start.assign('year', date.year());\n }\n\n return result;\n }\n\n if (match[RELATIVE_WORD_GROUP].match(/hour/i)) {\n\n date.add(num, 'hour');\n result.start.imply('minute', date.minute());\n result.start.imply('second', date.second());\n\n } else if (match[RELATIVE_WORD_GROUP].match(/min/i)) {\n\n date.add(num, 'minute');\n result.start.assign('minute', date.minute());\n result.start.imply('second', date.second());\n\n } else if (match[RELATIVE_WORD_GROUP].match(/second/i)) {\n\n date.add(num, 'second');\n result.start.assign('second', date.second());\n result.start.assign('minute', date.minute());\n }\n\n result.start.assign('hour', date.hour());\n result.start.assign('year', date.year());\n result.start.assign('month', date.month() + 1);\n result.start.assign('day', date.date());\n return result;\n };\n};\n","/*\n\n\n*/\n\nvar moment = require('moment');\n\nvar Parser = require('../parser').Parser;\nvar ParsedResult = require('../../result').ParsedResult;\nvar util = require('../../utils/EN');\n\nvar PATTERN = new RegExp('(\\\\W|^)' +\n '(?:on\\\\s*?)?' +\n '(?:(Sunday|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sun|Mon|Tue|Wed|Thu|Fri|Sat)\\\\s*,?\\\\s*)?' +\n '(([0-9]{1,2})(?:st|nd|rd|th)?|' + util.ORDINAL_WORDS_PATTERN + ')' +\n '(?:\\\\s*' +\n '(?:to|\\\\-|\\\\–|until|through|till|\\\\s)\\\\s*' +\n '(([0-9]{1,2})(?:st|nd|rd|th)?|' + util.ORDINAL_WORDS_PATTERN + ')' +\n ')?\\\\s*(?:of)?\\\\s*' +\n '(Jan(?:uary|\\\\.)?|Feb(?:ruary|\\\\.)?|Mar(?:ch|\\\\.)?|Apr(?:il|\\\\.)?|May|Jun(?:e|\\\\.)?|Jul(?:y|\\\\.)?|Aug(?:ust|\\\\.)?|Sep(?:tember|\\\\.)?|Oct(?:ober|\\\\.)?|Nov(?:ember|\\\\.)?|Dec(?:ember|\\\\.)?)' +\n '(?:' +\n ',?\\\\s*([0-9]{1,4}(?![^\\\\s]\\\\d))' +\n '(\\\\s*(?:BE|AD|BC))?' +\n ')?' +\n '(?=\\\\W|$)', 'i'\n );\n\nvar WEEKDAY_GROUP = 2;\nvar DATE_GROUP = 3;\nvar DATE_NUM_GROUP = 4;\nvar DATE_TO_GROUP = 5;\nvar DATE_TO_NUM_GROUP = 6;\nvar MONTH_NAME_GROUP = 7;\nvar YEAR_GROUP = 8;\nvar YEAR_BE_GROUP = 9;\n\nexports.Parser = function ENMonthNameLittleEndianParser(){\n Parser.apply(this, arguments);\n\n this.pattern = function() { return PATTERN; }\n\n this.extract = function(text, ref, match, opt){\n\n var result = new ParsedResult({\n text: match[0].substr(match[1].length, match[0].length - match[1].length),\n index: match.index + match[1].length,\n ref: ref\n });\n\n var month = match[MONTH_NAME_GROUP];\n month = util.MONTH_OFFSET[month.toLowerCase()];\n\n var day = match[DATE_NUM_GROUP] ?\n parseInt(match[DATE_NUM_GROUP]):\n util.ORDINAL_WORDS[match[DATE_GROUP].trim().replace('-', ' ').toLowerCase()];\n\n var year = null;\n if (match[YEAR_GROUP]) {\n year = match[YEAR_GROUP];\n year = parseInt(year);\n\n if(match[YEAR_BE_GROUP]){\n\n if (/BE/i.test(match[YEAR_BE_GROUP])) {\n // Buddhist Era\n year = year - 543;\n } else if (/BC/i.test(match[YEAR_BE_GROUP])) {\n // Before Christ\n year = -year;\n }\n\n } else if (year < 10) {\n\n // require single digit years to always have BC/AD\n return null;\n\n } else if (year < 100){\n\n year = year + 2000;\n }\n }\n\n if(year){\n result.start.assign('day', day);\n result.start.assign('month', month);\n result.start.assign('year', year);\n } else {\n\n //Find the most appropriated year\n var refMoment = moment(ref);\n refMoment.month(month - 1);\n refMoment.date(day);\n refMoment.year(moment(ref).year());\n\n var nextYear = refMoment.clone().add(1, 'y');\n var lastYear = refMoment.clone().add(-1, 'y');\n if( Math.abs(nextYear.diff(moment(ref))) < Math.abs(refMoment.diff(moment(ref))) ){\n refMoment = nextYear;\n }\n else if( Math.abs(lastYear.diff(moment(ref))) < Math.abs(refMoment.diff(moment(ref))) ){\n refMoment = lastYear;\n }\n\n result.start.assign('day', day);\n result.start.assign('month', month);\n result.start.imply('year', refMoment.year());\n }\n\n // Weekday component\n if (match[WEEKDAY_GROUP]) {\n var weekday = match[WEEKDAY_GROUP];\n weekday = util.WEEKDAY_OFFSET[weekday.toLowerCase()]\n result.start.assign('weekday', weekday);\n }\n\n // Text can be 'range' value. Such as '12 - 13 January 2012'\n if (match[DATE_TO_GROUP]) {\n var endDate = match[DATE_TO_NUM_GROUP] ?\n parseInt(match[DATE_TO_NUM_GROUP]):\n util.ORDINAL_WORDS[match[DATE_TO_GROUP].trim().replace('-', ' ').toLowerCase()];\n\n result.end = result.start.clone();\n result.end.assign('day', endDate);\n }\n\n result.tags['ENMonthNameLittleEndianParser'] = true;\n return result;\n };\n};\n","/*\n\n The parser for parsing US's date format that begin with month's name.\n\n EX.\n - January 13\n - January 13, 2012\n - January 13 - 15, 2012\n - Tuesday, January 13, 2012\n\n Watch out for:\n - January 12:00\n - January 12.44\n - January 1222344\n*/\n\nvar moment = require('moment');\n\nvar Parser = require('../parser').Parser;\nvar ParsedResult = require('../../result').ParsedResult;\nvar util = require('../../utils/EN');\n\nvar PATTERN = new RegExp('(\\\\W|^)' +\n '(?:' +\n '(?:on\\\\s*?)?' +\n '(Sunday|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sun\\\\.?|Mon\\\\.?|Tue\\\\.?|Wed\\\\.?|Thu\\\\.?|Fri\\\\.?|Sat\\\\.?)' +\n '\\\\s*,?\\\\s*)?' +\n '(Jan\\\\.?|January|Feb\\\\.?|February|Mar\\\\.?|March|Apr\\\\.?|April|May\\\\.?|Jun\\\\.?|June|Jul\\\\.?|July|Aug\\\\.?|August|Sep\\\\.?|Sept\\\\.?|September|Oct\\\\.?|October|Nov\\\\.?|November|Dec\\\\.?|December)' +\n '\\\\s*' +\n '(([0-9]{1,2})(?:st|nd|rd|th)?|' + util.ORDINAL_WORDS_PATTERN +')\\\\s*' +\n '(?:' +\n '(?:to|\\\\-)\\\\s*' +\n '(([0-9]{1,2})(?:st|nd|rd|th)?| ' + util.ORDINAL_WORDS_PATTERN + ')\\\\s*' +\n ')?' +\n '(?:' +\n '\\\\s*,?\\\\s*(?:([0-9]{4})\\\\s*(BE|AD|BC)?|([0-9]{1,4})\\\\s*(AD|BC))\\\\s*' +\n ')?' +\n '(?=\\\\W|$)(?!\\\\:\\\\d)', 'i');\n\nvar WEEKDAY_GROUP = 2;\nvar MONTH_NAME_GROUP = 3;\nvar DATE_GROUP = 4;\nvar DATE_NUM_GROUP = 5;\nvar DATE_TO_GROUP = 6;\nvar DATE_TO_NUM_GROUP = 7;\nvar YEAR_GROUP = 8;\nvar YEAR_BE_GROUP = 9;\nvar YEAR_GROUP2 = 10;\nvar YEAR_BE_GROUP2 = 11;\n\nexports.Parser = function ENMonthNameMiddleEndianParser(){\n Parser.apply(this, arguments);\n\n this.pattern = function() { return PATTERN; }\n\n this.extract = function(text, ref, match, opt){\n\n var result = new ParsedResult({\n text: match[0].substr(match[1].length, match[0].length - match[1].length),\n index: match.index + match[1].length,\n ref: ref,\n });\n\n\n var month = match[MONTH_NAME_GROUP];\n month = util.MONTH_OFFSET[month.toLowerCase()];\n var day = match[DATE_NUM_GROUP] ?\n parseInt(match[DATE_NUM_GROUP]) :\n util.ORDINAL_WORDS[match[DATE_GROUP].trim().replace('-', ' ').toLowerCase()];\n\n var year = null;\n if (match[YEAR_GROUP] || match[YEAR_GROUP2]) {\n year = match[YEAR_GROUP] || match[YEAR_GROUP2];\n year = parseInt(year);\n\n var yearBE = match[YEAR_BE_GROUP] || match[YEAR_BE_GROUP2];\n if (yearBE) {\n if (/BE/i.test(yearBE)) {\n // Buddhist Era\n year = year - 543;\n } else if (/BC/i.test(yearBE)) {\n // Before Christ\n year = -year;\n }\n } else if (year < 100){\n\n year = year + 2000;\n }\n }\n\n if(year){\n result.start.assign('day', day);\n result.start.assign('month', month);\n result.start.assign('year', year);\n } else {\n\n //Find the most appropriated year\n var refMoment = moment(ref);\n refMoment.month(month - 1);\n refMoment.date(day);\n\n var nextYear = refMoment.clone().add(1, 'y');\n var lastYear = refMoment.clone().add(-1, 'y');\n if( Math.abs(nextYear.diff(moment(ref))) < Math.abs(refMoment.diff(moment(ref))) ){\n refMoment = nextYear;\n }\n else if( Math.abs(lastYear.diff(moment(ref))) < Math.abs(refMoment.diff(moment(ref))) ){\n refMoment = lastYear;\n }\n\n result.start.assign('day', day);\n result.start.assign('month', month);\n result.start.imply('year', refMoment.year());\n }\n\n // Weekday component\n if (match[WEEKDAY_GROUP]) {\n var weekday = match[WEEKDAY_GROUP];\n weekday = util.WEEKDAY_OFFSET[weekday.toLowerCase()]\n result.start.assign('weekday', weekday);\n }\n\n // Text can be 'range' value. Such as 'January 12 - 13, 2012'\n if (match[DATE_TO_GROUP]) {\n var endDate = match[DATE_TO_NUM_GROUP] ?\n endDate = parseInt(match[DATE_TO_NUM_GROUP]) :\n util.ORDINAL_WORDS[match[DATE_TO_GROUP].replace('-', ' ').trim().toLowerCase()];\n\n result.end = result.start.clone();\n result.end.assign('day', endDate);\n }\n\n result.tags['ENMonthNameMiddleEndianParser'] = true;\n return result;\n }\n};","/*\n \n The parser for parsing month name and year.\n \n EX. \n - January\n - January 2012\n - January, 2012\n*/\n\nvar moment = require('moment');\n\nvar Parser = require('../parser').Parser;\nvar ParsedResult = require('../../result').ParsedResult;\nvar util = require('../../utils/EN');\n\nvar PATTERN = new RegExp('(^|\\\\D\\\\s+|[^\\\\w\\\\s])' +\n '(Jan\\\\.?|January|Feb\\\\.?|February|Mar\\\\.?|March|Apr\\\\.?|April|May\\\\.?|Jun\\\\.?|June|Jul\\\\.?|July|Aug\\\\.?|August|Sep\\\\.?|Sept\\\\.?|September|Oct\\\\.?|October|Nov\\\\.?|November|Dec\\\\.?|December)' + \n '\\\\s*' +\n '(?:' +\n '[,-]?\\\\s*([0-9]{4})(\\\\s*BE|AD|BC)?' +\n ')?' +\n '(?=[^\\\\s\\\\w]|\\\\s+[^0-9]|\\\\s+$|$)', 'i');\n\nvar MONTH_NAME_GROUP = 2;\nvar YEAR_GROUP = 3;\nvar YEAR_BE_GROUP = 4;\n\nexports.Parser = function ENMonthNameParser(){\n Parser.apply(this, arguments);\n\n this.pattern = function() { return PATTERN; }\n \n this.extract = function(text, ref, match, opt){\n var result = new ParsedResult({\n text: match[0].substr(match[1].length, match[0].length - match[1].length),\n index: match.index + match[1].length,\n ref: ref,\n });\n\n \n var month = match[MONTH_NAME_GROUP];\n month = util.MONTH_OFFSET[month.toLowerCase()];\n\n var day = 1;\n\n var year = null;\n if (match[YEAR_GROUP]) {\n year = match[YEAR_GROUP];\n year = parseInt(year);\n\n if(match[YEAR_BE_GROUP]){\n if (match[YEAR_BE_GROUP].match(/BE/)) {\n // Buddhist Era\n year = year - 543;\n } else if (match[YEAR_BE_GROUP].match(/BC/)) {\n // Before Christ\n year = -year;\n }\n\n } else if (year < 100){ \n\n year = year + 2000;\n }\n }\n\n if(year){\n result.start.imply('day', day);\n result.start.assign('month', month);\n result.start.assign('year', year);\n } else {\n \n //Find the most appropriated year\n var refMoment = moment(ref);\n refMoment.month(month - 1);\n refMoment.date(day);\n\n var nextYear = refMoment.clone().add(1, 'y');\n var lastYear = refMoment.clone().add(-1, 'y');\n if( Math.abs(nextYear.diff(moment(ref))) < Math.abs(refMoment.diff(moment(ref))) ){ \n refMoment = nextYear;\n }\n else if( Math.abs(lastYear.diff(moment(ref))) < Math.abs(refMoment.diff(moment(ref))) ){ \n refMoment = lastYear;\n }\n\n result.start.imply('day', day);\n result.start.assign('month', month);\n result.start.imply('year', refMoment.year());\n }\n\n result.tags['ENMonthNameParser'] = true;\n return result;\n }\n}\n","/*\n Date format with slash \"/\" (also \"-\" and \".\") between numbers\n - Tuesday 11/3/2015\n - 11/3/2015\n - 11/3\n*/\nvar moment = require('moment');\nvar Parser = require('../parser').Parser;\nvar ParsedResult = require('../../result').ParsedResult;\n\nvar PATTERN = new RegExp('(\\\\W|^)' +\n '(?:' +\n '(?:on\\\\s*?)?' +\n '((?:sun|mon|tues?|wed(?:nes)?|thu(?:rs?)?|fri|sat(?:ur)?)(?:day)?)' +\n '\\\\s*\\\\,?\\\\s*' +\n ')?' +\n '([0-3]{0,1}[0-9]{1})[\\\\/\\\\.\\\\-]([0-3]{0,1}[0-9]{1})' +\n '(?:' +\n '[\\\\/\\\\.\\\\-]' +\n '([0-9]{4}\\s*\\,?\\s*|[0-9]{2}\\s*\\,?\\s*)' +\n ')?' +\n '(\\\\W|$)', 'i');\n\nvar DAYS_OFFSET = { 'sunday': 0, 'sun': 0, 'monday': 1, 'mon': 1,'tuesday': 2, 'wednesday': 3, 'wed': 3,\n 'thursday': 4, 'thur': 4,'friday': 5, 'fri': 5,'saturday': 6, 'sat': 6,}\n\n\nvar OPENNING_GROUP = 1;\nvar ENDING_GROUP = 6;\n\nvar WEEKDAY_GROUP = 2;\nvar MONTH_GROUP = 3;\nvar DAY_GROUP = 4;\nvar YEAR_GROUP = 5;\n\nexports.Parser = function ENSlashDateFormatParser(argument) {\n Parser.apply(this, arguments);\n\n this.pattern = function () { return PATTERN; };\n this.extract = function(text, ref, match, opt){\n\n if(match[OPENNING_GROUP] == '/' || match[ENDING_GROUP] == '/') {\n // Long skip, if there is some overlapping like:\n // XX[/YY/ZZ]\n // [XX/YY/]ZZ\n match.index += match[0].length\n return;\n }\n\n var index = match.index + match[OPENNING_GROUP].length;\n var text = match[0].substr(match[OPENNING_GROUP].length, match[0].length - match[ENDING_GROUP].length);\n\n\n var result = new ParsedResult({\n text: text,\n index: index,\n ref: ref,\n });\n\n if(text.match(/^\\d\\.\\d$/)) return;\n if(text.match(/^\\d\\.\\d{1,2}\\.\\d{1,2}$/)) return;\n\n // MM/dd -> OK\n // MM.dd -> NG\n if(!match[YEAR_GROUP] && match[0].indexOf('/') < 0) return;\n\n var date = null;\n var year = match[YEAR_GROUP] || moment(ref).year() + '';\n var month = match[MONTH_GROUP];\n var day = match[DAY_GROUP];\n\n month = parseInt(month);\n day = parseInt(day);\n year = parseInt(year);\n\n if(month < 1 || month > 12) {\n if(month > 12) {\n // dd/mm/yyyy date format if day looks like a month, and month\n // looks like a day.\n if (day >= 1 && day <= 12 && month >= 13 && month <= 31) {\n // unambiguous\n var tday = month;\n month = day;\n day = tday;\n }\n else {\n // both month and day are <= 12\n return null;\n }\n }\n }\n if(day < 1 || day > 31) return null;\n\n if(year < 100){\n if (year > 50) {\n year = year + 1900;\n } else {\n year = year + 2000;\n }\n }\n\n result.start.assign('day', day);\n result.start.assign('month', month);\n result.start.assign('year', year);\n\n //Day of week\n if(match[WEEKDAY_GROUP]) {\n result.start.assign('weekday', DAYS_OFFSET[match[WEEKDAY_GROUP].toLowerCase()]);\n }\n\n result.tags['ENSlashDateFormatParser'] = true;\n return result;\n };\n};\n","/*\n Date format with slash \"/\" between numbers like ENSlashDateFormatParser,\n but this parser expect year before month and date. \n - YYYY/MM/DD\n - YYYY-MM-DD\n - YYYY.MM.DD\n*/\nvar moment = require('moment');\nvar Parser = require('../parser').Parser;\nvar ParsedResult = require('../../result').ParsedResult;\n\nvar PATTERN = new RegExp('(\\\\W|^)' \n + '([0-9]{4})[\\\\-\\\\.\\\\/]([0-9]{1,2})[\\\\-\\\\.\\\\/]([0-9]{1,2})'\n + '(?=\\\\W|$)', 'i');\n\nvar YEAR_NUMBER_GROUP = 2;\nvar MONTH_NUMBER_GROUP = 3;\nvar DATE_NUMBER_GROUP = 4;\n\nexports.Parser = function ENSlashDateFormatStartWithYearParser(){\n Parser.apply(this, arguments);\n \n this.pattern = function() { return PATTERN; }\n \n this.extract = function(text, ref, match, opt){\n\n var text = match[0].substr(match[1].length);\n var index = match.index + match[1].length;\n\n var result = new ParsedResult({\n text: text,\n index: index,\n ref: ref,\n })\n \n result.start.assign('year', parseInt(match[YEAR_NUMBER_GROUP]));\n result.start.assign('month', parseInt(match[MONTH_NUMBER_GROUP]));\n result.start.assign('day', parseInt(match[DATE_NUMBER_GROUP]));\n\n if (moment(result.start.get('month')) > 12 || moment(result.start.get('month')) < 1 ||\n moment(result.start.get('day')) > 31 || moment(result.start.get('day')) < 1) {\n return null;\n }\n \n result.tags['ENDateFormatParser'] = true;\n return result;\n };\n}\n","/*\n Month/Year date format with slash \"/\" (also \"-\" and \".\") between numbers \n - 11/05\n - 06/2005\n*/\nvar moment = require('moment');\nvar Parser = require('../parser').Parser;\nvar ParsedResult = require('../../result').ParsedResult;\n\nvar PATTERN = new RegExp('(^|[^\\\\d/]\\\\s+|[^\\\\w\\\\s])' +\n '([0-9]|0[1-9]|1[012])/([0-9]{4})' + \n '([^\\\\d/]|$)', 'i');\n\nvar OPENNING_GROUP = 1;\nvar ENDING_GROUP = 4;\n\nvar MONTH_GROUP = 2;\nvar YEAR_GROUP = 3;\n\nexports.Parser = function ENSlashMonthFormatParser(argument) {\n Parser.apply(this, arguments);\n\n this.pattern = function () { return PATTERN; };\n this.extract = function(text, ref, match, opt){\n \n var index = match.index + match[OPENNING_GROUP].length;\n var text = match[0].substr(match[OPENNING_GROUP].length, match[0].length - (1 + match[ENDING_GROUP].length)).trim();\n\n var result = new ParsedResult({\n text: text,\n index: index,\n ref: ref,\n });\n\n var date = null;\n var year = match[YEAR_GROUP] ;\n var month = match[MONTH_GROUP];\n var day = 1;\n \n month = parseInt(month);\n year = parseInt(year);\n\n result.start.imply('day', day);\n result.start.assign('month', month);\n result.start.assign('year', year);\n\n result.tags['ENSlashMonthFormatParser'] = true;\n return result;\n };\n};\n","/*\n\n\n*/\n\nvar moment = require('moment');\nvar Parser = require('../parser').Parser;\nvar ParsedResult = require('../../result').ParsedResult;\nvar util = require('../../utils/EN');\n\nvar PATTERN = new RegExp('' +\n '(\\\\W|^)' +\n '(?:within\\\\s*)?' +\n '(' + util.INTEGER_WORDS_PATTERN + '|[0-9]+|an?(?:\\\\s*few)?|half(?:\\\\s*an?)?)\\\\s*' +\n '(seconds?|min(?:ute)?s?|hours?|weeks?|days?|months?|years?)\\\\s*' +\n '(?:ago|before|earlier)(?=(?:\\\\W|$))', 'i');\n\nvar STRICT_PATTERN = new RegExp('' +\n '(\\\\W|^)' +\n '(?:within\\\\s*)?' +\n '([0-9]+|an?)\\\\s*' +\n '(seconds?|minutes?|hours?|days?)\\\\s*' +\n 'ago(?=(?:\\\\W|$))', 'i');\n\nexports.Parser = function ENTimeAgoFormatParser(){\n Parser.apply(this, arguments);\n\n this.pattern = function() {\n return this.isStrictMode()? STRICT_PATTERN : PATTERN;\n };\n\n this.extract = function(text, ref, match, opt){\n\n if (match.index > 0 && text[match.index-1].match(/\\w/)) return null;\n\n var text = match[0];\n text = match[0].substr(match[1].length, match[0].length - match[1].length);\n index = match.index + match[1].length;\n\n var result = new ParsedResult({\n index: index,\n text: text,\n ref: ref\n });\n\n var num = match[2].toLowerCase() ;\n if (util.INTEGER_WORDS[num] !== undefined) {\n num = util.INTEGER_WORDS[num];\n } else if(num === 'a' || num === 'an'){\n num = 1;\n } else if (num.match(/few/)) {\n num = 3;\n } else if (num.match(/half/)) {\n num = 0.5;\n } else {\n num = parseInt(num);\n }\n\n var date = moment(ref);\n\n if (match[3].match(/hour|min|second/i)) {\n if (match[3].match(/hour/i)) {\n\n date.add(-num, 'hour');\n\n } else if (match[3].match(/min/i)) {\n\n date.add(-num, 'minute');\n\n } else if (match[3].match(/second/i)) {\n\n date.add(-num, 'second');\n }\n\n result.start.imply('day', date.date());\n result.start.imply('month', date.month() + 1);\n result.start.imply('year', date.year());\n result.start.assign('hour', date.hour());\n result.start.assign('minute', date.minute());\n result.start.assign('second', date.second());\n result.tags['ENTimeAgoFormatParser'] = true;\n return result;\n }\n\n if (match[3].match(/week/i)) {\n date.add(-num, 'week');\n\n result.start.imply('day', date.date());\n result.start.imply('month', date.month() + 1);\n result.start.imply('year', date.year());\n result.start.imply('weekday', date.day());\n return result;\n }\n\n if (match[3].match(/day/i)) {\n date.add(-num, 'd');\n }\n\n if (match[3].match(/month/i)) {\n date.add(-num, 'month');\n }\n\n if (match[3].match(/year/i)) {\n\n date.add(-num, 'year');\n }\n\n result.start.assign('day', date.date());\n result.start.assign('month', date.month() + 1);\n result.start.assign('year', date.year());\n return result;\n\n };\n}\n","/*\n\n*/\n\nvar moment = require('moment');\nvar Parser = require('../parser').Parser;\nvar ParsedResult = require('../../result').ParsedResult;\nvar ParsedComponents = require('../../result').ParsedComponents;\n\nvar FIRST_REG_PATTERN = new RegExp(\"(^|\\\\s|T)\" +\n \"(?:(?:at|from)\\\\s*)??\" + \n \"(\\\\d{1,4}|noon|midnight)\" + \n \"(?:\" + \n \"(?:\\\\.|\\\\:|\\\\:)(\\\\d{1,2})\" + \n \"(?:\" + \n \"(?:\\\\:|\\\\:)(\\\\d{2})\" + \n \")?\" + \n \")?\" + \n \"(?:\\\\s*(A\\\\.M\\\\.|P\\\\.M\\\\.|AM?|PM?))?\" + \n \"(?=\\\\W|$)\", 'i');\n\n\nvar SECOND_REG_PATTERN = new RegExp(\"^\\\\s*\" + \n \"(\\\\-|\\\\–|\\\\~|\\\\〜|to|\\\\?)\\\\s*\" + \n \"(\\\\d{1,4})\" +\n \"(?:\" + \n \"(?:\\\\.|\\\\:|\\\\:)(\\\\d{1,2})\" + \n \"(?:\" + \n \"(?:\\\\.|\\\\:|\\\\:)(\\\\d{1,2})\" + \n \")?\" + \n \")?\" + \n \"(?:\\\\s*(A\\\\.M\\\\.|P\\\\.M\\\\.|AM?|PM?))?\" + \n \"(?=\\\\W|$)\", 'i');\n\nvar HOUR_GROUP = 2;\nvar MINUTE_GROUP = 3;\nvar SECOND_GROUP = 4;\nvar AM_PM_HOUR_GROUP = 5;\n\n\nexports.Parser = function ENTimeExpressionParser(){\n Parser.apply(this, arguments);\n\n this.pattern = function() { return FIRST_REG_PATTERN; }\n \n this.extract = function(text, ref, match, opt){ \n \n // This pattern can be overlaped Ex. [12] AM, 1[2] AM\n if (match.index > 0 && text[match.index-1].match(/\\w/)) return null;\n var refMoment = moment(ref);\n var result = new ParsedResult();\n result.ref = ref;\n result.index = match.index + match[1].length;\n result.text = match[0].substring(match[1].length);\n result.tags['ENTimeExpressionParser'] = true;\n\n result.start.imply('day', refMoment.date());\n result.start.imply('month', refMoment.month()+1);\n result.start.imply('year', refMoment.year());\n \n var hour = 0;\n var minute = 0;\n var meridiem = -1;\n\n // ----- Second\n if(match[SECOND_GROUP] != null){ \n var second = parseInt(match[SECOND_GROUP]);\n if(second >= 60) return null;\n\n result.start.assign('second', second);\n }\n \n // ----- Hours\n if (match[HOUR_GROUP].toLowerCase() == \"noon\"){\n meridiem = 1; \n hour = 12;\n } else if (match[HOUR_GROUP].toLowerCase() == \"midnight\") {\n meridiem = 0; \n hour = 0;\n } else {\n hour = parseInt(match[HOUR_GROUP]);\n }\n \n // ----- Minutes\n if(match[MINUTE_GROUP] != null){ \n minute = parseInt(match[MINUTE_GROUP]);\n } else if(hour > 100) { \n minute = hour%100;\n hour = parseInt(hour/100);\n } \n \n if(minute >= 60) {\n return null;\n }\n\n if(hour > 24) {\n return null;\n }\n if (hour >= 12) { \n meridiem = 1;\n }\n\n // ----- AM & PM \n if(match[AM_PM_HOUR_GROUP] != null) {\n if(hour > 12) return null;\n var ampm = match[AM_PM_HOUR_GROUP][0].toLowerCase();\n if(ampm == \"a\"){\n meridiem = 0; \n if(hour == 12) hour = 0;\n }\n \n if(ampm == \"p\"){\n meridiem = 1; \n if(hour != 12) hour += 12;\n }\n } \n\n result.start.assign('hour', hour);\n result.start.assign('minute', minute);\n\n if (meridiem >= 0) {\n result.start.assign('meridiem', meridiem);\n } else {\n if (hour < 12) {\n result.start.imply('meridiem', 0);\n } else {\n result.start.imply('meridiem', 1);\n }\n }\n \n // ==============================================================\n // Extracting the 'to' chunk\n // ==============================================================\n match = SECOND_REG_PATTERN.exec(text.substring(result.index + result.text.length));\n if (!match) {\n // Not accept number only result\n if (result.text.match(/^\\d+$/)) { \n return null;\n }\n return result;\n }\n\n\n\n // Pattern \"YY.YY -XXXX\" is more like timezone offset\n if (match[0].match(/^\\s*(\\+|\\-)\\s*\\d{3,4}$/)) {\n return result;\n }\n\n if(result.end == null){\n result.end = new ParsedComponents(null, result.start.date());\n }\n\n var hour = 0;\n var minute = 0;\n var meridiem = -1;\n\n // ----- Second\n if(match[SECOND_GROUP] != null){ \n var second = parseInt(match[SECOND_GROUP]);\n if(second >= 60) return null;\n\n result.end.assign('second', second);\n }\n\n hour = parseInt(match[2]);\n \n // ----- Minute\n if (match[MINUTE_GROUP]!= null) {\n \n minute = parseInt(match[MINUTE_GROUP]);\n if(minute >= 60) return result;\n \n } else if (hour > 100) {\n\n minute = hour%100;\n hour = parseInt(hour/100);\n }\n\n if(minute >= 60) {\n return null;\n }\n\n if(hour > 24) {\n return null;\n }\n if (hour >= 12) { \n meridiem = 1;\n }\n \n // ----- AM & PM \n if (match[AM_PM_HOUR_GROUP] != null){\n\n if (hour > 12) return null;\n\n var ampm = match[AM_PM_HOUR_GROUP][0].toLowerCase();\n if(ampm == \"a\"){\n meridiem = 0; \n if(hour == 12) {\n hour = 0;\n if (!result.end.isCertain('day')) {\n result.end.imply('day', result.end.get('day') + 1);\n }\n }\n }\n \n if(ampm == \"p\"){\n meridiem = 1; \n if(hour != 12) hour += 12;\n }\n \n if (!result.start.isCertain('meridiem')) {\n if (meridiem == 0) {\n \n result.start.imply('meridiem', 0);\n \n if (result.start.get('hour') == 12) {\n result.start.assign('hour', 0);\n }\n\n } else {\n\n result.start.imply('meridiem', 1);\n \n if (result.start.get('hour') != 12) {\n result.start.assign('hour', result.start.get('hour') + 12); \n }\n }\n }\n }\n\n result.text = result.text + match[0];\n result.end.assign('hour', hour);\n result.end.assign('minute', minute);\n if (meridiem >= 0) {\n result.end.assign('meridiem', meridiem);\n } else {\n var startAtPM = result.start.isCertain('meridiem') && result.start.get('meridiem') == 1;\n if (startAtPM && result.start.get('hour') > hour) {\n // 10pm - 1 (am)\n result.end.imply('meridiem', 0);\n\n } else if (hour > 12) {\n result.end.imply('meridiem', 1);\n }\n }\n\n if (result.end.date().getTime() < result.start.date().getTime()) {\n result.end.imply('day', result.end.get('day') + 1)\n }\n \n return result;\n }\n}\n","/*\n\n\n*/\nvar moment = require('moment');\nvar Parser = require('../parser').Parser;\nvar ParsedResult = require('../../result').ParsedResult;\n\nvar DAYS_OFFSET = { 'sunday': 0, 'sun': 0, 'monday': 1, 'mon': 1,'tuesday': 2, 'tues':2, 'tue':2, 'wednesday': 3, 'wed': 3,\n 'thursday': 4, 'thurs':4, 'thur': 4, 'thu': 4,'friday': 5, 'fri': 5,'saturday': 6, 'sat': 6};\n\nvar PATTERN = new RegExp('(\\\\W|^)' +\n '(?:(?:\\\\,|\\\\(|\\\\()\\\\s*)?' +\n '(?:on\\\\s*?)?' +\n '(?:(this|last|past|next)\\\\s*)?' +\n '(' + Object.keys(DAYS_OFFSET).join('|') + ')' +\n '(?:\\\\s*(?:\\\\,|\\\\)|\\\\)))?' +\n '(?:\\\\s*(this|last|past|next)\\\\s*week)?' +\n '(?=\\\\W|$)', 'i');\n\nvar PREFIX_GROUP = 2;\nvar WEEKDAY_GROUP = 3;\nvar POSTFIX_GROUP = 4;\n\n\nexports.updateParsedComponent = function updateParsedComponent(result, ref, offset, modifier) {\n\n var startMoment = moment(ref);\n var startMomentFixed = false;\n var refOffset = startMoment.day();\n\n if(modifier == 'last' || modifier == 'past') {\n startMoment.day(offset - 7);\n startMomentFixed = true;\n } else if(modifier == 'next') {\n startMoment.day(offset + 7);\n startMomentFixed = true;\n } else if(modifier == 'this') {\n startMoment.day(offset);\n } else {\n if (Math.abs(offset - 7 - refOffset) < Math.abs(offset - refOffset)) {\n startMoment.day(offset - 7);\n } else if (Math.abs(offset + 7 - refOffset) < Math.abs(offset - refOffset)) {\n startMoment.day(offset + 7);\n } else {\n startMoment.day(offset);\n }\n }\n\n result.start.assign('weekday', offset);\n if (startMomentFixed) {\n result.start.assign('day', startMoment.date());\n result.start.assign('month', startMoment.month() + 1);\n result.start.assign('year', startMoment.year());\n } else {\n result.start.imply('day', startMoment.date());\n result.start.imply('month', startMoment.month() + 1);\n result.start.imply('year', startMoment.year());\n }\n\n return result;\n};\n\n\nexports.Parser = function ENWeekdayParser() {\n Parser.apply(this, arguments);\n\n this.pattern = function() { return PATTERN; };\n\n this.extract = function(text, ref, match, opt){\n var index = match.index + match[1].length;\n var text = match[0].substr(match[1].length, match[0].length - match[1].length);\n var result = new ParsedResult({\n index: index,\n text: text,\n ref: ref\n });\n\n var dayOfWeek = match[WEEKDAY_GROUP].toLowerCase();\n var offset = DAYS_OFFSET[dayOfWeek];\n if(offset === undefined) {\n return null;\n }\n\n var prefix = match[PREFIX_GROUP];\n var postfix = match[POSTFIX_GROUP];\n var norm = prefix || postfix;\n norm = norm || '';\n norm = norm.toLowerCase();\n\n exports.updateParsedComponent(result, ref, offset, norm);\n result.tags['ENWeekdayParser'] = true;\n\n return result;\n }\n};\n","/*\n\n\n*/\n\nvar moment = require('moment');\nvar Parser = require('../parser').Parser;\nvar ParsedResult = require('../../result').ParsedResult;\n\nvar PATTERN = /(\\W|^)(now|today|tonight|last\\s*night|(?:tomorrow|tmr|yesterday)\\s*|tomorrow|tmr|yesterday)(?=\\W|$)/i;\n\nexports.Parser = function ENCasualDateParser(){\n\n Parser.apply(this, arguments);\n\n this.pattern = function() { return PATTERN; }\n\n this.extract = function(text, ref, match, opt){\n\n var text = match[0].substr(match[1].length);\n var index = match.index + match[1].length;\n var result = new ParsedResult({\n index: index,\n text: text,\n ref: ref,\n });\n\n var refMoment = moment(ref);\n var startMoment = refMoment.clone();\n var lowerText = text.toLowerCase();\n\n if(lowerText == 'tonight'){\n // Normally means this coming midnight\n result.start.imply('hour', 22);\n result.start.imply('meridiem', 1);\n\n } else if (/^tomorrow|^tmr/.test(lowerText)) {\n\n // Check not \"Tomorrow\" on late night\n if(refMoment.hour() > 1) {\n startMoment.add(1, 'day');\n }\n\n } else if (/^yesterday/.test(lowerText)) {\n\n startMoment.add(-1, 'day');\n\n } else if(lowerText.match(/last\\s*night/)) {\n\n result.start.imply('hour', 0);\n if (refMoment.hour() > 6) {\n startMoment.add(-1, 'day');\n }\n\n } else if (lowerText.match(\"now\")) {\n\n result.start.imply('hour', refMoment.hour());\n result.start.imply('minute', refMoment.minute());\n result.start.imply('second', refMoment.second());\n result.start.imply('millisecond', refMoment.millisecond());\n\n }\n\n result.start.assign('day', startMoment.date())\n result.start.assign('month', startMoment.month() + 1)\n result.start.assign('year', startMoment.year())\n result.tags['ENCasualDateParser'] = true;\n return result;\n }\n}\n","/*\n\n\n*/\n\nvar moment = require('moment');\nvar Parser = require('../parser').Parser;\nvar ParsedResult = require('../../result').ParsedResult;\n\nvar PATTERN = /(\\W|^)((this)?\\s*(morning|afternoon|evening|noon))/i;\n\nvar TIME_MATCH = 4;\n\nexports.Parser = function ENCasualTimeParser(){\n\n Parser.apply(this, arguments);\n\n\n this.pattern = function() { return PATTERN; }\n\n this.extract = function(text, ref, match, opt){\n\n var text = match[0].substr(match[1].length);\n var index = match.index + match[1].length;\n var result = new ParsedResult({\n index: index,\n text: text,\n ref: ref,\n });\n\n if(!match[TIME_MATCH]) TIME_MATCH = 3;\n\n if (match[TIME_MATCH] == \"afternoon\") {\n\n result.start.imply('hour', opt['afternoon'] ? opt['afternoon'] : 15);\n\n } else if (match[TIME_MATCH] == \"evening\") {\n\n result.start.imply('hour', opt['evening'] ? opt['evening'] : 18);\n\n } else if (match[TIME_MATCH] == \"morning\") {\n\n result.start.imply('hour', opt['morning'] ? opt['morning'] : 6);\n\n } else if (match[TIME_MATCH] == \"noon\") {\n\n result.start.imply('hour', opt['noon'] ? opt['noon'] : 12);\n }\n\n result.tags['ENCasualTimeParser'] = true;\n return result;\n };\n};\n","/*\n \n \n*/\n\nvar moment = require('moment');\n\nvar Parser = require('../parser').Parser;\nvar ParsedResult = require('../../result').ParsedResult;\n\nvar util = require('../../utils/JP'); \nvar PATTERN = /(?:(同|((昭和|平成)?([0-90-9]{2,4})))年\\s*)?([0-90-9]{1,2})月\\s*([0-90-9]{1,2})日/i;\n \nvar YEAR_GROUP = 2;\nvar ERA_GROUP = 3;\nvar YEAR_NUMBER_GROUP = 4;\nvar MONTH_GROUP = 5;\nvar DAY_GROUP = 6;\n\nexports.Parser = function JPStandardParser(){\n Parser.apply(this, arguments);\n \n this.pattern = function() { return PATTERN; }\n \n this.extract = function(text, ref, match, opt){ \n\n var startMoment = moment(ref);\n var result = new ParsedResult({\n text: match[0],\n index: match.index,\n ref: ref,\n });\n \n var month = match[MONTH_GROUP];\n month = util.toHankaku(month);\n month = parseInt(month);\n\n var day = match[DAY_GROUP];\n day = util.toHankaku(day);\n day = parseInt(day);\n\n startMoment.set('date', day);\n startMoment.set('month', month - 1);\n result.start.assign('day', startMoment.date());\n result.start.assign('month', startMoment.month() + 1);\n \n if (!match[YEAR_GROUP]) {\n \n //Find the most appropriated year\n startMoment.year(moment(ref).year());\n var nextYear = startMoment.clone().add(1, 'y');\n var lastYear = startMoment.clone().add(-1, 'y');\n if( Math.abs(nextYear.diff(moment(ref))) < Math.abs(startMoment.diff(moment(ref))) ){ \n startMoment = nextYear;\n }\n else if( Math.abs(lastYear.diff(moment(ref))) < Math.abs(startMoment.diff(moment(ref))) ){ \n startMoment = lastYear;\n }\n\n result.start.assign('day', startMoment.date());\n result.start.assign('month', startMoment.month() + 1);\n result.start.imply('year', startMoment.year());\n\n } else if (match[YEAR_GROUP].match('同年')) {\n\n result.start.assign('year', startMoment.year());\n\n } else {\n var year = match[YEAR_NUMBER_GROUP];\n year = util.toHankaku(year);\n year = parseInt(year);\n\n if (match[ERA_GROUP] == '平成') {\n year += 1988;\n } else if (match[ERA_GROUP] == '昭和') {\n year += 1925;\n }\n\n result.start.assign('year', year);\n }\n \n\n result.tags['JPStandardParser'] = true;\n return result;\n };\n\n}\n\n","/*\n\n\n*/\n\nvar moment = require('moment');\nvar Parser = require('../parser').Parser;\nvar ParsedResult = require('../../result').ParsedResult;\n\n/*\n Valid patterns:\n - esta mañana -> today in the morning\n - esta tarde -> today in the afternoon/evening\n - esta noche -> tonight\n - ayer por la mañana -> yesterday in the morning\n - ayer por la tarde -> yesterday in the afternoon/evening\n - ayer por la noche -> yesterday at night\n - mañana por la mañana -> tomorrow in the morning\n - mañana por la tarde -> tomorrow in the afternoon/evening\n - mañana por la noche -> tomorrow at night\n - anoche -> tomorrow at night\n - hoy -> today\n - ayer -> yesterday\n - mañana -> tomorrow\n */\nvar PATTERN = /(\\W|^)(ahora|esta\\s*(mañana|tarde|noche)|(ayer|mañana)\\s*por\\s*la\\s*(mañana|tarde|noche)|hoy|mañana|ayer|anoche)(?=\\W|$)/i;\n\nexports.Parser = function ESCasualDateParser(){\n\n Parser.apply(this, arguments);\n\n this.pattern = function() { return PATTERN; }\n\n this.extract = function(text, ref, match, opt){\n\n var text = match[0].substr(match[1].length);\n var index = match.index + match[1].length;\n var result = new ParsedResult({\n index: index,\n text: text,\n ref: ref,\n });\n\n var refMoment = moment(ref);\n var startMoment = refMoment.clone();\n var lowerText = text.toLowerCase().replace(/\\s+/g, ' ');\n\n if(lowerText == 'mañana'){\n\n // Check not \"Tomorrow\" on late night\n if(refMoment.hour() > 1) {\n startMoment.add(1, 'day');\n }\n\n } else if(lowerText == 'ayer') {\n\n startMoment.add(-1, 'day');\n }\n else if(lowerText == 'anoche') {\n\n result.start.imply('hour', 0);\n if (refMoment.hour() > 6) {\n startMoment.add(-1, 'day');\n }\n\n } else if (lowerText.match(\"esta\")) {\n\n var secondMatch = match[3].toLowerCase();\n if (secondMatch == \"tarde\") {\n\n result.start.imply('hour', 18);\n\n } else if (secondMatch == \"mañana\") {\n\n result.start.imply('hour', 6);\n\n } else if (secondMatch == \"noche\") {\n\n // Normally means this coming midnight\n result.start.imply('hour', 22);\n result.start.imply('meridiem', 1);\n\n }\n } else if (lowerText.match(/por\\s*la/)) {\n\n var firstMatch = match[4].toLowerCase();\n if (firstMatch === 'ayer') {\n\n startMoment.add(-1, 'day');\n\n } else if (firstMatch === 'mañana') {\n\n startMoment.add(1, 'day');\n\n }\n\n var secondMatch = match[5].toLowerCase();\n if (secondMatch == \"tarde\") {\n\n result.start.imply('hour', 18);\n\n } else if (secondMatch == \"mañana\") {\n\n result.start.imply('hour', 9);\n\n } else if (secondMatch == \"noche\") {\n\n // Normally means this coming midnight\n result.start.imply('hour', 22);\n result.start.imply('meridiem', 1);\n\n }\n\n } else if (lowerText.match(\"ahora\")) {\n\n result.start.imply('hour', refMoment.hour());\n result.start.imply('minute', refMoment.minute());\n result.start.imply('second', refMoment.second());\n result.start.imply('millisecond', refMoment.millisecond());\n\n }\n\n result.start.assign('day', startMoment.date())\n result.start.assign('month', startMoment.month() + 1)\n result.start.assign('year', startMoment.year())\n result.tags['ESCasualDateParser'] = true;\n return result;\n }\n}\n","/*\n \n \n*/\n\nvar moment = require('moment');\nvar Parser = require('../parser').Parser;\nvar ParsedResult = require('../../result').ParsedResult;\n\nvar PATTERN = /今日|当日|昨日|明日|今夜|今夕|今晩|今朝/i;\n\nexports.Parser = function JPCasualDateParser(){\n \n Parser.apply(this, arguments);\n \n this.pattern = function() { return PATTERN; }\n \n this.extract = function(text, ref, match, opt){ \n \n var index = match.index;\n var text = match[0];\n var result = new ParsedResult({\n index: index,\n text: text,\n ref: ref,\n });\n\n var refMoment = moment(ref);\n var startMoment = refMoment.clone();\n\n if(text == '今夜' || text == '今夕' || text == '今晩'){\n // Normally means this coming midnight \n result.start.imply('hour', 22);\n result.start.imply('meridiem', 1);\n\n } else if(text == '明日'){\n\n // Check not \"Tomorrow\" on late night\n if(refMoment.hour() > 4) {\n startMoment.add(1, 'day');\n }\n\n } else if(text == '昨日') {\n\n startMoment.add(-1, 'day');\n\n } else if (text.match(\"今朝\")) {\n\n result.start.imply('hour', 6);\n result.start.imply('meridiem', 0);\n }\n\n result.start.assign('day', startMoment.date())\n result.start.assign('month', startMoment.month() + 1)\n result.start.assign('year', startMoment.year())\n result.tags['JPCasualDateParser'] = true;\n return result;\n }\n}\n\n","/*\n\n\n*/\n\nvar moment = require('moment');\nvar Parser = require('../parser').Parser;\nvar ParsedResult = require('../../result').ParsedResult;\n\nvar PATTERN = /(\\W|^)hace\\s*([0-9]+|medi[oa]|una?)\\s*(minutos?|horas?|semanas?|d[ií]as?|mes(es)?|años?)(?=(?:\\W|$))/i;\n\nexports.Parser = function ESTimeAgoFormatParser(){\n Parser.apply(this, arguments);\n\n this.pattern = function() {\n return PATTERN;\n }\n\n this.extract = function(text, ref, match, opt){\n\n if (match.index > 0 && text[match.index-1].match(/\\w/)) return null;\n\n var text = match[0];\n text = match[0].substr(match[1].length, match[0].length - match[1].length);\n index = match.index + match[1].length;\n\n var result = new ParsedResult({\n index: index,\n text: text,\n ref: ref,\n });\n\n var num = parseInt(match[2]);\n if (isNaN(num)) {\n if (match[2].match(/medi/)) {\n num = 0.5;\n } else {\n num = 1;\n }\n }\n\n var date = moment(ref);\n\n if (match[3].match(/hora/) || match[3].match(/minuto/)) {\n if (match[3].match(/hora/)) {\n\n date.add(-num, 'hour');\n\n } else if (match[3].match(/minuto/)) {\n\n date.add(-num, 'minute');\n }\n\n result.start.imply('day', date.date());\n result.start.imply('month', date.month() + 1);\n result.start.imply('year', date.year());\n result.start.assign('hour', date.hour());\n result.start.assign('minute', date.minute());\n result.tags['ESTimeAgoFormatParser'] = true;\n return result;\n }\n\n if (match[3].match(/semana/)) {\n date.add(-num, 'week');\n\n result.start.imply('day', date.date());\n result.start.imply('month', date.month() + 1);\n result.start.imply('year', date.year());\n result.start.imply('weekday', date.day());\n return result;\n }\n\n if (match[3].match(/d[ií]a/)) {\n date.add(-num, 'd');\n }\n\n if (match[3].match(/mes/)) {\n date.add(-num, 'month');\n }\n\n if (match[3].match(/año/)) {\n\n date.add(-num, 'year');\n }\n\n result.start.assign('day', date.date());\n result.start.assign('month', date.month() + 1);\n result.start.assign('year', date.year());\n return result;\n\n };\n}\n","/*\n\n\n*/\n\nvar moment = require('moment');\nvar Parser = require('../parser').Parser;\nvar ParsedResult = require('../../result').ParsedResult;\n\nvar PATTERN = /(\\W|^)(dentro\\s*de|en)\\s*([0-9]+|medi[oa]|una?)\\s*(minutos?|horas?|d[ií]as?)\\s*(?=(?:\\W|$))/i;\n\nexports.Parser = function ESDeadlineFormatParser(){\n Parser.apply(this, arguments);\n\n this.pattern = function() { return PATTERN; }\n\n this.extract = function(text, ref, match, opt){\n\n var index = match.index + match[1].length;\n var text = match[0];\n text = match[0].substr(match[1].length, match[0].length - match[1].length);\n\n var result = new ParsedResult({\n index: index,\n text: text,\n ref: ref,\n });\n\n var num = parseInt(match[3]);\n if (isNaN(num)) {\n if (match[3].match(/medi/)) {\n num = 0.5;\n } else {\n num = 1;\n }\n }\n\n var date = moment(ref);\n if (match[4].match(/d[ií]a/)) {\n date.add(num, 'd');\n\n result.start.assign('year', date.year());\n result.start.assign('month', date.month() + 1);\n result.start.assign('day', date.date());\n return result;\n }\n\n\n if (match[4].match(/hora/)) {\n\n date.add(num, 'hour');\n\n } else if (match[4].match(/minuto/)) {\n\n date.add(num, 'minute');\n }\n\n result.start.imply('year', date.year());\n result.start.imply('month', date.month() + 1);\n result.start.imply('day', date.date());\n result.start.assign('hour', date.hour());\n result.start.assign('minute', date.minute());\n result.tags['ESDeadlineFormatParser'] = true;\n return result;\n };\n}\n","/*\n\n\n*/\n\nvar moment = require('moment');\nvar Parser = require('../parser').Parser;\nvar ParsedResult = require('../../result').ParsedResult;\nvar ParsedComponents = require('../../result').ParsedComponents;\n\nvar FIRST_REG_PATTERN = new RegExp(\"(^|\\\\s|T)\" +\n \"(?:(?:a las?|al?|desde|de)\\\\s*)?\" +\n \"(\\\\d{1,4}|mediod[ií]a|medianoche)\" +\n \"(?:\" +\n \"(?:\\\\.|\\\\:|\\\\:)(\\\\d{1,2})\" +\n \"(?:\" +\n \"(?:\\\\:|\\\\:)(\\\\d{2})\" +\n \")?\" +\n \")?\" +\n \"(?:\\\\s*(A\\\\.M\\\\.|P\\\\.M\\\\.|AM?|PM?))?\" +\n \"(?=\\\\W|$)\", 'i');\n\n\nvar SECOND_REG_PATTERN = new RegExp(\"^\\\\s*\" +\n \"(\\\\-|\\\\–|\\\\~|\\\\〜|a(?:\\s*las)?|\\\\?)\\\\s*\" +\n \"(\\\\d{1,4})\" +\n \"(?:\" +\n \"(?:\\\\.|\\\\:|\\\\:)(\\\\d{1,2})\" +\n \"(?:\" +\n \"(?:\\\\.|\\\\:|\\\\:)(\\\\d{1,2})\" +\n \")?\" +\n \")?\" +\n \"(?:\\\\s*(A\\\\.M\\\\.|P\\\\.M\\\\.|AM?|PM?))?\" +\n \"(?=\\\\W|$)\", 'i');\n\nvar HOUR_GROUP = 2;\nvar MINUTE_GROUP = 3;\nvar SECOND_GROUP = 4;\nvar AM_PM_HOUR_GROUP = 5;\n\nexports.Parser = function ESTimeExpressionParser(){\n Parser.apply(this, arguments);\n\n this.pattern = function() { return FIRST_REG_PATTERN; }\n\n this.extract = function(text, ref, match, opt){\n\n // This pattern can be overlaped Ex. [12] AM, 1[2] AM\n if (match.index > 0 && text[match.index-1].match(/\\w/)) return null;\n var refMoment = moment(ref);\n var result = new ParsedResult();\n result.ref = ref;\n result.index = match.index + match[1].length;\n result.text = match[0].substring(match[1].length);\n result.tags['ESTimeExpressionParser'] = true;\n\n result.start.imply('day', refMoment.date());\n result.start.imply('month', refMoment.month()+1);\n result.start.imply('year', refMoment.year());\n\n var hour = 0;\n var minute = 0;\n var meridiem = -1;\n\n // ----- Second\n if(match[SECOND_GROUP] != null){\n var second = parseInt(match[SECOND_GROUP]);\n if(second >= 60) return null;\n\n result.start.assign('second', second);\n }\n\n // ----- Hours\n if (match[HOUR_GROUP].toLowerCase().match(/mediod/)){\n meridiem = 1;\n hour = 12;\n } else if (match[HOUR_GROUP].toLowerCase() == \"medianoche\") {\n meridiem = 0;\n hour = 0;\n } else {\n hour = parseInt(match[HOUR_GROUP]);\n }\n\n // ----- Minutes\n if(match[MINUTE_GROUP] != null){\n minute = parseInt(match[MINUTE_GROUP]);\n } else if(hour > 100) {\n minute = hour%100;\n hour = parseInt(hour/100);\n }\n\n if(minute >= 60) {\n return null;\n }\n\n if(hour > 24) {\n return null;\n }\n if (hour >= 12) {\n meridiem = 1;\n }\n\n // ----- AM & PM\n if(match[AM_PM_HOUR_GROUP] != null) {\n if(hour > 12) return null;\n var ampm = match[AM_PM_HOUR_GROUP][0].toLowerCase();\n if(ampm == \"a\"){\n meridiem = 0;\n if(hour == 12) hour = 0;\n }\n\n if(ampm == \"p\"){\n meridiem = 1;\n if(hour != 12) hour += 12;\n }\n }\n result.start.assign('hour', hour);\n result.start.assign('minute', minute);\n if (meridiem >= 0) {\n result.start.assign('meridiem', meridiem);\n }\n\n // ==============================================================\n // Extracting the 'to' chunk\n // ==============================================================\n match = SECOND_REG_PATTERN.exec(text.substring(result.index + result.text.length));\n if (!match) {\n // Not accept number only result\n if (result.text.match(/^\\d+$/)) {\n return null;\n }\n return result;\n }\n\n\n\n // Pattern \"YY.YY -XXXX\" is more like timezone offset\n if (match[0].match(/^\\s*(\\+|\\-)\\s*\\d{3,4}$/)) {\n return result;\n }\n\n if(result.end == null){\n result.end = new ParsedComponents(null, result.start.date());\n }\n\n var hour = 0;\n var minute = 0;\n var meridiem = -1;\n\n // ----- Second\n if(match[SECOND_GROUP] != null){\n var second = parseInt(match[SECOND_GROUP]);\n if(second >= 60) return null;\n\n result.end.assign('second', second);\n }\n\n hour = parseInt(match[2]);\n\n // ----- Minute\n if (match[MINUTE_GROUP]!= null) {\n\n minute = parseInt(match[MINUTE_GROUP]);\n if(minute >= 60) return result;\n\n } else if (hour > 100) {\n\n minute = hour%100;\n hour = parseInt(hour/100);\n }\n\n if(minute >= 60) {\n return null;\n }\n\n if(hour > 24) {\n return null;\n }\n if (hour >= 12) {\n meridiem = 1;\n }\n\n // ----- AM & PM\n if (match[AM_PM_HOUR_GROUP] != null){\n\n if (hour > 12) return null;\n\n if(match[AM_PM_HOUR_GROUP][0].toLowerCase() == \"a\"){\n meridiem = 0;\n if(hour == 12) {\n hour = 0;\n if (!result.end.isCertain('day')) {\n result.end.imply('day', result.end.get('day') + 1);\n }\n }\n }\n\n if(match[AM_PM_HOUR_GROUP][0].toLowerCase() == \"p\"){\n meridiem = 1;\n if(hour != 12) hour += 12;\n }\n\n if (!result.start.isCertain('meridiem')) {\n if (meridiem == 0) {\n\n result.start.imply('meridiem', 0);\n\n if (result.start.get('hour') == 12) {\n result.start.assign('hour', 0);\n }\n\n } else {\n\n result.start.imply('meridiem', 1);\n\n if (result.start.get('hour') != 12) {\n result.start.assign('hour', result.start.get('hour') + 12);\n }\n }\n }\n\n } else if(hour >= 12) {\n meridiem = 1;\n }\n\n result.text = result.text + match[0];\n result.end.assign('hour', hour);\n result.end.assign('minute', minute);\n if (meridiem >= 0) {\n result.end.assign('meridiem', meridiem);\n }\n\n if (result.end.date().getTime() < result.start.date().getTime()) {\n result.end.imply('day', result.end.get('day') + 1)\n }\n\n return result;\n }\n}\n","/*\n\n\n*/\nvar moment = require('moment');\nvar Parser = require('../parser').Parser;\nvar ParsedResult = require('../../result').ParsedResult;\nvar updateParsedComponent = require('../EN/ENWeekdayParser').updateParsedComponent;\n\nvar DAYS_OFFSET = { 'domingo': 0, 'dom': 0, 'lunes': 1, 'lun': 1, 'martes': 2, 'mar':2, 'miercoles': 3, 'miércoles': 3, 'mie': 3,\n 'jueves': 4, 'jue': 4, 'viernes': 5, 'vier': 5, 'sabado': 6, 'sábado': 6, 'sab': 6,}\n\nvar PATTERN = new RegExp('(\\\\W|^)' +\n '(?:(?:\\\\,|\\\\(|\\\\()\\\\s*)?' +\n '(?:(este|pasado|pr[oó]ximo)\\\\s*)?' +\n '(' + Object.keys(DAYS_OFFSET).join('|') + ')' +\n '(?:\\\\s*(?:\\\\,|\\\\)|\\\\)))?' +\n '(?:\\\\s*(este|pasado|pr[óo]ximo)\\\\s*week)?' +\n '(?=\\\\W|$)', 'i');\n\nvar PREFIX_GROUP = 2;\nvar WEEKDAY_GROUP = 3;\nvar POSTFIX_GROUP = 4;\n\nexports.Parser = function ESWeekdayParser() {\n Parser.apply(this, arguments);\n\n this.pattern = function() { return PATTERN; }\n\n this.extract = function(text, ref, match, opt){\n var index = match.index + match[1].length;\n var text = match[0].substr(match[1].length, match[0].length - match[1].length);\n var result = new ParsedResult({\n index: index,\n text: text,\n ref: ref\n });\n\n var dayOfWeek = match[WEEKDAY_GROUP].toLowerCase();\n var offset = DAYS_OFFSET[dayOfWeek];\n if(offset === undefined) return null;\n\n var modifier = null;\n var prefix = match[PREFIX_GROUP];\n var postfix = match[POSTFIX_GROUP];\n if (prefix || postfix) {\n var norm = prefix || postfix;\n norm = norm.toLowerCase();\n\n if(norm == 'pasado') {\n modifier = 'this';\n }\n else if(norm == 'próximo' || norm == 'proximo') {\n modifier = 'next';\n }\n else if(norm== 'este') {\n modifier = 'this';\n }\n }\n\n updateParsedComponent(result, ref, offset, modifier);\n result.tags['ESWeekdayParser'] = true;\n return result;\n }\n}\n","/*\n\n\n*/\n\nvar moment = require('moment');\n\nvar Parser = require('../parser').Parser;\nvar ParsedResult = require('../../result').ParsedResult;\n\nvar util = require('../../utils/ES');\n\nvar DAYS_OFFSET = util.WEEKDAY_OFFSET;\n\nvar PATTERN = new RegExp('(\\\\W|^)' +\n '(?:(Domingo|Lunes|Martes|Miércoles|Miercoles|Jueves|Viernes|Sábado|Sabado|Dom|Lun|Mar|Mie|Jue|Vie|Sab)\\\\s*,?\\\\s*)?' +\n '([0-9]{1,2})(?:º|ª|°)?' +\n '(?:\\\\s*(?:desde|de|\\\\-|\\\\–|al?|hasta|\\\\s)\\\\s*([0-9]{1,2})(?:º|ª|°)?)?\\\\s*(?:de)?\\\\s*' +\n '(Ene(?:ro|\\\\.)?|Feb(?:rero|\\\\.)?|Mar(?:zo|\\\\.)?|Abr(?:il|\\\\.)?|May(?:o|\\\\.)?|Jun(?:io|\\\\.)?|Jul(?:io|\\\\.)?|Ago(?:sto|\\\\.)?|Sep(?:tiembre|\\\\.)?|Oct(?:ubre|\\\\.)?|Nov(?:iembre|\\\\.)?|Dic(?:iembre|\\\\.)?)' +\n '(?:\\\\s*(?:del?)?(\\\\s*[0-9]{1,4}(?![^\\\\s]\\\\d))(\\\\s*[ad]\\\\.?\\\\s*c\\\\.?|a\\\\.?\\\\s*d\\\\.?)?)?' +\n '(?=\\\\W|$)', 'i'\n );\n\nvar WEEKDAY_GROUP = 2;\nvar DATE_GROUP = 3;\nvar DATE_TO_GROUP = 4;\nvar MONTH_NAME_GROUP = 5;\nvar YEAR_GROUP = 6;\nvar YEAR_BE_GROUP = 7;\n\nexports.Parser = function ESMonthNameLittleEndianParser(){\n Parser.apply(this, arguments);\n\n this.pattern = function() { return PATTERN; }\n\n this.extract = function(text, ref, match, opt){\n\n var result = new ParsedResult({\n text: match[0].substr(match[1].length, match[0].length - match[1].length),\n index: match.index + match[1].length,\n ref: ref,\n });\n\n var month = match[MONTH_NAME_GROUP];\n month = util.MONTH_OFFSET[month.toLowerCase()];\n\n var day = match[DATE_GROUP];\n day = parseInt(day);\n\n var year = null;\n if (match[YEAR_GROUP]) {\n year = match[YEAR_GROUP];\n year = parseInt(year);\n\n if(match[YEAR_BE_GROUP]){\n if (/a\\.?\\s*c\\.?/i.test(match[YEAR_BE_GROUP])) {\n // antes de Cristo\n year = -year;\n }\n } else if (year < 100){\n\n year = year + 2000;\n }\n }\n\n if(year){\n result.start.assign('day', day);\n result.start.assign('month', month);\n result.start.assign('year', year);\n } else {\n\n //Find the most appropriated year\n var refMoment = moment(ref);\n refMoment.month(month - 1);\n refMoment.date(day);\n refMoment.year(moment(ref).year());\n\n var nextYear = refMoment.clone().add(1, 'y');\n var lastYear = refMoment.clone().add(-1, 'y');\n if( Math.abs(nextYear.diff(moment(ref))) < Math.abs(refMoment.diff(moment(ref))) ){\n refMoment = nextYear;\n }\n else if( Math.abs(lastYear.diff(moment(ref))) < Math.abs(refMoment.diff(moment(ref))) ){\n refMoment = lastYear;\n }\n\n result.start.assign('day', day);\n result.start.assign('month', month);\n result.start.imply('year', refMoment.year());\n }\n\n // Weekday component\n if (match[WEEKDAY_GROUP]) {\n var weekday = match[WEEKDAY_GROUP];\n weekday = util.WEEKDAY_OFFSET[weekday.toLowerCase()]\n result.start.assign('weekday', weekday);\n }\n\n // Text can be 'range' value. Such as '12 - 13 January 2012'\n if (match[DATE_TO_GROUP]) {\n result.end = result.start.clone();\n result.end.assign('day', parseInt(match[DATE_TO_GROUP]));\n }\n\n result.tags['ESMonthNameLittleEndianParser'] = true;\n return result;\n };\n}","/*\n Date format with slash \"/\" (also \"-\" and \".\") between numbers\n - Martes 3/11/2015\n - 3/11/2015\n - 3/11\n*/\nvar moment = require('moment');\nvar Parser = require('../parser').Parser;\nvar ParsedResult = require('../../result').ParsedResult;\n\nvar PATTERN = new RegExp('(\\\\W|^)' +\n '(?:' +\n '((?:domingo|dom|lunes|lun|martes|mar|mi[ée]rcoles|mie|jueves|jue|viernes|vie|s[áa]bado|sab))' +\n '\\\\s*\\\\,?\\\\s*' +\n ')?' +\n '([0-1]{0,1}[0-9]{1})[\\\\/\\\\.\\\\-]([0-3]{0,1}[0-9]{1})' +\n '(?:' +\n '[\\\\/\\\\.\\\\-]' +\n '([0-9]{4}\\s*\\,?\\s*|[0-9]{2}\\s*\\,?\\s*)' +\n ')?' +\n '(\\\\W|$)', 'i');\n\nvar DAYS_OFFSET = { 'domingo': 0, 'dom': 0, 'lunes': 1, 'lun': 1, 'martes': 2, 'mar': 2, 'miercoles': 3, 'miércoles': 3, 'mie': 3,\n 'jueves': 4, 'jue': 4, 'viernes': 5, 'vier': 5, 'sábado': 6, 'sabado': 6, 'sab': 6,}\n\n\nvar OPENNING_GROUP = 1;\nvar ENDING_GROUP = 6;\n\n// in Spanish we use day/month/year\nvar WEEKDAY_GROUP = 2;\nvar MONTH_GROUP = 4;\nvar DAY_GROUP = 3;\nvar YEAR_GROUP = 5;\n\nexports.Parser = function ESSlashDateFormatParser(argument) {\n Parser.apply(this, arguments);\n\n this.pattern = function () { return PATTERN; };\n this.extract = function(text, ref, match, opt){\n\n if(match[OPENNING_GROUP] == '/' || match[ENDING_GROUP] == '/') {\n // Long skip, if there is some overlapping like:\n // XX[/YY/ZZ]\n // [XX/YY/]ZZ\n match.index += match[0].length\n return;\n }\n\n var index = match.index + match[OPENNING_GROUP].length;\n var text = match[0].substr(match[OPENNING_GROUP].length, match[0].length - match[ENDING_GROUP].length);\n\n\n var result = new ParsedResult({\n text: text,\n index: index,\n ref: ref,\n });\n\n if(text.match(/^\\d\\.\\d$/)) return;\n if(text.match(/^\\d\\.\\d{1,2}\\.\\d{1,2}$/)) return;\n\n // MM/dd -> OK\n // MM.dd -> NG\n if(!match[YEAR_GROUP] && match[0].indexOf('/') < 0) return;\n\n var date = null;\n var year = match[YEAR_GROUP] || moment(ref).year() + '';\n var month = match[MONTH_GROUP];\n var day = match[DAY_GROUP];\n\n month = parseInt(month);\n day = parseInt(day);\n year = parseInt(year);\n\n if(month < 1 || month > 12) {\n if(month > 12) {\n // dd/mm/yyyy date format if day looks like a month, and month\n // looks like a day.\n if (day >= 1 && day <= 12 && month >= 13 && month <= 31) {\n // unambiguous\n var tday = month;\n month = day;\n day = tday;\n }\n else {\n // both month and day are <= 12\n return null;\n }\n }\n }\n if(day < 1 || day > 31) return null;\n\n if(year < 100){\n if(year > 50){\n year = year + 1900;\n }else{\n year = year + 2000;\n }\n }\n\n result.start.assign('day', day);\n result.start.assign('month', month);\n result.start.assign('year', year);\n\n //Day of week\n if(match[WEEKDAY_GROUP]) {\n result.start.assign('weekday', DAYS_OFFSET[match[WEEKDAY_GROUP].toLowerCase()]);\n }\n\n result.tags['ESSlashDateFormatParser'] = true;\n return result;\n };\n};","/*\r\n\r\n\r\n*/\r\n\r\nvar moment = require('moment');\r\nvar Parser = require('../parser').Parser;\r\nvar ParsedResult = require('../../result').ParsedResult;\r\n\r\nvar PATTERN = /(\\W|^)(maintenant|aujourd'hui|ajd|cette\\s*nuit|la\\s*veille|(demain|hier)(\\s*(matin|soir|aprem|après-midi))?|ce\\s*(matin|soir)|cet\\s*(après-midi|aprem))(?=\\W|$)/i;\r\n\r\nexports.Parser = function FRCasualDateParser(){\r\n\r\n Parser.apply(this, arguments);\r\n\r\n this.pattern = function() { return PATTERN; }\r\n\r\n this.extract = function(text, ref, match, opt){\r\n\r\n var text = match[0].substr(match[1].length);\r\n var index = match.index + match[1].length;\r\n var result = new ParsedResult({\r\n index: index,\r\n text: text,\r\n ref: ref,\r\n });\r\n\r\n var refMoment = moment(ref);\r\n var startMoment = refMoment.clone();\r\n var lowerText = text.toLowerCase();\r\n\r\n if(lowerText.match(/demain/)){\r\n // Check not \"Tomorrow\" on late night\r\n if(refMoment.hour() > 1) {\r\n startMoment.add(1, 'day');\r\n }\r\n } \r\n\r\n if(lowerText.match(/hier/)) {\r\n startMoment.add(-1, 'day');\r\n }\r\n\r\n if(lowerText.match(/cette\\s*nuit/)){\r\n // Normally means this coming midnight\r\n result.start.imply('hour', 22);\r\n result.start.imply('meridiem', 1);\r\n\r\n } else if(lowerText.match(/la\\s*veille/)) {\r\n\r\n result.start.imply('hour', 0);\r\n if (refMoment.hour() > 6) {\r\n startMoment.add(-1, 'day');\r\n }\r\n\r\n } else if (lowerText.match(/(après-midi|aprem)/)) {\r\n\r\n result.start.imply('hour', 14);\r\n\r\n } else if (lowerText.match(/(soir)/)) {\r\n\r\n result.start.imply('hour', 18);\r\n\r\n } else if (lowerText.match(/matin/)) {\r\n\r\n result.start.imply('hour', 8);\r\n\r\n } else if (lowerText.match(\"maintenant\")) {\r\n\r\n result.start.imply('hour', refMoment.hour());\r\n result.start.imply('minute', refMoment.minute());\r\n result.start.imply('second', refMoment.second());\r\n result.start.imply('millisecond', refMoment.millisecond());\r\n\r\n }\r\n\r\n result.start.assign('day', startMoment.date())\r\n result.start.assign('month', startMoment.month() + 1)\r\n result.start.assign('year', startMoment.year())\r\n result.tags['FRCasualDateParser'] = true;\r\n return result;\r\n }\r\n}\r\n","/*\r\n\r\n\r\n*/\r\n\r\nvar moment = require('moment');\r\nvar Parser = require('../parser').Parser;\r\nvar ParsedResult = require('../../result').ParsedResult;\r\nvar util = require('../../utils/FR');\r\n\r\nvar PATTERN = new RegExp('(\\\\W|^)' +\r\n '(dans|en)\\\\s*' +\r\n '('+ util.INTEGER_WORDS_PATTERN + '|[0-9]+|une?|(?:\\\\s*quelques)?|demi(?:\\\\s*|-?)?)\\\\s*' +\r\n '(secondes?|min(?:ute)?s?|heures?|jours?|semaines?|mois|années?)\\\\s*' +\r\n '(?=\\\\W|$)', 'i'\r\n);\r\n\r\nvar STRICT_PATTERN = new RegExp('(\\\\W|^)' +\r\n '(dans|en)\\\\s*' +\r\n '('+ util.INTEGER_WORDS_PATTERN + '|[0-9]+|un?)\\\\s*' +\r\n '(secondes?|minutes?|heures?|jours?)\\\\s*' +\r\n '(?=\\\\W|$)', 'i'\r\n);\r\n\r\nexports.Parser = function FRDeadlineFormatParser(){\r\n Parser.apply(this, arguments);\r\n\r\n this.pattern = function() {\r\n return this.isStrictMode()? STRICT_PATTERN : PATTERN;\r\n };\r\n\r\n this.extract = function(text, ref, match, opt){\r\n\r\n var index = match.index + match[1].length;\r\n var text = match[0];\r\n text = match[0].substr(match[1].length, match[0].length - match[1].length);\r\n\r\n var result = new ParsedResult({\r\n index: index,\r\n text: text,\r\n ref: ref\r\n });\r\n\r\n var num = match[3];\r\n if (util.INTEGER_WORDS[num] !== undefined) {\r\n num = util.INTEGER_WORDS[num];\r\n } else if (num === 'un' || num === 'une'){\r\n num = 1;\r\n } else if (num.match(/quelques?/i)){\r\n num = 3;\r\n } else if (num.match(/demi-?/i)) {\r\n num = 0.5;\r\n } else {\r\n num = parseInt(num);\r\n }\r\n\r\n var date = moment(ref);\r\n if (match[4].match(/jour|semaine|mois|année/i)) {\r\n\r\n if (match[4].match(/jour/)) {\r\n date.add(num, 'd');\r\n } else if (match[4].match(/semaine/i)) {\r\n date.add(num * 7, 'd');\r\n } else if (match[4].match(/mois/i)) {\r\n date.add(num, 'month');\r\n } else if (match[4].match(/année/i)) {\r\n date.add(num, 'year');\r\n }\r\n\r\n result.start.assign('year', date.year());\r\n result.start.assign('month', date.month() + 1);\r\n result.start.assign('day', date.date());\r\n return result;\r\n }\r\n\r\n if (match[4].match(/heure/i)) {\r\n\r\n date.add(num, 'hour');\r\n\r\n } else if (match[4].match(/min/i)) {\r\n\r\n date.add(num, 'minutes');\r\n\r\n } else if (match[4].match(/secondes/i)) {\r\n\r\n date.add(num, 'second');\r\n }\r\n\r\n result.start.imply('year', date.year());\r\n result.start.imply('month', date.month() + 1);\r\n result.start.imply('day', date.date());\r\n result.start.assign('hour', date.hour());\r\n result.start.assign('minute', date.minute());\r\n result.start.assign('second', date.second());\r\n result.tags['FRDeadlineFormatParser'] = true;\r\n return result;\r\n };\r\n};\r\n","/*\r\n\r\n\r\n*/\r\n\r\nvar moment = require('moment');\r\n\r\nvar Parser = require('../parser').Parser;\r\nvar ParsedResult = require('../../result').ParsedResult;\r\n\r\nvar util = require('../../utils/FR');\r\n\r\nvar DAYS_OFFSET = util.WEEKDAY_OFFSET;\r\n\r\nvar PATTERN = new RegExp('(\\\\W|^)' +\r\n '(?:(Dimanche|Lundi|Mardi|mercredi|Jeudi|Vendredi|Samedi|Dim|Lun|Mar|Mer|Jeu|Ven|Sam)\\\\s*,?\\\\s*)?' +\r\n '([0-9]{1,2}|1er)' +\r\n '(?:\\\\s*(?:au|\\\\-|\\\\–|jusqu\\'au?|\\\\s)\\\\s*([0-9]{1,2})(?:er)?)?\\\\s*(?:de)?\\\\s*' +\r\n '(Jan(?:vier|\\\\.)?|Fév(?:rier|\\\\.)?|Mars|Avr(?:il|\\\\.)?|Mai|Juin|Juil(?:let|\\\\.)?|Ao[uû]t|Sept(?:embre|\\\\.)?|Oct(?:obre|\\\\.)?|Nov(?:embre|\\\\.)?|déc(?:embre|\\\\.)?)' +\r\n '(?:\\\\s*(\\\\s*[0-9]{1,4}(?![^\\\\s]\\\\d))(?:\\\\s*(AC|[ap]\\\\.?\\\\s*c(?:h(?:r)?)?\\\\.?\\\\s*n\\\\.?))?)?' +\r\n '(?=\\\\W|$)', 'i'\r\n );\r\n\r\nvar WEEKDAY_GROUP = 2;\r\nvar DATE_GROUP = 3;\r\nvar DATE_TO_GROUP = 4;\r\nvar MONTH_NAME_GROUP = 5;\r\nvar YEAR_GROUP = 6;\r\nvar YEAR_BE_GROUP = 7;\r\n\r\nexports.Parser = function FRMonthNameLittleEndianParser(){\r\n Parser.apply(this, arguments);\r\n\r\n this.pattern = function() { return PATTERN; }\r\n\r\n this.extract = function(text, ref, match, opt){\r\n\r\n var result = new ParsedResult({\r\n text: match[0].substr(match[1].length, match[0].length - match[1].length),\r\n index: match.index + match[1].length,\r\n ref: ref,\r\n });\r\n\r\n var month = match[MONTH_NAME_GROUP];\r\n month = util.MONTH_OFFSET[month.toLowerCase()];\r\n\r\n var day = match[DATE_GROUP];\r\n day = parseInt(day);\r\n\r\n var year = null;\r\n if (match[YEAR_GROUP]) {\r\n year = match[YEAR_GROUP];\r\n year = parseInt(year);\r\n\r\n if(match[YEAR_BE_GROUP]){\r\n if (/a/i.test(match[YEAR_BE_GROUP])) {\r\n // Ante Christe natum\r\n year = -year;\r\n }\r\n } else if (year < 100){\r\n\r\n year = year + 2000;\r\n }\r\n }\r\n\r\n if(year){\r\n result.start.assign('day', day);\r\n result.start.assign('month', month);\r\n result.start.assign('year', year);\r\n } else {\r\n\r\n // Find the most appropriated year\r\n var refMoment = moment(ref);\r\n refMoment.month(month - 1);\r\n refMoment.date(day);\r\n refMoment.year(moment(ref).year());\r\n\r\n var nextYear = refMoment.clone().add(1, 'y');\r\n var lastYear = refMoment.clone().add(-1, 'y');\r\n if( Math.abs(nextYear.diff(moment(ref))) < Math.abs(refMoment.diff(moment(ref))) ){\r\n refMoment = nextYear;\r\n }\r\n else if( Math.abs(lastYear.diff(moment(ref))) < Math.abs(refMoment.diff(moment(ref))) ){\r\n refMoment = lastYear;\r\n }\r\n\r\n result.start.assign('day', day);\r\n result.start.assign('month', month);\r\n result.start.imply('year', refMoment.year());\r\n }\r\n\r\n // Weekday component\r\n if (match[WEEKDAY_GROUP]) {\r\n var weekday = match[WEEKDAY_GROUP];\r\n weekday = util.WEEKDAY_OFFSET[weekday.toLowerCase()]\r\n result.start.assign('weekday', weekday);\r\n }\r\n\r\n // Text can be 'range' value. Such as '12 - 13 janvier 2012'\r\n if (match[DATE_TO_GROUP]) {\r\n result.end = result.start.clone();\r\n result.end.assign('day', parseInt(match[DATE_TO_GROUP]));\r\n }\r\n\r\n result.tags['FRMonthNameLittleEndianParser'] = true;\r\n return result;\r\n };\r\n}\r\n","/*\r\n Date format with slash \"/\" (also \"-\" and \".\") between numbers\r\n - Martes 3/11/2015\r\n - 3/11/2015\r\n - 3/11\r\n*/\r\nvar moment = require('moment');\r\nvar Parser = require('../parser').Parser;\r\nvar ParsedResult = require('../../result').ParsedResult;\r\n\r\nvar PATTERN = new RegExp('(\\\\W|^)' +\r\n '(?:' +\r\n '((?:dimanche|dim|lundi|lun|mardi|mar|mercredi|mer|jeudi|jeu|vendredi|ven|samedi|sam|le))' +\r\n '\\\\s*\\\\,?\\\\s*' +\r\n ')?' +\r\n '([0-3]{0,1}[0-9]{1})[\\\\/\\\\.\\\\-]([0-3]{0,1}[0-9]{1})' +\r\n '(?:' +\r\n '[\\\\/\\\\.\\\\-]' +\r\n '([0-9]{4}\\s*\\,?\\s*|[0-9]{2}\\s*\\,?\\s*)' +\r\n ')?' +\r\n '(\\\\W|$)', 'i');\r\n\r\nvar DAYS_OFFSET = { 'dimanche': 0, 'dim': 0, 'lundi': 1, 'lun': 1,'mardi': 2, 'mar':2, 'mercredi': 3, 'mer': 3,\r\n 'jeudi': 4, 'jeu':4, 'vendredi': 5, 'ven': 5,'samedi': 6, 'sam': 6};\r\n\r\n\r\nvar OPENNING_GROUP = 1;\r\nvar ENDING_GROUP = 6;\r\n\r\n// In French we use day/month/year\r\nvar WEEKDAY_GROUP = 2;\r\nvar DAY_GROUP = 3;\r\nvar MONTH_GROUP = 4;\r\nvar YEAR_GROUP = 5;\r\n\r\nexports.Parser = function FRSlashDateFormatParser(argument) {\r\n Parser.apply(this, arguments);\r\n\r\n this.pattern = function () { return PATTERN; };\r\n this.extract = function(text, ref, match, opt){\r\n\r\n if(match[OPENNING_GROUP] == '/' || match[ENDING_GROUP] == '/') {\r\n // Long skip, if there is some overlapping like:\r\n // XX[/YY/ZZ]\r\n // [XX/YY/]ZZ\r\n match.index += match[0].length\r\n return;\r\n }\r\n\r\n var index = match.index + match[OPENNING_GROUP].length;\r\n var text = match[0].substr(match[OPENNING_GROUP].length, match[0].length - match[ENDING_GROUP].length);\r\n\r\n\r\n var result = new ParsedResult({\r\n text: text,\r\n index: index,\r\n ref: ref,\r\n });\r\n\r\n if(text.match(/^\\d\\.\\d$/)) return;\r\n if(text.match(/^\\d\\.\\d{1,2}\\.\\d{1,2}$/)) return;\r\n\r\n // MM/dd -> OK\r\n // MM.dd -> NG\r\n if(!match[YEAR_GROUP] && match[0].indexOf('/') < 0) return;\r\n\r\n var date = null;\r\n var year = match[YEAR_GROUP] || moment(ref).year() + '';\r\n var month = match[MONTH_GROUP];\r\n var day = match[DAY_GROUP];\r\n\r\n day = parseInt(day);\r\n month = parseInt(month);\r\n year = parseInt(year);\r\n\r\n if(month < 1 || month > 12) {\r\n if(month > 12) {\r\n // dd/mm/yyyy date format if day looks like a month, and month looks like a day.\r\n if (day >= 1 && day <= 12 && month >= 13 && month <= 31) {\r\n // unambiguous\r\n var tday = month;\r\n month = day;\r\n day = tday;\r\n }\r\n else {\r\n // both month and day are <= 12\r\n return null;\r\n }\r\n }\r\n }\r\n if(day < 1 || day > 31) return null;\r\n\r\n if(year < 100){\r\n if(year > 50){\r\n year = year + 1900;\r\n }else{\r\n year = year + 2000;\r\n }\r\n }\r\n\r\n result.start.assign('day', day);\r\n result.start.assign('month', month);\r\n result.start.assign('year', year);\r\n\r\n // Day of week\r\n if(match[WEEKDAY_GROUP]) {\r\n result.start.assign('weekday', DAYS_OFFSET[match[WEEKDAY_GROUP].toLowerCase()]);\r\n }\r\n\r\n result.tags['FRSlashDateFormatParser'] = true;\r\n return result;\r\n };\r\n};","/*\r\n\r\n\r\n*/\r\n\r\nvar moment = require('moment');\r\nvar Parser = require('../parser').Parser;\r\nvar ParsedResult = require('../../result').ParsedResult;\r\n\r\nvar PATTERN = /(\\W|^)il y a\\s*([0-9]+|une?)\\s*(minutes?|heures?|semaines?|jours?|mois|années?|ans?)(?=(?:\\W|$))/i;\r\n\r\nexports.Parser = function FRTimeAgoFormatParser(){\r\n Parser.apply(this, arguments);\r\n\r\n this.pattern = function() {\r\n return PATTERN;\r\n }\r\n\r\n this.extract = function(text, ref, match, opt){\r\n\r\n if (match.index > 0 && text[match.index-1].match(/\\w/)) return null;\r\n\r\n var text = match[0];\r\n text = match[0].substr(match[1].length, match[0].length - match[1].length);\r\n index = match.index + match[1].length;\r\n\r\n var result = new ParsedResult({\r\n index: index,\r\n text: text,\r\n ref: ref,\r\n });\r\n result.tags['FRTimeAgoFormatParser'] = true;\r\n \r\n var num = parseInt(match[2]);\r\n if (isNaN(num)) {\r\n if (match[2].match(/demi/)) {\r\n num = 0.5;\r\n } else {\r\n num = 1;\r\n }\r\n }\r\n\r\n var date = moment(ref);\r\n\r\n if (match[3].match(/heure/) || match[3].match(/minute/)) {\r\n if (match[3].match(/heure/)) {\r\n\r\n date.add(-num, 'hour');\r\n\r\n } else if (match[3].match(/minute/)) {\r\n\r\n date.add(-num, 'minute');\r\n }\r\n\r\n result.start.imply('day', date.date());\r\n result.start.imply('month', date.month() + 1);\r\n result.start.imply('year', date.year());\r\n result.start.assign('hour', date.hour());\r\n result.start.assign('minute', date.minute());\r\n\r\n return result;\r\n }\r\n\r\n if (match[3].match(/semaine/)) {\r\n date.add(-num, 'week');\r\n\r\n result.start.imply('day', date.date());\r\n result.start.imply('month', date.month() + 1);\r\n result.start.imply('year', date.year());\r\n result.start.imply('weekday', date.day());\r\n return result;\r\n }\r\n\r\n if (match[3].match(/jour/)) {\r\n date.add(-num, 'd');\r\n }\r\n\r\n if (match[3].match(/mois/)) {\r\n date.add(-num, 'month');\r\n }\r\n\r\n if (match[3].match(/années?|ans?/)) {\r\n\r\n date.add(-num, 'year');\r\n }\r\n\r\n result.start.assign('day', date.date());\r\n result.start.assign('month', date.month() + 1);\r\n result.start.assign('year', date.year());\r\n return result;\r\n\r\n };\r\n}\r\n","/*\r\n\r\n\r\n*/\r\n\r\nvar moment = require('moment');\r\nvar Parser = require('../parser').Parser;\r\nvar ParsedResult = require('../../result').ParsedResult;\r\nvar ParsedComponents = require('../../result').ParsedComponents;\r\n\r\nvar FIRST_REG_PATTERN = new RegExp(\"(^|\\\\s|T)\" +\r\n \"(?:(?:[àa])\\\\s*)?\" +\r\n \"(\\\\d{1,2}(?:h)?|midi|minuit)\" +\r\n \"(?:\" +\r\n \"(?:\\\\.|\\\\:|\\\\:|h)(\\\\d{1,2})(?:m)?\" +\r\n \"(?:\" +\r\n \"(?:\\\\:|\\\\:|m)(\\\\d{0,2})(?:s)?\" +\r\n \")?\" +\r\n \")?\" +\r\n \"(?:\\\\s*(A\\\\.M\\\\.|P\\\\.M\\\\.|AM?|PM?))?\" +\r\n \"(?=\\\\W|$)\", 'i');\r\n\r\n\r\nvar SECOND_REG_PATTERN = new RegExp(\"^\\\\s*\" +\r\n \"(\\\\-|\\\\–|\\\\~|\\\\〜|[àa]|\\\\?)\\\\s*\" +\r\n \"(\\\\d{1,2}(?:h)?)\" +\r\n \"(?:\" +\r\n \"(?:\\\\.|\\\\:|\\\\:|h)(\\\\d{1,2})(?:m)?\" +\r\n \"(?:\" +\r\n \"(?:\\\\.|\\\\:|\\\\:|m)(\\\\d{1,2})(?:s)?\" +\r\n \")?\" +\r\n \")?\" +\r\n \"(?:\\\\s*(A\\\\.M\\\\.|P\\\\.M\\\\.|AM?|PM?))?\" +\r\n \"(?=\\\\W|$)\", 'i');\r\n\r\nvar HOUR_GROUP = 2;\r\nvar MINUTE_GROUP = 3;\r\nvar SECOND_GROUP = 4;\r\nvar AM_PM_HOUR_GROUP = 5;\r\n\r\nexports.Parser = function FRTimeExpressionParser(){\r\n Parser.apply(this, arguments);\r\n\r\n this.pattern = function() { return FIRST_REG_PATTERN; }\r\n\r\n this.extract = function(text, ref, match, opt){\r\n\r\n // This pattern can be overlaped Ex. [12] AM, 1[2] AM\r\n if (match.index > 0 && text[match.index-1].match(/\\w/)) return null;\r\n var refMoment = moment(ref);\r\n var result = new ParsedResult();\r\n result.ref = ref;\r\n result.index = match.index + match[1].length;\r\n result.text = match[0].substring(match[1].length);\r\n result.tags['FRTimeExpressionParser'] = true;\r\n\r\n result.start.imply('day', refMoment.date());\r\n result.start.imply('month', refMoment.month()+1);\r\n result.start.imply('year', refMoment.year());\r\n\r\n var hour = 0;\r\n var minute = 0;\r\n var meridiem = -1;\r\n\r\n // ----- Second\r\n if(match[SECOND_GROUP] != null){\r\n var second = parseInt(match[SECOND_GROUP]);\r\n if(second >= 60) return null;\r\n\r\n result.start.assign('second', second);\r\n }\r\n\r\n // ----- Hours\r\n if (match[HOUR_GROUP].toLowerCase() == \"midi\"){\r\n meridiem = 1;\r\n hour = 12;\r\n } else if (match[HOUR_GROUP].toLowerCase() == \"minuit\") {\r\n meridiem = 0;\r\n hour = 0;\r\n } else {\r\n hour = parseInt(match[HOUR_GROUP]);\r\n }\r\n\r\n // ----- Minutes\r\n if(match[MINUTE_GROUP] != null){\r\n minute = parseInt(match[MINUTE_GROUP]);\r\n } else if(hour > 100) {\r\n minute = hour%100;\r\n hour = parseInt(hour/100);\r\n }\r\n\r\n if(minute >= 60) {\r\n return null;\r\n }\r\n\r\n if(hour > 24) {\r\n return null;\r\n }\r\n if (hour >= 12) {\r\n meridiem = 1;\r\n }\r\n\r\n // ----- AM & PM\r\n if(match[AM_PM_HOUR_GROUP] != null) {\r\n if(hour > 12) return null;\r\n var ampm = match[AM_PM_HOUR_GROUP][0].toLowerCase();\r\n if(ampm == \"a\"){\r\n meridiem = 0;\r\n if(hour == 12) hour = 0;\r\n }\r\n\r\n if(ampm == \"p\"){\r\n meridiem = 1;\r\n if(hour != 12) hour += 12;\r\n }\r\n }\r\n result.start.assign('hour', hour);\r\n result.start.assign('minute', minute);\r\n if (meridiem >= 0) {\r\n result.start.assign('meridiem', meridiem);\r\n }\r\n\r\n // ==============================================================\r\n // Extracting the 'to' chunk\r\n // ==============================================================\r\n match = SECOND_REG_PATTERN.exec(text.substring(result.index + result.text.length));\r\n if (!match) {\r\n // Not accept number only result\r\n if (result.text.match(/^\\d+$/)) {\r\n return null;\r\n }\r\n return result;\r\n }\r\n\r\n\r\n\r\n // Pattern \"YY.YY -XXXX\" is more like timezone offset\r\n if (match[0].match(/^\\s*(\\+|\\-)\\s*\\d{3,4}$/)) {\r\n return result;\r\n }\r\n\r\n if(result.end == null){\r\n result.end = new ParsedComponents(null, result.start.date());\r\n }\r\n\r\n var hour = 0;\r\n var minute = 0;\r\n var meridiem = -1;\r\n\r\n // ----- Second\r\n if(match[SECOND_GROUP] != null){\r\n var second = parseInt(match[SECOND_GROUP]);\r\n if(second >= 60) return null;\r\n\r\n result.end.assign('second', second);\r\n }\r\n\r\n hour = parseInt(match[2]);\r\n\r\n // ----- Minute\r\n if (match[MINUTE_GROUP]!= null) {\r\n\r\n minute = parseInt(match[MINUTE_GROUP]);\r\n if(minute >= 60) return result;\r\n\r\n } else if (hour > 100) {\r\n\r\n minute = hour%100;\r\n hour = parseInt(hour/100);\r\n }\r\n\r\n if(minute >= 60) {\r\n return null;\r\n }\r\n\r\n if(hour > 24) {\r\n return null;\r\n }\r\n if (hour >= 12) {\r\n meridiem = 1;\r\n }\r\n\r\n // ----- AM & PM\r\n if (match[AM_PM_HOUR_GROUP] != null){\r\n\r\n if (hour > 12) return null;\r\n\r\n if(match[AM_PM_HOUR_GROUP][0].toLowerCase() == \"a\"){\r\n meridiem = 0;\r\n if(hour == 12) {\r\n hour = 0;\r\n if (!result.end.isCertain('day')) {\r\n result.end.imply('day', result.end.get('day') + 1);\r\n }\r\n }\r\n }\r\n\r\n if(match[AM_PM_HOUR_GROUP][0].toLowerCase() == \"p\"){\r\n meridiem = 1;\r\n if(hour != 12) hour += 12;\r\n }\r\n\r\n if (!result.start.isCertain('meridiem')) {\r\n if (meridiem == 0) {\r\n\r\n result.start.imply('meridiem', 0);\r\n\r\n if (result.start.get('hour') == 12) {\r\n result.start.assign('hour', 0);\r\n }\r\n\r\n } else {\r\n\r\n result.start.imply('meridiem', 1);\r\n\r\n if (result.start.get('hour') != 12) {\r\n result.start.assign('hour', result.start.get('hour') + 12);\r\n }\r\n }\r\n }\r\n\r\n } else if(hour >= 12) {\r\n meridiem = 1;\r\n }\r\n\r\n result.text = result.text + match[0];\r\n result.end.assign('hour', hour);\r\n result.end.assign('minute', minute);\r\n if (meridiem >= 0) {\r\n result.end.assign('meridiem', meridiem);\r\n }\r\n\r\n if (result.end.date().getTime() < result.start.date().getTime()) {\r\n result.end.imply('day', result.end.get('day') + 1)\r\n }\r\n\r\n return result;\r\n }\r\n}\r\n","/*\r\n\r\n\r\n*/\r\nvar moment = require('moment');\r\nvar Parser = require('../parser').Parser;\r\nvar ParsedResult = require('../../result').ParsedResult;\r\nvar updateParsedComponent = require('../EN/ENWeekdayParser').updateParsedComponent;\r\n\r\nvar DAYS_OFFSET = { 'dimanche': 0, 'dim': 0, 'lundi': 1, 'lun': 1,'mardi': 2, 'mar':2, 'mercredi': 3, 'mer': 3,\r\n 'jeudi': 4, 'jeu':4, 'vendredi': 5, 'ven': 5,'samedi': 6, 'sam': 6};\r\n\r\nvar PATTERN = new RegExp('(\\\\s|^)' +\r\n '(?:(?:\\\\,|\\\\(|\\\\()\\\\s*)?' +\r\n '(?:(ce)\\\\s*)?' +\r\n '(' + Object.keys(DAYS_OFFSET).join('|') + ')' +\r\n '(?:\\\\s*(?:\\\\,|\\\\)|\\\\)))?' +\r\n '(?:\\\\s*(dernier|prochain)\\\\s*)?' +\r\n '(?=\\\\W|$)', 'i');\r\n\r\nvar PREFIX_GROUP = 2;\r\nvar WEEKDAY_GROUP = 3;\r\nvar POSTFIX_GROUP = 4;\r\n\r\nexports.Parser = function FRWeekdayParser() {\r\n Parser.apply(this, arguments);\r\n\r\n this.pattern = function() { return PATTERN; };\r\n\r\n this.extract = function(text, ref, match, opt){\r\n var index = match.index + match[1].length;\r\n var text = match[0].substr(match[1].length, match[0].length - match[1].length);\r\n var result = new ParsedResult({\r\n index: index,\r\n text: text,\r\n ref: ref\r\n });\r\n\r\n var dayOfWeek = match[WEEKDAY_GROUP].toLowerCase();\r\n var offset = DAYS_OFFSET[dayOfWeek];\r\n if(offset === undefined) return null;\r\n\r\n var modifier = null;\r\n var prefix = match[PREFIX_GROUP];\r\n var postfix = match[POSTFIX_GROUP];\r\n if (prefix || postfix) {\r\n var norm = prefix || postfix;\r\n norm = norm.toLowerCase();\r\n\r\n if(norm == 'dernier') {\r\n modifier = 'last';\r\n } else if(norm == 'prochain') {\r\n modifier = 'next';\r\n } else if(norm== 'ce') {\r\n modifier = 'this';\r\n }\r\n }\r\n\r\n updateParsedComponent(result, ref, offset, modifier);\r\n result.tags['FRWeekdayParser'] = true;\r\n return result;\r\n }\r\n};\r\n\r\n","/*\n\n\n*/\n\nvar moment = require('moment');\nvar Parser = require('../parser').Parser;\nvar ParsedResult = require('../../result').ParsedResult;\n\nvar util = require('../../utils/ZH-Hant.js');\n\nvar PATTERN = new RegExp(\n '(\\\\d{2,4}|[' + Object.keys(util.NUMBER).join('') + ']{2,4})?' +\n '(?:\\\\s*)' +\n '(?:年)?' +\n '(?:[\\\\s|,|,]*)' +\n '(\\\\d{1,2}|[' + Object.keys(util.NUMBER).join('') + ']{1,2})' +\n '(?:\\\\s*)' +\n '(?:月)' +\n '(?:\\\\s*)' +\n '(\\\\d{1,2}|[' + Object.keys(util.NUMBER).join('') + ']{1,2})?' +\n '(?:\\\\s*)' +\n '(?:日|號)?'\n);\n\nvar YEAR_GROUP = 1;\nvar MONTH_GROUP = 2;\nvar DAY_GROUP = 3;\n\nexports.Parser = function ZHHantDateParser() {\n\n Parser.apply(this, arguments);\n\n this.pattern = function() {\n return PATTERN;\n };\n\n this.extract = function(text, ref, match, opt) {\n var startMoment = moment(ref);\n var result = new ParsedResult({\n text: match[0],\n index: match.index,\n ref: ref,\n });\n\n //Month\n var month = parseInt(match[MONTH_GROUP]);\n if (isNaN(month)) month = util.zhStringToNumber(match[MONTH_GROUP]);\n result.start.assign('month', month);\n\n //Day\n if (match[DAY_GROUP]) {\n var day = parseInt(match[DAY_GROUP]);\n if (isNaN(day)) day = util.zhStringToNumber(match[DAY_GROUP]);\n result.start.assign('day', day);\n } else {\n result.start.imply('day', startMoment.date());\n }\n\n //Year\n if (match[YEAR_GROUP]) {\n var year = parseInt(match[YEAR_GROUP]);\n if (isNaN(year)) year = util.zhStringToYear(match[YEAR_GROUP]);\n result.start.assign('year', year);\n } else {\n result.start.imply('year', startMoment.year());\n }\n\n result.tags.ZHHantDateParser = true;\n return result;\n };\n};\n","/*\n\n\n*/\n\nvar moment = require('moment');\nvar Parser = require('../parser').Parser;\nvar ParsedResult = require('../../result').ParsedResult;\nvar updateParsedComponent = require('../EN/ENWeekdayParser').updateParsedComponent;\n\nvar util = require('../../utils/ZH-Hant.js');\n\nvar PATTERN = new RegExp(\n '(上|今|下|這|呢)?' +\n '(?:個)?' +\n '(?:星期|禮拜)' +\n '(' + Object.keys(util.WEEKDAY_OFFSET).join('|') + ')'\n);\n\nvar PREFIX_GROUP = 1;\nvar WEEKDAY_GROUP = 2;\n\nexports.Parser = function ZHHantWeekdayParser() {\n\n Parser.apply(this, arguments);\n\n this.pattern = function() {\n return PATTERN;\n };\n\n this.extract = function(text, ref, match, opt) {\n var index = match.index;\n text = match[0];\n var result = new ParsedResult({\n index: index,\n text: text,\n ref: ref\n });\n\n var dayOfWeek = match[WEEKDAY_GROUP];\n var offset = util.WEEKDAY_OFFSET[dayOfWeek];\n if(offset === undefined) return null;\n\n var modifier = null;\n var prefix = match[PREFIX_GROUP];\n\n if(prefix == '上') {\n modifier = 'last';\n } else if(prefix == '下') {\n modifier = 'next';\n } else if(prefix == '今' || prefix == '這' || prefix == '呢') {\n modifier = 'this';\n }\n\n updateParsedComponent(result, ref, offset, modifier);\n result.tags['ZHHantWeekdayParser'] = true;\n return result;\n };\n};\n","/*\n\n\n*/\n\nvar moment = require('moment');\nvar Parser = require('../parser').Parser;\nvar ParsedResult = require('../../result').ParsedResult;\nvar ParsedComponents = require('../../result').ParsedComponents;\n\nvar util = require('../../utils/ZH-Hant.js');\n\nvar patternString1 = '(?:由|從|自)?' +\n '(?:' +\n '(今|明|聽|昨|尋|琴)(早|朝|晚)|' +\n '(上(?:午|晝)|朝(?:早)|早(?:上)|下(?:午|晝)|晏(?:晝)|晚(?:上)|夜(?:晚)?|中(?:午)|凌(?:晨))|' +\n '(今|明|聽|昨|尋|琴)(?:日|天)' +\n '(?:[\\\\s,,]*)' +\n '(?:(上(?:午|晝)|朝(?:早)|早(?:上)|下(?:午|晝)|晏(?:晝)|晚(?:上)|夜(?:晚)?|中(?:午)|凌(?:晨)))?' +\n ')?' +\n '(?:[\\\\s,,]*)' +\n '(?:(\\\\d+|[' + Object.keys(util.NUMBER).join('') + ']+)(?:\\\\s*)(?:點|時|:|:)' +\n '(?:\\\\s*)' +\n '(\\\\d+|半|正|整|[' + Object.keys(util.NUMBER).join('') + ']+)?(?:\\\\s*)(?:分|:|:)?' +\n '(?:\\\\s*)' +\n '(\\\\d+|[' + Object.keys(util.NUMBER).join('') + ']+)?(?:\\\\s*)(?:秒)?)' +\n '(?:\\\\s*(A\\.M\\.|P\\.M\\.|AM?|PM?))?';\n\nvar patternString2 = '(?:\\\\s*(?:到|至|\\\\-|\\\\–|\\\\~|\\\\〜)\\\\s*)' +\n '(?:' +\n '(今|明|聽|昨|尋|琴)(早|朝|晚)|' +\n '(上(?:午|晝)|朝(?:早)|早(?:上)|下(?:午|晝)|晏(?:晝)|晚(?:上)|夜(?:晚)?|中(?:午)|凌(?:晨))|' +\n '(今|明|聽|昨|尋|琴)(?:日|天)' +\n '(?:[\\\\s,,]*)' +\n '(?:(上(?:午|晝)|朝(?:早)|早(?:上)|下(?:午|晝)|晏(?:晝)|晚(?:上)|夜(?:晚)?|中(?:午)|凌(?:晨)))?' +\n ')?' +\n '(?:[\\\\s,,]*)' +\n '(?:(\\\\d+|[' + Object.keys(util.NUMBER).join('') + ']+)(?:\\\\s*)(?:點|時|:|:)' +\n '(?:\\\\s*)' +\n '(\\\\d+|半|正|整|[' + Object.keys(util.NUMBER).join('') + ']+)?(?:\\\\s*)(?:分|:|:)?' +\n '(?:\\\\s*)' +\n '(\\\\d+|[' + Object.keys(util.NUMBER).join('') + ']+)?(?:\\\\s*)(?:秒)?)' +\n '(?:\\\\s*(A\\.M\\.|P\\.M\\.|AM?|PM?))?';\n\nvar FIRST_REG_PATTERN = new RegExp(patternString1, 'i');\nvar SECOND_REG_PATTERN = new RegExp(patternString2, 'i');\n\nvar DAY_GROUP_1 = 1;\nvar ZH_AM_PM_HOUR_GROUP_1 = 2;\nvar ZH_AM_PM_HOUR_GROUP_2 = 3;\nvar DAY_GROUP_3 = 4;\nvar ZH_AM_PM_HOUR_GROUP_3 = 5;\nvar HOUR_GROUP = 6;\nvar MINUTE_GROUP = 7;\nvar SECOND_GROUP = 8;\nvar AM_PM_HOUR_GROUP = 9;\n\nexports.Parser = function ZHHantTimeExpressionParser() {\n\n Parser.apply(this, arguments);\n\n this.pattern = function() {\n return FIRST_REG_PATTERN;\n };\n\n this.extract = function(text, ref, match, opt) {\n\n // This pattern can be overlaped Ex. [12] AM, 1[2] AM\n if (match.index > 0 && text[match.index - 1].match(/\\w/)) return null;\n var refMoment = moment(ref);\n var result = new ParsedResult();\n result.ref = ref;\n result.index = match.index;\n result.text = match[0];\n result.tags.ZHTimeExpressionParser = true;\n\n var startMoment = refMoment.clone();\n\n // ----- Day\n if (match[DAY_GROUP_1]) {\n var day1 = match[DAY_GROUP_1];\n if (day1 == '明' || day1 == '聽') {\n // Check not \"Tomorrow\" on late night\n if(refMoment.hour() > 1) {\n startMoment.add(1, 'day');\n }\n } else if (day1 == '昨' || day1 == '尋' || day1 == '琴') {\n startMoment.add(-1, 'day');\n }\n result.start.assign('day', startMoment.date());\n result.start.assign('month', startMoment.month() + 1);\n result.start.assign('year', startMoment.year());\n } else if (match[DAY_GROUP_3]) {\n var day3 = match[DAY_GROUP_3];\n if (day3 == '明' || day3 == '聽') {\n startMoment.add(1, 'day');\n } else if (day3 == '昨' || day3 == '尋' || day3 == '琴') {\n startMoment.add(-1, 'day');\n }\n result.start.assign('day', startMoment.date());\n result.start.assign('month', startMoment.month() + 1);\n result.start.assign('year', startMoment.year());\n } else {\n result.start.imply('day', startMoment.date());\n result.start.imply('month', startMoment.month() + 1);\n result.start.imply('year', startMoment.year());\n }\n\n var hour = 0;\n var minute = 0;\n var meridiem = -1;\n\n // ----- Second\n if (match[SECOND_GROUP]) {\n var second = parseInt(match[SECOND_GROUP]);\n if (isNaN(second)) {\n second = util.zhStringToNumber(match[SECOND_GROUP]);\n }\n if (second >= 60) return null;\n result.start.assign('second', second);\n }\n\n hour = parseInt(match[HOUR_GROUP]);\n if (isNaN(hour)) {\n hour = util.zhStringToNumber(match[HOUR_GROUP]);\n }\n\n // ----- Minutes\n if (match[MINUTE_GROUP]) {\n if (match[MINUTE_GROUP] == '半') {\n minute = 30;\n } else if (match[MINUTE_GROUP] == '正' || match[MINUTE_GROUP] == '整') {\n minute = 0;\n } else {\n minute = parseInt(match[MINUTE_GROUP]);\n if (isNaN(minute)) {\n minute = util.zhStringToNumber(match[MINUTE_GROUP]);\n }\n }\n } else if (hour > 100) {\n minute = hour % 100;\n hour = parseInt(hour / 100);\n }\n\n if (minute >= 60) {\n return null;\n }\n\n if (hour > 24) {\n return null;\n }\n if (hour >= 12) {\n meridiem = 1;\n }\n\n // ----- AM & PM\n if (match[AM_PM_HOUR_GROUP]) {\n if (hour > 12) return null;\n var ampm = match[AM_PM_HOUR_GROUP][0].toLowerCase();\n if (ampm == \"a\") {\n meridiem = 0;\n if (hour == 12) hour = 0;\n }\n\n if (ampm == \"p\") {\n meridiem = 1;\n if (hour != 12) hour += 12;\n }\n } else if (match[ZH_AM_PM_HOUR_GROUP_1]) {\n var zhAMPMString1 = match[ZH_AM_PM_HOUR_GROUP_1];\n var zhAMPM1 = zhAMPMString1[0];\n if (zhAMPM1 == '朝' || zhAMPM1 == '早') {\n meridiem = 0;\n if (hour == 12) hour = 0;\n } else if (zhAMPM1 == '晚') {\n meridiem = 1;\n if (hour != 12) hour += 12;\n }\n } else if (match[ZH_AM_PM_HOUR_GROUP_2]) {\n var zhAMPMString2 = match[ZH_AM_PM_HOUR_GROUP_2];\n var zhAMPM2 = zhAMPMString2[0];\n if (zhAMPM2 == '上' || zhAMPM2 == '朝' || zhAMPM2 == '早' || zhAMPM2 == '凌') {\n meridiem = 0;\n if (hour == 12) hour = 0;\n } else if (zhAMPM2 == '下' || zhAMPM2 == '晏' || zhAMPM2 == '晚') {\n meridiem = 1;\n if (hour != 12) hour += 12;\n }\n } else if (match[ZH_AM_PM_HOUR_GROUP_3]) {\n var zhAMPMString3 = match[ZH_AM_PM_HOUR_GROUP_3];\n var zhAMPM3 = zhAMPMString3[0];\n if (zhAMPM3 == '上' || zhAMPM3 == '朝' || zhAMPM3 == '早' || zhAMPM3 == '凌') {\n meridiem = 0;\n if (hour == 12) hour = 0;\n } else if (zhAMPM3 == '下' || zhAMPM3 == '晏' || zhAMPM3 == '晚') {\n meridiem = 1;\n if (hour != 12) hour += 12;\n }\n }\n\n result.start.assign('hour', hour);\n result.start.assign('minute', minute);\n\n if (meridiem >= 0) {\n result.start.assign('meridiem', meridiem);\n } else {\n if (hour < 12) {\n result.start.imply('meridiem', 0);\n } else {\n result.start.imply('meridiem', 1);\n }\n }\n\n // ==============================================================\n // Extracting the 'to' chunk\n // ==============================================================\n\n match = SECOND_REG_PATTERN.exec(text.substring(result.index + result.text.length));\n if (!match) {\n // Not accept number only result\n if (result.text.match(/^\\d+$/)) {\n return null;\n }\n return result;\n }\n\n var endMoment = startMoment.clone();\n result.end = new ParsedComponents(null, null);\n\n // ----- Day\n if (match[DAY_GROUP_1]) {\n var day1 = match[DAY_GROUP_1];\n if (day1 == '明' || day1 == '聽') {\n // Check not \"Tomorrow\" on late night\n if(refMoment.hour() > 1) {\n endMoment.add(1, 'day');\n }\n } else if (day1 == '昨' || day1 == '尋' || day1 == '琴') {\n endMoment.add(-1, 'day');\n }\n result.end.assign('day', endMoment.date());\n result.end.assign('month', endMoment.month() + 1);\n result.end.assign('year', endMoment.year());\n } else if (match[DAY_GROUP_3]) {\n var day3 = match[DAY_GROUP_3];\n if (day3 == '明' || day3 == '聽') {\n endMoment.add(1, 'day');\n } else if (day3 == '昨' || day3 == '尋' || day3 == '琴') {\n endMoment.add(-1, 'day');\n }\n result.end.assign('day', endMoment.date());\n result.end.assign('month', endMoment.month() + 1);\n result.end.assign('year', endMoment.year());\n } else {\n result.end.imply('day', endMoment.date());\n result.end.imply('month', endMoment.month() + 1);\n result.end.imply('year', endMoment.year());\n }\n\n hour = 0;\n minute = 0;\n meridiem = -1;\n\n // ----- Second\n if (match[SECOND_GROUP]) {\n var second = parseInt(match[SECOND_GROUP]);\n if (isNaN(second)) {\n second = util.zhStringToNumber(match[SECOND_GROUP]);\n }\n\n if (second >= 60) return null;\n result.end.assign('second', second);\n }\n\n hour = parseInt(match[HOUR_GROUP]);\n if (isNaN(hour)) {\n hour = util.zhStringToNumber(match[HOUR_GROUP]);\n }\n\n // ----- Minutes\n if (match[MINUTE_GROUP]) {\n if (match[MINUTE_GROUP] == '半') {\n minute = 30;\n } else if (match[MINUTE_GROUP] == '正' || match[MINUTE_GROUP] == '整') {\n minute = 0;\n } else {\n minute = parseInt(match[MINUTE_GROUP]);\n if (isNaN(minute)) {\n minute = util.zhStringToNumber(match[MINUTE_GROUP]);\n }\n }\n } else if (hour > 100) {\n minute = hour % 100;\n hour = parseInt(hour / 100);\n }\n\n if (minute >= 60) {\n return null;\n }\n\n if (hour > 24) {\n return null;\n }\n if (hour >= 12) {\n meridiem = 1;\n }\n\n // ----- AM & PM\n if (match[AM_PM_HOUR_GROUP]) {\n if (hour > 12) return null;\n var ampm = match[AM_PM_HOUR_GROUP][0].toLowerCase();\n if (ampm == \"a\") {\n meridiem = 0;\n if (hour == 12) hour = 0;\n }\n\n if (ampm == \"p\") {\n meridiem = 1;\n if (hour != 12) hour += 12;\n }\n\n if (!result.start.isCertain('meridiem')) {\n if (meridiem == 0) {\n\n result.start.imply('meridiem', 0);\n\n if (result.start.get('hour') == 12) {\n result.start.assign('hour', 0);\n }\n\n } else {\n\n result.start.imply('meridiem', 1);\n\n if (result.start.get('hour') != 12) {\n result.start.assign('hour', result.start.get('hour') + 12);\n }\n }\n }\n\n } else if (match[ZH_AM_PM_HOUR_GROUP_1]) {\n var zhAMPMString1 = match[ZH_AM_PM_HOUR_GROUP_1];\n var zhAMPM1 = zhAMPMString1[0];\n if (zhAMPM1 == '朝' || zhAMPM1 == '早') {\n meridiem = 0;\n if (hour == 12) hour = 0;\n } else if (zhAMPM1 == '晚') {\n meridiem = 1;\n if (hour != 12) hour += 12;\n }\n } else if (match[ZH_AM_PM_HOUR_GROUP_2]) {\n var zhAMPMString2 = match[ZH_AM_PM_HOUR_GROUP_2];\n var zhAMPM2 = zhAMPMString2[0];\n if (zhAMPM2 == '上' || zhAMPM2 == '朝' || zhAMPM2 == '早' || zhAMPM2 == '凌') {\n meridiem = 0;\n if (hour == 12) hour = 0;\n } else if (zhAMPM2 == '下' || zhAMPM2 == '晏' || zhAMPM2 == '晚') {\n meridiem = 1;\n if (hour != 12) hour += 12;\n }\n } else if (match[ZH_AM_PM_HOUR_GROUP_3]) {\n var zhAMPMString3 = match[ZH_AM_PM_HOUR_GROUP_3];\n var zhAMPM3 = zhAMPMString3[0];\n if (zhAMPM3 == '上' || zhAMPM3 == '朝' || zhAMPM3 == '早' || zhAMPM3 == '凌') {\n meridiem = 0;\n if (hour == 12) hour = 0;\n } else if (zhAMPM3 == '下' || zhAMPM3 == '晏' || zhAMPM3 == '晚') {\n meridiem = 1;\n if (hour != 12) hour += 12;\n }\n }\n\n result.text = result.text + match[0];\n result.end.assign('hour', hour);\n result.end.assign('minute', minute);\n if (meridiem >= 0) {\n result.end.assign('meridiem', meridiem);\n } else {\n var startAtPM = result.start.isCertain('meridiem') && result.start.get('meridiem') == 1;\n if (startAtPM && result.start.get('hour') > hour) {\n // 10pm - 1 (am)\n result.end.imply('meridiem', 0);\n\n } else if (hour > 12) {\n result.end.imply('meridiem', 1);\n }\n }\n\n if (result.end.date().getTime() < result.start.date().getTime()) {\n result.end.imply('day', result.end.get('day') + 1)\n }\n\n return result;\n };\n};\n","/*\n\n\n*/\n\nvar moment = require('moment');\nvar Parser = require('../parser').Parser;\nvar ParsedResult = require('../../result').ParsedResult;\n\nvar PATTERN = new RegExp(\n '(而家|立(?:刻|即)|即刻)|' +\n '(今|明|聽|昨|尋|琴)(早|朝|晚)|' +\n '(上(?:午|晝)|朝(?:早)|早(?:上)|下(?:午|晝)|晏(?:晝)|晚(?:上)|夜(?:晚)?|中(?:午)|凌(?:晨))|' +\n '(今|明|聽|昨|尋|琴)(?:日|天)' +\n '(?:[\\\\s|,|,]*)' +\n '(?:(上(?:午|晝)|朝(?:早)|早(?:上)|下(?:午|晝)|晏(?:晝)|晚(?:上)|夜(?:晚)?|中(?:午)|凌(?:晨)))?', 'i');\n\nvar NOW_GROUP = 1;\nvar DAY_GROUP_1 = 2;\nvar TIME_GROUP_1 = 3;\nvar TIME_GROUP_2 = 4;\nvar DAY_GROUP_3 = 5;\nvar TIME_GROUP_3 = 6;\n\nexports.Parser = function ZHHantCasualDateParser() {\n\n Parser.apply(this, arguments);\n\n this.pattern = function() {\n return PATTERN;\n };\n\n this.extract = function(text, ref, match, opt) {\n text = match[0];\n var index = match.index;\n var result = new ParsedResult({\n index: index,\n text: text,\n ref: ref,\n });\n\n var refMoment = moment(ref);\n var startMoment = refMoment.clone();\n\n if (match[NOW_GROUP]) {\n result.start.imply('hour', refMoment.hour());\n result.start.imply('minute', refMoment.minute());\n result.start.imply('second', refMoment.second());\n result.start.imply('millisecond', refMoment.millisecond());\n } else if (match[DAY_GROUP_1]) {\n var day1 = match[DAY_GROUP_1];\n var time1 = match[TIME_GROUP_1];\n\n if (day1 == '明' || day1 == '聽') {\n // Check not \"Tomorrow\" on late night\n if(refMoment.hour() > 1) {\n startMoment.add(1, 'day');\n }\n } else if (day1 == '昨' || day1 == '尋' || day1 == '琴') {\n startMoment.add(-1, 'day');\n }\n\n if (time1 == '早' || time1 == '朝') {\n result.start.imply('hour', 6);\n } else if (time1 == '晚') {\n result.start.imply('hour', 22);\n result.start.imply('meridiem', 1);\n }\n\n } else if (match[TIME_GROUP_2]) {\n var timeString2 = match[TIME_GROUP_2];\n var time2 = timeString2[0];\n if (time2 == '早' || time2 == '朝' || time2 == '上') {\n result.start.imply('hour', 6);\n } else if (time2 == '下' || time2 == '晏') {\n result.start.imply('hour', 15);\n result.start.imply('meridiem', 1);\n } else if (time2 == '中') {\n result.start.imply('hour', 12);\n result.start.imply('meridiem', 1);\n } else if (time2 == '夜' || time2 == '晚') {\n result.start.imply('hour', 22);\n result.start.imply('meridiem', 1);\n } else if (time2 == '凌') {\n result.start.imply('hour', 0);\n }\n\n } else if (match[DAY_GROUP_3]) {\n var day3 = match[DAY_GROUP_3];\n\n if (day3 == '明' || day3 == '聽') {\n // Check not \"Tomorrow\" on late night\n if(refMoment.hour() > 1) {\n startMoment.add(1, 'day');\n }\n } else if (day3 == '昨' || day3 == '尋' || day3 == '琴') {\n startMoment.add(-1, 'day');\n }\n\n\n var timeString3 = match[TIME_GROUP_3];\n if (timeString3) {\n var time3 = timeString3[0];\n if (time3 == '早' || time3 == '朝' || time3 == '上') {\n result.start.imply('hour', 6);\n } else if (time3 == '下' || time3 == '晏') {\n result.start.imply('hour', 15);\n result.start.imply('meridiem', 1);\n } else if (time3 == '中') {\n result.start.imply('hour', 12);\n result.start.imply('meridiem', 1);\n } else if (time3 == '夜' || time3 == '晚') {\n result.start.imply('hour', 22);\n result.start.imply('meridiem', 1);\n } else if (time3 == '凌') {\n result.start.imply('hour', 0);\n }\n }\n }\n\n result.start.assign('day', startMoment.date())\n result.start.assign('month', startMoment.month() + 1)\n result.start.assign('year', startMoment.year())\n result.tags.ZHHantCasualDateParser = true;\n return result;\n };\n};\n","/*\n\n\n*/\n\nvar moment = require('moment');\nvar Parser = require('../parser').Parser;\nvar ParsedResult = require('../../result').ParsedResult;\n\nvar util = require('../../utils/ZH-Hant.js');\n\nvar PATTERN = new RegExp(\n '(\\\\d+|[' + Object.keys(util.NUMBER).join('') + ']+|半|幾)(?:\\\\s*)' +\n '(?:個)?' +\n '(秒(?:鐘)?|分鐘|小時|鐘|日|天|星期|禮拜|月|年)' +\n '(?:(?:之|過)?後|(?:之)?內)', 'i'\n);\n\nvar NUMBER_GROUP = 1;\nvar UNIT_GROUP = 2;\n\nexports.Parser = function ZHHantCasualDateParser() {\n\n Parser.apply(this, arguments);\n\n this.pattern = function() {\n return PATTERN;\n };\n\n this.extract = function(text, ref, match, opt) {\n var index = match.index;\n text = match[0];\n\n var result = new ParsedResult({\n index: index,\n text: text,\n ref: ref\n });\n\n var number = parseInt(match[NUMBER_GROUP]);\n if (isNaN(number)){\n number = util.zhStringToNumber(match[NUMBER_GROUP]);\n }\n\n if (isNaN(number)){\n var string = match[NUMBER_GROUP];\n if (string === '幾'){\n number = 3;\n }else if(string === '半'){\n number = 0.5;\n }else{\n\n //just in case\n return null;\n }\n }\n\n var date = moment(ref);\n var unit = match[UNIT_GROUP];\n var unitAbbr = unit[0];\n\n if (unitAbbr.match(/[日天星禮月年]/)){\n if(unitAbbr == '日' || unitAbbr == '天'){\n date.add(number, 'd');\n }else if(unitAbbr == '星' || unitAbbr == '禮'){\n date.add(number * 7, 'd');\n }else if(unitAbbr == '月'){\n date.add(number, 'month');\n }else if(unitAbbr == '年'){\n date.add(number, 'year');\n }\n\n result.start.assign('year', date.year());\n result.start.assign('month', date.month() + 1);\n result.start.assign('day', date.date());\n return result;\n }\n\n if(unitAbbr == '秒'){\n date.add(number, 'second');\n }else if(unitAbbr == '分'){\n date.add(number, 'minute');\n }else if(unitAbbr == '小' || unitAbbr == '鐘'){\n date.add(number, 'hour');\n }\n\n result.start.imply('year', date.year());\n result.start.imply('month', date.month() + 1);\n result.start.imply('day', date.date());\n result.start.assign('hour', date.hour());\n result.start.assign('minute', date.minute());\n result.start.assign('second', date.second());\n result.tags.ZHHantDeadlineFormatParser = true;\n return result;\n };\n};\n","/*\n\n\n*/\n\nvar moment = require('moment');\nvar Parser = require('../parser').Parser;\nvar ParsedResult = require('../../result').ParsedResult;\nvar util = require('../../utils/DE');\n\nvar PATTERN = new RegExp('(\\\\W|^)' +\n '(in|nach)\\\\s*' +\n '('+ util.INTEGER_WORDS_PATTERN + '|[0-9]+|einigen|eine[rm]\\\\s*halben|eine[rm])\\\\s*' +\n '(sekunden?|min(?:ute)?n?|stunden?|tag(?:en)?|wochen?|monat(?:en)?|jahr(?:en)?)\\\\s*' +\n '(?=\\\\W|$)', 'i'\n);\n\nvar STRICT_PATTERN = new RegExp('(\\\\W|^)' +\n '(in|nach)\\\\s*' +\n '('+ util.INTEGER_WORDS_PATTERN + '|[0-9]+|eine(?:r|m)?)\\\\s*' +\n '(sekunden?|minuten?|stunden?|tag(?:en)?)\\\\s*' +\n '(?=\\\\W|$)', 'i'\n);\n\nexports.Parser = function DEDeadlineFormatParser(){\n Parser.apply(this, arguments);\n\n this.pattern = function() {\n return this.isStrictMode()? STRICT_PATTERN : PATTERN;\n };\n\n this.extract = function(text, ref, match, opt){\n\n var index = match.index + match[1].length;\n var text = match[0];\n text = match[0].substr(match[1].length, match[0].length - match[1].length);\n\n var result = new ParsedResult({\n index: index,\n text: text,\n ref: ref\n });\n\n var num = match[3].toLowerCase();\n if (util.INTEGER_WORDS[num] !== undefined) {\n num = util.INTEGER_WORDS[num];\n } else if (num === 'einer' || num === 'einem') {\n num = 1;\n } else if (num === 'einigen') {\n num = 3;\n } else if (/halben/.test(num)) {\n num = 0.5;\n } else {\n num = parseInt(num);\n }\n\n var date = moment(ref);\n if (/tag|woche|monat|jahr/i.test(match[4])) {\n\n if (/tag/i.test(match[4])) {\n date.add(num, 'd');\n } else if (/woche/i.test(match[4])) {\n date.add(num * 7, 'd');\n } else if (/monat/i.test(match[4])) {\n date.add(num, 'month');\n } else if (/jahr/i.test(match[4])) {\n date.add(num, 'year');\n }\n\n result.start.assign('year', date.year());\n result.start.assign('month', date.month() + 1);\n result.start.assign('day', date.date());\n return result;\n }\n\n if (/stunde/i.test(match[4])) {\n\n date.add(num, 'hour');\n\n } else if (/min/i.test(match[4])) {\n\n date.add(num, 'minute');\n\n } else if (/sekunde/i.test(match[4])) {\n\n date.add(num, 'second');\n }\n\n result.start.imply('year', date.year());\n result.start.imply('month', date.month() + 1);\n result.start.imply('day', date.date());\n result.start.assign('hour', date.hour());\n result.start.assign('minute', date.minute());\n result.start.assign('second', date.second());\n result.tags['DEDeadlineFormatParser'] = true;\n return result;\n };\n};\n","/*\n\n\n*/\n\nvar moment = require('moment');\n\nvar Parser = require('../parser').Parser;\nvar ParsedResult = require('../../result').ParsedResult;\nvar util = require('../../utils/DE');\n\nvar PATTERN = new RegExp('(\\\\W|^)' +\n '(?:am\\\\s*?)?' +\n '(?:(Sonntag|Montag|Dienstag|Mittwoch|Donnerstag|Freitag|Samstag|So|Mo|Di|Mi|Do|Fr|Sa)\\\\s*,?\\\\s*)?' +\n '(?:den\\\\s*)?' +\n '([0-9]{1,2})\\\\.' +\n '(?:\\\\s*(?:bis(?:\\\\s*(?:am|zum))?|\\\\-|\\\\–|\\\\s)\\\\s*([0-9]{1,2})\\\\.)?\\\\s*' +\n '(Jan(?:uar|\\\\.)?|Feb(?:ruar|\\\\.)?|Mär(?:z|\\\\.)?|Maerz|Mrz\\\\.?|Apr(?:il|\\\\.)?|Mai|Jun(?:i|\\\\.)?|Jul(?:i|\\\\.)?|Aug(?:ust|\\\\.)?|Sep(?:t|t\\\\.|tember|\\\\.)?|Okt(?:ober|\\\\.)?|Nov(?:ember|\\\\.)?|Dez(?:ember|\\\\.)?)' +\n '(?:' +\n ',?\\\\s*([0-9]{1,4}(?![^\\\\s]\\\\d))' +\n '(\\\\s*[vn]\\\\.?\\\\s*C(?:hr)?\\\\.?)?' +\n ')?' +\n '(?=\\\\W|$)', 'i'\n );\n\nvar WEEKDAY_GROUP = 2;\nvar DATE_GROUP = 3;\nvar DATE_TO_GROUP = 4;\nvar MONTH_NAME_GROUP = 5;\nvar YEAR_GROUP = 6;\nvar YEAR_BE_GROUP = 7;\n\nexports.Parser = function DEMonthNameLittleEndianParser(){\n Parser.apply(this, arguments);\n\n this.pattern = function() { return PATTERN; }\n\n this.extract = function(text, ref, match, opt){\n\n var result = new ParsedResult({\n text: match[0].substr(match[1].length, match[0].length - match[1].length),\n index: match.index + match[1].length,\n ref: ref,\n });\n\n var month = match[MONTH_NAME_GROUP];\n month = util.MONTH_OFFSET[month.toLowerCase()];\n\n var day = match[DATE_GROUP];\n day = parseInt(day);\n\n var year = null;\n if (match[YEAR_GROUP]) {\n year = match[YEAR_GROUP];\n year = parseInt(year);\n\n if(match[YEAR_BE_GROUP]){\n if (/v/i.test(match[YEAR_BE_GROUP])) {\n // v.Chr.\n year = -year;\n }\n } else if (year < 100){\n\n year = year + 2000;\n }\n }\n\n if(year){\n result.start.assign('day', day);\n result.start.assign('month', month);\n result.start.assign('year', year);\n } else {\n\n //Find the most appropriated year\n var refMoment = moment(ref);\n refMoment.month(month - 1);\n refMoment.date(day);\n refMoment.year(moment(ref).year());\n\n var nextYear = refMoment.clone().add(1, 'y');\n var lastYear = refMoment.clone().add(-1, 'y');\n if( Math.abs(nextYear.diff(moment(ref))) < Math.abs(refMoment.diff(moment(ref))) ){\n refMoment = nextYear;\n }\n else if( Math.abs(lastYear.diff(moment(ref))) < Math.abs(refMoment.diff(moment(ref))) ){\n refMoment = lastYear;\n }\n\n result.start.assign('day', day);\n result.start.assign('month', month);\n result.start.imply('year', refMoment.year());\n }\n\n // Weekday component\n if (match[WEEKDAY_GROUP]) {\n var weekday = match[WEEKDAY_GROUP];\n weekday = util.WEEKDAY_OFFSET[weekday.toLowerCase()]\n result.start.assign('weekday', weekday);\n }\n\n // Text can be 'range' value. Such as '12 - 13 January 2012'\n if (match[DATE_TO_GROUP]) {\n result.end = result.start.clone();\n result.end.assign('day', parseInt(match[DATE_TO_GROUP]));\n }\n\n result.tags['DEMonthNameLittleEndianParser'] = true;\n return result;\n };\n}\n","/*\n \n The parser for parsing month name and year.\n \n EX. \n - Januar\n - Januar 2012\n*/\n\nvar moment = require('moment');\n\nvar Parser = require('../parser').Parser;\nvar ParsedResult = require('../../result').ParsedResult;\nvar util = require('../../utils/DE');\n\nvar PATTERN = new RegExp('(^|\\\\D\\\\s+|[^\\\\w\\\\s])' +\n '(Jan\\\\.?|Januar|Feb\\\\.?|Februar|Mär\\\\.?|M(?:ä|ae)rz|Mrz\\\\.?|Apr\\\\.?|April|Mai\\\\.?|Jun\\\\.?|Juni|Jul\\\\.?|Juli|Aug\\\\.?|August|Sep\\\\.?|Sept\\\\.?|September|Okt\\\\.?|Oktober|Nov\\\\.?|November|Dez\\\\.?|Dezember)' + \n '\\\\s*' +\n '(?:' +\n ',?\\\\s*(?:([0-9]{4})(\\\\s*[vn]\\\\.?\\\\s*C(?:hr)?\\\\.?)?|([0-9]{1,4})\\\\s*([vn]\\\\.?\\\\s*C(?:hr)?\\\\.?))' +\n ')?' +\n '(?=[^\\\\s\\\\w]|$)', 'i');\n\nvar MONTH_NAME_GROUP = 2;\nvar YEAR_GROUP = 3;\nvar YEAR_BE_GROUP = 4;\nvar YEAR_GROUP2 = 5;\nvar YEAR_BE_GROUP2 = 6;\n\nexports.Parser = function ENMonthNameParser(){\n Parser.apply(this, arguments);\n\n this.pattern = function() { return PATTERN; }\n \n this.extract = function(text, ref, match, opt){\n var result = new ParsedResult({\n text: match[0].substr(match[1].length, match[0].length - match[1].length),\n index: match.index + match[1].length,\n ref: ref,\n });\n\n \n var month = match[MONTH_NAME_GROUP];\n month = util.MONTH_OFFSET[month.toLowerCase()];\n\n var day = 1;\n\n var year = null;\n if (match[YEAR_GROUP] || match[YEAR_GROUP2]) {\n year = match[YEAR_GROUP] || match[YEAR_GROUP2];\n year = parseInt(year);\n\n if (match[YEAR_BE_GROUP] || match[YEAR_BE_GROUP2]) {\n if (/v/i.test(match[YEAR_BE_GROUP] || match[YEAR_BE_GROUP2])) {\n // v.Chr.\n year = -year;\n }\n\n } else if (year < 100){ \n\n year = year + 2000;\n }\n }\n\n if(year){\n result.start.imply('day', day);\n result.start.assign('month', month);\n result.start.assign('year', year);\n } else {\n \n //Find the most appropriated year\n var refMoment = moment(ref);\n refMoment.month(month - 1);\n refMoment.date(day);\n\n var nextYear = refMoment.clone().add(1, 'y');\n var lastYear = refMoment.clone().add(-1, 'y');\n if( Math.abs(nextYear.diff(moment(ref))) < Math.abs(refMoment.diff(moment(ref))) ){ \n refMoment = nextYear;\n }\n else if( Math.abs(lastYear.diff(moment(ref))) < Math.abs(refMoment.diff(moment(ref))) ){ \n refMoment = lastYear;\n }\n\n result.start.imply('day', day);\n result.start.assign('month', month);\n result.start.imply('year', refMoment.year());\n }\n\n result.tags['DEMonthNameParser'] = true;\n return result;\n }\n}\n\n","/*\n Date format with slash \"/\" (also \"-\" and \".\") between numbers\n - Tuesday 11/3/2015\n - 11/3/2015\n - 11/3\n*/\nvar moment = require('moment');\nvar Parser = require('../parser').Parser;\nvar ParsedResult = require('../../result').ParsedResult;\n\nvar PATTERN = new RegExp('(\\\\W|^)' +\n '(?:' +\n '(?:am\\\\s*?)?' +\n '((?:sonntag|so|montag|mo|dienstag|di|mittwoch|mi|donnerstag|do|freitag|fr|samstag|sa))' +\n '\\\\s*\\\\,?\\\\s*' +\n '(?:den\\\\s*)?' +\n ')?' +\n '([0-3]{0,1}[0-9]{1})[\\\\/\\\\.\\\\-]([0-3]{0,1}[0-9]{1})' +\n '(?:' +\n '[\\\\/\\\\.\\\\-]' +\n '([0-9]{4}\\s*\\,?\\s*|[0-9]{2}\\s*\\,?\\s*)' +\n ')?' +\n '(\\\\W|$)', 'i');\n\nvar DAYS_OFFSET = {\n 'sonntag': 0, 'so': 0,\n 'montag': 1, 'mo': 1,\n 'dienstag': 2, 'di': 2,\n 'mittwoch': 3, 'mi': 3,\n 'donnerstag': 4, 'do': 4,\n 'freitag': 5, 'fr': 5,\n 'samstag': 6, 'sa': 6\n};\n\n\nvar OPENNING_GROUP = 1;\nvar ENDING_GROUP = 6;\n\nvar WEEKDAY_GROUP = 2;\nvar DAY_GROUP = 3;\nvar MONTH_GROUP = 4;\nvar YEAR_GROUP = 5;\n\nexports.Parser = function DESlashDateFormatParser(argument) {\n Parser.apply(this, arguments);\n\n this.pattern = function () { return PATTERN; };\n this.extract = function(text, ref, match, opt){\n\n if(match[OPENNING_GROUP] == '/' || match[ENDING_GROUP] == '/') {\n // Long skip, if there is some overlapping like:\n // XX[/YY/ZZ]\n // [XX/YY/]ZZ\n match.index += match[0].length\n return;\n }\n\n var index = match.index + match[OPENNING_GROUP].length;\n var text = match[0].substr(match[OPENNING_GROUP].length, match[0].length - match[ENDING_GROUP].length);\n\n\n var result = new ParsedResult({\n text: text,\n index: index,\n ref: ref,\n });\n\n if(text.match(/^\\d\\.\\d$/)) return;\n if(text.match(/^\\d\\.\\d{1,2}\\.\\d{1,2}$/)) return;\n\n // MM/dd -> OK\n // MM.dd -> NG\n if(!match[YEAR_GROUP] && match[0].indexOf('/') < 0) return;\n\n var date = null;\n var year = match[YEAR_GROUP] || moment(ref).year() + '';\n var month = match[MONTH_GROUP];\n var day = match[DAY_GROUP];\n\n month = parseInt(month);\n day = parseInt(day);\n year = parseInt(year);\n\n if (month < 1 || month > 12) return null;\n if(day < 1 || day > 31) return null;\n\n if(year < 100){\n if (year > 50) {\n year = year + 1900;\n } else {\n year = year + 2000;\n }\n }\n\n result.start.assign('day', day);\n result.start.assign('month', month);\n result.start.assign('year', year);\n\n //Day of week\n if(match[WEEKDAY_GROUP]) {\n result.start.assign('weekday', DAYS_OFFSET[match[WEEKDAY_GROUP].toLowerCase()]);\n }\n\n result.tags['DESlashDateFormatParser'] = true;\n return result;\n };\n};\n","/*\n\n\n*/\n\nvar moment = require('moment');\nvar Parser = require('../parser').Parser;\nvar ParsedResult = require('../../result').ParsedResult;\nvar util = require('../../utils/DE');\n\nvar PATTERN = new RegExp('' +\n '(\\\\W|^)vor\\\\s*' +\n '(' + util.INTEGER_WORDS_PATTERN + '|[0-9]+|einigen|eine[rm]\\\\s*halben|eine[rm])\\\\s*' +\n '(sekunden?|min(?:ute)?n?|stunden?|wochen?|tag(?:en)?|monat(?:en)?|jahr(?:en)?)\\\\s*' +\n '(?=(?:\\\\W|$))', 'i');\n\nvar STRICT_PATTERN = new RegExp('' +\n '(\\\\W|^)vor\\\\s*' +\n '([0-9]+|eine(?:r|m))\\\\s*' +\n '(sekunden?|minuten?|stunden?|tag(?:en)?)' +\n '(?=(?:\\\\W|$))', 'i');\n\nexports.Parser = function DETimeAgoFormatParser(){\n Parser.apply(this, arguments);\n\n this.pattern = function() {\n return this.isStrictMode()? STRICT_PATTERN : PATTERN;\n };\n\n this.extract = function(text, ref, match, opt){\n\n if (match.index > 0 && text[match.index-1].match(/\\w/)) return null;\n\n var text = match[0];\n text = match[0].substr(match[1].length, match[0].length - match[1].length);\n index = match.index + match[1].length;\n\n var result = new ParsedResult({\n index: index,\n text: text,\n ref: ref\n });\n\n var num = match[2].toLowerCase() ;\n if (util.INTEGER_WORDS[num] !== undefined) {\n num = util.INTEGER_WORDS[num];\n } else if (num === 'einer' || num === 'einem') {\n num = 1;\n } else if (num === 'einigen') {\n num = 3;\n } else if (/halben/.test(num)) {\n num = 0.5;\n } else {\n num = parseInt(num);\n }\n\n var date = moment(ref);\n\n if (/stunde|min|sekunde/i.test(match[3])) {\n if (/stunde/i.test(match[3])) {\n\n date.add(-num, 'hour');\n\n } else if (/min/i.test(match[3])) {\n\n date.add(-num, 'minute');\n\n } else if (/sekunde/i.test(match[3])) {\n\n date.add(-num, 'second');\n }\n\n result.start.imply('day', date.date());\n result.start.imply('month', date.month() + 1);\n result.start.imply('year', date.year());\n result.start.assign('hour', date.hour());\n result.start.assign('minute', date.minute());\n result.start.assign('second', date.second());\n result.tags['DETimeAgoFormatParser'] = true;\n return result;\n }\n\n if (/woche/i.test(match[3])) {\n date.add(-num, 'week');\n\n result.start.imply('day', date.date());\n result.start.imply('month', date.month() + 1);\n result.start.imply('year', date.year());\n result.start.imply('weekday', date.day());\n return result;\n }\n\n if (/tag/i.test(match[3])) {\n date.add(-num, 'd');\n }\n\n if (/monat/i.test(match[3])) {\n date.add(-num, 'month');\n }\n\n if (/jahr/i.test(match[3])) {\n\n date.add(-num, 'year');\n }\n\n result.start.assign('day', date.date());\n result.start.assign('month', date.month() + 1);\n result.start.assign('year', date.year());\n return result;\n\n };\n}\n","/*\n\n\n*/\n\nvar moment = require('moment');\nvar Parser = require('../parser').Parser;\nvar ParsedResult = require('../../result').ParsedResult;\nvar ParsedComponents = require('../../result').ParsedComponents;\n\nvar FIRST_REG_PATTERN = new RegExp(\"(^|\\\\s|T)\" +\n \"(?:(?:um|von)\\\\s*)?\" + \n \"(\\\\d{1,4}|mittags?|mitternachts?)\" + \n \"(?:\" + \n \"(?:\\\\.|\\\\:|\\\\:)(\\\\d{1,2})\" + \n \"(?:\" + \n \"(?:\\\\:|\\\\:)(\\\\d{2})\" + \n \")?\" + \n \")?\" +\n \"(?:\\\\s*uhr)?\" +\n \"(?:\\\\s*(morgens|vormittags|mittags|nachmittags|abends|nachts))?\" + \n \"(?=\\\\W|$)\", 'i');\n\n\nvar SECOND_REG_PATTERN = new RegExp(\"^\\\\s*\" + \n \"(\\\\-|\\\\–|\\\\~|\\\\〜|bis|\\\\?)\\\\s*\" + \n \"(\\\\d{1,4})\" +\n \"(?:\" + \n \"(?:\\\\.|\\\\:|\\\\:)(\\\\d{1,2})\" + \n \"(?:\" + \n \"(?:\\\\.|\\\\:|\\\\:)(\\\\d{1,2})\" + \n \")?\" + \n \")?\" + \n \"(?:\\\\s*(morgens|vormittags|mittags|nachmittags|abends|nachts))?\" + \n \"(?=\\\\W|$)\", 'i');\n\nvar HOUR_GROUP = 2;\nvar MINUTE_GROUP = 3;\nvar SECOND_GROUP = 4;\nvar AM_PM_HOUR_GROUP = 5;\n\n\nexports.Parser = function DETimeExpressionParser() {\n Parser.apply(this, arguments);\n\n this.pattern = function() { return FIRST_REG_PATTERN; }\n \n this.extract = function(text, ref, match, opt){ \n \n // This pattern can be overlaped Ex. [12] AM, 1[2] AM\n if (match.index > 0 && text[match.index-1].match(/\\w/)) return null;\n var refMoment = moment(ref);\n var result = new ParsedResult();\n result.ref = ref;\n result.index = match.index + match[1].length;\n result.text = match[0].substring(match[1].length);\n result.tags['DETimeExpressionParser'] = true;\n\n result.start.imply('day', refMoment.date());\n result.start.imply('month', refMoment.month()+1);\n result.start.imply('year', refMoment.year());\n \n var hour = 0;\n var minute = 0;\n var meridiem = -1;\n\n // ----- Second\n if(match[SECOND_GROUP] != null){ \n var second = parseInt(match[SECOND_GROUP]);\n if(second >= 60) return null;\n\n result.start.assign('second', second);\n }\n \n // ----- Hours\n if (/mittags?/i.test(match[HOUR_GROUP])) {\n meridiem = 1; \n hour = 12;\n } else if (/mitternachts?/i.test(match[HOUR_GROUP])) {\n meridiem = 0; \n hour = 0;\n } else {\n hour = parseInt(match[HOUR_GROUP]);\n }\n \n // ----- Minutes\n if(match[MINUTE_GROUP] != null){ \n minute = parseInt(match[MINUTE_GROUP]);\n } else if(hour > 100) { \n minute = hour%100;\n hour = parseInt(hour/100);\n } \n \n if(minute >= 60) {\n return null;\n }\n\n if(hour > 24) {\n return null;\n }\n if (hour >= 12) { \n meridiem = 1;\n }\n\n // ----- AM & PM \n if (match[AM_PM_HOUR_GROUP] != null) {\n if (hour > 12) return null;\n var ampm = match[AM_PM_HOUR_GROUP][0].toLowerCase();\n if (ampm === 'morgens' || ampm === 'vormittags') {\n meridiem = 0; \n if(hour == 12) hour = 0;\n } else {\n meridiem = 1; \n if(hour != 12) hour += 12;\n }\n } \n\n result.start.assign('hour', hour);\n result.start.assign('minute', minute);\n\n if (meridiem >= 0) {\n result.start.assign('meridiem', meridiem);\n } else {\n if (hour < 12) {\n result.start.imply('meridiem', 0);\n } else {\n result.start.imply('meridiem', 1);\n }\n }\n \n // ==============================================================\n // Extracting the 'to' chunk\n // ==============================================================\n match = SECOND_REG_PATTERN.exec(text.substring(result.index + result.text.length));\n if (!match) {\n // Not accept number only result\n if (result.text.match(/^\\d+$/)) { \n return null;\n }\n return result;\n }\n\n\n\n // Pattern \"YY.YY -XXXX\" is more like timezone offset\n if (match[0].match(/^\\s*(\\+|\\-)\\s*\\d{3,4}$/)) {\n return result;\n }\n\n if(result.end == null){\n result.end = new ParsedComponents(null, result.start.date());\n }\n\n var hour = 0;\n var minute = 0;\n var meridiem = -1;\n\n // ----- Second\n if(match[SECOND_GROUP] != null){ \n var second = parseInt(match[SECOND_GROUP]);\n if(second >= 60) return null;\n\n result.end.assign('second', second);\n }\n\n hour = parseInt(match[2]);\n \n // ----- Minute\n if (match[MINUTE_GROUP]!= null) {\n \n minute = parseInt(match[MINUTE_GROUP]);\n if(minute >= 60) return result;\n \n } else if (hour > 100) {\n\n minute = hour%100;\n hour = parseInt(hour/100);\n }\n\n if(minute >= 60) {\n return null;\n }\n\n if(hour > 24) {\n return null;\n }\n if (hour >= 12) { \n meridiem = 1;\n }\n \n // ----- AM & PM \n if (match[AM_PM_HOUR_GROUP] != null) {\n\n if (hour > 12) return null;\n\n var ampm = match[AM_PM_HOUR_GROUP][0].toLowerCase();\n if (ampm === 'morgens' || ampm === 'vormittags') {\n meridiem = 0; \n if(hour == 12) {\n hour = 0;\n if (!result.end.isCertain('day')) {\n result.end.imply('day', result.end.get('day') + 1);\n }\n }\n } else {\n meridiem = 1; \n if(hour != 12) hour += 12;\n }\n \n if (!result.start.isCertain('meridiem')) {\n if (meridiem == 0) {\n \n result.start.imply('meridiem', 0);\n \n if (result.start.get('hour') == 12) {\n result.start.assign('hour', 0);\n }\n\n } else {\n\n result.start.imply('meridiem', 1);\n \n if (result.start.get('hour') != 12) {\n result.start.assign('hour', result.start.get('hour') + 12); \n }\n }\n }\n }\n\n result.text = result.text + match[0];\n result.end.assign('hour', hour);\n result.end.assign('minute', minute);\n if (meridiem >= 0) {\n result.end.assign('meridiem', meridiem);\n } else {\n var startAtPM = result.start.isCertain('meridiem') && result.start.get('meridiem') == 1;\n if (startAtPM && result.start.get('hour') > hour) {\n // 10pm - 1 (am)\n result.end.imply('meridiem', 0);\n\n } else if (hour > 12) {\n result.end.imply('meridiem', 1);\n }\n }\n\n if (result.end.date().getTime() < result.start.date().getTime()) {\n result.end.imply('day', result.end.get('day') + 1)\n }\n \n return result;\n }\n}\n","/*\n\n\n*/\n\nvar moment = require('moment');\nvar Parser = require('../parser').Parser;\nvar ParsedResult = require('../../result').ParsedResult;\n\nvar PATTERN = new RegExp(\n '(\\\\W|^)(' +\n 'jetzt|' +\n '(?:heute|diesen)\\\\s*(morgen|vormittag|mittag|nachmittag|abend)|' +\n '(?:heute|diese)\\\\s*nacht|' +\n 'heute|' +\n '(?:(?:ü|ue)ber)?morgen(?:\\\\s*(morgen|vormittag|mittag|nachmittag|abend|nacht))?|' +\n '(?:vor)?gestern(?:\\\\s*(morgen|vormittag|mittag|nachmittag|abend|nacht))?|' +\n 'letzte\\\\s*nacht' +\n ')(?=\\\\W|$)', 'i');\n\nexports.Parser = function DECasualDateParser() {\n\n Parser.apply(this, arguments);\n\n this.pattern = function() { return PATTERN; }\n\n this.extract = function(text, ref, match, opt) {\n var text = match[0].substr(match[1].length);\n var index = match.index + match[1].length;\n var result = new ParsedResult({\n index: index,\n text: text,\n ref: ref,\n });\n\n var refMoment = moment(ref);\n var startMoment = refMoment.clone();\n var lowerText = text.toLowerCase();\n\n if (/(?:heute|diese)\\s*nacht/.test(lowerText)) {\n // Normally means this coming midnight\n result.start.imply('hour', 22);\n result.start.imply('meridiem', 1);\n } else if (/^(?:ü|ue)bermorgen/.test(lowerText)) {\n startMoment.add(refMoment.hour() > 1 ? 2 : 1, 'day');\n } else if (/^morgen/.test(lowerText)) {\n // Check not \"Tomorrow\" on late night\n if (refMoment.hour() > 1) {\n startMoment.add(1, 'day');\n }\n } else if (/^gestern/.test(lowerText)) {\n startMoment.add(-1, 'day');\n } else if (/^vorgestern/.test(lowerText)) {\n startMoment.add(-2, 'day');\n } else if (/letzte\\s*nacht/.test(lowerText)) {\n result.start.imply('hour', 0);\n if (refMoment.hour() > 6) {\n startMoment.add(-1, 'day');\n }\n } else if (lowerText === 'jetzt') {\n result.start.imply('hour', refMoment.hour());\n result.start.imply('minute', refMoment.minute());\n result.start.imply('second', refMoment.second());\n result.start.imply('millisecond', refMoment.millisecond());\n }\n\n var secondMatch = match[3] || match[4] || match[5];\n if (secondMatch) {\n switch (secondMatch.toLowerCase()) {\n case 'morgen':\n result.start.imply('hour', 6);\n break;\n case 'vormittag':\n result.start.imply('hour', 9);\n break;\n case 'mittag':\n result.start.imply('hour', 12);\n break;\n case 'nachmittag':\n result.start.imply('hour', 15);\n result.start.imply('meridiem', 1);\n break;\n case 'abend':\n result.start.imply('hour', 18);\n result.start.imply('meridiem', 1);\n break;\n case 'nacht':\n result.start.imply('hour', 0);\n break;\n }\n }\n\n result.start.assign('day', startMoment.date())\n result.start.assign('month', startMoment.month() + 1)\n result.start.assign('year', startMoment.year())\n result.tags['DECasualDateParser'] = true;\n return result;\n }\n}\n","/*\n\n\n*/\nvar moment = require('moment');\nvar Parser = require('../parser').Parser;\nvar ParsedResult = require('../../result').ParsedResult;\n\nvar DAYS_OFFSET = {\n 'sonntag': 0, 'so': 0,\n 'montag': 1, 'mo': 1,\n 'dienstag': 2, 'di': 2,\n 'mittwoch': 3, 'mi': 3,\n 'donnerstag': 4, 'do': 4,\n 'freitag': 5, 'fr': 5,\n 'samstag': 6, 'sa': 6\n};\n\nvar PATTERN = new RegExp('(\\\\W|^)' +\n '(?:(?:\\\\,|\\\\(|\\\\()\\\\s*)?' +\n '(?:a[mn]\\\\s*?)?' +\n '(?:(diese[mn]|letzte[mn]|n(?:ä|ae)chste[mn])\\\\s*)?' +\n '(' + Object.keys(DAYS_OFFSET).join('|') + ')' +\n '(?:\\\\s*(?:\\\\,|\\\\)|\\\\)))?' +\n '(?:\\\\s*(diese|letzte|n(?:ä|ae)chste)\\\\s*woche)?' +\n '(?=\\\\W|$)', 'i');\n\nvar PREFIX_GROUP = 2;\nvar WEEKDAY_GROUP = 3;\nvar POSTFIX_GROUP = 4;\n\nexports.Parser = function DEWeekdayParser() {\n Parser.apply(this, arguments);\n\n this.pattern = function() { return PATTERN; };\n\n this.extract = function(text, ref, match, opt){\n var index = match.index + match[1].length;\n var text = match[0].substr(match[1].length, match[0].length - match[1].length);\n var result = new ParsedResult({\n index: index,\n text: text,\n ref: ref,\n });\n\n var dayOfWeek = match[WEEKDAY_GROUP].toLowerCase();\n var offset = DAYS_OFFSET[dayOfWeek];\n if(offset === undefined) return null;\n\n var startMoment = moment(ref);\n var prefix = match[PREFIX_GROUP];\n var postfix = match[POSTFIX_GROUP];\n\n var refOffset = startMoment.day();\n var norm = prefix || postfix;\n norm = norm || '';\n norm = norm.toLowerCase();\n if (/letzte/.test(norm)) {\n startMoment.day(offset - 7);\n } else if (/n(?:ä|ae)chste/.test(norm)) {\n startMoment.day(offset + 7);\n } else if (/diese/.test(norm)) {\n if ( opt.forwardDatesOnly && refOffset > offset ) {\n startMoment.day(offset + 7);\n } else {\n startMoment.day(offset);\n }\n } else {\n if ( opt.forwardDatesOnly && refOffset > offset ) {\n startMoment.day(offset + 7);\n } else if (!opt.forwardDatesOnly && Math.abs(offset - 7 - refOffset) < Math.abs(offset - refOffset)) {\n startMoment.day(offset - 7);\n } else if (!opt.forwardDatesOnly && Math.abs(offset + 7 - refOffset) < Math.abs(offset - refOffset)) {\n startMoment.day(offset + 7);\n } else {\n startMoment.day(offset);\n }\n }\n\n result.start.assign('weekday', offset);\n result.start.imply('day', startMoment.date());\n result.start.imply('month', startMoment.month() + 1);\n result.start.imply('year', startMoment.year());\n return result;\n }\n};\n","var NUMBER ={\n '零':0,\n '一':1,\n '二':2,\n '兩':2,\n '三':3,\n '四':4,\n '五':5,\n '六':6,\n '七':7,\n '八':8,\n '九':9,\n '十':10,\n '廿':20,\n '卅':30,\n};\n\nvar WEEKDAY_OFFSET ={\n '天':0,\n '日':0,\n '一':1,\n '二':2,\n '三':3,\n '四':4,\n '五':5,\n '六':6,\n};\n\nexports.NUMBER = NUMBER;\nexports.WEEKDAY_OFFSET = WEEKDAY_OFFSET;\n\nexports.zhStringToNumber=function(text){\n var number = 0;\n for(var i=0; i<text.length ;i++){\n var char = text[i];\n if(char === '十'){\n number = number=== 0 ? NUMBER[char] : (number * NUMBER[char]);\n }else{\n number += NUMBER[char];\n }\n }\n return number;\n};\n\nexports.zhStringToYear=function(text){\n var string = '';\n for(var i=0; i<text.length ;i++){\n var char = text[i];\n string = string + NUMBER[char];\n }\n return parseInt(string);\n};\n","exports.WEEKDAY_OFFSET = { \n 'sunday': 0, \n 'sun': 0, \n 'monday': 1, \n 'mon': 1,\n 'tuesday': 2, \n 'tue':2, \n 'wednesday': 3, \n 'wed': 3, \n 'thursday': 4, \n 'thur': 4, \n 'thu': 4,\n 'friday': 5, \n 'fri': 5,\n 'saturday': 6, \n 'sat': 6\n};\n \nexports.MONTH_OFFSET = { \n 'january': 1,\n 'jan': 1,\n 'jan.': 1,\n 'february': 2,\n 'feb': 2,\n 'feb.': 2,\n 'march': 3,\n 'mar': 3,\n 'mar.': 3,\n 'april': 4,\n 'apr': 4,\n 'apr.': 4,\n 'may': 5,\n 'june': 6,\n 'jun': 6,\n 'jun.': 6,\n 'july': 7,\n 'jul': 7,\n 'jul.': 7,\n 'august': 8,\n 'aug': 8,\n 'aug.': 8,\n 'september': 9,\n 'sep': 9,\n 'sep.': 9,\n 'sept': 9,\n 'sept.': 9,\n 'october': 10,\n 'oct': 10,\n 'oct.': 10,\n 'november': 11,\n 'nov': 11,\n 'nov.': 11,\n 'december': 12,\n 'dec': 12,\n 'dec.': 12\n};\n\nexports.INTEGER_WORDS = {\n 'one' : 1,\n 'two' : 2,\n 'three' : 3,\n 'four' : 4,\n 'five' : 5,\n 'six' : 6,\n 'seven' : 7,\n 'eight' : 8,\n 'nine' : 9,\n 'ten' : 10,\n 'eleven' : 11,\n 'twelve' : 12\n};\nexports.INTEGER_WORDS_PATTERN = '(?:' + Object.keys(exports.INTEGER_WORDS).join('|') +')';\n\nexports.ORDINAL_WORDS = {\n 'first' : 1,\n 'second': 2,\n 'third': 3,\n 'fourth': 4,\n 'fifth': 5,\n 'sixth': 6,\n 'seventh': 7,\n 'eighth': 8,\n 'ninth': 9,\n 'tenth': 10,\n 'eleventh': 11,\n 'twelfth': 12,\n 'thirteenth': 13,\n 'fourteenth': 14,\n 'fifteenth': 15,\n 'sixteenth': 16,\n 'seventeenth': 17,\n 'eighteenth': 18,\n 'nineteenth': 19,\n 'twentieth': 20,\n 'twenty first': 21,\n 'twenty second': 22,\n 'twenty third': 23,\n 'twenty fourth': 24,\n 'twenty fifth': 25,\n 'twenty sixth': 26,\n 'twenty seventh': 27,\n 'twenty eighth': 28,\n 'twenty ninth': 29,\n 'thirtieth': 30,\n 'thirty first': 31\n};\nexports.ORDINAL_WORDS_PATTERN = '(?:' + Object.keys(exports.ORDINAL_WORDS).join('|').replace(/ /g, '[ -]') + ')';","\n\n/**\n * to-hankaku.js\n * convert to ascii code strings.\n *\n * @version 1.0.1\n * @author think49\n * @url https://gist.github.com/964592\n * @license http://www.opensource.org/licenses/mit-license.php (The MIT License)\n */\n \nexports.toHankaku = (function (String, fromCharCode) {\n \n function toHankaku (string) {\n return String(string).replace(/\\u2019/g, '\\u0027').replace(/\\u201D/g, '\\u0022').replace(/\\u3000/g, '\\u0020').replace(/\\uFFE5/g, '\\u00A5').replace(/[\\uFF01\\uFF03-\\uFF06\\uFF08\\uFF09\\uFF0C-\\uFF19\\uFF1C-\\uFF1F\\uFF21-\\uFF3B\\uFF3D\\uFF3F\\uFF41-\\uFF5B\\uFF5D\\uFF5E]/g, alphaNum);\n }\n \n function alphaNum (token) {\n return fromCharCode(token.charCodeAt(0) - 65248);\n }\n \n return toHankaku;\n})(String, String.fromCharCode);\n\n/**\n * to-zenkaku.js\n * convert to multi byte strings.\n *\n * @version 1.0.2\n * @author think49\n * @url https://gist.github.com/964592\n * @license http://www.opensource.org/licenses/mit-license.php (The MIT License)\n */\nexports.toZenkaku = (function (String, fromCharCode) {\n \n function toZenkaku (string) {\n return String(string).replace(/\\u0020/g, '\\u3000').replace(/\\u0022/g, '\\u201D').replace(/\\u0027/g, '\\u2019').replace(/\\u00A5/g, '\\uFFE5').replace(/[!#-&(),-9\\u003C-?A-[\\u005D_a-{}~]/g, alphaNum);\n }\n \n function alphaNum (token) {\n return fromCharCode(token.charCodeAt(0) + 65248);\n }\n \n return toZenkaku;\n})(String, String.fromCharCode);","exports.WEEKDAY_OFFSET = {\n 'domingo': 0,\n 'dom': 0,\n 'lunes': 1,\n 'lun': 1,\n 'martes': 2,\n 'mar':2,\n 'miércoles': 3,\n 'miercoles': 3,\n 'mie': 3,\n 'jueves': 4,\n 'jue': 4,\n 'viernes': 5,\n 'vie': 5,\n 'sábado': 6,\n 'sabado': 6,\n 'sab': 6,}\n\nexports.MONTH_OFFSET = {\n 'enero': 1,\n 'ene': 1,\n 'ene.': 1,\n 'febrero': 2,\n 'feb': 2,\n 'feb.': 2,\n 'marzo': 3,\n 'mar': 3,\n 'mar.': 3,\n 'abril': 4,\n 'abr': 4,\n 'abr.': 4,\n 'mayo': 5,\n 'may': 5,\n 'may.': 5,\n 'junio': 6,\n 'jun': 6,\n 'jun.': 6,\n 'julio': 7,\n 'jul': 7,\n 'jul.': 7,\n 'agosto': 8,\n 'ago': 8,\n 'ago.': 8,\n 'septiembre': 9,\n 'sep': 9,\n 'sept': 9,\n 'sep.': 9,\n 'sept.': 9,\n 'octubre': 10,\n 'oct': 10,\n 'oct.': 10,\n 'noviembre': 11,\n 'nov': 11,\n 'nov.': 11,\n 'diciembre': 12,\n 'dic': 12,\n 'dic.': 12,\n}\n","exports.WEEKDAY_OFFSET = { \r\n 'dimanche': 0, \r\n 'dim': 0, \r\n 'lundi': 1, \r\n 'lun': 1,\r\n 'mardi': 2, \r\n 'mar':2, \r\n 'mercredi': 3, \r\n 'mer': 3, \r\n 'jeudi': 4, \r\n 'jeu': 4, \r\n 'vendredi': 5, \r\n 'ven': 5,\r\n 'samedi': 6, \r\n 'sam': 6\r\n};\r\n \r\nexports.MONTH_OFFSET = { \r\n 'janvier': 1,\r\n 'jan': 1,\r\n 'jan.': 1,\r\n 'février': 2,\r\n 'fév': 2,\r\n 'fév.': 2,\r\n 'mars': 3,\r\n 'mar': 3,\r\n 'mar.': 3,\r\n 'avril': 4,\r\n 'avr': 4,\r\n 'avr.': 4,\r\n 'mai': 5,\r\n 'juin': 6,\r\n 'jun': 6,\r\n 'juillet': 7,\r\n 'jul': 7,\r\n 'jul.': 7,\r\n 'août': 8,\r\n 'aout': 8,\r\n 'septembre': 9,\r\n 'sep': 9,\r\n 'sep.': 9,\r\n 'sept': 9,\r\n 'sept.': 9,\r\n 'octobre': 10,\r\n 'oct': 10,\r\n 'oct.': 10,\r\n 'novembre': 11,\r\n 'nov': 11,\r\n 'nov.': 11,\r\n 'décembre': 12,\r\n 'dec': 12,\r\n 'dec.': 12\r\n};\r\n\r\nexports.INTEGER_WORDS_PATTERN = '(?:un|deux|trois|quatre|cinq|six|sept|huit|neuf|dix|onze|douze|treize)';\r\nexports.INTEGER_WORDS = {\r\n 'un' : 1,\r\n 'deux' : 2,\r\n 'trois' : 3,\r\n 'quatre' : 4,\r\n 'cinq' : 5,\r\n 'six' : 6,\r\n 'sept' : 7,\r\n 'huit' : 8,\r\n 'neuf' : 9,\r\n 'dix' : 10,\r\n 'onze' : 11,\r\n 'douze' : 12,\r\n 'treize' : 13,\r\n};\r\n","exports.WEEKDAY_OFFSET = { \n 'sonntag': 0, \n 'so': 0, \n 'montag': 1, \n 'mo': 1,\n 'dienstag': 2, \n 'di':2, \n 'mittwoch': 3, \n 'mi': 3, \n 'donnerstag': 4, \n 'do': 4, \n 'freitag': 5, \n 'fr': 5,\n 'samstag': 6, \n 'sa': 6\n};\n \nexports.MONTH_OFFSET = { \n 'januar': 1,\n 'jan': 1,\n 'jan.': 1,\n 'februar': 2,\n 'feb': 2,\n 'feb.': 2,\n 'märz': 3,\n 'maerz': 3,\n 'mär': 3,\n 'mär.': 3,\n 'mrz': 3,\n 'mrz.': 3,\n 'april': 4,\n 'apr': 4,\n 'apr.': 4,\n 'mai': 5,\n 'juni': 6,\n 'jun': 6,\n 'jun.': 6,\n 'juli': 7,\n 'jul': 7,\n 'jul.': 7,\n 'august': 8,\n 'aug': 8,\n 'aug.': 8,\n 'september': 9,\n 'sep': 9,\n 'sep.': 9,\n 'sept': 9,\n 'sept.': 9,\n 'oktober': 10,\n 'okt': 10,\n 'okt.': 10,\n 'november': 11,\n 'nov': 11,\n 'nov.': 11,\n 'dezember': 12,\n 'dez': 12,\n 'dez.': 12\n};\n\nexports.INTEGER_WORDS_PATTERN = '(?:eins|zwei|drei|vier|fünf|fuenf|sechs|sieben|acht|neun|zehn|elf|zwölf|zwoelf)';\nexports.INTEGER_WORDS = {\n 'eins' : 1,\n 'zwei' : 2,\n 'drei' : 3,\n 'vier' : 4,\n 'fünf' : 5,\n 'fuenf': 5,\n 'sechs' : 6,\n 'sieben' : 7,\n 'acht' : 8,\n 'neun' : 9,\n 'zehn' : 10,\n 'elf' : 11,\n 'zwölf' : 12,\n 'zwoelf' : 12\n};\n","//! moment.js\n//! version : 2.10.6\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n global.moment = factory()\n}(this, function () { 'use strict';\n\n var hookCallback;\n\n function utils_hooks__hooks () {\n return hookCallback.apply(null, arguments);\n }\n\n // This is done to register the method called with moment()\n // without creating circular dependencies.\n function setHookCallback (callback) {\n hookCallback = callback;\n }\n\n function isArray(input) {\n return Object.prototype.toString.call(input) === '[object Array]';\n }\n\n function isDate(input) {\n return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]';\n }\n\n function map(arr, fn) {\n var res = [], i;\n for (i = 0; i < arr.length; ++i) {\n res.push(fn(arr[i], i));\n }\n return res;\n }\n\n function hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n }\n\n function extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n }\n\n function create_utc__createUTC (input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n }\n\n function defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty : false,\n unusedTokens : [],\n unusedInput : [],\n overflow : -2,\n charsLeftOver : 0,\n nullInput : false,\n invalidMonth : null,\n invalidFormat : false,\n userInvalidated : false,\n iso : false\n };\n }\n\n function getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n return m._pf;\n }\n\n function valid__isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m);\n m._isValid = !isNaN(m._d.getTime()) &&\n flags.overflow < 0 &&\n !flags.empty &&\n !flags.invalidMonth &&\n !flags.invalidWeekday &&\n !flags.nullInput &&\n !flags.invalidFormat &&\n !flags.userInvalidated;\n\n if (m._strict) {\n m._isValid = m._isValid &&\n flags.charsLeftOver === 0 &&\n flags.unusedTokens.length === 0 &&\n flags.bigHour === undefined;\n }\n }\n return m._isValid;\n }\n\n function valid__createInvalid (flags) {\n var m = create_utc__createUTC(NaN);\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n }\n else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n }\n\n var momentProperties = utils_hooks__hooks.momentProperties = [];\n\n function copyConfig(to, from) {\n var i, prop, val;\n\n if (typeof from._isAMomentObject !== 'undefined') {\n to._isAMomentObject = from._isAMomentObject;\n }\n if (typeof from._i !== 'undefined') {\n to._i = from._i;\n }\n if (typeof from._f !== 'undefined') {\n to._f = from._f;\n }\n if (typeof from._l !== 'undefined') {\n to._l = from._l;\n }\n if (typeof from._strict !== 'undefined') {\n to._strict = from._strict;\n }\n if (typeof from._tzm !== 'undefined') {\n to._tzm = from._tzm;\n }\n if (typeof from._isUTC !== 'undefined') {\n to._isUTC = from._isUTC;\n }\n if (typeof from._offset !== 'undefined') {\n to._offset = from._offset;\n }\n if (typeof from._pf !== 'undefined') {\n to._pf = getParsingFlags(from);\n }\n if (typeof from._locale !== 'undefined') {\n to._locale = from._locale;\n }\n\n if (momentProperties.length > 0) {\n for (i in momentProperties) {\n prop = momentProperties[i];\n val = from[prop];\n if (typeof val !== 'undefined') {\n to[prop] = val;\n }\n }\n }\n\n return to;\n }\n\n var updateInProgress = false;\n\n // Moment prototype object\n function Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n if (updateInProgress === false) {\n updateInProgress = true;\n utils_hooks__hooks.updateOffset(this);\n updateInProgress = false;\n }\n }\n\n function isMoment (obj) {\n return obj instanceof Moment || (obj != null && obj._isAMomentObject != null);\n }\n\n function absFloor (number) {\n if (number < 0) {\n return Math.ceil(number);\n } else {\n return Math.floor(number);\n }\n }\n\n function toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n }\n\n function compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if ((dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }\n\n function Locale() {\n }\n\n var locales = {};\n var globalLocale;\n\n function normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n }\n\n // pick the locale from the array\n // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\n function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n }\n\n function loadLocale(name) {\n var oldLocale = null;\n // TODO: Find a better way to register and load all the locales in Node\n if (!locales[name] && typeof module !== 'undefined' &&\n module && module.exports) {\n try {\n oldLocale = globalLocale._abbr;\n require('./locale/' + name);\n // because defineLocale currently also sets the global locale, we\n // want to undo that for lazy loaded locales\n locale_locales__getSetGlobalLocale(oldLocale);\n } catch (e) { }\n }\n return locales[name];\n }\n\n // This function will load locale and then set the global locale. If\n // no arguments are passed in, it will simply return the current global\n // locale key.\n function locale_locales__getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (typeof values === 'undefined') {\n data = locale_locales__getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n }\n\n function defineLocale (name, values) {\n if (values !== null) {\n values.abbr = name;\n locales[name] = locales[name] || new Locale();\n locales[name].set(values);\n\n // backwards compat for now: also set the locale\n locale_locales__getSetGlobalLocale(name);\n\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n }\n\n // returns locale data\n function locale_locales__getLocale (key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n if (locale) {\n return locale;\n }\n key = [key];\n }\n\n return chooseLocale(key);\n }\n\n var aliases = {};\n\n function addUnitAlias (unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n }\n\n function normalizeUnits(units) {\n return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined;\n }\n\n function normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n }\n\n function makeGetSet (unit, keepTime) {\n return function (value) {\n if (value != null) {\n get_set__set(this, unit, value);\n utils_hooks__hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get_set__get(this, unit);\n }\n };\n }\n\n function get_set__get (mom, unit) {\n return mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]();\n }\n\n function get_set__set (mom, unit, value) {\n return mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n\n // MOMENTS\n\n function getSet (units, value) {\n var unit;\n if (typeof units === 'object') {\n for (unit in units) {\n this.set(unit, units[unit]);\n }\n } else {\n units = normalizeUnits(units);\n if (typeof this[units] === 'function') {\n return this[units](value);\n }\n }\n return this;\n }\n\n function zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (sign ? (forceSign ? '+' : '') : '-') +\n Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber;\n }\n\n var formattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;\n\n var localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g;\n\n var formatFunctions = {};\n\n var formatTokenFunctions = {};\n\n // token: 'M'\n // padded: ['MM', 2]\n // ordinal: 'Mo'\n // callback: function () { this.month() + 1 }\n function addFormatToken (token, padded, ordinal, callback) {\n var func = callback;\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n if (token) {\n formatTokenFunctions[token] = func;\n }\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(func.apply(this, arguments), token);\n };\n }\n }\n\n function removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n return input.replace(/\\\\/g, '');\n }\n\n function makeFormatFunction(format) {\n var array = format.match(formattingTokens), i, length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '';\n for (i = 0; i < length; i++) {\n output += array[i] instanceof Function ? array[i].call(mom, format) : array[i];\n }\n return output;\n };\n }\n\n // format date using native date object\n function formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format);\n\n return formatFunctions[format](m);\n }\n\n function expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(localFormattingTokens, replaceLongDateFormatTokens);\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n }\n\n var match1 = /\\d/; // 0 - 9\n var match2 = /\\d\\d/; // 00 - 99\n var match3 = /\\d{3}/; // 000 - 999\n var match4 = /\\d{4}/; // 0000 - 9999\n var match6 = /[+-]?\\d{6}/; // -999999 - 999999\n var match1to2 = /\\d\\d?/; // 0 - 99\n var match1to3 = /\\d{1,3}/; // 0 - 999\n var match1to4 = /\\d{1,4}/; // 0 - 9999\n var match1to6 = /[+-]?\\d{1,6}/; // -999999 - 999999\n\n var matchUnsigned = /\\d+/; // 0 - inf\n var matchSigned = /[+-]?\\d+/; // -inf - inf\n\n var matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi; // +00:00 -00:00 +0000 -0000 or Z\n\n var matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/; // 123456789 123456789.123\n\n // any word (or two) characters or numbers including two/three word month in arabic.\n var matchWord = /[0-9]*['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]+|[\\u0600-\\u06FF\\/]+(\\s*?[\\u0600-\\u06FF]+){1,2}/i;\n\n var regexes = {};\n\n function isFunction (sth) {\n // https://github.com/moment/moment/issues/2325\n return typeof sth === 'function' &&\n Object.prototype.toString.call(sth) === '[object Function]';\n }\n\n\n function addRegexToken (token, regex, strictRegex) {\n regexes[token] = isFunction(regex) ? regex : function (isStrict) {\n return (isStrict && strictRegex) ? strictRegex : regex;\n };\n }\n\n function getParseRegexForToken (token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n }\n\n // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\n function unescapeFormat(s) {\n return s.replace('\\\\', '').replace(/\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g, function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }).replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n }\n\n var tokens = {};\n\n function addParseToken (token, callback) {\n var i, func = callback;\n if (typeof token === 'string') {\n token = [token];\n }\n if (typeof callback === 'number') {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n for (i = 0; i < token.length; i++) {\n tokens[token[i]] = func;\n }\n }\n\n function addWeekParseToken (token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n }\n\n function addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n }\n\n var YEAR = 0;\n var MONTH = 1;\n var DATE = 2;\n var HOUR = 3;\n var MINUTE = 4;\n var SECOND = 5;\n var MILLISECOND = 6;\n\n function daysInMonth(year, month) {\n return new Date(Date.UTC(year, month + 1, 0)).getUTCDate();\n }\n\n // FORMATTING\n\n addFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n });\n\n addFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n });\n\n addFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n });\n\n // ALIASES\n\n addUnitAlias('month', 'M');\n\n // PARSING\n\n addRegexToken('M', match1to2);\n addRegexToken('MM', match1to2, match2);\n addRegexToken('MMM', matchWord);\n addRegexToken('MMMM', matchWord);\n\n addParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n });\n\n addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict);\n // if we didn't find a month name, mark the date as invalid.\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n });\n\n // LOCALES\n\n var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_');\n function localeMonths (m) {\n return this._months[m.month()];\n }\n\n var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_');\n function localeMonthsShort (m) {\n return this._monthsShort[m.month()];\n }\n\n function localeMonthsParse (monthName, format, strict) {\n var i, mom, regex;\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n }\n\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = create_utc__createUTC([2000, i]);\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i');\n this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i');\n }\n if (!strict && !this._monthsParse[i]) {\n regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) {\n return i;\n } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n }\n\n // MOMENTS\n\n function setMonth (mom, value) {\n var dayOfMonth;\n\n // TODO: Move this out of here!\n if (typeof value === 'string') {\n value = mom.localeData().monthsParse(value);\n // TODO: Another silent failure?\n if (typeof value !== 'number') {\n return mom;\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n return mom;\n }\n\n function getSetMonth (value) {\n if (value != null) {\n setMonth(this, value);\n utils_hooks__hooks.updateOffset(this, true);\n return this;\n } else {\n return get_set__get(this, 'Month');\n }\n }\n\n function getDaysInMonth () {\n return daysInMonth(this.year(), this.month());\n }\n\n function checkOverflow (m) {\n var overflow;\n var a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow =\n a[MONTH] < 0 || a[MONTH] > 11 ? MONTH :\n a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE :\n a[HOUR] < 0 || a[HOUR] > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR :\n a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE :\n a[SECOND] < 0 || a[SECOND] > 59 ? SECOND :\n a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND :\n -1;\n\n if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {\n overflow = DATE;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n }\n\n function warn(msg) {\n if (utils_hooks__hooks.suppressDeprecationWarnings === false && typeof console !== 'undefined' && console.warn) {\n console.warn('Deprecation warning: ' + msg);\n }\n }\n\n function deprecate(msg, fn) {\n var firstTime = true;\n\n return extend(function () {\n if (firstTime) {\n warn(msg + '\\n' + (new Error()).stack);\n firstTime = false;\n }\n return fn.apply(this, arguments);\n }, fn);\n }\n\n var deprecations = {};\n\n function deprecateSimple(name, msg) {\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n }\n\n utils_hooks__hooks.suppressDeprecationWarnings = false;\n\n var from_string__isoRegex = /^\\s*(?:[+-]\\d{6}|\\d{4})-(?:(\\d\\d-\\d\\d)|(W\\d\\d$)|(W\\d\\d-\\d)|(\\d\\d\\d))((T| )(\\d\\d(:\\d\\d(:\\d\\d(\\.\\d+)?)?)?)?([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/;\n\n var isoDates = [\n ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d{2}-\\d{2}/],\n ['YYYY-MM-DD', /\\d{4}-\\d{2}-\\d{2}/],\n ['GGGG-[W]WW-E', /\\d{4}-W\\d{2}-\\d/],\n ['GGGG-[W]WW', /\\d{4}-W\\d{2}/],\n ['YYYY-DDD', /\\d{4}-\\d{3}/]\n ];\n\n // iso time formats and regexes\n var isoTimes = [\n ['HH:mm:ss.SSSS', /(T| )\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n ['HH:mm:ss', /(T| )\\d\\d:\\d\\d:\\d\\d/],\n ['HH:mm', /(T| )\\d\\d:\\d\\d/],\n ['HH', /(T| )\\d\\d/]\n ];\n\n var aspNetJsonRegex = /^\\/?Date\\((\\-?\\d+)/i;\n\n // date from iso format\n function configFromISO(config) {\n var i, l,\n string = config._i,\n match = from_string__isoRegex.exec(string);\n\n if (match) {\n getParsingFlags(config).iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n config._f = isoDates[i][0];\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n // match[6] should be 'T' or space\n config._f += (match[6] || ' ') + isoTimes[i][0];\n break;\n }\n }\n if (string.match(matchOffset)) {\n config._f += 'Z';\n }\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }\n\n // date from iso format or fallback\n function configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n utils_hooks__hooks.createFromInputFallback(config);\n }\n }\n\n utils_hooks__hooks.createFromInputFallback = deprecate(\n 'moment construction falls back to js Date. This is ' +\n 'discouraged and will be removed in upcoming major ' +\n 'release. Please refer to ' +\n 'https://github.com/moment/moment/issues/1407 for more info.',\n function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }\n );\n\n function createDate (y, m, d, h, M, s, ms) {\n //can't just apply() to create a date:\n //http://stackoverflow.com/questions/181348/instantiating-a-javascript-object-by-calling-prototype-constructor-apply\n var date = new Date(y, m, d, h, M, s, ms);\n\n //the date constructor doesn't accept years < 1970\n if (y < 1970) {\n date.setFullYear(y);\n }\n return date;\n }\n\n function createUTCDate (y) {\n var date = new Date(Date.UTC.apply(null, arguments));\n if (y < 1970) {\n date.setUTCFullYear(y);\n }\n return date;\n }\n\n addFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n });\n\n addFormatToken(0, ['YYYY', 4], 0, 'year');\n addFormatToken(0, ['YYYYY', 5], 0, 'year');\n addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n // ALIASES\n\n addUnitAlias('year', 'y');\n\n // PARSING\n\n addRegexToken('Y', matchSigned);\n addRegexToken('YY', match1to2, match2);\n addRegexToken('YYYY', match1to4, match4);\n addRegexToken('YYYYY', match1to6, match6);\n addRegexToken('YYYYYY', match1to6, match6);\n\n addParseToken(['YYYYY', 'YYYYYY'], YEAR);\n addParseToken('YYYY', function (input, array) {\n array[YEAR] = input.length === 2 ? utils_hooks__hooks.parseTwoDigitYear(input) : toInt(input);\n });\n addParseToken('YY', function (input, array) {\n array[YEAR] = utils_hooks__hooks.parseTwoDigitYear(input);\n });\n\n // HELPERS\n\n function daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n }\n\n function isLeapYear(year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n }\n\n // HOOKS\n\n utils_hooks__hooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n };\n\n // MOMENTS\n\n var getSetYear = makeGetSet('FullYear', false);\n\n function getIsLeapYear () {\n return isLeapYear(this.year());\n }\n\n addFormatToken('w', ['ww', 2], 'wo', 'week');\n addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n // ALIASES\n\n addUnitAlias('week', 'w');\n addUnitAlias('isoWeek', 'W');\n\n // PARSING\n\n addRegexToken('w', match1to2);\n addRegexToken('ww', match1to2, match2);\n addRegexToken('W', match1to2);\n addRegexToken('WW', match1to2, match2);\n\n addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n });\n\n // HELPERS\n\n // firstDayOfWeek 0 = sun, 6 = sat\n // the day of the week that starts the week\n // (usually sunday or monday)\n // firstDayOfWeekOfYear 0 = sun, 6 = sat\n // the first week is the week that contains the first\n // of this day of the week\n // (eg. ISO weeks use thursday (4))\n function weekOfYear(mom, firstDayOfWeek, firstDayOfWeekOfYear) {\n var end = firstDayOfWeekOfYear - firstDayOfWeek,\n daysToDayOfWeek = firstDayOfWeekOfYear - mom.day(),\n adjustedMoment;\n\n\n if (daysToDayOfWeek > end) {\n daysToDayOfWeek -= 7;\n }\n\n if (daysToDayOfWeek < end - 7) {\n daysToDayOfWeek += 7;\n }\n\n adjustedMoment = local__createLocal(mom).add(daysToDayOfWeek, 'd');\n return {\n week: Math.ceil(adjustedMoment.dayOfYear() / 7),\n year: adjustedMoment.year()\n };\n }\n\n // LOCALES\n\n function localeWeek (mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n }\n\n var defaultLocaleWeek = {\n dow : 0, // Sunday is the first day of the week.\n doy : 6 // The week that contains Jan 1st is the first week of the year.\n };\n\n function localeFirstDayOfWeek () {\n return this._week.dow;\n }\n\n function localeFirstDayOfYear () {\n return this._week.doy;\n }\n\n // MOMENTS\n\n function getSetWeek (input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n }\n\n function getSetISOWeek (input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n }\n\n addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n // ALIASES\n\n addUnitAlias('dayOfYear', 'DDD');\n\n // PARSING\n\n addRegexToken('DDD', match1to3);\n addRegexToken('DDDD', match3);\n addParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n });\n\n // HELPERS\n\n //http://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\n function dayOfYearFromWeeks(year, week, weekday, firstDayOfWeekOfYear, firstDayOfWeek) {\n var week1Jan = 6 + firstDayOfWeek - firstDayOfWeekOfYear, janX = createUTCDate(year, 0, 1 + week1Jan), d = janX.getUTCDay(), dayOfYear;\n if (d < firstDayOfWeek) {\n d += 7;\n }\n\n weekday = weekday != null ? 1 * weekday : firstDayOfWeek;\n\n dayOfYear = 1 + week1Jan + 7 * (week - 1) - d + weekday;\n\n return {\n year: dayOfYear > 0 ? year : year - 1,\n dayOfYear: dayOfYear > 0 ? dayOfYear : daysInYear(year - 1) + dayOfYear\n };\n }\n\n // MOMENTS\n\n function getSetDayOfYear (input) {\n var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1;\n return input == null ? dayOfYear : this.add((input - dayOfYear), 'd');\n }\n\n // Pick the first defined of two or three arguments.\n function defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n if (b != null) {\n return b;\n }\n return c;\n }\n\n function currentDateArray(config) {\n var now = new Date();\n if (config._useUTC) {\n return [now.getUTCFullYear(), now.getUTCMonth(), now.getUTCDate()];\n }\n return [now.getFullYear(), now.getMonth(), now.getDate()];\n }\n\n // convert an array to a date.\n // the array should mirror the parameters below\n // note: all values past the year are optional and will default to the lowest possible value.\n // [year, month, day , hour, minute, second, millisecond]\n function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }\n\n function dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp;\n\n w = config._w;\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4;\n\n // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(local__createLocal(), 1, 4).year);\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n\n weekYear = defaults(w.gg, config._a[YEAR], weekOfYear(local__createLocal(), dow, doy).year);\n week = defaults(w.w, 1);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n if (weekday < dow) {\n ++week;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from begining of week\n weekday = w.e + dow;\n } else {\n // default to begining of week\n weekday = dow;\n }\n }\n temp = dayOfYearFromWeeks(weekYear, week, weekday, doy, dow);\n\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n\n utils_hooks__hooks.ISO_8601 = function () {};\n\n // date from string and format string\n function configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === utils_hooks__hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n\n config._a = [];\n getParsingFlags(config).empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n }\n else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (getParsingFlags(config).bigHour === true &&\n config._a[HOUR] <= 12 &&\n config._a[HOUR] > 0) {\n getParsingFlags(config).bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem);\n\n configFromArray(config);\n checkOverflow(config);\n }\n\n\n function meridiemFixWrap (locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n if (isPm && hour < 12) {\n hour += 12;\n }\n if (!isPm && hour === 12) {\n hour = 0;\n }\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n }\n\n function configFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (!valid__isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n //or tokens\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n getParsingFlags(tempConfig).score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }\n\n function configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i);\n config._a = [i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond];\n\n configFromArray(config);\n }\n\n function createFromConfig (config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n }\n\n function prepareConfig (config) {\n var input = config._i,\n format = config._f;\n\n config._locale = config._locale || locale_locales__getLocale(config._l);\n\n if (input === null || (format === undefined && input === '')) {\n return valid__createInvalid({nullInput: true});\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else if (isDate(input)) {\n config._d = input;\n } else {\n configFromInput(config);\n }\n\n return config;\n }\n\n function configFromInput(config) {\n var input = config._i;\n if (input === undefined) {\n config._d = new Date();\n } else if (isDate(input)) {\n config._d = new Date(+input);\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (typeof(input) === 'object') {\n configFromObject(config);\n } else if (typeof(input) === 'number') {\n // from milliseconds\n config._d = new Date(input);\n } else {\n utils_hooks__hooks.createFromInputFallback(config);\n }\n }\n\n function createLocalOrUTC (input, format, locale, strict, isUTC) {\n var c = {};\n\n if (typeof(locale) === 'boolean') {\n strict = locale;\n locale = undefined;\n }\n // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n\n return createFromConfig(c);\n }\n\n function local__createLocal (input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n }\n\n var prototypeMin = deprecate(\n 'moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548',\n function () {\n var other = local__createLocal.apply(null, arguments);\n return other < this ? this : other;\n }\n );\n\n var prototypeMax = deprecate(\n 'moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548',\n function () {\n var other = local__createLocal.apply(null, arguments);\n return other > this ? this : other;\n }\n );\n\n // Pick a moment m from moments so that m[fn](other) is true for all\n // other. This relies on the function fn to be transitive.\n //\n // moments should either be an array of moment objects or an array, whose\n // first element is an array of moment objects.\n function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return local__createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }\n\n // TODO: Use [].sort instead?\n function min () {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isBefore', args);\n }\n\n function max () {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isAfter', args);\n }\n\n function Duration (duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n\n // representation for dateAddRemove\n this._milliseconds = +milliseconds +\n seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 36e5; // 1000 * 60 * 60\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n this._days = +days +\n weeks * 7;\n // It is impossible translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n this._months = +months +\n quarters * 3 +\n years * 12;\n\n this._data = {};\n\n this._locale = locale_locales__getLocale();\n\n this._bubble();\n }\n\n function isDuration (obj) {\n return obj instanceof Duration;\n }\n\n function offset (token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset();\n var sign = '+';\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~(offset) % 60, 2);\n });\n }\n\n offset('Z', ':');\n offset('ZZ', '');\n\n // PARSING\n\n addRegexToken('Z', matchOffset);\n addRegexToken('ZZ', matchOffset);\n addParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(input);\n });\n\n // HELPERS\n\n // timezone chunker\n // '+10:00' > ['10', '00']\n // '-1530' > ['-15', '30']\n var chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\n function offsetFromString(string) {\n var matches = ((string || '').match(matchOffset) || []);\n var chunk = matches[matches.length - 1] || [];\n var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n var minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n return parts[0] === '+' ? minutes : -minutes;\n }\n\n // Return a moment from input, that is local/utc/zone equivalent to model.\n function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n utils_hooks__hooks.updateOffset(res, false);\n return res;\n } else {\n return local__createLocal(input).local();\n }\n }\n\n function getDateOffset (m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset() / 15) * 15;\n }\n\n // HOOKS\n\n // This function will be called whenever a moment is mutated.\n // It is intended to keep the offset in sync with the timezone.\n utils_hooks__hooks.updateOffset = function () {};\n\n // MOMENTS\n\n // keepLocalTime = true means only change the timezone, without\n // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n // +0200, so we adjust the time as needed, to be valid.\n //\n // Keeping the time actually adds/subtracts (one hour)\n // from the actual represented time. That is why we call updateOffset\n // a second time. In case it wants us to change the offset again\n // _changeInProgress == true case, then we have to adjust, because\n // there is no such time in the given timezone.\n function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }\n\n function getSetZone (input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n\n return this;\n } else {\n return -this.utcOffset();\n }\n }\n\n function setOffsetToUTC (keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n }\n\n function setOffsetToLocal (keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n return this;\n }\n\n function setOffsetToParsedOffset () {\n if (this._tzm) {\n this.utcOffset(this._tzm);\n } else if (typeof this._i === 'string') {\n this.utcOffset(offsetFromString(this._i));\n }\n return this;\n }\n\n function hasAlignedHourOffset (input) {\n input = input ? local__createLocal(input).utcOffset() : 0;\n\n return (this.utcOffset() - input) % 60 === 0;\n }\n\n function isDaylightSavingTime () {\n return (\n this.utcOffset() > this.clone().month(0).utcOffset() ||\n this.utcOffset() > this.clone().month(5).utcOffset()\n );\n }\n\n function isDaylightSavingTimeShifted () {\n if (typeof this._isDSTShifted !== 'undefined') {\n return this._isDSTShifted;\n }\n\n var c = {};\n\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n var other = c._isUTC ? create_utc__createUTC(c._a) : local__createLocal(c._a);\n this._isDSTShifted = this.isValid() &&\n compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n }\n\n function isLocal () {\n return !this._isUTC;\n }\n\n function isUtcOffset () {\n return this._isUTC;\n }\n\n function isUtc () {\n return this._isUTC && this._offset === 0;\n }\n\n var aspNetRegex = /(\\-)?(?:(\\d*)\\.)?(\\d+)\\:(\\d+)(?:\\:(\\d+)\\.?(\\d{3})?)?/;\n\n // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n var create__isoRegex = /^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/;\n\n function create__createDuration (input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms : input._milliseconds,\n d : input._days,\n M : input._months\n };\n } else if (typeof input === 'number') {\n duration = {};\n if (key) {\n duration[key] = input;\n } else {\n duration.milliseconds = input;\n }\n } else if (!!(match = aspNetRegex.exec(input))) {\n sign = (match[1] === '-') ? -1 : 1;\n duration = {\n y : 0,\n d : toInt(match[DATE]) * sign,\n h : toInt(match[HOUR]) * sign,\n m : toInt(match[MINUTE]) * sign,\n s : toInt(match[SECOND]) * sign,\n ms : toInt(match[MILLISECOND]) * sign\n };\n } else if (!!(match = create__isoRegex.exec(input))) {\n sign = (match[1] === '-') ? -1 : 1;\n duration = {\n y : parseIso(match[2], sign),\n M : parseIso(match[3], sign),\n d : parseIso(match[4], sign),\n h : parseIso(match[5], sign),\n m : parseIso(match[6], sign),\n s : parseIso(match[7], sign),\n w : parseIso(match[8], sign)\n };\n } else if (duration == null) {// checks for null or undefined\n duration = {};\n } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) {\n diffRes = momentsDifference(local__createLocal(duration.from), local__createLocal(duration.to));\n\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n return ret;\n }\n\n create__createDuration.fn = Duration.prototype;\n\n function parseIso (inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.'));\n // apply sign while we're at it\n return (isNaN(res) ? 0 : res) * sign;\n }\n\n function positiveMomentsDifference(base, other) {\n var res = {milliseconds: 0, months: 0};\n\n res.months = other.month() - base.month() +\n (other.year() - base.year()) * 12;\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +(base.clone().add(res.months, 'M'));\n\n return res;\n }\n\n function momentsDifference(base, other) {\n var res;\n other = cloneWithOffset(other, base);\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n }\n\n function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period).');\n tmp = val; val = period; period = tmp;\n }\n\n val = typeof val === 'string' ? +val : val;\n dur = create__createDuration(val, period);\n add_subtract__addSubtract(this, dur, direction);\n return this;\n };\n }\n\n function add_subtract__addSubtract (mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = duration._days,\n months = duration._months;\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (milliseconds) {\n mom._d.setTime(+mom._d + milliseconds * isAdding);\n }\n if (days) {\n get_set__set(mom, 'Date', get_set__get(mom, 'Date') + days * isAdding);\n }\n if (months) {\n setMonth(mom, get_set__get(mom, 'Month') + months * isAdding);\n }\n if (updateOffset) {\n utils_hooks__hooks.updateOffset(mom, days || months);\n }\n }\n\n var add_subtract__add = createAdder(1, 'add');\n var add_subtract__subtract = createAdder(-1, 'subtract');\n\n function moment_calendar__calendar (time, formats) {\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || local__createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n diff = this.diff(sod, 'days', true),\n format = diff < -6 ? 'sameElse' :\n diff < -1 ? 'lastWeek' :\n diff < 0 ? 'lastDay' :\n diff < 1 ? 'sameDay' :\n diff < 2 ? 'nextDay' :\n diff < 7 ? 'nextWeek' : 'sameElse';\n return this.format(formats && formats[format] || this.localeData().calendar(format, this, local__createLocal(now)));\n }\n\n function clone () {\n return new Moment(this);\n }\n\n function isAfter (input, units) {\n var inputMs;\n units = normalizeUnits(typeof units !== 'undefined' ? units : 'millisecond');\n if (units === 'millisecond') {\n input = isMoment(input) ? input : local__createLocal(input);\n return +this > +input;\n } else {\n inputMs = isMoment(input) ? +input : +local__createLocal(input);\n return inputMs < +this.clone().startOf(units);\n }\n }\n\n function isBefore (input, units) {\n var inputMs;\n units = normalizeUnits(typeof units !== 'undefined' ? units : 'millisecond');\n if (units === 'millisecond') {\n input = isMoment(input) ? input : local__createLocal(input);\n return +this < +input;\n } else {\n inputMs = isMoment(input) ? +input : +local__createLocal(input);\n return +this.clone().endOf(units) < inputMs;\n }\n }\n\n function isBetween (from, to, units) {\n return this.isAfter(from, units) && this.isBefore(to, units);\n }\n\n function isSame (input, units) {\n var inputMs;\n units = normalizeUnits(units || 'millisecond');\n if (units === 'millisecond') {\n input = isMoment(input) ? input : local__createLocal(input);\n return +this === +input;\n } else {\n inputMs = +local__createLocal(input);\n return +(this.clone().startOf(units)) <= inputMs && inputMs <= +(this.clone().endOf(units));\n }\n }\n\n function diff (input, units, asFloat) {\n var that = cloneWithOffset(input, this),\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4,\n delta, output;\n\n units = normalizeUnits(units);\n\n if (units === 'year' || units === 'month' || units === 'quarter') {\n output = monthDiff(this, that);\n if (units === 'quarter') {\n output = output / 3;\n } else if (units === 'year') {\n output = output / 12;\n }\n } else {\n delta = this - that;\n output = units === 'second' ? delta / 1e3 : // 1000\n units === 'minute' ? delta / 6e4 : // 1000 * 60\n units === 'hour' ? delta / 36e5 : // 1000 * 60 * 60\n units === 'day' ? (delta - zoneDelta) / 864e5 : // 1000 * 60 * 60 * 24, negate dst\n units === 'week' ? (delta - zoneDelta) / 6048e5 : // 1000 * 60 * 60 * 24 * 7, negate dst\n delta;\n }\n return asFloat ? output : absFloor(output);\n }\n\n function monthDiff (a, b) {\n // difference in months\n var wholeMonthDiff = ((b.year() - a.year()) * 12) + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2, adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor2 - anchor);\n }\n\n return -(wholeMonthDiff + adjust);\n }\n\n utils_hooks__hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\n\n function toString () {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n }\n\n function moment_format__toISOString () {\n var m = this.clone().utc();\n if (0 < m.year() && m.year() <= 9999) {\n if ('function' === typeof Date.prototype.toISOString) {\n // native implementation is ~50x faster, use it when we can\n return this.toDate().toISOString();\n } else {\n return formatMoment(m, 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]');\n }\n } else {\n return formatMoment(m, 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]');\n }\n }\n\n function format (inputString) {\n var output = formatMoment(this, inputString || utils_hooks__hooks.defaultFormat);\n return this.localeData().postformat(output);\n }\n\n function from (time, withoutSuffix) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n return create__createDuration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix);\n }\n\n function fromNow (withoutSuffix) {\n return this.from(local__createLocal(), withoutSuffix);\n }\n\n function to (time, withoutSuffix) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n return create__createDuration({from: this, to: time}).locale(this.locale()).humanize(!withoutSuffix);\n }\n\n function toNow (withoutSuffix) {\n return this.to(local__createLocal(), withoutSuffix);\n }\n\n function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = locale_locales__getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n }\n\n var lang = deprecate(\n 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n }\n );\n\n function localeData () {\n return this._locale;\n }\n\n function startOf (units) {\n units = normalizeUnits(units);\n // the following switch intentionally omits break keywords\n // to utilize falling through the cases.\n switch (units) {\n case 'year':\n this.month(0);\n /* falls through */\n case 'quarter':\n case 'month':\n this.date(1);\n /* falls through */\n case 'week':\n case 'isoWeek':\n case 'day':\n this.hours(0);\n /* falls through */\n case 'hour':\n this.minutes(0);\n /* falls through */\n case 'minute':\n this.seconds(0);\n /* falls through */\n case 'second':\n this.milliseconds(0);\n }\n\n // weeks are a special case\n if (units === 'week') {\n this.weekday(0);\n }\n if (units === 'isoWeek') {\n this.isoWeekday(1);\n }\n\n // quarters are also special\n if (units === 'quarter') {\n this.month(Math.floor(this.month() / 3) * 3);\n }\n\n return this;\n }\n\n function endOf (units) {\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond') {\n return this;\n }\n return this.startOf(units).add(1, (units === 'isoWeek' ? 'week' : units)).subtract(1, 'ms');\n }\n\n function to_type__valueOf () {\n return +this._d - ((this._offset || 0) * 60000);\n }\n\n function unix () {\n return Math.floor(+this / 1000);\n }\n\n function toDate () {\n return this._offset ? new Date(+this) : this._d;\n }\n\n function toArray () {\n var m = this;\n return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()];\n }\n\n function toObject () {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds()\n };\n }\n\n function moment_valid__isValid () {\n return valid__isValid(this);\n }\n\n function parsingFlags () {\n return extend({}, getParsingFlags(this));\n }\n\n function invalidAt () {\n return getParsingFlags(this).overflow;\n }\n\n addFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n });\n\n addFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n });\n\n function addWeekYearFormatToken (token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n }\n\n addWeekYearFormatToken('gggg', 'weekYear');\n addWeekYearFormatToken('ggggg', 'weekYear');\n addWeekYearFormatToken('GGGG', 'isoWeekYear');\n addWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n // ALIASES\n\n addUnitAlias('weekYear', 'gg');\n addUnitAlias('isoWeekYear', 'GG');\n\n // PARSING\n\n addRegexToken('G', matchSigned);\n addRegexToken('g', matchSigned);\n addRegexToken('GG', match1to2, match2);\n addRegexToken('gg', match1to2, match2);\n addRegexToken('GGGG', match1to4, match4);\n addRegexToken('gggg', match1to4, match4);\n addRegexToken('GGGGG', match1to6, match6);\n addRegexToken('ggggg', match1to6, match6);\n\n addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n });\n\n addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = utils_hooks__hooks.parseTwoDigitYear(input);\n });\n\n // HELPERS\n\n function weeksInYear(year, dow, doy) {\n return weekOfYear(local__createLocal([year, 11, 31 + dow - doy]), dow, doy).week;\n }\n\n // MOMENTS\n\n function getSetWeekYear (input) {\n var year = weekOfYear(this, this.localeData()._week.dow, this.localeData()._week.doy).year;\n return input == null ? year : this.add((input - year), 'y');\n }\n\n function getSetISOWeekYear (input) {\n var year = weekOfYear(this, 1, 4).year;\n return input == null ? year : this.add((input - year), 'y');\n }\n\n function getISOWeeksInYear () {\n return weeksInYear(this.year(), 1, 4);\n }\n\n function getWeeksInYear () {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n }\n\n addFormatToken('Q', 0, 0, 'quarter');\n\n // ALIASES\n\n addUnitAlias('quarter', 'Q');\n\n // PARSING\n\n addRegexToken('Q', match1);\n addParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n });\n\n // MOMENTS\n\n function getSetQuarter (input) {\n return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3);\n }\n\n addFormatToken('D', ['DD', 2], 'Do', 'date');\n\n // ALIASES\n\n addUnitAlias('date', 'D');\n\n // PARSING\n\n addRegexToken('D', match1to2);\n addRegexToken('DD', match1to2, match2);\n addRegexToken('Do', function (isStrict, locale) {\n return isStrict ? locale._ordinalParse : locale._ordinalParseLenient;\n });\n\n addParseToken(['D', 'DD'], DATE);\n addParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0], 10);\n });\n\n // MOMENTS\n\n var getSetDayOfMonth = makeGetSet('Date', true);\n\n addFormatToken('d', 0, 'do', 'day');\n\n addFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n });\n\n addFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n });\n\n addFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n });\n\n addFormatToken('e', 0, 0, 'weekday');\n addFormatToken('E', 0, 0, 'isoWeekday');\n\n // ALIASES\n\n addUnitAlias('day', 'd');\n addUnitAlias('weekday', 'e');\n addUnitAlias('isoWeekday', 'E');\n\n // PARSING\n\n addRegexToken('d', match1to2);\n addRegexToken('e', match1to2);\n addRegexToken('E', match1to2);\n addRegexToken('dd', matchWord);\n addRegexToken('ddd', matchWord);\n addRegexToken('dddd', matchWord);\n\n addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config) {\n var weekday = config._locale.weekdaysParse(input);\n // if we didn't get a weekday name, mark the date as invalid\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n });\n\n addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n });\n\n // HELPERS\n\n function parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n }\n\n // LOCALES\n\n var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_');\n function localeWeekdays (m) {\n return this._weekdays[m.day()];\n }\n\n var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_');\n function localeWeekdaysShort (m) {\n return this._weekdaysShort[m.day()];\n }\n\n var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_');\n function localeWeekdaysMin (m) {\n return this._weekdaysMin[m.day()];\n }\n\n function localeWeekdaysParse (weekdayName) {\n var i, mom, regex;\n\n this._weekdaysParse = this._weekdaysParse || [];\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n if (!this._weekdaysParse[i]) {\n mom = local__createLocal([2000, 1]).day(i);\n regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n }\n\n // MOMENTS\n\n function getSetDayOfWeek (input) {\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n }\n\n function getSetLocaleDayOfWeek (input) {\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n }\n\n function getSetISODayOfWeek (input) {\n // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n return input == null ? this.day() || 7 : this.day(this.day() % 7 ? input : input - 7);\n }\n\n addFormatToken('H', ['HH', 2], 0, 'hour');\n addFormatToken('h', ['hh', 2], 0, function () {\n return this.hours() % 12 || 12;\n });\n\n function meridiem (token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(this.hours(), this.minutes(), lowercase);\n });\n }\n\n meridiem('a', true);\n meridiem('A', false);\n\n // ALIASES\n\n addUnitAlias('hour', 'h');\n\n // PARSING\n\n function matchMeridiem (isStrict, locale) {\n return locale._meridiemParse;\n }\n\n addRegexToken('a', matchMeridiem);\n addRegexToken('A', matchMeridiem);\n addRegexToken('H', match1to2);\n addRegexToken('h', match1to2);\n addRegexToken('HH', match1to2, match2);\n addRegexToken('hh', match1to2, match2);\n\n addParseToken(['H', 'HH'], HOUR);\n addParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n });\n addParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n });\n\n // LOCALES\n\n function localeIsPM (input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return ((input + '').toLowerCase().charAt(0) === 'p');\n }\n\n var defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i;\n function localeMeridiem (hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n }\n\n\n // MOMENTS\n\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour he wants. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n var getSetHour = makeGetSet('Hours', true);\n\n addFormatToken('m', ['mm', 2], 0, 'minute');\n\n // ALIASES\n\n addUnitAlias('minute', 'm');\n\n // PARSING\n\n addRegexToken('m', match1to2);\n addRegexToken('mm', match1to2, match2);\n addParseToken(['m', 'mm'], MINUTE);\n\n // MOMENTS\n\n var getSetMinute = makeGetSet('Minutes', false);\n\n addFormatToken('s', ['ss', 2], 0, 'second');\n\n // ALIASES\n\n addUnitAlias('second', 's');\n\n // PARSING\n\n addRegexToken('s', match1to2);\n addRegexToken('ss', match1to2, match2);\n addParseToken(['s', 'ss'], SECOND);\n\n // MOMENTS\n\n var getSetSecond = makeGetSet('Seconds', false);\n\n addFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n });\n\n addFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n });\n\n addFormatToken(0, ['SSS', 3], 0, 'millisecond');\n addFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n });\n addFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n });\n addFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n });\n addFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n });\n addFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n });\n addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n });\n\n\n // ALIASES\n\n addUnitAlias('millisecond', 'ms');\n\n // PARSING\n\n addRegexToken('S', match1to3, match1);\n addRegexToken('SS', match1to3, match2);\n addRegexToken('SSS', match1to3, match3);\n\n var token;\n for (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n }\n\n function parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n }\n\n for (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n }\n // MOMENTS\n\n var getSetMillisecond = makeGetSet('Milliseconds', false);\n\n addFormatToken('z', 0, 0, 'zoneAbbr');\n addFormatToken('zz', 0, 0, 'zoneName');\n\n // MOMENTS\n\n function getZoneAbbr () {\n return this._isUTC ? 'UTC' : '';\n }\n\n function getZoneName () {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n }\n\n var momentPrototype__proto = Moment.prototype;\n\n momentPrototype__proto.add = add_subtract__add;\n momentPrototype__proto.calendar = moment_calendar__calendar;\n momentPrototype__proto.clone = clone;\n momentPrototype__proto.diff = diff;\n momentPrototype__proto.endOf = endOf;\n momentPrototype__proto.format = format;\n momentPrototype__proto.from = from;\n momentPrototype__proto.fromNow = fromNow;\n momentPrototype__proto.to = to;\n momentPrototype__proto.toNow = toNow;\n momentPrototype__proto.get = getSet;\n momentPrototype__proto.invalidAt = invalidAt;\n momentPrototype__proto.isAfter = isAfter;\n momentPrototype__proto.isBefore = isBefore;\n momentPrototype__proto.isBetween = isBetween;\n momentPrototype__proto.isSame = isSame;\n momentPrototype__proto.isValid = moment_valid__isValid;\n momentPrototype__proto.lang = lang;\n momentPrototype__proto.locale = locale;\n momentPrototype__proto.localeData = localeData;\n momentPrototype__proto.max = prototypeMax;\n momentPrototype__proto.min = prototypeMin;\n momentPrototype__proto.parsingFlags = parsingFlags;\n momentPrototype__proto.set = getSet;\n momentPrototype__proto.startOf = startOf;\n momentPrototype__proto.subtract = add_subtract__subtract;\n momentPrototype__proto.toArray = toArray;\n momentPrototype__proto.toObject = toObject;\n momentPrototype__proto.toDate = toDate;\n momentPrototype__proto.toISOString = moment_format__toISOString;\n momentPrototype__proto.toJSON = moment_format__toISOString;\n momentPrototype__proto.toString = toString;\n momentPrototype__proto.unix = unix;\n momentPrototype__proto.valueOf = to_type__valueOf;\n\n // Year\n momentPrototype__proto.year = getSetYear;\n momentPrototype__proto.isLeapYear = getIsLeapYear;\n\n // Week Year\n momentPrototype__proto.weekYear = getSetWeekYear;\n momentPrototype__proto.isoWeekYear = getSetISOWeekYear;\n\n // Quarter\n momentPrototype__proto.quarter = momentPrototype__proto.quarters = getSetQuarter;\n\n // Month\n momentPrototype__proto.month = getSetMonth;\n momentPrototype__proto.daysInMonth = getDaysInMonth;\n\n // Week\n momentPrototype__proto.week = momentPrototype__proto.weeks = getSetWeek;\n momentPrototype__proto.isoWeek = momentPrototype__proto.isoWeeks = getSetISOWeek;\n momentPrototype__proto.weeksInYear = getWeeksInYear;\n momentPrototype__proto.isoWeeksInYear = getISOWeeksInYear;\n\n // Day\n momentPrototype__proto.date = getSetDayOfMonth;\n momentPrototype__proto.day = momentPrototype__proto.days = getSetDayOfWeek;\n momentPrototype__proto.weekday = getSetLocaleDayOfWeek;\n momentPrototype__proto.isoWeekday = getSetISODayOfWeek;\n momentPrototype__proto.dayOfYear = getSetDayOfYear;\n\n // Hour\n momentPrototype__proto.hour = momentPrototype__proto.hours = getSetHour;\n\n // Minute\n momentPrototype__proto.minute = momentPrototype__proto.minutes = getSetMinute;\n\n // Second\n momentPrototype__proto.second = momentPrototype__proto.seconds = getSetSecond;\n\n // Millisecond\n momentPrototype__proto.millisecond = momentPrototype__proto.milliseconds = getSetMillisecond;\n\n // Offset\n momentPrototype__proto.utcOffset = getSetOffset;\n momentPrototype__proto.utc = setOffsetToUTC;\n momentPrototype__proto.local = setOffsetToLocal;\n momentPrototype__proto.parseZone = setOffsetToParsedOffset;\n momentPrototype__proto.hasAlignedHourOffset = hasAlignedHourOffset;\n momentPrototype__proto.isDST = isDaylightSavingTime;\n momentPrototype__proto.isDSTShifted = isDaylightSavingTimeShifted;\n momentPrototype__proto.isLocal = isLocal;\n momentPrototype__proto.isUtcOffset = isUtcOffset;\n momentPrototype__proto.isUtc = isUtc;\n momentPrototype__proto.isUTC = isUtc;\n\n // Timezone\n momentPrototype__proto.zoneAbbr = getZoneAbbr;\n momentPrototype__proto.zoneName = getZoneName;\n\n // Deprecations\n momentPrototype__proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth);\n momentPrototype__proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth);\n momentPrototype__proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear);\n momentPrototype__proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779', getSetZone);\n\n var momentPrototype = momentPrototype__proto;\n\n function moment__createUnix (input) {\n return local__createLocal(input * 1000);\n }\n\n function moment__createInZone () {\n return local__createLocal.apply(null, arguments).parseZone();\n }\n\n var defaultCalendar = {\n sameDay : '[Today at] LT',\n nextDay : '[Tomorrow at] LT',\n nextWeek : 'dddd [at] LT',\n lastDay : '[Yesterday at] LT',\n lastWeek : '[Last] dddd [at] LT',\n sameElse : 'L'\n };\n\n function locale_calendar__calendar (key, mom, now) {\n var output = this._calendar[key];\n return typeof output === 'function' ? output.call(mom, now) : output;\n }\n\n var defaultLongDateFormat = {\n LTS : 'h:mm:ss A',\n LT : 'h:mm A',\n L : 'MM/DD/YYYY',\n LL : 'MMMM D, YYYY',\n LLL : 'MMMM D, YYYY h:mm A',\n LLLL : 'dddd, MMMM D, YYYY h:mm A'\n };\n\n function longDateFormat (key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) {\n return val.slice(1);\n });\n\n return this._longDateFormat[key];\n }\n\n var defaultInvalidDate = 'Invalid date';\n\n function invalidDate () {\n return this._invalidDate;\n }\n\n var defaultOrdinal = '%d';\n var defaultOrdinalParse = /\\d{1,2}/;\n\n function ordinal (number) {\n return this._ordinal.replace('%d', number);\n }\n\n function preParsePostFormat (string) {\n return string;\n }\n\n var defaultRelativeTime = {\n future : 'in %s',\n past : '%s ago',\n s : 'a few seconds',\n m : 'a minute',\n mm : '%d minutes',\n h : 'an hour',\n hh : '%d hours',\n d : 'a day',\n dd : '%d days',\n M : 'a month',\n MM : '%d months',\n y : 'a year',\n yy : '%d years'\n };\n\n function relative__relativeTime (number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return (typeof output === 'function') ?\n output(number, withoutSuffix, string, isFuture) :\n output.replace(/%d/i, number);\n }\n\n function pastFuture (diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return typeof format === 'function' ? format(output) : format.replace(/%s/i, output);\n }\n\n function locale_set__set (config) {\n var prop, i;\n for (i in config) {\n prop = config[i];\n if (typeof prop === 'function') {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _ordinalParseLenient.\n this._ordinalParseLenient = new RegExp(this._ordinalParse.source + '|' + (/\\d{1,2}/).source);\n }\n\n var prototype__proto = Locale.prototype;\n\n prototype__proto._calendar = defaultCalendar;\n prototype__proto.calendar = locale_calendar__calendar;\n prototype__proto._longDateFormat = defaultLongDateFormat;\n prototype__proto.longDateFormat = longDateFormat;\n prototype__proto._invalidDate = defaultInvalidDate;\n prototype__proto.invalidDate = invalidDate;\n prototype__proto._ordinal = defaultOrdinal;\n prototype__proto.ordinal = ordinal;\n prototype__proto._ordinalParse = defaultOrdinalParse;\n prototype__proto.preparse = preParsePostFormat;\n prototype__proto.postformat = preParsePostFormat;\n prototype__proto._relativeTime = defaultRelativeTime;\n prototype__proto.relativeTime = relative__relativeTime;\n prototype__proto.pastFuture = pastFuture;\n prototype__proto.set = locale_set__set;\n\n // Month\n prototype__proto.months = localeMonths;\n prototype__proto._months = defaultLocaleMonths;\n prototype__proto.monthsShort = localeMonthsShort;\n prototype__proto._monthsShort = defaultLocaleMonthsShort;\n prototype__proto.monthsParse = localeMonthsParse;\n\n // Week\n prototype__proto.week = localeWeek;\n prototype__proto._week = defaultLocaleWeek;\n prototype__proto.firstDayOfYear = localeFirstDayOfYear;\n prototype__proto.firstDayOfWeek = localeFirstDayOfWeek;\n\n // Day of Week\n prototype__proto.weekdays = localeWeekdays;\n prototype__proto._weekdays = defaultLocaleWeekdays;\n prototype__proto.weekdaysMin = localeWeekdaysMin;\n prototype__proto._weekdaysMin = defaultLocaleWeekdaysMin;\n prototype__proto.weekdaysShort = localeWeekdaysShort;\n prototype__proto._weekdaysShort = defaultLocaleWeekdaysShort;\n prototype__proto.weekdaysParse = localeWeekdaysParse;\n\n // Hours\n prototype__proto.isPM = localeIsPM;\n prototype__proto._meridiemParse = defaultLocaleMeridiemParse;\n prototype__proto.meridiem = localeMeridiem;\n\n function lists__get (format, index, field, setter) {\n var locale = locale_locales__getLocale();\n var utc = create_utc__createUTC().set(setter, index);\n return locale[field](utc, format);\n }\n\n function list (format, index, field, count, setter) {\n if (typeof format === 'number') {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return lists__get(format, index, field, setter);\n }\n\n var i;\n var out = [];\n for (i = 0; i < count; i++) {\n out[i] = lists__get(format, i, field, setter);\n }\n return out;\n }\n\n function lists__listMonths (format, index) {\n return list(format, index, 'months', 12, 'month');\n }\n\n function lists__listMonthsShort (format, index) {\n return list(format, index, 'monthsShort', 12, 'month');\n }\n\n function lists__listWeekdays (format, index) {\n return list(format, index, 'weekdays', 7, 'day');\n }\n\n function lists__listWeekdaysShort (format, index) {\n return list(format, index, 'weekdaysShort', 7, 'day');\n }\n\n function lists__listWeekdaysMin (format, index) {\n return list(format, index, 'weekdaysMin', 7, 'day');\n }\n\n locale_locales__getSetGlobalLocale('en', {\n ordinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal : function (number) {\n var b = number % 10,\n output = (toInt(number % 100 / 10) === 1) ? 'th' :\n (b === 1) ? 'st' :\n (b === 2) ? 'nd' :\n (b === 3) ? 'rd' : 'th';\n return number + output;\n }\n });\n\n // Side effect imports\n utils_hooks__hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', locale_locales__getSetGlobalLocale);\n utils_hooks__hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', locale_locales__getLocale);\n\n var mathAbs = Math.abs;\n\n function duration_abs__abs () {\n var data = this._data;\n\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n\n return this;\n }\n\n function duration_add_subtract__addSubtract (duration, input, value, direction) {\n var other = create__createDuration(input, value);\n\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n\n return duration._bubble();\n }\n\n // supports only 2.0-style add(1, 's') or add(duration)\n function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }\n\n // supports only 2.0-style subtract(1, 's') or subtract(duration)\n function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }\n\n function absCeil (number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n }\n\n function bubble () {\n var milliseconds = this._milliseconds;\n var days = this._days;\n var months = this._months;\n var data = this._data;\n var seconds, minutes, hours, years, monthsFromDays;\n\n // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n if (!((milliseconds >= 0 && days >= 0 && months >= 0) ||\n (milliseconds <= 0 && days <= 0 && months <= 0))) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n }\n\n // The following code bubbles up values, see the tests for\n // examples of what that means.\n data.milliseconds = milliseconds % 1000;\n\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n\n days += absFloor(hours / 24);\n\n // convert days to months\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays));\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n data.days = days;\n data.months = months;\n data.years = years;\n\n return this;\n }\n\n function daysToMonths (days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return days * 4800 / 146097;\n }\n\n function monthsToDays (months) {\n // the reverse of daysToMonths\n return months * 146097 / 4800;\n }\n\n function as (units) {\n var days;\n var months;\n var milliseconds = this._milliseconds;\n\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n return units === 'month' ? months : months / 12;\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n switch (units) {\n case 'week' : return days / 7 + milliseconds / 6048e5;\n case 'day' : return days + milliseconds / 864e5;\n case 'hour' : return days * 24 + milliseconds / 36e5;\n case 'minute' : return days * 1440 + milliseconds / 6e4;\n case 'second' : return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n case 'millisecond': return Math.floor(days * 864e5) + milliseconds;\n default: throw new Error('Unknown unit ' + units);\n }\n }\n }\n\n // TODO: Use this.as('ms')?\n function duration_as__valueOf () {\n return (\n this._milliseconds +\n this._days * 864e5 +\n (this._months % 12) * 2592e6 +\n toInt(this._months / 12) * 31536e6\n );\n }\n\n function makeAs (alias) {\n return function () {\n return this.as(alias);\n };\n }\n\n var asMilliseconds = makeAs('ms');\n var asSeconds = makeAs('s');\n var asMinutes = makeAs('m');\n var asHours = makeAs('h');\n var asDays = makeAs('d');\n var asWeeks = makeAs('w');\n var asMonths = makeAs('M');\n var asYears = makeAs('y');\n\n function duration_get__get (units) {\n units = normalizeUnits(units);\n return this[units + 's']();\n }\n\n function makeGetter(name) {\n return function () {\n return this._data[name];\n };\n }\n\n var milliseconds = makeGetter('milliseconds');\n var seconds = makeGetter('seconds');\n var minutes = makeGetter('minutes');\n var hours = makeGetter('hours');\n var days = makeGetter('days');\n var months = makeGetter('months');\n var years = makeGetter('years');\n\n function weeks () {\n return absFloor(this.days() / 7);\n }\n\n var round = Math.round;\n var thresholds = {\n s: 45, // seconds to minute\n m: 45, // minutes to hour\n h: 22, // hours to day\n d: 26, // days to month\n M: 11 // months to year\n };\n\n // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\n function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n }\n\n function duration_humanize__relativeTime (posNegDuration, withoutSuffix, locale) {\n var duration = create__createDuration(posNegDuration).abs();\n var seconds = round(duration.as('s'));\n var minutes = round(duration.as('m'));\n var hours = round(duration.as('h'));\n var days = round(duration.as('d'));\n var months = round(duration.as('M'));\n var years = round(duration.as('y'));\n\n var a = seconds < thresholds.s && ['s', seconds] ||\n minutes === 1 && ['m'] ||\n minutes < thresholds.m && ['mm', minutes] ||\n hours === 1 && ['h'] ||\n hours < thresholds.h && ['hh', hours] ||\n days === 1 && ['d'] ||\n days < thresholds.d && ['dd', days] ||\n months === 1 && ['M'] ||\n months < thresholds.M && ['MM', months] ||\n years === 1 && ['y'] || ['yy', years];\n\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n }\n\n // This function allows you to set a threshold for relative time strings\n function duration_humanize__getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n return true;\n }\n\n function humanize (withSuffix) {\n var locale = this.localeData();\n var output = duration_humanize__relativeTime(this, !withSuffix, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n }\n\n var iso_string__abs = Math.abs;\n\n function iso_string__toISOString() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n var seconds = iso_string__abs(this._milliseconds) / 1000;\n var days = iso_string__abs(this._days);\n var months = iso_string__abs(this._months);\n var minutes, hours, years;\n\n // 3600 seconds -> 60 minutes -> 1 hour\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60;\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n\n // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n var Y = years;\n var M = months;\n var D = days;\n var h = hours;\n var m = minutes;\n var s = seconds;\n var total = this.asSeconds();\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n return (total < 0 ? '-' : '') +\n 'P' +\n (Y ? Y + 'Y' : '') +\n (M ? M + 'M' : '') +\n (D ? D + 'D' : '') +\n ((h || m || s) ? 'T' : '') +\n (h ? h + 'H' : '') +\n (m ? m + 'M' : '') +\n (s ? s + 'S' : '');\n }\n\n var duration_prototype__proto = Duration.prototype;\n\n duration_prototype__proto.abs = duration_abs__abs;\n duration_prototype__proto.add = duration_add_subtract__add;\n duration_prototype__proto.subtract = duration_add_subtract__subtract;\n duration_prototype__proto.as = as;\n duration_prototype__proto.asMilliseconds = asMilliseconds;\n duration_prototype__proto.asSeconds = asSeconds;\n duration_prototype__proto.asMinutes = asMinutes;\n duration_prototype__proto.asHours = asHours;\n duration_prototype__proto.asDays = asDays;\n duration_prototype__proto.asWeeks = asWeeks;\n duration_prototype__proto.asMonths = asMonths;\n duration_prototype__proto.asYears = asYears;\n duration_prototype__proto.valueOf = duration_as__valueOf;\n duration_prototype__proto._bubble = bubble;\n duration_prototype__proto.get = duration_get__get;\n duration_prototype__proto.milliseconds = milliseconds;\n duration_prototype__proto.seconds = seconds;\n duration_prototype__proto.minutes = minutes;\n duration_prototype__proto.hours = hours;\n duration_prototype__proto.days = days;\n duration_prototype__proto.weeks = weeks;\n duration_prototype__proto.months = months;\n duration_prototype__proto.years = years;\n duration_prototype__proto.humanize = humanize;\n duration_prototype__proto.toISOString = iso_string__toISOString;\n duration_prototype__proto.toString = iso_string__toISOString;\n duration_prototype__proto.toJSON = iso_string__toISOString;\n duration_prototype__proto.locale = locale;\n duration_prototype__proto.localeData = localeData;\n\n // Deprecations\n duration_prototype__proto.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', iso_string__toISOString);\n duration_prototype__proto.lang = lang;\n\n // Side effect imports\n\n addFormatToken('X', 0, 0, 'unix');\n addFormatToken('x', 0, 0, 'valueOf');\n\n // PARSING\n\n addRegexToken('x', matchSigned);\n addRegexToken('X', matchTimestamp);\n addParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input, 10) * 1000);\n });\n addParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n });\n\n // Side effect imports\n\n\n utils_hooks__hooks.version = '2.10.6';\n\n setHookCallback(local__createLocal);\n\n utils_hooks__hooks.fn = momentPrototype;\n utils_hooks__hooks.min = min;\n utils_hooks__hooks.max = max;\n utils_hooks__hooks.utc = create_utc__createUTC;\n utils_hooks__hooks.unix = moment__createUnix;\n utils_hooks__hooks.months = lists__listMonths;\n utils_hooks__hooks.isDate = isDate;\n utils_hooks__hooks.locale = locale_locales__getSetGlobalLocale;\n utils_hooks__hooks.invalid = valid__createInvalid;\n utils_hooks__hooks.duration = create__createDuration;\n utils_hooks__hooks.isMoment = isMoment;\n utils_hooks__hooks.weekdays = lists__listWeekdays;\n utils_hooks__hooks.parseZone = moment__createInZone;\n utils_hooks__hooks.localeData = locale_locales__getLocale;\n utils_hooks__hooks.isDuration = isDuration;\n utils_hooks__hooks.monthsShort = lists__listMonthsShort;\n utils_hooks__hooks.weekdaysMin = lists__listWeekdaysMin;\n utils_hooks__hooks.defineLocale = defineLocale;\n utils_hooks__hooks.weekdaysShort = lists__listWeekdaysShort;\n utils_hooks__hooks.normalizeUnits = normalizeUnits;\n utils_hooks__hooks.relativeTimeThreshold = duration_humanize__getSetRelativeTimeThreshold;\n\n var _moment = utils_hooks__hooks;\n\n return _moment;\n\n}));"]}