2020-10-19 18:04:01 +02:00
// ==UserScript==
2020-11-04 22:59:32 +01:00
// @name 3CX TAPI
// @namespace http://cp-solutions.at
2020-12-09 10:54:13 +01:00
// @version 7.0.3
2020-11-04 22:59:32 +01:00
// @author Daniel Triendl <d.triendl@cp-solutions.at>
2021-08-27 18:14:41 +02:00
// @copyright Copyright 2021 CP Solutions GmbH
2020-11-04 22:59:32 +01:00
// @source http://scootaloo.cp-austria.at/gitlist/3cx_tapi.git
// @downloadURL http://scootaloo.cp-austria.at/gitlist/3cx_tapi.git/raw/master/3CX_TAPI.user.js
// @match https://192.168.0.154:5001/webclient*
// @match https://cpsolution.my3cx.at:5001/webclient*
// @require https://cdn.jsdelivr.net/gh/CoeJoder/waitForKeyElements.js@v1.2/waitForKeyElements.js
2021-08-27 18:14:41 +02:00
// @require https://cdn.jsdelivr.net/npm/axios@0.21.1/dist/axios.min.js
// @require https://cdn.jsdelivr.net/npm/axios-userscript-adapter@0.1.4/dist/axiosGmxhrAdapter.min.js
// @require file://C:\dev\git\3cx_tapi\dist\index.prod.user.js
// @grant GM.xmlHttpRequest
2020-11-04 22:59:32 +01:00
// @grant GM.notification
2021-08-27 18:14:41 +02:00
// @grant GM.getValue
// @grant GM.setValue
2020-11-04 22:59:32 +01:00
// @connect cpatapi.cpsrvweb2016.cp-austria.at
// @run-at document-end
2020-10-19 18:04:01 +02:00
// ==/UserScript==
2021-08-27 18:14:41 +02:00
/******/ ( function ( ) { // webpackBootstrap
/******/ var _ _webpack _modules _ _ = ( {
/***/ "./node_modules/chrono-node/dist/calculation/mergingCalculation.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / calculation / mergingCalculation . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
2020-10-20 17:47:54 +02:00
2020-11-04 22:59:32 +01:00
"use strict" ;
2021-08-27 18:14:41 +02:00
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
exports . mergeDateTimeComponent = exports . mergeDateTimeResult = void 0 ;
const index _1 = _ _webpack _require _ _ ( /*! ../index */ "./node_modules/chrono-node/dist/index.js" ) ;
function mergeDateTimeResult ( dateResult , timeResult ) {
const result = dateResult . clone ( ) ;
const beginDate = dateResult . start ;
const beginTime = timeResult . start ;
result . start = mergeDateTimeComponent ( beginDate , beginTime ) ;
if ( dateResult . end != null || timeResult . end != null ) {
const endDate = dateResult . end == null ? dateResult . start : dateResult . end ;
const endTime = timeResult . end == null ? timeResult . start : timeResult . end ;
const endDateTime = mergeDateTimeComponent ( endDate , endTime ) ;
if ( dateResult . end == null && endDateTime . date ( ) . getTime ( ) < result . start . date ( ) . getTime ( ) ) {
if ( endDateTime . isCertain ( "day" ) ) {
endDateTime . assign ( "day" , endDateTime . get ( "day" ) + 1 ) ;
} else {
endDateTime . imply ( "day" , endDateTime . get ( "day" ) + 1 ) ;
}
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
result . end = endDateTime ;
}
return result ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
exports . mergeDateTimeResult = mergeDateTimeResult ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
function mergeDateTimeComponent ( dateComponent , timeComponent ) {
const dateTimeComponent = dateComponent . clone ( ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
if ( timeComponent . isCertain ( "hour" ) ) {
dateTimeComponent . assign ( "hour" , timeComponent . get ( "hour" ) ) ;
dateTimeComponent . assign ( "minute" , timeComponent . get ( "minute" ) ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
if ( timeComponent . isCertain ( "second" ) ) {
dateTimeComponent . assign ( "second" , timeComponent . get ( "second" ) ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
if ( timeComponent . isCertain ( "millisecond" ) ) {
dateTimeComponent . assign ( "millisecond" , timeComponent . get ( "millisecond" ) ) ;
} else {
dateTimeComponent . imply ( "millisecond" , timeComponent . get ( "millisecond" ) ) ;
}
} else {
dateTimeComponent . imply ( "second" , timeComponent . get ( "second" ) ) ;
dateTimeComponent . imply ( "millisecond" , timeComponent . get ( "millisecond" ) ) ;
}
} else {
dateTimeComponent . imply ( "hour" , timeComponent . get ( "hour" ) ) ;
dateTimeComponent . imply ( "minute" , timeComponent . get ( "minute" ) ) ;
dateTimeComponent . imply ( "second" , timeComponent . get ( "second" ) ) ;
dateTimeComponent . imply ( "millisecond" , timeComponent . get ( "millisecond" ) ) ;
}
if ( timeComponent . isCertain ( "timezoneOffset" ) ) {
dateTimeComponent . assign ( "timezoneOffset" , timeComponent . get ( "timezoneOffset" ) ) ;
}
if ( timeComponent . isCertain ( "meridiem" ) ) {
dateTimeComponent . assign ( "meridiem" , timeComponent . get ( "meridiem" ) ) ;
} else if ( timeComponent . get ( "meridiem" ) != null && dateTimeComponent . get ( "meridiem" ) == null ) {
dateTimeComponent . imply ( "meridiem" , timeComponent . get ( "meridiem" ) ) ;
}
if ( dateTimeComponent . get ( "meridiem" ) == index _1 . Meridiem . PM && dateTimeComponent . get ( "hour" ) < 12 ) {
if ( timeComponent . isCertain ( "hour" ) ) {
dateTimeComponent . assign ( "hour" , dateTimeComponent . get ( "hour" ) + 12 ) ;
} else {
dateTimeComponent . imply ( "hour" , dateTimeComponent . get ( "hour" ) + 12 ) ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
}
return dateTimeComponent ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
exports . mergeDateTimeComponent = mergeDateTimeComponent ;
2020-11-04 22:59:32 +01:00
/***/ } ) ,
2021-08-27 18:14:41 +02:00
/***/ "./node_modules/chrono-node/dist/calculation/weeks.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / calculation / weeks . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
2020-11-04 22:59:32 +01:00
"use strict" ;
2021-08-27 18:14:41 +02:00
var _ _importDefault = this && this . _ _importDefault || function ( mod ) {
return mod && mod . _ _esModule ? mod : {
"default" : mod
} ;
2020-11-04 22:59:32 +01:00
} ;
2021-08-27 18:14:41 +02:00
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
exports . toDayJSClosestWeekday = exports . toDayJSWeekday = void 0 ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
const dayjs _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! dayjs */ "./node_modules/dayjs/dayjs.min.js" ) ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
function toDayJSWeekday ( refDate , offset , modifier ) {
if ( ! modifier ) {
return toDayJSClosestWeekday ( refDate , offset ) ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
let date = dayjs _1 . default ( refDate ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
switch ( modifier ) {
case "this" :
date = date . day ( offset ) ;
break ;
case "next" :
date = date . day ( offset + 7 ) ;
break ;
case "last" :
date = date . day ( offset - 7 ) ;
break ;
}
return date ;
}
exports . toDayJSWeekday = toDayJSWeekday ;
function toDayJSClosestWeekday ( refDate , offset ) {
let date = dayjs _1 . default ( refDate ) ;
const refOffset = date . day ( ) ;
if ( Math . abs ( offset - 7 - refOffset ) < Math . abs ( offset - refOffset ) ) {
date = date . day ( offset - 7 ) ;
} else if ( Math . abs ( offset + 7 - refOffset ) < Math . abs ( offset - refOffset ) ) {
date = date . day ( offset + 7 ) ;
} else {
date = date . day ( offset ) ;
}
return date ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
exports . toDayJSClosestWeekday = toDayJSClosestWeekday ;
2020-11-04 22:59:32 +01:00
/***/ } ) ,
2021-08-27 18:14:41 +02:00
/***/ "./node_modules/chrono-node/dist/calculation/years.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / calculation / years . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
2020-11-04 22:59:32 +01:00
"use strict" ;
2021-08-27 18:14:41 +02:00
var _ _importDefault = this && this . _ _importDefault || function ( mod ) {
return mod && mod . _ _esModule ? mod : {
"default" : mod
} ;
2020-11-04 22:59:32 +01:00
} ;
2021-08-27 18:14:41 +02:00
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
exports . findYearClosestToRef = exports . findMostLikelyADYear = void 0 ;
const dayjs _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! dayjs */ "./node_modules/dayjs/dayjs.min.js" ) ) ;
function findMostLikelyADYear ( yearNumber ) {
if ( yearNumber < 100 ) {
if ( yearNumber > 50 ) {
yearNumber = yearNumber + 1900 ;
} else {
yearNumber = yearNumber + 2000 ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
}
return yearNumber ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
exports . findMostLikelyADYear = findMostLikelyADYear ;
function findYearClosestToRef ( refDate , day , month ) {
const refMoment = dayjs _1 . default ( refDate ) ;
let dateMoment = refMoment ;
dateMoment = dateMoment . month ( month - 1 ) ;
dateMoment = dateMoment . date ( day ) ;
dateMoment = dateMoment . year ( refMoment . year ( ) ) ;
const nextYear = dateMoment . add ( 1 , "y" ) ;
const lastYear = dateMoment . add ( - 1 , "y" ) ;
if ( Math . abs ( nextYear . diff ( refMoment ) ) < Math . abs ( dateMoment . diff ( refMoment ) ) ) {
dateMoment = nextYear ;
} else if ( Math . abs ( lastYear . diff ( refMoment ) ) < Math . abs ( dateMoment . diff ( refMoment ) ) ) {
dateMoment = lastYear ;
}
return dateMoment . year ( ) ;
}
exports . findYearClosestToRef = findYearClosestToRef ;
2020-11-04 22:59:32 +01:00
/***/ } ) ,
2021-08-27 18:14:41 +02:00
/***/ "./node_modules/chrono-node/dist/chrono.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / chrono . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
2020-11-04 22:59:32 +01:00
"use strict" ;
2021-08-27 18:14:41 +02:00
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
exports . ParsingContext = exports . Chrono = void 0 ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
const results _1 = _ _webpack _require _ _ ( /*! ./results */ "./node_modules/chrono-node/dist/results.js" ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
const en _1 = _ _webpack _require _ _ ( /*! ./locales/en */ "./node_modules/chrono-node/dist/locales/en/index.js" ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
class Chrono {
constructor ( configuration ) {
configuration = configuration || en _1 . createCasualConfiguration ( ) ;
this . parsers = [ ... configuration . parsers ] ;
this . refiners = [ ... configuration . refiners ] ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
clone ( ) {
return new Chrono ( {
parsers : [ ... this . parsers ] ,
refiners : [ ... this . refiners ]
} ) ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
parseDate ( text , referenceDate , option ) {
const results = this . parse ( text , referenceDate , option ) ;
return results . length > 0 ? results [ 0 ] . start . date ( ) : null ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
parse ( text , referenceDate , option ) {
const context = new ParsingContext ( text , referenceDate , option ) ;
let results = [ ] ;
this . parsers . forEach ( parser => {
const parsedResults = Chrono . executeParser ( context , parser ) ;
results = results . concat ( parsedResults ) ;
} ) ;
results . sort ( ( a , b ) => {
return a . index - b . index ;
} ) ;
this . refiners . forEach ( function ( refiner ) {
results = refiner . refine ( context , results ) ;
} ) ;
return results ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
static executeParser ( context , parser ) {
const results = [ ] ;
const pattern = parser . pattern ( context ) ;
const originalText = context . text ;
let remainingText = context . text ;
let match = pattern . exec ( remainingText ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
while ( match ) {
const index = match . index + originalText . length - remainingText . length ;
match . index = index ;
const result = parser . extract ( context , match ) ;
if ( ! result ) {
remainingText = originalText . substring ( match . index + 1 ) ;
match = pattern . exec ( remainingText ) ;
continue ;
}
let parsedResult = null ;
if ( result instanceof results _1 . ParsingResult ) {
parsedResult = result ;
} else if ( result instanceof results _1 . ParsingComponents ) {
parsedResult = context . createParsingResult ( match . index , match [ 0 ] ) ;
parsedResult . start = result ;
} else {
parsedResult = context . createParsingResult ( match . index , match [ 0 ] , result ) ;
}
context . debug ( ( ) => console . log ( ` ${ parser . constructor . name } extracted result ${ parsedResult } ` ) ) ;
results . push ( parsedResult ) ;
remainingText = originalText . substring ( index + parsedResult . text . length ) ;
match = pattern . exec ( remainingText ) ;
}
return results ;
}
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
exports . Chrono = Chrono ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
class ParsingContext {
constructor ( text , refDate , option ) {
this . text = text ;
this . reference = new results _1 . ReferenceWithTimezone ( refDate ) ;
this . option = option !== null && option !== void 0 ? option : { } ;
this . refDate = this . reference . instant ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
createParsingComponents ( components ) {
if ( components instanceof results _1 . ParsingComponents ) {
return components ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
return new results _1 . ParsingComponents ( this . reference , components ) ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
createParsingResult ( index , textOrEndIndex , startComponents , endComponents ) {
const text = typeof textOrEndIndex === "string" ? textOrEndIndex : this . text . substring ( index , textOrEndIndex ) ;
const start = startComponents ? this . createParsingComponents ( startComponents ) : null ;
const end = endComponents ? this . createParsingComponents ( endComponents ) : null ;
return new results _1 . ParsingResult ( this . reference , index , text , start , end ) ;
}
debug ( block ) {
if ( this . option . debug ) {
if ( this . option . debug instanceof Function ) {
this . option . debug ( block ) ;
} else {
const handler = this . option . debug ;
handler . debug ( block ) ;
}
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
}
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
exports . ParsingContext = ParsingContext ;
2020-11-04 22:59:32 +01:00
/***/ } ) ,
2021-08-27 18:14:41 +02:00
/***/ "./node_modules/chrono-node/dist/common/abstractRefiners.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / common / abstractRefiners . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports ) {
2020-11-04 22:59:32 +01:00
"use strict" ;
2021-08-27 18:14:41 +02:00
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
exports . MergingRefiner = exports . Filter = void 0 ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
class Filter {
refine ( context , results ) {
return results . filter ( r => this . isValid ( context , r ) ) ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
exports . Filter = Filter ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
class MergingRefiner {
refine ( context , results ) {
if ( results . length < 2 ) {
return results ;
}
const mergedResults = [ ] ;
let curResult = results [ 0 ] ;
let nextResult = null ;
for ( let i = 1 ; i < results . length ; i ++ ) {
nextResult = results [ i ] ;
const textBetween = context . text . substring ( curResult . index + curResult . text . length , nextResult . index ) ;
if ( ! this . shouldMergeResults ( textBetween , curResult , nextResult , context ) ) {
mergedResults . push ( curResult ) ;
curResult = nextResult ;
} else {
const left = curResult ;
const right = nextResult ;
const mergedResult = this . mergeResults ( textBetween , left , right , context ) ;
context . debug ( ( ) => {
console . log ( ` ${ this . constructor . name } merged ${ left } and ${ right } into ${ mergedResult } ` ) ;
} ) ;
curResult = mergedResult ;
}
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
if ( curResult != null ) {
mergedResults . push ( curResult ) ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
return mergedResults ;
}
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
exports . MergingRefiner = MergingRefiner ;
2020-11-04 22:59:32 +01:00
/***/ } ) ,
2021-08-27 18:14:41 +02:00
/***/ "./node_modules/chrono-node/dist/common/casualReferences.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / common / casualReferences . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
2020-11-04 22:59:32 +01:00
"use strict" ;
2021-08-27 18:14:41 +02:00
var _ _importDefault = this && this . _ _importDefault || function ( mod ) {
return mod && mod . _ _esModule ? mod : {
"default" : mod
} ;
2020-11-04 22:59:32 +01:00
} ;
2021-08-27 18:14:41 +02:00
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
exports . tonight = exports . tomorrow = exports . yesterday = exports . today = exports . now = void 0 ;
const results _1 = _ _webpack _require _ _ ( /*! ../results */ "./node_modules/chrono-node/dist/results.js" ) ;
const dayjs _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! dayjs */ "./node_modules/dayjs/dayjs.min.js" ) ) ;
const dayjs _2 = _ _webpack _require _ _ ( /*! ../utils/dayjs */ "./node_modules/chrono-node/dist/utils/dayjs.js" ) ;
const index _1 = _ _webpack _require _ _ ( /*! ../index */ "./node_modules/chrono-node/dist/index.js" ) ;
function now ( reference ) {
const targetDate = dayjs _1 . default ( reference . instant ) ;
const component = new results _1 . ParsingComponents ( reference , { } ) ;
dayjs _2 . assignSimilarDate ( component , targetDate ) ;
dayjs _2 . assignSimilarTime ( component , targetDate ) ;
component . assign ( "timezoneOffset" , targetDate . utcOffset ( ) ) ;
return component ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
exports . now = now ;
function today ( reference ) {
const targetDate = dayjs _1 . default ( reference . instant ) ;
const component = new results _1 . ParsingComponents ( reference , { } ) ;
dayjs _2 . assignSimilarDate ( component , targetDate ) ;
dayjs _2 . implySimilarTime ( component , targetDate ) ;
return component ;
}
exports . today = today ;
function yesterday ( reference ) {
let targetDate = dayjs _1 . default ( reference . instant ) ;
const component = new results _1 . ParsingComponents ( reference , { } ) ;
targetDate = targetDate . add ( - 1 , "day" ) ;
dayjs _2 . assignSimilarDate ( component , targetDate ) ;
dayjs _2 . implySimilarTime ( component , targetDate ) ;
return component ;
}
exports . yesterday = yesterday ;
function tomorrow ( reference ) {
const targetDate = dayjs _1 . default ( reference . instant ) ;
const component = new results _1 . ParsingComponents ( reference , { } ) ;
dayjs _2 . assignTheNextDay ( component , targetDate ) ;
return component ;
}
exports . tomorrow = tomorrow ;
function tonight ( reference , implyHour = 22 ) {
const targetDate = dayjs _1 . default ( reference . instant ) ;
const component = new results _1 . ParsingComponents ( reference , { } ) ;
component . imply ( "hour" , implyHour ) ;
component . imply ( "meridiem" , index _1 . Meridiem . PM ) ;
dayjs _2 . assignSimilarDate ( component , targetDate ) ;
return component ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
exports . tonight = tonight ;
2020-11-04 22:59:32 +01:00
/***/ } ) ,
2021-08-27 18:14:41 +02:00
/***/ "./node_modules/chrono-node/dist/common/parsers/AbstractParserWithWordBoundary.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / common / parsers / AbstractParserWithWordBoundary . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports ) {
2020-11-04 22:59:32 +01:00
"use strict" ;
2021-08-27 18:14:41 +02:00
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
exports . AbstractParserWithWordBoundaryChecking = void 0 ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
class AbstractParserWithWordBoundaryChecking {
constructor ( ) {
this . cachedInnerPattern = null ;
this . cachedPattern = null ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
pattern ( context ) {
const innerPattern = this . innerPattern ( context ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
if ( innerPattern == this . cachedInnerPattern ) {
return this . cachedPattern ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
this . cachedPattern = new RegExp ( ` ( \\ W|^) ${ innerPattern . source } ` , innerPattern . flags ) ;
this . cachedInnerPattern = innerPattern ;
return this . cachedPattern ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
extract ( context , match ) {
const header = match [ 1 ] ;
match . index = match . index + header . length ;
match [ 0 ] = match [ 0 ] . substring ( header . length ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
for ( let i = 2 ; i < match . length ; i ++ ) {
match [ i - 1 ] = match [ i ] ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
return this . innerExtract ( context , match ) ;
}
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
exports . AbstractParserWithWordBoundaryChecking = AbstractParserWithWordBoundaryChecking ;
2020-11-04 22:59:32 +01:00
/***/ } ) ,
2021-08-27 18:14:41 +02:00
/***/ "./node_modules/chrono-node/dist/common/parsers/AbstractTimeExpressionParser.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / common / parsers / AbstractTimeExpressionParser . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
"use strict" ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
exports . AbstractTimeExpressionParser = void 0 ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
const index _1 = _ _webpack _require _ _ ( /*! ../../index */ "./node_modules/chrono-node/dist/index.js" ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
function primaryTimePattern ( primaryPrefix , primarySuffix ) {
return new RegExp ( "(^|\\s|T|\\b)" + ` ${ primaryPrefix } ` + "(\\d{1,4})" + "(?:" + "(?:\\.|\\:|\\: )" + "(\\d{1,2})" + "(?:" + "(?:\\:|\\: )" + "(\\d{2})" + "(?:\\.(\\d{1,6}))?" + ")?" + ")?" + "(?:\\s*(a\\.m\\.|p\\.m\\.|am?|pm?))?" + ` ${ primarySuffix } ` , "i" ) ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
function followingTimePatten ( followingPhase , followingSuffix ) {
return new RegExp ( ` ^( ${ followingPhase } ) ` + "(\\d{1,4})" + "(?:" + "(?:\\.|\\:|\\: )" + "(\\d{1,2})" + "(?:" + "(?:\\.|\\:|\\: )" + "(\\d{1,2})(?:\\.(\\d{1,6}))?" + ")?" + ")?" + "(?:\\s*(a\\.m\\.|p\\.m\\.|am?|pm?))?" + ` ${ followingSuffix } ` , "i" ) ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
const HOUR _GROUP = 2 ;
const MINUTE _GROUP = 3 ;
const SECOND _GROUP = 4 ;
const MILLI _SECOND _GROUP = 5 ;
const AM _PM _HOUR _GROUP = 6 ;
class AbstractTimeExpressionParser {
constructor ( strictMode = false ) {
this . cachedPrimaryPrefix = null ;
this . cachedPrimarySuffix = null ;
this . cachedPrimaryTimePattern = null ;
this . cachedFollowingPhase = null ;
this . cachedFollowingSuffix = null ;
this . cachedFollowingTimePatten = null ;
this . strictMode = strictMode ;
}
primarySuffix ( ) {
return "(?=\\W|$)" ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
followingSuffix ( ) {
return "(?=\\W|$)" ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
pattern ( context ) {
return this . getPrimaryTimePatternThroughCache ( ) ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
extract ( context , match ) {
const startComponents = this . extractPrimaryTimeComponents ( context , match ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
if ( ! startComponents ) {
match . index += match [ 0 ] . length ;
return null ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
const index = match . index + match [ 1 ] . length ;
const text = match [ 0 ] . substring ( match [ 1 ] . length ) ;
const result = context . createParsingResult ( index , text , startComponents ) ;
match . index += match [ 0 ] . length ;
const remainingText = context . text . substring ( match . index ) ;
const followingPattern = this . getFollowingTimePatternThroughCache ( ) ;
const followingMatch = followingPattern . exec ( remainingText ) ;
if ( ! followingMatch || followingMatch [ 0 ] . match ( /^\s*([+-])\s*\d{3,4}$/ ) ) {
return this . checkAndReturnWithoutFollowingPattern ( result ) ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
result . end = this . extractFollowingTimeComponents ( context , followingMatch , result ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
if ( result . end ) {
result . text += followingMatch [ 0 ] ;
}
return this . checkAndReturnWithFollowingPattern ( result ) ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
extractPrimaryTimeComponents ( context , match , strict = false ) {
const components = context . createParsingComponents ( ) ;
let minute = 0 ;
let meridiem = null ;
let hour = parseInt ( match [ HOUR _GROUP ] ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
if ( hour > 100 ) {
if ( this . strictMode || match [ MINUTE _GROUP ] != null ) {
return null ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
minute = hour % 100 ;
hour = Math . floor ( hour / 100 ) ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
if ( hour > 24 ) {
return null ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
if ( match [ MINUTE _GROUP ] != null ) {
if ( match [ MINUTE _GROUP ] . length == 1 && ! match [ AM _PM _HOUR _GROUP ] ) {
return null ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
minute = parseInt ( match [ MINUTE _GROUP ] ) ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
if ( minute >= 60 ) {
return null ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
if ( hour > 12 ) {
meridiem = index _1 . Meridiem . PM ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
if ( match [ AM _PM _HOUR _GROUP ] != null ) {
if ( hour > 12 ) return null ;
const ampm = match [ AM _PM _HOUR _GROUP ] [ 0 ] . toLowerCase ( ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
if ( ampm == "a" ) {
meridiem = index _1 . Meridiem . AM ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
if ( hour == 12 ) {
hour = 0 ;
}
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
if ( ampm == "p" ) {
meridiem = index _1 . Meridiem . PM ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
if ( hour != 12 ) {
hour += 12 ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
}
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
components . assign ( "hour" , hour ) ;
components . assign ( "minute" , minute ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
if ( meridiem !== null ) {
components . assign ( "meridiem" , meridiem ) ;
} else {
if ( hour < 12 ) {
components . imply ( "meridiem" , index _1 . Meridiem . AM ) ;
} else {
components . imply ( "meridiem" , index _1 . Meridiem . PM ) ;
}
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
if ( match [ MILLI _SECOND _GROUP ] != null ) {
const millisecond = parseInt ( match [ MILLI _SECOND _GROUP ] . substring ( 0 , 3 ) ) ;
if ( millisecond >= 1000 ) return null ;
components . assign ( "millisecond" , millisecond ) ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
if ( match [ SECOND _GROUP ] != null ) {
const second = parseInt ( match [ SECOND _GROUP ] ) ;
if ( second >= 60 ) return null ;
components . assign ( "second" , second ) ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
return components ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
extractFollowingTimeComponents ( context , match , result ) {
const components = context . createParsingComponents ( ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
if ( match [ MILLI _SECOND _GROUP ] != null ) {
const millisecond = parseInt ( match [ MILLI _SECOND _GROUP ] . substring ( 0 , 3 ) ) ;
if ( millisecond >= 1000 ) return null ;
components . assign ( "millisecond" , millisecond ) ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
if ( match [ SECOND _GROUP ] != null ) {
const second = parseInt ( match [ SECOND _GROUP ] ) ;
if ( second >= 60 ) return null ;
components . assign ( "second" , second ) ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
let hour = parseInt ( match [ HOUR _GROUP ] ) ;
let minute = 0 ;
let meridiem = - 1 ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
if ( match [ MINUTE _GROUP ] != null ) {
minute = parseInt ( match [ MINUTE _GROUP ] ) ;
} else if ( hour > 100 ) {
minute = hour % 100 ;
hour = Math . floor ( hour / 100 ) ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
if ( minute >= 60 || hour > 24 ) {
return null ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
if ( hour >= 12 ) {
meridiem = index _1 . Meridiem . PM ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
if ( match [ AM _PM _HOUR _GROUP ] != null ) {
if ( hour > 12 ) {
return null ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
const ampm = match [ AM _PM _HOUR _GROUP ] [ 0 ] . toLowerCase ( ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
if ( ampm == "a" ) {
meridiem = index _1 . Meridiem . AM ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
if ( hour == 12 ) {
hour = 0 ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
if ( ! components . isCertain ( "day" ) ) {
components . imply ( "day" , components . get ( "day" ) + 1 ) ;
}
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
}
if ( ampm == "p" ) {
meridiem = index _1 . Meridiem . PM ;
if ( hour != 12 ) hour += 12 ;
}
if ( ! result . start . isCertain ( "meridiem" ) ) {
if ( meridiem == index _1 . Meridiem . AM ) {
result . start . imply ( "meridiem" , index _1 . Meridiem . AM ) ;
if ( result . start . get ( "hour" ) == 12 ) {
result . start . assign ( "hour" , 0 ) ;
}
} else {
result . start . imply ( "meridiem" , index _1 . Meridiem . PM ) ;
if ( result . start . get ( "hour" ) != 12 ) {
result . start . assign ( "hour" , result . start . get ( "hour" ) + 12 ) ;
}
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
}
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
components . assign ( "hour" , hour ) ;
components . assign ( "minute" , minute ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
if ( meridiem >= 0 ) {
components . assign ( "meridiem" , meridiem ) ;
} else {
const startAtPM = result . start . isCertain ( "meridiem" ) && result . start . get ( "hour" ) > 12 ;
if ( startAtPM ) {
if ( result . start . get ( "hour" ) - 12 > hour ) {
components . imply ( "meridiem" , index _1 . Meridiem . AM ) ;
} else if ( hour <= 12 ) {
components . assign ( "hour" , hour + 12 ) ;
components . assign ( "meridiem" , index _1 . Meridiem . PM ) ;
}
} else if ( hour > 12 ) {
components . imply ( "meridiem" , index _1 . Meridiem . PM ) ;
} else if ( hour <= 12 ) {
components . imply ( "meridiem" , index _1 . Meridiem . AM ) ;
}
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
if ( components . date ( ) . getTime ( ) < result . start . date ( ) . getTime ( ) ) {
components . imply ( "day" , components . get ( "day" ) + 1 ) ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
return components ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
checkAndReturnWithoutFollowingPattern ( result ) {
if ( result . text . match ( /^\d$/ ) ) {
return null ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
if ( result . text . match ( /\d[apAP]$/ ) ) {
return null ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
const endingWithNumbers = result . text . match ( /[^\d:.](\d[\d.]+)$/ ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
if ( endingWithNumbers ) {
const endingNumbers = endingWithNumbers [ 1 ] ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
if ( this . strictMode ) {
return null ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
if ( endingNumbers . includes ( "." ) && ! endingNumbers . match ( /\d(\.\d{2})+$/ ) ) {
return null ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
const endingNumberVal = parseInt ( endingNumbers ) ;
if ( endingNumberVal > 24 ) {
return null ;
}
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
return result ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
checkAndReturnWithFollowingPattern ( result ) {
if ( result . text . match ( /^\d+-\d+$/ ) ) {
return null ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
const endingWithNumbers = result . text . match ( /[^\d:.](\d[\d.]+)\s*-\s*(\d[\d.]+)$/ ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
if ( endingWithNumbers ) {
if ( this . strictMode ) {
return null ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
const startingNumbers = endingWithNumbers [ 1 ] ;
const endingNumbers = endingWithNumbers [ 2 ] ;
if ( endingNumbers . includes ( "." ) && ! endingNumbers . match ( /\d(\.\d{2})+$/ ) ) {
return null ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
const endingNumberVal = parseInt ( endingNumbers ) ;
const startingNumberVal = parseInt ( startingNumbers ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
if ( endingNumberVal > 24 || startingNumberVal > 24 ) {
return null ;
}
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
return result ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
getPrimaryTimePatternThroughCache ( ) {
const primaryPrefix = this . primaryPrefix ( ) ;
const primarySuffix = this . primarySuffix ( ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
if ( this . cachedPrimaryPrefix === primaryPrefix && this . cachedPrimarySuffix === primarySuffix ) {
return this . cachedPrimaryTimePattern ;
}
this . cachedPrimaryTimePattern = primaryTimePattern ( primaryPrefix , primarySuffix ) ;
this . cachedPrimaryPrefix = primaryPrefix ;
this . cachedPrimarySuffix = primarySuffix ;
return this . cachedPrimaryTimePattern ;
}
getFollowingTimePatternThroughCache ( ) {
const followingPhase = this . followingPhase ( ) ;
const followingSuffix = this . followingSuffix ( ) ;
if ( this . cachedFollowingPhase === followingPhase && this . cachedFollowingSuffix === followingSuffix ) {
return this . cachedFollowingTimePatten ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
this . cachedFollowingTimePatten = followingTimePatten ( followingPhase , followingSuffix ) ;
this . cachedFollowingPhase = followingPhase ;
this . cachedFollowingSuffix = followingSuffix ;
return this . cachedFollowingTimePatten ;
}
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
exports . AbstractTimeExpressionParser = AbstractTimeExpressionParser ;
2020-11-04 22:59:32 +01:00
/***/ } ) ,
2021-08-27 18:14:41 +02:00
/***/ "./node_modules/chrono-node/dist/common/parsers/ISOFormatParser.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / common / parsers / ISOFormatParser . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
2020-11-04 22:59:32 +01:00
"use strict" ;
2021-08-27 18:14:41 +02:00
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
const AbstractParserWithWordBoundary _1 = _ _webpack _require _ _ ( /*! ./AbstractParserWithWordBoundary */ "./node_modules/chrono-node/dist/common/parsers/AbstractParserWithWordBoundary.js" ) ;
const PATTERN = new RegExp ( "([0-9]{4})\\-([0-9]{1,2})\\-([0-9]{1,2})" + "(?:T" + "([0-9]{1,2}):([0-9]{1,2})" + "(?:" + ":([0-9]{1,2})(?:\\.(\\d{1,4}))?" + ")?" + "(?:" + "Z|([+-]\\d{2}):?(\\d{2})?" + ")?" + ")?" + "(?=\\W|$)" , "i" ) ;
2020-11-04 22:59:32 +01:00
const YEAR _NUMBER _GROUP = 1 ;
const MONTH _NUMBER _GROUP = 2 ;
const DATE _NUMBER _GROUP = 3 ;
const HOUR _NUMBER _GROUP = 4 ;
const MINUTE _NUMBER _GROUP = 5 ;
const SECOND _NUMBER _GROUP = 6 ;
const MILLISECOND _NUMBER _GROUP = 7 ;
const TZD _HOUR _OFFSET _GROUP = 8 ;
const TZD _MINUTE _OFFSET _GROUP = 9 ;
2021-08-27 18:14:41 +02:00
2020-11-04 22:59:32 +01:00
class ISOFormatParser extends AbstractParserWithWordBoundary _1 . AbstractParserWithWordBoundaryChecking {
2021-08-27 18:14:41 +02:00
innerPattern ( ) {
return PATTERN ;
}
innerExtract ( context , match ) {
const components = { } ;
components [ "year" ] = parseInt ( match [ YEAR _NUMBER _GROUP ] ) ;
components [ "month" ] = parseInt ( match [ MONTH _NUMBER _GROUP ] ) ;
components [ "day" ] = parseInt ( match [ DATE _NUMBER _GROUP ] ) ;
if ( match [ HOUR _NUMBER _GROUP ] != null ) {
components [ "hour" ] = parseInt ( match [ HOUR _NUMBER _GROUP ] ) ;
components [ "minute" ] = parseInt ( match [ MINUTE _NUMBER _GROUP ] ) ;
if ( match [ SECOND _NUMBER _GROUP ] != null ) {
components [ "second" ] = parseInt ( match [ SECOND _NUMBER _GROUP ] ) ;
}
if ( match [ MILLISECOND _NUMBER _GROUP ] != null ) {
components [ "millisecond" ] = parseInt ( match [ MILLISECOND _NUMBER _GROUP ] ) ;
}
if ( match [ TZD _HOUR _OFFSET _GROUP ] == null ) {
components [ "timezoneOffset" ] = 0 ;
} else {
const hourOffset = parseInt ( match [ TZD _HOUR _OFFSET _GROUP ] ) ;
let minuteOffset = 0 ;
if ( match [ TZD _MINUTE _OFFSET _GROUP ] != null ) {
minuteOffset = parseInt ( match [ TZD _MINUTE _OFFSET _GROUP ] ) ;
}
let offset = hourOffset * 60 ;
if ( offset < 0 ) {
offset -= minuteOffset ;
} else {
offset += minuteOffset ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
components [ "timezoneOffset" ] = offset ;
}
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
return components ;
}
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
exports . default = ISOFormatParser ;
2020-11-04 22:59:32 +01:00
/***/ } ) ,
2021-08-27 18:14:41 +02:00
/***/ "./node_modules/chrono-node/dist/common/parsers/SlashDateFormatParser.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / common / parsers / SlashDateFormatParser . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
2020-11-04 22:59:32 +01:00
"use strict" ;
2021-08-27 18:14:41 +02:00
Object . defineProperty ( exports , "__esModule" , ( {
value : true
2020-11-04 22:59:32 +01:00
} ) ) ;
2021-08-27 18:14:41 +02:00
const years _1 = _ _webpack _require _ _ ( /*! ../../calculation/years */ "./node_modules/chrono-node/dist/calculation/years.js" ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
const PATTERN = new RegExp ( "([^\\d]|^)" + "([0-3]{0,1}[0-9]{1})[\\/\\.\\-]([0-3]{0,1}[0-9]{1})" + "(?:[\\/\\.\\-]([0-9]{4}|[0-9]{2}))?" + "(\\W|$)" , "i" ) ;
const OPENING _GROUP = 1 ;
const ENDING _GROUP = 5 ;
const FIRST _NUMBERS _GROUP = 2 ;
const SECOND _NUMBERS _GROUP = 3 ;
const YEAR _GROUP = 4 ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
class SlashDateFormatParser {
constructor ( littleEndian ) {
this . groupNumberMonth = littleEndian ? SECOND _NUMBERS _GROUP : FIRST _NUMBERS _GROUP ;
this . groupNumberDay = littleEndian ? FIRST _NUMBERS _GROUP : SECOND _NUMBERS _GROUP ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
pattern ( ) {
return PATTERN ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
extract ( context , match ) {
if ( match [ OPENING _GROUP ] == "/" || match [ ENDING _GROUP ] == "/" ) {
match . index += match [ 0 ] . length ;
return ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
const index = match . index + match [ OPENING _GROUP ] . length ;
const text = match [ 0 ] . substr ( match [ OPENING _GROUP ] . length , match [ 0 ] . length - match [ OPENING _GROUP ] . length - match [ ENDING _GROUP ] . length ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
if ( text . match ( /^\d\.\d$/ ) || text . match ( /^\d\.\d{1,2}\.\d{1,2}\s*$/ ) ) {
return ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
if ( ! match [ YEAR _GROUP ] && match [ 0 ] . indexOf ( "/" ) < 0 ) {
return ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
const result = context . createParsingResult ( index , text ) ;
let month = parseInt ( match [ this . groupNumberMonth ] ) ;
let day = parseInt ( match [ this . groupNumberDay ] ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
if ( month < 1 || month > 12 ) {
if ( month > 12 ) {
if ( day >= 1 && day <= 12 && month <= 31 ) {
[ day , month ] = [ month , day ] ;
} else {
return null ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
}
}
if ( day < 1 || day > 31 ) {
return null ;
}
result . start . assign ( "day" , day ) ;
result . start . assign ( "month" , month ) ;
if ( match [ YEAR _GROUP ] ) {
const rawYearNumber = parseInt ( match [ YEAR _GROUP ] ) ;
const year = years _1 . findMostLikelyADYear ( rawYearNumber ) ;
result . start . assign ( "year" , year ) ;
} else {
const year = years _1 . findYearClosestToRef ( context . refDate , day , month ) ;
result . start . imply ( "year" , year ) ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
return result ;
}
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
exports . default = SlashDateFormatParser ;
2020-11-04 22:59:32 +01:00
/***/ } ) ,
2021-08-27 18:14:41 +02:00
/***/ "./node_modules/chrono-node/dist/common/refiners/AbstractMergeDateRangeRefiner.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / common / refiners / AbstractMergeDateRangeRefiner . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
2020-11-04 22:59:32 +01:00
"use strict" ;
2021-08-27 18:14:41 +02:00
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
const abstractRefiners _1 = _ _webpack _require _ _ ( /*! ../abstractRefiners */ "./node_modules/chrono-node/dist/common/abstractRefiners.js" ) ;
class AbstractMergeDateRangeRefiner extends abstractRefiners _1 . MergingRefiner {
shouldMergeResults ( textBetween , currentResult , nextResult ) {
return ! currentResult . end && ! nextResult . end && textBetween . match ( this . patternBetween ( ) ) != null ;
}
mergeResults ( textBetween , fromResult , toResult ) {
if ( ! fromResult . start . isOnlyWeekdayComponent ( ) && ! toResult . start . isOnlyWeekdayComponent ( ) ) {
toResult . start . getCertainComponents ( ) . forEach ( key => {
if ( ! fromResult . start . isCertain ( key ) ) {
fromResult . start . assign ( key , toResult . start . get ( key ) ) ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
} ) ;
fromResult . start . getCertainComponents ( ) . forEach ( key => {
if ( ! toResult . start . isCertain ( key ) ) {
toResult . start . assign ( key , fromResult . start . get ( key ) ) ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
} ) ;
}
if ( fromResult . start . date ( ) . getTime ( ) > toResult . start . date ( ) . getTime ( ) ) {
let fromMoment = fromResult . start . dayjs ( ) ;
let toMoment = toResult . start . dayjs ( ) ;
if ( fromResult . start . isOnlyWeekdayComponent ( ) && fromMoment . add ( - 7 , "days" ) . isBefore ( toMoment ) ) {
fromMoment = fromMoment . add ( - 7 , "days" ) ;
fromResult . start . imply ( "day" , fromMoment . date ( ) ) ;
fromResult . start . imply ( "month" , fromMoment . month ( ) + 1 ) ;
fromResult . start . imply ( "year" , fromMoment . year ( ) ) ;
} else if ( toResult . start . isOnlyWeekdayComponent ( ) && toMoment . add ( 7 , "days" ) . isAfter ( fromMoment ) ) {
toMoment = toMoment . add ( 7 , "days" ) ;
toResult . start . imply ( "day" , toMoment . date ( ) ) ;
toResult . start . imply ( "month" , toMoment . month ( ) + 1 ) ;
toResult . start . imply ( "year" , toMoment . year ( ) ) ;
} else {
[ toResult , fromResult ] = [ fromResult , toResult ] ;
}
}
const result = fromResult . clone ( ) ;
result . start = fromResult . start ;
result . end = toResult . start ;
result . index = Math . min ( fromResult . index , toResult . index ) ;
if ( fromResult . index < toResult . index ) {
result . text = fromResult . text + textBetween + toResult . text ;
} else {
result . text = toResult . text + textBetween + fromResult . text ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
return result ;
}
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
exports . default = AbstractMergeDateRangeRefiner ;
2020-11-04 22:59:32 +01:00
/***/ } ) ,
2021-08-27 18:14:41 +02:00
/***/ "./node_modules/chrono-node/dist/common/refiners/AbstractMergeDateTimeRefiner.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / common / refiners / AbstractMergeDateTimeRefiner . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
2020-11-04 22:59:32 +01:00
"use strict" ;
2021-08-27 18:14:41 +02:00
Object . defineProperty ( exports , "__esModule" , ( {
value : true
2020-11-04 22:59:32 +01:00
} ) ) ;
2021-08-27 18:14:41 +02:00
const abstractRefiners _1 = _ _webpack _require _ _ ( /*! ../abstractRefiners */ "./node_modules/chrono-node/dist/common/abstractRefiners.js" ) ;
const mergingCalculation _1 = _ _webpack _require _ _ ( /*! ../../calculation/mergingCalculation */ "./node_modules/chrono-node/dist/calculation/mergingCalculation.js" ) ;
class ENMergeDateTimeRefiner extends abstractRefiners _1 . MergingRefiner {
shouldMergeResults ( textBetween , currentResult , nextResult ) {
return ( currentResult . start . isOnlyDate ( ) && nextResult . start . isOnlyTime ( ) || nextResult . start . isOnlyDate ( ) && currentResult . start . isOnlyTime ( ) ) && textBetween . match ( this . patternBetween ( ) ) != null ;
}
mergeResults ( textBetween , currentResult , nextResult ) {
const result = currentResult . start . isOnlyDate ( ) ? mergingCalculation _1 . mergeDateTimeResult ( currentResult , nextResult ) : mergingCalculation _1 . mergeDateTimeResult ( nextResult , currentResult ) ;
result . index = currentResult . index ;
result . text = currentResult . text + textBetween + nextResult . text ;
2020-11-04 22:59:32 +01:00
return result ;
2021-08-27 18:14:41 +02:00
}
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
exports . default = ENMergeDateTimeRefiner ;
2020-11-04 22:59:32 +01:00
/***/ } ) ,
2021-08-27 18:14:41 +02:00
/***/ "./node_modules/chrono-node/dist/common/refiners/ExtractTimezoneAbbrRefiner.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / common / refiners / ExtractTimezoneAbbrRefiner . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports ) {
2020-11-04 22:59:32 +01:00
"use strict" ;
2021-08-27 18:14:41 +02:00
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
const TIMEZONE _NAME _PATTERN = new RegExp ( "^\\s*,?\\s*\\(?([A-Z]{2,4})\\)?(?=\\W|$)" , "i" ) ;
const DEFAULT _TIMEZONE _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 : 330 ,
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
2020-11-04 22:59:32 +01:00
} ;
2021-08-27 18:14:41 +02:00
class ExtractTimezoneAbbrRefiner {
constructor ( timezoneOverrides ) {
this . timezone = Object . assign ( Object . assign ( { } , DEFAULT _TIMEZONE _ABBR _MAP ) , timezoneOverrides ) ;
}
refine ( context , results ) {
var _a ;
const timezoneOverrides = ( _a = context . option . timezones ) !== null && _a !== void 0 ? _a : { } ;
results . forEach ( result => {
var _a , _b ;
const suffix = context . text . substring ( result . index + result . text . length ) ;
const match = TIMEZONE _NAME _PATTERN . exec ( suffix ) ;
if ( ! match ) {
return ;
}
const timezoneAbbr = match [ 1 ] . toUpperCase ( ) ;
const extractedTimezoneOffset = ( _b = ( _a = timezoneOverrides [ timezoneAbbr ] ) !== null && _a !== void 0 ? _a : this . timezone [ timezoneAbbr ] ) !== null && _b !== void 0 ? _b : null ;
if ( extractedTimezoneOffset === null ) {
return ;
}
context . debug ( ( ) => {
console . log ( ` Extracting timezone: ' ${ timezoneAbbr } ' into : ${ extractedTimezoneOffset } ` ) ;
} ) ;
const currentTimezoneOffset = result . start . get ( "timezoneOffset" ) ;
if ( currentTimezoneOffset !== null && extractedTimezoneOffset != currentTimezoneOffset ) {
if ( result . start . isCertain ( "timezoneOffset" ) ) {
return ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
if ( timezoneAbbr != match [ 1 ] ) {
return ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
}
result . text += match [ 0 ] ;
if ( ! result . start . isCertain ( "timezoneOffset" ) ) {
result . start . assign ( "timezoneOffset" , extractedTimezoneOffset ) ;
}
if ( result . end != null && ! result . end . isCertain ( "timezoneOffset" ) ) {
result . end . assign ( "timezoneOffset" , extractedTimezoneOffset ) ;
}
} ) ;
return results ;
}
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
exports . default = ExtractTimezoneAbbrRefiner ;
2020-11-04 22:59:32 +01:00
/***/ } ) ,
2021-08-27 18:14:41 +02:00
/***/ "./node_modules/chrono-node/dist/common/refiners/ExtractTimezoneOffsetRefiner.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / common / refiners / ExtractTimezoneOffsetRefiner . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports ) {
2020-11-04 22:59:32 +01:00
"use strict" ;
2021-08-27 18:14:41 +02:00
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
const TIMEZONE _OFFSET _PATTERN = new RegExp ( "^\\s*(?:(?:GMT|UTC)\\s?)?([+-])(\\d{1,2})(?::?(\\d{2}))?" , "i" ) ;
const TIMEZONE _OFFSET _SIGN _GROUP = 1 ;
const TIMEZONE _OFFSET _HOUR _OFFSET _GROUP = 2 ;
const TIMEZONE _OFFSET _MINUTE _OFFSET _GROUP = 3 ;
class ExtractTimezoneOffsetRefiner {
refine ( context , results ) {
results . forEach ( function ( result ) {
if ( result . start . isCertain ( "timezoneOffset" ) ) {
return ;
}
const suffix = context . text . substring ( result . index + result . text . length ) ;
const match = TIMEZONE _OFFSET _PATTERN . exec ( suffix ) ;
if ( ! match ) {
return ;
}
context . debug ( ( ) => {
console . log ( ` Extracting timezone: ' ${ match [ 0 ] } ' into : ${ result } ` ) ;
} ) ;
const hourOffset = parseInt ( match [ TIMEZONE _OFFSET _HOUR _OFFSET _GROUP ] ) ;
const minuteOffset = parseInt ( match [ TIMEZONE _OFFSET _MINUTE _OFFSET _GROUP ] || "0" ) ;
let timezoneOffset = hourOffset * 60 + minuteOffset ;
if ( match [ TIMEZONE _OFFSET _SIGN _GROUP ] === "-" ) {
timezoneOffset = - timezoneOffset ;
}
if ( result . end != null ) {
result . end . assign ( "timezoneOffset" , timezoneOffset ) ;
}
result . start . assign ( "timezoneOffset" , timezoneOffset ) ;
result . text += match [ 0 ] ;
} ) ;
return results ;
}
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
exports . default = ExtractTimezoneOffsetRefiner ;
2020-11-04 22:59:32 +01:00
/***/ } ) ,
2021-08-27 18:14:41 +02:00
/***/ "./node_modules/chrono-node/dist/common/refiners/ForwardDateRefiner.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / common / refiners / ForwardDateRefiner . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
2020-11-04 22:59:32 +01:00
"use strict" ;
2021-08-27 18:14:41 +02:00
var _ _importDefault = this && this . _ _importDefault || function ( mod ) {
return mod && mod . _ _esModule ? mod : {
"default" : mod
} ;
} ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
const dayjs _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! dayjs */ "./node_modules/dayjs/dayjs.min.js" ) ) ;
class ForwardDateRefiner {
refine ( context , results ) {
if ( ! context . option . forwardDate ) {
return results ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
results . forEach ( function ( result ) {
let refMoment = dayjs _1 . default ( context . refDate ) ;
if ( result . start . isOnlyDayMonthComponent ( ) && refMoment . isAfter ( result . start . dayjs ( ) ) ) {
for ( let i = 0 ; i < 3 && refMoment . isAfter ( result . start . dayjs ( ) ) ; i ++ ) {
result . start . imply ( "year" , result . start . get ( "year" ) + 1 ) ;
context . debug ( ( ) => {
console . log ( ` Forward yearly adjusted for ${ result } ( ${ result . start } ) ` ) ;
} ) ;
if ( result . end && ! result . end . isCertain ( "year" ) ) {
result . end . imply ( "year" , result . end . get ( "year" ) + 1 ) ;
context . debug ( ( ) => {
console . log ( ` Forward yearly adjusted for ${ result } ( ${ result . end } ) ` ) ;
} ) ;
}
}
}
if ( result . start . isOnlyWeekdayComponent ( ) && refMoment . isAfter ( result . start . dayjs ( ) ) ) {
if ( refMoment . day ( ) > result . start . get ( "weekday" ) ) {
refMoment = refMoment . day ( result . start . get ( "weekday" ) + 7 ) ;
} else {
refMoment = refMoment . day ( result . start . get ( "weekday" ) ) ;
}
result . start . imply ( "day" , refMoment . date ( ) ) ;
result . start . imply ( "month" , refMoment . month ( ) + 1 ) ;
result . start . imply ( "year" , refMoment . year ( ) ) ;
context . debug ( ( ) => {
console . log ( ` Forward weekly adjusted for ${ result } ( ${ result . start } ) ` ) ;
} ) ;
if ( result . end && result . end . isOnlyWeekdayComponent ( ) ) {
if ( refMoment . day ( ) > result . end . get ( "weekday" ) ) {
refMoment = refMoment . day ( result . end . get ( "weekday" ) + 7 ) ;
} else {
refMoment = refMoment . day ( result . end . get ( "weekday" ) ) ;
}
result . end . imply ( "day" , refMoment . date ( ) ) ;
result . end . imply ( "month" , refMoment . month ( ) + 1 ) ;
result . end . imply ( "year" , refMoment . year ( ) ) ;
context . debug ( ( ) => {
console . log ( ` Forward weekly adjusted for ${ result } ( ${ result . end } ) ` ) ;
} ) ;
}
}
} ) ;
return results ;
}
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
exports . default = ForwardDateRefiner ;
2020-11-04 22:59:32 +01:00
/***/ } ) ,
2021-08-27 18:14:41 +02:00
/***/ "./node_modules/chrono-node/dist/common/refiners/MergeWeekdayComponentRefiner.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / common / refiners / MergeWeekdayComponentRefiner . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
2020-11-04 22:59:32 +01:00
"use strict" ;
2021-08-27 18:14:41 +02:00
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
const abstractRefiners _1 = _ _webpack _require _ _ ( /*! ../abstractRefiners */ "./node_modules/chrono-node/dist/common/abstractRefiners.js" ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
class MergeWeekdayComponentRefiner extends abstractRefiners _1 . MergingRefiner {
mergeResults ( textBetween , currentResult , nextResult ) {
const newResult = nextResult . clone ( ) ;
newResult . index = currentResult . index ;
newResult . text = currentResult . text + textBetween + newResult . text ;
newResult . start . assign ( "weekday" , currentResult . start . get ( "weekday" ) ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
if ( newResult . end ) {
newResult . end . assign ( "weekday" , currentResult . start . get ( "weekday" ) ) ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
return newResult ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
shouldMergeResults ( textBetween , currentResult , nextResult ) {
const weekdayThenNormalDate = currentResult . start . isOnlyWeekdayComponent ( ) && ! currentResult . start . isCertain ( "hour" ) && nextResult . start . isCertain ( "day" ) ;
return weekdayThenNormalDate && textBetween . match ( /^,?\s*$/ ) != null ;
}
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
exports . default = MergeWeekdayComponentRefiner ;
2020-11-04 22:59:32 +01:00
/***/ } ) ,
2021-08-27 18:14:41 +02:00
/***/ "./node_modules/chrono-node/dist/common/refiners/OverlapRemovalRefiner.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / common / refiners / OverlapRemovalRefiner . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports ) {
2020-11-04 22:59:32 +01:00
"use strict" ;
2021-08-27 18:14:41 +02:00
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
class OverlapRemovalRefiner {
refine ( context , results ) {
if ( results . length < 2 ) {
return results ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
const filteredResults = [ ] ;
let prevResult = results [ 0 ] ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
for ( let i = 1 ; i < results . length ; i ++ ) {
const result = results [ i ] ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
if ( result . index < prevResult . index + prevResult . text . length ) {
if ( result . text . length > prevResult . text . length ) {
prevResult = result ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
} else {
filteredResults . push ( prevResult ) ;
prevResult = result ;
}
}
if ( prevResult != null ) {
filteredResults . push ( prevResult ) ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
return filteredResults ;
}
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
exports . default = OverlapRemovalRefiner ;
2020-11-04 22:59:32 +01:00
/***/ } ) ,
2021-08-27 18:14:41 +02:00
/***/ "./node_modules/chrono-node/dist/common/refiners/UnlikelyFormatFilter.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / common / refiners / UnlikelyFormatFilter . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
2020-11-04 22:59:32 +01:00
"use strict" ;
2021-08-27 18:14:41 +02:00
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
const abstractRefiners _1 = _ _webpack _require _ _ ( /*! ../abstractRefiners */ "./node_modules/chrono-node/dist/common/abstractRefiners.js" ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
class UnlikelyFormatFilter extends abstractRefiners _1 . Filter {
constructor ( strictMode ) {
super ( ) ;
this . strictMode = strictMode ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
isValid ( context , result ) {
if ( result . text . replace ( " " , "" ) . match ( /^\d*(\.\d*)?$/ ) ) {
context . debug ( ( ) => {
console . log ( ` Removing unlikely result ' ${ result . text } ' ` ) ;
} ) ;
return false ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
if ( ! result . start . isValidDate ( ) ) {
context . debug ( ( ) => {
console . log ( ` Removing invalid result: ${ result } ( ${ result . start } ) ` ) ;
} ) ;
return false ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
if ( result . end && ! result . end . isValidDate ( ) ) {
context . debug ( ( ) => {
console . log ( ` Removing invalid result: ${ result } ( ${ result . end } ) ` ) ;
} ) ;
return false ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
if ( this . strictMode ) {
return this . isStrictModeValid ( context , result ) ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
return true ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
isStrictModeValid ( context , result ) {
if ( result . start . isOnlyWeekdayComponent ( ) ) {
context . debug ( ( ) => {
console . log ( ` (Strict) Removing weekday only component: ${ result } ( ${ result . end } ) ` ) ;
} ) ;
return false ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
if ( result . start . isOnlyTime ( ) && ( ! result . start . isCertain ( "hour" ) || ! result . start . isCertain ( "minute" ) ) ) {
context . debug ( ( ) => {
console . log ( ` (Strict) Removing uncertain time component: ${ result } ( ${ result . end } ) ` ) ;
} ) ;
return false ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
return true ;
}
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
exports . default = UnlikelyFormatFilter ;
2020-11-04 22:59:32 +01:00
/***/ } ) ,
2021-08-27 18:14:41 +02:00
/***/ "./node_modules/chrono-node/dist/configurations.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / configurations . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
2020-11-04 22:59:32 +01:00
"use strict" ;
2021-08-27 18:14:41 +02:00
var _ _importDefault = this && this . _ _importDefault || function ( mod ) {
return mod && mod . _ _esModule ? mod : {
"default" : mod
} ;
} ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
exports . includeCommonConfiguration = void 0 ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
const ExtractTimezoneAbbrRefiner _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ./common/refiners/ExtractTimezoneAbbrRefiner */ "./node_modules/chrono-node/dist/common/refiners/ExtractTimezoneAbbrRefiner.js" ) ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
const ExtractTimezoneOffsetRefiner _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ./common/refiners/ExtractTimezoneOffsetRefiner */ "./node_modules/chrono-node/dist/common/refiners/ExtractTimezoneOffsetRefiner.js" ) ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
const OverlapRemovalRefiner _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ./common/refiners/OverlapRemovalRefiner */ "./node_modules/chrono-node/dist/common/refiners/OverlapRemovalRefiner.js" ) ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
const ForwardDateRefiner _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ./common/refiners/ForwardDateRefiner */ "./node_modules/chrono-node/dist/common/refiners/ForwardDateRefiner.js" ) ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
const UnlikelyFormatFilter _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ./common/refiners/UnlikelyFormatFilter */ "./node_modules/chrono-node/dist/common/refiners/UnlikelyFormatFilter.js" ) ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
const ISOFormatParser _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ./common/parsers/ISOFormatParser */ "./node_modules/chrono-node/dist/common/parsers/ISOFormatParser.js" ) ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
const MergeWeekdayComponentRefiner _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ./common/refiners/MergeWeekdayComponentRefiner */ "./node_modules/chrono-node/dist/common/refiners/MergeWeekdayComponentRefiner.js" ) ) ;
function includeCommonConfiguration ( configuration , strictMode = false ) {
configuration . parsers . unshift ( new ISOFormatParser _1 . default ( ) ) ;
configuration . refiners . unshift ( new MergeWeekdayComponentRefiner _1 . default ( ) ) ;
configuration . refiners . unshift ( new ExtractTimezoneAbbrRefiner _1 . default ( ) ) ;
configuration . refiners . unshift ( new ExtractTimezoneOffsetRefiner _1 . default ( ) ) ;
configuration . refiners . unshift ( new OverlapRemovalRefiner _1 . default ( ) ) ;
configuration . refiners . push ( new OverlapRemovalRefiner _1 . default ( ) ) ;
configuration . refiners . push ( new ForwardDateRefiner _1 . default ( ) ) ;
configuration . refiners . push ( new UnlikelyFormatFilter _1 . default ( strictMode ) ) ;
return configuration ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
exports . includeCommonConfiguration = includeCommonConfiguration ;
2020-11-04 22:59:32 +01:00
/***/ } ) ,
2021-08-27 18:14:41 +02:00
/***/ "./node_modules/chrono-node/dist/index.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / index . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
2020-11-04 22:59:32 +01:00
"use strict" ;
2021-08-27 18:14:41 +02:00
var _ _createBinding = this && this . _ _createBinding || ( Object . create ? function ( o , m , k , k2 ) {
if ( k2 === undefined ) k2 = k ;
Object . defineProperty ( o , k2 , {
enumerable : true ,
get : function ( ) {
return m [ k ] ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
} ) ;
} : function ( o , m , k , k2 ) {
if ( k2 === undefined ) k2 = k ;
o [ k2 ] = m [ k ] ;
} ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
var _ _setModuleDefault = this && this . _ _setModuleDefault || ( Object . create ? function ( o , v ) {
Object . defineProperty ( o , "default" , {
enumerable : true ,
value : v
} ) ;
} : function ( o , v ) {
o [ "default" ] = v ;
} ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
var _ _importStar = this && this . _ _importStar || function ( mod ) {
if ( mod && mod . _ _esModule ) return mod ;
var result = { } ;
if ( mod != null ) for ( var k in mod ) if ( k !== "default" && Object . prototype . hasOwnProperty . call ( mod , k ) ) _ _createBinding ( result , mod , k ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
_ _setModuleDefault ( result , mod ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
return result ;
} ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
exports . parseDate = exports . parse = exports . casual = exports . strict = exports . nl = exports . pt = exports . ja = exports . fr = exports . de = exports . Meridiem = exports . Chrono = exports . en = void 0 ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
const en = _ _importStar ( _ _webpack _require _ _ ( /*! ./locales/en */ "./node_modules/chrono-node/dist/locales/en/index.js" ) ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
exports . en = en ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
const chrono _1 = _ _webpack _require _ _ ( /*! ./chrono */ "./node_modules/chrono-node/dist/chrono.js" ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
Object . defineProperty ( exports , "Chrono" , ( {
enumerable : true ,
get : function ( ) {
return chrono _1 . Chrono ;
}
} ) ) ;
var Meridiem ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
( function ( Meridiem ) {
Meridiem [ Meridiem [ "AM" ] = 0 ] = "AM" ;
Meridiem [ Meridiem [ "PM" ] = 1 ] = "PM" ;
} ) ( Meridiem = exports . Meridiem || ( exports . Meridiem = { } ) ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
const de = _ _importStar ( _ _webpack _require _ _ ( /*! ./locales/de */ "./node_modules/chrono-node/dist/locales/de/index.js" ) ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
exports . de = de ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
const fr = _ _importStar ( _ _webpack _require _ _ ( /*! ./locales/fr */ "./node_modules/chrono-node/dist/locales/fr/index.js" ) ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
exports . fr = fr ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
const ja = _ _importStar ( _ _webpack _require _ _ ( /*! ./locales/ja */ "./node_modules/chrono-node/dist/locales/ja/index.js" ) ) ;
exports . ja = ja ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
const pt = _ _importStar ( _ _webpack _require _ _ ( /*! ./locales/pt */ "./node_modules/chrono-node/dist/locales/pt/index.js" ) ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
exports . pt = pt ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
const nl = _ _importStar ( _ _webpack _require _ _ ( /*! ./locales/nl */ "./node_modules/chrono-node/dist/locales/nl/index.js" ) ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
exports . nl = nl ;
exports . strict = en . strict ;
exports . casual = en . casual ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
function parse ( text , ref , option ) {
return exports . casual . parse ( text , ref , option ) ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
exports . parse = parse ;
function parseDate ( text , ref , option ) {
return exports . casual . parseDate ( text , ref , option ) ;
}
exports . parseDate = parseDate ;
2020-11-04 22:59:32 +01:00
/***/ } ) ,
2021-08-27 18:14:41 +02:00
/***/ "./node_modules/chrono-node/dist/locales/de/constants.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / de / constants . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
2020-11-04 22:59:32 +01:00
"use strict" ;
2021-08-27 18:14:41 +02:00
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
exports . parseTimeUnits = exports . TIME _UNITS _PATTERN = exports . parseYear = exports . YEAR _PATTERN = exports . parseNumberPattern = exports . NUMBER _PATTERN = exports . TIME _UNIT _DICTIONARY = exports . INTEGER _WORD _DICTIONARY = exports . MONTH _DICTIONARY = exports . WEEKDAY _DICTIONARY = void 0 ;
const pattern _1 = _ _webpack _require _ _ ( /*! ../../utils/pattern */ "./node_modules/chrono-node/dist/utils/pattern.js" ) ;
const years _1 = _ _webpack _require _ _ ( /*! ../../calculation/years */ "./node_modules/chrono-node/dist/calculation/years.js" ) ;
exports . WEEKDAY _DICTIONARY = {
"sonntag" : 0 ,
"so" : 0 ,
"montag" : 1 ,
"mo" : 1 ,
"dienstag" : 2 ,
"di" : 2 ,
"mittwoch" : 3 ,
"mi" : 3 ,
"donnerstag" : 4 ,
"do" : 4 ,
"freitag" : 5 ,
"fr" : 5 ,
"samstag" : 6 ,
"sa" : 6
2020-11-04 22:59:32 +01:00
} ;
2021-08-27 18:14:41 +02:00
exports . MONTH _DICTIONARY = {
"januar" : 1 ,
"jan" : 1 ,
"jan." : 1 ,
"februar" : 2 ,
"feb" : 2 ,
"feb." : 2 ,
"märz" : 3 ,
"maerz" : 3 ,
"mär" : 3 ,
"mär." : 3 ,
"mrz" : 3 ,
"mrz." : 3 ,
"april" : 4 ,
"apr" : 4 ,
"apr." : 4 ,
"mai" : 5 ,
"juni" : 6 ,
"jun" : 6 ,
"jun." : 6 ,
"juli" : 7 ,
"jul" : 7 ,
"jul." : 7 ,
"august" : 8 ,
"aug" : 8 ,
"aug." : 8 ,
"september" : 9 ,
"sep" : 9 ,
"sep." : 9 ,
"sept" : 9 ,
"sept." : 9 ,
"oktober" : 10 ,
"okt" : 10 ,
"okt." : 10 ,
"november" : 11 ,
"nov" : 11 ,
"nov." : 11 ,
"dezember" : 12 ,
"dez" : 12 ,
"dez." : 12
} ;
exports . INTEGER _WORD _DICTIONARY = {
"eins" : 1 ,
"zwei" : 2 ,
"drei" : 3 ,
"vier" : 4 ,
"fünf" : 5 ,
"fuenf" : 5 ,
"sechs" : 6 ,
"sieben" : 7 ,
"acht" : 8 ,
"neun" : 9 ,
"zehn" : 10 ,
"elf" : 11 ,
"zwölf" : 12 ,
"zwoelf" : 12
} ;
exports . TIME _UNIT _DICTIONARY = {
sec : "second" ,
second : "second" ,
seconds : "second" ,
min : "minute" ,
mins : "minute" ,
minute : "minute" ,
minutes : "minute" ,
h : "hour" ,
hr : "hour" ,
hrs : "hour" ,
hour : "hour" ,
hours : "hour" ,
day : "d" ,
days : "d" ,
week : "week" ,
weeks : "week" ,
month : "month" ,
months : "month" ,
y : "year" ,
yr : "year" ,
year : "year" ,
years : "year"
} ;
exports . NUMBER _PATTERN = ` (?: ${ pattern _1 . matchAnyPattern ( exports . INTEGER _WORD _DICTIONARY ) } |[0-9]+|[0-9]+ \\ .[0-9]+|half(?: \\ s*an?)?|an?(?: \\ s*few)?|few|several|a? \\ s*couple \\ s*(?:of)?) ` ;
function parseNumberPattern ( match ) {
const num = match . toLowerCase ( ) ;
if ( exports . INTEGER _WORD _DICTIONARY [ num ] !== undefined ) {
return exports . INTEGER _WORD _DICTIONARY [ num ] ;
} else if ( num === "a" || num === "an" ) {
return 1 ;
} else if ( num . match ( /few/ ) ) {
return 3 ;
} else if ( num . match ( /half/ ) ) {
return 0.5 ;
} else if ( num . match ( /couple/ ) ) {
return 2 ;
} else if ( num . match ( /several/ ) ) {
return 7 ;
}
return parseFloat ( num ) ;
}
exports . parseNumberPattern = parseNumberPattern ;
exports . YEAR _PATTERN = ` (?:[0-9]{1,4}(?: \\ s*[vn] \\ .? \\ s*C(?:hr)? \\ .?)?) ` ;
function parseYear ( match ) {
if ( /v/i . test ( match ) ) {
return - parseInt ( match . replace ( /[^0-9]+/gi , "" ) ) ;
}
if ( /n/i . test ( match ) ) {
return parseInt ( match . replace ( /[^0-9]+/gi , "" ) ) ;
}
const rawYearNumber = parseInt ( match ) ;
return years _1 . findMostLikelyADYear ( rawYearNumber ) ;
}
exports . parseYear = parseYear ;
const SINGLE _TIME _UNIT _PATTERN = ` ( ${ exports . NUMBER _PATTERN } ) \\ s{0,5}( ${ pattern _1 . matchAnyPattern ( exports . TIME _UNIT _DICTIONARY ) } ) \\ s{0,5} ` ;
const SINGLE _TIME _UNIT _REGEX = new RegExp ( SINGLE _TIME _UNIT _PATTERN , "i" ) ;
exports . TIME _UNITS _PATTERN = pattern _1 . repeatedTimeunitPattern ( "" , SINGLE _TIME _UNIT _PATTERN ) ;
function parseTimeUnits ( timeunitText ) {
const fragments = { } ;
let remainingText = timeunitText ;
let match = SINGLE _TIME _UNIT _REGEX . exec ( remainingText ) ;
while ( match ) {
collectDateTimeFragment ( fragments , match ) ;
remainingText = remainingText . substring ( match [ 0 ] . length ) ;
match = SINGLE _TIME _UNIT _REGEX . exec ( remainingText ) ;
}
return fragments ;
}
exports . parseTimeUnits = parseTimeUnits ;
function collectDateTimeFragment ( fragments , match ) {
const num = parseNumberPattern ( match [ 1 ] ) ;
const unit = exports . TIME _UNIT _DICTIONARY [ match [ 2 ] . toLowerCase ( ) ] ;
fragments [ unit ] = num ;
}
/***/ } ) ,
/***/ "./node_modules/chrono-node/dist/locales/de/index.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / de / index . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
"use strict" ;
var _ _importDefault = this && this . _ _importDefault || function ( mod ) {
return mod && mod . _ _esModule ? mod : {
"default" : mod
} ;
} ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
exports . createConfiguration = exports . createCasualConfiguration = exports . parseDate = exports . parse = exports . strict = exports . casual = void 0 ;
const configurations _1 = _ _webpack _require _ _ ( /*! ../../configurations */ "./node_modules/chrono-node/dist/configurations.js" ) ;
const chrono _1 = _ _webpack _require _ _ ( /*! ../../chrono */ "./node_modules/chrono-node/dist/chrono.js" ) ;
const SlashDateFormatParser _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ../../common/parsers/SlashDateFormatParser */ "./node_modules/chrono-node/dist/common/parsers/SlashDateFormatParser.js" ) ) ;
const ISOFormatParser _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ../../common/parsers/ISOFormatParser */ "./node_modules/chrono-node/dist/common/parsers/ISOFormatParser.js" ) ) ;
const DETimeExpressionParser _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ./parsers/DETimeExpressionParser */ "./node_modules/chrono-node/dist/locales/de/parsers/DETimeExpressionParser.js" ) ) ;
const DEWeekdayParser _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ./parsers/DEWeekdayParser */ "./node_modules/chrono-node/dist/locales/de/parsers/DEWeekdayParser.js" ) ) ;
const DEMergeDateRangeRefiner _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ./refiners/DEMergeDateRangeRefiner */ "./node_modules/chrono-node/dist/locales/de/refiners/DEMergeDateRangeRefiner.js" ) ) ;
const DEMergeDateTimeRefiner _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ./refiners/DEMergeDateTimeRefiner */ "./node_modules/chrono-node/dist/locales/de/refiners/DEMergeDateTimeRefiner.js" ) ) ;
const DECasualDateParser _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ./parsers/DECasualDateParser */ "./node_modules/chrono-node/dist/locales/de/parsers/DECasualDateParser.js" ) ) ;
const DECasualTimeParser _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ./parsers/DECasualTimeParser */ "./node_modules/chrono-node/dist/locales/de/parsers/DECasualTimeParser.js" ) ) ;
const DEMonthNameLittleEndianParser _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ./parsers/DEMonthNameLittleEndianParser */ "./node_modules/chrono-node/dist/locales/de/parsers/DEMonthNameLittleEndianParser.js" ) ) ;
2020-11-04 22:59:32 +01:00
exports . casual = new chrono _1 . Chrono ( createCasualConfiguration ( ) ) ;
exports . strict = new chrono _1 . Chrono ( createConfiguration ( true ) ) ;
2021-08-27 18:14:41 +02:00
2020-11-04 22:59:32 +01:00
function parse ( text , ref , option ) {
2021-08-27 18:14:41 +02:00
return exports . casual . parse ( text , ref , option ) ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
2020-11-04 22:59:32 +01:00
exports . parse = parse ;
2021-08-27 18:14:41 +02:00
2020-11-04 22:59:32 +01:00
function parseDate ( text , ref , option ) {
2021-08-27 18:14:41 +02:00
return exports . casual . parseDate ( text , ref , option ) ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
2020-11-04 22:59:32 +01:00
exports . parseDate = parseDate ;
2021-08-27 18:14:41 +02:00
2020-11-04 22:59:32 +01:00
function createCasualConfiguration ( littleEndian = true ) {
2021-08-27 18:14:41 +02:00
const option = createConfiguration ( false , littleEndian ) ;
option . parsers . unshift ( new DECasualTimeParser _1 . default ( ) ) ;
option . parsers . unshift ( new DECasualDateParser _1 . default ( ) ) ;
return option ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
2020-11-04 22:59:32 +01:00
exports . createCasualConfiguration = createCasualConfiguration ;
2021-08-27 18:14:41 +02:00
2020-11-04 22:59:32 +01:00
function createConfiguration ( strictMode = true , littleEndian = true ) {
2021-08-27 18:14:41 +02:00
return configurations _1 . includeCommonConfiguration ( {
parsers : [ new ISOFormatParser _1 . default ( ) , new SlashDateFormatParser _1 . default ( littleEndian ) , new DETimeExpressionParser _1 . default ( ) , new DEMonthNameLittleEndianParser _1 . default ( ) , new DEWeekdayParser _1 . default ( ) ] ,
refiners : [ new DEMergeDateRangeRefiner _1 . default ( ) , new DEMergeDateTimeRefiner _1 . default ( ) ]
} , strictMode ) ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
exports . createConfiguration = createConfiguration ;
2020-11-04 22:59:32 +01:00
/***/ } ) ,
2021-08-27 18:14:41 +02:00
/***/ "./node_modules/chrono-node/dist/locales/de/parsers/DECasualDateParser.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / de / parsers / DECasualDateParser . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
2020-11-04 22:59:32 +01:00
"use strict" ;
2021-08-27 18:14:41 +02:00
var _ _createBinding = this && this . _ _createBinding || ( Object . create ? function ( o , m , k , k2 ) {
if ( k2 === undefined ) k2 = k ;
Object . defineProperty ( o , k2 , {
enumerable : true ,
get : function ( ) {
return m [ k ] ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
} ) ;
} : function ( o , m , k , k2 ) {
if ( k2 === undefined ) k2 = k ;
o [ k2 ] = m [ k ] ;
} ) ;
var _ _setModuleDefault = this && this . _ _setModuleDefault || ( Object . create ? function ( o , v ) {
Object . defineProperty ( o , "default" , {
enumerable : true ,
value : v
} ) ;
} : function ( o , v ) {
o [ "default" ] = v ;
} ) ;
var _ _importStar = this && this . _ _importStar || function ( mod ) {
if ( mod && mod . _ _esModule ) return mod ;
var result = { } ;
if ( mod != null ) for ( var k in mod ) if ( k !== "default" && Object . prototype . hasOwnProperty . call ( mod , k ) ) _ _createBinding ( result , mod , k ) ;
_ _setModuleDefault ( result , mod ) ;
return result ;
} ;
var _ _importDefault = this && this . _ _importDefault || function ( mod ) {
return mod && mod . _ _esModule ? mod : {
"default" : mod
} ;
} ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
const dayjs _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! dayjs */ "./node_modules/dayjs/dayjs.min.js" ) ) ;
const AbstractParserWithWordBoundary _1 = _ _webpack _require _ _ ( /*! ../../../common/parsers/AbstractParserWithWordBoundary */ "./node_modules/chrono-node/dist/common/parsers/AbstractParserWithWordBoundary.js" ) ;
const dayjs _2 = _ _webpack _require _ _ ( /*! ../../../utils/dayjs */ "./node_modules/chrono-node/dist/utils/dayjs.js" ) ;
const DECasualTimeParser _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ./DECasualTimeParser */ "./node_modules/chrono-node/dist/locales/de/parsers/DECasualTimeParser.js" ) ) ;
const references = _ _importStar ( _ _webpack _require _ _ ( /*! ../../../common/casualReferences */ "./node_modules/chrono-node/dist/common/casualReferences.js" ) ) ;
const PATTERN = new RegExp ( ` (jetzt|heute|morgen|übermorgen|uebermorgen|gestern|vorgestern|letzte \\ s*nacht) ` + ` (?: \\ s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht))? ` + ` (?= \\ W| $ ) ` , "i" ) ;
const DATE _GROUP = 1 ;
const TIME _GROUP = 2 ;
class DECasualDateParser extends AbstractParserWithWordBoundary _1 . AbstractParserWithWordBoundaryChecking {
innerPattern ( context ) {
return PATTERN ;
}
innerExtract ( context , match ) {
let targetDate = dayjs _1 . default ( context . refDate ) ;
const dateKeyword = ( match [ DATE _GROUP ] || "" ) . toLowerCase ( ) ;
const timeKeyword = ( match [ TIME _GROUP ] || "" ) . toLowerCase ( ) ;
let component = context . createParsingComponents ( ) ;
switch ( dateKeyword ) {
case "jetzt" :
component = references . now ( context . reference ) ;
break ;
case "heute" :
component = references . today ( context . reference ) ;
break ;
case "morgen" :
dayjs _2 . assignTheNextDay ( component , targetDate ) ;
break ;
case "übermorgen" :
case "uebermorgen" :
targetDate = targetDate . add ( 1 , "day" ) ;
dayjs _2 . assignTheNextDay ( component , targetDate ) ;
break ;
case "gestern" :
targetDate = targetDate . add ( - 1 , "day" ) ;
dayjs _2 . assignSimilarDate ( component , targetDate ) ;
dayjs _2 . implySimilarTime ( component , targetDate ) ;
break ;
case "vorgestern" :
targetDate = targetDate . add ( - 2 , "day" ) ;
dayjs _2 . assignSimilarDate ( component , targetDate ) ;
dayjs _2 . implySimilarTime ( component , targetDate ) ;
break ;
default :
if ( dateKeyword . match ( /letzte\s*nacht/ ) ) {
if ( targetDate . hour ( ) > 6 ) {
targetDate = targetDate . add ( - 1 , "day" ) ;
}
dayjs _2 . assignSimilarDate ( component , targetDate ) ;
component . imply ( "hour" , 0 ) ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
break ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
if ( timeKeyword ) {
component = DECasualTimeParser _1 . default . extractTimeComponents ( component , timeKeyword ) ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
return component ;
}
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
exports . default = DECasualDateParser ;
2020-11-04 22:59:32 +01:00
/***/ } ) ,
2021-08-27 18:14:41 +02:00
/***/ "./node_modules/chrono-node/dist/locales/de/parsers/DECasualTimeParser.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / de / parsers / DECasualTimeParser . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
2020-11-04 22:59:32 +01:00
"use strict" ;
2021-08-27 18:14:41 +02:00
var _ _importDefault = this && this . _ _importDefault || function ( mod ) {
return mod && mod . _ _esModule ? mod : {
"default" : mod
} ;
} ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
const dayjs _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! dayjs */ "./node_modules/dayjs/dayjs.min.js" ) ) ;
const index _1 = _ _webpack _require _ _ ( /*! ../../../index */ "./node_modules/chrono-node/dist/index.js" ) ;
const AbstractParserWithWordBoundary _1 = _ _webpack _require _ _ ( /*! ../../../common/parsers/AbstractParserWithWordBoundary */ "./node_modules/chrono-node/dist/common/parsers/AbstractParserWithWordBoundary.js" ) ;
const dayjs _2 = _ _webpack _require _ _ ( /*! ../../../utils/dayjs */ "./node_modules/chrono-node/dist/utils/dayjs.js" ) ;
const timeunits _1 = _ _webpack _require _ _ ( /*! ../../../utils/timeunits */ "./node_modules/chrono-node/dist/utils/timeunits.js" ) ;
class DECasualTimeParser extends AbstractParserWithWordBoundary _1 . AbstractParserWithWordBoundaryChecking {
innerPattern ( context ) {
return /(diesen)?\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht)(?=\W|$)/i ;
}
innerExtract ( context , match ) {
const targetDate = dayjs _1 . default ( context . refDate ) ;
const timeKeywordPattern = match [ 2 ] . toLowerCase ( ) ;
const component = context . createParsingComponents ( ) ;
dayjs _2 . implySimilarTime ( component , targetDate ) ;
return DECasualTimeParser . extractTimeComponents ( component , timeKeywordPattern ) ;
}
static extractTimeComponents ( component , timeKeywordPattern ) {
switch ( timeKeywordPattern ) {
case "morgen" :
component . imply ( "hour" , 6 ) ;
component . imply ( "minute" , 0 ) ;
component . imply ( "second" , 0 ) ;
component . imply ( "meridiem" , index _1 . Meridiem . AM ) ;
break ;
case "vormittag" :
component . imply ( "hour" , 9 ) ;
component . imply ( "minute" , 0 ) ;
component . imply ( "second" , 0 ) ;
component . imply ( "meridiem" , index _1 . Meridiem . AM ) ;
break ;
case "mittag" :
case "mittags" :
component . imply ( "hour" , 12 ) ;
component . imply ( "minute" , 0 ) ;
component . imply ( "second" , 0 ) ;
component . imply ( "meridiem" , index _1 . Meridiem . AM ) ;
break ;
case "nachmittag" :
component . imply ( "hour" , 15 ) ;
component . imply ( "minute" , 0 ) ;
component . imply ( "second" , 0 ) ;
component . imply ( "meridiem" , index _1 . Meridiem . PM ) ;
break ;
case "abend" :
component . imply ( "hour" , 18 ) ;
component . imply ( "minute" , 0 ) ;
component . imply ( "second" , 0 ) ;
component . imply ( "meridiem" , index _1 . Meridiem . PM ) ;
break ;
case "nacht" :
component . imply ( "hour" , 22 ) ;
component . imply ( "minute" , 0 ) ;
component . imply ( "second" , 0 ) ;
component . imply ( "meridiem" , index _1 . Meridiem . PM ) ;
break ;
case "mitternacht" :
if ( component . get ( "hour" ) > 1 ) {
component = timeunits _1 . addImpliedTimeUnits ( component , {
"day" : 1
} ) ;
}
component . imply ( "hour" , 0 ) ;
component . imply ( "minute" , 0 ) ;
component . imply ( "second" , 0 ) ;
component . imply ( "meridiem" , index _1 . Meridiem . AM ) ;
break ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
return component ;
}
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
exports . default = DECasualTimeParser ;
/***/ } ) ,
/***/ "./node_modules/chrono-node/dist/locales/de/parsers/DEMonthNameLittleEndianParser.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / de / parsers / DEMonthNameLittleEndianParser . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
"use strict" ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
const years _1 = _ _webpack _require _ _ ( /*! ../../../calculation/years */ "./node_modules/chrono-node/dist/calculation/years.js" ) ;
const constants _1 = _ _webpack _require _ _ ( /*! ../constants */ "./node_modules/chrono-node/dist/locales/de/constants.js" ) ;
const constants _2 = _ _webpack _require _ _ ( /*! ../constants */ "./node_modules/chrono-node/dist/locales/de/constants.js" ) ;
const pattern _1 = _ _webpack _require _ _ ( /*! ../../../utils/pattern */ "./node_modules/chrono-node/dist/utils/pattern.js" ) ;
const AbstractParserWithWordBoundary _1 = _ _webpack _require _ _ ( /*! ../../../common/parsers/AbstractParserWithWordBoundary */ "./node_modules/chrono-node/dist/common/parsers/AbstractParserWithWordBoundary.js" ) ;
const PATTERN = new RegExp ( "(?:am\\s*?)?" + "(?:den\\s*?)?" + ` ([0-9]{1,2}) \\ . ` + ` (?: \\ s*(?:bis(?: \\ s*(?:am|zum))?| \\ -| \\ – |\\ s) \\ s*([0-9]{1,2}) \\ .?)? \\ s* ` + ` ( ${ pattern _1 . matchAnyPattern ( constants _1 . MONTH _DICTIONARY ) } ) ` + ` (?:(?:-|/|,? \\ s*)( ${ constants _2 . YEAR _PATTERN } (?![^ \\ s] \\ d)))? ` + ` (?= \\ W| $ ) ` , "i" ) ;
const DATE _GROUP = 1 ;
const DATE _TO _GROUP = 2 ;
const MONTH _NAME _GROUP = 3 ;
const YEAR _GROUP = 4 ;
class DEMonthNameLittleEndianParser extends AbstractParserWithWordBoundary _1 . AbstractParserWithWordBoundaryChecking {
innerPattern ( ) {
return PATTERN ;
}
innerExtract ( context , match ) {
const result = context . createParsingResult ( match . index , match [ 0 ] ) ;
const month = constants _1 . MONTH _DICTIONARY [ match [ MONTH _NAME _GROUP ] . toLowerCase ( ) ] ;
const day = parseInt ( match [ DATE _GROUP ] ) ;
if ( day > 31 ) {
match . index = match . index + match [ DATE _GROUP ] . length ;
return null ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
result . start . assign ( "month" , month ) ;
result . start . assign ( "day" , day ) ;
if ( match [ YEAR _GROUP ] ) {
const yearNumber = constants _2 . parseYear ( match [ YEAR _GROUP ] ) ;
result . start . assign ( "year" , yearNumber ) ;
} else {
const year = years _1 . findYearClosestToRef ( context . refDate , day , month ) ;
result . start . imply ( "year" , year ) ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
if ( match [ DATE _TO _GROUP ] ) {
const endDate = parseInt ( match [ DATE _TO _GROUP ] ) ;
result . end = result . start . clone ( ) ;
result . end . assign ( "day" , endDate ) ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
return result ;
}
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
exports . default = DEMonthNameLittleEndianParser ;
2020-11-04 22:59:32 +01:00
/***/ } ) ,
2021-08-27 18:14:41 +02:00
/***/ "./node_modules/chrono-node/dist/locales/de/parsers/DETimeExpressionParser.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / de / parsers / DETimeExpressionParser . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
2020-11-04 22:59:32 +01:00
"use strict" ;
2021-08-27 18:14:41 +02:00
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
const AbstractTimeExpressionParser _1 = _ _webpack _require _ _ ( /*! ../../../common/parsers/AbstractTimeExpressionParser */ "./node_modules/chrono-node/dist/common/parsers/AbstractTimeExpressionParser.js" ) ;
const index _1 = _ _webpack _require _ _ ( /*! ../../../index */ "./node_modules/chrono-node/dist/index.js" ) ;
class DETimeExpressionParser extends AbstractTimeExpressionParser _1 . AbstractTimeExpressionParser {
primaryPrefix ( ) {
return "(?:(?:um|von)\\s*)?" ;
}
followingPhase ( ) {
return "\\s*(?:\\-|\\– |\\~|\\〜|bis)\\s*" ;
}
primarySuffix ( ) {
return "(?:\\s*uhr)?(?:\\s*(?:morgens|vormittags|nachmittags|abends|nachts))?(?=\\W|$)" ;
}
extractPrimaryTimeComponents ( context , match ) {
const components = super . extractPrimaryTimeComponents ( context , match ) ;
if ( components ) {
if ( match [ 0 ] . endsWith ( "morgens" ) || match [ 0 ] . endsWith ( "vormittags" ) ) {
components . assign ( "meridiem" , index _1 . Meridiem . AM ) ;
const hour = components . get ( "hour" ) ;
if ( hour < 12 ) {
components . assign ( "hour" , components . get ( "hour" ) ) ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
}
if ( match [ 0 ] . endsWith ( "nachmittags" ) || match [ 0 ] . endsWith ( "abends" ) || match [ 0 ] . endsWith ( "nachts" ) ) {
components . assign ( "meridiem" , index _1 . Meridiem . PM ) ;
const hour = components . get ( "hour" ) ;
if ( hour < 12 ) {
components . assign ( "hour" , components . get ( "hour" ) + 12 ) ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
}
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
return components ;
}
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
exports . default = DETimeExpressionParser ;
2020-11-04 22:59:32 +01:00
/***/ } ) ,
2021-08-27 18:14:41 +02:00
/***/ "./node_modules/chrono-node/dist/locales/de/parsers/DEWeekdayParser.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / de / parsers / DEWeekdayParser . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
2020-11-04 22:59:32 +01:00
"use strict" ;
2021-08-27 18:14:41 +02:00
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
const constants _1 = _ _webpack _require _ _ ( /*! ../constants */ "./node_modules/chrono-node/dist/locales/de/constants.js" ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
const pattern _1 = _ _webpack _require _ _ ( /*! ../../../utils/pattern */ "./node_modules/chrono-node/dist/utils/pattern.js" ) ;
const AbstractParserWithWordBoundary _1 = _ _webpack _require _ _ ( /*! ../../../common/parsers/AbstractParserWithWordBoundary */ "./node_modules/chrono-node/dist/common/parsers/AbstractParserWithWordBoundary.js" ) ;
const weeks _1 = _ _webpack _require _ _ ( /*! ../../../calculation/weeks */ "./node_modules/chrono-node/dist/calculation/weeks.js" ) ;
const PATTERN = new RegExp ( "(?:(?:\\,|\\(|\\( )\\s*)?" + "(?:a[mn]\\s*?)?" + "(?:(diese[mn]|letzte[mn]|n(?:ä|ae)chste[mn])\\s*)?" + ` ( ${ pattern _1 . matchAnyPattern ( constants _1 . WEEKDAY _DICTIONARY ) } ) ` + "(?:\\s*(?:\\,|\\)|\\) ))?" + "(?:\\s*(diese|letzte|n(?:ä|ae)chste)\\s*woche)?" + "(?=\\W|$)" , "i" ) ;
const PREFIX _GROUP = 1 ;
const SUFFIX _GROUP = 3 ;
const WEEKDAY _GROUP = 2 ;
class DEWeekdayParser extends AbstractParserWithWordBoundary _1 . AbstractParserWithWordBoundaryChecking {
innerPattern ( ) {
return PATTERN ;
}
innerExtract ( context , match ) {
const dayOfWeek = match [ WEEKDAY _GROUP ] . toLowerCase ( ) ;
const offset = constants _1 . WEEKDAY _DICTIONARY [ dayOfWeek ] ;
const prefix = match [ PREFIX _GROUP ] ;
const postfix = match [ SUFFIX _GROUP ] ;
let modifierWord = prefix || postfix ;
modifierWord = modifierWord || "" ;
modifierWord = modifierWord . toLowerCase ( ) ;
let modifier = null ;
if ( modifierWord . match ( /letzte/ ) ) {
modifier = "last" ;
} else if ( modifierWord . match ( /chste/ ) ) {
modifier = "next" ;
} else if ( modifierWord . match ( /diese/ ) ) {
modifier = "this" ;
}
const date = weeks _1 . toDayJSWeekday ( context . refDate , offset , modifier ) ;
return context . createParsingComponents ( ) . assign ( "weekday" , offset ) . imply ( "day" , date . date ( ) ) . imply ( "month" , date . month ( ) + 1 ) . imply ( "year" , date . year ( ) ) ;
}
}
exports . default = DEWeekdayParser ;
/***/ } ) ,
/***/ "./node_modules/chrono-node/dist/locales/de/refiners/DEMergeDateRangeRefiner.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / de / refiners / DEMergeDateRangeRefiner . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
"use strict" ;
var _ _importDefault = this && this . _ _importDefault || function ( mod ) {
return mod && mod . _ _esModule ? mod : {
"default" : mod
} ;
} ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
const AbstractMergeDateRangeRefiner _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ../../../common/refiners/AbstractMergeDateRangeRefiner */ "./node_modules/chrono-node/dist/common/refiners/AbstractMergeDateRangeRefiner.js" ) ) ;
class DEMergeDateRangeRefiner extends AbstractMergeDateRangeRefiner _1 . default {
patternBetween ( ) {
return /^\s*(bis(?:\s*(?:am|zum))?|-)\s*$/i ;
}
}
exports . default = DEMergeDateRangeRefiner ;
/***/ } ) ,
/***/ "./node_modules/chrono-node/dist/locales/de/refiners/DEMergeDateTimeRefiner.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / de / refiners / DEMergeDateTimeRefiner . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
"use strict" ;
var _ _importDefault = this && this . _ _importDefault || function ( mod ) {
return mod && mod . _ _esModule ? mod : {
"default" : mod
} ;
} ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
const AbstractMergeDateTimeRefiner _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ../../../common/refiners/AbstractMergeDateTimeRefiner */ "./node_modules/chrono-node/dist/common/refiners/AbstractMergeDateTimeRefiner.js" ) ) ;
class DEMergeDateTimeRefiner extends AbstractMergeDateTimeRefiner _1 . default {
patternBetween ( ) {
return new RegExp ( "^\\s*(T|um|am|,|-)?\\s*$" ) ;
}
}
exports . default = DEMergeDateTimeRefiner ;
/***/ } ) ,
/***/ "./node_modules/chrono-node/dist/locales/en/constants.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / en / constants . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
"use strict" ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
exports . parseTimeUnits = exports . TIME _UNITS _PATTERN = exports . parseYear = exports . YEAR _PATTERN = exports . parseOrdinalNumberPattern = exports . ORDINAL _NUMBER _PATTERN = exports . parseNumberPattern = exports . NUMBER _PATTERN = exports . TIME _UNIT _DICTIONARY = exports . ORDINAL _WORD _DICTIONARY = exports . INTEGER _WORD _DICTIONARY = exports . MONTH _DICTIONARY = exports . FULL _MONTH _NAME _DICTIONARY = exports . WEEKDAY _DICTIONARY = void 0 ;
const pattern _1 = _ _webpack _require _ _ ( /*! ../../utils/pattern */ "./node_modules/chrono-node/dist/utils/pattern.js" ) ;
const years _1 = _ _webpack _require _ _ ( /*! ../../calculation/years */ "./node_modules/chrono-node/dist/calculation/years.js" ) ;
exports . WEEKDAY _DICTIONARY = {
sunday : 0 ,
sun : 0 ,
"sun." : 0 ,
monday : 1 ,
mon : 1 ,
"mon." : 1 ,
tuesday : 2 ,
tue : 2 ,
"tue." : 2 ,
wednesday : 3 ,
wed : 3 ,
"wed." : 3 ,
thursday : 4 ,
thurs : 4 ,
"thurs." : 4 ,
thur : 4 ,
"thur." : 4 ,
thu : 4 ,
"thu." : 4 ,
friday : 5 ,
fri : 5 ,
"fri." : 5 ,
saturday : 6 ,
sat : 6 ,
"sat." : 6
} ;
exports . FULL _MONTH _NAME _DICTIONARY = {
january : 1 ,
february : 2 ,
march : 3 ,
april : 4 ,
may : 5 ,
june : 6 ,
july : 7 ,
august : 8 ,
september : 9 ,
october : 10 ,
november : 11 ,
december : 12
} ;
exports . MONTH _DICTIONARY = Object . assign ( Object . assign ( { } , exports . FULL _MONTH _NAME _DICTIONARY ) , {
jan : 1 ,
"jan." : 1 ,
feb : 2 ,
"feb." : 2 ,
mar : 3 ,
"mar." : 3 ,
apr : 4 ,
"apr." : 4 ,
jun : 6 ,
"jun." : 6 ,
jul : 7 ,
"jul." : 7 ,
aug : 8 ,
"aug." : 8 ,
sep : 9 ,
"sep." : 9 ,
sept : 9 ,
"sept." : 9 ,
oct : 10 ,
"oct." : 10 ,
nov : 11 ,
"nov." : 11 ,
dec : 12 ,
"dec." : 12
} ) ;
exports . INTEGER _WORD _DICTIONARY = {
one : 1 ,
two : 2 ,
three : 3 ,
four : 4 ,
five : 5 ,
six : 6 ,
seven : 7 ,
eight : 8 ,
nine : 9 ,
ten : 10 ,
eleven : 11 ,
twelve : 12
} ;
exports . ORDINAL _WORD _DICTIONARY = {
first : 1 ,
second : 2 ,
third : 3 ,
fourth : 4 ,
fifth : 5 ,
sixth : 6 ,
seventh : 7 ,
eighth : 8 ,
ninth : 9 ,
tenth : 10 ,
eleventh : 11 ,
twelfth : 12 ,
thirteenth : 13 ,
fourteenth : 14 ,
fifteenth : 15 ,
sixteenth : 16 ,
seventeenth : 17 ,
eighteenth : 18 ,
nineteenth : 19 ,
twentieth : 20 ,
"twenty first" : 21 ,
"twenty-first" : 21 ,
"twenty second" : 22 ,
"twenty-second" : 22 ,
"twenty third" : 23 ,
"twenty-third" : 23 ,
"twenty fourth" : 24 ,
"twenty-fourth" : 24 ,
"twenty fifth" : 25 ,
"twenty-fifth" : 25 ,
"twenty sixth" : 26 ,
"twenty-sixth" : 26 ,
"twenty seventh" : 27 ,
"twenty-seventh" : 27 ,
"twenty eighth" : 28 ,
"twenty-eighth" : 28 ,
"twenty ninth" : 29 ,
"twenty-ninth" : 29 ,
"thirtieth" : 30 ,
"thirty first" : 31 ,
"thirty-first" : 31
} ;
exports . TIME _UNIT _DICTIONARY = {
sec : "second" ,
second : "second" ,
seconds : "second" ,
min : "minute" ,
mins : "minute" ,
minute : "minute" ,
minutes : "minute" ,
h : "hour" ,
hr : "hour" ,
hrs : "hour" ,
hour : "hour" ,
hours : "hour" ,
day : "d" ,
days : "d" ,
week : "week" ,
weeks : "week" ,
month : "month" ,
months : "month" ,
y : "year" ,
yr : "year" ,
year : "year" ,
years : "year"
} ;
exports . NUMBER _PATTERN = ` (?: ${ pattern _1 . matchAnyPattern ( exports . INTEGER _WORD _DICTIONARY ) } |[0-9]+|[0-9]+ \\ .[0-9]+|half(?: \\ s*an?)?|an?(?: \\ s*few)?|few|several|a? \\ s*couple \\ s*(?:of)?) ` ;
function parseNumberPattern ( match ) {
const num = match . toLowerCase ( ) ;
if ( exports . INTEGER _WORD _DICTIONARY [ num ] !== undefined ) {
return exports . INTEGER _WORD _DICTIONARY [ num ] ;
} else if ( num === "a" || num === "an" ) {
return 1 ;
} else if ( num . match ( /few/ ) ) {
return 3 ;
} else if ( num . match ( /half/ ) ) {
return 0.5 ;
} else if ( num . match ( /couple/ ) ) {
return 2 ;
} else if ( num . match ( /several/ ) ) {
return 7 ;
}
return parseFloat ( num ) ;
}
exports . parseNumberPattern = parseNumberPattern ;
exports . ORDINAL _NUMBER _PATTERN = ` (?: ${ pattern _1 . matchAnyPattern ( exports . ORDINAL _WORD _DICTIONARY ) } |[0-9]{1,2}(?:st|nd|rd|th)?) ` ;
function parseOrdinalNumberPattern ( match ) {
let num = match . toLowerCase ( ) ;
if ( exports . ORDINAL _WORD _DICTIONARY [ num ] !== undefined ) {
return exports . ORDINAL _WORD _DICTIONARY [ num ] ;
}
num = num . replace ( /(?:st|nd|rd|th)$/i , "" ) ;
return parseInt ( num ) ;
}
exports . parseOrdinalNumberPattern = parseOrdinalNumberPattern ;
exports . YEAR _PATTERN = ` (?:[1-9][0-9]{0,3} \\ s*(?:BE|AD|BC|BCE|CE)|[1-2][0-9]{3}|[5-9][0-9]) ` ;
function parseYear ( match ) {
if ( /BE/i . test ( match ) ) {
match = match . replace ( /BE/i , "" ) ;
return parseInt ( match ) - 543 ;
}
if ( /BCE?/i . test ( match ) ) {
match = match . replace ( /BCE?/i , "" ) ;
return - parseInt ( match ) ;
}
if ( /(AD|CE)/i . test ( match ) ) {
match = match . replace ( /(AD|CE)/i , "" ) ;
return parseInt ( match ) ;
}
const rawYearNumber = parseInt ( match ) ;
return years _1 . findMostLikelyADYear ( rawYearNumber ) ;
}
exports . parseYear = parseYear ;
const SINGLE _TIME _UNIT _PATTERN = ` ( ${ exports . NUMBER _PATTERN } ) \\ s{0,5}( ${ pattern _1 . matchAnyPattern ( exports . TIME _UNIT _DICTIONARY ) } ) \\ s{0,5} ` ;
const SINGLE _TIME _UNIT _REGEX = new RegExp ( SINGLE _TIME _UNIT _PATTERN , "i" ) ;
exports . TIME _UNITS _PATTERN = pattern _1 . repeatedTimeunitPattern ( ` (?:(?:about|around) \\ s*)? ` , SINGLE _TIME _UNIT _PATTERN ) ;
function parseTimeUnits ( timeunitText ) {
const fragments = { } ;
let remainingText = timeunitText ;
let match = SINGLE _TIME _UNIT _REGEX . exec ( remainingText ) ;
while ( match ) {
collectDateTimeFragment ( fragments , match ) ;
remainingText = remainingText . substring ( match [ 0 ] . length ) ;
match = SINGLE _TIME _UNIT _REGEX . exec ( remainingText ) ;
}
return fragments ;
}
exports . parseTimeUnits = parseTimeUnits ;
function collectDateTimeFragment ( fragments , match ) {
const num = parseNumberPattern ( match [ 1 ] ) ;
const unit = exports . TIME _UNIT _DICTIONARY [ match [ 2 ] . toLowerCase ( ) ] ;
fragments [ unit ] = num ;
}
/***/ } ) ,
/***/ "./node_modules/chrono-node/dist/locales/en/index.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / en / index . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
"use strict" ;
var _ _importDefault = this && this . _ _importDefault || function ( mod ) {
return mod && mod . _ _esModule ? mod : {
"default" : mod
} ;
} ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
exports . createConfiguration = exports . createCasualConfiguration = exports . parseDate = exports . parse = exports . GB = exports . strict = exports . casual = void 0 ;
const ENTimeUnitWithinFormatParser _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ./parsers/ENTimeUnitWithinFormatParser */ "./node_modules/chrono-node/dist/locales/en/parsers/ENTimeUnitWithinFormatParser.js" ) ) ;
const ENMonthNameLittleEndianParser _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ./parsers/ENMonthNameLittleEndianParser */ "./node_modules/chrono-node/dist/locales/en/parsers/ENMonthNameLittleEndianParser.js" ) ) ;
const ENMonthNameMiddleEndianParser _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ./parsers/ENMonthNameMiddleEndianParser */ "./node_modules/chrono-node/dist/locales/en/parsers/ENMonthNameMiddleEndianParser.js" ) ) ;
const ENMonthNameParser _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ./parsers/ENMonthNameParser */ "./node_modules/chrono-node/dist/locales/en/parsers/ENMonthNameParser.js" ) ) ;
const ENCasualYearMonthDayParser _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ./parsers/ENCasualYearMonthDayParser */ "./node_modules/chrono-node/dist/locales/en/parsers/ENCasualYearMonthDayParser.js" ) ) ;
const ENSlashMonthFormatParser _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ./parsers/ENSlashMonthFormatParser */ "./node_modules/chrono-node/dist/locales/en/parsers/ENSlashMonthFormatParser.js" ) ) ;
const ENTimeExpressionParser _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ./parsers/ENTimeExpressionParser */ "./node_modules/chrono-node/dist/locales/en/parsers/ENTimeExpressionParser.js" ) ) ;
const ENTimeUnitAgoFormatParser _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ./parsers/ENTimeUnitAgoFormatParser */ "./node_modules/chrono-node/dist/locales/en/parsers/ENTimeUnitAgoFormatParser.js" ) ) ;
const ENTimeUnitLaterFormatParser _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ./parsers/ENTimeUnitLaterFormatParser */ "./node_modules/chrono-node/dist/locales/en/parsers/ENTimeUnitLaterFormatParser.js" ) ) ;
const ENMergeDateRangeRefiner _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ./refiners/ENMergeDateRangeRefiner */ "./node_modules/chrono-node/dist/locales/en/refiners/ENMergeDateRangeRefiner.js" ) ) ;
const ENMergeDateTimeRefiner _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ./refiners/ENMergeDateTimeRefiner */ "./node_modules/chrono-node/dist/locales/en/refiners/ENMergeDateTimeRefiner.js" ) ) ;
const configurations _1 = _ _webpack _require _ _ ( /*! ../../configurations */ "./node_modules/chrono-node/dist/configurations.js" ) ;
const ENCasualDateParser _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ./parsers/ENCasualDateParser */ "./node_modules/chrono-node/dist/locales/en/parsers/ENCasualDateParser.js" ) ) ;
const ENCasualTimeParser _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ./parsers/ENCasualTimeParser */ "./node_modules/chrono-node/dist/locales/en/parsers/ENCasualTimeParser.js" ) ) ;
const ENWeekdayParser _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ./parsers/ENWeekdayParser */ "./node_modules/chrono-node/dist/locales/en/parsers/ENWeekdayParser.js" ) ) ;
const ENRelativeDateFormatParser _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ./parsers/ENRelativeDateFormatParser */ "./node_modules/chrono-node/dist/locales/en/parsers/ENRelativeDateFormatParser.js" ) ) ;
const chrono _1 = _ _webpack _require _ _ ( /*! ../../chrono */ "./node_modules/chrono-node/dist/chrono.js" ) ;
const SlashDateFormatParser _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ../../common/parsers/SlashDateFormatParser */ "./node_modules/chrono-node/dist/common/parsers/SlashDateFormatParser.js" ) ) ;
const ENTimeUnitCasualRelativeFormatParser _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ./parsers/ENTimeUnitCasualRelativeFormatParser */ "./node_modules/chrono-node/dist/locales/en/parsers/ENTimeUnitCasualRelativeFormatParser.js" ) ) ;
exports . casual = new chrono _1 . Chrono ( createCasualConfiguration ( false ) ) ;
exports . strict = new chrono _1 . Chrono ( createConfiguration ( true , false ) ) ;
exports . GB = new chrono _1 . Chrono ( createConfiguration ( false , true ) ) ;
function parse ( text , ref , option ) {
return exports . casual . parse ( text , ref , option ) ;
}
exports . parse = parse ;
function parseDate ( text , ref , option ) {
return exports . casual . parseDate ( text , ref , option ) ;
}
exports . parseDate = parseDate ;
function createCasualConfiguration ( littleEndian = false ) {
const option = createConfiguration ( false , littleEndian ) ;
option . parsers . unshift ( new ENCasualDateParser _1 . default ( ) ) ;
option . parsers . unshift ( new ENCasualTimeParser _1 . default ( ) ) ;
option . parsers . unshift ( new ENMonthNameParser _1 . default ( ) ) ;
option . parsers . unshift ( new ENRelativeDateFormatParser _1 . default ( ) ) ;
option . parsers . unshift ( new ENTimeUnitCasualRelativeFormatParser _1 . default ( ) ) ;
return option ;
}
exports . createCasualConfiguration = createCasualConfiguration ;
function createConfiguration ( strictMode = true , littleEndian = false ) {
return configurations _1 . includeCommonConfiguration ( {
parsers : [ new SlashDateFormatParser _1 . default ( littleEndian ) , new ENTimeUnitWithinFormatParser _1 . default ( ) , new ENMonthNameLittleEndianParser _1 . default ( ) , new ENMonthNameMiddleEndianParser _1 . default ( ) , new ENWeekdayParser _1 . default ( ) , new ENCasualYearMonthDayParser _1 . default ( ) , new ENSlashMonthFormatParser _1 . default ( ) , new ENTimeExpressionParser _1 . default ( strictMode ) , new ENTimeUnitAgoFormatParser _1 . default ( strictMode ) , new ENTimeUnitLaterFormatParser _1 . default ( strictMode ) ] ,
refiners : [ new ENMergeDateTimeRefiner _1 . default ( ) , new ENMergeDateRangeRefiner _1 . default ( ) ]
} , strictMode ) ;
}
exports . createConfiguration = createConfiguration ;
/***/ } ) ,
/***/ "./node_modules/chrono-node/dist/locales/en/parsers/ENCasualDateParser.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / en / parsers / ENCasualDateParser . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
"use strict" ;
var _ _createBinding = this && this . _ _createBinding || ( Object . create ? function ( o , m , k , k2 ) {
if ( k2 === undefined ) k2 = k ;
Object . defineProperty ( o , k2 , {
enumerable : true ,
get : function ( ) {
return m [ k ] ;
}
} ) ;
} : function ( o , m , k , k2 ) {
if ( k2 === undefined ) k2 = k ;
o [ k2 ] = m [ k ] ;
} ) ;
var _ _setModuleDefault = this && this . _ _setModuleDefault || ( Object . create ? function ( o , v ) {
Object . defineProperty ( o , "default" , {
enumerable : true ,
value : v
} ) ;
} : function ( o , v ) {
o [ "default" ] = v ;
} ) ;
var _ _importStar = this && this . _ _importStar || function ( mod ) {
if ( mod && mod . _ _esModule ) return mod ;
var result = { } ;
if ( mod != null ) for ( var k in mod ) if ( k !== "default" && Object . prototype . hasOwnProperty . call ( mod , k ) ) _ _createBinding ( result , mod , k ) ;
_ _setModuleDefault ( result , mod ) ;
return result ;
} ;
var _ _importDefault = this && this . _ _importDefault || function ( mod ) {
return mod && mod . _ _esModule ? mod : {
"default" : mod
} ;
} ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
const dayjs _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! dayjs */ "./node_modules/dayjs/dayjs.min.js" ) ) ;
const AbstractParserWithWordBoundary _1 = _ _webpack _require _ _ ( /*! ../../../common/parsers/AbstractParserWithWordBoundary */ "./node_modules/chrono-node/dist/common/parsers/AbstractParserWithWordBoundary.js" ) ;
const dayjs _2 = _ _webpack _require _ _ ( /*! ../../../utils/dayjs */ "./node_modules/chrono-node/dist/utils/dayjs.js" ) ;
const references = _ _importStar ( _ _webpack _require _ _ ( /*! ../../../common/casualReferences */ "./node_modules/chrono-node/dist/common/casualReferences.js" ) ) ;
const PATTERN = /(now|today|tonight|tomorrow|tmr|tmrw|yesterday|last\s*night)(?=\W|$)/i ;
class ENCasualDateParser extends AbstractParserWithWordBoundary _1 . AbstractParserWithWordBoundaryChecking {
innerPattern ( context ) {
return PATTERN ;
}
innerExtract ( context , match ) {
let targetDate = dayjs _1 . default ( context . refDate ) ;
const lowerText = match [ 0 ] . toLowerCase ( ) ;
const component = context . createParsingComponents ( ) ;
switch ( lowerText ) {
case "now" :
return references . now ( context . reference ) ;
case "today" :
return references . today ( context . reference ) ;
case "yesterday" :
return references . yesterday ( context . reference ) ;
case "tomorrow" :
case "tmr" :
case "tmrw" :
return references . tomorrow ( context . reference ) ;
case "tonight" :
return references . tonight ( context . reference ) ;
default :
if ( lowerText . match ( /last\s*night/ ) ) {
if ( targetDate . hour ( ) > 6 ) {
targetDate = targetDate . add ( - 1 , "day" ) ;
}
dayjs _2 . assignSimilarDate ( component , targetDate ) ;
component . imply ( "hour" , 0 ) ;
}
break ;
}
return component ;
}
}
exports . default = ENCasualDateParser ;
/***/ } ) ,
/***/ "./node_modules/chrono-node/dist/locales/en/parsers/ENCasualTimeParser.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / en / parsers / ENCasualTimeParser . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
"use strict" ;
var _ _importDefault = this && this . _ _importDefault || function ( mod ) {
return mod && mod . _ _esModule ? mod : {
"default" : mod
} ;
} ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
const index _1 = _ _webpack _require _ _ ( /*! ../../../index */ "./node_modules/chrono-node/dist/index.js" ) ;
const AbstractParserWithWordBoundary _1 = _ _webpack _require _ _ ( /*! ../../../common/parsers/AbstractParserWithWordBoundary */ "./node_modules/chrono-node/dist/common/parsers/AbstractParserWithWordBoundary.js" ) ;
const dayjs _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! dayjs */ "./node_modules/dayjs/dayjs.min.js" ) ) ;
const dayjs _2 = _ _webpack _require _ _ ( /*! ../../../utils/dayjs */ "./node_modules/chrono-node/dist/utils/dayjs.js" ) ;
const PATTERN = /(?:this)?\s*(morning|afternoon|evening|night|midnight|noon)(?=\W|$)/i ;
class ENCasualTimeParser extends AbstractParserWithWordBoundary _1 . AbstractParserWithWordBoundaryChecking {
innerPattern ( ) {
return PATTERN ;
}
innerExtract ( context , match ) {
const targetDate = dayjs _1 . default ( context . refDate ) ;
const component = context . createParsingComponents ( ) ;
switch ( match [ 1 ] . toLowerCase ( ) ) {
case "afternoon" :
component . imply ( "meridiem" , index _1 . Meridiem . PM ) ;
component . imply ( "hour" , 15 ) ;
break ;
case "evening" :
case "night" :
component . imply ( "meridiem" , index _1 . Meridiem . PM ) ;
component . imply ( "hour" , 20 ) ;
break ;
case "midnight" :
dayjs _2 . assignTheNextDay ( component , targetDate ) ;
component . imply ( "hour" , 0 ) ;
component . imply ( "minute" , 0 ) ;
component . imply ( "second" , 0 ) ;
break ;
case "morning" :
component . imply ( "meridiem" , index _1 . Meridiem . AM ) ;
component . imply ( "hour" , 6 ) ;
break ;
case "noon" :
component . imply ( "meridiem" , index _1 . Meridiem . AM ) ;
component . imply ( "hour" , 12 ) ;
break ;
}
return component ;
}
}
exports . default = ENCasualTimeParser ;
/***/ } ) ,
/***/ "./node_modules/chrono-node/dist/locales/en/parsers/ENCasualYearMonthDayParser.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / en / parsers / ENCasualYearMonthDayParser . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
"use strict" ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
const constants _1 = _ _webpack _require _ _ ( /*! ../constants */ "./node_modules/chrono-node/dist/locales/en/constants.js" ) ;
const pattern _1 = _ _webpack _require _ _ ( /*! ../../../utils/pattern */ "./node_modules/chrono-node/dist/utils/pattern.js" ) ;
const AbstractParserWithWordBoundary _1 = _ _webpack _require _ _ ( /*! ../../../common/parsers/AbstractParserWithWordBoundary */ "./node_modules/chrono-node/dist/common/parsers/AbstractParserWithWordBoundary.js" ) ;
const PATTERN = new RegExp ( ` ([0-9]{4})[ \\ . \\ / \\ s] ` + ` (?:( ${ pattern _1 . matchAnyPattern ( constants _1 . MONTH _DICTIONARY ) } )|([0-9]{1,2}))[ \\ . \\ / \\ s] ` + ` ([0-9]{1,2}) ` + "(?=\\W|$)" , "i" ) ;
const YEAR _NUMBER _GROUP = 1 ;
const MONTH _NAME _GROUP = 2 ;
const MONTH _NUMBER _GROUP = 3 ;
const DATE _NUMBER _GROUP = 4 ;
class ENCasualYearMonthDayParser extends AbstractParserWithWordBoundary _1 . AbstractParserWithWordBoundaryChecking {
innerPattern ( ) {
return PATTERN ;
}
innerExtract ( context , match ) {
const month = match [ MONTH _NUMBER _GROUP ] ? parseInt ( match [ MONTH _NUMBER _GROUP ] ) : constants _1 . MONTH _DICTIONARY [ match [ MONTH _NAME _GROUP ] . toLowerCase ( ) ] ;
if ( month < 1 || month > 12 ) {
return null ;
}
const year = parseInt ( match [ YEAR _NUMBER _GROUP ] ) ;
const day = parseInt ( match [ DATE _NUMBER _GROUP ] ) ;
return {
day : day ,
month : month ,
year : year
} ;
}
}
exports . default = ENCasualYearMonthDayParser ;
/***/ } ) ,
/***/ "./node_modules/chrono-node/dist/locales/en/parsers/ENMonthNameLittleEndianParser.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / en / parsers / ENMonthNameLittleEndianParser . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
"use strict" ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
const years _1 = _ _webpack _require _ _ ( /*! ../../../calculation/years */ "./node_modules/chrono-node/dist/calculation/years.js" ) ;
const constants _1 = _ _webpack _require _ _ ( /*! ../constants */ "./node_modules/chrono-node/dist/locales/en/constants.js" ) ;
const constants _2 = _ _webpack _require _ _ ( /*! ../constants */ "./node_modules/chrono-node/dist/locales/en/constants.js" ) ;
const constants _3 = _ _webpack _require _ _ ( /*! ../constants */ "./node_modules/chrono-node/dist/locales/en/constants.js" ) ;
const pattern _1 = _ _webpack _require _ _ ( /*! ../../../utils/pattern */ "./node_modules/chrono-node/dist/utils/pattern.js" ) ;
const AbstractParserWithWordBoundary _1 = _ _webpack _require _ _ ( /*! ../../../common/parsers/AbstractParserWithWordBoundary */ "./node_modules/chrono-node/dist/common/parsers/AbstractParserWithWordBoundary.js" ) ;
const PATTERN = new RegExp ( "(?:on\\s*?)?" + ` ( ${ constants _3 . ORDINAL _NUMBER _PATTERN } ) ` + "(?:\\s*" + "(?:to|\\-|\\– |until|through|till|\\s)\\s*" + ` ( ${ constants _3 . ORDINAL _NUMBER _PATTERN } ) ` + ")?" + "(?:-|/|\\s*(?:of)?\\s*)" + "(" + pattern _1 . matchAnyPattern ( constants _1 . MONTH _DICTIONARY ) + ")" + "(?:" + "(?:-|/|,?\\s*)" + ` ( ${ constants _2 . YEAR _PATTERN } (?![^ \\ s] \\ d)) ` + ")?" + "(?=\\W|$)" , "i" ) ;
const DATE _GROUP = 1 ;
const DATE _TO _GROUP = 2 ;
const MONTH _NAME _GROUP = 3 ;
const YEAR _GROUP = 4 ;
class ENMonthNameLittleEndianParser extends AbstractParserWithWordBoundary _1 . AbstractParserWithWordBoundaryChecking {
innerPattern ( ) {
return PATTERN ;
}
innerExtract ( context , match ) {
const result = context . createParsingResult ( match . index , match [ 0 ] ) ;
const month = constants _1 . MONTH _DICTIONARY [ match [ MONTH _NAME _GROUP ] . toLowerCase ( ) ] ;
const day = constants _3 . parseOrdinalNumberPattern ( match [ DATE _GROUP ] ) ;
if ( day > 31 ) {
match . index = match . index + match [ DATE _GROUP ] . length ;
return null ;
}
result . start . assign ( "month" , month ) ;
result . start . assign ( "day" , day ) ;
if ( match [ YEAR _GROUP ] ) {
const yearNumber = constants _2 . parseYear ( match [ YEAR _GROUP ] ) ;
result . start . assign ( "year" , yearNumber ) ;
} else {
const year = years _1 . findYearClosestToRef ( context . refDate , day , month ) ;
result . start . imply ( "year" , year ) ;
}
if ( match [ DATE _TO _GROUP ] ) {
const endDate = constants _3 . parseOrdinalNumberPattern ( match [ DATE _TO _GROUP ] ) ;
result . end = result . start . clone ( ) ;
result . end . assign ( "day" , endDate ) ;
}
return result ;
}
}
exports . default = ENMonthNameLittleEndianParser ;
/***/ } ) ,
/***/ "./node_modules/chrono-node/dist/locales/en/parsers/ENMonthNameMiddleEndianParser.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / en / parsers / ENMonthNameMiddleEndianParser . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
"use strict" ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
const years _1 = _ _webpack _require _ _ ( /*! ../../../calculation/years */ "./node_modules/chrono-node/dist/calculation/years.js" ) ;
const constants _1 = _ _webpack _require _ _ ( /*! ../constants */ "./node_modules/chrono-node/dist/locales/en/constants.js" ) ;
const constants _2 = _ _webpack _require _ _ ( /*! ../constants */ "./node_modules/chrono-node/dist/locales/en/constants.js" ) ;
const constants _3 = _ _webpack _require _ _ ( /*! ../constants */ "./node_modules/chrono-node/dist/locales/en/constants.js" ) ;
const pattern _1 = _ _webpack _require _ _ ( /*! ../../../utils/pattern */ "./node_modules/chrono-node/dist/utils/pattern.js" ) ;
const AbstractParserWithWordBoundary _1 = _ _webpack _require _ _ ( /*! ../../../common/parsers/AbstractParserWithWordBoundary */ "./node_modules/chrono-node/dist/common/parsers/AbstractParserWithWordBoundary.js" ) ;
const PATTERN = new RegExp ( ` ( ${ pattern _1 . matchAnyPattern ( constants _1 . MONTH _DICTIONARY ) } ) ` + "(?:-|/|\\s*,?\\s*)" + ` ( ${ constants _2 . ORDINAL _NUMBER _PATTERN } )(?! \\ s*(?:am|pm)) \\ s* ` + "(?:" + "(?:to|\\-)\\s*" + ` ( ${ constants _2 . ORDINAL _NUMBER _PATTERN } ) \\ s* ` + ")?" + "(?:" + "(?:-|/|\\s*,?\\s*)" + ` ( ${ constants _3 . YEAR _PATTERN } ) ` + ")?" + "(?=\\W|$)(?!\\:\\d)" , "i" ) ;
const MONTH _NAME _GROUP = 1 ;
const DATE _GROUP = 2 ;
const DATE _TO _GROUP = 3 ;
const YEAR _GROUP = 4 ;
class ENMonthNameMiddleEndianParser extends AbstractParserWithWordBoundary _1 . AbstractParserWithWordBoundaryChecking {
innerPattern ( ) {
return PATTERN ;
}
innerExtract ( context , match ) {
const month = constants _1 . MONTH _DICTIONARY [ match [ MONTH _NAME _GROUP ] . toLowerCase ( ) ] ;
const day = constants _2 . parseOrdinalNumberPattern ( match [ DATE _GROUP ] ) ;
if ( day > 31 ) {
return null ;
}
const components = context . createParsingComponents ( {
day : day ,
month : month
} ) ;
if ( match [ YEAR _GROUP ] ) {
const year = constants _3 . parseYear ( match [ YEAR _GROUP ] ) ;
components . assign ( "year" , year ) ;
} else {
const year = years _1 . findYearClosestToRef ( context . refDate , day , month ) ;
components . imply ( "year" , year ) ;
}
if ( ! match [ DATE _TO _GROUP ] ) {
return components ;
}
const endDate = constants _2 . parseOrdinalNumberPattern ( match [ DATE _TO _GROUP ] ) ;
const result = context . createParsingResult ( match . index , match [ 0 ] ) ;
result . start = components ;
result . end = components . clone ( ) ;
result . end . assign ( "day" , endDate ) ;
return result ;
}
}
exports . default = ENMonthNameMiddleEndianParser ;
/***/ } ) ,
/***/ "./node_modules/chrono-node/dist/locales/en/parsers/ENMonthNameParser.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / en / parsers / ENMonthNameParser . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
"use strict" ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
const constants _1 = _ _webpack _require _ _ ( /*! ../constants */ "./node_modules/chrono-node/dist/locales/en/constants.js" ) ;
const years _1 = _ _webpack _require _ _ ( /*! ../../../calculation/years */ "./node_modules/chrono-node/dist/calculation/years.js" ) ;
const pattern _1 = _ _webpack _require _ _ ( /*! ../../../utils/pattern */ "./node_modules/chrono-node/dist/utils/pattern.js" ) ;
const constants _2 = _ _webpack _require _ _ ( /*! ../constants */ "./node_modules/chrono-node/dist/locales/en/constants.js" ) ;
const AbstractParserWithWordBoundary _1 = _ _webpack _require _ _ ( /*! ../../../common/parsers/AbstractParserWithWordBoundary */ "./node_modules/chrono-node/dist/common/parsers/AbstractParserWithWordBoundary.js" ) ;
const PATTERN = new RegExp ( ` ((?:in) \\ s*)? ` + ` ( ${ pattern _1 . matchAnyPattern ( constants _1 . MONTH _DICTIONARY ) } ) ` + ` \\ s* ` + ` (?: ` + ` [,-]? \\ s*( ${ constants _2 . YEAR _PATTERN } )? ` + ")?" + "(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)" , "i" ) ;
const PREFIX _GROUP = 1 ;
const MONTH _NAME _GROUP = 2 ;
const YEAR _GROUP = 3 ;
class ENMonthNameParser extends AbstractParserWithWordBoundary _1 . AbstractParserWithWordBoundaryChecking {
innerPattern ( ) {
return PATTERN ;
}
innerExtract ( context , match ) {
const monthName = match [ MONTH _NAME _GROUP ] . toLowerCase ( ) ;
if ( match [ 0 ] . length <= 3 && ! constants _1 . FULL _MONTH _NAME _DICTIONARY [ monthName ] ) {
return null ;
}
const result = context . createParsingResult ( match . index + ( match [ PREFIX _GROUP ] || "" ) . length , match . index + match [ 0 ] . length ) ;
result . start . imply ( "day" , 1 ) ;
const month = constants _1 . MONTH _DICTIONARY [ monthName ] ;
result . start . assign ( "month" , month ) ;
if ( match [ YEAR _GROUP ] ) {
const year = constants _2 . parseYear ( match [ YEAR _GROUP ] ) ;
result . start . assign ( "year" , year ) ;
} else {
const year = years _1 . findYearClosestToRef ( context . refDate , 1 , month ) ;
result . start . imply ( "year" , year ) ;
}
return result ;
}
}
exports . default = ENMonthNameParser ;
/***/ } ) ,
/***/ "./node_modules/chrono-node/dist/locales/en/parsers/ENRelativeDateFormatParser.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / en / parsers / ENRelativeDateFormatParser . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
"use strict" ;
var _ _importDefault = this && this . _ _importDefault || function ( mod ) {
return mod && mod . _ _esModule ? mod : {
"default" : mod
} ;
} ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
const constants _1 = _ _webpack _require _ _ ( /*! ../constants */ "./node_modules/chrono-node/dist/locales/en/constants.js" ) ;
const results _1 = _ _webpack _require _ _ ( /*! ../../../results */ "./node_modules/chrono-node/dist/results.js" ) ;
const dayjs _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! dayjs */ "./node_modules/dayjs/dayjs.min.js" ) ) ;
const AbstractParserWithWordBoundary _1 = _ _webpack _require _ _ ( /*! ../../../common/parsers/AbstractParserWithWordBoundary */ "./node_modules/chrono-node/dist/common/parsers/AbstractParserWithWordBoundary.js" ) ;
const pattern _1 = _ _webpack _require _ _ ( /*! ../../../utils/pattern */ "./node_modules/chrono-node/dist/utils/pattern.js" ) ;
const PATTERN = new RegExp ( ` (this|next|last|past) \\ s*( ${ pattern _1 . matchAnyPattern ( constants _1 . TIME _UNIT _DICTIONARY ) } )(?= \\ s*) ` + "(?=\\W|$)" , "i" ) ;
const MODIFIER _WORD _GROUP = 1 ;
const RELATIVE _WORD _GROUP = 2 ;
class ENRelativeDateFormatParser extends AbstractParserWithWordBoundary _1 . AbstractParserWithWordBoundaryChecking {
innerPattern ( ) {
return PATTERN ;
}
innerExtract ( context , match ) {
const modifier = match [ MODIFIER _WORD _GROUP ] . toLowerCase ( ) ;
const unitWord = match [ RELATIVE _WORD _GROUP ] . toLowerCase ( ) ;
const timeunit = constants _1 . TIME _UNIT _DICTIONARY [ unitWord ] ;
if ( modifier == "next" ) {
const timeUnits = { } ;
timeUnits [ timeunit ] = 1 ;
return results _1 . ParsingComponents . createRelativeFromRefInstant ( context . refDate , timeUnits ) ;
}
if ( modifier == "last" || modifier == "past" ) {
const timeUnits = { } ;
timeUnits [ timeunit ] = - 1 ;
return results _1 . ParsingComponents . createRelativeFromRefInstant ( context . refDate , timeUnits ) ;
}
const components = context . createParsingComponents ( ) ;
let date = dayjs _1 . default ( context . refDate ) ;
if ( unitWord . match ( /week/i ) ) {
date = date . add ( - date . get ( "d" ) , "d" ) ;
components . imply ( "day" , date . date ( ) ) ;
components . imply ( "month" , date . month ( ) + 1 ) ;
components . imply ( "year" , date . year ( ) ) ;
} else if ( unitWord . match ( /month/i ) ) {
date = date . add ( - date . date ( ) + 1 , "d" ) ;
components . imply ( "day" , date . date ( ) ) ;
components . assign ( "year" , date . year ( ) ) ;
components . assign ( "month" , date . month ( ) + 1 ) ;
} else if ( unitWord . match ( /year/i ) ) {
date = date . add ( - date . date ( ) + 1 , "d" ) ;
date = date . add ( - date . month ( ) , "month" ) ;
components . imply ( "day" , date . date ( ) ) ;
components . imply ( "month" , date . month ( ) + 1 ) ;
components . assign ( "year" , date . year ( ) ) ;
}
return components ;
}
}
exports . default = ENRelativeDateFormatParser ;
/***/ } ) ,
/***/ "./node_modules/chrono-node/dist/locales/en/parsers/ENSlashMonthFormatParser.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / en / parsers / ENSlashMonthFormatParser . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
"use strict" ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
const AbstractParserWithWordBoundary _1 = _ _webpack _require _ _ ( /*! ../../../common/parsers/AbstractParserWithWordBoundary */ "./node_modules/chrono-node/dist/common/parsers/AbstractParserWithWordBoundary.js" ) ;
const PATTERN = new RegExp ( "([0-9]|0[1-9]|1[012])/([0-9]{4})" + "" , "i" ) ;
const MONTH _GROUP = 1 ;
const YEAR _GROUP = 2 ;
class ENSlashMonthFormatParser extends AbstractParserWithWordBoundary _1 . AbstractParserWithWordBoundaryChecking {
innerPattern ( ) {
return PATTERN ;
}
innerExtract ( context , match ) {
const year = parseInt ( match [ YEAR _GROUP ] ) ;
const month = parseInt ( match [ MONTH _GROUP ] ) ;
return context . createParsingComponents ( ) . imply ( "day" , 1 ) . assign ( "month" , month ) . assign ( "year" , year ) ;
}
}
exports . default = ENSlashMonthFormatParser ;
/***/ } ) ,
/***/ "./node_modules/chrono-node/dist/locales/en/parsers/ENTimeExpressionParser.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / en / parsers / ENTimeExpressionParser . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
"use strict" ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
const index _1 = _ _webpack _require _ _ ( /*! ../../../index */ "./node_modules/chrono-node/dist/index.js" ) ;
const AbstractTimeExpressionParser _1 = _ _webpack _require _ _ ( /*! ../../../common/parsers/AbstractTimeExpressionParser */ "./node_modules/chrono-node/dist/common/parsers/AbstractTimeExpressionParser.js" ) ;
class ENTimeExpressionParser extends AbstractTimeExpressionParser _1 . AbstractTimeExpressionParser {
constructor ( strictMode ) {
super ( strictMode ) ;
}
followingPhase ( ) {
return "\\s*(?:\\-|\\– |\\~|\\〜|to|\\?)\\s*" ;
}
primaryPrefix ( ) {
return "(?:(?:at|from)\\s*)??" ;
}
primarySuffix ( ) {
return "(?:\\s*(?:o\\W*clock|at\\s*night|in\\s*the\\s*(?:morning|afternoon)))?(?!/)(?=\\W|$)" ;
}
extractPrimaryTimeComponents ( context , match ) {
const components = super . extractPrimaryTimeComponents ( context , match ) ;
if ( components ) {
if ( match [ 0 ] . endsWith ( "night" ) ) {
const hour = components . get ( "hour" ) ;
if ( hour >= 6 && hour < 12 ) {
components . assign ( "hour" , components . get ( "hour" ) + 12 ) ;
components . assign ( "meridiem" , index _1 . Meridiem . PM ) ;
} else if ( hour < 6 ) {
components . assign ( "meridiem" , index _1 . Meridiem . AM ) ;
}
}
if ( match [ 0 ] . endsWith ( "afternoon" ) ) {
components . assign ( "meridiem" , index _1 . Meridiem . PM ) ;
const hour = components . get ( "hour" ) ;
if ( hour >= 0 && hour <= 6 ) {
components . assign ( "hour" , components . get ( "hour" ) + 12 ) ;
}
}
if ( match [ 0 ] . endsWith ( "morning" ) ) {
components . assign ( "meridiem" , index _1 . Meridiem . AM ) ;
const hour = components . get ( "hour" ) ;
if ( hour < 12 ) {
components . assign ( "hour" , components . get ( "hour" ) ) ;
}
}
}
return components ;
}
}
exports . default = ENTimeExpressionParser ;
/***/ } ) ,
/***/ "./node_modules/chrono-node/dist/locales/en/parsers/ENTimeUnitAgoFormatParser.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / en / parsers / ENTimeUnitAgoFormatParser . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
"use strict" ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
const constants _1 = _ _webpack _require _ _ ( /*! ../constants */ "./node_modules/chrono-node/dist/locales/en/constants.js" ) ;
const results _1 = _ _webpack _require _ _ ( /*! ../../../results */ "./node_modules/chrono-node/dist/results.js" ) ;
const AbstractParserWithWordBoundary _1 = _ _webpack _require _ _ ( /*! ../../../common/parsers/AbstractParserWithWordBoundary */ "./node_modules/chrono-node/dist/common/parsers/AbstractParserWithWordBoundary.js" ) ;
const timeunits _1 = _ _webpack _require _ _ ( /*! ../../../utils/timeunits */ "./node_modules/chrono-node/dist/utils/timeunits.js" ) ;
const PATTERN = new RegExp ( "" + "(" + constants _1 . TIME _UNITS _PATTERN + ")" + "(?:ago|before|earlier)(?=(?:\\W|$))" , "i" ) ;
const STRICT _PATTERN = new RegExp ( "" + "(" + constants _1 . TIME _UNITS _PATTERN + ")" + "ago(?=(?:\\W|$))" , "i" ) ;
class ENTimeUnitAgoFormatParser extends AbstractParserWithWordBoundary _1 . AbstractParserWithWordBoundaryChecking {
constructor ( strictMode ) {
super ( ) ;
this . strictMode = strictMode ;
}
innerPattern ( ) {
return this . strictMode ? STRICT _PATTERN : PATTERN ;
}
innerExtract ( context , match ) {
const timeUnits = constants _1 . parseTimeUnits ( match [ 1 ] ) ;
const outputTimeUnits = timeunits _1 . reverseTimeUnits ( timeUnits ) ;
return results _1 . ParsingComponents . createRelativeFromRefInstant ( context . refDate , outputTimeUnits ) ;
}
}
exports . default = ENTimeUnitAgoFormatParser ;
/***/ } ) ,
/***/ "./node_modules/chrono-node/dist/locales/en/parsers/ENTimeUnitCasualRelativeFormatParser.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / en / parsers / ENTimeUnitCasualRelativeFormatParser . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
"use strict" ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
const constants _1 = _ _webpack _require _ _ ( /*! ../constants */ "./node_modules/chrono-node/dist/locales/en/constants.js" ) ;
const results _1 = _ _webpack _require _ _ ( /*! ../../../results */ "./node_modules/chrono-node/dist/results.js" ) ;
const AbstractParserWithWordBoundary _1 = _ _webpack _require _ _ ( /*! ../../../common/parsers/AbstractParserWithWordBoundary */ "./node_modules/chrono-node/dist/common/parsers/AbstractParserWithWordBoundary.js" ) ;
const timeunits _1 = _ _webpack _require _ _ ( /*! ../../../utils/timeunits */ "./node_modules/chrono-node/dist/utils/timeunits.js" ) ;
const PATTERN = new RegExp ( ` (this|last|past|next| \\ +|-) \\ s*( ${ constants _1 . TIME _UNITS _PATTERN } )(?= \\ W| $ ) ` , "i" ) ;
class ENTimeUnitCasualRelativeFormatParser extends AbstractParserWithWordBoundary _1 . AbstractParserWithWordBoundaryChecking {
innerPattern ( ) {
return PATTERN ;
}
innerExtract ( context , match ) {
const prefix = match [ 1 ] . toLowerCase ( ) ;
let timeUnits = constants _1 . parseTimeUnits ( match [ 2 ] ) ;
switch ( prefix ) {
case "last" :
case "past" :
case "-" :
timeUnits = timeunits _1 . reverseTimeUnits ( timeUnits ) ;
break ;
}
return results _1 . ParsingComponents . createRelativeFromRefInstant ( context . refDate , timeUnits ) ;
}
}
exports . default = ENTimeUnitCasualRelativeFormatParser ;
/***/ } ) ,
/***/ "./node_modules/chrono-node/dist/locales/en/parsers/ENTimeUnitLaterFormatParser.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / en / parsers / ENTimeUnitLaterFormatParser . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
"use strict" ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
const constants _1 = _ _webpack _require _ _ ( /*! ../constants */ "./node_modules/chrono-node/dist/locales/en/constants.js" ) ;
const results _1 = _ _webpack _require _ _ ( /*! ../../../results */ "./node_modules/chrono-node/dist/results.js" ) ;
const AbstractParserWithWordBoundary _1 = _ _webpack _require _ _ ( /*! ../../../common/parsers/AbstractParserWithWordBoundary */ "./node_modules/chrono-node/dist/common/parsers/AbstractParserWithWordBoundary.js" ) ;
const PATTERN = new RegExp ( "" + "(" + constants _1 . TIME _UNITS _PATTERN + ")" + "(later|after|from now|henceforth|forward|out)" + "(?=(?:\\W|$))" , "i" ) ;
const STRICT _PATTERN = new RegExp ( "" + "(" + constants _1 . TIME _UNITS _PATTERN + ")" + "(later|from now)" + "(?=(?:\\W|$))" , "i" ) ;
const GROUP _NUM _TIMEUNITS = 1 ;
class ENTimeUnitLaterFormatParser extends AbstractParserWithWordBoundary _1 . AbstractParserWithWordBoundaryChecking {
constructor ( strictMode ) {
super ( ) ;
this . strictMode = strictMode ;
}
innerPattern ( ) {
return this . strictMode ? STRICT _PATTERN : PATTERN ;
}
innerExtract ( context , match ) {
const fragments = constants _1 . parseTimeUnits ( match [ GROUP _NUM _TIMEUNITS ] ) ;
return results _1 . ParsingComponents . createRelativeFromRefInstant ( context . refDate , fragments ) ;
}
}
exports . default = ENTimeUnitLaterFormatParser ;
/***/ } ) ,
/***/ "./node_modules/chrono-node/dist/locales/en/parsers/ENTimeUnitWithinFormatParser.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / en / parsers / ENTimeUnitWithinFormatParser . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
"use strict" ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
const constants _1 = _ _webpack _require _ _ ( /*! ../constants */ "./node_modules/chrono-node/dist/locales/en/constants.js" ) ;
const results _1 = _ _webpack _require _ _ ( /*! ../../../results */ "./node_modules/chrono-node/dist/results.js" ) ;
const AbstractParserWithWordBoundary _1 = _ _webpack _require _ _ ( /*! ../../../common/parsers/AbstractParserWithWordBoundary */ "./node_modules/chrono-node/dist/common/parsers/AbstractParserWithWordBoundary.js" ) ;
const PATTERN _WITH _PREFIX = new RegExp ( ` (?:within|in|for) \\ s* ` + ` (?:(?:about|around|roughly|approximately|just) \\ s*(?:~ \\ s*)?)?( ${ constants _1 . TIME _UNITS _PATTERN } )(?= \\ W| $ ) ` , "i" ) ;
const PATTERN _WITHOUT _PREFIX = new RegExp ( ` (?:(?:about|around|roughly|approximately|just) \\ s*(?:~ \\ s*)?)?( ${ constants _1 . TIME _UNITS _PATTERN } )(?= \\ W| $ ) ` , "i" ) ;
class ENTimeUnitWithinFormatParser extends AbstractParserWithWordBoundary _1 . AbstractParserWithWordBoundaryChecking {
innerPattern ( context ) {
return context . option . forwardDate ? PATTERN _WITHOUT _PREFIX : PATTERN _WITH _PREFIX ;
}
innerExtract ( context , match ) {
const timeUnits = constants _1 . parseTimeUnits ( match [ 1 ] ) ;
return results _1 . ParsingComponents . createRelativeFromRefInstant ( context . refDate , timeUnits ) ;
}
}
exports . default = ENTimeUnitWithinFormatParser ;
/***/ } ) ,
/***/ "./node_modules/chrono-node/dist/locales/en/parsers/ENWeekdayParser.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / en / parsers / ENWeekdayParser . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
"use strict" ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
const constants _1 = _ _webpack _require _ _ ( /*! ../constants */ "./node_modules/chrono-node/dist/locales/en/constants.js" ) ;
const pattern _1 = _ _webpack _require _ _ ( /*! ../../../utils/pattern */ "./node_modules/chrono-node/dist/utils/pattern.js" ) ;
const AbstractParserWithWordBoundary _1 = _ _webpack _require _ _ ( /*! ../../../common/parsers/AbstractParserWithWordBoundary */ "./node_modules/chrono-node/dist/common/parsers/AbstractParserWithWordBoundary.js" ) ;
const weeks _1 = _ _webpack _require _ _ ( /*! ../../../calculation/weeks */ "./node_modules/chrono-node/dist/calculation/weeks.js" ) ;
const PATTERN = new RegExp ( "(?:(?:\\,|\\(|\\( )\\s*)?" + "(?:on\\s*?)?" + "(?:(this|last|past|next)\\s*)?" + ` ( ${ pattern _1 . matchAnyPattern ( constants _1 . WEEKDAY _DICTIONARY ) } ) ` + "(?:\\s*(?:\\,|\\)|\\) ))?" + "(?:\\s*(this|last|past|next)\\s*week)?" + "(?=\\W|$)" , "i" ) ;
const PREFIX _GROUP = 1 ;
const WEEKDAY _GROUP = 2 ;
const POSTFIX _GROUP = 3 ;
class ENWeekdayParser extends AbstractParserWithWordBoundary _1 . AbstractParserWithWordBoundaryChecking {
innerPattern ( ) {
return PATTERN ;
}
innerExtract ( context , match ) {
const dayOfWeek = match [ WEEKDAY _GROUP ] . toLowerCase ( ) ;
const offset = constants _1 . WEEKDAY _DICTIONARY [ dayOfWeek ] ;
const prefix = match [ PREFIX _GROUP ] ;
const postfix = match [ POSTFIX _GROUP ] ;
let modifierWord = prefix || postfix ;
modifierWord = modifierWord || "" ;
modifierWord = modifierWord . toLowerCase ( ) ;
let modifier = null ;
if ( modifierWord == "last" || modifierWord == "past" ) {
modifier = "last" ;
} else if ( modifierWord == "next" ) {
modifier = "next" ;
} else if ( modifierWord == "this" ) {
modifier = "this" ;
}
const date = weeks _1 . toDayJSWeekday ( context . refDate , offset , modifier ) ;
return context . createParsingComponents ( ) . assign ( "weekday" , offset ) . imply ( "day" , date . date ( ) ) . imply ( "month" , date . month ( ) + 1 ) . imply ( "year" , date . year ( ) ) ;
}
}
exports . default = ENWeekdayParser ;
/***/ } ) ,
/***/ "./node_modules/chrono-node/dist/locales/en/refiners/ENMergeDateRangeRefiner.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / en / refiners / ENMergeDateRangeRefiner . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
"use strict" ;
var _ _importDefault = this && this . _ _importDefault || function ( mod ) {
return mod && mod . _ _esModule ? mod : {
"default" : mod
} ;
} ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
const AbstractMergeDateRangeRefiner _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ../../../common/refiners/AbstractMergeDateRangeRefiner */ "./node_modules/chrono-node/dist/common/refiners/AbstractMergeDateRangeRefiner.js" ) ) ;
class ENMergeDateRangeRefiner extends AbstractMergeDateRangeRefiner _1 . default {
patternBetween ( ) {
return /^\s*(to|-)\s*$/i ;
}
}
exports . default = ENMergeDateRangeRefiner ;
/***/ } ) ,
/***/ "./node_modules/chrono-node/dist/locales/en/refiners/ENMergeDateTimeRefiner.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / en / refiners / ENMergeDateTimeRefiner . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
"use strict" ;
var _ _importDefault = this && this . _ _importDefault || function ( mod ) {
return mod && mod . _ _esModule ? mod : {
"default" : mod
} ;
} ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
const AbstractMergeDateTimeRefiner _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ../../../common/refiners/AbstractMergeDateTimeRefiner */ "./node_modules/chrono-node/dist/common/refiners/AbstractMergeDateTimeRefiner.js" ) ) ;
class ENMergeDateTimeRefiner extends AbstractMergeDateTimeRefiner _1 . default {
patternBetween ( ) {
return new RegExp ( "^\\s*(T|at|after|before|on|of|,|-)?\\s*$" ) ;
}
}
exports . default = ENMergeDateTimeRefiner ;
/***/ } ) ,
/***/ "./node_modules/chrono-node/dist/locales/fr/constants.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / fr / constants . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
"use strict" ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
exports . parseTimeUnits = exports . TIME _UNITS _PATTERN = exports . parseYear = exports . YEAR _PATTERN = exports . parseOrdinalNumberPattern = exports . ORDINAL _NUMBER _PATTERN = exports . parseNumberPattern = exports . NUMBER _PATTERN = exports . TIME _UNIT _DICTIONARY = exports . INTEGER _WORD _DICTIONARY = exports . MONTH _DICTIONARY = exports . WEEKDAY _DICTIONARY = void 0 ;
const pattern _1 = _ _webpack _require _ _ ( /*! ../../utils/pattern */ "./node_modules/chrono-node/dist/utils/pattern.js" ) ;
exports . WEEKDAY _DICTIONARY = {
"dimanche" : 0 ,
"dim" : 0 ,
"lundi" : 1 ,
"lun" : 1 ,
"mardi" : 2 ,
"mar" : 2 ,
"mercredi" : 3 ,
"mer" : 3 ,
"jeudi" : 4 ,
"jeu" : 4 ,
"vendredi" : 5 ,
"ven" : 5 ,
"samedi" : 6 ,
"sam" : 6
} ;
exports . MONTH _DICTIONARY = {
"janvier" : 1 ,
"jan" : 1 ,
"jan." : 1 ,
"février" : 2 ,
"fév" : 2 ,
"fév." : 2 ,
"fevrier" : 2 ,
"fev" : 2 ,
"fev." : 2 ,
"mars" : 3 ,
"mar" : 3 ,
"mar." : 3 ,
"avril" : 4 ,
"avr" : 4 ,
"avr." : 4 ,
"mai" : 5 ,
"juin" : 6 ,
"jun" : 6 ,
"juillet" : 7 ,
"juil" : 7 ,
"jul" : 7 ,
"jul." : 7 ,
"août" : 8 ,
"aout" : 8 ,
"septembre" : 9 ,
"sep" : 9 ,
"sep." : 9 ,
"sept" : 9 ,
"sept." : 9 ,
"octobre" : 10 ,
"oct" : 10 ,
"oct." : 10 ,
"novembre" : 11 ,
"nov" : 11 ,
"nov." : 11 ,
"décembre" : 12 ,
"decembre" : 12 ,
"dec" : 12 ,
"dec." : 12
} ;
exports . INTEGER _WORD _DICTIONARY = {
"un" : 1 ,
"deux" : 2 ,
"trois" : 3 ,
"quatre" : 4 ,
"cinq" : 5 ,
"six" : 6 ,
"sept" : 7 ,
"huit" : 8 ,
"neuf" : 9 ,
"dix" : 10 ,
"onze" : 11 ,
"douze" : 12 ,
"treize" : 13
} ;
exports . TIME _UNIT _DICTIONARY = {
"sec" : "second" ,
"seconde" : "second" ,
"secondes" : "second" ,
"min" : "minute" ,
"mins" : "minute" ,
"minute" : "minute" ,
"minutes" : "minute" ,
"h" : "hour" ,
"hr" : "hour" ,
"hrs" : "hour" ,
"heure" : "hour" ,
"heures" : "hour" ,
"jour" : "d" ,
"jours" : "d" ,
"semaine" : "week" ,
"semaines" : "week" ,
"mois" : "month" ,
"trimestre" : "quarter" ,
"trimestres" : "quarter" ,
"ans" : "year" ,
"année" : "year" ,
"années" : "year"
} ;
exports . NUMBER _PATTERN = ` (?: ${ pattern _1 . matchAnyPattern ( exports . INTEGER _WORD _DICTIONARY ) } |[0-9]+|[0-9]+ \\ .[0-9]+|une?|quelques?|demi-?) ` ;
function parseNumberPattern ( match ) {
const num = match . toLowerCase ( ) ;
if ( exports . INTEGER _WORD _DICTIONARY [ num ] !== undefined ) {
return exports . INTEGER _WORD _DICTIONARY [ num ] ;
} else if ( num === "une" || num === "un" ) {
return 1 ;
} else if ( num . match ( /quelques?/ ) ) {
return 3 ;
} else if ( num . match ( /demi-?/ ) ) {
return 0.5 ;
}
return parseFloat ( num ) ;
}
exports . parseNumberPattern = parseNumberPattern ;
exports . ORDINAL _NUMBER _PATTERN = ` (?:[0-9]{1,2}(?:er)?) ` ;
function parseOrdinalNumberPattern ( match ) {
let num = match . toLowerCase ( ) ;
num = num . replace ( /(?:er)$/i , "" ) ;
return parseInt ( num ) ;
}
exports . parseOrdinalNumberPattern = parseOrdinalNumberPattern ;
exports . YEAR _PATTERN = ` (?:[1-9][0-9]{0,3} \\ s*(?:AC|AD|p \\ . \\ s*C(?:hr?)? \\ . \\ s*n \\ .)|[1-2][0-9]{3}|[5-9][0-9]) ` ;
function parseYear ( match ) {
if ( /AC/i . test ( match ) ) {
match = match . replace ( /BC/i , "" ) ;
return - parseInt ( match ) ;
}
if ( /AD/i . test ( match ) || /C/i . test ( match ) ) {
match = match . replace ( /[^\d]+/i , "" ) ;
return parseInt ( match ) ;
}
let yearNumber = parseInt ( match ) ;
if ( yearNumber < 100 ) {
if ( yearNumber > 50 ) {
yearNumber = yearNumber + 1900 ;
} else {
yearNumber = yearNumber + 2000 ;
}
}
return yearNumber ;
}
exports . parseYear = parseYear ;
const SINGLE _TIME _UNIT _PATTERN = ` ( ${ exports . NUMBER _PATTERN } ) \\ s{0,5}( ${ pattern _1 . matchAnyPattern ( exports . TIME _UNIT _DICTIONARY ) } ) \\ s{0,5} ` ;
const SINGLE _TIME _UNIT _REGEX = new RegExp ( SINGLE _TIME _UNIT _PATTERN , "i" ) ;
exports . TIME _UNITS _PATTERN = pattern _1 . repeatedTimeunitPattern ( "" , SINGLE _TIME _UNIT _PATTERN ) ;
function parseTimeUnits ( timeunitText ) {
const fragments = { } ;
let remainingText = timeunitText ;
let match = SINGLE _TIME _UNIT _REGEX . exec ( remainingText ) ;
while ( match ) {
collectDateTimeFragment ( fragments , match ) ;
remainingText = remainingText . substring ( match [ 0 ] . length ) ;
match = SINGLE _TIME _UNIT _REGEX . exec ( remainingText ) ;
}
return fragments ;
}
exports . parseTimeUnits = parseTimeUnits ;
function collectDateTimeFragment ( fragments , match ) {
const num = parseNumberPattern ( match [ 1 ] ) ;
const unit = exports . TIME _UNIT _DICTIONARY [ match [ 2 ] . toLowerCase ( ) ] ;
fragments [ unit ] = num ;
}
/***/ } ) ,
/***/ "./node_modules/chrono-node/dist/locales/fr/index.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / fr / index . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
"use strict" ;
var _ _importDefault = this && this . _ _importDefault || function ( mod ) {
return mod && mod . _ _esModule ? mod : {
"default" : mod
} ;
} ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
exports . createConfiguration = exports . createCasualConfiguration = exports . parseDate = exports . parse = exports . strict = exports . casual = void 0 ;
const configurations _1 = _ _webpack _require _ _ ( /*! ../../configurations */ "./node_modules/chrono-node/dist/configurations.js" ) ;
const chrono _1 = _ _webpack _require _ _ ( /*! ../../chrono */ "./node_modules/chrono-node/dist/chrono.js" ) ;
const FRCasualDateParser _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ./parsers/FRCasualDateParser */ "./node_modules/chrono-node/dist/locales/fr/parsers/FRCasualDateParser.js" ) ) ;
const FRCasualTimeParser _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ./parsers/FRCasualTimeParser */ "./node_modules/chrono-node/dist/locales/fr/parsers/FRCasualTimeParser.js" ) ) ;
const SlashDateFormatParser _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ../../common/parsers/SlashDateFormatParser */ "./node_modules/chrono-node/dist/common/parsers/SlashDateFormatParser.js" ) ) ;
const FRTimeExpressionParser _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ./parsers/FRTimeExpressionParser */ "./node_modules/chrono-node/dist/locales/fr/parsers/FRTimeExpressionParser.js" ) ) ;
const FRMergeDateTimeRefiner _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ./refiners/FRMergeDateTimeRefiner */ "./node_modules/chrono-node/dist/locales/fr/refiners/FRMergeDateTimeRefiner.js" ) ) ;
const FRMergeDateRangeRefiner _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ./refiners/FRMergeDateRangeRefiner */ "./node_modules/chrono-node/dist/locales/fr/refiners/FRMergeDateRangeRefiner.js" ) ) ;
const FRWeekdayParser _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ./parsers/FRWeekdayParser */ "./node_modules/chrono-node/dist/locales/fr/parsers/FRWeekdayParser.js" ) ) ;
const FRSpecificTimeExpressionParser _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ./parsers/FRSpecificTimeExpressionParser */ "./node_modules/chrono-node/dist/locales/fr/parsers/FRSpecificTimeExpressionParser.js" ) ) ;
const FRMonthNameLittleEndianParser _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ./parsers/FRMonthNameLittleEndianParser */ "./node_modules/chrono-node/dist/locales/fr/parsers/FRMonthNameLittleEndianParser.js" ) ) ;
const FRTimeUnitAgoFormatParser _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ./parsers/FRTimeUnitAgoFormatParser */ "./node_modules/chrono-node/dist/locales/fr/parsers/FRTimeUnitAgoFormatParser.js" ) ) ;
const FRTimeUnitWithinFormatParser _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ./parsers/FRTimeUnitWithinFormatParser */ "./node_modules/chrono-node/dist/locales/fr/parsers/FRTimeUnitWithinFormatParser.js" ) ) ;
const FRTimeUnitRelativeFormatParser _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ./parsers/FRTimeUnitRelativeFormatParser */ "./node_modules/chrono-node/dist/locales/fr/parsers/FRTimeUnitRelativeFormatParser.js" ) ) ;
exports . casual = new chrono _1 . Chrono ( createCasualConfiguration ( ) ) ;
exports . strict = new chrono _1 . Chrono ( createConfiguration ( true ) ) ;
function parse ( text , ref , option ) {
return exports . casual . parse ( text , ref , option ) ;
}
exports . parse = parse ;
function parseDate ( text , ref , option ) {
return exports . casual . parseDate ( text , ref , option ) ;
}
exports . parseDate = parseDate ;
function createCasualConfiguration ( littleEndian = true ) {
const option = createConfiguration ( false , littleEndian ) ;
option . parsers . unshift ( new FRCasualDateParser _1 . default ( ) ) ;
option . parsers . unshift ( new FRCasualTimeParser _1 . default ( ) ) ;
option . parsers . unshift ( new FRTimeUnitRelativeFormatParser _1 . default ( ) ) ;
return option ;
}
exports . createCasualConfiguration = createCasualConfiguration ;
function createConfiguration ( strictMode = true , littleEndian = true ) {
return configurations _1 . includeCommonConfiguration ( {
parsers : [ new SlashDateFormatParser _1 . default ( littleEndian ) , new FRMonthNameLittleEndianParser _1 . default ( ) , new FRTimeExpressionParser _1 . default ( ) , new FRSpecificTimeExpressionParser _1 . default ( ) , new FRTimeUnitAgoFormatParser _1 . default ( ) , new FRTimeUnitWithinFormatParser _1 . default ( ) , new FRWeekdayParser _1 . default ( ) ] ,
refiners : [ new FRMergeDateTimeRefiner _1 . default ( ) , new FRMergeDateRangeRefiner _1 . default ( ) ]
} , strictMode ) ;
}
exports . createConfiguration = createConfiguration ;
/***/ } ) ,
/***/ "./node_modules/chrono-node/dist/locales/fr/parsers/FRCasualDateParser.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / fr / parsers / FRCasualDateParser . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
"use strict" ;
var _ _createBinding = this && this . _ _createBinding || ( Object . create ? function ( o , m , k , k2 ) {
if ( k2 === undefined ) k2 = k ;
Object . defineProperty ( o , k2 , {
enumerable : true ,
get : function ( ) {
return m [ k ] ;
}
} ) ;
} : function ( o , m , k , k2 ) {
if ( k2 === undefined ) k2 = k ;
o [ k2 ] = m [ k ] ;
} ) ;
var _ _setModuleDefault = this && this . _ _setModuleDefault || ( Object . create ? function ( o , v ) {
Object . defineProperty ( o , "default" , {
enumerable : true ,
value : v
} ) ;
} : function ( o , v ) {
o [ "default" ] = v ;
} ) ;
var _ _importStar = this && this . _ _importStar || function ( mod ) {
if ( mod && mod . _ _esModule ) return mod ;
var result = { } ;
if ( mod != null ) for ( var k in mod ) if ( k !== "default" && Object . prototype . hasOwnProperty . call ( mod , k ) ) _ _createBinding ( result , mod , k ) ;
_ _setModuleDefault ( result , mod ) ;
return result ;
} ;
var _ _importDefault = this && this . _ _importDefault || function ( mod ) {
return mod && mod . _ _esModule ? mod : {
"default" : mod
} ;
} ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
const dayjs _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! dayjs */ "./node_modules/dayjs/dayjs.min.js" ) ) ;
const index _1 = _ _webpack _require _ _ ( /*! ../../../index */ "./node_modules/chrono-node/dist/index.js" ) ;
const AbstractParserWithWordBoundary _1 = _ _webpack _require _ _ ( /*! ../../../common/parsers/AbstractParserWithWordBoundary */ "./node_modules/chrono-node/dist/common/parsers/AbstractParserWithWordBoundary.js" ) ;
const dayjs _2 = _ _webpack _require _ _ ( /*! ../../../utils/dayjs */ "./node_modules/chrono-node/dist/utils/dayjs.js" ) ;
const references = _ _importStar ( _ _webpack _require _ _ ( /*! ../../../common/casualReferences */ "./node_modules/chrono-node/dist/common/casualReferences.js" ) ) ;
class FRCasualDateParser extends AbstractParserWithWordBoundary _1 . AbstractParserWithWordBoundaryChecking {
innerPattern ( context ) {
return /(maintenant|aujourd'hui|demain|hier|cette\s*nuit|la\s*veille)(?=\W|$)/i ;
}
innerExtract ( context , match ) {
let targetDate = dayjs _1 . default ( context . refDate ) ;
const lowerText = match [ 0 ] . toLowerCase ( ) ;
const component = context . createParsingComponents ( ) ;
switch ( lowerText ) {
case "maintenant" :
return references . now ( context . reference ) ;
case "aujourd'hui" :
return references . today ( context . reference ) ;
case "hier" :
return references . yesterday ( context . reference ) ;
case "demain" :
return references . tomorrow ( context . reference ) ;
default :
if ( lowerText . match ( /cette\s*nuit/ ) ) {
dayjs _2 . assignSimilarDate ( component , targetDate ) ;
component . imply ( "hour" , 22 ) ;
component . imply ( "meridiem" , index _1 . Meridiem . PM ) ;
} else if ( lowerText . match ( /la\s*veille/ ) ) {
targetDate = targetDate . add ( - 1 , "day" ) ;
dayjs _2 . assignSimilarDate ( component , targetDate ) ;
component . imply ( "hour" , 0 ) ;
}
}
return component ;
}
}
exports . default = FRCasualDateParser ;
/***/ } ) ,
/***/ "./node_modules/chrono-node/dist/locales/fr/parsers/FRCasualTimeParser.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / fr / parsers / FRCasualTimeParser . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
"use strict" ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
const index _1 = _ _webpack _require _ _ ( /*! ../../../index */ "./node_modules/chrono-node/dist/index.js" ) ;
const AbstractParserWithWordBoundary _1 = _ _webpack _require _ _ ( /*! ../../../common/parsers/AbstractParserWithWordBoundary */ "./node_modules/chrono-node/dist/common/parsers/AbstractParserWithWordBoundary.js" ) ;
class FRCasualTimeParser extends AbstractParserWithWordBoundary _1 . AbstractParserWithWordBoundaryChecking {
innerPattern ( context ) {
return /(cet?)?\s*(matin|soir|après-midi|aprem|a midi|à minuit)(?=\W|$)/i ;
}
innerExtract ( context , match ) {
const suffixLower = match [ 2 ] . toLowerCase ( ) ;
const component = context . createParsingComponents ( ) ;
switch ( suffixLower ) {
case "après-midi" :
case "aprem" :
component . imply ( "hour" , 14 ) ;
component . imply ( "minute" , 0 ) ;
component . imply ( "meridiem" , index _1 . Meridiem . PM ) ;
break ;
case "soir" :
component . imply ( "hour" , 18 ) ;
component . imply ( "minute" , 0 ) ;
component . imply ( "meridiem" , index _1 . Meridiem . PM ) ;
break ;
case "matin" :
component . imply ( "hour" , 8 ) ;
component . imply ( "minute" , 0 ) ;
component . imply ( "meridiem" , index _1 . Meridiem . AM ) ;
break ;
case "a midi" :
component . imply ( "hour" , 12 ) ;
component . imply ( "minute" , 0 ) ;
component . imply ( "meridiem" , index _1 . Meridiem . AM ) ;
break ;
case "à minuit" :
component . imply ( "hour" , 0 ) ;
component . imply ( "meridiem" , index _1 . Meridiem . AM ) ;
break ;
}
return component ;
}
}
exports . default = FRCasualTimeParser ;
/***/ } ) ,
/***/ "./node_modules/chrono-node/dist/locales/fr/parsers/FRMonthNameLittleEndianParser.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / fr / parsers / FRMonthNameLittleEndianParser . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
"use strict" ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
const years _1 = _ _webpack _require _ _ ( /*! ../../../calculation/years */ "./node_modules/chrono-node/dist/calculation/years.js" ) ;
const constants _1 = _ _webpack _require _ _ ( /*! ../constants */ "./node_modules/chrono-node/dist/locales/fr/constants.js" ) ;
const constants _2 = _ _webpack _require _ _ ( /*! ../constants */ "./node_modules/chrono-node/dist/locales/fr/constants.js" ) ;
const constants _3 = _ _webpack _require _ _ ( /*! ../constants */ "./node_modules/chrono-node/dist/locales/fr/constants.js" ) ;
const pattern _1 = _ _webpack _require _ _ ( /*! ../../../utils/pattern */ "./node_modules/chrono-node/dist/utils/pattern.js" ) ;
const AbstractParserWithWordBoundary _1 = _ _webpack _require _ _ ( /*! ../../../common/parsers/AbstractParserWithWordBoundary */ "./node_modules/chrono-node/dist/common/parsers/AbstractParserWithWordBoundary.js" ) ;
const PATTERN = new RegExp ( "(?:on\\s*?)?" + ` ( ${ constants _3 . ORDINAL _NUMBER _PATTERN } ) ` + ` (?: \\ s*(?:au| \\ -| \\ – |jusqu'au?|\\ s) \\ s*( ${ constants _3 . ORDINAL _NUMBER _PATTERN } ))? ` + ` (?:-|/| \\ s*(?:de)? \\ s*) ` + ` ( ${ pattern _1 . matchAnyPattern ( constants _1 . MONTH _DICTIONARY ) } ) ` + ` (?:(?:-|/|,? \\ s*)( ${ constants _2 . YEAR _PATTERN } (?![^ \\ s] \\ d)))? ` + ` (?= \\ W| $ ) ` , "i" ) ;
const DATE _GROUP = 1 ;
const DATE _TO _GROUP = 2 ;
const MONTH _NAME _GROUP = 3 ;
const YEAR _GROUP = 4 ;
class FRMonthNameLittleEndianParser extends AbstractParserWithWordBoundary _1 . AbstractParserWithWordBoundaryChecking {
innerPattern ( ) {
return PATTERN ;
}
innerExtract ( context , match ) {
const result = context . createParsingResult ( match . index , match [ 0 ] ) ;
const month = constants _1 . MONTH _DICTIONARY [ match [ MONTH _NAME _GROUP ] . toLowerCase ( ) ] ;
const day = constants _3 . parseOrdinalNumberPattern ( match [ DATE _GROUP ] ) ;
if ( day > 31 ) {
match . index = match . index + match [ DATE _GROUP ] . length ;
return null ;
}
result . start . assign ( "month" , month ) ;
result . start . assign ( "day" , day ) ;
if ( match [ YEAR _GROUP ] ) {
const yearNumber = constants _2 . parseYear ( match [ YEAR _GROUP ] ) ;
result . start . assign ( "year" , yearNumber ) ;
} else {
const year = years _1 . findYearClosestToRef ( context . refDate , day , month ) ;
result . start . imply ( "year" , year ) ;
}
if ( match [ DATE _TO _GROUP ] ) {
const endDate = constants _3 . parseOrdinalNumberPattern ( match [ DATE _TO _GROUP ] ) ;
result . end = result . start . clone ( ) ;
result . end . assign ( "day" , endDate ) ;
}
return result ;
}
}
exports . default = FRMonthNameLittleEndianParser ;
/***/ } ) ,
/***/ "./node_modules/chrono-node/dist/locales/fr/parsers/FRSpecificTimeExpressionParser.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / fr / parsers / FRSpecificTimeExpressionParser . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
"use strict" ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
const index _1 = _ _webpack _require _ _ ( /*! ../../../index */ "./node_modules/chrono-node/dist/index.js" ) ;
const FIRST _REG _PATTERN = new RegExp ( "(^|\\s|T)" + "(?:(?:[àa])\\s*)?" + "(\\d{1,2})(?:h|:)?" + "(?:(\\d{1,2})(?:m|:)?)?" + "(?:(\\d{1,2})(?:s|:)?)?" + "(?:\\s*(A\\.M\\.|P\\.M\\.|AM?|PM?))?" + "(?=\\W|$)" , "i" ) ;
const SECOND _REG _PATTERN = new RegExp ( "^\\s*(\\-|\\– |\\~|\\〜|[àa]|\\?)\\s*" + "(\\d{1,2})(?:h|:)?" + "(?:(\\d{1,2})(?:m|:)?)?" + "(?:(\\d{1,2})(?:s|:)?)?" + "(?:\\s*(A\\.M\\.|P\\.M\\.|AM?|PM?))?" + "(?=\\W|$)" , "i" ) ;
const HOUR _GROUP = 2 ;
const MINUTE _GROUP = 3 ;
const SECOND _GROUP = 4 ;
const AM _PM _HOUR _GROUP = 5 ;
class FRSpecificTimeExpressionParser {
pattern ( context ) {
return FIRST _REG _PATTERN ;
}
extract ( context , match ) {
const result = context . createParsingResult ( match . index + match [ 1 ] . length , match [ 0 ] . substring ( match [ 1 ] . length ) ) ;
if ( result . text . match ( /^\d{4}$/ ) ) {
match . index += match [ 0 ] . length ;
return null ;
}
result . start = FRSpecificTimeExpressionParser . extractTimeComponent ( result . start . clone ( ) , match ) ;
if ( ! result . start ) {
match . index += match [ 0 ] . length ;
return null ;
}
const remainingText = context . text . substring ( match . index + match [ 0 ] . length ) ;
const secondMatch = SECOND _REG _PATTERN . exec ( remainingText ) ;
if ( secondMatch ) {
result . end = FRSpecificTimeExpressionParser . extractTimeComponent ( result . start . clone ( ) , secondMatch ) ;
if ( result . end ) {
result . text += secondMatch [ 0 ] ;
}
}
return result ;
}
static extractTimeComponent ( extractingComponents , match ) {
let hour = 0 ;
let minute = 0 ;
let meridiem = null ;
hour = parseInt ( match [ HOUR _GROUP ] ) ;
if ( match [ MINUTE _GROUP ] != null ) {
minute = parseInt ( match [ MINUTE _GROUP ] ) ;
}
if ( minute >= 60 || hour > 24 ) {
return null ;
}
if ( hour >= 12 ) {
meridiem = index _1 . Meridiem . PM ;
}
if ( match [ AM _PM _HOUR _GROUP ] != null ) {
if ( hour > 12 ) return null ;
const ampm = match [ AM _PM _HOUR _GROUP ] [ 0 ] . toLowerCase ( ) ;
if ( ampm == "a" ) {
meridiem = index _1 . Meridiem . AM ;
if ( hour == 12 ) {
hour = 0 ;
}
}
if ( ampm == "p" ) {
meridiem = index _1 . Meridiem . PM ;
if ( hour != 12 ) {
hour += 12 ;
}
}
}
extractingComponents . assign ( "hour" , hour ) ;
extractingComponents . assign ( "minute" , minute ) ;
if ( meridiem !== null ) {
extractingComponents . assign ( "meridiem" , meridiem ) ;
} else {
if ( hour < 12 ) {
extractingComponents . imply ( "meridiem" , index _1 . Meridiem . AM ) ;
} else {
extractingComponents . imply ( "meridiem" , index _1 . Meridiem . PM ) ;
}
}
if ( match [ SECOND _GROUP ] != null ) {
const second = parseInt ( match [ SECOND _GROUP ] ) ;
if ( second >= 60 ) return null ;
extractingComponents . assign ( "second" , second ) ;
}
return extractingComponents ;
}
}
exports . default = FRSpecificTimeExpressionParser ;
/***/ } ) ,
/***/ "./node_modules/chrono-node/dist/locales/fr/parsers/FRTimeExpressionParser.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / fr / parsers / FRTimeExpressionParser . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
"use strict" ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
const AbstractTimeExpressionParser _1 = _ _webpack _require _ _ ( /*! ../../../common/parsers/AbstractTimeExpressionParser */ "./node_modules/chrono-node/dist/common/parsers/AbstractTimeExpressionParser.js" ) ;
class FRTimeExpressionParser extends AbstractTimeExpressionParser _1 . AbstractTimeExpressionParser {
primaryPrefix ( ) {
return "(?:(?:[àa])\\s*)?" ;
}
followingPhase ( ) {
return "\\s*(?:\\-|\\– |\\~|\\〜|[àa]|\\?)\\s*" ;
}
extractPrimaryTimeComponents ( context , match ) {
if ( match [ 0 ] . match ( /^\s*\d{4}\s*$/ ) ) {
return null ;
}
return super . extractPrimaryTimeComponents ( context , match ) ;
}
}
exports . default = FRTimeExpressionParser ;
/***/ } ) ,
/***/ "./node_modules/chrono-node/dist/locales/fr/parsers/FRTimeUnitAgoFormatParser.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / fr / parsers / FRTimeUnitAgoFormatParser . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
"use strict" ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
const constants _1 = _ _webpack _require _ _ ( /*! ../constants */ "./node_modules/chrono-node/dist/locales/fr/constants.js" ) ;
const results _1 = _ _webpack _require _ _ ( /*! ../../../results */ "./node_modules/chrono-node/dist/results.js" ) ;
const AbstractParserWithWordBoundary _1 = _ _webpack _require _ _ ( /*! ../../../common/parsers/AbstractParserWithWordBoundary */ "./node_modules/chrono-node/dist/common/parsers/AbstractParserWithWordBoundary.js" ) ;
const timeunits _1 = _ _webpack _require _ _ ( /*! ../../../utils/timeunits */ "./node_modules/chrono-node/dist/utils/timeunits.js" ) ;
class FRTimeUnitAgoFormatParser extends AbstractParserWithWordBoundary _1 . AbstractParserWithWordBoundaryChecking {
constructor ( ) {
super ( ) ;
}
innerPattern ( ) {
return new RegExp ( ` il y a \\ s*( ${ constants _1 . TIME _UNITS _PATTERN } )(?=(?: \\ W| $ )) ` , "i" ) ;
}
innerExtract ( context , match ) {
const timeUnits = constants _1 . parseTimeUnits ( match [ 1 ] ) ;
const outputTimeUnits = timeunits _1 . reverseTimeUnits ( timeUnits ) ;
return results _1 . ParsingComponents . createRelativeFromRefInstant ( context . refDate , outputTimeUnits ) ;
}
}
exports . default = FRTimeUnitAgoFormatParser ;
/***/ } ) ,
/***/ "./node_modules/chrono-node/dist/locales/fr/parsers/FRTimeUnitRelativeFormatParser.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / fr / parsers / FRTimeUnitRelativeFormatParser . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
"use strict" ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
const constants _1 = _ _webpack _require _ _ ( /*! ../constants */ "./node_modules/chrono-node/dist/locales/fr/constants.js" ) ;
const results _1 = _ _webpack _require _ _ ( /*! ../../../results */ "./node_modules/chrono-node/dist/results.js" ) ;
const AbstractParserWithWordBoundary _1 = _ _webpack _require _ _ ( /*! ../../../common/parsers/AbstractParserWithWordBoundary */ "./node_modules/chrono-node/dist/common/parsers/AbstractParserWithWordBoundary.js" ) ;
const timeunits _1 = _ _webpack _require _ _ ( /*! ../../../utils/timeunits */ "./node_modules/chrono-node/dist/utils/timeunits.js" ) ;
const pattern _1 = _ _webpack _require _ _ ( /*! ../../../utils/pattern */ "./node_modules/chrono-node/dist/utils/pattern.js" ) ;
class FRTimeUnitAgoFormatParser extends AbstractParserWithWordBoundary _1 . AbstractParserWithWordBoundaryChecking {
constructor ( ) {
super ( ) ;
}
innerPattern ( ) {
return new RegExp ( ` (?:les?|la|l'|du|des?) \\ s* ` + ` ( ${ constants _1 . NUMBER _PATTERN } )? ` + ` (?: \\ s*(prochaine?s?|derni[eè]re?s?|pass[ée]e?s?|pr[ée]c[ée]dents?|suivante?s?))? ` + ` \\ s*( ${ pattern _1 . matchAnyPattern ( constants _1 . TIME _UNIT _DICTIONARY ) } ) ` + ` (?: \\ s*(prochaine?s?|derni[eè]re?s?|pass[ée]e?s?|pr[ée]c[ée]dents?|suivante?s?))? ` , "i" ) ;
}
innerExtract ( context , match ) {
const num = match [ 1 ] ? constants _1 . parseNumberPattern ( match [ 1 ] ) : 1 ;
const unit = constants _1 . TIME _UNIT _DICTIONARY [ match [ 3 ] . toLowerCase ( ) ] ;
let timeUnits = { } ;
timeUnits [ unit ] = num ;
let modifier = match [ 2 ] || match [ 4 ] || "" ;
modifier = modifier . toLowerCase ( ) ;
if ( ! modifier ) {
return ;
}
if ( /derni[eè]re?s?/ . test ( modifier ) || /pass[ée]e?s?/ . test ( modifier ) || /pr[ée]c[ée]dents?/ . test ( modifier ) ) {
timeUnits = timeunits _1 . reverseTimeUnits ( timeUnits ) ;
}
return results _1 . ParsingComponents . createRelativeFromRefInstant ( context . refDate , timeUnits ) ;
}
}
exports . default = FRTimeUnitAgoFormatParser ;
/***/ } ) ,
/***/ "./node_modules/chrono-node/dist/locales/fr/parsers/FRTimeUnitWithinFormatParser.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / fr / parsers / FRTimeUnitWithinFormatParser . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
"use strict" ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
const constants _1 = _ _webpack _require _ _ ( /*! ../constants */ "./node_modules/chrono-node/dist/locales/fr/constants.js" ) ;
const results _1 = _ _webpack _require _ _ ( /*! ../../../results */ "./node_modules/chrono-node/dist/results.js" ) ;
const AbstractParserWithWordBoundary _1 = _ _webpack _require _ _ ( /*! ../../../common/parsers/AbstractParserWithWordBoundary */ "./node_modules/chrono-node/dist/common/parsers/AbstractParserWithWordBoundary.js" ) ;
class FRTimeUnitWithinFormatParser extends AbstractParserWithWordBoundary _1 . AbstractParserWithWordBoundaryChecking {
innerPattern ( ) {
return new RegExp ( ` (?:dans|en|pour|pendant) \\ s*( ${ constants _1 . TIME _UNITS _PATTERN } )(?= \\ W| $ ) ` , "i" ) ;
}
innerExtract ( context , match ) {
const timeUnits = constants _1 . parseTimeUnits ( match [ 1 ] ) ;
return results _1 . ParsingComponents . createRelativeFromRefInstant ( context . refDate , timeUnits ) ;
}
}
exports . default = FRTimeUnitWithinFormatParser ;
/***/ } ) ,
/***/ "./node_modules/chrono-node/dist/locales/fr/parsers/FRWeekdayParser.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / fr / parsers / FRWeekdayParser . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
"use strict" ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
const constants _1 = _ _webpack _require _ _ ( /*! ../constants */ "./node_modules/chrono-node/dist/locales/fr/constants.js" ) ;
const pattern _1 = _ _webpack _require _ _ ( /*! ../../../utils/pattern */ "./node_modules/chrono-node/dist/utils/pattern.js" ) ;
const AbstractParserWithWordBoundary _1 = _ _webpack _require _ _ ( /*! ../../../common/parsers/AbstractParserWithWordBoundary */ "./node_modules/chrono-node/dist/common/parsers/AbstractParserWithWordBoundary.js" ) ;
const weeks _1 = _ _webpack _require _ _ ( /*! ../../../calculation/weeks */ "./node_modules/chrono-node/dist/calculation/weeks.js" ) ;
const PATTERN = new RegExp ( "(?:(?:\\,|\\(|\\( )\\s*)?" + "(?:(?:ce)\\s*)?" + ` ( ${ pattern _1 . matchAnyPattern ( constants _1 . WEEKDAY _DICTIONARY ) } ) ` + "(?:\\s*(?:\\,|\\)|\\) ))?" + "(?:\\s*(dernier|prochain)\\s*)?" + "(?=\\W|\\d|$)" , "i" ) ;
const WEEKDAY _GROUP = 1 ;
const POSTFIX _GROUP = 2 ;
class FRWeekdayParser extends AbstractParserWithWordBoundary _1 . AbstractParserWithWordBoundaryChecking {
innerPattern ( ) {
return PATTERN ;
}
innerExtract ( context , match ) {
const dayOfWeek = match [ WEEKDAY _GROUP ] . toLowerCase ( ) ;
const offset = constants _1 . WEEKDAY _DICTIONARY [ dayOfWeek ] ;
if ( offset === undefined ) {
return null ;
}
let suffix = match [ POSTFIX _GROUP ] ;
suffix = suffix || "" ;
suffix = suffix . toLowerCase ( ) ;
let modifier = null ;
if ( suffix == "dernier" ) {
modifier = "last" ;
} else if ( suffix == "prochain" ) {
modifier = "next" ;
}
const date = weeks _1 . toDayJSWeekday ( context . refDate , offset , modifier ) ;
return context . createParsingComponents ( ) . assign ( "weekday" , offset ) . imply ( "day" , date . date ( ) ) . imply ( "month" , date . month ( ) + 1 ) . imply ( "year" , date . year ( ) ) ;
}
}
exports . default = FRWeekdayParser ;
/***/ } ) ,
/***/ "./node_modules/chrono-node/dist/locales/fr/refiners/FRMergeDateRangeRefiner.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / fr / refiners / FRMergeDateRangeRefiner . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
"use strict" ;
var _ _importDefault = this && this . _ _importDefault || function ( mod ) {
return mod && mod . _ _esModule ? mod : {
"default" : mod
} ;
} ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
const AbstractMergeDateRangeRefiner _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ../../../common/refiners/AbstractMergeDateRangeRefiner */ "./node_modules/chrono-node/dist/common/refiners/AbstractMergeDateRangeRefiner.js" ) ) ;
class FRMergeDateRangeRefiner extends AbstractMergeDateRangeRefiner _1 . default {
patternBetween ( ) {
return /^\s*(à|a|-)\s*$/i ;
}
}
exports . default = FRMergeDateRangeRefiner ;
/***/ } ) ,
/***/ "./node_modules/chrono-node/dist/locales/fr/refiners/FRMergeDateTimeRefiner.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / fr / refiners / FRMergeDateTimeRefiner . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
"use strict" ;
var _ _importDefault = this && this . _ _importDefault || function ( mod ) {
return mod && mod . _ _esModule ? mod : {
"default" : mod
} ;
} ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
const AbstractMergeDateTimeRefiner _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ../../../common/refiners/AbstractMergeDateTimeRefiner */ "./node_modules/chrono-node/dist/common/refiners/AbstractMergeDateTimeRefiner.js" ) ) ;
class FRMergeDateTimeRefiner extends AbstractMergeDateTimeRefiner _1 . default {
patternBetween ( ) {
return new RegExp ( "^\\s*(T|à|a|vers|de|,|-)?\\s*$" ) ;
}
}
exports . default = FRMergeDateTimeRefiner ;
/***/ } ) ,
/***/ "./node_modules/chrono-node/dist/locales/ja/constants.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / ja / constants . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports ) {
"use strict" ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
exports . toHankaku = void 0 ;
function toHankaku ( text ) {
return String ( text ) . 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 ) ;
}
exports . toHankaku = toHankaku ;
function alphaNum ( token ) {
return String . fromCharCode ( token . charCodeAt ( 0 ) - 65248 ) ;
}
/***/ } ) ,
/***/ "./node_modules/chrono-node/dist/locales/ja/index.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / ja / index . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
"use strict" ;
var _ _importDefault = this && this . _ _importDefault || function ( mod ) {
return mod && mod . _ _esModule ? mod : {
"default" : mod
} ;
} ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
exports . createConfiguration = exports . createCasualConfiguration = exports . parseDate = exports . parse = exports . strict = exports . casual = void 0 ;
const JPStandardParser _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ./parsers/JPStandardParser */ "./node_modules/chrono-node/dist/locales/ja/parsers/JPStandardParser.js" ) ) ;
const JPMergeDateRangeRefiner _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ./refiners/JPMergeDateRangeRefiner */ "./node_modules/chrono-node/dist/locales/ja/refiners/JPMergeDateRangeRefiner.js" ) ) ;
const JPCasualDateParser _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ./parsers/JPCasualDateParser */ "./node_modules/chrono-node/dist/locales/ja/parsers/JPCasualDateParser.js" ) ) ;
const chrono _1 = _ _webpack _require _ _ ( /*! ../../chrono */ "./node_modules/chrono-node/dist/chrono.js" ) ;
exports . casual = new chrono _1 . Chrono ( createCasualConfiguration ( ) ) ;
exports . strict = new chrono _1 . Chrono ( createConfiguration ( ) ) ;
function parse ( text , ref , option ) {
return exports . casual . parse ( text , ref , option ) ;
}
exports . parse = parse ;
function parseDate ( text , ref , option ) {
return exports . casual . parseDate ( text , ref , option ) ;
}
exports . parseDate = parseDate ;
function createCasualConfiguration ( ) {
const option = createConfiguration ( ) ;
option . parsers . unshift ( new JPCasualDateParser _1 . default ( ) ) ;
return option ;
}
exports . createCasualConfiguration = createCasualConfiguration ;
function createConfiguration ( ) {
return {
parsers : [ new JPStandardParser _1 . default ( ) ] ,
refiners : [ new JPMergeDateRangeRefiner _1 . default ( ) ]
} ;
}
exports . createConfiguration = createConfiguration ;
/***/ } ) ,
/***/ "./node_modules/chrono-node/dist/locales/ja/parsers/JPCasualDateParser.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / ja / parsers / JPCasualDateParser . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
"use strict" ;
var _ _createBinding = this && this . _ _createBinding || ( Object . create ? function ( o , m , k , k2 ) {
if ( k2 === undefined ) k2 = k ;
Object . defineProperty ( o , k2 , {
enumerable : true ,
get : function ( ) {
return m [ k ] ;
}
} ) ;
} : function ( o , m , k , k2 ) {
if ( k2 === undefined ) k2 = k ;
o [ k2 ] = m [ k ] ;
} ) ;
var _ _setModuleDefault = this && this . _ _setModuleDefault || ( Object . create ? function ( o , v ) {
Object . defineProperty ( o , "default" , {
enumerable : true ,
value : v
} ) ;
} : function ( o , v ) {
o [ "default" ] = v ;
} ) ;
var _ _importStar = this && this . _ _importStar || function ( mod ) {
if ( mod && mod . _ _esModule ) return mod ;
var result = { } ;
if ( mod != null ) for ( var k in mod ) if ( k !== "default" && Object . prototype . hasOwnProperty . call ( mod , k ) ) _ _createBinding ( result , mod , k ) ;
_ _setModuleDefault ( result , mod ) ;
return result ;
} ;
var _ _importDefault = this && this . _ _importDefault || function ( mod ) {
return mod && mod . _ _esModule ? mod : {
"default" : mod
} ;
} ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
const dayjs _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! dayjs */ "./node_modules/dayjs/dayjs.min.js" ) ) ;
const index _1 = _ _webpack _require _ _ ( /*! ../../../index */ "./node_modules/chrono-node/dist/index.js" ) ;
const references = _ _importStar ( _ _webpack _require _ _ ( /*! ../../../common/casualReferences */ "./node_modules/chrono-node/dist/common/casualReferences.js" ) ) ;
const PATTERN = /今日|当日|昨日|明日|今夜|今夕|今晩|今朝/i ;
class JPCasualDateParser {
pattern ( ) {
return PATTERN ;
}
extract ( context , match ) {
const text = match [ 0 ] ;
const date = dayjs _1 . default ( context . refDate ) ;
const components = context . createParsingComponents ( ) ;
switch ( text ) {
case "昨日" :
return references . yesterday ( context . reference ) ;
case "明日" :
return references . tomorrow ( context . reference ) ;
case "今日" :
case "当日" :
return references . today ( context . reference ) ;
}
if ( text == "今夜" || text == "今夕" || text == "今晩" ) {
components . imply ( "hour" , 22 ) ;
components . assign ( "meridiem" , index _1 . Meridiem . PM ) ;
} else if ( text . match ( "今朝" ) ) {
components . imply ( "hour" , 6 ) ;
components . assign ( "meridiem" , index _1 . Meridiem . AM ) ;
}
components . assign ( "day" , date . date ( ) ) ;
components . assign ( "month" , date . month ( ) + 1 ) ;
components . assign ( "year" , date . year ( ) ) ;
return components ;
}
}
exports . default = JPCasualDateParser ;
/***/ } ) ,
/***/ "./node_modules/chrono-node/dist/locales/ja/parsers/JPStandardParser.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / ja / parsers / JPStandardParser . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
"use strict" ;
var _ _importDefault = this && this . _ _importDefault || function ( mod ) {
return mod && mod . _ _esModule ? mod : {
"default" : mod
} ;
} ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
const constants _1 = _ _webpack _require _ _ ( /*! ../constants */ "./node_modules/chrono-node/dist/locales/ja/constants.js" ) ;
const years _1 = _ _webpack _require _ _ ( /*! ../../../calculation/years */ "./node_modules/chrono-node/dist/calculation/years.js" ) ;
const dayjs _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! dayjs */ "./node_modules/dayjs/dayjs.min.js" ) ) ;
const PATTERN = /(?:(?:([同今本])|((昭和|平成|令和)?([0-90 -9 ]{1,4}|元)))年\s*)?([0-90 -9 ]{1,2})月\s*([0-90 -9 ]{1,2})日/i ;
const SPECIAL _YEAR _GROUP = 1 ;
const TYPICAL _YEAR _GROUP = 2 ;
const ERA _GROUP = 3 ;
const YEAR _NUMBER _GROUP = 4 ;
const MONTH _GROUP = 5 ;
const DAY _GROUP = 6 ;
class JPStandardParser {
pattern ( ) {
return PATTERN ;
}
extract ( context , match ) {
const month = parseInt ( constants _1 . toHankaku ( match [ MONTH _GROUP ] ) ) ;
const day = parseInt ( constants _1 . toHankaku ( match [ DAY _GROUP ] ) ) ;
const components = context . createParsingComponents ( {
day : day ,
month : month
} ) ;
if ( match [ SPECIAL _YEAR _GROUP ] && match [ SPECIAL _YEAR _GROUP ] . match ( "同|今|本" ) ) {
const moment = dayjs _1 . default ( context . refDate ) ;
components . assign ( "year" , moment . year ( ) ) ;
}
if ( match [ TYPICAL _YEAR _GROUP ] ) {
const yearNumText = match [ YEAR _NUMBER _GROUP ] ;
let year = yearNumText == "元" ? 1 : parseInt ( constants _1 . toHankaku ( yearNumText ) ) ;
if ( match [ ERA _GROUP ] == "令和" ) {
year += 2018 ;
} else if ( match [ ERA _GROUP ] == "平成" ) {
year += 1988 ;
} else if ( match [ ERA _GROUP ] == "昭和" ) {
year += 1925 ;
}
components . assign ( "year" , year ) ;
} else {
const year = years _1 . findYearClosestToRef ( context . refDate , day , month ) ;
components . imply ( "year" , year ) ;
}
return components ;
}
}
exports . default = JPStandardParser ;
/***/ } ) ,
/***/ "./node_modules/chrono-node/dist/locales/ja/refiners/JPMergeDateRangeRefiner.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / ja / refiners / JPMergeDateRangeRefiner . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
"use strict" ;
var _ _importDefault = this && this . _ _importDefault || function ( mod ) {
return mod && mod . _ _esModule ? mod : {
"default" : mod
} ;
} ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
const AbstractMergeDateRangeRefiner _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ../../../common/refiners/AbstractMergeDateRangeRefiner */ "./node_modules/chrono-node/dist/common/refiners/AbstractMergeDateRangeRefiner.js" ) ) ;
class JPMergeDateRangeRefiner extends AbstractMergeDateRangeRefiner _1 . default {
patternBetween ( ) {
return /^\s*(から|ー|-)\s*$/i ;
}
}
exports . default = JPMergeDateRangeRefiner ;
/***/ } ) ,
/***/ "./node_modules/chrono-node/dist/locales/nl/constants.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / nl / constants . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
"use strict" ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
exports . parseTimeUnits = exports . TIME _UNITS _PATTERN = exports . parseYear = exports . YEAR _PATTERN = exports . parseOrdinalNumberPattern = exports . ORDINAL _NUMBER _PATTERN = exports . parseNumberPattern = exports . NUMBER _PATTERN = exports . TIME _UNIT _DICTIONARY = exports . ORDINAL _WORD _DICTIONARY = exports . INTEGER _WORD _DICTIONARY = exports . MONTH _DICTIONARY = exports . WEEKDAY _DICTIONARY = void 0 ;
const pattern _1 = _ _webpack _require _ _ ( /*! ../../utils/pattern */ "./node_modules/chrono-node/dist/utils/pattern.js" ) ;
const years _1 = _ _webpack _require _ _ ( /*! ../../calculation/years */ "./node_modules/chrono-node/dist/calculation/years.js" ) ;
exports . WEEKDAY _DICTIONARY = {
zondag : 0 ,
zon : 0 ,
"zon." : 0 ,
zo : 0 ,
"zo." : 0 ,
maandag : 1 ,
ma : 1 ,
"ma." : 1 ,
dinsdag : 2 ,
din : 2 ,
"din." : 2 ,
di : 2 ,
"di." : 2 ,
woensdag : 3 ,
woe : 3 ,
"woe." : 3 ,
wo : 3 ,
"wo." : 3 ,
donderdag : 4 ,
dond : 4 ,
"dond." : 4 ,
do : 4 ,
"do." : 4 ,
vrijdag : 5 ,
vrij : 5 ,
"vrij." : 5 ,
vr : 5 ,
"vr." : 5 ,
zaterdag : 6 ,
zat : 6 ,
"zat." : 6 ,
"za" : 6 ,
"za." : 6
} ;
exports . MONTH _DICTIONARY = {
januari : 1 ,
jan : 1 ,
"jan." : 1 ,
februari : 2 ,
feb : 2 ,
"feb." : 2 ,
maart : 3 ,
mar : 3 ,
"mar." : 3 ,
april : 4 ,
apr : 4 ,
"apr." : 4 ,
mei : 5 ,
juni : 6 ,
jun : 6 ,
"jun." : 6 ,
juli : 7 ,
jul : 7 ,
"jul." : 7 ,
augustus : 8 ,
aug : 8 ,
"aug." : 8 ,
september : 9 ,
sep : 9 ,
"sep." : 9 ,
sept : 9 ,
"sept." : 9 ,
oktober : 10 ,
okt : 10 ,
"okt." : 10 ,
november : 11 ,
nov : 11 ,
"nov." : 11 ,
december : 12 ,
dec : 12 ,
"dec." : 12
} ;
exports . INTEGER _WORD _DICTIONARY = {
een : 1 ,
twee : 2 ,
drie : 3 ,
vier : 4 ,
vijf : 5 ,
zes : 6 ,
zeven : 7 ,
acht : 8 ,
negen : 9 ,
tien : 10 ,
elf : 11 ,
twaalf : 12
} ;
exports . ORDINAL _WORD _DICTIONARY = {
eerste : 1 ,
tweede : 2 ,
derde : 3 ,
vierde : 4 ,
vijfde : 5 ,
zesde : 6 ,
zevende : 7 ,
achtste : 8 ,
negende : 9 ,
tiende : 10 ,
elfde : 11 ,
twaalfde : 12 ,
dertiende : 13 ,
veertiende : 14 ,
vijftiende : 15 ,
zestiende : 16 ,
zeventiende : 17 ,
achttiende : 18 ,
negentiende : 19 ,
twintigste : 20 ,
"eenentwintigste" : 21 ,
"tweeëntwintigste" : 22 ,
"drieentwintigste" : 23 ,
"vierentwintigste" : 24 ,
"vijfentwintigste" : 25 ,
"zesentwintigste" : 26 ,
"zevenentwintigste" : 27 ,
"achtentwintig" : 28 ,
"negenentwintig" : 29 ,
"dertigste" : 30 ,
"eenendertigste" : 31
} ;
exports . TIME _UNIT _DICTIONARY = {
sec : "second" ,
second : "second" ,
seconden : "second" ,
min : "minute" ,
mins : "minute" ,
minute : "minute" ,
minuten : "minute" ,
h : "hour" ,
hr : "hour" ,
hrs : "hour" ,
uur : "hour" ,
uren : "hour" ,
dag : "d" ,
dagen : "d" ,
week : "week" ,
weken : "week" ,
maand : "month" ,
maanden : "month" ,
jaar : "year" ,
jr : "year" ,
jaren : "year"
} ;
exports . NUMBER _PATTERN = ` (?: ${ pattern _1 . matchAnyPattern ( exports . INTEGER _WORD _DICTIONARY ) } |[0-9]+|[0-9]+ \\ .[0-9]+|een?|halve?) ` ;
function parseNumberPattern ( match ) {
const num = match . toLowerCase ( ) ;
if ( exports . INTEGER _WORD _DICTIONARY [ num ] !== undefined ) {
return exports . INTEGER _WORD _DICTIONARY [ num ] ;
} else if ( num === "een" ) {
return 1 ;
} else if ( num . match ( /halve?/ ) ) {
return 0.5 ;
}
return parseFloat ( num ) ;
}
exports . parseNumberPattern = parseNumberPattern ;
exports . ORDINAL _NUMBER _PATTERN = ` (?: ${ pattern _1 . matchAnyPattern ( exports . ORDINAL _WORD _DICTIONARY ) } |[0-9]{1,2}(?:ste|de)?) ` ;
function parseOrdinalNumberPattern ( match ) {
let num = match . toLowerCase ( ) ;
if ( exports . ORDINAL _WORD _DICTIONARY [ num ] !== undefined ) {
return exports . ORDINAL _WORD _DICTIONARY [ num ] ;
}
num = num . replace ( /(?:ste|de)$/i , "" ) ;
return parseInt ( num ) ;
}
exports . parseOrdinalNumberPattern = parseOrdinalNumberPattern ;
exports . YEAR _PATTERN = ` (?:[1-9][0-9]{0,3} \\ s*(?:voor Christus|na Christus)|[1-2][0-9]{3}|[5-9][0-9]) ` ;
function parseYear ( match ) {
if ( /voor Christus/i . test ( match ) ) {
match = match . replace ( /voor Christus/i , "" ) ;
return - parseInt ( match ) ;
}
if ( /na Christus/i . test ( match ) ) {
match = match . replace ( /na Christus/i , "" ) ;
return parseInt ( match ) ;
}
const rawYearNumber = parseInt ( match ) ;
return years _1 . findMostLikelyADYear ( rawYearNumber ) ;
}
exports . parseYear = parseYear ;
const SINGLE _TIME _UNIT _PATTERN = ` ( ${ exports . NUMBER _PATTERN } ) \\ s{0,5}( ${ pattern _1 . matchAnyPattern ( exports . TIME _UNIT _DICTIONARY ) } ) \\ s{0,5} ` ;
const SINGLE _TIME _UNIT _REGEX = new RegExp ( SINGLE _TIME _UNIT _PATTERN , "i" ) ;
exports . TIME _UNITS _PATTERN = pattern _1 . repeatedTimeunitPattern ( ` (?:(?:binnen|in) \\ s*)? ` , SINGLE _TIME _UNIT _PATTERN ) ;
function parseTimeUnits ( timeunitText ) {
const fragments = { } ;
let remainingText = timeunitText ;
let match = SINGLE _TIME _UNIT _REGEX . exec ( remainingText ) ;
while ( match ) {
collectDateTimeFragment ( fragments , match ) ;
remainingText = remainingText . substring ( match [ 0 ] . length ) ;
match = SINGLE _TIME _UNIT _REGEX . exec ( remainingText ) ;
}
return fragments ;
}
exports . parseTimeUnits = parseTimeUnits ;
function collectDateTimeFragment ( fragments , match ) {
const num = parseNumberPattern ( match [ 1 ] ) ;
const unit = exports . TIME _UNIT _DICTIONARY [ match [ 2 ] . toLowerCase ( ) ] ;
fragments [ unit ] = num ;
}
/***/ } ) ,
/***/ "./node_modules/chrono-node/dist/locales/nl/index.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / nl / index . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
"use strict" ;
var _ _importDefault = this && this . _ _importDefault || function ( mod ) {
return mod && mod . _ _esModule ? mod : {
"default" : mod
} ;
} ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
exports . createConfiguration = exports . createCasualConfiguration = exports . parseDate = exports . parse = exports . strict = exports . casual = void 0 ;
const configurations _1 = _ _webpack _require _ _ ( /*! ../../configurations */ "./node_modules/chrono-node/dist/configurations.js" ) ;
const chrono _1 = _ _webpack _require _ _ ( /*! ../../chrono */ "./node_modules/chrono-node/dist/chrono.js" ) ;
const NLMergeDateRangeRefiner _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ./refiners/NLMergeDateRangeRefiner */ "./node_modules/chrono-node/dist/locales/nl/refiners/NLMergeDateRangeRefiner.js" ) ) ;
const NLMergeDateTimeRefiner _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ./refiners/NLMergeDateTimeRefiner */ "./node_modules/chrono-node/dist/locales/nl/refiners/NLMergeDateTimeRefiner.js" ) ) ;
const NLCasualDateParser _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ./parsers/NLCasualDateParser */ "./node_modules/chrono-node/dist/locales/nl/parsers/NLCasualDateParser.js" ) ) ;
const NLCasualTimeParser _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ./parsers/NLCasualTimeParser */ "./node_modules/chrono-node/dist/locales/nl/parsers/NLCasualTimeParser.js" ) ) ;
const SlashDateFormatParser _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ../../common/parsers/SlashDateFormatParser */ "./node_modules/chrono-node/dist/common/parsers/SlashDateFormatParser.js" ) ) ;
const NLTimeUnitWithinFormatParser _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ./parsers/NLTimeUnitWithinFormatParser */ "./node_modules/chrono-node/dist/locales/nl/parsers/NLTimeUnitWithinFormatParser.js" ) ) ;
const NLWeekdayParser _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ./parsers/NLWeekdayParser */ "./node_modules/chrono-node/dist/locales/nl/parsers/NLWeekdayParser.js" ) ) ;
const NLMonthNameMiddleEndianParser _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ./parsers/NLMonthNameMiddleEndianParser */ "./node_modules/chrono-node/dist/locales/nl/parsers/NLMonthNameMiddleEndianParser.js" ) ) ;
const NLMonthNameParser _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ./parsers/NLMonthNameParser */ "./node_modules/chrono-node/dist/locales/nl/parsers/NLMonthNameParser.js" ) ) ;
const NLSlashMonthFormatParser _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ./parsers/NLSlashMonthFormatParser */ "./node_modules/chrono-node/dist/locales/nl/parsers/NLSlashMonthFormatParser.js" ) ) ;
const NLTimeExpressionParser _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ./parsers/NLTimeExpressionParser */ "./node_modules/chrono-node/dist/locales/nl/parsers/NLTimeExpressionParser.js" ) ) ;
const NLCasualYearMonthDayParser _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ./parsers/NLCasualYearMonthDayParser */ "./node_modules/chrono-node/dist/locales/nl/parsers/NLCasualYearMonthDayParser.js" ) ) ;
const NLCasualDateTimeParser _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ./parsers/NLCasualDateTimeParser */ "./node_modules/chrono-node/dist/locales/nl/parsers/NLCasualDateTimeParser.js" ) ) ;
exports . casual = new chrono _1 . Chrono ( createCasualConfiguration ( ) ) ;
exports . strict = new chrono _1 . Chrono ( createConfiguration ( true ) ) ;
function parse ( text , ref , option ) {
return exports . casual . parse ( text , ref , option ) ;
}
exports . parse = parse ;
function parseDate ( text , ref , option ) {
return exports . casual . parseDate ( text , ref , option ) ;
}
exports . parseDate = parseDate ;
function createCasualConfiguration ( littleEndian = true ) {
const option = createConfiguration ( false , littleEndian ) ;
option . parsers . unshift ( new NLCasualDateParser _1 . default ( ) ) ;
option . parsers . unshift ( new NLCasualTimeParser _1 . default ( ) ) ;
option . parsers . unshift ( new NLCasualDateTimeParser _1 . default ( ) ) ;
return option ;
}
exports . createCasualConfiguration = createCasualConfiguration ;
function createConfiguration ( strictMode = true , littleEndian = true ) {
return configurations _1 . includeCommonConfiguration ( {
parsers : [ new SlashDateFormatParser _1 . default ( littleEndian ) , new NLMonthNameMiddleEndianParser _1 . default ( ) , new NLMonthNameParser _1 . default ( ) , new NLTimeExpressionParser _1 . default ( ) , new NLTimeUnitWithinFormatParser _1 . default ( ) , new NLSlashMonthFormatParser _1 . default ( ) , new NLWeekdayParser _1 . default ( ) , new NLCasualYearMonthDayParser _1 . default ( ) ] ,
refiners : [ new NLMergeDateTimeRefiner _1 . default ( ) , new NLMergeDateRangeRefiner _1 . default ( ) ]
} , strictMode ) ;
}
exports . createConfiguration = createConfiguration ;
/***/ } ) ,
/***/ "./node_modules/chrono-node/dist/locales/nl/parsers/NLCasualDateParser.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / nl / parsers / NLCasualDateParser . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
"use strict" ;
var _ _createBinding = this && this . _ _createBinding || ( Object . create ? function ( o , m , k , k2 ) {
if ( k2 === undefined ) k2 = k ;
Object . defineProperty ( o , k2 , {
enumerable : true ,
get : function ( ) {
return m [ k ] ;
}
} ) ;
} : function ( o , m , k , k2 ) {
if ( k2 === undefined ) k2 = k ;
o [ k2 ] = m [ k ] ;
} ) ;
var _ _setModuleDefault = this && this . _ _setModuleDefault || ( Object . create ? function ( o , v ) {
Object . defineProperty ( o , "default" , {
enumerable : true ,
value : v
} ) ;
} : function ( o , v ) {
o [ "default" ] = v ;
} ) ;
var _ _importStar = this && this . _ _importStar || function ( mod ) {
if ( mod && mod . _ _esModule ) return mod ;
var result = { } ;
if ( mod != null ) for ( var k in mod ) if ( k !== "default" && Object . prototype . hasOwnProperty . call ( mod , k ) ) _ _createBinding ( result , mod , k ) ;
_ _setModuleDefault ( result , mod ) ;
return result ;
} ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
const AbstractParserWithWordBoundary _1 = _ _webpack _require _ _ ( /*! ../../../common/parsers/AbstractParserWithWordBoundary */ "./node_modules/chrono-node/dist/common/parsers/AbstractParserWithWordBoundary.js" ) ;
const references = _ _importStar ( _ _webpack _require _ _ ( /*! ../../../common/casualReferences */ "./node_modules/chrono-node/dist/common/casualReferences.js" ) ) ;
class NLCasualDateParser extends AbstractParserWithWordBoundary _1 . AbstractParserWithWordBoundaryChecking {
innerPattern ( context ) {
return /(nu|vandaag|morgen|morgend|gisteren)(?=\W|$)/i ;
}
innerExtract ( context , match ) {
const lowerText = match [ 0 ] . toLowerCase ( ) ;
const component = context . createParsingComponents ( ) ;
switch ( lowerText ) {
case "nu" :
return references . now ( context . reference ) ;
case "vandaag" :
return references . today ( context . reference ) ;
case "morgen" :
case "morgend" :
return references . tomorrow ( context . reference ) ;
case "gisteren" :
return references . yesterday ( context . reference ) ;
}
return component ;
}
}
exports . default = NLCasualDateParser ;
/***/ } ) ,
/***/ "./node_modules/chrono-node/dist/locales/nl/parsers/NLCasualDateTimeParser.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / nl / parsers / NLCasualDateTimeParser . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
"use strict" ;
var _ _importDefault = this && this . _ _importDefault || function ( mod ) {
return mod && mod . _ _esModule ? mod : {
"default" : mod
} ;
} ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
const AbstractParserWithWordBoundary _1 = _ _webpack _require _ _ ( /*! ../../../common/parsers/AbstractParserWithWordBoundary */ "./node_modules/chrono-node/dist/common/parsers/AbstractParserWithWordBoundary.js" ) ;
const index _1 = _ _webpack _require _ _ ( /*! ../../../index */ "./node_modules/chrono-node/dist/index.js" ) ;
const dayjs _1 = _ _webpack _require _ _ ( /*! ../../../utils/dayjs */ "./node_modules/chrono-node/dist/utils/dayjs.js" ) ;
const dayjs _2 = _ _importDefault ( _ _webpack _require _ _ ( /*! dayjs */ "./node_modules/dayjs/dayjs.min.js" ) ) ;
const DATE _GROUP = 1 ;
const TIME _OF _DAY _GROUP = 2 ;
class NLCasualDateTimeParser extends AbstractParserWithWordBoundary _1 . AbstractParserWithWordBoundaryChecking {
innerPattern ( context ) {
return /(gisteren|morgen|van)(ochtend|middag|namiddag|avond|nacht)(?=\W|$)/i ;
}
innerExtract ( context , match ) {
const dateText = match [ DATE _GROUP ] . toLowerCase ( ) ;
const timeText = match [ TIME _OF _DAY _GROUP ] . toLowerCase ( ) ;
const component = context . createParsingComponents ( ) ;
const targetDate = dayjs _2 . default ( context . refDate ) ;
switch ( dateText ) {
case "gisteren" :
dayjs _1 . assignSimilarDate ( component , targetDate . add ( - 1 , "day" ) ) ;
break ;
case "van" :
dayjs _1 . assignSimilarDate ( component , targetDate ) ;
break ;
case "morgen" :
dayjs _1 . assignTheNextDay ( component , targetDate ) ;
break ;
}
switch ( timeText ) {
case "ochtend" :
component . imply ( "meridiem" , index _1 . Meridiem . AM ) ;
component . imply ( "hour" , 6 ) ;
break ;
case "middag" :
component . imply ( "meridiem" , index _1 . Meridiem . AM ) ;
component . imply ( "hour" , 12 ) ;
break ;
case "namiddag" :
component . imply ( "meridiem" , index _1 . Meridiem . PM ) ;
component . imply ( "hour" , 15 ) ;
break ;
case "avond" :
component . imply ( "meridiem" , index _1 . Meridiem . PM ) ;
component . imply ( "hour" , 20 ) ;
break ;
}
return component ;
}
}
exports . default = NLCasualDateTimeParser ;
/***/ } ) ,
/***/ "./node_modules/chrono-node/dist/locales/nl/parsers/NLCasualTimeParser.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / nl / parsers / NLCasualTimeParser . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
"use strict" ;
var _ _importDefault = this && this . _ _importDefault || function ( mod ) {
return mod && mod . _ _esModule ? mod : {
"default" : mod
} ;
} ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
const index _1 = _ _webpack _require _ _ ( /*! ../../../index */ "./node_modules/chrono-node/dist/index.js" ) ;
const AbstractParserWithWordBoundary _1 = _ _webpack _require _ _ ( /*! ../../../common/parsers/AbstractParserWithWordBoundary */ "./node_modules/chrono-node/dist/common/parsers/AbstractParserWithWordBoundary.js" ) ;
const dayjs _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! dayjs */ "./node_modules/dayjs/dayjs.min.js" ) ) ;
const dayjs _2 = _ _webpack _require _ _ ( /*! ../../../utils/dayjs */ "./node_modules/chrono-node/dist/utils/dayjs.js" ) ;
const DAY _GROUP = 1 ;
const MOMENT _GROUP = 2 ;
class NLCasualTimeParser extends AbstractParserWithWordBoundary _1 . AbstractParserWithWordBoundaryChecking {
innerPattern ( ) {
return /(deze)?\s*(namiddag|avond|middernacht|ochtend|middag|'s middags|'s avonds|'s ochtends)(?=\W|$)/i ;
}
innerExtract ( context , match ) {
const targetDate = dayjs _1 . default ( context . refDate ) ;
const component = context . createParsingComponents ( ) ;
if ( match [ DAY _GROUP ] === "deze" ) {
component . assign ( "day" , context . refDate . getDate ( ) ) ;
component . assign ( "month" , context . refDate . getMonth ( ) + 1 ) ;
component . assign ( "year" , context . refDate . getFullYear ( ) ) ;
}
switch ( match [ MOMENT _GROUP ] . toLowerCase ( ) ) {
case "namiddag" :
case "'s namiddags" :
component . imply ( "meridiem" , index _1 . Meridiem . PM ) ;
component . imply ( "hour" , 15 ) ;
break ;
case "avond" :
case "'s avonds'" :
component . imply ( "meridiem" , index _1 . Meridiem . PM ) ;
component . imply ( "hour" , 20 ) ;
break ;
case "middernacht" :
dayjs _2 . assignTheNextDay ( component , targetDate ) ;
component . imply ( "hour" , 0 ) ;
component . imply ( "minute" , 0 ) ;
component . imply ( "second" , 0 ) ;
break ;
case "ochtend" :
case "'s ochtends" :
component . imply ( "meridiem" , index _1 . Meridiem . AM ) ;
component . imply ( "hour" , 6 ) ;
break ;
case "middag" :
case "'s middags" :
component . imply ( "meridiem" , index _1 . Meridiem . AM ) ;
component . imply ( "hour" , 12 ) ;
break ;
}
return component ;
}
}
exports . default = NLCasualTimeParser ;
/***/ } ) ,
/***/ "./node_modules/chrono-node/dist/locales/nl/parsers/NLCasualYearMonthDayParser.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / nl / parsers / NLCasualYearMonthDayParser . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
"use strict" ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
const constants _1 = _ _webpack _require _ _ ( /*! ../constants */ "./node_modules/chrono-node/dist/locales/nl/constants.js" ) ;
const pattern _1 = _ _webpack _require _ _ ( /*! ../../../utils/pattern */ "./node_modules/chrono-node/dist/utils/pattern.js" ) ;
const AbstractParserWithWordBoundary _1 = _ _webpack _require _ _ ( /*! ../../../common/parsers/AbstractParserWithWordBoundary */ "./node_modules/chrono-node/dist/common/parsers/AbstractParserWithWordBoundary.js" ) ;
const PATTERN = new RegExp ( ` ([0-9]{4})[ \\ . \\ / \\ s] ` + ` (?:( ${ pattern _1 . matchAnyPattern ( constants _1 . MONTH _DICTIONARY ) } )|([0-9]{1,2}))[ \\ . \\ / \\ s] ` + ` ([0-9]{1,2}) ` + "(?=\\W|$)" , "i" ) ;
const YEAR _NUMBER _GROUP = 1 ;
const MONTH _NAME _GROUP = 2 ;
const MONTH _NUMBER _GROUP = 3 ;
const DATE _NUMBER _GROUP = 4 ;
class NLCasualYearMonthDayParser extends AbstractParserWithWordBoundary _1 . AbstractParserWithWordBoundaryChecking {
innerPattern ( ) {
return PATTERN ;
}
innerExtract ( context , match ) {
const month = match [ MONTH _NUMBER _GROUP ] ? parseInt ( match [ MONTH _NUMBER _GROUP ] ) : constants _1 . MONTH _DICTIONARY [ match [ MONTH _NAME _GROUP ] . toLowerCase ( ) ] ;
if ( month < 1 || month > 12 ) {
return null ;
}
const year = parseInt ( match [ YEAR _NUMBER _GROUP ] ) ;
const day = parseInt ( match [ DATE _NUMBER _GROUP ] ) ;
return {
day : day ,
month : month ,
year : year
} ;
}
}
exports . default = NLCasualYearMonthDayParser ;
/***/ } ) ,
/***/ "./node_modules/chrono-node/dist/locales/nl/parsers/NLMonthNameMiddleEndianParser.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / nl / parsers / NLMonthNameMiddleEndianParser . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
"use strict" ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
const years _1 = _ _webpack _require _ _ ( /*! ../../../calculation/years */ "./node_modules/chrono-node/dist/calculation/years.js" ) ;
const constants _1 = _ _webpack _require _ _ ( /*! ../constants */ "./node_modules/chrono-node/dist/locales/nl/constants.js" ) ;
const constants _2 = _ _webpack _require _ _ ( /*! ../constants */ "./node_modules/chrono-node/dist/locales/nl/constants.js" ) ;
const constants _3 = _ _webpack _require _ _ ( /*! ../constants */ "./node_modules/chrono-node/dist/locales/nl/constants.js" ) ;
const pattern _1 = _ _webpack _require _ _ ( /*! ../../../utils/pattern */ "./node_modules/chrono-node/dist/utils/pattern.js" ) ;
const AbstractParserWithWordBoundary _1 = _ _webpack _require _ _ ( /*! ../../../common/parsers/AbstractParserWithWordBoundary */ "./node_modules/chrono-node/dist/common/parsers/AbstractParserWithWordBoundary.js" ) ;
const PATTERN = new RegExp ( "(?:on\\s*?)?" + ` ( ${ constants _2 . ORDINAL _NUMBER _PATTERN } ) ` + "(?:\\s*" + "(?:tot|\\-|\\– |until|through|till|\\s)\\s*" + ` ( ${ constants _2 . ORDINAL _NUMBER _PATTERN } ) ` + ")?" + "(?:-|/|\\s*(?:of)?\\s*)" + "(" + pattern _1 . matchAnyPattern ( constants _1 . MONTH _DICTIONARY ) + ")" + "(?:" + "(?:-|/|,?\\s*)" + ` ( ${ constants _3 . YEAR _PATTERN } (?![^ \\ s] \\ d)) ` + ")?" + "(?=\\W|$)" , "i" ) ;
const MONTH _NAME _GROUP = 3 ;
const DATE _GROUP = 1 ;
const DATE _TO _GROUP = 2 ;
const YEAR _GROUP = 4 ;
class NLMonthNameMiddleEndianParser extends AbstractParserWithWordBoundary _1 . AbstractParserWithWordBoundaryChecking {
innerPattern ( ) {
return PATTERN ;
}
innerExtract ( context , match ) {
const month = constants _1 . MONTH _DICTIONARY [ match [ MONTH _NAME _GROUP ] . toLowerCase ( ) ] ;
const day = constants _2 . parseOrdinalNumberPattern ( match [ DATE _GROUP ] ) ;
if ( day > 31 ) {
match . index = match . index + match [ DATE _GROUP ] . length ;
return null ;
}
const components = context . createParsingComponents ( {
day : day ,
month : month
} ) ;
if ( match [ YEAR _GROUP ] ) {
const year = constants _3 . parseYear ( match [ YEAR _GROUP ] ) ;
components . assign ( "year" , year ) ;
} else {
const year = years _1 . findYearClosestToRef ( context . refDate , day , month ) ;
components . imply ( "year" , year ) ;
}
if ( ! match [ DATE _TO _GROUP ] ) {
return components ;
}
const endDate = constants _2 . parseOrdinalNumberPattern ( match [ DATE _TO _GROUP ] ) ;
const result = context . createParsingResult ( match . index , match [ 0 ] ) ;
result . start = components ;
result . end = components . clone ( ) ;
result . end . assign ( "day" , endDate ) ;
return result ;
}
}
exports . default = NLMonthNameMiddleEndianParser ;
/***/ } ) ,
/***/ "./node_modules/chrono-node/dist/locales/nl/parsers/NLMonthNameParser.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / nl / parsers / NLMonthNameParser . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
"use strict" ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
const constants _1 = _ _webpack _require _ _ ( /*! ../constants */ "./node_modules/chrono-node/dist/locales/nl/constants.js" ) ;
const years _1 = _ _webpack _require _ _ ( /*! ../../../calculation/years */ "./node_modules/chrono-node/dist/calculation/years.js" ) ;
const pattern _1 = _ _webpack _require _ _ ( /*! ../../../utils/pattern */ "./node_modules/chrono-node/dist/utils/pattern.js" ) ;
const constants _2 = _ _webpack _require _ _ ( /*! ../constants */ "./node_modules/chrono-node/dist/locales/nl/constants.js" ) ;
const AbstractParserWithWordBoundary _1 = _ _webpack _require _ _ ( /*! ../../../common/parsers/AbstractParserWithWordBoundary */ "./node_modules/chrono-node/dist/common/parsers/AbstractParserWithWordBoundary.js" ) ;
const PATTERN = new RegExp ( ` ( ${ pattern _1 . matchAnyPattern ( constants _1 . MONTH _DICTIONARY ) } ) ` + ` \\ s* ` + ` (?: ` + ` [,-]? \\ s*( ${ constants _2 . YEAR _PATTERN } )? ` + ")?" + "(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)" , "i" ) ;
const MONTH _NAME _GROUP = 1 ;
const YEAR _GROUP = 2 ;
class NLMonthNameParser extends AbstractParserWithWordBoundary _1 . AbstractParserWithWordBoundaryChecking {
innerPattern ( ) {
return PATTERN ;
}
innerExtract ( context , match ) {
const components = context . createParsingComponents ( ) ;
components . imply ( "day" , 1 ) ;
const monthName = match [ MONTH _NAME _GROUP ] ;
const month = constants _1 . MONTH _DICTIONARY [ monthName . toLowerCase ( ) ] ;
components . assign ( "month" , month ) ;
if ( match [ YEAR _GROUP ] ) {
const year = constants _2 . parseYear ( match [ YEAR _GROUP ] ) ;
components . assign ( "year" , year ) ;
} else {
const year = years _1 . findYearClosestToRef ( context . refDate , 1 , month ) ;
components . imply ( "year" , year ) ;
}
return components ;
}
}
exports . default = NLMonthNameParser ;
/***/ } ) ,
/***/ "./node_modules/chrono-node/dist/locales/nl/parsers/NLSlashMonthFormatParser.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / nl / parsers / NLSlashMonthFormatParser . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
"use strict" ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
const AbstractParserWithWordBoundary _1 = _ _webpack _require _ _ ( /*! ../../../common/parsers/AbstractParserWithWordBoundary */ "./node_modules/chrono-node/dist/common/parsers/AbstractParserWithWordBoundary.js" ) ;
const PATTERN = new RegExp ( "([0-9]|0[1-9]|1[012])/([0-9]{4})" + "" , "i" ) ;
const MONTH _GROUP = 1 ;
const YEAR _GROUP = 2 ;
class NLSlashMonthFormatParser extends AbstractParserWithWordBoundary _1 . AbstractParserWithWordBoundaryChecking {
innerPattern ( ) {
return PATTERN ;
}
innerExtract ( context , match ) {
const year = parseInt ( match [ YEAR _GROUP ] ) ;
const month = parseInt ( match [ MONTH _GROUP ] ) ;
return context . createParsingComponents ( ) . imply ( "day" , 1 ) . assign ( "month" , month ) . assign ( "year" , year ) ;
}
}
exports . default = NLSlashMonthFormatParser ;
/***/ } ) ,
/***/ "./node_modules/chrono-node/dist/locales/nl/parsers/NLTimeExpressionParser.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / nl / parsers / NLTimeExpressionParser . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
"use strict" ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
const AbstractTimeExpressionParser _1 = _ _webpack _require _ _ ( /*! ../../../common/parsers/AbstractTimeExpressionParser */ "./node_modules/chrono-node/dist/common/parsers/AbstractTimeExpressionParser.js" ) ;
class NLTimeExpressionParser extends AbstractTimeExpressionParser _1 . AbstractTimeExpressionParser {
primaryPrefix ( ) {
return "(?:(?:om)\\s*)?" ;
}
followingPhase ( ) {
return "\\s*(?:\\-|\\– |\\~|\\〜|om|\\?)\\s*" ;
}
extractPrimaryTimeComponents ( context , match ) {
if ( match [ 0 ] . match ( /^\s*\d{4}\s*$/ ) ) {
return null ;
}
return super . extractPrimaryTimeComponents ( context , match ) ;
}
}
exports . default = NLTimeExpressionParser ;
/***/ } ) ,
/***/ "./node_modules/chrono-node/dist/locales/nl/parsers/NLTimeUnitWithinFormatParser.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / nl / parsers / NLTimeUnitWithinFormatParser . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
"use strict" ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
const constants _1 = _ _webpack _require _ _ ( /*! ../constants */ "./node_modules/chrono-node/dist/locales/nl/constants.js" ) ;
const results _1 = _ _webpack _require _ _ ( /*! ../../../results */ "./node_modules/chrono-node/dist/results.js" ) ;
const AbstractParserWithWordBoundary _1 = _ _webpack _require _ _ ( /*! ../../../common/parsers/AbstractParserWithWordBoundary */ "./node_modules/chrono-node/dist/common/parsers/AbstractParserWithWordBoundary.js" ) ;
class NLTimeUnitWithinFormatParser extends AbstractParserWithWordBoundary _1 . AbstractParserWithWordBoundaryChecking {
innerPattern ( ) {
return new RegExp ( ` (?:binnen|in|binnen de|voor) \\ s* ` + "(" + constants _1 . TIME _UNITS _PATTERN + ")" + ` (?= \\ W| $ ) ` , "i" ) ;
}
innerExtract ( context , match ) {
const timeUnits = constants _1 . parseTimeUnits ( match [ 1 ] ) ;
return results _1 . ParsingComponents . createRelativeFromRefInstant ( context . refDate , timeUnits ) ;
}
}
exports . default = NLTimeUnitWithinFormatParser ;
/***/ } ) ,
/***/ "./node_modules/chrono-node/dist/locales/nl/parsers/NLWeekdayParser.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / nl / parsers / NLWeekdayParser . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
"use strict" ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
const constants _1 = _ _webpack _require _ _ ( /*! ../../nl/constants */ "./node_modules/chrono-node/dist/locales/nl/constants.js" ) ;
const pattern _1 = _ _webpack _require _ _ ( /*! ../../../utils/pattern */ "./node_modules/chrono-node/dist/utils/pattern.js" ) ;
const AbstractParserWithWordBoundary _1 = _ _webpack _require _ _ ( /*! ../../../common/parsers/AbstractParserWithWordBoundary */ "./node_modules/chrono-node/dist/common/parsers/AbstractParserWithWordBoundary.js" ) ;
const weeks _1 = _ _webpack _require _ _ ( /*! ../../../calculation/weeks */ "./node_modules/chrono-node/dist/calculation/weeks.js" ) ;
const PATTERN = new RegExp ( "(?:(?:\\,|\\(|\\( )\\s*)?" + "(?:op\\s*?)?" + "(?:(deze|vorige|volgende)\\s*(?:week\\s*)?)?" + ` ( ${ pattern _1 . matchAnyPattern ( constants _1 . WEEKDAY _DICTIONARY ) } ) ` + "(?=\\W|$)" , "i" ) ;
const PREFIX _GROUP = 1 ;
const WEEKDAY _GROUP = 2 ;
const POSTFIX _GROUP = 3 ;
class NLWeekdayParser extends AbstractParserWithWordBoundary _1 . AbstractParserWithWordBoundaryChecking {
innerPattern ( ) {
return PATTERN ;
}
innerExtract ( context , match ) {
const dayOfWeek = match [ WEEKDAY _GROUP ] . toLowerCase ( ) ;
const offset = constants _1 . WEEKDAY _DICTIONARY [ dayOfWeek ] ;
const prefix = match [ PREFIX _GROUP ] ;
const postfix = match [ POSTFIX _GROUP ] ;
let modifierWord = prefix || postfix ;
modifierWord = modifierWord || "" ;
modifierWord = modifierWord . toLowerCase ( ) ;
let modifier = null ;
if ( modifierWord == "vorige" ) {
modifier = "last" ;
} else if ( modifierWord == "volgende" ) {
modifier = "next" ;
} else if ( modifierWord == "deze" ) {
modifier = "this" ;
}
const date = weeks _1 . toDayJSWeekday ( context . refDate , offset , modifier ) ;
return context . createParsingComponents ( ) . assign ( "weekday" , offset ) . imply ( "day" , date . date ( ) ) . imply ( "month" , date . month ( ) + 1 ) . imply ( "year" , date . year ( ) ) ;
}
}
exports . default = NLWeekdayParser ;
/***/ } ) ,
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
/***/ "./node_modules/chrono-node/dist/locales/nl/refiners/NLMergeDateRangeRefiner.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / nl / refiners / NLMergeDateRangeRefiner . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
"use strict" ;
var _ _importDefault = this && this . _ _importDefault || function ( mod ) {
return mod && mod . _ _esModule ? mod : {
"default" : mod
} ;
} ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
const AbstractMergeDateRangeRefiner _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ../../../common/refiners/AbstractMergeDateRangeRefiner */ "./node_modules/chrono-node/dist/common/refiners/AbstractMergeDateRangeRefiner.js" ) ) ;
class NLMergeDateRangeRefiner extends AbstractMergeDateRangeRefiner _1 . default {
patternBetween ( ) {
return /^\s*(tot|-)\s*$/i ;
}
}
exports . default = NLMergeDateRangeRefiner ;
/***/ } ) ,
/***/ "./node_modules/chrono-node/dist/locales/nl/refiners/NLMergeDateTimeRefiner.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / nl / refiners / NLMergeDateTimeRefiner . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
"use strict" ;
var _ _importDefault = this && this . _ _importDefault || function ( mod ) {
return mod && mod . _ _esModule ? mod : {
"default" : mod
} ;
} ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
const AbstractMergeDateTimeRefiner _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ../../../common/refiners/AbstractMergeDateTimeRefiner */ "./node_modules/chrono-node/dist/common/refiners/AbstractMergeDateTimeRefiner.js" ) ) ;
class NLMergeDateTimeRefiner extends AbstractMergeDateTimeRefiner _1 . default {
patternBetween ( ) {
return new RegExp ( "^\\s*(om|na|voor|in de|,|-)?\\s*$" ) ;
}
}
exports . default = NLMergeDateTimeRefiner ;
/***/ } ) ,
/***/ "./node_modules/chrono-node/dist/locales/pt/constants.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / pt / constants . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports ) {
"use strict" ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
exports . parseYear = exports . YEAR _PATTERN = exports . MONTH _DICTIONARY = exports . WEEKDAY _DICTIONARY = void 0 ;
exports . WEEKDAY _DICTIONARY = {
"domingo" : 0 ,
"dom" : 0 ,
"segunda" : 1 ,
"segunda-feira" : 1 ,
"seg" : 1 ,
"terça" : 2 ,
"terça-feira" : 2 ,
"ter" : 2 ,
"quarta" : 3 ,
"quarta-feira" : 3 ,
"qua" : 3 ,
"quinta" : 4 ,
"quinta-feira" : 4 ,
"qui" : 4 ,
"sexta" : 5 ,
"sexta-feira" : 5 ,
"sex" : 5 ,
"sábado" : 6 ,
"sabado" : 6 ,
"sab" : 6
} ;
exports . MONTH _DICTIONARY = {
"janeiro" : 1 ,
"jan" : 1 ,
"jan." : 1 ,
"fevereiro" : 2 ,
"fev" : 2 ,
"fev." : 2 ,
"março" : 3 ,
"mar" : 3 ,
"mar." : 3 ,
"abril" : 4 ,
"abr" : 4 ,
"abr." : 4 ,
"maio" : 5 ,
"mai" : 5 ,
"mai." : 5 ,
"junho" : 6 ,
"jun" : 6 ,
"jun." : 6 ,
"julho" : 7 ,
"jul" : 7 ,
"jul." : 7 ,
"agosto" : 8 ,
"ago" : 8 ,
"ago." : 8 ,
"setembro" : 9 ,
"set" : 9 ,
"set." : 9 ,
"outubro" : 10 ,
"out" : 10 ,
"out." : 10 ,
"novembro" : 11 ,
"nov" : 11 ,
"nov." : 11 ,
"dezembro" : 12 ,
"dez" : 12 ,
"dez." : 12
} ;
exports . YEAR _PATTERN = "[0-9]{1,4}(?![^\\s]\\d)(?:\\s*[a|d]\\.?\\s*c\\.?|\\s*a\\.?\\s*d\\.?)?" ;
function parseYear ( match ) {
if ( match . match ( /^[0-9]{1,4}$/ ) ) {
let yearNumber = parseInt ( match ) ;
if ( yearNumber < 100 ) {
if ( yearNumber > 50 ) {
yearNumber = yearNumber + 1900 ;
} else {
yearNumber = yearNumber + 2000 ;
}
}
return yearNumber ;
}
if ( match . match ( /a\.?\s*c\.?/i ) ) {
match = match . replace ( /a\.?\s*c\.?/i , "" ) ;
return - parseInt ( match ) ;
}
return parseInt ( match ) ;
}
exports . parseYear = parseYear ;
/***/ } ) ,
/***/ "./node_modules/chrono-node/dist/locales/pt/index.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / pt / index . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
"use strict" ;
var _ _importDefault = this && this . _ _importDefault || function ( mod ) {
return mod && mod . _ _esModule ? mod : {
"default" : mod
} ;
} ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
exports . createConfiguration = exports . createCasualConfiguration = exports . parseDate = exports . parse = exports . strict = exports . casual = void 0 ;
const configurations _1 = _ _webpack _require _ _ ( /*! ../../configurations */ "./node_modules/chrono-node/dist/configurations.js" ) ;
const chrono _1 = _ _webpack _require _ _ ( /*! ../../chrono */ "./node_modules/chrono-node/dist/chrono.js" ) ;
const SlashDateFormatParser _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ../../common/parsers/SlashDateFormatParser */ "./node_modules/chrono-node/dist/common/parsers/SlashDateFormatParser.js" ) ) ;
const PTWeekdayParser _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ./parsers/PTWeekdayParser */ "./node_modules/chrono-node/dist/locales/pt/parsers/PTWeekdayParser.js" ) ) ;
const PTTimeExpressionParser _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ./parsers/PTTimeExpressionParser */ "./node_modules/chrono-node/dist/locales/pt/parsers/PTTimeExpressionParser.js" ) ) ;
const PTMergeDateTimeRefiner _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ./refiners/PTMergeDateTimeRefiner */ "./node_modules/chrono-node/dist/locales/pt/refiners/PTMergeDateTimeRefiner.js" ) ) ;
const PTMergeDateRangeRefiner _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ./refiners/PTMergeDateRangeRefiner */ "./node_modules/chrono-node/dist/locales/pt/refiners/PTMergeDateRangeRefiner.js" ) ) ;
const PTMonthNameLittleEndianParser _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ./parsers/PTMonthNameLittleEndianParser */ "./node_modules/chrono-node/dist/locales/pt/parsers/PTMonthNameLittleEndianParser.js" ) ) ;
const PTCasualDateParser _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ./parsers/PTCasualDateParser */ "./node_modules/chrono-node/dist/locales/pt/parsers/PTCasualDateParser.js" ) ) ;
const PTCasualTimeParser _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ./parsers/PTCasualTimeParser */ "./node_modules/chrono-node/dist/locales/pt/parsers/PTCasualTimeParser.js" ) ) ;
exports . casual = new chrono _1 . Chrono ( createCasualConfiguration ( ) ) ;
exports . strict = new chrono _1 . Chrono ( createConfiguration ( true ) ) ;
function parse ( text , ref , option ) {
return exports . casual . parse ( text , ref , option ) ;
}
exports . parse = parse ;
function parseDate ( text , ref , option ) {
return exports . casual . parseDate ( text , ref , option ) ;
}
exports . parseDate = parseDate ;
function createCasualConfiguration ( littleEndian = true ) {
const option = createConfiguration ( false , littleEndian ) ;
option . parsers . push ( new PTCasualDateParser _1 . default ( ) ) ;
option . parsers . push ( new PTCasualTimeParser _1 . default ( ) ) ;
return option ;
}
exports . createCasualConfiguration = createCasualConfiguration ;
function createConfiguration ( strictMode = true , littleEndian = true ) {
return configurations _1 . includeCommonConfiguration ( {
parsers : [ new SlashDateFormatParser _1 . default ( littleEndian ) , new PTWeekdayParser _1 . default ( ) , new PTTimeExpressionParser _1 . default ( ) , new PTMonthNameLittleEndianParser _1 . default ( ) ] ,
refiners : [ new PTMergeDateTimeRefiner _1 . default ( ) , new PTMergeDateRangeRefiner _1 . default ( ) ]
} , strictMode ) ;
}
exports . createConfiguration = createConfiguration ;
/***/ } ) ,
/***/ "./node_modules/chrono-node/dist/locales/pt/parsers/PTCasualDateParser.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / pt / parsers / PTCasualDateParser . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
"use strict" ;
var _ _createBinding = this && this . _ _createBinding || ( Object . create ? function ( o , m , k , k2 ) {
if ( k2 === undefined ) k2 = k ;
Object . defineProperty ( o , k2 , {
enumerable : true ,
get : function ( ) {
return m [ k ] ;
}
} ) ;
} : function ( o , m , k , k2 ) {
if ( k2 === undefined ) k2 = k ;
o [ k2 ] = m [ k ] ;
} ) ;
var _ _setModuleDefault = this && this . _ _setModuleDefault || ( Object . create ? function ( o , v ) {
Object . defineProperty ( o , "default" , {
enumerable : true ,
value : v
} ) ;
} : function ( o , v ) {
o [ "default" ] = v ;
} ) ;
var _ _importStar = this && this . _ _importStar || function ( mod ) {
if ( mod && mod . _ _esModule ) return mod ;
var result = { } ;
if ( mod != null ) for ( var k in mod ) if ( k !== "default" && Object . prototype . hasOwnProperty . call ( mod , k ) ) _ _createBinding ( result , mod , k ) ;
_ _setModuleDefault ( result , mod ) ;
return result ;
} ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
const AbstractParserWithWordBoundary _1 = _ _webpack _require _ _ ( /*! ../../../common/parsers/AbstractParserWithWordBoundary */ "./node_modules/chrono-node/dist/common/parsers/AbstractParserWithWordBoundary.js" ) ;
const references = _ _importStar ( _ _webpack _require _ _ ( /*! ../../../common/casualReferences */ "./node_modules/chrono-node/dist/common/casualReferences.js" ) ) ;
class PTCasualDateParser extends AbstractParserWithWordBoundary _1 . AbstractParserWithWordBoundaryChecking {
innerPattern ( context ) {
return /(agora|hoje|amanha|amanhã|ontem)(?=\W|$)/i ;
}
innerExtract ( context , match ) {
const lowerText = match [ 0 ] . toLowerCase ( ) ;
const component = context . createParsingComponents ( ) ;
switch ( lowerText ) {
case "agora" :
return references . now ( context . reference ) ;
case "hoje" :
return references . today ( context . reference ) ;
case "amanha" :
case "amanhã" :
return references . tomorrow ( context . reference ) ;
case "ontem" :
return references . yesterday ( context . reference ) ;
}
return component ;
}
}
exports . default = PTCasualDateParser ;
/***/ } ) ,
/***/ "./node_modules/chrono-node/dist/locales/pt/parsers/PTCasualTimeParser.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / pt / parsers / PTCasualTimeParser . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
"use strict" ;
var _ _importDefault = this && this . _ _importDefault || function ( mod ) {
return mod && mod . _ _esModule ? mod : {
"default" : mod
} ;
} ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
const index _1 = _ _webpack _require _ _ ( /*! ../../../index */ "./node_modules/chrono-node/dist/index.js" ) ;
const AbstractParserWithWordBoundary _1 = _ _webpack _require _ _ ( /*! ../../../common/parsers/AbstractParserWithWordBoundary */ "./node_modules/chrono-node/dist/common/parsers/AbstractParserWithWordBoundary.js" ) ;
const dayjs _1 = _ _webpack _require _ _ ( /*! ../../../utils/dayjs */ "./node_modules/chrono-node/dist/utils/dayjs.js" ) ;
const dayjs _2 = _ _importDefault ( _ _webpack _require _ _ ( /*! dayjs */ "./node_modules/dayjs/dayjs.min.js" ) ) ;
class PTCasualTimeParser extends AbstractParserWithWordBoundary _1 . AbstractParserWithWordBoundaryChecking {
innerPattern ( ) {
return /(?:esta\s*)?(manha|manhã|tarde|meia-noite|meio-dia|noite)(?=\W|$)/i ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
innerExtract ( context , match ) {
const targetDate = dayjs _2 . default ( context . refDate ) ;
const component = context . createParsingComponents ( ) ;
switch ( match [ 1 ] . toLowerCase ( ) ) {
case "tarde" :
component . imply ( "meridiem" , index _1 . Meridiem . PM ) ;
component . imply ( "hour" , 15 ) ;
break ;
case "noite" :
component . imply ( "meridiem" , index _1 . Meridiem . PM ) ;
component . imply ( "hour" , 22 ) ;
break ;
case "manha" :
case "manhã" :
component . imply ( "meridiem" , index _1 . Meridiem . AM ) ;
component . imply ( "hour" , 6 ) ;
break ;
case "meia-noite" :
dayjs _1 . assignTheNextDay ( component , targetDate ) ;
component . imply ( "hour" , 0 ) ;
component . imply ( "minute" , 0 ) ;
component . imply ( "second" , 0 ) ;
break ;
case "meio-dia" :
component . imply ( "meridiem" , index _1 . Meridiem . AM ) ;
component . imply ( "hour" , 12 ) ;
break ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
return component ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
}
exports . default = PTCasualTimeParser ;
/***/ } ) ,
/***/ "./node_modules/chrono-node/dist/locales/pt/parsers/PTMonthNameLittleEndianParser.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / pt / parsers / PTMonthNameLittleEndianParser . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
"use strict" ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
const years _1 = _ _webpack _require _ _ ( /*! ../../../calculation/years */ "./node_modules/chrono-node/dist/calculation/years.js" ) ;
const constants _1 = _ _webpack _require _ _ ( /*! ../constants */ "./node_modules/chrono-node/dist/locales/pt/constants.js" ) ;
const constants _2 = _ _webpack _require _ _ ( /*! ../constants */ "./node_modules/chrono-node/dist/locales/pt/constants.js" ) ;
const pattern _1 = _ _webpack _require _ _ ( /*! ../../../utils/pattern */ "./node_modules/chrono-node/dist/utils/pattern.js" ) ;
const AbstractParserWithWordBoundary _1 = _ _webpack _require _ _ ( /*! ../../../common/parsers/AbstractParserWithWordBoundary */ "./node_modules/chrono-node/dist/common/parsers/AbstractParserWithWordBoundary.js" ) ;
const PATTERN = new RegExp ( ` ([0-9]{1,2})(?:º|ª|°)? ` + "(?:\\s*(?:desde|de|\\-|\\– |ao?|\\s)\\s*([0-9]{1,2})(?:º|ª|°)?)?\\s*(?:de)?\\s*" + ` (?:-|/| \\ s*(?:de|,)? \\ s*) ` + ` ( ${ pattern _1 . matchAnyPattern ( constants _1 . MONTH _DICTIONARY ) } ) ` + ` (?: \\ s*(?:de|,)? \\ s*( ${ constants _2 . YEAR _PATTERN } ))? ` + ` (?= \\ W| $ ) ` , "i" ) ;
const DATE _GROUP = 1 ;
const DATE _TO _GROUP = 2 ;
const MONTH _NAME _GROUP = 3 ;
const YEAR _GROUP = 4 ;
class PTMonthNameLittleEndianParser extends AbstractParserWithWordBoundary _1 . AbstractParserWithWordBoundaryChecking {
innerPattern ( ) {
return PATTERN ;
}
innerExtract ( context , match ) {
const result = context . createParsingResult ( match . index , match [ 0 ] ) ;
const month = constants _1 . MONTH _DICTIONARY [ match [ MONTH _NAME _GROUP ] . toLowerCase ( ) ] ;
const day = parseInt ( match [ DATE _GROUP ] ) ;
if ( day > 31 ) {
match . index = match . index + match [ DATE _GROUP ] . length ;
return null ;
}
result . start . assign ( "month" , month ) ;
result . start . assign ( "day" , day ) ;
if ( match [ YEAR _GROUP ] ) {
const yearNumber = constants _2 . parseYear ( match [ YEAR _GROUP ] ) ;
result . start . assign ( "year" , yearNumber ) ;
} else {
const year = years _1 . findYearClosestToRef ( context . refDate , day , month ) ;
result . start . imply ( "year" , year ) ;
}
if ( match [ DATE _TO _GROUP ] ) {
const endDate = parseInt ( match [ DATE _TO _GROUP ] ) ;
result . end = result . start . clone ( ) ;
result . end . assign ( "day" , endDate ) ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
return result ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
exports . default = PTMonthNameLittleEndianParser ;
/***/ } ) ,
/***/ "./node_modules/chrono-node/dist/locales/pt/parsers/PTTimeExpressionParser.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / pt / parsers / PTTimeExpressionParser . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
"use strict" ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
const AbstractTimeExpressionParser _1 = _ _webpack _require _ _ ( /*! ../../../common/parsers/AbstractTimeExpressionParser */ "./node_modules/chrono-node/dist/common/parsers/AbstractTimeExpressionParser.js" ) ;
class PTTimeExpressionParser extends AbstractTimeExpressionParser _1 . AbstractTimeExpressionParser {
primaryPrefix ( ) {
return "(?:(?:ao?|às?|das|da|de|do)\\s*)?" ;
}
followingPhase ( ) {
return "\\s*(?:\\-|\\– |\\~|\\〜|a(?:o)?|\\?)\\s*" ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
}
exports . default = PTTimeExpressionParser ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
/***/ } ) ,
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
/***/ "./node_modules/chrono-node/dist/locales/pt/parsers/PTWeekdayParser.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / pt / parsers / PTWeekdayParser . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
"use strict" ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
const constants _1 = _ _webpack _require _ _ ( /*! ../constants */ "./node_modules/chrono-node/dist/locales/pt/constants.js" ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
const pattern _1 = _ _webpack _require _ _ ( /*! ../../../utils/pattern */ "./node_modules/chrono-node/dist/utils/pattern.js" ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
const AbstractParserWithWordBoundary _1 = _ _webpack _require _ _ ( /*! ../../../common/parsers/AbstractParserWithWordBoundary */ "./node_modules/chrono-node/dist/common/parsers/AbstractParserWithWordBoundary.js" ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
const weeks _1 = _ _webpack _require _ _ ( /*! ../../../calculation/weeks */ "./node_modules/chrono-node/dist/calculation/weeks.js" ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
const PATTERN = new RegExp ( "(?:(?:\\,|\\(|\\( )\\s*)?" + "(?:(este|esta|passado|pr[oó]ximo)\\s*)?" + ` ( ${ pattern _1 . matchAnyPattern ( constants _1 . WEEKDAY _DICTIONARY ) } ) ` + "(?:\\s*(?:\\,|\\)|\\) ))?" + "(?:\\s*(este|esta|passado|pr[óo]ximo)\\s*semana)?" + "(?=\\W|\\d|$)" , "i" ) ;
const PREFIX _GROUP = 1 ;
const WEEKDAY _GROUP = 2 ;
const POSTFIX _GROUP = 3 ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
class PTWeekdayParser extends AbstractParserWithWordBoundary _1 . AbstractParserWithWordBoundaryChecking {
innerPattern ( ) {
return PATTERN ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
innerExtract ( context , match ) {
const dayOfWeek = match [ WEEKDAY _GROUP ] . toLowerCase ( ) ;
const offset = constants _1 . WEEKDAY _DICTIONARY [ dayOfWeek ] ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
if ( offset === undefined ) {
return null ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
const prefix = match [ PREFIX _GROUP ] ;
const postfix = match [ POSTFIX _GROUP ] ;
let norm = prefix || postfix || "" ;
norm = norm . toLowerCase ( ) ;
let modifier = null ;
if ( norm == "passado" ) {
modifier = "this" ;
} else if ( norm == "próximo" || norm == "proximo" ) {
modifier = "next" ;
} else if ( norm == "este" ) {
modifier = "this" ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
const date = weeks _1 . toDayJSWeekday ( context . refDate , offset , modifier ) ;
return context . createParsingComponents ( ) . assign ( "weekday" , offset ) . imply ( "day" , date . date ( ) ) . imply ( "month" , date . month ( ) + 1 ) . imply ( "year" , date . year ( ) ) ;
}
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
exports . default = PTWeekdayParser ;
2020-11-04 22:59:32 +01:00
/***/ } ) ,
2021-08-27 18:14:41 +02:00
/***/ "./node_modules/chrono-node/dist/locales/pt/refiners/PTMergeDateRangeRefiner.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / pt / refiners / PTMergeDateRangeRefiner . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
2020-11-04 22:59:32 +01:00
"use strict" ;
2021-08-27 18:14:41 +02:00
var _ _importDefault = this && this . _ _importDefault || function ( mod ) {
return mod && mod . _ _esModule ? mod : {
"default" : mod
} ;
} ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
const AbstractMergeDateRangeRefiner _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ../../../common/refiners/AbstractMergeDateRangeRefiner */ "./node_modules/chrono-node/dist/common/refiners/AbstractMergeDateRangeRefiner.js" ) ) ;
class PTMergeDateRangeRefiner extends AbstractMergeDateRangeRefiner _1 . default {
patternBetween ( ) {
return /^\s*(?:-)\s*$/i ;
}
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
exports . default = PTMergeDateRangeRefiner ;
2020-11-04 22:59:32 +01:00
/***/ } ) ,
2021-08-27 18:14:41 +02:00
/***/ "./node_modules/chrono-node/dist/locales/pt/refiners/PTMergeDateTimeRefiner.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / locales / pt / refiners / PTMergeDateTimeRefiner . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
2020-11-04 22:59:32 +01:00
"use strict" ;
2021-08-27 18:14:41 +02:00
var _ _importDefault = this && this . _ _importDefault || function ( mod ) {
return mod && mod . _ _esModule ? mod : {
"default" : mod
} ;
} ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
const AbstractMergeDateTimeRefiner _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! ../../../common/refiners/AbstractMergeDateTimeRefiner */ "./node_modules/chrono-node/dist/common/refiners/AbstractMergeDateTimeRefiner.js" ) ) ;
class PTMergeDateTimeRefiner extends AbstractMergeDateTimeRefiner _1 . default {
patternBetween ( ) {
return new RegExp ( "^\\s*(?:,|à)?\\s*$" ) ;
}
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
exports . default = PTMergeDateTimeRefiner ;
2020-11-04 22:59:32 +01:00
/***/ } ) ,
2021-08-27 18:14:41 +02:00
/***/ "./node_modules/chrono-node/dist/results.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / results . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
2020-11-04 22:59:32 +01:00
"use strict" ;
2021-08-27 18:14:41 +02:00
var _ _importDefault = this && this . _ _importDefault || function ( mod ) {
return mod && mod . _ _esModule ? mod : {
"default" : mod
} ;
} ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
exports . ParsingResult = exports . ParsingComponents = exports . ReferenceWithTimezone = void 0 ;
const quarterOfYear _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! dayjs/plugin/quarterOfYear */ "./node_modules/dayjs/plugin/quarterOfYear.js" ) ) ;
const dayjs _1 = _ _importDefault ( _ _webpack _require _ _ ( /*! dayjs */ "./node_modules/dayjs/dayjs.min.js" ) ) ;
const dayjs _2 = _ _webpack _require _ _ ( /*! ./utils/dayjs */ "./node_modules/chrono-node/dist/utils/dayjs.js" ) ;
const timezone _1 = _ _webpack _require _ _ ( /*! ./timezone */ "./node_modules/chrono-node/dist/timezone.js" ) ;
dayjs _1 . default . extend ( quarterOfYear _1 . default ) ;
class ReferenceWithTimezone {
constructor ( input ) {
var _a , _b ;
input = input !== null && input !== void 0 ? input : new Date ( ) ;
if ( input instanceof Date ) {
this . instant = input ;
this . timezoneOffset = - input . getTimezoneOffset ( ) ;
} else {
this . instant = ( _a = input . instant ) !== null && _a !== void 0 ? _a : new Date ( ) ;
this . timezoneOffset = timezone _1 . toTimezoneOffset ( ( _b = input . timezone ) !== null && _b !== void 0 ? _b : - this . instant . getTimezoneOffset ( ) ) ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
}
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
exports . ReferenceWithTimezone = ReferenceWithTimezone ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
class ParsingComponents {
constructor ( reference , knownComponents ) {
this . reference = reference ;
this . knownValues = { } ;
this . impliedValues = { } ;
if ( knownComponents ) {
for ( const key in knownComponents ) {
this . knownValues [ key ] = knownComponents [ key ] ;
}
}
const refDayJs = dayjs _1 . default ( reference . instant ) ;
this . imply ( "day" , refDayJs . date ( ) ) ;
this . imply ( "month" , refDayJs . month ( ) + 1 ) ;
this . imply ( "year" , refDayJs . year ( ) ) ;
this . imply ( "hour" , 12 ) ;
this . imply ( "minute" , 0 ) ;
this . imply ( "second" , 0 ) ;
this . imply ( "millisecond" , 0 ) ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
get ( component ) {
if ( component in this . knownValues ) {
return this . knownValues [ component ] ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
if ( component in this . impliedValues ) {
return this . impliedValues [ component ] ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
return null ;
}
isCertain ( component ) {
return component in this . knownValues ;
}
getCertainComponents ( ) {
return Object . keys ( this . knownValues ) ;
}
imply ( component , value ) {
if ( component in this . knownValues ) {
return this ;
}
this . impliedValues [ component ] = value ;
return this ;
}
assign ( component , value ) {
this . knownValues [ component ] = value ;
delete this . impliedValues [ component ] ;
return this ;
}
delete ( component ) {
delete this . knownValues [ component ] ;
delete this . impliedValues [ component ] ;
}
clone ( ) {
const component = new ParsingComponents ( this . reference ) ;
component . knownValues = { } ;
component . impliedValues = { } ;
for ( const key in this . knownValues ) {
component . knownValues [ key ] = this . knownValues [ key ] ;
}
for ( const key in this . impliedValues ) {
component . impliedValues [ key ] = this . impliedValues [ key ] ;
}
return component ;
}
isOnlyDate ( ) {
return ! this . isCertain ( "hour" ) && ! this . isCertain ( "minute" ) && ! this . isCertain ( "second" ) ;
}
isOnlyTime ( ) {
return ! this . isCertain ( "weekday" ) && ! this . isCertain ( "day" ) && ! this . isCertain ( "month" ) ;
}
isOnlyWeekdayComponent ( ) {
return this . isCertain ( "weekday" ) && ! this . isCertain ( "day" ) && ! this . isCertain ( "month" ) ;
}
isOnlyDayMonthComponent ( ) {
return this . isCertain ( "day" ) && this . isCertain ( "month" ) && ! this . isCertain ( "year" ) ;
}
isValidDate ( ) {
const date = this . dateWithoutTimezoneAdjustment ( ) ;
if ( date . getFullYear ( ) !== this . get ( "year" ) ) return false ;
if ( date . getMonth ( ) !== this . get ( "month" ) - 1 ) return false ;
if ( date . getDate ( ) !== this . get ( "day" ) ) return false ;
if ( this . get ( "hour" ) != null && date . getHours ( ) != this . get ( "hour" ) ) return false ;
if ( this . get ( "minute" ) != null && date . getMinutes ( ) != this . get ( "minute" ) ) return false ;
return true ;
}
toString ( ) {
return ` [ParsingComponents {knownValues: ${ JSON . stringify ( this . knownValues ) } , impliedValues: ${ JSON . stringify ( this . impliedValues ) } }] ` ;
}
dayjs ( ) {
return dayjs _1 . default ( this . date ( ) ) ;
}
date ( ) {
const date = this . dateWithoutTimezoneAdjustment ( ) ;
return new Date ( date . getTime ( ) + this . getSystemTimezoneAdjustmentMinute ( ) * 60000 ) ;
}
dateWithoutTimezoneAdjustment ( ) {
const date = new Date ( this . get ( "year" ) , this . get ( "month" ) - 1 , this . get ( "day" ) , this . get ( "hour" ) , this . get ( "minute" ) , this . get ( "second" ) , this . get ( "millisecond" ) ) ;
date . setFullYear ( this . get ( "year" ) ) ;
return date ;
}
getSystemTimezoneAdjustmentMinute ( ) {
var _a ;
const currentTimezoneOffset = - new Date ( ) . getTimezoneOffset ( ) ;
const targetTimezoneOffset = ( _a = this . get ( "timezoneOffset" ) ) !== null && _a !== void 0 ? _a : this . reference . timezoneOffset ;
return currentTimezoneOffset - targetTimezoneOffset ;
}
static createRelativeFromRefInstant ( refInstant , fragments ) {
let date = dayjs _1 . default ( refInstant ) ;
for ( const key in fragments ) {
date = date . add ( fragments [ key ] , key ) ;
}
const reference = new ReferenceWithTimezone ( refInstant ) ;
const components = new ParsingComponents ( reference ) ;
if ( fragments [ "hour" ] || fragments [ "minute" ] || fragments [ "second" ] ) {
dayjs _2 . assignSimilarTime ( components , date ) ;
dayjs _2 . assignSimilarDate ( components , date ) ;
components . assign ( "timezoneOffset" , - refInstant . getTimezoneOffset ( ) ) ;
} else {
dayjs _2 . implySimilarTime ( components , date ) ;
components . imply ( "timezoneOffset" , - refInstant . getTimezoneOffset ( ) ) ;
if ( fragments [ "d" ] ) {
components . assign ( "day" , date . date ( ) ) ;
components . assign ( "month" , date . month ( ) + 1 ) ;
components . assign ( "year" , date . year ( ) ) ;
} else {
if ( fragments [ "week" ] ) {
components . imply ( "weekday" , date . day ( ) ) ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
components . imply ( "day" , date . date ( ) ) ;
if ( fragments [ "month" ] ) {
components . assign ( "month" , date . month ( ) + 1 ) ;
components . assign ( "year" , date . year ( ) ) ;
} else {
components . imply ( "month" , date . month ( ) + 1 ) ;
if ( fragments [ "year" ] ) {
components . assign ( "year" , date . year ( ) ) ;
} else {
components . imply ( "year" , date . year ( ) ) ;
}
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
}
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
return components ;
}
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
exports . ParsingComponents = ParsingComponents ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
class ParsingResult {
constructor ( reference , index , text , start , end ) {
this . reference = reference ;
this . refDate = reference . instant ;
this . index = index ;
this . text = text ;
this . start = start || new ParsingComponents ( reference ) ;
this . end = end ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
clone ( ) {
const result = new ParsingResult ( this . reference , this . index , this . text ) ;
result . start = this . start ? this . start . clone ( ) : null ;
result . end = this . end ? this . end . clone ( ) : null ;
return result ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
date ( ) {
return this . start . date ( ) ;
}
toString ( ) {
return ` [ParsingResult {index: ${ this . index } , text: ' ${ this . text } ', ...}] ` ;
}
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
exports . ParsingResult = ParsingResult ;
2020-11-04 22:59:32 +01:00
/***/ } ) ,
2021-08-27 18:14:41 +02:00
/***/ "./node_modules/chrono-node/dist/timezone.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / timezone . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports ) {
2020-11-04 22:59:32 +01:00
"use strict" ;
2021-08-27 18:14:41 +02:00
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
exports . toTimezoneOffset = exports . TIMEZONE _ABBR _MAP = void 0 ;
exports . TIMEZONE _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 : 330 ,
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
2020-11-04 22:59:32 +01:00
} ;
2021-08-27 18:14:41 +02:00
function toTimezoneOffset ( timezoneInput ) {
var _a ;
if ( typeof timezoneInput === "number" ) {
return timezoneInput ;
}
return ( _a = exports . TIMEZONE _ABBR _MAP [ timezoneInput ] ) !== null && _a !== void 0 ? _a : 0 ;
2020-11-04 22:59:32 +01:00
}
2020-10-20 17:47:54 +02:00
2021-08-27 18:14:41 +02:00
exports . toTimezoneOffset = toTimezoneOffset ;
2020-10-20 17:47:54 +02:00
2020-11-04 22:59:32 +01:00
/***/ } ) ,
2021-08-27 18:14:41 +02:00
/***/ "./node_modules/chrono-node/dist/utils/dayjs.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / utils / dayjs . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports ) {
2020-11-04 22:59:32 +01:00
"use strict" ;
2021-08-27 18:14:41 +02:00
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
exports . implySimilarTime = exports . assignSimilarTime = exports . assignSimilarDate = exports . assignTheNextDay = void 0 ;
function assignTheNextDay ( component , targetDayJs ) {
targetDayJs = targetDayJs . add ( 1 , "day" ) ;
assignSimilarDate ( component , targetDayJs ) ;
implySimilarTime ( component , targetDayJs ) ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
exports . assignTheNextDay = assignTheNextDay ;
function assignSimilarDate ( component , targetDayJs ) {
component . assign ( "day" , targetDayJs . date ( ) ) ;
component . assign ( "month" , targetDayJs . month ( ) + 1 ) ;
component . assign ( "year" , targetDayJs . year ( ) ) ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
exports . assignSimilarDate = assignSimilarDate ;
function assignSimilarTime ( component , targetDayJs ) {
component . assign ( "hour" , targetDayJs . hour ( ) ) ;
component . assign ( "minute" , targetDayJs . minute ( ) ) ;
component . assign ( "second" , targetDayJs . second ( ) ) ;
component . assign ( "millisecond" , targetDayJs . millisecond ( ) ) ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
exports . assignSimilarTime = assignSimilarTime ;
function implySimilarTime ( component , targetDayJs ) {
component . imply ( "hour" , targetDayJs . hour ( ) ) ;
component . imply ( "minute" , targetDayJs . minute ( ) ) ;
component . imply ( "second" , targetDayJs . second ( ) ) ;
component . imply ( "millisecond" , targetDayJs . millisecond ( ) ) ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
exports . implySimilarTime = implySimilarTime ;
/***/ } ) ,
/***/ "./node_modules/chrono-node/dist/utils/pattern.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / utils / pattern . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports ) {
"use strict" ;
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
exports . matchAnyPattern = exports . extractTerms = exports . repeatedTimeunitPattern = void 0 ;
function repeatedTimeunitPattern ( prefix , singleTimeunitPattern ) {
const singleTimeunitPatternNoCapture = singleTimeunitPattern . replace ( /\((?!\?)/g , "(?:" ) ;
return ` ${ prefix } ${ singleTimeunitPatternNoCapture } \\ s*(?:,? \\ s{0,5} ${ singleTimeunitPatternNoCapture } ){0,10} ` ;
}
exports . repeatedTimeunitPattern = repeatedTimeunitPattern ;
function extractTerms ( dictionary ) {
let keys ;
if ( dictionary instanceof Array ) {
keys = [ ... dictionary ] ;
} else if ( dictionary instanceof Map ) {
keys = Array . from ( dictionary . keys ( ) ) ;
} else {
keys = Object . keys ( dictionary ) ;
}
return keys ;
}
exports . extractTerms = extractTerms ;
function matchAnyPattern ( dictionary ) {
const joinedTerms = extractTerms ( dictionary ) . sort ( ( a , b ) => b . length - a . length ) . join ( "|" ) . replace ( /\./g , "\\." ) ;
return ` (?: ${ joinedTerms } ) ` ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
exports . matchAnyPattern = matchAnyPattern ;
2020-11-04 22:59:32 +01:00
/***/ } ) ,
2021-08-27 18:14:41 +02:00
/***/ "./node_modules/chrono-node/dist/utils/timeunits.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / chrono - node / dist / utils / timeunits . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , exports ) {
2020-11-04 22:59:32 +01:00
"use strict" ;
2021-08-27 18:14:41 +02:00
Object . defineProperty ( exports , "__esModule" , ( {
value : true
} ) ) ;
exports . addImpliedTimeUnits = exports . reverseTimeUnits = void 0 ;
function reverseTimeUnits ( timeUnits ) {
const reversed = { } ;
for ( const key in timeUnits ) {
reversed [ key ] = - timeUnits [ key ] ;
}
return reversed ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
exports . reverseTimeUnits = reverseTimeUnits ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
function addImpliedTimeUnits ( components , timeUnits ) {
const output = components . clone ( ) ;
let date = components . dayjs ( ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
for ( const key in timeUnits ) {
date = date . add ( timeUnits [ key ] , key ) ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
if ( "day" in timeUnits || "d" in timeUnits || "week" in timeUnits || "month" in timeUnits || "year" in timeUnits ) {
output . imply ( "day" , date . date ( ) ) ;
output . imply ( "month" , date . month ( ) + 1 ) ;
output . imply ( "year" , date . year ( ) ) ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
if ( "second" in timeUnits || "minute" in timeUnits || "hour" in timeUnits ) {
output . imply ( "second" , date . second ( ) ) ;
output . imply ( "minute" , date . minute ( ) ) ;
output . imply ( "hour" , date . hour ( ) ) ;
}
return output ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
exports . addImpliedTimeUnits = addImpliedTimeUnits ;
2020-11-04 22:59:32 +01:00
/***/ } ) ,
2021-08-27 18:14:41 +02:00
/***/ "./node_modules/css-loader/dist/runtime/api.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / css - loader / dist / runtime / api . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( module ) {
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
"use strict" ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
/ *
MIT License http : //www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @ sokra
* /
// css base code, injected by the css-loader
// eslint-disable-next-line func-names
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
module . exports = function ( cssWithMappingToString ) {
var list = [ ] ; // return the list of modules as css string
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
list . toString = function toString ( ) {
return this . map ( function ( item ) {
var content = cssWithMappingToString ( item ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
if ( item [ 2 ] ) {
return "@media " . concat ( item [ 2 ] , " {" ) . concat ( content , "}" ) ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
return content ;
} ) . join ( "" ) ;
} ; // import a list of modules into the list
// eslint-disable-next-line func-names
list . i = function ( modules , mediaQuery , dedupe ) {
if ( typeof modules === "string" ) {
// eslint-disable-next-line no-param-reassign
modules = [ [ null , modules , "" ] ] ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
var alreadyImportedModules = { } ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
if ( dedupe ) {
for ( var i = 0 ; i < this . length ; i ++ ) {
// eslint-disable-next-line prefer-destructuring
var id = this [ i ] [ 0 ] ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
if ( id != null ) {
alreadyImportedModules [ id ] = true ;
}
}
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
for ( var _i = 0 ; _i < modules . length ; _i ++ ) {
var item = [ ] . concat ( modules [ _i ] ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
if ( dedupe && alreadyImportedModules [ item [ 0 ] ] ) {
// eslint-disable-next-line no-continue
continue ;
}
if ( mediaQuery ) {
if ( ! item [ 2 ] ) {
item [ 2 ] = mediaQuery ;
} else {
item [ 2 ] = "" . concat ( mediaQuery , " and " ) . concat ( item [ 2 ] ) ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
}
list . push ( item ) ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
} ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
return list ;
} ;
2020-11-04 22:59:32 +01:00
/***/ } ) ,
2020-10-20 17:47:54 +02:00
2021-08-27 18:14:41 +02:00
/***/ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / css - loader / dist / runtime / cssWithMappingToString . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( module ) {
2020-10-20 17:47:54 +02:00
2020-11-04 22:59:32 +01:00
"use strict" ;
2020-10-27 15:57:35 +01:00
2021-08-27 18:14:41 +02:00
function _slicedToArray ( arr , i ) {
return _arrayWithHoles ( arr ) || _iterableToArrayLimit ( arr , i ) || _unsupportedIterableToArray ( arr , i ) || _nonIterableRest ( ) ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
function _nonIterableRest ( ) {
throw new TypeError ( "Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." ) ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
function _unsupportedIterableToArray ( o , minLen ) {
if ( ! o ) return ;
if ( typeof o === "string" ) return _arrayLikeToArray ( o , minLen ) ;
var n = Object . prototype . toString . call ( o ) . slice ( 8 , - 1 ) ;
if ( n === "Object" && o . constructor ) n = o . constructor . name ;
if ( n === "Map" || n === "Set" ) return Array . from ( o ) ;
if ( n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/ . test ( n ) ) return _arrayLikeToArray ( o , minLen ) ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
function _arrayLikeToArray ( arr , len ) {
if ( len == null || len > arr . length ) len = arr . length ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
for ( var i = 0 , arr2 = new Array ( len ) ; i < len ; i ++ ) {
arr2 [ i ] = arr [ i ] ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
return arr2 ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
function _iterableToArrayLimit ( arr , i ) {
var _i = arr && ( typeof Symbol !== "undefined" && arr [ Symbol . iterator ] || arr [ "@@iterator" ] ) ;
if ( _i == null ) return ;
var _arr = [ ] ;
var _n = true ;
var _d = false ;
var _s , _e ;
try {
for ( _i = _i . call ( arr ) ; ! ( _n = ( _s = _i . next ( ) ) . done ) ; _n = true ) {
_arr . push ( _s . value ) ;
if ( i && _arr . length === i ) break ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
} catch ( err ) {
_d = true ;
_e = err ;
} finally {
try {
if ( ! _n && _i [ "return" ] != null ) _i [ "return" ] ( ) ;
} finally {
if ( _d ) throw _e ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
}
return _arr ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
function _arrayWithHoles ( arr ) {
if ( Array . isArray ( arr ) ) return arr ;
}
module . exports = function cssWithMappingToString ( item ) {
var _item = _slicedToArray ( item , 4 ) ,
content = _item [ 1 ] ,
cssMapping = _item [ 3 ] ;
if ( typeof btoa === "function" ) {
// eslint-disable-next-line no-undef
var base64 = btoa ( unescape ( encodeURIComponent ( JSON . stringify ( cssMapping ) ) ) ) ;
var data = "sourceMappingURL=data:application/json;charset=utf-8;base64," . concat ( base64 ) ;
var sourceMapping = "/*# " . concat ( data , " */" ) ;
var sourceURLs = cssMapping . sources . map ( function ( source ) {
return "/*# sourceURL=" . concat ( cssMapping . sourceRoot || "" ) . concat ( source , " */" ) ;
} ) ;
return [ content ] . concat ( sourceURLs ) . concat ( [ sourceMapping ] ) . join ( "\n" ) ;
}
return [ content ] . join ( "\n" ) ;
} ;
/***/ } ) ,
/***/ "./node_modules/dayjs/dayjs.min.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / dayjs / dayjs . min . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( module ) {
! function ( t , e ) {
true ? module . exports = e ( ) : 0 ;
} ( this , function ( ) {
"use strict" ;
var t = 1e3 ,
e = 6e4 ,
n = 36e5 ,
r = "millisecond" ,
i = "second" ,
s = "minute" ,
u = "hour" ,
a = "day" ,
o = "week" ,
f = "month" ,
h = "quarter" ,
c = "year" ,
d = "date" ,
$ = "Invalid Date" ,
l = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[^0-9]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/ ,
y = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g ,
M = {
name : "en" ,
weekdays : "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday" . split ( "_" ) ,
months : "January_February_March_April_May_June_July_August_September_October_November_December" . split ( "_" )
} ,
m = function ( t , e , n ) {
var r = String ( t ) ;
return ! r || r . length >= e ? t : "" + Array ( e + 1 - r . length ) . join ( n ) + t ;
} ,
g = {
s : m ,
z : function ( t ) {
var e = - t . utcOffset ( ) ,
n = Math . abs ( e ) ,
r = Math . floor ( n / 60 ) ,
i = n % 60 ;
return ( e <= 0 ? "+" : "-" ) + m ( r , 2 , "0" ) + ":" + m ( i , 2 , "0" ) ;
} ,
m : function t ( e , n ) {
if ( e . date ( ) < n . date ( ) ) return - t ( n , e ) ;
var r = 12 * ( n . year ( ) - e . year ( ) ) + ( n . month ( ) - e . month ( ) ) ,
i = e . clone ( ) . add ( r , f ) ,
s = n - i < 0 ,
u = e . clone ( ) . add ( r + ( s ? - 1 : 1 ) , f ) ;
return + ( - ( r + ( n - i ) / ( s ? i - u : u - i ) ) || 0 ) ;
} ,
a : function ( t ) {
return t < 0 ? Math . ceil ( t ) || 0 : Math . floor ( t ) ;
} ,
p : function ( t ) {
return {
M : f ,
y : c ,
w : o ,
d : a ,
D : d ,
h : u ,
m : s ,
s : i ,
ms : r ,
Q : h
} [ t ] || String ( t || "" ) . toLowerCase ( ) . replace ( /s$/ , "" ) ;
} ,
u : function ( t ) {
return void 0 === t ;
}
} ,
D = "en" ,
v = { } ;
v [ D ] = M ;
var p = function ( t ) {
return t instanceof _ ;
} ,
S = function ( t , e , n ) {
var r ;
if ( ! t ) return D ;
if ( "string" == typeof t ) v [ t ] && ( r = t ) , e && ( v [ t ] = e , r = t ) ; else {
var i = t . name ;
v [ i ] = t , r = i ;
}
return ! n && r && ( D = r ) , r || ! n && D ;
} ,
w = function ( t , e ) {
if ( p ( t ) ) return t . clone ( ) ;
var n = "object" == typeof e ? e : { } ;
return n . date = t , n . args = arguments , new _ ( n ) ;
} ,
O = g ;
O . l = S , O . i = p , O . w = function ( t , e ) {
return w ( t , {
locale : e . $L ,
utc : e . $u ,
x : e . $x ,
$offset : e . $offset
} ) ;
} ;
var _ = function ( ) {
function M ( t ) {
this . $L = S ( t . locale , null , ! 0 ) , this . parse ( t ) ;
}
var m = M . prototype ;
return m . parse = function ( t ) {
this . $d = function ( t ) {
var e = t . date ,
n = t . utc ;
if ( null === e ) return new Date ( NaN ) ;
if ( O . u ( e ) ) return new Date ( ) ;
if ( e instanceof Date ) return new Date ( e ) ;
if ( "string" == typeof e && ! /Z$/i . test ( e ) ) {
var r = e . match ( l ) ;
if ( r ) {
var i = r [ 2 ] - 1 || 0 ,
s = ( r [ 7 ] || "0" ) . substring ( 0 , 3 ) ;
return n ? new Date ( Date . UTC ( r [ 1 ] , i , r [ 3 ] || 1 , r [ 4 ] || 0 , r [ 5 ] || 0 , r [ 6 ] || 0 , s ) ) : new Date ( r [ 1 ] , i , r [ 3 ] || 1 , r [ 4 ] || 0 , r [ 5 ] || 0 , r [ 6 ] || 0 , s ) ;
}
}
return new Date ( e ) ;
} ( t ) , this . $x = t . x || { } , this . init ( ) ;
} , m . init = function ( ) {
var t = this . $d ;
this . $y = t . getFullYear ( ) , this . $M = t . getMonth ( ) , this . $D = t . getDate ( ) , this . $W = t . getDay ( ) , this . $H = t . getHours ( ) , this . $m = t . getMinutes ( ) , this . $s = t . getSeconds ( ) , this . $ms = t . getMilliseconds ( ) ;
} , m . $utils = function ( ) {
return O ;
} , m . isValid = function ( ) {
return ! ( this . $d . toString ( ) === $ ) ;
} , m . isSame = function ( t , e ) {
var n = w ( t ) ;
return this . startOf ( e ) <= n && n <= this . endOf ( e ) ;
} , m . isAfter = function ( t , e ) {
return w ( t ) < this . startOf ( e ) ;
} , m . isBefore = function ( t , e ) {
return this . endOf ( e ) < w ( t ) ;
} , m . $g = function ( t , e , n ) {
return O . u ( t ) ? this [ e ] : this . set ( n , t ) ;
} , m . unix = function ( ) {
return Math . floor ( this . valueOf ( ) / 1e3 ) ;
} , m . valueOf = function ( ) {
return this . $d . getTime ( ) ;
} , m . startOf = function ( t , e ) {
var n = this ,
r = ! ! O . u ( e ) || e ,
h = O . p ( t ) ,
$ = function ( t , e ) {
var i = O . w ( n . $u ? Date . UTC ( n . $y , e , t ) : new Date ( n . $y , e , t ) , n ) ;
return r ? i : i . endOf ( a ) ;
} ,
l = function ( t , e ) {
return O . w ( n . toDate ( ) [ t ] . apply ( n . toDate ( "s" ) , ( r ? [ 0 , 0 , 0 , 0 ] : [ 23 , 59 , 59 , 999 ] ) . slice ( e ) ) , n ) ;
} ,
y = this . $W ,
M = this . $M ,
m = this . $D ,
g = "set" + ( this . $u ? "UTC" : "" ) ;
switch ( h ) {
case c :
return r ? $ ( 1 , 0 ) : $ ( 31 , 11 ) ;
case f :
return r ? $ ( 1 , M ) : $ ( 0 , M + 1 ) ;
case o :
var D = this . $locale ( ) . weekStart || 0 ,
v = ( y < D ? y + 7 : y ) - D ;
return $ ( r ? m - v : m + ( 6 - v ) , M ) ;
case a :
case d :
return l ( g + "Hours" , 0 ) ;
case u :
return l ( g + "Minutes" , 1 ) ;
case s :
return l ( g + "Seconds" , 2 ) ;
case i :
return l ( g + "Milliseconds" , 3 ) ;
default :
return this . clone ( ) ;
}
} , m . endOf = function ( t ) {
return this . startOf ( t , ! 1 ) ;
} , m . $set = function ( t , e ) {
var n ,
o = O . p ( t ) ,
h = "set" + ( this . $u ? "UTC" : "" ) ,
$ = ( n = { } , n [ a ] = h + "Date" , n [ d ] = h + "Date" , n [ f ] = h + "Month" , n [ c ] = h + "FullYear" , n [ u ] = h + "Hours" , n [ s ] = h + "Minutes" , n [ i ] = h + "Seconds" , n [ r ] = h + "Milliseconds" , n ) [ o ] ,
l = o === a ? this . $D + ( e - this . $W ) : e ;
if ( o === f || o === c ) {
var y = this . clone ( ) . set ( d , 1 ) ;
y . $d [ $ ] ( l ) , y . init ( ) , this . $d = y . set ( d , Math . min ( this . $D , y . daysInMonth ( ) ) ) . $d ;
} else $ && this . $d [ $ ] ( l ) ;
return this . init ( ) , this ;
} , m . set = function ( t , e ) {
return this . clone ( ) . $set ( t , e ) ;
} , m . get = function ( t ) {
return this [ O . p ( t ) ] ( ) ;
} , m . add = function ( r , h ) {
var d ,
$ = this ;
r = Number ( r ) ;
var l = O . p ( h ) ,
y = function ( t ) {
var e = w ( $ ) ;
return O . w ( e . date ( e . date ( ) + Math . round ( t * r ) ) , $ ) ;
} ;
if ( l === f ) return this . set ( f , this . $M + r ) ;
if ( l === c ) return this . set ( c , this . $y + r ) ;
if ( l === a ) return y ( 1 ) ;
if ( l === o ) return y ( 7 ) ;
var M = ( d = { } , d [ s ] = e , d [ u ] = n , d [ i ] = t , d ) [ l ] || 1 ,
m = this . $d . getTime ( ) + r * M ;
return O . w ( m , this ) ;
} , m . subtract = function ( t , e ) {
return this . add ( - 1 * t , e ) ;
} , m . format = function ( t ) {
var e = this ;
if ( ! this . isValid ( ) ) return $ ;
var n = t || "YYYY-MM-DDTHH:mm:ssZ" ,
r = O . z ( this ) ,
i = this . $locale ( ) ,
s = this . $H ,
u = this . $m ,
a = this . $M ,
o = i . weekdays ,
f = i . months ,
h = function ( t , r , i , s ) {
return t && ( t [ r ] || t ( e , n ) ) || i [ r ] . substr ( 0 , s ) ;
} ,
c = function ( t ) {
return O . s ( s % 12 || 12 , t , "0" ) ;
} ,
d = i . meridiem || function ( t , e , n ) {
var r = t < 12 ? "AM" : "PM" ;
return n ? r . toLowerCase ( ) : r ;
} ,
l = {
YY : String ( this . $y ) . slice ( - 2 ) ,
YYYY : this . $y ,
M : a + 1 ,
MM : O . s ( a + 1 , 2 , "0" ) ,
MMM : h ( i . monthsShort , a , f , 3 ) ,
MMMM : h ( f , a ) ,
D : this . $D ,
DD : O . s ( this . $D , 2 , "0" ) ,
d : String ( this . $W ) ,
dd : h ( i . weekdaysMin , this . $W , o , 2 ) ,
ddd : h ( i . weekdaysShort , this . $W , o , 3 ) ,
dddd : o [ this . $W ] ,
H : String ( s ) ,
HH : O . s ( s , 2 , "0" ) ,
h : c ( 1 ) ,
hh : c ( 2 ) ,
a : d ( s , u , ! 0 ) ,
A : d ( s , u , ! 1 ) ,
m : String ( u ) ,
mm : O . s ( u , 2 , "0" ) ,
s : String ( this . $s ) ,
ss : O . s ( this . $s , 2 , "0" ) ,
SSS : O . s ( this . $ms , 3 , "0" ) ,
Z : r
} ;
return n . replace ( y , function ( t , e ) {
return e || l [ t ] || r . replace ( ":" , "" ) ;
} ) ;
} , m . utcOffset = function ( ) {
return 15 * - Math . round ( this . $d . getTimezoneOffset ( ) / 15 ) ;
} , m . diff = function ( r , d , $ ) {
var l ,
y = O . p ( d ) ,
M = w ( r ) ,
m = ( M . utcOffset ( ) - this . utcOffset ( ) ) * e ,
g = this - M ,
D = O . m ( this , M ) ;
return D = ( l = { } , l [ c ] = D / 12 , l [ f ] = D , l [ h ] = D / 3 , l [ o ] = ( g - m ) / 6048e5 , l [ a ] = ( g - m ) / 864e5 , l [ u ] = g / n , l [ s ] = g / e , l [ i ] = g / t , l ) [ y ] || g , $ ? D : O . a ( D ) ;
} , m . daysInMonth = function ( ) {
return this . endOf ( f ) . $D ;
} , m . $locale = function ( ) {
return v [ this . $L ] ;
} , m . locale = function ( t , e ) {
if ( ! t ) return this . $L ;
var n = this . clone ( ) ,
r = S ( t , e , ! 0 ) ;
return r && ( n . $L = r ) , n ;
} , m . clone = function ( ) {
return O . w ( this . $d , this ) ;
} , m . toDate = function ( ) {
return new Date ( this . valueOf ( ) ) ;
} , m . toJSON = function ( ) {
return this . isValid ( ) ? this . toISOString ( ) : null ;
} , m . toISOString = function ( ) {
return this . $d . toISOString ( ) ;
} , m . toString = function ( ) {
return this . $d . toUTCString ( ) ;
} , M ;
} ( ) ,
b = _ . prototype ;
return w . prototype = b , [ [ "$ms" , r ] , [ "$s" , i ] , [ "$m" , s ] , [ "$H" , u ] , [ "$W" , a ] , [ "$M" , f ] , [ "$y" , c ] , [ "$D" , d ] ] . forEach ( function ( t ) {
b [ t [ 1 ] ] = function ( e ) {
return this . $g ( e , t [ 0 ] , t [ 1 ] ) ;
} ;
} ) , w . extend = function ( t , e ) {
return t . $i || ( t ( e , _ , w ) , t . $i = ! 0 ) , w ;
} , w . locale = S , w . isDayjs = p , w . unix = function ( t ) {
return w ( 1e3 * t ) ;
} , w . en = v [ D ] , w . Ls = v , w . p = { } , w ;
} ) ;
2020-11-04 22:59:32 +01:00
/***/ } ) ,
2021-08-27 18:14:41 +02:00
/***/ "./node_modules/dayjs/plugin/quarterOfYear.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / dayjs / plugin / quarterOfYear . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( module ) {
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
! function ( t , n ) {
true ? module . exports = n ( ) : 0 ;
} ( this , function ( ) {
"use strict" ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
var t = "month" ,
n = "quarter" ;
return function ( e , i ) {
var r = i . prototype ;
r . quarter = function ( t ) {
return this . $utils ( ) . u ( t ) ? Math . ceil ( ( this . month ( ) + 1 ) / 3 ) : this . month ( this . month ( ) % 3 + 3 * ( t - 1 ) ) ;
} ;
var s = r . add ;
r . add = function ( e , i ) {
return e = Number ( e ) , this . $utils ( ) . p ( i ) === n ? this . add ( 3 * e , t ) : s . bind ( this ) ( e , i ) ;
} ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
var u = r . startOf ;
r . startOf = function ( e , i ) {
var r = this . $utils ( ) ,
s = ! ! r . u ( i ) || i ;
if ( r . p ( e ) === n ) {
var o = this . quarter ( ) - 1 ;
return s ? this . month ( 3 * o ) . startOf ( t ) . startOf ( "day" ) : this . month ( 3 * o + 2 ) . endOf ( t ) . endOf ( "day" ) ;
}
return u . bind ( this ) ( e , i ) ;
} ;
} ;
} ) ;
2020-11-04 22:59:32 +01:00
/***/ } ) ,
2021-08-27 18:14:41 +02:00
/***/ "./src/debounce.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / debounce . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2020-11-04 22:59:32 +01:00
"use strict" ;
2021-08-27 18:14:41 +02:00
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , {
/* harmony export */ "debounce" : function ( ) { return /* binding */ debounce ; }
/* harmony export */ } ) ;
function debounce ( func , wait ) {
let timeout ;
return function executedFunction ( ... args ) {
const later = ( ) => {
clearTimeout ( timeout ) ;
func ( ... args ) ;
} ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
clearTimeout ( timeout ) ;
timeout = setTimeout ( later , wait ) ;
} ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
/***/ } ) ,
/***/ "./node_modules/css-loader/dist/cjs.js!./src/status.css" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / css - loader / dist / cjs . js ! . / src / status . css * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony import */ var _node _modules _css _loader _dist _runtime _cssWithMappingToString _js _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! ../node_modules/css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js" ) ;
/* harmony import */ var _node _modules _css _loader _dist _runtime _cssWithMappingToString _js _ _WEBPACK _IMPORTED _MODULE _0 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( _node _modules _css _loader _dist _runtime _cssWithMappingToString _js _ _WEBPACK _IMPORTED _MODULE _0 _ _ ) ;
/* harmony import */ var _node _modules _css _loader _dist _runtime _api _js _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( /*! ../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js" ) ;
/* harmony import */ var _node _modules _css _loader _dist _runtime _api _js _ _WEBPACK _IMPORTED _MODULE _1 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( _node _modules _css _loader _dist _runtime _api _js _ _WEBPACK _IMPORTED _MODULE _1 _ _ ) ;
// Imports
var _ _ _CSS _LOADER _EXPORT _ _ _ = _node _modules _css _loader _dist _runtime _api _js _ _WEBPACK _IMPORTED _MODULE _1 _ _ _default ( ) ( ( _node _modules _css _loader _dist _runtime _cssWithMappingToString _js _ _WEBPACK _IMPORTED _MODULE _0 _ _ _default ( ) ) ) ;
// Module
_ _ _CSS _LOADER _EXPORT _ _ _ . push ( [ module . id , ".tapi-dropdown {\n position: relative;\n display: inline-block;\n}\n\n.tapi-dropdown-content {\n display: none;\n position: absolute;\n min-width: 200px;\n overflow: auto;\n box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);\n z-index: 1;\n color: #000;\n}\n\n.show {\n display: block;\n}\n" , "" , { "version" : 3 , "sources" : [ "webpack://./src/status.css" ] , "names" : [ ] , "mappings" : "AAAA;IACI,kBAAkB;IAClB,qBAAqB;AACzB;;AAEA;IACI,aAAa;IACb,kBAAkB;IAClB,gBAAgB;IAChB,cAAc;IACd,4CAA4C;IAC5C,UAAU;IACV,WAAW;AACf;;AAEA;IACI,cAAc;AAClB" , "sourcesContent" : [ ".tapi-dropdown {\n position: relative;\n display: inline-block;\n}\n\n.tapi-dropdown-content {\n display: none;\n position: absolute;\n min-width: 200px;\n overflow: auto;\n box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);\n z-index: 1;\n color: #000;\n}\n\n.show {\n display: block;\n}\n" ] , "sourceRoot" : "" } ] ) ;
// Exports
/* harmony default export */ _ _webpack _exports _ _ [ "default" ] = ( _ _ _CSS _LOADER _EXPORT _ _ _ ) ;
2020-11-04 22:59:32 +01:00
/***/ } ) ,
2021-08-27 18:14:41 +02:00
/***/ "./src/status.css" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / status . css * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2020-11-04 22:59:32 +01:00
"use strict" ;
2021-08-27 18:14:41 +02:00
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony import */ var _node _modules _style _loader _dist _runtime _injectStylesIntoStyleTag _js _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! !../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js" ) ;
/* harmony import */ var _node _modules _style _loader _dist _runtime _injectStylesIntoStyleTag _js _ _WEBPACK _IMPORTED _MODULE _0 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( _node _modules _style _loader _dist _runtime _injectStylesIntoStyleTag _js _ _WEBPACK _IMPORTED _MODULE _0 _ _ ) ;
/* harmony import */ var _node _modules _css _loader _dist _cjs _js _status _css _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( /*! !!../node_modules/css-loader/dist/cjs.js!./status.css */ "./node_modules/css-loader/dist/cjs.js!./src/status.css" ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
var options = { } ;
options . insert = "head" ;
options . singleton = false ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
var update = _node _modules _style _loader _dist _runtime _injectStylesIntoStyleTag _js _ _WEBPACK _IMPORTED _MODULE _0 _ _ _default ( ) ( _node _modules _css _loader _dist _cjs _js _status _css _ _WEBPACK _IMPORTED _MODULE _1 _ _ . default , options ) ;
/* harmony default export */ _ _webpack _exports _ _ [ "default" ] = ( _node _modules _css _loader _dist _cjs _js _status _css _ _WEBPACK _IMPORTED _MODULE _1 _ _ . default . locals || { } ) ;
2020-11-04 22:59:32 +01:00
/***/ } ) ,
2021-08-27 18:14:41 +02:00
/***/ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / style - loader / dist / runtime / injectStylesIntoStyleTag . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2020-11-04 22:59:32 +01:00
"use strict" ;
2021-08-27 18:14:41 +02:00
var isOldIE = function isOldIE ( ) {
var memo ;
return function memorize ( ) {
if ( typeof memo === 'undefined' ) {
// Test for IE <= 9 as proposed by Browserhacks
// @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805
// Tests for existence of standard globals is to allow style-loader
// to operate correctly into non-standard environments
// @see https://github.com/webpack-contrib/style-loader/issues/177
memo = Boolean ( window && document && document . all && ! window . atob ) ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
return memo ;
} ;
} ( ) ;
var getTarget = function getTarget ( ) {
var memo = { } ;
return function memorize ( target ) {
if ( typeof memo [ target ] === 'undefined' ) {
var styleTarget = document . querySelector ( target ) ; // Special case to return head of iframe instead of iframe itself
if ( window . HTMLIFrameElement && styleTarget instanceof window . HTMLIFrameElement ) {
try {
// This will throw an exception if access to iframe is blocked
// due to cross-origin restrictions
styleTarget = styleTarget . contentDocument . head ;
} catch ( e ) {
// istanbul ignore next
styleTarget = null ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
memo [ target ] = styleTarget ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
return memo [ target ] ;
} ;
} ( ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
var stylesInDom = [ ] ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
function getIndexByIdentifier ( identifier ) {
var result = - 1 ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
for ( var i = 0 ; i < stylesInDom . length ; i ++ ) {
if ( stylesInDom [ i ] . identifier === identifier ) {
result = i ;
break ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
}
return result ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
function modulesToDom ( list , options ) {
var idCountMap = { } ;
var identifiers = [ ] ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
for ( var i = 0 ; i < list . length ; i ++ ) {
var item = list [ i ] ;
var id = options . base ? item [ 0 ] + options . base : item [ 0 ] ;
var count = idCountMap [ id ] || 0 ;
var identifier = "" . concat ( id , " " ) . concat ( count ) ;
idCountMap [ id ] = count + 1 ;
var index = getIndexByIdentifier ( identifier ) ;
var obj = {
css : item [ 1 ] ,
media : item [ 2 ] ,
sourceMap : item [ 3 ]
} ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
if ( index !== - 1 ) {
stylesInDom [ index ] . references ++ ;
stylesInDom [ index ] . updater ( obj ) ;
} else {
stylesInDom . push ( {
identifier : identifier ,
updater : addStyle ( obj , options ) ,
references : 1
} ) ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
identifiers . push ( identifier ) ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
return identifiers ;
2020-11-04 22:59:32 +01:00
}
2020-11-02 15:34:34 +01:00
2021-08-27 18:14:41 +02:00
function insertStyleElement ( options ) {
var style = document . createElement ( 'style' ) ;
var attributes = options . attributes || { } ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
if ( typeof attributes . nonce === 'undefined' ) {
var nonce = true ? _ _webpack _require _ _ . nc : 0 ;
if ( nonce ) {
attributes . nonce = nonce ;
}
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
Object . keys ( attributes ) . forEach ( function ( key ) {
style . setAttribute ( key , attributes [ key ] ) ;
} ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
if ( typeof options . insert === 'function' ) {
options . insert ( style ) ;
} else {
var target = getTarget ( options . insert || 'head' ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
if ( ! target ) {
throw new Error ( "Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid." ) ;
2020-11-02 15:34:34 +01:00
}
2021-08-27 18:14:41 +02:00
target . appendChild ( style ) ;
}
return style ;
2020-11-04 22:59:32 +01:00
}
2020-11-04 13:05:34 +01:00
2021-08-27 18:14:41 +02:00
function removeStyleElement ( style ) {
// istanbul ignore if
if ( style . parentNode === null ) {
return false ;
}
2020-11-04 13:05:34 +01:00
2021-08-27 18:14:41 +02:00
style . parentNode . removeChild ( style ) ;
}
/* istanbul ignore next */
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
var replaceText = function replaceText ( ) {
var textStore = [ ] ;
return function replace ( index , replacement ) {
textStore [ index ] = replacement ;
return textStore . filter ( Boolean ) . join ( '\n' ) ;
} ;
} ( ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
function applyToSingletonTag ( style , index , remove , obj ) {
var css = remove ? '' : obj . media ? "@media " . concat ( obj . media , " {" ) . concat ( obj . css , "}" ) : obj . css ; // For old IE
/* istanbul ignore if */
if ( style . styleSheet ) {
style . styleSheet . cssText = replaceText ( index , css ) ;
} else {
var cssNode = document . createTextNode ( css ) ;
var childNodes = style . childNodes ;
if ( childNodes [ index ] ) {
style . removeChild ( childNodes [ index ] ) ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
if ( childNodes . length ) {
style . insertBefore ( cssNode , childNodes [ index ] ) ;
} else {
style . appendChild ( cssNode ) ;
2020-11-04 13:05:34 +01:00
}
2021-08-27 18:14:41 +02:00
}
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
function applyToTag ( style , options , obj ) {
var css = obj . css ;
var media = obj . media ;
var sourceMap = obj . sourceMap ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
if ( media ) {
style . setAttribute ( 'media' , media ) ;
} else {
style . removeAttribute ( 'media' ) ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
if ( sourceMap && typeof btoa !== 'undefined' ) {
css += "\n/*# sourceMappingURL=data:application/json;base64," . concat ( btoa ( unescape ( encodeURIComponent ( JSON . stringify ( sourceMap ) ) ) ) , " */" ) ;
} // For old IE
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
/* istanbul ignore if */
2020-11-04 13:05:34 +01:00
2021-08-27 18:14:41 +02:00
if ( style . styleSheet ) {
style . styleSheet . cssText = css ;
} else {
while ( style . firstChild ) {
style . removeChild ( style . firstChild ) ;
2020-11-04 13:05:34 +01:00
}
2021-08-27 18:14:41 +02:00
style . appendChild ( document . createTextNode ( css ) ) ;
}
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
var singleton = null ;
var singletonCounter = 0 ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
function addStyle ( obj , options ) {
var style ;
var update ;
var remove ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
if ( options . singleton ) {
var styleIndex = singletonCounter ++ ;
style = singleton || ( singleton = insertStyleElement ( options ) ) ;
update = applyToSingletonTag . bind ( null , style , styleIndex , false ) ;
remove = applyToSingletonTag . bind ( null , style , styleIndex , true ) ;
} else {
style = insertStyleElement ( options ) ;
update = applyToTag . bind ( null , style , options ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
remove = function remove ( ) {
removeStyleElement ( style ) ;
} ;
}
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
update ( obj ) ;
return function updateStyle ( newObj ) {
if ( newObj ) {
if ( newObj . css === obj . css && newObj . media === obj . media && newObj . sourceMap === obj . sourceMap ) {
return ;
}
update ( obj = newObj ) ;
} else {
remove ( ) ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
} ;
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
module . exports = function ( list , options ) {
options = options || { } ; // Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
// tags it will allow on a page
if ( ! options . singleton && typeof options . singleton !== 'boolean' ) {
options . singleton = isOldIE ( ) ;
}
list = list || [ ] ;
var lastIdentifiers = modulesToDom ( list , options ) ;
return function update ( newList ) {
newList = newList || [ ] ;
if ( Object . prototype . toString . call ( newList ) !== '[object Array]' ) {
return ;
}
for ( var i = 0 ; i < lastIdentifiers . length ; i ++ ) {
var identifier = lastIdentifiers [ i ] ;
var index = getIndexByIdentifier ( identifier ) ;
stylesInDom [ index ] . references -- ;
}
var newLastIdentifiers = modulesToDom ( newList , options ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
for ( var _i = 0 ; _i < lastIdentifiers . length ; _i ++ ) {
var _identifier = lastIdentifiers [ _i ] ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
var _index = getIndexByIdentifier ( _identifier ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
if ( stylesInDom [ _index ] . references === 0 ) {
stylesInDom [ _index ] . updater ( ) ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
stylesInDom . splice ( _index , 1 ) ;
}
2020-11-04 22:59:32 +01:00
}
2021-08-27 18:14:41 +02:00
lastIdentifiers = newLastIdentifiers ;
} ;
} ;
2020-11-04 22:59:32 +01:00
/***/ } ) ,
2021-08-27 18:14:41 +02:00
/***/ "./src/call-history.ts" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / call - history . ts * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2020-11-04 22:59:32 +01:00
"use strict" ;
2021-08-27 18:14:41 +02:00
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , {
/* harmony export */ "CallHistory" : function ( ) { return /* binding */ CallHistory ; }
/* harmony export */ } ) ;
/* harmony import */ var chrono _node _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! chrono-node */ "./node_modules/chrono-node/dist/index.js" ) ;
/* harmony import */ var chrono _node _ _WEBPACK _IMPORTED _MODULE _0 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( chrono _node _ _WEBPACK _IMPORTED _MODULE _0 _ _ ) ;
/* harmony import */ var _utils _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( /*! ./utils */ "./src/utils.ts" ) ;
var _ _awaiter = ( undefined && undefined . _ _awaiter ) || function ( thisArg , _arguments , P , generator ) {
function adopt ( value ) { return value instanceof P ? value : new P ( function ( resolve ) { resolve ( value ) ; } ) ; }
return new ( P || ( P = Promise ) ) ( function ( resolve , reject ) {
function fulfilled ( value ) { try { step ( generator . next ( value ) ) ; } catch ( e ) { reject ( e ) ; } }
function rejected ( value ) { try { step ( generator [ "throw" ] ( value ) ) ; } catch ( e ) { reject ( e ) ; } }
function step ( result ) { result . done ? resolve ( result . value ) : adopt ( result . value ) . then ( fulfilled , rejected ) ; }
step ( ( generator = generator . apply ( thisArg , _arguments || [ ] ) ) . next ( ) ) ;
} ) ;
} ;
class CallHistory {
constructor ( ) {
this . callerIds = { } ;
}
updateCallHistoryEntry ( call , callerId ) {
var span = call . querySelector ( 'span' ) ;
this . showTimeManager ( call , span . nextSibling . textContent . trim ( ) , callerId ) ;
if ( callerId && callerId . tD _NAME !== '' ) {
var text = span . textContent ;
span . textContent = callerId . tD _NAME ;
var br = document . createElement ( 'br' ) ;
var span2 = document . createElement ( 'span' ) ;
span2 . style . fontSize = 'small' ;
span2 . textContent = text ;
span . parentNode . insertBefore ( br , span . nextSibling ) ;
span . parentNode . insertBefore ( span2 , span . nextSibling ) ;
}
}
showTimeManager ( call , date , callerId ) {
var dateParts = date . match ( /^(?<date>.*), (?<duration>[0-9]{2}:[0-9]{2}:[0-9]{2})$/ ) ;
var duration = '00:00:00' ;
if ( dateParts ) {
date = dateParts . groups . date ;
duration = dateParts . groups . duration ;
}
var parsedDate = chrono _node _ _WEBPACK _IMPORTED _MODULE _0 _ _ . de . parseDate ( date ) ;
if ( ! parsedDate ) {
parsedDate = chrono _node _ _WEBPACK _IMPORTED _MODULE _0 _ _ . parseDate ( date ) ;
}
if ( ! parsedDate ) {
return ;
}
// Date parsing is awful, just assume the first number is the day of month
var day = date . match ( /[0-9]+/ ) [ 0 ] ;
var parsedDuration = chrono _node _ _WEBPACK _IMPORTED _MODULE _0 _ _ . parseDate ( duration ) ;
console . log ( 'TAPI call history time:' , date , 'parsedDate:' , parsedDate , 'duration:' , duration , 'parsedDuration:' , parsedDuration ) ;
var connect = parsedDate . getFullYear ( ) . toString ( ) +
( parsedDate . getMonth ( ) + 1 ) . toString ( ) . padStart ( 2 , '0' ) + // (January gives 0)
day . toString ( ) . padStart ( 2 , '0' ) +
parsedDate . getHours ( ) . toString ( ) . padStart ( 2 , '0' ) +
parsedDate . getMinutes ( ) . toString ( ) . padStart ( 2 , '0' ) ;
var length = ( parsedDuration . getHours ( ) * 60 + parsedDuration . getMinutes ( ) ) . toString ( ) ;
var toolbar = call . querySelector ( '.wcToolbarTiles' ) ;
var href = 'domizil://PM/Zeitbuchung?' ;
if ( callerId && callerId . tD _ID ) {
href += 'KontaktId=' + callerId . tD _ID + '&' ;
}
href += 'connect=' + connect + '&length=' + length ;
var a = document . createElement ( 'a' ) ;
a . title = 'PM Zeitbuchung' ;
a . dataset . domizilLink = href ;
a . onclick = ( ) => {
window . open ( href ) ;
} ;
a . innerHTML = '<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 559.98 559.98" width="20" height="20">' +
'<g>' +
' <g>' +
' <path d="M279.99,0C125.601,0,0,125.601,0,279.99c0,154.39,125.601,279.99,279.99,279.99c154.39,0,279.99-125.601,279.99-279.99' +
' C559.98,125.601,434.38,0,279.99,0z M279.99,498.78c-120.644,0-218.79-98.146-218.79-218.79' +
' c0-120.638,98.146-218.79,218.79-218.79s218.79,98.152,218.79,218.79C498.78,400.634,400.634,498.78,279.99,498.78z"/>' +
' <path d="M304.226,280.326V162.976c0-13.103-10.618-23.721-23.716-23.721c-13.102,0-23.721,10.618-23.721,23.721v124.928' +
' c0,0.373,0.092,0.723,0.11,1.096c-0.312,6.45,1.91,12.999,6.836,17.926l88.343,88.336c9.266,9.266,24.284,9.266,33.543,0' +
' c9.26-9.266,9.266-24.284,0-33.544L304.226,280.326z"/>' +
' </g>' +
'</g>' +
'</svg>' ;
toolbar . insertBefore ( a , toolbar . firstChild ) ;
}
showCallHistory ( element ) {
return _ _awaiter ( this , void 0 , void 0 , function * ( ) {
var span = element . querySelector ( 'span' ) ;
var number = ( 0 , _utils _ _WEBPACK _IMPORTED _MODULE _1 _ _ . extractNumber ) ( span . textContent ) ;
if ( ! number ) {
this . updateCallHistoryEntry ( element , undefined ) ;
return ;
}
if ( this . callerIds [ number ] !== undefined ) {
this . updateCallHistoryEntry ( element , this . callerIds [ number ] ) ;
}
else {
var response = yield _utils _ _WEBPACK _IMPORTED _MODULE _1 _ _ . axios . get ( 'http://cpatapi.cpsrvweb2016.cp-austria.at/callerid/' + encodeURIComponent ( number ) ) ;
var callerId = { tD _NAME : '' } ;
if ( response . status === 200 ) {
callerId = response . data ;
}
console . log ( 'TAPI call histroy callerid response' , number , response , callerId ) ;
this . callerIds [ number ] = callerId ;
this . updateCallHistoryEntry ( element , callerId ) ;
}
} ) ;
}
}
2020-11-04 22:59:32 +01:00
/***/ } ) ,
2021-08-27 18:14:41 +02:00
/***/ "./src/call-notification.ts" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / call - notification . ts * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2020-11-04 22:59:32 +01:00
"use strict" ;
2021-08-27 18:14:41 +02:00
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , {
/* harmony export */ "CallNotification" : function ( ) { return /* binding */ CallNotification ; }
/* harmony export */ } ) ;
/* harmony import */ var _utils _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! ./utils */ "./src/utils.ts" ) ;
var _ _awaiter = ( undefined && undefined . _ _awaiter ) || function ( thisArg , _arguments , P , generator ) {
function adopt ( value ) { return value instanceof P ? value : new P ( function ( resolve ) { resolve ( value ) ; } ) ; }
return new ( P || ( P = Promise ) ) ( function ( resolve , reject ) {
function fulfilled ( value ) { try { step ( generator . next ( value ) ) ; } catch ( e ) { reject ( e ) ; } }
function rejected ( value ) { try { step ( generator [ "throw" ] ( value ) ) ; } catch ( e ) { reject ( e ) ; } }
function step ( result ) { result . done ? resolve ( result . value ) : adopt ( result . value ) . then ( fulfilled , rejected ) ; }
step ( ( generator = generator . apply ( thisArg , _arguments || [ ] ) ) . next ( ) ) ;
} ) ;
} ;
class CallNotification {
showCallNotification ( element ) {
return _ _awaiter ( this , void 0 , void 0 , function * ( ) {
var number = element . dataset . id ;
console . log ( 'TAPI call notification' , number ) ;
number = ( 0 , _utils _ _WEBPACK _IMPORTED _MODULE _0 _ _ . extractNumber ) ( number ) ;
if ( ! number ) {
console . log ( 'TAPI callerid no number found' ) ;
return ;
}
console . log ( 'TAPI searching callerid for' , number ) ;
var response = yield _utils _ _WEBPACK _IMPORTED _MODULE _0 _ _ . axios . get ( 'http://cpatapi.cpsrvweb2016.cp-austria.at/callerid/' + encodeURIComponent ( number ) ) ;
console . log ( 'TAPI callerid response' , response ) ;
var notification = {
text : number
} ;
if ( response . status === 200 ) {
var callerId = response . data ;
if ( callerId ) {
notification . text = callerId . tD _NAME + '\r\n' + number + ' (' + callerId . tD _MEDIUM + ')' ;
}
}
// eslint-disable-next-line no-undef
GM . notification ( notification ) ;
} ) ;
}
}
2020-11-04 22:59:32 +01:00
/***/ } ) ,
2021-08-27 18:14:41 +02:00
/***/ "./src/search.ts" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / search . ts * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2020-11-04 22:59:32 +01:00
"use strict" ;
2021-08-27 18:14:41 +02:00
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , {
/* harmony export */ "Search" : function ( ) { return /* binding */ Search ; }
/* harmony export */ } ) ;
/* harmony import */ var _debounce _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! ./debounce */ "./src/debounce.js" ) ;
/* harmony import */ var _utils _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( /*! ./utils */ "./src/utils.ts" ) ;
var _ _awaiter = ( undefined && undefined . _ _awaiter ) || function ( thisArg , _arguments , P , generator ) {
function adopt ( value ) { return value instanceof P ? value : new P ( function ( resolve ) { resolve ( value ) ; } ) ; }
return new ( P || ( P = Promise ) ) ( function ( resolve , reject ) {
function fulfilled ( value ) { try { step ( generator . next ( value ) ) ; } catch ( e ) { reject ( e ) ; } }
function rejected ( value ) { try { step ( generator [ "throw" ] ( value ) ) ; } catch ( e ) { reject ( e ) ; } }
function step ( result ) { result . done ? resolve ( result . value ) : adopt ( result . value ) . then ( fulfilled , rejected ) ; }
step ( ( generator = generator . apply ( thisArg , _arguments || [ ] ) ) . next ( ) ) ;
} ) ;
} ;
class Search {
constructor ( ) {
this . currentSearchText = '' ;
this . doSearch = ( 0 , _debounce _ _WEBPACK _IMPORTED _MODULE _0 _ _ . debounce ) ( ( ) => _ _awaiter ( this , void 0 , void 0 , function * ( ) {
var search = document . getElementById ( 'tapiSearchInput' ) ;
var searchText = search . value . trim ( ) ;
if ( searchText === '' ) {
this . removeSearchResults ( ) ;
return ;
}
else if ( searchText === this . currentSearchText ) {
return ;
}
console . log ( 'Searching TAPI' ) ;
var response = yield _utils _ _WEBPACK _IMPORTED _MODULE _1 _ _ . axios . get ( 'http://cpatapi.cpsrvweb2016.cp-austria.at/search?query=' + encodeURIComponent ( searchText ) ) ;
console . log ( 'TAPI Search response' , response ) ;
var contacts = response . data ;
console . log ( 'TAPI Contacts' , contacts ) ;
this . removeSearchResults ( ) ;
this . currentSearchText = searchText ;
var resultList = document . createElement ( 'ul' ) ;
resultList . id = 'tapiResults' ;
resultList . classList . add ( 'search-nav-absolute' ) ;
resultList . classList . add ( 'search-nav-ul' ) ;
document . getElementById ( 'tapiSearchBox' ) . appendChild ( resultList ) ;
resultList . innerHTML = '' ;
contacts . forEach ( contact => {
var li = document . createElement ( 'li' ) ;
li . classList . add ( 'tapi-search-result' ) ;
li . classList . add ( 'search-result' ) ;
li . classList . add ( 'pointer' ) ;
li . onmouseover = ( ) => { this . selectResult ( li ) ; } ;
li . dataset . tapiNumber = contact . tD _NUMBER _TAPI ;
li . onclick = ( ) => { this . dial ( contact . tD _NUMBER _TAPI ) ; } ;
li . style . listStyle = 'outside none none' ; // display: flex; align-items: center;
var resultText = document . createElement ( 'div' ) ;
resultText . classList . add ( 'search-result-txt' ) ;
li . appendChild ( resultText ) ;
var line1 = document . createElement ( 'div' ) ;
line1 . appendChild ( document . createTextNode ( contact . tD _NAME ) ) ;
resultText . appendChild ( line1 ) ;
var line2 = document . createElement ( 'div' ) ;
line2 . appendChild ( document . createTextNode ( contact . tD _MEDIUM + ': ' + contact . tD _NUMBER _TAPI ) ) ;
resultText . appendChild ( line2 ) ;
resultList . appendChild ( li ) ;
} ) ;
} ) , 200 ) ;
}
createSearchWindow ( element ) {
console . log ( 'Create TAPI Search' ) ;
var form = document . createElement ( 'form' ) ;
form . style . width = '200px' ;
form . style . float = 'right' ;
form . style . marginRight = '20px' ;
form . onsubmit = ( ) => {
var items = document . getElementsByClassName ( 'tapi-search-result-selected' ) ;
if ( items . length === 0 ) {
items = document . getElementsByClassName ( 'tapi-search-result' ) ;
}
if ( items . length > 0 ) {
this . dial ( items [ 0 ] . dataset . tapiNumber ) ;
}
return false ;
} ;
var searchBox = document . createElement ( 'div' ) ;
searchBox . classList . add ( 'contact-search-box' ) ;
searchBox . id = 'tapiSearchBox' ;
form . appendChild ( searchBox ) ;
var searchWrapper = document . createElement ( 'div' ) ;
searchWrapper . classList . add ( 'search-input-wrapper' ) ;
searchWrapper . style . position = 'relative' ;
searchBox . appendChild ( searchWrapper ) ;
var search = document . createElement ( 'input' ) ;
search . id = 'tapiSearchInput' ;
search . autocomplete = 'off' ;
search . classList . add ( 'padder' ) ;
search . classList . add ( 'rounded' ) ;
search . classList . add ( 'bg-light' ) ;
search . classList . add ( 'no-border' ) ;
search . classList . add ( 'contact-search-box' ) ;
search . placeholder = 'TAPI Suche' ;
search . onfocus = ( ) => { this . doSearch ( ) ; } ;
search . onkeydown = ( ev ) => { this . doSearchKeyDown ( ev ) ; } ;
search . onblur = ( ) => {
console . log ( 'TAPI Search exit' , this ) ;
setTimeout ( ( ) => {
console . log ( 'TAPI clear search results' ) ;
this . removeSearchResults ( ) ;
} , 500 ) ;
} ;
searchWrapper . appendChild ( search ) ;
var icon = document . createElement ( 'span' ) ;
icon . classList . add ( 'fa' ) ;
icon . classList . add ( 'fa-search' ) ;
icon . classList . add ( 'form-control-feedback' ) ;
icon . style . color = 'grey' ;
searchWrapper . appendChild ( icon ) ;
element . appendChild ( form ) ;
}
removeSearchResults ( ) {
var resultList = document . getElementById ( 'tapiResults' ) ;
if ( resultList ) {
resultList . parentNode . removeChild ( resultList ) ;
}
this . currentSearchText = '' ;
}
doSearchKeyDown ( ev ) {
if ( ev . key === 'ArrowUp' ) {
let items = document . getElementsByClassName ( 'tapi-search-result-selected' ) ;
if ( items . length > 0 ) {
var prev = items [ 0 ] . previousSibling ;
}
if ( ! prev ) {
items = document . getElementsByClassName ( 'tapi-search-result' ) ;
if ( items . length > 0 ) {
prev = items [ items . length - 1 ] ;
}
}
if ( prev ) {
this . selectResult ( prev ) ;
prev . scrollIntoView ( true ) ;
}
}
else if ( ev . key === 'ArrowDown' ) {
let items = document . getElementsByClassName ( 'tapi-search-result-selected' ) ;
if ( items . length > 0 ) {
var next = items [ 0 ] . nextSibling ;
}
if ( ! next ) {
items = document . getElementsByClassName ( 'tapi-search-result' ) ;
if ( items . length > 0 ) {
next = items [ 0 ] ;
}
}
if ( next ) {
this . selectResult ( next ) ;
next . scrollIntoView ( false ) ;
}
}
else {
this . doSearch ( ) ;
}
}
selectResult ( resultLi ) {
var items = document . getElementsByClassName ( 'tapi-search-result' ) ;
for ( var item of items ) {
item . classList . remove ( 'bg-light' ) ;
item . classList . remove ( 'tapi-search-result-selected' ) ;
}
resultLi . classList . add ( 'bg-light' ) ;
resultLi . classList . add ( 'tapi-search-result-selected' ) ;
}
dial ( number ) {
var searchInput = document . getElementsByName ( 'searchByNumberInput' ) ;
if ( searchInput . length > 0 ) {
searchInput [ 0 ] . value = number ;
searchInput [ 0 ] . focus ( ) ;
( 0 , _utils _ _WEBPACK _IMPORTED _MODULE _1 _ _ . fireChangeEvents ) ( searchInput [ 0 ] ) ;
}
}
}
2020-11-04 22:59:32 +01:00
/***/ } ) ,
2021-08-27 18:14:41 +02:00
/***/ "./src/status.ts" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / status . ts * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2020-11-04 22:59:32 +01:00
"use strict" ;
2021-08-27 18:14:41 +02:00
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , {
/* harmony export */ "Status" : function ( ) { return /* binding */ Status ; }
/* harmony export */ } ) ;
/* harmony import */ var _status _css _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! ./status.css */ "./src/status.css" ) ;
/* harmony import */ var _utils _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( /*! ./utils */ "./src/utils.ts" ) ;
var _ _awaiter = ( undefined && undefined . _ _awaiter ) || function ( thisArg , _arguments , P , generator ) {
function adopt ( value ) { return value instanceof P ? value : new P ( function ( resolve ) { resolve ( value ) ; } ) ; }
return new ( P || ( P = Promise ) ) ( function ( resolve , reject ) {
function fulfilled ( value ) { try { step ( generator . next ( value ) ) ; } catch ( e ) { reject ( e ) ; } }
function rejected ( value ) { try { step ( generator [ "throw" ] ( value ) ) ; } catch ( e ) { reject ( e ) ; } }
function step ( result ) { result . done ? resolve ( result . value ) : adopt ( result . value ) . then ( fulfilled , rejected ) ; }
step ( ( generator = generator . apply ( thisArg , _arguments || [ ] ) ) . next ( ) ) ;
} ) ;
} ;
class Status {
constructor ( ) {
this . _enabled = false ;
this . _statusOn = 'menuAvailable' ;
this . _statusOff = 'menuAway' ;
this . _currentStatus = undefined ;
}
showStatus ( element ) {
return _ _awaiter ( this , void 0 , void 0 , function * ( ) {
this . _user = yield GM . getValue ( 'tapi-zc-user' , '' ) ;
this . _enabled = yield GM . getValue ( 'tapi-zc-enabled' , false ) ;
this . _statusOn = yield GM . getValue ( 'tapi-zc-on' , 'menuAvailable' ) ;
this . _statusOff = yield GM . getValue ( 'tapi-zc-off' , 'menuAvailable' ) ;
console . log ( 'tapi-zc-user' , this . _user , 'tapi-zc-enabled' , this . _enabled , 'tapi-zc-on' , this . _statusOn , 'tapi-zc-off' , this . _statusOff ) ;
var div = document . createElement ( 'div' ) ;
div . classList . add ( 'tapi-dropdown' ) ;
var button = document . createElement ( 'button' ) ;
button . id = 'tapi-zc-button' ;
button . classList . add ( 'btn' ) ;
button . classList . add ( 'btn-default' ) ;
button . innerText = 'ZeitConsens' ;
button . onclick = ( ) => {
document . getElementById ( 'tapi-zc-dropdown' ) . classList . toggle ( 'show' ) ;
} ;
div . appendChild ( button ) ;
var html = '<div class="form-group">' +
' <label for="tapi-zc-user">Username</label>' +
' <input type="text" class="form-control" name="tapi-zc-user" id="tapi-zc-user">' +
'</div>' +
'<div class="form-group">' +
' <label for="tapi-zc-on">Signed in</label>' +
' <select id="tapi-zc-on" class="form-control">' +
' <option value="menuAvailable">Available</option>' +
' <option value="menuOutofoffice">Do Not Disturb</option>' +
' <option value="menuCustom1">Verfügbar DW</option>' +
' </select>' +
'</div>' +
'<div class="form-group">' +
' <label for="tapi-zc-off">Signed in</label>' +
' <select id="tapi-zc-off" class="form-control">' +
' <option value="menuAway">Away</option>' +
' <option value="menuOutofoffice">Do Not Disturb</option>' +
' </select>' +
'</div>' +
'<div class="checkbox">' +
' <label class="i-checks" for="tapi-zc-enabled">' +
' <input type="checkbox" id="tapi-zc-enabled">' +
' <i></i><span>Enabled</span>' +
'</label>' ;
'</div>' ;
var dropdown = document . createElement ( 'div' ) ;
dropdown . classList . add ( 'tapi-dropdown-content' ) ;
dropdown . classList . add ( 'panel-body' ) ;
dropdown . id = 'tapi-zc-dropdown' ;
dropdown . innerHTML = html ;
div . appendChild ( dropdown ) ;
element . insertBefore ( div , element . firstChild ) ;
var zcUser = document . getElementById ( 'tapi-zc-user' ) ;
zcUser . value = this . _user ;
zcUser . onchange = ( ) => {
this . _user = zcUser . value ;
GM . setValue ( 'tapi-zc-user' , this . _user ) ;
console . log ( 'tapi-zc-user' , this . _user ) ;
this . _currentStatus = undefined ;
} ;
var zcEnabled = document . getElementById ( 'tapi-zc-enabled' ) ;
zcEnabled . checked = this . _enabled ;
zcEnabled . onchange = ( ) => {
this . _enabled = zcEnabled . checked ;
GM . setValue ( 'tapi-zc-enabled' , this . _enabled ) ;
console . log ( 'tapi-zc-enabled' , this . _enabled ) ;
this . _currentStatus = undefined ;
this . checkStatus ( ) ;
} ;
var zcOn = document . getElementById ( 'tapi-zc-on' ) ;
zcOn . value = this . _statusOn ;
zcOn . onchange = ( ) => {
this . _statusOn = zcOn . value ;
GM . setValue ( 'tapi-zc-on' , this . _statusOn ) ;
console . log ( 'tapi-zc-on' , this . _statusOn ) ;
this . _currentStatus = undefined ;
} ;
var zcOff = document . getElementById ( 'tapi-zc-off' ) ;
zcOff . value = this . _statusOff ;
zcOff . onchange = ( ) => {
this . _statusOff = zcOff . value ;
GM . setValue ( 'tapi-zc-off' , this . _statusOff ) ;
console . log ( 'tapi-zc-off' , this . _statusOff ) ;
this . _currentStatus = undefined ;
} ;
this . checkStatus ( ) ;
} ) ;
}
checkStatus ( ) {
return _ _awaiter ( this , void 0 , void 0 , function * ( ) {
if ( this . _enabled ) {
var response = yield _utils _ _WEBPACK _IMPORTED _MODULE _1 _ _ . axios . get ( 'http://cpatapi.cpsrvweb2016.cp-austria.at/availability/' + encodeURIComponent ( this . _user ) ) ;
if ( response . status == 200 ) {
var status = response . data ;
if ( this . _currentStatus !== status . loggedIn ) {
this . _currentStatus = status . loggedIn ;
console . log ( 'New status, loggedIn' , this . _currentStatus ) ;
document . getElementsByClassName ( "current-status" ) [ 0 ] . click ( ) ;
setTimeout ( ( ) => {
var statusId = this . _currentStatus ? this . _statusOn : this . _statusOff ;
document . getElementById ( statusId ) . click ( ) ;
} , 1000 ) ;
}
}
setTimeout ( ( ) => this . checkStatus ( ) , 10000 ) ;
}
} ) ;
}
}
2020-11-04 22:59:32 +01:00
/***/ } ) ,
2021-08-27 18:14:41 +02:00
/***/ "./src/utils.ts" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / utils . ts * * * !
\ * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2020-11-04 22:59:32 +01:00
"use strict" ;
2021-08-27 18:14:41 +02:00
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , {
/* harmony export */ "axios" : function ( ) { return /* reexport default from dynamic */ axios _ _WEBPACK _IMPORTED _MODULE _0 _ _ _default . a ; } ,
/* harmony export */ "extractNumber" : function ( ) { return /* binding */ extractNumber ; } ,
/* harmony export */ "fireChangeEvents" : function ( ) { return /* binding */ fireChangeEvents ; }
/* harmony export */ } ) ;
/* harmony import */ var axios _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! axios */ "axios" ) ;
/* harmony import */ var axios _ _WEBPACK _IMPORTED _MODULE _0 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( axios _ _WEBPACK _IMPORTED _MODULE _0 _ _ ) ;
/* harmony import */ var axios _userscript _adapter _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( /*! axios-userscript-adapter */ "axios-userscript-adapter" ) ;
/* harmony import */ var axios _userscript _adapter _ _WEBPACK _IMPORTED _MODULE _1 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( axios _userscript _adapter _ _WEBPACK _IMPORTED _MODULE _1 _ _ ) ;
/ * *
* @ typedef { Object } AxiosResponse
* @ property { Object } data
* @ property { Object } headers
* @ property { Object } config
* @ property { Object } request
* @ property { number } code
* @ property { string } statusText
* /
/ * *
* @ typedef { Object } AxiosError
* @ property { AxiosResponse } response
* /
( axios _ _WEBPACK _IMPORTED _MODULE _0 _ _ _default ( ) . defaults . adapter ) = ( axios _userscript _adapter _ _WEBPACK _IMPORTED _MODULE _1 _ _ _default ( ) ) ;
function extractNumber ( s ) {
var match = /(\+?[0-9]{4,})/ . exec ( s ) ;
if ( ! match ) {
return undefined ;
}
var number = match [ 1 ] ;
if ( number . startsWith ( '+' ) ) {
number = number . replace ( '+' , '00' ) ;
}
return number ;
}
function fireChangeEvents ( element ) {
var changeEvent = null ;
changeEvent = document . createEvent ( 'HTMLEvents' ) ;
changeEvent . initEvent ( 'input' , true , true ) ;
element . dispatchEvent ( changeEvent ) ;
console . debug ( 'input event dispatched for element: ' + element . id ) ;
changeEvent = document . createEvent ( 'HTMLEvents' ) ;
changeEvent . initEvent ( 'keyup' , true , true ) ;
element . dispatchEvent ( changeEvent ) ;
console . debug ( 'keyup event dispatched for element: ' + element . id ) ;
changeEvent = document . createEvent ( 'HTMLEvents' ) ;
changeEvent . initEvent ( 'change' , true , true ) ;
element . dispatchEvent ( changeEvent ) ;
console . debug ( 'change event dispatched for element: ' + element . id ) ;
}
2020-11-04 22:59:32 +01:00
/***/ } ) ,
2021-08-27 18:14:41 +02:00
/***/ "axios" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * external "axios" * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( module ) {
2020-11-04 22:59:32 +01:00
"use strict" ;
2021-08-27 18:14:41 +02:00
module . exports = axios ;
2020-11-04 22:59:32 +01:00
/***/ } ) ,
2021-08-27 18:14:41 +02:00
/***/ "axios-userscript-adapter" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * external "axiosGmxhrAdapter" * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( module ) {
2020-11-04 22:59:32 +01:00
"use strict" ;
2021-08-27 18:14:41 +02:00
module . exports = axiosGmxhrAdapter ;
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
/***/ } )
2020-11-04 13:05:34 +01:00
2021-08-27 18:14:41 +02:00
/******/ } ) ;
/************************************************************************/
/******/ // The module cache
/******/ var _ _webpack _module _cache _ _ = { } ;
/******/
/******/ // The require function
/******/ function _ _webpack _require _ _ ( moduleId ) {
/******/ // Check if module is in cache
/******/ var cachedModule = _ _webpack _module _cache _ _ [ moduleId ] ;
/******/ if ( cachedModule !== undefined ) {
/******/ return cachedModule . exports ;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = _ _webpack _module _cache _ _ [ moduleId ] = {
/******/ id : moduleId ,
/******/ // no module.loaded needed
/******/ exports : { }
/******/ } ;
/******/
/******/ // Execute the module function
/******/ _ _webpack _modules _ _ [ moduleId ] . call ( module . exports , module , module . exports , _ _webpack _require _ _ ) ;
/******/
/******/ // Return the exports of the module
/******/ return module . exports ;
/******/ }
/******/
/************************************************************************/
/******/ /* webpack/runtime/compat get default export */
/******/ ! function ( ) {
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ _ _webpack _require _ _ . n = function ( module ) {
/******/ var getter = module && module . _ _esModule ?
/******/ function ( ) { return module [ 'default' ] ; } :
/******/ function ( ) { return module ; } ;
/******/ _ _webpack _require _ _ . d ( getter , { a : getter } ) ;
/******/ return getter ;
/******/ } ;
/******/ } ( ) ;
/******/
/******/ /* webpack/runtime/define property getters */
/******/ ! function ( ) {
/******/ // define getter functions for harmony exports
/******/ _ _webpack _require _ _ . d = function ( exports , definition ) {
/******/ for ( var key in definition ) {
/******/ if ( _ _webpack _require _ _ . o ( definition , key ) && ! _ _webpack _require _ _ . o ( exports , key ) ) {
/******/ Object . defineProperty ( exports , key , { enumerable : true , get : definition [ key ] } ) ;
/******/ }
/******/ }
/******/ } ;
/******/ } ( ) ;
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ ! function ( ) {
/******/ _ _webpack _require _ _ . o = function ( obj , prop ) { return Object . prototype . hasOwnProperty . call ( obj , prop ) ; }
/******/ } ( ) ;
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ ! function ( ) {
/******/ // define __esModule on exports
/******/ _ _webpack _require _ _ . r = function ( exports ) {
/******/ if ( typeof Symbol !== 'undefined' && Symbol . toStringTag ) {
/******/ Object . defineProperty ( exports , Symbol . toStringTag , { value : 'Module' } ) ;
/******/ }
/******/ Object . defineProperty ( exports , '__esModule' , { value : true } ) ;
/******/ } ;
/******/ } ( ) ;
/******/
/************************************************************************/
var _ _webpack _exports _ _ = { } ;
// This entry need to be wrapped in an IIFE because it need to be in strict mode.
! function ( ) {
2020-11-04 22:59:32 +01:00
"use strict" ;
2021-08-27 18:14:41 +02:00
/ * ! * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / index . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * /
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony import */ var chrono _node _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! chrono-node */ "./node_modules/chrono-node/dist/index.js" ) ;
/* harmony import */ var chrono _node _ _WEBPACK _IMPORTED _MODULE _0 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( chrono _node _ _WEBPACK _IMPORTED _MODULE _0 _ _ ) ;
/* harmony import */ var _call _history _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( /*! ./call-history */ "./src/call-history.ts" ) ;
/* harmony import */ var _call _notification _ _WEBPACK _IMPORTED _MODULE _2 _ _ = _ _webpack _require _ _ ( /*! ./call-notification */ "./src/call-notification.ts" ) ;
/* harmony import */ var _search _ _WEBPACK _IMPORTED _MODULE _3 _ _ = _ _webpack _require _ _ ( /*! ./search */ "./src/search.ts" ) ;
/* harmony import */ var _status _ _WEBPACK _IMPORTED _MODULE _4 _ _ = _ _webpack _require _ _ ( /*! ./status */ "./src/status.ts" ) ;
// eslint-disable-next-line @typescript-eslint/no-unused-vars
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
console . log ( 'script start' ) ;
const search = new _search _ _WEBPACK _IMPORTED _MODULE _3 _ _ . Search ( ) ; // eslint-disable-next-line no-undef
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
waitForKeyElements ( 'div.nav-search' , element => {
search . createSearchWindow ( element ) ;
} , true ) ;
const callNotification = new _call _notification _ _WEBPACK _IMPORTED _MODULE _2 _ _ . CallNotification ( ) ; // eslint-disable-next-line no-undef
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
waitForKeyElements ( 'call-view' , element => {
callNotification . showCallNotification ( element ) ;
} , false ) ;
const callHistory = new _call _history _ _WEBPACK _IMPORTED _MODULE _1 _ _ . CallHistory ( ) ; // eslint-disable-next-line no-undef
2020-11-04 22:59:32 +01:00
2021-08-27 18:14:41 +02:00
waitForKeyElements ( '.call-history-list call' , element => {
callHistory . showCallHistory ( element ) ;
} , false ) ;
const status = new _status _ _WEBPACK _IMPORTED _MODULE _4 _ _ . Status ( ) ; // eslint-disable-next-line no-undef
2020-10-19 18:04:01 +02:00
2021-08-27 18:14:41 +02:00
waitForKeyElements ( '#status-change' , element => {
status . showStatus ( element ) ;
} , false ) ;
} ( ) ;
/******/ } ) ( )
;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8zY3AtdGFwaS8uL25vZGVfbW9kdWxlcy9jaHJvbm8tbm9kZS9kaXN0L2NhbGN1bGF0aW9uL21lcmdpbmdDYWxjdWxhdGlvbi5qcyIsIndlYnBhY2s6Ly8zY3AtdGFwaS8uL25vZGVfbW9kdWxlcy9jaHJvbm8tbm9kZS9kaXN0L2NhbGN1bGF0aW9uL3dlZWtzLmpzIiwid2VicGFjazovLzNjcC10YXBpLy4vbm9kZV9tb2R1bGVzL2Nocm9uby1ub2RlL2Rpc3QvY2FsY3VsYXRpb24veWVhcnMuanMiLCJ3ZWJwYWNrOi8vM2NwLXRhcGkvLi9ub2RlX21vZHVsZXMvY2hyb25vLW5vZGUvZGlzdC9jaHJvbm8uanMiLCJ3ZWJwYWNrOi8vM2NwLXRhcGkvLi9ub2RlX21vZHVsZXMvY2hyb25vLW5vZGUvZGlzdC9jb21tb24vYWJzdHJhY3RSZWZpbmVycy5qcyIsIndlYnBhY2s6Ly8zY3AtdGFwaS8uL25vZGVfbW9kdWxlcy9jaHJvbm8tbm9kZS9kaXN0L2NvbW1vbi9jYXN1YWxSZWZlcmVuY2VzLmpzIiwid2VicGFjazovLzNjcC10YXBpLy4vbm9kZV9tb2R1bGVzL2Nocm9uby1ub2RlL2Rpc3QvY29tbW9uL3BhcnNlcnMvQWJzdHJhY3RQYXJzZXJXaXRoV29yZEJvdW5kYXJ5LmpzIiwid2VicGFjazovLzNjcC10YXBpLy4vbm9kZV9tb2R1bGVzL2Nocm9uby1ub2RlL2Rpc3QvY29tbW9uL3BhcnNlcnMvQWJzdHJhY3RUaW1lRXhwcmVzc2lvblBhcnNlci5qcyIsIndlYnBhY2s6Ly8zY3AtdGFwaS8uL25vZGVfbW9kdWxlcy9jaHJvbm8tbm9kZS9kaXN0L2NvbW1vbi9wYXJzZXJzL0lTT0Zvcm1hdFBhcnNlci5qcyIsIndlYnBhY2s6Ly8zY3AtdGFwaS8uL25vZGVfbW9kdWxlcy9jaHJvbm8tbm9kZS9kaXN0L2NvbW1vbi9wYXJzZXJzL1NsYXNoRGF0ZUZvcm1hdFBhcnNlci5qcyIsIndlYnBhY2s6Ly8zY3AtdGFwaS8uL25vZGVfbW9kdWxlcy9jaHJvbm8tbm9kZS9kaXN0L2NvbW1vbi9yZWZpbmVycy9BYnN0cmFjdE1lcmdlRGF0ZVJhbmdlUmVmaW5lci5qcyIsIndlYnBhY2s6Ly8zY3AtdGFwaS8uL25vZGVfbW9kdWxlcy9jaHJvbm8tbm9kZS9kaXN0L2NvbW1vbi9yZWZpbmVycy9BYnN0cmFjdE1lcmdlRGF0ZVRpbWVSZWZpbmVyLmpzIiwid2VicGFjazovLzNjcC10YXBpLy4vbm9kZV9tb2R1bGVzL2Nocm9uby1ub2RlL2Rpc3QvY29tbW9uL3JlZmluZXJzL0V4dHJhY3RUaW1lem9uZUFiYnJSZWZpbmVyLmpzIiwid2VicGFjazovLzNjcC10YXBpLy4vbm9kZV9tb2R1bGVzL2Nocm9uby1ub2RlL2Rpc3QvY29tbW9uL3JlZmluZXJzL0V4dHJhY3RUaW1lem9uZU9mZnNldFJlZmluZXIuanMiLCJ3ZWJwYWNrOi8vM2NwLXRhcGkvLi9ub2RlX21vZHVsZXMvY2hyb25vLW5vZGUvZGlzdC9jb21tb24vcmVmaW5lcnMvRm9yd2FyZERhdGVSZWZpbmVyLmpzIiwid2VicGFjazovLzNjcC10YXBpLy4vbm9kZV9tb2R1bGVzL2Nocm9uby1ub2RlL2Rpc3QvY29tbW9uL3JlZmluZXJzL01lcmdlV2Vla2RheUNvbXBvbmVudFJlZmluZXIuanMiLCJ3ZWJwYWNrOi8vM2NwLXRhcGkvLi9ub2RlX21vZHVsZXMvY2hyb25vLW5vZGUvZGlzdC9jb21tb24vcmVmaW5lcnMvT3ZlcmxhcFJlbW92YWxSZWZpbmVyLmpzIiwid2VicGFjazovLzNjcC10YXBpLy4vbm9kZV9tb2R1bGVzL2Nocm9uby1ub2RlL2Rpc3QvY29tbW9uL3JlZmluZXJzL1VubGlrZWx5Rm9ybWF0RmlsdGVyLmpzIiwid2VicGFjazovLzNjcC10YXBpLy4vbm9kZV9tb2R1bGVzL2Nocm9uby1ub2RlL2Rpc3QvY29uZmlndXJhdGlvbnMuanMiLCJ3ZWJwYWNrOi8vM2NwLXRhcGkvLi9ub2RlX21vZHVsZXMvY2hyb25vLW5vZGUvZGlzdC9pbmRleC5qcyIsIndlYnBhY2s6Ly8zY3AtdGFwaS8uL25vZGVfbW9kdWxlcy9jaHJvbm8tbm9kZS9kaXN0L2xvY2FsZXMvZGUvY29uc3RhbnRzLmpzIiwid2VicGFjazovLzNjcC10YXBpLy4vbm9kZV9tb2R1bGVzL2Nocm9uby1ub2RlL2Rpc3QvbG9jYWxlcy9kZS9pbmRleC5qcyIsIndlYnBhY2s6Ly8zY3AtdGFwaS8uL25vZGVfbW9kdWxlcy9jaHJvbm8tbm9kZS9kaXN0L2xvY2FsZXMvZGUvcGFyc2Vycy9ERUNhc3VhbERhdGVQYXJzZXIuanMiLCJ3ZWJwYWNrOi8vM2NwLXRhcGkvLi9ub2RlX21vZHVsZXMvY2hyb25vLW5vZGUvZGlzdC9sb2NhbGVzL2RlL3BhcnNlcnMvREVDYXN1YWxUaW1lUGFyc2VyLmpzIiwid2VicGFjazovLzNjcC10YXBpLy4vbm9kZV9tb2R1bGVzL2Nocm9uby1ub2RlL2Rpc3QvbG9jYWxlcy9kZS9wYXJzZXJzL0RFTW9udGhOYW1lTGl0dGxlRW5kaWFuUGFyc2VyLmpzIiwid2VicGFjazovLzNjcC10YXBpLy4vbm9kZV9tb2R1bGVzL2Nocm9uby1ub2RlL2Rpc3QvbG9jYWxlcy9kZS9wYXJzZXJzL0RFVGltZUV4cHJlc3Npb25QYXJzZXIuanMiLCJ3ZWJwYWNrOi8vM2NwLXRhcGkvLi9ub2RlX21vZHVsZXMvY2hyb25vLW5vZGUvZGlzdC9sb2NhbGVzL2RlL3BhcnNlcnMvREVXZWVrZGF5UGFyc2VyLmpzIiwid2VicGFjazovLzNjcC10YXBpLy4vbm9kZV9tb2R1bGVzL2Nocm9uby1ub2RlL2Rpc3QvbG9jYWxlcy9kZS9yZWZpbmVycy9ERU1lcmdlRGF0ZVJhbmdlUmVmaW5lci5qcyIsIndlYnBhY2s6Ly8zY3AtdGFwaS8uL25vZGVfbW9kdWxlcy9jaHJvbm8tbm9kZS9kaXN0L2xvY2FsZXMvZGUvcmVmaW5lcnMvREVNZXJnZURhdGVUaW1lUmVmaW5lci5qcyIsIndlYnBhY2s6Ly8zY3AtdGFwaS8uL25vZGVfbW9kdWxlcy9jaHJvbm8tbm9kZS9kaXN0L2xvY2FsZXMvZW4vY29uc3RhbnRzLmpzIiwid2VicGFjazovLzNjcC10YXBpLy4vbm9kZV9tb2R1bGVzL2Nocm9uby1ub2RlL2Rpc3QvbG9jYWxlcy9lbi9pbmRleC5qcyIsIndlYnBhY2s6Ly8zY3AtdGFwaS8uL25vZGVfbW9kdWxlcy9jaHJvbm8tbm9kZS9kaXN0L2xvY2FsZXMvZW4vcGFyc2Vycy9FTkNhc3VhbERhdGVQYXJzZXIuanMiLCJ3ZWJwYWNrOi8vM2NwLXRhcGkvLi9ub2RlX21vZHVsZXMvY2hyb25vLW5vZGUvZGlzdC9sb2NhbGVzL2VuL3BhcnNlcnMvRU5DYXN1YWxUaW1lUGFyc2VyLmpzIiwid2VicGFjazovLzNjcC10YXBpLy4vbm9kZV9tb2R1bGVzL2Nocm9uby1ub2RlL2Rpc3QvbG9jYWxlcy9lbi9wYXJzZXJzL0VOQ2F