\n */\n\"use strict\";\n\nvar MoveTo = function () {\n /**\n * Defaults\n * @type {object}\n */\n var defaults = {\n tolerance: 0,\n duration: 800,\n easing: 'easeOutQuart',\n container: window,\n callback: function callback() {}\n };\n /**\n * easeOutQuart Easing Function\n * @param {number} t - current time\n * @param {number} b - start value\n * @param {number} c - change in value\n * @param {number} d - duration\n * @return {number} - calculated value\n */\n\n function easeOutQuart(t, b, c, d) {\n t /= d;\n t--;\n return -c * (t * t * t * t - 1) + b;\n }\n /**\n * Merge two object\n *\n * @param {object} obj1\n * @param {object} obj2\n * @return {object} merged object\n */\n\n\n function mergeObject(obj1, obj2) {\n var obj3 = {};\n Object.keys(obj1).forEach(function (propertyName) {\n obj3[propertyName] = obj1[propertyName];\n });\n Object.keys(obj2).forEach(function (propertyName) {\n obj3[propertyName] = obj2[propertyName];\n });\n return obj3;\n }\n\n ;\n /**\n * Converts camel case to kebab case\n * @param {string} val the value to be converted\n * @return {string} the converted value\n */\n\n function kebabCase(val) {\n return val.replace(/([A-Z])/g, function ($1) {\n return '-' + $1.toLowerCase();\n });\n }\n\n ;\n /**\n * Count a number of item scrolled top\n * @param {Window|HTMLElement} container\n * @return {number}\n */\n\n function countScrollTop(container) {\n if (container instanceof HTMLElement) {\n return container.scrollTop;\n }\n\n return container.pageYOffset;\n }\n\n ;\n /**\n * MoveTo Constructor\n * @param {object} options Options\n * @param {object} easeFunctions Custom ease functions\n */\n\n function MoveTo() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var easeFunctions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n this.options = mergeObject(defaults, options);\n this.easeFunctions = mergeObject({\n easeOutQuart: easeOutQuart\n }, easeFunctions);\n }\n /**\n * Register a dom element as trigger\n * @param {HTMLElement} dom Dom trigger element\n * @param {function} callback Callback function\n * @return {function|void} unregister function\n */\n\n\n MoveTo.prototype.registerTrigger = function (dom, callback) {\n var _this = this;\n\n if (!dom) {\n return;\n }\n\n var href = dom.getAttribute('href') || dom.getAttribute('data-target'); // The element to be scrolled\n\n var target = href && href !== '#' ? document.getElementById(href.substring(1)) : document.body;\n var options = mergeObject(this.options, _getOptionsFromTriggerDom(dom, this.options));\n\n if (typeof callback === 'function') {\n options.callback = callback;\n }\n\n var listener = function listener(e) {\n e.preventDefault();\n\n _this.move(target, options);\n };\n\n dom.addEventListener('click', listener, false);\n return function () {\n return dom.removeEventListener('click', listener, false);\n };\n };\n /**\n * Move\n * Scrolls to given element by using easeOutQuart function\n * @param {HTMLElement|number} target Target element to be scrolled or target position\n * @param {object} options Custom options\n */\n\n\n MoveTo.prototype.move = function (target) {\n var _this2 = this;\n\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n if (target !== 0 && !target) {\n return;\n }\n\n options = mergeObject(this.options, options);\n var distance = typeof target === 'number' ? target : target.getBoundingClientRect().top;\n var from = countScrollTop(options.container);\n var startTime = null;\n var lastYOffset;\n distance -= options.tolerance; // rAF loop\n\n var loop = function loop(currentTime) {\n var currentYOffset = countScrollTop(_this2.options.container);\n\n if (!startTime) {\n // To starts time from 1, we subtracted 1 from current time\n // If time starts from 1 The first loop will not do anything,\n // because easing value will be zero\n startTime = currentTime - 1;\n }\n\n var timeElapsed = currentTime - startTime;\n\n if (lastYOffset) {\n if (distance > 0 && lastYOffset > currentYOffset || distance < 0 && lastYOffset < currentYOffset) {\n return options.callback(target);\n }\n }\n\n lastYOffset = currentYOffset;\n\n var val = _this2.easeFunctions[options.easing](timeElapsed, from, distance, options.duration);\n\n options.container.scroll(0, val);\n\n if (timeElapsed < options.duration) {\n window.requestAnimationFrame(loop);\n } else {\n options.container.scroll(0, distance + from);\n options.callback(target);\n }\n };\n\n window.requestAnimationFrame(loop);\n };\n /**\n * Adds custom ease function\n * @param {string} name Ease function name\n * @param {function} fn Ease function\n */\n\n\n MoveTo.prototype.addEaseFunction = function (name, fn) {\n this.easeFunctions[name] = fn;\n };\n /**\n * Returns options which created from trigger dom element\n * @param {HTMLElement} dom Trigger dom element\n * @param {object} options The instance's options\n * @return {object} The options which created from trigger dom element\n */\n\n\n function _getOptionsFromTriggerDom(dom, options) {\n var domOptions = {};\n Object.keys(options).forEach(function (key) {\n var value = dom.getAttribute(\"data-mt-\".concat(kebabCase(key)));\n\n if (value) {\n domOptions[key] = isNaN(value) ? value : parseInt(value, 10);\n }\n });\n return domOptions;\n }\n\n return MoveTo;\n}();\n\nif (typeof module !== 'undefined') {\n module.exports = MoveTo;\n} else {\n window.MoveTo = MoveTo;\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n(function webpackUniversalModuleDefinition(root, factory) {\n if ((typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && (typeof module === \"undefined\" ? \"undefined\" : _typeof(module)) === 'object') module.exports = factory();else if (typeof define === 'function' && define.amd) define([], factory);else if ((typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object') exports[\"chrono\"] = factory();else root[\"chrono\"] = factory();\n})(this, function () {\n return (\n /******/\n function (modules) {\n // webpackBootstrap\n\n /******/\n // The module cache\n\n /******/\n var installedModules = {};\n /******/\n\n /******/\n // The require function\n\n /******/\n\n function __webpack_require__(moduleId) {\n /******/\n\n /******/\n // Check if module is in cache\n\n /******/\n if (installedModules[moduleId]) {\n /******/\n return installedModules[moduleId].exports;\n /******/\n }\n /******/\n // Create a new module (and put it into the cache)\n\n /******/\n\n\n var module = installedModules[moduleId] = {\n /******/\n i: moduleId,\n\n /******/\n l: false,\n\n /******/\n exports: {}\n /******/\n\n };\n /******/\n\n /******/\n // Execute the module function\n\n /******/\n\n modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n /******/\n\n /******/\n // Flag the module as loaded\n\n /******/\n\n module.l = true;\n /******/\n\n /******/\n // Return the exports of the module\n\n /******/\n\n return module.exports;\n /******/\n }\n /******/\n\n /******/\n\n /******/\n // expose the modules object (__webpack_modules__)\n\n /******/\n\n\n __webpack_require__.m = modules;\n /******/\n\n /******/\n // expose the module cache\n\n /******/\n\n __webpack_require__.c = installedModules;\n /******/\n\n /******/\n // define getter function for harmony exports\n\n /******/\n\n __webpack_require__.d = function (exports, name, getter) {\n /******/\n if (!__webpack_require__.o(exports, name)) {\n /******/\n Object.defineProperty(exports, name, {\n enumerable: true,\n get: getter\n });\n /******/\n }\n /******/\n\n };\n /******/\n\n /******/\n // define __esModule on exports\n\n /******/\n\n\n __webpack_require__.r = function (exports) {\n /******/\n if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n /******/\n Object.defineProperty(exports, Symbol.toStringTag, {\n value: 'Module'\n });\n /******/\n }\n /******/\n\n\n Object.defineProperty(exports, '__esModule', {\n value: true\n });\n /******/\n };\n /******/\n\n /******/\n // create a fake namespace object\n\n /******/\n // mode & 1: value is a module id, require it\n\n /******/\n // mode & 2: merge all properties of value into the ns\n\n /******/\n // mode & 4: return value when already ns object\n\n /******/\n // mode & 8|1: behave like require\n\n /******/\n\n\n __webpack_require__.t = function (value, mode) {\n /******/\n if (mode & 1) value = __webpack_require__(value);\n /******/\n\n if (mode & 8) return value;\n /******/\n\n if (mode & 4 && _typeof(value) === 'object' && value && value.__esModule) return value;\n /******/\n\n var ns = Object.create(null);\n /******/\n\n __webpack_require__.r(ns);\n /******/\n\n\n Object.defineProperty(ns, 'default', {\n enumerable: true,\n value: value\n });\n /******/\n\n if (mode & 2 && typeof value != 'string') for (var key in value) {\n __webpack_require__.d(ns, key, function (key) {\n return value[key];\n }.bind(null, key));\n }\n /******/\n\n return ns;\n /******/\n };\n /******/\n\n /******/\n // getDefaultExport function for compatibility with non-harmony modules\n\n /******/\n\n\n __webpack_require__.n = function (module) {\n /******/\n var getter = module && module.__esModule ?\n /******/\n function getDefault() {\n return module['default'];\n } :\n /******/\n function getModuleExports() {\n return module;\n };\n /******/\n\n __webpack_require__.d(getter, 'a', getter);\n /******/\n\n\n return getter;\n /******/\n };\n /******/\n\n /******/\n // Object.prototype.hasOwnProperty.call\n\n /******/\n\n\n __webpack_require__.o = function (object, property) {\n return Object.prototype.hasOwnProperty.call(object, property);\n };\n /******/\n\n /******/\n // __webpack_public_path__\n\n /******/\n\n\n __webpack_require__.p = \"\";\n /******/\n\n /******/\n\n /******/\n // Load entry module and return exports\n\n /******/\n\n return __webpack_require__(__webpack_require__.s = 11);\n /******/\n }(\n /************************************************************************/\n\n /******/\n [\n /* 0 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var dayjs = __webpack_require__(2);\n\n function ParsedResult(result) {\n result = result || {};\n this.ref = result.ref;\n this.index = result.index;\n this.text = result.text;\n this.tags = result.tags || {};\n this.start = new ParsedComponents(result.start, result.ref);\n\n if (result.end) {\n this.end = new ParsedComponents(result.end, result.ref);\n }\n }\n\n ParsedResult.prototype.clone = function () {\n var result = new ParsedResult(this);\n result.tags = JSON.parse(JSON.stringify(this.tags));\n result.start = this.start.clone();\n\n if (this.end) {\n result.end = this.end.clone();\n }\n\n return result;\n };\n\n ParsedResult.prototype.date = function () {\n return this.start.date();\n };\n\n ParsedResult.prototype.hasPossibleDates = function () {\n return this.start.isPossibleDate() && (!this.end || this.end.isPossibleDate());\n };\n\n ParsedResult.prototype.isOnlyWeekday = function () {\n return this.start.isOnlyWeekdayComponent();\n };\n\n ParsedResult.prototype.isOnlyDayMonth = function () {\n return this.start.isOnlyDayMonthComponent();\n };\n\n function ParsedComponents(components, ref) {\n this.knownValues = {};\n this.impliedValues = {};\n\n if (components) {\n for (var key in components) {\n this.knownValues[key] = components[key];\n }\n }\n\n if (ref) {\n ref = dayjs(ref);\n this.imply('day', ref.date());\n this.imply('month', ref.month() + 1);\n this.imply('year', ref.year());\n }\n\n this.imply('hour', 12);\n this.imply('minute', 0);\n this.imply('second', 0);\n this.imply('millisecond', 0);\n }\n\n ParsedComponents.prototype.clone = function () {\n var component = new ParsedComponents();\n component.knownValues = JSON.parse(JSON.stringify(this.knownValues));\n component.impliedValues = JSON.parse(JSON.stringify(this.impliedValues));\n return component;\n };\n\n ParsedComponents.prototype.get = function (component, value) {\n if (component in this.knownValues) return this.knownValues[component];\n if (component in this.impliedValues) return this.impliedValues[component];\n };\n\n ParsedComponents.prototype.assign = function (component, value) {\n this.knownValues[component] = value;\n delete this.impliedValues[component];\n };\n\n ParsedComponents.prototype.imply = function (component, value) {\n if (component in this.knownValues) return;\n this.impliedValues[component] = value;\n };\n\n ParsedComponents.prototype.isCertain = function (component) {\n return component in this.knownValues;\n };\n\n ParsedComponents.prototype.isOnlyWeekdayComponent = function () {\n return this.isCertain('weekday') && !this.isCertain('day') && !this.isCertain('month');\n };\n\n ParsedComponents.prototype.isOnlyDayMonthComponent = function () {\n return this.isCertain('day') && this.isCertain('month') && !this.isCertain('year');\n };\n\n ParsedComponents.prototype.isPossibleDate = function () {\n var dateMoment = this.dayjs();\n\n if (this.isCertain('timezoneOffset')) {\n var adjustTimezoneOffset = this.get('timezoneOffset') - dateMoment.utcOffset();\n dateMoment = dateMoment.add(adjustTimezoneOffset, 'minutes');\n }\n\n if (dateMoment.get('year') != this.get('year')) return false;\n if (dateMoment.get('month') != this.get('month') - 1) return false;\n if (dateMoment.get('date') != this.get('day')) return false;\n if (dateMoment.get('hour') != this.get('hour')) return false;\n if (dateMoment.get('minute') != this.get('minute')) return false;\n return true;\n };\n\n ParsedComponents.prototype.date = function () {\n var result = this.dayjs();\n return result.toDate();\n };\n\n ParsedComponents.prototype.dayjs = function () {\n var result = dayjs();\n result = result.year(this.get('year'));\n result = result.month(this.get('month') - 1);\n result = result.date(this.get('day'));\n result = result.hour(this.get('hour'));\n result = result.minute(this.get('minute'));\n result = result.second(this.get('second'));\n result = result.millisecond(this.get('millisecond')); // Javascript Date Object return minus timezone offset\n\n var currentTimezoneOffset = result.utcOffset();\n var targetTimezoneOffset = this.get('timezoneOffset') !== undefined ? this.get('timezoneOffset') : currentTimezoneOffset;\n var adjustTimezoneOffset = targetTimezoneOffset - currentTimezoneOffset;\n result = result.add(-adjustTimezoneOffset, 'minute');\n return result;\n };\n\n ParsedComponents.prototype.moment = function () {\n // Keep for compatibility\n return this.dayjs();\n };\n\n exports.ParsedComponents = ParsedComponents;\n exports.ParsedResult = ParsedResult;\n /***/\n },\n /* 1 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var dayjs = __webpack_require__(2);\n\n exports.Parser = function (config) {\n config = config || {};\n var strictMode = config.strict;\n\n this.isStrictMode = function () {\n return strictMode == true;\n };\n\n this.pattern = function () {\n return /./i;\n };\n\n this.extract = function (text, ref, match, opt) {\n return null;\n };\n\n this.execute = function (text, ref, opt) {\n var results = [];\n var regex = this.pattern();\n var remainingText = text;\n var match = regex.exec(remainingText);\n\n while (match) {\n // Calculate match index on the full text;\n match.index += text.length - remainingText.length;\n var result = this.extract(text, ref, match, opt);\n\n if (result) {\n // If success, start from the end of the result\n remainingText = text.substring(result.index + result.text.length);\n\n if (!this.isStrictMode() || result.hasPossibleDates()) {\n results.push(result);\n }\n } else {\n // If fail, move on by 1\n remainingText = text.substring(match.index + 1);\n }\n\n match = regex.exec(remainingText);\n }\n\n if (this.refiners) {\n this.refiners.forEach(function () {\n results = refiner.refine(results, text, options);\n });\n }\n\n return results;\n };\n };\n\n exports.findYearClosestToRef = function (ref, day, month) {\n //Find the most appropriated year\n var refMoment = dayjs(ref);\n var dateMoment = refMoment;\n dateMoment = dateMoment.month(month - 1);\n dateMoment = dateMoment.date(day);\n dateMoment = dateMoment.year(refMoment.year());\n var nextYear = dateMoment.add(1, 'y');\n var lastYear = dateMoment.add(-1, 'y');\n\n if (Math.abs(nextYear.diff(refMoment)) < Math.abs(dateMoment.diff(refMoment))) {\n dateMoment = nextYear;\n } else if (Math.abs(lastYear.diff(refMoment)) < Math.abs(dateMoment.diff(refMoment))) {\n dateMoment = lastYear;\n }\n\n return dateMoment.year();\n };\n\n exports.ENISOFormatParser = __webpack_require__(13).Parser;\n exports.ENDeadlineFormatParser = __webpack_require__(14).Parser;\n exports.ENRelativeDateFormatParser = __webpack_require__(15).Parser;\n exports.ENMonthNameLittleEndianParser = __webpack_require__(16).Parser;\n exports.ENMonthNameMiddleEndianParser = __webpack_require__(17).Parser;\n exports.ENMonthNameParser = __webpack_require__(18).Parser;\n exports.ENSlashDateFormatParser = __webpack_require__(19).Parser;\n exports.ENSlashDateFormatStartWithYearParser = __webpack_require__(20).Parser;\n exports.ENSlashMonthFormatParser = __webpack_require__(21).Parser;\n exports.ENTimeAgoFormatParser = __webpack_require__(22).Parser;\n exports.ENTimeExpressionParser = __webpack_require__(23).Parser;\n exports.ENTimeLaterFormatParser = __webpack_require__(24).Parser;\n exports.ENWeekdayParser = __webpack_require__(5).Parser;\n exports.ENCasualDateParser = __webpack_require__(25).Parser;\n exports.ENCasualTimeParser = __webpack_require__(26).Parser;\n exports.JPStandardParser = __webpack_require__(27).Parser;\n exports.JPCasualDateParser = __webpack_require__(29).Parser;\n exports.PTCasualDateParser = __webpack_require__(30).Parser;\n exports.PTDeadlineFormatParser = __webpack_require__(31).Parser;\n exports.PTMonthNameLittleEndianParser = __webpack_require__(32).Parser;\n exports.PTSlashDateFormatParser = __webpack_require__(34).Parser;\n exports.PTTimeAgoFormatParser = __webpack_require__(35).Parser;\n exports.PTTimeExpressionParser = __webpack_require__(36).Parser;\n exports.PTWeekdayParser = __webpack_require__(37).Parser;\n exports.ESCasualDateParser = __webpack_require__(38).Parser;\n exports.ESDeadlineFormatParser = __webpack_require__(39).Parser;\n exports.ESTimeAgoFormatParser = __webpack_require__(40).Parser;\n exports.ESTimeExpressionParser = __webpack_require__(41).Parser;\n exports.ESWeekdayParser = __webpack_require__(42).Parser;\n exports.ESMonthNameLittleEndianParser = __webpack_require__(43).Parser;\n exports.ESSlashDateFormatParser = __webpack_require__(45).Parser;\n exports.FRCasualDateParser = __webpack_require__(46).Parser;\n exports.FRDeadlineFormatParser = __webpack_require__(47).Parser;\n exports.FRMonthNameLittleEndianParser = __webpack_require__(48).Parser;\n exports.FRSlashDateFormatParser = __webpack_require__(49).Parser;\n exports.FRTimeAgoFormatParser = __webpack_require__(50).Parser;\n exports.FRTimeExpressionParser = __webpack_require__(51).Parser;\n exports.FRWeekdayParser = __webpack_require__(52).Parser;\n exports.FRRelativeDateFormatParser = __webpack_require__(53).Parser;\n exports.ZHHantDateParser = __webpack_require__(55).Parser;\n exports.ZHHantWeekdayParser = __webpack_require__(56).Parser;\n exports.ZHHantTimeExpressionParser = __webpack_require__(57).Parser;\n exports.ZHHantCasualDateParser = __webpack_require__(58).Parser;\n exports.ZHHantDeadlineFormatParser = __webpack_require__(59).Parser;\n exports.DEDeadlineFormatParser = __webpack_require__(60).Parser;\n exports.DEMonthNameLittleEndianParser = __webpack_require__(61).Parser;\n exports.DEMonthNameParser = __webpack_require__(62).Parser;\n exports.DESlashDateFormatParser = __webpack_require__(63).Parser;\n exports.DETimeAgoFormatParser = __webpack_require__(64).Parser;\n exports.DETimeExpressionParser = __webpack_require__(65).Parser;\n exports.DEWeekdayParser = __webpack_require__(66).Parser;\n exports.DECasualDateParser = __webpack_require__(67).Parser;\n /***/\n },\n /* 2 */\n\n /***/\n function (module, exports, __webpack_require__) {\n !function (t, n) {\n true ? module.exports = n() : undefined;\n }(this, function () {\n \"use strict\";\n\n var t = \"millisecond\",\n n = \"second\",\n e = \"minute\",\n r = \"hour\",\n i = \"day\",\n s = \"week\",\n u = \"month\",\n o = \"quarter\",\n a = \"year\",\n h = /^(\\d{4})-?(\\d{1,2})-?(\\d{0,2})[^0-9]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?.?(\\d{1,3})?$/,\n f = /\\[([^\\]]+)]|Y{2,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,\n c = function c(t, n, e) {\n var r = String(t);\n return !r || r.length >= n ? t : \"\" + Array(n + 1 - r.length).join(e) + t;\n },\n d = {\n s: c,\n z: function z(t) {\n var n = -t.utcOffset(),\n e = Math.abs(n),\n r = Math.floor(e / 60),\n i = e % 60;\n return (n <= 0 ? \"+\" : \"-\") + c(r, 2, \"0\") + \":\" + c(i, 2, \"0\");\n },\n m: function m(t, n) {\n var e = 12 * (n.year() - t.year()) + (n.month() - t.month()),\n r = t.clone().add(e, u),\n i = n - r < 0,\n s = t.clone().add(e + (i ? -1 : 1), u);\n return Number(-(e + (n - r) / (i ? r - s : s - r)) || 0);\n },\n a: function a(t) {\n return t < 0 ? Math.ceil(t) || 0 : Math.floor(t);\n },\n p: function p(h) {\n return {\n M: u,\n y: a,\n w: s,\n d: i,\n D: \"date\",\n h: r,\n m: e,\n s: n,\n ms: t,\n Q: o\n }[h] || String(h || \"\").toLowerCase().replace(/s$/, \"\");\n },\n u: function u(t) {\n return void 0 === t;\n }\n },\n $ = {\n name: \"en\",\n weekdays: \"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\"),\n months: \"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\")\n },\n l = \"en\",\n m = {};\n\n m[l] = $;\n\n var y = function y(t) {\n return t instanceof v;\n },\n M = function M(t, n, e) {\n var r;\n if (!t) return l;\n if (\"string\" == typeof t) m[t] && (r = t), n && (m[t] = n, r = t);else {\n var i = t.name;\n m[i] = t, r = i;\n }\n return !e && r && (l = r), r || !e && l;\n },\n g = function g(t, n, e) {\n if (y(t)) return t.clone();\n var r = n ? \"string\" == typeof n ? {\n format: n,\n pl: e\n } : n : {};\n return r.date = t, new v(r);\n },\n D = d;\n\n D.l = M, D.i = y, D.w = function (t, n) {\n return g(t, {\n locale: n.$L,\n utc: n.$u,\n $offset: n.$offset\n });\n };\n\n var v = function () {\n function c(t) {\n this.$L = this.$L || M(t.locale, null, !0), this.parse(t);\n }\n\n var d = c.prototype;\n return d.parse = function (t) {\n this.$d = function (t) {\n var n = t.date,\n e = t.utc;\n if (null === n) return new Date(NaN);\n if (D.u(n)) return new Date();\n if (n instanceof Date) return new Date(n);\n\n if (\"string\" == typeof n && !/Z$/i.test(n)) {\n var r = n.match(h);\n if (r) return e ? new Date(Date.UTC(r[1], r[2] - 1, r[3] || 1, r[4] || 0, r[5] || 0, r[6] || 0, r[7] || 0)) : new Date(r[1], r[2] - 1, r[3] || 1, r[4] || 0, r[5] || 0, r[6] || 0, r[7] || 0);\n }\n\n return new Date(n);\n }(t), this.init();\n }, d.init = function () {\n var t = this.$d;\n 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();\n }, d.$utils = function () {\n return D;\n }, d.isValid = function () {\n return !(\"Invalid Date\" === this.$d.toString());\n }, d.isSame = function (t, n) {\n var e = g(t);\n return this.startOf(n) <= e && e <= this.endOf(n);\n }, d.isAfter = function (t, n) {\n return g(t) < this.startOf(n);\n }, d.isBefore = function (t, n) {\n return this.endOf(n) < g(t);\n }, d.$g = function (t, n, e) {\n return D.u(t) ? this[n] : this.set(e, t);\n }, d.year = function (t) {\n return this.$g(t, \"$y\", a);\n }, d.month = function (t) {\n return this.$g(t, \"$M\", u);\n }, d.day = function (t) {\n return this.$g(t, \"$W\", i);\n }, d.date = function (t) {\n return this.$g(t, \"$D\", \"date\");\n }, d.hour = function (t) {\n return this.$g(t, \"$H\", r);\n }, d.minute = function (t) {\n return this.$g(t, \"$m\", e);\n }, d.second = function (t) {\n return this.$g(t, \"$s\", n);\n }, d.millisecond = function (n) {\n return this.$g(n, \"$ms\", t);\n }, d.unix = function () {\n return Math.floor(this.valueOf() / 1e3);\n }, d.valueOf = function () {\n return this.$d.getTime();\n }, d.startOf = function (t, o) {\n var h = this,\n f = !!D.u(o) || o,\n c = D.p(t),\n d = function d(t, n) {\n var e = D.w(h.$u ? Date.UTC(h.$y, n, t) : new Date(h.$y, n, t), h);\n return f ? e : e.endOf(i);\n },\n $ = function $(t, n) {\n return D.w(h.toDate()[t].apply(h.toDate(), (f ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(n)), h);\n },\n l = this.$W,\n m = this.$M,\n y = this.$D,\n M = \"set\" + (this.$u ? \"UTC\" : \"\");\n\n switch (c) {\n case a:\n return f ? d(1, 0) : d(31, 11);\n\n case u:\n return f ? d(1, m) : d(0, m + 1);\n\n case s:\n var g = this.$locale().weekStart || 0,\n v = (l < g ? l + 7 : l) - g;\n return d(f ? y - v : y + (6 - v), m);\n\n case i:\n case \"date\":\n return $(M + \"Hours\", 0);\n\n case r:\n return $(M + \"Minutes\", 1);\n\n case e:\n return $(M + \"Seconds\", 2);\n\n case n:\n return $(M + \"Milliseconds\", 3);\n\n default:\n return this.clone();\n }\n }, d.endOf = function (t) {\n return this.startOf(t, !1);\n }, d.$set = function (s, o) {\n var h,\n f = D.p(s),\n c = \"set\" + (this.$u ? \"UTC\" : \"\"),\n d = (h = {}, h[i] = c + \"Date\", h.date = c + \"Date\", h[u] = c + \"Month\", h[a] = c + \"FullYear\", h[r] = c + \"Hours\", h[e] = c + \"Minutes\", h[n] = c + \"Seconds\", h[t] = c + \"Milliseconds\", h)[f],\n $ = f === i ? this.$D + (o - this.$W) : o;\n\n if (f === u || f === a) {\n var l = this.clone().set(\"date\", 1);\n l.$d[d]($), l.init(), this.$d = l.set(\"date\", Math.min(this.$D, l.daysInMonth())).toDate();\n } else d && this.$d[d]($);\n\n return this.init(), this;\n }, d.set = function (t, n) {\n return this.clone().$set(t, n);\n }, d.get = function (t) {\n return this[D.p(t)]();\n }, d.add = function (t, o) {\n var h,\n f = this;\n t = Number(t);\n\n var c = D.p(o),\n d = function d(n) {\n var e = g(f);\n return D.w(e.date(e.date() + Math.round(n * t)), f);\n };\n\n if (c === u) return this.set(u, this.$M + t);\n if (c === a) return this.set(a, this.$y + t);\n if (c === i) return d(1);\n if (c === s) return d(7);\n var $ = (h = {}, h[e] = 6e4, h[r] = 36e5, h[n] = 1e3, h)[c] || 1,\n l = this.$d.getTime() + t * $;\n return D.w(l, this);\n }, d.subtract = function (t, n) {\n return this.add(-1 * t, n);\n }, d.format = function (t) {\n var n = this;\n if (!this.isValid()) return \"Invalid Date\";\n\n var e = t || \"YYYY-MM-DDTHH:mm:ssZ\",\n r = D.z(this),\n i = this.$locale(),\n s = this.$H,\n u = this.$m,\n o = this.$M,\n a = i.weekdays,\n h = i.months,\n c = function c(t, r, i, s) {\n return t && (t[r] || t(n, e)) || i[r].substr(0, s);\n },\n d = function d(t) {\n return D.s(s % 12 || 12, t, \"0\");\n },\n $ = i.meridiem || function (t, n, e) {\n var r = t < 12 ? \"AM\" : \"PM\";\n return e ? r.toLowerCase() : r;\n },\n l = {\n YY: String(this.$y).slice(-2),\n YYYY: this.$y,\n M: o + 1,\n MM: D.s(o + 1, 2, \"0\"),\n MMM: c(i.monthsShort, o, h, 3),\n MMMM: h[o] || h(this, e),\n D: this.$D,\n DD: D.s(this.$D, 2, \"0\"),\n d: String(this.$W),\n dd: c(i.weekdaysMin, this.$W, a, 2),\n ddd: c(i.weekdaysShort, this.$W, a, 3),\n dddd: a[this.$W],\n H: String(s),\n HH: D.s(s, 2, \"0\"),\n h: d(1),\n hh: d(2),\n a: $(s, u, !0),\n A: $(s, u, !1),\n m: String(u),\n mm: D.s(u, 2, \"0\"),\n s: String(this.$s),\n ss: D.s(this.$s, 2, \"0\"),\n SSS: D.s(this.$ms, 3, \"0\"),\n Z: r\n };\n\n return e.replace(f, function (t, n) {\n return n || l[t] || r.replace(\":\", \"\");\n });\n }, d.utcOffset = function () {\n return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);\n }, d.diff = function (t, h, f) {\n var c,\n d = D.p(h),\n $ = g(t),\n l = 6e4 * ($.utcOffset() - this.utcOffset()),\n m = this - $,\n y = D.m(this, $);\n return y = (c = {}, c[a] = y / 12, c[u] = y, c[o] = y / 3, c[s] = (m - l) / 6048e5, c[i] = (m - l) / 864e5, c[r] = m / 36e5, c[e] = m / 6e4, c[n] = m / 1e3, c)[d] || m, f ? y : D.a(y);\n }, d.daysInMonth = function () {\n return this.endOf(u).$D;\n }, d.$locale = function () {\n return m[this.$L];\n }, d.locale = function (t, n) {\n if (!t) return this.$L;\n var e = this.clone(),\n r = M(t, n, !0);\n return r && (e.$L = r), e;\n }, d.clone = function () {\n return D.w(this.$d, this);\n }, d.toDate = function () {\n return new Date(this.valueOf());\n }, d.toJSON = function () {\n return this.isValid() ? this.toISOString() : null;\n }, d.toISOString = function () {\n return this.$d.toISOString();\n }, d.toString = function () {\n return this.$d.toUTCString();\n }, c;\n }();\n\n return g.prototype = v.prototype, g.extend = function (t, n) {\n return t(n, v, g), g;\n }, g.locale = M, g.isDayjs = y, g.unix = function (t) {\n return g(1e3 * t);\n }, g.en = m[l], g.Ls = m, g;\n });\n /***/\n },\n /* 3 */\n\n /***/\n function (module, exports, __webpack_require__) {\n exports.Refiner = function Refiner() {\n this.refine = function (text, results, opt) {\n return results;\n };\n };\n\n exports.Filter = function Filter() {\n exports.Refiner.call(this);\n\n this.isValid = function (text, result, opt) {\n return true;\n };\n\n this.refine = function (text, results, opt) {\n var filteredResult = [];\n\n for (var i = 0; i < results.length; i++) {\n var result = results[i];\n\n if (this.isValid(text, result, opt)) {\n filteredResult.push(result);\n }\n }\n\n return filteredResult;\n };\n }; // Common refiners\n\n\n exports.OverlapRemovalRefiner = __webpack_require__(68).Refiner;\n exports.ExtractTimezoneOffsetRefiner = __webpack_require__(69).Refiner;\n exports.ExtractTimezoneAbbrRefiner = __webpack_require__(70).Refiner;\n exports.ForwardDateRefiner = __webpack_require__(71).Refiner;\n exports.UnlikelyFormatFilter = __webpack_require__(72).Refiner; // en refiners\n\n exports.ENMergeDateTimeRefiner = __webpack_require__(6).Refiner;\n exports.ENMergeDateRangeRefiner = __webpack_require__(10).Refiner;\n exports.ENPrioritizeSpecificDateRefiner = __webpack_require__(73).Refiner; // ja refiners\n\n exports.JPMergeDateRangeRefiner = __webpack_require__(74).Refiner; // fr refiners\n\n exports.FRMergeDateRangeRefiner = __webpack_require__(75).Refiner;\n exports.FRMergeDateTimeRefiner = __webpack_require__(76).Refiner; // de refiners\n\n exports.DEMergeDateRangeRefiner = __webpack_require__(77).Refiner;\n exports.DEMergeDateTimeRefiner = __webpack_require__(78).Refiner;\n /***/\n },\n /* 4 */\n\n /***/\n function (module, exports) {\n exports.WEEKDAY_OFFSET = {\n 'sunday': 0,\n 'sun': 0,\n 'monday': 1,\n 'mon': 1,\n 'tuesday': 2,\n 'tue': 2,\n 'wednesday': 3,\n 'wed': 3,\n 'thursday': 4,\n 'thur': 4,\n 'thu': 4,\n 'friday': 5,\n 'fri': 5,\n 'saturday': 6,\n 'sat': 6\n };\n exports.MONTH_OFFSET = {\n 'january': 1,\n 'jan': 1,\n 'jan.': 1,\n 'february': 2,\n 'feb': 2,\n 'feb.': 2,\n 'march': 3,\n 'mar': 3,\n 'mar.': 3,\n 'april': 4,\n 'apr': 4,\n 'apr.': 4,\n 'may': 5,\n 'june': 6,\n 'jun': 6,\n 'jun.': 6,\n 'july': 7,\n 'jul': 7,\n 'jul.': 7,\n 'august': 8,\n 'aug': 8,\n 'aug.': 8,\n 'september': 9,\n 'sep': 9,\n 'sep.': 9,\n 'sept': 9,\n 'sept.': 9,\n 'october': 10,\n 'oct': 10,\n 'oct.': 10,\n 'november': 11,\n 'nov': 11,\n 'nov.': 11,\n 'december': 12,\n 'dec': 12,\n 'dec.': 12\n };\n exports.MONTH_PATTERN = '(?:' + Object.keys(exports.MONTH_OFFSET).join('|').replace(/\\./g, '\\\\.') + ')';\n exports.INTEGER_WORDS = {\n 'one': 1,\n 'two': 2,\n 'three': 3,\n 'four': 4,\n 'five': 5,\n 'six': 6,\n 'seven': 7,\n 'eight': 8,\n 'nine': 9,\n 'ten': 10,\n 'eleven': 11,\n 'twelve': 12\n };\n exports.INTEGER_WORDS_PATTERN = '(?:' + Object.keys(exports.INTEGER_WORDS).join('|') + ')';\n exports.ORDINAL_WORDS = {\n 'first': 1,\n 'second': 2,\n 'third': 3,\n 'fourth': 4,\n 'fifth': 5,\n 'sixth': 6,\n 'seventh': 7,\n 'eighth': 8,\n 'ninth': 9,\n 'tenth': 10,\n 'eleventh': 11,\n 'twelfth': 12,\n 'thirteenth': 13,\n 'fourteenth': 14,\n 'fifteenth': 15,\n 'sixteenth': 16,\n 'seventeenth': 17,\n 'eighteenth': 18,\n 'nineteenth': 19,\n 'twentieth': 20,\n 'twenty first': 21,\n 'twenty second': 22,\n 'twenty third': 23,\n 'twenty fourth': 24,\n 'twenty fifth': 25,\n 'twenty sixth': 26,\n 'twenty seventh': 27,\n 'twenty eighth': 28,\n 'twenty ninth': 29,\n 'thirtieth': 30,\n 'thirty first': 31\n };\n exports.ORDINAL_WORDS_PATTERN = '(?:' + Object.keys(exports.ORDINAL_WORDS).join('|').replace(/ /g, '[ -]') + ')';\n var TIME_UNIT = '(' + exports.INTEGER_WORDS_PATTERN + '|[0-9]+|[0-9]+\\.[0-9]+|an?(?:\\\\s*few)?|half(?:\\\\s*an?)?)\\\\s*' + '(sec(?:onds?)?|min(?:ute)?s?|h(?:r|rs|our|ours)?|weeks?|days?|months?|years?)\\\\s*';\n var TIME_UNIT_STRICT = '(?:[0-9]+|an?)\\\\s*' + '(?:seconds?|minutes?|hours?|days?)\\\\s*';\n var PATTERN_TIME_UNIT = new RegExp(TIME_UNIT, 'i');\n exports.TIME_UNIT_PATTERN = '(?:' + TIME_UNIT + ')+';\n exports.TIME_UNIT_STRICT_PATTERN = '(?:' + TIME_UNIT_STRICT + ')+';\n\n exports.extractDateTimeUnitFragments = function (timeunitText) {\n var fragments = {};\n var remainingText = timeunitText;\n var match = PATTERN_TIME_UNIT.exec(remainingText);\n\n while (match) {\n collectDateTimeFragment(match, fragments);\n remainingText = remainingText.substring(match[0].length);\n match = PATTERN_TIME_UNIT.exec(remainingText);\n }\n\n return fragments;\n };\n\n function collectDateTimeFragment(match, fragments) {\n var num = match[1].toLowerCase();\n\n if (exports.INTEGER_WORDS[num] !== undefined) {\n num = exports.INTEGER_WORDS[num];\n } else if (num === 'a' || num === 'an') {\n num = 1;\n } else if (num.match(/few/)) {\n num = 3;\n } else if (num.match(/half/)) {\n num = 0.5;\n } else {\n num = parseFloat(num);\n }\n\n if (match[2].match(/^h/i)) {\n fragments['hour'] = num;\n } else if (match[2].match(/min/i)) {\n fragments['minute'] = num;\n } else if (match[2].match(/sec/i)) {\n fragments['second'] = num;\n } else if (match[2].match(/week/i)) {\n fragments['week'] = num;\n } else if (match[2].match(/day/i)) {\n fragments['d'] = num;\n } else if (match[2].match(/month/i)) {\n fragments['month'] = num;\n } else if (match[2].match(/year/i)) {\n fragments['year'] = num;\n }\n\n return fragments;\n }\n /***/\n\n },\n /* 5 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var dayjs = __webpack_require__(2);\n\n var Parser = __webpack_require__(1).Parser;\n\n var ParsedResult = __webpack_require__(0).ParsedResult;\n\n var DAYS_OFFSET = {\n 'sunday': 0,\n 'sun': 0,\n 'monday': 1,\n 'mon': 1,\n 'tuesday': 2,\n 'tues': 2,\n 'tue': 2,\n 'wednesday': 3,\n 'wed': 3,\n 'thursday': 4,\n 'thurs': 4,\n 'thur': 4,\n 'thu': 4,\n 'friday': 5,\n 'fri': 5,\n 'saturday': 6,\n 'sat': 6\n };\n var PATTERN = new RegExp('(\\\\W|^)' + '(?:(?:\\\\,|\\\\(|\\\\()\\\\s*)?' + '(?:on\\\\s*?)?' + '(?:(this|last|past|next)\\\\s*)?' + '(' + Object.keys(DAYS_OFFSET).join('|') + ')' + '(?:\\\\s*(?:\\\\,|\\\\)|\\\\)))?' + '(?:\\\\s*(this|last|past|next)\\\\s*week)?' + '(?=\\\\W|$)', 'i');\n var PREFIX_GROUP = 2;\n var WEEKDAY_GROUP = 3;\n var POSTFIX_GROUP = 4;\n\n exports.updateParsedComponent = function updateParsedComponent(result, ref, offset, modifier) {\n var startMoment = dayjs(ref);\n var startMomentFixed = false;\n var refOffset = startMoment.day();\n\n if (modifier == 'last' || modifier == 'past') {\n startMoment = startMoment.day(offset - 7);\n startMomentFixed = true;\n } else if (modifier == 'next') {\n startMoment = startMoment.day(offset + 7);\n startMomentFixed = true;\n } else if (modifier == 'this') {\n startMoment = startMoment.day(offset);\n } else {\n if (Math.abs(offset - 7 - refOffset) < Math.abs(offset - refOffset)) {\n startMoment = startMoment.day(offset - 7);\n } else if (Math.abs(offset + 7 - refOffset) < Math.abs(offset - refOffset)) {\n startMoment = startMoment.day(offset + 7);\n } else {\n startMoment = startMoment.day(offset);\n }\n }\n\n result.start.assign('weekday', offset);\n\n if (startMomentFixed) {\n result.start.assign('day', startMoment.date());\n result.start.assign('month', startMoment.month() + 1);\n result.start.assign('year', startMoment.year());\n } else {\n result.start.imply('day', startMoment.date());\n result.start.imply('month', startMoment.month() + 1);\n result.start.imply('year', startMoment.year());\n }\n\n return result;\n };\n\n exports.Parser = function ENWeekdayParser() {\n Parser.apply(this, arguments);\n\n this.pattern = function () {\n return PATTERN;\n };\n\n this.extract = function (text, ref, match, opt) {\n var index = match.index + match[1].length;\n var text = match[0].substr(match[1].length, match[0].length - match[1].length);\n var result = new ParsedResult({\n index: index,\n text: text,\n ref: ref\n });\n var dayOfWeek = match[WEEKDAY_GROUP].toLowerCase();\n var offset = DAYS_OFFSET[dayOfWeek];\n\n if (offset === undefined) {\n return null;\n }\n\n var prefix = match[PREFIX_GROUP];\n var postfix = match[POSTFIX_GROUP];\n var norm = prefix || postfix;\n norm = norm || '';\n norm = norm.toLowerCase();\n exports.updateParsedComponent(result, ref, offset, norm);\n result.tags['ENWeekdayParser'] = true;\n return result;\n };\n };\n /***/\n\n },\n /* 6 */\n\n /***/\n function (module, exports, __webpack_require__) {\n /*\n \n */\n var ParsedComponents = __webpack_require__(0).ParsedComponents;\n\n var Refiner = __webpack_require__(3).Refiner;\n\n var PATTERN = new RegExp(\"^\\\\s*(T|at|after|before|on|of|,|-)?\\\\s*$\");\n\n var isDateOnly = exports.isDateOnly = function (result) {\n return !result.start.isCertain('hour');\n };\n\n var isTimeOnly = exports.isTimeOnly = function (result) {\n return !result.start.isCertain('month') && !result.start.isCertain('weekday');\n };\n\n var isAbleToMerge = exports.isAbleToMerge = function (text, prevResult, curResult) {\n var textBetween = text.substring(prevResult.index + prevResult.text.length, curResult.index);\n return textBetween.match(PATTERN);\n };\n\n var mergeDateTimeComponent = exports.mergeDateTimeComponent = function (dateComponent, timeComponent) {\n var dateTimeComponent = dateComponent.clone();\n\n if (timeComponent.isCertain('hour')) {\n dateTimeComponent.assign('hour', timeComponent.get('hour'));\n dateTimeComponent.assign('minute', timeComponent.get('minute'));\n\n if (timeComponent.isCertain('second')) {\n dateTimeComponent.assign('second', timeComponent.get('second'));\n\n if (timeComponent.isCertain('millisecond')) {\n dateTimeComponent.assign('millisecond', timeComponent.get('millisecond'));\n } else {\n dateTimeComponent.imply('millisecond', timeComponent.get('millisecond'));\n }\n } else {\n dateTimeComponent.imply('second', timeComponent.get('second'));\n dateTimeComponent.imply('millisecond', timeComponent.get('millisecond'));\n }\n } else {\n dateTimeComponent.imply('hour', timeComponent.get('hour'));\n dateTimeComponent.imply('minute', timeComponent.get('minute'));\n dateTimeComponent.imply('second', timeComponent.get('second'));\n dateTimeComponent.imply('millisecond', timeComponent.get('millisecond'));\n }\n\n if (timeComponent.isCertain('meridiem')) {\n dateTimeComponent.assign('meridiem', timeComponent.get('meridiem'));\n } else if (timeComponent.get('meridiem') !== undefined && dateTimeComponent.get('meridiem') === undefined) {\n dateTimeComponent.imply('meridiem', timeComponent.get('meridiem'));\n }\n\n if (dateTimeComponent.get('meridiem') == 1 && dateTimeComponent.get('hour') < 12) {\n if (timeComponent.isCertain('hour')) {\n dateTimeComponent.assign('hour', dateTimeComponent.get('hour') + 12);\n } else {\n dateTimeComponent.imply('hour', dateTimeComponent.get('hour') + 12);\n }\n }\n\n return dateTimeComponent;\n };\n\n function mergeResult(text, dateResult, timeResult) {\n var beginDate = dateResult.start;\n var beginTime = timeResult.start;\n var beginDateTime = mergeDateTimeComponent(beginDate, beginTime);\n\n if (dateResult.end != null || timeResult.end != null) {\n var endDate = dateResult.end == null ? dateResult.start : dateResult.end;\n var endTime = timeResult.end == null ? timeResult.start : timeResult.end;\n var endDateTime = mergeDateTimeComponent(endDate, endTime);\n\n if (dateResult.end == null && endDateTime.date().getTime() < beginDateTime.date().getTime()) {\n // Ex. 9pm - 1am\n if (endDateTime.isCertain('day')) {\n endDateTime.assign('day', endDateTime.get('day') + 1);\n } else {\n endDateTime.imply('day', endDateTime.get('day') + 1);\n }\n }\n\n dateResult.end = endDateTime;\n }\n\n dateResult.start = beginDateTime;\n var startIndex = Math.min(dateResult.index, timeResult.index);\n var endIndex = Math.max(dateResult.index + dateResult.text.length, timeResult.index + timeResult.text.length);\n dateResult.index = startIndex;\n dateResult.text = text.substring(startIndex, endIndex);\n\n for (var tag in timeResult.tags) {\n dateResult.tags[tag] = true;\n }\n\n dateResult.tags['ENMergeDateAndTimeRefiner'] = true;\n return dateResult;\n }\n\n exports.Refiner = function ENMergeDateTimeRefiner() {\n Refiner.call(this);\n\n this.refine = function (text, results, opt) {\n if (results.length < 2) return results;\n var mergedResult = [];\n var currResult = null;\n var prevResult = null;\n\n for (var i = 1; i < results.length; i++) {\n currResult = results[i];\n prevResult = results[i - 1];\n\n if (isDateOnly(prevResult) && isTimeOnly(currResult) && isAbleToMerge(text, prevResult, currResult)) {\n prevResult = mergeResult(text, prevResult, currResult);\n currResult = results[i + 1];\n i += 1;\n } else if (isDateOnly(currResult) && isTimeOnly(prevResult) && isAbleToMerge(text, prevResult, currResult)) {\n prevResult = mergeResult(text, currResult, prevResult);\n currResult = results[i + 1];\n i += 1;\n }\n\n mergedResult.push(prevResult);\n }\n\n if (currResult != null) {\n mergedResult.push(currResult);\n }\n\n return mergedResult;\n };\n };\n /***/\n\n },\n /* 7 */\n\n /***/\n function (module, exports) {\n var NUMBER = {\n '零': 0,\n '一': 1,\n '二': 2,\n '兩': 2,\n '三': 3,\n '四': 4,\n '五': 5,\n '六': 6,\n '七': 7,\n '八': 8,\n '九': 9,\n '十': 10,\n '廿': 20,\n '卅': 30\n };\n var WEEKDAY_OFFSET = {\n '天': 0,\n '日': 0,\n '一': 1,\n '二': 2,\n '三': 3,\n '四': 4,\n '五': 5,\n '六': 6\n };\n exports.NUMBER = NUMBER;\n exports.WEEKDAY_OFFSET = WEEKDAY_OFFSET;\n\n exports.zhStringToNumber = function (text) {\n var number = 0;\n\n for (var i = 0; i < text.length; i++) {\n var _char = text[i];\n\n if (_char === '十') {\n number = number === 0 ? NUMBER[_char] : number * NUMBER[_char];\n } else {\n number += NUMBER[_char];\n }\n }\n\n return number;\n };\n\n exports.zhStringToYear = function (text) {\n var string = '';\n\n for (var i = 0; i < text.length; i++) {\n var _char2 = text[i];\n string = string + NUMBER[_char2];\n }\n\n return parseInt(string);\n };\n /***/\n\n },\n /* 8 */\n\n /***/\n function (module, exports) {\n exports.WEEKDAY_OFFSET = {\n 'sonntag': 0,\n 'so': 0,\n 'montag': 1,\n 'mo': 1,\n 'dienstag': 2,\n 'di': 2,\n 'mittwoch': 3,\n 'mi': 3,\n 'donnerstag': 4,\n 'do': 4,\n 'freitag': 5,\n 'fr': 5,\n 'samstag': 6,\n 'sa': 6\n };\n exports.MONTH_OFFSET = {\n 'januar': 1,\n 'jan': 1,\n 'jan.': 1,\n 'februar': 2,\n 'feb': 2,\n 'feb.': 2,\n 'märz': 3,\n 'maerz': 3,\n 'mär': 3,\n 'mär.': 3,\n 'mrz': 3,\n 'mrz.': 3,\n 'april': 4,\n 'apr': 4,\n 'apr.': 4,\n 'mai': 5,\n 'juni': 6,\n 'jun': 6,\n 'jun.': 6,\n 'juli': 7,\n 'jul': 7,\n 'jul.': 7,\n 'august': 8,\n 'aug': 8,\n 'aug.': 8,\n 'september': 9,\n 'sep': 9,\n 'sep.': 9,\n 'sept': 9,\n 'sept.': 9,\n 'oktober': 10,\n 'okt': 10,\n 'okt.': 10,\n 'november': 11,\n 'nov': 11,\n 'nov.': 11,\n 'dezember': 12,\n 'dez': 12,\n 'dez.': 12\n };\n exports.INTEGER_WORDS_PATTERN = '(?:eins|zwei|drei|vier|fünf|fuenf|sechs|sieben|acht|neun|zehn|elf|zwölf|zwoelf)';\n exports.INTEGER_WORDS = {\n 'eins': 1,\n 'zwei': 2,\n 'drei': 3,\n 'vier': 4,\n 'fünf': 5,\n 'fuenf': 5,\n 'sechs': 6,\n 'sieben': 7,\n 'acht': 8,\n 'neun': 9,\n 'zehn': 10,\n 'elf': 11,\n 'zwölf': 12,\n 'zwoelf': 12\n };\n /***/\n },\n /* 9 */\n\n /***/\n function (module, exports) {\n exports.WEEKDAY_OFFSET = {\n 'dimanche': 0,\n 'dim': 0,\n 'lundi': 1,\n 'lun': 1,\n 'mardi': 2,\n 'mar': 2,\n 'mercredi': 3,\n 'mer': 3,\n 'jeudi': 4,\n 'jeu': 4,\n 'vendredi': 5,\n 'ven': 5,\n 'samedi': 6,\n 'sam': 6\n };\n exports.MONTH_OFFSET = {\n 'janvier': 1,\n 'jan': 1,\n 'jan.': 1,\n 'février': 2,\n 'fév': 2,\n 'fév.': 2,\n 'fevrier': 2,\n 'fev': 2,\n 'fev.': 2,\n 'mars': 3,\n 'mar': 3,\n 'mar.': 3,\n 'avril': 4,\n 'avr': 4,\n 'avr.': 4,\n 'mai': 5,\n 'juin': 6,\n 'jun': 6,\n 'juillet': 7,\n 'jul': 7,\n 'jul.': 7,\n 'août': 8,\n 'aout': 8,\n 'septembre': 9,\n 'sep': 9,\n 'sep.': 9,\n 'sept': 9,\n 'sept.': 9,\n 'octobre': 10,\n 'oct': 10,\n 'oct.': 10,\n 'novembre': 11,\n 'nov': 11,\n 'nov.': 11,\n 'décembre': 12,\n 'decembre': 12,\n 'dec': 12,\n 'dec.': 12\n };\n exports.INTEGER_WORDS_PATTERN = '(?:un|deux|trois|quatre|cinq|six|sept|huit|neuf|dix|onze|douze|treize)';\n exports.INTEGER_WORDS = {\n 'un': 1,\n 'deux': 2,\n 'trois': 3,\n 'quatre': 4,\n 'cinq': 5,\n 'six': 6,\n 'sept': 7,\n 'huit': 8,\n 'neuf': 9,\n 'dix': 10,\n 'onze': 11,\n 'douze': 12,\n 'treize': 13\n };\n /***/\n },\n /* 10 */\n\n /***/\n function (module, exports, __webpack_require__) {\n /*\n \n */\n var Refiner = __webpack_require__(3).Refiner;\n\n exports.Refiner = function ENMergeDateRangeRefiner() {\n Refiner.call(this);\n\n this.pattern = function () {\n return /^\\s*(to|\\-)\\s*$/i;\n };\n\n this.refine = function (text, results, opt) {\n if (results.length < 2) return results;\n var mergedResult = [];\n var currResult = null;\n var prevResult = null;\n\n for (var i = 1; i < results.length; i++) {\n currResult = results[i];\n prevResult = results[i - 1];\n\n if (!prevResult.end && !currResult.end && this.isAbleToMerge(text, prevResult, currResult)) {\n prevResult = this.mergeResult(text, prevResult, currResult);\n currResult = null;\n i += 1;\n }\n\n mergedResult.push(prevResult);\n }\n\n if (currResult != null) {\n mergedResult.push(currResult);\n }\n\n return mergedResult;\n };\n\n this.isAbleToMerge = function (text, result1, result2) {\n var begin = result1.index + result1.text.length;\n var end = result2.index;\n var textBetween = text.substring(begin, end);\n return textBetween.match(this.pattern());\n };\n\n this.mergeResult = function (text, fromResult, toResult) {\n if (!fromResult.isOnlyWeekday() && !toResult.isOnlyWeekday()) {\n var timeKeys = {\n 'hour': true,\n 'minute': true,\n 'second': true\n };\n\n for (var key in toResult.start.knownValues) {\n if (!fromResult.start.isCertain(key)) {\n fromResult.start.assign(key, toResult.start.get(key));\n }\n }\n\n for (var key in fromResult.start.knownValues) {\n if (!toResult.start.isCertain(key)) {\n toResult.start.assign(key, fromResult.start.get(key));\n }\n }\n }\n\n if (fromResult.start.date().getTime() > toResult.start.date().getTime()) {\n var fromMoment = fromResult.start.dayjs();\n var toMoment = toResult.start.dayjs();\n\n if (fromResult.isOnlyWeekday() && fromMoment.add(-7, 'days').isBefore(toMoment)) {\n fromMoment = fromMoment.add(-7, 'days');\n fromResult.start.imply('day', fromMoment.date());\n fromResult.start.imply('month', fromMoment.month() + 1);\n fromResult.start.imply('year', fromMoment.year());\n } else if (toResult.isOnlyWeekday() && toMoment.add(7, 'days').isAfter(fromMoment)) {\n toMoment = toMoment.add(7, 'days');\n toResult.start.imply('day', toMoment.date());\n toResult.start.imply('month', toMoment.month() + 1);\n toResult.start.imply('year', toMoment.year());\n } else {\n var tmp = toResult;\n toResult = fromResult;\n fromResult = tmp;\n }\n }\n\n fromResult.end = toResult.start;\n\n for (var tag in toResult.tags) {\n fromResult.tags[tag] = true;\n }\n\n var startIndex = Math.min(fromResult.index, toResult.index);\n var endIndex = Math.max(fromResult.index + fromResult.text.length, toResult.index + toResult.text.length);\n fromResult.index = startIndex;\n fromResult.text = text.substring(startIndex, endIndex);\n fromResult.tags[this.constructor.name] = true;\n return fromResult;\n };\n };\n /***/\n\n },\n /* 11 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var options = exports.options = __webpack_require__(12);\n\n exports.parser = __webpack_require__(1);\n exports.refiner = __webpack_require__(3);\n exports.Parser = exports.parser.Parser;\n exports.Refiner = exports.refiner.Refiner;\n exports.Filter = exports.refiner.Filter;\n exports.ParsedResult = __webpack_require__(0).ParsedResult;\n exports.ParsedComponents = __webpack_require__(0).ParsedComponents;\n\n var Chrono = function Chrono(option) {\n option = option || exports.options.casualOption();\n this.parsers = new Object(option.parsers);\n this.refiners = new Object(option.refiners);\n };\n\n Chrono.prototype.parse = function (text, refDate, opt) {\n refDate = refDate || new Date();\n opt = opt || {};\n opt.forwardDate = opt.forwardDate || opt.forwardDate;\n var allResults = [];\n this.parsers.forEach(function (parser) {\n var results = parser.execute(text, refDate, opt);\n allResults = allResults.concat(results);\n });\n allResults.sort(function (a, b) {\n return a.index - b.index;\n });\n this.refiners.forEach(function (refiner) {\n allResults = refiner.refine(text, allResults, opt);\n });\n return allResults;\n };\n\n Chrono.prototype.parseDate = function (text, refDate, opt) {\n var results = this.parse(text, refDate, opt);\n\n if (results.length > 0) {\n return results[0].start.date();\n }\n\n return null;\n };\n\n exports.Chrono = Chrono;\n exports.strict = new Chrono(options.strictOption());\n exports.casual = new Chrono(options.casualOption());\n exports.en = new Chrono(options.mergeOptions([options.en.casual, options.commonPostProcessing]));\n exports.en_GB = new Chrono(options.mergeOptions([options.en_GB.casual, options.commonPostProcessing]));\n exports.de = new Chrono(options.mergeOptions([options.de.casual, options.en, options.commonPostProcessing]));\n exports.pt = new Chrono(options.mergeOptions([options.pt.casual, options.en, options.commonPostProcessing]));\n exports.es = new Chrono(options.mergeOptions([options.es.casual, options.en, options.commonPostProcessing]));\n exports.fr = new Chrono(options.mergeOptions([options.fr.casual, options.en, options.commonPostProcessing]));\n exports.ja = new Chrono(options.mergeOptions([options.ja.casual, options.en, options.commonPostProcessing]));\n\n exports.parse = function () {\n return exports.casual.parse.apply(exports.casual, arguments);\n };\n\n exports.parseDate = function () {\n return exports.casual.parseDate.apply(exports.casual, arguments);\n };\n /***/\n\n },\n /* 12 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var parser = __webpack_require__(1);\n\n var refiner = __webpack_require__(3);\n\n exports.mergeOptions = function (options) {\n var addedTypes = {};\n var mergedOption = {\n parsers: [],\n refiners: []\n };\n options.forEach(function (option) {\n if (option.call) {\n option = option.call();\n }\n\n if (option.parsers) {\n option.parsers.forEach(function (p) {\n if (!addedTypes[p.constructor]) {\n mergedOption.parsers.push(p);\n addedTypes[p.constructor] = true;\n }\n });\n }\n\n if (option.refiners) {\n option.refiners.forEach(function (r) {\n if (!addedTypes[r.constructor]) {\n mergedOption.refiners.push(r);\n addedTypes[r.constructor] = true;\n }\n });\n }\n });\n return mergedOption;\n };\n\n exports.commonPostProcessing = function () {\n return {\n refiners: [// These should be after all other refiners\n new refiner.ExtractTimezoneOffsetRefiner(), new refiner.ExtractTimezoneAbbrRefiner(), new refiner.UnlikelyFormatFilter()]\n };\n }; // -------------------------------------------------------------\n\n\n exports.strictOption = function () {\n var strictConfig = {\n strict: true\n };\n return exports.mergeOptions([exports.en(strictConfig), exports.de(strictConfig), exports.pt(strictConfig), exports.es(strictConfig), exports.fr(strictConfig), exports.ja(strictConfig), exports.zh, exports.commonPostProcessing]);\n };\n\n exports.casualOption = function () {\n return exports.mergeOptions([exports.en.casual, // Some German abbriviate overlap with common English\n exports.de({\n strict: true\n }), exports.pt, exports.es, exports.fr, exports.ja, exports.zh, exports.commonPostProcessing]);\n }; // -------------------------------------------------------------\n\n\n exports.de = function (config) {\n return {\n parsers: [new parser.DEDeadlineFormatParser(config), new parser.DEMonthNameLittleEndianParser(config), new parser.DEMonthNameParser(config), new parser.DESlashDateFormatParser(config), new parser.DETimeAgoFormatParser(config), new parser.DETimeExpressionParser(config)],\n refiners: [new refiner.OverlapRemovalRefiner(), new refiner.ForwardDateRefiner(), new refiner.DEMergeDateTimeRefiner(), new refiner.DEMergeDateRangeRefiner()]\n };\n };\n\n exports.de.casual = function () {\n var option = exports.de({\n strict: false\n });\n option.parsers.unshift(new parser.DECasualDateParser());\n option.parsers.unshift(new parser.DEWeekdayParser());\n return option;\n }; // -------------------------------------------------------------\n\n\n exports.en = function (config) {\n return {\n parsers: [new parser.ENISOFormatParser(config), new parser.ENDeadlineFormatParser(config), new parser.ENMonthNameLittleEndianParser(config), new parser.ENMonthNameMiddleEndianParser(config), new parser.ENMonthNameParser(config), new parser.ENSlashDateFormatParser(config), new parser.ENSlashDateFormatStartWithYearParser(config), new parser.ENSlashMonthFormatParser(config), new parser.ENTimeAgoFormatParser(config), new parser.ENTimeLaterFormatParser(config), new parser.ENTimeExpressionParser(config)],\n refiners: [new refiner.OverlapRemovalRefiner(), new refiner.ForwardDateRefiner(), // English\n new refiner.ENMergeDateTimeRefiner(), new refiner.ENMergeDateRangeRefiner(), new refiner.ENPrioritizeSpecificDateRefiner()]\n };\n };\n\n exports.en.casual = function (config) {\n config = config || {};\n config.strict = false;\n var option = exports.en(config); // en\n\n option.parsers.unshift(new parser.ENCasualDateParser());\n option.parsers.unshift(new parser.ENCasualTimeParser());\n option.parsers.unshift(new parser.ENWeekdayParser());\n option.parsers.unshift(new parser.ENRelativeDateFormatParser());\n return option;\n };\n\n exports.en_GB = function (config) {\n config = config || {};\n config.littleEndian = true;\n return exports.en(config);\n };\n\n exports.en_GB.casual = function (config) {\n config = config || {};\n config.littleEndian = true;\n return exports.en.casual(config);\n }; // -------------------------------------------------------------\n\n\n exports.ja = function () {\n return {\n parsers: [new parser.JPStandardParser()],\n refiners: [new refiner.OverlapRemovalRefiner(), new refiner.ForwardDateRefiner(), new refiner.JPMergeDateRangeRefiner()]\n };\n };\n\n exports.ja.casual = function () {\n var option = exports.ja();\n option.parsers.unshift(new parser.JPCasualDateParser());\n return option;\n }; // -------------------------------------------------------------\n\n\n exports.pt = function (config) {\n return {\n parsers: [new parser.PTTimeAgoFormatParser(config), new parser.PTDeadlineFormatParser(config), new parser.PTTimeExpressionParser(config), new parser.PTMonthNameLittleEndianParser(config), new parser.PTSlashDateFormatParser(config)],\n refiners: [new refiner.OverlapRemovalRefiner(), new refiner.ForwardDateRefiner()]\n };\n };\n\n exports.pt.casual = function () {\n var option = exports.pt({\n strict: false\n });\n option.parsers.unshift(new parser.PTCasualDateParser());\n option.parsers.unshift(new parser.PTWeekdayParser());\n return option;\n }; // -------------------------------------------------------------\n\n\n exports.es = function (config) {\n return {\n parsers: [new parser.ESTimeAgoFormatParser(config), new parser.ESDeadlineFormatParser(config), new parser.ESTimeExpressionParser(config), new parser.ESMonthNameLittleEndianParser(config), new parser.ESSlashDateFormatParser(config)],\n refiners: [new refiner.OverlapRemovalRefiner(), new refiner.ForwardDateRefiner()]\n };\n };\n\n exports.es.casual = function () {\n var option = exports.es({\n strict: false\n });\n option.parsers.unshift(new parser.ESCasualDateParser());\n option.parsers.unshift(new parser.ESWeekdayParser());\n return option;\n }; // -------------------------------------------------------------\n\n\n exports.fr = function (config) {\n return {\n parsers: [new parser.FRDeadlineFormatParser(config), new parser.FRMonthNameLittleEndianParser(config), new parser.FRSlashDateFormatParser(config), new parser.FRTimeAgoFormatParser(config), new parser.FRTimeExpressionParser(config)],\n refiners: [new refiner.OverlapRemovalRefiner(), new refiner.ForwardDateRefiner(), new refiner.FRMergeDateRangeRefiner(), new refiner.FRMergeDateTimeRefiner()]\n };\n };\n\n exports.fr.casual = function () {\n var option = exports.fr({\n strict: false\n });\n option.parsers.unshift(new parser.FRCasualDateParser());\n option.parsers.unshift(new parser.FRWeekdayParser());\n option.parsers.unshift(new parser.FRRelativeDateFormatParser());\n return option;\n }; // -------------------------------------------------------------\n\n\n exports.zh = function () {\n return {\n parsers: [new parser.ZHHantDateParser(), new parser.ZHHantWeekdayParser(), new parser.ZHHantTimeExpressionParser(), new parser.ZHHantCasualDateParser(), new parser.ZHHantDeadlineFormatParser()],\n refiners: [new refiner.OverlapRemovalRefiner(), new refiner.ForwardDateRefiner()]\n };\n };\n /***/\n\n },\n /* 13 */\n\n /***/\n function (module, exports, __webpack_require__) {\n /*\n ISO 8601\n http://www.w3.org/TR/NOTE-datetime\n - YYYY-MM-DD\n - YYYY-MM-DDThh:mmTZD\n - YYYY-MM-DDThh:mm:ssTZD\n - YYYY-MM-DDThh:mm:ss.sTZD \n - TZD = (Z or +hh:mm or -hh:mm)\n */\n var dayjs = __webpack_require__(2);\n\n var Parser = __webpack_require__(1).Parser;\n\n var ParsedResult = __webpack_require__(0).ParsedResult;\n\n var PATTERN = new RegExp('(\\\\W|^)' + '([0-9]{4})\\\\-([0-9]{1,2})\\\\-([0-9]{1,2})' + '(?:T' //..\n + '([0-9]{1,2}):([0-9]{1,2})' // hh:mm\n + '(?::([0-9]{1,2})(?:\\\\.(\\\\d{1,4}))?)?' // :ss.s\n + '(?:Z|([+-]\\\\d{2}):?(\\\\d{2})?)?' // TZD (Z or ±hh:mm or ±hhmm or ±hh)\n + ')?' //..\n + '(?=\\\\W|$)', 'i');\n var YEAR_NUMBER_GROUP = 2;\n var MONTH_NUMBER_GROUP = 3;\n var DATE_NUMBER_GROUP = 4;\n var HOUR_NUMBER_GROUP = 5;\n var MINUTE_NUMBER_GROUP = 6;\n var SECOND_NUMBER_GROUP = 7;\n var MILLISECOND_NUMBER_GROUP = 8;\n var TZD_HOUR_OFFSET_GROUP = 9;\n var TZD_MINUTE_OFFSET_GROUP = 10;\n\n exports.Parser = function ENISOFormatParser() {\n Parser.apply(this, arguments);\n\n this.pattern = function () {\n return PATTERN;\n };\n\n this.extract = function (text, ref, match, opt) {\n var text = match[0].substr(match[1].length);\n var index = match.index + match[1].length;\n var result = new ParsedResult({\n text: text,\n index: index,\n ref: ref\n });\n result.start.assign('year', parseInt(match[YEAR_NUMBER_GROUP]));\n result.start.assign('month', parseInt(match[MONTH_NUMBER_GROUP]));\n result.start.assign('day', parseInt(match[DATE_NUMBER_GROUP]));\n\n if (dayjs(result.start.get('month')) > 12 || dayjs(result.start.get('month')) < 1 || dayjs(result.start.get('day')) > 31 || dayjs(result.start.get('day')) < 1) {\n return null;\n }\n\n if (match[HOUR_NUMBER_GROUP] != null) {\n result.start.assign('hour', parseInt(match[HOUR_NUMBER_GROUP]));\n result.start.assign('minute', parseInt(match[MINUTE_NUMBER_GROUP]));\n\n if (match[SECOND_NUMBER_GROUP] != null) {\n result.start.assign('second', parseInt(match[SECOND_NUMBER_GROUP]));\n }\n\n if (match[MILLISECOND_NUMBER_GROUP] != null) {\n result.start.assign('millisecond', parseInt(match[MILLISECOND_NUMBER_GROUP]));\n }\n\n if (match[TZD_HOUR_OFFSET_GROUP] == null) {\n result.start.assign('timezoneOffset', 0);\n } else {\n var minuteOffset = 0;\n var hourOffset = parseInt(match[TZD_HOUR_OFFSET_GROUP]);\n if (match[TZD_MINUTE_OFFSET_GROUP] != null) minuteOffset = parseInt(match[TZD_MINUTE_OFFSET_GROUP]);\n var offset = hourOffset * 60;\n\n if (offset < 0) {\n offset -= minuteOffset;\n } else {\n offset += minuteOffset;\n }\n\n result.start.assign('timezoneOffset', offset);\n }\n }\n\n result.tags['ENISOFormatParser'] = true;\n return result;\n };\n };\n /***/\n\n },\n /* 14 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var dayjs = __webpack_require__(2);\n\n var Parser = __webpack_require__(1).Parser;\n\n var ParsedResult = __webpack_require__(0).ParsedResult;\n\n var util = __webpack_require__(4);\n\n var PATTERN = new RegExp('(\\\\W|^)' + '(within|in)\\\\s*' + '(' + util.INTEGER_WORDS_PATTERN + '|[0-9]+|an?(?:\\\\s*few)?|half(?:\\\\s*an?)?)\\\\s*' + '(seconds?|min(?:ute)?s?|hours?|days?|weeks?|months?|years?)\\\\s*' + '(?=\\\\W|$)', 'i');\n var STRICT_PATTERN = new RegExp('(\\\\W|^)' + '(within|in)\\\\s*' + '(' + util.INTEGER_WORDS_PATTERN + '|[0-9]+|an?)\\\\s*' + '(seconds?|minutes?|hours?|days?)\\\\s*' + '(?=\\\\W|$)', 'i');\n\n exports.Parser = function ENDeadlineFormatParser() {\n Parser.apply(this, arguments);\n\n this.pattern = function () {\n return this.isStrictMode() ? STRICT_PATTERN : PATTERN;\n };\n\n this.extract = function (text, ref, match, opt) {\n var index = match.index + match[1].length;\n var text = match[0];\n text = match[0].substr(match[1].length, match[0].length - match[1].length);\n var result = new ParsedResult({\n index: index,\n text: text,\n ref: ref\n });\n var num = match[3].toLowerCase();\n\n if (util.INTEGER_WORDS[num] !== undefined) {\n num = util.INTEGER_WORDS[num];\n } else if (num === 'a' || num === 'an') {\n num = 1;\n } else if (num.match(/few/i)) {\n num = 3;\n } else if (num.match(/half/i)) {\n num = 0.5;\n } else {\n num = parseInt(num);\n }\n\n var date = dayjs(ref);\n\n if (match[4].match(/day|week|month|year/i)) {\n if (match[4].match(/day/i)) {\n date = date.add(num, 'd');\n } else if (match[4].match(/week/i)) {\n date = date.add(num * 7, 'd');\n } else if (match[4].match(/month/i)) {\n date = date.add(num, 'month');\n } else if (match[4].match(/year/i)) {\n date = date.add(num, 'year');\n }\n\n result.start.imply('year', date.year());\n result.start.imply('month', date.month() + 1);\n result.start.imply('day', date.date());\n return result;\n }\n\n if (match[4].match(/hour/i)) {\n date = date.add(num, 'hour');\n } else if (match[4].match(/min/i)) {\n date = date.add(num, 'minute');\n } else if (match[4].match(/second/i)) {\n date = date.add(num, 'second');\n }\n\n result.start.imply('year', date.year());\n result.start.imply('month', date.month() + 1);\n result.start.imply('day', date.date());\n result.start.imply('hour', date.hour());\n result.start.imply('minute', date.minute());\n result.start.imply('second', date.second());\n result.tags['ENDeadlineFormatParser'] = true;\n return result;\n };\n };\n /***/\n\n },\n /* 15 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var dayjs = __webpack_require__(2);\n\n var Parser = __webpack_require__(1).Parser;\n\n var ParsedResult = __webpack_require__(0).ParsedResult;\n\n var util = __webpack_require__(4);\n\n var PATTERN = new RegExp('(\\\\W|^)' + '(this|next|last|past)\\\\s*' + '(' + util.INTEGER_WORDS_PATTERN + '|[0-9]+|few|half(?:\\\\s*an?)?)?\\\\s*' + '(seconds?|min(?:ute)?s?|hours?|days?|weeks?|months?|years?)(?=\\\\s*)' + '(?=\\\\W|$)', 'i');\n var MODIFIER_WORD_GROUP = 2;\n var MULTIPLIER_WORD_GROUP = 3;\n var RELATIVE_WORD_GROUP = 4;\n\n exports.Parser = function ENRelativeDateFormatParser() {\n Parser.apply(this, arguments);\n\n this.pattern = function () {\n return PATTERN;\n };\n\n this.extract = function (text, ref, match, opt) {\n var index = match.index + match[1].length;\n var modifier = match[MODIFIER_WORD_GROUP].toLowerCase().match(/^next/) ? 1 : -1;\n var text = match[0];\n text = match[0].substr(match[1].length, match[0].length - match[1].length);\n var result = new ParsedResult({\n index: index,\n text: text,\n ref: ref\n });\n result.tags['ENRelativeDateFormatParser'] = true;\n var num = match[MULTIPLIER_WORD_GROUP] === undefined ? '' : match[3].toLowerCase();\n\n if (util.INTEGER_WORDS[num] !== undefined) {\n num = util.INTEGER_WORDS[num];\n } else if (num === '') {\n num = 1;\n } else if (num.match(/few/i)) {\n num = 3;\n } else if (num.match(/half/i)) {\n num = 0.5;\n } else {\n num = parseInt(num);\n }\n\n num *= modifier;\n var date = dayjs(ref);\n\n if (match[MODIFIER_WORD_GROUP].toLowerCase().match(/^this/)) {\n if (match[MULTIPLIER_WORD_GROUP]) {\n return null;\n }\n\n if (match[RELATIVE_WORD_GROUP].match(/day|week|month|year/i)) {\n // This week\n if (match[RELATIVE_WORD_GROUP].match(/week/i)) {\n date = date.add(-date.get('d'), 'd');\n result.start.imply('day', date.date());\n result.start.imply('month', date.month() + 1);\n result.start.imply('year', date.year());\n } // This month\n else if (match[RELATIVE_WORD_GROUP].match(/month/i)) {\n date = date.add(-date.date() + 1, 'd');\n result.start.imply('day', date.date());\n result.start.assign('year', date.year());\n result.start.assign('month', date.month() + 1);\n } // This year\n else if (match[RELATIVE_WORD_GROUP].match(/year/i)) {\n date = date.add(-date.date() + 1, 'd');\n date = date.add(-date.month(), 'month');\n result.start.imply('day', date.date());\n result.start.imply('month', date.month() + 1);\n result.start.assign('year', date.year());\n }\n\n return result;\n }\n }\n\n if (match[RELATIVE_WORD_GROUP].match(/day|week|month|year/i)) {\n if (match[RELATIVE_WORD_GROUP].match(/day/i)) {\n date = date.add(num, 'd');\n result.start.assign('year', date.year());\n result.start.assign('month', date.month() + 1);\n result.start.assign('day', date.date());\n } else if (match[RELATIVE_WORD_GROUP].match(/week/i)) {\n date = date.add(num * 7, 'd'); // We don't know the exact date for next/last week so we imply\n // them\n\n result.start.imply('day', date.date());\n result.start.imply('month', date.month() + 1);\n result.start.imply('year', date.year());\n } else if (match[RELATIVE_WORD_GROUP].match(/month/i)) {\n date = date.add(num, 'month'); // We don't know the exact day for next/last month\n\n result.start.imply('day', date.date());\n result.start.assign('year', date.year());\n result.start.assign('month', date.month() + 1);\n } else if (match[RELATIVE_WORD_GROUP].match(/year/i)) {\n date = date.add(num, 'year'); // We don't know the exact day for month on next/last year\n\n result.start.imply('day', date.date());\n result.start.imply('month', date.month() + 1);\n result.start.assign('year', date.year());\n }\n\n return result;\n }\n\n if (match[RELATIVE_WORD_GROUP].match(/hour/i)) {\n date = date.add(num, 'hour');\n result.start.imply('minute', date.minute());\n result.start.imply('second', date.second());\n } else if (match[RELATIVE_WORD_GROUP].match(/min/i)) {\n date = date.add(num, 'minute');\n result.start.assign('minute', date.minute());\n result.start.imply('second', date.second());\n } else if (match[RELATIVE_WORD_GROUP].match(/second/i)) {\n date = date.add(num, 'second');\n result.start.assign('second', date.second());\n result.start.assign('minute', date.minute());\n }\n\n result.start.assign('hour', date.hour());\n result.start.assign('year', date.year());\n result.start.assign('month', date.month() + 1);\n result.start.assign('day', date.date());\n return result;\n };\n };\n /***/\n\n },\n /* 16 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var parser = __webpack_require__(1);\n\n var ParsedResult = __webpack_require__(0).ParsedResult;\n\n var util = __webpack_require__(4);\n\n var PATTERN = new RegExp('(\\\\W|^)' + '(?:on\\\\s*?)?' + '(?:(Sunday|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sun|Mon|Tue|Wed|Thu|Fri|Sat)\\\\s*,?\\\\s*)?' + '(([0-9]{1,2})(?:st|nd|rd|th)?|' + util.ORDINAL_WORDS_PATTERN + ')' + '(?:\\\\s*' + '(?:to|\\\\-|\\\\–|until|through|till|\\\\s)\\\\s*' + '(([0-9]{1,2})(?:st|nd|rd|th)?|' + util.ORDINAL_WORDS_PATTERN + ')' + ')?' + '(?:-|\\/|\\\\s*(?:of)?\\\\s*)' + '(' + util.MONTH_PATTERN + ')' + '(?:' + '(?:-|\\/|,?\\\\s*)' + '((?:' + '[1-9][0-9]{0,3}\\\\s*(?:BE|AD|BC)|' + '[1-2][0-9]{3}|' + '[5-9][0-9]' + ')(?![^\\\\s]\\\\d))' + ')?' + '(?=\\\\W|$)', 'i');\n var WEEKDAY_GROUP = 2;\n var DATE_GROUP = 3;\n var DATE_NUM_GROUP = 4;\n var DATE_TO_GROUP = 5;\n var DATE_TO_NUM_GROUP = 6;\n var MONTH_NAME_GROUP = 7;\n var YEAR_GROUP = 8;\n\n exports.Parser = function ENMonthNameLittleEndianParser() {\n parser.Parser.apply(this, arguments);\n\n this.pattern = function () {\n return PATTERN;\n };\n\n this.extract = function (text, ref, match, opt) {\n var result = new ParsedResult({\n text: match[0].substr(match[1].length, match[0].length - match[1].length),\n index: match.index + match[1].length,\n ref: ref\n });\n var month = match[MONTH_NAME_GROUP];\n month = util.MONTH_OFFSET[month.toLowerCase()];\n var day = match[DATE_NUM_GROUP] ? parseInt(match[DATE_NUM_GROUP]) : util.ORDINAL_WORDS[match[DATE_GROUP].trim().replace('-', ' ').toLowerCase()];\n var year = null;\n\n if (match[YEAR_GROUP]) {\n year = match[YEAR_GROUP];\n\n if (/BE/i.test(year)) {\n // Buddhist Era\n year = year.replace(/BE/i, '');\n year = parseInt(year) - 543;\n } else if (/BC/i.test(year)) {\n // Before Christ\n year = year.replace(/BC/i, '');\n year = -parseInt(year);\n } else if (/AD/i.test(year)) {\n year = year.replace(/AD/i, '');\n year = parseInt(year);\n } else {\n year = parseInt(year);\n\n if (year < 100) {\n if (year > 50) {\n year = year + 1900;\n } else {\n year = year + 2000;\n }\n }\n }\n }\n\n if (year) {\n result.start.assign('day', day);\n result.start.assign('month', month);\n result.start.assign('year', year);\n } else {\n year = parser.findYearClosestToRef(ref, day, month);\n result.start.assign('day', day);\n result.start.assign('month', month);\n result.start.imply('year', year);\n } // Weekday component\n\n\n if (match[WEEKDAY_GROUP]) {\n var weekday = match[WEEKDAY_GROUP];\n weekday = util.WEEKDAY_OFFSET[weekday.toLowerCase()];\n result.start.assign('weekday', weekday);\n } // Text can be 'range' value. Such as '12 - 13 January 2012'\n\n\n if (match[DATE_TO_GROUP]) {\n var endDate = match[DATE_TO_NUM_GROUP] ? parseInt(match[DATE_TO_NUM_GROUP]) : util.ORDINAL_WORDS[match[DATE_TO_GROUP].trim().replace('-', ' ').toLowerCase()];\n result.end = result.start.clone();\n result.end.assign('day', endDate);\n }\n\n result.tags['ENMonthNameLittleEndianParser'] = true;\n return result;\n };\n };\n /***/\n\n },\n /* 17 */\n\n /***/\n function (module, exports, __webpack_require__) {\n /*\n \n The parser for parsing US's date format that begin with month's name.\n \n EX.\n - January 13\n - January 13, 2012\n - January 13 - 15, 2012\n - Tuesday, January 13, 2012\n \n Watch out for:\n - January 12:00\n - January 12.44\n - January 1222344\n */\n var parser = __webpack_require__(1);\n\n var ParsedResult = __webpack_require__(0).ParsedResult;\n\n var util = __webpack_require__(4);\n\n var PATTERN = new RegExp('(\\\\W|^)' + '(?:' + '(?:on\\\\s*?)?' + '(Sunday|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sun\\\\.?|Mon\\\\.?|Tue\\\\.?|Wed\\\\.?|Thu\\\\.?|Fri\\\\.?|Sat\\\\.?)' + '\\\\s*,?\\\\s*)?' + '(' + util.MONTH_PATTERN + ')' + '(?:-|\\/|\\\\s*,?\\\\s*)' + '(([0-9]{1,2})(?:st|nd|rd|th)?|' + util.ORDINAL_WORDS_PATTERN + ')(?!\\\\s*(?:am|pm))\\\\s*' + '' + '(?:' + '(?:to|\\\\-)\\\\s*' + '(([0-9]{1,2})(?:st|nd|rd|th)?| ' + util.ORDINAL_WORDS_PATTERN + ')\\\\s*' + ')?' + '(?:' + '(?:-|\\/|\\\\s*,?\\\\s*)' + '(?:([0-9]{4})\\\\s*(BE|AD|BC)?|([0-9]{1,4})\\\\s*(AD|BC))\\\\s*' + ')?' + '(?=\\\\W|$)(?!\\\\:\\\\d)', 'i');\n var WEEKDAY_GROUP = 2;\n var MONTH_NAME_GROUP = 3;\n var DATE_GROUP = 4;\n var DATE_NUM_GROUP = 5;\n var DATE_TO_GROUP = 6;\n var DATE_TO_NUM_GROUP = 7;\n var YEAR_GROUP = 8;\n var YEAR_BE_GROUP = 9;\n var YEAR_GROUP2 = 10;\n var YEAR_BE_GROUP2 = 11;\n\n exports.Parser = function ENMonthNameMiddleEndianParser() {\n parser.Parser.apply(this, arguments);\n\n this.pattern = function () {\n return PATTERN;\n };\n\n this.extract = function (text, ref, match, opt) {\n var result = new ParsedResult({\n text: match[0].substr(match[1].length, match[0].length - match[1].length),\n index: match.index + match[1].length,\n ref: ref\n });\n var month = match[MONTH_NAME_GROUP];\n month = util.MONTH_OFFSET[month.toLowerCase()];\n var day = match[DATE_NUM_GROUP] ? parseInt(match[DATE_NUM_GROUP]) : util.ORDINAL_WORDS[match[DATE_GROUP].trim().replace('-', ' ').toLowerCase()];\n var year = null;\n\n if (match[YEAR_GROUP] || match[YEAR_GROUP2]) {\n year = match[YEAR_GROUP] || match[YEAR_GROUP2];\n year = parseInt(year);\n var yearBE = match[YEAR_BE_GROUP] || match[YEAR_BE_GROUP2];\n\n if (yearBE) {\n if (/BE/i.test(yearBE)) {\n // Buddhist Era\n year = year - 543;\n } else if (/BC/i.test(yearBE)) {\n // Before Christ\n year = -year;\n }\n } else if (year < 100) {\n year = year + 2000;\n }\n }\n\n if (year) {\n result.start.assign('day', day);\n result.start.assign('month', month);\n result.start.assign('year', year);\n } else {\n year = parser.findYearClosestToRef(ref, day, month);\n result.start.assign('day', day);\n result.start.assign('month', month);\n result.start.imply('year', year);\n } // Weekday component\n\n\n if (match[WEEKDAY_GROUP]) {\n var weekday = match[WEEKDAY_GROUP];\n weekday = util.WEEKDAY_OFFSET[weekday.toLowerCase()];\n result.start.assign('weekday', weekday);\n } // Text can be 'range' value. Such as 'January 12 - 13, 2012'\n\n\n if (match[DATE_TO_GROUP]) {\n var endDate = match[DATE_TO_NUM_GROUP] ? endDate = parseInt(match[DATE_TO_NUM_GROUP]) : util.ORDINAL_WORDS[match[DATE_TO_GROUP].replace('-', ' ').trim().toLowerCase()];\n result.end = result.start.clone();\n result.end.assign('day', endDate);\n }\n\n result.tags['ENMonthNameMiddleEndianParser'] = true;\n return result;\n };\n };\n /***/\n\n },\n /* 18 */\n\n /***/\n function (module, exports, __webpack_require__) {\n /*\n \n The parser for parsing month name and year.\n \n EX. \n - January\n - January 2012\n - January, 2012\n */\n var parser = __webpack_require__(1);\n\n var ParsedResult = __webpack_require__(0).ParsedResult;\n\n var util = __webpack_require__(4);\n\n var PATTERN = new RegExp('(^|\\\\D\\\\s+|[^\\\\w\\\\s])' + '(' + util.MONTH_PATTERN + ')' + '\\\\s*' + '(?:' + '[,-]?\\\\s*([0-9]{4})(\\\\s*BE|AD|BC)?' + ')?' + '(?=[^\\\\s\\\\w]|\\\\s+[^0-9]|\\\\s+$|$)', 'i');\n var MONTH_NAME_GROUP = 2;\n var YEAR_GROUP = 3;\n var YEAR_BE_GROUP = 4;\n\n exports.Parser = function ENMonthNameParser() {\n parser.Parser.apply(this, arguments);\n\n this.pattern = function () {\n return PATTERN;\n };\n\n this.extract = function (text, ref, match, opt) {\n var result = new ParsedResult({\n text: match[0].substr(match[1].length, match[0].length - match[1].length),\n index: match.index + match[1].length,\n ref: ref\n });\n var day = 1;\n var monthName = match[MONTH_NAME_GROUP];\n var month = util.MONTH_OFFSET[monthName.toLowerCase()];\n var year = null;\n\n if (match[YEAR_GROUP]) {\n year = match[YEAR_GROUP];\n year = parseInt(year);\n\n if (match[YEAR_BE_GROUP]) {\n if (match[YEAR_BE_GROUP].match(/BE/)) {\n // Buddhist Era\n year = year - 543;\n } else if (match[YEAR_BE_GROUP].match(/BC/)) {\n // Before Christ\n year = -year;\n }\n } else if (year < 100) {\n year = year + 2000;\n }\n }\n\n if (year) {\n result.start.imply('day', day);\n result.start.assign('month', month);\n result.start.assign('year', year);\n } else {\n year = parser.findYearClosestToRef(ref, day, month);\n result.start.imply('day', day);\n result.start.assign('month', month);\n result.start.imply('year', year);\n }\n\n if (result.text.match(/^\\w{3}$/)) {\n return false;\n }\n\n result.tags['ENMonthNameParser'] = true;\n return result;\n };\n };\n /***/\n\n },\n /* 19 */\n\n /***/\n function (module, exports, __webpack_require__) {\n /*\n Date format with slash \"/\" (also \"-\" and \".\") between numbers\n - Tuesday 11/3/2015 \n - 11/3/2015\n - 11/3\n \n By default the paser us \"middle-endien\" format (US English),\n then fallback to little-endian if failed.\n - 11/3/2015 = November 3rd, 2015\n - 23/4/2015 = April 23th, 2015\n \n If \"littleEndian\" config is set, the parser will try the little-endian first. \n - 11/3/2015 = March 11th, 2015\n */\n var dayjs = __webpack_require__(2);\n\n var Parser = __webpack_require__(1).Parser;\n\n var ParsedResult = __webpack_require__(0).ParsedResult;\n\n var PATTERN = new RegExp('(\\\\W|^)' + '(?:' + '(?:on\\\\s*?)?' + '((?:sun|mon|tues?|wed(?:nes)?|thu(?:rs?)?|fri|sat(?:ur)?)(?:day)?)' + '\\\\s*\\\\,?\\\\s*' + ')?' + '([0-3]{0,1}[0-9]{1})[\\\\/\\\\.\\\\-]([0-3]{0,1}[0-9]{1})' + '(?:' + '[\\\\/\\\\.\\\\-]' + '([0-9]{4}\\s*\\,?\\s*|[0-9]{2}\\s*\\,?\\s*)' + ')?' + '(\\\\W|$)', 'i');\n var DAYS_OFFSET = {\n 'sunday': 0,\n 'sun': 0,\n 'monday': 1,\n 'mon': 1,\n 'tuesday': 2,\n 'wednesday': 3,\n 'wed': 3,\n 'thursday': 4,\n 'thur': 4,\n 'friday': 5,\n 'fri': 5,\n 'saturday': 6,\n 'sat': 6\n };\n var OPENNING_GROUP = 1;\n var ENDING_GROUP = 6;\n var WEEKDAY_GROUP = 2;\n var FIRST_NUMBERS_GROUP = 3;\n var SECOND_NUMBERS_GROUP = 4;\n var YEAR_GROUP = 5;\n\n exports.Parser = function ENSlashDateFormatParser(config) {\n Parser.apply(this, arguments);\n config = config || {};\n var littleEndian = config.littleEndian;\n var MONTH_GROUP = littleEndian ? SECOND_NUMBERS_GROUP : FIRST_NUMBERS_GROUP;\n var DAY_GROUP = littleEndian ? FIRST_NUMBERS_GROUP : SECOND_NUMBERS_GROUP;\n\n this.pattern = function () {\n return PATTERN;\n };\n\n this.extract = function (text, ref, match, opt) {\n if (match[OPENNING_GROUP] == '/' || match[ENDING_GROUP] == '/') {\n // Long skip, if there is some overlapping like:\n // XX[/YY/ZZ]\n // [XX/YY/]ZZ\n match.index += match[0].length;\n return;\n }\n\n var index = match.index + match[OPENNING_GROUP].length;\n var text = match[0].substr(match[OPENNING_GROUP].length, match[0].length - match[ENDING_GROUP].length);\n var result = new ParsedResult({\n text: text,\n index: index,\n ref: ref\n });\n if (text.match(/^\\d\\.\\d$/)) return;\n if (text.match(/^\\d\\.\\d{1,2}\\.\\d{1,2}$/)) return; // MM/dd -> OK\n // MM.dd -> NG\n\n if (!match[YEAR_GROUP] && match[0].indexOf('/') < 0) return;\n var date = null;\n var year = match[YEAR_GROUP] || dayjs(ref).year() + '';\n var month = match[MONTH_GROUP];\n var day = match[DAY_GROUP];\n month = parseInt(month);\n day = parseInt(day);\n year = parseInt(year);\n\n if (month < 1 || month > 12) {\n if (month > 12) {\n // dd/mm/yyyy date format if day looks like a month, and month\n // looks like a day.\n if (day >= 1 && day <= 12 && month >= 13 && month <= 31) {\n // unambiguous\n var tday = month;\n month = day;\n day = tday;\n } else {\n // both month and day are <= 12\n return null;\n }\n }\n }\n\n if (day < 1 || day > 31) return null;\n\n if (year < 100) {\n if (year > 50) {\n year = year + 1900;\n } else {\n year = year + 2000;\n }\n }\n\n result.start.assign('day', day);\n result.start.assign('month', month);\n\n if (match[YEAR_GROUP]) {\n result.start.assign('year', year);\n } else {\n result.start.imply('year', year);\n } //Day of week\n\n\n if (match[WEEKDAY_GROUP]) {\n result.start.assign('weekday', DAYS_OFFSET[match[WEEKDAY_GROUP].toLowerCase()]);\n }\n\n result.tags['ENSlashDateFormatParser'] = true;\n return result;\n };\n };\n /***/\n\n },\n /* 20 */\n\n /***/\n function (module, exports, __webpack_require__) {\n /*\n Date format with slash \"/\" between numbers like ENSlashDateFormatParser,\n but this parser expect year before month and date. \n - YYYY/MM/DD\n - YYYY-MM-DD\n - YYYY.MM.DD\n */\n var dayjs = __webpack_require__(2);\n\n var Parser = __webpack_require__(1).Parser;\n\n var ParsedResult = __webpack_require__(0).ParsedResult;\n\n var util = __webpack_require__(4);\n\n var PATTERN = new RegExp('(\\\\W|^)' + '([0-9]{4})[\\\\-\\\\.\\\\/]' + '((?:' + util.MONTH_PATTERN + '|[0-9]{1,2}))[\\\\-\\\\.\\\\/]' + '([0-9]{1,2})' + '(?=\\\\W|$)', 'i');\n var YEAR_NUMBER_GROUP = 2;\n var MONTH_NUMBER_GROUP = 3;\n var DATE_NUMBER_GROUP = 4;\n\n exports.Parser = function ENSlashDateFormatStartWithYearParser() {\n Parser.apply(this, arguments);\n\n this.pattern = function () {\n return PATTERN;\n };\n\n this.extract = function (text, ref, match, opt) {\n var text = match[0].substr(match[1].length);\n var index = match.index + match[1].length;\n var result = new ParsedResult({\n text: text,\n index: index,\n ref: ref\n });\n var month = match[MONTH_NUMBER_GROUP].toLowerCase();\n month = util.MONTH_OFFSET[month] | month;\n result.start.assign('year', parseInt(match[YEAR_NUMBER_GROUP]));\n result.start.assign('month', parseInt(month));\n result.start.assign('day', parseInt(match[DATE_NUMBER_GROUP]));\n\n if (dayjs(result.start.get('month')) > 12 || dayjs(result.start.get('month')) < 1 || dayjs(result.start.get('day')) > 31 || dayjs(result.start.get('day')) < 1) {\n return null;\n }\n\n result.tags['ENDateFormatParser'] = true;\n return result;\n };\n };\n /***/\n\n },\n /* 21 */\n\n /***/\n function (module, exports, __webpack_require__) {\n /*\n Month/Year date format with slash \"/\" (also \"-\" and \".\") between numbers \n - 11/05\n - 06/2005\n */\n var Parser = __webpack_require__(1).Parser;\n\n var ParsedResult = __webpack_require__(0).ParsedResult;\n\n var PATTERN = new RegExp('(^|[^\\\\d/]\\\\s+|[^\\\\w\\\\s])' + '([0-9]|0[1-9]|1[012])/([0-9]{4})' + '(?=[^\\\\d/]|$)', 'i');\n var OPENNING_GROUP = 1;\n var MONTH_GROUP = 2;\n var YEAR_GROUP = 3;\n\n exports.Parser = function ENSlashMonthFormatParser(argument) {\n Parser.apply(this, arguments);\n\n this.pattern = function () {\n return PATTERN;\n };\n\n this.extract = function (text, ref, match, opt) {\n var index = match.index + match[OPENNING_GROUP].length;\n var text = match[0].substr(match[OPENNING_GROUP].length, match[0].length).trim();\n var result = new ParsedResult({\n text: text,\n index: index,\n ref: ref\n });\n var year = match[YEAR_GROUP];\n var month = match[MONTH_GROUP];\n var day = 1;\n month = parseInt(month);\n year = parseInt(year);\n result.start.imply('day', day);\n result.start.assign('month', month);\n result.start.assign('year', year);\n result.tags['ENSlashMonthFormatParser'] = true;\n return result;\n };\n };\n /***/\n\n },\n /* 22 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var dayjs = __webpack_require__(2);\n\n var Parser = __webpack_require__(1).Parser;\n\n var ParsedResult = __webpack_require__(0).ParsedResult;\n\n var util = __webpack_require__(4);\n\n var PATTERN = new RegExp('' + '(\\\\W|^)' + '(?:within\\\\s*)?' + '(' + util.TIME_UNIT_PATTERN + ')' + '(?:ago|before|earlier)(?=(?:\\\\W|$))', 'i');\n var STRICT_PATTERN = new RegExp('' + '(\\\\W|^)' + '(?:within\\\\s*)?' + '(' + util.TIME_UNIT_STRICT_PATTERN + ')' + 'ago(?=(?:\\\\W|$))', 'i');\n\n exports.Parser = function ENTimeAgoFormatParser() {\n Parser.apply(this, arguments);\n\n this.pattern = function () {\n return this.isStrictMode() ? STRICT_PATTERN : PATTERN;\n };\n\n this.extract = function (text, ref, match, opt) {\n if (match.index > 0 && text[match.index - 1].match(/\\w/)) return null;\n var text = match[0];\n text = match[0].substr(match[1].length, match[0].length - match[1].length);\n var index = match.index + match[1].length;\n var result = new ParsedResult({\n index: index,\n text: text,\n ref: ref\n });\n var fragments = util.extractDateTimeUnitFragments(match[2]);\n var date = dayjs(ref);\n\n for (var key in fragments) {\n date = date.add(-fragments[key], key);\n }\n\n if (fragments['hour'] > 0 || fragments['minute'] > 0 || fragments['second'] > 0) {\n result.start.assign('hour', date.hour());\n result.start.assign('minute', date.minute());\n result.start.assign('second', date.second());\n result.tags['ENTimeAgoFormatParser'] = true;\n }\n\n if (fragments['d'] > 0 || fragments['month'] > 0 || fragments['year'] > 0) {\n result.start.assign('day', date.date());\n result.start.assign('month', date.month() + 1);\n result.start.assign('year', date.year());\n } else {\n if (fragments['week'] > 0) {\n result.start.imply('weekday', date.day());\n }\n\n result.start.imply('day', date.date());\n result.start.imply('month', date.month() + 1);\n result.start.imply('year', date.year());\n }\n\n return result;\n };\n };\n /***/\n\n },\n /* 23 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var dayjs = __webpack_require__(2);\n\n var Parser = __webpack_require__(1).Parser;\n\n var ParsedResult = __webpack_require__(0).ParsedResult;\n\n var ParsedComponents = __webpack_require__(0).ParsedComponents;\n\n var FIRST_REG_PATTERN = new RegExp(\"(^|\\\\s|T)\" + \"(?:(?:at|from)\\\\s*)??\" + \"(\\\\d{1,4}|noon|midnight)\" + \"(?:\" + \"(?:\\\\.|\\\\:|\\\\:)(\\\\d{1,2})\" + \"(?:\" + \"(?:\\\\:|\\\\:)(\\\\d{2})(?:\\\\.(\\\\d{1,6}))?\" + \")?\" + \")?\" + \"(?:\\\\s*(A\\\\.M\\\\.|P\\\\.M\\\\.|AM?|PM?|O\\\\W*CLOCK))?\" + \"(?=\\\\W|$)\", 'i');\n var SECOND_REG_PATTERN = new RegExp(\"^\\\\s*\" + \"(\\\\-|\\\\–|\\\\~|\\\\〜|to|\\\\?)\\\\s*\" + \"(\\\\d{1,4})\" + \"(?:\" + \"(?:\\\\.|\\\\:|\\\\:)(\\\\d{1,2})\" + \"(?:\" + \"(?:\\\\.|\\\\:|\\\\:)(\\\\d{1,2})(?:\\\\.(\\\\d{1,6}))?\" + \")?\" + \")?\" + \"(?:\\\\s*(A\\\\.M\\\\.|P\\\\.M\\\\.|AM?|PM?|O\\\\W*CLOCK))?\" + \"(?=\\\\W|$)\", 'i');\n var HOUR_GROUP = 2;\n var MINUTE_GROUP = 3;\n var SECOND_GROUP = 4;\n var MILLI_SECOND_GROUP = 5;\n var AM_PM_HOUR_GROUP = 6;\n\n exports.Parser = function ENTimeExpressionParser() {\n Parser.apply(this, arguments);\n\n this.pattern = function () {\n return FIRST_REG_PATTERN;\n };\n\n this.extract = function (text, ref, match, opt) {\n // This pattern can be overlapped Ex. [12] AM, 1[2] AM\n if (match.index > 0 && text[match.index - 1].match(/\\w/)) return null;\n var refMoment = dayjs(ref);\n var result = new ParsedResult();\n result.ref = ref;\n result.index = match.index + match[1].length;\n result.text = match[0].substring(match[1].length);\n result.tags['ENTimeExpressionParser'] = true;\n result.start.imply('day', refMoment.date());\n result.start.imply('month', refMoment.month() + 1);\n result.start.imply('year', refMoment.year());\n var hour = 0;\n var minute = 0;\n var meridiem = -1; // ----- Millisecond\n\n if (match[MILLI_SECOND_GROUP] != null) {\n var millisecond = parseInt(match[MILLI_SECOND_GROUP].substring(0, 3));\n if (millisecond >= 1000) return null;\n result.start.assign('millisecond', millisecond);\n } // ----- Second\n\n\n if (match[SECOND_GROUP] != null) {\n var second = parseInt(match[SECOND_GROUP]);\n if (second >= 60) return null;\n result.start.assign('second', second);\n } // ----- Hours\n\n\n if (match[HOUR_GROUP].toLowerCase() == \"noon\") {\n meridiem = 1;\n hour = 12;\n } else if (match[HOUR_GROUP].toLowerCase() == \"midnight\") {\n meridiem = 0;\n hour = 0;\n } else {\n hour = parseInt(match[HOUR_GROUP]);\n } // ----- Minutes\n\n\n if (match[MINUTE_GROUP] != null) {\n minute = parseInt(match[MINUTE_GROUP]);\n } else if (hour > 100) {\n minute = hour % 100;\n hour = parseInt(hour / 100);\n }\n\n if (minute >= 60) {\n return null;\n }\n\n if (hour > 24) {\n return null;\n }\n\n if (hour >= 12) {\n meridiem = 1;\n } // ----- AM & PM \n\n\n if (match[AM_PM_HOUR_GROUP] != null) {\n if (hour > 12) return null;\n var ampm = match[AM_PM_HOUR_GROUP][0].toLowerCase();\n\n if (ampm == \"a\") {\n meridiem = 0;\n if (hour == 12) hour = 0;\n }\n\n if (ampm == \"p\") {\n meridiem = 1;\n if (hour != 12) hour += 12;\n }\n }\n\n result.start.assign('hour', hour);\n result.start.assign('minute', minute);\n\n if (meridiem >= 0) {\n result.start.assign('meridiem', meridiem);\n } else {\n if (hour < 12) {\n result.start.imply('meridiem', 0);\n } else {\n result.start.imply('meridiem', 1);\n }\n } // ==============================================================\n // Extracting the 'to' chunk\n // ==============================================================\n\n\n match = SECOND_REG_PATTERN.exec(text.substring(result.index + result.text.length));\n\n if (!match) {\n return result;\n } // Pattern \"YY.YY -XXXX\" is more like timezone offset\n\n\n if (match[0].match(/^\\s*(\\+|\\-)\\s*\\d{3,4}$/)) {\n return result;\n }\n\n if (result.end == null) {\n result.end = new ParsedComponents(null, result.start.date());\n }\n\n var hour = 0;\n var minute = 0;\n var meridiem = -1; // ----- Millisecond\n\n if (match[MILLI_SECOND_GROUP] != null) {\n var millisecond = parseInt(match[MILLI_SECOND_GROUP].substring(0, 3));\n if (millisecond >= 1000) return null;\n result.end.assign('millisecond', millisecond);\n } // ----- Second\n\n\n if (match[SECOND_GROUP] != null) {\n var second = parseInt(match[SECOND_GROUP]);\n if (second >= 60) return null;\n result.end.assign('second', second);\n }\n\n hour = parseInt(match[2]); // ----- Minute\n\n if (match[MINUTE_GROUP] != null) {\n minute = parseInt(match[MINUTE_GROUP]);\n if (minute >= 60) return result;\n } else if (hour > 100) {\n minute = hour % 100;\n hour = parseInt(hour / 100);\n }\n\n if (minute >= 60) {\n return null;\n }\n\n if (hour > 24) {\n return null;\n }\n\n if (hour >= 12) {\n meridiem = 1;\n } // ----- AM & PM \n\n\n if (match[AM_PM_HOUR_GROUP] != null) {\n if (hour > 12) return null;\n var ampm = match[AM_PM_HOUR_GROUP][0].toLowerCase();\n\n if (ampm == \"a\") {\n meridiem = 0;\n\n if (hour == 12) {\n hour = 0;\n\n if (!result.end.isCertain('day')) {\n result.end.imply('day', result.end.get('day') + 1);\n }\n }\n }\n\n if (ampm == \"p\") {\n meridiem = 1;\n if (hour != 12) hour += 12;\n }\n\n if (!result.start.isCertain('meridiem')) {\n if (meridiem == 0) {\n result.start.imply('meridiem', 0);\n\n if (result.start.get('hour') == 12) {\n result.start.assign('hour', 0);\n }\n } else {\n result.start.imply('meridiem', 1);\n\n if (result.start.get('hour') != 12) {\n result.start.assign('hour', result.start.get('hour') + 12);\n }\n }\n }\n }\n\n result.text = result.text + match[0];\n result.end.assign('hour', hour);\n result.end.assign('minute', minute);\n\n if (meridiem >= 0) {\n result.end.assign('meridiem', meridiem);\n } else {\n var startAtPM = result.start.isCertain('meridiem') && result.start.get('meridiem') == 1;\n\n if (startAtPM && result.start.get('hour') > hour) {\n // 10pm - 1 (am)\n result.end.imply('meridiem', 0);\n } else if (hour > 12) {\n result.end.imply('meridiem', 1);\n }\n }\n\n if (result.end.date().getTime() < result.start.date().getTime()) {\n result.end.imply('day', result.end.get('day') + 1);\n }\n\n return result;\n };\n };\n /***/\n\n },\n /* 24 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var dayjs = __webpack_require__(2);\n\n var Parser = __webpack_require__(1).Parser;\n\n var ParsedResult = __webpack_require__(0).ParsedResult;\n\n var util = __webpack_require__(4);\n\n var PATTERN = new RegExp('' +\n /*match[1]*/\n '(\\\\W|^)' +\n /*match[2]*/\n '(in )?' +\n /*match[3]*/\n '(' + util.TIME_UNIT_PATTERN + ')' +\n /*match[4]*/\n '(later|after|from now|henceforth|forward|out)?' +\n /*match[5]*/\n '(?=(?:\\\\W|$))', 'i');\n var STRICT_PATTERN = new RegExp('' +\n /*match[1]*/\n '(\\\\W|^)' +\n /*match[2]*/\n '(in )?' +\n /*match[3]*/\n '(' + util.TIME_UNIT_STRICT_PATTERN + ')' +\n /*match[4]*/\n '(later|from now)?' +\n /*match[5]*/\n '(?=(?:\\\\W|$))', 'i');\n\n exports.Parser = function ENTimeLaterFormatParser() {\n Parser.apply(this, arguments);\n\n this.pattern = function () {\n return this.isStrictMode() ? STRICT_PATTERN : PATTERN;\n };\n\n this.extract = function (text, ref, match, opt) {\n if (match.index > 0 && text[match.index - 1].match(/\\w/)) return null;\n var prefix = match[2];\n var suffix = match[4];\n if (!prefix && !suffix) return null;\n var preamble = match[1];\n var text = match[0].substr(preamble.length, match[0].length - preamble.length);\n var index = match.index + preamble.length;\n var result = new ParsedResult({\n index: index,\n text: text,\n ref: ref\n });\n var fragments = util.extractDateTimeUnitFragments(match[3]);\n var date = dayjs(ref);\n\n for (var key in fragments) {\n date = date.add(fragments[key], key);\n }\n\n if (fragments['hour'] > 0 || fragments['minute'] > 0 || fragments['second'] > 0) {\n result.start.assign('hour', date.hour());\n result.start.assign('minute', date.minute());\n result.start.assign('second', date.second());\n result.tags['ENTimeAgoFormatParser'] = true;\n }\n\n if (fragments['d'] > 0 || fragments['month'] > 0 || fragments['year'] > 0) {\n result.start.assign('day', date.date());\n result.start.assign('month', date.month() + 1);\n result.start.assign('year', date.year());\n } else {\n if (fragments['week'] > 0) {\n result.start.imply('weekday', date.day());\n }\n\n result.start.imply('day', date.date());\n result.start.imply('month', date.month() + 1);\n result.start.imply('year', date.year());\n }\n\n return result;\n };\n };\n /***/\n\n },\n /* 25 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var dayjs = __webpack_require__(2);\n\n var Parser = __webpack_require__(1).Parser;\n\n var ParsedResult = __webpack_require__(0).ParsedResult;\n\n var PATTERN = /(\\W|^)(now|today|tonight|last\\s*night|(?:tomorrow|tmr|yesterday)\\s*|tomorrow|tmr|yesterday)(?=\\W|$)/i;\n\n exports.Parser = function ENCasualDateParser() {\n Parser.apply(this, arguments);\n\n this.pattern = function () {\n return PATTERN;\n };\n\n this.extract = function (text, ref, match, opt) {\n var text = match[0].substr(match[1].length);\n var index = match.index + match[1].length;\n var result = new ParsedResult({\n index: index,\n text: text,\n ref: ref\n });\n var refMoment = dayjs(ref);\n var startMoment = refMoment;\n var lowerText = text.toLowerCase();\n\n if (lowerText == 'tonight') {\n // Normally means this coming midnight\n result.start.imply('hour', 22);\n result.start.imply('meridiem', 1);\n } else if (/^tomorrow|^tmr/.test(lowerText)) {\n // Check not \"Tomorrow\" on late night\n if (refMoment.hour() > 1) {\n startMoment = startMoment.add(1, 'day');\n }\n } else if (/^yesterday/.test(lowerText)) {\n startMoment = startMoment.add(-1, 'day');\n } else if (lowerText.match(/last\\s*night/)) {\n result.start.imply('hour', 0);\n\n if (refMoment.hour() > 6) {\n startMoment = startMoment.add(-1, 'day');\n }\n } else if (lowerText.match(\"now\")) {\n result.start.assign('hour', refMoment.hour());\n result.start.assign('minute', refMoment.minute());\n result.start.assign('second', refMoment.second());\n result.start.assign('millisecond', refMoment.millisecond());\n }\n\n result.start.assign('day', startMoment.date());\n result.start.assign('month', startMoment.month() + 1);\n result.start.assign('year', startMoment.year());\n result.tags['ENCasualDateParser'] = true;\n return result;\n };\n };\n /***/\n\n },\n /* 26 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var Parser = __webpack_require__(1).Parser;\n\n var ParsedResult = __webpack_require__(0).ParsedResult;\n\n var PATTERN = /(\\W|^)((this)?\\s*(morning|afternoon|evening|noon|night))/i;\n var TIME_MATCH = 4;\n\n exports.Parser = function ENCasualTimeParser() {\n Parser.apply(this, arguments);\n\n this.pattern = function () {\n return PATTERN;\n };\n\n this.extract = function (text, ref, match, opt) {\n var text = match[0].substr(match[1].length);\n var index = match.index + match[1].length;\n var result = new ParsedResult({\n index: index,\n text: text,\n ref: ref\n });\n if (!match[TIME_MATCH]) TIME_MATCH = 3;\n\n switch (match[TIME_MATCH].toLowerCase()) {\n case 'afternoon':\n result.start.imply('meridiem', 1);\n result.start.imply('hour', 15);\n break;\n\n case 'evening':\n case 'night':\n result.start.imply('meridiem', 1);\n result.start.imply('hour', 20);\n break;\n\n case 'morning':\n result.start.imply('meridiem', 0);\n result.start.imply('hour', 6);\n break;\n\n case 'noon':\n result.start.imply('meridiem', 0);\n result.start.imply('hour', 12);\n break;\n }\n\n result.tags['ENCasualTimeParser'] = true;\n return result;\n };\n };\n /***/\n\n },\n /* 27 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var dayjs = __webpack_require__(2);\n\n var parser = __webpack_require__(1);\n\n var ParsedResult = __webpack_require__(0).ParsedResult;\n\n var util = __webpack_require__(28);\n\n var PATTERN = /(?:(同|今|本|((昭和|平成|令和)?([0-90-9]{1,4}|元)))年\\s*)?([0-90-9]{1,2})月\\s*([0-90-9]{1,2})日/i;\n var SPECIAL_YEAR_GROUP = 1;\n var TYPICAL_YEAR_GROUP = 2;\n var ERA_GROUP = 3;\n var YEAR_NUMBER_GROUP = 4;\n var MONTH_GROUP = 5;\n var DAY_GROUP = 6;\n\n exports.Parser = function JPStandardParser() {\n parser.Parser.apply(this, arguments);\n\n this.pattern = function () {\n return PATTERN;\n };\n\n this.extract = function (text, ref, match, opt) {\n var result = new ParsedResult({\n text: match[0],\n index: match.index,\n ref: ref\n });\n var month = match[MONTH_GROUP];\n month = util.toHankaku(month);\n month = parseInt(month);\n var day = match[DAY_GROUP];\n day = util.toHankaku(day);\n day = parseInt(day);\n result.start.assign('day', day);\n result.start.assign('month', month);\n\n if (match[TYPICAL_YEAR_GROUP]) {\n var year = match[YEAR_NUMBER_GROUP];\n\n if (year == '元') {\n year = 1;\n } else {\n year = util.toHankaku(year);\n year = parseInt(year);\n }\n\n if (match[ERA_GROUP] == '令和') {\n year += 2018;\n } else if (match[ERA_GROUP] == '平成') {\n year += 1988;\n } else if (match[ERA_GROUP] == '昭和') {\n year += 1925;\n }\n\n result.start.assign('year', year);\n } else if (match[SPECIAL_YEAR_GROUP] && match[SPECIAL_YEAR_GROUP].match('同|今|本')) {\n var moment = dayjs(ref);\n result.start.assign('year', moment.year());\n } else {\n var _year = parser.findYearClosestToRef(ref, day, month);\n\n result.start.imply('year', _year);\n }\n\n result.tags['JPStandardParser'] = true;\n return result;\n };\n };\n /***/\n\n },\n /* 28 */\n\n /***/\n function (module, exports) {\n /**\n * to-hankaku.js\n * convert to ascii code strings.\n *\n * @version 1.0.1\n * @author think49\n * @url https://gist.github.com/964592\n * @license http://www.opensource.org/licenses/mit-license.php (The MIT License)\n */\n exports.toHankaku = function (String, fromCharCode) {\n function toHankaku(string) {\n return String(string).replace(/\\u2019/g, \"'\").replace(/\\u201D/g, \"\\\"\").replace(/\\u3000/g, \" \").replace(/\\uFFE5/g, \"\\xA5\").replace(/[\\uFF01\\uFF03-\\uFF06\\uFF08\\uFF09\\uFF0C-\\uFF19\\uFF1C-\\uFF1F\\uFF21-\\uFF3B\\uFF3D\\uFF3F\\uFF41-\\uFF5B\\uFF5D\\uFF5E]/g, alphaNum);\n }\n\n function alphaNum(token) {\n return fromCharCode(token.charCodeAt(0) - 65248);\n }\n\n return toHankaku;\n }(String, String.fromCharCode);\n /**\n * to-zenkaku.js\n * convert to multi byte strings.\n *\n * @version 1.0.2\n * @author think49\n * @url https://gist.github.com/964592\n * @license http://www.opensource.org/licenses/mit-license.php (The MIT License)\n */\n\n\n exports.toZenkaku = function (String, fromCharCode) {\n function toZenkaku(string) {\n return String(string).replace(/\\u0020/g, \"\\u3000\").replace(/\\u0022/g, \"\\u201D\").replace(/\\u0027/g, \"\\u2019\").replace(/\\u00A5/g, \"\\uFFE5\").replace(/[!#-&(),-9\\u003C-?A-[\\u005D_a-{}~]/g, alphaNum);\n }\n\n function alphaNum(token) {\n return fromCharCode(token.charCodeAt(0) + 65248);\n }\n\n return toZenkaku;\n }(String, String.fromCharCode);\n /***/\n\n },\n /* 29 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var dayjs = __webpack_require__(2);\n\n var Parser = __webpack_require__(1).Parser;\n\n var ParsedResult = __webpack_require__(0).ParsedResult;\n\n var PATTERN = /今日|当日|昨日|明日|今夜|今夕|今晩|今朝/i;\n\n exports.Parser = function JPCasualDateParser() {\n Parser.apply(this, arguments);\n\n this.pattern = function () {\n return PATTERN;\n };\n\n this.extract = function (text, ref, match, opt) {\n var index = match.index;\n var text = match[0];\n var result = new ParsedResult({\n index: index,\n text: text,\n ref: ref\n });\n var refMoment = dayjs(ref);\n var startMoment = refMoment;\n\n if (text == '今夜' || text == '今夕' || text == '今晩') {\n // Normally means this coming midnight \n result.start.imply('hour', 22);\n result.start.imply('meridiem', 1);\n } else if (text == '明日') {\n // Check not \"Tomorrow\" on late night\n if (refMoment.hour() > 4) {\n startMoment = startMoment.add(1, 'day');\n }\n } else if (text == '昨日') {\n startMoment = startMoment.add(-1, 'day');\n } else if (text.match(\"今朝\")) {\n result.start.imply('hour', 6);\n result.start.imply('meridiem', 0);\n }\n\n result.start.assign('day', startMoment.date());\n result.start.assign('month', startMoment.month() + 1);\n result.start.assign('year', startMoment.year());\n result.tags['JPCasualDateParser'] = true;\n return result;\n };\n };\n /***/\n\n },\n /* 30 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var dayjs = __webpack_require__(2);\n\n var Parser = __webpack_require__(1).Parser;\n\n var ParsedResult = __webpack_require__(0).ParsedResult;\n /*\n Valid patterns:\n - esta manhã -> today in the morning\n - esta tarde -> today in the afternoon/evening\n - esta noite -> tonight\n - ontem de -> yesterday in the morning\n - ontem a tarde -> yesterday in the afternoon/evening\n - ontem a noite -> yesterday at night\n - amanhã de manhã -> tomorrow in the morning\n - amanhã a tarde -> tomorrow in the afternoon/evening\n - amanhã a noite -> tomorrow at night\n - hoje -> today\n - ontem -> yesterday\n - amanhã -> tomorrow\n */\n\n\n var PATTERN = /(\\W|^)(agora|esta\\s*(manhã|tarde|noite)|(ontem|amanhã)\\s*(de|à)\\s*(manhã|tarde|noite)|hoje|amanhã|ontem|noite)(?=\\W|$)/i;\n\n exports.Parser = function PTCasualDateParser() {\n Parser.apply(this, arguments);\n\n this.pattern = function () {\n return PATTERN;\n };\n\n this.extract = function (text, ref, match, opt) {\n var text = match[0].substr(match[1].length);\n var index = match.index + match[1].length;\n var result = new ParsedResult({\n index: index,\n text: text,\n ref: ref\n });\n var refMoment = dayjs(ref);\n var startMoment = refMoment;\n var lowerText = text.toLowerCase().replace(/\\s+/g, ' ');\n\n if (lowerText == 'amanhã') {\n // Check not \"Tomorrow\" on late night\n if (refMoment.hour() > 1) {\n startMoment = startMoment.add(1, 'day');\n }\n } else if (lowerText == 'ontem') {\n startMoment = startMoment.add(-1, 'day');\n } else if (lowerText == 'noite') {\n result.start.imply('hour', 0);\n\n if (refMoment.hour() > 6) {\n startMoment = startMoment.add(-1, 'day');\n }\n } else if (lowerText.match(\"esta\")) {\n var secondMatch = match[3].toLowerCase();\n\n if (secondMatch == \"tarde\") {\n result.start.imply('hour', 18);\n } else if (secondMatch == \"manhã\") {\n result.start.imply('hour', 6);\n } else if (secondMatch == \"noite\") {\n // Normally means this coming midnight\n result.start.imply('hour', 22);\n result.start.imply('meridiem', 1);\n }\n } else if (lowerText.match(/de|à/)) {\n var firstMatch = match[4].toLowerCase();\n\n if (firstMatch === 'ontem') {\n startMoment = startMoment.add(-1, 'day');\n } else if (firstMatch === 'amanhã') {\n startMoment = startMoment.add(1, 'day');\n }\n\n var secondMatch = match[6].toLowerCase();\n\n if (secondMatch == \"tarde\") {\n result.start.imply('hour', 18);\n } else if (secondMatch == \"manhã\") {\n result.start.imply('hour', 9);\n } else if (secondMatch == \"noite\") {\n // Normally means this coming midnight\n result.start.imply('hour', 22);\n result.start.imply('meridiem', 1);\n }\n } else if (lowerText.match(\"agora\")) {\n result.start.imply('hour', refMoment.hour());\n result.start.imply('minute', refMoment.minute());\n result.start.imply('second', refMoment.second());\n result.start.imply('millisecond', refMoment.millisecond());\n }\n\n result.start.assign('day', startMoment.date());\n result.start.assign('month', startMoment.month() + 1);\n result.start.assign('year', startMoment.year());\n result.tags['PTCasualDateParser'] = true;\n return result;\n };\n };\n /***/\n\n },\n /* 31 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var dayjs = __webpack_require__(2);\n\n var Parser = __webpack_require__(1).Parser;\n\n var ParsedResult = __webpack_require__(0).ParsedResult;\n\n var PATTERN = /(\\W|^)(dentro\\s*de|em|em*até)\\s*([0-9]+|mei[oa]|uma?)\\s*(minutos?|horas?|dias?)\\s*(?=(?:\\W|$))/i;\n\n exports.Parser = function PTDeadlineFormatParser() {\n Parser.apply(this, arguments);\n\n this.pattern = function () {\n return PATTERN;\n };\n\n this.extract = function (text, ref, match, opt) {\n var index = match.index + match[1].length;\n var text = match[0];\n text = match[0].substr(match[1].length, match[0].length - match[1].length);\n var result = new ParsedResult({\n index: index,\n text: text,\n ref: ref\n });\n var num = parseInt(match[3]);\n\n if (isNaN(num)) {\n if (match[3].match(/(meio|meia)/)) {\n num = 0.5;\n } else {\n num = 1;\n }\n }\n\n var date = dayjs(ref);\n\n if (match[4].match(/dia/)) {\n date = date.add(num, 'd');\n result.start.assign('year', date.year());\n result.start.assign('month', date.month() + 1);\n result.start.assign('day', date.date());\n return result;\n }\n\n if (match[4].match(/hora/)) {\n date = date.add(num, 'hour');\n } else if (match[4].match(/minuto/)) {\n date = date.add(num, 'minute');\n }\n\n result.start.imply('year', date.year());\n result.start.imply('month', date.month() + 1);\n result.start.imply('day', date.date());\n result.start.assign('hour', date.hour());\n result.start.assign('minute', date.minute());\n result.tags['PTDeadlineFormatParser'] = true;\n return result;\n };\n };\n /***/\n\n },\n /* 32 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var parser = __webpack_require__(1);\n\n var ParsedResult = __webpack_require__(0).ParsedResult;\n\n var util = __webpack_require__(33);\n\n var DAYS_OFFSET = util.WEEKDAY_OFFSET;\n var PATTERN = new RegExp('(\\\\W|^)' + '(?:(domingo|segunda|segunda-feira|terça|terça-feira|quarta|quarta-feira|quinta|quinta-feira|sexta|sexta-feira|sábado|sabado|dom|seg|ter|qua|qui|sex|sab)\\\\s*,?\\\\s*)?' + '([0-9]{1,2})(?:º|ª|°)?' + '(?:\\\\s*(?:desde|de|\\\\-|\\\\–|ao?|\\\\s)\\\\s*([0-9]{1,2})(?:º|ª|°)?)?\\\\s*(?:de)?\\\\s*' + '(Jan(?:eiro|\\\\.)?|Fev(?:ereiro|\\\\.)?|Mar(?:ço|\\\\.)?|Abr(?:il|\\\\.)?|Mai(?:o|\\\\.)?|Jun(?:ho|\\\\.)?|Jul(?:ho|\\\\.)?|Ago(?:sto|\\\\.)?|Set(?:embro|\\\\.)?|Out(?:ubro|\\\\.)?|Nov(?:embro|\\\\.)?|Dez(?:embro|\\\\.)?)' + '(?:\\\\s*(?:de?)?(\\\\s*[0-9]{1,4}(?![^\\\\s]\\\\d))(\\\\s*[ad]\\\\.?\\\\s*c\\\\.?|a\\\\.?\\\\s*d\\\\.?)?)?' + '(?=\\\\W|$)', 'i');\n var WEEKDAY_GROUP = 2;\n var DATE_GROUP = 3;\n var DATE_TO_GROUP = 4;\n var MONTH_NAME_GROUP = 5;\n var YEAR_GROUP = 6;\n var YEAR_BE_GROUP = 7;\n\n exports.Parser = function PTMonthNameLittleEndianParser() {\n parser.Parser.apply(this, arguments);\n\n this.pattern = function () {\n return PATTERN;\n };\n\n this.extract = function (text, ref, match, opt) {\n var result = new ParsedResult({\n text: match[0].substr(match[1].length, match[0].length - match[1].length),\n index: match.index + match[1].length,\n ref: ref\n });\n var month = match[MONTH_NAME_GROUP];\n month = util.MONTH_OFFSET[month.toLowerCase()];\n var day = match[DATE_GROUP];\n day = parseInt(day);\n var year = null;\n\n if (match[YEAR_GROUP]) {\n year = match[YEAR_GROUP];\n year = parseInt(year);\n\n if (match[YEAR_BE_GROUP]) {\n if (/a\\.?\\s*c\\.?/i.test(match[YEAR_BE_GROUP])) {\n // antes de Cristo\n year = -year;\n }\n } else if (year < 100) {\n year = year + 2000;\n }\n }\n\n if (year) {\n result.start.assign('day', day);\n result.start.assign('month', month);\n result.start.assign('year', year);\n } else {\n year = parser.findYearClosestToRef(ref, day, month);\n result.start.assign('day', day);\n result.start.assign('month', month);\n result.start.imply('year', year);\n } // Weekday component\n\n\n if (match[WEEKDAY_GROUP]) {\n var weekday = match[WEEKDAY_GROUP];\n weekday = util.WEEKDAY_OFFSET[weekday.toLowerCase()];\n result.start.assign('weekday', weekday);\n } // Text can be 'range' value. Such as '12 - 13 January 2012'\n\n\n if (match[DATE_TO_GROUP]) {\n result.end = result.start.clone();\n result.end.assign('day', parseInt(match[DATE_TO_GROUP]));\n }\n\n result.tags['PTMonthNameLittleEndianParser'] = true;\n return result;\n };\n };\n /***/\n\n },\n /* 33 */\n\n /***/\n function (module, exports) {\n exports.WEEKDAY_OFFSET = {\n 'domingo': 0,\n 'dom': 0,\n 'segunda': 1,\n 'segunda-feira': 1,\n 'seg': 1,\n 'terça': 2,\n 'terca': 2,\n 'terça-feira': 2,\n 'terca-feira': 2,\n 'ter': 2,\n 'quarta': 3,\n 'quarta-feira': 3,\n 'qua': 3,\n 'quinta': 4,\n 'quinta-feira': 4,\n 'qui': 4,\n 'sexta': 5,\n 'sexta-feira': 5,\n 'sex': 5,\n 'sábado': 6,\n 'sabado': 6,\n 'sab': 6\n };\n exports.MONTH_OFFSET = {\n 'janeiro': 1,\n 'jan': 1,\n 'jan.': 1,\n 'fevereiro': 2,\n 'fev': 2,\n 'fev.': 2,\n 'março': 3,\n 'mar': 3,\n 'mar.': 3,\n 'abril': 4,\n 'abr': 4,\n 'abr.': 4,\n 'maio': 5,\n 'mai': 5,\n 'mai.': 5,\n 'junho': 6,\n 'jun': 6,\n 'jun.': 6,\n 'julho': 7,\n 'jul': 7,\n 'jul.': 7,\n 'agosto': 8,\n 'ago': 8,\n 'ago.': 8,\n 'setembro': 9,\n 'set': 9,\n 'set.': 9,\n 'outubro': 10,\n 'out': 10,\n 'out.': 10,\n 'novembro': 11,\n 'nov': 11,\n 'nov.': 11,\n 'dezembro': 12,\n 'dez': 12,\n 'dez.': 12\n };\n /***/\n },\n /* 34 */\n\n /***/\n function (module, exports, __webpack_require__) {\n /*\n Date format with slash \"/\" (also \"-\" and \".\") between numbers\n - Martes 3/11/2015\n - 3/11/2015\n - 3/11\n */\n var dayjs = __webpack_require__(2);\n\n var Parser = __webpack_require__(1).Parser;\n\n var ParsedResult = __webpack_require__(0).ParsedResult;\n\n var PATTERN = new RegExp('(\\\\W|^)' + '(?:' + '((?:domingo|dom|segunda|segunda-feira|seg|terça|terça-feira|ter|quarta|quarta-feira|qua|quinta|quinta-feira|qui|sexta|sexta-feira|sex|s[áa]bado|sab))' + '\\\\s*\\\\,?\\\\s*' + ')?' + '([0-1]{0,1}[0-9]{1})[\\\\/\\\\.\\\\-]([0-3]{0,1}[0-9]{1})' + '(?:' + '[\\\\/\\\\.\\\\-]' + '([0-9]{4}\\s*\\,?\\s*|[0-9]{2}\\s*\\,?\\s*)' + ')?' + '(\\\\W|$)', 'i');\n var DAYS_OFFSET = {\n 'domingo': 0,\n 'dom': 0,\n 'segunda': 1,\n 'segunda-feira': 1,\n 'seg': 1,\n 'terça': 2,\n 'terça-feira': 2,\n 'ter': 2,\n 'quarta': 3,\n 'quarta-feira': 3,\n 'qua': 3,\n 'quinta': 4,\n 'quinta-feira': 4,\n 'qui': 4,\n 'sexta': 5,\n 'sexta-feira': 5,\n 'sex': 5,\n 'sábado': 6,\n 'sabado': 6,\n 'sab': 6\n };\n var OPENNING_GROUP = 1;\n var ENDING_GROUP = 6; // in Spanish we use day/month/year\n\n var WEEKDAY_GROUP = 2;\n var MONTH_GROUP = 4;\n var DAY_GROUP = 3;\n var YEAR_GROUP = 5;\n\n exports.Parser = function PTSlashDateFormatParser(argument) {\n Parser.apply(this, arguments);\n\n this.pattern = function () {\n return PATTERN;\n };\n\n this.extract = function (text, ref, match, opt) {\n if (match[OPENNING_GROUP] == '/' || match[ENDING_GROUP] == '/') {\n // Long skip, if there is some overlapping like:\n // XX[/YY/ZZ]\n // [XX/YY/]ZZ\n match.index += match[0].length;\n return;\n }\n\n var index = match.index + match[OPENNING_GROUP].length;\n var text = match[0].substr(match[OPENNING_GROUP].length, match[0].length - match[ENDING_GROUP].length);\n var result = new ParsedResult({\n text: text,\n index: index,\n ref: ref\n });\n if (text.match(/^\\d\\.\\d$/)) return;\n if (text.match(/^\\d\\.\\d{1,2}\\.\\d{1,2}$/)) return; // MM/dd -> OK\n // MM.dd -> NG\n\n if (!match[YEAR_GROUP] && match[0].indexOf('/') < 0) return;\n var date = null;\n var year = match[YEAR_GROUP] || dayjs(ref).year() + '';\n var month = match[MONTH_GROUP];\n var day = match[DAY_GROUP];\n month = parseInt(month);\n day = parseInt(day);\n year = parseInt(year);\n\n if (month < 1 || month > 12) {\n if (month > 12) {\n // dd/mm/yyyy date format if day looks like a month, and month\n // looks like a day.\n if (day >= 1 && day <= 12 && month >= 13 && month <= 31) {\n // unambiguous\n var tday = month;\n month = day;\n day = tday;\n } else {\n // both month and day are <= 12\n return null;\n }\n }\n }\n\n if (day < 1 || day > 31) return null;\n\n if (year < 100) {\n if (year > 50) {\n year = year + 1900;\n } else {\n year = year + 2000;\n }\n }\n\n result.start.assign('day', day);\n result.start.assign('month', month);\n result.start.assign('year', year); //Day of week\n\n if (match[WEEKDAY_GROUP]) {\n result.start.assign('weekday', DAYS_OFFSET[match[WEEKDAY_GROUP].toLowerCase()]);\n }\n\n result.tags['PTSlashDateFormatParser'] = true;\n return result;\n };\n };\n /***/\n\n },\n /* 35 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var dayjs = __webpack_require__(2);\n\n var Parser = __webpack_require__(1).Parser;\n\n var ParsedResult = __webpack_require__(0).ParsedResult;\n\n var PATTERN = /(\\W|^)há\\s*([0-9]+|mei[oa]|uma?)\\s*(minutos?|horas?|semanas?|dias?|mes(es)?|anos?)(?=(?:\\W|$))/i;\n\n exports.Parser = function PTTimeAgoFormatParser() {\n Parser.apply(this, arguments);\n\n this.pattern = function () {\n return PATTERN;\n };\n\n this.extract = function (text, ref, match, opt) {\n if (match.index > 0 && text[match.index - 1].match(/\\w/)) return null;\n var text = match[0];\n text = match[0].substr(match[1].length, match[0].length - match[1].length);\n var index = match.index + match[1].length;\n var result = new ParsedResult({\n index: index,\n text: text,\n ref: ref\n });\n var num = parseInt(match[2]);\n\n if (isNaN(num)) {\n if (match[2].match(/mei/)) {\n num = 0.5;\n } else {\n num = 1;\n }\n }\n\n var date = dayjs(ref);\n\n if (match[3].match(/hora/) || match[3].match(/minuto/)) {\n if (match[3].match(/hora/)) {\n date = date.add(-num, 'hour');\n } else if (match[3].match(/minuto/)) {\n date = date.add(-num, 'minute');\n }\n\n result.start.imply('day', date.date());\n result.start.imply('month', date.month() + 1);\n result.start.imply('year', date.year());\n result.start.assign('hour', date.hour());\n result.start.assign('minute', date.minute());\n result.tags['PTTimeAgoFormatParser'] = true;\n return result;\n }\n\n if (match[3].match(/semana/)) {\n date = date.add(-num, 'week');\n result.start.imply('day', date.date());\n result.start.imply('month', date.month() + 1);\n result.start.imply('year', date.year());\n result.start.imply('weekday', date.day());\n return result;\n }\n\n if (match[3].match(/dia/)) {\n date = date.add(-num, 'd');\n }\n\n if (match[3].match(/mes/)) {\n date = date.add(-num, 'month');\n }\n\n if (match[3].match(/ano/)) {\n date = date.add(-num, 'year');\n }\n\n result.start.assign('day', date.date());\n result.start.assign('month', date.month() + 1);\n result.start.assign('year', date.year());\n return result;\n };\n };\n /***/\n\n },\n /* 36 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var dayjs = __webpack_require__(2);\n\n var Parser = __webpack_require__(1).Parser;\n\n var ParsedResult = __webpack_require__(0).ParsedResult;\n\n var ParsedComponents = __webpack_require__(0).ParsedComponents;\n\n var FIRST_REG_PATTERN = new RegExp(\"(^|\\\\s|T)\" + \"(?:(?:ao?|às?|das|da|de|do)\\\\s*)?\" + \"(\\\\d{1,4}|meio-dia|meia-noite|meio dia|meia noite)\" + \"(?:\" + \"(?:\\\\.|\\\\:|\\\\:)(\\\\d{1,2})\" + \"(?:\" + \"(?:\\\\:|\\\\:)(\\\\d{2})\" + \")?\" + \")?\" + \"(?:\\\\s*(A\\\\.M\\\\.|P\\\\.M\\\\.|AM?|PM?))?\" + \"(?=\\\\W|$)\", 'i');\n var SECOND_REG_PATTERN = new RegExp(\"^\\\\s*\" + \"(\\\\-|\\\\–|\\\\~|\\\\〜|a(?:o)?|\\\\?)\\\\s*\" + \"(\\\\d{1,4})\" + \"(?:\" + \"(?:\\\\.|\\\\:|\\\\:)(\\\\d{1,2})\" + \"(?:\" + \"(?:\\\\.|\\\\:|\\\\:)(\\\\d{1,2})\" + \")?\" + \")?\" + \"(?:\\\\s*(A\\\\.M\\\\.|P\\\\.M\\\\.|AM?|PM?))?\" + \"(?=\\\\W|$)\", 'i');\n var HOUR_GROUP = 2;\n var MINUTE_GROUP = 3;\n var SECOND_GROUP = 4;\n var AM_PM_HOUR_GROUP = 5;\n\n exports.Parser = function PTTimeExpressionParser() {\n Parser.apply(this, arguments);\n\n this.pattern = function () {\n return FIRST_REG_PATTERN;\n };\n\n this.extract = function (text, ref, match, opt) {\n // This pattern can be overlaped Ex. [12] AM, 1[2] AM\n if (match.index > 0 && text[match.index - 1].match(/\\w/)) return null;\n var refMoment = dayjs(ref);\n var result = new ParsedResult();\n result.ref = ref;\n result.index = match.index + match[1].length;\n result.text = match[0].substring(match[1].length);\n result.tags['PTTimeExpressionParser'] = true;\n result.start.imply('day', refMoment.date());\n result.start.imply('month', refMoment.month() + 1);\n result.start.imply('year', refMoment.year());\n var hour = 0;\n var minute = 0;\n var meridiem = -1; // ----- Second\n\n if (match[SECOND_GROUP] != null) {\n var second = parseInt(match[SECOND_GROUP]);\n if (second >= 60) return null;\n result.start.assign('second', second);\n } // ----- Hours\n\n\n if (match[HOUR_GROUP].toLowerCase().match(/meio\\-di/)) {\n meridiem = 1;\n hour = 12;\n } else if (match[HOUR_GROUP].toLowerCase() == \"meia-noite\") {\n meridiem = 0;\n hour = 0;\n } else {\n hour = parseInt(match[HOUR_GROUP]);\n } // ----- Minutes\n\n\n if (match[MINUTE_GROUP] != null) {\n minute = parseInt(match[MINUTE_GROUP]);\n } else if (hour > 100) {\n minute = hour % 100;\n hour = parseInt(hour / 100);\n }\n\n if (minute >= 60) {\n return null;\n }\n\n if (hour > 24) {\n return null;\n }\n\n if (hour >= 12) {\n meridiem = 1;\n } // ----- AM & PM\n\n\n if (match[AM_PM_HOUR_GROUP] != null) {\n if (hour > 12) return null;\n var ampm = match[AM_PM_HOUR_GROUP][0].toLowerCase();\n\n if (ampm == \"a\") {\n meridiem = 0;\n if (hour == 12) hour = 0;\n }\n\n if (ampm == \"p\") {\n meridiem = 1;\n if (hour != 12) hour += 12;\n }\n }\n\n result.start.assign('hour', hour);\n result.start.assign('minute', minute);\n\n if (meridiem >= 0) {\n result.start.assign('meridiem', meridiem);\n } // ==============================================================\n // Extracting the 'to' chunk\n // ==============================================================\n\n\n match = SECOND_REG_PATTERN.exec(text.substring(result.index + result.text.length));\n\n if (!match) {\n // Not accept number only result\n if (result.text.match(/^\\d+$/)) {\n return null;\n }\n\n return result;\n } // Pattern \"YY.YY -XXXX\" is more like timezone offset\n\n\n if (match[0].match(/^\\s*(\\+|\\-)\\s*\\d{3,4}$/)) {\n return result;\n }\n\n if (result.end == null) {\n result.end = new ParsedComponents(null, result.start.date());\n }\n\n var hour = 0;\n var minute = 0;\n var meridiem = -1; // ----- Second\n\n if (match[SECOND_GROUP] != null) {\n var second = parseInt(match[SECOND_GROUP]);\n if (second >= 60) return null;\n result.end.assign('second', second);\n }\n\n hour = parseInt(match[2]); // ----- Minute\n\n if (match[MINUTE_GROUP] != null) {\n minute = parseInt(match[MINUTE_GROUP]);\n if (minute >= 60) return result;\n } else if (hour > 100) {\n minute = hour % 100;\n hour = parseInt(hour / 100);\n }\n\n if (minute >= 60) {\n return null;\n }\n\n if (hour > 24) {\n return null;\n }\n\n if (hour >= 12) {\n meridiem = 1;\n } // ----- AM & PM\n\n\n if (match[AM_PM_HOUR_GROUP] != null) {\n if (hour > 12) return null;\n\n if (match[AM_PM_HOUR_GROUP][0].toLowerCase() == \"a\") {\n meridiem = 0;\n\n if (hour == 12) {\n hour = 0;\n\n if (!result.end.isCertain('day')) {\n result.end.imply('day', result.end.get('day') + 1);\n }\n }\n }\n\n if (match[AM_PM_HOUR_GROUP][0].toLowerCase() == \"p\") {\n meridiem = 1;\n if (hour != 12) hour += 12;\n }\n\n if (!result.start.isCertain('meridiem')) {\n if (meridiem == 0) {\n result.start.imply('meridiem', 0);\n\n if (result.start.get('hour') == 12) {\n result.start.assign('hour', 0);\n }\n } else {\n result.start.imply('meridiem', 1);\n\n if (result.start.get('hour') != 12) {\n result.start.assign('hour', result.start.get('hour') + 12);\n }\n }\n }\n } else if (hour >= 12) {\n meridiem = 1;\n }\n\n result.text = result.text + match[0];\n result.end.assign('hour', hour);\n result.end.assign('minute', minute);\n\n if (meridiem >= 0) {\n result.end.assign('meridiem', meridiem);\n }\n\n if (result.end.date().getTime() < result.start.date().getTime()) {\n result.end.imply('day', result.end.get('day') + 1);\n }\n\n return result;\n };\n };\n /***/\n\n },\n /* 37 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var Parser = __webpack_require__(1).Parser;\n\n var ParsedResult = __webpack_require__(0).ParsedResult;\n\n var updateParsedComponent = __webpack_require__(5).updateParsedComponent;\n\n var DAYS_OFFSET = {\n 'domingo': 0,\n 'dom': 0,\n 'segunda': 1,\n 'segunda-feira': 1,\n 'seg': 1,\n 'terça': 2,\n 'terça-feira': 2,\n 'ter': 2,\n 'quarta': 3,\n 'quarta-feira': 3,\n 'qua': 3,\n 'quinta': 4,\n 'quinta-feira': 4,\n 'qui': 4,\n 'sexta': 5,\n 'sexta-feira': 5,\n 'sex': 5,\n 'sábado': 6,\n 'sabado': 6,\n 'sab': 6\n };\n var PATTERN = new RegExp('(\\\\W|^)' + '(?:(?:\\\\,|\\\\(|\\\\()\\\\s*)?' + '(?:(este|esta|passado|pr[oó]ximo)\\\\s*)?' + '(' + Object.keys(DAYS_OFFSET).join('|') + ')' + '(?:\\\\s*(?:\\\\,|\\\\)|\\\\)))?' + '(?:\\\\s*(este|esta|passado|pr[óo]ximo)\\\\s*semana)?' + '(?=\\\\W|$)', 'i');\n var PREFIX_GROUP = 2;\n var WEEKDAY_GROUP = 3;\n var POSTFIX_GROUP = 4;\n\n exports.Parser = function PTWeekdayParser() {\n Parser.apply(this, arguments);\n\n this.pattern = function () {\n return PATTERN;\n };\n\n this.extract = function (text, ref, match, opt) {\n var index = match.index + match[1].length;\n var text = match[0].substr(match[1].length, match[0].length - match[1].length);\n var result = new ParsedResult({\n index: index,\n text: text,\n ref: ref\n });\n var dayOfWeek = match[WEEKDAY_GROUP].toLowerCase();\n var offset = DAYS_OFFSET[dayOfWeek];\n if (offset === undefined) return null;\n var modifier = null;\n var prefix = match[PREFIX_GROUP];\n var postfix = match[POSTFIX_GROUP];\n\n if (prefix || postfix) {\n var norm = prefix || postfix;\n norm = norm.toLowerCase();\n\n if (norm == 'passado') {\n modifier = 'this';\n } else if (norm == 'próximo' || norm == 'proximo') {\n modifier = 'next';\n } else if (norm == 'este') {\n modifier = 'this';\n }\n }\n\n updateParsedComponent(result, ref, offset, modifier);\n result.tags['PTWeekdayParser'] = true;\n return result;\n };\n };\n /***/\n\n },\n /* 38 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var dayjs = __webpack_require__(2);\n\n var Parser = __webpack_require__(1).Parser;\n\n var ParsedResult = __webpack_require__(0).ParsedResult;\n /*\n Valid patterns:\n - esta mañana -> today in the morning\n - esta tarde -> today in the afternoon/evening\n - esta noche -> tonight\n - ayer por la mañana -> yesterday in the morning\n - ayer por la tarde -> yesterday in the afternoon/evening\n - ayer por la noche -> yesterday at night\n - mañana por la mañana -> tomorrow in the morning\n - mañana por la tarde -> tomorrow in the afternoon/evening\n - mañana por la noche -> tomorrow at night\n - anoche -> tomorrow at night\n - hoy -> today\n - ayer -> yesterday\n - mañana -> tomorrow\n */\n\n\n var PATTERN = /(\\W|^)(ahora|esta\\s*(mañana|tarde|noche)|(ayer|mañana)\\s*por\\s*la\\s*(mañana|tarde|noche)|hoy|mañana|ayer|anoche)(?=\\W|$)/i;\n\n exports.Parser = function ESCasualDateParser() {\n Parser.apply(this, arguments);\n\n this.pattern = function () {\n return PATTERN;\n };\n\n this.extract = function (text, ref, match, opt) {\n var text = match[0].substr(match[1].length);\n var index = match.index + match[1].length;\n var result = new ParsedResult({\n index: index,\n text: text,\n ref: ref\n });\n var refMoment = dayjs(ref);\n var startMoment = refMoment;\n var lowerText = text.toLowerCase().replace(/\\s+/g, ' ');\n\n if (lowerText == 'mañana') {\n // Check not \"Tomorrow\" on late night\n if (refMoment.hour() > 1) {\n startMoment = startMoment.add(1, 'day');\n }\n } else if (lowerText == 'ayer') {\n startMoment = startMoment.add(-1, 'day');\n } else if (lowerText == 'anoche') {\n result.start.imply('hour', 0);\n\n if (refMoment.hour() > 6) {\n startMoment = startMoment.add(-1, 'day');\n }\n } else if (lowerText.match(\"esta\")) {\n var secondMatch = match[3].toLowerCase();\n\n if (secondMatch == \"tarde\") {\n result.start.imply('hour', 18);\n } else if (secondMatch == \"mañana\") {\n result.start.imply('hour', 6);\n } else if (secondMatch == \"noche\") {\n // Normally means this coming midnight\n result.start.imply('hour', 22);\n result.start.imply('meridiem', 1);\n }\n } else if (lowerText.match(/por\\s*la/)) {\n var firstMatch = match[4].toLowerCase();\n\n if (firstMatch === 'ayer') {\n startMoment = startMoment.add(-1, 'day');\n } else if (firstMatch === 'mañana') {\n startMoment = startMoment.add(1, 'day');\n }\n\n var secondMatch = match[5].toLowerCase();\n\n if (secondMatch == \"tarde\") {\n result.start.imply('hour', 18);\n } else if (secondMatch == \"mañana\") {\n result.start.imply('hour', 9);\n } else if (secondMatch == \"noche\") {\n // Normally means this coming midnight\n result.start.imply('hour', 22);\n result.start.imply('meridiem', 1);\n }\n } else if (lowerText.match(\"ahora\")) {\n result.start.imply('hour', refMoment.hour());\n result.start.imply('minute', refMoment.minute());\n result.start.imply('second', refMoment.second());\n result.start.imply('millisecond', refMoment.millisecond());\n }\n\n result.start.assign('day', startMoment.date());\n result.start.assign('month', startMoment.month() + 1);\n result.start.assign('year', startMoment.year());\n result.tags['ESCasualDateParser'] = true;\n return result;\n };\n };\n /***/\n\n },\n /* 39 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var dayjs = __webpack_require__(2);\n\n var Parser = __webpack_require__(1).Parser;\n\n var ParsedResult = __webpack_require__(0).ParsedResult;\n\n var PATTERN = /(\\W|^)(dentro\\s*de|en)\\s*([0-9]+|medi[oa]|una?)\\s*(minutos?|horas?|d[ií]as?)\\s*(?=(?:\\W|$))/i;\n\n exports.Parser = function ESDeadlineFormatParser() {\n Parser.apply(this, arguments);\n\n this.pattern = function () {\n return PATTERN;\n };\n\n this.extract = function (text, ref, match, opt) {\n var index = match.index + match[1].length;\n var text = match[0];\n text = match[0].substr(match[1].length, match[0].length - match[1].length);\n var result = new ParsedResult({\n index: index,\n text: text,\n ref: ref\n });\n var num = parseInt(match[3]);\n\n if (isNaN(num)) {\n if (match[3].match(/medi/)) {\n num = 0.5;\n } else {\n num = 1;\n }\n }\n\n var date = dayjs(ref);\n\n if (match[4].match(/d[ií]a/)) {\n date = date.add(num, 'd');\n result.start.assign('year', date.year());\n result.start.assign('month', date.month() + 1);\n result.start.assign('day', date.date());\n return result;\n }\n\n if (match[4].match(/hora/)) {\n date = date.add(num, 'hour');\n } else if (match[4].match(/minuto/)) {\n date = date.add(num, 'minute');\n }\n\n result.start.imply('year', date.year());\n result.start.imply('month', date.month() + 1);\n result.start.imply('day', date.date());\n result.start.assign('hour', date.hour());\n result.start.assign('minute', date.minute());\n result.tags['ESDeadlineFormatParser'] = true;\n return result;\n };\n };\n /***/\n\n },\n /* 40 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var dayjs = __webpack_require__(2);\n\n var Parser = __webpack_require__(1).Parser;\n\n var ParsedResult = __webpack_require__(0).ParsedResult;\n\n var PATTERN = /(\\W|^)hace\\s*([0-9]+|medi[oa]|una?)\\s*(minutos?|horas?|semanas?|d[ií]as?|mes(es)?|años?)(?=(?:\\W|$))/i;\n\n exports.Parser = function ESTimeAgoFormatParser() {\n Parser.apply(this, arguments);\n\n this.pattern = function () {\n return PATTERN;\n };\n\n this.extract = function (text, ref, match, opt) {\n if (match.index > 0 && text[match.index - 1].match(/\\w/)) return null;\n var text = match[0];\n text = match[0].substr(match[1].length, match[0].length - match[1].length);\n var index = match.index + match[1].length;\n var result = new ParsedResult({\n index: index,\n text: text,\n ref: ref\n });\n var num = parseInt(match[2]);\n\n if (isNaN(num)) {\n if (match[2].match(/medi/)) {\n num = 0.5;\n } else {\n num = 1;\n }\n }\n\n var date = dayjs(ref);\n\n if (match[3].match(/hora/) || match[3].match(/minuto/)) {\n if (match[3].match(/hora/)) {\n date = date.add(-num, 'hour');\n } else if (match[3].match(/minuto/)) {\n date = date.add(-num, 'minute');\n }\n\n result.start.imply('day', date.date());\n result.start.imply('month', date.month() + 1);\n result.start.imply('year', date.year());\n result.start.assign('hour', date.hour());\n result.start.assign('minute', date.minute());\n result.tags['ESTimeAgoFormatParser'] = true;\n return result;\n }\n\n if (match[3].match(/semana/)) {\n date = date.add(-num, 'week');\n result.start.imply('day', date.date());\n result.start.imply('month', date.month() + 1);\n result.start.imply('year', date.year());\n result.start.imply('weekday', date.day());\n return result;\n }\n\n if (match[3].match(/d[ií]a/)) {\n date = date.add(-num, 'd');\n }\n\n if (match[3].match(/mes/)) {\n date = date.add(-num, 'month');\n }\n\n if (match[3].match(/año/)) {\n date = date.add(-num, 'year');\n }\n\n result.start.assign('day', date.date());\n result.start.assign('month', date.month() + 1);\n result.start.assign('year', date.year());\n return result;\n };\n };\n /***/\n\n },\n /* 41 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var dayjs = __webpack_require__(2);\n\n var Parser = __webpack_require__(1).Parser;\n\n var ParsedResult = __webpack_require__(0).ParsedResult;\n\n var ParsedComponents = __webpack_require__(0).ParsedComponents;\n\n var FIRST_REG_PATTERN = new RegExp(\"(^|\\\\s|T)\" + \"(?:(?:a las?|al?|desde|de)\\\\s*)?\" + \"(\\\\d{1,4}|mediod[ií]a|medianoche)\" + \"(?:\" + \"(?:\\\\.|\\\\:|\\\\:)(\\\\d{1,2})\" + \"(?:\" + \"(?:\\\\:|\\\\:)(\\\\d{2})\" + \")?\" + \")?\" + \"(?:\\\\s*(A\\\\.M\\\\.|P\\\\.M\\\\.|AM?|PM?))?\" + \"(?=\\\\W|$)\", 'i');\n var SECOND_REG_PATTERN = new RegExp(\"^\\\\s*\" + \"(\\\\-|\\\\–|\\\\~|\\\\〜|a(?:\\s*las)?|\\\\?)\\\\s*\" + \"(\\\\d{1,4})\" + \"(?:\" + \"(?:\\\\.|\\\\:|\\\\:)(\\\\d{1,2})\" + \"(?:\" + \"(?:\\\\.|\\\\:|\\\\:)(\\\\d{1,2})\" + \")?\" + \")?\" + \"(?:\\\\s*(A\\\\.M\\\\.|P\\\\.M\\\\.|AM?|PM?))?\" + \"(?=\\\\W|$)\", 'i');\n var HOUR_GROUP = 2;\n var MINUTE_GROUP = 3;\n var SECOND_GROUP = 4;\n var AM_PM_HOUR_GROUP = 5;\n\n exports.Parser = function ESTimeExpressionParser() {\n Parser.apply(this, arguments);\n\n this.pattern = function () {\n return FIRST_REG_PATTERN;\n };\n\n this.extract = function (text, ref, match, opt) {\n // This pattern can be overlaped Ex. [12] AM, 1[2] AM\n if (match.index > 0 && text[match.index - 1].match(/\\w/)) return null;\n var refMoment = dayjs(ref);\n var result = new ParsedResult();\n result.ref = ref;\n result.index = match.index + match[1].length;\n result.text = match[0].substring(match[1].length);\n result.tags['ESTimeExpressionParser'] = true;\n result.start.imply('day', refMoment.date());\n result.start.imply('month', refMoment.month() + 1);\n result.start.imply('year', refMoment.year());\n var hour = 0;\n var minute = 0;\n var meridiem = -1; // ----- Second\n\n if (match[SECOND_GROUP] != null) {\n var second = parseInt(match[SECOND_GROUP]);\n if (second >= 60) return null;\n result.start.assign('second', second);\n } // ----- Hours\n\n\n if (match[HOUR_GROUP].toLowerCase().match(/mediod/)) {\n meridiem = 1;\n hour = 12;\n } else if (match[HOUR_GROUP].toLowerCase() == \"medianoche\") {\n meridiem = 0;\n hour = 0;\n } else {\n hour = parseInt(match[HOUR_GROUP]);\n } // ----- Minutes\n\n\n if (match[MINUTE_GROUP] != null) {\n minute = parseInt(match[MINUTE_GROUP]);\n } else if (hour > 100) {\n minute = hour % 100;\n hour = parseInt(hour / 100);\n }\n\n if (minute >= 60) {\n return null;\n }\n\n if (hour > 24) {\n return null;\n }\n\n if (hour >= 12) {\n meridiem = 1;\n } // ----- AM & PM\n\n\n if (match[AM_PM_HOUR_GROUP] != null) {\n if (hour > 12) return null;\n var ampm = match[AM_PM_HOUR_GROUP][0].toLowerCase();\n\n if (ampm == \"a\") {\n meridiem = 0;\n if (hour == 12) hour = 0;\n }\n\n if (ampm == \"p\") {\n meridiem = 1;\n if (hour != 12) hour += 12;\n }\n }\n\n result.start.assign('hour', hour);\n result.start.assign('minute', minute);\n\n if (meridiem >= 0) {\n result.start.assign('meridiem', meridiem);\n } // ==============================================================\n // Extracting the 'to' chunk\n // ==============================================================\n\n\n match = SECOND_REG_PATTERN.exec(text.substring(result.index + result.text.length));\n\n if (!match) {\n // Not accept number only result\n if (result.text.match(/^\\d+$/)) {\n return null;\n }\n\n return result;\n } // Pattern \"YY.YY -XXXX\" is more like timezone offset\n\n\n if (match[0].match(/^\\s*(\\+|\\-)\\s*\\d{3,4}$/)) {\n return result;\n }\n\n if (result.end == null) {\n result.end = new ParsedComponents(null, result.start.date());\n }\n\n var hour = 0;\n var minute = 0;\n var meridiem = -1; // ----- Second\n\n if (match[SECOND_GROUP] != null) {\n var second = parseInt(match[SECOND_GROUP]);\n if (second >= 60) return null;\n result.end.assign('second', second);\n }\n\n hour = parseInt(match[2]); // ----- Minute\n\n if (match[MINUTE_GROUP] != null) {\n minute = parseInt(match[MINUTE_GROUP]);\n if (minute >= 60) return result;\n } else if (hour > 100) {\n minute = hour % 100;\n hour = parseInt(hour / 100);\n }\n\n if (minute >= 60) {\n return null;\n }\n\n if (hour > 24) {\n return null;\n }\n\n if (hour >= 12) {\n meridiem = 1;\n } // ----- AM & PM\n\n\n if (match[AM_PM_HOUR_GROUP] != null) {\n if (hour > 12) return null;\n\n if (match[AM_PM_HOUR_GROUP][0].toLowerCase() == \"a\") {\n meridiem = 0;\n\n if (hour == 12) {\n hour = 0;\n\n if (!result.end.isCertain('day')) {\n result.end.imply('day', result.end.get('day') + 1);\n }\n }\n }\n\n if (match[AM_PM_HOUR_GROUP][0].toLowerCase() == \"p\") {\n meridiem = 1;\n if (hour != 12) hour += 12;\n }\n\n if (!result.start.isCertain('meridiem')) {\n if (meridiem == 0) {\n result.start.imply('meridiem', 0);\n\n if (result.start.get('hour') == 12) {\n result.start.assign('hour', 0);\n }\n } else {\n result.start.imply('meridiem', 1);\n\n if (result.start.get('hour') != 12) {\n result.start.assign('hour', result.start.get('hour') + 12);\n }\n }\n }\n } else if (hour >= 12) {\n meridiem = 1;\n }\n\n result.text = result.text + match[0];\n result.end.assign('hour', hour);\n result.end.assign('minute', minute);\n\n if (meridiem >= 0) {\n result.end.assign('meridiem', meridiem);\n }\n\n if (result.end.date().getTime() < result.start.date().getTime()) {\n result.end.imply('day', result.end.get('day') + 1);\n }\n\n return result;\n };\n };\n /***/\n\n },\n /* 42 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var Parser = __webpack_require__(1).Parser;\n\n var ParsedResult = __webpack_require__(0).ParsedResult;\n\n var updateParsedComponent = __webpack_require__(5).updateParsedComponent;\n\n var DAYS_OFFSET = {\n 'domingo': 0,\n 'dom': 0,\n 'lunes': 1,\n 'lun': 1,\n 'martes': 2,\n 'mar': 2,\n 'miercoles': 3,\n 'miércoles': 3,\n 'mie': 3,\n 'jueves': 4,\n 'jue': 4,\n 'viernes': 5,\n 'vier': 5,\n 'sabado': 6,\n 'sábado': 6,\n 'sab': 6\n };\n var PATTERN = new RegExp('(\\\\W|^)' + '(?:(?:\\\\,|\\\\(|\\\\()\\\\s*)?' + '(?:(este|pasado|pr[oó]ximo)\\\\s*)?' + '(' + Object.keys(DAYS_OFFSET).join('|') + ')' + '(?:\\\\s*(?:\\\\,|\\\\)|\\\\)))?' + '(?:\\\\s*(este|pasado|pr[óo]ximo)\\\\s*week)?' + '(?=\\\\W|$)', 'i');\n var PREFIX_GROUP = 2;\n var WEEKDAY_GROUP = 3;\n var POSTFIX_GROUP = 4;\n\n exports.Parser = function ESWeekdayParser() {\n Parser.apply(this, arguments);\n\n this.pattern = function () {\n return PATTERN;\n };\n\n this.extract = function (text, ref, match, opt) {\n var index = match.index + match[1].length;\n var text = match[0].substr(match[1].length, match[0].length - match[1].length);\n var result = new ParsedResult({\n index: index,\n text: text,\n ref: ref\n });\n var dayOfWeek = match[WEEKDAY_GROUP].toLowerCase();\n var offset = DAYS_OFFSET[dayOfWeek];\n if (offset === undefined) return null;\n var modifier = null;\n var prefix = match[PREFIX_GROUP];\n var postfix = match[POSTFIX_GROUP];\n\n if (prefix || postfix) {\n var norm = prefix || postfix;\n norm = norm.toLowerCase();\n\n if (norm == 'pasado') {\n modifier = 'this';\n } else if (norm == 'próximo' || norm == 'proximo') {\n modifier = 'next';\n } else if (norm == 'este') {\n modifier = 'this';\n }\n }\n\n updateParsedComponent(result, ref, offset, modifier);\n result.tags['ESWeekdayParser'] = true;\n return result;\n };\n };\n /***/\n\n },\n /* 43 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var parser = __webpack_require__(1);\n\n var ParsedResult = __webpack_require__(0).ParsedResult;\n\n var util = __webpack_require__(44);\n\n var DAYS_OFFSET = util.WEEKDAY_OFFSET;\n var PATTERN = new RegExp('(\\\\W|^)' + '(?:(Domingo|Lunes|Martes|Miércoles|Miercoles|Jueves|Viernes|Sábado|Sabado|Dom|Lun|Mar|Mie|Jue|Vie|Sab)\\\\s*,?\\\\s*)?' + '([0-9]{1,2})(?:º|ª|°)?' + '(?:\\\\s*(?:desde|de|\\\\-|\\\\–|al?|hasta|\\\\s)\\\\s*([0-9]{1,2})(?:º|ª|°)?)?\\\\s*(?:de)?\\\\s*' + '(Ene(?:ro|\\\\.)?|Feb(?:rero|\\\\.)?|Mar(?:zo|\\\\.)?|Abr(?:il|\\\\.)?|May(?:o|\\\\.)?|Jun(?:io|\\\\.)?|Jul(?:io|\\\\.)?|Ago(?:sto|\\\\.)?|Sep(?:tiembre|\\\\.)?|Set(?:iembre|\\\\.)?|Oct(?:ubre|\\\\.)?|Nov(?:iembre|\\\\.)?|Dic(?:iembre|\\\\.)?)' + '(?:\\\\s*(?:del?)?(\\\\s*[0-9]{1,4}(?![^\\\\s]\\\\d))(\\\\s*[ad]\\\\.?\\\\s*c\\\\.?|a\\\\.?\\\\s*d\\\\.?)?)?' + '(?=\\\\W|$)', 'i');\n var WEEKDAY_GROUP = 2;\n var DATE_GROUP = 3;\n var DATE_TO_GROUP = 4;\n var MONTH_NAME_GROUP = 5;\n var YEAR_GROUP = 6;\n var YEAR_BE_GROUP = 7;\n\n exports.Parser = function ESMonthNameLittleEndianParser() {\n parser.Parser.apply(this, arguments);\n\n this.pattern = function () {\n return PATTERN;\n };\n\n this.extract = function (text, ref, match, opt) {\n var result = new ParsedResult({\n text: match[0].substr(match[1].length, match[0].length - match[1].length),\n index: match.index + match[1].length,\n ref: ref\n });\n var month = match[MONTH_NAME_GROUP];\n month = util.MONTH_OFFSET[month.toLowerCase()];\n var day = match[DATE_GROUP];\n day = parseInt(day);\n var year = null;\n\n if (match[YEAR_GROUP]) {\n year = match[YEAR_GROUP];\n year = parseInt(year);\n\n if (match[YEAR_BE_GROUP]) {\n if (/a\\.?\\s*c\\.?/i.test(match[YEAR_BE_GROUP])) {\n // antes de Cristo\n year = -year;\n }\n } else if (year < 100) {\n year = year + 2000;\n }\n }\n\n if (year) {\n result.start.assign('day', day);\n result.start.assign('month', month);\n result.start.assign('year', year);\n } else {\n year = parser.findYearClosestToRef(ref, day, month);\n result.start.assign('day', day);\n result.start.assign('month', month);\n result.start.imply('year', year);\n } // Weekday component\n\n\n if (match[WEEKDAY_GROUP]) {\n var weekday = match[WEEKDAY_GROUP];\n weekday = util.WEEKDAY_OFFSET[weekday.toLowerCase()];\n result.start.assign('weekday', weekday);\n } // Text can be 'range' value. Such as '12 - 13 January 2012'\n\n\n if (match[DATE_TO_GROUP]) {\n result.end = result.start.clone();\n result.end.assign('day', parseInt(match[DATE_TO_GROUP]));\n }\n\n result.tags['ESMonthNameLittleEndianParser'] = true;\n return result;\n };\n };\n /***/\n\n },\n /* 44 */\n\n /***/\n function (module, exports) {\n exports.WEEKDAY_OFFSET = {\n 'domingo': 0,\n 'dom': 0,\n 'lunes': 1,\n 'lun': 1,\n 'martes': 2,\n 'mar': 2,\n 'miércoles': 3,\n 'miercoles': 3,\n 'mie': 3,\n 'jueves': 4,\n 'jue': 4,\n 'viernes': 5,\n 'vie': 5,\n 'sábado': 6,\n 'sabado': 6,\n 'sab': 6\n };\n exports.MONTH_OFFSET = {\n 'enero': 1,\n 'ene': 1,\n 'ene.': 1,\n 'febrero': 2,\n 'feb': 2,\n 'feb.': 2,\n 'marzo': 3,\n 'mar': 3,\n 'mar.': 3,\n 'abril': 4,\n 'abr': 4,\n 'abr.': 4,\n 'mayo': 5,\n 'may': 5,\n 'may.': 5,\n 'junio': 6,\n 'jun': 6,\n 'jun.': 6,\n 'julio': 7,\n 'jul': 7,\n 'jul.': 7,\n 'agosto': 8,\n 'ago': 8,\n 'ago.': 8,\n 'septiembre': 9,\n 'sep': 9,\n 'sept': 9,\n 'sep.': 9,\n 'sept.': 9,\n 'octubre': 10,\n 'oct': 10,\n 'oct.': 10,\n 'noviembre': 11,\n 'nov': 11,\n 'nov.': 11,\n 'diciembre': 12,\n 'dic': 12,\n 'dic.': 12\n };\n /***/\n },\n /* 45 */\n\n /***/\n function (module, exports, __webpack_require__) {\n /*\n Date format with slash \"/\" (also \"-\" and \".\") between numbers\n - Martes 3/11/2015\n - 3/11/2015\n - 3/11\n */\n var dayjs = __webpack_require__(2);\n\n var Parser = __webpack_require__(1).Parser;\n\n var ParsedResult = __webpack_require__(0).ParsedResult;\n\n var PATTERN = new RegExp('(\\\\W|^)' + '(?:' + '((?:domingo|dom|lunes|lun|martes|mar|mi[ée]rcoles|mie|jueves|jue|viernes|vie|s[áa]bado|sab))' + '\\\\s*\\\\,?\\\\s*' + ')?' + '([0-1]{0,1}[0-9]{1})[\\\\/\\\\.\\\\-]([0-3]{0,1}[0-9]{1})' + '(?:' + '[\\\\/\\\\.\\\\-]' + '([0-9]{4}\\s*\\,?\\s*|[0-9]{2}\\s*\\,?\\s*)' + ')?' + '(\\\\W|$)', 'i');\n var DAYS_OFFSET = {\n 'domingo': 0,\n 'dom': 0,\n 'lunes': 1,\n 'lun': 1,\n 'martes': 2,\n 'mar': 2,\n 'miercoles': 3,\n 'miércoles': 3,\n 'mie': 3,\n 'jueves': 4,\n 'jue': 4,\n 'viernes': 5,\n 'vier': 5,\n 'sábado': 6,\n 'sabado': 6,\n 'sab': 6\n };\n var OPENNING_GROUP = 1;\n var ENDING_GROUP = 6; // in Spanish we use day/month/year\n\n var WEEKDAY_GROUP = 2;\n var MONTH_GROUP = 4;\n var DAY_GROUP = 3;\n var YEAR_GROUP = 5;\n\n exports.Parser = function ESSlashDateFormatParser(argument) {\n Parser.apply(this, arguments);\n\n this.pattern = function () {\n return PATTERN;\n };\n\n this.extract = function (text, ref, match, opt) {\n if (match[OPENNING_GROUP] == '/' || match[ENDING_GROUP] == '/') {\n // Long skip, if there is some overlapping like:\n // XX[/YY/ZZ]\n // [XX/YY/]ZZ\n match.index += match[0].length;\n return;\n }\n\n var index = match.index + match[OPENNING_GROUP].length;\n var text = match[0].substr(match[OPENNING_GROUP].length, match[0].length - match[ENDING_GROUP].length);\n var result = new ParsedResult({\n text: text,\n index: index,\n ref: ref\n });\n if (text.match(/^\\d\\.\\d$/)) return;\n if (text.match(/^\\d\\.\\d{1,2}\\.\\d{1,2}$/)) return; // MM/dd -> OK\n // MM.dd -> NG\n\n if (!match[YEAR_GROUP] && match[0].indexOf('/') < 0) return;\n var date = null;\n var year = match[YEAR_GROUP] || dayjs(ref).year() + '';\n var month = match[MONTH_GROUP];\n var day = match[DAY_GROUP];\n month = parseInt(month);\n day = parseInt(day);\n year = parseInt(year);\n\n if (month < 1 || month > 12) {\n if (month > 12) {\n // dd/mm/yyyy date format if day looks like a month, and month\n // looks like a day.\n if (day >= 1 && day <= 12 && month >= 13 && month <= 31) {\n // unambiguous\n var tday = month;\n month = day;\n day = tday;\n } else {\n // both month and day are <= 12\n return null;\n }\n }\n }\n\n if (day < 1 || day > 31) return null;\n\n if (year < 100) {\n if (year > 50) {\n year = year + 1900;\n } else {\n year = year + 2000;\n }\n }\n\n result.start.assign('day', day);\n result.start.assign('month', month);\n result.start.assign('year', year); //Day of week\n\n if (match[WEEKDAY_GROUP]) {\n result.start.assign('weekday', DAYS_OFFSET[match[WEEKDAY_GROUP].toLowerCase()]);\n }\n\n result.tags['ESSlashDateFormatParser'] = true;\n return result;\n };\n };\n /***/\n\n },\n /* 46 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var dayjs = __webpack_require__(2);\n\n var Parser = __webpack_require__(1).Parser;\n\n var ParsedResult = __webpack_require__(0).ParsedResult;\n\n var PATTERN = /(\\W|^)(maintenant|aujourd'hui|ajd|cette\\s*nuit|la\\s*veille|(demain|hier)(\\s*(matin|soir|aprem|après-midi))?|ce\\s*(matin|soir)|cet\\s*(après-midi|aprem))(?=\\W|$)/i;\n\n exports.Parser = function FRCasualDateParser() {\n Parser.apply(this, arguments);\n\n this.pattern = function () {\n return PATTERN;\n };\n\n this.extract = function (text, ref, match, opt) {\n var text = match[0].substr(match[1].length);\n var index = match.index + match[1].length;\n var result = new ParsedResult({\n index: index,\n text: text,\n ref: ref\n });\n var refMoment = dayjs(ref);\n var startMoment = refMoment;\n var lowerText = text.toLowerCase();\n\n if (lowerText.match(/demain/)) {\n // Check not \"Tomorrow\" on late night\n if (refMoment.hour() > 1) {\n startMoment = startMoment.add(1, 'day');\n }\n }\n\n if (lowerText.match(/hier/)) {\n startMoment = startMoment.add(-1, 'day');\n }\n\n if (lowerText.match(/cette\\s*nuit/)) {\n // Normally means this coming midnight\n result.start.imply('hour', 22);\n result.start.imply('meridiem', 1);\n } else if (lowerText.match(/la\\s*veille/)) {\n result.start.imply('hour', 0);\n\n if (refMoment.hour() > 6) {\n startMoment = startMoment.add(-1, 'day');\n }\n } else if (lowerText.match(/(après-midi|aprem)/)) {\n result.start.imply('hour', 14);\n } else if (lowerText.match(/(soir)/)) {\n result.start.imply('hour', 18);\n } else if (lowerText.match(/matin/)) {\n result.start.imply('hour', 8);\n } else if (lowerText.match(\"maintenant\")) {\n result.start.imply('hour', refMoment.hour());\n result.start.imply('minute', refMoment.minute());\n result.start.imply('second', refMoment.second());\n result.start.imply('millisecond', refMoment.millisecond());\n }\n\n result.start.assign('day', startMoment.date());\n result.start.assign('month', startMoment.month() + 1);\n result.start.assign('year', startMoment.year());\n result.tags['FRCasualDateParser'] = true;\n return result;\n };\n };\n /***/\n\n },\n /* 47 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var dayjs = __webpack_require__(2);\n\n var Parser = __webpack_require__(1).Parser;\n\n var ParsedResult = __webpack_require__(0).ParsedResult;\n\n var util = __webpack_require__(9);\n\n var PATTERN = new RegExp('(\\\\W|^)' + '(dans|en)\\\\s*' + '(' + util.INTEGER_WORDS_PATTERN + '|[0-9]+|une?|(?:\\\\s*quelques)?|demi(?:\\\\s*|-?)?)\\\\s*' + '(secondes?|min(?:ute)?s?|heures?|jours?|semaines?|mois|années?)\\\\s*' + '(?=\\\\W|$)', 'i');\n var STRICT_PATTERN = new RegExp('(\\\\W|^)' + '(dans|en)\\\\s*' + '(' + util.INTEGER_WORDS_PATTERN + '|[0-9]+|un?)\\\\s*' + '(secondes?|minutes?|heures?|jours?)\\\\s*' + '(?=\\\\W|$)', 'i');\n\n exports.Parser = function FRDeadlineFormatParser() {\n Parser.apply(this, arguments);\n\n this.pattern = function () {\n return this.isStrictMode() ? STRICT_PATTERN : PATTERN;\n };\n\n this.extract = function (text, ref, match, opt) {\n var index = match.index + match[1].length;\n var text = match[0];\n text = match[0].substr(match[1].length, match[0].length - match[1].length);\n var result = new ParsedResult({\n index: index,\n text: text,\n ref: ref\n });\n var num = match[3];\n\n if (util.INTEGER_WORDS[num] !== undefined) {\n num = util.INTEGER_WORDS[num];\n } else if (num === 'un' || num === 'une') {\n num = 1;\n } else if (num.match(/quelques?/i)) {\n num = 3;\n } else if (num.match(/demi-?/i)) {\n num = 0.5;\n } else {\n num = parseInt(num);\n }\n\n var date = dayjs(ref);\n\n if (match[4].match(/jour|semaine|mois|année/i)) {\n if (match[4].match(/jour/)) {\n date = date.add(num, 'd');\n } else if (match[4].match(/semaine/i)) {\n date = date.add(num * 7, 'd');\n } else if (match[4].match(/mois/i)) {\n date = date.add(num, 'month');\n } else if (match[4].match(/année/i)) {\n date = date.add(num, 'year');\n }\n\n result.start.assign('year', date.year());\n result.start.assign('month', date.month() + 1);\n result.start.assign('day', date.date());\n return result;\n }\n\n if (match[4].match(/heure/i)) {\n date = date.add(num, 'hour');\n } else if (match[4].match(/min/i)) {\n date = date.add(num, 'minutes');\n } else if (match[4].match(/secondes/i)) {\n date = date.add(num, 'second');\n }\n\n result.start.imply('year', date.year());\n result.start.imply('month', date.month() + 1);\n result.start.imply('day', date.date());\n result.start.assign('hour', date.hour());\n result.start.assign('minute', date.minute());\n result.start.assign('second', date.second());\n result.tags['FRDeadlineFormatParser'] = true;\n return result;\n };\n };\n /***/\n\n },\n /* 48 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var parser = __webpack_require__(1);\n\n var ParsedResult = __webpack_require__(0).ParsedResult;\n\n var util = __webpack_require__(9);\n\n var DAYS_OFFSET = util.WEEKDAY_OFFSET;\n var PATTERN = new RegExp('(\\\\W|^)' + '(?:(Dimanche|Lundi|Mardi|mercredi|Jeudi|Vendredi|Samedi|Dim|Lun|Mar|Mer|Jeu|Ven|Sam)\\\\s*,?\\\\s*)?' + '([0-9]{1,2}|1er)' + '(?:\\\\s*(?:au|\\\\-|\\\\–|jusqu\\'au?|\\\\s)\\\\s*([0-9]{1,2})(?:er)?)?\\\\s*(?:de)?\\\\s*' + '(Jan(?:vier|\\\\.)?|F[ée]v(?:rier|\\\\.)?|Mars|Avr(?:il|\\\\.)?|Mai|Juin|Juil(?:let|\\\\.)?|Ao[uû]t|Sept(?:embre|\\\\.)?|Oct(?:obre|\\\\.)?|Nov(?:embre|\\\\.)?|d[ée]c(?:embre|\\\\.)?)' + '(?:\\\\s*(\\\\s*[0-9]{1,4}(?![^\\\\s]\\\\d))(?:\\\\s*(AC|[ap]\\\\.?\\\\s*c(?:h(?:r)?)?\\\\.?\\\\s*n\\\\.?))?)?' + '(?=\\\\W|$)', 'i');\n var WEEKDAY_GROUP = 2;\n var DATE_GROUP = 3;\n var DATE_TO_GROUP = 4;\n var MONTH_NAME_GROUP = 5;\n var YEAR_GROUP = 6;\n var YEAR_BE_GROUP = 7;\n\n exports.Parser = function FRMonthNameLittleEndianParser() {\n parser.Parser.apply(this, arguments);\n\n this.pattern = function () {\n return PATTERN;\n };\n\n this.extract = function (text, ref, match, opt) {\n var result = new ParsedResult({\n text: match[0].substr(match[1].length, match[0].length - match[1].length),\n index: match.index + match[1].length,\n ref: ref\n });\n var month = match[MONTH_NAME_GROUP];\n month = util.MONTH_OFFSET[month.toLowerCase()];\n var day = match[DATE_GROUP];\n day = parseInt(day);\n var year = null;\n\n if (match[YEAR_GROUP]) {\n year = match[YEAR_GROUP];\n year = parseInt(year);\n\n if (match[YEAR_BE_GROUP]) {\n if (/a/i.test(match[YEAR_BE_GROUP])) {\n // Ante Christe natum\n year = -year;\n }\n } else if (year < 100) {\n year = year + 2000;\n }\n }\n\n if (year) {\n result.start.assign('day', day);\n result.start.assign('month', month);\n result.start.assign('year', year);\n } else {\n year = parser.findYearClosestToRef(ref, day, month);\n result.start.assign('day', day);\n result.start.assign('month', month);\n result.start.imply('year', year);\n } // Weekday component\n\n\n if (match[WEEKDAY_GROUP]) {\n var weekday = match[WEEKDAY_GROUP];\n weekday = util.WEEKDAY_OFFSET[weekday.toLowerCase()];\n result.start.assign('weekday', weekday);\n } // Text can be 'range' value. Such as '12 - 13 janvier 2012'\n\n\n if (match[DATE_TO_GROUP]) {\n result.end = result.start.clone();\n result.end.assign('day', parseInt(match[DATE_TO_GROUP]));\n }\n\n result.tags['FRMonthNameLittleEndianParser'] = true;\n return result;\n };\n };\n /***/\n\n },\n /* 49 */\n\n /***/\n function (module, exports, __webpack_require__) {\n /*\r\n Date format with slash \"/\" (also \"-\" and \".\") between numbers\r\n - Martes 3/11/2015\r\n - 3/11/2015\r\n - 3/11\r\n */\n var parser = __webpack_require__(1);\n\n var ParsedResult = __webpack_require__(0).ParsedResult;\n\n var PATTERN = new RegExp('(\\\\W|^)' + '(?:' + '((?:dimanche|dim|lundi|lun|mardi|mar|mercredi|mer|jeudi|jeu|vendredi|ven|samedi|sam|le))' + '\\\\s*\\\\,?\\\\s*' + ')?' + '([0-3]{0,1}[0-9]{1})[\\\\/\\\\.\\\\-]([0-3]{0,1}[0-9]{1})' + '(?:' + '[\\\\/\\\\.\\\\-]' + '([0-9]{4}\\s*\\,?\\s*|[0-9]{2}\\s*\\,?\\s*)' + ')?' + '(\\\\W|$)', 'i');\n var DAYS_OFFSET = {\n 'dimanche': 0,\n 'dim': 0,\n 'lundi': 1,\n 'lun': 1,\n 'mardi': 2,\n 'mar': 2,\n 'mercredi': 3,\n 'mer': 3,\n 'jeudi': 4,\n 'jeu': 4,\n 'vendredi': 5,\n 'ven': 5,\n 'samedi': 6,\n 'sam': 6\n };\n var OPENNING_GROUP = 1;\n var ENDING_GROUP = 6; // In French we use day/month/year\n\n var WEEKDAY_GROUP = 2;\n var DAY_GROUP = 3;\n var MONTH_GROUP = 4;\n var YEAR_GROUP = 5;\n\n exports.Parser = function FRSlashDateFormatParser(argument) {\n parser.Parser.apply(this, arguments);\n\n this.pattern = function () {\n return PATTERN;\n };\n\n this.extract = function (text, ref, match, opt) {\n if (match[OPENNING_GROUP] == '/' || match[ENDING_GROUP] == '/') {\n // Long skip, if there is some overlapping like:\n // XX[/YY/ZZ]\n // [XX/YY/]ZZ\n match.index += match[0].length;\n return;\n }\n\n var index = match.index + match[OPENNING_GROUP].length;\n var text = match[0].substr(match[OPENNING_GROUP].length, match[0].length - match[ENDING_GROUP].length);\n var result = new ParsedResult({\n text: text,\n index: index,\n ref: ref\n });\n if (text.match(/^\\d\\.\\d$/)) return;\n if (text.match(/^\\d\\.\\d{1,2}\\.\\d{1,2}$/)) return; // MM/dd -> OK\n // MM.dd -> NG\n\n if (!match[YEAR_GROUP] && match[0].indexOf('/') < 0) return;\n var date = null;\n var month = match[MONTH_GROUP];\n var day = match[DAY_GROUP];\n day = parseInt(day);\n month = parseInt(month);\n var year = null;\n\n if (match[YEAR_GROUP]) {\n year = match[YEAR_GROUP];\n year = parseInt(year);\n\n if (year < 100) {\n year = year + 2000;\n }\n }\n\n if (month < 1 || month > 12) {\n if (month > 12) {\n // dd/mm/yyyy date format if day looks like a month, and month looks like a day.\n if (day >= 1 && day <= 12 && month >= 13 && month <= 31) {\n // unambiguous\n var tday = month;\n month = day;\n day = tday;\n } else {\n // both month and day are <= 12\n return null;\n }\n }\n }\n\n if (day < 1 || day > 31) return null;\n\n if (year) {\n result.start.assign('day', day);\n result.start.assign('month', month);\n result.start.assign('year', year);\n } else {\n year = parser.findYearClosestToRef(ref, day, month);\n result.start.assign('day', day);\n result.start.assign('month', month);\n result.start.imply('year', year);\n } // Day of week\n\n\n if (match[WEEKDAY_GROUP]) {\n result.start.assign('weekday', DAYS_OFFSET[match[WEEKDAY_GROUP].toLowerCase()]);\n }\n\n result.tags['FRSlashDateFormatParser'] = true;\n return result;\n };\n };\n /***/\n\n },\n /* 50 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var dayjs = __webpack_require__(2);\n\n var Parser = __webpack_require__(1).Parser;\n\n var ParsedResult = __webpack_require__(0).ParsedResult;\n\n var PATTERN = /(\\W|^)il y a\\s*([0-9]+|une?)\\s*(minutes?|heures?|semaines?|jours?|mois|années?|ans?)(?=(?:\\W|$))/i;\n\n exports.Parser = function FRTimeAgoFormatParser() {\n Parser.apply(this, arguments);\n\n this.pattern = function () {\n return PATTERN;\n };\n\n this.extract = function (text, ref, match, opt) {\n if (match.index > 0 && text[match.index - 1].match(/\\w/)) return null;\n var text = match[0];\n text = match[0].substr(match[1].length, match[0].length - match[1].length);\n var index = match.index + match[1].length;\n var result = new ParsedResult({\n index: index,\n text: text,\n ref: ref\n });\n result.tags['FRTimeAgoFormatParser'] = true;\n var num = parseInt(match[2]);\n\n if (isNaN(num)) {\n if (match[2].match(/demi/)) {\n num = 0.5;\n } else {\n num = 1;\n }\n }\n\n var date = dayjs(ref);\n\n if (match[3].match(/heure/) || match[3].match(/minute/)) {\n if (match[3].match(/heure/)) {\n date = date.add(-num, 'hour');\n } else if (match[3].match(/minute/)) {\n date = date.add(-num, 'minute');\n }\n\n result.start.imply('day', date.date());\n result.start.imply('month', date.month() + 1);\n result.start.imply('year', date.year());\n result.start.assign('hour', date.hour());\n result.start.assign('minute', date.minute());\n return result;\n }\n\n if (match[3].match(/semaine/)) {\n date = date.add(-num, 'week');\n result.start.imply('day', date.date());\n result.start.imply('month', date.month() + 1);\n result.start.imply('year', date.year());\n result.start.imply('weekday', date.day());\n return result;\n }\n\n if (match[3].match(/jour/)) {\n date = date.add(-num, 'd');\n }\n\n if (match[3].match(/mois/)) {\n date = date.add(-num, 'month');\n }\n\n if (match[3].match(/années?|ans?/)) {\n date = date.add(-num, 'year');\n }\n\n result.start.assign('day', date.date());\n result.start.assign('month', date.month() + 1);\n result.start.assign('year', date.year());\n return result;\n };\n };\n /***/\n\n },\n /* 51 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var dayjs = __webpack_require__(2);\n\n var Parser = __webpack_require__(1).Parser;\n\n var ParsedResult = __webpack_require__(0).ParsedResult;\n\n var ParsedComponents = __webpack_require__(0).ParsedComponents;\n\n var FIRST_REG_PATTERN = new RegExp(\"(^|\\\\s|T)\" + \"(?:(?:[àa])\\\\s*)?\" + \"(\\\\d{1,2}(?:h)?|midi|minuit)\" + \"(?:\" + \"(?:\\\\.|\\\\:|\\\\:|h)(\\\\d{1,2})(?:m)?\" + \"(?:\" + \"(?:\\\\:|\\\\:|m)(\\\\d{0,2})(?:s)?\" + \")?\" + \")?\" + \"(?:\\\\s*(A\\\\.M\\\\.|P\\\\.M\\\\.|AM?|PM?))?\" + \"(?=\\\\W|$)\", 'i');\n var SECOND_REG_PATTERN = new RegExp(\"^\\\\s*\" + \"(\\\\-|\\\\–|\\\\~|\\\\〜|[àa]|\\\\?)\\\\s*\" + \"(\\\\d{1,2}(?:h)?)\" + \"(?:\" + \"(?:\\\\.|\\\\:|\\\\:|h)(\\\\d{1,2})(?:m)?\" + \"(?:\" + \"(?:\\\\.|\\\\:|\\\\:|m)(\\\\d{1,2})(?:s)?\" + \")?\" + \")?\" + \"(?:\\\\s*(A\\\\.M\\\\.|P\\\\.M\\\\.|AM?|PM?))?\" + \"(?=\\\\W|$)\", 'i');\n var HOUR_GROUP = 2;\n var MINUTE_GROUP = 3;\n var SECOND_GROUP = 4;\n var AM_PM_HOUR_GROUP = 5;\n\n exports.Parser = function FRTimeExpressionParser() {\n Parser.apply(this, arguments);\n\n this.pattern = function () {\n return FIRST_REG_PATTERN;\n };\n\n this.extract = function (text, ref, match, opt) {\n // This pattern can be overlaped Ex. [12] AM, 1[2] AM\n if (match.index > 0 && text[match.index - 1].match(/\\w/)) return null;\n var refMoment = dayjs(ref);\n var result = new ParsedResult();\n result.ref = ref;\n result.index = match.index + match[1].length;\n result.text = match[0].substring(match[1].length);\n result.tags['FRTimeExpressionParser'] = true;\n result.start.imply('day', refMoment.date());\n result.start.imply('month', refMoment.month() + 1);\n result.start.imply('year', refMoment.year());\n var hour = 0;\n var minute = 0;\n var meridiem = -1; // ----- Second\n\n if (match[SECOND_GROUP] != null) {\n var second = parseInt(match[SECOND_GROUP]);\n if (second >= 60) return null;\n result.start.assign('second', second);\n } // ----- Hours\n\n\n if (match[HOUR_GROUP].toLowerCase() == \"midi\") {\n meridiem = 1;\n hour = 12;\n } else if (match[HOUR_GROUP].toLowerCase() == \"minuit\") {\n meridiem = 0;\n hour = 0;\n } else {\n hour = parseInt(match[HOUR_GROUP]);\n } // ----- Minutes\n\n\n if (match[MINUTE_GROUP] != null) {\n minute = parseInt(match[MINUTE_GROUP]);\n } else if (hour > 100) {\n minute = hour % 100;\n hour = parseInt(hour / 100);\n }\n\n if (minute >= 60) {\n return null;\n }\n\n if (hour > 24) {\n return null;\n }\n\n if (hour >= 12) {\n meridiem = 1;\n } // ----- AM & PM\n\n\n if (match[AM_PM_HOUR_GROUP] != null) {\n if (hour > 12) return null;\n var ampm = match[AM_PM_HOUR_GROUP][0].toLowerCase();\n\n if (ampm == \"a\") {\n meridiem = 0;\n if (hour == 12) hour = 0;\n }\n\n if (ampm == \"p\") {\n meridiem = 1;\n if (hour != 12) hour += 12;\n }\n }\n\n result.start.assign('hour', hour);\n result.start.assign('minute', minute);\n\n if (meridiem >= 0) {\n result.start.assign('meridiem', meridiem);\n } // ==============================================================\n // Extracting the 'to' chunk\n // ==============================================================\n\n\n match = SECOND_REG_PATTERN.exec(text.substring(result.index + result.text.length));\n\n if (!match) {\n // Not accept number only result\n if (result.text.match(/^\\d+$/)) {\n return null;\n }\n\n return result;\n } // Pattern \"YY.YY -XXXX\" is more like timezone offset\n\n\n if (match[0].match(/^\\s*(\\+|\\-)\\s*\\d{3,4}$/)) {\n return result;\n }\n\n if (result.end == null) {\n result.end = new ParsedComponents(null, result.start.date());\n }\n\n var hour = 0;\n var minute = 0;\n var meridiem = -1; // ----- Second\n\n if (match[SECOND_GROUP] != null) {\n var second = parseInt(match[SECOND_GROUP]);\n if (second >= 60) return null;\n result.end.assign('second', second);\n }\n\n hour = parseInt(match[2]); // ----- Minute\n\n if (match[MINUTE_GROUP] != null) {\n minute = parseInt(match[MINUTE_GROUP]);\n if (minute >= 60) return result;\n } else if (hour > 100) {\n minute = hour % 100;\n hour = parseInt(hour / 100);\n }\n\n if (minute >= 60) {\n return null;\n }\n\n if (hour > 24) {\n return null;\n }\n\n if (hour >= 12) {\n meridiem = 1;\n } // ----- AM & PM\n\n\n if (match[AM_PM_HOUR_GROUP] != null) {\n if (hour > 12) return null;\n var ampm = match[AM_PM_HOUR_GROUP][0].toLowerCase();\n\n if (ampm == \"a\") {\n meridiem = 0;\n\n if (hour == 12) {\n hour = 0;\n\n if (!result.end.isCertain('day')) {\n result.end.imply('day', result.end.get('day') + 1);\n }\n }\n }\n\n if (ampm == \"p\") {\n meridiem = 1;\n if (hour != 12) hour += 12;\n }\n\n if (!result.start.isCertain('meridiem')) {\n if (meridiem == 0) {\n result.start.imply('meridiem', 0);\n\n if (result.start.get('hour') == 12) {\n result.start.assign('hour', 0);\n }\n } else {\n result.start.imply('meridiem', 1);\n\n if (result.start.get('hour') != 12) {\n result.start.assign('hour', result.start.get('hour') + 12);\n }\n }\n }\n }\n\n result.text = result.text + match[0];\n result.end.assign('hour', hour);\n result.end.assign('minute', minute);\n\n if (meridiem >= 0) {\n result.end.assign('meridiem', meridiem);\n } else {\n var startAtPM = result.start.isCertain('meridiem') && result.start.get('meridiem') == 1;\n\n if (startAtPM && result.start.get('hour') > hour) {\n // 10pm - 1 (am)\n result.end.imply('meridiem', 0);\n } else if (hour > 12) {\n result.end.imply('meridiem', 1);\n }\n }\n\n if (result.end.date().getTime() < result.start.date().getTime()) {\n result.end.imply('day', result.end.get('day') + 1);\n }\n\n return result;\n };\n };\n /***/\n\n },\n /* 52 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var Parser = __webpack_require__(1).Parser;\n\n var ParsedResult = __webpack_require__(0).ParsedResult;\n\n var updateParsedComponent = __webpack_require__(5).updateParsedComponent;\n\n var DAYS_OFFSET = {\n 'dimanche': 0,\n 'dim': 0,\n 'lundi': 1,\n 'lun': 1,\n 'mardi': 2,\n 'mar': 2,\n 'mercredi': 3,\n 'mer': 3,\n 'jeudi': 4,\n 'jeu': 4,\n 'vendredi': 5,\n 'ven': 5,\n 'samedi': 6,\n 'sam': 6\n };\n var PATTERN = new RegExp('(\\\\s|^)' + '(?:(?:\\\\,|\\\\(|\\\\()\\\\s*)?' + '(?:(ce)\\\\s*)?' + '(' + Object.keys(DAYS_OFFSET).join('|') + ')' + '(?:\\\\s*(?:\\\\,|\\\\)|\\\\)))?' + '(?:\\\\s*(dernier|prochain)\\\\s*)?' + '(?=\\\\W|$)', 'i');\n var PREFIX_GROUP = 2;\n var WEEKDAY_GROUP = 3;\n var POSTFIX_GROUP = 4;\n\n exports.Parser = function FRWeekdayParser() {\n Parser.apply(this, arguments);\n\n this.pattern = function () {\n return PATTERN;\n };\n\n this.extract = function (text, ref, match, opt) {\n var index = match.index + match[1].length;\n var text = match[0].substr(match[1].length, match[0].length - match[1].length);\n var result = new ParsedResult({\n index: index,\n text: text,\n ref: ref\n });\n var dayOfWeek = match[WEEKDAY_GROUP].toLowerCase();\n var offset = DAYS_OFFSET[dayOfWeek];\n if (offset === undefined) return null;\n var modifier = null;\n var prefix = match[PREFIX_GROUP];\n var postfix = match[POSTFIX_GROUP];\n\n if (prefix || postfix) {\n var norm = prefix || postfix;\n norm = norm.toLowerCase();\n\n if (norm == 'dernier') {\n modifier = 'last';\n } else if (norm == 'prochain') {\n modifier = 'next';\n } else if (norm == 'ce') {\n modifier = 'this';\n }\n }\n\n updateParsedComponent(result, ref, offset, modifier);\n result.tags['FRWeekdayParser'] = true;\n return result;\n };\n };\n /***/\n\n },\n /* 53 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var quarterOfYear = __webpack_require__(54);\n\n var dayjs = __webpack_require__(2);\n\n dayjs.extend(quarterOfYear);\n\n var Parser = __webpack_require__(1).Parser;\n\n var ParsedResult = __webpack_require__(0).ParsedResult;\n\n var util = __webpack_require__(9);\n\n var PATTERN = new RegExp('(\\\\W|^)' + '(?:les?|la|l\\'|du|des?)\\\\s*' + '(' + util.INTEGER_WORDS_PATTERN + '|\\\\d+)?\\\\s*' + '(prochaine?s?|derni[eè]re?s?|pass[ée]e?s?|pr[ée]c[ée]dents?|suivante?s?)?\\\\s*' + '(secondes?|min(?:ute)?s?|heures?|jours?|semaines?|mois|trimestres?|années?)\\\\s*' + '(prochaine?s?|derni[eè]re?s?|pass[ée]e?s?|pr[ée]c[ée]dents?|suivante?s?)?' + '(?=\\\\W|$)', 'i');\n var MULTIPLIER_GROUP = 2;\n var MODIFIER_1_GROUP = 3;\n var RELATIVE_WORD_GROUP = 4;\n var MODIFIER_2_GROUP = 5;\n\n exports.Parser = function FRRelativeDateFormatParser() {\n Parser.apply(this, arguments);\n\n this.pattern = function () {\n return PATTERN;\n };\n\n this.extract = function (text, ref, match, opt) {\n var index = match.index + match[1].length;\n var text = match[0];\n text = match[0].substr(match[1].length, match[0].length - match[1].length); // Multiplier\n\n var multiplier = match[MULTIPLIER_GROUP] === undefined ? '1' : match[MULTIPLIER_GROUP];\n\n if (util.INTEGER_WORDS[multiplier] !== undefined) {\n multiplier = util.INTEGER_WORDS[multiplier];\n } else {\n multiplier = parseInt(multiplier);\n } // Modifier\n\n\n var modifier = match[MODIFIER_1_GROUP] === undefined ? match[MODIFIER_2_GROUP] === undefined ? '' : match[MODIFIER_2_GROUP].toLowerCase() : match[MODIFIER_1_GROUP].toLowerCase();\n\n if (!modifier) {\n // At least one modifier is mandatory to match this parser\n return;\n }\n\n var result = new ParsedResult({\n index: index,\n text: text,\n ref: ref\n });\n result.tags['FRRelativeDateFormatParser'] = true;\n var modifierFactor;\n\n switch (true) {\n case /prochaine?s?/.test(modifier):\n case /suivants?/.test(modifier):\n modifierFactor = 1;\n break;\n\n case /derni[eè]re?s?/.test(modifier):\n case /pass[ée]e?s?/.test(modifier):\n case /pr[ée]c[ée]dents?/.test(modifier):\n modifierFactor = -1;\n break;\n }\n\n var total = multiplier * modifierFactor;\n var dateFrom = dayjs(ref);\n var dateTo = dayjs(ref);\n var relative = match[RELATIVE_WORD_GROUP];\n var startOf;\n\n switch (true) {\n case /secondes?/.test(relative):\n dateFrom = dateFrom.add(total, 's');\n dateTo = dateTo.add(modifierFactor, 's');\n startOf = 'second';\n break;\n\n case /min(?:ute)?s?/.test(relative):\n dateFrom = dateFrom.add(total, 'm');\n dateTo = dateTo.add(modifierFactor, 'm');\n startOf = 'minute';\n break;\n\n case /heures?/.test(relative):\n dateFrom = dateFrom.add(total, 'h');\n dateTo = dateTo.add(modifierFactor, 'h');\n startOf = 'hour';\n break;\n\n case /jours?/.test(relative):\n dateFrom = dateFrom.add(total, 'd');\n dateTo = dateTo.add(modifierFactor, 'd');\n startOf = 'day';\n break;\n\n case /semaines?/.test(relative):\n dateFrom = dateFrom.add(total, 'w');\n dateTo = dateTo.add(modifierFactor, 'w');\n startOf = 'week';\n break;\n\n case /mois?/.test(relative):\n dateFrom = dateFrom.add(total, 'M');\n dateTo = dateTo.add(modifierFactor, 'M');\n startOf = 'month';\n break;\n\n case /trimestres?/.test(relative):\n dateFrom = dateFrom.add(total, 'Q');\n dateTo = dateTo.add(modifierFactor, 'Q');\n startOf = 'quarter';\n break;\n\n case /années?/.test(relative):\n dateFrom = dateFrom.add(total, 'y');\n dateTo = dateTo.add(modifierFactor, 'y');\n startOf = 'year';\n break;\n } // if we go forward, switch the start and end dates\n\n\n if (modifierFactor > 0) {\n var dateTmp = dateFrom;\n dateFrom = dateTo;\n dateTo = dateTmp;\n } // Get start and end of dates\n\n\n dateFrom = dateFrom.startOf(startOf);\n dateTo = dateTo.endOf(startOf);\n\n if (startOf == 'week') {\n // Weekday in FR start on Sat?\n dateFrom = dateFrom.add(1, 'd');\n dateTo = dateTo.add(1, 'd');\n } // Assign results\n\n\n result.start.assign('year', dateFrom.year());\n result.start.assign('month', dateFrom.month() + 1);\n result.start.assign('day', dateFrom.date());\n result.start.assign('minute', dateFrom.minute());\n result.start.assign('second', dateFrom.second());\n result.start.assign('hour', dateFrom.hour());\n result.start.assign('millisecond', dateFrom.millisecond());\n result.end = result.start.clone();\n result.end.assign('year', dateTo.year());\n result.end.assign('month', dateTo.month() + 1);\n result.end.assign('day', dateTo.date());\n result.end.assign('minute', dateTo.minute());\n result.end.assign('second', dateTo.second());\n result.end.assign('hour', dateTo.hour());\n result.end.assign('millisecond', dateTo.millisecond());\n return result;\n };\n };\n /***/\n\n },\n /* 54 */\n\n /***/\n function (module, exports, __webpack_require__) {\n !function (t, n) {\n true ? module.exports = n() : undefined;\n }(this, function () {\n \"use strict\";\n\n var t = \"month\",\n n = \"quarter\";\n return function (r, i) {\n var e = i.prototype;\n\n e.quarter = function (t) {\n return this.$utils().u(t) ? Math.ceil((this.month() + 1) / 3) : this.month(this.month() % 3 + 3 * (t - 1));\n };\n\n var u = e.add;\n\n e.add = function (r, i) {\n return r = Number(r), this.$utils().p(i) === n ? this.add(3 * r, t) : u.bind(this)(r, i);\n };\n\n var s = e.startOf;\n\n e.startOf = function (r, i) {\n var e = this.$utils(),\n u = !!e.u(i) || i;\n\n if (e.p(r) === n) {\n var a = this.quarter() - 1;\n return u ? this.month(3 * a).startOf(t).startOf(\"day\") : this.month(3 * a + 2).endOf(t).endOf(\"day\");\n }\n\n return s.bind(this)(r, i);\n };\n };\n });\n /***/\n },\n /* 55 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var dayjs = __webpack_require__(2);\n\n var Parser = __webpack_require__(1).Parser;\n\n var ParsedResult = __webpack_require__(0).ParsedResult;\n\n var util = __webpack_require__(7);\n\n var PATTERN = new RegExp('(\\\\d{2,4}|[' + Object.keys(util.NUMBER).join('') + ']{2,4})?' + '(?:\\\\s*)' + '(?:年)?' + '(?:[\\\\s|,|,]*)' + '(\\\\d{1,2}|[' + Object.keys(util.NUMBER).join('') + ']{1,2})' + '(?:\\\\s*)' + '(?:月)' + '(?:\\\\s*)' + '(\\\\d{1,2}|[' + Object.keys(util.NUMBER).join('') + ']{1,2})?' + '(?:\\\\s*)' + '(?:日|號)?');\n var YEAR_GROUP = 1;\n var MONTH_GROUP = 2;\n var DAY_GROUP = 3;\n\n exports.Parser = function ZHHantDateParser() {\n Parser.apply(this, arguments);\n\n this.pattern = function () {\n return PATTERN;\n };\n\n this.extract = function (text, ref, match, opt) {\n var startMoment = dayjs(ref);\n var result = new ParsedResult({\n text: match[0],\n index: match.index,\n ref: ref\n }); //Month\n\n var month = parseInt(match[MONTH_GROUP]);\n if (isNaN(month)) month = util.zhStringToNumber(match[MONTH_GROUP]);\n result.start.assign('month', month); //Day\n\n if (match[DAY_GROUP]) {\n var day = parseInt(match[DAY_GROUP]);\n if (isNaN(day)) day = util.zhStringToNumber(match[DAY_GROUP]);\n result.start.assign('day', day);\n } else {\n result.start.imply('day', startMoment.date());\n } //Year\n\n\n if (match[YEAR_GROUP]) {\n var year = parseInt(match[YEAR_GROUP]);\n if (isNaN(year)) year = util.zhStringToYear(match[YEAR_GROUP]);\n result.start.assign('year', year);\n } else {\n result.start.imply('year', startMoment.year());\n }\n\n result.tags.ZHHantDateParser = true;\n return result;\n };\n };\n /***/\n\n },\n /* 56 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var Parser = __webpack_require__(1).Parser;\n\n var ParsedResult = __webpack_require__(0).ParsedResult;\n\n var updateParsedComponent = __webpack_require__(5).updateParsedComponent;\n\n var util = __webpack_require__(7);\n\n var PATTERN = new RegExp('(上|今|下|這|呢)?' + '(?:個)?' + '(?:星期|禮拜)' + '(' + Object.keys(util.WEEKDAY_OFFSET).join('|') + ')');\n var PREFIX_GROUP = 1;\n var WEEKDAY_GROUP = 2;\n\n exports.Parser = function ZHHantWeekdayParser() {\n Parser.apply(this, arguments);\n\n this.pattern = function () {\n return PATTERN;\n };\n\n this.extract = function (text, ref, match, opt) {\n var index = match.index;\n text = match[0];\n var result = new ParsedResult({\n index: index,\n text: text,\n ref: ref\n });\n var dayOfWeek = match[WEEKDAY_GROUP];\n var offset = util.WEEKDAY_OFFSET[dayOfWeek];\n if (offset === undefined) return null;\n var modifier = null;\n var prefix = match[PREFIX_GROUP];\n\n if (prefix == '上') {\n modifier = 'last';\n } else if (prefix == '下') {\n modifier = 'next';\n } else if (prefix == '今' || prefix == '這' || prefix == '呢') {\n modifier = 'this';\n }\n\n updateParsedComponent(result, ref, offset, modifier);\n result.tags['ZHHantWeekdayParser'] = true;\n return result;\n };\n };\n /***/\n\n },\n /* 57 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var dayjs = __webpack_require__(2);\n\n var Parser = __webpack_require__(1).Parser;\n\n var ParsedResult = __webpack_require__(0).ParsedResult;\n\n var ParsedComponents = __webpack_require__(0).ParsedComponents;\n\n var util = __webpack_require__(7);\n\n var patternString1 = '(?:由|從|自)?' + '(?:' + '(今|明|前|大前|後|大後|聽|昨|尋|琴)(早|朝|晚)|' + '(上(?:午|晝)|朝(?:早)|早(?:上)|下(?:午|晝)|晏(?:晝)|晚(?:上)|夜(?:晚)?|中(?:午)|凌(?:晨))|' + '(今|明|前|大前|後|大後|聽|昨|尋|琴)(?:日|天)' + '(?:[\\\\s,,]*)' + '(?:(上(?:午|晝)|朝(?:早)|早(?:上)|下(?:午|晝)|晏(?:晝)|晚(?:上)|夜(?:晚)?|中(?:午)|凌(?:晨)))?' + ')?' + '(?:[\\\\s,,]*)' + '(?:(\\\\d+|[' + Object.keys(util.NUMBER).join('') + ']+)(?:\\\\s*)(?:點|時|:|:)' + '(?:\\\\s*)' + '(\\\\d+|半|正|整|[' + Object.keys(util.NUMBER).join('') + ']+)?(?:\\\\s*)(?:分|:|:)?' + '(?:\\\\s*)' + '(\\\\d+|[' + Object.keys(util.NUMBER).join('') + ']+)?(?:\\\\s*)(?:秒)?)' + '(?:\\\\s*(A\\.M\\.|P\\.M\\.|AM?|PM?))?';\n var patternString2 = '(?:\\\\s*(?:到|至|\\\\-|\\\\–|\\\\~|\\\\〜)\\\\s*)' + '(?:' + '(今|明|前|大前|後|大後|聽|昨|尋|琴)(早|朝|晚)|' + '(上(?:午|晝)|朝(?:早)|早(?:上)|下(?:午|晝)|晏(?:晝)|晚(?:上)|夜(?:晚)?|中(?:午)|凌(?:晨))|' + '(今|明|前|大前|後|大後|聽|昨|尋|琴)(?:日|天)' + '(?:[\\\\s,,]*)' + '(?:(上(?:午|晝)|朝(?:早)|早(?:上)|下(?:午|晝)|晏(?:晝)|晚(?:上)|夜(?:晚)?|中(?:午)|凌(?:晨)))?' + ')?' + '(?:[\\\\s,,]*)' + '(?:(\\\\d+|[' + Object.keys(util.NUMBER).join('') + ']+)(?:\\\\s*)(?:點|時|:|:)' + '(?:\\\\s*)' + '(\\\\d+|半|正|整|[' + Object.keys(util.NUMBER).join('') + ']+)?(?:\\\\s*)(?:分|:|:)?' + '(?:\\\\s*)' + '(\\\\d+|[' + Object.keys(util.NUMBER).join('') + ']+)?(?:\\\\s*)(?:秒)?)' + '(?:\\\\s*(A\\.M\\.|P\\.M\\.|AM?|PM?))?';\n var FIRST_REG_PATTERN = new RegExp(patternString1, 'i');\n var SECOND_REG_PATTERN = new RegExp(patternString2, 'i');\n var DAY_GROUP_1 = 1;\n var ZH_AM_PM_HOUR_GROUP_1 = 2;\n var ZH_AM_PM_HOUR_GROUP_2 = 3;\n var DAY_GROUP_3 = 4;\n var ZH_AM_PM_HOUR_GROUP_3 = 5;\n var HOUR_GROUP = 6;\n var MINUTE_GROUP = 7;\n var SECOND_GROUP = 8;\n var AM_PM_HOUR_GROUP = 9;\n\n exports.Parser = function ZHHantTimeExpressionParser() {\n Parser.apply(this, arguments);\n\n this.pattern = function () {\n return FIRST_REG_PATTERN;\n };\n\n this.extract = function (text, ref, match, opt) {\n // This pattern can be overlaped Ex. [12] AM, 1[2] AM\n if (match.index > 0 && text[match.index - 1].match(/\\w/)) return null;\n var refMoment = dayjs(ref);\n var result = new ParsedResult();\n result.ref = ref;\n result.index = match.index;\n result.text = match[0];\n result.tags.ZHTimeExpressionParser = true;\n var startMoment = refMoment.clone(); // ----- Day\n\n if (match[DAY_GROUP_1]) {\n var day1 = match[DAY_GROUP_1];\n\n if (day1 == '明' || day1 == '聽') {\n // Check not \"Tomorrow\" on late night\n if (refMoment.hour() > 1) {\n startMoment.add(1, 'day');\n }\n } else if (day1 == '昨' || day1 == '尋' || day1 == '琴') {\n startMoment.add(-1, 'day');\n } else if (day1 == \"前\") {\n startMoment.add(-2, 'day');\n } else if (day1 == \"大前\") {\n startMoment.add(-3, 'day');\n } else if (day1 == \"後\") {\n startMoment.add(2, 'day');\n } else if (day1 == \"大後\") {\n startMoment.add(3, 'day');\n }\n\n result.start.assign('day', startMoment.date());\n result.start.assign('month', startMoment.month() + 1);\n result.start.assign('year', startMoment.year());\n } else if (match[DAY_GROUP_3]) {\n var day3 = match[DAY_GROUP_3];\n\n if (day3 == '明' || day3 == '聽') {\n startMoment.add(1, 'day');\n } else if (day3 == '昨' || day3 == '尋' || day3 == '琴') {\n startMoment.add(-1, 'day');\n } else if (day3 == \"前\") {\n startMoment.add(-2, 'day');\n } else if (day3 == \"大前\") {\n startMoment.add(-3, 'day');\n } else if (day3 == \"後\") {\n startMoment.add(2, 'day');\n } else if (day3 == \"大後\") {\n startMoment.add(3, 'day');\n }\n\n result.start.assign('day', startMoment.date());\n result.start.assign('month', startMoment.month() + 1);\n result.start.assign('year', startMoment.year());\n } else {\n result.start.imply('day', startMoment.date());\n result.start.imply('month', startMoment.month() + 1);\n result.start.imply('year', startMoment.year());\n }\n\n var hour = 0;\n var minute = 0;\n var meridiem = -1; // ----- Second\n\n if (match[SECOND_GROUP]) {\n var second = parseInt(match[SECOND_GROUP]);\n\n if (isNaN(second)) {\n second = util.zhStringToNumber(match[SECOND_GROUP]);\n }\n\n if (second >= 60) return null;\n result.start.assign('second', second);\n }\n\n hour = parseInt(match[HOUR_GROUP]);\n\n if (isNaN(hour)) {\n hour = util.zhStringToNumber(match[HOUR_GROUP]);\n } // ----- Minutes\n\n\n if (match[MINUTE_GROUP]) {\n if (match[MINUTE_GROUP] == '半') {\n minute = 30;\n } else if (match[MINUTE_GROUP] == '正' || match[MINUTE_GROUP] == '整') {\n minute = 0;\n } else {\n minute = parseInt(match[MINUTE_GROUP]);\n\n if (isNaN(minute)) {\n minute = util.zhStringToNumber(match[MINUTE_GROUP]);\n }\n }\n } else if (hour > 100) {\n minute = hour % 100;\n hour = parseInt(hour / 100);\n }\n\n if (minute >= 60) {\n return null;\n }\n\n if (hour > 24) {\n return null;\n }\n\n if (hour >= 12) {\n meridiem = 1;\n } // ----- AM & PM\n\n\n if (match[AM_PM_HOUR_GROUP]) {\n if (hour > 12) return null;\n var ampm = match[AM_PM_HOUR_GROUP][0].toLowerCase();\n\n if (ampm == \"a\") {\n meridiem = 0;\n if (hour == 12) hour = 0;\n }\n\n if (ampm == \"p\") {\n meridiem = 1;\n if (hour != 12) hour += 12;\n }\n } else if (match[ZH_AM_PM_HOUR_GROUP_1]) {\n var zhAMPMString1 = match[ZH_AM_PM_HOUR_GROUP_1];\n var zhAMPM1 = zhAMPMString1[0];\n\n if (zhAMPM1 == '朝' || zhAMPM1 == '早') {\n meridiem = 0;\n if (hour == 12) hour = 0;\n } else if (zhAMPM1 == '晚') {\n meridiem = 1;\n if (hour != 12) hour += 12;\n }\n } else if (match[ZH_AM_PM_HOUR_GROUP_2]) {\n var zhAMPMString2 = match[ZH_AM_PM_HOUR_GROUP_2];\n var zhAMPM2 = zhAMPMString2[0];\n\n if (zhAMPM2 == '上' || zhAMPM2 == '朝' || zhAMPM2 == '早' || zhAMPM2 == '凌') {\n meridiem = 0;\n if (hour == 12) hour = 0;\n } else if (zhAMPM2 == '下' || zhAMPM2 == '晏' || zhAMPM2 == '晚') {\n meridiem = 1;\n if (hour != 12) hour += 12;\n }\n } else if (match[ZH_AM_PM_HOUR_GROUP_3]) {\n var zhAMPMString3 = match[ZH_AM_PM_HOUR_GROUP_3];\n var zhAMPM3 = zhAMPMString3[0];\n\n if (zhAMPM3 == '上' || zhAMPM3 == '朝' || zhAMPM3 == '早' || zhAMPM3 == '凌') {\n meridiem = 0;\n if (hour == 12) hour = 0;\n } else if (zhAMPM3 == '下' || zhAMPM3 == '晏' || zhAMPM3 == '晚') {\n meridiem = 1;\n if (hour != 12) hour += 12;\n }\n }\n\n result.start.assign('hour', hour);\n result.start.assign('minute', minute);\n\n if (meridiem >= 0) {\n result.start.assign('meridiem', meridiem);\n } else {\n if (hour < 12) {\n result.start.imply('meridiem', 0);\n } else {\n result.start.imply('meridiem', 1);\n }\n } // ==============================================================\n // Extracting the 'to' chunk\n // ==============================================================\n\n\n match = SECOND_REG_PATTERN.exec(text.substring(result.index + result.text.length));\n\n if (!match) {\n // Not accept number only result\n if (result.text.match(/^\\d+$/)) {\n return null;\n }\n\n return result;\n }\n\n var endMoment = startMoment.clone();\n result.end = new ParsedComponents(null, null); // ----- Day\n\n if (match[DAY_GROUP_1]) {\n var day1 = match[DAY_GROUP_1];\n\n if (day1 == '明' || day1 == '聽') {\n // Check not \"Tomorrow\" on late night\n if (refMoment.hour() > 1) {\n endMoment.add(1, 'day');\n }\n } else if (day1 == '昨' || day1 == '尋' || day1 == '琴') {\n endMoment.add(-1, 'day');\n } else if (day1 == \"前\") {\n endMoment.add(-2, 'day');\n } else if (day1 == \"大前\") {\n endMoment.add(-3, 'day');\n } else if (day1 == \"後\") {\n endMoment.add(2, 'day');\n } else if (day1 == \"大後\") {\n endMoment.add(3, 'day');\n }\n\n result.end.assign('day', endMoment.date());\n result.end.assign('month', endMoment.month() + 1);\n result.end.assign('year', endMoment.year());\n } else if (match[DAY_GROUP_3]) {\n var day3 = match[DAY_GROUP_3];\n\n if (day3 == '明' || day3 == '聽') {\n endMoment.add(1, 'day');\n } else if (day3 == '昨' || day3 == '尋' || day3 == '琴') {\n endMoment.add(-1, 'day');\n } else if (day3 == \"前\") {\n endMoment.add(-2, 'day');\n } else if (day3 == \"大前\") {\n endMoment.add(-3, 'day');\n } else if (day3 == \"後\") {\n endMoment.add(2, 'day');\n } else if (day3 == \"大後\") {\n endMoment.add(3, 'day');\n }\n\n result.end.assign('day', endMoment.date());\n result.end.assign('month', endMoment.month() + 1);\n result.end.assign('year', endMoment.year());\n } else {\n result.end.imply('day', endMoment.date());\n result.end.imply('month', endMoment.month() + 1);\n result.end.imply('year', endMoment.year());\n }\n\n hour = 0;\n minute = 0;\n meridiem = -1; // ----- Second\n\n if (match[SECOND_GROUP]) {\n var second = parseInt(match[SECOND_GROUP]);\n\n if (isNaN(second)) {\n second = util.zhStringToNumber(match[SECOND_GROUP]);\n }\n\n if (second >= 60) return null;\n result.end.assign('second', second);\n }\n\n hour = parseInt(match[HOUR_GROUP]);\n\n if (isNaN(hour)) {\n hour = util.zhStringToNumber(match[HOUR_GROUP]);\n } // ----- Minutes\n\n\n if (match[MINUTE_GROUP]) {\n if (match[MINUTE_GROUP] == '半') {\n minute = 30;\n } else if (match[MINUTE_GROUP] == '正' || match[MINUTE_GROUP] == '整') {\n minute = 0;\n } else {\n minute = parseInt(match[MINUTE_GROUP]);\n\n if (isNaN(minute)) {\n minute = util.zhStringToNumber(match[MINUTE_GROUP]);\n }\n }\n } else if (hour > 100) {\n minute = hour % 100;\n hour = parseInt(hour / 100);\n }\n\n if (minute >= 60) {\n return null;\n }\n\n if (hour > 24) {\n return null;\n }\n\n if (hour >= 12) {\n meridiem = 1;\n } // ----- AM & PM\n\n\n if (match[AM_PM_HOUR_GROUP]) {\n if (hour > 12) return null;\n var ampm = match[AM_PM_HOUR_GROUP][0].toLowerCase();\n\n if (ampm == \"a\") {\n meridiem = 0;\n if (hour == 12) hour = 0;\n }\n\n if (ampm == \"p\") {\n meridiem = 1;\n if (hour != 12) hour += 12;\n }\n\n if (!result.start.isCertain('meridiem')) {\n if (meridiem == 0) {\n result.start.imply('meridiem', 0);\n\n if (result.start.get('hour') == 12) {\n result.start.assign('hour', 0);\n }\n } else {\n result.start.imply('meridiem', 1);\n\n if (result.start.get('hour') != 12) {\n result.start.assign('hour', result.start.get('hour') + 12);\n }\n }\n }\n } else if (match[ZH_AM_PM_HOUR_GROUP_1]) {\n var zhAMPMString1 = match[ZH_AM_PM_HOUR_GROUP_1];\n var zhAMPM1 = zhAMPMString1[0];\n\n if (zhAMPM1 == '朝' || zhAMPM1 == '早') {\n meridiem = 0;\n if (hour == 12) hour = 0;\n } else if (zhAMPM1 == '晚') {\n meridiem = 1;\n if (hour != 12) hour += 12;\n }\n } else if (match[ZH_AM_PM_HOUR_GROUP_2]) {\n var zhAMPMString2 = match[ZH_AM_PM_HOUR_GROUP_2];\n var zhAMPM2 = zhAMPMString2[0];\n\n if (zhAMPM2 == '上' || zhAMPM2 == '朝' || zhAMPM2 == '早' || zhAMPM2 == '凌') {\n meridiem = 0;\n if (hour == 12) hour = 0;\n } else if (zhAMPM2 == '下' || zhAMPM2 == '晏' || zhAMPM2 == '晚') {\n meridiem = 1;\n if (hour != 12) hour += 12;\n }\n } else if (match[ZH_AM_PM_HOUR_GROUP_3]) {\n var zhAMPMString3 = match[ZH_AM_PM_HOUR_GROUP_3];\n var zhAMPM3 = zhAMPMString3[0];\n\n if (zhAMPM3 == '上' || zhAMPM3 == '朝' || zhAMPM3 == '早' || zhAMPM3 == '凌') {\n meridiem = 0;\n if (hour == 12) hour = 0;\n } else if (zhAMPM3 == '下' || zhAMPM3 == '晏' || zhAMPM3 == '晚') {\n meridiem = 1;\n if (hour != 12) hour += 12;\n }\n }\n\n result.text = result.text + match[0];\n result.end.assign('hour', hour);\n result.end.assign('minute', minute);\n\n if (meridiem >= 0) {\n result.end.assign('meridiem', meridiem);\n } else {\n var startAtPM = result.start.isCertain('meridiem') && result.start.get('meridiem') == 1;\n\n if (startAtPM && result.start.get('hour') > hour) {\n // 10pm - 1 (am)\n result.end.imply('meridiem', 0);\n } else if (hour > 12) {\n result.end.imply('meridiem', 1);\n }\n }\n\n if (result.end.date().getTime() < result.start.date().getTime()) {\n result.end.imply('day', result.end.get('day') + 1);\n }\n\n return result;\n };\n };\n /***/\n\n },\n /* 58 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var dayjs = __webpack_require__(2);\n\n var Parser = __webpack_require__(1).Parser;\n\n var ParsedResult = __webpack_require__(0).ParsedResult;\n\n var PATTERN = new RegExp('(而家|立(?:刻|即)|即刻)|' + '(今|明|前|大前|後|大後|聽|昨|尋|琴)(早|朝|晚)|' + '(上(?:午|晝)|朝(?:早)|早(?:上)|下(?:午|晝)|晏(?:晝)|晚(?:上)|夜(?:晚)?|中(?:午)|凌(?:晨))|' + '(今|明|前|大前|後|大後|聽|昨|尋|琴)(?:日|天)' + '(?:[\\\\s|,|,]*)' + '(?:(上(?:午|晝)|朝(?:早)|早(?:上)|下(?:午|晝)|晏(?:晝)|晚(?:上)|夜(?:晚)?|中(?:午)|凌(?:晨)))?', 'i');\n var NOW_GROUP = 1;\n var DAY_GROUP_1 = 2;\n var TIME_GROUP_1 = 3;\n var TIME_GROUP_2 = 4;\n var DAY_GROUP_3 = 5;\n var TIME_GROUP_3 = 6;\n\n exports.Parser = function ZHHantCasualDateParser() {\n Parser.apply(this, arguments);\n\n this.pattern = function () {\n return PATTERN;\n };\n\n this.extract = function (text, ref, match, opt) {\n text = match[0];\n var index = match.index;\n var result = new ParsedResult({\n index: index,\n text: text,\n ref: ref\n });\n var refMoment = dayjs(ref);\n var startMoment = refMoment;\n\n if (match[NOW_GROUP]) {\n result.start.imply('hour', refMoment.hour());\n result.start.imply('minute', refMoment.minute());\n result.start.imply('second', refMoment.second());\n result.start.imply('millisecond', refMoment.millisecond());\n } else if (match[DAY_GROUP_1]) {\n var day1 = match[DAY_GROUP_1];\n var time1 = match[TIME_GROUP_1];\n\n if (day1 == '明' || day1 == '聽') {\n // Check not \"Tomorrow\" on late night\n if (refMoment.hour() > 1) {\n startMoment = startMoment.add(1, 'day');\n }\n } else if (day1 == '昨' || day1 == '尋' || day1 == '琴') {\n startMoment = startMoment.add(-1, 'day');\n } else if (day1 == \"前\") {\n startMoment = startMoment.add(-2, 'day');\n } else if (day1 == \"大前\") {\n startMoment = startMoment.add(-3, 'day');\n } else if (day1 == \"後\") {\n startMoment = startMoment.add(2, 'day');\n } else if (day1 == \"大後\") {\n startMoment = startMoment.add(3, 'day');\n }\n\n if (time1 == '早' || time1 == '朝') {\n result.start.imply('hour', 6);\n } else if (time1 == '晚') {\n result.start.imply('hour', 22);\n result.start.imply('meridiem', 1);\n }\n } else if (match[TIME_GROUP_2]) {\n var timeString2 = match[TIME_GROUP_2];\n var time2 = timeString2[0];\n\n if (time2 == '早' || time2 == '朝' || time2 == '上') {\n result.start.imply('hour', 6);\n } else if (time2 == '下' || time2 == '晏') {\n result.start.imply('hour', 15);\n result.start.imply('meridiem', 1);\n } else if (time2 == '中') {\n result.start.imply('hour', 12);\n result.start.imply('meridiem', 1);\n } else if (time2 == '夜' || time2 == '晚') {\n result.start.imply('hour', 22);\n result.start.imply('meridiem', 1);\n } else if (time2 == '凌') {\n result.start.imply('hour', 0);\n }\n } else if (match[DAY_GROUP_3]) {\n var day3 = match[DAY_GROUP_3];\n\n if (day3 == '明' || day3 == '聽') {\n // Check not \"Tomorrow\" on late night\n if (refMoment.hour() > 1) {\n startMoment = startMoment.add(1, 'day');\n }\n } else if (day3 == '昨' || day3 == '尋' || day3 == '琴') {\n startMoment = startMoment.add(-1, 'day');\n } else if (day3 == \"前\") {\n startMoment = startMoment.add(-2, 'day');\n } else if (day3 == \"大前\") {\n startMoment = startMoment.add(-3, 'day');\n } else if (day3 == \"後\") {\n startMoment = startMoment.add(2, 'day');\n } else if (day3 == \"大後\") {\n startMoment = startMoment.add(3, 'day');\n }\n\n var timeString3 = match[TIME_GROUP_3];\n\n if (timeString3) {\n var time3 = timeString3[0];\n\n if (time3 == '早' || time3 == '朝' || time3 == '上') {\n result.start.imply('hour', 6);\n } else if (time3 == '下' || time3 == '晏') {\n result.start.imply('hour', 15);\n result.start.imply('meridiem', 1);\n } else if (time3 == '中') {\n result.start.imply('hour', 12);\n result.start.imply('meridiem', 1);\n } else if (time3 == '夜' || time3 == '晚') {\n result.start.imply('hour', 22);\n result.start.imply('meridiem', 1);\n } else if (time3 == '凌') {\n result.start.imply('hour', 0);\n }\n }\n }\n\n result.start.assign('day', startMoment.date());\n result.start.assign('month', startMoment.month() + 1);\n result.start.assign('year', startMoment.year());\n result.tags.ZHHantCasualDateParser = true;\n return result;\n };\n };\n /***/\n\n },\n /* 59 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var dayjs = __webpack_require__(2);\n\n var Parser = __webpack_require__(1).Parser;\n\n var ParsedResult = __webpack_require__(0).ParsedResult;\n\n var util = __webpack_require__(7);\n\n var PATTERN = new RegExp('(\\\\d+|[' + Object.keys(util.NUMBER).join('') + ']+|半|幾)(?:\\\\s*)' + '(?:個)?' + '(秒(?:鐘)?|分鐘|小時|鐘|日|天|星期|禮拜|月|年)' + '(?:(?:之|過)?後|(?:之)?內)', 'i');\n var NUMBER_GROUP = 1;\n var UNIT_GROUP = 2;\n\n exports.Parser = function ZHHantCasualDateParser() {\n Parser.apply(this, arguments);\n\n this.pattern = function () {\n return PATTERN;\n };\n\n this.extract = function (text, ref, match, opt) {\n var index = match.index;\n text = match[0];\n var result = new ParsedResult({\n index: index,\n text: text,\n ref: ref\n });\n var number = parseInt(match[NUMBER_GROUP]);\n\n if (isNaN(number)) {\n number = util.zhStringToNumber(match[NUMBER_GROUP]);\n }\n\n if (isNaN(number)) {\n var string = match[NUMBER_GROUP];\n\n if (string === '幾') {\n number = 3;\n } else if (string === '半') {\n number = 0.5;\n } else {\n //just in case\n return null;\n }\n }\n\n var date = dayjs(ref);\n var unit = match[UNIT_GROUP];\n var unitAbbr = unit[0];\n\n if (unitAbbr.match(/[日天星禮月年]/)) {\n if (unitAbbr == '日' || unitAbbr == '天') {\n date = date.add(number, 'd');\n } else if (unitAbbr == '星' || unitAbbr == '禮') {\n date = date.add(number * 7, 'd');\n } else if (unitAbbr == '月') {\n date = date.add(number, 'month');\n } else if (unitAbbr == '年') {\n date = date.add(number, 'year');\n }\n\n result.start.assign('year', date.year());\n result.start.assign('month', date.month() + 1);\n result.start.assign('day', date.date());\n return result;\n }\n\n if (unitAbbr == '秒') {\n date = date.add(number, 'second');\n } else if (unitAbbr == '分') {\n date = date.add(number, 'minute');\n } else if (unitAbbr == '小' || unitAbbr == '鐘') {\n date = date.add(number, 'hour');\n }\n\n result.start.imply('year', date.year());\n result.start.imply('month', date.month() + 1);\n result.start.imply('day', date.date());\n result.start.assign('hour', date.hour());\n result.start.assign('minute', date.minute());\n result.start.assign('second', date.second());\n result.tags.ZHHantDeadlineFormatParser = true;\n return result;\n };\n };\n /***/\n\n },\n /* 60 */\n\n /***/\n function (module, exports, __webpack_require__) {\n /*\n \n \n */\n var dayjs = __webpack_require__(2);\n\n var Parser = __webpack_require__(1).Parser;\n\n var ParsedResult = __webpack_require__(0).ParsedResult;\n\n var util = __webpack_require__(8);\n\n var PATTERN = new RegExp('(\\\\W|^)' + '(in|nach)\\\\s*' + '(' + util.INTEGER_WORDS_PATTERN + '|[0-9]+|einigen|eine[rm]\\\\s*halben|eine[rm])\\\\s*' + '(sekunden?|min(?:ute)?n?|stunden?|tag(?:en)?|wochen?|monat(?:en)?|jahr(?:en)?)\\\\s*' + '(?=\\\\W|$)', 'i');\n var STRICT_PATTERN = new RegExp('(\\\\W|^)' + '(in|nach)\\\\s*' + '(' + util.INTEGER_WORDS_PATTERN + '|[0-9]+|eine(?:r|m)?)\\\\s*' + '(sekunden?|minuten?|stunden?|tag(?:en)?)\\\\s*' + '(?=\\\\W|$)', 'i');\n\n exports.Parser = function DEDeadlineFormatParser() {\n Parser.apply(this, arguments);\n\n this.pattern = function () {\n return this.isStrictMode() ? STRICT_PATTERN : PATTERN;\n };\n\n this.extract = function (text, ref, match, opt) {\n var index = match.index + match[1].length;\n var text = match[0];\n text = match[0].substr(match[1].length, match[0].length - match[1].length);\n var result = new ParsedResult({\n index: index,\n text: text,\n ref: ref\n });\n var num = match[3].toLowerCase();\n\n if (util.INTEGER_WORDS[num] !== undefined) {\n num = util.INTEGER_WORDS[num];\n } else if (num === 'einer' || num === 'einem') {\n num = 1;\n } else if (num === 'einigen') {\n num = 3;\n } else if (/halben/.test(num)) {\n num = 0.5;\n } else {\n num = parseInt(num);\n }\n\n var date = dayjs(ref);\n\n if (/tag|woche|monat|jahr/i.test(match[4])) {\n if (/tag/i.test(match[4])) {\n date = date.add(num, 'd');\n } else if (/woche/i.test(match[4])) {\n date = date.add(num * 7, 'd');\n } else if (/monat/i.test(match[4])) {\n date = date.add(num, 'month');\n } else if (/jahr/i.test(match[4])) {\n date = date.add(num, 'year');\n }\n\n result.start.assign('year', date.year());\n result.start.assign('month', date.month() + 1);\n result.start.assign('day', date.date());\n return result;\n }\n\n if (/stunde/i.test(match[4])) {\n date = date.add(num, 'hour');\n } else if (/min/i.test(match[4])) {\n date = date.add(num, 'minute');\n } else if (/sekunde/i.test(match[4])) {\n date = date.add(num, 'second');\n }\n\n result.start.imply('year', date.year());\n result.start.imply('month', date.month() + 1);\n result.start.imply('day', date.date());\n result.start.assign('hour', date.hour());\n result.start.assign('minute', date.minute());\n result.start.assign('second', date.second());\n result.tags['DEDeadlineFormatParser'] = true;\n return result;\n };\n };\n /***/\n\n },\n /* 61 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var dayjs = __webpack_require__(2);\n\n var parser = __webpack_require__(1);\n\n var ParsedResult = __webpack_require__(0).ParsedResult;\n\n var util = __webpack_require__(8);\n\n var PATTERN = new RegExp('(\\\\W|^)' + '(?:am\\\\s*?)?' + '(?:(Sonntag|Montag|Dienstag|Mittwoch|Donnerstag|Freitag|Samstag|So|Mo|Di|Mi|Do|Fr|Sa)\\\\s*,?\\\\s*)?' + '(?:den\\\\s*)?' + '([0-9]{1,2})\\\\.' + '(?:\\\\s*(?:bis(?:\\\\s*(?:am|zum))?|\\\\-|\\\\–|\\\\s)\\\\s*([0-9]{1,2})\\\\.)?\\\\s*' + '(Jan(?:uar|\\\\.)?|Feb(?:ruar|\\\\.)?|Mär(?:z|\\\\.)?|Maerz|Mrz\\\\.?|Apr(?:il|\\\\.)?|Mai|Jun(?:i|\\\\.)?|Jul(?:i|\\\\.)?|Aug(?:ust|\\\\.)?|Sep(?:t|t\\\\.|tember|\\\\.)?|Okt(?:ober|\\\\.)?|Nov(?:ember|\\\\.)?|Dez(?:ember|\\\\.)?)' + '(?:' + ',?\\\\s*([0-9]{1,4}(?![^\\\\s]\\\\d))' + '(\\\\s*[vn]\\\\.?\\\\s*C(?:hr)?\\\\.?)?' + ')?' + '(?=\\\\W|$)', 'i');\n var WEEKDAY_GROUP = 2;\n var DATE_GROUP = 3;\n var DATE_TO_GROUP = 4;\n var MONTH_NAME_GROUP = 5;\n var YEAR_GROUP = 6;\n var YEAR_BE_GROUP = 7;\n\n exports.Parser = function DEMonthNameLittleEndianParser() {\n parser.Parser.apply(this, arguments);\n\n this.pattern = function () {\n return PATTERN;\n };\n\n this.extract = function (text, ref, match, opt) {\n var result = new ParsedResult({\n text: match[0].substr(match[1].length, match[0].length - match[1].length),\n index: match.index + match[1].length,\n ref: ref\n });\n var month = match[MONTH_NAME_GROUP];\n month = util.MONTH_OFFSET[month.toLowerCase()];\n var day = match[DATE_GROUP];\n day = parseInt(day);\n var year = null;\n\n if (match[YEAR_GROUP]) {\n year = match[YEAR_GROUP];\n year = parseInt(year);\n\n if (match[YEAR_BE_GROUP]) {\n if (/v/i.test(match[YEAR_BE_GROUP])) {\n // v.Chr.\n year = -year;\n }\n } else if (year < 100) {\n year = year + 2000;\n }\n }\n\n if (year) {\n result.start.assign('day', day);\n result.start.assign('month', month);\n result.start.assign('year', year);\n } else {\n year = parser.findYearClosestToRef(ref, day, month);\n result.start.assign('day', day);\n result.start.assign('month', month);\n result.start.imply('year', year);\n } // Weekday component\n\n\n if (match[WEEKDAY_GROUP]) {\n var weekday = match[WEEKDAY_GROUP];\n weekday = util.WEEKDAY_OFFSET[weekday.toLowerCase()];\n result.start.assign('weekday', weekday);\n } // Text can be 'range' value. Such as '12 - 13 January 2012'\n\n\n if (match[DATE_TO_GROUP]) {\n result.end = result.start.clone();\n result.end.assign('day', parseInt(match[DATE_TO_GROUP]));\n }\n\n result.tags['DEMonthNameLittleEndianParser'] = true;\n return result;\n };\n };\n /***/\n\n },\n /* 62 */\n\n /***/\n function (module, exports, __webpack_require__) {\n /*\n \n The parser for parsing month name and year.\n \n EX. \n - Januar\n - Januar 2012\n */\n var parser = __webpack_require__(1);\n\n var ParsedResult = __webpack_require__(0).ParsedResult;\n\n var util = __webpack_require__(8);\n\n var PATTERN = new RegExp('(^|\\\\D\\\\s+|[^\\\\w\\\\s])' + '(Jan\\\\.?|Januar|Feb\\\\.?|Februar|Mär\\\\.?|M(?:ä|ae)rz|Mrz\\\\.?|Apr\\\\.?|April|Mai\\\\.?|Jun\\\\.?|Juni|Jul\\\\.?|Juli|Aug\\\\.?|August|Sep\\\\.?|Sept\\\\.?|September|Okt\\\\.?|Oktober|Nov\\\\.?|November|Dez\\\\.?|Dezember)' + '\\\\s*' + '(?:' + ',?\\\\s*(?:([0-9]{4})(\\\\s*[vn]\\\\.?\\\\s*C(?:hr)?\\\\.?)?|([0-9]{1,4})\\\\s*([vn]\\\\.?\\\\s*C(?:hr)?\\\\.?))' + ')?' + '(?=[^\\\\s\\\\w]|$)', 'i');\n var MONTH_NAME_GROUP = 2;\n var YEAR_GROUP = 3;\n var YEAR_BE_GROUP = 4;\n var YEAR_GROUP2 = 5;\n var YEAR_BE_GROUP2 = 6;\n\n exports.Parser = function ENMonthNameParser() {\n parser.Parser.apply(this, arguments);\n\n this.pattern = function () {\n return PATTERN;\n };\n\n this.extract = function (text, ref, match, opt) {\n var result = new ParsedResult({\n text: match[0].substr(match[1].length, match[0].length - match[1].length),\n index: match.index + match[1].length,\n ref: ref\n });\n var month = match[MONTH_NAME_GROUP];\n month = util.MONTH_OFFSET[month.toLowerCase()];\n var day = 1;\n var year = null;\n\n if (match[YEAR_GROUP] || match[YEAR_GROUP2]) {\n year = match[YEAR_GROUP] || match[YEAR_GROUP2];\n year = parseInt(year);\n\n if (match[YEAR_BE_GROUP] || match[YEAR_BE_GROUP2]) {\n if (/v/i.test(match[YEAR_BE_GROUP] || match[YEAR_BE_GROUP2])) {\n // v.Chr.\n year = -year;\n }\n } else if (year < 100) {\n year = year + 2000;\n }\n }\n\n if (year) {\n result.start.imply('day', day);\n result.start.assign('month', month);\n result.start.assign('year', year);\n } else {\n year = parser.findYearClosestToRef(ref, day, month);\n result.start.imply('day', day);\n result.start.assign('month', month);\n result.start.imply('year', year);\n }\n\n if (this.isStrictMode() && result.text.match(/^\\w+$/)) {\n return false;\n }\n\n result.tags['DEMonthNameParser'] = true;\n return result;\n };\n };\n /***/\n\n },\n /* 63 */\n\n /***/\n function (module, exports, __webpack_require__) {\n /*\n Date format with slash \"/\" (also \"-\" and \".\") between numbers\n - Tuesday 11/3/2015\n - 11/3/2015\n - 11/3\n */\n var dayjs = __webpack_require__(2);\n\n var Parser = __webpack_require__(1).Parser;\n\n var ParsedResult = __webpack_require__(0).ParsedResult;\n\n var PATTERN = new RegExp('(\\\\W|^)' + '(?:' + '(?:am\\\\s*?)?' + '((?:sonntag|so|montag|mo|dienstag|di|mittwoch|mi|donnerstag|do|freitag|fr|samstag|sa))' + '\\\\s*\\\\,?\\\\s*' + '(?:den\\\\s*)?' + ')?' + '([0-3]{0,1}[0-9]{1})[\\\\/\\\\.\\\\-]([0-3]{0,1}[0-9]{1})' + '(?:' + '[\\\\/\\\\.\\\\-]' + '([0-9]{4}\\s*\\,?\\s*|[0-9]{2}\\s*\\,?\\s*)' + ')?' + '(\\\\W|$)', 'i');\n var DAYS_OFFSET = {\n 'sonntag': 0,\n 'so': 0,\n 'montag': 1,\n 'mo': 1,\n 'dienstag': 2,\n 'di': 2,\n 'mittwoch': 3,\n 'mi': 3,\n 'donnerstag': 4,\n 'do': 4,\n 'freitag': 5,\n 'fr': 5,\n 'samstag': 6,\n 'sa': 6\n };\n var OPENNING_GROUP = 1;\n var ENDING_GROUP = 6;\n var WEEKDAY_GROUP = 2;\n var DAY_GROUP = 3;\n var MONTH_GROUP = 4;\n var YEAR_GROUP = 5;\n\n exports.Parser = function DESlashDateFormatParser(argument) {\n Parser.apply(this, arguments);\n\n this.pattern = function () {\n return PATTERN;\n };\n\n this.extract = function (text, ref, match, opt) {\n if (match[OPENNING_GROUP] == '/' || match[ENDING_GROUP] == '/') {\n // Long skip, if there is some overlapping like:\n // XX[/YY/ZZ]\n // [XX/YY/]ZZ\n match.index += match[0].length;\n return;\n }\n\n var index = match.index + match[OPENNING_GROUP].length;\n var text = match[0].substr(match[OPENNING_GROUP].length, match[0].length - match[ENDING_GROUP].length);\n var result = new ParsedResult({\n text: text,\n index: index,\n ref: ref\n });\n if (text.match(/^\\d\\.\\d$/)) return;\n if (text.match(/^\\d\\.\\d{1,2}\\.\\d{1,2}$/)) return; // MM/dd -> OK\n // MM.dd -> NG\n\n if (!match[YEAR_GROUP] && match[0].indexOf('/') < 0) return;\n var year = match[YEAR_GROUP] || dayjs(ref).year() + '';\n var month = match[MONTH_GROUP];\n var day = match[DAY_GROUP];\n month = parseInt(month);\n day = parseInt(day);\n year = parseInt(year);\n if (month < 1 || month > 12) return null;\n if (day < 1 || day > 31) return null;\n\n if (year < 100) {\n if (year > 50) {\n year = year + 1900;\n } else {\n year = year + 2000;\n }\n }\n\n result.start.assign('day', day);\n result.start.assign('month', month);\n result.start.assign('year', year); //Day of week\n\n if (match[WEEKDAY_GROUP]) {\n result.start.assign('weekday', DAYS_OFFSET[match[WEEKDAY_GROUP].toLowerCase()]);\n }\n\n result.tags['DESlashDateFormatParser'] = true;\n return result;\n };\n };\n /***/\n\n },\n /* 64 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var dayjs = __webpack_require__(2);\n\n var Parser = __webpack_require__(1).Parser;\n\n var ParsedResult = __webpack_require__(0).ParsedResult;\n\n var util = __webpack_require__(8);\n\n var PATTERN = new RegExp('' + '(\\\\W|^)vor\\\\s*' + '(' + util.INTEGER_WORDS_PATTERN + '|[0-9]+|einigen|eine[rm]\\\\s*halben|eine[rm])\\\\s*' + '(sekunden?|min(?:ute)?n?|stunden?|wochen?|tag(?:en)?|monat(?:en)?|jahr(?:en)?)\\\\s*' + '(?=(?:\\\\W|$))', 'i');\n var STRICT_PATTERN = new RegExp('' + '(\\\\W|^)vor\\\\s*' + '([0-9]+|eine(?:r|m))\\\\s*' + '(sekunden?|minuten?|stunden?|tag(?:en)?)' + '(?=(?:\\\\W|$))', 'i');\n\n exports.Parser = function DETimeAgoFormatParser() {\n Parser.apply(this, arguments);\n\n this.pattern = function () {\n return this.isStrictMode() ? STRICT_PATTERN : PATTERN;\n };\n\n this.extract = function (text, ref, match, opt) {\n if (match.index > 0 && text[match.index - 1].match(/\\w/)) return null;\n var text = match[0];\n text = match[0].substr(match[1].length, match[0].length - match[1].length);\n var index = match.index + match[1].length;\n var result = new ParsedResult({\n index: index,\n text: text,\n ref: ref\n });\n var num = match[2].toLowerCase();\n\n if (util.INTEGER_WORDS[num] !== undefined) {\n num = util.INTEGER_WORDS[num];\n } else if (num === 'einer' || num === 'einem') {\n num = 1;\n } else if (num === 'einigen') {\n num = 3;\n } else if (/halben/.test(num)) {\n num = 0.5;\n } else {\n num = parseInt(num);\n }\n\n var date = dayjs(ref);\n\n if (/stunde|min|sekunde/i.test(match[3])) {\n if (/stunde/i.test(match[3])) {\n date = date.add(-num, 'hour');\n } else if (/min/i.test(match[3])) {\n date = date.add(-num, 'minute');\n } else if (/sekunde/i.test(match[3])) {\n date = date.add(-num, 'second');\n }\n\n result.start.imply('day', date.date());\n result.start.imply('month', date.month() + 1);\n result.start.imply('year', date.year());\n result.start.assign('hour', date.hour());\n result.start.assign('minute', date.minute());\n result.start.assign('second', date.second());\n result.tags['DETimeAgoFormatParser'] = true;\n return result;\n }\n\n if (/woche/i.test(match[3])) {\n date = date.add(-num, 'week');\n result.start.imply('day', date.date());\n result.start.imply('month', date.month() + 1);\n result.start.imply('year', date.year());\n result.start.imply('weekday', date.day());\n return result;\n }\n\n if (/tag/i.test(match[3])) {\n date = date.add(-num, 'd');\n }\n\n if (/monat/i.test(match[3])) {\n date = date.add(-num, 'month');\n }\n\n if (/jahr/i.test(match[3])) {\n date = date.add(-num, 'year');\n }\n\n result.start.assign('day', date.date());\n result.start.assign('month', date.month() + 1);\n result.start.assign('year', date.year());\n return result;\n };\n };\n /***/\n\n },\n /* 65 */\n\n /***/\n function (module, exports, __webpack_require__) {\n /*\n \n \n */\n var dayjs = __webpack_require__(2);\n\n var Parser = __webpack_require__(1).Parser;\n\n var ParsedResult = __webpack_require__(0).ParsedResult;\n\n var ParsedComponents = __webpack_require__(0).ParsedComponents;\n\n var FIRST_REG_PATTERN = new RegExp(\"(^|\\\\s|T)\" + \"(?:(?:um|von)\\\\s*)?\" + \"(\\\\d{1,4}|mittags?|mitternachts?)\" + \"(?:\" + \"(?:\\\\.|\\\\:|\\\\:)(\\\\d{1,2})\" + \"(?:\" + \"(?:\\\\:|\\\\:)(\\\\d{2})\" + \")?\" + \")?\" + \"(?:\\\\s*uhr)?\" + \"(?:\\\\s*(morgens|vormittags|mittags|nachmittags|abends|nachts))?\" + \"(?=\\\\W|$)\", 'i');\n var SECOND_REG_PATTERN = new RegExp(\"^\\\\s*\" + \"(\\\\-|\\\\–|\\\\~|\\\\〜|bis|\\\\?)\\\\s*\" + \"(\\\\d{1,4})\" + \"(?:\" + \"(?:\\\\.|\\\\:|\\\\:)(\\\\d{1,2})\" + \"(?:\" + \"(?:\\\\.|\\\\:|\\\\:)(\\\\d{1,2})\" + \")?\" + \")?\" + \"(?:\\\\s*(morgens|vormittags|mittags|nachmittags|abends|nachts))?\" + \"(?=\\\\W|$)\", 'i');\n var HOUR_GROUP = 2;\n var MINUTE_GROUP = 3;\n var SECOND_GROUP = 4;\n var AM_PM_HOUR_GROUP = 5;\n\n exports.Parser = function DETimeExpressionParser() {\n Parser.apply(this, arguments);\n\n this.pattern = function () {\n return FIRST_REG_PATTERN;\n };\n\n this.extract = function (text, ref, match, opt) {\n // This pattern can be overlaped Ex. [12] AM, 1[2] AM\n if (match.index > 0 && text[match.index - 1].match(/\\w/)) return null;\n var refMoment = dayjs(ref);\n var result = new ParsedResult();\n result.ref = ref;\n result.index = match.index + match[1].length;\n result.text = match[0].substring(match[1].length);\n result.tags['DETimeExpressionParser'] = true;\n result.start.imply('day', refMoment.date());\n result.start.imply('month', refMoment.month() + 1);\n result.start.imply('year', refMoment.year());\n var hour = 0;\n var minute = 0;\n var meridiem = -1; // ----- Second\n\n if (match[SECOND_GROUP] != null) {\n var second = parseInt(match[SECOND_GROUP]);\n if (second >= 60) return null;\n result.start.assign('second', second);\n } // ----- Hours\n\n\n if (/mittags?/i.test(match[HOUR_GROUP])) {\n meridiem = 1;\n hour = 12;\n } else if (/mitternachts?/i.test(match[HOUR_GROUP])) {\n meridiem = 0;\n hour = 0;\n } else {\n hour = parseInt(match[HOUR_GROUP]);\n } // ----- Minutes\n\n\n if (match[MINUTE_GROUP] != null) {\n minute = parseInt(match[MINUTE_GROUP]);\n } else if (hour > 100) {\n minute = hour % 100;\n hour = parseInt(hour / 100);\n }\n\n if (minute >= 60) {\n return null;\n }\n\n if (hour > 24) {\n return null;\n }\n\n if (hour >= 12) {\n meridiem = 1;\n } // ----- AM & PM \n\n\n if (match[AM_PM_HOUR_GROUP] != null) {\n if (hour > 12) return null;\n var ampm = match[AM_PM_HOUR_GROUP][0].toLowerCase();\n\n if (ampm === 'morgens' || ampm === 'vormittags') {\n meridiem = 0;\n if (hour == 12) hour = 0;\n } else {\n meridiem = 1;\n if (hour != 12) hour += 12;\n }\n }\n\n result.start.assign('hour', hour);\n result.start.assign('minute', minute);\n\n if (meridiem >= 0) {\n result.start.assign('meridiem', meridiem);\n } else {\n if (hour < 12) {\n result.start.imply('meridiem', 0);\n } else {\n result.start.imply('meridiem', 1);\n }\n } // ==============================================================\n // Extracting the 'to' chunk\n // ==============================================================\n\n\n match = SECOND_REG_PATTERN.exec(text.substring(result.index + result.text.length));\n\n if (!match) {\n // Not accept number only result\n if (result.text.match(/^\\d+$/)) {\n return null;\n }\n\n return result;\n } // Pattern \"YY.YY -XXXX\" is more like timezone offset\n\n\n if (match[0].match(/^\\s*(\\+|\\-)\\s*\\d{3,4}$/)) {\n return result;\n }\n\n if (result.end == null) {\n result.end = new ParsedComponents(null, result.start.date());\n }\n\n var hour = 0;\n var minute = 0;\n var meridiem = -1; // ----- Second\n\n if (match[SECOND_GROUP] != null) {\n var second = parseInt(match[SECOND_GROUP]);\n if (second >= 60) return null;\n result.end.assign('second', second);\n }\n\n hour = parseInt(match[2]); // ----- Minute\n\n if (match[MINUTE_GROUP] != null) {\n minute = parseInt(match[MINUTE_GROUP]);\n if (minute >= 60) return result;\n } else if (hour > 100) {\n minute = hour % 100;\n hour = parseInt(hour / 100);\n }\n\n if (minute >= 60) {\n return null;\n }\n\n if (hour > 24) {\n return null;\n }\n\n if (hour >= 12) {\n meridiem = 1;\n } // ----- AM & PM \n\n\n if (match[AM_PM_HOUR_GROUP] != null) {\n if (hour > 12) return null;\n var ampm = match[AM_PM_HOUR_GROUP][0].toLowerCase();\n\n if (ampm === 'morgens' || ampm === 'vormittags') {\n meridiem = 0;\n\n if (hour == 12) {\n hour = 0;\n\n if (!result.end.isCertain('day')) {\n result.end.imply('day', result.end.get('day') + 1);\n }\n }\n } else {\n meridiem = 1;\n if (hour != 12) hour += 12;\n }\n\n if (!result.start.isCertain('meridiem')) {\n if (meridiem == 0) {\n result.start.imply('meridiem', 0);\n\n if (result.start.get('hour') == 12) {\n result.start.assign('hour', 0);\n }\n } else {\n result.start.imply('meridiem', 1);\n\n if (result.start.get('hour') != 12) {\n result.start.assign('hour', result.start.get('hour') + 12);\n }\n }\n }\n }\n\n result.text = result.text + match[0];\n result.end.assign('hour', hour);\n result.end.assign('minute', minute);\n\n if (meridiem >= 0) {\n result.end.assign('meridiem', meridiem);\n } else {\n var startAtPM = result.start.isCertain('meridiem') && result.start.get('meridiem') == 1;\n\n if (startAtPM && result.start.get('hour') > hour) {\n // 10pm - 1 (am)\n result.end.imply('meridiem', 0);\n } else if (hour > 12) {\n result.end.imply('meridiem', 1);\n }\n }\n\n if (result.end.date().getTime() < result.start.date().getTime()) {\n result.end.imply('day', result.end.get('day') + 1);\n }\n\n return result;\n };\n };\n /***/\n\n },\n /* 66 */\n\n /***/\n function (module, exports, __webpack_require__) {\n /*\n \n \n */\n var dayjs = __webpack_require__(2);\n\n var Parser = __webpack_require__(1).Parser;\n\n var ParsedResult = __webpack_require__(0).ParsedResult;\n\n var DAYS_OFFSET = {\n 'sonntag': 0,\n 'so': 0,\n 'montag': 1,\n 'mo': 1,\n 'dienstag': 2,\n 'di': 2,\n 'mittwoch': 3,\n 'mi': 3,\n 'donnerstag': 4,\n 'do': 4,\n 'freitag': 5,\n 'fr': 5,\n 'samstag': 6,\n 'sa': 6\n };\n var PATTERN = new RegExp('(\\\\W|^)' + '(?:(?:\\\\,|\\\\(|\\\\()\\\\s*)?' + '(?:a[mn]\\\\s*?)?' + '(?:(diese[mn]|letzte[mn]|n(?:ä|ae)chste[mn])\\\\s*)?' + '(' + Object.keys(DAYS_OFFSET).join('|') + ')' + '(?:\\\\s*(?:\\\\,|\\\\)|\\\\)))?' + '(?:\\\\s*(diese|letzte|n(?:ä|ae)chste)\\\\s*woche)?' + '(?=\\\\W|$)', 'i');\n var PREFIX_GROUP = 2;\n var WEEKDAY_GROUP = 3;\n var POSTFIX_GROUP = 4;\n\n exports.Parser = function DEWeekdayParser() {\n Parser.apply(this, arguments);\n\n this.pattern = function () {\n return PATTERN;\n };\n\n this.extract = function (text, ref, match, opt) {\n var index = match.index + match[1].length;\n var text = match[0].substr(match[1].length, match[0].length - match[1].length);\n var result = new ParsedResult({\n index: index,\n text: text,\n ref: ref\n });\n var dayOfWeek = match[WEEKDAY_GROUP].toLowerCase();\n var offset = DAYS_OFFSET[dayOfWeek];\n if (offset === undefined) return null;\n var startMoment = dayjs(ref);\n var prefix = match[PREFIX_GROUP];\n var postfix = match[POSTFIX_GROUP];\n var refOffset = startMoment.day();\n var norm = prefix || postfix;\n norm = norm || '';\n norm = norm.toLowerCase();\n\n if (/letzte/.test(norm)) {\n startMoment = startMoment.day(offset - 7);\n } else if (/n(?:ä|ae)chste/.test(norm)) {\n startMoment = startMoment.day(offset + 7);\n } else if (/diese/.test(norm)) {\n if (opt.forwardDate && refOffset > offset) {\n startMoment = startMoment.day(offset + 7);\n } else {\n startMoment = startMoment.day(offset);\n }\n } else {\n if (opt.forwardDate && refOffset > offset) {\n startMoment = startMoment.day(offset + 7);\n } else if (!opt.forwardDate && Math.abs(offset - 7 - refOffset) < Math.abs(offset - refOffset)) {\n startMoment = startMoment.day(offset - 7);\n } else if (!opt.forwardDate && Math.abs(offset + 7 - refOffset) < Math.abs(offset - refOffset)) {\n startMoment = startMoment.day(offset + 7);\n } else {\n startMoment = startMoment.day(offset);\n }\n }\n\n result.start.assign('weekday', offset);\n result.start.imply('day', startMoment.date());\n result.start.imply('month', startMoment.month() + 1);\n result.start.imply('year', startMoment.year());\n return result;\n };\n };\n /***/\n\n },\n /* 67 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var dayjs = __webpack_require__(2);\n\n var Parser = __webpack_require__(1).Parser;\n\n var ParsedResult = __webpack_require__(0).ParsedResult;\n\n var PATTERN = new RegExp('(\\\\W|^)(' + 'jetzt|' + '(?:heute|diesen)\\\\s*(morgen|vormittag|mittag|nachmittag|abend)|' + '(?:heute|diese)\\\\s*nacht|' + 'heute|' + '(?:(?:ü|ue)ber)?morgen(?:\\\\s*(morgen|vormittag|mittag|nachmittag|abend|nacht))?|' + '(?:vor)?gestern(?:\\\\s*(morgen|vormittag|mittag|nachmittag|abend|nacht))?|' + 'letzte\\\\s*nacht' + ')(?=\\\\W|$)', 'i');\n\n exports.Parser = function DECasualDateParser() {\n Parser.apply(this, arguments);\n\n this.pattern = function () {\n return PATTERN;\n };\n\n this.extract = function (text, ref, match, opt) {\n text = match[0].substr(match[1].length);\n var index = match.index + match[1].length;\n var result = new ParsedResult({\n index: index,\n text: text,\n ref: ref\n });\n var refMoment = dayjs(ref);\n var lowerText = text.toLowerCase();\n var startMoment = refMoment;\n\n if (/(?:heute|diese)\\s*nacht/.test(lowerText)) {\n // Normally means this coming midnight\n result.start.imply('hour', 22);\n result.start.imply('meridiem', 1);\n } else if (/^(?:ü|ue)bermorgen/.test(lowerText)) {\n startMoment = startMoment.add(refMoment.hour() > 1 ? 2 : 1, 'day');\n } else if (/^morgen/.test(lowerText)) {\n // Check not \"Tomorrow\" on late night\n if (refMoment.hour() > 1) {\n startMoment = startMoment.add(1, 'day');\n }\n } else if (/^gestern/.test(lowerText)) {\n startMoment = startMoment.add(-1, 'day');\n } else if (/^vorgestern/.test(lowerText)) {\n startMoment = startMoment.add(-2, 'day');\n } else if (/letzte\\s*nacht/.test(lowerText)) {\n result.start.imply('hour', 0);\n\n if (refMoment.hour() > 6) {\n startMoment = startMoment.add(-1, 'day');\n }\n } else if (lowerText === 'jetzt') {\n result.start.imply('hour', refMoment.hour());\n result.start.imply('minute', refMoment.minute());\n result.start.imply('second', refMoment.second());\n result.start.imply('millisecond', refMoment.millisecond());\n }\n\n var secondMatch = match[3] || match[4] || match[5];\n\n if (secondMatch) {\n switch (secondMatch.toLowerCase()) {\n case 'morgen':\n result.start.imply('hour', 6);\n break;\n\n case 'vormittag':\n result.start.imply('hour', 9);\n break;\n\n case 'mittag':\n result.start.imply('hour', 12);\n break;\n\n case 'nachmittag':\n result.start.imply('hour', 15);\n result.start.imply('meridiem', 1);\n break;\n\n case 'abend':\n result.start.imply('hour', 18);\n result.start.imply('meridiem', 1);\n break;\n\n case 'nacht':\n result.start.imply('hour', 0);\n break;\n }\n }\n\n result.start.assign('day', startMoment.date());\n result.start.assign('month', startMoment.month() + 1);\n result.start.assign('year', startMoment.year());\n result.tags['DECasualDateParser'] = true;\n return result;\n };\n };\n /***/\n\n },\n /* 68 */\n\n /***/\n function (module, exports, __webpack_require__) {\n /*\n \n */\n var Refiner = __webpack_require__(3).Refiner;\n\n exports.Refiner = function OverlapRemovalRefiner() {\n Refiner.call(this);\n\n this.refine = function (text, results, opt) {\n if (results.length < 2) return results;\n var filteredResults = [];\n var prevResult = results[0];\n\n for (var i = 1; i < results.length; i++) {\n var result = results[i]; // If overlap, compare the length and discard the shorter one\n\n if (result.index < prevResult.index + prevResult.text.length) {\n if (result.text.length > prevResult.text.length) {\n prevResult = result;\n }\n } else {\n filteredResults.push(prevResult);\n prevResult = result;\n }\n } // The last one\n\n\n if (prevResult != null) {\n filteredResults.push(prevResult);\n }\n\n return filteredResults;\n };\n };\n /***/\n\n },\n /* 69 */\n\n /***/\n function (module, exports, __webpack_require__) {\n /*\n \n */\n var Refiner = __webpack_require__(3).Refiner;\n\n var TIMEZONE_OFFSET_PATTERN = new RegExp(\"^\\\\s*(GMT|UTC)?(\\\\+|\\\\-)(\\\\d{1,2}):?(\\\\d{2})\", 'i');\n var TIMEZONE_OFFSET_SIGN_GROUP = 2;\n var TIMEZONE_OFFSET_HOUR_OFFSET_GROUP = 3;\n var TIMEZONE_OFFSET_MINUTE_OFFSET_GROUP = 4;\n\n exports.Refiner = function ExtractTimezoneOffsetRefiner() {\n Refiner.call(this);\n\n this.refine = function (text, results, opt) {\n results.forEach(function (result) {\n if (result.start.isCertain('timezoneOffset')) {\n return;\n }\n\n var match = TIMEZONE_OFFSET_PATTERN.exec(text.substring(result.index + result.text.length));\n\n if (!match) {\n return;\n }\n\n var hourOffset = parseInt(match[TIMEZONE_OFFSET_HOUR_OFFSET_GROUP]);\n var minuteOffset = parseInt(match[TIMEZONE_OFFSET_MINUTE_OFFSET_GROUP]);\n var timezoneOffset = hourOffset * 60 + minuteOffset;\n\n if (match[TIMEZONE_OFFSET_SIGN_GROUP] === '-') {\n timezoneOffset = -timezoneOffset;\n }\n\n if (result.end != null) {\n result.end.assign('timezoneOffset', timezoneOffset);\n }\n\n result.start.assign('timezoneOffset', timezoneOffset);\n result.text += match[0];\n result.tags['ExtractTimezoneOffsetRefiner'] = true;\n });\n return results;\n };\n };\n /***/\n\n },\n /* 70 */\n\n /***/\n function (module, exports, __webpack_require__) {\n /*\n \n */\n var Refiner = __webpack_require__(3).Refiner; // Map ABBR -> Offset in minute\n\n\n var TIMEZONE_NAME_PATTERN = new RegExp(\"^\\\\s*\\\\(?([A-Z]{2,4})\\\\)?(?=\\\\W|$)\", 'i');\n var DEFAULT_TIMEZONE_ABBR_MAP = {\n \"ACDT\": 630,\n \"ACST\": 570,\n \"ADT\": -180,\n \"AEDT\": 660,\n \"AEST\": 600,\n \"AFT\": 270,\n \"AKDT\": -480,\n \"AKST\": -540,\n \"ALMT\": 360,\n \"AMST\": -180,\n \"AMT\": -240,\n \"ANAST\": 720,\n \"ANAT\": 720,\n \"AQTT\": 300,\n \"ART\": -180,\n \"AST\": -240,\n \"AWDT\": 540,\n \"AWST\": 480,\n \"AZOST\": 0,\n \"AZOT\": -60,\n \"AZST\": 300,\n \"AZT\": 240,\n \"BNT\": 480,\n \"BOT\": -240,\n \"BRST\": -120,\n \"BRT\": -180,\n \"BST\": 60,\n \"BTT\": 360,\n \"CAST\": 480,\n \"CAT\": 120,\n \"CCT\": 390,\n \"CDT\": -300,\n \"CEST\": 120,\n \"CET\": 60,\n \"CHADT\": 825,\n \"CHAST\": 765,\n \"CKT\": -600,\n \"CLST\": -180,\n \"CLT\": -240,\n \"COT\": -300,\n \"CST\": -360,\n \"CVT\": -60,\n \"CXT\": 420,\n \"ChST\": 600,\n \"DAVT\": 420,\n \"EASST\": -300,\n \"EAST\": -360,\n \"EAT\": 180,\n \"ECT\": -300,\n \"EDT\": -240,\n \"EEST\": 180,\n \"EET\": 120,\n \"EGST\": 0,\n \"EGT\": -60,\n \"EST\": -300,\n \"ET\": -300,\n \"FJST\": 780,\n \"FJT\": 720,\n \"FKST\": -180,\n \"FKT\": -240,\n \"FNT\": -120,\n \"GALT\": -360,\n \"GAMT\": -540,\n \"GET\": 240,\n \"GFT\": -180,\n \"GILT\": 720,\n \"GMT\": 0,\n \"GST\": 240,\n \"GYT\": -240,\n \"HAA\": -180,\n \"HAC\": -300,\n \"HADT\": -540,\n \"HAE\": -240,\n \"HAP\": -420,\n \"HAR\": -360,\n \"HAST\": -600,\n \"HAT\": -90,\n \"HAY\": -480,\n \"HKT\": 480,\n \"HLV\": -210,\n \"HNA\": -240,\n \"HNC\": -360,\n \"HNE\": -300,\n \"HNP\": -480,\n \"HNR\": -420,\n \"HNT\": -150,\n \"HNY\": -540,\n \"HOVT\": 420,\n \"ICT\": 420,\n \"IDT\": 180,\n \"IOT\": 360,\n \"IRDT\": 270,\n \"IRKST\": 540,\n \"IRKT\": 540,\n \"IRST\": 210,\n \"IST\": 330,\n \"JST\": 540,\n \"KGT\": 360,\n \"KRAST\": 480,\n \"KRAT\": 480,\n \"KST\": 540,\n \"KUYT\": 240,\n \"LHDT\": 660,\n \"LHST\": 630,\n \"LINT\": 840,\n \"MAGST\": 720,\n \"MAGT\": 720,\n \"MART\": -510,\n \"MAWT\": 300,\n \"MDT\": -360,\n \"MESZ\": 120,\n \"MEZ\": 60,\n \"MHT\": 720,\n \"MMT\": 390,\n \"MSD\": 240,\n \"MSK\": 240,\n \"MST\": -420,\n \"MUT\": 240,\n \"MVT\": 300,\n \"MYT\": 480,\n \"NCT\": 660,\n \"NDT\": -90,\n \"NFT\": 690,\n \"NOVST\": 420,\n \"NOVT\": 360,\n \"NPT\": 345,\n \"NST\": -150,\n \"NUT\": -660,\n \"NZDT\": 780,\n \"NZST\": 720,\n \"OMSST\": 420,\n \"OMST\": 420,\n \"PDT\": -420,\n \"PET\": -300,\n \"PETST\": 720,\n \"PETT\": 720,\n \"PGT\": 600,\n \"PHOT\": 780,\n \"PHT\": 480,\n \"PKT\": 300,\n \"PMDT\": -120,\n \"PMST\": -180,\n \"PONT\": 660,\n \"PST\": -480,\n \"PT\": -480,\n \"PWT\": 540,\n \"PYST\": -180,\n \"PYT\": -240,\n \"RET\": 240,\n \"SAMT\": 240,\n \"SAST\": 120,\n \"SBT\": 660,\n \"SCT\": 240,\n \"SGT\": 480,\n \"SRT\": -180,\n \"SST\": -660,\n \"TAHT\": -600,\n \"TFT\": 300,\n \"TJT\": 300,\n \"TKT\": 780,\n \"TLT\": 540,\n \"TMT\": 300,\n \"TVT\": 720,\n \"ULAT\": 480,\n \"UTC\": 0,\n \"UYST\": -120,\n \"UYT\": -180,\n \"UZT\": 300,\n \"VET\": -210,\n \"VLAST\": 660,\n \"VLAT\": 660,\n \"VUT\": 660,\n \"WAST\": 120,\n \"WAT\": 60,\n \"WEST\": 60,\n \"WESZ\": 60,\n \"WET\": 0,\n \"WEZ\": 0,\n \"WFT\": 720,\n \"WGST\": -120,\n \"WGT\": -180,\n \"WIB\": 420,\n \"WIT\": 540,\n \"WITA\": 480,\n \"WST\": 780,\n \"WT\": 0,\n \"YAKST\": 600,\n \"YAKT\": 600,\n \"YAPT\": 600,\n \"YEKST\": 360,\n \"YEKT\": 360\n };\n\n exports.Refiner = function ExtractTimezoneAbbrRefiner(config) {\n Refiner.call(this, arguments);\n\n this.refine = function (text, results, opt) {\n var timezones = new Object(DEFAULT_TIMEZONE_ABBR_MAP);\n\n if (opt.timezones) {\n for (var name in opt.timezones) {\n timezones[name] = opt.timezones[name];\n }\n }\n\n results.forEach(function (result) {\n if (!result.tags['ENTimeExpressionParser'] && !result.tags['ZHTimeExpressionParser'] && !result.tags['FRTimeExpressionParser'] && !result.tags['DETimeExpressionParser']) {\n return;\n }\n\n var match = TIMEZONE_NAME_PATTERN.exec(text.substring(result.index + result.text.length));\n\n if (match) {\n var timezoneAbbr = match[1].toUpperCase();\n\n if (timezones[timezoneAbbr] === undefined) {\n return;\n }\n\n var timezoneOffset = timezones[timezoneAbbr];\n\n if (!result.start.isCertain('timezoneOffset')) {\n result.start.assign('timezoneOffset', timezoneOffset);\n }\n\n if (result.end != null && !result.end.isCertain('timezoneOffset')) {\n result.end.assign('timezoneOffset', timezoneOffset);\n }\n\n result.text += match[0];\n result.tags['ExtractTimezoneAbbrRefiner'] = true;\n }\n });\n return results;\n };\n };\n /***/\n\n },\n /* 71 */\n\n /***/\n function (module, exports, __webpack_require__) {\n /*\n Enforce 'forwardDate' option to on the results. When there are missing component,\n e.g. \"March 12-13 (without year)\" or \"Thursday\", the refiner will try to adjust the result\n into the future instead of the past.\n */\n var dayjs = __webpack_require__(2);\n\n var Refiner = __webpack_require__(3).Refiner;\n\n exports.Refiner = function ForwardDateRefiner() {\n Refiner.call(this);\n\n this.refine = function (text, results, opt) {\n if (!opt['forwardDate']) {\n return results;\n }\n\n results.forEach(function (result) {\n var refMoment = dayjs(result.ref);\n\n if (result.start.isOnlyDayMonthComponent() && refMoment.isAfter(result.start.dayjs())) {\n // Adjust year into the future\n for (var i = 0; i < 3 && refMoment.isAfter(result.start.dayjs()); i++) {\n result.start.imply('year', result.start.get('year') + 1);\n\n if (result.end && !result.end.isCertain('year')) {\n result.end.imply('year', result.end.get('year') + 1);\n }\n }\n\n result.tags['ForwardDateRefiner'] = true;\n }\n\n if (result.start.isOnlyWeekdayComponent() && refMoment.isAfter(result.start.dayjs())) {\n // Adjust date to the coming week\n if (refMoment.day() > result.start.get('weekday')) {\n refMoment = refMoment.day(result.start.get('weekday') + 7);\n } else {\n refMoment = refMoment.day(result.start.get('weekday'));\n }\n\n result.start.imply('day', refMoment.date());\n result.start.imply('month', refMoment.month() + 1);\n result.start.imply('year', refMoment.year());\n result.tags['ForwardDateRefiner'] = true;\n }\n });\n return results;\n };\n };\n /***/\n\n },\n /* 72 */\n\n /***/\n function (module, exports, __webpack_require__) {\n /*\n \n */\n var Filter = __webpack_require__(3).Filter;\n\n exports.Refiner = function UnlikelyFormatFilter() {\n Filter.call(this);\n\n this.isValid = function (text, result, opt) {\n if (result.text.replace(' ', '').match(/^\\d*(\\.\\d*)?$/)) {\n return false;\n }\n\n return true;\n };\n };\n /***/\n\n },\n /* 73 */\n\n /***/\n function (module, exports, __webpack_require__) {\n /*\n \n */\n var ParsedComponents = __webpack_require__(0).ParsedComponents;\n\n var Refiner = __webpack_require__(3).Refiner;\n\n var PATTERN = new RegExp(\"^\\\\s*(at|after|before|on|,|-|\\\\(|\\\\))?\\\\s*$\");\n\n function isMoreSpecific(prevResult, currResult) {\n var moreSpecific = false;\n\n if (prevResult.start.isCertain('year')) {\n if (!currResult.start.isCertain('year')) {\n moreSpecific = true;\n } else {\n if (prevResult.start.isCertain('month')) {\n if (!currResult.start.isCertain('month')) {\n moreSpecific = true;\n } else {\n if (prevResult.start.isCertain('day') && !currResult.start.isCertain('day')) {\n moreSpecific = true;\n }\n }\n }\n }\n }\n\n return moreSpecific;\n }\n\n function isAbleToMerge(text, prevResult, currResult) {\n var textBetween = text.substring(prevResult.index + prevResult.text.length, currResult.index); // Only accepts merge if one of them comes from casual relative date\n\n var includesRelativeResult = prevResult.tags['ENRelativeDateFormatParser'] || currResult.tags['ENRelativeDateFormatParser']; // We assume they refer to the same date if all date fields are implied\n\n var referToSameDate = !prevResult.start.isCertain('day') && !prevResult.start.isCertain('month') && !prevResult.start.isCertain('year'); // If both years are certain, that determines if they refer to the same date\n // but with one more specific than the other\n\n if (prevResult.start.isCertain('year') && currResult.start.isCertain('year')) referToSameDate = prevResult.start.get('year') === currResult.start.get('year'); // We now test with the next level (month) if they refer to the same date\n\n if (prevResult.start.isCertain('month') && currResult.start.isCertain('month')) referToSameDate = prevResult.start.get('month') === currResult.start.get('month') && referToSameDate;\n return includesRelativeResult && textBetween.match(PATTERN) && referToSameDate;\n }\n\n function mergeResult(text, specificResult, nonSpecificResult) {\n var specificDate = specificResult.start;\n var nonSpecificDate = nonSpecificResult.start;\n var startIndex = Math.min(specificResult.index, nonSpecificResult.index);\n var endIndex = Math.max(specificResult.index + specificResult.text.length, nonSpecificResult.index + nonSpecificResult.text.length);\n specificResult.index = startIndex;\n specificResult.text = text.substring(startIndex, endIndex);\n\n for (var tag in nonSpecificResult.tags) {\n specificResult.tags[tag] = true;\n }\n\n specificResult.tags['ENPrioritizeSpecificDateRefiner'] = true;\n return specificResult;\n }\n\n exports.Refiner = function ENPrioritizeSpecificDateRefiner() {\n Refiner.call(this);\n\n this.refine = function (text, results, opt) {\n if (results.length < 2) return results;\n var mergedResult = [];\n var currResult = null;\n var prevResult = null;\n\n for (var i = 1; i < results.length; i++) {\n currResult = results[i];\n prevResult = results[i - 1];\n\n if (isMoreSpecific(prevResult, currResult) && isAbleToMerge(text, prevResult, currResult)) {\n prevResult = mergeResult(text, prevResult, currResult);\n currResult = null;\n i += 1;\n } else if (isMoreSpecific(currResult, prevResult) && isAbleToMerge(text, prevResult, currResult)) {\n prevResult = mergeResult(text, currResult, prevResult);\n currResult = null;\n i += 1;\n }\n\n mergedResult.push(prevResult);\n }\n\n if (currResult != null) {\n mergedResult.push(currResult);\n }\n\n return mergedResult;\n };\n };\n /***/\n\n },\n /* 74 */\n\n /***/\n function (module, exports, __webpack_require__) {\n /*\n \n */\n var ENMergeDateRangeRefiner = __webpack_require__(10).Refiner;\n\n exports.Refiner = function JPMergeDateRangeRefiner() {\n ENMergeDateRangeRefiner.call(this);\n\n this.pattern = function () {\n return /^\\s*(から|ー)\\s*$/i;\n };\n };\n /***/\n\n },\n /* 75 */\n\n /***/\n function (module, exports, __webpack_require__) {\n /*\r\n \r\n */\n var Refiner = __webpack_require__(3).Refiner;\n\n exports.Refiner = function FRMergeDateRangeRefiner() {\n Refiner.call(this);\n\n this.pattern = function () {\n return /^\\s*(à|a|\\-)\\s*$/i;\n };\n\n this.refine = function (text, results, opt) {\n if (results.length < 2) return results;\n var mergedResult = [];\n var currResult = null;\n var prevResult = null;\n\n for (var i = 1; i < results.length; i++) {\n currResult = results[i];\n prevResult = results[i - 1];\n\n if (!prevResult.end && !currResult.end && this.isAbleToMerge(text, prevResult, currResult)) {\n prevResult = this.mergeResult(text, prevResult, currResult);\n currResult = null;\n i += 1;\n }\n\n mergedResult.push(prevResult);\n }\n\n if (currResult != null) {\n mergedResult.push(currResult);\n }\n\n return mergedResult;\n };\n\n this.isAbleToMerge = function (text, result1, result2) {\n var begin = result1.index + result1.text.length;\n var end = result2.index;\n var textBetween = text.substring(begin, end);\n return textBetween.match(this.pattern());\n };\n\n this.isWeekdayResult = function (result) {\n return result.start.isCertain('weekday') && !result.start.isCertain('day');\n };\n\n this.mergeResult = function (text, fromResult, toResult) {\n if (!this.isWeekdayResult(fromResult) && !this.isWeekdayResult(toResult)) {\n for (var key in toResult.start.knownValues) {\n if (!fromResult.start.isCertain(key)) {\n fromResult.start.assign(key, toResult.start.get(key));\n }\n }\n\n for (var key in fromResult.start.knownValues) {\n if (!toResult.start.isCertain(key)) {\n toResult.start.assign(key, fromResult.start.get(key));\n }\n }\n }\n\n if (fromResult.start.date().getTime() > toResult.start.date()) {\n var tmp = toResult;\n toResult = fromResult;\n fromResult = tmp;\n }\n\n fromResult.end = toResult.start;\n\n for (var tag in toResult.tags) {\n fromResult.tags[tag] = true;\n }\n\n var startIndex = Math.min(fromResult.index, toResult.index);\n var endIndex = Math.max(fromResult.index + fromResult.text.length, toResult.index + toResult.text.length);\n fromResult.index = startIndex;\n fromResult.text = text.substring(startIndex, endIndex);\n fromResult.tags[this.constructor.name] = true;\n return fromResult;\n };\n };\n /***/\n\n },\n /* 76 */\n\n /***/\n function (module, exports, __webpack_require__) {\n /*\r\n \r\n */\n var ParsedComponents = __webpack_require__(0).ParsedComponents;\n\n var Refiner = __webpack_require__(3).Refiner;\n\n var mergeDateTimeComponent = __webpack_require__(6).mergeDateTimeComponent;\n\n var PATTERN = new RegExp(\"^\\\\s*(T|à|a|vers|de|,|-)?\\\\s*$\");\n\n function isDateOnly(result) {\n return !result.start.isCertain('hour') || result.tags['FRCasualDateParser'];\n }\n\n function isTimeOnly(result) {\n return !result.start.isCertain('month') && !result.start.isCertain('weekday');\n }\n\n function isAbleToMerge(text, prevResult, curResult) {\n var textBetween = text.substring(prevResult.index + prevResult.text.length, curResult.index);\n return textBetween.match(PATTERN);\n }\n\n function mergeResult(text, dateResult, timeResult) {\n var beginDate = dateResult.start;\n var beginTime = timeResult.start;\n var beginDateTime = mergeDateTimeComponent(beginDate, beginTime);\n\n if (dateResult.end != null || timeResult.end != null) {\n var endDate = dateResult.end == null ? dateResult.start : dateResult.end;\n var endTime = timeResult.end == null ? timeResult.start : timeResult.end;\n var endDateTime = mergeDateTimeComponent(endDate, endTime);\n\n if (dateResult.end == null && endDateTime.date().getTime() < beginDateTime.date().getTime()) {\n // Ex. 9pm - 1am\n if (endDateTime.isCertain('day')) {\n endDateTime.assign('day', endDateTime.get('day') + 1);\n } else {\n endDateTime.imply('day', endDateTime.get('day') + 1);\n }\n }\n\n dateResult.end = endDateTime;\n }\n\n dateResult.start = beginDateTime;\n var startIndex = Math.min(dateResult.index, timeResult.index);\n var endIndex = Math.max(dateResult.index + dateResult.text.length, timeResult.index + timeResult.text.length);\n dateResult.index = startIndex;\n dateResult.text = text.substring(startIndex, endIndex);\n\n for (var tag in timeResult.tags) {\n dateResult.tags[tag] = true;\n }\n\n dateResult.tags['FRMergeDateAndTimeRefiner'] = true;\n return dateResult;\n }\n\n exports.Refiner = function FRMergeDateTimeRefiner() {\n Refiner.call(this);\n\n this.refine = function (text, results, opt) {\n if (results.length < 2) return results;\n var mergedResult = [];\n var currResult = null;\n var prevResult = null;\n\n for (var i = 1; i < results.length; i++) {\n currResult = results[i];\n prevResult = results[i - 1];\n\n if (isDateOnly(prevResult) && isTimeOnly(currResult) && isAbleToMerge(text, prevResult, currResult)) {\n prevResult = mergeResult(text, prevResult, currResult);\n currResult = null;\n i += 1;\n } else if (isDateOnly(currResult) && isTimeOnly(prevResult) && isAbleToMerge(text, prevResult, currResult)) {\n prevResult = mergeResult(text, currResult, prevResult);\n currResult = null;\n i += 1;\n }\n\n mergedResult.push(prevResult);\n }\n\n if (currResult != null) {\n mergedResult.push(currResult);\n }\n\n return mergedResult;\n };\n };\n /***/\n\n },\n /* 77 */\n\n /***/\n function (module, exports, __webpack_require__) {\n /*\n \n */\n var ENMergeDateRangeRefiner = __webpack_require__(10).Refiner;\n\n exports.Refiner = function DEMergeDateRangeRefiner() {\n ENMergeDateRangeRefiner.call(this);\n\n this.pattern = function () {\n return /^\\s*(bis(?:\\s*(?:am|zum))?|\\-)\\s*$/i;\n };\n };\n /***/\n\n },\n /* 78 */\n\n /***/\n function (module, exports, __webpack_require__) {\n /*\n \n */\n var ParsedComponents = __webpack_require__(0).ParsedComponents;\n\n var Refiner = __webpack_require__(3).Refiner;\n\n var mergeDateTimeComponent = __webpack_require__(6).mergeDateTimeComponent;\n\n var isDateOnly = __webpack_require__(6).isDateOnly;\n\n var isTimeOnly = __webpack_require__(6).isTimeOnly;\n\n var PATTERN = new RegExp(\"^\\\\s*(T|um|am|,|-)?\\\\s*$\");\n\n function isAbleToMerge(text, prevResult, curResult) {\n var textBetween = text.substring(prevResult.index + prevResult.text.length, curResult.index);\n return textBetween.match(PATTERN);\n }\n\n function mergeResult(text, dateResult, timeResult) {\n var beginDate = dateResult.start;\n var beginTime = timeResult.start;\n var beginDateTime = mergeDateTimeComponent(beginDate, beginTime);\n\n if (dateResult.end != null || timeResult.end != null) {\n var endDate = dateResult.end == null ? dateResult.start : dateResult.end;\n var endTime = timeResult.end == null ? timeResult.start : timeResult.end;\n var endDateTime = mergeDateTimeComponent(endDate, endTime);\n\n if (dateResult.end == null && endDateTime.date().getTime() < beginDateTime.date().getTime()) {\n // Ex. 9pm - 1am\n if (endDateTime.isCertain('day')) {\n endDateTime.assign('day', endDateTime.get('day') + 1);\n } else {\n endDateTime.imply('day', endDateTime.get('day') + 1);\n }\n }\n\n dateResult.end = endDateTime;\n }\n\n dateResult.start = beginDateTime;\n var startIndex = Math.min(dateResult.index, timeResult.index);\n var endIndex = Math.max(dateResult.index + dateResult.text.length, timeResult.index + timeResult.text.length);\n dateResult.index = startIndex;\n dateResult.text = text.substring(startIndex, endIndex);\n\n for (var tag in timeResult.tags) {\n dateResult.tags[tag] = true;\n }\n\n dateResult.tags['DEMergeDateAndTimeRefiner'] = true;\n return dateResult;\n }\n\n exports.Refiner = function DEMergeDateTimeRefiner() {\n Refiner.call(this);\n\n this.refine = function (text, results, opt) {\n if (results.length < 2) return results;\n var mergedResult = [];\n var currResult = null;\n var prevResult = null;\n\n for (var i = 1; i < results.length; i++) {\n currResult = results[i];\n prevResult = results[i - 1];\n\n if (isDateOnly(prevResult) && isTimeOnly(currResult) && isAbleToMerge(text, prevResult, currResult)) {\n prevResult = mergeResult(text, prevResult, currResult);\n currResult = null;\n i += 1;\n } else if (isDateOnly(currResult) && isTimeOnly(prevResult) && isAbleToMerge(text, prevResult, currResult)) {\n prevResult = mergeResult(text, currResult, prevResult);\n currResult = null;\n i += 1;\n }\n\n mergedResult.push(prevResult);\n }\n\n if (currResult != null) {\n mergedResult.push(currResult);\n }\n\n return mergedResult;\n };\n };\n /***/\n\n }\n /******/\n ])\n );\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n/*\nTrix 1.2.3\nCopyright © 2020 Basecamp, LLC\nhttp://trix-editor.org/\n */\n(function () {}).call(this), function () {\n var t;\n null == window.Set && (window.Set = t = function () {\n function t() {\n this.clear();\n }\n\n return t.prototype.clear = function () {\n return this.values = [];\n }, t.prototype.has = function (t) {\n return -1 !== this.values.indexOf(t);\n }, t.prototype.add = function (t) {\n return this.has(t) || this.values.push(t), this;\n }, t.prototype[\"delete\"] = function (t) {\n var e;\n return -1 === (e = this.values.indexOf(t)) ? !1 : (this.values.splice(e, 1), !0);\n }, t.prototype.forEach = function () {\n var t;\n return (t = this.values).forEach.apply(t, arguments);\n }, t;\n }());\n}.call(this), function (t) {\n function e() {}\n\n function n(t, e) {\n return function () {\n t.apply(e, arguments);\n };\n }\n\n function i(t) {\n if (\"object\" != _typeof(this)) throw new TypeError(\"Promises must be constructed via new\");\n if (\"function\" != typeof t) throw new TypeError(\"not a function\");\n this._state = 0, this._handled = !1, this._value = void 0, this._deferreds = [], c(t, this);\n }\n\n function o(t, e) {\n for (; 3 === t._state;) {\n t = t._value;\n }\n\n return 0 === t._state ? void t._deferreds.push(e) : (t._handled = !0, void h(function () {\n var n = 1 === t._state ? e.onFulfilled : e.onRejected;\n if (null === n) return void (1 === t._state ? r : s)(e.promise, t._value);\n var i;\n\n try {\n i = n(t._value);\n } catch (o) {\n return void s(e.promise, o);\n }\n\n r(e.promise, i);\n }));\n }\n\n function r(t, e) {\n try {\n if (e === t) throw new TypeError(\"A promise cannot be resolved with itself.\");\n\n if (e && (\"object\" == _typeof(e) || \"function\" == typeof e)) {\n var o = e.then;\n if (e instanceof i) return t._state = 3, t._value = e, void a(t);\n if (\"function\" == typeof o) return void c(n(o, e), t);\n }\n\n t._state = 1, t._value = e, a(t);\n } catch (r) {\n s(t, r);\n }\n }\n\n function s(t, e) {\n t._state = 2, t._value = e, a(t);\n }\n\n function a(t) {\n 2 === t._state && 0 === t._deferreds.length && setTimeout(function () {\n t._handled || p(t._value);\n }, 1);\n\n for (var e = 0, n = t._deferreds.length; n > e; e++) {\n o(t, t._deferreds[e]);\n }\n\n t._deferreds = null;\n }\n\n function u(t, e, n) {\n this.onFulfilled = \"function\" == typeof t ? t : null, this.onRejected = \"function\" == typeof e ? e : null, this.promise = n;\n }\n\n function c(t, e) {\n var n = !1;\n\n try {\n t(function (t) {\n n || (n = !0, r(e, t));\n }, function (t) {\n n || (n = !0, s(e, t));\n });\n } catch (i) {\n if (n) return;\n n = !0, s(e, i);\n }\n }\n\n var l = setTimeout,\n h = \"function\" == typeof setImmediate && setImmediate || function (t) {\n l(t, 1);\n },\n p = function p(t) {\n \"undefined\" != typeof console && console && console.warn(\"Possible Unhandled Promise Rejection:\", t);\n };\n\n i.prototype[\"catch\"] = function (t) {\n return this.then(null, t);\n }, i.prototype.then = function (t, n) {\n var r = new i(e);\n return o(this, new u(t, n, r)), r;\n }, i.all = function (t) {\n var e = Array.prototype.slice.call(t);\n return new i(function (t, n) {\n function i(r, s) {\n try {\n if (s && (\"object\" == _typeof(s) || \"function\" == typeof s)) {\n var a = s.then;\n if (\"function\" == typeof a) return void a.call(s, function (t) {\n i(r, t);\n }, n);\n }\n\n e[r] = s, 0 === --o && t(e);\n } catch (u) {\n n(u);\n }\n }\n\n if (0 === e.length) return t([]);\n\n for (var o = e.length, r = 0; r < e.length; r++) {\n i(r, e[r]);\n }\n });\n }, i.resolve = function (t) {\n return t && \"object\" == _typeof(t) && t.constructor === i ? t : new i(function (e) {\n e(t);\n });\n }, i.reject = function (t) {\n return new i(function (e, n) {\n n(t);\n });\n }, i.race = function (t) {\n return new i(function (e, n) {\n for (var i = 0, o = t.length; o > i; i++) {\n t[i].then(e, n);\n }\n });\n }, i._setImmediateFn = function (t) {\n h = t;\n }, i._setUnhandledRejectionFn = function (t) {\n p = t;\n }, \"undefined\" != typeof module && module.exports ? module.exports = i : t.Promise || (t.Promise = i);\n}(this), function () {\n var t = \"object\" == _typeof(window.customElements),\n e = \"function\" == typeof document.registerElement,\n n = t || e;\n\n n || (\n /**\n * @license\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n \"undefined\" == typeof WeakMap && !function () {\n var t = Object.defineProperty,\n e = Date.now() % 1e9,\n n = function n() {\n this.name = \"__st\" + (1e9 * Math.random() >>> 0) + (e++ + \"__\");\n };\n\n n.prototype = {\n set: function set(e, n) {\n var i = e[this.name];\n return i && i[0] === e ? i[1] = n : t(e, this.name, {\n value: [e, n],\n writable: !0\n }), this;\n },\n get: function get(t) {\n var e;\n return (e = t[this.name]) && e[0] === t ? e[1] : void 0;\n },\n \"delete\": function _delete(t) {\n var e = t[this.name];\n return e && e[0] === t ? (e[0] = e[1] = void 0, !0) : !1;\n },\n has: function has(t) {\n var e = t[this.name];\n return e ? e[0] === t : !1;\n }\n }, window.WeakMap = n;\n }(), function (t) {\n function e(t) {\n A.push(t), b || (b = !0, g(i));\n }\n\n function n(t) {\n return window.ShadowDOMPolyfill && window.ShadowDOMPolyfill.wrapIfNeeded(t) || t;\n }\n\n function i() {\n b = !1;\n var t = A;\n A = [], t.sort(function (t, e) {\n return t.uid_ - e.uid_;\n });\n var e = !1;\n t.forEach(function (t) {\n var n = t.takeRecords();\n o(t), n.length && (t.callback_(n, t), e = !0);\n }), e && i();\n }\n\n function o(t) {\n t.nodes_.forEach(function (e) {\n var n = m.get(e);\n n && n.forEach(function (e) {\n e.observer === t && e.removeTransientObservers();\n });\n });\n }\n\n function r(t, e) {\n for (var n = t; n; n = n.parentNode) {\n var i = m.get(n);\n if (i) for (var o = 0; o < i.length; o++) {\n var r = i[o],\n s = r.options;\n\n if (n === t || s.subtree) {\n var a = e(s);\n a && r.enqueue(a);\n }\n }\n }\n }\n\n function s(t) {\n this.callback_ = t, this.nodes_ = [], this.records_ = [], this.uid_ = ++C;\n }\n\n function a(t, e) {\n this.type = t, this.target = e, this.addedNodes = [], this.removedNodes = [], this.previousSibling = null, this.nextSibling = null, this.attributeName = null, this.attributeNamespace = null, this.oldValue = null;\n }\n\n function u(t) {\n var e = new a(t.type, t.target);\n return e.addedNodes = t.addedNodes.slice(), e.removedNodes = t.removedNodes.slice(), e.previousSibling = t.previousSibling, e.nextSibling = t.nextSibling, e.attributeName = t.attributeName, e.attributeNamespace = t.attributeNamespace, e.oldValue = t.oldValue, e;\n }\n\n function c(t, e) {\n return x = new a(t, e);\n }\n\n function l(t) {\n return w ? w : (w = u(x), w.oldValue = t, w);\n }\n\n function h() {\n x = w = void 0;\n }\n\n function p(t) {\n return t === w || t === x;\n }\n\n function d(t, e) {\n return t === e ? t : w && p(t) ? w : null;\n }\n\n function f(t, e, n) {\n this.observer = t, this.target = e, this.options = n, this.transientObservedNodes = [];\n }\n\n if (!t.JsMutationObserver) {\n var g,\n m = new WeakMap();\n if (/Trident|Edge/.test(navigator.userAgent)) g = setTimeout;else if (window.setImmediate) g = window.setImmediate;else {\n var v = [],\n y = String(Math.random());\n window.addEventListener(\"message\", function (t) {\n if (t.data === y) {\n var e = v;\n v = [], e.forEach(function (t) {\n t();\n });\n }\n }), g = function g(t) {\n v.push(t), window.postMessage(y, \"*\");\n };\n }\n var b = !1,\n A = [],\n C = 0;\n s.prototype = {\n observe: function observe(t, e) {\n if (t = n(t), !e.childList && !e.attributes && !e.characterData || e.attributeOldValue && !e.attributes || e.attributeFilter && e.attributeFilter.length && !e.attributes || e.characterDataOldValue && !e.characterData) throw new SyntaxError();\n var i = m.get(t);\n i || m.set(t, i = []);\n\n for (var o, r = 0; r < i.length; r++) {\n if (i[r].observer === this) {\n o = i[r], o.removeListeners(), o.options = e;\n break;\n }\n }\n\n o || (o = new f(this, t, e), i.push(o), this.nodes_.push(t)), o.addListeners();\n },\n disconnect: function disconnect() {\n this.nodes_.forEach(function (t) {\n for (var e = m.get(t), n = 0; n < e.length; n++) {\n var i = e[n];\n\n if (i.observer === this) {\n i.removeListeners(), e.splice(n, 1);\n break;\n }\n }\n }, this), this.records_ = [];\n },\n takeRecords: function takeRecords() {\n var t = this.records_;\n return this.records_ = [], t;\n }\n };\n var x, w;\n f.prototype = {\n enqueue: function enqueue(t) {\n var n = this.observer.records_,\n i = n.length;\n\n if (n.length > 0) {\n var o = n[i - 1],\n r = d(o, t);\n if (r) return void (n[i - 1] = r);\n } else e(this.observer);\n\n n[i] = t;\n },\n addListeners: function addListeners() {\n this.addListeners_(this.target);\n },\n addListeners_: function addListeners_(t) {\n var e = this.options;\n e.attributes && t.addEventListener(\"DOMAttrModified\", this, !0), e.characterData && t.addEventListener(\"DOMCharacterDataModified\", this, !0), e.childList && t.addEventListener(\"DOMNodeInserted\", this, !0), (e.childList || e.subtree) && t.addEventListener(\"DOMNodeRemoved\", this, !0);\n },\n removeListeners: function removeListeners() {\n this.removeListeners_(this.target);\n },\n removeListeners_: function removeListeners_(t) {\n var e = this.options;\n e.attributes && t.removeEventListener(\"DOMAttrModified\", this, !0), e.characterData && t.removeEventListener(\"DOMCharacterDataModified\", this, !0), e.childList && t.removeEventListener(\"DOMNodeInserted\", this, !0), (e.childList || e.subtree) && t.removeEventListener(\"DOMNodeRemoved\", this, !0);\n },\n addTransientObserver: function addTransientObserver(t) {\n if (t !== this.target) {\n this.addListeners_(t), this.transientObservedNodes.push(t);\n var e = m.get(t);\n e || m.set(t, e = []), e.push(this);\n }\n },\n removeTransientObservers: function removeTransientObservers() {\n var t = this.transientObservedNodes;\n this.transientObservedNodes = [], t.forEach(function (t) {\n this.removeListeners_(t);\n\n for (var e = m.get(t), n = 0; n < e.length; n++) {\n if (e[n] === this) {\n e.splice(n, 1);\n break;\n }\n }\n }, this);\n },\n handleEvent: function handleEvent(t) {\n switch (t.stopImmediatePropagation(), t.type) {\n case \"DOMAttrModified\":\n var e = t.attrName,\n n = t.relatedNode.namespaceURI,\n i = t.target,\n o = new c(\"attributes\", i);\n o.attributeName = e, o.attributeNamespace = n;\n var s = t.attrChange === MutationEvent.ADDITION ? null : t.prevValue;\n r(i, function (t) {\n return !t.attributes || t.attributeFilter && t.attributeFilter.length && -1 === t.attributeFilter.indexOf(e) && -1 === t.attributeFilter.indexOf(n) ? void 0 : t.attributeOldValue ? l(s) : o;\n });\n break;\n\n case \"DOMCharacterDataModified\":\n var i = t.target,\n o = c(\"characterData\", i),\n s = t.prevValue;\n r(i, function (t) {\n return t.characterData ? t.characterDataOldValue ? l(s) : o : void 0;\n });\n break;\n\n case \"DOMNodeRemoved\":\n this.addTransientObserver(t.target);\n\n case \"DOMNodeInserted\":\n var a,\n u,\n p = t.target;\n \"DOMNodeInserted\" === t.type ? (a = [p], u = []) : (a = [], u = [p]);\n var d = p.previousSibling,\n f = p.nextSibling,\n o = c(\"childList\", t.target.parentNode);\n o.addedNodes = a, o.removedNodes = u, o.previousSibling = d, o.nextSibling = f, r(t.relatedNode, function (t) {\n return t.childList ? o : void 0;\n });\n }\n\n h();\n }\n }, t.JsMutationObserver = s, t.MutationObserver || (t.MutationObserver = s, s._isPolyfilled = !0);\n }\n }(self), function () {\n \"use strict\";\n\n if (!window.performance || !window.performance.now) {\n var t = Date.now();\n window.performance = {\n now: function now() {\n return Date.now() - t;\n }\n };\n }\n\n window.requestAnimationFrame || (window.requestAnimationFrame = function () {\n var t = window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame;\n return t ? function (e) {\n return t(function () {\n e(performance.now());\n });\n } : function (t) {\n return window.setTimeout(t, 1e3 / 60);\n };\n }()), window.cancelAnimationFrame || (window.cancelAnimationFrame = function () {\n return window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || function (t) {\n clearTimeout(t);\n };\n }());\n\n var e = function () {\n var t = document.createEvent(\"Event\");\n return t.initEvent(\"foo\", !0, !0), t.preventDefault(), t.defaultPrevented;\n }();\n\n if (!e) {\n var n = Event.prototype.preventDefault;\n\n Event.prototype.preventDefault = function () {\n this.cancelable && (n.call(this), Object.defineProperty(this, \"defaultPrevented\", {\n get: function get() {\n return !0;\n },\n configurable: !0\n }));\n };\n }\n\n var i = /Trident/.test(navigator.userAgent);\n\n if ((!window.CustomEvent || i && \"function\" != typeof window.CustomEvent) && (window.CustomEvent = function (t, e) {\n e = e || {};\n var n = document.createEvent(\"CustomEvent\");\n return n.initCustomEvent(t, Boolean(e.bubbles), Boolean(e.cancelable), e.detail), n;\n }, window.CustomEvent.prototype = window.Event.prototype), !window.Event || i && \"function\" != typeof window.Event) {\n var o = window.Event;\n window.Event = function (t, e) {\n e = e || {};\n var n = document.createEvent(\"Event\");\n return n.initEvent(t, Boolean(e.bubbles), Boolean(e.cancelable)), n;\n }, window.Event.prototype = o.prototype;\n }\n }(window.WebComponents), window.CustomElements = window.CustomElements || {\n flags: {}\n }, function (t) {\n var e = t.flags,\n n = [],\n i = function i(t) {\n n.push(t);\n },\n o = function o() {\n n.forEach(function (e) {\n e(t);\n });\n };\n\n t.addModule = i, t.initializeModules = o, t.hasNative = Boolean(document.registerElement), t.isIE = /Trident/.test(navigator.userAgent), t.useNative = !e.register && t.hasNative && !window.ShadowDOMPolyfill && (!window.HTMLImports || window.HTMLImports.useNative);\n }(window.CustomElements), window.CustomElements.addModule(function (t) {\n function e(t, e) {\n n(t, function (t) {\n return e(t) ? !0 : void i(t, e);\n }), i(t, e);\n }\n\n function n(t, e, i) {\n var o = t.firstElementChild;\n if (!o) for (o = t.firstChild; o && o.nodeType !== Node.ELEMENT_NODE;) {\n o = o.nextSibling;\n }\n\n for (; o;) {\n e(o, i) !== !0 && n(o, e, i), o = o.nextElementSibling;\n }\n\n return null;\n }\n\n function i(t, n) {\n for (var i = t.shadowRoot; i;) {\n e(i, n), i = i.olderShadowRoot;\n }\n }\n\n function o(t, e) {\n r(t, e, []);\n }\n\n function r(t, e, n) {\n if (t = window.wrap(t), !(n.indexOf(t) >= 0)) {\n n.push(t);\n\n for (var i, o = t.querySelectorAll(\"link[rel=\" + s + \"]\"), a = 0, u = o.length; u > a && (i = o[a]); a++) {\n i[\"import\"] && r(i[\"import\"], e, n);\n }\n\n e(t);\n }\n }\n\n var s = window.HTMLImports ? window.HTMLImports.IMPORT_LINK_TYPE : \"none\";\n t.forDocumentTree = o, t.forSubtree = e;\n }), window.CustomElements.addModule(function (t) {\n function e(t, e) {\n return n(t, e) || i(t, e);\n }\n\n function n(e, n) {\n return t.upgrade(e, n) ? !0 : void (n && s(e));\n }\n\n function i(t, e) {\n b(t, function (t) {\n return n(t, e) ? !0 : void 0;\n });\n }\n\n function o(t) {\n w.push(t), x || (x = !0, setTimeout(r));\n }\n\n function r() {\n x = !1;\n\n for (var t, e = w, n = 0, i = e.length; i > n && (t = e[n]); n++) {\n t();\n }\n\n w = [];\n }\n\n function s(t) {\n C ? o(function () {\n a(t);\n }) : a(t);\n }\n\n function a(t) {\n t.__upgraded__ && !t.__attached && (t.__attached = !0, t.attachedCallback && t.attachedCallback());\n }\n\n function u(t) {\n c(t), b(t, function (t) {\n c(t);\n });\n }\n\n function c(t) {\n C ? o(function () {\n l(t);\n }) : l(t);\n }\n\n function l(t) {\n t.__upgraded__ && t.__attached && (t.__attached = !1, t.detachedCallback && t.detachedCallback());\n }\n\n function h(t) {\n for (var e = t, n = window.wrap(document); e;) {\n if (e == n) return !0;\n e = e.parentNode || e.nodeType === Node.DOCUMENT_FRAGMENT_NODE && e.host;\n }\n }\n\n function p(t) {\n if (t.shadowRoot && !t.shadowRoot.__watched) {\n y.dom && console.log(\"watching shadow-root for: \", t.localName);\n\n for (var e = t.shadowRoot; e;) {\n g(e), e = e.olderShadowRoot;\n }\n }\n }\n\n function d(t, n) {\n if (y.dom) {\n var i = n[0];\n\n if (i && \"childList\" === i.type && i.addedNodes && i.addedNodes) {\n for (var o = i.addedNodes[0]; o && o !== document && !o.host;) {\n o = o.parentNode;\n }\n\n var r = o && (o.URL || o._URL || o.host && o.host.localName) || \"\";\n r = r.split(\"/?\").shift().split(\"/\").pop();\n }\n\n console.group(\"mutations (%d) [%s]\", n.length, r || \"\");\n }\n\n var s = h(t);\n n.forEach(function (t) {\n \"childList\" === t.type && (E(t.addedNodes, function (t) {\n t.localName && e(t, s);\n }), E(t.removedNodes, function (t) {\n t.localName && u(t);\n }));\n }), y.dom && console.groupEnd();\n }\n\n function f(t) {\n for (t = window.wrap(t), t || (t = window.wrap(document)); t.parentNode;) {\n t = t.parentNode;\n }\n\n var e = t.__observer;\n e && (d(t, e.takeRecords()), r());\n }\n\n function g(t) {\n if (!t.__observer) {\n var e = new MutationObserver(d.bind(this, t));\n e.observe(t, {\n childList: !0,\n subtree: !0\n }), t.__observer = e;\n }\n }\n\n function m(t) {\n t = window.wrap(t), y.dom && console.group(\"upgradeDocument: \", t.baseURI.split(\"/\").pop());\n var n = t === window.wrap(document);\n e(t, n), g(t), y.dom && console.groupEnd();\n }\n\n function v(t) {\n A(t, m);\n }\n\n var y = t.flags,\n b = t.forSubtree,\n A = t.forDocumentTree,\n C = window.MutationObserver._isPolyfilled && y[\"throttle-attached\"];\n t.hasPolyfillMutations = C, t.hasThrottledAttached = C;\n var x = !1,\n w = [],\n E = Array.prototype.forEach.call.bind(Array.prototype.forEach),\n S = Element.prototype.createShadowRoot;\n S && (Element.prototype.createShadowRoot = function () {\n var t = S.call(this);\n return window.CustomElements.watchShadow(this), t;\n }), t.watchShadow = p, t.upgradeDocumentTree = v, t.upgradeDocument = m, t.upgradeSubtree = i, t.upgradeAll = e, t.attached = s, t.takeRecords = f;\n }), window.CustomElements.addModule(function (t) {\n function e(e, i) {\n if (\"template\" === e.localName && window.HTMLTemplateElement && HTMLTemplateElement.decorate && HTMLTemplateElement.decorate(e), !e.__upgraded__ && e.nodeType === Node.ELEMENT_NODE) {\n var o = e.getAttribute(\"is\"),\n r = t.getRegisteredDefinition(e.localName) || t.getRegisteredDefinition(o);\n if (r && (o && r.tag == e.localName || !o && !r[\"extends\"])) return n(e, r, i);\n }\n }\n\n function n(e, n, o) {\n return s.upgrade && console.group(\"upgrade:\", e.localName), n.is && e.setAttribute(\"is\", n.is), i(e, n), e.__upgraded__ = !0, r(e), o && t.attached(e), t.upgradeSubtree(e, o), s.upgrade && console.groupEnd(), e;\n }\n\n function i(t, e) {\n Object.__proto__ ? t.__proto__ = e.prototype : (o(t, e.prototype, e[\"native\"]), t.__proto__ = e.prototype);\n }\n\n function o(t, e, n) {\n for (var i = {}, o = e; o !== n && o !== HTMLElement.prototype;) {\n for (var r, s = Object.getOwnPropertyNames(o), a = 0; r = s[a]; a++) {\n i[r] || (Object.defineProperty(t, r, Object.getOwnPropertyDescriptor(o, r)), i[r] = 1);\n }\n\n o = Object.getPrototypeOf(o);\n }\n }\n\n function r(t) {\n t.createdCallback && t.createdCallback();\n }\n\n var s = t.flags;\n t.upgrade = e, t.upgradeWithDefinition = n, t.implementPrototype = i;\n }), window.CustomElements.addModule(function (t) {\n function e(e, i) {\n var u = i || {};\n if (!e) throw new Error(\"document.registerElement: first argument `name` must not be empty\");\n if (e.indexOf(\"-\") < 0) throw new Error(\"document.registerElement: first argument ('name') must contain a dash ('-'). Argument provided was '\" + String(e) + \"'.\");\n if (o(e)) throw new Error(\"Failed to execute 'registerElement' on 'Document': Registration failed for type '\" + String(e) + \"'. The type name is invalid.\");\n if (c(e)) throw new Error(\"DuplicateDefinitionError: a type with name '\" + String(e) + \"' is already registered\");\n return u.prototype || (u.prototype = Object.create(HTMLElement.prototype)), u.__name = e.toLowerCase(), u[\"extends\"] && (u[\"extends\"] = u[\"extends\"].toLowerCase()), u.lifecycle = u.lifecycle || {}, u.ancestry = r(u[\"extends\"]), s(u), a(u), n(u.prototype), l(u.__name, u), u.ctor = h(u), u.ctor.prototype = u.prototype, u.prototype.constructor = u.ctor, t.ready && m(document), u.ctor;\n }\n\n function n(t) {\n if (!t.setAttribute._polyfilled) {\n var e = t.setAttribute;\n\n t.setAttribute = function (t, n) {\n i.call(this, t, n, e);\n };\n\n var n = t.removeAttribute;\n t.removeAttribute = function (t) {\n i.call(this, t, null, n);\n }, t.setAttribute._polyfilled = !0;\n }\n }\n\n function i(t, e, n) {\n t = t.toLowerCase();\n var i = this.getAttribute(t);\n n.apply(this, arguments);\n var o = this.getAttribute(t);\n this.attributeChangedCallback && o !== i && this.attributeChangedCallback(t, i, o);\n }\n\n function o(t) {\n for (var e = 0; e < C.length; e++) {\n if (t === C[e]) return !0;\n }\n }\n\n function r(t) {\n var e = c(t);\n return e ? r(e[\"extends\"]).concat([e]) : [];\n }\n\n function s(t) {\n for (var e, n = t[\"extends\"], i = 0; e = t.ancestry[i]; i++) {\n n = e.is && e.tag;\n }\n\n t.tag = n || t.__name, n && (t.is = t.__name);\n }\n\n function a(t) {\n if (!Object.__proto__) {\n var e = HTMLElement.prototype;\n\n if (t.is) {\n var n = document.createElement(t.tag);\n e = Object.getPrototypeOf(n);\n }\n\n for (var i, o = t.prototype, r = !1; o;) {\n o == e && (r = !0), i = Object.getPrototypeOf(o), i && (o.__proto__ = i), o = i;\n }\n\n r || console.warn(t.tag + \" prototype not found in prototype chain for \" + t.is), t[\"native\"] = e;\n }\n }\n\n function u(t) {\n return y(E(t.tag), t);\n }\n\n function c(t) {\n return t ? x[t.toLowerCase()] : void 0;\n }\n\n function l(t, e) {\n x[t] = e;\n }\n\n function h(t) {\n return function () {\n return u(t);\n };\n }\n\n function p(t, e, n) {\n return t === w ? d(e, n) : S(t, e);\n }\n\n function d(t, e) {\n t && (t = t.toLowerCase()), e && (e = e.toLowerCase());\n var n = c(e || t);\n\n if (n) {\n if (t == n.tag && e == n.is) return new n.ctor();\n if (!e && !n.is) return new n.ctor();\n }\n\n var i;\n return e ? (i = d(t), i.setAttribute(\"is\", e), i) : (i = E(t), t.indexOf(\"-\") >= 0 && b(i, HTMLElement), i);\n }\n\n function f(t, e) {\n var n = t[e];\n\n t[e] = function () {\n var t = n.apply(this, arguments);\n return v(t), t;\n };\n }\n\n var g,\n m = (t.isIE, t.upgradeDocumentTree),\n v = t.upgradeAll,\n y = t.upgradeWithDefinition,\n b = t.implementPrototype,\n A = t.useNative,\n C = [\"annotation-xml\", \"color-profile\", \"font-face\", \"font-face-src\", \"font-face-uri\", \"font-face-format\", \"font-face-name\", \"missing-glyph\"],\n x = {},\n w = \"http://www.w3.org/1999/xhtml\",\n E = document.createElement.bind(document),\n S = document.createElementNS.bind(document);\n g = Object.__proto__ || A ? function (t, e) {\n return t instanceof e;\n } : function (t, e) {\n if (t instanceof e) return !0;\n\n for (var n = t; n;) {\n if (n === e.prototype) return !0;\n n = n.__proto__;\n }\n\n return !1;\n }, f(Node.prototype, \"cloneNode\"), f(document, \"importNode\"), document.registerElement = e, document.createElement = d, document.createElementNS = p, t.registry = x, t[\"instanceof\"] = g, t.reservedTagList = C, t.getRegisteredDefinition = c, document.register = document.registerElement;\n }), function (t) {\n function e() {\n r(window.wrap(document)), window.CustomElements.ready = !0;\n\n var t = window.requestAnimationFrame || function (t) {\n setTimeout(t, 16);\n };\n\n t(function () {\n setTimeout(function () {\n window.CustomElements.readyTime = Date.now(), window.HTMLImports && (window.CustomElements.elapsed = window.CustomElements.readyTime - window.HTMLImports.readyTime), document.dispatchEvent(new CustomEvent(\"WebComponentsReady\", {\n bubbles: !0\n }));\n });\n });\n }\n\n var n = t.useNative,\n i = t.initializeModules;\n\n if (t.isIE, n) {\n var o = function o() {};\n\n t.watchShadow = o, t.upgrade = o, t.upgradeAll = o, t.upgradeDocumentTree = o, t.upgradeSubtree = o, t.takeRecords = o, t[\"instanceof\"] = function (t, e) {\n return t instanceof e;\n };\n } else i();\n\n var r = t.upgradeDocumentTree,\n s = t.upgradeDocument;\n if (window.wrap || (window.ShadowDOMPolyfill ? (window.wrap = window.ShadowDOMPolyfill.wrapIfNeeded, window.unwrap = window.ShadowDOMPolyfill.unwrapIfNeeded) : window.wrap = window.unwrap = function (t) {\n return t;\n }), window.HTMLImports && (window.HTMLImports.__importsParsingHook = function (t) {\n t[\"import\"] && s(wrap(t[\"import\"]));\n }), \"complete\" === document.readyState || t.flags.eager) e();else if (\"interactive\" !== document.readyState || window.attachEvent || window.HTMLImports && !window.HTMLImports.ready) {\n var a = window.HTMLImports && !window.HTMLImports.ready ? \"HTMLImportsLoaded\" : \"DOMContentLoaded\";\n window.addEventListener(a, e);\n } else e();\n }(window.CustomElements));\n}.call(this), function () {}.call(this), function () {\n var t = this;\n (function () {\n (function () {\n this.Trix = {\n VERSION: \"1.2.3\",\n ZERO_WIDTH_SPACE: \"\\uFEFF\",\n NON_BREAKING_SPACE: \"\\xa0\",\n OBJECT_REPLACEMENT_CHARACTER: \"\\uFFFC\",\n browser: {\n composesExistingText: /Android.*Chrome/.test(navigator.userAgent),\n forcesObjectResizing: /Trident.*rv:11/.test(navigator.userAgent),\n supportsInputEvents: function () {\n var t, e, n, i;\n if (\"undefined\" == typeof InputEvent) return !1;\n\n for (i = [\"data\", \"getTargetRanges\", \"inputType\"], t = 0, e = i.length; e > t; t++) {\n if (n = i[t], !(n in InputEvent.prototype)) return !1;\n }\n\n return !0;\n }()\n },\n config: {}\n };\n }).call(this);\n }).call(t);\n var e = t.Trix;\n (function () {\n (function () {\n e.BasicObject = function () {\n function t() {}\n\n var e, n, i;\n return t.proxyMethod = function (t) {\n var i, o, r, s, a;\n return r = n(t), i = r.name, s = r.toMethod, a = r.toProperty, o = r.optional, this.prototype[i] = function () {\n var t, n;\n return t = null != s ? o ? \"function\" == typeof this[s] ? this[s]() : void 0 : this[s]() : null != a ? this[a] : void 0, o ? (n = null != t ? t[i] : void 0, null != n ? e.call(n, t, arguments) : void 0) : (n = t[i], e.call(n, t, arguments));\n };\n }, n = function n(t) {\n var e, n;\n if (!(n = t.match(i))) throw new Error(\"can't parse @proxyMethod expression: \" + t);\n return e = {\n name: n[4]\n }, null != n[2] ? e.toMethod = n[1] : e.toProperty = n[1], null != n[3] && (e.optional = !0), e;\n }, e = Function.prototype.apply, i = /^(.+?)(\\(\\))?(\\?)?\\.(.+?)$/, t;\n }();\n }).call(this), function () {\n var t = function t(_t, e) {\n function i() {\n this.constructor = _t;\n }\n\n for (var o in e) {\n n.call(e, o) && (_t[o] = e[o]);\n }\n\n return i.prototype = e.prototype, _t.prototype = new i(), _t.__super__ = e.prototype, _t;\n },\n n = {}.hasOwnProperty;\n\n e.Object = function (n) {\n function i() {\n this.id = ++o;\n }\n\n var o;\n return t(i, n), o = 0, i.fromJSONString = function (t) {\n return this.fromJSON(JSON.parse(t));\n }, i.prototype.hasSameConstructorAs = function (t) {\n return this.constructor === (null != t ? t.constructor : void 0);\n }, i.prototype.isEqualTo = function (t) {\n return this === t;\n }, i.prototype.inspect = function () {\n var t, e, n;\n return t = function () {\n var t, i, o;\n i = null != (t = this.contentsForInspection()) ? t : {}, o = [];\n\n for (e in i) {\n n = i[e], o.push(e + \"=\" + n);\n }\n\n return o;\n }.call(this), \"#<\" + this.constructor.name + \":\" + this.id + (t.length ? \" \" + t.join(\", \") : \"\") + \">\";\n }, i.prototype.contentsForInspection = function () {}, i.prototype.toJSONString = function () {\n return JSON.stringify(this);\n }, i.prototype.toUTF16String = function () {\n return e.UTF16String.box(this);\n }, i.prototype.getCacheKey = function () {\n return this.id.toString();\n }, i;\n }(e.BasicObject);\n }.call(this), function () {\n e.extend = function (t) {\n var e, n;\n\n for (e in t) {\n n = t[e], this[e] = n;\n }\n\n return this;\n };\n }.call(this), function () {\n e.extend({\n defer: function defer(t) {\n return setTimeout(t, 1);\n }\n });\n }.call(this), function () {\n var t, n;\n e.extend({\n normalizeSpaces: function normalizeSpaces(t) {\n return t.replace(RegExp(\"\" + e.ZERO_WIDTH_SPACE, \"g\"), \"\").replace(RegExp(\"\" + e.NON_BREAKING_SPACE, \"g\"), \" \");\n },\n normalizeNewlines: function normalizeNewlines(t) {\n return t.replace(/\\r\\n/g, \"\\n\");\n },\n breakableWhitespacePattern: RegExp(\"[^\\\\S\" + e.NON_BREAKING_SPACE + \"]\"),\n squishBreakableWhitespace: function squishBreakableWhitespace(t) {\n return t.replace(RegExp(\"\" + e.breakableWhitespacePattern.source, \"g\"), \" \").replace(/\\ {2,}/g, \" \");\n },\n escapeHTML: function escapeHTML(t) {\n var e;\n return e = document.createElement(\"div\"), e.textContent = t, e.innerHTML;\n },\n summarizeStringChange: function summarizeStringChange(t, i) {\n var o, r, s, a;\n return t = e.UTF16String.box(t), i = e.UTF16String.box(i), i.length < t.length ? (r = n(t, i), a = r[0], o = r[1]) : (s = n(i, t), o = s[0], a = s[1]), {\n added: o,\n removed: a\n };\n }\n }), n = function n(_n, i) {\n var o, r, s, a, u;\n return _n.isEqualTo(i) ? [\"\", \"\"] : (r = t(_n, i), a = r.utf16String.length, s = a ? (u = r.offset, r, o = _n.codepoints.slice(0, u).concat(_n.codepoints.slice(u + a)), t(i, e.UTF16String.fromCodepoints(o))) : t(i, _n), [r.utf16String.toString(), s.utf16String.toString()]);\n }, t = function t(_t2, e) {\n var n, i, o;\n\n for (n = 0, i = _t2.length, o = e.length; i > n && _t2.charAt(n).isEqualTo(e.charAt(n));) {\n n++;\n }\n\n for (; i > n + 1 && _t2.charAt(i - 1).isEqualTo(e.charAt(o - 1));) {\n i--, o--;\n }\n\n return {\n utf16String: _t2.slice(n, i),\n offset: n\n };\n };\n }.call(this), function () {\n e.extend({\n copyObject: function copyObject(t) {\n var e, n, i;\n null == t && (t = {}), n = {};\n\n for (e in t) {\n i = t[e], n[e] = i;\n }\n\n return n;\n },\n objectsAreEqual: function objectsAreEqual(t, e) {\n var n, i;\n if (null == t && (t = {}), null == e && (e = {}), Object.keys(t).length !== Object.keys(e).length) return !1;\n\n for (n in t) {\n if (i = t[n], i !== e[n]) return !1;\n }\n\n return !0;\n }\n });\n }.call(this), function () {\n var t = [].slice;\n e.extend({\n arraysAreEqual: function arraysAreEqual(t, e) {\n var n, i, o, r;\n if (null == t && (t = []), null == e && (e = []), t.length !== e.length) return !1;\n\n for (i = n = 0, o = t.length; o > n; i = ++n) {\n if (r = t[i], r !== e[i]) return !1;\n }\n\n return !0;\n },\n arrayStartsWith: function arrayStartsWith(t, n) {\n return null == t && (t = []), null == n && (n = []), e.arraysAreEqual(t.slice(0, n.length), n);\n },\n spliceArray: function spliceArray() {\n var e, n, i;\n return n = arguments[0], e = 2 <= arguments.length ? t.call(arguments, 1) : [], i = n.slice(0), i.splice.apply(i, e), i;\n },\n summarizeArrayChange: function summarizeArrayChange(t, e) {\n var n, i, o, r, s, a, u, c, l, h, p;\n\n for (null == t && (t = []), null == e && (e = []), n = [], h = [], o = new Set(), r = 0, u = t.length; u > r; r++) {\n p = t[r], o.add(p);\n }\n\n for (i = new Set(), s = 0, c = e.length; c > s; s++) {\n p = e[s], i.add(p), o.has(p) || n.push(p);\n }\n\n for (a = 0, l = t.length; l > a; a++) {\n p = t[a], i.has(p) || h.push(p);\n }\n\n return {\n added: n,\n removed: h\n };\n }\n });\n }.call(this), function () {\n var t, n, i, o;\n t = null, n = null, o = null, i = null, e.extend({\n getAllAttributeNames: function getAllAttributeNames() {\n return null != t ? t : t = e.getTextAttributeNames().concat(e.getBlockAttributeNames());\n },\n getBlockConfig: function getBlockConfig(t) {\n return e.config.blockAttributes[t];\n },\n getBlockAttributeNames: function getBlockAttributeNames() {\n return null != n ? n : n = Object.keys(e.config.blockAttributes);\n },\n getTextConfig: function getTextConfig(t) {\n return e.config.textAttributes[t];\n },\n getTextAttributeNames: function getTextAttributeNames() {\n return null != o ? o : o = Object.keys(e.config.textAttributes);\n },\n getListAttributeNames: function getListAttributeNames() {\n var t, n;\n return null != i ? i : i = function () {\n var i, o;\n i = e.config.blockAttributes, o = [];\n\n for (t in i) {\n n = i[t].listAttribute, null != n && o.push(n);\n }\n\n return o;\n }();\n }\n });\n }.call(this), function () {\n var t,\n n,\n i,\n o,\n r,\n s = [].indexOf || function (t) {\n for (var e = 0, n = this.length; n > e; e++) {\n if (e in this && this[e] === t) return e;\n }\n\n return -1;\n };\n\n t = document.documentElement, n = null != (i = null != (o = null != (r = t.matchesSelector) ? r : t.webkitMatchesSelector) ? o : t.msMatchesSelector) ? i : t.mozMatchesSelector, e.extend({\n handleEvent: function handleEvent(n, i) {\n var o, r, _s, a, u, c, l, h, p, d, f, g;\n\n return h = null != i ? i : {}, c = h.onElement, u = h.matchingSelector, g = h.withCallback, a = h.inPhase, l = h.preventDefault, d = h.times, r = null != c ? c : t, p = u, o = g, f = \"capturing\" === a, _s = function s(t) {\n var n;\n return null != d && 0 === --d && _s.destroy(), n = e.findClosestElementFromNode(t.target, {\n matchingSelector: p\n }), null != n && (null != g && g.call(n, t, n), l) ? t.preventDefault() : void 0;\n }, _s.destroy = function () {\n return r.removeEventListener(n, _s, f);\n }, r.addEventListener(n, _s, f), _s;\n },\n handleEventOnce: function handleEventOnce(t, n) {\n return null == n && (n = {}), n.times = 1, e.handleEvent(t, n);\n },\n triggerEvent: function triggerEvent(n, i) {\n var o, r, s, a, u, c, l;\n return l = null != i ? i : {}, c = l.onElement, r = l.bubbles, s = l.cancelable, o = l.attributes, a = null != c ? c : t, r = r !== !1, s = s !== !1, u = document.createEvent(\"Events\"), u.initEvent(n, r, s), null != o && e.extend.call(u, o), a.dispatchEvent(u);\n },\n elementMatchesSelector: function elementMatchesSelector(t, e) {\n return 1 === (null != t ? t.nodeType : void 0) ? n.call(t, e) : void 0;\n },\n findClosestElementFromNode: function findClosestElementFromNode(t, n) {\n var i, o, r;\n\n for (o = null != n ? n : {}, i = o.matchingSelector, r = o.untilNode; null != t && t.nodeType !== Node.ELEMENT_NODE;) {\n t = t.parentNode;\n }\n\n if (null != t) {\n if (null == i) return t;\n if (t.closest && null == r) return t.closest(i);\n\n for (; t && t !== r;) {\n if (e.elementMatchesSelector(t, i)) return t;\n t = t.parentNode;\n }\n }\n },\n findInnerElement: function findInnerElement(t) {\n for (; null != t ? t.firstElementChild : void 0;) {\n t = t.firstElementChild;\n }\n\n return t;\n },\n innerElementIsActive: function innerElementIsActive(t) {\n return document.activeElement !== t && e.elementContainsNode(t, document.activeElement);\n },\n elementContainsNode: function elementContainsNode(t, e) {\n if (t && e) for (; e;) {\n if (e === t) return !0;\n e = e.parentNode;\n }\n },\n findNodeFromContainerAndOffset: function findNodeFromContainerAndOffset(t, e) {\n var n;\n if (t) return t.nodeType === Node.TEXT_NODE ? t : 0 === e ? null != (n = t.firstChild) ? n : t : t.childNodes.item(e - 1);\n },\n findElementFromContainerAndOffset: function findElementFromContainerAndOffset(t, n) {\n var i;\n return i = e.findNodeFromContainerAndOffset(t, n), e.findClosestElementFromNode(i);\n },\n findChildIndexOfNode: function findChildIndexOfNode(t) {\n var e;\n\n if (null != t ? t.parentNode : void 0) {\n for (e = 0; t = t.previousSibling;) {\n e++;\n }\n\n return e;\n }\n },\n removeNode: function removeNode(t) {\n var e;\n return null != t && null != (e = t.parentNode) ? e.removeChild(t) : void 0;\n },\n walkTree: function walkTree(t, e) {\n var n, i, o, r, s;\n return o = null != e ? e : {}, i = o.onlyNodesOfType, r = o.usingFilter, n = o.expandEntityReferences, s = function () {\n switch (i) {\n case \"element\":\n return NodeFilter.SHOW_ELEMENT;\n\n case \"text\":\n return NodeFilter.SHOW_TEXT;\n\n case \"comment\":\n return NodeFilter.SHOW_COMMENT;\n\n default:\n return NodeFilter.SHOW_ALL;\n }\n }(), document.createTreeWalker(t, s, null != r ? r : null, n === !0);\n },\n tagName: function tagName(t) {\n var e;\n return null != t && null != (e = t.tagName) ? e.toLowerCase() : void 0;\n },\n makeElement: function makeElement(t, e) {\n var n, i, o, r, s, a, u, c, l, h;\n\n if (null == e && (e = {}), \"object\" == _typeof(t) ? (e = t, t = e.tagName) : e = {\n attributes: e\n }, i = document.createElement(t), null != e.editable && (null == e.attributes && (e.attributes = {}), e.attributes.contenteditable = e.editable), e.attributes) {\n a = e.attributes;\n\n for (r in a) {\n h = a[r], i.setAttribute(r, h);\n }\n }\n\n if (e.style) {\n u = e.style;\n\n for (r in u) {\n h = u[r], i.style[r] = h;\n }\n }\n\n if (e.data) {\n c = e.data;\n\n for (r in c) {\n h = c[r], i.dataset[r] = h;\n }\n }\n\n if (e.className) for (l = e.className.split(\" \"), o = 0, s = l.length; s > o; o++) {\n n = l[o], i.classList.add(n);\n }\n return e.textContent && (i.textContent = e.textContent), i;\n },\n getBlockTagNames: function getBlockTagNames() {\n var t, n;\n return null != e.blockTagNames ? e.blockTagNames : e.blockTagNames = function () {\n var i, o;\n i = e.config.blockAttributes, o = [];\n\n for (t in i) {\n n = i[t].tagName, n && o.push(n);\n }\n\n return o;\n }();\n },\n nodeIsBlockContainer: function nodeIsBlockContainer(t) {\n return e.nodeIsBlockStartComment(null != t ? t.firstChild : void 0);\n },\n nodeProbablyIsBlockContainer: function nodeProbablyIsBlockContainer(t) {\n var n, i;\n return n = e.tagName(t), s.call(e.getBlockTagNames(), n) >= 0 && (i = e.tagName(t.firstChild), s.call(e.getBlockTagNames(), i) < 0);\n },\n nodeIsBlockStart: function nodeIsBlockStart(t, n) {\n var i;\n return i = (null != n ? n : {\n strict: !0\n }).strict, i ? e.nodeIsBlockStartComment(t) : e.nodeIsBlockStartComment(t) || !e.nodeIsBlockStartComment(t.firstChild) && e.nodeProbablyIsBlockContainer(t);\n },\n nodeIsBlockStartComment: function nodeIsBlockStartComment(t) {\n return e.nodeIsCommentNode(t) && \"block\" === (null != t ? t.data : void 0);\n },\n nodeIsCommentNode: function nodeIsCommentNode(t) {\n return (null != t ? t.nodeType : void 0) === Node.COMMENT_NODE;\n },\n nodeIsCursorTarget: function nodeIsCursorTarget(t, n) {\n var i;\n return i = (null != n ? n : {}).name, t ? e.nodeIsTextNode(t) ? t.data === e.ZERO_WIDTH_SPACE ? i ? t.parentNode.dataset.trixCursorTarget === i : !0 : void 0 : e.nodeIsCursorTarget(t.firstChild) : void 0;\n },\n nodeIsAttachmentElement: function nodeIsAttachmentElement(t) {\n return e.elementMatchesSelector(t, e.AttachmentView.attachmentSelector);\n },\n nodeIsEmptyTextNode: function nodeIsEmptyTextNode(t) {\n return e.nodeIsTextNode(t) && \"\" === (null != t ? t.data : void 0);\n },\n nodeIsTextNode: function nodeIsTextNode(t) {\n return (null != t ? t.nodeType : void 0) === Node.TEXT_NODE;\n }\n });\n }.call(this), function () {\n var t, n, i, o, r;\n t = e.copyObject, o = e.objectsAreEqual, e.extend({\n normalizeRange: i = function i(t) {\n var e;\n if (null != t) return Array.isArray(t) || (t = [t, t]), [n(t[0]), n(null != (e = t[1]) ? e : t[0])];\n },\n rangeIsCollapsed: function rangeIsCollapsed(t) {\n var e, n, o;\n if (null != t) return n = i(t), o = n[0], e = n[1], r(o, e);\n },\n rangesAreEqual: function rangesAreEqual(t, e) {\n var n, o, s, a, u, c;\n if (null != t && null != e) return s = i(t), o = s[0], n = s[1], a = i(e), c = a[0], u = a[1], r(o, c) && r(n, u);\n }\n }), n = function n(e) {\n return \"number\" == typeof e ? e : t(e);\n }, r = function r(t, e) {\n return \"number\" == typeof t ? t === e : o(t, e);\n };\n }.call(this), function () {\n var t, n, i, o, r, s, a;\n e.registerElement = function (t, e) {\n var n, i;\n return null == e && (e = {}), t = t.toLowerCase(), e = a(e), i = s(e), (n = i.defaultCSS) && (delete i.defaultCSS, o(n, t)), r(t, i);\n }, o = function o(t, e) {\n var n;\n return n = i(e), n.textContent = t.replace(/%t/g, e);\n }, i = function i(e) {\n var n, i;\n return n = document.createElement(\"style\"), n.setAttribute(\"type\", \"text/css\"), n.setAttribute(\"data-tag-name\", e.toLowerCase()), (i = t()) && n.setAttribute(\"nonce\", i), document.head.insertBefore(n, document.head.firstChild), n;\n }, t = function t() {\n var t;\n return (t = n(\"trix-csp-nonce\") || n(\"csp-nonce\")) ? t.getAttribute(\"content\") : void 0;\n }, n = function n(t) {\n return document.head.querySelector(\"meta[name=\" + t + \"]\");\n }, s = function s(t) {\n var e, n, i;\n n = {};\n\n for (e in t) {\n i = t[e], n[e] = \"function\" == typeof i ? {\n value: i\n } : i;\n }\n\n return n;\n }, a = function () {\n var t;\n return t = function t(_t3) {\n var e, n, i, o, r;\n\n for (e = {}, r = [\"initialize\", \"connect\", \"disconnect\"], n = 0, o = r.length; o > n; n++) {\n i = r[n], e[i] = _t3[i], delete _t3[i];\n }\n\n return e;\n }, window.customElements ? function (e) {\n var n, i, o, r, s;\n return s = t(e), o = s.initialize, n = s.connect, i = s.disconnect, o && (r = n, n = function n() {\n return this.initialized || (this.initialized = !0, o.call(this)), null != r ? r.call(this) : void 0;\n }), n && (e.connectedCallback = n), i && (e.disconnectedCallback = i), e;\n } : function (e) {\n var n, i, o, r;\n return r = t(e), o = r.initialize, n = r.connect, i = r.disconnect, o && (e.createdCallback = o), n && (e.attachedCallback = n), i && (e.detachedCallback = i), e;\n };\n }(), r = function () {\n return window.customElements ? function (t, e) {\n var _n2;\n\n return _n2 = function n() {\n return \"object\" == (typeof Reflect === \"undefined\" ? \"undefined\" : _typeof(Reflect)) ? Reflect.construct(HTMLElement, [], _n2) : HTMLElement.apply(this);\n }, Object.setPrototypeOf(_n2.prototype, HTMLElement.prototype), Object.setPrototypeOf(_n2, HTMLElement), Object.defineProperties(_n2.prototype, e), window.customElements.define(t, _n2), _n2;\n } : function (t, e) {\n var n, i;\n return i = Object.create(HTMLElement.prototype, e), n = document.registerElement(t, {\n prototype: i\n }), Object.defineProperty(i, \"constructor\", {\n value: n\n }), n;\n };\n }();\n }.call(this), function () {\n var t, n;\n e.extend({\n getDOMSelection: function getDOMSelection() {\n var t;\n return t = window.getSelection(), t.rangeCount > 0 ? t : void 0;\n },\n getDOMRange: function getDOMRange() {\n var n, i;\n return (n = null != (i = e.getDOMSelection()) ? i.getRangeAt(0) : void 0) && !t(n) ? n : void 0;\n },\n setDOMRange: function setDOMRange(t) {\n var n;\n return n = window.getSelection(), n.removeAllRanges(), n.addRange(t), e.selectionChangeObserver.update();\n }\n }), t = function t(_t4) {\n return n(_t4.startContainer) || n(_t4.endContainer);\n }, n = function n(t) {\n return !Object.getPrototypeOf(t);\n };\n }.call(this), function () {\n var t;\n t = {\n \"application/x-trix-feature-detection\": \"test\"\n }, e.extend({\n dataTransferIsPlainText: function dataTransferIsPlainText(t) {\n var e, n, i;\n return i = t.getData(\"text/plain\"), n = t.getData(\"text/html\"), i && n ? (e = new DOMParser().parseFromString(n, \"text/html\").body, e.textContent === i ? !e.querySelector(\"*\") : void 0) : null != i ? i.length : void 0;\n },\n dataTransferIsWritable: function dataTransferIsWritable(e) {\n var n, i;\n\n if (null != (null != e ? e.setData : void 0)) {\n for (n in t) {\n if (i = t[n], !function () {\n try {\n return e.setData(n, i), e.getData(n) === i;\n } catch (t) {}\n }()) return;\n }\n\n return !0;\n }\n },\n keyEventIsKeyboardCommand: function () {\n return /Mac|^iP/.test(navigator.platform) ? function (t) {\n return t.metaKey;\n } : function (t) {\n return t.ctrlKey;\n };\n }()\n });\n }.call(this), function () {}.call(this), function () {\n var t,\n n = function n(t, e) {\n function n() {\n this.constructor = t;\n }\n\n for (var o in e) {\n i.call(e, o) && (t[o] = e[o]);\n }\n\n return n.prototype = e.prototype, t.prototype = new n(), t.__super__ = e.prototype, t;\n },\n i = {}.hasOwnProperty;\n\n t = e.arraysAreEqual, e.Hash = function (i) {\n function o(t) {\n null == t && (t = {}), this.values = s(t), o.__super__.constructor.apply(this, arguments);\n }\n\n var r, s, a, u, c;\n return n(o, i), o.fromCommonAttributesOfObjects = function (t) {\n var e, n, i, o, s, a;\n if (null == t && (t = []), !t.length) return new this();\n\n for (e = r(t[0]), i = e.getKeys(), a = t.slice(1), n = 0, o = a.length; o > n; n++) {\n s = a[n], i = e.getKeysCommonToHash(r(s)), e = e.slice(i);\n }\n\n return e;\n }, o.box = function (t) {\n return r(t);\n }, o.prototype.add = function (t, e) {\n return this.merge(u(t, e));\n }, o.prototype.remove = function (t) {\n return new e.Hash(s(this.values, t));\n }, o.prototype.get = function (t) {\n return this.values[t];\n }, o.prototype.has = function (t) {\n return t in this.values;\n }, o.prototype.merge = function (t) {\n return new e.Hash(a(this.values, c(t)));\n }, o.prototype.slice = function (t) {\n var n, i, o, r;\n\n for (r = {}, n = 0, o = t.length; o > n; n++) {\n i = t[n], this.has(i) && (r[i] = this.values[i]);\n }\n\n return new e.Hash(r);\n }, o.prototype.getKeys = function () {\n return Object.keys(this.values);\n }, o.prototype.getKeysCommonToHash = function (t) {\n var e, n, i, o, s;\n\n for (t = r(t), o = this.getKeys(), s = [], e = 0, i = o.length; i > e; e++) {\n n = o[e], this.values[n] === t.values[n] && s.push(n);\n }\n\n return s;\n }, o.prototype.isEqualTo = function (e) {\n return t(this.toArray(), r(e).toArray());\n }, o.prototype.isEmpty = function () {\n return 0 === this.getKeys().length;\n }, o.prototype.toArray = function () {\n var t, e, n;\n return (null != this.array ? this.array : this.array = function () {\n var i;\n e = [], i = this.values;\n\n for (t in i) {\n n = i[t], e.push(t, n);\n }\n\n return e;\n }.call(this)).slice(0);\n }, o.prototype.toObject = function () {\n return s(this.values);\n }, o.prototype.toJSON = function () {\n return this.toObject();\n }, o.prototype.contentsForInspection = function () {\n return {\n values: JSON.stringify(this.values)\n };\n }, u = function u(t, e) {\n var n;\n return n = {}, n[t] = e, n;\n }, a = function a(t, e) {\n var n, i, o;\n i = s(t);\n\n for (n in e) {\n o = e[n], i[n] = o;\n }\n\n return i;\n }, s = function s(t, e) {\n var n, i, o, r, s;\n\n for (r = {}, s = Object.keys(t).sort(), n = 0, o = s.length; o > n; n++) {\n i = s[n], i !== e && (r[i] = t[i]);\n }\n\n return r;\n }, r = function r(t) {\n return t instanceof e.Hash ? t : new e.Hash(t);\n }, c = function c(t) {\n return t instanceof e.Hash ? t.values : t;\n }, o;\n }(e.Object);\n }.call(this), function () {\n e.ObjectGroup = function () {\n function t(t, e) {\n var n, i;\n this.objects = null != t ? t : [], i = e.depth, n = e.asTree, n && (this.depth = i, this.objects = this.constructor.groupObjects(this.objects, {\n asTree: n,\n depth: this.depth + 1\n }));\n }\n\n return t.groupObjects = function (t, e) {\n var n, i, o, r, s, a, u, c, l;\n\n for (null == t && (t = []), l = null != e ? e : {}, o = l.depth, n = l.asTree, n && null == o && (o = 0), c = [], s = 0, a = t.length; a > s; s++) {\n if (u = t[s], r) {\n if ((\"function\" == typeof u.canBeGrouped ? u.canBeGrouped(o) : void 0) && (\"function\" == typeof (i = r[r.length - 1]).canBeGroupedWith ? i.canBeGroupedWith(u, o) : void 0)) {\n r.push(u);\n continue;\n }\n\n c.push(new this(r, {\n depth: o,\n asTree: n\n })), r = null;\n }\n\n (\"function\" == typeof u.canBeGrouped ? u.canBeGrouped(o) : void 0) ? r = [u] : c.push(u);\n }\n\n return r && c.push(new this(r, {\n depth: o,\n asTree: n\n })), c;\n }, t.prototype.getObjects = function () {\n return this.objects;\n }, t.prototype.getDepth = function () {\n return this.depth;\n }, t.prototype.getCacheKey = function () {\n var t, e, n, i, o;\n\n for (e = [\"objectGroup\"], o = this.getObjects(), t = 0, n = o.length; n > t; t++) {\n i = o[t], e.push(i.getCacheKey());\n }\n\n return e.join(\"/\");\n }, t;\n }();\n }.call(this), function () {\n var t = function t(_t5, e) {\n function i() {\n this.constructor = _t5;\n }\n\n for (var o in e) {\n n.call(e, o) && (_t5[o] = e[o]);\n }\n\n return i.prototype = e.prototype, _t5.prototype = new i(), _t5.__super__ = e.prototype, _t5;\n },\n n = {}.hasOwnProperty;\n\n e.ObjectMap = function (e) {\n function n(t) {\n var e, n, i, o, r;\n\n for (null == t && (t = []), this.objects = {}, i = 0, o = t.length; o > i; i++) {\n r = t[i], n = JSON.stringify(r), null == (e = this.objects)[n] && (e[n] = r);\n }\n }\n\n return t(n, e), n.prototype.find = function (t) {\n var e;\n return e = JSON.stringify(t), this.objects[e];\n }, n;\n }(e.BasicObject);\n }.call(this), function () {\n e.ElementStore = function () {\n function t(t) {\n this.reset(t);\n }\n\n var e;\n return t.prototype.add = function (t) {\n var n;\n return n = e(t), this.elements[n] = t;\n }, t.prototype.remove = function (t) {\n var n, i;\n return n = e(t), (i = this.elements[n]) ? (delete this.elements[n], i) : void 0;\n }, t.prototype.reset = function (t) {\n var e, n, i;\n\n for (null == t && (t = []), this.elements = {}, n = 0, i = t.length; i > n; n++) {\n e = t[n], this.add(e);\n }\n\n return t;\n }, e = function e(t) {\n return t.dataset.trixStoreKey;\n }, t;\n }();\n }.call(this), function () {}.call(this), function () {\n var t = function t(_t6, e) {\n function i() {\n this.constructor = _t6;\n }\n\n for (var o in e) {\n n.call(e, o) && (_t6[o] = e[o]);\n }\n\n return i.prototype = e.prototype, _t6.prototype = new i(), _t6.__super__ = e.prototype, _t6;\n },\n n = {}.hasOwnProperty;\n\n e.Operation = function (e) {\n function n() {\n return n.__super__.constructor.apply(this, arguments);\n }\n\n return t(n, e), n.prototype.isPerforming = function () {\n return this.performing === !0;\n }, n.prototype.hasPerformed = function () {\n return this.performed === !0;\n }, n.prototype.hasSucceeded = function () {\n return this.performed && this.succeeded;\n }, n.prototype.hasFailed = function () {\n return this.performed && !this.succeeded;\n }, n.prototype.getPromise = function () {\n return null != this.promise ? this.promise : this.promise = new Promise(function (t) {\n return function (e, n) {\n return t.performing = !0, t.perform(function (i, o) {\n return t.succeeded = i, t.performing = !1, t.performed = !0, t.succeeded ? e(o) : n(o);\n });\n };\n }(this));\n }, n.prototype.perform = function (t) {\n return t(!1);\n }, n.prototype.release = function () {\n var t;\n return null != (t = this.promise) && \"function\" == typeof t.cancel && t.cancel(), this.promise = null, this.performing = null, this.performed = null, this.succeeded = null;\n }, n.proxyMethod(\"getPromise().then\"), n.proxyMethod(\"getPromise().catch\"), n;\n }(e.BasicObject);\n }.call(this), function () {\n var t,\n n,\n i,\n o,\n r,\n s = function s(t, e) {\n function n() {\n this.constructor = t;\n }\n\n for (var i in e) {\n a.call(e, i) && (t[i] = e[i]);\n }\n\n return n.prototype = e.prototype, t.prototype = new n(), t.__super__ = e.prototype, t;\n },\n a = {}.hasOwnProperty;\n\n e.UTF16String = function (t) {\n function e(t, e) {\n this.ucs2String = t, this.codepoints = e, this.length = this.codepoints.length, this.ucs2Length = this.ucs2String.length;\n }\n\n return s(e, t), e.box = function (t) {\n return null == t && (t = \"\"), t instanceof this ? t : this.fromUCS2String(null != t ? t.toString() : void 0);\n }, e.fromUCS2String = function (t) {\n return new this(t, o(t));\n }, e.fromCodepoints = function (t) {\n return new this(r(t), t);\n }, e.prototype.offsetToUCS2Offset = function (t) {\n return r(this.codepoints.slice(0, Math.max(0, t))).length;\n }, e.prototype.offsetFromUCS2Offset = function (t) {\n return o(this.ucs2String.slice(0, Math.max(0, t))).length;\n }, e.prototype.slice = function () {\n var t;\n return this.constructor.fromCodepoints((t = this.codepoints).slice.apply(t, arguments));\n }, e.prototype.charAt = function (t) {\n return this.slice(t, t + 1);\n }, e.prototype.isEqualTo = function (t) {\n return this.constructor.box(t).ucs2String === this.ucs2String;\n }, e.prototype.toJSON = function () {\n return this.ucs2String;\n }, e.prototype.getCacheKey = function () {\n return this.ucs2String;\n }, e.prototype.toString = function () {\n return this.ucs2String;\n }, e;\n }(e.BasicObject), t = 1 === (\"function\" == typeof Array.from ? Array.from(\"\\uD83D\\uDC7C\").length : void 0), n = null != (\"function\" == typeof \" \".codePointAt ? \" \".codePointAt(0) : void 0), i = \" \\uD83D\\uDC7C\" === (\"function\" == typeof String.fromCodePoint ? String.fromCodePoint(32, 128124) : void 0), o = t && n ? function (t) {\n return Array.from(t).map(function (t) {\n return t.codePointAt(0);\n });\n } : function (t) {\n var e, n, i, o, r;\n\n for (o = [], e = 0, i = t.length; i > e;) {\n r = t.charCodeAt(e++), r >= 55296 && 56319 >= r && i > e && (n = t.charCodeAt(e++), 56320 === (64512 & n) ? r = ((1023 & r) << 10) + (1023 & n) + 65536 : e--), o.push(r);\n }\n\n return o;\n }, r = i ? function (t) {\n return String.fromCodePoint.apply(String, t);\n } : function (t) {\n var e, n, i;\n return e = function () {\n var e, o, r;\n\n for (r = [], e = 0, o = t.length; o > e; e++) {\n i = t[e], n = \"\", i > 65535 && (i -= 65536, n += String.fromCharCode(i >>> 10 & 1023 | 55296), i = 56320 | 1023 & i), r.push(n + String.fromCharCode(i));\n }\n\n return r;\n }(), e.join(\"\");\n };\n }.call(this), function () {}.call(this), function () {}.call(this), function () {\n e.config.lang = {\n attachFiles: \"Attach Files\",\n bold: \"Bold\",\n bullets: \"Bullets\",\n \"byte\": \"Byte\",\n bytes: \"Bytes\",\n captionPlaceholder: \"Add a caption\\u2026\",\n code: \"Code\",\n heading1: \"Heading\",\n indent: \"Increase Level\",\n italic: \"Italic\",\n link: \"Link\",\n numbers: \"Numbers\",\n outdent: \"Decrease Level\",\n quote: \"Quote\",\n redo: \"Redo\",\n remove: \"Remove\",\n strike: \"Strikethrough\",\n undo: \"Undo\",\n unlink: \"Unlink\",\n url: \"URL\",\n urlPlaceholder: \"Enter a URL\\u2026\",\n GB: \"GB\",\n KB: \"KB\",\n MB: \"MB\",\n PB: \"PB\",\n TB: \"TB\"\n };\n }.call(this), function () {\n e.config.css = {\n attachment: \"attachment\",\n attachmentCaption: \"attachment__caption\",\n attachmentCaptionEditor: \"attachment__caption-editor\",\n attachmentMetadata: \"attachment__metadata\",\n attachmentMetadataContainer: \"attachment__metadata-container\",\n attachmentName: \"attachment__name\",\n attachmentProgress: \"attachment__progress\",\n attachmentSize: \"attachment__size\",\n attachmentToolbar: \"attachment__toolbar\",\n attachmentGallery: \"attachment-gallery\"\n };\n }.call(this), function () {\n var t;\n e.config.blockAttributes = t = {\n \"default\": {\n tagName: \"div\",\n parse: !1\n },\n quote: {\n tagName: \"blockquote\",\n nestable: !0\n },\n heading1: {\n tagName: \"h1\",\n terminal: !0,\n breakOnReturn: !0,\n group: !1\n },\n code: {\n tagName: \"pre\",\n terminal: !0,\n text: {\n plaintext: !0\n }\n },\n bulletList: {\n tagName: \"ul\",\n parse: !1\n },\n bullet: {\n tagName: \"li\",\n listAttribute: \"bulletList\",\n group: !1,\n nestable: !0,\n test: function test(n) {\n return e.tagName(n.parentNode) === t[this.listAttribute].tagName;\n }\n },\n numberList: {\n tagName: \"ol\",\n parse: !1\n },\n number: {\n tagName: \"li\",\n listAttribute: \"numberList\",\n group: !1,\n nestable: !0,\n test: function test(n) {\n return e.tagName(n.parentNode) === t[this.listAttribute].tagName;\n }\n },\n attachmentGallery: {\n tagName: \"div\",\n exclusive: !0,\n terminal: !0,\n parse: !1,\n group: !1\n }\n };\n }.call(this), function () {\n var t, n;\n t = e.config.lang, n = [t.bytes, t.KB, t.MB, t.GB, t.TB, t.PB], e.config.fileSize = {\n prefix: \"IEC\",\n precision: 2,\n formatter: function formatter(e) {\n var i, o, r, s, a;\n\n switch (e) {\n case 0:\n return \"0 \" + t.bytes;\n\n case 1:\n return \"1 \" + t[\"byte\"];\n\n default:\n return i = function () {\n switch (this.prefix) {\n case \"SI\":\n return 1e3;\n\n case \"IEC\":\n return 1024;\n }\n }.call(this), o = Math.floor(Math.log(e) / Math.log(i)), r = e / Math.pow(i, o), s = r.toFixed(this.precision), a = s.replace(/0*$/, \"\").replace(/\\.$/, \"\"), a + \" \" + n[o];\n }\n }\n };\n }.call(this), function () {\n e.config.textAttributes = {\n bold: {\n tagName: \"strong\",\n inheritable: !0,\n parser: function parser(t) {\n var e;\n return e = window.getComputedStyle(t), \"bold\" === e.fontWeight || e.fontWeight >= 600;\n }\n },\n italic: {\n tagName: \"em\",\n inheritable: !0,\n parser: function parser(t) {\n var e;\n return e = window.getComputedStyle(t), \"italic\" === e.fontStyle;\n }\n },\n href: {\n groupTagName: \"a\",\n parser: function parser(t) {\n var n, i, o;\n return n = e.AttachmentView.attachmentSelector, o = \"a:not(\" + n + \")\", (i = e.findClosestElementFromNode(t, {\n matchingSelector: o\n })) ? i.getAttribute(\"href\") : void 0;\n }\n },\n strike: {\n tagName: \"del\",\n inheritable: !0\n },\n frozen: {\n style: {\n backgroundColor: \"highlight\"\n }\n }\n };\n }.call(this), function () {\n var t, n, i, o, r;\n r = \"[data-trix-serialize=false]\", o = [\"contenteditable\", \"data-trix-id\", \"data-trix-store-key\", \"data-trix-mutable\", \"data-trix-placeholder\", \"tabindex\"], n = \"data-trix-serialized-attributes\", i = \"[\" + n + \"]\", t = new RegExp(\"\", \"g\"), e.extend({\n serializers: {\n \"application/json\": function applicationJson(t) {\n var n;\n if (t instanceof e.Document) n = t;else {\n if (!(t instanceof HTMLElement)) throw new Error(\"unserializable object\");\n n = e.Document.fromHTML(t.innerHTML);\n }\n return n.toSerializableDocument().toJSONString();\n },\n \"text/html\": function textHtml(s) {\n var a, u, c, l, h, p, d, f, g, m, v, y, b, A, C, x, w;\n if (s instanceof e.Document) l = e.DocumentView.render(s);else {\n if (!(s instanceof HTMLElement)) throw new Error(\"unserializable object\");\n l = s.cloneNode(!0);\n }\n\n for (A = l.querySelectorAll(r), h = 0, g = A.length; g > h; h++) {\n c = A[h], e.removeNode(c);\n }\n\n for (p = 0, m = o.length; m > p; p++) {\n for (a = o[p], C = l.querySelectorAll(\"[\" + a + \"]\"), d = 0, v = C.length; v > d; d++) {\n c = C[d], c.removeAttribute(a);\n }\n }\n\n for (x = l.querySelectorAll(i), f = 0, y = x.length; y > f; f++) {\n c = x[f];\n\n try {\n u = JSON.parse(c.getAttribute(n)), c.removeAttribute(n);\n\n for (b in u) {\n w = u[b], c.setAttribute(b, w);\n }\n } catch (E) {}\n }\n\n return l.innerHTML.replace(t, \"\");\n }\n },\n deserializers: {\n \"application/json\": function applicationJson(t) {\n return e.Document.fromJSONString(t);\n },\n \"text/html\": function textHtml(t) {\n return e.Document.fromHTML(t);\n }\n },\n serializeToContentType: function serializeToContentType(t, n) {\n var i;\n if (i = e.serializers[n]) return i(t);\n throw new Error(\"unknown content type: \" + n);\n },\n deserializeFromContentType: function deserializeFromContentType(t, n) {\n var i;\n if (i = e.deserializers[n]) return i(t);\n throw new Error(\"unknown content type: \" + n);\n }\n });\n }.call(this), function () {\n var t;\n t = e.config.lang, e.config.toolbar = {\n getDefaultHTML: function getDefaultHTML() {\n return '\\n \\n \\n \\n \\n \\n \\n\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n\\n \\n \\n \\n\\n \\n\\n \\n \\n \\n \\n
\\n\\n';\n }\n };\n }.call(this), function () {\n e.config.undoInterval = 5e3;\n }.call(this), function () {\n e.config.attachments = {\n preview: {\n presentation: \"gallery\",\n caption: {\n name: !0,\n size: !0\n }\n },\n file: {\n caption: {\n size: !0\n }\n }\n };\n }.call(this), function () {\n e.config.keyNames = {\n 8: \"backspace\",\n 9: \"tab\",\n 13: \"return\",\n 27: \"escape\",\n 37: \"left\",\n 39: \"right\",\n 46: \"delete\",\n 68: \"d\",\n 72: \"h\",\n 79: \"o\"\n };\n }.call(this), function () {\n e.config.input = {\n level2Enabled: !0,\n getLevel: function getLevel() {\n return this.level2Enabled && e.browser.supportsInputEvents ? 2 : 0;\n },\n pickFiles: function pickFiles(t) {\n var n;\n return n = e.makeElement(\"input\", {\n type: \"file\",\n multiple: !0,\n hidden: !0,\n id: this.fileInputId\n }), n.addEventListener(\"change\", function () {\n return t(n.files), e.removeNode(n);\n }), e.removeNode(document.getElementById(this.fileInputId)), document.body.appendChild(n), n.click();\n },\n fileInputId: \"trix-file-input-\" + Date.now().toString(16)\n };\n }.call(this), function () {}.call(this), function () {\n e.registerElement(\"trix-toolbar\", {\n defaultCSS: \"%t {\\n display: block;\\n}\\n\\n%t {\\n white-space: nowrap;\\n}\\n\\n%t [data-trix-dialog] {\\n display: none;\\n}\\n\\n%t [data-trix-dialog][data-trix-active] {\\n display: block;\\n}\\n\\n%t [data-trix-dialog] [data-trix-validate]:invalid {\\n background-color: #ffdddd;\\n}\",\n initialize: function initialize() {\n return \"\" === this.innerHTML ? this.innerHTML = e.config.toolbar.getDefaultHTML() : void 0;\n }\n });\n }.call(this), function () {\n var t = function t(_t7, e) {\n function i() {\n this.constructor = _t7;\n }\n\n for (var o in e) {\n n.call(e, o) && (_t7[o] = e[o]);\n }\n\n return i.prototype = e.prototype, _t7.prototype = new i(), _t7.__super__ = e.prototype, _t7;\n },\n n = {}.hasOwnProperty,\n i = [].indexOf || function (t) {\n for (var e = 0, n = this.length; n > e; e++) {\n if (e in this && this[e] === t) return e;\n }\n\n return -1;\n };\n\n e.ObjectView = function (n) {\n function o(t, e) {\n this.object = t, this.options = null != e ? e : {}, this.childViews = [], this.rootView = this;\n }\n\n return t(o, n), o.prototype.getNodes = function () {\n var t, e, n, i, o;\n\n for (null == this.nodes && (this.nodes = this.createNodes()), i = this.nodes, o = [], t = 0, e = i.length; e > t; t++) {\n n = i[t], o.push(n.cloneNode(!0));\n }\n\n return o;\n }, o.prototype.invalidate = function () {\n var t;\n return this.nodes = null, this.childViews = [], null != (t = this.parentView) ? t.invalidate() : void 0;\n }, o.prototype.invalidateViewForObject = function (t) {\n var e;\n return null != (e = this.findViewForObject(t)) ? e.invalidate() : void 0;\n }, o.prototype.findOrCreateCachedChildView = function (t, e) {\n var n;\n return (n = this.getCachedViewForObject(e)) ? this.recordChildView(n) : (n = this.createChildView.apply(this, arguments), this.cacheViewForObject(n, e)), n;\n }, o.prototype.createChildView = function (t, n, i) {\n var o;\n return null == i && (i = {}), n instanceof e.ObjectGroup && (i.viewClass = t, t = e.ObjectGroupView), o = new t(n, i), this.recordChildView(o);\n }, o.prototype.recordChildView = function (t) {\n return t.parentView = this, t.rootView = this.rootView, this.childViews.push(t), t;\n }, o.prototype.getAllChildViews = function () {\n var t, e, n, i, o;\n\n for (o = [], i = this.childViews, e = 0, n = i.length; n > e; e++) {\n t = i[e], o.push(t), o = o.concat(t.getAllChildViews());\n }\n\n return o;\n }, o.prototype.findElement = function () {\n return this.findElementForObject(this.object);\n }, o.prototype.findElementForObject = function (t) {\n var e;\n return (e = null != t ? t.id : void 0) ? this.rootView.element.querySelector(\"[data-trix-id='\" + e + \"']\") : void 0;\n }, o.prototype.findViewForObject = function (t) {\n var e, n, i, o;\n\n for (i = this.getAllChildViews(), e = 0, n = i.length; n > e; e++) {\n if (o = i[e], o.object === t) return o;\n }\n }, o.prototype.getViewCache = function () {\n return this.rootView !== this ? this.rootView.getViewCache() : this.isViewCachingEnabled() ? null != this.viewCache ? this.viewCache : this.viewCache = {} : void 0;\n }, o.prototype.isViewCachingEnabled = function () {\n return this.shouldCacheViews !== !1;\n }, o.prototype.enableViewCaching = function () {\n return this.shouldCacheViews = !0;\n }, o.prototype.disableViewCaching = function () {\n return this.shouldCacheViews = !1;\n }, o.prototype.getCachedViewForObject = function (t) {\n var e;\n return null != (e = this.getViewCache()) ? e[t.getCacheKey()] : void 0;\n }, o.prototype.cacheViewForObject = function (t, e) {\n var n;\n return null != (n = this.getViewCache()) ? n[e.getCacheKey()] = t : void 0;\n }, o.prototype.garbageCollectCachedViews = function () {\n var t, e, n, o, r, s;\n\n if (t = this.getViewCache()) {\n s = this.getAllChildViews().concat(this), n = function () {\n var t, e, n;\n\n for (n = [], t = 0, e = s.length; e > t; t++) {\n r = s[t], n.push(r.object.getCacheKey());\n }\n\n return n;\n }(), o = [];\n\n for (e in t) {\n i.call(n, e) < 0 && o.push(delete t[e]);\n }\n\n return o;\n }\n }, o;\n }(e.BasicObject);\n }.call(this), function () {\n var t = function t(_t8, e) {\n function i() {\n this.constructor = _t8;\n }\n\n for (var o in e) {\n n.call(e, o) && (_t8[o] = e[o]);\n }\n\n return i.prototype = e.prototype, _t8.prototype = new i(), _t8.__super__ = e.prototype, _t8;\n },\n n = {}.hasOwnProperty;\n\n e.ObjectGroupView = function (e) {\n function n() {\n n.__super__.constructor.apply(this, arguments), this.objectGroup = this.object, this.viewClass = this.options.viewClass, delete this.options.viewClass;\n }\n\n return t(n, e), n.prototype.getChildViews = function () {\n var t, e, n, i;\n if (!this.childViews.length) for (i = this.objectGroup.getObjects(), t = 0, e = i.length; e > t; t++) {\n n = i[t], this.findOrCreateCachedChildView(this.viewClass, n, this.options);\n }\n return this.childViews;\n }, n.prototype.createNodes = function () {\n var t, e, n, i, o, r, s, a, u;\n\n for (t = this.createContainerElement(), s = this.getChildViews(), e = 0, i = s.length; i > e; e++) {\n for (u = s[e], a = u.getNodes(), n = 0, o = a.length; o > n; n++) {\n r = a[n], t.appendChild(r);\n }\n }\n\n return [t];\n }, n.prototype.createContainerElement = function (t) {\n return null == t && (t = this.objectGroup.getDepth()), this.getChildViews()[0].createContainerElement(t);\n }, n;\n }(e.ObjectView);\n }.call(this), function () {\n var t = function t(_t9, e) {\n function i() {\n this.constructor = _t9;\n }\n\n for (var o in e) {\n n.call(e, o) && (_t9[o] = e[o]);\n }\n\n return i.prototype = e.prototype, _t9.prototype = new i(), _t9.__super__ = e.prototype, _t9;\n },\n n = {}.hasOwnProperty;\n\n e.Controller = function (e) {\n function n() {\n return n.__super__.constructor.apply(this, arguments);\n }\n\n return t(n, e), n;\n }(e.BasicObject);\n }.call(this), function () {\n var t,\n n,\n i,\n o,\n r,\n s,\n a = function a(t, e) {\n return function () {\n return t.apply(e, arguments);\n };\n },\n u = function u(t, e) {\n function n() {\n this.constructor = t;\n }\n\n for (var i in e) {\n c.call(e, i) && (t[i] = e[i]);\n }\n\n return n.prototype = e.prototype, t.prototype = new n(), t.__super__ = e.prototype, t;\n },\n c = {}.hasOwnProperty,\n l = [].indexOf || function (t) {\n for (var e = 0, n = this.length; n > e; e++) {\n if (e in this && this[e] === t) return e;\n }\n\n return -1;\n };\n\n t = e.findClosestElementFromNode, i = e.nodeIsEmptyTextNode, n = e.nodeIsBlockStartComment, o = e.normalizeSpaces, r = e.summarizeStringChange, s = e.tagName, e.MutationObserver = function (e) {\n function c(t) {\n this.element = t, this.didMutate = a(this.didMutate, this), this.observer = new window.MutationObserver(this.didMutate), this.start();\n }\n\n var _h, p, d, f;\n\n return u(c, e), p = \"data-trix-mutable\", d = \"[\" + p + \"]\", f = {\n attributes: !0,\n childList: !0,\n characterData: !0,\n characterDataOldValue: !0,\n subtree: !0\n }, c.prototype.start = function () {\n return this.reset(), this.observer.observe(this.element, f);\n }, c.prototype.stop = function () {\n return this.observer.disconnect();\n }, c.prototype.didMutate = function (t) {\n var e, n;\n return (e = this.mutations).push.apply(e, this.findSignificantMutations(t)), this.mutations.length ? (null != (n = this.delegate) && \"function\" == typeof n.elementDidMutate && n.elementDidMutate(this.getMutationSummary()), this.reset()) : void 0;\n }, c.prototype.reset = function () {\n return this.mutations = [];\n }, c.prototype.findSignificantMutations = function (t) {\n var e, n, i, o;\n\n for (o = [], e = 0, n = t.length; n > e; e++) {\n i = t[e], this.mutationIsSignificant(i) && o.push(i);\n }\n\n return o;\n }, c.prototype.mutationIsSignificant = function (t) {\n var e, n, i, o;\n if (this.nodeIsMutable(t.target)) return !1;\n\n for (o = this.nodesModifiedByMutation(t), e = 0, n = o.length; n > e; e++) {\n if (i = o[e], this.nodeIsSignificant(i)) return !0;\n }\n\n return !1;\n }, c.prototype.nodeIsSignificant = function (t) {\n return t !== this.element && !this.nodeIsMutable(t) && !i(t);\n }, c.prototype.nodeIsMutable = function (e) {\n return t(e, {\n matchingSelector: d\n });\n }, c.prototype.nodesModifiedByMutation = function (t) {\n var e;\n\n switch (e = [], t.type) {\n case \"attributes\":\n t.attributeName !== p && e.push(t.target);\n break;\n\n case \"characterData\":\n e.push(t.target.parentNode), e.push(t.target);\n break;\n\n case \"childList\":\n e.push.apply(e, t.addedNodes), e.push.apply(e, t.removedNodes);\n }\n\n return e;\n }, c.prototype.getMutationSummary = function () {\n return this.getTextMutationSummary();\n }, c.prototype.getTextMutationSummary = function () {\n var t, e, n, i, o, r, s, a, u, c, h;\n\n for (a = this.getTextChangesFromCharacterData(), n = a.additions, o = a.deletions, h = this.getTextChangesFromChildList(), u = h.additions, r = 0, s = u.length; s > r; r++) {\n e = u[r], l.call(n, e) < 0 && n.push(e);\n }\n\n return o.push.apply(o, h.deletions), c = {}, (t = n.join(\"\")) && (c.textAdded = t), (i = o.join(\"\")) && (c.textDeleted = i), c;\n }, c.prototype.getMutationsByType = function (t) {\n var e, n, i, o, r;\n\n for (o = this.mutations, r = [], e = 0, n = o.length; n > e; e++) {\n i = o[e], i.type === t && r.push(i);\n }\n\n return r;\n }, c.prototype.getTextChangesFromChildList = function () {\n var t, e, i, r, s, a, u, c, l, p, d;\n\n for (t = [], u = [], a = this.getMutationsByType(\"childList\"), e = 0, r = a.length; r > e; e++) {\n s = a[e], t.push.apply(t, s.addedNodes), u.push.apply(u, s.removedNodes);\n }\n\n return c = 0 === t.length && 1 === u.length && n(u[0]), c ? (p = [], d = [\"\\n\"]) : (p = _h(t), d = _h(u)), {\n additions: function () {\n var t, e, n;\n\n for (n = [], i = t = 0, e = p.length; e > t; i = ++t) {\n l = p[i], l !== d[i] && n.push(o(l));\n }\n\n return n;\n }(),\n deletions: function () {\n var t, e, n;\n\n for (n = [], i = t = 0, e = d.length; e > t; i = ++t) {\n l = d[i], l !== p[i] && n.push(o(l));\n }\n\n return n;\n }()\n };\n }, c.prototype.getTextChangesFromCharacterData = function () {\n var t, e, n, i, s, a, u, c;\n return e = this.getMutationsByType(\"characterData\"), e.length && (c = e[0], n = e[e.length - 1], s = o(c.oldValue), i = o(n.target.data), a = r(s, i), t = a.added, u = a.removed), {\n additions: t ? [t] : [],\n deletions: u ? [u] : []\n };\n }, _h = function h(t) {\n var e, n, i, o;\n\n for (null == t && (t = []), o = [], e = 0, n = t.length; n > e; e++) {\n switch (i = t[e], i.nodeType) {\n case Node.TEXT_NODE:\n o.push(i.data);\n break;\n\n case Node.ELEMENT_NODE:\n \"br\" === s(i) ? o.push(\"\\n\") : o.push.apply(o, _h(i.childNodes));\n }\n }\n\n return o;\n }, c;\n }(e.BasicObject);\n }.call(this), function () {\n var t = function t(_t10, e) {\n function i() {\n this.constructor = _t10;\n }\n\n for (var o in e) {\n n.call(e, o) && (_t10[o] = e[o]);\n }\n\n return i.prototype = e.prototype, _t10.prototype = new i(), _t10.__super__ = e.prototype, _t10;\n },\n n = {}.hasOwnProperty;\n\n e.FileVerificationOperation = function (e) {\n function n(t) {\n this.file = t;\n }\n\n return t(n, e), n.prototype.perform = function (t) {\n var e;\n return e = new FileReader(), e.onerror = function () {\n return t(!1);\n }, e.onload = function (n) {\n return function () {\n e.onerror = null;\n\n try {\n e.abort();\n } catch (i) {}\n\n return t(!0, n.file);\n };\n }(this), e.readAsArrayBuffer(this.file);\n }, n;\n }(e.Operation);\n }.call(this), function () {\n var t,\n n,\n i = function i(t, e) {\n function n() {\n this.constructor = t;\n }\n\n for (var i in e) {\n o.call(e, i) && (t[i] = e[i]);\n }\n\n return n.prototype = e.prototype, t.prototype = new n(), t.__super__ = e.prototype, t;\n },\n o = {}.hasOwnProperty;\n\n t = e.handleEvent, n = e.innerElementIsActive, e.InputController = function (o) {\n function r(n) {\n var i;\n this.element = n, this.mutationObserver = new e.MutationObserver(this.element), this.mutationObserver.delegate = this;\n\n for (i in this.events) {\n t(i, {\n onElement: this.element,\n withCallback: this.handlerFor(i)\n });\n }\n }\n\n return i(r, o), r.prototype.events = {}, r.prototype.elementDidMutate = function () {}, r.prototype.editorWillSyncDocumentView = function () {\n return this.mutationObserver.stop();\n }, r.prototype.editorDidSyncDocumentView = function () {\n return this.mutationObserver.start();\n }, r.prototype.requestRender = function () {\n var t;\n return null != (t = this.delegate) && \"function\" == typeof t.inputControllerDidRequestRender ? t.inputControllerDidRequestRender() : void 0;\n }, r.prototype.requestReparse = function () {\n var t;\n return null != (t = this.delegate) && \"function\" == typeof t.inputControllerDidRequestReparse && t.inputControllerDidRequestReparse(), this.requestRender();\n }, r.prototype.attachFiles = function (t) {\n var n, i;\n return i = function () {\n var i, o, r;\n\n for (r = [], i = 0, o = t.length; o > i; i++) {\n n = t[i], r.push(new e.FileVerificationOperation(n));\n }\n\n return r;\n }(), Promise.all(i).then(function (t) {\n return function (e) {\n return t.handleInput(function () {\n var t, n;\n return null != (t = this.delegate) && t.inputControllerWillAttachFiles(), null != (n = this.responder) && n.insertFiles(e), this.requestRender();\n });\n };\n }(this));\n }, r.prototype.handlerFor = function (t) {\n return function (e) {\n return function (i) {\n return i.defaultPrevented ? void 0 : e.handleInput(function () {\n return n(this.element) ? void 0 : (this.eventName = t, this.events[t].call(this, i));\n });\n };\n }(this);\n }, r.prototype.handleInput = function (t) {\n var e, n;\n\n try {\n return null != (e = this.delegate) && e.inputControllerWillHandleInput(), t.call(this);\n } finally {\n null != (n = this.delegate) && n.inputControllerDidHandleInput();\n }\n }, r;\n }(e.BasicObject);\n }.call(this), function () {\n var t,\n n,\n i,\n o,\n r,\n s,\n a,\n u,\n c,\n l,\n h,\n p,\n d,\n f = function f(t, e) {\n function n() {\n this.constructor = t;\n }\n\n for (var i in e) {\n g.call(e, i) && (t[i] = e[i]);\n }\n\n return n.prototype = e.prototype, t.prototype = new n(), t.__super__ = e.prototype, t;\n },\n g = {}.hasOwnProperty,\n m = [].indexOf || function (t) {\n for (var e = 0, n = this.length; n > e; e++) {\n if (e in this && this[e] === t) return e;\n }\n\n return -1;\n };\n\n c = e.makeElement, l = e.objectsAreEqual, d = e.tagName, n = e.browser, a = e.keyEventIsKeyboardCommand, o = e.dataTransferIsWritable, i = e.dataTransferIsPlainText, u = e.config.keyNames, e.Level0InputController = function (n) {\n function s() {\n s.__super__.constructor.apply(this, arguments), this.resetInputSummary();\n }\n\n var d;\n return f(s, n), d = 0, s.prototype.setInputSummary = function (t) {\n var e, n;\n null == t && (t = {}), this.inputSummary.eventName = this.eventName;\n\n for (e in t) {\n n = t[e], this.inputSummary[e] = n;\n }\n\n return this.inputSummary;\n }, s.prototype.resetInputSummary = function () {\n return this.inputSummary = {};\n }, s.prototype.reset = function () {\n return this.resetInputSummary(), e.selectionChangeObserver.reset();\n }, s.prototype.elementDidMutate = function (t) {\n var e;\n return this.isComposing() ? null != (e = this.delegate) && \"function\" == typeof e.inputControllerDidAllowUnhandledInput ? e.inputControllerDidAllowUnhandledInput() : void 0 : this.handleInput(function () {\n return this.mutationIsSignificant(t) && (this.mutationIsExpected(t) ? this.requestRender() : this.requestReparse()), this.reset();\n });\n }, s.prototype.mutationIsExpected = function (t) {\n var e, n, i, o, r, s, a, u, c, l;\n return a = t.textAdded, u = t.textDeleted, this.inputSummary.preferDocument ? !0 : (e = null != a ? a === this.inputSummary.textAdded : !this.inputSummary.textAdded, n = null != u ? this.inputSummary.didDelete : !this.inputSummary.didDelete, c = (\"\\n\" === a || \" \\n\" === a) && !e, l = \"\\n\" === u && !n, s = c && !l || l && !c, s && (o = this.getSelectedRange()) && (i = c ? a.replace(/\\n$/, \"\").length || -1 : (null != a ? a.length : void 0) || 1, null != (r = this.responder) ? r.positionIsBlockBreak(o[1] + i) : void 0) ? !0 : e && n);\n }, s.prototype.mutationIsSignificant = function (t) {\n var e, n, i;\n return i = Object.keys(t).length > 0, e = \"\" === (null != (n = this.compositionInput) ? n.getEndData() : void 0), i || !e;\n }, s.prototype.events = {\n keydown: function keydown(t) {\n var n, i, o, r, s, c, l, h, p;\n\n if (this.isComposing() || this.resetInputSummary(), this.inputSummary.didInput = !0, r = u[t.keyCode]) {\n for (i = this.keys, h = [\"ctrl\", \"alt\", \"shift\", \"meta\"], o = 0, c = h.length; c > o; o++) {\n l = h[o], t[l + \"Key\"] && (\"ctrl\" === l && (l = \"control\"), i = null != i ? i[l] : void 0);\n }\n\n null != (null != i ? i[r] : void 0) && (this.setInputSummary({\n keyName: r\n }), e.selectionChangeObserver.reset(), i[r].call(this, t));\n }\n\n return a(t) && (n = String.fromCharCode(t.keyCode).toLowerCase()) && (s = function () {\n var e, n, i, o;\n\n for (i = [\"alt\", \"shift\"], o = [], e = 0, n = i.length; n > e; e++) {\n l = i[e], t[l + \"Key\"] && o.push(l);\n }\n\n return o;\n }(), s.push(n), null != (p = this.delegate) ? p.inputControllerDidReceiveKeyboardCommand(s) : void 0) ? t.preventDefault() : void 0;\n },\n keypress: function keypress(t) {\n var e, n, i;\n if (null == this.inputSummary.eventName && !t.metaKey && (!t.ctrlKey || t.altKey)) return (i = p(t)) ? (null != (e = this.delegate) && e.inputControllerWillPerformTyping(), null != (n = this.responder) && n.insertString(i), this.setInputSummary({\n textAdded: i,\n didDelete: this.selectionIsExpanded()\n })) : void 0;\n },\n textInput: function textInput(t) {\n var e, n, i, o;\n return e = t.data, o = this.inputSummary.textAdded, o && o !== e && o.toUpperCase() === e ? (n = this.getSelectedRange(), this.setSelectedRange([n[0], n[1] + o.length]), null != (i = this.responder) && i.insertString(e), this.setInputSummary({\n textAdded: e\n }), this.setSelectedRange(n)) : void 0;\n },\n dragenter: function dragenter(t) {\n return t.preventDefault();\n },\n dragstart: function dragstart(t) {\n var e, n;\n return n = t.target, this.serializeSelectionToDataTransfer(t.dataTransfer), this.draggedRange = this.getSelectedRange(), null != (e = this.delegate) && \"function\" == typeof e.inputControllerDidStartDrag ? e.inputControllerDidStartDrag() : void 0;\n },\n dragover: function dragover(t) {\n var e, n;\n return !this.draggedRange && !this.canAcceptDataTransfer(t.dataTransfer) || (t.preventDefault(), e = {\n x: t.clientX,\n y: t.clientY\n }, l(e, this.draggingPoint)) ? void 0 : (this.draggingPoint = e, null != (n = this.delegate) && \"function\" == typeof n.inputControllerDidReceiveDragOverPoint ? n.inputControllerDidReceiveDragOverPoint(this.draggingPoint) : void 0);\n },\n dragend: function dragend() {\n var t;\n return null != (t = this.delegate) && \"function\" == typeof t.inputControllerDidCancelDrag && t.inputControllerDidCancelDrag(), this.draggedRange = null, this.draggingPoint = null;\n },\n drop: function drop(t) {\n var n, i, o, r, s, a, u, c, l;\n return t.preventDefault(), o = null != (s = t.dataTransfer) ? s.files : void 0, r = {\n x: t.clientX,\n y: t.clientY\n }, null != (a = this.responder) && a.setLocationRangeFromPointRange(r), (null != o ? o.length : void 0) ? this.attachFiles(o) : this.draggedRange ? (null != (u = this.delegate) && u.inputControllerWillMoveText(), null != (c = this.responder) && c.moveTextFromRange(this.draggedRange), this.draggedRange = null, this.requestRender()) : (i = t.dataTransfer.getData(\"application/x-trix-document\")) && (n = e.Document.fromJSONString(i), null != (l = this.responder) && l.insertDocument(n), this.requestRender()), this.draggedRange = null, this.draggingPoint = null;\n },\n cut: function cut(t) {\n var e, n;\n return (null != (e = this.responder) ? e.selectionIsExpanded() : void 0) && (this.serializeSelectionToDataTransfer(t.clipboardData) && t.preventDefault(), null != (n = this.delegate) && n.inputControllerWillCutText(), this.deleteInDirection(\"backward\"), t.defaultPrevented) ? this.requestRender() : void 0;\n },\n copy: function copy(t) {\n var e;\n return (null != (e = this.responder) ? e.selectionIsExpanded() : void 0) && this.serializeSelectionToDataTransfer(t.clipboardData) ? t.preventDefault() : void 0;\n },\n paste: function paste(t) {\n var n, o, s, a, u, c, l, p, f, g, v, y, b, A, C, x, w, E, S, R, k, D;\n return n = null != (p = t.clipboardData) ? p : t.testClipboardData, l = {\n clipboard: n\n }, null == n || h(t) ? void this.getPastedHTMLUsingHiddenElement(function (t) {\n return function (e) {\n var n, i, o;\n return l.type = \"text/html\", l.html = e, null != (n = t.delegate) && n.inputControllerWillPaste(l), null != (i = t.responder) && i.insertHTML(l.html), t.requestRender(), null != (o = t.delegate) ? o.inputControllerDidPaste(l) : void 0;\n };\n }(this)) : ((a = n.getData(\"URL\")) ? (l.type = \"URL\", l.href = a, l.string = (c = n.getData(\"public.url-name\")) ? e.squishBreakableWhitespace(c).trim() : a, null != (f = this.delegate) && f.inputControllerWillPaste(l), this.setInputSummary({\n textAdded: l.string,\n didDelete: this.selectionIsExpanded()\n }), null != (C = this.responder) && C.insertText(e.Text.textForStringWithAttributes(l.string, {\n href: l.href\n })), this.requestRender(), null != (x = this.delegate) && x.inputControllerDidPaste(l)) : i(n) ? (l.type = \"text/plain\", l.string = n.getData(\"text/plain\"), null != (w = this.delegate) && w.inputControllerWillPaste(l), this.setInputSummary({\n textAdded: l.string,\n didDelete: this.selectionIsExpanded()\n }), null != (E = this.responder) && E.insertString(l.string), this.requestRender(), null != (S = this.delegate) && S.inputControllerDidPaste(l)) : (u = n.getData(\"text/html\")) ? (l.type = \"text/html\", l.html = u, null != (R = this.delegate) && R.inputControllerWillPaste(l), null != (k = this.responder) && k.insertHTML(l.html), this.requestRender(), null != (D = this.delegate) && D.inputControllerDidPaste(l)) : m.call(n.types, \"Files\") >= 0 && (s = null != (g = n.items) && null != (v = g[0]) && \"function\" == typeof v.getAsFile ? v.getAsFile() : void 0) && (!s.name && (o = r(s)) && (s.name = \"pasted-file-\" + ++d + \".\" + o), l.type = \"File\", l.file = s, null != (y = this.delegate) && y.inputControllerWillAttachFiles(), null != (b = this.responder) && b.insertFile(l.file), this.requestRender(), null != (A = this.delegate) && A.inputControllerDidPaste(l)), t.preventDefault());\n },\n compositionstart: function compositionstart(t) {\n return this.getCompositionInput().start(t.data);\n },\n compositionupdate: function compositionupdate(t) {\n return this.getCompositionInput().update(t.data);\n },\n compositionend: function compositionend(t) {\n return this.getCompositionInput().end(t.data);\n },\n beforeinput: function beforeinput() {\n return this.inputSummary.didInput = !0;\n },\n input: function input(t) {\n return this.inputSummary.didInput = !0, t.stopPropagation();\n }\n }, s.prototype.keys = {\n backspace: function backspace(t) {\n var e;\n return null != (e = this.delegate) && e.inputControllerWillPerformTyping(), this.deleteInDirection(\"backward\", t);\n },\n \"delete\": function _delete(t) {\n var e;\n return null != (e = this.delegate) && e.inputControllerWillPerformTyping(), this.deleteInDirection(\"forward\", t);\n },\n \"return\": function _return() {\n var t, e;\n return this.setInputSummary({\n preferDocument: !0\n }), null != (t = this.delegate) && t.inputControllerWillPerformTyping(), null != (e = this.responder) ? e.insertLineBreak() : void 0;\n },\n tab: function tab(t) {\n var e, n;\n return (null != (e = this.responder) ? e.canIncreaseNestingLevel() : void 0) ? (null != (n = this.responder) && n.increaseNestingLevel(), this.requestRender(), t.preventDefault()) : void 0;\n },\n left: function left(t) {\n var e;\n return this.selectionIsInCursorTarget() ? (t.preventDefault(), null != (e = this.responder) ? e.moveCursorInDirection(\"backward\") : void 0) : void 0;\n },\n right: function right(t) {\n var e;\n return this.selectionIsInCursorTarget() ? (t.preventDefault(), null != (e = this.responder) ? e.moveCursorInDirection(\"forward\") : void 0) : void 0;\n },\n control: {\n d: function d(t) {\n var e;\n return null != (e = this.delegate) && e.inputControllerWillPerformTyping(), this.deleteInDirection(\"forward\", t);\n },\n h: function h(t) {\n var e;\n return null != (e = this.delegate) && e.inputControllerWillPerformTyping(), this.deleteInDirection(\"backward\", t);\n },\n o: function o(t) {\n var e, n;\n return t.preventDefault(), null != (e = this.delegate) && e.inputControllerWillPerformTyping(), null != (n = this.responder) && n.insertString(\"\\n\", {\n updatePosition: !1\n }), this.requestRender();\n }\n },\n shift: {\n \"return\": function _return(t) {\n var e, n;\n return null != (e = this.delegate) && e.inputControllerWillPerformTyping(), null != (n = this.responder) && n.insertString(\"\\n\"), this.requestRender(), t.preventDefault();\n },\n tab: function tab(t) {\n var e, n;\n return (null != (e = this.responder) ? e.canDecreaseNestingLevel() : void 0) ? (null != (n = this.responder) && n.decreaseNestingLevel(), this.requestRender(), t.preventDefault()) : void 0;\n },\n left: function left(t) {\n return this.selectionIsInCursorTarget() ? (t.preventDefault(), this.expandSelectionInDirection(\"backward\")) : void 0;\n },\n right: function right(t) {\n return this.selectionIsInCursorTarget() ? (t.preventDefault(), this.expandSelectionInDirection(\"forward\")) : void 0;\n }\n },\n alt: {\n backspace: function backspace() {\n var t;\n return this.setInputSummary({\n preferDocument: !1\n }), null != (t = this.delegate) ? t.inputControllerWillPerformTyping() : void 0;\n }\n },\n meta: {\n backspace: function backspace() {\n var t;\n return this.setInputSummary({\n preferDocument: !1\n }), null != (t = this.delegate) ? t.inputControllerWillPerformTyping() : void 0;\n }\n }\n }, s.prototype.getCompositionInput = function () {\n return this.isComposing() ? this.compositionInput : this.compositionInput = new t(this);\n }, s.prototype.isComposing = function () {\n return null != this.compositionInput && !this.compositionInput.isEnded();\n }, s.prototype.deleteInDirection = function (t, e) {\n var n;\n return (null != (n = this.responder) ? n.deleteInDirection(t) : void 0) !== !1 ? this.setInputSummary({\n didDelete: !0\n }) : e ? (e.preventDefault(), this.requestRender()) : void 0;\n }, s.prototype.serializeSelectionToDataTransfer = function (t) {\n var n, i;\n if (o(t)) return n = null != (i = this.responder) ? i.getSelectedDocument().toSerializableDocument() : void 0, t.setData(\"application/x-trix-document\", JSON.stringify(n)), t.setData(\"text/html\", e.DocumentView.render(n).innerHTML), t.setData(\"text/plain\", n.toString().replace(/\\n$/, \"\")), !0;\n }, s.prototype.canAcceptDataTransfer = function (t) {\n var e, n, i, o, r, s;\n\n for (s = {}, o = null != (i = null != t ? t.types : void 0) ? i : [], e = 0, n = o.length; n > e; e++) {\n r = o[e], s[r] = !0;\n }\n\n return s.Files || s[\"application/x-trix-document\"] || s[\"text/html\"] || s[\"text/plain\"];\n }, s.prototype.getPastedHTMLUsingHiddenElement = function (t) {\n var n, i, o;\n return i = this.getSelectedRange(), o = {\n position: \"absolute\",\n left: window.pageXOffset + \"px\",\n top: window.pageYOffset + \"px\",\n opacity: 0\n }, n = c({\n style: o,\n tagName: \"div\",\n editable: !0\n }), document.body.appendChild(n), n.focus(), requestAnimationFrame(function (o) {\n return function () {\n var r;\n return r = n.innerHTML, e.removeNode(n), o.setSelectedRange(i), t(r);\n };\n }(this));\n }, s.proxyMethod(\"responder?.getSelectedRange\"), s.proxyMethod(\"responder?.setSelectedRange\"), s.proxyMethod(\"responder?.expandSelectionInDirection\"), s.proxyMethod(\"responder?.selectionIsInCursorTarget\"), s.proxyMethod(\"responder?.selectionIsExpanded\"), s;\n }(e.InputController), r = function r(t) {\n var e, n;\n return null != (e = t.type) && null != (n = e.match(/\\/(\\w+)$/)) ? n[1] : void 0;\n }, s = null != (\"function\" == typeof \" \".codePointAt ? \" \".codePointAt(0) : void 0), p = function p(t) {\n var n;\n return t.key && s && t.key.codePointAt(0) === t.keyCode ? t.key : (null === t.which ? n = t.keyCode : 0 !== t.which && 0 !== t.charCode && (n = t.charCode), null != n && \"escape\" !== u[n] ? e.UTF16String.fromCodepoints([n]).toString() : void 0);\n }, h = function h(t) {\n var e, n, i, o, r, s, a, u, c, l;\n\n if (u = t.clipboardData) {\n if (m.call(u.types, \"text/html\") >= 0) {\n for (c = u.types, i = 0, s = c.length; s > i; i++) {\n if (l = c[i], e = /^CorePasteboardFlavorType/.test(l), n = /^dyn\\./.test(l) && u.getData(l), a = e || n) return !0;\n }\n\n return !1;\n }\n\n return o = m.call(u.types, \"com.apple.webarchive\") >= 0, r = m.call(u.types, \"com.apple.flat-rtfd\") >= 0, o || r;\n }\n }, t = function (t) {\n function e(t) {\n var e;\n this.inputController = t, e = this.inputController, this.responder = e.responder, this.delegate = e.delegate, this.inputSummary = e.inputSummary, this.data = {};\n }\n\n return f(e, t), e.prototype.start = function (t) {\n var e, n;\n return this.data.start = t, this.isSignificant() ? (\"keypress\" === this.inputSummary.eventName && this.inputSummary.textAdded && null != (e = this.responder) && e.deleteInDirection(\"left\"), this.selectionIsExpanded() || (this.insertPlaceholder(), this.requestRender()), this.range = null != (n = this.responder) ? n.getSelectedRange() : void 0) : void 0;\n }, e.prototype.update = function (t) {\n var e;\n return this.data.update = t, this.isSignificant() && (e = this.selectPlaceholder()) ? (this.forgetPlaceholder(), this.range = e) : void 0;\n }, e.prototype.end = function (t) {\n var e, n, i, o;\n return this.data.end = t, this.isSignificant() ? (this.forgetPlaceholder(), this.canApplyToDocument() ? (this.setInputSummary({\n preferDocument: !0,\n didInput: !1\n }), null != (e = this.delegate) && e.inputControllerWillPerformTyping(), null != (n = this.responder) && n.setSelectedRange(this.range), null != (i = this.responder) && i.insertString(this.data.end), null != (o = this.responder) ? o.setSelectedRange(this.range[0] + this.data.end.length) : void 0) : null != this.data.start || null != this.data.update ? (this.requestReparse(), this.inputController.reset()) : void 0) : this.inputController.reset();\n }, e.prototype.getEndData = function () {\n return this.data.end;\n }, e.prototype.isEnded = function () {\n return null != this.getEndData();\n }, e.prototype.isSignificant = function () {\n return n.composesExistingText ? this.inputSummary.didInput : !0;\n }, e.prototype.canApplyToDocument = function () {\n var t, e;\n return 0 === (null != (t = this.data.start) ? t.length : void 0) && (null != (e = this.data.end) ? e.length : void 0) > 0 && null != this.range;\n }, e.proxyMethod(\"inputController.setInputSummary\"), e.proxyMethod(\"inputController.requestRender\"), e.proxyMethod(\"inputController.requestReparse\"), e.proxyMethod(\"responder?.selectionIsExpanded\"), e.proxyMethod(\"responder?.insertPlaceholder\"), e.proxyMethod(\"responder?.selectPlaceholder\"), e.proxyMethod(\"responder?.forgetPlaceholder\"), e;\n }(e.BasicObject);\n }.call(this), function () {\n var t,\n n,\n i,\n o = function o(t, e) {\n return function () {\n return t.apply(e, arguments);\n };\n },\n r = function r(t, e) {\n function n() {\n this.constructor = t;\n }\n\n for (var i in e) {\n s.call(e, i) && (t[i] = e[i]);\n }\n\n return n.prototype = e.prototype, t.prototype = new n(), t.__super__ = e.prototype, t;\n },\n s = {}.hasOwnProperty,\n a = [].indexOf || function (t) {\n for (var e = 0, n = this.length; n > e; e++) {\n if (e in this && this[e] === t) return e;\n }\n\n return -1;\n };\n\n t = e.dataTransferIsPlainText, n = e.keyEventIsKeyboardCommand, i = e.objectsAreEqual, e.Level2InputController = function (s) {\n function u() {\n return this.render = o(this.render, this), u.__super__.constructor.apply(this, arguments);\n }\n\n var c, l, h, p, d, f;\n return r(u, s), u.prototype.elementDidMutate = function () {\n var t;\n return this.scheduledRender ? this.composing && null != (t = this.delegate) && \"function\" == typeof t.inputControllerDidAllowUnhandledInput ? t.inputControllerDidAllowUnhandledInput() : void 0 : this.reparse();\n }, u.prototype.scheduleRender = function () {\n return null != this.scheduledRender ? this.scheduledRender : this.scheduledRender = requestAnimationFrame(this.render);\n }, u.prototype.render = function () {\n var t;\n return cancelAnimationFrame(this.scheduledRender), this.scheduledRender = null, this.composing || null != (t = this.delegate) && t.render(), \"function\" == typeof this.afterRender && this.afterRender(), this.afterRender = null;\n }, u.prototype.reparse = function () {\n var t;\n return null != (t = this.delegate) ? t.reparse() : void 0;\n }, u.prototype.events = {\n keydown: function keydown(t) {\n var e, i, o, r;\n\n if (n(t)) {\n if (e = l(t), null != (r = this.delegate) ? r.inputControllerDidReceiveKeyboardCommand(e) : void 0) return t.preventDefault();\n } else if (o = t.key, t.altKey && (o += \"+Alt\"), t.shiftKey && (o += \"+Shift\"), i = this.keys[o]) return this.withEvent(t, i);\n },\n paste: function paste(t) {\n var n, i, o, r, s, a, u, c, l;\n return h(t) ? (t.preventDefault(), this.attachFiles(t.clipboardData.files)) : p(t) ? (t.preventDefault(), i = {\n type: \"text/plain\",\n string: t.clipboardData.getData(\"text/plain\")\n }, null != (o = this.delegate) && o.inputControllerWillPaste(i), null != (r = this.responder) && r.insertString(i.string), this.render(), null != (s = this.delegate) ? s.inputControllerDidPaste(i) : void 0) : (n = null != (a = t.clipboardData) ? a.getData(\"URL\") : void 0) ? (t.preventDefault(), i = {\n type: \"URL\",\n href: n,\n string: n\n }, null != (u = this.delegate) && u.inputControllerWillPaste(i), null != (c = this.responder) && c.insertText(e.Text.textForStringWithAttributes(i.string, {\n href: i.href\n })), this.render(), null != (l = this.delegate) ? l.inputControllerDidPaste(i) : void 0) : void 0;\n },\n beforeinput: function beforeinput(t) {\n var e;\n return (e = this.inputTypes[t.inputType]) ? (this.withEvent(t, e), this.scheduleRender()) : void 0;\n },\n input: function input() {\n return e.selectionChangeObserver.reset();\n },\n dragstart: function dragstart(t) {\n var e, n;\n return (null != (e = this.responder) ? e.selectionContainsAttachments() : void 0) ? (t.dataTransfer.setData(\"application/x-trix-dragging\", !0), this.dragging = {\n range: null != (n = this.responder) ? n.getSelectedRange() : void 0,\n point: d(t)\n }) : void 0;\n },\n dragenter: function dragenter(t) {\n return c(t) ? t.preventDefault() : void 0;\n },\n dragover: function dragover(t) {\n var e, n;\n return this.dragging && (t.preventDefault(), e = d(t), !i(e, this.dragging.point)) ? (this.dragging.point = e, null != (n = this.responder) ? n.setLocationRangeFromPointRange(e) : void 0) : void 0;\n },\n drop: function drop(t) {\n var e, n, i, o;\n return this.dragging ? (t.preventDefault(), null != (n = this.delegate) && n.inputControllerWillMoveText(), null != (i = this.responder) && i.moveTextFromRange(this.dragging.range), this.dragging = null, this.scheduleRender()) : c(t) ? (t.preventDefault(), e = d(t), null != (o = this.responder) && o.setLocationRangeFromPointRange(e), this.attachFiles(t.dataTransfer.files)) : void 0;\n },\n dragend: function dragend() {\n var t;\n return this.dragging ? (null != (t = this.responder) && t.setSelectedRange(this.dragging.range), this.dragging = null) : void 0;\n },\n compositionend: function compositionend() {\n return this.composing ? (this.composing = !1, this.scheduleRender()) : void 0;\n }\n }, u.prototype.keys = {\n ArrowLeft: function ArrowLeft() {\n var t, e;\n return (null != (t = this.responder) ? t.shouldManageMovingCursorInDirection(\"backward\") : void 0) ? (this.event.preventDefault(), null != (e = this.responder) ? e.moveCursorInDirection(\"backward\") : void 0) : void 0;\n },\n ArrowRight: function ArrowRight() {\n var t, e;\n return (null != (t = this.responder) ? t.shouldManageMovingCursorInDirection(\"forward\") : void 0) ? (this.event.preventDefault(), null != (e = this.responder) ? e.moveCursorInDirection(\"forward\") : void 0) : void 0;\n },\n Backspace: function Backspace() {\n var t, e, n;\n return (null != (t = this.responder) ? t.shouldManageDeletingInDirection(\"backward\") : void 0) ? (this.event.preventDefault(), null != (e = this.delegate) && e.inputControllerWillPerformTyping(), null != (n = this.responder) && n.deleteInDirection(\"backward\"), this.render()) : void 0;\n },\n Tab: function Tab() {\n var t, e;\n return (null != (t = this.responder) ? t.canIncreaseNestingLevel() : void 0) ? (this.event.preventDefault(), null != (e = this.responder) && e.increaseNestingLevel(), this.render()) : void 0;\n },\n \"Tab+Shift\": function TabShift() {\n var t, e;\n return (null != (t = this.responder) ? t.canDecreaseNestingLevel() : void 0) ? (this.event.preventDefault(), null != (e = this.responder) && e.decreaseNestingLevel(), this.render()) : void 0;\n }\n }, u.prototype.inputTypes = {\n deleteByComposition: function deleteByComposition() {\n return this.deleteInDirection(\"backward\", {\n recordUndoEntry: !1\n });\n },\n deleteByCut: function deleteByCut() {\n return this.deleteInDirection(\"backward\");\n },\n deleteByDrag: function deleteByDrag() {\n return this.event.preventDefault(), this.withTargetDOMRange(function () {\n var t;\n return this.deleteByDragRange = null != (t = this.responder) ? t.getSelectedRange() : void 0;\n });\n },\n deleteCompositionText: function deleteCompositionText() {\n return this.deleteInDirection(\"backward\", {\n recordUndoEntry: !1\n });\n },\n deleteContent: function deleteContent() {\n return this.deleteInDirection(\"backward\");\n },\n deleteContentBackward: function deleteContentBackward() {\n return this.deleteInDirection(\"backward\");\n },\n deleteContentForward: function deleteContentForward() {\n return this.deleteInDirection(\"forward\");\n },\n deleteEntireSoftLine: function deleteEntireSoftLine() {\n return this.deleteInDirection(\"forward\");\n },\n deleteHardLineBackward: function deleteHardLineBackward() {\n return this.deleteInDirection(\"backward\");\n },\n deleteHardLineForward: function deleteHardLineForward() {\n return this.deleteInDirection(\"forward\");\n },\n deleteSoftLineBackward: function deleteSoftLineBackward() {\n return this.deleteInDirection(\"backward\");\n },\n deleteSoftLineForward: function deleteSoftLineForward() {\n return this.deleteInDirection(\"forward\");\n },\n deleteWordBackward: function deleteWordBackward() {\n return this.deleteInDirection(\"backward\");\n },\n deleteWordForward: function deleteWordForward() {\n return this.deleteInDirection(\"forward\");\n },\n formatBackColor: function formatBackColor() {\n return this.activateAttributeIfSupported(\"backgroundColor\", this.event.data);\n },\n formatBold: function formatBold() {\n return this.toggleAttributeIfSupported(\"bold\");\n },\n formatFontColor: function formatFontColor() {\n return this.activateAttributeIfSupported(\"color\", this.event.data);\n },\n formatFontName: function formatFontName() {\n return this.activateAttributeIfSupported(\"font\", this.event.data);\n },\n formatIndent: function formatIndent() {\n var t;\n return (null != (t = this.responder) ? t.canIncreaseNestingLevel() : void 0) ? this.withTargetDOMRange(function () {\n var t;\n return null != (t = this.responder) ? t.increaseNestingLevel() : void 0;\n }) : void 0;\n },\n formatItalic: function formatItalic() {\n return this.toggleAttributeIfSupported(\"italic\");\n },\n formatJustifyCenter: function formatJustifyCenter() {\n return this.toggleAttributeIfSupported(\"justifyCenter\");\n },\n formatJustifyFull: function formatJustifyFull() {\n return this.toggleAttributeIfSupported(\"justifyFull\");\n },\n formatJustifyLeft: function formatJustifyLeft() {\n return this.toggleAttributeIfSupported(\"justifyLeft\");\n },\n formatJustifyRight: function formatJustifyRight() {\n return this.toggleAttributeIfSupported(\"justifyRight\");\n },\n formatOutdent: function formatOutdent() {\n var t;\n return (null != (t = this.responder) ? t.canDecreaseNestingLevel() : void 0) ? this.withTargetDOMRange(function () {\n var t;\n return null != (t = this.responder) ? t.decreaseNestingLevel() : void 0;\n }) : void 0;\n },\n formatRemove: function formatRemove() {\n return this.withTargetDOMRange(function () {\n var t, e, n, i;\n i = [];\n\n for (t in null != (e = this.responder) ? e.getCurrentAttributes() : void 0) {\n i.push(null != (n = this.responder) ? n.removeCurrentAttribute(t) : void 0);\n }\n\n return i;\n });\n },\n formatSetBlockTextDirection: function formatSetBlockTextDirection() {\n return this.activateAttributeIfSupported(\"blockDir\", this.event.data);\n },\n formatSetInlineTextDirection: function formatSetInlineTextDirection() {\n return this.activateAttributeIfSupported(\"textDir\", this.event.data);\n },\n formatStrikeThrough: function formatStrikeThrough() {\n return this.toggleAttributeIfSupported(\"strike\");\n },\n formatSubscript: function formatSubscript() {\n return this.toggleAttributeIfSupported(\"sub\");\n },\n formatSuperscript: function formatSuperscript() {\n return this.toggleAttributeIfSupported(\"sup\");\n },\n formatUnderline: function formatUnderline() {\n return this.toggleAttributeIfSupported(\"underline\");\n },\n historyRedo: function historyRedo() {\n var t;\n return null != (t = this.delegate) ? t.inputControllerWillPerformRedo() : void 0;\n },\n historyUndo: function historyUndo() {\n var t;\n return null != (t = this.delegate) ? t.inputControllerWillPerformUndo() : void 0;\n },\n insertCompositionText: function insertCompositionText() {\n return this.composing = !0, this.insertString(this.event.data);\n },\n insertFromComposition: function insertFromComposition() {\n return this.composing = !1, this.insertString(this.event.data);\n },\n insertFromDrop: function insertFromDrop() {\n var t, e;\n return (t = this.deleteByDragRange) ? (this.deleteByDragRange = null, null != (e = this.delegate) && e.inputControllerWillMoveText(), this.withTargetDOMRange(function () {\n var e;\n return null != (e = this.responder) ? e.moveTextFromRange(t) : void 0;\n })) : void 0;\n },\n insertFromPaste: function insertFromPaste() {\n var n, i, o, r, s, a, u, c, l, h;\n return n = this.event.dataTransfer, s = {\n dataTransfer: n\n }, (i = n.getData(\"URL\")) ? (s.type = \"URL\", s.href = i, s.string = (r = n.getData(\"public.url-name\")) ? e.squishBreakableWhitespace(r).trim() : i, null != (a = this.delegate) && a.inputControllerWillPaste(s), this.withTargetDOMRange(function () {\n var t;\n return null != (t = this.responder) ? t.insertText(e.Text.textForStringWithAttributes(s.string, {\n href: s.href\n })) : void 0;\n }), this.afterRender = function (t) {\n return function () {\n var e;\n return null != (e = t.delegate) ? e.inputControllerDidPaste(s) : void 0;\n };\n }(this)) : t(n) ? (s.type = \"text/plain\", s.string = n.getData(\"text/plain\"), null != (u = this.delegate) && u.inputControllerWillPaste(s), this.withTargetDOMRange(function () {\n var t;\n return null != (t = this.responder) ? t.insertString(s.string) : void 0;\n }), this.afterRender = function (t) {\n return function () {\n var e;\n return null != (e = t.delegate) ? e.inputControllerDidPaste(s) : void 0;\n };\n }(this)) : (o = n.getData(\"text/html\")) ? (s.type = \"text/html\", s.html = o, null != (c = this.delegate) && c.inputControllerWillPaste(s), this.withTargetDOMRange(function () {\n var t;\n return null != (t = this.responder) ? t.insertHTML(s.html) : void 0;\n }), this.afterRender = function (t) {\n return function () {\n var e;\n return null != (e = t.delegate) ? e.inputControllerDidPaste(s) : void 0;\n };\n }(this)) : (null != (l = n.files) ? l.length : void 0) ? (s.type = \"File\", s.file = n.files[0], null != (h = this.delegate) && h.inputControllerWillPaste(s), this.withTargetDOMRange(function () {\n var t;\n return null != (t = this.responder) ? t.insertFile(s.file) : void 0;\n }), this.afterRender = function (t) {\n return function () {\n var e;\n return null != (e = t.delegate) ? e.inputControllerDidPaste(s) : void 0;\n };\n }(this)) : void 0;\n },\n insertFromYank: function insertFromYank() {\n return this.insertString(this.event.data);\n },\n insertLineBreak: function insertLineBreak() {\n return this.insertString(\"\\n\");\n },\n insertLink: function insertLink() {\n return this.activateAttributeIfSupported(\"href\", this.event.data);\n },\n insertOrderedList: function insertOrderedList() {\n return this.toggleAttributeIfSupported(\"number\");\n },\n insertParagraph: function insertParagraph() {\n var t;\n return null != (t = this.delegate) && t.inputControllerWillPerformTyping(), this.withTargetDOMRange(function () {\n var t;\n return null != (t = this.responder) ? t.insertLineBreak() : void 0;\n });\n },\n insertReplacementText: function insertReplacementText() {\n return this.insertString(this.event.dataTransfer.getData(\"text/plain\"), {\n updatePosition: !1\n });\n },\n insertText: function insertText() {\n var t, e;\n return this.insertString(null != (t = this.event.data) ? t : null != (e = this.event.dataTransfer) ? e.getData(\"text/plain\") : void 0);\n },\n insertTranspose: function insertTranspose() {\n return this.insertString(this.event.data);\n },\n insertUnorderedList: function insertUnorderedList() {\n return this.toggleAttributeIfSupported(\"bullet\");\n }\n }, u.prototype.insertString = function (t, e) {\n var n;\n return null == t && (t = \"\"), null != (n = this.delegate) && n.inputControllerWillPerformTyping(), this.withTargetDOMRange(function () {\n var n;\n return null != (n = this.responder) ? n.insertString(t, e) : void 0;\n });\n }, u.prototype.toggleAttributeIfSupported = function (t) {\n var n;\n return a.call(e.getAllAttributeNames(), t) >= 0 ? (null != (n = this.delegate) && n.inputControllerWillPerformFormatting(t), this.withTargetDOMRange(function () {\n var e;\n return null != (e = this.responder) ? e.toggleCurrentAttribute(t) : void 0;\n })) : void 0;\n }, u.prototype.activateAttributeIfSupported = function (t, n) {\n var i;\n return a.call(e.getAllAttributeNames(), t) >= 0 ? (null != (i = this.delegate) && i.inputControllerWillPerformFormatting(t), this.withTargetDOMRange(function () {\n var e;\n return null != (e = this.responder) ? e.setCurrentAttribute(t, n) : void 0;\n })) : void 0;\n }, u.prototype.deleteInDirection = function (t, e) {\n var n, i, o, r;\n return o = (null != e ? e : {\n recordUndoEntry: !0\n }).recordUndoEntry, o && null != (r = this.delegate) && r.inputControllerWillPerformTyping(), i = function (e) {\n return function () {\n var n;\n return null != (n = e.responder) ? n.deleteInDirection(t) : void 0;\n };\n }(this), (n = this.getTargetDOMRange({\n minLength: 2\n })) ? this.withTargetDOMRange(n, i) : i();\n }, u.prototype.withTargetDOMRange = function (t, n) {\n var i;\n return \"function\" == typeof t && (n = t, t = this.getTargetDOMRange()), t ? null != (i = this.responder) ? i.withTargetDOMRange(t, n.bind(this)) : void 0 : (e.selectionChangeObserver.reset(), n.call(this));\n }, u.prototype.getTargetDOMRange = function (t) {\n var e, n, i, o;\n return i = (null != t ? t : {\n minLength: 0\n }).minLength, (o = \"function\" == typeof (e = this.event).getTargetRanges ? e.getTargetRanges() : void 0) && o.length && (n = f(o[0]), 0 === i || n.toString().length >= i) ? n : void 0;\n }, f = function f(t) {\n var e;\n return e = document.createRange(), e.setStart(t.startContainer, t.startOffset), e.setEnd(t.endContainer, t.endOffset), e;\n }, u.prototype.withEvent = function (t, e) {\n var n;\n this.event = t;\n\n try {\n n = e.call(this);\n } finally {\n this.event = null;\n }\n\n return n;\n }, c = function c(t) {\n var e, n;\n return a.call(null != (e = null != (n = t.dataTransfer) ? n.types : void 0) ? e : [], \"Files\") >= 0;\n }, h = function h(t) {\n var e;\n return (e = t.clipboardData) ? a.call(e.types, \"Files\") >= 0 && 1 === e.types.length && e.files.length >= 1 : void 0;\n }, p = function p(t) {\n var e;\n return (e = t.clipboardData) ? a.call(e.types, \"text/plain\") >= 0 && 1 === e.types.length : void 0;\n }, l = function l(t) {\n var e;\n return e = [], t.altKey && e.push(\"alt\"), t.shiftKey && e.push(\"shift\"), e.push(t.key), e;\n }, d = function d(t) {\n return {\n x: t.clientX,\n y: t.clientY\n };\n }, u;\n }(e.InputController);\n }.call(this), function () {\n var t,\n n,\n i,\n o,\n r,\n s,\n a,\n u,\n c,\n l = function l(t, e) {\n return function () {\n return t.apply(e, arguments);\n };\n },\n h = function h(t, e) {\n function n() {\n this.constructor = t;\n }\n\n for (var i in e) {\n p.call(e, i) && (t[i] = e[i]);\n }\n\n return n.prototype = e.prototype, t.prototype = new n(), t.__super__ = e.prototype, t;\n },\n p = {}.hasOwnProperty;\n\n n = e.defer, i = e.escapeHTML, o = e.handleEvent, a = e.makeElement, c = e.tagName, u = e.config, s = u.lang, t = u.css, r = u.keyNames, e.AttachmentEditorController = function (u) {\n function p(t, e, n, i) {\n this.attachmentPiece = t, this.element = e, this.container = n, this.options = null != i ? i : {}, this.didBlurCaption = l(this.didBlurCaption, this), this.didChangeCaption = l(this.didChangeCaption, this), this.didInputCaption = l(this.didInputCaption, this), this.didKeyDownCaption = l(this.didKeyDownCaption, this), this.didClickActionButton = l(this.didClickActionButton, this), this.didClickToolbar = l(this.didClickToolbar, this), this.attachment = this.attachmentPiece.attachment, \"a\" === c(this.element) && (this.element = this.element.firstChild), this.install();\n }\n\n var d;\n return h(p, u), d = function d(t) {\n return function () {\n var e;\n return e = t.apply(this, arguments), e[\"do\"](), null == this.undos && (this.undos = []), this.undos.push(e.undo);\n };\n }, p.prototype.install = function () {\n return this.makeElementMutable(), this.addToolbar(), this.attachment.isPreviewable() ? this.installCaptionEditor() : void 0;\n }, p.prototype.uninstall = function () {\n var t, e;\n\n for (this.savePendingCaption(); e = this.undos.pop();) {\n e();\n }\n\n return null != (t = this.delegate) ? t.didUninstallAttachmentEditor(this) : void 0;\n }, p.prototype.savePendingCaption = function () {\n var t, e, n;\n return null != this.pendingCaption ? (t = this.pendingCaption, this.pendingCaption = null, t ? null != (e = this.delegate) && \"function\" == typeof e.attachmentEditorDidRequestUpdatingAttributesForAttachment ? e.attachmentEditorDidRequestUpdatingAttributesForAttachment({\n caption: t\n }, this.attachment) : void 0 : null != (n = this.delegate) && \"function\" == typeof n.attachmentEditorDidRequestRemovingAttributeForAttachment ? n.attachmentEditorDidRequestRemovingAttributeForAttachment(\"caption\", this.attachment) : void 0) : void 0;\n }, p.prototype.makeElementMutable = d(function () {\n return {\n \"do\": function (t) {\n return function () {\n return t.element.dataset.trixMutable = !0;\n };\n }(this),\n undo: function (t) {\n return function () {\n return delete t.element.dataset.trixMutable;\n };\n }(this)\n };\n }), p.prototype.addToolbar = d(function () {\n var n, r, u;\n return n = a({\n tagName: \"div\",\n className: t.attachmentToolbar,\n data: {\n trixMutable: !0\n }\n }), n.innerHTML = '\\n \\n \\n \\n
\", this.attachment.isPreviewable() && (r = i(this.attachment.getFilename()), u = i(this.attachment.getFormattedFilesize()), n.innerHTML += '\\n \\n ' + r + '\\n ' + u + \"\\n \\n
\"), o(\"click\", {\n onElement: n,\n withCallback: this.didClickToolbar\n }), o(\"click\", {\n onElement: n,\n matchingSelector: \"[data-trix-action]\",\n withCallback: this.didClickActionButton\n }), {\n \"do\": function (t) {\n return function () {\n return t.element.appendChild(n);\n };\n }(this),\n undo: function () {\n return function () {\n return e.removeNode(n);\n };\n }(this)\n };\n }), p.prototype.installCaptionEditor = d(function () {\n var i, r, u, c, l;\n return c = a({\n tagName: \"textarea\",\n className: t.attachmentCaptionEditor,\n attributes: {\n placeholder: s.captionPlaceholder\n },\n data: {\n trixMutable: !0\n }\n }), c.value = this.attachmentPiece.getCaption(), l = c.cloneNode(), l.classList.add(\"trix-autoresize-clone\"), l.tabIndex = -1, i = function i() {\n return l.value = c.value, c.style.height = l.scrollHeight + \"px\";\n }, o(\"input\", {\n onElement: c,\n withCallback: i\n }), o(\"input\", {\n onElement: c,\n withCallback: this.didInputCaption\n }), o(\"keydown\", {\n onElement: c,\n withCallback: this.didKeyDownCaption\n }), o(\"change\", {\n onElement: c,\n withCallback: this.didChangeCaption\n }), o(\"blur\", {\n onElement: c,\n withCallback: this.didBlurCaption\n }), u = this.element.querySelector(\"figcaption\"), r = u.cloneNode(), {\n \"do\": function (e) {\n return function () {\n return u.style.display = \"none\", r.appendChild(c), r.appendChild(l), r.classList.add(t.attachmentCaption + \"--editing\"), u.parentElement.insertBefore(r, u), i(), e.options.editCaption ? n(function () {\n return c.focus();\n }) : void 0;\n };\n }(this),\n undo: function undo() {\n return e.removeNode(r), u.style.display = null;\n }\n };\n }), p.prototype.didClickToolbar = function (t) {\n return t.preventDefault(), t.stopPropagation();\n }, p.prototype.didClickActionButton = function (t) {\n var e, n;\n\n switch (e = t.target.getAttribute(\"data-trix-action\")) {\n case \"remove\":\n return null != (n = this.delegate) ? n.attachmentEditorDidRequestRemovalOfAttachment(this.attachment) : void 0;\n }\n }, p.prototype.didKeyDownCaption = function (t) {\n var e;\n return \"return\" === r[t.keyCode] ? (t.preventDefault(), this.savePendingCaption(), null != (e = this.delegate) && \"function\" == typeof e.attachmentEditorDidRequestDeselectingAttachment ? e.attachmentEditorDidRequestDeselectingAttachment(this.attachment) : void 0) : void 0;\n }, p.prototype.didInputCaption = function (t) {\n return this.pendingCaption = t.target.value.replace(/\\s/g, \" \").trim();\n }, p.prototype.didChangeCaption = function () {\n return this.savePendingCaption();\n }, p.prototype.didBlurCaption = function () {\n return this.savePendingCaption();\n }, p;\n }(e.BasicObject);\n }.call(this), function () {\n var t,\n n,\n i,\n o = function o(t, e) {\n function n() {\n this.constructor = t;\n }\n\n for (var i in e) {\n r.call(e, i) && (t[i] = e[i]);\n }\n\n return n.prototype = e.prototype, t.prototype = new n(), t.__super__ = e.prototype, t;\n },\n r = {}.hasOwnProperty;\n\n i = e.makeElement, t = e.config.css, e.AttachmentView = function (r) {\n function s() {\n s.__super__.constructor.apply(this, arguments), this.attachment = this.object, this.attachment.uploadProgressDelegate = this, this.attachmentPiece = this.options.piece;\n }\n\n var a;\n return o(s, r), s.attachmentSelector = \"[data-trix-attachment]\", s.prototype.createContentNodes = function () {\n return [];\n }, s.prototype.createNodes = function () {\n var e, n, o, r, s, u, c;\n if (e = r = i({\n tagName: \"figure\",\n className: this.getClassName(),\n data: this.getData(),\n editable: !1\n }), (n = this.getHref()) && (r = i({\n tagName: \"a\",\n editable: !1,\n attributes: {\n href: n,\n tabindex: -1\n }\n }), e.appendChild(r)), this.attachment.hasContent()) r.innerHTML = this.attachment.getContent();else for (c = this.createContentNodes(), o = 0, s = c.length; s > o; o++) {\n u = c[o], r.appendChild(u);\n }\n return r.appendChild(this.createCaptionElement()), this.attachment.isPending() && (this.progressElement = i({\n tagName: \"progress\",\n attributes: {\n \"class\": t.attachmentProgress,\n value: this.attachment.getUploadProgress(),\n max: 100\n },\n data: {\n trixMutable: !0,\n trixStoreKey: [\"progressElement\", this.attachment.id].join(\"/\")\n }\n }), e.appendChild(this.progressElement)), [a(\"left\"), e, a(\"right\")];\n }, s.prototype.createCaptionElement = function () {\n var e, n, o, r, s, a, u;\n return o = i({\n tagName: \"figcaption\",\n className: t.attachmentCaption\n }), (e = this.attachmentPiece.getCaption()) ? (o.classList.add(t.attachmentCaption + \"--edited\"), o.textContent = e) : (n = this.getCaptionConfig(), n.name && (r = this.attachment.getFilename()), n.size && (a = this.attachment.getFormattedFilesize()), r && (s = i({\n tagName: \"span\",\n className: t.attachmentName,\n textContent: r\n }), o.appendChild(s)), a && (r && o.appendChild(document.createTextNode(\" \")), u = i({\n tagName: \"span\",\n className: t.attachmentSize,\n textContent: a\n }), o.appendChild(u))), o;\n }, s.prototype.getClassName = function () {\n var e, n;\n return n = [t.attachment, t.attachment + \"--\" + this.attachment.getType()], (e = this.attachment.getExtension()) && n.push(t.attachment + \"--\" + e), n.join(\" \");\n }, s.prototype.getData = function () {\n var t, e;\n return e = {\n trixAttachment: JSON.stringify(this.attachment),\n trixContentType: this.attachment.getContentType(),\n trixId: this.attachment.id\n }, t = this.attachmentPiece.attributes, t.isEmpty() || (e.trixAttributes = JSON.stringify(t)), this.attachment.isPending() && (e.trixSerialize = !1), e;\n }, s.prototype.getHref = function () {\n return n(this.attachment.getContent(), \"a\") ? void 0 : this.attachment.getHref();\n }, s.prototype.getCaptionConfig = function () {\n var t, n, i;\n return i = this.attachment.getType(), t = e.copyObject(null != (n = e.config.attachments[i]) ? n.caption : void 0), \"file\" === i && (t.name = !0), t;\n }, s.prototype.findProgressElement = function () {\n var t;\n return null != (t = this.findElement()) ? t.querySelector(\"progress\") : void 0;\n }, a = function a(t) {\n return i({\n tagName: \"span\",\n textContent: e.ZERO_WIDTH_SPACE,\n data: {\n trixCursorTarget: t,\n trixSerialize: !1\n }\n });\n }, s.prototype.attachmentDidChangeUploadProgress = function () {\n var t, e;\n return e = this.attachment.getUploadProgress(), null != (t = this.findProgressElement()) ? t.value = e : void 0;\n }, s;\n }(e.ObjectView), n = function n(t, e) {\n var n;\n return n = i(\"div\"), n.innerHTML = null != t ? t : \"\", n.querySelector(e);\n };\n }.call(this), function () {\n var t,\n n = function n(t, e) {\n function n() {\n this.constructor = t;\n }\n\n for (var o in e) {\n i.call(e, o) && (t[o] = e[o]);\n }\n\n return n.prototype = e.prototype, t.prototype = new n(), t.__super__ = e.prototype, t;\n },\n i = {}.hasOwnProperty;\n\n t = e.makeElement, e.PreviewableAttachmentView = function (i) {\n function o() {\n o.__super__.constructor.apply(this, arguments), this.attachment.previewDelegate = this;\n }\n\n return n(o, i), o.prototype.createContentNodes = function () {\n return this.image = t({\n tagName: \"img\",\n attributes: {\n src: \"\"\n },\n data: {\n trixMutable: !0\n }\n }), this.refresh(this.image), [this.image];\n }, o.prototype.createCaptionElement = function () {\n var t;\n return t = o.__super__.createCaptionElement.apply(this, arguments), t.textContent || t.setAttribute(\"data-trix-placeholder\", e.config.lang.captionPlaceholder), t;\n }, o.prototype.refresh = function (t) {\n var e;\n return null == t && (t = null != (e = this.findElement()) ? e.querySelector(\"img\") : void 0), t ? this.updateAttributesForImage(t) : void 0;\n }, o.prototype.updateAttributesForImage = function (t) {\n var e, n, i, o, r, s;\n return r = this.attachment.getURL(), n = this.attachment.getPreviewURL(), t.src = n || r, n === r ? t.removeAttribute(\"data-trix-serialized-attributes\") : (i = JSON.stringify({\n src: r\n }), t.setAttribute(\"data-trix-serialized-attributes\", i)), s = this.attachment.getWidth(), e = this.attachment.getHeight(), null != s && (t.width = s), null != e && (t.height = e), o = [\"imageElement\", this.attachment.id, t.src, t.width, t.height].join(\"/\"), t.dataset.trixStoreKey = o;\n }, o.prototype.attachmentDidChangeAttributes = function () {\n return this.refresh(this.image), this.refresh();\n }, o;\n }(e.AttachmentView);\n }.call(this), function () {\n var t,\n n,\n i,\n o = function o(t, e) {\n function n() {\n this.constructor = t;\n }\n\n for (var i in e) {\n r.call(e, i) && (t[i] = e[i]);\n }\n\n return n.prototype = e.prototype, t.prototype = new n(), t.__super__ = e.prototype, t;\n },\n r = {}.hasOwnProperty;\n\n i = e.makeElement, t = e.findInnerElement, n = e.getTextConfig, e.PieceView = function (r) {\n function s() {\n var t;\n s.__super__.constructor.apply(this, arguments), this.piece = this.object, this.attributes = this.piece.getAttributes(), t = this.options, this.textConfig = t.textConfig, this.context = t.context, this.piece.attachment ? this.attachment = this.piece.attachment : this.string = this.piece.toString();\n }\n\n var a;\n return o(s, r), s.prototype.createNodes = function () {\n var e, n, i, o, r, s;\n\n if (s = this.attachment ? this.createAttachmentNodes() : this.createStringNodes(), e = this.createElement()) {\n for (i = t(e), n = 0, o = s.length; o > n; n++) {\n r = s[n], i.appendChild(r);\n }\n\n s = [e];\n }\n\n return s;\n }, s.prototype.createAttachmentNodes = function () {\n var t, n;\n return t = this.attachment.isPreviewable() ? e.PreviewableAttachmentView : e.AttachmentView, n = this.createChildView(t, this.piece.attachment, {\n piece: this.piece\n }), n.getNodes();\n }, s.prototype.createStringNodes = function () {\n var t, e, n, o, r, s, a, u, c, l;\n if (null != (u = this.textConfig) ? u.plaintext : void 0) return [document.createTextNode(this.string)];\n\n for (a = [], c = this.string.split(\"\\n\"), n = e = 0, o = c.length; o > e; n = ++e) {\n l = c[n], n > 0 && (t = i(\"br\"), a.push(t)), (r = l.length) && (s = document.createTextNode(this.preserveSpaces(l)), a.push(s));\n }\n\n return a;\n }, s.prototype.createElement = function () {\n var t, e, o, r, s, a, u, c, l;\n c = {}, a = this.attributes;\n\n for (r in a) {\n if (l = a[r], (t = n(r)) && (t.tagName && (s = i(t.tagName), o ? (o.appendChild(s), o = s) : e = o = s), t.styleProperty && (c[t.styleProperty] = l), t.style)) {\n u = t.style;\n\n for (r in u) {\n l = u[r], c[r] = l;\n }\n }\n }\n\n if (Object.keys(c).length) {\n null == e && (e = i(\"span\"));\n\n for (r in c) {\n l = c[r], e.style[r] = l;\n }\n }\n\n return e;\n }, s.prototype.createContainerElement = function () {\n var t, e, o, r, s;\n r = this.attributes;\n\n for (o in r) {\n if (s = r[o], (e = n(o)) && e.groupTagName) return t = {}, t[o] = s, i(e.groupTagName, t);\n }\n }, a = e.NON_BREAKING_SPACE, s.prototype.preserveSpaces = function (t) {\n return this.context.isLast && (t = t.replace(/\\ $/, a)), t = t.replace(/(\\S)\\ {3}(\\S)/g, \"$1 \" + a + \" $2\").replace(/\\ {2}/g, a + \" \").replace(/\\ {2}/g, \" \" + a), (this.context.isFirst || this.context.followsWhitespace) && (t = t.replace(/^\\ /, a)), t;\n }, s;\n }(e.ObjectView);\n }.call(this), function () {\n var t = function t(_t11, e) {\n function i() {\n this.constructor = _t11;\n }\n\n for (var o in e) {\n n.call(e, o) && (_t11[o] = e[o]);\n }\n\n return i.prototype = e.prototype, _t11.prototype = new i(), _t11.__super__ = e.prototype, _t11;\n },\n n = {}.hasOwnProperty;\n\n e.TextView = function (n) {\n function i() {\n i.__super__.constructor.apply(this, arguments), this.text = this.object, this.textConfig = this.options.textConfig;\n }\n\n var o;\n return t(i, n), i.prototype.createNodes = function () {\n var t, n, i, r, s, a, u, c, l, h;\n\n for (a = [], c = e.ObjectGroup.groupObjects(this.getPieces()), r = c.length - 1, i = n = 0, s = c.length; s > n; i = ++n) {\n u = c[i], t = {}, 0 === i && (t.isFirst = !0), i === r && (t.isLast = !0), o(l) && (t.followsWhitespace = !0), h = this.findOrCreateCachedChildView(e.PieceView, u, {\n textConfig: this.textConfig,\n context: t\n }), a.push.apply(a, h.getNodes()), l = u;\n }\n\n return a;\n }, i.prototype.getPieces = function () {\n var t, e, n, i, o;\n\n for (i = this.text.getPieces(), o = [], t = 0, e = i.length; e > t; t++) {\n n = i[t], n.hasAttribute(\"blockBreak\") || o.push(n);\n }\n\n return o;\n }, o = function o(t) {\n return /\\s$/.test(null != t ? t.toString() : void 0);\n }, i;\n }(e.ObjectView);\n }.call(this), function () {\n var t,\n n,\n i,\n o = function o(t, e) {\n function n() {\n this.constructor = t;\n }\n\n for (var i in e) {\n r.call(e, i) && (t[i] = e[i]);\n }\n\n return n.prototype = e.prototype, t.prototype = new n(), t.__super__ = e.prototype, t;\n },\n r = {}.hasOwnProperty;\n\n i = e.makeElement, n = e.getBlockConfig, t = e.config.css, e.BlockView = function (r) {\n function s() {\n s.__super__.constructor.apply(this, arguments), this.block = this.object, this.attributes = this.block.getAttributes();\n }\n\n return o(s, r), s.prototype.createNodes = function () {\n var t, o, r, s, a, u, c, l, h;\n if (t = document.createComment(\"block\"), u = [t], this.block.isEmpty() ? u.push(i(\"br\")) : (l = null != (c = n(this.block.getLastAttribute())) ? c.text : void 0, h = this.findOrCreateCachedChildView(e.TextView, this.block.text, {\n textConfig: l\n }), u.push.apply(u, h.getNodes()), this.shouldAddExtraNewlineElement() && u.push(i(\"br\"))), this.attributes.length) return u;\n\n for (o = i(e.config.blockAttributes[\"default\"].tagName), r = 0, s = u.length; s > r; r++) {\n a = u[r], o.appendChild(a);\n }\n\n return [o];\n }, s.prototype.createContainerElement = function (e) {\n var o, r, s, a;\n return o = this.attributes[e], a = n(o).tagName, r = {\n tagName: a\n }, \"attachmentGallery\" === o && (s = this.block.getBlockBreakPosition(), r.className = t.attachmentGallery + \" \" + t.attachmentGallery + \"--\" + s), i(r);\n }, s.prototype.shouldAddExtraNewlineElement = function () {\n return /\\n\\n$/.test(this.block.toString());\n }, s;\n }(e.ObjectView);\n }.call(this), function () {\n var t,\n n,\n i = function i(t, e) {\n function n() {\n this.constructor = t;\n }\n\n for (var i in e) {\n o.call(e, i) && (t[i] = e[i]);\n }\n\n return n.prototype = e.prototype, t.prototype = new n(), t.__super__ = e.prototype, t;\n },\n o = {}.hasOwnProperty;\n\n t = e.defer, n = e.makeElement, e.DocumentView = function (o) {\n function r() {\n r.__super__.constructor.apply(this, arguments), this.element = this.options.element, this.elementStore = new e.ElementStore(), this.setDocument(this.object);\n }\n\n var s, a, u;\n return i(r, o), r.render = function (t) {\n var e, i;\n return e = n(\"div\"), i = new this(t, {\n element: e\n }), i.render(), i.sync(), e;\n }, r.prototype.setDocument = function (t) {\n return t.isEqualTo(this.document) ? void 0 : this.document = this.object = t;\n }, r.prototype.render = function () {\n var t, i, o, r, s, a, u;\n\n if (this.childViews = [], this.shadowElement = n(\"div\"), !this.document.isEmpty()) {\n for (s = e.ObjectGroup.groupObjects(this.document.getBlocks(), {\n asTree: !0\n }), a = [], t = 0, i = s.length; i > t; t++) {\n r = s[t], u = this.findOrCreateCachedChildView(e.BlockView, r), a.push(function () {\n var t, e, n, i;\n\n for (n = u.getNodes(), i = [], t = 0, e = n.length; e > t; t++) {\n o = n[t], i.push(this.shadowElement.appendChild(o));\n }\n\n return i;\n }.call(this));\n }\n\n return a;\n }\n }, r.prototype.isSynced = function () {\n return s(this.shadowElement, this.element);\n }, r.prototype.sync = function () {\n var t;\n\n for (t = this.createDocumentFragmentForSync(); this.element.lastChild;) {\n this.element.removeChild(this.element.lastChild);\n }\n\n return this.element.appendChild(t), this.didSync();\n }, r.prototype.didSync = function () {\n return this.elementStore.reset(a(this.element)), t(function (t) {\n return function () {\n return t.garbageCollectCachedViews();\n };\n }(this));\n }, r.prototype.createDocumentFragmentForSync = function () {\n var t, e, n, i, o, r, s, u, c, l;\n\n for (e = document.createDocumentFragment(), u = this.shadowElement.childNodes, n = 0, o = u.length; o > n; n++) {\n s = u[n], e.appendChild(s.cloneNode(!0));\n }\n\n for (c = a(e), i = 0, r = c.length; r > i; i++) {\n t = c[i], (l = this.elementStore.remove(t)) && t.parentNode.replaceChild(l, t);\n }\n\n return e;\n }, a = function a(t) {\n return t.querySelectorAll(\"[data-trix-store-key]\");\n }, s = function s(t, e) {\n return u(t.innerHTML) === u(e.innerHTML);\n }, u = function u(t) {\n return t.replace(/ /g, \" \");\n }, r;\n }(e.ObjectView);\n }.call(this), function () {\n var t,\n n,\n i,\n o,\n r,\n s = function s(t, e) {\n return function () {\n return t.apply(e, arguments);\n };\n },\n a = function a(t, e) {\n function n() {\n this.constructor = t;\n }\n\n for (var i in e) {\n u.call(e, i) && (t[i] = e[i]);\n }\n\n return n.prototype = e.prototype, t.prototype = new n(), t.__super__ = e.prototype, t;\n },\n u = {}.hasOwnProperty;\n\n i = e.findClosestElementFromNode, o = e.handleEvent, r = e.innerElementIsActive, n = e.defer, t = e.AttachmentView.attachmentSelector, e.CompositionController = function (u) {\n function c(n, i) {\n this.element = n, this.composition = i, this.didClickAttachment = s(this.didClickAttachment, this), this.didBlur = s(this.didBlur, this), this.didFocus = s(this.didFocus, this), this.documentView = new e.DocumentView(this.composition.document, {\n element: this.element\n }), o(\"focus\", {\n onElement: this.element,\n withCallback: this.didFocus\n }), o(\"blur\", {\n onElement: this.element,\n withCallback: this.didBlur\n }), o(\"click\", {\n onElement: this.element,\n matchingSelector: \"a[contenteditable=false]\",\n preventDefault: !0\n }), o(\"mousedown\", {\n onElement: this.element,\n matchingSelector: t,\n withCallback: this.didClickAttachment\n }), o(\"click\", {\n onElement: this.element,\n matchingSelector: \"a\" + t,\n preventDefault: !0\n });\n }\n\n return a(c, u), c.prototype.didFocus = function () {\n var t, e, n;\n return t = function (t) {\n return function () {\n var e;\n return t.focused ? void 0 : (t.focused = !0, null != (e = t.delegate) && \"function\" == typeof e.compositionControllerDidFocus ? e.compositionControllerDidFocus() : void 0);\n };\n }(this), null != (e = null != (n = this.blurPromise) ? n.then(t) : void 0) ? e : t();\n }, c.prototype.didBlur = function () {\n return this.blurPromise = new Promise(function (t) {\n return function (e) {\n return n(function () {\n var n;\n return r(t.element) || (t.focused = null, null != (n = t.delegate) && \"function\" == typeof n.compositionControllerDidBlur && n.compositionControllerDidBlur()), t.blurPromise = null, e();\n });\n };\n }(this));\n }, c.prototype.didClickAttachment = function (t, e) {\n var n, o, r;\n return n = this.findAttachmentForElement(e), o = null != i(t.target, {\n matchingSelector: \"figcaption\"\n }), null != (r = this.delegate) && \"function\" == typeof r.compositionControllerDidSelectAttachment ? r.compositionControllerDidSelectAttachment(n, {\n editCaption: o\n }) : void 0;\n }, c.prototype.getSerializableElement = function () {\n return this.isEditingAttachment() ? this.documentView.shadowElement : this.element;\n }, c.prototype.render = function () {\n var t, e, n;\n return this.revision !== this.composition.revision && (this.documentView.setDocument(this.composition.document), this.documentView.render(), this.revision = this.composition.revision), this.canSyncDocumentView() && !this.documentView.isSynced() && (null != (t = this.delegate) && \"function\" == typeof t.compositionControllerWillSyncDocumentView && t.compositionControllerWillSyncDocumentView(), this.documentView.sync(), null != (e = this.delegate) && \"function\" == typeof e.compositionControllerDidSyncDocumentView && e.compositionControllerDidSyncDocumentView()), null != (n = this.delegate) && \"function\" == typeof n.compositionControllerDidRender ? n.compositionControllerDidRender() : void 0;\n }, c.prototype.rerenderViewForObject = function (t) {\n return this.invalidateViewForObject(t), this.render();\n }, c.prototype.invalidateViewForObject = function (t) {\n return this.documentView.invalidateViewForObject(t);\n }, c.prototype.isViewCachingEnabled = function () {\n return this.documentView.isViewCachingEnabled();\n }, c.prototype.enableViewCaching = function () {\n return this.documentView.enableViewCaching();\n }, c.prototype.disableViewCaching = function () {\n return this.documentView.disableViewCaching();\n }, c.prototype.refreshViewCache = function () {\n return this.documentView.garbageCollectCachedViews();\n }, c.prototype.isEditingAttachment = function () {\n return null != this.attachmentEditor;\n }, c.prototype.installAttachmentEditorForAttachment = function (t, n) {\n var i, o, r;\n if ((null != (r = this.attachmentEditor) ? r.attachment : void 0) !== t && (o = this.documentView.findElementForObject(t))) return this.uninstallAttachmentEditor(), i = this.composition.document.getAttachmentPieceForAttachment(t), this.attachmentEditor = new e.AttachmentEditorController(i, o, this.element, n), this.attachmentEditor.delegate = this;\n }, c.prototype.uninstallAttachmentEditor = function () {\n var t;\n return null != (t = this.attachmentEditor) ? t.uninstall() : void 0;\n }, c.prototype.didUninstallAttachmentEditor = function () {\n return this.attachmentEditor = null, this.render();\n }, c.prototype.attachmentEditorDidRequestUpdatingAttributesForAttachment = function (t, e) {\n var n;\n return null != (n = this.delegate) && \"function\" == typeof n.compositionControllerWillUpdateAttachment && n.compositionControllerWillUpdateAttachment(e), this.composition.updateAttributesForAttachment(t, e);\n }, c.prototype.attachmentEditorDidRequestRemovingAttributeForAttachment = function (t, e) {\n var n;\n return null != (n = this.delegate) && \"function\" == typeof n.compositionControllerWillUpdateAttachment && n.compositionControllerWillUpdateAttachment(e), this.composition.removeAttributeForAttachment(t, e);\n }, c.prototype.attachmentEditorDidRequestRemovalOfAttachment = function (t) {\n var e;\n return null != (e = this.delegate) && \"function\" == typeof e.compositionControllerDidRequestRemovalOfAttachment ? e.compositionControllerDidRequestRemovalOfAttachment(t) : void 0;\n }, c.prototype.attachmentEditorDidRequestDeselectingAttachment = function (t) {\n var e;\n return null != (e = this.delegate) && \"function\" == typeof e.compositionControllerDidRequestDeselectingAttachment ? e.compositionControllerDidRequestDeselectingAttachment(t) : void 0;\n }, c.prototype.canSyncDocumentView = function () {\n return !this.isEditingAttachment();\n }, c.prototype.findAttachmentForElement = function (t) {\n return this.composition.document.getAttachmentById(parseInt(t.dataset.trixId, 10));\n }, c;\n }(e.BasicObject);\n }.call(this), function () {\n var t,\n n,\n i,\n o = function o(t, e) {\n return function () {\n return t.apply(e, arguments);\n };\n },\n r = function r(t, e) {\n function n() {\n this.constructor = t;\n }\n\n for (var i in e) {\n s.call(e, i) && (t[i] = e[i]);\n }\n\n return n.prototype = e.prototype, t.prototype = new n(), t.__super__ = e.prototype, t;\n },\n s = {}.hasOwnProperty;\n\n n = e.handleEvent, i = e.triggerEvent, t = e.findClosestElementFromNode, e.ToolbarController = function (e) {\n function s(t) {\n this.element = t, this.didKeyDownDialogInput = o(this.didKeyDownDialogInput, this), this.didClickDialogButton = o(this.didClickDialogButton, this), this.didClickAttributeButton = o(this.didClickAttributeButton, this), this.didClickActionButton = o(this.didClickActionButton, this), this.attributes = {}, this.actions = {}, this.resetDialogInputs(), n(\"mousedown\", {\n onElement: this.element,\n matchingSelector: a,\n withCallback: this.didClickActionButton\n }), n(\"mousedown\", {\n onElement: this.element,\n matchingSelector: c,\n withCallback: this.didClickAttributeButton\n }), n(\"click\", {\n onElement: this.element,\n matchingSelector: v,\n preventDefault: !0\n }), n(\"click\", {\n onElement: this.element,\n matchingSelector: l,\n withCallback: this.didClickDialogButton\n }), n(\"keydown\", {\n onElement: this.element,\n matchingSelector: h,\n withCallback: this.didKeyDownDialogInput\n });\n }\n\n var a, u, c, l, h, p, d, f, g, m, v;\n return r(s, e), c = \"[data-trix-attribute]\", a = \"[data-trix-action]\", v = c + \", \" + a, p = \"[data-trix-dialog]\", u = p + \"[data-trix-active]\", l = p + \" [data-trix-method]\", h = p + \" [data-trix-input]\", s.prototype.didClickActionButton = function (t, e) {\n var n, i, o;\n return null != (i = this.delegate) && i.toolbarDidClickButton(), t.preventDefault(), n = d(e), this.getDialog(n) ? this.toggleDialog(n) : null != (o = this.delegate) ? o.toolbarDidInvokeAction(n) : void 0;\n }, s.prototype.didClickAttributeButton = function (t, e) {\n var n, i, o;\n return null != (i = this.delegate) && i.toolbarDidClickButton(), t.preventDefault(), n = f(e), this.getDialog(n) ? this.toggleDialog(n) : null != (o = this.delegate) && o.toolbarDidToggleAttribute(n), this.refreshAttributeButtons();\n }, s.prototype.didClickDialogButton = function (e, n) {\n var i, o;\n return i = t(n, {\n matchingSelector: p\n }), o = n.getAttribute(\"data-trix-method\"), this[o].call(this, i);\n }, s.prototype.didKeyDownDialogInput = function (t, e) {\n var n, i;\n return 13 === t.keyCode && (t.preventDefault(), n = e.getAttribute(\"name\"), i = this.getDialog(n), this.setAttribute(i)), 27 === t.keyCode ? (t.preventDefault(), this.hideDialog()) : void 0;\n }, s.prototype.updateActions = function (t) {\n return this.actions = t, this.refreshActionButtons();\n }, s.prototype.refreshActionButtons = function () {\n return this.eachActionButton(function (t) {\n return function (e, n) {\n return e.disabled = t.actions[n] === !1;\n };\n }(this));\n }, s.prototype.eachActionButton = function (t) {\n var e, n, i, o, r;\n\n for (o = this.element.querySelectorAll(a), r = [], n = 0, i = o.length; i > n; n++) {\n e = o[n], r.push(t(e, d(e)));\n }\n\n return r;\n }, s.prototype.updateAttributes = function (t) {\n return this.attributes = t, this.refreshAttributeButtons();\n }, s.prototype.refreshAttributeButtons = function () {\n return this.eachAttributeButton(function (t) {\n return function (e, n) {\n return e.disabled = t.attributes[n] === !1, t.attributes[n] || t.dialogIsVisible(n) ? (e.setAttribute(\"data-trix-active\", \"\"), e.classList.add(\"trix-active\")) : (e.removeAttribute(\"data-trix-active\"), e.classList.remove(\"trix-active\"));\n };\n }(this));\n }, s.prototype.eachAttributeButton = function (t) {\n var e, n, i, o, r;\n\n for (o = this.element.querySelectorAll(c), r = [], n = 0, i = o.length; i > n; n++) {\n e = o[n], r.push(t(e, f(e)));\n }\n\n return r;\n }, s.prototype.applyKeyboardCommand = function (t) {\n var e, n, o, r, s, a, u;\n\n for (s = JSON.stringify(t.sort()), u = this.element.querySelectorAll(\"[data-trix-key]\"), r = 0, a = u.length; a > r; r++) {\n if (e = u[r], o = e.getAttribute(\"data-trix-key\").split(\"+\"), n = JSON.stringify(o.sort()), n === s) return i(\"mousedown\", {\n onElement: e\n }), !0;\n }\n\n return !1;\n }, s.prototype.dialogIsVisible = function (t) {\n var e;\n return (e = this.getDialog(t)) ? e.hasAttribute(\"data-trix-active\") : void 0;\n }, s.prototype.toggleDialog = function (t) {\n return this.dialogIsVisible(t) ? this.hideDialog() : this.showDialog(t);\n }, s.prototype.showDialog = function (t) {\n var e, n, i, o, r, s, a, u, c, l;\n\n for (this.hideDialog(), null != (a = this.delegate) && a.toolbarWillShowDialog(), i = this.getDialog(t), i.setAttribute(\"data-trix-active\", \"\"), i.classList.add(\"trix-active\"), u = i.querySelectorAll(\"input[disabled]\"), o = 0, s = u.length; s > o; o++) {\n n = u[o], n.removeAttribute(\"disabled\");\n }\n\n return (e = f(i)) && (r = m(i, t)) && (r.value = null != (c = this.attributes[e]) ? c : \"\", r.select()), null != (l = this.delegate) ? l.toolbarDidShowDialog(t) : void 0;\n }, s.prototype.setAttribute = function (t) {\n var e, n, i;\n return e = f(t), n = m(t, e), n.willValidate && !n.checkValidity() ? (n.setAttribute(\"data-trix-validate\", \"\"), n.classList.add(\"trix-validate\"), n.focus()) : (null != (i = this.delegate) && i.toolbarDidUpdateAttribute(e, n.value), this.hideDialog());\n }, s.prototype.removeAttribute = function (t) {\n var e, n;\n return e = f(t), null != (n = this.delegate) && n.toolbarDidRemoveAttribute(e), this.hideDialog();\n }, s.prototype.hideDialog = function () {\n var t, e;\n return (t = this.element.querySelector(u)) ? (t.removeAttribute(\"data-trix-active\"), t.classList.remove(\"trix-active\"), this.resetDialogInputs(), null != (e = this.delegate) ? e.toolbarDidHideDialog(g(t)) : void 0) : void 0;\n }, s.prototype.resetDialogInputs = function () {\n var t, e, n, i, o;\n\n for (i = this.element.querySelectorAll(h), o = [], t = 0, n = i.length; n > t; t++) {\n e = i[t], e.setAttribute(\"disabled\", \"disabled\"), e.removeAttribute(\"data-trix-validate\"), o.push(e.classList.remove(\"trix-validate\"));\n }\n\n return o;\n }, s.prototype.getDialog = function (t) {\n return this.element.querySelector(\"[data-trix-dialog=\" + t + \"]\");\n }, m = function m(t, e) {\n return null == e && (e = f(t)), t.querySelector(\"[data-trix-input][name='\" + e + \"']\");\n }, d = function d(t) {\n return t.getAttribute(\"data-trix-action\");\n }, f = function f(t) {\n var e;\n return null != (e = t.getAttribute(\"data-trix-attribute\")) ? e : t.getAttribute(\"data-trix-dialog-attribute\");\n }, g = function g(t) {\n return t.getAttribute(\"data-trix-dialog\");\n }, s;\n }(e.BasicObject);\n }.call(this), function () {\n var t = function t(_t12, e) {\n function i() {\n this.constructor = _t12;\n }\n\n for (var o in e) {\n n.call(e, o) && (_t12[o] = e[o]);\n }\n\n return i.prototype = e.prototype, _t12.prototype = new i(), _t12.__super__ = e.prototype, _t12;\n },\n n = {}.hasOwnProperty;\n\n e.ImagePreloadOperation = function (e) {\n function n(t) {\n this.url = t;\n }\n\n return t(n, e), n.prototype.perform = function (t) {\n var e;\n return e = new Image(), e.onload = function (n) {\n return function () {\n return e.width = n.width = e.naturalWidth, e.height = n.height = e.naturalHeight, t(!0, e);\n };\n }(this), e.onerror = function () {\n return t(!1);\n }, e.src = this.url;\n }, n;\n }(e.Operation);\n }.call(this), function () {\n var t = function t(_t13, e) {\n return function () {\n return _t13.apply(e, arguments);\n };\n },\n n = function n(t, e) {\n function n() {\n this.constructor = t;\n }\n\n for (var o in e) {\n i.call(e, o) && (t[o] = e[o]);\n }\n\n return n.prototype = e.prototype, t.prototype = new n(), t.__super__ = e.prototype, t;\n },\n i = {}.hasOwnProperty;\n\n e.Attachment = function (i) {\n function o(n) {\n null == n && (n = {}), this.releaseFile = t(this.releaseFile, this), o.__super__.constructor.apply(this, arguments), this.attributes = e.Hash.box(n), this.didChangeAttributes();\n }\n\n return n(o, i), o.previewablePattern = /^image(\\/(gif|png|jpe?g)|$)/, o.attachmentForFile = function (t) {\n var e, n;\n return n = this.attributesForFile(t), e = new this(n), e.setFile(t), e;\n }, o.attributesForFile = function (t) {\n return new e.Hash({\n filename: t.name,\n filesize: t.size,\n contentType: t.type\n });\n }, o.fromJSON = function (t) {\n return new this(t);\n }, o.prototype.getAttribute = function (t) {\n return this.attributes.get(t);\n }, o.prototype.hasAttribute = function (t) {\n return this.attributes.has(t);\n }, o.prototype.getAttributes = function () {\n return this.attributes.toObject();\n }, o.prototype.setAttributes = function (t) {\n var e, n, i;\n return null == t && (t = {}), e = this.attributes.merge(t), this.attributes.isEqualTo(e) ? void 0 : (this.attributes = e, this.didChangeAttributes(), null != (n = this.previewDelegate) && \"function\" == typeof n.attachmentDidChangeAttributes && n.attachmentDidChangeAttributes(this), null != (i = this.delegate) && \"function\" == typeof i.attachmentDidChangeAttributes ? i.attachmentDidChangeAttributes(this) : void 0);\n }, o.prototype.didChangeAttributes = function () {\n return this.isPreviewable() ? this.preloadURL() : void 0;\n }, o.prototype.isPending = function () {\n return null != this.file && !(this.getURL() || this.getHref());\n }, o.prototype.isPreviewable = function () {\n return this.attributes.has(\"previewable\") ? this.attributes.get(\"previewable\") : this.constructor.previewablePattern.test(this.getContentType());\n }, o.prototype.getType = function () {\n return this.hasContent() ? \"content\" : this.isPreviewable() ? \"preview\" : \"file\";\n }, o.prototype.getURL = function () {\n return this.attributes.get(\"url\");\n }, o.prototype.getHref = function () {\n return this.attributes.get(\"href\");\n }, o.prototype.getFilename = function () {\n var t;\n return null != (t = this.attributes.get(\"filename\")) ? t : \"\";\n }, o.prototype.getFilesize = function () {\n return this.attributes.get(\"filesize\");\n }, o.prototype.getFormattedFilesize = function () {\n var t;\n return t = this.attributes.get(\"filesize\"), \"number\" == typeof t ? e.config.fileSize.formatter(t) : \"\";\n }, o.prototype.getExtension = function () {\n var t;\n return null != (t = this.getFilename().match(/\\.(\\w+)$/)) ? t[1].toLowerCase() : void 0;\n }, o.prototype.getContentType = function () {\n return this.attributes.get(\"contentType\");\n }, o.prototype.hasContent = function () {\n return this.attributes.has(\"content\");\n }, o.prototype.getContent = function () {\n return this.attributes.get(\"content\");\n }, o.prototype.getWidth = function () {\n return this.attributes.get(\"width\");\n }, o.prototype.getHeight = function () {\n return this.attributes.get(\"height\");\n }, o.prototype.getFile = function () {\n return this.file;\n }, o.prototype.setFile = function (t) {\n return this.file = t, this.isPreviewable() ? this.preloadFile() : void 0;\n }, o.prototype.releaseFile = function () {\n return this.releasePreloadedFile(), this.file = null;\n }, o.prototype.getUploadProgress = function () {\n var t;\n return null != (t = this.uploadProgress) ? t : 0;\n }, o.prototype.setUploadProgress = function (t) {\n var e;\n return this.uploadProgress !== t ? (this.uploadProgress = t, null != (e = this.uploadProgressDelegate) && \"function\" == typeof e.attachmentDidChangeUploadProgress ? e.attachmentDidChangeUploadProgress(this) : void 0) : void 0;\n }, o.prototype.toJSON = function () {\n return this.getAttributes();\n }, o.prototype.getCacheKey = function () {\n return [o.__super__.getCacheKey.apply(this, arguments), this.attributes.getCacheKey(), this.getPreviewURL()].join(\"/\");\n }, o.prototype.getPreviewURL = function () {\n return this.previewURL || this.preloadingURL;\n }, o.prototype.setPreviewURL = function (t) {\n var e, n;\n return t !== this.getPreviewURL() ? (this.previewURL = t, null != (e = this.previewDelegate) && \"function\" == typeof e.attachmentDidChangeAttributes && e.attachmentDidChangeAttributes(this), null != (n = this.delegate) && \"function\" == typeof n.attachmentDidChangePreviewURL ? n.attachmentDidChangePreviewURL(this) : void 0) : void 0;\n }, o.prototype.preloadURL = function () {\n return this.preload(this.getURL(), this.releaseFile);\n }, o.prototype.preloadFile = function () {\n return this.file ? (this.fileObjectURL = URL.createObjectURL(this.file), this.preload(this.fileObjectURL)) : void 0;\n }, o.prototype.releasePreloadedFile = function () {\n return this.fileObjectURL ? (URL.revokeObjectURL(this.fileObjectURL), this.fileObjectURL = null) : void 0;\n }, o.prototype.preload = function (t, n) {\n var i;\n return t && t !== this.getPreviewURL() ? (this.preloadingURL = t, i = new e.ImagePreloadOperation(t), i.then(function (e) {\n return function (i) {\n var o, r;\n return r = i.width, o = i.height, e.getWidth() && e.getHeight() || e.setAttributes({\n width: r,\n height: o\n }), e.preloadingURL = null, e.setPreviewURL(t), \"function\" == typeof n ? n() : void 0;\n };\n }(this))[\"catch\"](function (t) {\n return function () {\n return t.preloadingURL = null, \"function\" == typeof n ? n() : void 0;\n };\n }(this))) : void 0;\n }, o;\n }(e.Object);\n }.call(this), function () {\n var t = function t(_t14, e) {\n function i() {\n this.constructor = _t14;\n }\n\n for (var o in e) {\n n.call(e, o) && (_t14[o] = e[o]);\n }\n\n return i.prototype = e.prototype, _t14.prototype = new i(), _t14.__super__ = e.prototype, _t14;\n },\n n = {}.hasOwnProperty;\n\n e.Piece = function (n) {\n function i(t, n) {\n null == n && (n = {}), i.__super__.constructor.apply(this, arguments), this.attributes = e.Hash.box(n);\n }\n\n return t(i, n), i.types = {}, i.registerType = function (t, e) {\n return e.type = t, this.types[t] = e;\n }, i.fromJSON = function (t) {\n var e;\n return (e = this.types[t.type]) ? e.fromJSON(t) : void 0;\n }, i.prototype.copyWithAttributes = function (t) {\n return new this.constructor(this.getValue(), t);\n }, i.prototype.copyWithAdditionalAttributes = function (t) {\n return this.copyWithAttributes(this.attributes.merge(t));\n }, i.prototype.copyWithoutAttribute = function (t) {\n return this.copyWithAttributes(this.attributes.remove(t));\n }, i.prototype.copy = function () {\n return this.copyWithAttributes(this.attributes);\n }, i.prototype.getAttribute = function (t) {\n return this.attributes.get(t);\n }, i.prototype.getAttributesHash = function () {\n return this.attributes;\n }, i.prototype.getAttributes = function () {\n return this.attributes.toObject();\n }, i.prototype.getCommonAttributes = function () {\n var t, e, n;\n return (n = pieceList.getPieceAtIndex(0)) ? (t = n.attributes, e = t.getKeys(), pieceList.eachPiece(function (n) {\n return e = t.getKeysCommonToHash(n.attributes), t = t.slice(e);\n }), t.toObject()) : {};\n }, i.prototype.hasAttribute = function (t) {\n return this.attributes.has(t);\n }, i.prototype.hasSameStringValueAsPiece = function (t) {\n return null != t && this.toString() === t.toString();\n }, i.prototype.hasSameAttributesAsPiece = function (t) {\n return null != t && (this.attributes === t.attributes || this.attributes.isEqualTo(t.attributes));\n }, i.prototype.isBlockBreak = function () {\n return !1;\n }, i.prototype.isEqualTo = function (t) {\n return i.__super__.isEqualTo.apply(this, arguments) || this.hasSameConstructorAs(t) && this.hasSameStringValueAsPiece(t) && this.hasSameAttributesAsPiece(t);\n }, i.prototype.isEmpty = function () {\n return 0 === this.length;\n }, i.prototype.isSerializable = function () {\n return !0;\n }, i.prototype.toJSON = function () {\n return {\n type: this.constructor.type,\n attributes: this.getAttributes()\n };\n }, i.prototype.contentsForInspection = function () {\n return {\n type: this.constructor.type,\n attributes: this.attributes.inspect()\n };\n }, i.prototype.canBeGrouped = function () {\n return this.hasAttribute(\"href\");\n }, i.prototype.canBeGroupedWith = function (t) {\n return this.getAttribute(\"href\") === t.getAttribute(\"href\");\n }, i.prototype.getLength = function () {\n return this.length;\n }, i.prototype.canBeConsolidatedWith = function () {\n return !1;\n }, i;\n }(e.Object);\n }.call(this), function () {\n var t = function t(_t15, e) {\n function i() {\n this.constructor = _t15;\n }\n\n for (var o in e) {\n n.call(e, o) && (_t15[o] = e[o]);\n }\n\n return i.prototype = e.prototype, _t15.prototype = new i(), _t15.__super__ = e.prototype, _t15;\n },\n n = {}.hasOwnProperty;\n\n e.Piece.registerType(\"attachment\", e.AttachmentPiece = function (n) {\n function i(t) {\n this.attachment = t, i.__super__.constructor.apply(this, arguments), this.length = 1, this.ensureAttachmentExclusivelyHasAttribute(\"href\"), this.attachment.hasContent() || this.removeProhibitedAttributes();\n }\n\n return t(i, n), i.fromJSON = function (t) {\n return new this(e.Attachment.fromJSON(t.attachment), t.attributes);\n }, i.permittedAttributes = [\"caption\", \"presentation\"], i.prototype.ensureAttachmentExclusivelyHasAttribute = function (t) {\n return this.hasAttribute(t) ? (this.attachment.hasAttribute(t) || this.attachment.setAttributes(this.attributes.slice(t)), this.attributes = this.attributes.remove(t)) : void 0;\n }, i.prototype.removeProhibitedAttributes = function () {\n var t;\n return t = this.attributes.slice(this.constructor.permittedAttributes), t.isEqualTo(this.attributes) ? void 0 : this.attributes = t;\n }, i.prototype.getValue = function () {\n return this.attachment;\n }, i.prototype.isSerializable = function () {\n return !this.attachment.isPending();\n }, i.prototype.getCaption = function () {\n var t;\n return null != (t = this.attributes.get(\"caption\")) ? t : \"\";\n }, i.prototype.isEqualTo = function (t) {\n var e;\n return i.__super__.isEqualTo.apply(this, arguments) && this.attachment.id === (null != t && null != (e = t.attachment) ? e.id : void 0);\n }, i.prototype.toString = function () {\n return e.OBJECT_REPLACEMENT_CHARACTER;\n }, i.prototype.toJSON = function () {\n var t;\n return t = i.__super__.toJSON.apply(this, arguments), t.attachment = this.attachment, t;\n }, i.prototype.getCacheKey = function () {\n return [i.__super__.getCacheKey.apply(this, arguments), this.attachment.getCacheKey()].join(\"/\");\n }, i.prototype.toConsole = function () {\n return JSON.stringify(this.toString());\n }, i;\n }(e.Piece));\n }.call(this), function () {\n var t,\n n = function n(t, e) {\n function n() {\n this.constructor = t;\n }\n\n for (var o in e) {\n i.call(e, o) && (t[o] = e[o]);\n }\n\n return n.prototype = e.prototype, t.prototype = new n(), t.__super__ = e.prototype, t;\n },\n i = {}.hasOwnProperty;\n\n t = e.normalizeNewlines, e.Piece.registerType(\"string\", e.StringPiece = function (e) {\n function i(e) {\n i.__super__.constructor.apply(this, arguments), this.string = t(e), this.length = this.string.length;\n }\n\n return n(i, e), i.fromJSON = function (t) {\n return new this(t.string, t.attributes);\n }, i.prototype.getValue = function () {\n return this.string;\n }, i.prototype.toString = function () {\n return this.string.toString();\n }, i.prototype.isBlockBreak = function () {\n return \"\\n\" === this.toString() && this.getAttribute(\"blockBreak\") === !0;\n }, i.prototype.toJSON = function () {\n var t;\n return t = i.__super__.toJSON.apply(this, arguments), t.string = this.string, t;\n }, i.prototype.canBeConsolidatedWith = function (t) {\n return null != t && this.hasSameConstructorAs(t) && this.hasSameAttributesAsPiece(t);\n }, i.prototype.consolidateWith = function (t) {\n return new this.constructor(this.toString() + t.toString(), this.attributes);\n }, i.prototype.splitAtOffset = function (t) {\n var e, n;\n return 0 === t ? (e = null, n = this) : t === this.length ? (e = this, n = null) : (e = new this.constructor(this.string.slice(0, t), this.attributes), n = new this.constructor(this.string.slice(t), this.attributes)), [e, n];\n }, i.prototype.toConsole = function () {\n var t;\n return t = this.string, t.length > 15 && (t = t.slice(0, 14) + \"\\u2026\"), JSON.stringify(t.toString());\n }, i;\n }(e.Piece));\n }.call(this), function () {\n var t,\n n = function n(t, e) {\n function n() {\n this.constructor = t;\n }\n\n for (var o in e) {\n i.call(e, o) && (t[o] = e[o]);\n }\n\n return n.prototype = e.prototype, t.prototype = new n(), t.__super__ = e.prototype, t;\n },\n i = {}.hasOwnProperty,\n o = [].slice;\n\n t = e.spliceArray, e.SplittableList = function (e) {\n function i(t) {\n null == t && (t = []), i.__super__.constructor.apply(this, arguments), this.objects = t.slice(0), this.length = this.objects.length;\n }\n\n var r, s, a;\n return n(i, e), i.box = function (t) {\n return t instanceof this ? t : new this(t);\n }, i.prototype.indexOf = function (t) {\n return this.objects.indexOf(t);\n }, i.prototype.splice = function () {\n var e;\n return e = 1 <= arguments.length ? o.call(arguments, 0) : [], new this.constructor(t.apply(null, [this.objects].concat(o.call(e))));\n }, i.prototype.eachObject = function (t) {\n var e, n, i, o, r, s;\n\n for (r = this.objects, s = [], n = e = 0, i = r.length; i > e; n = ++e) {\n o = r[n], s.push(t(o, n));\n }\n\n return s;\n }, i.prototype.insertObjectAtIndex = function (t, e) {\n return this.splice(e, 0, t);\n }, i.prototype.insertSplittableListAtIndex = function (t, e) {\n return this.splice.apply(this, [e, 0].concat(o.call(t.objects)));\n }, i.prototype.insertSplittableListAtPosition = function (t, e) {\n var n, i, o;\n return o = this.splitObjectAtPosition(e), i = o[0], n = o[1], new this.constructor(i).insertSplittableListAtIndex(t, n);\n }, i.prototype.editObjectAtIndex = function (t, e) {\n return this.replaceObjectAtIndex(e(this.objects[t]), t);\n }, i.prototype.replaceObjectAtIndex = function (t, e) {\n return this.splice(e, 1, t);\n }, i.prototype.removeObjectAtIndex = function (t) {\n return this.splice(t, 1);\n }, i.prototype.getObjectAtIndex = function (t) {\n return this.objects[t];\n }, i.prototype.getSplittableListInRange = function (t) {\n var e, n, i, o;\n return i = this.splitObjectsAtRange(t), n = i[0], e = i[1], o = i[2], new this.constructor(n.slice(e, o + 1));\n }, i.prototype.selectSplittableList = function (t) {\n var e, n;\n return n = function () {\n var n, i, o, r;\n\n for (o = this.objects, r = [], n = 0, i = o.length; i > n; n++) {\n e = o[n], t(e) && r.push(e);\n }\n\n return r;\n }.call(this), new this.constructor(n);\n }, i.prototype.removeObjectsInRange = function (t) {\n var e, n, i, o;\n return i = this.splitObjectsAtRange(t), n = i[0], e = i[1], o = i[2], new this.constructor(n).splice(e, o - e + 1);\n }, i.prototype.transformObjectsInRange = function (t, e) {\n var n, i, o, r, s, a, u;\n return s = this.splitObjectsAtRange(t), r = s[0], i = s[1], a = s[2], u = function () {\n var t, s, u;\n\n for (u = [], n = t = 0, s = r.length; s > t; n = ++t) {\n o = r[n], u.push(n >= i && a >= n ? e(o) : o);\n }\n\n return u;\n }(), new this.constructor(u);\n }, i.prototype.splitObjectsAtRange = function (t) {\n var e, n, i, o, s, u;\n return o = this.splitObjectAtPosition(a(t)), n = o[0], e = o[1], i = o[2], s = new this.constructor(n).splitObjectAtPosition(r(t) + i), n = s[0], u = s[1], [n, e, u - 1];\n }, i.prototype.getObjectAtPosition = function (t) {\n var e, n, i;\n return i = this.findIndexAndOffsetAtPosition(t), e = i.index, n = i.offset, this.objects[e];\n }, i.prototype.splitObjectAtPosition = function (t) {\n var e, n, i, o, r, s, a, u, c, l;\n return s = this.findIndexAndOffsetAtPosition(t), e = s.index, r = s.offset, o = this.objects.slice(0), null != e ? 0 === r ? (c = e, l = 0) : (i = this.getObjectAtIndex(e), a = i.splitAtOffset(r), n = a[0], u = a[1], o.splice(e, 1, n, u), c = e + 1, l = n.getLength() - r) : (c = o.length, l = 0), [o, c, l];\n }, i.prototype.consolidate = function () {\n var t, e, n, i, o, r;\n\n for (i = [], o = this.objects[0], r = this.objects.slice(1), t = 0, e = r.length; e > t; t++) {\n n = r[t], (\"function\" == typeof o.canBeConsolidatedWith ? o.canBeConsolidatedWith(n) : void 0) ? o = o.consolidateWith(n) : (i.push(o), o = n);\n }\n\n return null != o && i.push(o), new this.constructor(i);\n }, i.prototype.consolidateFromIndexToIndex = function (t, e) {\n var n, i, r;\n return i = this.objects.slice(0), r = i.slice(t, e + 1), n = new this.constructor(r).consolidate().toArray(), this.splice.apply(this, [t, r.length].concat(o.call(n)));\n }, i.prototype.findIndexAndOffsetAtPosition = function (t) {\n var e, n, i, o, r, s, a;\n\n for (e = 0, a = this.objects, i = n = 0, o = a.length; o > n; i = ++n) {\n if (s = a[i], r = e + s.getLength(), t >= e && r > t) return {\n index: i,\n offset: t - e\n };\n e = r;\n }\n\n return {\n index: null,\n offset: null\n };\n }, i.prototype.findPositionAtIndexAndOffset = function (t, e) {\n var n, i, o, r, s, a;\n\n for (s = 0, a = this.objects, n = i = 0, o = a.length; o > i; n = ++i) {\n if (r = a[n], t > n) s += r.getLength();else if (n === t) {\n s += e;\n break;\n }\n }\n\n return s;\n }, i.prototype.getEndPosition = function () {\n var t, e;\n return null != this.endPosition ? this.endPosition : this.endPosition = function () {\n var n, i, o;\n\n for (e = 0, o = this.objects, n = 0, i = o.length; i > n; n++) {\n t = o[n], e += t.getLength();\n }\n\n return e;\n }.call(this);\n }, i.prototype.toString = function () {\n return this.objects.join(\"\");\n }, i.prototype.toArray = function () {\n return this.objects.slice(0);\n }, i.prototype.toJSON = function () {\n return this.toArray();\n }, i.prototype.isEqualTo = function (t) {\n return i.__super__.isEqualTo.apply(this, arguments) || s(this.objects, null != t ? t.objects : void 0);\n }, s = function s(t, e) {\n var n, i, o, r, s;\n if (null == e && (e = []), t.length !== e.length) return !1;\n\n for (s = !0, i = n = 0, o = t.length; o > n; i = ++n) {\n r = t[i], s && !r.isEqualTo(e[i]) && (s = !1);\n }\n\n return s;\n }, i.prototype.contentsForInspection = function () {\n var t;\n return {\n objects: \"[\" + function () {\n var e, n, i, o;\n\n for (i = this.objects, o = [], e = 0, n = i.length; n > e; e++) {\n t = i[e], o.push(t.inspect());\n }\n\n return o;\n }.call(this).join(\", \") + \"]\"\n };\n }, a = function a(t) {\n return t[0];\n }, r = function r(t) {\n return t[1];\n }, i;\n }(e.Object);\n }.call(this), function () {\n var t = function t(_t16, e) {\n function i() {\n this.constructor = _t16;\n }\n\n for (var o in e) {\n n.call(e, o) && (_t16[o] = e[o]);\n }\n\n return i.prototype = e.prototype, _t16.prototype = new i(), _t16.__super__ = e.prototype, _t16;\n },\n n = {}.hasOwnProperty;\n\n e.Text = function (n) {\n function i(t) {\n var n;\n null == t && (t = []), i.__super__.constructor.apply(this, arguments), this.pieceList = new e.SplittableList(function () {\n var e, i, o;\n\n for (o = [], e = 0, i = t.length; i > e; e++) {\n n = t[e], n.isEmpty() || o.push(n);\n }\n\n return o;\n }());\n }\n\n return t(i, n), i.textForAttachmentWithAttributes = function (t, n) {\n var i;\n return i = new e.AttachmentPiece(t, n), new this([i]);\n }, i.textForStringWithAttributes = function (t, n) {\n var i;\n return i = new e.StringPiece(t, n), new this([i]);\n }, i.fromJSON = function (t) {\n var n, i;\n return i = function () {\n var i, o, r;\n\n for (r = [], i = 0, o = t.length; o > i; i++) {\n n = t[i], r.push(e.Piece.fromJSON(n));\n }\n\n return r;\n }(), new this(i);\n }, i.prototype.copy = function () {\n return this.copyWithPieceList(this.pieceList);\n }, i.prototype.copyWithPieceList = function (t) {\n return new this.constructor(t.consolidate().toArray());\n }, i.prototype.copyUsingObjectMap = function (t) {\n var e, n;\n return n = function () {\n var n, i, o, r, s;\n\n for (o = this.getPieces(), s = [], n = 0, i = o.length; i > n; n++) {\n e = o[n], s.push(null != (r = t.find(e)) ? r : e);\n }\n\n return s;\n }.call(this), new this.constructor(n);\n }, i.prototype.appendText = function (t) {\n return this.insertTextAtPosition(t, this.getLength());\n }, i.prototype.insertTextAtPosition = function (t, e) {\n return this.copyWithPieceList(this.pieceList.insertSplittableListAtPosition(t.pieceList, e));\n }, i.prototype.removeTextAtRange = function (t) {\n return this.copyWithPieceList(this.pieceList.removeObjectsInRange(t));\n }, i.prototype.replaceTextAtRange = function (t, e) {\n return this.removeTextAtRange(e).insertTextAtPosition(t, e[0]);\n }, i.prototype.moveTextFromRangeToPosition = function (t, e) {\n var n, i;\n if (!(t[0] <= e && e <= t[1])) return i = this.getTextAtRange(t), n = i.getLength(), t[0] < e && (e -= n), this.removeTextAtRange(t).insertTextAtPosition(i, e);\n }, i.prototype.addAttributeAtRange = function (t, e, n) {\n var i;\n return i = {}, i[t] = e, this.addAttributesAtRange(i, n);\n }, i.prototype.addAttributesAtRange = function (t, e) {\n return this.copyWithPieceList(this.pieceList.transformObjectsInRange(e, function (e) {\n return e.copyWithAdditionalAttributes(t);\n }));\n }, i.prototype.removeAttributeAtRange = function (t, e) {\n return this.copyWithPieceList(this.pieceList.transformObjectsInRange(e, function (e) {\n return e.copyWithoutAttribute(t);\n }));\n }, i.prototype.setAttributesAtRange = function (t, e) {\n return this.copyWithPieceList(this.pieceList.transformObjectsInRange(e, function (e) {\n return e.copyWithAttributes(t);\n }));\n }, i.prototype.getAttributesAtPosition = function (t) {\n var e, n;\n return null != (e = null != (n = this.pieceList.getObjectAtPosition(t)) ? n.getAttributes() : void 0) ? e : {};\n }, i.prototype.getCommonAttributes = function () {\n var t, n;\n return t = function () {\n var t, e, i, o;\n\n for (i = this.pieceList.toArray(), o = [], t = 0, e = i.length; e > t; t++) {\n n = i[t], o.push(n.getAttributes());\n }\n\n return o;\n }.call(this), e.Hash.fromCommonAttributesOfObjects(t).toObject();\n }, i.prototype.getCommonAttributesAtRange = function (t) {\n var e;\n return null != (e = this.getTextAtRange(t).getCommonAttributes()) ? e : {};\n }, i.prototype.getExpandedRangeForAttributeAtOffset = function (t, e) {\n var n, i, o;\n\n for (n = o = e, i = this.getLength(); n > 0 && this.getCommonAttributesAtRange([n - 1, o])[t];) {\n n--;\n }\n\n for (; i > o && this.getCommonAttributesAtRange([e, o + 1])[t];) {\n o++;\n }\n\n return [n, o];\n }, i.prototype.getTextAtRange = function (t) {\n return this.copyWithPieceList(this.pieceList.getSplittableListInRange(t));\n }, i.prototype.getStringAtRange = function (t) {\n return this.pieceList.getSplittableListInRange(t).toString();\n }, i.prototype.getStringAtPosition = function (t) {\n return this.getStringAtRange([t, t + 1]);\n }, i.prototype.startsWithString = function (t) {\n return this.getStringAtRange([0, t.length]) === t;\n }, i.prototype.endsWithString = function (t) {\n var e;\n return e = this.getLength(), this.getStringAtRange([e - t.length, e]) === t;\n }, i.prototype.getAttachmentPieces = function () {\n var t, e, n, i, o;\n\n for (i = this.pieceList.toArray(), o = [], t = 0, e = i.length; e > t; t++) {\n n = i[t], null != n.attachment && o.push(n);\n }\n\n return o;\n }, i.prototype.getAttachments = function () {\n var t, e, n, i, o;\n\n for (i = this.getAttachmentPieces(), o = [], t = 0, e = i.length; e > t; t++) {\n n = i[t], o.push(n.attachment);\n }\n\n return o;\n }, i.prototype.getAttachmentAndPositionById = function (t) {\n var e, n, i, o, r, s;\n\n for (o = 0, r = this.pieceList.toArray(), e = 0, n = r.length; n > e; e++) {\n if (i = r[e], (null != (s = i.attachment) ? s.id : void 0) === t) return {\n attachment: i.attachment,\n position: o\n };\n o += i.length;\n }\n\n return {\n attachment: null,\n position: null\n };\n }, i.prototype.getAttachmentById = function (t) {\n var e, n, i;\n return i = this.getAttachmentAndPositionById(t), e = i.attachment, n = i.position, e;\n }, i.prototype.getRangeOfAttachment = function (t) {\n var e, n;\n return n = this.getAttachmentAndPositionById(t.id), t = n.attachment, e = n.position, null != t ? [e, e + 1] : void 0;\n }, i.prototype.updateAttributesForAttachment = function (t, e) {\n var n;\n return (n = this.getRangeOfAttachment(e)) ? this.addAttributesAtRange(t, n) : this;\n }, i.prototype.getLength = function () {\n return this.pieceList.getEndPosition();\n }, i.prototype.isEmpty = function () {\n return 0 === this.getLength();\n }, i.prototype.isEqualTo = function (t) {\n var e;\n return i.__super__.isEqualTo.apply(this, arguments) || (null != t && null != (e = t.pieceList) ? e.isEqualTo(this.pieceList) : void 0);\n }, i.prototype.isBlockBreak = function () {\n return 1 === this.getLength() && this.pieceList.getObjectAtIndex(0).isBlockBreak();\n }, i.prototype.eachPiece = function (t) {\n return this.pieceList.eachObject(t);\n }, i.prototype.getPieces = function () {\n return this.pieceList.toArray();\n }, i.prototype.getPieceAtPosition = function (t) {\n return this.pieceList.getObjectAtPosition(t);\n }, i.prototype.contentsForInspection = function () {\n return {\n pieceList: this.pieceList.inspect()\n };\n }, i.prototype.toSerializableText = function () {\n var t;\n return t = this.pieceList.selectSplittableList(function (t) {\n return t.isSerializable();\n }), this.copyWithPieceList(t);\n }, i.prototype.toString = function () {\n return this.pieceList.toString();\n }, i.prototype.toJSON = function () {\n return this.pieceList.toJSON();\n }, i.prototype.toConsole = function () {\n var t;\n return JSON.stringify(function () {\n var e, n, i, o;\n\n for (i = this.pieceList.toArray(), o = [], e = 0, n = i.length; n > e; e++) {\n t = i[e], o.push(JSON.parse(t.toConsole()));\n }\n\n return o;\n }.call(this));\n }, i;\n }(e.Object);\n }.call(this), function () {\n var t,\n n,\n i,\n o,\n r,\n s = function s(t, e) {\n function n() {\n this.constructor = t;\n }\n\n for (var i in e) {\n a.call(e, i) && (t[i] = e[i]);\n }\n\n return n.prototype = e.prototype, t.prototype = new n(), t.__super__ = e.prototype, t;\n },\n a = {}.hasOwnProperty,\n u = [].indexOf || function (t) {\n for (var e = 0, n = this.length; n > e; e++) {\n if (e in this && this[e] === t) return e;\n }\n\n return -1;\n },\n c = [].slice;\n\n t = e.arraysAreEqual, r = e.spliceArray, i = e.getBlockConfig, n = e.getBlockAttributeNames, o = e.getListAttributeNames, e.Block = function (n) {\n function a(t, n) {\n null == t && (t = new e.Text()), null == n && (n = []), a.__super__.constructor.apply(this, arguments), this.text = h(t), this.attributes = n;\n }\n\n var l, h, p, d, f, g, m, v, y;\n return s(a, n), a.fromJSON = function (t) {\n var n;\n return n = e.Text.fromJSON(t.text), new this(n, t.attributes);\n }, a.prototype.isEmpty = function () {\n return this.text.isBlockBreak();\n }, a.prototype.isEqualTo = function (e) {\n return a.__super__.isEqualTo.apply(this, arguments) || this.text.isEqualTo(null != e ? e.text : void 0) && t(this.attributes, null != e ? e.attributes : void 0);\n }, a.prototype.copyWithText = function (t) {\n return new this.constructor(t, this.attributes);\n }, a.prototype.copyWithoutText = function () {\n return this.copyWithText(null);\n }, a.prototype.copyWithAttributes = function (t) {\n return new this.constructor(this.text, t);\n }, a.prototype.copyWithoutAttributes = function () {\n return this.copyWithAttributes(null);\n }, a.prototype.copyUsingObjectMap = function (t) {\n var e;\n return this.copyWithText((e = t.find(this.text)) ? e : this.text.copyUsingObjectMap(t));\n }, a.prototype.addAttribute = function (t) {\n var e;\n return e = this.attributes.concat(d(t)), this.copyWithAttributes(e);\n }, a.prototype.removeAttribute = function (t) {\n var e, n;\n return n = i(t).listAttribute, e = g(g(this.attributes, t), n), this.copyWithAttributes(e);\n }, a.prototype.removeLastAttribute = function () {\n return this.removeAttribute(this.getLastAttribute());\n }, a.prototype.getLastAttribute = function () {\n return f(this.attributes);\n }, a.prototype.getAttributes = function () {\n return this.attributes.slice(0);\n }, a.prototype.getAttributeLevel = function () {\n return this.attributes.length;\n }, a.prototype.getAttributeAtLevel = function (t) {\n return this.attributes[t - 1];\n }, a.prototype.hasAttribute = function (t) {\n return u.call(this.attributes, t) >= 0;\n }, a.prototype.hasAttributes = function () {\n return this.getAttributeLevel() > 0;\n }, a.prototype.getLastNestableAttribute = function () {\n return f(this.getNestableAttributes());\n }, a.prototype.getNestableAttributes = function () {\n var t, e, n, o, r;\n\n for (o = this.attributes, r = [], e = 0, n = o.length; n > e; e++) {\n t = o[e], i(t).nestable && r.push(t);\n }\n\n return r;\n }, a.prototype.getNestingLevel = function () {\n return this.getNestableAttributes().length;\n }, a.prototype.decreaseNestingLevel = function () {\n var t;\n return (t = this.getLastNestableAttribute()) ? this.removeAttribute(t) : this;\n }, a.prototype.increaseNestingLevel = function () {\n var t, e, n;\n return (t = this.getLastNestableAttribute()) ? (n = this.attributes.lastIndexOf(t), e = r.apply(null, [this.attributes, n + 1, 0].concat(c.call(d(t)))), this.copyWithAttributes(e)) : this;\n }, a.prototype.getListItemAttributes = function () {\n var t, e, n, o, r;\n\n for (o = this.attributes, r = [], e = 0, n = o.length; n > e; e++) {\n t = o[e], i(t).listAttribute && r.push(t);\n }\n\n return r;\n }, a.prototype.isListItem = function () {\n var t;\n return null != (t = i(this.getLastAttribute())) ? t.listAttribute : void 0;\n }, a.prototype.isTerminalBlock = function () {\n var t;\n return null != (t = i(this.getLastAttribute())) ? t.terminal : void 0;\n }, a.prototype.breaksOnReturn = function () {\n var t;\n return null != (t = i(this.getLastAttribute())) ? t.breakOnReturn : void 0;\n }, a.prototype.findLineBreakInDirectionFromPosition = function (t, e) {\n var n, i;\n return i = this.toString(), n = function () {\n switch (t) {\n case \"forward\":\n return i.indexOf(\"\\n\", e);\n\n case \"backward\":\n return i.slice(0, e).lastIndexOf(\"\\n\");\n }\n }(), -1 !== n ? n : void 0;\n }, a.prototype.contentsForInspection = function () {\n return {\n text: this.text.inspect(),\n attributes: this.attributes\n };\n }, a.prototype.toString = function () {\n return this.text.toString();\n }, a.prototype.toJSON = function () {\n return {\n text: this.text,\n attributes: this.attributes\n };\n }, a.prototype.getLength = function () {\n return this.text.getLength();\n }, a.prototype.canBeConsolidatedWith = function (t) {\n return !this.hasAttributes() && !t.hasAttributes();\n }, a.prototype.consolidateWith = function (t) {\n var n, i;\n return n = e.Text.textForStringWithAttributes(\"\\n\"), i = this.getTextWithoutBlockBreak().appendText(n), this.copyWithText(i.appendText(t.text));\n }, a.prototype.splitAtOffset = function (t) {\n var e, n;\n return 0 === t ? (e = null, n = this) : t === this.getLength() ? (e = this, n = null) : (e = this.copyWithText(this.text.getTextAtRange([0, t])), n = this.copyWithText(this.text.getTextAtRange([t, this.getLength()]))), [e, n];\n }, a.prototype.getBlockBreakPosition = function () {\n return this.text.getLength() - 1;\n }, a.prototype.getTextWithoutBlockBreak = function () {\n return m(this.text) ? this.text.getTextAtRange([0, this.getBlockBreakPosition()]) : this.text.copy();\n }, a.prototype.canBeGrouped = function (t) {\n return this.attributes[t];\n }, a.prototype.canBeGroupedWith = function (t, e) {\n var n, r, s, a;\n return s = t.getAttributes(), r = s[e], n = this.attributes[e], n === r && !(i(n).group === !1 && (a = s[e + 1], u.call(o(), a) < 0));\n }, h = function h(t) {\n return t = y(t), t = l(t);\n }, y = function y(t) {\n var n, i, o, r, s, a;\n return r = !1, a = t.getPieces(), i = 2 <= a.length ? c.call(a, 0, n = a.length - 1) : (n = 0, []), o = a[n++], null == o ? t : (i = function () {\n var t, e, n;\n\n for (n = [], t = 0, e = i.length; e > t; t++) {\n s = i[t], s.isBlockBreak() ? (r = !0, n.push(v(s))) : n.push(s);\n }\n\n return n;\n }(), r ? new e.Text(c.call(i).concat([o])) : t);\n }, p = e.Text.textForStringWithAttributes(\"\\n\", {\n blockBreak: !0\n }), l = function l(t) {\n return m(t) ? t : t.appendText(p);\n }, m = function m(t) {\n var e, n;\n return n = t.getLength(), 0 === n ? !1 : (e = t.getTextAtRange([n - 1, n]), e.isBlockBreak());\n }, v = function v(t) {\n return t.copyWithoutAttribute(\"blockBreak\");\n }, d = function d(t) {\n var e;\n return e = i(t).listAttribute, null != e ? [e, t] : [t];\n }, f = function f(t) {\n return t.slice(-1)[0];\n }, g = function g(t, e) {\n var n;\n return n = t.lastIndexOf(e), -1 === n ? t : r(t, n, 1);\n }, a;\n }(e.Object);\n }.call(this), function () {\n var t,\n n,\n i,\n o = function o(t, e) {\n function n() {\n this.constructor = t;\n }\n\n for (var i in e) {\n r.call(e, i) && (t[i] = e[i]);\n }\n\n return n.prototype = e.prototype, t.prototype = new n(), t.__super__ = e.prototype, t;\n },\n r = {}.hasOwnProperty,\n s = [].indexOf || function (t) {\n for (var e = 0, n = this.length; n > e; e++) {\n if (e in this && this[e] === t) return e;\n }\n\n return -1;\n },\n a = [].slice;\n\n n = e.tagName, i = e.walkTree, t = e.nodeIsAttachmentElement, e.HTMLSanitizer = function (r) {\n function u(t, e) {\n var n;\n n = null != e ? e : {}, this.allowedAttributes = n.allowedAttributes, this.forbiddenProtocols = n.forbiddenProtocols, null == this.allowedAttributes && (this.allowedAttributes = c), null == this.forbiddenProtocols && (this.forbiddenProtocols = l), this.body = h(t);\n }\n\n var c, l, h, p;\n return o(u, r), c = \"style href src width height class\".split(\" \"), l = \"javascript:\".split(\" \"), u.sanitize = function (t, e) {\n var n;\n return n = new this(t, e), n.sanitize(), n;\n }, u.prototype.sanitize = function () {\n return this.sanitizeElements(), this.normalizeListElementNesting();\n }, u.prototype.getHTML = function () {\n return this.body.innerHTML;\n }, u.prototype.getBody = function () {\n return this.body;\n }, u.prototype.sanitizeElements = function () {\n var t, n, o, r, s;\n\n for (s = i(this.body), r = []; s.nextNode();) {\n switch (o = s.currentNode, o.nodeType) {\n case Node.ELEMENT_NODE:\n p(o) ? r.push(o) : this.sanitizeElement(o);\n break;\n\n case Node.COMMENT_NODE:\n r.push(o);\n }\n }\n\n for (t = 0, n = r.length; n > t; t++) {\n o = r[t], e.removeNode(o);\n }\n\n return this.body;\n }, u.prototype.sanitizeElement = function (t) {\n var e, n, i, o, r;\n\n for (t.hasAttribute(\"href\") && (o = t.protocol, s.call(this.forbiddenProtocols, o) >= 0 && t.removeAttribute(\"href\")), r = a.call(t.attributes), e = 0, n = r.length; n > e; e++) {\n i = r[e].name, s.call(this.allowedAttributes, i) >= 0 || 0 === i.indexOf(\"data-trix\") || t.removeAttribute(i);\n }\n\n return t;\n }, u.prototype.normalizeListElementNesting = function () {\n var t, e, i, o, r;\n\n for (r = a.call(this.body.querySelectorAll(\"ul,ol\")), t = 0, e = r.length; e > t; t++) {\n i = r[t], (o = i.previousElementSibling) && \"li\" === n(o) && o.appendChild(i);\n }\n\n return this.body;\n }, p = function p(e) {\n return (null != e ? e.nodeType : void 0) !== Node.ELEMENT_NODE || t(e) ? void 0 : \"script\" === n(e) || \"false\" === e.getAttribute(\"data-trix-serialize\");\n }, h = function h(t) {\n var e, n, i, o, r;\n\n for (null == t && (t = \"\"), t = t.replace(/<\\/html[^>]*>[^]*$/i, \"