{ "version": 3, "sources": ["../node_modules/moment/moment.js", "../node_modules/pikaday/pikaday.js", "../node_modules/apprun/src/app.ts", "../node_modules/apprun/src/vdom-my.ts", "../node_modules/apprun/src/web-component.ts", "../node_modules/apprun/src/decorator.ts", "../node_modules/apprun/src/directive.ts", "../node_modules/apprun/src/component.ts", "../node_modules/apprun/src/router.ts", "../node_modules/apprun/src/apprun.ts", "../node_modules/apprun/src/vdom.ts", "../node_modules/jwt-decode/lib/atob.js", "../node_modules/jwt-decode/lib/base64_url_decode.js", "../node_modules/jwt-decode/lib/index.js", "../src/fetch.ts", "../src/api.ts", "../src/utils.tsx", "../src/login.tsx", "../src/company-list.tsx", "../src/location-list.tsx", "../src/team-list.tsx", "../src/search-adv.tsx", "../src/user-list.tsx", "../src/google-delete-list.tsx", "../src/service-regions.tsx", "../src/ddl-edit.tsx", "../src/settings.tsx", "../src/ob-sel-agents.tsx", "../src/common-props/common-props-text-edit.tsx", "../src/common-props/common-props-address-edit.tsx", "../src/common-props/common-props-phone-edit.tsx", "../src/common-props/common-props-selection-edit.tsx", "../src/common-props/common-props-date-edit.tsx", "../src/company-props/company-props-award.tsx", "../src/company-props/company-props-smartlead.tsx", "../src/company-props/company-props-report-edit.tsx", "../src/company.tsx", "../src/ob-rlp2rlp.tsx", "../src/ob-new-conversion.tsx", "../src/onboarding.tsx", "../src/user-terminate.tsx", "../src/user-reactivate.tsx", "../src/common-props/common-props-regions-select.tsx", "../src/common-props/common-props-regions-edit.tsx", "../src/common-props/common-props-expertTopic-edit.tsx", "../src/user-props/user-props-phone.tsx", "../src/user-props/user-props-socialNetworking.tsx", "../src/user-props/user-props-award.tsx", "../src/user-props/user-props-photo.tsx", "../src/user-props/user-props-password-edit.tsx", "../src/user-props/user-props-speciality.tsx", "../src/user-props/user-props-commercial.tsx", "../src/user-props/user-props-exception.tsx", "../src/user-props/user-props-TeamDate-edit.tsx", "../src/user-props/user-props-date-edit.tsx", "../src/user-props/user-props-audit-log.tsx", "../src/user-props/user-props-ire-overrides.tsx", "../src/user-props/user-props-protection-royale.tsx", "../src/user.tsx", "../src/company-new.tsx", "../src/location-props/location-props-region-selection-edit.tsx", "../src/location-props/location-props-contract-option.tsx", "../src/location.tsx", "../src/location-new.tsx", "../src/user-new.tsx", "../src/rlp-directory.tsx", "../src/main.tsx"], "sourcesContent": ["//! moment.js\n//! version : 2.29.1\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n global.moment = factory()\n}(this, (function () { 'use strict';\n\n var hookCallback;\n\n function hooks() {\n return hookCallback.apply(null, arguments);\n }\n\n // This is done to register the method called with moment()\n // without creating circular dependencies.\n function setHookCallback(callback) {\n hookCallback = callback;\n }\n\n function isArray(input) {\n return (\n input instanceof Array ||\n Object.prototype.toString.call(input) === '[object Array]'\n );\n }\n\n function isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return (\n input != null &&\n Object.prototype.toString.call(input) === '[object Object]'\n );\n }\n\n function hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n }\n\n function isObjectEmpty(obj) {\n if (Object.getOwnPropertyNames) {\n return Object.getOwnPropertyNames(obj).length === 0;\n } else {\n var k;\n for (k in obj) {\n if (hasOwnProp(obj, k)) {\n return false;\n }\n }\n return true;\n }\n }\n\n function isUndefined(input) {\n return input === void 0;\n }\n\n function isNumber(input) {\n return (\n typeof input === 'number' ||\n Object.prototype.toString.call(input) === '[object Number]'\n );\n }\n\n function isDate(input) {\n return (\n input instanceof Date ||\n Object.prototype.toString.call(input) === '[object Date]'\n );\n }\n\n function map(arr, fn) {\n var res = [],\n i;\n for (i = 0; i < arr.length; ++i) {\n res.push(fn(arr[i], i));\n }\n return res;\n }\n\n function extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n }\n\n function createUTC(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n }\n\n function defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty: false,\n unusedTokens: [],\n unusedInput: [],\n overflow: -2,\n charsLeftOver: 0,\n nullInput: false,\n invalidEra: null,\n invalidMonth: null,\n invalidFormat: false,\n userInvalidated: false,\n iso: false,\n parsedDateParts: [],\n era: null,\n meridiem: null,\n rfc2822: false,\n weekdayMismatch: false,\n };\n }\n\n function getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n return m._pf;\n }\n\n var some;\n if (Array.prototype.some) {\n some = Array.prototype.some;\n } else {\n some = function (fun) {\n var t = Object(this),\n len = t.length >>> 0,\n i;\n\n for (i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n }\n\n function isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m),\n parsedParts = some.call(flags.parsedDateParts, function (i) {\n return i != null;\n }),\n isNowValid =\n !isNaN(m._d.getTime()) &&\n flags.overflow < 0 &&\n !flags.empty &&\n !flags.invalidEra &&\n !flags.invalidMonth &&\n !flags.invalidWeekday &&\n !flags.weekdayMismatch &&\n !flags.nullInput &&\n !flags.invalidFormat &&\n !flags.userInvalidated &&\n (!flags.meridiem || (flags.meridiem && parsedParts));\n\n if (m._strict) {\n isNowValid =\n isNowValid &&\n flags.charsLeftOver === 0 &&\n flags.unusedTokens.length === 0 &&\n flags.bigHour === undefined;\n }\n\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n } else {\n return isNowValid;\n }\n }\n return m._isValid;\n }\n\n function createInvalid(flags) {\n var m = createUTC(NaN);\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n } else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n }\n\n // Plugins that add properties should also add the key here (null value),\n // so we can properly clone ourselves.\n var momentProperties = (hooks.momentProperties = []),\n updateInProgress = false;\n\n function copyConfig(to, from) {\n var i, prop, val;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentProperties.length > 0) {\n for (i = 0; i < momentProperties.length; i++) {\n prop = momentProperties[i];\n val = from[prop];\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n }\n\n // Moment prototype object\n function Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n if (!this.isValid()) {\n this._d = new Date(NaN);\n }\n // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n }\n\n function isMoment(obj) {\n return (\n obj instanceof Moment || (obj != null && obj._isAMomentObject != null)\n );\n }\n\n function warn(msg) {\n if (\n hooks.suppressDeprecationWarnings === false &&\n typeof console !== 'undefined' &&\n console.warn\n ) {\n console.warn('Deprecation warning: ' + msg);\n }\n }\n\n function deprecate(msg, fn) {\n var firstTime = true;\n\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n if (firstTime) {\n var args = [],\n arg,\n i,\n key;\n for (i = 0; i < arguments.length; i++) {\n arg = '';\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n for (key in arguments[0]) {\n if (hasOwnProp(arguments[0], key)) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n }\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n args.push(arg);\n }\n warn(\n msg +\n '\\nArguments: ' +\n Array.prototype.slice.call(args).join('') +\n '\\n' +\n new Error().stack\n );\n firstTime = false;\n }\n return fn.apply(this, arguments);\n }, fn);\n }\n\n var deprecations = {};\n\n function deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n }\n\n hooks.suppressDeprecationWarnings = false;\n hooks.deprecationHandler = null;\n\n function isFunction(input) {\n return (\n (typeof Function !== 'undefined' && input instanceof Function) ||\n Object.prototype.toString.call(input) === '[object Function]'\n );\n }\n\n function set(config) {\n var prop, i;\n for (i in config) {\n if (hasOwnProp(config, i)) {\n prop = config[i];\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n }\n this._config = config;\n // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n this._dayOfMonthOrdinalParseLenient = new RegExp(\n (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +\n '|' +\n /\\d{1,2}/.source\n );\n }\n\n function mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig),\n prop;\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n for (prop in parentConfig) {\n if (\n hasOwnProp(parentConfig, prop) &&\n !hasOwnProp(childConfig, prop) &&\n isObject(parentConfig[prop])\n ) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n return res;\n }\n\n function Locale(config) {\n if (config != null) {\n this.set(config);\n }\n }\n\n var keys;\n\n if (Object.keys) {\n keys = Object.keys;\n } else {\n keys = function (obj) {\n var i,\n res = [];\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n return res;\n };\n }\n\n var defaultCalendar = {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n };\n\n function calendar(key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n }\n\n function zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (\n (sign ? (forceSign ? '+' : '') : '-') +\n Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +\n absNumber\n );\n }\n\n var formattingTokens = /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,\n localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,\n formatFunctions = {},\n formatTokenFunctions = {};\n\n // token: 'M'\n // padded: ['MM', 2]\n // ordinal: 'Mo'\n // callback: function () { this.month() + 1 }\n function addFormatToken(token, padded, ordinal, callback) {\n var func = callback;\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n if (token) {\n formatTokenFunctions[token] = func;\n }\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(\n func.apply(this, arguments),\n token\n );\n };\n }\n }\n\n function removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n return input.replace(/\\\\/g, '');\n }\n\n function makeFormatFunction(format) {\n var array = format.match(formattingTokens),\n i,\n length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '',\n i;\n for (i = 0; i < length; i++) {\n output += isFunction(array[i])\n ? array[i].call(mom, format)\n : array[i];\n }\n return output;\n };\n }\n\n // format date using native date object\n function formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] =\n formatFunctions[format] || makeFormatFunction(format);\n\n return formatFunctions[format](m);\n }\n\n function expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(\n localFormattingTokens,\n replaceLongDateFormatTokens\n );\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n }\n\n var defaultLongDateFormat = {\n LTS: 'h:mm:ss A',\n LT: 'h:mm A',\n L: 'MM/DD/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A',\n };\n\n function longDateFormat(key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper\n .match(formattingTokens)\n .map(function (tok) {\n if (\n tok === 'MMMM' ||\n tok === 'MM' ||\n tok === 'DD' ||\n tok === 'dddd'\n ) {\n return tok.slice(1);\n }\n return tok;\n })\n .join('');\n\n return this._longDateFormat[key];\n }\n\n var defaultInvalidDate = 'Invalid date';\n\n function invalidDate() {\n return this._invalidDate;\n }\n\n var defaultOrdinal = '%d',\n defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\n function ordinal(number) {\n return this._ordinal.replace('%d', number);\n }\n\n var defaultRelativeTime = {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n w: 'a week',\n ww: '%d weeks',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n };\n\n function relativeTime(number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return isFunction(output)\n ? output(number, withoutSuffix, string, isFuture)\n : output.replace(/%d/i, number);\n }\n\n function pastFuture(diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n }\n\n var aliases = {};\n\n function addUnitAlias(unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n }\n\n function normalizeUnits(units) {\n return typeof units === 'string'\n ? aliases[units] || aliases[units.toLowerCase()]\n : undefined;\n }\n\n function normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n }\n\n var priorities = {};\n\n function addUnitPriority(unit, priority) {\n priorities[unit] = priority;\n }\n\n function getPrioritizedUnits(unitsObj) {\n var units = [],\n u;\n for (u in unitsObj) {\n if (hasOwnProp(unitsObj, u)) {\n units.push({ unit: u, priority: priorities[u] });\n }\n }\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n }\n\n function isLeapYear(year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n }\n\n function absFloor(number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n }\n\n function toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n }\n\n function makeGetSet(unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n }\n\n function get(mom, unit) {\n return mom.isValid()\n ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]()\n : NaN;\n }\n\n function set$1(mom, unit, value) {\n if (mom.isValid() && !isNaN(value)) {\n if (\n unit === 'FullYear' &&\n isLeapYear(mom.year()) &&\n mom.month() === 1 &&\n mom.date() === 29\n ) {\n value = toInt(value);\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](\n value,\n mom.month(),\n daysInMonth(value, mom.month())\n );\n } else {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n }\n }\n\n // MOMENTS\n\n function stringGet(units) {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units]();\n }\n return this;\n }\n\n function stringSet(units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units),\n i;\n for (i = 0; i < prioritized.length; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n return this;\n }\n\n var match1 = /\\d/, // 0 - 9\n match2 = /\\d\\d/, // 00 - 99\n match3 = /\\d{3}/, // 000 - 999\n match4 = /\\d{4}/, // 0000 - 9999\n match6 = /[+-]?\\d{6}/, // -999999 - 999999\n match1to2 = /\\d\\d?/, // 0 - 99\n match3to4 = /\\d\\d\\d\\d?/, // 999 - 9999\n match5to6 = /\\d\\d\\d\\d\\d\\d?/, // 99999 - 999999\n match1to3 = /\\d{1,3}/, // 0 - 999\n match1to4 = /\\d{1,4}/, // 0 - 9999\n match1to6 = /[+-]?\\d{1,6}/, // -999999 - 999999\n matchUnsigned = /\\d+/, // 0 - inf\n matchSigned = /[+-]?\\d+/, // -inf - inf\n matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi, // +00:00 -00:00 +0000 -0000 or Z\n matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/, // 123456789 123456789.123\n // any word (or two) characters or numbers including two/three word month in arabic.\n // includes scottish gaelic two word and hyphenated months\n matchWord = /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,\n regexes;\n\n regexes = {};\n\n function addRegexToken(token, regex, strictRegex) {\n regexes[token] = isFunction(regex)\n ? regex\n : function (isStrict, localeData) {\n return isStrict && strictRegex ? strictRegex : regex;\n };\n }\n\n function getParseRegexForToken(token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n }\n\n // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\n function unescapeFormat(s) {\n return regexEscape(\n s\n .replace('\\\\', '')\n .replace(/\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g, function (\n matched,\n p1,\n p2,\n p3,\n p4\n ) {\n return p1 || p2 || p3 || p4;\n })\n );\n }\n\n function regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n }\n\n var tokens = {};\n\n function addParseToken(token, callback) {\n var i,\n func = callback;\n if (typeof token === 'string') {\n token = [token];\n }\n if (isNumber(callback)) {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n for (i = 0; i < token.length; i++) {\n tokens[token[i]] = func;\n }\n }\n\n function addWeekParseToken(token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n }\n\n function addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n }\n\n var YEAR = 0,\n MONTH = 1,\n DATE = 2,\n HOUR = 3,\n MINUTE = 4,\n SECOND = 5,\n MILLISECOND = 6,\n WEEK = 7,\n WEEKDAY = 8;\n\n function mod(n, x) {\n return ((n % x) + x) % x;\n }\n\n var indexOf;\n\n if (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n } else {\n indexOf = function (o) {\n // I know\n var i;\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n return -1;\n };\n }\n\n function daysInMonth(year, month) {\n if (isNaN(year) || isNaN(month)) {\n return NaN;\n }\n var modMonth = mod(month, 12);\n year += (month - modMonth) / 12;\n return modMonth === 1\n ? isLeapYear(year)\n ? 29\n : 28\n : 31 - ((modMonth % 7) % 2);\n }\n\n // FORMATTING\n\n addFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n });\n\n addFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n });\n\n addFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n });\n\n // ALIASES\n\n addUnitAlias('month', 'M');\n\n // PRIORITY\n\n addUnitPriority('month', 8);\n\n // PARSING\n\n addRegexToken('M', match1to2);\n addRegexToken('MM', match1to2, match2);\n addRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n });\n addRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n });\n\n addParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n });\n\n addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict);\n // if we didn't find a month name, mark the date as invalid.\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n });\n\n // LOCALES\n\n var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split(\n '_'\n ),\n MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,\n defaultMonthsShortRegex = matchWord,\n defaultMonthsRegex = matchWord;\n\n function localeMonths(m, format) {\n if (!m) {\n return isArray(this._months)\n ? this._months\n : this._months['standalone'];\n }\n return isArray(this._months)\n ? this._months[m.month()]\n : this._months[\n (this._months.isFormat || MONTHS_IN_FORMAT).test(format)\n ? 'format'\n : 'standalone'\n ][m.month()];\n }\n\n function localeMonthsShort(m, format) {\n if (!m) {\n return isArray(this._monthsShort)\n ? this._monthsShort\n : this._monthsShort['standalone'];\n }\n return isArray(this._monthsShort)\n ? this._monthsShort[m.month()]\n : this._monthsShort[\n MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'\n ][m.month()];\n }\n\n function handleStrictParse(monthName, format, strict) {\n var i,\n ii,\n mom,\n llc = monthName.toLocaleLowerCase();\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n }\n\n function localeMonthsParse(monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n }\n\n // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp(\n '^' + this.months(mom, '').replace('.', '') + '$',\n 'i'\n );\n this._shortMonthsParse[i] = new RegExp(\n '^' + this.monthsShort(mom, '').replace('.', '') + '$',\n 'i'\n );\n }\n if (!strict && !this._monthsParse[i]) {\n regex =\n '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'MMMM' &&\n this._longMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'MMM' &&\n this._shortMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n }\n\n // MOMENTS\n\n function setMonth(mom, value) {\n var dayOfMonth;\n\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value);\n // TODO: Another silent failure?\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n return mom;\n }\n\n function getSetMonth(value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n }\n\n function getDaysInMonth() {\n return daysInMonth(this.year(), this.month());\n }\n\n function monthsShortRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n return this._monthsShortStrictRegex && isStrict\n ? this._monthsShortStrictRegex\n : this._monthsShortRegex;\n }\n }\n\n function monthsRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n return this._monthsStrictRegex && isStrict\n ? this._monthsStrictRegex\n : this._monthsRegex;\n }\n }\n\n function computeMonthsParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom;\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortPieces.push(this.monthsShort(mom, ''));\n longPieces.push(this.months(mom, ''));\n mixedPieces.push(this.months(mom, ''));\n mixedPieces.push(this.monthsShort(mom, ''));\n }\n // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n for (i = 0; i < 12; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n }\n for (i = 0; i < 24; i++) {\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._monthsShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n }\n\n // FORMATTING\n\n addFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? zeroFill(y, 4) : '+' + y;\n });\n\n addFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n });\n\n addFormatToken(0, ['YYYY', 4], 0, 'year');\n addFormatToken(0, ['YYYYY', 5], 0, 'year');\n addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n // ALIASES\n\n addUnitAlias('year', 'y');\n\n // PRIORITIES\n\n addUnitPriority('year', 1);\n\n // PARSING\n\n addRegexToken('Y', matchSigned);\n addRegexToken('YY', match1to2, match2);\n addRegexToken('YYYY', match1to4, match4);\n addRegexToken('YYYYY', match1to6, match6);\n addRegexToken('YYYYYY', match1to6, match6);\n\n addParseToken(['YYYYY', 'YYYYYY'], YEAR);\n addParseToken('YYYY', function (input, array) {\n array[YEAR] =\n input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n });\n addParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n });\n addParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n });\n\n // HELPERS\n\n function daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n }\n\n // HOOKS\n\n hooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n };\n\n // MOMENTS\n\n var getSetYear = makeGetSet('FullYear', true);\n\n function getIsLeapYear() {\n return isLeapYear(this.year());\n }\n\n function createDate(y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date;\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n date = new Date(y + 400, m, d, h, M, s, ms);\n if (isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n } else {\n date = new Date(y, m, d, h, M, s, ms);\n }\n\n return date;\n }\n\n function createUTCDate(y) {\n var date, args;\n // the Date.UTC function remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n args = Array.prototype.slice.call(arguments);\n // preserve leap years using a full 400 year cycle, then reset\n args[0] = y + 400;\n date = new Date(Date.UTC.apply(null, args));\n if (isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n } else {\n date = new Date(Date.UTC.apply(null, arguments));\n }\n\n return date;\n }\n\n // start-of-first-week - start-of-year\n function firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n\n return -fwdlw + fwd - 1;\n }\n\n // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\n function dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear,\n resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear,\n };\n }\n\n function weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek,\n resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear,\n };\n }\n\n function weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n }\n\n // FORMATTING\n\n addFormatToken('w', ['ww', 2], 'wo', 'week');\n addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n // ALIASES\n\n addUnitAlias('week', 'w');\n addUnitAlias('isoWeek', 'W');\n\n // PRIORITIES\n\n addUnitPriority('week', 5);\n addUnitPriority('isoWeek', 5);\n\n // PARSING\n\n addRegexToken('w', match1to2);\n addRegexToken('ww', match1to2, match2);\n addRegexToken('W', match1to2);\n addRegexToken('WW', match1to2, match2);\n\n addWeekParseToken(['w', 'ww', 'W', 'WW'], function (\n input,\n week,\n config,\n token\n ) {\n week[token.substr(0, 1)] = toInt(input);\n });\n\n // HELPERS\n\n // LOCALES\n\n function localeWeek(mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n }\n\n var defaultLocaleWeek = {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n };\n\n function localeFirstDayOfWeek() {\n return this._week.dow;\n }\n\n function localeFirstDayOfYear() {\n return this._week.doy;\n }\n\n // MOMENTS\n\n function getSetWeek(input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n }\n\n function getSetISOWeek(input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n }\n\n // FORMATTING\n\n addFormatToken('d', 0, 'do', 'day');\n\n addFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n });\n\n addFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n });\n\n addFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n });\n\n addFormatToken('e', 0, 0, 'weekday');\n addFormatToken('E', 0, 0, 'isoWeekday');\n\n // ALIASES\n\n addUnitAlias('day', 'd');\n addUnitAlias('weekday', 'e');\n addUnitAlias('isoWeekday', 'E');\n\n // PRIORITY\n addUnitPriority('day', 11);\n addUnitPriority('weekday', 11);\n addUnitPriority('isoWeekday', 11);\n\n // PARSING\n\n addRegexToken('d', match1to2);\n addRegexToken('e', match1to2);\n addRegexToken('E', match1to2);\n addRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n });\n addRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n });\n addRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n });\n\n addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict);\n // if we didn't get a weekday name, mark the date as invalid\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n });\n\n addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n });\n\n // HELPERS\n\n function parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n }\n\n function parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n return isNaN(input) ? null : input;\n }\n\n // LOCALES\n function shiftWeekdays(ws, n) {\n return ws.slice(n, 7).concat(ws.slice(0, n));\n }\n\n var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n '_'\n ),\n defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n defaultWeekdaysRegex = matchWord,\n defaultWeekdaysShortRegex = matchWord,\n defaultWeekdaysMinRegex = matchWord;\n\n function localeWeekdays(m, format) {\n var weekdays = isArray(this._weekdays)\n ? this._weekdays\n : this._weekdays[\n m && m !== true && this._weekdays.isFormat.test(format)\n ? 'format'\n : 'standalone'\n ];\n return m === true\n ? shiftWeekdays(weekdays, this._week.dow)\n : m\n ? weekdays[m.day()]\n : weekdays;\n }\n\n function localeWeekdaysShort(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysShort, this._week.dow)\n : m\n ? this._weekdaysShort[m.day()]\n : this._weekdaysShort;\n }\n\n function localeWeekdaysMin(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysMin, this._week.dow)\n : m\n ? this._weekdaysMin[m.day()]\n : this._weekdaysMin;\n }\n\n function handleStrictParse$1(weekdayName, format, strict) {\n var i,\n ii,\n mom,\n llc = weekdayName.toLocaleLowerCase();\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(\n mom,\n ''\n ).toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n }\n\n function localeWeekdaysParse(weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n\n mom = createUTC([2000, 1]).day(i);\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp(\n '^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._shortWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._minWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n }\n if (!this._weekdaysParse[i]) {\n regex =\n '^' +\n this.weekdays(mom, '') +\n '|^' +\n this.weekdaysShort(mom, '') +\n '|^' +\n this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'dddd' &&\n this._fullWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'ddd' &&\n this._shortWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'dd' &&\n this._minWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n }\n\n // MOMENTS\n\n function getSetDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n }\n\n function getSetLocaleDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n }\n\n function getSetISODayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n }\n\n function weekdaysRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n return this._weekdaysStrictRegex && isStrict\n ? this._weekdaysStrictRegex\n : this._weekdaysRegex;\n }\n }\n\n function weekdaysShortRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n return this._weekdaysShortStrictRegex && isStrict\n ? this._weekdaysShortStrictRegex\n : this._weekdaysShortRegex;\n }\n }\n\n function weekdaysMinRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n return this._weekdaysMinStrictRegex && isStrict\n ? this._weekdaysMinStrictRegex\n : this._weekdaysMinRegex;\n }\n }\n\n function computeWeekdaysParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [],\n shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom,\n minp,\n shortp,\n longp;\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = regexEscape(this.weekdaysMin(mom, ''));\n shortp = regexEscape(this.weekdaysShort(mom, ''));\n longp = regexEscape(this.weekdays(mom, ''));\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n }\n // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n\n this._weekdaysStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysMinStrictRegex = new RegExp(\n '^(' + minPieces.join('|') + ')',\n 'i'\n );\n }\n\n // FORMATTING\n\n function hFormat() {\n return this.hours() % 12 || 12;\n }\n\n function kFormat() {\n return this.hours() || 24;\n }\n\n addFormatToken('H', ['HH', 2], 0, 'hour');\n addFormatToken('h', ['hh', 2], 0, hFormat);\n addFormatToken('k', ['kk', 2], 0, kFormat);\n\n addFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n });\n\n addFormatToken('hmmss', 0, 0, function () {\n return (\n '' +\n hFormat.apply(this) +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n });\n\n addFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n });\n\n addFormatToken('Hmmss', 0, 0, function () {\n return (\n '' +\n this.hours() +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n });\n\n function meridiem(token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(\n this.hours(),\n this.minutes(),\n lowercase\n );\n });\n }\n\n meridiem('a', true);\n meridiem('A', false);\n\n // ALIASES\n\n addUnitAlias('hour', 'h');\n\n // PRIORITY\n addUnitPriority('hour', 13);\n\n // PARSING\n\n function matchMeridiem(isStrict, locale) {\n return locale._meridiemParse;\n }\n\n addRegexToken('a', matchMeridiem);\n addRegexToken('A', matchMeridiem);\n addRegexToken('H', match1to2);\n addRegexToken('h', match1to2);\n addRegexToken('k', match1to2);\n addRegexToken('HH', match1to2, match2);\n addRegexToken('hh', match1to2, match2);\n addRegexToken('kk', match1to2, match2);\n\n addRegexToken('hmm', match3to4);\n addRegexToken('hmmss', match5to6);\n addRegexToken('Hmm', match3to4);\n addRegexToken('Hmmss', match5to6);\n\n addParseToken(['H', 'HH'], HOUR);\n addParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n });\n addParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n });\n addParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n });\n addParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n });\n\n // LOCALES\n\n function localeIsPM(input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return (input + '').toLowerCase().charAt(0) === 'p';\n }\n\n var defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i,\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour they want. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n getSetHour = makeGetSet('Hours', true);\n\n function localeMeridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n }\n\n var baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n\n week: defaultLocaleWeek,\n\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n\n meridiemParse: defaultLocaleMeridiemParse,\n };\n\n // internal storage for locale config files\n var locales = {},\n localeFamilies = {},\n globalLocale;\n\n function commonPrefix(arr1, arr2) {\n var i,\n minl = Math.min(arr1.length, arr2.length);\n for (i = 0; i < minl; i += 1) {\n if (arr1[i] !== arr2[i]) {\n return i;\n }\n }\n return minl;\n }\n\n function normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n }\n\n // pick the locale from the array\n // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\n function chooseLocale(names) {\n var i = 0,\n j,\n next,\n locale,\n split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (\n next &&\n next.length >= j &&\n commonPrefix(split, next) >= j - 1\n ) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return globalLocale;\n }\n\n function loadLocale(name) {\n var oldLocale = null,\n aliasedRequire;\n // TODO: Find a better way to register and load all the locales in Node\n if (\n locales[name] === undefined &&\n typeof module !== 'undefined' &&\n module &&\n module.exports\n ) {\n try {\n oldLocale = globalLocale._abbr;\n aliasedRequire = require;\n aliasedRequire('./locale/' + name);\n getSetGlobalLocale(oldLocale);\n } catch (e) {\n // mark as not found to avoid repeating expensive file require call causing high CPU\n // when trying to find en-US, en_US, en-us for every format call\n locales[name] = null; // null means not found\n }\n }\n return locales[name];\n }\n\n // This function will load locale and then set the global locale. If\n // no arguments are passed in, it will simply return the current global\n // locale key.\n function getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn(\n 'Locale ' + key + ' not found. Did you forget to load it?'\n );\n }\n }\n }\n\n return globalLocale._abbr;\n }\n\n function defineLocale(name, config) {\n if (config !== null) {\n var locale,\n parentConfig = baseConfig;\n config.abbr = name;\n if (locales[name] != null) {\n deprecateSimple(\n 'defineLocaleOverride',\n 'use moment.updateLocale(localeName, config) to change ' +\n 'an existing locale. moment.defineLocale(localeName, ' +\n 'config) should only be used for creating a new locale ' +\n 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'\n );\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n locale = loadLocale(config.parentLocale);\n if (locale != null) {\n parentConfig = locale._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config,\n });\n return null;\n }\n }\n }\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n }\n\n // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n getSetGlobalLocale(name);\n\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n }\n\n function updateLocale(name, config) {\n if (config != null) {\n var locale,\n tmpLocale,\n parentConfig = baseConfig;\n\n if (locales[name] != null && locales[name].parentLocale != null) {\n // Update existing child locale in-place to avoid memory-leaks\n locales[name].set(mergeConfigs(locales[name]._config, config));\n } else {\n // MERGE\n tmpLocale = loadLocale(name);\n if (tmpLocale != null) {\n parentConfig = tmpLocale._config;\n }\n config = mergeConfigs(parentConfig, config);\n if (tmpLocale == null) {\n // updateLocale is called for creating a new locale\n // Set abbr so it will have a name (getters return\n // undefined otherwise).\n config.abbr = name;\n }\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale;\n }\n\n // backwards compat for now: also set the locale\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n if (name === getSetGlobalLocale()) {\n getSetGlobalLocale(name);\n }\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n return locales[name];\n }\n\n // returns locale data\n function getLocale(key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n if (locale) {\n return locale;\n }\n key = [key];\n }\n\n return chooseLocale(key);\n }\n\n function listLocales() {\n return keys(locales);\n }\n\n function checkOverflow(m) {\n var overflow,\n a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow =\n a[MONTH] < 0 || a[MONTH] > 11\n ? MONTH\n : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])\n ? DATE\n : a[HOUR] < 0 ||\n a[HOUR] > 24 ||\n (a[HOUR] === 24 &&\n (a[MINUTE] !== 0 ||\n a[SECOND] !== 0 ||\n a[MILLISECOND] !== 0))\n ? HOUR\n : a[MINUTE] < 0 || a[MINUTE] > 59\n ? MINUTE\n : a[SECOND] < 0 || a[SECOND] > 59\n ? SECOND\n : a[MILLISECOND] < 0 || a[MILLISECOND] > 999\n ? MILLISECOND\n : -1;\n\n if (\n getParsingFlags(m)._overflowDayOfYear &&\n (overflow < YEAR || overflow > DATE)\n ) {\n overflow = DATE;\n }\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n }\n\n // iso 8601 regex\n // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\n var extendedIsoRegex = /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n basicIsoRegex = /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d|))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/,\n isoDates = [\n ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\n ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\n ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\n ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n ['YYYY-DDD', /\\d{4}-\\d{3}/],\n ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n ['YYYYYYMMDD', /[+-]\\d{10}/],\n ['YYYYMMDD', /\\d{8}/],\n ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\n ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n ['YYYYDDD', /\\d{7}/],\n ['YYYYMM', /\\d{6}/, false],\n ['YYYY', /\\d{4}/, false],\n ],\n // iso time formats and regexes\n isoTimes = [\n ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n ['HH:mm', /\\d\\d:\\d\\d/],\n ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n ['HHmm', /\\d\\d\\d\\d/],\n ['HH', /\\d\\d/],\n ],\n aspNetJsonRegex = /^\\/?Date\\((-?\\d+)/i,\n // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,\n obsOffsets = {\n UT: 0,\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60,\n };\n\n // date from iso format\n function configFromISO(config) {\n var i,\n l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime,\n dateFormat,\n timeFormat,\n tzFormat;\n\n if (match) {\n getParsingFlags(config).iso = true;\n\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n if (match[3]) {\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }\n\n function extractFromRFC2822Strings(\n yearStr,\n monthStr,\n dayStr,\n hourStr,\n minuteStr,\n secondStr\n ) {\n var result = [\n untruncateYear(yearStr),\n defaultLocaleMonthsShort.indexOf(monthStr),\n parseInt(dayStr, 10),\n parseInt(hourStr, 10),\n parseInt(minuteStr, 10),\n ];\n\n if (secondStr) {\n result.push(parseInt(secondStr, 10));\n }\n\n return result;\n }\n\n function untruncateYear(yearStr) {\n var year = parseInt(yearStr, 10);\n if (year <= 49) {\n return 2000 + year;\n } else if (year <= 999) {\n return 1900 + year;\n }\n return year;\n }\n\n function preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s\n .replace(/\\([^)]*\\)|[\\n\\t]/g, ' ')\n .replace(/(\\s\\s+)/g, ' ')\n .replace(/^\\s\\s*/, '')\n .replace(/\\s\\s*$/, '');\n }\n\n function checkWeekday(weekdayStr, parsedInput, config) {\n if (weekdayStr) {\n // TODO: Replace the vanilla JS Date object with an independent day-of-week check.\n var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n weekdayActual = new Date(\n parsedInput[0],\n parsedInput[1],\n parsedInput[2]\n ).getDay();\n if (weekdayProvided !== weekdayActual) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return false;\n }\n }\n return true;\n }\n\n function calculateOffset(obsOffset, militaryOffset, numOffset) {\n if (obsOffset) {\n return obsOffsets[obsOffset];\n } else if (militaryOffset) {\n // the only allowed military tz is Z\n return 0;\n } else {\n var hm = parseInt(numOffset, 10),\n m = hm % 100,\n h = (hm - m) / 100;\n return h * 60 + m;\n }\n }\n\n // date and time from ref 2822 format\n function configFromRFC2822(config) {\n var match = rfc2822.exec(preprocessRFC2822(config._i)),\n parsedArray;\n if (match) {\n parsedArray = extractFromRFC2822Strings(\n match[4],\n match[3],\n match[2],\n match[5],\n match[6],\n match[7]\n );\n if (!checkWeekday(match[1], parsedArray, config)) {\n return;\n }\n\n config._a = parsedArray;\n config._tzm = calculateOffset(match[8], match[9], match[10]);\n\n config._d = createUTCDate.apply(null, config._a);\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n }\n\n // date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict\n function configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n if (config._strict) {\n config._isValid = false;\n } else {\n // Final attempt, use Input Fallback\n hooks.createFromInputFallback(config);\n }\n }\n\n hooks.createFromInputFallback = deprecate(\n 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +\n 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +\n 'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }\n );\n\n // Pick the first defined of two or three arguments.\n function defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n if (b != null) {\n return b;\n }\n return c;\n }\n\n function currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n if (config._useUTC) {\n return [\n nowValue.getUTCFullYear(),\n nowValue.getUTCMonth(),\n nowValue.getUTCDate(),\n ];\n }\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n }\n\n // convert an array to a date.\n // the array should mirror the parameters below\n // note: all values past the year are optional and will default to the lowest possible value.\n // [year, month, day , hour, minute, second, millisecond]\n function configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n expectedWeekday,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (\n config._dayOfYear > daysInYear(yearToUse) ||\n config._dayOfYear === 0\n ) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] =\n config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (\n config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0\n ) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(\n null,\n input\n );\n expectedWeekday = config._useUTC\n ? config._d.getUTCDay()\n : config._d.getDay();\n\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n\n // check for mismatching day of week\n if (\n config._w &&\n typeof config._w.d !== 'undefined' &&\n config._w.d !== expectedWeekday\n ) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n }\n\n function dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;\n\n w = config._w;\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4;\n\n // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n weekYear = defaults(\n w.GG,\n config._a[YEAR],\n weekOfYear(createLocal(), 1, 4).year\n );\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n\n curWeek = weekOfYear(createLocal(), dow, doy);\n\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\n\n // Default to current week.\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from beginning of week\n weekday = w.e + dow;\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to beginning of week\n weekday = dow;\n }\n }\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n }\n\n // constant that refers to the ISO standard\n hooks.ISO_8601 = function () {};\n\n // constant that refers to the RFC 2822 form\n hooks.RFC_2822 = function () {};\n\n // date from string and format string\n function configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n config._a = [];\n getParsingFlags(config).empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i,\n parsedInput,\n tokens,\n token,\n skipped,\n stringLength = string.length,\n totalParsedInputLength = 0,\n era;\n\n tokens =\n expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) ||\n [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n string = string.slice(\n string.indexOf(parsedInput) + parsedInput.length\n );\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n } else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n } else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n getParsingFlags(config).charsLeftOver =\n stringLength - totalParsedInputLength;\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (\n config._a[HOUR] <= 12 &&\n getParsingFlags(config).bigHour === true &&\n config._a[HOUR] > 0\n ) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem;\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(\n config._locale,\n config._a[HOUR],\n config._meridiem\n );\n\n // handle era\n era = getParsingFlags(config).era;\n if (era !== null) {\n config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);\n }\n\n configFromArray(config);\n checkOverflow(config);\n }\n\n function meridiemFixWrap(locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n if (isPm && hour < 12) {\n hour += 12;\n }\n if (!isPm && hour === 12) {\n hour = 0;\n }\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n }\n\n // date from string and array of format strings\n function configFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n scoreToBeat,\n i,\n currentScore,\n validFormatFound,\n bestFormatIsValid = false;\n\n if (config._f.length === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n validFormatFound = false;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (isValid(tempConfig)) {\n validFormatFound = true;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n //or tokens\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n getParsingFlags(tempConfig).score = currentScore;\n\n if (!bestFormatIsValid) {\n if (\n scoreToBeat == null ||\n currentScore < scoreToBeat ||\n validFormatFound\n ) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n if (validFormatFound) {\n bestFormatIsValid = true;\n }\n }\n } else {\n if (currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }\n\n function configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i),\n dayOrDate = i.day === undefined ? i.date : i.day;\n config._a = map(\n [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],\n function (obj) {\n return obj && parseInt(obj, 10);\n }\n );\n\n configFromArray(config);\n }\n\n function createFromConfig(config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n }\n\n function prepareConfig(config) {\n var input = config._i,\n format = config._f;\n\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || (format === undefined && input === '')) {\n return createInvalid({ nullInput: true });\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n }\n\n function configFromInput(config) {\n var input = config._i;\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n }\n\n function createLocalOrUTC(input, format, locale, strict, isUTC) {\n var c = {};\n\n if (format === true || format === false) {\n strict = format;\n format = undefined;\n }\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if (\n (isObject(input) && isObjectEmpty(input)) ||\n (isArray(input) && input.length === 0)\n ) {\n input = undefined;\n }\n // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n\n return createFromConfig(c);\n }\n\n function createLocal(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n }\n\n var prototypeMin = deprecate(\n 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n }\n ),\n prototypeMax = deprecate(\n 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }\n );\n\n // Pick a moment m from moments so that m[fn](other) is true for all\n // other. This relies on the function fn to be transitive.\n //\n // moments should either be an array of moment objects or an array, whose\n // first element is an array of moment objects.\n function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }\n\n // TODO: Use [].sort instead?\n function min() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isBefore', args);\n }\n\n function max() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isAfter', args);\n }\n\n var now = function () {\n return Date.now ? Date.now() : +new Date();\n };\n\n var ordering = [\n 'year',\n 'quarter',\n 'month',\n 'week',\n 'day',\n 'hour',\n 'minute',\n 'second',\n 'millisecond',\n ];\n\n function isDurationValid(m) {\n var key,\n unitHasDecimal = false,\n i;\n for (key in m) {\n if (\n hasOwnProp(m, key) &&\n !(\n indexOf.call(ordering, key) !== -1 &&\n (m[key] == null || !isNaN(m[key]))\n )\n ) {\n return false;\n }\n }\n\n for (i = 0; i < ordering.length; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n }\n\n function isValid$1() {\n return this._isValid;\n }\n\n function createInvalid$1() {\n return createDuration(NaN);\n }\n\n function Duration(duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n\n this._isValid = isDurationValid(normalizedInput);\n\n // representation for dateAddRemove\n this._milliseconds =\n +milliseconds +\n seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n this._days = +days + weeks * 7;\n // It is impossible to translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n this._months = +months + quarters * 3 + years * 12;\n\n this._data = {};\n\n this._locale = getLocale();\n\n this._bubble();\n }\n\n function isDuration(obj) {\n return obj instanceof Duration;\n }\n\n function absRound(number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n }\n\n // compare two arrays, return the number of differences\n function compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (\n (dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))\n ) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }\n\n // FORMATTING\n\n function offset(token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset(),\n sign = '+';\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n return (\n sign +\n zeroFill(~~(offset / 60), 2) +\n separator +\n zeroFill(~~offset % 60, 2)\n );\n });\n }\n\n offset('Z', ':');\n offset('ZZ', '');\n\n // PARSING\n\n addRegexToken('Z', matchShortOffset);\n addRegexToken('ZZ', matchShortOffset);\n addParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n });\n\n // HELPERS\n\n // timezone chunker\n // '+10:00' > ['10', '00']\n // '-1530' > ['-15', '30']\n var chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\n function offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher),\n chunk,\n parts,\n minutes;\n\n if (matches === null) {\n return null;\n }\n\n chunk = matches[matches.length - 1] || [];\n parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n }\n\n // Return a moment from input, that is local/utc/zone equivalent to model.\n function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff =\n (isMoment(input) || isDate(input)\n ? input.valueOf()\n : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }\n\n function getDateOffset(m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset());\n }\n\n // HOOKS\n\n // This function will be called whenever a moment is mutated.\n // It is intended to keep the offset in sync with the timezone.\n hooks.updateOffset = function () {};\n\n // MOMENTS\n\n // keepLocalTime = true means only change the timezone, without\n // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n // +0200, so we adjust the time as needed, to be valid.\n //\n // Keeping the time actually adds/subtracts (one hour)\n // from the actual represented time. That is why we call updateOffset\n // a second time. In case it wants us to change the offset again\n // _changeInProgress == true case, then we have to adjust, because\n // there is no such time in the given timezone.\n function getSetOffset(input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(\n this,\n createDuration(input - offset, 'm'),\n 1,\n false\n );\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }\n\n function getSetZone(input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n\n return this;\n } else {\n return -this.utcOffset();\n }\n }\n\n function setOffsetToUTC(keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n }\n\n function setOffsetToLocal(keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n return this;\n }\n\n function setOffsetToParsedOffset() {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n if (tZone != null) {\n this.utcOffset(tZone);\n } else {\n this.utcOffset(0, true);\n }\n }\n return this;\n }\n\n function hasAlignedHourOffset(input) {\n if (!this.isValid()) {\n return false;\n }\n input = input ? createLocal(input).utcOffset() : 0;\n\n return (this.utcOffset() - input) % 60 === 0;\n }\n\n function isDaylightSavingTime() {\n return (\n this.utcOffset() > this.clone().month(0).utcOffset() ||\n this.utcOffset() > this.clone().month(5).utcOffset()\n );\n }\n\n function isDaylightSavingTimeShifted() {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {},\n other;\n\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted =\n this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n }\n\n function isLocal() {\n return this.isValid() ? !this._isUTC : false;\n }\n\n function isUtcOffset() {\n return this.isValid() ? this._isUTC : false;\n }\n\n function isUtc() {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n }\n\n // ASP.NET json date format regex\n var aspNetRegex = /^(-|\\+)?(?:(\\d*)[. ])?(\\d+):(\\d+)(?::(\\d+)(\\.\\d*)?)?$/,\n // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n // and further modified to allow for strings containing both week and day\n isoRegex = /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\n function createDuration(input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms: input._milliseconds,\n d: input._days,\n M: input._months,\n };\n } else if (isNumber(input) || !isNaN(+input)) {\n duration = {};\n if (key) {\n duration[key] = +input;\n } else {\n duration.milliseconds = +input;\n }\n } else if ((match = aspNetRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: 0,\n d: toInt(match[DATE]) * sign,\n h: toInt(match[HOUR]) * sign,\n m: toInt(match[MINUTE]) * sign,\n s: toInt(match[SECOND]) * sign,\n ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match\n };\n } else if ((match = isoRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: parseIso(match[2], sign),\n M: parseIso(match[3], sign),\n w: parseIso(match[4], sign),\n d: parseIso(match[5], sign),\n h: parseIso(match[6], sign),\n m: parseIso(match[7], sign),\n s: parseIso(match[8], sign),\n };\n } else if (duration == null) {\n // checks for null or undefined\n duration = {};\n } else if (\n typeof duration === 'object' &&\n ('from' in duration || 'to' in duration)\n ) {\n diffRes = momentsDifference(\n createLocal(duration.from),\n createLocal(duration.to)\n );\n\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n if (isDuration(input) && hasOwnProp(input, '_isValid')) {\n ret._isValid = input._isValid;\n }\n\n return ret;\n }\n\n createDuration.fn = Duration.prototype;\n createDuration.invalid = createInvalid$1;\n\n function parseIso(inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.'));\n // apply sign while we're at it\n return (isNaN(res) ? 0 : res) * sign;\n }\n\n function positiveMomentsDifference(base, other) {\n var res = {};\n\n res.months =\n other.month() - base.month() + (other.year() - base.year()) * 12;\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +base.clone().add(res.months, 'M');\n\n return res;\n }\n\n function momentsDifference(base, other) {\n var res;\n if (!(base.isValid() && other.isValid())) {\n return { milliseconds: 0, months: 0 };\n }\n\n other = cloneWithOffset(other, base);\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n }\n\n // TODO: remove 'name' arg after deprecation is removed\n function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }\n\n function addSubtract(mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n }\n\n var add = createAdder(1, 'add'),\n subtract = createAdder(-1, 'subtract');\n\n function isString(input) {\n return typeof input === 'string' || input instanceof String;\n }\n\n // type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined\n function isMomentInput(input) {\n return (\n isMoment(input) ||\n isDate(input) ||\n isString(input) ||\n isNumber(input) ||\n isNumberOrStringArray(input) ||\n isMomentInputObject(input) ||\n input === null ||\n input === undefined\n );\n }\n\n function isMomentInputObject(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'years',\n 'year',\n 'y',\n 'months',\n 'month',\n 'M',\n 'days',\n 'day',\n 'd',\n 'dates',\n 'date',\n 'D',\n 'hours',\n 'hour',\n 'h',\n 'minutes',\n 'minute',\n 'm',\n 'seconds',\n 'second',\n 's',\n 'milliseconds',\n 'millisecond',\n 'ms',\n ],\n i,\n property;\n\n for (i = 0; i < properties.length; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n }\n\n function isNumberOrStringArray(input) {\n var arrayTest = isArray(input),\n dataTypeTest = false;\n if (arrayTest) {\n dataTypeTest =\n input.filter(function (item) {\n return !isNumber(item) && isString(input);\n }).length === 0;\n }\n return arrayTest && dataTypeTest;\n }\n\n function isCalendarSpec(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'sameDay',\n 'nextDay',\n 'lastDay',\n 'nextWeek',\n 'lastWeek',\n 'sameElse',\n ],\n i,\n property;\n\n for (i = 0; i < properties.length; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n }\n\n function getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6\n ? 'sameElse'\n : diff < -1\n ? 'lastWeek'\n : diff < 0\n ? 'lastDay'\n : diff < 1\n ? 'sameDay'\n : diff < 2\n ? 'nextDay'\n : diff < 7\n ? 'nextWeek'\n : 'sameElse';\n }\n\n function calendar$1(time, formats) {\n // Support for single parameter, formats only overload to the calendar function\n if (arguments.length === 1) {\n if (!arguments[0]) {\n time = undefined;\n formats = undefined;\n } else if (isMomentInput(arguments[0])) {\n time = arguments[0];\n formats = undefined;\n } else if (isCalendarSpec(arguments[0])) {\n formats = arguments[0];\n time = undefined;\n }\n }\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse',\n output =\n formats &&\n (isFunction(formats[format])\n ? formats[format].call(this, now)\n : formats[format]);\n\n return this.format(\n output || this.localeData().calendar(format, this, createLocal(now))\n );\n }\n\n function clone() {\n return new Moment(this);\n }\n\n function isAfter(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n }\n\n function isBefore(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n }\n\n function isBetween(from, to, units, inclusivity) {\n var localFrom = isMoment(from) ? from : createLocal(from),\n localTo = isMoment(to) ? to : createLocal(to);\n if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n return false;\n }\n inclusivity = inclusivity || '()';\n return (\n (inclusivity[0] === '('\n ? this.isAfter(localFrom, units)\n : !this.isBefore(localFrom, units)) &&\n (inclusivity[1] === ')'\n ? this.isBefore(localTo, units)\n : !this.isAfter(localTo, units))\n );\n }\n\n function isSame(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return (\n this.clone().startOf(units).valueOf() <= inputMs &&\n inputMs <= this.clone().endOf(units).valueOf()\n );\n }\n }\n\n function isSameOrAfter(input, units) {\n return this.isSame(input, units) || this.isAfter(input, units);\n }\n\n function isSameOrBefore(input, units) {\n return this.isSame(input, units) || this.isBefore(input, units);\n }\n\n function diff(input, units, asFloat) {\n var that, zoneDelta, output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n\n units = normalizeUnits(units);\n\n switch (units) {\n case 'year':\n output = monthDiff(this, that) / 12;\n break;\n case 'month':\n output = monthDiff(this, that);\n break;\n case 'quarter':\n output = monthDiff(this, that) / 3;\n break;\n case 'second':\n output = (this - that) / 1e3;\n break; // 1000\n case 'minute':\n output = (this - that) / 6e4;\n break; // 1000 * 60\n case 'hour':\n output = (this - that) / 36e5;\n break; // 1000 * 60 * 60\n case 'day':\n output = (this - that - zoneDelta) / 864e5;\n break; // 1000 * 60 * 60 * 24, negate dst\n case 'week':\n output = (this - that - zoneDelta) / 6048e5;\n break; // 1000 * 60 * 60 * 24 * 7, negate dst\n default:\n output = this - that;\n }\n\n return asFloat ? output : absFloor(output);\n }\n\n function monthDiff(a, b) {\n if (a.date() < b.date()) {\n // end-of-month calculations work correct when the start month has more\n // days than the end month.\n return -monthDiff(b, a);\n }\n // difference in months\n var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2,\n adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor2 - anchor);\n }\n\n //check for negative zero, return zero if negative zero\n return -(wholeMonthDiff + adjust) || 0;\n }\n\n hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\n hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\n function toString() {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n }\n\n function toISOString(keepOffset) {\n if (!this.isValid()) {\n return null;\n }\n var utc = keepOffset !== true,\n m = utc ? this.clone().utc() : this;\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(\n m,\n utc\n ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'\n : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n }\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n if (utc) {\n return this.toDate().toISOString();\n } else {\n return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)\n .toISOString()\n .replace('Z', formatMoment(m, 'Z'));\n }\n }\n return formatMoment(\n m,\n utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n }\n\n /**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\n function inspect() {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment',\n zone = '',\n prefix,\n year,\n datetime,\n suffix;\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n prefix = '[' + func + '(\"]';\n year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n datetime = '-MM-DD[T]HH:mm:ss.SSS';\n suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n }\n\n function format(inputString) {\n if (!inputString) {\n inputString = this.isUtc()\n ? hooks.defaultFormatUtc\n : hooks.defaultFormat;\n }\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n }\n\n function from(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ to: this, from: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n }\n\n function fromNow(withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n }\n\n function to(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ from: this, to: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n }\n\n function toNow(withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n }\n\n // If passed a locale key, it will set the locale for this\n // instance. Otherwise, it will return the locale configuration\n // variables for this instance.\n function locale(key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n }\n\n var lang = deprecate(\n 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n }\n );\n\n function localeData() {\n return this._locale;\n }\n\n var MS_PER_SECOND = 1000,\n MS_PER_MINUTE = 60 * MS_PER_SECOND,\n MS_PER_HOUR = 60 * MS_PER_MINUTE,\n MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;\n\n // actual modulo - handles negative numbers (for dates before 1970):\n function mod$1(dividend, divisor) {\n return ((dividend % divisor) + divisor) % divisor;\n }\n\n function localStartOfDate(y, m, d) {\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return new Date(y, m, d).valueOf();\n }\n }\n\n function utcStartOfDate(y, m, d) {\n // Date.UTC remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return Date.UTC(y, m, d);\n }\n }\n\n function startOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year(), 0, 1);\n break;\n case 'quarter':\n time = startOfDate(\n this.year(),\n this.month() - (this.month() % 3),\n 1\n );\n break;\n case 'month':\n time = startOfDate(this.year(), this.month(), 1);\n break;\n case 'week':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday()\n );\n break;\n case 'isoWeek':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1)\n );\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date());\n break;\n case 'hour':\n time = this._d.valueOf();\n time -= mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n );\n break;\n case 'minute':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_MINUTE);\n break;\n case 'second':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_SECOND);\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n }\n\n function endOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year() + 1, 0, 1) - 1;\n break;\n case 'quarter':\n time =\n startOfDate(\n this.year(),\n this.month() - (this.month() % 3) + 3,\n 1\n ) - 1;\n break;\n case 'month':\n time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n break;\n case 'week':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday() + 7\n ) - 1;\n break;\n case 'isoWeek':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1) + 7\n ) - 1;\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n break;\n case 'hour':\n time = this._d.valueOf();\n time +=\n MS_PER_HOUR -\n mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n ) -\n 1;\n break;\n case 'minute':\n time = this._d.valueOf();\n time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n break;\n case 'second':\n time = this._d.valueOf();\n time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n }\n\n function valueOf() {\n return this._d.valueOf() - (this._offset || 0) * 60000;\n }\n\n function unix() {\n return Math.floor(this.valueOf() / 1000);\n }\n\n function toDate() {\n return new Date(this.valueOf());\n }\n\n function toArray() {\n var m = this;\n return [\n m.year(),\n m.month(),\n m.date(),\n m.hour(),\n m.minute(),\n m.second(),\n m.millisecond(),\n ];\n }\n\n function toObject() {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds(),\n };\n }\n\n function toJSON() {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n }\n\n function isValid$2() {\n return isValid(this);\n }\n\n function parsingFlags() {\n return extend({}, getParsingFlags(this));\n }\n\n function invalidAt() {\n return getParsingFlags(this).overflow;\n }\n\n function creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict,\n };\n }\n\n addFormatToken('N', 0, 0, 'eraAbbr');\n addFormatToken('NN', 0, 0, 'eraAbbr');\n addFormatToken('NNN', 0, 0, 'eraAbbr');\n addFormatToken('NNNN', 0, 0, 'eraName');\n addFormatToken('NNNNN', 0, 0, 'eraNarrow');\n\n addFormatToken('y', ['y', 1], 'yo', 'eraYear');\n addFormatToken('y', ['yy', 2], 0, 'eraYear');\n addFormatToken('y', ['yyy', 3], 0, 'eraYear');\n addFormatToken('y', ['yyyy', 4], 0, 'eraYear');\n\n addRegexToken('N', matchEraAbbr);\n addRegexToken('NN', matchEraAbbr);\n addRegexToken('NNN', matchEraAbbr);\n addRegexToken('NNNN', matchEraName);\n addRegexToken('NNNNN', matchEraNarrow);\n\n addParseToken(['N', 'NN', 'NNN', 'NNNN', 'NNNNN'], function (\n input,\n array,\n config,\n token\n ) {\n var era = config._locale.erasParse(input, token, config._strict);\n if (era) {\n getParsingFlags(config).era = era;\n } else {\n getParsingFlags(config).invalidEra = input;\n }\n });\n\n addRegexToken('y', matchUnsigned);\n addRegexToken('yy', matchUnsigned);\n addRegexToken('yyy', matchUnsigned);\n addRegexToken('yyyy', matchUnsigned);\n addRegexToken('yo', matchEraYearOrdinal);\n\n addParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);\n addParseToken(['yo'], function (input, array, config, token) {\n var match;\n if (config._locale._eraYearOrdinalRegex) {\n match = input.match(config._locale._eraYearOrdinalRegex);\n }\n\n if (config._locale.eraYearOrdinalParse) {\n array[YEAR] = config._locale.eraYearOrdinalParse(input, match);\n } else {\n array[YEAR] = parseInt(input, 10);\n }\n });\n\n function localeEras(m, format) {\n var i,\n l,\n date,\n eras = this._eras || getLocale('en')._eras;\n for (i = 0, l = eras.length; i < l; ++i) {\n switch (typeof eras[i].since) {\n case 'string':\n // truncate time\n date = hooks(eras[i].since).startOf('day');\n eras[i].since = date.valueOf();\n break;\n }\n\n switch (typeof eras[i].until) {\n case 'undefined':\n eras[i].until = +Infinity;\n break;\n case 'string':\n // truncate time\n date = hooks(eras[i].until).startOf('day').valueOf();\n eras[i].until = date.valueOf();\n break;\n }\n }\n return eras;\n }\n\n function localeErasParse(eraName, format, strict) {\n var i,\n l,\n eras = this.eras(),\n name,\n abbr,\n narrow;\n eraName = eraName.toUpperCase();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n name = eras[i].name.toUpperCase();\n abbr = eras[i].abbr.toUpperCase();\n narrow = eras[i].narrow.toUpperCase();\n\n if (strict) {\n switch (format) {\n case 'N':\n case 'NN':\n case 'NNN':\n if (abbr === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNN':\n if (name === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNNN':\n if (narrow === eraName) {\n return eras[i];\n }\n break;\n }\n } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {\n return eras[i];\n }\n }\n }\n\n function localeErasConvertYear(era, year) {\n var dir = era.since <= era.until ? +1 : -1;\n if (year === undefined) {\n return hooks(era.since).year();\n } else {\n return hooks(era.since).year() + (year - era.offset) * dir;\n }\n }\n\n function getEraName() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].name;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].name;\n }\n }\n\n return '';\n }\n\n function getEraNarrow() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].narrow;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].narrow;\n }\n }\n\n return '';\n }\n\n function getEraAbbr() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].abbr;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].abbr;\n }\n }\n\n return '';\n }\n\n function getEraYear() {\n var i,\n l,\n dir,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n dir = eras[i].since <= eras[i].until ? +1 : -1;\n\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (\n (eras[i].since <= val && val <= eras[i].until) ||\n (eras[i].until <= val && val <= eras[i].since)\n ) {\n return (\n (this.year() - hooks(eras[i].since).year()) * dir +\n eras[i].offset\n );\n }\n }\n\n return this.year();\n }\n\n function erasNameRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNameRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNameRegex : this._erasRegex;\n }\n\n function erasAbbrRegex(isStrict) {\n if (!hasOwnProp(this, '_erasAbbrRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasAbbrRegex : this._erasRegex;\n }\n\n function erasNarrowRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNarrowRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNarrowRegex : this._erasRegex;\n }\n\n function matchEraAbbr(isStrict, locale) {\n return locale.erasAbbrRegex(isStrict);\n }\n\n function matchEraName(isStrict, locale) {\n return locale.erasNameRegex(isStrict);\n }\n\n function matchEraNarrow(isStrict, locale) {\n return locale.erasNarrowRegex(isStrict);\n }\n\n function matchEraYearOrdinal(isStrict, locale) {\n return locale._eraYearOrdinalRegex || matchUnsigned;\n }\n\n function computeErasParse() {\n var abbrPieces = [],\n namePieces = [],\n narrowPieces = [],\n mixedPieces = [],\n i,\n l,\n eras = this.eras();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n namePieces.push(regexEscape(eras[i].name));\n abbrPieces.push(regexEscape(eras[i].abbr));\n narrowPieces.push(regexEscape(eras[i].narrow));\n\n mixedPieces.push(regexEscape(eras[i].name));\n mixedPieces.push(regexEscape(eras[i].abbr));\n mixedPieces.push(regexEscape(eras[i].narrow));\n }\n\n this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');\n this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');\n this._erasNarrowRegex = new RegExp(\n '^(' + narrowPieces.join('|') + ')',\n 'i'\n );\n }\n\n // FORMATTING\n\n addFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n });\n\n addFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n });\n\n function addWeekYearFormatToken(token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n }\n\n addWeekYearFormatToken('gggg', 'weekYear');\n addWeekYearFormatToken('ggggg', 'weekYear');\n addWeekYearFormatToken('GGGG', 'isoWeekYear');\n addWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n // ALIASES\n\n addUnitAlias('weekYear', 'gg');\n addUnitAlias('isoWeekYear', 'GG');\n\n // PRIORITY\n\n addUnitPriority('weekYear', 1);\n addUnitPriority('isoWeekYear', 1);\n\n // PARSING\n\n addRegexToken('G', matchSigned);\n addRegexToken('g', matchSigned);\n addRegexToken('GG', match1to2, match2);\n addRegexToken('gg', match1to2, match2);\n addRegexToken('GGGG', match1to4, match4);\n addRegexToken('gggg', match1to4, match4);\n addRegexToken('GGGGG', match1to6, match6);\n addRegexToken('ggggg', match1to6, match6);\n\n addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (\n input,\n week,\n config,\n token\n ) {\n week[token.substr(0, 2)] = toInt(input);\n });\n\n addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n });\n\n // MOMENTS\n\n function getSetWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.week(),\n this.weekday(),\n this.localeData()._week.dow,\n this.localeData()._week.doy\n );\n }\n\n function getSetISOWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.isoWeek(),\n this.isoWeekday(),\n 1,\n 4\n );\n }\n\n function getISOWeeksInYear() {\n return weeksInYear(this.year(), 1, 4);\n }\n\n function getISOWeeksInISOWeekYear() {\n return weeksInYear(this.isoWeekYear(), 1, 4);\n }\n\n function getWeeksInYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n }\n\n function getWeeksInWeekYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);\n }\n\n function getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n }\n\n function setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n }\n\n // FORMATTING\n\n addFormatToken('Q', 0, 'Qo', 'quarter');\n\n // ALIASES\n\n addUnitAlias('quarter', 'Q');\n\n // PRIORITY\n\n addUnitPriority('quarter', 7);\n\n // PARSING\n\n addRegexToken('Q', match1);\n addParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n });\n\n // MOMENTS\n\n function getSetQuarter(input) {\n return input == null\n ? Math.ceil((this.month() + 1) / 3)\n : this.month((input - 1) * 3 + (this.month() % 3));\n }\n\n // FORMATTING\n\n addFormatToken('D', ['DD', 2], 'Do', 'date');\n\n // ALIASES\n\n addUnitAlias('date', 'D');\n\n // PRIORITY\n addUnitPriority('date', 9);\n\n // PARSING\n\n addRegexToken('D', match1to2);\n addRegexToken('DD', match1to2, match2);\n addRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict\n ? locale._dayOfMonthOrdinalParse || locale._ordinalParse\n : locale._dayOfMonthOrdinalParseLenient;\n });\n\n addParseToken(['D', 'DD'], DATE);\n addParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0]);\n });\n\n // MOMENTS\n\n var getSetDayOfMonth = makeGetSet('Date', true);\n\n // FORMATTING\n\n addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n // ALIASES\n\n addUnitAlias('dayOfYear', 'DDD');\n\n // PRIORITY\n addUnitPriority('dayOfYear', 4);\n\n // PARSING\n\n addRegexToken('DDD', match1to3);\n addRegexToken('DDDD', match3);\n addParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n });\n\n // HELPERS\n\n // MOMENTS\n\n function getSetDayOfYear(input) {\n var dayOfYear =\n Math.round(\n (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5\n ) + 1;\n return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n }\n\n // FORMATTING\n\n addFormatToken('m', ['mm', 2], 0, 'minute');\n\n // ALIASES\n\n addUnitAlias('minute', 'm');\n\n // PRIORITY\n\n addUnitPriority('minute', 14);\n\n // PARSING\n\n addRegexToken('m', match1to2);\n addRegexToken('mm', match1to2, match2);\n addParseToken(['m', 'mm'], MINUTE);\n\n // MOMENTS\n\n var getSetMinute = makeGetSet('Minutes', false);\n\n // FORMATTING\n\n addFormatToken('s', ['ss', 2], 0, 'second');\n\n // ALIASES\n\n addUnitAlias('second', 's');\n\n // PRIORITY\n\n addUnitPriority('second', 15);\n\n // PARSING\n\n addRegexToken('s', match1to2);\n addRegexToken('ss', match1to2, match2);\n addParseToken(['s', 'ss'], SECOND);\n\n // MOMENTS\n\n var getSetSecond = makeGetSet('Seconds', false);\n\n // FORMATTING\n\n addFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n });\n\n addFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n });\n\n addFormatToken(0, ['SSS', 3], 0, 'millisecond');\n addFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n });\n addFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n });\n addFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n });\n addFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n });\n addFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n });\n addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n });\n\n // ALIASES\n\n addUnitAlias('millisecond', 'ms');\n\n // PRIORITY\n\n addUnitPriority('millisecond', 16);\n\n // PARSING\n\n addRegexToken('S', match1to3, match1);\n addRegexToken('SS', match1to3, match2);\n addRegexToken('SSS', match1to3, match3);\n\n var token, getSetMillisecond;\n for (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n }\n\n function parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n }\n\n for (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n }\n\n getSetMillisecond = makeGetSet('Milliseconds', false);\n\n // FORMATTING\n\n addFormatToken('z', 0, 0, 'zoneAbbr');\n addFormatToken('zz', 0, 0, 'zoneName');\n\n // MOMENTS\n\n function getZoneAbbr() {\n return this._isUTC ? 'UTC' : '';\n }\n\n function getZoneName() {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n }\n\n var proto = Moment.prototype;\n\n proto.add = add;\n proto.calendar = calendar$1;\n proto.clone = clone;\n proto.diff = diff;\n proto.endOf = endOf;\n proto.format = format;\n proto.from = from;\n proto.fromNow = fromNow;\n proto.to = to;\n proto.toNow = toNow;\n proto.get = stringGet;\n proto.invalidAt = invalidAt;\n proto.isAfter = isAfter;\n proto.isBefore = isBefore;\n proto.isBetween = isBetween;\n proto.isSame = isSame;\n proto.isSameOrAfter = isSameOrAfter;\n proto.isSameOrBefore = isSameOrBefore;\n proto.isValid = isValid$2;\n proto.lang = lang;\n proto.locale = locale;\n proto.localeData = localeData;\n proto.max = prototypeMax;\n proto.min = prototypeMin;\n proto.parsingFlags = parsingFlags;\n proto.set = stringSet;\n proto.startOf = startOf;\n proto.subtract = subtract;\n proto.toArray = toArray;\n proto.toObject = toObject;\n proto.toDate = toDate;\n proto.toISOString = toISOString;\n proto.inspect = inspect;\n if (typeof Symbol !== 'undefined' && Symbol.for != null) {\n proto[Symbol.for('nodejs.util.inspect.custom')] = function () {\n return 'Moment<' + this.format() + '>';\n };\n }\n proto.toJSON = toJSON;\n proto.toString = toString;\n proto.unix = unix;\n proto.valueOf = valueOf;\n proto.creationData = creationData;\n proto.eraName = getEraName;\n proto.eraNarrow = getEraNarrow;\n proto.eraAbbr = getEraAbbr;\n proto.eraYear = getEraYear;\n proto.year = getSetYear;\n proto.isLeapYear = getIsLeapYear;\n proto.weekYear = getSetWeekYear;\n proto.isoWeekYear = getSetISOWeekYear;\n proto.quarter = proto.quarters = getSetQuarter;\n proto.month = getSetMonth;\n proto.daysInMonth = getDaysInMonth;\n proto.week = proto.weeks = getSetWeek;\n proto.isoWeek = proto.isoWeeks = getSetISOWeek;\n proto.weeksInYear = getWeeksInYear;\n proto.weeksInWeekYear = getWeeksInWeekYear;\n proto.isoWeeksInYear = getISOWeeksInYear;\n proto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;\n proto.date = getSetDayOfMonth;\n proto.day = proto.days = getSetDayOfWeek;\n proto.weekday = getSetLocaleDayOfWeek;\n proto.isoWeekday = getSetISODayOfWeek;\n proto.dayOfYear = getSetDayOfYear;\n proto.hour = proto.hours = getSetHour;\n proto.minute = proto.minutes = getSetMinute;\n proto.second = proto.seconds = getSetSecond;\n proto.millisecond = proto.milliseconds = getSetMillisecond;\n proto.utcOffset = getSetOffset;\n proto.utc = setOffsetToUTC;\n proto.local = setOffsetToLocal;\n proto.parseZone = setOffsetToParsedOffset;\n proto.hasAlignedHourOffset = hasAlignedHourOffset;\n proto.isDST = isDaylightSavingTime;\n proto.isLocal = isLocal;\n proto.isUtcOffset = isUtcOffset;\n proto.isUtc = isUtc;\n proto.isUTC = isUtc;\n proto.zoneAbbr = getZoneAbbr;\n proto.zoneName = getZoneName;\n proto.dates = deprecate(\n 'dates accessor is deprecated. Use date instead.',\n getSetDayOfMonth\n );\n proto.months = deprecate(\n 'months accessor is deprecated. Use month instead',\n getSetMonth\n );\n proto.years = deprecate(\n 'years accessor is deprecated. Use year instead',\n getSetYear\n );\n proto.zone = deprecate(\n 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',\n getSetZone\n );\n proto.isDSTShifted = deprecate(\n 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',\n isDaylightSavingTimeShifted\n );\n\n function createUnix(input) {\n return createLocal(input * 1000);\n }\n\n function createInZone() {\n return createLocal.apply(null, arguments).parseZone();\n }\n\n function preParsePostFormat(string) {\n return string;\n }\n\n var proto$1 = Locale.prototype;\n\n proto$1.calendar = calendar;\n proto$1.longDateFormat = longDateFormat;\n proto$1.invalidDate = invalidDate;\n proto$1.ordinal = ordinal;\n proto$1.preparse = preParsePostFormat;\n proto$1.postformat = preParsePostFormat;\n proto$1.relativeTime = relativeTime;\n proto$1.pastFuture = pastFuture;\n proto$1.set = set;\n proto$1.eras = localeEras;\n proto$1.erasParse = localeErasParse;\n proto$1.erasConvertYear = localeErasConvertYear;\n proto$1.erasAbbrRegex = erasAbbrRegex;\n proto$1.erasNameRegex = erasNameRegex;\n proto$1.erasNarrowRegex = erasNarrowRegex;\n\n proto$1.months = localeMonths;\n proto$1.monthsShort = localeMonthsShort;\n proto$1.monthsParse = localeMonthsParse;\n proto$1.monthsRegex = monthsRegex;\n proto$1.monthsShortRegex = monthsShortRegex;\n proto$1.week = localeWeek;\n proto$1.firstDayOfYear = localeFirstDayOfYear;\n proto$1.firstDayOfWeek = localeFirstDayOfWeek;\n\n proto$1.weekdays = localeWeekdays;\n proto$1.weekdaysMin = localeWeekdaysMin;\n proto$1.weekdaysShort = localeWeekdaysShort;\n proto$1.weekdaysParse = localeWeekdaysParse;\n\n proto$1.weekdaysRegex = weekdaysRegex;\n proto$1.weekdaysShortRegex = weekdaysShortRegex;\n proto$1.weekdaysMinRegex = weekdaysMinRegex;\n\n proto$1.isPM = localeIsPM;\n proto$1.meridiem = localeMeridiem;\n\n function get$1(format, index, field, setter) {\n var locale = getLocale(),\n utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n }\n\n function listMonthsImpl(format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i,\n out = [];\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n return out;\n }\n\n // ()\n // (5)\n // (fmt, 5)\n // (fmt)\n // (true)\n // (true, 5)\n // (true, fmt, 5)\n // (true, fmt)\n function listWeekdaysImpl(localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0,\n i,\n out = [];\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n return out;\n }\n\n function listMonths(format, index) {\n return listMonthsImpl(format, index, 'months');\n }\n\n function listMonthsShort(format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n }\n\n function listWeekdays(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n }\n\n function listWeekdaysShort(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n }\n\n function listWeekdaysMin(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n }\n\n getSetGlobalLocale('en', {\n eras: [\n {\n since: '0001-01-01',\n until: +Infinity,\n offset: 1,\n name: 'Anno Domini',\n narrow: 'AD',\n abbr: 'AD',\n },\n {\n since: '0000-12-31',\n until: -Infinity,\n offset: 1,\n name: 'Before Christ',\n narrow: 'BC',\n abbr: 'BC',\n },\n ],\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n toInt((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n });\n\n // Side effect imports\n\n hooks.lang = deprecate(\n 'moment.lang is deprecated. Use moment.locale instead.',\n getSetGlobalLocale\n );\n hooks.langData = deprecate(\n 'moment.langData is deprecated. Use moment.localeData instead.',\n getLocale\n );\n\n var mathAbs = Math.abs;\n\n function abs() {\n var data = this._data;\n\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n\n return this;\n }\n\n function addSubtract$1(duration, input, value, direction) {\n var other = createDuration(input, value);\n\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n\n return duration._bubble();\n }\n\n // supports only 2.0-style add(1, 's') or add(duration)\n function add$1(input, value) {\n return addSubtract$1(this, input, value, 1);\n }\n\n // supports only 2.0-style subtract(1, 's') or subtract(duration)\n function subtract$1(input, value) {\n return addSubtract$1(this, input, value, -1);\n }\n\n function absCeil(number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n }\n\n function bubble() {\n var milliseconds = this._milliseconds,\n days = this._days,\n months = this._months,\n data = this._data,\n seconds,\n minutes,\n hours,\n years,\n monthsFromDays;\n\n // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n if (\n !(\n (milliseconds >= 0 && days >= 0 && months >= 0) ||\n (milliseconds <= 0 && days <= 0 && months <= 0)\n )\n ) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n }\n\n // The following code bubbles up values, see the tests for\n // examples of what that means.\n data.milliseconds = milliseconds % 1000;\n\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n\n days += absFloor(hours / 24);\n\n // convert days to months\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays));\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n data.days = days;\n data.months = months;\n data.years = years;\n\n return this;\n }\n\n function daysToMonths(days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return (days * 4800) / 146097;\n }\n\n function monthsToDays(months) {\n // the reverse of daysToMonths\n return (months * 146097) / 4800;\n }\n\n function as(units) {\n if (!this.isValid()) {\n return NaN;\n }\n var days,\n months,\n milliseconds = this._milliseconds;\n\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'quarter' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n switch (units) {\n case 'month':\n return months;\n case 'quarter':\n return months / 3;\n case 'year':\n return months / 12;\n }\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n switch (units) {\n case 'week':\n return days / 7 + milliseconds / 6048e5;\n case 'day':\n return days + milliseconds / 864e5;\n case 'hour':\n return days * 24 + milliseconds / 36e5;\n case 'minute':\n return days * 1440 + milliseconds / 6e4;\n case 'second':\n return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n case 'millisecond':\n return Math.floor(days * 864e5) + milliseconds;\n default:\n throw new Error('Unknown unit ' + units);\n }\n }\n }\n\n // TODO: Use this.as('ms')?\n function valueOf$1() {\n if (!this.isValid()) {\n return NaN;\n }\n return (\n this._milliseconds +\n this._days * 864e5 +\n (this._months % 12) * 2592e6 +\n toInt(this._months / 12) * 31536e6\n );\n }\n\n function makeAs(alias) {\n return function () {\n return this.as(alias);\n };\n }\n\n var asMilliseconds = makeAs('ms'),\n asSeconds = makeAs('s'),\n asMinutes = makeAs('m'),\n asHours = makeAs('h'),\n asDays = makeAs('d'),\n asWeeks = makeAs('w'),\n asMonths = makeAs('M'),\n asQuarters = makeAs('Q'),\n asYears = makeAs('y');\n\n function clone$1() {\n return createDuration(this);\n }\n\n function get$2(units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n }\n\n function makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n }\n\n var milliseconds = makeGetter('milliseconds'),\n seconds = makeGetter('seconds'),\n minutes = makeGetter('minutes'),\n hours = makeGetter('hours'),\n days = makeGetter('days'),\n months = makeGetter('months'),\n years = makeGetter('years');\n\n function weeks() {\n return absFloor(this.days() / 7);\n }\n\n var round = Math.round,\n thresholds = {\n ss: 44, // a few seconds to seconds\n s: 45, // seconds to minute\n m: 45, // minutes to hour\n h: 22, // hours to day\n d: 26, // days to month/week\n w: null, // weeks to month\n M: 11, // months to year\n };\n\n // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\n function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n }\n\n function relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {\n var duration = createDuration(posNegDuration).abs(),\n seconds = round(duration.as('s')),\n minutes = round(duration.as('m')),\n hours = round(duration.as('h')),\n days = round(duration.as('d')),\n months = round(duration.as('M')),\n weeks = round(duration.as('w')),\n years = round(duration.as('y')),\n a =\n (seconds <= thresholds.ss && ['s', seconds]) ||\n (seconds < thresholds.s && ['ss', seconds]) ||\n (minutes <= 1 && ['m']) ||\n (minutes < thresholds.m && ['mm', minutes]) ||\n (hours <= 1 && ['h']) ||\n (hours < thresholds.h && ['hh', hours]) ||\n (days <= 1 && ['d']) ||\n (days < thresholds.d && ['dd', days]);\n\n if (thresholds.w != null) {\n a =\n a ||\n (weeks <= 1 && ['w']) ||\n (weeks < thresholds.w && ['ww', weeks]);\n }\n a = a ||\n (months <= 1 && ['M']) ||\n (months < thresholds.M && ['MM', months]) ||\n (years <= 1 && ['y']) || ['yy', years];\n\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n }\n\n // This function allows you to set the rounding function for relative time strings\n function getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof roundingFunction === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n }\n\n // This function allows you to set a threshold for relative time strings\n function getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }\n\n function humanize(argWithSuffix, argThresholds) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var withSuffix = false,\n th = thresholds,\n locale,\n output;\n\n if (typeof argWithSuffix === 'object') {\n argThresholds = argWithSuffix;\n argWithSuffix = false;\n }\n if (typeof argWithSuffix === 'boolean') {\n withSuffix = argWithSuffix;\n }\n if (typeof argThresholds === 'object') {\n th = Object.assign({}, thresholds, argThresholds);\n if (argThresholds.s != null && argThresholds.ss == null) {\n th.ss = argThresholds.s - 1;\n }\n }\n\n locale = this.localeData();\n output = relativeTime$1(this, !withSuffix, th, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n }\n\n var abs$1 = Math.abs;\n\n function sign(x) {\n return (x > 0) - (x < 0) || +x;\n }\n\n function toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000,\n days = abs$1(this._days),\n months = abs$1(this._months),\n minutes,\n hours,\n years,\n s,\n total = this.asSeconds(),\n totalSign,\n ymSign,\n daysSign,\n hmsSign;\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n // 3600 seconds -> 60 minutes -> 1 hour\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60;\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n\n totalSign = total < 0 ? '-' : '';\n ymSign = sign(this._months) !== sign(total) ? '-' : '';\n daysSign = sign(this._days) !== sign(total) ? '-' : '';\n hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n\n return (\n totalSign +\n 'P' +\n (years ? ymSign + years + 'Y' : '') +\n (months ? ymSign + months + 'M' : '') +\n (days ? daysSign + days + 'D' : '') +\n (hours || minutes || seconds ? 'T' : '') +\n (hours ? hmsSign + hours + 'H' : '') +\n (minutes ? hmsSign + minutes + 'M' : '') +\n (seconds ? hmsSign + s + 'S' : '')\n );\n }\n\n var proto$2 = Duration.prototype;\n\n proto$2.isValid = isValid$1;\n proto$2.abs = abs;\n proto$2.add = add$1;\n proto$2.subtract = subtract$1;\n proto$2.as = as;\n proto$2.asMilliseconds = asMilliseconds;\n proto$2.asSeconds = asSeconds;\n proto$2.asMinutes = asMinutes;\n proto$2.asHours = asHours;\n proto$2.asDays = asDays;\n proto$2.asWeeks = asWeeks;\n proto$2.asMonths = asMonths;\n proto$2.asQuarters = asQuarters;\n proto$2.asYears = asYears;\n proto$2.valueOf = valueOf$1;\n proto$2._bubble = bubble;\n proto$2.clone = clone$1;\n proto$2.get = get$2;\n proto$2.milliseconds = milliseconds;\n proto$2.seconds = seconds;\n proto$2.minutes = minutes;\n proto$2.hours = hours;\n proto$2.days = days;\n proto$2.weeks = weeks;\n proto$2.months = months;\n proto$2.years = years;\n proto$2.humanize = humanize;\n proto$2.toISOString = toISOString$1;\n proto$2.toString = toISOString$1;\n proto$2.toJSON = toISOString$1;\n proto$2.locale = locale;\n proto$2.localeData = localeData;\n\n proto$2.toIsoString = deprecate(\n 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',\n toISOString$1\n );\n proto$2.lang = lang;\n\n // FORMATTING\n\n addFormatToken('X', 0, 0, 'unix');\n addFormatToken('x', 0, 0, 'valueOf');\n\n // PARSING\n\n addRegexToken('x', matchSigned);\n addRegexToken('X', matchTimestamp);\n addParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input) * 1000);\n });\n addParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n });\n\n //! moment.js\n\n hooks.version = '2.29.1';\n\n setHookCallback(createLocal);\n\n hooks.fn = proto;\n hooks.min = min;\n hooks.max = max;\n hooks.now = now;\n hooks.utc = createUTC;\n hooks.unix = createUnix;\n hooks.months = listMonths;\n hooks.isDate = isDate;\n hooks.locale = getSetGlobalLocale;\n hooks.invalid = createInvalid;\n hooks.duration = createDuration;\n hooks.isMoment = isMoment;\n hooks.weekdays = listWeekdays;\n hooks.parseZone = createInZone;\n hooks.localeData = getLocale;\n hooks.isDuration = isDuration;\n hooks.monthsShort = listMonthsShort;\n hooks.weekdaysMin = listWeekdaysMin;\n hooks.defineLocale = defineLocale;\n hooks.updateLocale = updateLocale;\n hooks.locales = listLocales;\n hooks.weekdaysShort = listWeekdaysShort;\n hooks.normalizeUnits = normalizeUnits;\n hooks.relativeTimeRounding = getSetRelativeTimeRounding;\n hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\n hooks.calendarFormat = getCalendarFormat;\n hooks.prototype = proto;\n\n // currently HTML5 input type only supports 24-hour formats\n hooks.HTML5_FMT = {\n DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // \n DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // \n DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // \n DATE: 'YYYY-MM-DD', // \n TIME: 'HH:mm', // \n TIME_SECONDS: 'HH:mm:ss', // \n TIME_MS: 'HH:mm:ss.SSS', // \n WEEK: 'GGGG-[W]WW', // \n MONTH: 'YYYY-MM', // \n };\n\n return hooks;\n\n})));\n", "/*!\n * Pikaday\n *\n * Copyright \u00A9 2014 David Bushell | BSD & MIT license | https://github.com/Pikaday/Pikaday\n */\n\n(function (root, factory)\n{\n 'use strict';\n\n var moment;\n if (typeof exports === 'object') {\n // CommonJS module\n // Load moment.js as an optional dependency\n try { moment = require('moment'); } catch (e) {}\n module.exports = factory(moment);\n } else if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module.\n define(function (req)\n {\n // Load moment.js as an optional dependency\n var id = 'moment';\n try { moment = req(id); } catch (e) {}\n return factory(moment);\n });\n } else {\n root.Pikaday = factory(root.moment);\n }\n}(this, function (moment)\n{\n 'use strict';\n\n /**\n * feature detection and helper functions\n */\n var hasMoment = typeof moment === 'function',\n\n hasEventListeners = !!window.addEventListener,\n\n document = window.document,\n\n sto = window.setTimeout,\n\n addEvent = function(el, e, callback, capture)\n {\n if (hasEventListeners) {\n el.addEventListener(e, callback, !!capture);\n } else {\n el.attachEvent('on' + e, callback);\n }\n },\n\n removeEvent = function(el, e, callback, capture)\n {\n if (hasEventListeners) {\n el.removeEventListener(e, callback, !!capture);\n } else {\n el.detachEvent('on' + e, callback);\n }\n },\n\n trim = function(str)\n {\n return str.trim ? str.trim() : str.replace(/^\\s+|\\s+$/g,'');\n },\n\n hasClass = function(el, cn)\n {\n return (' ' + el.className + ' ').indexOf(' ' + cn + ' ') !== -1;\n },\n\n addClass = function(el, cn)\n {\n if (!hasClass(el, cn)) {\n el.className = (el.className === '') ? cn : el.className + ' ' + cn;\n }\n },\n\n removeClass = function(el, cn)\n {\n el.className = trim((' ' + el.className + ' ').replace(' ' + cn + ' ', ' '));\n },\n\n isArray = function(obj)\n {\n return (/Array/).test(Object.prototype.toString.call(obj));\n },\n\n isDate = function(obj)\n {\n return (/Date/).test(Object.prototype.toString.call(obj)) && !isNaN(obj.getTime());\n },\n\n isWeekend = function(date)\n {\n var day = date.getDay();\n return day === 0 || day === 6;\n },\n\n isLeapYear = function(year)\n {\n // solution lifted from date.js (MIT license): https://github.com/datejs/Datejs\n return ((year % 4 === 0 && year % 100 !== 0) || year % 400 === 0);\n },\n\n getDaysInMonth = function(year, month)\n {\n return [31, isLeapYear(year) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month];\n },\n\n setToStartOfDay = function(date)\n {\n if (isDate(date)) date.setHours(0,0,0,0);\n },\n\n compareDates = function(a,b)\n {\n // weak date comparison (use setToStartOfDay(date) to ensure correct result)\n return a.getTime() === b.getTime();\n },\n\n extend = function(to, from, overwrite)\n {\n var prop, hasProp;\n for (prop in from) {\n hasProp = to[prop] !== undefined;\n if (hasProp && typeof from[prop] === 'object' && from[prop] !== null && from[prop].nodeName === undefined) {\n if (isDate(from[prop])) {\n if (overwrite) {\n to[prop] = new Date(from[prop].getTime());\n }\n }\n else if (isArray(from[prop])) {\n if (overwrite) {\n to[prop] = from[prop].slice(0);\n }\n } else {\n to[prop] = extend({}, from[prop], overwrite);\n }\n } else if (overwrite || !hasProp) {\n to[prop] = from[prop];\n }\n }\n return to;\n },\n\n fireEvent = function(el, eventName, data)\n {\n var ev;\n\n if (document.createEvent) {\n ev = document.createEvent('HTMLEvents');\n ev.initEvent(eventName, true, false);\n ev = extend(ev, data);\n el.dispatchEvent(ev);\n } else if (document.createEventObject) {\n ev = document.createEventObject();\n ev = extend(ev, data);\n el.fireEvent('on' + eventName, ev);\n }\n },\n\n adjustCalendar = function(calendar) {\n if (calendar.month < 0) {\n calendar.year -= Math.ceil(Math.abs(calendar.month)/12);\n calendar.month += 12;\n }\n if (calendar.month > 11) {\n calendar.year += Math.floor(Math.abs(calendar.month)/12);\n calendar.month -= 12;\n }\n return calendar;\n },\n\n /**\n * defaults and localisation\n */\n defaults = {\n\n // bind the picker to a form field\n field: null,\n\n // automatically show/hide the picker on `field` focus (default `true` if `field` is set)\n bound: undefined,\n\n // data-attribute on the input field with an aria assistance text (only applied when `bound` is set)\n ariaLabel: 'Use the arrow keys to pick a date',\n\n // position of the datepicker, relative to the field (default to bottom & left)\n // ('bottom' & 'left' keywords are not used, 'top' & 'right' are modifier on the bottom/left position)\n position: 'bottom left',\n\n // automatically fit in the viewport even if it means repositioning from the position option\n reposition: true,\n\n // the default output format for `.toString()` and `field` value\n format: 'YYYY-MM-DD',\n\n // the toString function which gets passed a current date object and format\n // and returns a string\n toString: null,\n\n // used to create date object from current input string\n parse: null,\n\n // the initial date to view when first opened\n defaultDate: null,\n\n // make the `defaultDate` the initial selected value\n setDefaultDate: false,\n\n // first day of week (0: Sunday, 1: Monday etc)\n firstDay: 0,\n\n // minimum number of days in the week that gets week number one\n // default ISO 8601, week 01 is the week with the first Thursday (4)\n firstWeekOfYearMinDays: 4,\n\n // the default flag for moment's strict date parsing\n formatStrict: false,\n\n // the minimum/earliest date that can be selected\n minDate: null,\n // the maximum/latest date that can be selected\n maxDate: null,\n\n // number of years either side, or array of upper/lower range\n yearRange: 10,\n\n // show week numbers at head of row\n showWeekNumber: false,\n\n // Week picker mode\n pickWholeWeek: false,\n\n // used internally (don't config outside)\n minYear: 0,\n maxYear: 9999,\n minMonth: undefined,\n maxMonth: undefined,\n\n startRange: null,\n endRange: null,\n\n isRTL: false,\n\n // Additional text to append to the year in the calendar title\n yearSuffix: '',\n\n // Render the month after year in the calendar title\n showMonthAfterYear: false,\n\n // Render days of the calendar grid that fall in the next or previous month\n showDaysInNextAndPreviousMonths: false,\n\n // Allows user to select days that fall in the next or previous month\n enableSelectionDaysInNextAndPreviousMonths: false,\n\n // how many months are visible\n numberOfMonths: 1,\n\n // when numberOfMonths is used, this will help you to choose where the main calendar will be (default `left`, can be set to `right`)\n // only used for the first display or when a selected date is not visible\n mainCalendar: 'left',\n\n // Specify a DOM element to render the calendar in\n container: undefined,\n\n // Blur field when date is selected\n blurFieldOnSelect : true,\n\n // internationalization\n i18n: {\n previousMonth : 'Previous Month',\n nextMonth : 'Next Month',\n months : ['January','February','March','April','May','June','July','August','September','October','November','December'],\n weekdays : ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'],\n weekdaysShort : ['Sun','Mon','Tue','Wed','Thu','Fri','Sat']\n },\n\n // Theme Classname\n theme: null,\n\n // events array\n events: [],\n\n // callback function\n onSelect: null,\n onOpen: null,\n onClose: null,\n onDraw: null,\n\n // Enable keyboard input\n keyboardInput: true\n },\n\n\n /**\n * templating functions to abstract HTML rendering\n */\n renderDayName = function(opts, day, abbr)\n {\n day += opts.firstDay;\n while (day >= 7) {\n day -= 7;\n }\n return abbr ? opts.i18n.weekdaysShort[day] : opts.i18n.weekdays[day];\n },\n\n renderDay = function(opts)\n {\n var arr = [];\n var ariaSelected = 'false';\n if (opts.isEmpty) {\n if (opts.showDaysInNextAndPreviousMonths) {\n arr.push('is-outside-current-month');\n\n if(!opts.enableSelectionDaysInNextAndPreviousMonths) {\n arr.push('is-selection-disabled');\n }\n\n } else {\n return '';\n }\n }\n if (opts.isDisabled) {\n arr.push('is-disabled');\n }\n if (opts.isToday) {\n arr.push('is-today');\n }\n if (opts.isSelected) {\n arr.push('is-selected');\n ariaSelected = 'true';\n }\n if (opts.hasEvent) {\n arr.push('has-event');\n }\n if (opts.isInRange) {\n arr.push('is-inrange');\n }\n if (opts.isStartRange) {\n arr.push('is-startrange');\n }\n if (opts.isEndRange) {\n arr.push('is-endrange');\n }\n return '' +\n '' +\n '';\n },\n\n isoWeek = function(date, firstWeekOfYearMinDays) {\n // Ensure we're at the start of the day.\n date.setHours(0, 0, 0, 0);\n\n // Thursday in current week decides the year because January 4th\n // is always in the first week according to ISO8601.\n var yearDay = date.getDate(),\n weekDay = date.getDay(),\n dayInFirstWeek = firstWeekOfYearMinDays,\n dayShift = dayInFirstWeek - 1, // counting starts at 0\n daysPerWeek = 7,\n prevWeekDay = function(day) { return (day + daysPerWeek - 1) % daysPerWeek; };\n\n // Adjust to Thursday in week 1 and count number of weeks from date to week 1.\n date.setDate(yearDay + dayShift - prevWeekDay(weekDay));\n\n var jan4th = new Date(date.getFullYear(), 0, dayInFirstWeek),\n msPerDay = 24 * 60 * 60 * 1000,\n daysBetween = (date.getTime() - jan4th.getTime()) / msPerDay,\n weekNum = 1 + Math.round((daysBetween - dayShift + prevWeekDay(jan4th.getDay())) / daysPerWeek);\n\n return weekNum;\n },\n\n renderWeek = function (d, m, y, firstWeekOfYearMinDays) {\n var date = new Date(y, m, d),\n week = hasMoment ? moment(date).isoWeek() : isoWeek(date, firstWeekOfYearMinDays);\n\n return '' + week + '';\n },\n\n renderRow = function(days, isRTL, pickWholeWeek, isRowSelected)\n {\n return '' + (isRTL ? days.reverse() : days).join('') + '';\n },\n\n renderBody = function(rows)\n {\n return '' + rows.join('') + '';\n },\n\n renderHead = function(opts)\n {\n var i, arr = [];\n if (opts.showWeekNumber) {\n arr.push('');\n }\n for (i = 0; i < 7; i++) {\n arr.push('' + renderDayName(opts, i, true) + '');\n }\n return '' + (opts.isRTL ? arr.reverse() : arr).join('') + '';\n },\n\n renderTitle = function(instance, c, year, month, refYear, randId)\n {\n var i, j, arr,\n opts = instance._o,\n isMinYear = year === opts.minYear,\n isMaxYear = year === opts.maxYear,\n html = '
',\n monthHtml,\n yearHtml,\n prev = true,\n next = true;\n\n for (arr = [], i = 0; i < 12; i++) {\n arr.push('');\n }\n\n monthHtml = '
' + opts.i18n.months[month] + '
';\n\n if (isArray(opts.yearRange)) {\n i = opts.yearRange[0];\n j = opts.yearRange[1] + 1;\n } else {\n i = year - opts.yearRange;\n j = 1 + year + opts.yearRange;\n }\n\n for (arr = []; i < j && i <= opts.maxYear; i++) {\n if (i >= opts.minYear) {\n arr.push('');\n }\n }\n yearHtml = '
' + year + opts.yearSuffix + '
';\n\n if (opts.showMonthAfterYear) {\n html += yearHtml + monthHtml;\n } else {\n html += monthHtml + yearHtml;\n }\n\n if (isMinYear && (month === 0 || opts.minMonth >= month)) {\n prev = false;\n }\n\n if (isMaxYear && (month === 11 || opts.maxMonth <= month)) {\n next = false;\n }\n\n if (c === 0) {\n html += '';\n }\n if (c === (instance._o.numberOfMonths - 1) ) {\n html += '';\n }\n\n return html += '
';\n },\n\n renderTable = function(opts, data, randId)\n {\n return '' + renderHead(opts) + renderBody(data) + '
';\n },\n\n\n /**\n * Pikaday constructor\n */\n Pikaday = function(options)\n {\n var self = this,\n opts = self.config(options);\n\n self._onMouseDown = function(e)\n {\n if (!self._v) {\n return;\n }\n e = e || window.event;\n var target = e.target || e.srcElement;\n if (!target) {\n return;\n }\n\n if (!hasClass(target, 'is-disabled')) {\n if (hasClass(target, 'pika-button') && !hasClass(target, 'is-empty') && !hasClass(target.parentNode, 'is-disabled')) {\n self.setDate(new Date(target.getAttribute('data-pika-year'), target.getAttribute('data-pika-month'), target.getAttribute('data-pika-day')));\n if (opts.bound) {\n sto(function() {\n self.hide();\n if (opts.blurFieldOnSelect && opts.field) {\n opts.field.blur();\n }\n }, 100);\n }\n }\n else if (hasClass(target, 'pika-prev')) {\n self.prevMonth();\n }\n else if (hasClass(target, 'pika-next')) {\n self.nextMonth();\n }\n }\n if (!hasClass(target, 'pika-select')) {\n // if this is touch event prevent mouse events emulation\n if (e.preventDefault) {\n e.preventDefault();\n } else {\n e.returnValue = false;\n return false;\n }\n } else {\n self._c = true;\n }\n };\n\n self._onChange = function(e)\n {\n e = e || window.event;\n var target = e.target || e.srcElement;\n if (!target) {\n return;\n }\n if (hasClass(target, 'pika-select-month')) {\n self.gotoMonth(target.value);\n }\n else if (hasClass(target, 'pika-select-year')) {\n self.gotoYear(target.value);\n }\n };\n\n self._onKeyChange = function(e)\n {\n e = e || window.event;\n\n if (self.isVisible()) {\n\n switch(e.keyCode){\n case 13:\n case 27:\n if (opts.field) {\n opts.field.blur();\n }\n break;\n case 37:\n self.adjustDate('subtract', 1);\n break;\n case 38:\n self.adjustDate('subtract', 7);\n break;\n case 39:\n self.adjustDate('add', 1);\n break;\n case 40:\n self.adjustDate('add', 7);\n break;\n case 8:\n case 46:\n self.setDate(null);\n break;\n }\n }\n };\n\n self._parseFieldValue = function()\n {\n if (opts.parse) {\n return opts.parse(opts.field.value, opts.format);\n } else if (hasMoment) {\n var date = moment(opts.field.value, opts.format, opts.formatStrict);\n return (date && date.isValid()) ? date.toDate() : null;\n } else {\n return new Date(Date.parse(opts.field.value));\n }\n };\n\n self._onInputChange = function(e)\n {\n var date;\n\n if (e.firedBy === self) {\n return;\n }\n date = self._parseFieldValue();\n if (isDate(date)) {\n self.setDate(date);\n }\n if (!self._v) {\n self.show();\n }\n };\n\n self._onInputFocus = function()\n {\n self.show();\n };\n\n self._onInputClick = function()\n {\n self.show();\n };\n\n self._onInputBlur = function()\n {\n // IE allows pika div to gain focus; catch blur the input field\n var pEl = document.activeElement;\n do {\n if (hasClass(pEl, 'pika-single')) {\n return;\n }\n }\n while ((pEl = pEl.parentNode));\n\n if (!self._c) {\n self._b = sto(function() {\n self.hide();\n }, 50);\n }\n self._c = false;\n };\n\n self._onClick = function(e)\n {\n e = e || window.event;\n var target = e.target || e.srcElement,\n pEl = target;\n if (!target) {\n return;\n }\n if (!hasEventListeners && hasClass(target, 'pika-select')) {\n if (!target.onchange) {\n target.setAttribute('onchange', 'return;');\n addEvent(target, 'change', self._onChange);\n }\n }\n do {\n if (hasClass(pEl, 'pika-single') || pEl === opts.trigger) {\n return;\n }\n }\n while ((pEl = pEl.parentNode));\n if (self._v && target !== opts.trigger && pEl !== opts.trigger) {\n self.hide();\n }\n };\n\n self.el = document.createElement('div');\n self.el.className = 'pika-single' + (opts.isRTL ? ' is-rtl' : '') + (opts.theme ? ' ' + opts.theme : '');\n\n addEvent(self.el, 'mousedown', self._onMouseDown, true);\n addEvent(self.el, 'touchend', self._onMouseDown, true);\n addEvent(self.el, 'change', self._onChange);\n\n if (opts.keyboardInput) {\n addEvent(document, 'keydown', self._onKeyChange);\n }\n\n if (opts.field) {\n if (opts.container) {\n opts.container.appendChild(self.el);\n } else if (opts.bound) {\n document.body.appendChild(self.el);\n } else {\n opts.field.parentNode.insertBefore(self.el, opts.field.nextSibling);\n }\n addEvent(opts.field, 'change', self._onInputChange);\n\n if (!opts.defaultDate) {\n opts.defaultDate = self._parseFieldValue();\n opts.setDefaultDate = true;\n }\n }\n\n var defDate = opts.defaultDate;\n\n if (isDate(defDate)) {\n if (opts.setDefaultDate) {\n self.setDate(defDate, true);\n } else {\n self.gotoDate(defDate);\n }\n } else {\n self.gotoDate(new Date());\n }\n\n if (opts.bound) {\n this.hide();\n self.el.className += ' is-bound';\n addEvent(opts.trigger, 'click', self._onInputClick);\n addEvent(opts.trigger, 'focus', self._onInputFocus);\n addEvent(opts.trigger, 'blur', self._onInputBlur);\n } else {\n this.show();\n }\n };\n\n\n /**\n * public Pikaday API\n */\n Pikaday.prototype = {\n\n\n /**\n * configure functionality\n */\n config: function(options)\n {\n if (!this._o) {\n this._o = extend({}, defaults, true);\n }\n\n var opts = extend(this._o, options, true);\n\n opts.isRTL = !!opts.isRTL;\n\n opts.field = (opts.field && opts.field.nodeName) ? opts.field : null;\n\n opts.theme = (typeof opts.theme) === 'string' && opts.theme ? opts.theme : null;\n\n opts.bound = !!(opts.bound !== undefined ? opts.field && opts.bound : opts.field);\n\n opts.trigger = (opts.trigger && opts.trigger.nodeName) ? opts.trigger : opts.field;\n\n opts.disableWeekends = !!opts.disableWeekends;\n\n opts.disableDayFn = (typeof opts.disableDayFn) === 'function' ? opts.disableDayFn : null;\n\n var nom = parseInt(opts.numberOfMonths, 10) || 1;\n opts.numberOfMonths = nom > 4 ? 4 : nom;\n\n if (!isDate(opts.minDate)) {\n opts.minDate = false;\n }\n if (!isDate(opts.maxDate)) {\n opts.maxDate = false;\n }\n if ((opts.minDate && opts.maxDate) && opts.maxDate < opts.minDate) {\n opts.maxDate = opts.minDate = false;\n }\n if (opts.minDate) {\n this.setMinDate(opts.minDate);\n }\n if (opts.maxDate) {\n this.setMaxDate(opts.maxDate);\n }\n\n if (isArray(opts.yearRange)) {\n var fallback = new Date().getFullYear() - 10;\n opts.yearRange[0] = parseInt(opts.yearRange[0], 10) || fallback;\n opts.yearRange[1] = parseInt(opts.yearRange[1], 10) || fallback;\n } else {\n opts.yearRange = Math.abs(parseInt(opts.yearRange, 10)) || defaults.yearRange;\n if (opts.yearRange > 100) {\n opts.yearRange = 100;\n }\n }\n\n return opts;\n },\n\n /**\n * return a formatted string of the current selection (using Moment.js if available)\n */\n toString: function(format)\n {\n format = format || this._o.format;\n if (!isDate(this._d)) {\n return '';\n }\n if (this._o.toString) {\n return this._o.toString(this._d, format);\n }\n if (hasMoment) {\n return moment(this._d).format(format);\n }\n return this._d.toDateString();\n },\n\n /**\n * return a Moment.js object of the current selection (if available)\n */\n getMoment: function()\n {\n return hasMoment ? moment(this._d) : null;\n },\n\n /**\n * set the current selection from a Moment.js object (if available)\n */\n setMoment: function(date, preventOnSelect)\n {\n if (hasMoment && moment.isMoment(date)) {\n this.setDate(date.toDate(), preventOnSelect);\n }\n },\n\n /**\n * return a Date object of the current selection\n */\n getDate: function()\n {\n return isDate(this._d) ? new Date(this._d.getTime()) : null;\n },\n\n /**\n * set the current selection\n */\n setDate: function(date, preventOnSelect)\n {\n if (!date) {\n this._d = null;\n\n if (this._o.field) {\n this._o.field.value = '';\n fireEvent(this._o.field, 'change', { firedBy: this });\n }\n\n return this.draw();\n }\n if (typeof date === 'string') {\n date = new Date(Date.parse(date));\n }\n if (!isDate(date)) {\n return;\n }\n\n var min = this._o.minDate,\n max = this._o.maxDate;\n\n if (isDate(min) && date < min) {\n date = min;\n } else if (isDate(max) && date > max) {\n date = max;\n }\n\n this._d = new Date(date.getTime());\n setToStartOfDay(this._d);\n this.gotoDate(this._d);\n\n if (this._o.field) {\n this._o.field.value = this.toString();\n fireEvent(this._o.field, 'change', { firedBy: this });\n }\n if (!preventOnSelect && typeof this._o.onSelect === 'function') {\n this._o.onSelect.call(this, this.getDate());\n }\n },\n\n /**\n * clear and reset the date\n */\n clear: function()\n {\n this.setDate(null);\n },\n\n /**\n * change view to a specific date\n */\n gotoDate: function(date)\n {\n var newCalendar = true;\n\n if (!isDate(date)) {\n return;\n }\n\n if (this.calendars) {\n var firstVisibleDate = new Date(this.calendars[0].year, this.calendars[0].month, 1),\n lastVisibleDate = new Date(this.calendars[this.calendars.length-1].year, this.calendars[this.calendars.length-1].month, 1),\n visibleDate = date.getTime();\n // get the end of the month\n lastVisibleDate.setMonth(lastVisibleDate.getMonth()+1);\n lastVisibleDate.setDate(lastVisibleDate.getDate()-1);\n newCalendar = (visibleDate < firstVisibleDate.getTime() || lastVisibleDate.getTime() < visibleDate);\n }\n\n if (newCalendar) {\n this.calendars = [{\n month: date.getMonth(),\n year: date.getFullYear()\n }];\n if (this._o.mainCalendar === 'right') {\n this.calendars[0].month += 1 - this._o.numberOfMonths;\n }\n }\n\n this.adjustCalendars();\n },\n\n adjustDate: function(sign, days) {\n\n var day = this.getDate() || new Date();\n var difference = parseInt(days)*24*60*60*1000;\n\n var newDay;\n\n if (sign === 'add') {\n newDay = new Date(day.valueOf() + difference);\n } else if (sign === 'subtract') {\n newDay = new Date(day.valueOf() - difference);\n }\n\n this.setDate(newDay);\n },\n\n adjustCalendars: function() {\n this.calendars[0] = adjustCalendar(this.calendars[0]);\n for (var c = 1; c < this._o.numberOfMonths; c++) {\n this.calendars[c] = adjustCalendar({\n month: this.calendars[0].month + c,\n year: this.calendars[0].year\n });\n }\n this.draw();\n },\n\n gotoToday: function()\n {\n this.gotoDate(new Date());\n },\n\n /**\n * change view to a specific month (zero-index, e.g. 0: January)\n */\n gotoMonth: function(month)\n {\n if (!isNaN(month)) {\n this.calendars[0].month = parseInt(month, 10);\n this.adjustCalendars();\n }\n },\n\n nextMonth: function()\n {\n this.calendars[0].month++;\n this.adjustCalendars();\n },\n\n prevMonth: function()\n {\n this.calendars[0].month--;\n this.adjustCalendars();\n },\n\n /**\n * change view to a specific full year (e.g. \"2012\")\n */\n gotoYear: function(year)\n {\n if (!isNaN(year)) {\n this.calendars[0].year = parseInt(year, 10);\n this.adjustCalendars();\n }\n },\n\n /**\n * change the minDate\n */\n setMinDate: function(value)\n {\n if(value instanceof Date) {\n setToStartOfDay(value);\n this._o.minDate = value;\n this._o.minYear = value.getFullYear();\n this._o.minMonth = value.getMonth();\n } else {\n this._o.minDate = defaults.minDate;\n this._o.minYear = defaults.minYear;\n this._o.minMonth = defaults.minMonth;\n this._o.startRange = defaults.startRange;\n }\n\n this.draw();\n },\n\n /**\n * change the maxDate\n */\n setMaxDate: function(value)\n {\n if(value instanceof Date) {\n setToStartOfDay(value);\n this._o.maxDate = value;\n this._o.maxYear = value.getFullYear();\n this._o.maxMonth = value.getMonth();\n } else {\n this._o.maxDate = defaults.maxDate;\n this._o.maxYear = defaults.maxYear;\n this._o.maxMonth = defaults.maxMonth;\n this._o.endRange = defaults.endRange;\n }\n\n this.draw();\n },\n\n setStartRange: function(value)\n {\n this._o.startRange = value;\n },\n\n setEndRange: function(value)\n {\n this._o.endRange = value;\n },\n\n /**\n * refresh the HTML\n */\n draw: function(force)\n {\n if (!this._v && !force) {\n return;\n }\n var opts = this._o,\n minYear = opts.minYear,\n maxYear = opts.maxYear,\n minMonth = opts.minMonth,\n maxMonth = opts.maxMonth,\n html = '',\n randId;\n\n if (this._y <= minYear) {\n this._y = minYear;\n if (!isNaN(minMonth) && this._m < minMonth) {\n this._m = minMonth;\n }\n }\n if (this._y >= maxYear) {\n this._y = maxYear;\n if (!isNaN(maxMonth) && this._m > maxMonth) {\n this._m = maxMonth;\n }\n }\n\n for (var c = 0; c < opts.numberOfMonths; c++) {\n randId = 'pika-title-' + Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 2);\n html += '
' + renderTitle(this, c, this.calendars[c].year, this.calendars[c].month, this.calendars[0].year, randId) + this.render(this.calendars[c].year, this.calendars[c].month, randId) + '
';\n }\n\n this.el.innerHTML = html;\n\n if (opts.bound) {\n if(opts.field.type !== 'hidden') {\n sto(function() {\n opts.trigger.focus();\n }, 1);\n }\n }\n\n if (typeof this._o.onDraw === 'function') {\n this._o.onDraw(this);\n }\n\n if (opts.bound) {\n // let the screen reader user know to use arrow keys\n opts.field.setAttribute('aria-label', opts.ariaLabel);\n }\n },\n\n adjustPosition: function()\n {\n var field, pEl, width, height, viewportWidth, viewportHeight, scrollTop, left, top, clientRect, leftAligned, bottomAligned;\n\n if (this._o.container) return;\n\n this.el.style.position = 'absolute';\n\n field = this._o.trigger;\n pEl = field;\n width = this.el.offsetWidth;\n height = this.el.offsetHeight;\n viewportWidth = window.innerWidth || document.documentElement.clientWidth;\n viewportHeight = window.innerHeight || document.documentElement.clientHeight;\n scrollTop = window.pageYOffset || document.body.scrollTop || document.documentElement.scrollTop;\n leftAligned = true;\n bottomAligned = true;\n\n if (typeof field.getBoundingClientRect === 'function') {\n clientRect = field.getBoundingClientRect();\n left = clientRect.left + window.pageXOffset;\n top = clientRect.bottom + window.pageYOffset;\n } else {\n left = pEl.offsetLeft;\n top = pEl.offsetTop + pEl.offsetHeight;\n while((pEl = pEl.offsetParent)) {\n left += pEl.offsetLeft;\n top += pEl.offsetTop;\n }\n }\n\n // default position is bottom & left\n if ((this._o.reposition && left + width > viewportWidth) ||\n (\n this._o.position.indexOf('right') > -1 &&\n left - width + field.offsetWidth > 0\n )\n ) {\n left = left - width + field.offsetWidth;\n leftAligned = false;\n }\n if ((this._o.reposition && top + height > viewportHeight + scrollTop) ||\n (\n this._o.position.indexOf('top') > -1 &&\n top - height - field.offsetHeight > 0\n )\n ) {\n top = top - height - field.offsetHeight;\n bottomAligned = false;\n }\n\n this.el.style.left = left + 'px';\n this.el.style.top = top + 'px';\n\n addClass(this.el, leftAligned ? 'left-aligned' : 'right-aligned');\n addClass(this.el, bottomAligned ? 'bottom-aligned' : 'top-aligned');\n removeClass(this.el, !leftAligned ? 'left-aligned' : 'right-aligned');\n removeClass(this.el, !bottomAligned ? 'bottom-aligned' : 'top-aligned');\n },\n\n /**\n * render HTML for a particular month\n */\n render: function(year, month, randId)\n {\n var opts = this._o,\n now = new Date(),\n days = getDaysInMonth(year, month),\n before = new Date(year, month, 1).getDay(),\n data = [],\n row = [];\n setToStartOfDay(now);\n if (opts.firstDay > 0) {\n before -= opts.firstDay;\n if (before < 0) {\n before += 7;\n }\n }\n var previousMonth = month === 0 ? 11 : month - 1,\n nextMonth = month === 11 ? 0 : month + 1,\n yearOfPreviousMonth = month === 0 ? year - 1 : year,\n yearOfNextMonth = month === 11 ? year + 1 : year,\n daysInPreviousMonth = getDaysInMonth(yearOfPreviousMonth, previousMonth);\n var cells = days + before,\n after = cells;\n while(after > 7) {\n after -= 7;\n }\n cells += 7 - after;\n var isWeekSelected = false;\n for (var i = 0, r = 0; i < cells; i++)\n {\n var day = new Date(year, month, 1 + (i - before)),\n isSelected = isDate(this._d) ? compareDates(day, this._d) : false,\n isToday = compareDates(day, now),\n hasEvent = opts.events.indexOf(day.toDateString()) !== -1 ? true : false,\n isEmpty = i < before || i >= (days + before),\n dayNumber = 1 + (i - before),\n monthNumber = month,\n yearNumber = year,\n isStartRange = opts.startRange && compareDates(opts.startRange, day),\n isEndRange = opts.endRange && compareDates(opts.endRange, day),\n isInRange = opts.startRange && opts.endRange && opts.startRange < day && day < opts.endRange,\n isDisabled = (opts.minDate && day < opts.minDate) ||\n (opts.maxDate && day > opts.maxDate) ||\n (opts.disableWeekends && isWeekend(day)) ||\n (opts.disableDayFn && opts.disableDayFn(day));\n\n if (isEmpty) {\n if (i < before) {\n dayNumber = daysInPreviousMonth + dayNumber;\n monthNumber = previousMonth;\n yearNumber = yearOfPreviousMonth;\n } else {\n dayNumber = dayNumber - days;\n monthNumber = nextMonth;\n yearNumber = yearOfNextMonth;\n }\n }\n\n var dayConfig = {\n day: dayNumber,\n month: monthNumber,\n year: yearNumber,\n hasEvent: hasEvent,\n isSelected: isSelected,\n isToday: isToday,\n isDisabled: isDisabled,\n isEmpty: isEmpty,\n isStartRange: isStartRange,\n isEndRange: isEndRange,\n isInRange: isInRange,\n showDaysInNextAndPreviousMonths: opts.showDaysInNextAndPreviousMonths,\n enableSelectionDaysInNextAndPreviousMonths: opts.enableSelectionDaysInNextAndPreviousMonths\n };\n\n if (opts.pickWholeWeek && isSelected) {\n isWeekSelected = true;\n }\n\n row.push(renderDay(dayConfig));\n\n if (++r === 7) {\n if (opts.showWeekNumber) {\n row.unshift(renderWeek(i - before, month, year, opts.firstWeekOfYearMinDays));\n }\n data.push(renderRow(row, opts.isRTL, opts.pickWholeWeek, isWeekSelected));\n row = [];\n r = 0;\n isWeekSelected = false;\n }\n }\n return renderTable(opts, data, randId);\n },\n\n isVisible: function()\n {\n return this._v;\n },\n\n show: function()\n {\n if (!this.isVisible()) {\n this._v = true;\n this.draw();\n removeClass(this.el, 'is-hidden');\n if (this._o.bound) {\n addEvent(document, 'click', this._onClick);\n this.adjustPosition();\n }\n if (typeof this._o.onOpen === 'function') {\n this._o.onOpen.call(this);\n }\n }\n },\n\n hide: function()\n {\n var v = this._v;\n if (v !== false) {\n if (this._o.bound) {\n removeEvent(document, 'click', this._onClick);\n }\n\n if (!this._o.container) {\n this.el.style.position = 'static'; // reset\n this.el.style.left = 'auto';\n this.el.style.top = 'auto';\n }\n addClass(this.el, 'is-hidden');\n this._v = false;\n if (v !== undefined && typeof this._o.onClose === 'function') {\n this._o.onClose.call(this);\n }\n }\n },\n\n /**\n * GAME OVER\n */\n destroy: function()\n {\n var opts = this._o;\n\n this.hide();\n removeEvent(this.el, 'mousedown', this._onMouseDown, true);\n removeEvent(this.el, 'touchend', this._onMouseDown, true);\n removeEvent(this.el, 'change', this._onChange);\n if (opts.keyboardInput) {\n removeEvent(document, 'keydown', this._onKeyChange);\n }\n if (opts.field) {\n removeEvent(opts.field, 'change', this._onInputChange);\n if (opts.bound) {\n removeEvent(opts.trigger, 'click', this._onInputClick);\n removeEvent(opts.trigger, 'focus', this._onInputFocus);\n removeEvent(opts.trigger, 'blur', this._onInputBlur);\n }\n }\n if (this.el.parentNode) {\n this.el.parentNode.removeChild(this.el);\n }\n }\n\n };\n\n return Pikaday;\n}));\n", "import { EventOptions} from './types'\nexport class App {\n\n private _events: Object;\n\n public start;\n public h;\n public createElement;\n public render;\n public Fragment;\n public webComponent;\n\n constructor() {\n this._events = {};\n }\n\n on(name: string, fn: (...args) => void, options: EventOptions = {}): void {\n this._events[name] = this._events[name] || [];\n this._events[name].push({ fn, options });\n }\n\n off(name: string, fn: (...args) => void): void {\n const subscribers = this._events[name] || [];\n\n this._events[name] = subscribers.filter((sub) => sub.fn !== fn);\n }\n\n find(name: string): any {\n return this._events[name];\n }\n\n run(name: string, ...args): number {\n const subscribers = this._events[name] || [];\n\n console.assert(subscribers && subscribers.length > 0, 'No subscriber for event: ' + name);\n\n // Update the list of subscribers by pulling out those which will run once.\n // We must do this update prior to running any of the events in case they\n // cause additional events to be turned off or on.\n this._events[name] = subscribers.filter((sub) => {\n return !sub.options.once;\n });\n\n subscribers.forEach((sub) => {\n const { fn, options } = sub;\n if (options.delay) {\n this.delay(name, fn, args, options);\n } else {\n fn.apply(this, args);\n }\n return !sub.options.once;\n });\n\n return subscribers.length;\n }\n\n once(name: string, fn, options: EventOptions = {}): void {\n this.on(name, fn, { ...options, once: true });\n }\n\n private delay(name, fn, args, options): void {\n if (options._t) clearTimeout(options._t);\n options._t = setTimeout(() => {\n clearTimeout(options._t);\n fn.apply(this, args);\n }, options.delay);\n }\n}\n\nconst AppRunVersions = 'AppRun-2';\nlet app: App;\nconst root = (typeof self === 'object' && self.self === self && self) ||\n (typeof global === 'object' && global.global === global && global)\nif (root['app'] && root['_AppRunVersions']) {\n app = root['app'];\n} else {\n app = new App();\n root['app'] = app;\n root['_AppRunVersions'] = AppRunVersions;\n}\nexport default app;\n", "import { VDOM, VNode } from './types';\nexport type Element = any; //HTMLElement | SVGSVGElement | SVGElement;\n\nexport function Fragment(props, ...children): any[] {\n return collect(children);\n}\n\nconst ATTR_PROPS = '_props';\n\nfunction collect(children) {\n const ch = [];\n const push = (c) => {\n if (c !== null && c !== undefined && c !== '' && c !== false) {\n ch.push((typeof c === 'function' || typeof c === 'object') ? c : `${c}`);\n }\n }\n children && children.forEach(c => {\n if (Array.isArray(c)) {\n c.forEach(i => push(i));\n } else {\n push(c);\n }\n });\n return ch;\n}\n\nexport function createElement(tag: string | Function | [], props?: {}, ...children) {\n const ch = collect(children);\n if (typeof tag === 'string') return { tag, props, children: ch };\n else if (Array.isArray(tag)) return tag; // JSX fragments - babel\n else if (tag === undefined && children) return ch; // JSX fragments - typescript\n else if (Object.getPrototypeOf(tag).__isAppRunComponent) return { tag, props, children: ch } // createComponent(tag, { ...props, children });\n else if (typeof tag === 'function') return tag(props, ch);\n else throw new Error(`Unknown tag in vdom ${tag}`);\n};\n\nconst keyCache = new WeakMap();\n\nexport const updateElement = render;\n\nexport function render(element: Element, nodes: VDOM, parent = {}) {\n // console.log('render', element, node);\n // tslint:disable-next-line\n if (nodes == null || nodes === false) return;\n\n nodes = createComponent(nodes, parent);\n\n const isSvg = element?.nodeName === \"SVG\";\n\n if (!element) return;\n if (Array.isArray(nodes)) {\n updateChildren(element, nodes, isSvg);\n } else {\n updateChildren(element, [nodes], isSvg);\n }\n}\n\nfunction same(el: Element, node: VNode) {\n // if (!el || !node) return false;\n const key1 = el.nodeName;\n const key2 = `${node.tag || ''}`;\n return key1.toUpperCase() === key2.toUpperCase();\n}\n\nfunction update(element: Element, node: VNode, isSvg: boolean) {\n if (node['_op'] === 3) return;\n // console.assert(!!element);\n isSvg = isSvg || node.tag === \"svg\";\n if (!same(element, node)) {\n element.parentNode.replaceChild(create(node, isSvg), element);\n return;\n }\n !(node['_op'] & 2) && updateChildren(element, node.children, isSvg);\n !(node['_op'] & 1) && updateProps(element, node.props, isSvg);\n}\n\nfunction updateChildren(element, children, isSvg: boolean) {\n const old_len = element.childNodes?.length || 0;\n const new_len = children?.length || 0;\n const len = Math.min(old_len, new_len);\n for (let i = 0; i < len; i++) {\n const child = children[i];\n if (child['_op'] === 3) continue;\n const el = element.childNodes[i];\n if (typeof child === 'string') {\n if (el.textContent !== child) {\n if (el.nodeType === 3) {\n el.nodeValue = child\n } else {\n element.replaceChild(createText(child), el);\n }\n }\n } else if (child instanceof HTMLElement || child instanceof SVGElement) {\n element.insertBefore(child, el);\n } else {\n const key = child.props && child.props['key'];\n if (key) {\n if (el.key === key) {\n update(element.childNodes[i], child, isSvg);\n } else {\n // console.log(el.key, key);\n const old = keyCache[key];\n if (old) {\n const temp = old.nextSibling;\n element.insertBefore(old, el);\n temp ? element.insertBefore(el, temp) : element.appendChild(el);\n }\n update(element.childNodes[i], child, isSvg);\n }\n } else {\n update(element.childNodes[i], child, isSvg);\n }\n }\n }\n\n let n = element.childNodes.length;\n while (n > len) {\n element.removeChild(element.lastChild);\n n--;\n }\n\n if (new_len > len) {\n const d = document.createDocumentFragment();\n for (let i = len; i < children.length; i++) {\n d.appendChild(create(children[i], isSvg));\n }\n element.appendChild(d);\n }\n}\n\nfunction createText(node) {\n if (node?.indexOf('_html:') === 0) { // ?\n const div = document.createElement('div');\n div.insertAdjacentHTML('afterbegin', node.substring(6))\n return div;\n } else {\n return document.createTextNode(node??'');\n }\n}\n\nfunction create(node: VNode | string | HTMLElement | SVGElement, isSvg: boolean): Element {\n // console.assert(node !== null && node !== undefined);\n if ((node instanceof HTMLElement) || (node instanceof SVGElement)) return node;\n if (typeof node === \"string\") return createText(node);\n if (!node.tag || (typeof node.tag === 'function')) return createText(JSON.stringify(node));\n isSvg = isSvg || node.tag === \"svg\";\n const element = isSvg\n ? document.createElementNS(\"http://www.w3.org/2000/svg\", node.tag)\n : document.createElement(node.tag);\n\n updateProps(element, node.props, isSvg);\n if (node.children) node.children.forEach(child => element.appendChild(create(child, isSvg)));\n return element\n}\n\nfunction mergeProps(oldProps: {}, newProps: {}): {} {\n newProps['class'] = newProps['class'] || newProps['className'];\n delete newProps['className'];\n const props = {};\n if (oldProps) Object.keys(oldProps).forEach(p => props[p] = null);\n if (newProps) Object.keys(newProps).forEach(p => props[p] = newProps[p]);\n return props;\n}\n\nexport function updateProps(element: Element, props: {}, isSvg) {\n // console.assert(!!element);\n const cached = element[ATTR_PROPS] || {};\n props = mergeProps(cached, props || {});\n element[ATTR_PROPS] = props;\n\n for (const name in props) {\n const value = props[name];\n // if (cached[name] === value) continue;\n // console.log('updateProps', name, value);\n if (name.startsWith('data-')) {\n const dname = name.substring(5);\n const cname = dname.replace(/-(\\w)/g, (match) => match[1].toUpperCase());\n if (element.dataset[cname] !== value) {\n if (value || value === \"\") element.dataset[cname] = value;\n else delete element.dataset[cname];\n }\n } else if (name === 'style') {\n if (element.style.cssText) element.style.cssText = '';\n if (typeof value === 'string') element.style.cssText = value;\n else {\n for (const s in value) {\n if (element.style[s] !== value[s]) element.style[s] = value[s];\n }\n }\n } else if (name.startsWith('xlink')) {\n const xname = name.replace('xlink', '').toLowerCase();\n if (value == null || value === false) {\n element.removeAttributeNS('http://www.w3.org/1999/xlink', xname);\n } else {\n element.setAttributeNS('http://www.w3.org/1999/xlink', xname, value);\n }\n } else if (name.startsWith('on')) {\n if (!value || typeof value === 'function') {\n element[name] = value;\n } else if (typeof value === 'string') {\n if (value) element.setAttribute(name, value);\n else element.removeAttribute(name);\n }\n } else if (/^id$|^class$|^list$|^readonly$|^contenteditable$|^role|-/g.test(name) || isSvg) {\n if (element.getAttribute(name) !== value) {\n if (value) element.setAttribute(name, value);\n else element.removeAttribute(name);\n }\n } else if (element[name] !== value) {\n element[name] = value;\n }\n if (name === 'key' && value) keyCache[value] = element;\n }\n if (props && typeof props['ref'] === 'function') {\n window.requestAnimationFrame(() => props['ref'](element));\n }\n}\n\nfunction render_component(node, parent, idx) {\n const { tag, props, children } = node;\n let key = `_${idx}`;\n let id = props && props['id'];\n if (!id) id = `_${idx}${Date.now()}`;\n else key = id;\n let asTag = 'section';\n if (props && props['as']) {\n asTag = props['as'];\n delete props['as'];\n }\n if (!parent.__componentCache) parent.__componentCache = {};\n let component = parent.__componentCache[key];\n if (!component || !(component instanceof tag) || !component.element) {\n const element = document.createElement(asTag);\n component = parent.__componentCache[key] = new tag({ ...props, children }).start(element);\n }\n if (component.mounted) {\n const new_state = component.mounted(props, children, component.state);\n (typeof new_state !== 'undefined') && component.setState(new_state);\n }\n updateProps(component.element, props, false);\n return component.element;\n}\n\nfunction createComponent(node, parent, idx = 0) {\n if (typeof node === 'string') return node;\n if (Array.isArray(node)) return node.map(child => createComponent(child, parent, idx++));\n let vdom = node;\n if (node && typeof node.tag === 'function' && Object.getPrototypeOf(node.tag).__isAppRunComponent) {\n vdom = render_component(node, parent, idx);\n }\n if (vdom && Array.isArray(vdom.children)) {\n const new_parent = vdom.props?._component;\n if (new_parent) {\n let i = 0;\n vdom.children = vdom.children.map(child => createComponent(child, new_parent, i++));\n } else {\n vdom.children = vdom.children.map(child => createComponent(child, parent, idx++));\n }\n }\n return vdom;\n}\n", "declare var customElements;\n\nexport type CustomElementOptions = {\n render?: boolean;\n shadow?: boolean;\n history?: boolean;\n global_event?: boolean;\n observedAttributes?: string[];\n};\n\nexport const customElement = (componentClass, options: CustomElementOptions = {}) => class CustomElement extends HTMLElement {\n private _shadowRoot;\n private _component;\n private _attrMap: (arg0: string) => string;\n public on;\n public run;\n constructor() {\n super();\n }\n get component() { return this._component; }\n get state() { return this._component.state; }\n\n static get observedAttributes() {\n // attributes need to be set to lowercase in order to get observed\n return (options.observedAttributes || []).map(attr => attr.toLowerCase());\n }\n\n connectedCallback() {\n if (this.isConnected && !this._component) {\n const opts = options || {};\n this._shadowRoot = opts.shadow ? this.attachShadow({ mode: 'open' }) : this;\n const observedAttributes = (opts.observedAttributes || [])\n\n const attrMap = observedAttributes.reduce((map, name) => {\n const lc = name.toLowerCase()\n if (lc !== name) {\n map[lc] = name\n }\n return map\n }, {})\n this._attrMap = (name: string) : string => attrMap[name] || name\n\n const props = {};\n Array.from(this.attributes).forEach(item => props[this._attrMap(item.name)] = item.value);\n\n // add getters/ setters to allow observation on observedAttributes\n observedAttributes.forEach(name => {\n if (this[name] !== undefined) props[name] = this[name];\n Object.defineProperty(this, name, {\n get(): any {\n return props[name];\n },\n set(this: CustomElement, value: unknown) {\n // trigger change event\n this.attributeChangedCallback(name, props[name], value)\n },\n configurable: true,\n enumerable: true\n });\n })\n\n const children = this.children ? Array.from(this.children) : [];\n children.forEach(el => el.parentElement.removeChild(el));\n this._component = new componentClass({ ...props, children }).mount(this._shadowRoot, opts);\n // attach props to component\n this._component._props = props;\n // expose dispatchEvent\n this._component.dispatchEvent = this.dispatchEvent.bind(this)\n if (this._component.mounted) {\n const new_state = this._component.mounted(props, children, this._component.state);\n if (typeof new_state !== 'undefined') this._component.state = new_state;\n }\n this.on = this._component.on.bind(this._component);\n this.run = this._component.run.bind(this._component);\n if (!(opts.render===false)) this._component.run('.');\n }\n }\n\n disconnectedCallback() {\n this._component?.unload?.();\n this._component?.unmount?.();\n this._component = null;\n }\n\n attributeChangedCallback(name: string, oldValue: unknown, value: unknown) {\n if (this._component) {\n // camelCase attributes arrive only in lowercase\n const mappedName = this._attrMap(name);\n // store the new property/ attribute\n this._component._props[mappedName] = value;\n this._component.run('attributeChanged', mappedName, oldValue, value);\n\n if (value !== oldValue && !(options.render === false)) {\n window.requestAnimationFrame(() => {\n // re-render state with new combined props on next animation frame\n this._component.run('.')\n })\n }\n }\n }\n}\n\nexport default (name: string, componentClass, options?: CustomElementOptions) => {\n (typeof customElements !== 'undefined') && customElements.define(name, customElement(componentClass, options))\n}\n", "import webComponent, { CustomElementOptions } from './web-component';\n\n// tslint:disable:no-invalid-this\nexport const Reflect = {\n\n meta: new WeakMap(),\n\n defineMetadata(metadataKey, metadataValue, target) {\n if (!this.meta.has(target)) this.meta.set(target, {});\n this.meta.get(target)[metadataKey] = metadataValue;\n },\n\n getMetadataKeys(target) {\n target = Object.getPrototypeOf(target);\n return this.meta.get(target) ? Object.keys(this.meta.get(target)) : [];\n },\n\n getMetadata(metadataKey, target) {\n target = Object.getPrototypeOf(target);\n return this.meta.get(target) ? this.meta.get(target)[metadataKey] : null;\n }\n}\n\nexport function update(events?: E, options: any = {}) {\n return (target: any, key: string, descriptor: any) => {\n const name = events ? events.toString() : key;\n Reflect.defineMetadata(`apprun-update:${name}`,\n { name, key, options }, target);\n return descriptor;\n }\n}\n\nexport function on(events?: E, options: any = {}) {\n return function (target: any, key: string) {\n const name = events ? events.toString() : key;\n Reflect.defineMetadata(`apprun-update:${name}`,\n { name, key, options }, target)\n }\n}\n\nexport function customElement(name: string, options?: CustomElementOptions) {\n return function _customElement(constructor: T) {\n webComponent(name, constructor, options);\n return constructor;\n }\n}\n\n", "import app from './app';\n\nconst getStateValue = (component, name) => {\n return (name ? component['state'][name] : component['state']) || '';\n}\n\nconst setStateValue = (component, name, value) => {\n if (name) {\n const state = component['state'] || {};\n state[name] = value;\n component.setState(state);\n } else {\n component.setState(value);\n }\n}\n\nexport default (key: string, props: {}, tag, component) => {\n if (key.startsWith('$on')) {\n const event = props[key];\n key = key.substring(1)\n if (typeof event === 'boolean') {\n props[key] = e => component.run(key, e);\n } else if (typeof event === 'string') {\n props[key] = e => component.run(event, e);\n } else if (typeof event === 'function') {\n props[key] = e => component.setState(event(component.state, e));\n } else if (Array.isArray(event)) {\n const [handler, ...p] = event;\n if (typeof handler === 'string') {\n props[key] = e => component.run(handler, ...p, e);\n } else if (typeof handler === 'function') {\n props[key] = e => component.setState(handler(component.state, ...p, e));\n }\n }\n\n } else if (key === '$bind') {\n const type = props['type'] || 'text';\n const name = typeof props[key] === 'string' ? props[key] : props['name'];\n if (tag === 'input') {\n switch (type) {\n case 'checkbox':\n props['checked'] = getStateValue(component, name);\n props['onclick'] = e => setStateValue(component, name || e.target.name, e.target.checked);\n break;\n case 'radio':\n props['checked'] = getStateValue(component, name) === props['value'];\n props['onclick'] = e => setStateValue(component, name || e.target.name, e.target.value);\n break;\n case 'number':\n case 'range':\n props['value'] = getStateValue(component, name);\n props['oninput'] = e => setStateValue(component, name || e.target.name, Number(e.target.value));\n break;\n default:\n props['value'] = getStateValue(component, name);\n props['oninput'] = e => setStateValue(component, name || e.target.name, e.target.value);\n }\n } else if (tag === 'select') {\n props['value'] = getStateValue(component, name);\n props['onchange'] = e => {\n if (!e.target.multiple) { // multiple selection use $bind on option\n setStateValue(component, name || e.target.name, e.target.value);\n }\n }\n } else if (tag === 'option') {\n props['selected'] = getStateValue(component, name);\n props['onclick'] = e => setStateValue(component, name || e.target.name, e.target.selected);\n } else if (tag === 'textarea') {\n props['innerHTML'] = getStateValue(component, name);\n props['oninput'] = e => setStateValue(component, name || e.target.name, e.target.value);\n }\n } else {\n app.run('$', { key, tag, props, component });\n }\n}", "\r\nimport app, { App } from './app';\r\nimport { Reflect } from './decorator'\r\nimport { View, Update, ActionDef, ActionOptions, MountOptions } from './types';\r\nimport directive from './directive';\r\n\r\nconst componentCache = new Map();\r\napp.on('get-components', o => o.components = componentCache);\r\n\r\nconst REFRESH = state => state;\r\n\r\nexport class Component {\r\n static __isAppRunComponent = true;\r\n private _app = new App();\r\n private _actions = [];\r\n private _global_events = [];\r\n private _state;\r\n private _history = [];\r\n private _history_idx = -1;\r\n private enable_history;\r\n private global_event;\r\n public element;\r\n public rendered;\r\n public mounted;\r\n public unload;\r\n private tracking_id;\r\n private observer;\r\n\r\n render(element: HTMLElement, node) {\r\n app.render(element, node, this);\r\n }\r\n\r\n private _view(state) {\r\n if (!this.view) return;\r\n const h = app.createElement;\r\n app.h = app.createElement = (tag, props, ...children) => {\r\n props && Object.keys(props).forEach(key => {\r\n if (key.startsWith('$')) {\r\n directive(key, props, tag, this);\r\n delete props[key];\r\n }\r\n });\r\n return h(tag, props, ...children);\r\n }\r\n const html = this.view(state);\r\n app.h = app.createElement = h;\r\n return html;\r\n }\r\n\r\n private renderState(state: T, vdom = null) {\r\n if (!this.view) return;\r\n let html = vdom || this._view(state);\r\n\r\n app['debug'] && app.run('debug', {\r\n component: this,\r\n _: html ? '.' : '-',\r\n state,\r\n vdom: html,\r\n el: this.element\r\n });\r\n\r\n if (typeof document !== 'object') return;\r\n\r\n const el = (typeof this.element === 'string') ?\r\n document.getElementById(this.element) : this.element;\r\n\r\n if (el) {\r\n const tracking_attr = '_c';\r\n if (!this.unload) {\r\n el.removeAttribute && el.removeAttribute(tracking_attr);\r\n } else if (el['_component'] !== this || el.getAttribute(tracking_attr) !== this.tracking_id) {\r\n this.tracking_id = new Date().valueOf().toString();\r\n el.setAttribute(tracking_attr, this.tracking_id);\r\n if (typeof MutationObserver !== 'undefined') {\r\n if (!this.observer) this.observer = new MutationObserver(changes => {\r\n if (changes[0].oldValue === this.tracking_id || !document.body.contains(el)) {\r\n this.unload(this.state);\r\n this.observer.disconnect();\r\n this.observer = null;\r\n }\r\n });\r\n this.observer.observe(document.body, {\r\n childList: true, subtree: true,\r\n attributes: true, attributeOldValue: true, attributeFilter: [tracking_attr]\r\n });\r\n }\r\n }\r\n el['_component'] = this;\r\n }\r\n if (!vdom) {\r\n this.render(el, html);\r\n }\r\n this.rendered && this.rendered(this.state);\r\n }\r\n\r\n public setState(state: T, options: ActionOptions\r\n = { render: true, history: false }) {\r\n if (state instanceof Promise) {\r\n // Promise will not be saved or rendered\r\n // state will be saved and rendered when promise is resolved\r\n // Wait for previous promise to complete first\r\n Promise.all([state, this._state]).then(v => {\r\n if (v[0]) this.setState(v[0]);\r\n }).catch(err => {\r\n console.error(err);\r\n throw err;\r\n });\r\n this._state = state;\r\n } else {\r\n this._state = state;\r\n if (state == null) return;\r\n this.state = state;\r\n if (options.render !== false) this.renderState(state);\r\n if (options.history !== false && this.enable_history) {\r\n this._history = [...this._history, state];\r\n this._history_idx = this._history.length - 1;\r\n }\r\n if (typeof options.callback === 'function') options.callback(this.state);\r\n }\r\n }\r\n\r\n private _history_prev = () => {\r\n this._history_idx--;\r\n if (this._history_idx >= 0) {\r\n this.setState(this._history[this._history_idx], { render: true, history: false });\r\n }\r\n else {\r\n this._history_idx = 0;\r\n }\r\n };\r\n\r\n private _history_next = () => {\r\n this._history_idx++;\r\n if (this._history_idx < this._history.length) {\r\n this.setState(this._history[this._history_idx], { render: true, history: false });\r\n }\r\n else {\r\n this._history_idx = this._history.length - 1;\r\n }\r\n };\r\n\r\n constructor(\r\n protected state?: T,\r\n protected view?: View,\r\n protected update?: Update,\r\n protected options?) {\r\n }\r\n\r\n start = (element = null, options?: MountOptions): Component => {\r\n return this.mount(element, { ...options, render: true });\r\n }\r\n\r\n public mount(element = null, options?: MountOptions): Component {\r\n console.assert(!this.element, 'Component already mounted.')\r\n this.options = options = { ...this.options, ...options };\r\n this.element = element;\r\n this.global_event = options.global_event;\r\n this.enable_history = !!options.history;\r\n\r\n if (this.enable_history) {\r\n this.on(options.history.prev || 'history-prev', this._history_prev);\r\n this.on(options.history.next || 'history-next', this._history_next);\r\n }\r\n\r\n if (options.route) {\r\n this.update = this.update || {};\r\n this.update[options.route] = REFRESH;\r\n }\r\n\r\n this.add_actions();\r\n this.state = this.state ?? this['model'] ?? {};\r\n if (typeof this.state === 'function') this.state = this.state();\r\n if (options.render) {\r\n this.setState(this.state, { render: true, history: true });\r\n } else {\r\n this.setState(this.state, { render: false, history: true });\r\n }\r\n if (app['debug']) {\r\n if (componentCache.get(element)) { componentCache.get(element).push(this) }\r\n else { componentCache.set(element, [this])}\r\n }\r\n return this;\r\n }\r\n\r\n is_global_event(name: string): boolean {\r\n return name && (\r\n this.global_event ||\r\n this._global_events.indexOf(name) >= 0 ||\r\n name.startsWith('#') || name.startsWith('/') || name.startsWith('@'));\r\n }\r\n\r\n add_action(name: string, action, options: ActionOptions = {}) {\r\n if (!action || typeof action !== 'function') return;\r\n if (options.global) this._global_events.push(name);\r\n this.on(name as any, (...p) => {\r\n\r\n app['debug'] && app.run('debug', {\r\n component: this,\r\n _: '>',\r\n event: name, p,\r\n current_state: this.state,\r\n options\r\n });\r\n\r\n const newState = action(this.state, ...p);\r\n\r\n app['debug'] && app.run('debug', {\r\n component: this,\r\n _: '<',\r\n event: name, p,\r\n newState,\r\n state: this.state,\r\n options\r\n });\r\n\r\n this.setState(newState, options)\r\n }, options);\r\n }\r\n\r\n add_actions() {\r\n const actions = this.update || {};\r\n Reflect.getMetadataKeys(this).forEach(key => {\r\n if (key.startsWith('apprun-update:')) {\r\n const meta = Reflect.getMetadata(key, this)\r\n actions[meta.name] = [this[meta.key].bind(this), meta.options];\r\n }\r\n })\r\n\r\n const all = {};\r\n if (Array.isArray(actions)) {\r\n actions.forEach(act => {\r\n const [name, action, opts] = act as ActionDef;\r\n const names = name.toString();\r\n names.split(',').forEach(n => all[n.trim()] = [action, opts])\r\n })\r\n } else {\r\n Object.keys(actions).forEach(name => {\r\n const action = actions[name];\r\n if (typeof action === 'function' || Array.isArray(action)) {\r\n name.split(',').forEach(n => all[n.trim()] = action)\r\n }\r\n })\r\n }\r\n\r\n if (!all['.']) all['.'] = REFRESH;\r\n Object.keys(all).forEach(name => {\r\n const action = all[name];\r\n if (typeof action === 'function') {\r\n this.add_action(name, action);\r\n } else if (Array.isArray(action)) {\r\n this.add_action(name, action[0], action[1]);\r\n }\r\n });\r\n }\r\n\r\n public run(event: E, ...args) {\r\n const name = event.toString();\r\n return this.is_global_event(name) ?\r\n app.run(name, ...args) :\r\n this._app.run(name, ...args);\r\n }\r\n\r\n public on(event: E, fn: (...args) => void, options?: any) {\r\n const name = event.toString();\r\n this._actions.push({ name, fn });\r\n return this.is_global_event(name) ?\r\n app.on(name, fn, options) :\r\n this._app.on(name, fn, options);\r\n }\r\n\r\n public unmount() {\r\n this.observer?.disconnect();\r\n this._actions.forEach(action => {\r\n const { name, fn } = action;\r\n this.is_global_event(name) ?\r\n app.off(name, fn) :\r\n this._app.off(name, fn);\r\n });\r\n }\r\n}\r\n", "import app from './app';\n\nexport type Route = (url: string, ...args: any[]) => any;\n\nexport const ROUTER_EVENT: string = '//';\nexport const ROUTER_404_EVENT: string = '///';\n\nexport const route: Route = (url: string) => {\n if (!url) url = '#';\n if (url.startsWith('#')) {\n const [name, ...rest] = url.split('/');\n app.run(name, ...rest) || app.run(ROUTER_404_EVENT, name, ...rest);\n app.run(ROUTER_EVENT, name, ...rest);\n } else if (url.startsWith('/')) {\n const [_, name, ...rest] = url.split('/');\n app.run('/' + name, ...rest) || app.run(ROUTER_404_EVENT, '/' + name, ...rest);\n app.run(ROUTER_EVENT, '/' + name, ...rest);\n } else {\n app.run(url) || app.run(ROUTER_404_EVENT, url);\n app.run(ROUTER_EVENT, url);\n }\n}\nexport default route;", "import app from './app';\nimport { createElement, render, Fragment } from './vdom';\nimport { Component } from './component';\nimport { VNode, View, Action, Update, EventOptions, ActionOptions, MountOptions, AppStartOptions } from './types';\nimport { on, update, customElement } from './decorator';\nimport webComponent, { CustomElementOptions } from './web-component';\nimport { Route, route, ROUTER_EVENT, ROUTER_404_EVENT } from './router';\n\nexport interface IApp {\n start(element?: Element | string, model?: T, view?: View, update?: Update,\n options?: AppStartOptions): Component;\n on(name: string, fn: (...args: any[]) => void, options?: any): void;\n off(name: string, fn: (...args: any[]) => void): void;\n run(name: string, ...args: any[]): number;\n h(tag: string | Function, props, ...children): VNode | VNode[];\n createElement(tag: string | Function, props, ...children): VNode | VNode[];\n render(element: HTMLElement, node: VNode): void;\n Fragment(props, ...children): any[];\n route?: Route;\n webComponent(name: string, componentClass, options?: CustomElementOptions): void;\n}\n\napp.h = app.createElement = createElement;\napp.render = render;\napp.Fragment = Fragment;\napp.webComponent = webComponent;\n\napp.start = (element?: Element, model?: T, view?: View, update?: Update,\n options?: AppStartOptions): Component => {\n const opts = { ...options, render: true, global_event: true };\n const component = new Component(model, view, update);\n if (options && options.rendered) component.rendered = options.rendered;\n component.mount(element, opts);\n return component;\n};\n\nconst NOOP = _ => {/* Intentionally empty */ }\napp.on('$', NOOP);\napp.on('debug', _ => NOOP);\napp.on(ROUTER_EVENT, NOOP);\napp.on('#', NOOP);\napp['route'] = route;\napp.on('route', url => app['route'] && app['route'](url));\n\nif (typeof document === 'object') {\n document.addEventListener(\"DOMContentLoaded\", () => {\n if (app['route'] === route) {\n window.onpopstate = () => route(location.hash);\n if (!document.body.hasAttribute('apprun-no-init')) route(location.hash);\n }\n });\n}\n\nexport type StatelessComponent = (args: T) => string | VNode | void;\nexport { app, Component, View, Action, Update, on, update, EventOptions, ActionOptions, MountOptions, Fragment }\nexport { update as event };\nexport { ROUTER_EVENT, ROUTER_404_EVENT };\nexport { customElement, CustomElementOptions, AppStartOptions };\nexport default app as IApp;\n\nif (typeof window === 'object') {\n window['Component'] = Component;\n window['React'] = app;\n window['on'] = on;\n window['customElement'] = customElement;\n}\n\n\n", "import { createElement, updateElement, Fragment } from './vdom-my';\nexport function render(element, html, parent?) {\n updateElement(element, html, parent);\n}\nexport { createElement, Fragment };\n\n\n", "/**\n * The code was extracted from:\n * https://github.com/davidchambers/Base64.js\n */\n\nvar chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\n\nfunction InvalidCharacterError(message) {\n this.message = message;\n}\n\nInvalidCharacterError.prototype = new Error();\nInvalidCharacterError.prototype.name = \"InvalidCharacterError\";\n\nfunction polyfill(input) {\n var str = String(input).replace(/=+$/, \"\");\n if (str.length % 4 == 1) {\n throw new InvalidCharacterError(\n \"'atob' failed: The string to be decoded is not correctly encoded.\"\n );\n }\n for (\n // initialize result and counters\n var bc = 0, bs, buffer, idx = 0, output = \"\";\n // get next character\n (buffer = str.charAt(idx++));\n // character found in table? initialize bit storage and add its ascii value;\n ~buffer &&\n ((bs = bc % 4 ? bs * 64 + buffer : buffer),\n // and if not first of each 4 characters,\n // convert the first 8 bits to one ascii character\n bc++ % 4) ?\n (output += String.fromCharCode(255 & (bs >> ((-2 * bc) & 6)))) :\n 0\n ) {\n // try to find character in table (0-63, not found => -1)\n buffer = chars.indexOf(buffer);\n }\n return output;\n}\n\nexport default (typeof window !== \"undefined\" &&\n window.atob &&\n window.atob.bind(window)) ||\npolyfill;", "import atob from \"./atob\";\n\nfunction b64DecodeUnicode(str) {\n return decodeURIComponent(\n atob(str).replace(/(.)/g, function(m, p) {\n var code = p.charCodeAt(0).toString(16).toUpperCase();\n if (code.length < 2) {\n code = \"0\" + code;\n }\n return \"%\" + code;\n })\n );\n}\n\nexport default function(str) {\n var output = str.replace(/-/g, \"+\").replace(/_/g, \"/\");\n switch (output.length % 4) {\n case 0:\n break;\n case 2:\n output += \"==\";\n break;\n case 3:\n output += \"=\";\n break;\n default:\n throw \"Illegal base64url string!\";\n }\n\n try {\n return b64DecodeUnicode(output);\n } catch (err) {\n return atob(output);\n }\n}", "\"use strict\";\n\nimport base64_url_decode from \"./base64_url_decode\";\n\nexport function InvalidTokenError(message) {\n this.message = message;\n}\n\nInvalidTokenError.prototype = new Error();\nInvalidTokenError.prototype.name = \"InvalidTokenError\";\n\nexport default function(token, options) {\n if (typeof token !== \"string\") {\n throw new InvalidTokenError(\"Invalid token specified\");\n }\n\n options = options || {};\n var pos = options.header === true ? 0 : 1;\n try {\n return JSON.parse(base64_url_decode(token.split(\".\")[pos]));\n } catch (e) {\n throw new InvalidTokenError(\"Invalid token specified: \" + e.message);\n }\n}", "/* eslint-disable @typescript-eslint/no-explicit-any */\nimport app from 'apprun';\nimport jwt_decode, { JwtPayload } from 'jwt-decode';\n\nconst defaultBasePath = window['defaultBasePath'] || '/api';\n\nlet access_token: string = (window && window.localStorage && window.localStorage.getItem('jwt')) || '';\n// let access_token: string = getCookie('jwt');\nexport function getToken() {\n return access_token;\n}\nexport function setToken(token: string) {\n access_token = token;\n // document.cookie = 'jwt=' + token;\n if (!window.localStorage) {return;}\n if (token) {window.localStorage.setItem('jwt', token);} else {window.localStorage.removeItem('jwt');}\n}\n\nconst NProgress = window['NProgress'];\nasync function fetchAsync(method: 'GET' | 'POST' | 'DELETE' | 'PUT', url: string, body?: any) {\n NProgress?.set(0.4);\n const headers = access_token ? { Authorization: `Bearer ${access_token}` } : {};\n headers['Content-Type'] = 'application/json; charset=utf-8';\n url = `${defaultBasePath}${url}`;\n const response = await window['fetch'](url, {\n method,\n headers,\n body: body && JSON.stringify(body)\n });\n NProgress?.done();\n if (response.status === 401) {\n app.run('show-message', 'Authentication failed ... \uD83D\uDEAB\uD83E\uDD1A\uD83D\uDE26', 401);\n app.run('#login', response);\n return;\n }\n if (!response.ok) {\n app.run('show-message', 'Calling the server ... \uD83D\uDCA5\uD83D\uDC4E\uD83D\uDE13', 500);\n throw response;\n }\n\n return response.json();\n}\n\nasync function fetchFileAsync(method: 'GET' | 'POST' | 'DELETE' | 'PUT', url: string, body?: any) {\n NProgress?.set(0.4);\n const headers = access_token ? { Authorization: `Bearer ${access_token}` } : {};\n headers['enctype'] = 'multipart/form-data';\n url = `${defaultBasePath}${url}`;\n const response = await window['fetch'](url, {\n method,\n headers,\n body: body\n });\n NProgress?.done();\n if (response.status === 401) {\n app.run('show-message', 'Authentication failed ... \uD83D\uDEAB\uD83E\uDD1A\uD83D\uDE26', 401);\n app.run('#login', response);\n return;\n }\n if (!response.ok) {\n throw response.statusText;\n }\n\n return response.text();\n}\n\nasync function check_jwt() {\n try {\n const access_token_expiry = jwt_decode(access_token).exp;\n if (Date.now() / 1000 > access_token_expiry) {\n const newToken = await fetchAsync('GET', '/users/refreshJWT');\n setToken(newToken);\n }\n return true;\n } catch {\n setToken(null);\n }\n}\n\nexport async function get(url: string, auth = true): Promise {\n const ok = !auth || await check_jwt();\n if (ok) {return fetchAsync('GET', url);}\n}\n\nexport async function post(url: string, body: any, auth = true): Promise {\n const ok = !auth || await check_jwt();\n if (ok) {return fetchAsync('POST', url, body);}\n}\n\nexport function postFile(url: string, body?: any): Promise {\n return fetchFileAsync('POST', url, body);\n}\n\nexport function del(url: string, body?: any) {\n return fetchAsync('DELETE', url, body);\n}\n\nexport function put(url: string, body?: any) {\n return fetchAsync('PUT', url, body);\n}\n\nexport function toQueryString(obj) {\n const parts = [];\n for (const i in obj) {\n // eslint-disable-next-line no-prototype-builtins\n if (obj.hasOwnProperty(i)) {\n parts.push(encodeURIComponent(i) + '=' + encodeURIComponent(obj[i]));\n }\n }\n return parts.join('&');\n}\n\nexport function serializeObject(form) {\n const obj = {};\n if (typeof form === 'object' && form.nodeName === 'FORM') {\n for (let i = 0; i < form.elements.length; i++) {\n const field = form.elements[i];\n if (\n field.name &&\n field.type !== 'file' &&\n field.type !== 'reset' &&\n field.type !== 'submit' &&\n field.type !== 'button'\n ) {\n if (field.type === 'select-multiple') {\n obj[field.name] = '';\n let tempvalue = '';\n for (let j = 0; j < form.elements[i].options.length; j++) {\n if (field.options[j].selected) {tempvalue += field.options[j].value + ';';}\n }\n if (tempvalue.charAt(tempvalue.length - 1) === ';') {obj[field.name] = tempvalue.substring(0, tempvalue.length - 1);}\n } else if ((field.type !== 'checkbox' && field.type !== 'radio') || field.checked) {\n obj[field.name] = field.value;\n }\n }\n }\n }\n\n return obj as T;\n}\n\nexport function serializeObjectEnhanced(form) {\n const obj = {};\n if (typeof form === 'object' && form.nodeName === 'FORM') {\n for (let i = 0; i < form.elements.length; i++) {\n const field = form.elements[i];\n if (\n field.name &&\n field.type !== 'file' &&\n field.type !== 'reset' &&\n field.type !== 'submit' &&\n field.type !== 'button'\n ) {\n if (field.type === 'select-multiple') {\n obj[field.name] = '';\n let tempvalue = '';\n for (let j = 0; j < form.elements[i].options.length; j++) {\n if (field.options[j].selected) {tempvalue += field.options[j].value + ';';}\n }\n if (tempvalue.charAt(tempvalue.length - 1) === ';') {obj[field.name] = tempvalue.substring(0, tempvalue.length - 1);}\n } else if ((field.type !== 'checkbox' && field.type !== 'radio') || field.checked) {\n obj[field.name] = field.value;\n } else if ((field.type === 'checkbox' || field.type === 'radio') && !field.checked) {\n obj[field.name] = '';\n }\n }\n }\n }\n return obj as T;\n}\n", "import {\r\n getToken,\r\n setToken,\r\n toQueryString,\r\n serializeObject,\r\n get,\r\n post,\r\n postFile,\r\n serializeObjectEnhanced,\r\n} from './fetch';\r\n\r\nimport jwt_decode from 'jwt-decode';\r\n\r\nexport { toQueryString, serializeObject, serializeObjectEnhanced };\r\n\r\nexport interface IProfile {\r\n email: string;\r\n token: string;\r\n}\r\nexport interface ISession {\r\n user: IProfile;\r\n access?: IAccessToken;\r\n}\r\n\r\nexport interface IAccessToken {\r\n aud: string;\r\n exp: number;\r\n firstname: string;\r\n iat: number;\r\n iss: string;\r\n lang: string;\r\n lastname: string;\r\n nbf: number;\r\n roles: string;\r\n sub: string;\r\n role: string[];\r\n userID: string;\r\n unique_name: string;\r\n}\r\nlet accessMap;\r\n\r\nexport const rpt = {\r\n getRpts: (lang) => {\r\n return get('/excelRpt/getRpts/' + lang);\r\n },\r\n getLocs: () => {\r\n return get('/excelRpt/userlocations/en');\r\n },\r\n getToken: () => getToken(),\r\n getRptUrl: () => {\r\n return 'https://rlp-frs-qa.rlpnetwork.com/api/excelexports/12391/2024-06-01/2024-06-30/2/en/' + '?t=' + getToken();\r\n }\r\n};\r\n\r\n// Type definitions for Google Sign-In API\r\ndeclare global {\r\n interface Window {\r\n google?: {\r\n accounts: {\r\n oauth2: {\r\n initTokenClient(config: {\r\n client_id: string;\r\n scope: string;\r\n callback: (response: {\r\n error?: string;\r\n credential?: string;\r\n access_token?: string;\r\n expires_in?: number;\r\n scope?: string;\r\n token_type?: string;\r\n }) => void;\r\n }): {\r\n requestAccessToken(): void;\r\n };\r\n };\r\n };\r\n };\r\n }\r\n}\r\n\r\n// Load Google Sign-In API\r\nconst loadGoogleSignIn = (): Promise => {\r\n return new Promise((resolve) => {\r\n const script = document.createElement('script');\r\n script.src = 'https://accounts.google.com/gsi/client';\r\n script.async = true;\r\n script.defer = true;\r\n script.onload = () => resolve();\r\n document.head.appendChild(script);\r\n });\r\n};\r\n\r\nexport const auth = {\r\n token: (): string => getToken(),\r\n current: (): IAccessToken => {\r\n let jwt;\r\n const token = getToken();\r\n try {\r\n jwt = token ? jwt_decode(token) : null;\r\n } catch (err) {\r\n // eslint-disable-next-line no-console\r\n console.error(err);\r\n }\r\n return jwt;\r\n },\r\n signIn: async (user: { email: string; password: string }) => {\r\n const session = await post('/users/login', { user }, false);\r\n setToken(session.user.token);\r\n try {\r\n const jwt = getToken() ? jwt_decode(getToken()) : null;\r\n //console.log(jwt);\r\n const roles = jwt.role;\r\n if (roles.includes('rlp_IngestSSO')) {\r\n const result = await get('/sso/jwt/' + 'IRE' + '/' + 'en');\r\n setToken(null);\r\n document.cookie = 'jwt=; expires=Thu, 01 Jan 1970 00:00:01 GMT';\r\n window.location.replace(result);\r\n return 'stop';\r\n }\r\n } catch (err) {\r\n // eslint-disable-next-line no-console\r\n console.error(err);\r\n }\r\n accessMap = await get('/users/access');\r\n return session;\r\n },\r\n signOut: () => {\r\n setToken(null);\r\n },\r\n hasPermission: async (name: string, permission: string) => {\r\n if (!accessMap) {\r\n accessMap = await get('/users/access');\r\n }\r\n const accessRow = accessMap?.find(p => p.obj === name);\r\n return accessRow && accessRow.acc.includes(permission);\r\n },\r\n getCrmAuthParam: () => {\r\n return get('/sso/getauthparam/crm/');\r\n },\r\n signInWithGoogle: async () => {\r\n try {\r\n // Load Google Sign-In API if not already loaded\r\n if (!window.google) {\r\n await loadGoogleSignIn();\r\n }\r\n\r\n return new Promise((resolve, reject) => {\r\n const client = window.google.accounts.oauth2.initTokenClient({\r\n client_id: '436712924596-5eur9m3ptir4o1c05avoi9bsuce1h6fv.apps.googleusercontent.com', // This should be configured in the application\r\n scope: 'email profile',\r\n callback: async (response) => {\r\n if (response.error) {\r\n reject(new Error(response.error));\r\n return;\r\n }\r\n\r\n try {\r\n const session = await post('/users/google-signin', {\r\n AccessToken: response.access_token\r\n }, false);\r\n\r\n setToken(session.user.token);\r\n\r\n const jwt = getToken() ? jwt_decode(getToken()) : null;\r\n if (jwt?.role.includes('rlp_IngestSSO')) {\r\n const result = await get('/sso/jwt/' + 'IRE' + '/' + 'en');\r\n setToken(null);\r\n document.cookie = 'jwt=; expires=Thu, 01 Jan 1970 00:00:01 GMT';\r\n window.location.replace(result);\r\n resolve('stop');\r\n return;\r\n }\r\n accessMap = await get('/users/access');\r\n\r\n resolve(session);\r\n } catch (error) {\r\n // eslint-disable-next-line no-console\r\n console.error('Google sign-in failed:', error);\r\n reject(error); // This will be handled by the UI layer without refreshing\r\n }\r\n\r\n }\r\n });\r\n\r\n client.requestAccessToken();\r\n });\r\n } catch (error) {\r\n throw new Error('Failed to initialize Google Sign In');\r\n }\r\n }\r\n};\r\n\r\nexport const users = {\r\n search: (request, lang = 0) => {\r\n return post('/users/search/' + lang.toString(), request);\r\n },\r\n searchAdvance: (request) => {\r\n return post('/users/searchadvance', request);\r\n },\r\n Post: (request) => {\r\n return post('/users/', request);\r\n },\r\n checkEmailAvailability: (email) => {\r\n return get('/users/checkEmailAvailability/' + email + '/');\r\n },\r\n QuickLinks: (payload) => {\r\n return post('/users/addQuickLinks/', payload);\r\n },\r\n GetQuickLinks: (userEmail) => {\r\n return post('/users/getQuickLinks/', userEmail);\r\n },\r\n GetRoyalMag: (userEmail) => {\r\n return post('/users/getRoyalMag/', userEmail);\r\n },\r\n GetCompanyPersonId: (userId) => {\r\n return post('/users/getCompanyPersonId/', userId);\r\n },\r\n DeleteQuickLinks: (payload) => {\r\n return post('/users/deleteQuickLinks/', payload);\r\n },\r\n getUser: (email, personID) => {\r\n return get('/users/profile/' + email + '/' + personID);\r\n },\r\n getUserPropertyBag: (uname) => {\r\n return get('/users/properties/' + uname + '/');\r\n },\r\n getUserPhoto: (uname) => {\r\n return get('/users/photo/' + uname + '/');\r\n },\r\n resetProfilePassword: (payload) => {\r\n return post('/users/resetProfilePassword/', payload);\r\n },\r\n upsertUserProperty: (uname, model) => {\r\n return post('/users/properties/' + uname + '/', model);\r\n },\r\n deleteUserProperty: (uname, model) => {\r\n return post('/users/properties/del/' + uname + '/', model);\r\n },\r\n getAwardsTracking: (email) => {\r\n return post('/awardstracking/', email);\r\n },\r\n saveProfile: (model) => {\r\n return post('/users/saveProfile', model);\r\n },\r\n postUserAreas: (personId, model) => {\r\n return post('/users/' + personId + '/areaserviced', model);\r\n },\r\n postExpertTopic: (personId, model) => {\r\n return post('/users/' + personId + '/experttopic', model);\r\n },\r\n getUserLocations: (email) => {\r\n return get('/users/locations/' + email + '/');\r\n },\r\n getUsersList: (companyId, locationId, filter = '') => {\r\n return get('/users/' + (companyId ? companyId : 0) + '/' + (locationId ? locationId : 0) + '/' + filter);\r\n },\r\n getTerminateProfile: (email) => {\r\n return get('/users/terminateprofile/' + email + '/');\r\n },\r\n getPotentialTransferees: (email, terminateuseremail) => {\r\n return get('/users/potentialtransferees/' + email + '/' + terminateuseremail + '/');\r\n },\r\n terminateUser: (model) => {\r\n return post('/users/terminateUser', model);\r\n },\r\n getOneTimePwd: (id) => {\r\n return get('/users/impersonation/' + id + '/');\r\n },\r\n initiateForceSync: (id) => {\r\n return get('/users/forcesync/' + id + '/');\r\n },\r\n getUserCompany: (email) => {\r\n return get('/users/company/' + email + '/');\r\n },\r\n getUserSearchLocations: (email) => {\r\n return get('/users/searchlocations/' + email + '/');\r\n },\r\n isCustomerCare: (email) => {\r\n return get('/users/isCustomerCare/' + email + '/');\r\n },\r\n isManageUser: (email) => {\r\n return get('/users/isManageUser/' + email + '/');\r\n },\r\n getRecoveryEmail: (email) => {\r\n return get('/users/recoveryEmail/' + email + '/', false);\r\n },\r\n sendForgotPasswordInstructions: (email) => {\r\n return get('/users/sendForgotPasswordInstructions/' + email + '/', false);\r\n },\r\n resetPassword: (model) => {\r\n return post('/users/resetPassword', model, false);\r\n },\r\n getReactivateProfile: (email) => {\r\n return get('/users/reactivateprofile/' + email + '/');\r\n },\r\n reactivateUser: (model) => {\r\n return post('/users/reactivateUser', model);\r\n },\r\n setPassword: (personId, password) => {\r\n return post('/users/' + personId + '/' + 'setpassword', password);\r\n },\r\n getDomain: (model) => {\r\n return post('/users/getDomain', model);\r\n },\r\n saveExpertData: (model) => {\r\n return post('/users/saveExpertData', model);\r\n },\r\n getExpertData: (email) => {\r\n return get('/users/getExpertData/' + email + '/');\r\n },\r\n parkEmail: (id, park) => {\r\n return post('/users/parkemail/' + id + '/', park);\r\n },\r\n saveExpertNewEvent: (model) => {\r\n return post('/users/saveExpertNewEvent', model);\r\n },\r\n updateExpertEvents: (model) => {\r\n return post('/users/updateExpertEvents', model);\r\n },\r\n deleteExpertEvent: (model) => {\r\n return post('/users/deleteExpertEvent', model);\r\n },\r\n getCalendarInfo: (email) => {\r\n return get('/users/brokersharedcalendars/' + email + '/');\r\n },\r\n getPersonID: (email) => {\r\n return get('/users/personid/' + email + '/');\r\n },\r\n getGoogleDeleteList: () => {\r\n return get('/users/googledeleteforapproval/');\r\n },\r\n approveGoogleDelete: (model) => {\r\n return post('/users/approvegoogledelete', model);\r\n },\r\n getMenus: () => {\r\n return get('/WPObjAccess/GetMenuIdList');\r\n },\r\n getHeader: () => {\r\n return get('/users/getheader');\r\n },\r\n getTeams: (email, langCt) => {\r\n return get('/users/getteams/' + email + '/' + langCt);\r\n },\r\n getIreDashboardData: (personId) => {\r\n return get('/users/getIreDashboardData/' + personId);\r\n },\r\n getOldEmployeeDateHistory: (personId) => {\r\n return get('/users/getOldEmployeeDateHistory/' + personId);\r\n },\r\n getAuditEmployeeType: (personId) => {\r\n return get('/users/getAuditEmployeeType/' + personId);\r\n },\r\n getAuditLocation: (personId) => {\r\n return get('/users/getAuditLocation/' + personId);\r\n },\r\n getAuditPublicSiteInd: (personId) => {\r\n return get('/users/getAuditPublicSiteInd/' + personId);\r\n },\r\n getAuditPersonAwardPublicInd: (personId, awardId, year) => {\r\n return get('/users/getAuditPersonAwardPublicInd/' + personId + '/' + awardId + '/' + year);\r\n },\r\n getAuditTeamMember: (personId) => {\r\n return get('/users/getAuditTeamMember/' + personId);\r\n },\r\n getAuditNetworkMovement: (personId) => {\r\n return get('/users/getAuditNetworkMovement/' + personId);\r\n }\r\n};\r\n\r\nexport const teams = {\r\n getTeamConstraints: (companyPersonID) => {\r\n return get('/team/getTeamConstraints/' + companyPersonID + '/');\r\n },\r\n updateTeamDate: (dateType, companyPersonID, teamMemberID, request) => {\r\n return post('/team/' + companyPersonID + '/updateTeamMembership/' + teamMemberID + '/' + dateType + '/', request);\r\n },\r\n getTeams: (companyId) => {\r\n return get('/team/' + (companyId ? companyId : ''));\r\n }\r\n};\r\n\r\nexport const companies = {\r\n getAllCompanies: () => {\r\n return get('/Companies');\r\n },\r\n getAllTransferCompanies: () => {\r\n return get('/TransferCompanies');\r\n },\r\n getOpenCompanies: () => {\r\n return get('/OpenCompanies');\r\n },\r\n getCompanyDetail: (request) => {\r\n return get('/Companies/' + request);\r\n },\r\n post: (companyId, model) => {\r\n return post('/Companies/' + companyId, model);\r\n },\r\n getCompanyAddress: (request) => {\r\n return get('/Companies/' + request + '/address');\r\n },\r\n postCompanyAddress: (companyId, model) => {\r\n return post('/Companies/' + companyId + '/address', model);\r\n },\r\n getCompanyPhones: (request) => {\r\n return get('/Companies/' + request + '/phone');\r\n },\r\n postCompanyPhones: (companyId, model) => {\r\n return post('/Companies/' + companyId + '/phone', model);\r\n },\r\n getCompanyLocations: (request) => {\r\n return get('/Companies/' + request + '/locations');\r\n },\r\n getCompaniesByProvince: (provStateCt) => {\r\n return get('/Companies/Prov/' + provStateCt + '/');\r\n },\r\n getAllActiveNonAgents: (request) => {\r\n return get('/Companies/' + request + '/getallactivenonagents');\r\n },\r\n upsertProperty: (id, model) => {\r\n return post('/companies/properties/' + id + '/', model);\r\n },\r\n deleteProperty: (id, model) => {\r\n return post('/companies/properties/del/' + id + '/', model);\r\n },\r\n getRpt: (id, invoiceMonth) => {\r\n window.location.href = window['defaultBasePath'] + ('/companies/report/' + id + '/' + invoiceMonth + '?t=' + getToken());\r\n },\r\n getRptAvailableMonths: (id) => {\r\n return get('/Companies/reportmonths/' + id);\r\n },\r\n initiateForceSync: (id) => {\r\n return get('/companies/forcesync/' + id + '/');\r\n }\r\n};\r\n\r\nexport const locations = {\r\n getAllLocations: () => {\r\n return get('/locations');\r\n },\r\n getLocationDetail: (request) => {\r\n return get('/locations/' + request);\r\n },\r\n getLocationPhones: (request) => {\r\n return get('/locations/' + request + '/phone');\r\n },\r\n getLocationsByCompanyID: (request) => {\r\n return get('/Companies/' + request + '/locations');\r\n },\r\n post: (locationId, model) => {\r\n return post('/locations/' + locationId, model);\r\n },\r\n getLocationAddress: (request) => {\r\n return get('/locations/' + request + '/address');\r\n },\r\n postLocationAddress: (locationId, model) => {\r\n return post('/locations/' + locationId + '/address', model);\r\n },\r\n postLocationAreas: (locationId, model) => {\r\n return post('/locations/' + locationId + '/areaserviced', model);\r\n },\r\n getProperties: (id) => {\r\n return get('/locations/properties/' + id + '/');\r\n },\r\n upsertProperty: (id, model) => {\r\n return post('/locations/properties/' + id + '/', model);\r\n },\r\n deleteProperty: (id, model) => {\r\n return post('/location/properties/del/' + id + '/', model);\r\n },\r\n getCompanyLocationsByUser: (id) => {\r\n return get('/locations/awardLocations/' + id + '/');\r\n },\r\n getAwardbyLocation: (companyId, locationId) => {\r\n return get('/locations/award/' + companyId + '/' + locationId + '/');\r\n },\r\n uploadAwards: (id: number, transferobj: Record) => post('/locations/uploadAward/' + id + '/', transferobj),\r\n updateEligible: (model: Record) => {\r\n return post('/locations/eligible/', model);\r\n },\r\n uploadAwardFile: async (companyId: number, locationId: number, formData: FormData): Promise => {\r\n const res = await postFile(`/locations/uploadAwardFile/${companyId}//${locationId}/`, formData);\r\n return res;\r\n },\r\n confirmAward: (model: Record) => {\r\n return post('/locations/confirmAward/', model);\r\n }\r\n};\r\n\r\nexport const phones = {\r\n getPhones: (objType, objId) => {\r\n return get('/phones/' + objType + '/' + objId);\r\n },\r\n postPhones: (objType, objId, model) => {\r\n return post('/phones/' + objType + '/' + objId, model);\r\n }\r\n};\r\n\r\nexport const addresses = {\r\n getAddress: (objType, objId) => {\r\n return get('/address/' + objType + '/' + objId);\r\n },\r\n postAddress: (objType, objId, model) => {\r\n return post('/address/' + objType + '/' + objId, model);\r\n }\r\n};\r\n\r\nexport const regions = {\r\n getAllRegions: () => {\r\n return get('/regionsserviced');\r\n },\r\n getRegions: (query, province) => {\r\n return get('/regionsserviced?query=' + query + '&province=' + province);\r\n }\r\n};\r\n\r\nexport const commProg = {\r\n get: (personId) => {\r\n return get('/commprog/' + personId);\r\n },\r\n getExHistory: (personId) => {\r\n return get('/commprog/commfeeex/' + personId);\r\n },\r\n getCommFee: () => {\r\n return get('/commprog/commfee/');\r\n },\r\n upsertCommProg: (personId, model) => {\r\n return post('/commprog/' + personId, model);\r\n },\r\n upsertCommFeeEx: (personId, model) => {\r\n return post('/commprog/commfeeex/' + personId, model);\r\n },\r\n getCommConstraints: (companyPersonId) => {\r\n return get('/commprog/commconstraints/' + companyPersonId);\r\n }\r\n};\r\n\r\nexport const ProtectionRoyale = {\r\n get: (personId) => {\r\n return get('/protectionroyale/' + personId);\r\n },\r\n upsertPRSubs: (personId, model) => {\r\n return post('/protectionroyale/' + personId, model);\r\n }\r\n};\r\n\r\nexport const smartLead = {\r\n get: (companyId) => {\r\n return get('/companies/smartlead/' + companyId);\r\n },\r\n getSmartLeadFee: () => {\r\n return get('/companies/smartlead/commfee/');\r\n },\r\n upsertSmartLead: (model) => {\r\n return post('/companies/smartlead/', model);\r\n }\r\n};\r\n\r\nexport const contractOption = {\r\n get: (locationId) => {\r\n return get('/contractoption/' + locationId);\r\n },\r\n upsertContractOption: (locationId, model) => {\r\n return post('/contractoption/' + locationId, model);\r\n },\r\n deleteContractOption: (locationId, model) => {\r\n return post('/deletecontractoption/' + locationId, model);\r\n }\r\n};\r\n\r\nexport const feeException = {\r\n get: (personId) => {\r\n return get('/users/feeexception/' + personId);\r\n },\r\n upsertFeeException: (personId, model) => {\r\n return post('/users/feeexception/' + personId, model);\r\n },\r\n deleteFeeException: (personId, model) => {\r\n return post('/users/deletefeeexception/' + personId, model);\r\n }\r\n};\r\n\r\nexport const obApi = {\r\n getOnboardingTypeOptions: () => {\r\n return get('/onboarding/getOnboardingTypeOptions');\r\n },\r\n transferAgents: (model) => {\r\n return post('/onboarding/rlp2rlp/transfer', model);\r\n }\r\n};\r\n\r\nexport const powerBI = {\r\n getConfig: (name) => {\r\n return get('/powerbi/config/' + name);\r\n }\r\n};\r\n\r\nexport const siteSearch = {\r\n simple: (query, lang = '') => {\r\n return get('/sitesearch/simplesearch?query=' + query.trim() + '&lang=' + lang.trim());\r\n }\r\n};\r\n\r\nexport const referralSearch = {\r\n search: async (searchTerm) => {\r\n return get('/referralsearch?searchTerm=' + searchTerm);\r\n },\r\n searchByType: async (searchTerm, type, id, langCt) => {\r\n const res = await get('/referralsearch?type=' + type + '&searchTerm=' + searchTerm + '&id=' + id + '&langCt=' + langCt);\r\n return res;\r\n },\r\n getPersonDetails: async (companyPersonID, langCt) => {\r\n const res = await get('/rfpersondetails/' + companyPersonID + '/' + langCt);\r\n return res;\r\n },\r\n getExpertDirectoryDetails: async (companyPersonID) => {\r\n const res = await get('/edpersondetails/' + companyPersonID);\r\n return res;\r\n }\r\n};\r\n\r\nexport const expertsDirectorty = {\r\n getExpertsdirectory: async (lang) => {\r\n return get('/getExpertsdirectory/' + lang);\r\n }\r\n};\r\n\r\nexport const Lookup = {\r\n getLookup: async () => {\r\n const response = await window['fetch']('/lookupAuto.json');\r\n const baseLookup = await response.json();\r\n const lkupAddData = await get('/regionsserviced/AdditionalLookupData');\r\n for (const lang of Object.keys(lkupAddData || {})) {\r\n const keys = Object.keys(lkupAddData[lang]);\r\n for (const key of keys) {\r\n const supplyObj = lkupAddData[lang][key];\r\n const lookupObj = baseLookup[lang][key];\r\n baseLookup[lang][key] = lookupObj.concat(supplyObj);\r\n }\r\n }\r\n return baseLookup;\r\n }\r\n};\r\n\r\nexport const api = {\r\n invoke: (method, url, data) => {\r\n if (method === 'POST') {\r\n return post('/' + url, data);\r\n } else {\r\n return get('/' + url);\r\n }\r\n }\r\n};\r\n\r\nexport async function doSSO(partnerId, partnerUrl, lang) {\r\n switch (partnerId) {\r\n case 'TF':\r\n case 'LA':\r\n case 'LL':\r\n case 'IRE': {\r\n const result = await get('/sso/jwt/' + partnerId + '/' + lang);\r\n const url = partnerUrl === 'GetFromWebConfig' ? result : partnerUrl + '?token=' + result;\r\n window.open(url, '_blank');\r\n break;\r\n }\r\n case 'ADWERX':\r\n case 'RM': {\r\n window.open('/api/sso/' + partnerId + '/' + lang + ((partnerUrl) ? '?targetURL=' + partnerUrl : ''));\r\n break;\r\n }\r\n case 'IREPOST': {\r\n const result2 = await get('/sso/jwt/' + 'IRE' + '/' + lang);\r\n const jwt = document.createElement('input');\r\n jwt.value = result2.substring(result2.indexOf('?token=') + 7);\r\n jwt.name = 'jwt';\r\n const form = document.createElement('form');\r\n form.appendChild(jwt);\r\n form.method = 'POST';\r\n form.action = result2.substring(0, result2.indexOf('?token='));\r\n form.target = '_Blank';\r\n document.body.appendChild(form);\r\n form.submit();\r\n break;\r\n }\r\n case 'JUMP':\r\n case 'CARRIAGETRADE':\r\n case 'JUMPREPORTS':\r\n case 'JUMPLE':\r\n case 'SMARTSTUDIO':\r\n case 'JUMPQR':\r\n case 'CLIENTCLICK':\r\n case 'CLIENTCLICKDOMAINS':\r\n case 'JUMPCREATECOMMERCIAL':\r\n case 'JUMPCREATEINVESTMENT':\r\n case 'JUMPCREATEVACANT':\r\n case 'JUMPCREATEFARM':\r\n case 'COMMERCIALPROPERTIESWANTED':\r\n case 'PR':\r\n window.open(`${window['defaultBasePath']}/sso/xml/${partnerId}/${lang}?t=${getToken()}`, '_Blank');\r\n break;\r\n case 'JLR': {\r\n const jlrLang = lang === '1' ? 'fr' : 'en';\r\n window.open(`${window['defaultBasePath']}/sso/${partnerId}/${jlrLang}?t=${getToken()}`, '_Blank');\r\n break;\r\n }\r\n }\r\n}\r\n", "/* eslint-disable @typescript-eslint/no-explicit-any */\nimport app from 'apprun';\nimport moment from 'moment';\nimport Pikaday from 'pikaday';\n// declare let Pikaday;\n\nimport { Lookup } from './api';\n\nexport let lookup_en;\nexport let lookup;\n\nexport async function getLookup() {\n\n if (lookup) {return lookup;}\n\n lookup = await Lookup.getLookup();\n\n lookup.en.Title = lookup.en.Title.filter(o => o.value !== '');\n lookup.fr.Title = lookup.fr.Title.filter(o => o.value !== '');\n\n lookup.en.EmployeeTypeCt.sort(function (a, b) {\n return a.value.toUpperCase() > b.value.toUpperCase() ? 1 : -1;\n });\n lookup.en.SalutationCt.sort(function (a, b) {\n return a.value.toUpperCase() > b.value.toUpperCase() ? 1 : -1;\n });\n lookup.en.Title.sort(function (a, b) {\n return a.value.toUpperCase() > b.value.toUpperCase() ? 1 : -1;\n });\n lookup.en.PreviousAffiliation.sort(function (a, b) {\n return a.value.toUpperCase() > b.value.toUpperCase() ? 1 : -1;\n });\n lookup.en.RecruitmentSource.sort(function (a, b) {\n return a.value.toUpperCase() > b.value.toUpperCase() ? 1 : -1;\n });\n\n lookup.en.RegionsServiced.sort(function (a, b) {\n return a.value.toUpperCase() > b.value.toUpperCase() ? 1 : -1;\n });\n lookup.en.MobileDeviceTypes.sort(function (a, b) {\n return a.value.toUpperCase() > b.value.toUpperCase() ? 1 : -1;\n });\n lookup.en.Designations.sort(function (a, b) {\n return a.value.toUpperCase() > b.value.toUpperCase() ? 1 : -1;\n });\n lookup.en.LanguagesSpoken.sort(function (a, b) {\n return a.value.toUpperCase() > b.value.toUpperCase() ? 1 : -1;\n });\n lookup.en.BusinessTypes.sort(function (a, b) {\n return a.value.toUpperCase() > b.value.toUpperCase() ? 1 : -1;\n });\n lookup.en.Awards.sort(function (a, b) {\n return a.value.toUpperCase() > b.value.toUpperCase() ? 1 : -1;\n });\n\n lookup.en.AdminAwards.sort(function (a, b) {\n return a.value.toUpperCase() > b.value.toUpperCase() ? 1 : -1;\n });\n lookup.en.HighestLevelOfEducation.sort(function (a, b) {\n return a.value.toUpperCase() > b.value.toUpperCase() ? 1 : -1;\n });\n\n lookup.en.ExpertTopic.sort(function (a, b) {\n return a.value.toUpperCase() > b.value.toUpperCase() ? 1 : -1;\n });\n lookup.en.ProvStateCt.sort(function (a, b) {\n return a.value.toUpperCase() > b.value.toUpperCase() ? 1 : -1;\n });\n lookup.en.ReasonForLeaving.sort(function (a, b) {\n return a.value.toUpperCase() > b.value.toUpperCase() ? 1 : -1;\n });\n lookup.en.FutureAffiliation.sort(function (a, b) {\n return a.value.toUpperCase() > b.value.toUpperCase() ? 1 : -1;\n });\n\n //console.log(lookup);\n //console.log(lookup.fr.Designations);\n\n lookup.fr.EmployeeTypeCt.sort(function (a, b) {\n return a.value.toUpperCase() > b.value.toUpperCase() ? 1 : -1;\n });\n lookup.fr.SalutationCt.sort(function (a, b) {\n return a.value.toUpperCase() > b.value.toUpperCase() ? 1 : -1;\n });\n lookup.fr.Title.sort(function (a, b) {\n return a.value.toUpperCase() > b.value.toUpperCase() ? 1 : -1;\n });\n lookup.fr.PreviousAffiliation.sort(function (a, b) {\n return a.value.toUpperCase() > b.value.toUpperCase() ? 1 : -1;\n });\n lookup.fr.RecruitmentSource.sort(function (a, b) {\n return a.value.toUpperCase() > b.value.toUpperCase() ? 1 : -1;\n });\n lookup.fr.RegionsServiced.sort(function (a, b) {\n return a.value.toUpperCase() > b.value.toUpperCase() ? 1 : -1;\n });\n lookup.fr.MobileDeviceTypes.sort(function (a, b) {\n return a.value.toUpperCase() > b.value.toUpperCase() ? 1 : -1;\n });\n lookup.fr.Designations.sort(function (a, b) {\n return a.value.toUpperCase() > b.value.toUpperCase() ? 1 : -1;\n });\n lookup.fr.LanguagesSpoken.sort(function (a, b) {\n return a.value.toUpperCase() > b.value.toUpperCase() ? 1 : -1;\n });\n lookup.fr.BusinessTypes.sort(function (a, b) {\n return a.value.toUpperCase() > b.value.toUpperCase() ? 1 : -1;\n });\n lookup.fr.Awards.sort(function (a, b) {\n return a.value.toUpperCase() > b.value.toUpperCase() ? 1 : -1;\n });\n\n lookup.fr.AdminAwards.sort(function (a, b) {\n return a.value.toUpperCase() > b.value.toUpperCase() ? 1 : -1;\n });\n lookup.fr.HighestLevelOfEducation.sort(function (a, b) {\n return a.value.toUpperCase() > b.value.toUpperCase() ? 1 : -1;\n });\n\n lookup.fr.ExpertTopic.sort(function (a, b) {\n return a.value.toUpperCase() > b.value.toUpperCase() ? 1 : -1;\n });\n lookup.fr.ProvStateCt.sort(function (a, b) {\n return a.value.toUpperCase() > b.value.toUpperCase() ? 1 : -1;\n });\n\n lookup.fr.ReasonForLeaving.sort(function (a, b) {\n return a.value.toUpperCase() > b.value.toUpperCase() ? 1 : -1;\n });\n lookup.fr.FutureAffiliation.sort(function (a, b) {\n return a.value.toUpperCase() > b.value.toUpperCase() ? 1 : -1;\n });\n\n lookup_en = lookup.en;\n}\n\n// assumes that only authenticated page will use lookup\n// if (auth.current()) getLookup();\n\nexport function addOptions(lookupName, selectedId) {\n return lookup_en[lookupName].map(r =>\n \n );\n}\n\nexport function toggleNext(id) {\n document.getElementById(id).classList.toggle('collapsed');\n}\ninterface IDictionary {\n [index: string]: boolean;\n}\n\nexport function areRequiredFieldsAvailable(state, formName): boolean {\n let retVal = true;\n let errMsg = '';\n const errRequired: IDictionary = {};\n const requiredNodesList = document.getElementById(formName).querySelectorAll('[required]');\n const requiredNodesArray = Array.prototype.slice.call(requiredNodesList, 0);\n\n requiredNodesArray.forEach((element) => {\n if (element.value.trim() === '') {\n retVal = false;\n errMsg += element.name + ' is required. ';\n errRequired[element.name] = true;\n } else {\n errRequired[element.name] = false;\n }\n });\n state.errRequired = errRequired;\n state.errMsg = errMsg;\n return retVal;\n}\n\nexport function validateEmail(email): boolean {\n // eslint-disable-next-line no-useless-escape\n const re = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\n return re.test(String(email).toLowerCase());\n}\n\nexport function validatePhone(phone): boolean {\n //var re = /^(\\([0-9]{3}\\) |[0-9]{3}-)[0-9]{3}-[0-9]{4}$/;\n const re = /^[0-9]*$/;\n return re.test(String(phone));\n}\n\nexport function validatePhoneWithDashes(phone): boolean {\n const re = /^(\\([0-9]{3}\\) |[0-9]{3}-)[0-9]{3}-[0-9]{4}$/;\n return re.test(String(phone));\n}\n\nexport function validateDate(dateStr, format='D-MMM-YYYY'): boolean {\n return moment(dateStr, format, true).isValid();\n}\nexport function validatePostalCode(postalCode): boolean {\n const re = /^[ABCEGHJKLMNPRSTVXY][0-9][ABCEGHJKLMNPRSTVWXYZ] ?[0-9][ABCEGHJKLMNPRSTVWXYZ][0-9]$/;\n return re.test(String(postalCode.toUpperCase()));\n}\n\nexport function validateInteger(x): boolean {\n const re = x && !isNaN(Number(x.toString())) && x % 1 === 0;\n return re;\n}\n\nexport function validateNumber(x): boolean {\n const re = x && !isNaN(Number(x.toString()));\n return re;\n}\n\nexport function validateMax7dInteger(x): boolean {\n const re = x && !isNaN(Number(x.toString())) && x % 1 === 0 && x.toString().length <= 7;\n return re;\n}\n\nexport function isValid(formName): boolean {\n let retVal = true;\n\n const requiredNodesList = document.getElementById(formName).querySelectorAll('[data-validate]');\n const requiredNodesArray = Array.prototype.slice.call(requiredNodesList, 0);\n requiredNodesArray.forEach((element) => {\n const errDiv = document.getElementById(element.id + 'ErrMsg') as HTMLDivElement;\n\n if (element.value.trim() === '') {\n retVal = false;\n errDiv.innerHTML = '* required';\n } else if (element.getAttribute('data-validate') === 'Int' && isStringEqual(element.value, '0')) {\n retVal = false;\n errDiv.innerHTML = '* required';\n } else if (element.getAttribute('data-validate') === 'Int' && !validateStringType(element.value.trim(), 'Integer')) {\n retVal = false;\n errDiv.innerHTML = '* invalid integer';\n } else if (element.getAttribute('data-validate') === 'Int-1' && isStringEqual(element.value, '-1')) {\n retVal = false;\n errDiv.innerHTML = '* required';\n } else if (element.getAttribute('data-validate') === 'PCode' && !validatePostalCode(element.value.trim())) {\n retVal = false;\n errDiv.innerHTML = '* invalid postal code';\n } else if (element.getAttribute('data-validate') === 'email' && !validateEmail(element.value.trim())) {\n retVal = false;\n errDiv.innerHTML = '* invalid email';\n } else if (element.getAttribute('data-validate') === 'Date' && !validateDate(element.value.trim())) {\n retVal = false;\n errDiv.innerHTML = '* invalid date';\n } else if (element.getAttribute('data-validate') === 'Phone' && !validatePhone(element.value.trim())) {\n retVal = false;\n errDiv.innerHTML = '* invalid phone';\n } else if (\n element.getAttribute('data-validate') === 'Max7dInteger' &&\n !validateMax7dInteger(element.value.trim())\n ) {\n retVal = false;\n errDiv.innerHTML = '* invalid DCS ID';\n } else if (\n element.getAttribute('data-validate') === 'NoDomainEmail' &&\n !validateEmail(element.value.trim() + '@royallepage.ca')\n ) {\n retVal = false;\n errDiv.innerHTML = '* invalid User Name';\n } else {\n errDiv.innerHTML = '';\n }\n });\n return retVal;\n}\n\nexport function validateStringType(value, type): boolean {\n //console.log('In validateStringType...value=' + value + \", type=\" + type);\n let retVal = false;\n\n switch (type) {\n case 'email':\n retVal = validateEmail(value.trim());\n break;\n case 'DateStr':\n retVal = validateDate(value.trim());\n break;\n case 'Integer':\n retVal = validateInteger(value.trim());\n break;\n case 'Max7dInteger':\n retVal = validateMax7dInteger(value.trim());\n break;\n case 'Number':\n retVal = validateNumber(value.trim());\n break;\n case 'Int-1':\n retVal = validateInteger(value.trim()) && value !== -1;\n break;\n\n default:\n retVal = true;\n break;\n }\n\n return retVal;\n}\n\nexport function isValidElement(elementId, type): boolean {\n let retVal = false;\n\n const element = document.getElementById(elementId) as HTMLInputElement;\n const errDiv = document.getElementById(element.id + 'ErrMsg') as HTMLDivElement;\n\n if (validateStringType(element.value.trim(), type)) {\n retVal = true;\n errDiv.innerHTML = '';\n } else {\n retVal = false;\n errDiv.innerHTML = '* invalid value';\n }\n return retVal;\n}\n\nexport function getLookupValueById(_lookup, id) {\n return _lookup.find(r => id === r.id)?.value;\n}\n\nexport function showSaveStatusMessage(serverResult=null) {\n if (serverResult) {\n app.run('show-message', `${serverResult} saved...\uD83D\uDC4D\u270C\uFE0F\uD83D\uDE0E`, 10000);\n } else {\n app.run('show-message', 'failed... \u274C\u274C\u274C \u2049\uFE0F', 10000);\n }\n}\n\nexport function formatPhoneNumber(input) {\n\n if (input?.length >= 11) {return input.substring(0, 1) + '-' + formatPhoneNumber(input.substring(1));}\n if (input?.length >= 10) {return input.substring(0, 3) + '-' + input.substring(3, 6) + '-' + input.substring(6);}\n return input;\n}\n\nexport function formatTollFreePhoneNumber(input) {\n return input?.length >= 11\n ? input.substring(0, 1) + '-' + formatPhoneNumber(input.substring(1))\n : formatPhoneNumber(input);\n}\n\nexport const setDisabledButton = (btn, on = true) => {\n if (!btn) { return; }\n btn.disabled = on;\n\n if (on) {btn.classList.add('disabled');} else {btn.classList.remove('disabled');}\n};\n\nconst DatePicker = () => (field) => {\n field['pik'] && field['pik'].destroy();\n field['pik'] = new Pikaday({\n format: 'DD-MMM-YYYY',\n field,\n onSelect: () => field.dispatchEvent(new Event('input'))\n });\n};\n\napp.on('$', ({ key, props }) => {\n key === '$pikaday' && (props.ref = DatePicker());\n});\n\nexport function isStringEqual(str1, str2) {\n if(typeof str1 === 'number' && typeof str2 === 'string'){\n return Number(str1).toString() === str2;\n }\n\n if(typeof str1 === 'string' && typeof str2 === 'number'){\n return Number(str2).toString() === str1;\n }\n\n if (typeof str1 === 'boolean' && typeof str2 === 'string') {\n return str1.toString() === str2;\n }\n\n if (typeof str1 === 'string' && typeof str2 === 'boolean') {\n return str2.toString() === str1;\n }\n\n if(typeof str1 !== typeof str2) {return false;}\n\n if(str1 && str2){\n return str1.toString().localeCompare(str2.toString(), undefined, { sensitivity: 'accent' }) === 0;\n } else if(!str1 && str2){\n return false;\n } else if(str1 && !str2){\n return false;\n } else{\n if(isNaN(str1) && isNaN(str2)){ return true;}\n return str1 === str2;\n }\n\n}\n\nexport function dateRangeOverlaps(a_start, a_end, b_start, b_end) {\n if (a_start <= b_start && b_start <= a_end) {return true;} // b starts in a\n if (a_start <= b_end && b_end <= a_end) {return true;} // b ends in a\n if (b_start < a_start && a_end < b_end) {return true;} // a in b\n return false;\n}\n\nexport function dateInRange(a, b_start, b_end) {\n if (b_start <= a && a <= b_end) {return true;} // a in b\n return false;\n}\n\nexport function isDateRangeOverlap(start, end, dateRanges) {\n for (const val of dateRanges) {\n if(dateRangeOverlaps(start, end, val.startDate, val.endDate)){\n return true;\n }\n }\n return false;\n}\n\nexport function isDateInRange(d, dateRanges) {\n for (const val of dateRanges) {\n if(isDateRangeOverlap(d, val.startDate, val.endDate)){\n return true;\n }\n }\n return false;\n}", "import app, { Component, } from 'apprun';\r\nimport { auth, serializeObject } from './api';\r\nimport { areRequiredFieldsAvailable } from './utils';\r\n\r\nexport default class LoginComponent extends Component {\r\n state = {};\r\n\r\n view = () =>
\r\n
\r\n
\r\n
\r\n
{ if (e.keyCode === 13) {this.run('sign-in', e);} }}>\r\n

Login Form

\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n Lost your password?\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
;\r\n\r\n update = {\r\n '#login': state => state,\r\n\r\n '#logout': () => {\r\n auth.signOut();\r\n document.location.href = '/';\r\n },\r\n\r\n 'sign-in': async (state) => {\r\n if (areRequiredFieldsAvailable(state, 'loginForm')) {\r\n const formData = serializeObject(document.getElementById('loginForm'));\r\n const session = await auth.signIn(formData as { email: string; password: string });\r\n const user = session.user;\r\n if (user) {\r\n app.run('show-message', '\uD83D\uDE04\uD83D\uDC4C\u2764\uFE0F, Welcome, ' + user.email);\r\n window.location.href = '/';\r\n }\r\n } else {\r\n //TODO: required fileds error message\r\n }\r\n }\r\n };\r\n}\r\n\r\nnew LoginComponent().mount('rlp-app');\r\n", "import app, { Component } from 'apprun';\nimport { auth, companies as companyApi } from './api';\n\nconst search = (state, e) => ({ ...state, filter: e.target.value });\n\nconst Item = ({ item }) => (\n \n \n {item.id}\n \n \n {item.name}\n \n \n);\n\nconst List = ({ items }) => (\n \n \n \n \n \n \n \n \n {items.map(item => )}\n \n
IdName
\n);\n\nexport default class CompanyListComponent extends Component {\n\n state = async () => {\n const createAllowed = await auth.hasPermission('CompanyCreate', 'C');\n const companies = await companyApi.getAllCompanies();\n return { companies, createAllowed };\n };\n\n view = (state) => {\n if (!state || !state.companies) { return; }\n const companies = !state.filter\n ? state.companies\n : state.companies.filter(c => (c.name.toUpperCase() + c.id.toString()).indexOf(state.filter.toUpperCase()) >= 0);\n\n return (\n
\n
\n \n \n \n \n
\n \n
\n );\n };\n\n}\n", "import { app, Component, on } from 'apprun';\nimport { auth, companies as companyApi, locations as locationApi } from './api';\n\nconst search = (state, e) => ({ ...state, filter: e.target.value });\n\nconst Item = ({ item }) => (\n \n \n {item.id}\n \n \n {item.name}\n \n \n);\n\nconst List = ({ items }) => (\n \n \n \n \n \n \n \n \n {items.map(item => (\n \n ))}\n \n
IdName
\n);\n\nexport default class LocationListComponent extends Component {\n\n state = {\n companyId: 0\n };\n\n view = (state) => {\n if (!state || !state.locations) {return;}\n const locations = !state.filter\n ? state.locations\n : state.locations.filter(c => (c.name.toUpperCase() + c.id.toString()).indexOf(state.filter.toUpperCase()) >= 0);\n return
\n
\n \n \n \n \n
\n \n
;\n };\n\n @on('refresh')\n load = async (state, companyId) => {\n const locations = (await (companyId\n ? companyApi.getCompanyLocations(companyId)\n : locationApi.getAllLocations())) || [];\n const createAllowed = auth.hasPermission('CompanyCreate', 'C');\n return { ...state, locations, companyId, createAllowed };\n }\n\n mounted = ({ state }) => {\n this.run('refresh', state.companyId);\n };\n}\n", "/* eslint-disable */\nimport { app, Component, on } from 'apprun';\nimport { auth, teams as teamApi } from './api';\n\nconst search = (state, e) => ({ ...state, filter: e.target.value });\n\nconst Item = ({ item }) => (\n // \n \n \n {item.id}\n \n \n {item.name}\n \n \n);\n\nconst List = ({ items }) => (\n \n \n \n \n \n \n \n \n {items.map(item => (\n \n ))}\n \n
IdName
\n);\n\nexport default class LocationListComponent extends Component {\n\n state = {};\n\n view = (state) => {\n if (!state || !state.teams) {return;}\n const teams = !state.filter\n ? state.teams\n : state.teams.filter(c => (c.name.toUpperCase() + c.id.toString()).indexOf(state.filter.toUpperCase()) >= 0);\n return
\n
\n \n \n \n \n
\n \n
;\n };\n\n @on('refresh')\n load = async (state, companyId) => {\n state.companyId = companyId;\n const teams = (await (teamApi.getTeams(companyId))) || [];\n console.log(teams);\n const createAllowed = auth.hasPermission('CompanyCreate', 'C');\n return { ...state, teams, createAllowed };\n }\n\n mounted = ({ state }) => {\n this.run('refresh', state.companyId);\n };\n}\n", "import app, { Component } from 'apprun';\nimport { serializeObject, companies, locations } from './api';\nexport default class SearchAdvComponent extends Component {\n state = { brokerageOptions: [], locationOptions: [] };\n\n view = (state) => {\n if (!state) {return;}\n return (\n
\n
this.run('keyup', e)}>\n
\n
\n User Name: \n
\n
\n
\n First Name: \n
\n
\n
\n Last Name: \n
\n
\n
\n Company:  \n this.run('companySelectionChanged', e.target.value)}\n data-validate>\n \n {state.brokerageOptions.map(r => (\n \n ))}\n \n
\n
\n
\n Location:   \n \n
\n
\n
\n Max Results:  \n \n
\n
\n
\n\n
\n Custom Search:

\n \n
\n )}\n
\n
\n
\n state.caller.run(state.delete, state.item, state.panelId)}>\n delete\n \n this.run('save')}>\n save\n \n state.caller.run(state.cancel, state.panelId)}>\n cancel\n \n
\n \n );\n };\n\n update = {\n save: (state) => {\n if (!state.newVal) {return;}\n\n if (state.item.fieldName === 'DCS ID') {state.item.validation = 'Max7dInteger';}\n\n if (isValidElement('inpText', state.item.validation)) {\n state.caller.run(state.save, state.item, state.panelId, state.newVal);\n }\n }\n };\n\n mounted = ({ state }) => {\n return { ...state, newVal: state.item.value };\n\n };\n}\n", "import app, { Component } from 'apprun';\nimport { addresses, serializeObject } from '../api';\nimport { isValid, showSaveStatusMessage } from '../utils';\nimport { lookup_en } from '../utils';\n\nexport default class CommonPropertyAddressComponent extends Component {\n state = {};\n view = (state) => {\n //console.log(state);\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
\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  \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
\n
\n \n \n \n
\n \n
\n
\n
\n \n
\n );\n };\n\n update = {\n refresh: async (state, newState) => {\n state = newState;\n const address = await addresses.getAddress(newState.objectTypeId, newState.addressId);\n return { ...state, address };\n },\n\n save: async (state) => {\n if (!isValid('addressEditForm')) {return;}\n try{\n const formData = serializeObject(document.getElementById('addressEditForm'));\n const result = await addresses.postAddress(state.objectTypeId, state.addressId, formData);\n showSaveStatusMessage('address');\n if (result) {state.caller.run(state.save, state.item, state.panelId);}\n }catch{showSaveStatusMessage();}\n },\n\n cancel: (state) => {\n state.caller.run(state.cancel, state.panelId);\n },\n };\n\n mounted = ({ state }) => {\n this.run('refresh', state);\n };\n}\n", "import app, { Component } from 'apprun';\nimport { phones as phoneApi, } from '../api';\nimport { isValid, getLookupValueById, showSaveStatusMessage } from '../utils';\nimport { lookup_en } from '../utils';\n\nexport default class CommonPropertyComponent extends Component {\n state = { addPhoneTypes: [] };\n view = (state) => {\n if (!state.item) {return;}\n return (\n
\n
\n \n \n \n \n \n \n {state.phones\n ? state.phones.map(p => (\n \n \n \n \n \n \n ))\n : ''}\n \n \n \n
Phone TypeNumberShow
\n {getLookupValueById(lookup_en.PhoneTypeCt, p.phoneTypeCt)}\n \n {\n p.phoneNumber = e.target.value;\n }}\n data-validate=\"Phone\"\n />\n
\n
\n  \n {\n p.displayInd = e.target.checked;\n }}\n />\n \n this.run('del', p)}>\u2702\n
\n
\n add  \n \n
\n
\n \n
\n );\n };\n\n update = {\n save: async (state) => {\n if (!isValid('phoneEditForm')) {return;}\n try{\n const result = await phoneApi.postPhones(state.objectTypeId, state.phoneId, state.phones);\n showSaveStatusMessage('phone');\n if (result) {state.caller.run(state.save, state.item, state.panelId);}\n }catch{showSaveStatusMessage();}\n },\n\n del: (state, p) => {\n //console.log('In delPhone...');\n state.phones.splice(state.phones.indexOf(p), 1);\n state.addPhoneTypes.push({ id: p.phoneTypeCt, value: getLookupValueById(lookup_en.PhoneTypeCt, p.phoneTypeCt) });\n return state;\n },\n\n add: (state, phoneType, selectedIndex) => {\n //console.log('In addPhone...');\n if (phoneType.trim()) {\n state.phones.push({\n objectID: state.companyId,\n objectTypeID: 1,\n phoneTypeCt: phoneType,\n phoneNumber: '',\n displayInd: true\n });\n }\n state.addPhoneTypes.splice(selectedIndex - 1, 1);\n return state;\n },\n\n cancel: (state) => {\n state.caller.run(state.cancel, state.panelId);\n },\n\n refresh: async (state, newState) => {\n\n state = newState;\n const phones = await phoneApi.getPhones(state.objectTypeId, state.phoneId);\n const addPhoneTypes = lookup_en.PhoneTypeCt.filter(p => phones.findIndex(r => r.phoneTypeCt === p.id) < 0);\n\n return { ...state, phones, addPhoneTypes };\n }\n };\n\n mounted = ({ state }) => {\n this.run('refresh', state);\n };\n}\n", "import app, { Component } from 'apprun';\nimport { isStringEqual, } from '../utils';\nimport { lookup_en } from '../utils';\nimport { users } from '../api';\n\nexport default class CommonPropertyComponent extends Component {\n state = { selectOptions: [], auditLog: [] };\n\n view = (state) => {\n if (!state.item) {return;}\n return (\n
\n
\n
{state.item.dispName}
\n {\n
\n \n
\n }\n
\n
\n
\n state.caller.run(state.delete, state.item, state.panelId)}>\n delete\n \n this.run('save')}>\n save\n \n state.caller.run(state.cancel, state.panelId)}>\n cancel\n \n
\n\n {state.item.fieldName === 'Employeetype' && state.personId?\n
\n

Update History

\n \n \n \n \n \n \n \n \n \n \n \n {state.auditLog.map((item) => {\n return (\n \n \n \n \n \n \n \n );\n }\n )}\n \n
Employee TypeStart DateEnd DateModified DateModified User
{item.employeeType}{item.startDate?.substring(0, 10)}{item.endDate?.substring(0, 10)}{item.modifiedDate?.substring(0, 10)}{item.auditModifiedUser}
: ''}\n\n {state.item.fieldName === 'PrimaryLocation' && state.personId?\n
\n

Update History

\n \n \n \n \n \n \n \n \n \n \n {state.auditLog.map((item) => {\n return (\n \n \n \n \n \n \n );\n }\n )}\n \n
Location IDLocation NameModified DateModified User
{item.locationID}{item.locationName}{item.modifiedDate?.substring(0, 10)}{item.auditModifiedUser}
: ''}\n\n {state.item.fieldName === 'DisplayOnSearchInd' && state.personId ?\n
\n

Update History

\n \n \n \n \n \n \n \n \n \n {state.auditLog.map((item) => {\n return (\n \n \n \n \n \n );\n }\n )}\n \n
Show on public siteModified DateModified User
{item.searchIndDesp}{item.modifiedDate?.substring(0, 10)}{item.auditModifiedUser}
: ''}\n
\n );\n };\n\n update = {\n refresh: async (state, newState) => {\n state = newState;\n\n let selectOptions = [];\n if (state.item.fieldTypeDetail && state.item.fieldTypeDetail.startsWith('[')) {\n selectOptions = JSON.parse(state.item.fieldTypeDetail);\n } else {\n selectOptions = lookup_en[state.item.fieldTypeDetail];\n }\n selectOptions = selectOptions || [];\n\n if (state.personId) {\n if (state.item.fieldName === 'Employeetype') {\n state.auditLog = await users.getAuditEmployeeType(state.personId);\n } else if (state.item.fieldName === 'PrimaryLocation') {\n state.auditLog = await users.getAuditLocation(state.personId);\n } else if (state.item.fieldName === 'DisplayOnSearchInd') {\n state.auditLog = await users.getAuditPublicSiteInd(state.personId);\n }\n }\n\n return { ...state, selectOptions, newVal: newState.item.value };\n },\n\n save: (state) => {\n state.caller.run(state.save, state.item, state.panelId, state.newVal);\n },\n };\n\n mounted = ({ state }) => {\n this.run('refresh', state);\n };\n}\n", "import app, { Component } from 'apprun';\nimport { isValidElement } from '../utils';\nimport moment from 'moment';\nexport default class CommonPropertyComponent extends Component {\n state = { };\n\n view = (state) => {\n if (!state.item) {return;}\n return (\n
\n
\n
{state.item.dispName}
\n
\n {\n state.newVal = e.target.value;\n }}\n />\n
\n
\n
\n
\n
\n
\n this.run('save')}>\n save\n \n state.caller.run(state.delete, state.item, state.panelId)}>\n delete\n \n state.caller.run(state.cancel, state.panelId)}>\n cancel\n \n
\n
\n );\n };\n\n update = {\n refresh: (state, newState) => {\n return {\n ...state,\n ...newState,\n newVal: newState.item.value ? moment(newState.item.value).format('DD-MMM-YYYY') : null,\n picker: null,\n };\n },\n\n save: async (state) => {\n state.newVal = (document.getElementById('inpText') as HTMLInputElement).value;\n if (!state.newVal) {return;}\n if (isValidElement('inpText', state.item.validation)) {\n await state.caller.run(state.save, state.item, state.panelId, state.newVal);\n }\n },\n };\n\n mounted = ({ state }) => {\n this.run('refresh', state);\n };\n}\n", "import app, { Component } from 'apprun';\nimport { isValid, lookup_en } from '../utils';\n\nexport default class CompanyPropertyComponent extends Component {\n state = { }\n\n view = (state) => {\n if (!state.item) {return;}\n let award = '', year = '';\n const separator = ' >> ';\n\n const years =Array(50).fill(5).map((item, index) => 1980 + index);\n\n if (state.item.value.indexOf(separator) > 0) {\n award = state.item.value.substr(0, state.item.value.indexOf(separator));\n year = state.item.value.replace(award + separator, '');\n } else {\n award = state.item.value;\n }\n return (\n
\n
\n
{state.item.dispName}
\n
\n \n Year\n
\n
\n \n \n  \n \n \n \n  \n \n
\n
\n
\n
\n
\n
\n
\n state.caller.run(state.delete, state.item, state.panelId)}>\n delete\n \n this.run('save', e, award, year)}>\n save\n \n this.run('cancel')}>\n cancel\n \n
\n
\n );\n };\n\n update = {\n\n save: (state, e, award, year) => {\n state.newVal = award + ' >> ' + year;\n if(!isValid('AwardEditForm')) { e.preventDefault(); return;}\n state.caller.run(state.save, state.item, state.panelId, state.newVal);\n },\n\n cancel: (state) => {\n state.caller.run(state.cancel, state.panelId);\n },\n }\n\n mounted = ({ state }) => state;\n}\n", "import app, { Component } from 'apprun';\n\nimport { isValidElement, showSaveStatusMessage, isStringEqual, lookup_en } from '../utils';\nimport { smartLead } from '../api';\nimport moment from 'moment';\nexport default class CommonPropertyComponent extends Component {\n dateFmt = 'DD-MMM-YYYY';\n\n state = { smartleads: [] };\n\n cleanState = {\n smartLeadStartDatePicker: null,\n smartLeadEndDatePicker: null,\n editingItem: null,\n newSmartLead: null,\n smartLeadSaveError: null,\n smartLeadFee: []\n };\n\n Item = ({ item, startDate }) => {\n return (\n {\n this.run('smartLead-edit', item, e);\n }\n }>\n \n \n {item.startDate ? moment.utc(item.startDate).format(this.dateFmt) : ''}\n \n \n \n \n {item.endDate ? moment.utc(item.endDate).format(this.dateFmt) : ''}\n \n \n \n \n {this.getSmartLeadName(item.smartLeadFeeID)}\n \n \n \n
\n {moment.utc(item.startDate).format(this.dateFmt) === startDate ? : ''}\n
\n \n \n );\n };\n\n List = ({ state }) => {\n return (\n \n \n \n \n \n \n \n \n \n {state.smartleads.map(item => (\n \n ))}\n \n
Start DateEnd DateFee Option
\n );\n };\n\n SmartLeadHistory = ({ state }) => {\n return (\n
\n {/*
SmartLead History
*/}\n
\n \n
\n
\n );\n };\n\n SmartLeadEdit = ({ state }) => {\n return (\n
\n
\n **NEW**\n
\n
\n \n \n
\n
\n
\n \n
\n
\n \n
\n
\n
\n
\n
\n
\n {state.smartLeadSaveError}\n
\n
\n

\n
\n \n
\n
\n
\n \n
\n
\n\n \n
\n );\n };\n\n ddlComp = ({ id, optoins, objWithRetAttrib, retAttrib }) => {\n return (\n
\n \n
\n
\n );\n };\n\n // prettier-ignore\n view = (state) => {\n return (\n \n );\n };\n\n update = {\n refresh: async (state, newState) => {\n this.cleanState.smartLeadFee = lookup_en['SmartLeadOption'];\n if (newState.companyId !== state.companyId) {\n state = this.cleanState;\n state.companyId = newState.companyId;\n }\n state.smartleads = await smartLead.get(state.companyId);\n return { ...state, ...newState };\n },\n\n 'smartLead-new': (state, e) => {\n this.run('smartLead-edit', { startDate: '', smartLeadFeeID: -1 }, e);\n },\n\n 'smartLead-edit': (state, item) => {\n if (state.editingProg) {return;}\n\n state.smartLeadStartDate = item.startDate ? moment.utc(item.startDate).format(this.dateFmt) : '';\n state.smartLeadEndDate = item.endDate ? moment.utc(item.endDate).format(this.dateFmt) : '';\n\n state.startDate = state.smartLeadStartDate;\n state.smartLeadFeeID = item.smartLeadFeeID;\n state.companyID = item.companyID ;\n\n state.newSmartLead = state.startDate === '';\n state.editingProg = true;\n state.progUnderEdit = item;\n return state;\n },\n\n 'smartLead-edit-save': async (state) => {\n state.smartLeadSaveError = null;\n const smartLeadReturnedErrMsgDiv = document.getElementById('smartLeadReturnedErrMsg') as HTMLDivElement;\n smartLeadReturnedErrMsgDiv.innerHTML = state.smartLeadSaveError;\n\n state.smartLeadStartDate = (document.getElementById('smartLeadStartDate') as HTMLInputElement).value.trim();\n state.smartLeadEndDate = (document.getElementById('smartLeadEndDate') as HTMLInputElement).value.trim();\n\n state.smartLeadFeeID = (document.getElementById('smartLeadFeeID') as HTMLInputElement).value.trim();\n\n let valid = isValidElement('smartLeadStartDate', 'DateStr');\n\n if(state.smartLeadStartDate){\n if (valid && moment(state.smartLeadStartDate, this.dateFmt).startOf('month').format('DD-MMM-YYYY') !== moment(state.smartLeadStartDate, this.dateFmt).format('DD-MMM-YYYY')){\n valid = false;\n const errMsg = document.getElementById('smartLeadStartDateErrMsg') as HTMLDivElement;\n errMsg.innerHTML = 'Start date must be the first day of month';\n }\n }\n\n if(state.smartLeadEndDate){\n valid = valid && isValidElement('smartLeadEndDate', 'DateStr');\n\n if (valid && moment(state.smartLeadEndDate, this.dateFmt).endOf('month').format('DD-MMM-YYYY') !== moment(state.smartLeadEndDate, this.dateFmt).format('DD-MMM-YYYY')){\n valid = false;\n const errMsg = document.getElementById('smartLeadEndDateErrMsg') as HTMLDivElement;\n errMsg.innerHTML = 'End date must be the end day of month';\n }\n\n if (valid && moment(state.smartLeadStartDate, this.dateFmt) > moment(state.smartLeadEndDate, this.dateFmt)) {\n valid = false;\n const errMsg = document.getElementById('smartLeadEndDateErrMsg') as HTMLDivElement;\n errMsg.innerHTML = 'End date cannot be before Start date';\n }\n\n }\n\n if (state.smartLeadFeeID === '0') {\n valid = false;\n const errMsg = document.getElementById('smartLeadFeeIDErrMsg') as HTMLDivElement;\n errMsg.innerHTML = 'Please fee option';\n }\n\n if (valid) {\n const smartleadToSave =\n state.startDate === ''\n ? { originalStartDate: state.startDate?state.startDate:'', companyId: state.companyId, smartLeadFeeID: state.smartLeadFeeID, startDate: state.smartLeadStartDate, endDate: state.smartLeadEndDate }\n : { ...state.progUnderEdit, originalStartDate: state.startDate, smartLeadFeeID: state.smartLeadFeeID, startDate: state.smartLeadStartDate, endDate: state.smartLeadEndDate };\n let result;\n try {\n result = await smartLead.upsertSmartLead(smartleadToSave);\n showSaveStatusMessage(result);\n } catch (ex) {\n showSaveStatusMessage();\n const errorMsg = await ex.json();\n state.smartLeadSaveError = '* ' + errorMsg;\n return state;\n }\n\n if (result) {\n state.smartleads = await smartLead.get(state.companyId);\n this.run('smartLead-edit-cancel');\n }\n }\n },\n\n 'smartLead-edit-cancel': (state) => {\n state.editingProg = false;\n state.progUnderEdit = null;\n state.startDate = '';\n state.smartLeadSaveError = null;\n return state;\n }\n };\n\n getSmartLeadName = (id) => {\n const selected = lookup_en['SmartLeadOption'].find(p => p.id === id);\n return selected.value;\n };\n\n mounted = ({ state }) => {\n this.run('refresh', state);\n };\n}\n", "import app, { Component } from 'apprun';\nimport { companies as objApi } from '../api';\n/* eslint-disable */\n\nexport default class CommonPropertyComponent extends Component {\n\n view = (state) => {\n if (!state.item) {return;}\n return (\n
\n
\n
Year
\n
Month
\n {\n
\n
\n \n
\n\n
\n \n
\n
\n }\n
\n
\n
\n state.caller.run(state.delete, state.item, state.panelId)}>\n delete\n \n this.run('save')}>\n Download\n \n state.caller.run(state.cancel, state.panelId)}>\n cancel\n \n
\n
\n );\n };\n\n update = {\n refresh: async (state, newState) => {\n state = newState;\n\n state.MonthNames={ '':'', '01':'Jan','02':'Feb','03':'Mar','04':'Apr','05':'May','06':'Jun','07':'Jul','08':'Aug','09':'Sep','10':'Oct','11':'Nov','12':'Dec' };\n const selectOptionsMonths = await objApi.getRptAvailableMonths(state.companyId);\n\n const selectOptionsYears = Array.from(new Set(selectOptionsMonths.map(i => (i.substr(0,4)))));\n state.yearSelected=selectOptionsYears[0];\n state.newVal = (selectOptionsMonths.filter(p => p.startsWith(state.yearSelected)))[0];\n\n return { ...state, selectOptionsYears, selectOptionsMonths};\n },\n\n yearSelectionChanged: async (state, idx) => {\n state.yearSelected=idx;\n state.newVal = (state.selectOptionsMonths.filter(p => p.startsWith(state.yearSelected)))[0];\n return state;\n },\n\n save: (state) => {\n if((state.newVal !== '') && (!state.newVal.includes('Select'))){\n state.caller.run(state.save, state.item, state.panelId, state.newVal);\n }\n }\n };\n\n mounted = ({ state }) => {\n this.run('refresh', state);\n };\n}\n", "import app, { Component } from 'apprun';\nimport { companies as objApi } from './api';\nimport { showSaveStatusMessage, lookup_en, isStringEqual } from './utils';\n\nimport PropEditorTextComponent from './common-props/common-props-text-edit';\nimport PropEditorAddressComponent from './common-props/common-props-address-edit';\nimport PropEditorPhoneComponent from './common-props/common-props-phone-edit';\nimport PropEditorSelectionComponent from './common-props/common-props-selection-edit';\nimport PropEditorDateComponent from './common-props/common-props-date-edit';\nimport CompanyPropertyAwardComponent from './company-props/company-props-award';\nimport CompanyPropertySmartLeadComponent from './company-props/company-props-smartlead';\nimport CompanyPropertyReportComponent from './company-props/company-props-report-edit';\n\n///* eslint-disable */\n\nconst objName = 'company',\n objectTypeId = 1;\n\nexport default class CompanyComponent extends Component {\n getItemValue(item) {\n if (!item) {return;}\n let itemValue = item.value;\n let selectOptions;\n switch (item.fieldType) {\n case null:\n case 'CALL':\n case 'Text':\n return itemValue;\n case 'Phones':\n case 'html':\n return item.value\n ? item.value.split('
').map(p => (\n \n {p}\n
\n
\n ))\n : '';\n case 'DateStr':\n return item.value ? new Date(item.value).toDateString() : null;\n case 'Int':\n if (itemValue === '-1' && item.fieldTypeDetail) {itemValue = 'Not Available';}\n return itemValue;\n case 'Selection':\n if (item.fieldTypeDetail && item.fieldTypeDetail.startsWith('[')) {\n selectOptions = JSON.parse(item.fieldTypeDetail);\n } else {\n selectOptions = lookup_en[item.fieldTypeDetail];\n }\n selectOptions = selectOptions || [];\n const selectedOption = selectOptions.filter((p) => {\n return isStringEqual(p.id, itemValue);\n })[0];\n\n itemValue = selectedOption ? selectedOption.value : item.value;\n return itemValue;\n case 'Award':\n return itemValue.replace(' >> ', ' ');\n case 'SmartLead':\n return itemValue;\n default:\n return itemValue;\n }\n }\n\n Item = ({ item, editing }) => {\n if (!item || !item.displayOrder) {return;}\n return (\n \n \n
{this.getItemValue(item)}
\n
\n {editing ? : ''}\n
\n \n );\n };\n\n List = ({ state }) => (\n \n \n {state.props\n .filter(p => p.fieldType === 'Group' || p.dispName.toUpperCase().indexOf(state.filter.toUpperCase()) >= 0)\n .map((item) => {\n return (\n {\n if (item.fieldType !== 'Group') {this.run('edit-prop', item, e);}\n }}>\n \n \n );\n })}\n \n
\n );\n\n state = { filter: '', editingItem: null, props: [] };\n\n view = (state) => {\n if (!state || !state.company) {return;}\n\n return (\n
\n
\n \n
\n \n
\n );\n };\n\n update = {\n refresh: async (state, companyId) => {\n const company = await objApi.getCompanyDetail(companyId);\n const hasFullAccess = company.hasFullAccess;\n state.props = company.companyDetail;\n this.addReportItem(state);\n state.props.sort(function (a, b) {\n return a.orderA2Z - b.orderA2Z;\n });\n state.props.forEach(item => (item.displayOrder = item.orderA2Z));\n state = this.sortGroupwise(state);\n return { ...state, companyId, company, editingItem: null, props: company.companyDetail, hasFullAccess };\n },\n\n 'edit-prop': (state, item, e) => {\n if (!item.editable) {return;}\n e.preventDefault();\n state.editingItem = item;\n\n const panelId = 'prop-edit-' + item.fieldType;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let editorState: any = {\n item,\n panelId,\n caller: this,\n cancel: 'edit-prop-cancel',\n save: 'save-prop',\n delete: 'delete-prop',\n };\n\n let comp;\n switch (item.fieldType) {\n case 'Address':\n comp = PropEditorAddressComponent;\n editorState = { ...editorState, addressId: state.companyId, objectTypeId };\n break;\n case 'Phones':\n comp = PropEditorPhoneComponent;\n editorState = { ...editorState, phoneId: state.companyId, objectTypeId };\n break;\n case 'Report':\n comp = CompanyPropertyReportComponent;\n editorState.companyId = state.companyId;\n break;\n case 'Selection':\n comp = PropEditorSelectionComponent;\n break;\n case 'DateStr':\n comp = PropEditorDateComponent;\n break;\n case 'Award':\n comp = CompanyPropertyAwardComponent;\n break;\n case 'SmartLead':\n comp = CompanyPropertySmartLeadComponent;\n editorState = { ...editorState, companyId: state.companyId };\n break;\n default:\n comp = PropEditorTextComponent;\n break;\n }\n app.run('#add-panel', { id: panelId, title: item.dispName, Component: comp, state: editorState, level: 4 });\n },\n\n 'save-prop': async (state, item, panelId, newVal) => {\n if(item.fieldType==='Report'){\n objApi.getRpt(state.companyId, newVal);\n this.run('edit-prop-cancel', panelId);\n return;\n }\n try{\n if (panelId === 'prop-edit-Address' || panelId === 'prop-edit-Phones') {\n this.run('edit-prop-cancel', panelId);\n this.run('refresh', state.companyId);\n } else {\n const result = await objApi.upsertProperty(state.companyId, { prop: item, newValue: newVal });\n showSaveStatusMessage('company');\n if (result) {\n item.value = newVal;\n this.run('edit-prop-cancel', panelId);\n }\n }\n }catch{showSaveStatusMessage();}\n\n },\n\n 'delete-prop': async (state, item, panelId) => {\n const result = await objApi.deleteProperty(state.companyId, item);\n showSaveStatusMessage('company');\n if (result) {\n if (item.multiValue) {\n state.props.splice(state.props.indexOf(item), 1);\n } else {\n item.value = '';\n }\n this.run('edit-prop-cancel', panelId);\n }\n },\n\n 'edit-prop-cancel': (state, id) => {\n state.editingItem = null;\n app.run('#clear-panel', id);\n return state;\n },\n\n 'start-jumpSync': async (state) => {\n await objApi.initiateForceSync(state.companyId);\n showSaveStatusMessage('Jump Sync');\n },\n };\n\n // TODO\n getItem = fieldName => this.state.props.find(p => p.fieldName === fieldName);\n\n updateObj = async (state) => {\n const result = await objApi.post(state.companyId, state[objName]);\n showSaveStatusMessage(result);\n return result;\n }\n\n addReportItem = (state) => {\n const rptItem = { 'fieldName':'SavedInv','dispName':'Saved Invoices','value':'Select Month','fieldType':'Report',\n 'orderA2Z':10100,'orderScheme1':10190,'multiValue':false,'editable':true,'required':true };\n state.props.push(rptItem);\n }\n\n mounted = ({ state }) => {\n this.run('refresh', state.companyId);\n }\n\n sortGroupwise = (state) => {\n state.props.sort(function (a, b) {\n return(a.orderScheme1 ?? 0) - (b.orderScheme1 ?? 0);\n });\n state.props.forEach(item => (item.displayOrder = item.orderScheme1));\n state.mode = 'group';\n return state;\n }\n}\n", "import app, { Component } from 'apprun';\nimport { companies, locations } from './api';\nimport { isStringEqual, isValid } from './utils';\nimport OB_SelAgentsComponent from './ob-sel-agents';\n\nexport default class OB_RLP2RLPComponent extends Component {\n ddlComp = ({ id, optoins, objWithRetAttrib, retAttrib, oninput = null, validate = null }) => {\n if (!oninput) {\n oninput = (e) => {\n objWithRetAttrib[retAttrib] = e.target.value;\n };\n }\n return (\n
\n \n
\n
\n );\n };\n\n state = {\n fromBrokerageOptions: [],\n toBrokerageOptions: [],\n fromLocationOptions: [],\n toLocationOptions: [],\n fromCompany: null,\n fromLocation: null,\n toCompany: null,\n toLocation: null\n };\n // prettier-ignore\n view = (state) => {\n if (!state) {return;}\n\n return (\n
\n

RLP to RLP

\n

Companies and Locations

\n
\n
\n
\n Select the BROKERAGE FROM which you will transfer agents\n this.run('fromCompanySelectionChanged', e.target.value)} validate=\"Int-1\" />\n
\n
\n
\n Select the LOCATION(s) FROM which you will transfer agents\n \n
\n\n

\n\n
\n Select the BROKERAGE the agents will be transferred TO\n this.run('toCompanySelectionChanged', e.target.value)} validate=\"Int-1\" />\n
\n
\n
\n Select the new PRIMARY LOCATION of the transferred agents\n \n
\n

\n
\n
\n \n
\n
\n  \n
\n
\n );\n }\n\n update = {\n refresh: async (state, newState) => {\n state = { ...state, ...newState };\n if (state.fromBrokerageOptions.length === 0) {\n state.fromBrokerageOptions = await companies.getAllTransferCompanies();\n state.fromBrokerageOptions.sort(function (a, b) {\n return a.name.toUpperCase() > b.name.toUpperCase() ? 1 : -1;\n });\n state.fromBrokerageOptions.map(p => (p.value = p.id + ' - ' + p.name));\n state.toBrokerageOptions = [];\n }\n\n return state;\n },\n\n fromCompanySelectionChanged: async (state, idx) => {\n state.fromCompany = idx;\n state.fromLocationOptions =\n !state.fromCompany ? [] : await locations.getLocationsByCompanyID(state.fromCompany);\n state.fromLocationOptions.sort(function (a, b) {\n return a.name.toUpperCase() > b.name.toUpperCase() ? 1 : -1;\n });\n state.fromLocationOptions.map(p => (p.value = p.id.toString() + ' - ' + p.name));\n state.fromLocationOptions.unshift({ name: 'All', value: 'All', id: 0 });\n\n if(idx === '-1' ){\n state.toBrokerageOptions = [];\n }else{\n const f = state.fromBrokerageOptions.find(o => o.id === idx);\n if(f.provStateCt === '-1'){\n state.toBrokerageOptions = [];\n }else{\n state.toBrokerageOptions = state.fromBrokerageOptions.filter(p => p.provStateCt === f.provStateCt);\n }\n }\n state.toCompany = '-1';\n\n return state;\n },\n\n toCompanySelectionChanged: async (state, idx) => {\n state.toCompany = idx;\n state.toLocationOptions = !state.toCompany? [] : await locations.getLocationsByCompanyID(state.toCompany);\n state.toLocationOptions.sort(function (a, b) {\n return a.name.toUpperCase() > b.name.toUpperCase() ? 1 : -1;\n });\n state.toLocationOptions.map(p => (p.value = p.id.toString() + ' - ' + p.name));\n return state;\n },\n\n continue: (state) => {\n const formName = 'ob_rlp2rlp_compLocForm';\n let valid = isValid(formName);\n if (state.fromCompany && state.fromCompany !== -1 && state.fromCompany === state.toCompany) {\n const errMsgDiv = document.getElementById('toCompanyErrMsg') as HTMLDivElement;\n errMsgDiv.innerHTML = '* from & to companies cannot be same';\n valid = false;\n }\n if (!valid) {return;}\n const from = { company: state.fromCompany, location: state.fromLocation };\n const to = {\n company: state.toCompany,\n location: state.toLocation,\n companyName: state.fromBrokerageOptions.filter(p => p.id === state.toCompany)[0].name\n };\n app.run('#add-panel', {\n id: 'obSelAgents',\n title: 'Onboarding - Select Agents',\n Component: OB_SelAgentsComponent,\n level: 3,\n state: { caller: this, from, to }\n });\n\n return state;\n },\n\n 'sub-panel-cancelled': (state) => {\n app.run('#clear-panel', 'obSelAgents');\n return state;\n },\n\n cancel: (state) => {\n app.run('#clear-panel', state.panelId);\n }\n };\n\n mounted = ({ state }) => {\n this.run('refresh', state);\n };\n}\n", "import app, { Component } from 'apprun';\nexport default class OB_NewConversionComponent extends Component {\n state = { };\n // prettier-ignore\n view = (state) => {\n if (!state) {return;}\n\n return (\n
\n

Coming soon.......

\n
\n \n
\n
\n );\n }\n\n update = {\n cancel: (state) => {\n app.run('#clear-panel', state.panelId);\n }\n };\n\n}\n", "import app, { Component } from 'apprun';\nimport { isStringEqual, isValidElement } from './utils';\nimport { obApi } from './api';\n\n//import SRegionCOB_RLP2RLPComponentomponent from './ob-rlp2rlp';\nimport OB_RLP2RLPComponent from './ob-rlp2rlp';\nimport OB_NewConversionComponent from './ob-new-conversion';\n\nexport default class OnboardingComponent extends Component {\n state = async () => {\n const onboardingTypeOptions = await obApi.getOnboardingTypeOptions();\n onboardingTypeOptions.forEach(p => (p.value = p.name));\n return { onboardingTypeOptions, obType: '1' };\n };\n\n // ddlComp = ({ id, optoins, objWithRetAttrib, retAttrib}) => {\n ddlComp = ({ ddlCompState }) => {\n return (\n
\n (ddlCompState.objWithRetAttrib[ddlCompState.retAttrib] = e.target.value)}>\n \n {ddlCompState.optoins.map(p => (\n \n {p.value}\n \n ))}\n \n
\n
\n );\n };\n\n view = (state) => {\n return (\n
\n

ONBOARDING

\n

Select Onboarding Type

\n
\n\n
\n What type of onboard will this be?\n
\n
\n
\n \n
\n
\n
\n \n
\n );\n };\n\n update = {\n continue: (state) => {\n if (isValidElement('obType', 'Int-1')) {\n switch (state.obType) {\n case '1':\n app.run('#add-panel', {\n id: 'obRlp2Rlp',\n title: 'Onboarding - Select Locations',\n Component: OB_RLP2RLPComponent,\n level: 2,\n state: { caller: this }\n });\n break;\n case '2':\n app.run('#add-panel', {\n id: 'obNewConversion',\n title: 'New Conversoin',\n Component: OB_NewConversionComponent,\n level: 2,\n state: { caller: this }\n });\n break;\n default:\n }\n return state;\n }\n },\n\n 'sub-panel-cancelled': () => {\n app.run('#clear-panel', 'obNewConversion');\n }\n };\n}\n", "import app, { Component } from 'apprun';\nimport { serializeObject, companies, users } from './api';\nimport { isValid, showSaveStatusMessage, lookup_en } from './utils';\nimport moment from 'moment';\n\nexport default class UserTerminateComponent extends Component {\n dateFmt = 'DD-MMM-YYYY';\n state = { picker: null, dispAffilDetail: false, isAgent: false, googleRecipients: [] };\n view = (state) => {\n if (!state) {return;}\n\n return (\n
\n
\n
\n
\n Reason For Leaving:\n \n
\n
\n
\n Future Affiliation:\n \n
\n
\n {\n state.dispAffilDetail\n ?\n
\n Future Affiliation details: \n
\n
\n :\n null\n }\n \n
\n End Date: \n
\n
\n {\n !state.isAgent\n ?\n
\n Transfer Google Drive Data:\n \n
\n {\n state.txfrRequired\n ?\n
\n
\n To:\n \n
\n
\n :''\n }\n
\n :''\n }\n
\n
\n
\n \n  \n \n
\n
\n );\n }\n\n update = {\n\n txfrRequiredChange: async (state, txfrRequired) => {\n state.txfrRequired = txfrRequired === '1';\n if (state.txfrRequired && !state.googleRecipients.length) {\n state.googleRecipients = await companies.getAllActiveNonAgents(state.companyID);\n const thisUserIndex = state.googleRecipients.findIndex(p => p.personID === state.personId);\n state.googleRecipients.splice(thisUserIndex, 1);\n }\n return state;\n },\n\n futureAffiliationChanged: (state, idx) => {\n const dispAffilDetail = idx === '384'; // check if Future Affiliation is 'Other/Independent'\n if (dispAffilDetail !== state.dispAffilDetail) {state.picker = null;}\n return { ...state, dispAffilDetail };\n },\n\n save: async (state) => {\n\n try{\n const formName = 'userTerminateForm';\n if (!isValid(formName)) {return;}\n const endDate = (document.getElementById('endDate') as HTMLInputElement).value.trim();\n\n if ( moment(state.startDate, this.dateFmt) > moment(endDate, this.dateFmt)) {\n const errMsg = document.getElementById('endDateErrMsg') as HTMLDivElement;\n errMsg.innerHTML = '* End date cannot be before Start date.';\n return;\n }\n\n const formData = serializeObject(document.getElementById(formName));\n formData['hdnP'] = state.personId;\n const result = await users.terminateUser(formData);\n showSaveStatusMessage('user');\n if (result) {this.run('#sub-panel-done', 'userTerminate');}\n return state;\n }catch{\n showSaveStatusMessage();\n }\n return state;\n },\n\n cancel: (state) => {\n app.run('#clear-panel', state.panelId);\n }\n };\n\n mounted = ({ state }) => {\n return {\n picker: null,\n dispAffilDetail: false,\n txfrRequired: false,\n isAgent: false,\n googleRecipients: [],\n ...state\n };\n };\n}\n", "import app, { Component } from 'apprun';\nimport { serializeObject, locations, users as usersApi } from './api';\nimport { isValid, showSaveStatusMessage, lookup_en,isStringEqual, isDateRangeOverlap } from './utils';\nimport moment from 'moment';\nexport default class UserReactivateComponent extends Component {\n view = (state) => {\n if (!state?.profile) {return;}\n\n return (\n
\n
\n
\n
\n Personnel Type:  \n \n
\n
\n
\n First Name: \n
\n
\n
\n Last Name: \n
\n
\n
\n User Name:\n
\n @\n \n
\n
\n
\n
\n Select Password: \n
\n
\n
\n Company:\n \n
\n
\n
\n Location:\n \n
\n
\n
\n Language:\n \n
\n
\n {\n state.isAgent\n ?\n
\n Sales Kit Required:\n \n
\n
\n :\n null\n }\n
\n Recruitment Source:\n \n
\n
\n
\n Previous Affiliation:\n \n
\n
\n {\n state.dispAffilDetail\n ?\n
\n Previous Affiliation details: \n
\n
\n :\n null\n }\n \n
\n Activation Date: \n
\n
\n
\n \n
\n \n  \n \n
\n
\n );\n }\n\n update = {\n\n empTypeChanged: (state, idx) => {\n const isAgent = idx === '1' || idx === '8';\n state.profile.employeeTypeCt = idx;\n return { ...state, isAgent };\n },\n\n prevAffiliationChanged: (state, idx) => {\n const dispAffilDetail = idx === '354';\n if (dispAffilDetail !== state.dispAffilDetail) {\n state.picker = null;\n }\n return { ...state, dispAffilDetail };\n },\n\n companySelectionChanged: async (state, idx) => {\n state.profile.companyID = idx;\n state.locationOptions =\n state.profile.companyID === 0 ? [] : await locations.getLocationsByCompanyID(state.profile.companyID);\n return state;\n },\n\n locationSelectionChanged: (state, idx) => {\n state.profile.primaryLocationID = idx;\n return state;\n },\n\n checkAvailability: async (state) => {\n const userName = (document.getElementById('username') as HTMLInputElement).value.trim();\n const userDomain = (document.getElementById('domain') as HTMLInputElement).value.trim();\n\n if (userName.length === 0) {\n state.availabilityMessage = 'Please provide Username';\n } else {\n const emailAddress = userName + '@' + userDomain;\n const result = await usersApi.checkEmailAvailability(emailAddress);\n\n state.availabilityMessage = emailAddress + ' is ' + (result ? 'available' : 'unavailable');\n }\n\n return state;\n },\n\n save: async (state) => {\n try{\n const formName = 'userReactivateForm';\n if (!isValid(formName)) {return;}\n\n const startDate = moment((document.getElementById('startDate') as HTMLInputElement).value.trim()).format('YYYY-MM-DD');\n const endDate = '9999-12-31';\n\n if(isDateRangeOverlap(startDate, endDate, state.profile.employeeDateHistory)) {\n const errDiv = (document.getElementById('startDateErrMsg') as HTMLDivElement);\n errDiv.innerHTML = 'Start date is between another period of employment';\n return;\n }\n\n const formData = serializeObject(document.getElementById(formName));\n formData['hdnP'] = state.personId;\n const result = await usersApi.reactivateUser(formData);\n showSaveStatusMessage('user');\n if (result) {this.run('#sub-panel-done', 'userReactivate');}\n }catch{\n showSaveStatusMessage();\n }\n },\n\n cancel: () => {\n app.run('#clear-panel', 'userReactivate');\n },\n };\n\n mounted = ({ state }) => {\n const isAgent = state.profile.employeeTypeCt === '1' || state.profile.employeeTypeCt === '8';\n return { ...state, dispAffilDetail:false,formFilled:false, isAgent: isAgent, };\n }\n\n}\n", "import app, { Component } from 'apprun';\nexport default class RegionSelectComponent extends Component {\n\n Options = ({ state }) =>
    {state.options.map(option =>\n
  • this.run('select', option)}>{option}\n
  • )\n }\n
\n\n view = (state) => {\n if (!state.options) {return;}\n return
\n \n
\n
;\n }\n\n update = {\n\n 'search': [async (state, e) => {\n const options = await state.onSearch(e.target.value);\n return {\n ...state,\n show: true,\n selected: e.target.value,\n options\n };\n }, { delay: 300 }],\n\n 'popup': (state, show) => state.show === show ? null : { ...state, show },\n\n 'keydown': (state, e) => {\n let selectedIdx = state.options.indexOf(state.selected);\n switch (e.keyCode) {\n case 27:\n return ({ ...state, show: false });\n case 38:\n selectedIdx--;\n if (selectedIdx < 0) {selectedIdx = 0;}\n return ({ ...state, selected: state.options[selectedIdx] });\n case 40:\n selectedIdx++;\n if (selectedIdx >= state.options.length) {selectedIdx = state.options.length - 1;}\n return ({ ...state, selected: state.options[selectedIdx] });\n case 13:\n e.preventDefault();\n this.run('select', state.selected);\n }\n },\n 'select':(state, selected) => {\n state.onSelect(selected);\n return { ...state, selected, show: false };\n }\n }\n mounted = async (props) => {\n return { ...props, options: [], selected: '' };\n };\n\n}\n", "import app, { Component } from 'apprun';\nimport { regions } from '../api';\nimport RegionSelect from '../common-props/common-props-regions-select';\ninterface IDictionary {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [index: string]: any;\n}\n\nexport default class CommonPropertyComponent extends Component {\n AllRegions: IDictionary = {};\n\n getMatchingOptions = async (searchText) => {\n this.AllRegions = [];\n\n const matchingRegions = await regions.getRegions(searchText, this.state.extra.province);\n const options = [];\n\n matchingRegions.map((p) =>{\n this.AllRegions[p.regionsServicedID] = p;\n options.push({ value: p.regionsServicedName, id: p.regionsServicedID });\n });\n\n this.state.options = options;\n\n return options.map(p => p.value);\n };\n\n onSearch = async (searchText) => {\n const errDiv = document.getElementById(this.state.item.fieldName + 'ErrMsg') as HTMLDivElement;\n if (errDiv) {errDiv.innerHTML = '';}\n\n let options;\n if (searchText.length >= 3) {\n options = await this.getMatchingOptions(searchText);\n }else{\n options = [];\n }\n return options;\n };\n\n onSelect = () => {\n return;\n };\n\n view = (state) => {\n if (!state || !state.newVal) {return;}\n return (\n
\n \n {state.newVal.map(p => (\n \n \n \n ))}\n
\n {p.regionsServicedName} \n this.run('delArea', p)}>\n \u2702\n \n
\n
\n
\n \n
\n
\n  \n this.run('addArea')}>\n add\n \n
\n
\n \n
\n );\n };\n\n update = {\n refresh: (state, newState) => {\n return { ...state, ...newState, newVal: [...newState.item.value], options: [], selected: '' };\n },\n\n save: (state) => {\n if (!state.newVal) {return;}\n //state.item.value = state.newVal;\n state.caller.run(state.save, state.item, state.panelId, state.newVal);\n },\n\n delArea: (state, p) => {\n //console.log('In delArea...');\n state.newVal.splice(state.newVal.indexOf(p), 1);\n return state;\n },\n\n addArea: (state) => {\n const inpText = document.getElementById(state.item.fieldName + '_inpText') as HTMLInputElement;\n const newRegion = state.options.find(p => p.value.toUpperCase() === inpText.value.toUpperCase());\n //console.log(newRegion);\n if (newRegion) {\n state.newVal.push(this.AllRegions[newRegion.id]);\n return state;\n } else {\n const errDiv = document.getElementById(state.item.fieldName + 'ErrMsg') as HTMLDivElement;\n errDiv.innerHTML = 'Invalid Value';\n }\n }\n };\n\n mounted = ({ state }) => {\n this.run('refresh', state);\n };\n}\n", "import app, { Component } from 'apprun';\nimport { lookup_en } from '../utils';\n\nexport default class CommonPropertyComponent extends Component {\n view = (state) => {\n lookup_en.ExpertTopic.sort(function (a, b) {\n return a.value.toUpperCase() > b.value.toUpperCase() ? 1 : -1;\n });\n\n //console.log(state);\n if (!state || !state.newVal) {return;}\n\n //state.newVal.map(p => console.log(p.ExpertTopicName + ',' + p.ExpertTopicID));\n return (\n
\n \n {state.newVal.map(p => (\n \n \n \n ))}\n
\n {p.ExpertTopicName} \n this.run('delArea', p)}>\n \u2702\n \n
\n
\n \n  \n this.run('addArea')}>\n add\n \n
\n
\n \n
\n );\n };\n\n update = {\n refresh: (state, newState) => {\n return { ...state, ...newState, newVal: [...newState.item.value], options: [] };\n },\n\n save: (state) => {\n if (!state.newVal) {return;}\n state.caller.run(state.save, state.item, state.panelId, state.newVal);\n },\n\n delArea: (state, p) => {\n //console.log('In delArea...');\n state.newVal.splice(state.newVal.indexOf(p), 1);\n return state;\n },\n\n addArea: (state) => {\n const e = document.getElementById('ExpertTopicSelection') as HTMLSelectElement;\n const sel = e.selectedIndex;\n const opt = e.options[sel];\n const topicId = opt.value;\n const topicName = opt.text;\n\n state.newVal.push({ ExpertTopicID: topicId, ExpertTopicName: topicName });\n return state;\n }\n };\n\n mounted = ({ state }) => {\n this.run('refresh', state);\n };\n}\n", "import app, { Component } from 'apprun';\nimport { isValid } from '../utils';\n\nexport default class UserPropertyComponent extends Component {\n state = { };\n\n view = (state) => {\n if (!state.item) {return;}\n let ph: string, dispInd: boolean;\n if (state.item.value.indexOf('(show)') > 0) {\n ph = state.item.value.replace('(show)', '').trim();\n dispInd = true;\n } else {\n ph = state.item.value.replace('(hide)', '').trim();\n dispInd = false;\n }\n return (\n
\n
\n
{state.item.dispName}
\n
\n {ph = e.target.value;}} data-validate=\"Phone\"/>\n  \n Show {dispInd = e.target.checked;}}/>\n
\n
\n
\n
\n state.caller.run(state.delete, state.item, state.panelId)}>\n delete\n \n this.run('save', e, ph, dispInd)}>\n save\n \n this.run('cancel')}>\n cancel\n \n
\n
\n );\n };\n\n update = {\n\n save: (state, e, ph, dispInd) => {\n state.newVal = ph + ' ' + (dispInd ?'(show)':'(hide)');\n if(!isValid('phEditForm')) { e.preventDefault(); return;}\n state.caller.run(state.save, state.item, state.panelId, state.newVal);\n },\n\n cancel: (state) => {\n state.caller.run(state.cancel, state.panelId);\n },\n }\n\n mounted = ({ state }) => state;\n}\n", "import app, { Component } from 'apprun';\nimport { isValid, lookup_en } from '../utils';\n\nexport default class UserPropertyComponent extends Component {\n state = { }\n\n view = (state) => {\n if (!state.item) {return;}\n\n let network = '', url = '';\n if (state.item.value.indexOf(': ') > 0) {\n network = state.item.value.substr(0, state.item.value.indexOf(': '));\n url = state.item.value.replace(network + ': ', '');\n }\n return (\n
\n
\n
{state.item.dispName}
\n
\n Network\n URL\n
\n
\n \n \n \n {url = e.target.value;}} data-validate/>\n
\n
\n
\n
\n
\n
\n
\n state.caller.run(state.delete, state.item, state.panelId)}>\n delete\n \n this.run('save', e, network, url)}>\n save\n \n this.run('cancel')}>\n cancel\n \n
\n
\n );\n };\n\n update = {\n\n save: (state, e, network, url) => {\n state.newVal = network + ': ' + url;\n if(!isValid('SocialEditForm')) { e.preventDefault(); return;}\n state.caller.run(state.save, state.item, state.panelId, state.newVal);\n },\n\n cancel: (state) => {\n state.caller.run(state.cancel, state.panelId);\n },\n }\n\n mounted = ({ state }) => state;\n}\n", "import app, { Component } from 'apprun';\nimport { isValid, lookup_en } from '../utils';\nimport { users } from '../api';\n\nexport default class UserPropertyComponent extends Component {\n state = { }\n\n view = (state) => {\n if (!state.item) {return;}\n let award = '', year = '', publicInd = '';\n const separator = ' >> ';\n\n const years =Array(50).fill(5).map((item, index) => 1980 + index);\n\n if(state.item.value){\n const awardArray = state.item.value.split(separator);\n\n award = awardArray[0];\n year = awardArray[1]==='0'? '': awardArray[1];\n publicInd = awardArray[2];\n }else{\n publicInd = '1';\n }\n\n return (\n
\n
\n
\n
\n Award\n Year\n Public\n
\n
\n \n \n  \n \n \n \n  \n \n\n \n {\n publicInd = e.target.checked? '1': '0';\n }}\n\n />\n  \n \n
\n
\n
\n
\n
\n
\n
\n state.caller.run(state.delete, state.item, state.panelId)}>\n delete\n \n this.run('save', e, award, year, publicInd)}>\n save\n \n this.run('cancel')}>\n cancel\n \n
\n
\n\n {state.auditLog?\n
\n

Update History

\n \n \n \n \n \n \n \n \n \n {state.auditLog.map((item) => {\n return (\n \n \n \n \n \n );\n }\n )}\n \n
Public indicatorModified DateModified User
{item.publicIndDesp}{item.modifiedDate?.substring(0, 10)}{item.auditModifiedUser}
: ''}\n
\n );\n };\n\n update = {\n refresh: async (state, newState) => {\n state = newState;\n\n let year = '', awardId = '';\n const separator = ' >> ';\n\n if (state.item.value) {\n const awardArray = state.item.value.split(separator);\n year = awardArray[1] === '' ? '0' : awardArray[1];\n awardId = awardArray[3];\n\n state.auditLog = await users.getAuditPersonAwardPublicInd(state.personId, awardId, year);\n } else {\n state.auditLog = [];\n }\n\n return { ...state, ...newState };\n },\n\n save: (state, e, award, year, publicInd) => {\n state.newVal = award + ' >> ' + year + ' >> ' + publicInd;\n if(!isValid('AwardEditForm')) { e.preventDefault(); return;}\n state.caller.run(state.save, state.item, state.panelId, state.newVal);\n },\n\n cancel: (state) => {\n state.caller.run(state.cancel, state.panelId);\n },\n }\n mounted = ({ state }) => {\n this.run('refresh', state);\n };\n}\n", "import app, { Component } from 'apprun';\nexport default class CommonPropertyComponent extends Component {\n state = { };\n view = (state) => {\n if (!state.item) {return;}\n return (\n
\n
\n
Photo
\n
\"not
\n
\n
\n this.run('image-selected', e)} style={{ 'display': 'none' }}/>\n this.run('show-OpenFileDialog')}>Upload Photo\n
\n
\n
\n \n
\n );\n };\n\n update = {\n\n save: (state) => {\n if(!state.imgData) {return;}\n //if(isValidElement('inpText', state.item.validation))\n {\n state.item.value='';\n state.caller.run(state.save, state.item, state.panelId, state.imgData);\n }\n },\n\n 'show-OpenFileDialog': () => {\n const fileInput = (document.querySelector('input[type=file]') as HTMLInputElement);\n fileInput.click();\n },\n\n 'image-selected': (state, e) => {\n const file = e.target.files[0];\n if(file) {\n const imgErrMsg = document.getElementById('imgErrMsg') as HTMLDivElement;\n if(file.size >= 2*1024*1024) {\n imgErrMsg.innerHTML = 'image size is too big!, max size 2MB';\n return;\n } else {\n imgErrMsg.innerHTML = '';\n }\n state.reader = new FileReader();\n state.reader.onloadend = () => this.run('image-loaded');\n state.reader.readAsDataURL(file);\n }\n },\n\n 'image-loaded': (state) => {\n const imgData = state.reader.result;\n return { ...state, imgData };\n },\n\n };\n\n mounted = ({ state }) => state;\n\n}\n", "import app, { Component } from 'apprun';\nimport { showSaveStatusMessage } from '../utils';\n\nimport { users } from '../api';\n\nexport default class CommonPropertyComponent extends Component {\n state = {};\n\n // prettier-ignore\n view = (state) => {\n if (!state.caller) {return;}\n return (\n
\n
\n
New Password
\n
\n \n
\n
Confirm Password
\n
\n \n
\n
\n
\n \n
\n );\n };\n\n update = {\n save: async (state) => {\n const inpText = ((document.getElementById('inpText') || {}) as HTMLInputElement).value;\n const confirmText = ((document.getElementById('confirmText') || {}) as HTMLInputElement).value;\n const errDiv = document.getElementById('inpTextErrMsg') as HTMLDivElement;\n\n if (!inpText) {\n errDiv.innerHTML = 'Please enter a value for new password';\n } else if (inpText !== confirmText) {\n errDiv.innerHTML = 'value in confirmation box does not match';\n } else {\n errDiv.innerHTML = '';\n try{\n const result = await users.setPassword(state.personId, inpText.trim());\n showSaveStatusMessage(result===1);\n if (result === 1) {\n state.caller.run(state.cancel, state.panelId);\n } else {\n errDiv.innerHTML = result;\n }\n }catch{showSaveStatusMessage();}\n }\n },\n };\n\n mounted = ({ state }) => state;\n}\n", "import app, { Component } from 'apprun';\nimport { isValidElement, lookup_en } from '../utils';\nimport moment from 'moment';\nexport default class CommonPropertyComponent extends Component {\n\n state = { selectOptions: [] };\n\n view = (state) => {\n if (!state.item) {return;}\n return (\n
\n
\n
{state.item.dispName}
\n {\n
\n \n
\n }\n
\n
\n
 
\n
\n
Start Date
\n
End Date
\n
\n
\n
\n \n
\n
\n \n
\n
\n\n
\n
\n
\n
\n
\n
\n
\n\n \n
\n );\n };\n\n update = {\n refresh: (state, newState) => {\n let selectOptions = [];\n if (newState.item.fieldTypeDetail && newState.item.fieldTypeDetail.startsWith('[')) {\n selectOptions = JSON.parse(newState.item.fieldTypeDetail);\n } else {\n selectOptions = lookup_en[newState.item.fieldTypeDetail];\n }\n selectOptions = selectOptions || [];\n selectOptions = selectOptions.filter(o => o.id !== 567 && o.id !== 568 && o.id !== 570 && o.id !== 573 && o.id !== 574 && o.id !== 576 );\n\n const speciality = JSON.parse(newState.item.value || '{\"AttributeID\":\"\",\"EffectiveDate\":\"\",\"ExpirationDate\":\"\"}');\n\n return {\n ...state,\n ...newState,\n selectOptions,\n startDate: (speciality || {}).EffectiveDate && (speciality || {}).EffectiveDate !== '1900-01-01'\n ? moment((speciality || {}).EffectiveDate).format('DD-MMM-YYYY')\n : '',\n endDate: (speciality || {}).ExpirationDate && (speciality || {}).ExpirationDate !== '1900-01-01'\n ? moment((speciality || {}).ExpirationDate).format('DD-MMM-YYYY')\n : '',\n\n chosenOption: (speciality || {}).AttributeID,\n startDatePicker: null,\n endDatePicker: null,\n };\n },\n\n save: (state) => {\n document.getElementById('selectOptionsErrMsg').innerHTML = '';\n document.getElementById('startDateTextErrMsg').innerHTML = '';\n document.getElementById('endDateTextErrMsg').innerHTML = '';\n document.getElementById('dateTextErrMsg').innerHTML = '';\n\n state.startDate = (document.getElementById('startDateText') as HTMLInputElement).value;\n state.endDate = (document.getElementById('endDateText') as HTMLInputElement).value;\n\n let valid = true;\n\n //console.log('state');\n //console.log(state);\n\n if (state.chosenOption === '' || state.chosenOption === '-1') {\n valid = false;\n const errMsg = document.getElementById('selectOptionsErrMsg') as HTMLDivElement;\n errMsg.innerHTML = '* Please select a specialty.';\n }\n\n if(state.chosenOption !== '1121'){\n if (state.startDate === '') {\n valid = false;\n const errMsg = document.getElementById('startDateTextErrMsg') as HTMLDivElement;\n errMsg.innerHTML = '* Start date cannot be empty.';\n } else {\n valid = valid && isValidElement('startDateText', 'DateStr');\n }\n\n if (state.endDate === '') {\n valid = false;\n const errMsg = document.getElementById('endDateTextErrMsg') as HTMLDivElement;\n errMsg.innerHTML = '* End date cannot be empty.';\n } else {\n valid = valid && isValidElement('endDateText', 'DateStr');\n }\n\n if (valid && moment(state.startDate, 'DD-MMM-YYYY') > moment(state.endDate, 'DD-MMM-YYYY')) {\n valid = false;\n const errMsg = document.getElementById('dateTextErrMsg') as HTMLDivElement;\n errMsg.innerHTML = '* End date cannot be before Start date';\n }\n }\n if (valid) {\n state.newVal = JSON.stringify({\n AttributeID: state.chosenOption,\n EffectiveDate: state.startDate,\n ExpirationDate: state.endDate,\n });\n\n state.caller.run(state.save, state.item, state.panelId, state.newVal);\n }\n },\n };\n\n mounted = ({ state }) => {\n this.run('refresh', state);\n };\n}\n", "import app, { Component } from 'apprun';\nimport { isValidElement, showSaveStatusMessage, lookup_en, isStringEqual } from '../utils';\nimport { commProg } from '../api';\nimport moment from 'moment';\nexport default class CommonPropertyComponent extends Component {\n dateFmt = 'DD-MMM-YYYY';\n\n state = { progs: [], exceptions: [], commFee: [] };\n\n cleanState = {\n commProgStartDatePicker: null,\n commProgEndDatePicker: null,\n exStartDatePicker: null,\n exEndDatePicker: null,\n editingItem: null,\n newCommProg: null,\n exceptions: [],\n showEx: null,\n editingEx: null,\n newEx: null,\n exUnderEdit: null,\n commProgSaveError: null,\n feeExSaveError: null,\n commFee: [],\n dateFmt:'DD-MMM-YYYY'\n };\n\n Item = ({ item, editingProgId }) => {\n return (\n {\n this.run('commProg-edit', item, e);\n }\n : ''\n }>\n \n \n {item.id}\n \n \n \n \n {item.active ? 'Active' : 'Inactive'}\n \n \n \n \n {item.startDate ? moment.utc(item.startDate).format(this.dateFmt) : ''}\n \n \n \n \n {item.endDate ? moment.utc(item.endDate).format(this.dateFmt) : ''}\n \n \n\n {item.modifiedDate ? moment.utc(item.modifiedDate).format(this.dateFmt) : ''}\n {item.auditModifiedUser}\n \n
\n {item.locked ? : ''}\n {item.id === editingProgId ? : ''}\n
\n \n \n );\n };\n\n List = ({ state }) => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n {state.progs.map(item => (\n \n ))}\n \n
IdStatusStart DateEnd DateModified DateModified User
\n );\n };\n\n CommProgHistory = ({ state }) => {\n return (\n
\n
Commercial Program History
\n
\n \n
\n
\n );\n };\n\n CommProgEdit = ({ state }) => {\n return (\n
\n
\n **NEW**\n
\n
\n { (state.validate)\n ?\n \n {state.minDate.format(state.dateFmt) + ' - ' + state.maxDate.format(state.dateFmt)}\n
\n
\n :\n * Data inconsistency detected, cannot suggest possible range.
\n * WARNING: validation will not be performned on save\n
\n
\n\n }\n
\n
\n \n \n
\n
\n
\n \n
\n
\n \n
\n
\n
\n
\n
\n
\n {state.commProgSaveError}\n
\n
\n

\n
\n \n
\n \n
\n
\n\n \n
\n );\n };\n\n ddlComp = ({ id, optoins, objWithRetAttrib, retAttrib }) => {\n return (\n
\n \n
\n
\n );\n };\n\n FeeExEdit = ({ state }) => {\n return (\n
\n
Commercial Program Fee Exception Edit
\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 {state.feeExSaveError}\n
\n
\n\n \n
\n );\n };\n\n ItemEx = ({ item, editing, commFee }) => {\n return (\n {\n this.run('feeEx-edit', item, e);\n }\n : ''\n }>\n \n \n {item.commercialCompanyPersonID}\n \n \n \n \n {this.getExTypeById(item.exceptionType)}\n \n \n \n \n {item.startDate ? moment.utc(item.startDate).format(this.dateFmt) : ''}\n \n \n \n \n {item.endDate ? moment.utc(item.endDate).format(this.dateFmt) : ''}\n \n \n \n \n {this.getCommFeeById(commFee, item.commercialFeeID)}\n \n \n {item.modifiedDate ? moment.utc(item.modifiedDate).format(this.dateFmt) : ''}\n {item.auditModifiedUser}\n\n \n
\n {editing ? : ''}\n
\n \n \n );\n };\n\n ListEx = ({ state }) => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {state.exceptions.map(item => (\n \n ))}\n \n
Prog IdException TypeStart DateEnd DateAmountModified DateModified User
\n );\n };\n\n CommProgFeeEx = ({ state }) => {\n return (\n
\n
Commercial Program Fee Exceptions
\n
\n \n
\n \n
\n );\n };\n\n // prettier-ignore\n view = (state) => {\n return (\n \n );\n };\n\n update = {\n refresh: async (state, newState) => {\n this.cleanState.commFee = await commProg.getCommFee();\n if (newState.panelId !== state.personId) {\n state = this.cleanState;\n state.personId = newState.personId;\n state.companyPersonId = newState.extra.CompanyPersonID;\n }\n state.progs = await commProg.get(state.personId);\n state.showEx = true;\n state.exceptions = await commProg.getExHistory(state.personId);\n return { ...state, ...newState };\n },\n\n 'showEx-toggle': async (state) => {\n state.showEx = !state.showEx;\n if (state.showEx) {\n state.exceptions = await commProg.getExHistory(state.personId);\n } else {\n state.editingEx = false;\n state.exUnderEdit = null;\n state.editingExId = null;\n }\n\n return state;\n },\n\n 'commProg-new': (state, e) => {\n this.run('commProg-edit', { id: 0, commercialFeeID: 1 }, e);\n },\n\n 'commProg-edit': async (state, item) => {\n if (state.editingProg) {return;}\n\n const result = await commProg.getCommConstraints(state.companyPersonId);\n if(result?.status === 'OK') {\n state.validate = true;\n state.minDate = moment(result.minPossibleStartDateforCommProg);\n state.maxDate = moment(result.maxPossibleEndDateforCommProg);\n } else {\n state.validate = false;\n state.minDate = state.maxDate = null;\n }\n\n state.commProgStartDate = item.startDate ? moment.utc(item.startDate).format(this.dateFmt) : '';\n state.commProgEndDate = item.endDate ? moment.utc(item.endDate).format(this.dateFmt) : '';\n state.commercialProgFeeID = item.commercialFeeID;\n\n state.newCommProg = item.id === 0;\n\n state.editingProg = true;\n state.editingProgId = item.id;\n state.progUnderEdit = item;\n return state;\n },\n\n 'commProg-edit-save': async (state) => {\n state.commProgSaveError = null;\n const commProgReturnedErrMsgDiv = document.getElementById('commProgReturnedErrMsg') as HTMLDivElement;\n commProgReturnedErrMsgDiv.innerHTML = state.commProgSaveError;\n\n state.commProgStartDate = (document.getElementById('commProgStartDate') as HTMLInputElement).value.trim();\n state.commProgEndDate = (document.getElementById('commProgEndDate') as HTMLInputElement).value.trim();\n\n state.commercialProgFeeID = (document.getElementById('commercialProgFeeID') as HTMLInputElement).value.trim();\n\n let valid = isValidElement('commProgStartDate', 'DateStr');\n if (state.commProgEndDate) {\n valid = valid && isValidElement('commProgEndDate', 'DateStr');\n if (valid && moment(state.commProgStartDate, this.dateFmt) > moment(state.commProgEndDate, this.dateFmt)) {\n valid = false;\n const errMsg = document.getElementById('commProgEndDateErrMsg') as HTMLDivElement;\n errMsg.innerHTML = 'End date cannot be before Start date';\n }\n if (valid && (\n moment(state.commProgStartDate, this.dateFmt) < moment(state.minDate, this.dateFmt)\n || moment(state.commProgEndDate, this.dateFmt) > moment(state.maxDate, this.dateFmt)\n )\n ) {\n valid = false;\n const errMsg = document.getElementById('commProgStartDateErrMsg') as HTMLDivElement;\n errMsg.innerHTML = '* dates should be between possible range';\n }\n } else {\n const endDate = new Date(9999, 1, 1);\n if (valid && (\n moment(state.commProgStartDate, this.dateFmt) < moment(state.minDate, this.dateFmt)\n || moment(endDate, this.dateFmt) > moment(state.maxDate, this.dateFmt)\n )\n ) {\n valid = false;\n const errMsg = document.getElementById('commProgStartDateErrMsg') as HTMLDivElement;\n errMsg.innerHTML = '* dates should be between possible range';\n }\n }\n\n if (state.commercialProgFeeID === '-1') {\n valid = false;\n const errMsg = document.getElementById('commercialProgFeeIDErrMsg') as HTMLDivElement;\n errMsg.innerHTML = 'Please select fee amount';\n }\n\n if (valid) {\n const progToSave =\n state.editingProgId === 0\n ? { id: 0, commercialFeeID: state.commercialProgFeeID, startDate: state.commProgStartDate, endDate: state.commProgEndDate }\n : { ...state.progUnderEdit, startDate: state.commProgStartDate, endDate: state.commProgEndDate };\n let result;\n try {\n result = await commProg.upsertCommProg(state.personId, progToSave);\n showSaveStatusMessage(result);\n } catch (ex) {\n showSaveStatusMessage();\n const errorMsg = await ex.json();\n state.commProgSaveError = '* ' + errorMsg;\n return state;\n }\n\n if (result) {\n state.progs = await commProg.get(state.personId);\n this.run('commProg-edit-cancel');\n }\n }\n },\n\n 'commProg-edit-cancel': (state) => {\n state.editingProg = false;\n state.progUnderEdit = null;\n state.editingProgId = null;\n return state;\n },\n\n 'feeEx-new': (state, e) => {\n this.run('feeEx-edit', { id: 0 }, e);\n },\n\n 'feeEx-edit': (state, item) => {\n if (state.editingEx) {return;}\n\n state.exUnderEdit = { ...item };\n state.FeeExStartDate = item.startDate ? moment.utc(item.startDate).format(this.dateFmt) : '';\n state.FeeExEndDate = item.endDate ? moment.utc(item.endDate).format(this.dateFmt) : '';\n state.newEx = item.id === 0;\n\n state.editingEx = true;\n return state;\n },\n\n 'feeEx-edit-cancel': (state) => {\n state.editingEx = false;\n state.exUnderEdit = null;\n state.editingExId = null;\n return state;\n },\n\n 'feeEx-edit-save': async (state) => {\n state.feeExSaveError = null;\n const feeExReturnedErrMsgDiv = document.getElementById('feeExReturnedErrMsg') as HTMLDivElement;\n feeExReturnedErrMsgDiv.innerHTML = state.feeExSaveError;\n\n state.FeeExStartDate = (document.getElementById('exStartDate') as HTMLInputElement).value.trim();\n state.FeeExEndDate = (document.getElementById('exEndDate') as HTMLInputElement).value.trim();\n\n let valid = isValidElement('exStartDate', 'DateStr');\n valid = isValidElement('exType', 'Int-1') && valid;\n valid = isValidElement('Amount', 'Int-1') && valid;\n\n if (state.FeeExEndDate) {\n valid = valid && isValidElement('exEndDate', 'DateStr');\n if (valid && moment(state.FeeExStartDate, this.dateFmt) > moment(state.FeeExEndDate, this.dateFmt)) {\n valid = false;\n const errMsg = document.getElementById('exEndDateErrMsg') as HTMLDivElement;\n errMsg.innerHTML = 'End date cannot be before Start date';\n }\n }\n\n if (valid) {\n state.exUnderEdit = { ...state.exUnderEdit, startDate: state.FeeExStartDate, endDate: state.FeeExEndDate };\n\n let result;\n try {\n result = await commProg.upsertCommFeeEx(state.personId, state.exUnderEdit);\n } catch (ex) {\n const errorMsg = await ex.json();\n state.feeExSaveError = '* ' + errorMsg;\n return state;\n }\n showSaveStatusMessage(result);\n if (result) {\n state.exceptions = await commProg.getExHistory(state.personId);\n this.run('feeEx-edit-cancel');\n }\n }\n }\n };\n\n getCommFeeById = (commFee, id) => {\n const selected = commFee.find(p => p.id === id);\n return selected.value;\n };\n\n getExTypeById = (id) => {\n const selected = lookup_en.FeeExceptionReasonCt.find(p => p.id === id);\n return selected.value;\n };\n\n mounted = ({ state }) => {\n this.run('refresh', state);\n };\n}\n", "import app, { Component } from 'apprun';\nimport { isValidElement, showSaveStatusMessage , lookup_en, isStringEqual } from '../utils';\nimport { feeException } from '../api';\nimport moment from 'moment';\n\nexport default class CommonPropertyComponent extends Component {\n dateFmt = 'DD-MMM-YYYY';\n\n state = { feeExceptions: [] };\n exceptionTypeOptions = lookup_en['FeeExceptionReasonCt'];\n\n Item = ({ item }) => {\n return (\n {\n this.run('feeException-edit', item, e);\n }\n : ''\n }>\n \n \n {this.exceptionTypeOptions.find(e => e.id === item.exceptionType).value}\n \n \n\n \n \n {item.startDate ? moment.utc(item.startDate).format(this.dateFmt) : ''}\n \n \n \n \n {item.endDate ? moment.utc(item.endDate).format(this.dateFmt) : ''}\n \n \n\n \n \n {item.multiplier}\n \n \n\n \n \n {item.cappingAmount}\n \n \n\n \n \n {item.monthlyFee}\n \n \n\n \n \n \n \n \n \n );\n };\n\n List = ({ state }) => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n {state.feeExceptions.map(item => (\n \n ))}\n \n
Exception TypeStart DateEnd DateMultiplierCapping AmountMonthly FeeEdit
\n );\n };\n\n FeeExceptionHistory = ({ state }) => {\n return (\n
\n
\n \n
\n
\n );\n };\n\n ddlComp = ({ id, optoins, objWithRetAttrib, retAttrib }) => {\n return (\n
\n \n
\n
\n );\n };\n\n FeeExceptionEdit = ({ state }) => {\n return (\n
\n
\n **NEW**\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
\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 {state.feeExceptionSaveError}\n
\n
\n\n
\n
\n this.run('feeException-edit-save')}>\n Save\n \n\n this.run('feeException-edit-delete')}\n style={{\n display: !state.newFeeException ? 'disp' : 'none'\n }}>\n Delete\n \n\n this.run('feeException-edit-cancel')}>\n Cancel\n \n
\n
\n );\n };\n\n // prettier-ignore\n view = (state) => {\n //this.log('In view of common-props-date-edit...');\n //this.log(state);\n return (\n \n );\n };\n\n update = {\n refresh: async (state, newState) => {\n //this.log('In refresh of prop fee exception ...');\n const data = await feeException.get(newState.personId);\n\n state.feeExceptions = data.feeExceptions;\n state.defaultMultiplier = data.multiplier;\n state.defaultCappingAmount = data.cappingAmount;\n state.defaultMonthlyFee = 0.0;\n\n return { ...state, ...newState };\n },\n\n 'feeException-new': (state, e) => {\n this.run(\n 'feeException-edit',\n {\n feeExceptionId: 0,\n multiplier: state.defaultMultiplier,\n cappingAmount: state.defaultCappingAmount,\n monthlyFee: state.defaultMonthlyFee\n },\n e\n );\n },\n\n 'feeException-edit': (state, item) => {\n state.feeExceptionSaveError = null;\n\n state.feeExceptionStartDate = item.startDate ? moment.utc(item.startDate).format(this.dateFmt) : '';\n state.feeExceptionEndDate = item.endDate ? moment.utc(item.endDate).format(this.dateFmt) : '';\n\n state.newFeeException = item.feeExceptionId === 0;\n state.editingFeeException = true;\n\n state.feeExceptionId = item.feeExceptionId;\n\n state.multiplier = item.multiplier;\n state.cappingAmount = item.cappingAmount;\n state.monthlyFee = item.monthlyFee;\n\n state.feeExceptionUnderEdit = item;\n\n return state;\n },\n\n 'feeException-edit-save': async (state) => {\n document.getElementById('exceptionTypeErrMsg').innerHTML = '';\n document.getElementById('feeExceptionStartDateErrMsg').innerHTML = '';\n document.getElementById('feeExceptionEndDateErrMsg').innerHTML = '';\n\n document.getElementById('multiplierErrMsg').innerHTML = '';\n document.getElementById('cappingAmountErrMsg').innerHTML = '';\n document.getElementById('monthlyFeeErrMsg').innerHTML = '';\n\n document.getElementById('feeExceptionReturnedErrMsg').innerHTML = '';\n\n state.feeExceptionSaveError = null;\n const feeExceptionReturnedErrMsgDiv = document.getElementById('feeExceptionReturnedErrMsg') as HTMLDivElement;\n feeExceptionReturnedErrMsgDiv.innerHTML = state.feeExceptionSaveError;\n\n state.feeExceptionStartDate = (document.getElementById('feeExceptionStartDate') as HTMLInputElement).value.trim();\n state.feeExceptionEndDate = (document.getElementById('feeExceptionEndDate') as HTMLInputElement).value.trim();\n\n state.multiplier = (document.getElementById('multiplier') as HTMLInputElement).value.trim();\n state.cappingAmount = (document.getElementById('cappingAmount') as HTMLInputElement).value.trim();\n state.monthlyFee = (document.getElementById('monthlyFee') as HTMLInputElement).value.trim();\n\n //console.log(state);\n\n let valid = true;\n\n if (state.feeExceptionUnderEdit.exceptionType === null || state.feeExceptionUnderEdit.exceptionType === '-1') {\n valid = false;\n const errMsg = document.getElementById('exceptionTypeErrMsg') as HTMLDivElement;\n errMsg.innerHTML = '* Please select exception type.';\n }\n\n if (state.feeExceptionStartDate === '') {\n valid = false;\n const errMsg = document.getElementById('feeExceptionStartDateErrMsg') as HTMLDivElement;\n errMsg.innerHTML = '* Start date cannot be empty.';\n } else {\n valid = valid && isValidElement('feeExceptionStartDate', 'DateStr');\n }\n\n if (state.feeExceptionEndDate === '') {\n valid = false;\n const errMsg = document.getElementById('feeExceptionEndDateErrMsg') as HTMLDivElement;\n errMsg.innerHTML = '* End date cannot be empty.';\n } else {\n valid = valid && isValidElement('feeExceptionEndDate', 'DateStr');\n }\n\n if (\n valid &&\n moment(state.feeExceptionStartDate, this.dateFmt) > moment(state.feeExceptionEndDate, this.dateFmt)\n ) {\n valid = false;\n const errMsg = document.getElementById('feeExceptionEndDateErrMsg') as HTMLDivElement;\n errMsg.innerHTML = '* End date cannot be before Start date';\n }\n\n if (valid) {\n const firstdate = moment(state.feeExceptionStartDate, this.dateFmt)\n .startOf('month')\n .format(this.dateFmt);\n\n if (!moment(state.feeExceptionStartDate, this.dateFmt).isSame(moment(firstdate, this.dateFmt))) {\n valid = false;\n const errMsg = document.getElementById('feeExceptionStartDateErrMsg') as HTMLDivElement;\n errMsg.innerHTML = '* Start date must be the first day of the month.';\n }\n }\n\n if (valid) {\n const lastdate = moment(state.feeExceptionEndDate, this.dateFmt)\n .endOf('month')\n .format(this.dateFmt);\n\n if (!moment(state.feeExceptionEndDate, this.dateFmt).isSame(moment(lastdate, this.dateFmt))) {\n valid = false;\n const errMsg = document.getElementById('feeExceptionEndDateErrMsg') as HTMLDivElement;\n errMsg.innerHTML = '* End date must be the last day of the month.';\n }\n }\n\n if (state.multiplier === '') {\n valid = false;\n const errMsg = document.getElementById('multiplierErrMsg') as HTMLDivElement;\n errMsg.innerHTML = '* Multiplier cannot be empty.';\n } else {\n valid = valid && isValidElement('multiplier', 'Number');\n }\n\n if (state.cappingAmount === '') {\n valid = false;\n const errMsg = document.getElementById('cappingAmountErrMsg') as HTMLDivElement;\n errMsg.innerHTML = '* Capping Amount cannot be empty.';\n } else {\n valid = valid && isValidElement('cappingAmount', 'Number');\n }\n\n if (state.monthlyFee === '') {\n valid = false;\n const errMsg = document.getElementById('monthlyFeeErrMsg') as HTMLDivElement;\n errMsg.innerHTML = '* Monthly Fee cannot be empty.';\n } else {\n valid = valid && isValidElement('monthlyFee', 'Number');\n }\n\n if (valid) {\n const exceptionToSave = {\n FeeExceptionId: state.feeExceptionId,\n ExceptionType: state.feeExceptionUnderEdit.exceptionType,\n StartDate: state.feeExceptionStartDate,\n EndDate: state.feeExceptionEndDate,\n Multiplier: state.multiplier,\n CappingAmount: state.cappingAmount,\n MonthlyFee: state.monthlyFee\n };\n\n let result;\n try {\n result = await feeException.upsertFeeException(state.personId, exceptionToSave);\n if (result.errorCode !== 0) {\n state.feeExceptionSaveError = '* ' + result.errorMessage;\n const feeExceptionReturnedErrMsgDiv1 = document.getElementById(\n 'feeExceptionReturnedErrMsg'\n ) as HTMLDivElement;\n feeExceptionReturnedErrMsgDiv1.innerHTML = state.feeExceptionSaveError;\n return;\n }\n showSaveStatusMessage('fee exception');\n } catch (ex) {\n showSaveStatusMessage();\n const errorMsg = await ex.json();\n\n state.feeExceptionSaveError = '* ' + errorMsg.exceptionMessage;\n const feeExceptionReturnedErrMsgDiv2 = document.getElementById('feeExceptionReturnedErrMsg') as HTMLDivElement;\n feeExceptionReturnedErrMsgDiv2.innerHTML = state.feeExceptionSaveError;\n return;\n }\n\n if (result) {\n const data = await feeException.get(state.personId);\n\n state.feeExceptions = data.feeExceptions;\n state.defaultMultiplier = data.multiplier;\n state.defaultCappingAmount = data.cappingAmount;\n state.defaultMonthlyFee = 0.0;\n\n state.caller.run('refresh', state.personId);\n this.run('feeException-edit-cancel');\n }\n }\n },\n\n 'feeException-edit-delete': async (state) => {\n document.getElementById('exceptionTypeErrMsg').innerHTML = '';\n document.getElementById('feeExceptionStartDateErrMsg').innerHTML = '';\n document.getElementById('feeExceptionEndDateErrMsg').innerHTML = '';\n\n document.getElementById('multiplierErrMsg').innerHTML = '';\n document.getElementById('cappingAmountErrMsg').innerHTML = '';\n document.getElementById('monthlyFeeErrMsg').innerHTML = '';\n\n document.getElementById('feeExceptionReturnedErrMsg').innerHTML = '';\n state.feeExceptionSaveError = null;\n\n const exceptionToDelete = {\n FeeExceptionId: state.feeExceptionId\n };\n\n let result;\n try {\n result = await feeException.deleteFeeException(state.personId, exceptionToDelete);\n showSaveStatusMessage('fee exception');\n } catch (ex) {\n showSaveStatusMessage();\n const errorMsg = await ex.json();\n state.feeExceptionSaveError = '* ' + errorMsg;\n return state;\n }\n if (result) {\n const data = await feeException.get(state.personId);\n\n state.feeExceptions = data.feeExceptions;\n state.defaultMultiplier = data.multiplier;\n state.defaultCappingAmount = data.cappingAmount;\n state.defaultMonthlyFee = 0.0;\n\n state.caller.run('refresh', state.personId);\n this.run('feeException-edit-cancel');\n }\n },\n\n 'feeException-edit-cancel': (state) => {\n state.editingFeeException = false;\n state.feeExceptionUnderEdit = null;\n state.editingContractOptionId = null;\n\n return state;\n }\n };\n\n rendered = (state) => {\n return { ...state, editingFeeException:false, feeExceptionStartDate:'', feeExceptionEndDate:'' };\n };\n\n mounted = ({ state }) => {\n this.run('refresh', state);\n };\n}\n", "import app, { Component } from 'apprun';\nimport { isValidElement, showSaveStatusMessage } from '../utils';\nimport moment from 'moment';\nimport { teams } from '../api';\n\nexport default class CommonPropertyComponent extends Component {\n state = { dateFmt:'DD-MMM-YYYY' };\n\n view = (state) => {\n if (!state.item) {return;}\n return (\n\n
\n
\n

User Team membership start and end dates must fall within Team Start and End date.

\n {moment(state.extra.TStartDate).format(state.dateFmt)}
\n {state.extra.TEndDate===''?'':moment(state.extra.TEndDate).format(state.dateFmt)}
\n
\n
\n
\n { (state.validate)\n ?\n \n {state.minDate.format(state.dateFmt) + ' - ' + state.maxDate.format(state.dateFmt)}\n
\n
\n :\n * Data inconsistency detected, cannot suggest possible range.
\n * WARNING: validation will not be performned on save\n
\n
\n\n }\n
\n
\n
\n
{state.item.dispName}
\n
\n {\n state.newVal = e.target.value;\n }}\n />\n
\n
\n
\n
\n this.run('save')}>\n save\n \n this.run('delete')}>\n delete\n \n state.caller.run(state.cancel, state.panelId)}>\n cancel\n \n
\n
\n );\n };\n\n update = {\n refresh: async (state, newState) => {\n state = { ...state, ...newState };\n const result = await teams.getTeamConstraints(newState.extra.CompanyPersonID);\n state.teamMemberId = result?.teamMemberId;\n if(result?.status === 'OK') {\n state.validate = true;\n if(state.item.fieldName === 'TMStartDate') {\n state.minDate = moment(result.minPossibleStartDateforTeam);\n state.maxDate = moment(result.maxPossibleStartDateforTeam);\n } else {\n state.minDate = moment(result.minPossibleEndDateforTeam);\n state.maxDate = moment(result.maxPossibleEndDateforTeam);\n }\n } else {\n state.validate = false;\n state.minDate = state.maxDate = null;\n }\n\n return {\n ...state,\n ...newState,\n newVal: newState.item.value ? moment(newState.item.value).format('DD-MMM-YYYY') : null,\n picker: null,\n };\n },\n\n save: async (state) => {\n state.newVal = (document.getElementById('inpText') as HTMLInputElement).value;\n if (!state.newVal) {return;}\n if (isValidElement('inpText', 'DateStr')) {\n if(this.checkBounds(state)) {\n try {\n const result = await teams.updateTeamDate((state.item.fieldName=== 'TMStartDate' ? 'startdate' : 'enddate'), state.extra.CompanyPersonID, state.teamMemberId , state.newVal);\n showSaveStatusMessage(result ? state.item.dispName: null);\n if(result){state.caller.run(state.cancel, state.panelId);}\n } catch(err) {\n const errMsg = await err.json();\n const errDiv = (document.getElementById('inpTextErrMsg') as HTMLDivElement);\n errDiv.innerHTML = errMsg;\n }\n } else {\n const errDiv = (document.getElementById('inpTextErrMsg') as HTMLDivElement);\n errDiv.innerHTML = '* date should be between possible range';\n }\n }\n },\n\n delete: async (state) => {\n state.newVal = '31-Dec-9999';\n if(this.checkBounds(state)) {\n try {\n const result = await teams.updateTeamDate('enddate', state.extra.CompanyPersonID, state.teamMemberId , state.newVal);\n showSaveStatusMessage(result ? state.item.dispName: null);\n if(result){state.caller.run(state.cancel, state.panelId);}\n } catch(err) {\n const errMsg = await err.json();\n const errDiv = (document.getElementById('inpTextErrMsg') as HTMLDivElement);\n errDiv.innerHTML = errMsg;\n }\n } else {\n const errDiv = (document.getElementById('inpTextErrMsg') as HTMLDivElement);\n errDiv.innerHTML = '* cannot be deleted, end date is required.';\n }\n },\n };\n\n mounted = ({ state }) => {\n this.run('refresh', state);\n };\n\n checkBounds = (state) => {\n if(!state.validate) { return true; }\n const inpDate = moment(state.newVal).toDate();\n const minDate = state.minDate.toDate();\n const maxDate = state.maxDate.toDate();\n return ((inpDate >= minDate) && ((inpDate <= maxDate)));\n }\n}\n", "import app, { Component } from 'apprun';\nimport { isValidElement, isDateRangeOverlap } from '../utils';\nimport { users } from '../api';\nimport moment from 'moment';\n\nexport default class CommonPropertyComponent extends Component {\n state = { dateFmt:'DD-MMM-YYYY' };\n\n view = (state) => {\n if (!state.item) {return;}\n return (\n
\n
\n
\n
{state.item.dispName}
\n
\n {\n state.newVal = e.target.value;\n }}\n />\n
\n
\n
\n
\n
\n
\n this.run('save')}>\n save\n \n state.caller.run(state.delete, state.item, state.panelId)}>\n delete\n \n state.caller.run(state.cancel, state.panelId)}>\n cancel\n \n
\n
\n\n {\n state.item.fieldName === 'StartDate' ?\n
\n

Update History

\n \n \n \n \n \n \n \n \n \n \n \n {state.auditLog.map((item) => {\n return (\n \n \n \n \n \n \n \n );\n }\n )}\n \n
Employee TypeStart DateEnd DateModified DateModified User
{item.employeeType}{item.startDate?.substring(0, 10)}{item.endDate?.substring(0, 10)}{item.modifiedDate?.substring(0, 10)}{item.auditModifiedUser}
: ''\n }\n
\n );\n };\n\n update = {\n refresh: async (state, newState) => {\n state = { ...state, ...newState };\n\n if (state.item.fieldName === 'StartDate') {\n state.auditLog = await users.getAuditEmployeeType(state.personId);\n }\n\n return {\n ...state,\n ...newState,\n newVal: newState.item.value ? moment(newState.item.value).format('DD-MMM-YYYY') : null,\n picker: null,\n };\n },\n\n save: async (state) => {\n state.newVal = (document.getElementById('inpText') as HTMLInputElement).value;\n if (!state.newVal) {return;}\n\n const errDiv = (document.getElementById('inpTextErrMsg') as HTMLDivElement);\n if(errDiv){\n errDiv.innerHTML = '';\n }\n\n const history = await users.getOldEmployeeDateHistory(state.personId);\n const d = moment(state.newVal).format('YYYY-MM-DD');\n const startDate = state.extra.StartDate?state.extra.StartDate:'9999-12-31';\n const endDate = state.extra.EndDate?state.extra.EndDate:'9999-12-31';\n\n if (isValidElement('inpText','DateStr')) {\n\n if(state.item.fieldName ==='StartDate'){\n if(endDate < d){\n errDiv.innerHTML = 'End date cannot be before Start date';\n return;\n }\n\n if(isDateRangeOverlap(d, endDate, history)) {\n errDiv.innerHTML = 'Start date is between another period of employment';\n return;\n }\n\n }else{\n if(startDate > d){\n errDiv.innerHTML = 'End date cannot be before Start date';\n return;\n }\n\n if(isDateRangeOverlap(startDate, d, history)) {\n errDiv.innerHTML = 'Start date is between another period of employment';\n return;\n }\n }\n\n await state.caller.run(state.save, state.item, state.panelId, state.newVal);\n }\n },\n };\n\n mounted = ({ state }) => {\n this.run('refresh', state);\n };\n\n}\n", "import app, { Component } from 'apprun';\nimport { users } from '../api';\n\nexport default class CommonPropertyComponent extends Component {\n state = { auditLog: [] };\n\n view = (state) => {\n if (!state.item) { return; }\n return (\n
\n\n {state.item.fieldName === 'TeamMemberAuditLog' ?\n
\n

Update History

\n \n \n \n \n \n \n \n \n \n \n \n \n {state.auditLog.map((item) => {\n return (\n \n \n \n \n \n \n \n \n );\n }\n )}\n \n
Team NameBilling LeadStart DateEnd DateModified DateModified User
{item.teamName}{item.billingLeadIndDesp}{item.startDate?.substring(0, 10)}{item.endDate?.substring(0, 10)}{item.modifiedDate?.substring(0, 10)}{item.auditModifiedUser}
: ''}\n\n {state.item.fieldName === 'PrimaryLocation' ?\n
\n

Update History

\n \n \n \n \n \n \n \n \n \n \n {state.auditLog.map((item) => {\n return (\n \n \n \n \n \n \n );\n }\n )}\n \n
Location IDLocation NameModified DateModified User
{item.locationID}{item.locationName}{item.modifiedDate?.substring(0, 10)}{item.auditModifiedUser}
: ''}\n\n {state.item.fieldName === 'MovementAuditLog' ?
\n

Update History

\n \n \n \n \n \n \n \n \n \n \n \n \n \n {state.auditLog.map((item) => {\n return (\n \n \n \n \n \n \n \n \n \n );\n }\n )}\n \n
Company Person IDCompany NameEmployee TypeStart DateEnd DateModified DateModified User
{item.companyPersonID}{item.companyName}{item.employeeType}{item.startDate?.substring(0, 10)}{item.endDate?.substring(0, 10)}{item.modifiedDate?.substring(0, 10)}{item.auditModifiedUser}
: ''}\n\n
\n );\n };\n\n update = {\n refresh: async (state, newState) => {\n state = newState;\n\n if (state.item.fieldName === 'TeamMemberAuditLog') {\n state.auditLog = await users.getAuditTeamMember(state.personId);\n } else if (state.item.fieldName === 'MovementAuditLog') {\n state.auditLog = await users.getAuditNetworkMovement(state.personId);\n }\n\n return { ...state, newVal: newState.item.value };\n },\n\n save: (state) => {\n state.caller.run(state.save, state.item, state.panelId, state.newVal);\n },\n };\n\n mounted = ({ state }) => {\n this.run('refresh', state);\n };\n}\n", "import app, { Component } from 'apprun';\nimport { isValid, lookup_en } from '../utils';\n\nexport default class UserPropertyComponent extends Component {\n view = (state) => {\n if (!state.item) {return;}\n const separator = ':';\n\n if(state.item.value){\n const dataComponents = state.item.value.split(separator);\n\n state.entityType = dataComponents[0];\n state.entityId = dataComponents[1] || '';\n state.overrideType = dataComponents[2];\n }\n\n return (\n
\n
\n
\n Entity\n ID\n Override Type\n
\n
\n
\n
\n \n
\n
\n
\n
\n
\n {state.entityId = e.target.value;}} data-validate=\"Int\"/>\n
\n
\n
\n
\n
\n \n
\n
\n
\n\n
\n
\n
\n
\n
\n
\n state.caller.run(state.delete, state.item, state.panelId)}>\n delete\n \n this.run('save', e)}>\n save\n \n this.run('cancel')}>\n cancel\n \n
\n
\n );\n };\n\n update = {\n\n save: (state, e) => {\n state.newVal = state.entityType + ':' + state.entityId + ':' + state.overrideType;\n if((!isValid('OverrideEditForm')) || (state.newVal===state.item.value)) { e.preventDefault(); return;}\n state.caller.run(state.save, state.item, state.panelId, state.newVal);\n },\n\n cancel: (state) => {\n state.caller.run(state.cancel, state.panelId);\n },\n\n 'EntityType-Changed': (state, e) => {\n const inpEntityID = document.getElementById('inpEntityID') as HTMLInputElement;\n if(this.state.entityType==='PARENT') { this.state.entityId = inpEntityID.value = ''; }\n this.state.entityType = (e.target.options[e.target.selectedIndex].text);\n if((inpEntityID.disabled = (this.state.entityType === 'PARENT'))){ this.state.entityId = inpEntityID.value = '1532';}\n },\n }\n\n mounted = ({ state }) => state;\n}\n", "import app, { Component } from 'apprun';\nimport { isValidElement, showSaveStatusMessage, } from '../utils';\nimport { ProtectionRoyale } from '../api';\nimport moment from 'moment';\nexport default class CommonPropertyComponent extends Component {\n dateFmt = 'DD-MMM-YYYY';\n\n state = { progs: [] };\n\n cleanState = {\n prSubsStartDatePicker: null,\n prSubsEndDatePicker: null,\n editingItem: null,\n prSubsSaveError: null,\n };\n\n Item = ({ item, editingProgId }) => {\n return (\n {\n this.run('prSubs-edit', item, e);\n }\n : ''\n }>\n \n \n {item.activeInd ? 'Active' : 'Inactive'}\n \n \n \n \n {item.startDate ? moment.utc(item.startDate).format(this.dateFmt) : ''}\n \n \n \n \n {item.endDate ? moment.utc(item.endDate).format(this.dateFmt) : ''}\n \n \n \n
\n {item.locked ? : ''}\n {item.id === editingProgId ? : ''}\n
\n \n \n );\n };\n\n List = ({ state }) => {\n return (\n \n \n \n \n \n \n \n \n \n \n {state.progs.map(item => (\n \n ))}\n \n
StatusStart DateEnd Date
\n );\n };\n\n PRSubsHistory = ({ state }) => {\n return (\n
\n
Protection Royale Subscription(s)
\n
\n \n
\n
\n );\n };\n\n CommProgEdit = ({ state }) => {\n return (\n
\n
\n \n \n
\n
\n
\n \n
\n
\n \n
\n
\n
\n
\n
\n
\n {state.prSubsSaveError}\n
\n
\n

\n\n \n
\n );\n };\n\n // prettier-ignore\n view = (state) => {\n return (\n \n );\n };\n\n update = {\n refresh: async (state, newState) => {\n if (newState.panelId !== state.personId) {\n state = this.cleanState;\n state.personId = newState.personId;\n }\n state.progs = await ProtectionRoyale.get(state.personId);\n return { ...state, ...newState };\n },\n\n 'prSubs-edit': async (state, item) => {\n if (state.editingProg) {return;}\n\n state.prSubsStartDate = item.startDate ? moment.utc(item.startDate).format(this.dateFmt) : '';\n state.prSubsEndDate = item.endDate ? moment.utc(item.endDate).format(this.dateFmt) : '';\n\n state.editingProg = true;\n state.editingProgId = item.id;\n state.progUnderEdit = item;\n return state;\n },\n\n 'prSubs-edit-save': async (state) => {\n state.prSubsSaveError = null;\n const prSubsReturnedErrMsgDiv = document.getElementById('prSubsReturnedErrMsg') as HTMLDivElement;\n prSubsReturnedErrMsgDiv.innerHTML = state.prSubsSaveError;\n\n state.prSubsStartDate = (document.getElementById('prSubsStartDate') as HTMLInputElement).value.trim();\n state.prSubsEndDate = (document.getElementById('prSubsEndDate') as HTMLInputElement).value.trim();\n\n let valid = isValidElement('prSubsStartDate', 'DateStr');\n if (state.prSubsEndDate) {\n valid = valid && isValidElement('prSubsEndDate', 'DateStr');\n if (valid && moment(state.prSubsStartDate, this.dateFmt) > moment(state.prSubsEndDate, this.dateFmt)) {\n valid = false;\n const errMsg = document.getElementById('prSubsEndDateErrMsg') as HTMLDivElement;\n errMsg.innerHTML = 'End date cannot be before Start date';\n }\n }\n\n if (valid) {\n const progToSave =\n state.editingProgId === 0\n ? { id: 0, commercialFeeID: state.commercialProgFeeID, startDate: state.prSubsStartDate, endDate: state.prSubsEndDate }\n : { ...state.progUnderEdit, startDate: state.prSubsStartDate, endDate: state.prSubsEndDate };\n let result;\n try {\n result = await ProtectionRoyale.upsertPRSubs(state.personId, progToSave);\n showSaveStatusMessage(result===1?'Success: ' : result);\n } catch (ex) {\n showSaveStatusMessage();\n const errorMsg = await ex.json();\n state.prSubsSaveError = '* ' + errorMsg;\n return state;\n }\n\n if (result) {\n state.progs = await ProtectionRoyale.get(state.personId);\n this.run('prSubs-edit-cancel');\n }\n }\n },\n\n 'prSubs-edit-cancel': (state) => {\n state.editingProg = false;\n state.progUnderEdit = null;\n state.editingProgId = null;\n return state;\n },\n };\n\n mounted = ({ state }) => {\n this.run('refresh', state);\n };\n}\n", "import app, { Component } from 'apprun';\nimport { users as usersApi, locations, companies } from './api';\nimport { showSaveStatusMessage, lookup_en, isStringEqual } from './utils';\nimport UserTerminate from './user-terminate';\nimport UserReactivate from './user-reactivate';\n\nimport PropEditorTextComponent from './common-props/common-props-text-edit';\nimport PropEditorSelectionComponent from './common-props/common-props-selection-edit';\nimport PropEditorRegionsComponent from './common-props/common-props-regions-edit';\nimport PropEditorDateComponent from './common-props/common-props-date-edit';\n\nimport PropEditorExpertTopicComponent from './common-props/common-props-expertTopic-edit';\nimport UserPropertyPhoneComponent from './user-props/user-props-phone';\nimport UserPropertySocNetComponent from './user-props/user-props-socialNetworking';\nimport UserPropertyAwardComponent from './user-props/user-props-award';\nimport UserPropertyPhotoComponent from './user-props/user-props-photo';\nimport UserPropertyPasswordComponent from './user-props/user-props-password-edit';\nimport UserPropertySpecialityComponent from './user-props/user-props-speciality';\nimport UserPropertycommercialComponent from './user-props/user-props-commercial';\nimport UserPropertyFeeExceptionComponent from './user-props/user-props-exception';\nimport UserPropertyTeamDateComponent from './user-props/user-props-TeamDate-edit';\nimport UserPropertyDateComponent from './user-props/user-props-date-edit';\nimport UserPropertyAuditLogComponent from './user-props/user-props-audit-log';\nimport UserPropertyIreOverrideComponent from './user-props/user-props-ire-overrides';\nimport UserPropertyProtectionRoyaleComponent from './user-props/user-props-protection-royale';\n\nimport moment from 'moment';\n\nconst idFieldName = 'personId';\nconst getPropItem = (state, fieldName) => state.props.find(p => p.fieldName === fieldName);\n\nfunction getItemValue(item) {\n if (!item) {return;}\n let itemValue = item.value;\n let selectOptions;\n switch (item.fieldType) {\n case null:\n case 'CommProg':\n case 'CALL':\n case 'Text':\n return itemValue;\n case 'Phones':\n case 'html':\n return item.value\n ? item.value.split('
').map(p => (\n \n {p}\n
\n
\n ))\n : '';\n case 'TMDateStr':\n return item.value;\n case 'DateStr':\n return item.value;\n //return (item.value) ? new Date(item.value).toDateString() : null;\n case 'Int':\n if (itemValue === '-1' && item.fieldTypeDetail) {itemValue = 'Not Available';}\n return itemValue;\n case 'Specialty':\n const speciality = JSON.parse(itemValue || '{\"AttributeID\":\"\",\"EffectiveDate\":\"\",\"ExpirationDate\":\"\"}');\n itemValue = speciality.AttributeID;\n // TODO: verify if a return needed\n // eslint-disable-next-line no-fallthrough\n case 'Selection':\n case 'PortectionRoyale':\n if (item.fieldTypeDetail && item.fieldTypeDetail.startsWith('[')) {\n selectOptions = JSON.parse(item.fieldTypeDetail);\n } else {\n selectOptions = lookup_en[item.fieldTypeDetail];\n }\n selectOptions = selectOptions || [];\n const selectedOption = selectOptions.find((p) => {\n return isStringEqual(p.id, itemValue) || isStringEqual(p.name, itemValue);\n });\n\n itemValue = selectedOption ? selectedOption.value : item.value;\n return itemValue;\n case 'Award':{\n if (!item.value) {return item.value;}\n const awardArray = item.value.split(' >> ');\n let award = '', year = '';\n award= awardArray[0];\n year = awardArray[1]==='0'? '': awardArray[1];\n\n return award + ' ' + year;\n\n }\n case 'Regions':\n if (!item.value) {return item.value;}\n if (typeof item.value === 'string') {\n const regions = JSON.parse(item.value);\n item.value = regions;\n }\n return item.value.map(p => (\n \n {p.regionsServicedName}\n
\n
\n ));\n case 'ExpertTopic':\n if (!item.value) {return item.value;}\n if (typeof item.value === 'string') {\n const topic = JSON.parse(item.value);\n item.value = topic;\n }\n return item.value.map(p => (\n \n {p.ExpertTopicName}\n
\n
\n ));\n case 'FeeException':\n return itemValue;\n default:\n return itemValue;\n }\n}\n\nexport default class UserComponent extends Component {\n Item = ({ item, editing }) => {\n if (!item || !item.displayOrder) {return;}\n if (item.fieldType === 'Group') {return ;}\n if (this.state.hideBlank && this.getItem(item)) {return;}\n return (\n \n \n
{getItemValue(item)}
\n
\n {editing ? : ''}\n
\n \n );\n };\n\n List = ({ state }) => (\n \n \n {state.props\n .filter(p => p.fieldType === 'Group' || p.dispName.toUpperCase().indexOf(state.filter.toUpperCase()) >= 0)\n .map(item => (\n {\n if (item.fieldType !== 'Group') {this.run('edit-prop', item, e);}\n }}>\n \n \n ))}\n \n
\n );\n\n state = { filter: '', editingItem: null, mode: 'group', hideBlank: true, props: [] };\n\n view = (state) => {\n if (!state || !state.props?.length) {return;}\n return (\n
\n
\n
\n this.run('image-failed')}\n onclick={e => this.run('edit-photo', e)}\n />\n
\n
\n {(this.isInactive())? :null}\n {state.uname}\n

{getItemValue(this.getItem('DisplayName'))}

\n {getItemValue(this.getItem('Employeetype'))}\n
\n {getItemValue(this.getItem('PrimaryLocation'))}\n
\n {getItemValue(this.getItem('City'))},  \n {getItemValue(this.getItem('Province'))}\n
\n
\n
\n
\n this.run('toggleHidBlank', e)} checked={!state.hideBlank ? 'checked' : null} /> show blank properties\n
\n
\n this.run('search', e)} />{' '}\n \n \n
\n
\n\n
\n \n \n {\n (this.isInactive())\n ?\n :\n }\n
\n
\n \n \n  \n
\n
\n \n
\n
\n );\n };\n\n update = {\n refresh: async (state, personId) => {\n state.personId = personId;\n if (!state.personId) {return;}\n\n state.props = await usersApi.getUserPropertyBag(personId);\n state.uname = getItemValue(getPropItem(state, 'UserName'));\n state.companyID = getItemValue(getPropItem(state, 'CompanyID'));\n\n lookup_en['Locations'] = await locations.getLocationsByCompanyID(state.companyID);\n lookup_en['Locations'].forEach(loc => (loc.value = loc.id + ' - ' + loc.name));\n lookup_en['Locations'].unshift({ id: '', name: '' });\n\n state = this.sortGroupwise(state);\n return state;\n\n },\n\n A2ZClick: (state) => {\n state.props.sort(function (a, b) {\n return (a.orderA2Z ?? 0) - (b.orderA2Z ?? 0);\n });\n state.props.forEach(item => (item.displayOrder = item.orderA2Z));\n state.mode = 'a-z';\n return state;\n },\n\n GroupsClick: state => this.sortGroupwise(state),\n\n 'edit-photo': (state, e) => {\n const item = { ...this.getItem('Photo'), value: e.target.src };\n this.run('edit-prop', item, e);\n },\n\n 'edit-prop': (state, item, e) => {\n if (!item.editable) {return;}\n e.preventDefault();\n\n const panelId = 'prop-edit-' + item.fieldType;\n const editorState = {\n item,\n personId: state.personId,\n panelId,\n caller: this,\n cancel: 'edit-prop-cancel',\n save: 'save-prop',\n delete: 'delete-prop',\n extra:{},\n };\n\n let comp;\n switch (item.fieldType) {\n case 'CommProg':\n editorState.extra = {\n StartDate: getItemValue(this.getItem('StartDate')),\n EndDate: getItemValue(this.getItem('EndDate')),\n CompanyPersonID: getItemValue(this.getItem('CompanyPersonID')),\n };\n comp = UserPropertycommercialComponent;\n break;\n case 'Specialty':\n comp = UserPropertySpecialityComponent;\n break;\n case 'Selection':\n comp = PropEditorSelectionComponent;\n break;\n case 'DateStr':\n comp = PropEditorDateComponent;\n break;\n case 'UserDateStr':\n editorState.extra = {\n StartDate: getItemValue(this.getItem('StartDate')),\n EndDate: getItemValue(this.getItem('EndDate')),\n };\n comp = UserPropertyDateComponent;\n break;\n case 'TMDateStr':\n if(getItemValue(this.getItem('TeamName'))===''){return;}\n editorState.extra = {\n TStartDate: getItemValue(this.getItem('TStartDate')),\n TEndDate: getItemValue(this.getItem('TEndDate')),\n StartDate: getItemValue(this.getItem('StartDate')),\n EndDate: getItemValue(this.getItem('EndDate')),\n CompanyPersonID: getItemValue(this.getItem('CompanyPersonID')),\n };\n\n comp = UserPropertyTeamDateComponent;\n break;\n case 'Regions':\n comp = PropEditorRegionsComponent;\n editorState.extra = { province: getItemValue(this.getItem('Province')) };\n break;\n case 'ExpertTopic':\n comp = PropEditorExpertTopicComponent;\n break;\n case 'Phone':\n comp = UserPropertyPhoneComponent;\n break;\n case 'Award':\n comp = UserPropertyAwardComponent;\n break;\n case 'SocNet':\n comp = UserPropertySocNetComponent;\n break;\n case 'Photo':\n comp = UserPropertyPhotoComponent;\n break;\n case 'FeeException':\n comp = UserPropertyFeeExceptionComponent;\n break;\n case 'IreOverride':\n comp = UserPropertyIreOverrideComponent;\n break;\n case 'PortectionRoyale':\n editorState.extra = {\n StartDate: getItemValue(this.getItem('StartDate')),\n EndDate: getItemValue(this.getItem('EndDate')),\n CompanyPersonID: getItemValue(this.getItem('CompanyPersonID')),\n };\n comp = UserPropertyProtectionRoyaleComponent;\n break;\n case 'AuditLog':\n comp = UserPropertyAuditLogComponent;\n break;\n\n default:\n comp = PropEditorTextComponent;\n break;\n }\n\n state.editingItem = item;\n app.run('#add-panel', { id: panelId, title: item.dispName, Component: comp, state: editorState, level: 4 });\n },\n\n 'save-prop': async (state, item, panelId, newVal) => {\n try{\n const errDiv = (document.getElementById('inpTextErrMsg') as HTMLDivElement);\n if(errDiv){\n errDiv.innerHTML = '';\n }\n let result;\n if (panelId === 'prop-edit-Regions') {\n result = await usersApi.postUserAreas(state[idFieldName], newVal);\n } else if (panelId === 'prop-edit-ExpertTopic') {\n result = await usersApi.postExpertTopic(state[idFieldName], newVal);\n } else {\n result = await usersApi.upsertUserProperty(state[idFieldName], { prop: item, newValue: newVal });\n }\n\n showSaveStatusMessage(result> 0?'user':'');\n if (result) {\n if (item.multiValue && item.value === '') {\n state.props.splice(state.props.indexOf(item) + 1, 0, { ...item });\n }\n item.value = newVal;\n this.run('edit-prop-cancel', panelId);\n\n if (item.fieldName === 'Employeetype') {\n const sellingIndObj = state.props.find(obj => obj.fieldName === 'SellingInd');\n sellingIndObj.value = '3';\n\n const displayOnSearchIndObj = state.props.find(obj => obj.fieldName === 'DisplayOnSearchInd');\n displayOnSearchIndObj.value = '4';\n\n switch (item.value) {\n case '1': {\n //--Licensed Assistant 1\n sellingIndObj.value = '1';\n displayOnSearchIndObj.value = '1';\n break;\n }\n case '2': {\n //--Broker Manager 2\n sellingIndObj.value = '0';\n displayOnSearchIndObj.value = '1';\n break;\n }\n case '10': {\n //--Broker Manager - Selling 10\n sellingIndObj.value = '1';\n displayOnSearchIndObj.value = '1';\n break;\n }\n case '6': {\n //--Finance Staff - 6\n sellingIndObj.value = '0';\n displayOnSearchIndObj.value = '0';\n break;\n }\n case '9': {\n //--Broker Owner - 9\n sellingIndObj.value = '0';\n displayOnSearchIndObj.value = '1';\n break;\n }\n case '7': {\n //--Broker Owner - Selling - 7\n sellingIndObj.value = '1';\n displayOnSearchIndObj.value = '1';\n break;\n }\n case '8': {\n //--Agent / Sales Representative - 8\n sellingIndObj.value = '1';\n displayOnSearchIndObj.value = '1';\n break;\n }\n case '11': {\n //--Unlicensed Assistant - 11\n sellingIndObj.value = '0';\n displayOnSearchIndObj.value = '0';\n break;\n }\n case '3': {\n //--Administration - 3\n sellingIndObj.value = '0';\n displayOnSearchIndObj.value = '0';\n break;\n }\n default:\n }\n }\n }else{\n if (item.fieldName ==='Back Office No.'){\n errDiv.innerHTML ='Duplicate Back Office Number Found.';\n }\n }\n }catch(err){\n showSaveStatusMessage();\n const errMsg = await err.json();\n const errDiv = (document.getElementById('inpTextErrMsg') as HTMLDivElement);\n\n if(errDiv){\n errDiv.innerHTML = errMsg.exceptionMessage.split('\\n', 1)[0];\n }\n }\n\n return state;\n },\n\n 'delete-prop': async (state, item, panelId) => {\n const result = await usersApi.deleteUserProperty(state.personId, item);\n showSaveStatusMessage('user');\n if (result) {\n if (item.multiValue) {\n state.props.splice(state.props.indexOf(item), 1);\n } else {\n item.value = '';\n }\n this.run('edit-prop-cancel', panelId);\n }\n },\n\n 'edit-prop-cancel': (state, id) => {\n state.editingItem = null;\n app.run('#clear-panel', id);\n return state;\n },\n\n 'image-failed': (state) => {\n if (!state.imageFailed) {return { ...state, imageFailed: true };}\n },\n\n cancel: (state, item, e) => ({ ...state, editingItem: null, e: e.preventDefault() }),\n\n toogleGroup: (state, e) => {\n e.preventDefault();\n const groupId = parseInt(e.target.dataset.displayOrder);\n const allTableRows = document.getElementById('tblProp').querySelectorAll('tr');\n for (let i = 0; i < allTableRows.length; i++) {\n const tr = allTableRows[i] as HTMLElement;\n const sortOrder = parseInt(tr.dataset.displayOrder);\n if (sortOrder > groupId && sortOrder < groupId + 500) {\n tr.style.display = tr.style.display === 'none' ? 'table-row' : 'none';\n }\n }\n },\n\n search: (state, e) => ({ ...state, filter: e.target.value }),\n\n toggleHidBlank: (state, e) => ({ ...state, hideBlank: !e.target.checked }),\n\n 'get-OnetimePwd': async (state) => {\n const oneTimePwd = await usersApi.getOneTimePwd(state.personId);\n return { ...state, oneTimePwd };\n },\n\n 'reset-pwd': (state, e) => {\n e.preventDefault();\n const panelId = 'prop-edit-reset-pwd';\n app.run('#add-panel', {\n id: panelId,\n title: 'Reset Password',\n Component: UserPropertyPasswordComponent,\n state: { personId: state.personId, panelId, caller: this, cancel: 'edit-prop-cancel' },\n level: 4,\n });\n return state;\n },\n\n 'start-jumpSync': async (state) => {\n await usersApi.initiateForceSync(state.personId);\n showSaveStatusMessage('Jump Sync');\n },\n\n 'park-email': async (state) => {\n const park = (this.getItem('EmailParkDate') || {}).value === '';\n const result = await usersApi.parkEmail(state.personId, park);\n if (result) {this.getItem('EmailParkDate').value = park ? 'dd' : '';}\n showSaveStatusMessage('park-email');\n return state;\n },\n\n 'user-terminate': (state) => {\n const employeeType = this.getItem('Employeetype').value;\n const isAgent = employeeType === 1 || employeeType === 8;\n app.run('#add-panel', {\n id: 'userTerminate',\n title: 'Terminate: ' + state.uname,\n Component: UserTerminate,\n level: 3,\n state: {\n caller: this,\n panelId: 'userTerminate',\n personId: state.personId,\n isAgent,\n companyID: state.companyID,\n startDate: moment(state.props.find(p => p.fieldName === 'StartDate').value, 'YYYY-MM-DD').format('DD-MMM-YYYY')\n },\n });\n },\n\n 'user-reactivate': async (state) => {\n\n const profile = await usersApi.getReactivateProfile(getItemValue(this.getItem('EMailAddress')));\n const locStr = getItemValue(this.getItem('PrimaryLocation'));\n profile.primaryLocationID = locStr.substring(0, locStr.indexOf(' '));\n const locationOptions = !profile.companyID? [] : await locations.getLocationsByCompanyID(profile.companyID);\n const brokerageOptions = await companies.getOpenCompanies();\n\n app.run('#add-panel', {\n id: 'userReactivate',\n title: 'Reactivate: ' + state.uname,\n Component: UserReactivate,\n level: 3,\n state: { caller: this, panelId: 'userReactivate', personId: state.personId, profile, locationOptions, brokerageOptions }\n });\n },\n\n '#sub-panel-done': (state, panelId) => {\n this.run('refresh');\n app.run('#clear-panel', panelId);\n },\n };\n\n getItem = fieldName => this.state.props.find(p => p.fieldName === fieldName);\n\n isInactive(): boolean {\n const endDateStr = getItemValue(this.getItem('EndDate'));\n if (endDateStr) {\n const endDate = new Date(endDateStr);\n const date = new Date();\n return date > endDate;\n }\n return false;\n }\n\n GroupHeader = ({ item }) => (\n \n \n \n );\n\n mounted = ({ state }) => {\n this.run('refresh', state.personId);\n };\n\n sortGroupwise = (state) => {\n state.props.sort(function (a, b) {\n return(a.orderScheme1 ?? 0) - (b.orderScheme1 ?? 0);\n });\n state.props.forEach(item => (item.displayOrder = item.orderScheme1));\n state.mode = 'group';\n return state;\n }\n}\n", "import app, { Component } from 'apprun';\nimport { serializeObject, companies } from './api';\nimport { isValid, showSaveStatusMessage } from './utils';\n\nexport default class CompanyNewComponent extends Component {\n state = { };\n\n view = () =>
\n
\n
\n
\n Name: \n
\n
\n
\n Open Date: \n
\n
\n
\n
\n
\n \n  \n
\n
;\n\n update = {\n save: async () => {\n try {\n const formName = 'copmNewForm';\n if (!isValid(formName)) {return;}\n const formData = serializeObject(document.getElementById(formName));\n const result = await companies.post(0, formData);\n showSaveStatusMessage('company');\n app.run('#company', result, formData['companyName']);\n } catch {\n showSaveStatusMessage();\n }\n },\n cancel: () => {\n app.run('#clear-panel', 'compNew');\n }\n };\n}\n", "import app, { Component } from 'apprun';\nimport { lookup_en } from '../utils';\n\nexport default class CommonPropertyComponent extends Component {\n state = { selectOptions: [] };\n\n view = (state) => {\n if (!state.caller) {return;}\n const prov = state.caller.state.location.locationDetail.find(e => e.fieldName === 'ProvStateCt').value.toString();\n\n if (prov === '') {\n state.selectOptions = state.selectOptions.filter(a => a.id === 0);\n } else {\n state.selectOptions = state.selectOptions.filter(\n a => a.id === 0 || a.value.substr(a.value.indexOf('-') + 1, a.value.length - 1) === prov\n );\n }\n\n return (\n
\n
\n
{state.item.dispName}
\n {\n
\n \n
\n }\n
\n
\n
\n state.caller.run(state.delete, state.item, state.panelId)}>\n delete\n \n this.run('save')}>\n save\n \n state.caller.run(state.cancel, state.panelId)}>\n cancel\n \n
\n
\n );\n };\n\n update = {\n refresh: (state, newState) => {\n state = newState;\n let selectOptions = [];\n if (state.item.fieldTypeDetail && state.item.fieldTypeDetail.startsWith('[')) {\n selectOptions = JSON.parse(state.item.fieldTypeDetail);\n } else {\n selectOptions = lookup_en[state.item.fieldTypeDetail];\n }\n selectOptions = selectOptions || [];\n\n return { ...state, selectOptions, newVal: newState.item.value };\n },\n\n save: (state) => {\n if (!state.newVal) {return;}\n state.caller.run(state.save, state.item, state.panelId, state.newVal);\n },\n };\n\n mounted = ({ state }) => {\n this.run('refresh', state);\n };\n}\n", "import app, { Component } from 'apprun';\nimport { isValidElement, showSaveStatusMessage } from '../utils';\nimport { contractOption } from '../api';\nimport moment from 'moment';\nimport { lookup_en } from '../utils';\n\nexport default class CommonPropertyComponent extends Component {\n dateFmt = 'DD-MMM-YYYY';\n\n state = { contractOptions: [] };\n\n Item = ({ item, startDateEnable, endDateEnable }) => {\n return (\n {\n this.run('contractOption-edit', item, startDateEnable, endDateEnable, e);\n }\n : ''\n }>\n \n \n {item.contractOptionID}\n \n \n\n \n \n {item.startDate ? moment.utc(item.startDate).format(this.dateFmt) : ''}\n \n \n \n \n {item.endDate ? moment.utc(item.endDate).format(this.dateFmt) : ''}\n \n \n \n \n \n \n \n \n );\n };\n\n List = ({ state }) => {\n return (\n \n \n \n \n \n \n \n \n \n \n {state.contractOptions.map((item, index) => (\n \n ))}\n \n
Contract OptionStart DateEnd DateEdit
\n );\n };\n\n ContractOptionHistory = ({ state }) => {\n return (\n
\n
\n \n
\n
\n );\n };\n\n ContractOptionEdit = ({ state }) => {\n let selectOptions = lookup_en['ContractOption'];\n selectOptions = selectOptions || [];\n\n return (\n
\n
\n **NEW**\n
\n
\n \n
\n
\n
\n (state.editingContractOptionId = e.target.value)}>\n {selectOptions.map(p => (\n \n {p.value}\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 {state.contractOptionSaveError}\n
\n
\n
\n
\n this.run('contractOption-edit-save')}>\n Save\n \n\n this.run('contractOption-edit-delete')}\n style={{\n display: !state.newContractOption && (state.startDateEnable || state.endDateEnable) ? 'disp' : 'none',\n }}>\n Delete\n \n\n this.run('contractOption-edit-cancel')}>\n Cancel\n \n
\n
\n );\n };\n\n // prettier-ignore\n view = (state) => {\n //this.log('In view of common-props-date-edit...');\n //this.log(state);\n return (\n \n );\n };\n\n update = {\n refresh: async (state, newState) => {\n state.locationId = newState.caller.state.locationId;\n state.contractOptions = await contractOption.get(state.locationId);\n\n return { ...state, ...newState };\n },\n\n 'contractOption-new': (state, e) => {\n //this.log('In commProg-new...');\n //this.log(state);\n this.run('contractOption-edit', { contractOptionID: 0 }, true, true, e);\n },\n\n 'contractOption-edit': (state, item, startDateEnable, endDateEnable) => {\n\n state.contractOptionStartDate = item.startDate ? moment.utc(item.startDate).format(this.dateFmt) : '';\n state.contractOptionEndDate = item.endDate ? moment.utc(item.endDate).format(this.dateFmt) : '';\n\n state.startDateEnable = startDateEnable;\n state.endDateEnable = endDateEnable;\n\n state.oldStartDate = state.contractOptionStartDate;\n state.oldEndDate = state.contractOptionEndDate;\n state.oldContractOptionId = item.contractOptionID;\n\n state.newContractOption = item.contractOptionID === 0;\n\n state.editingContractOption = true;\n state.editingContractOptionId = item.contractOptionID;\n state.contractOptionUnderEdit = item;\n\n state.oldStartDate = state.contractOptionStartDate;\n state.oldEndDate = state.contractOptionEndDate;\n state.oldContractOptionId = item.contractOptionID;\n\n return state;\n },\n\n 'contractOption-edit-save': async (state) => {\n document.getElementById('ContractOptionIdErrMsg').innerHTML = '';\n document.getElementById('contractOptionStartDateErrMsg').innerHTML = '';\n document.getElementById('contractOptionEndDateErrMsg').innerHTML = '';\n\n document.getElementById('contractOptionReturnedErrMsg').innerHTML = '';\n\n state.contractOptionSaveError = null;\n const contractOptionReturnedErrMsgDiv = document.getElementById('contractOptionReturnedErrMsg') as HTMLDivElement;\n contractOptionReturnedErrMsgDiv.innerHTML = state.contractOptionSaveError;\n\n state.contractOptionStartDate = (document.getElementById(\n 'contractOptionStartDate'\n ) as HTMLInputElement).value.trim();\n state.contractOptionEndDate = (document.getElementById('contractOptionEndDate') as HTMLInputElement).value.trim();\n\n const element = document.getElementById('ContractOptionId') as HTMLInputElement;\n\n let valid = true;\n\n if (element.value === '0') {\n valid = false;\n const errMsg = document.getElementById('ContractOptionIdErrMsg') as HTMLDivElement;\n errMsg.innerHTML = 'Please select contract option.';\n }\n\n if (state.contractOptionStartDate === '') {\n valid = false;\n const errMsg = document.getElementById('contractOptionStartDateErrMsg') as HTMLDivElement;\n errMsg.innerHTML = 'Start date cannot be empty.';\n } else {\n valid = valid && isValidElement('contractOptionStartDate', 'DateStr');\n }\n\n if (state.contractOptionEndDate === '') {\n valid = false;\n const errMsg = document.getElementById('contractOptionEndDateErrMsg') as HTMLDivElement;\n errMsg.innerHTML = 'End date cannot be empty.';\n } else {\n valid = valid && isValidElement('contractOptionEndDate', 'DateStr');\n }\n\n if (\n valid &&\n moment(state.contractOptionStartDate, this.dateFmt) > moment(state.contractOptionEndDate, this.dateFmt)\n ) {\n valid = false;\n const errMsg = document.getElementById('contractOptionEndDateErrMsg') as HTMLDivElement;\n errMsg.innerHTML = 'End date cannot be before Start date';\n }\n\n if (\n valid &&\n state.oldContractOptionId === 0 &&\n state.contractOptions.length > 0 &&\n !moment(state.contractOptionEndDate, this.dateFmt).isSame(\n moment(state.contractOptions[0].startDate).add(-1, 'days')\n ) &&\n !moment(state.contractOptionStartDate, this.dateFmt).isSame(\n moment(state.contractOptions[state.contractOptions.length - 1].endDate).add(1, 'days')\n )\n ) {\n valid = false;\n const errMsg = document.getElementById('contractOptionStartDateErrMsg') as HTMLDivElement;\n errMsg.innerHTML = 'Date is invalid.';\n }\n\n if (valid) {\n const optionToSave = {\n newContractOptionId: parseInt(state.editingContractOptionId),\n newStartDate: state.contractOptionStartDate,\n newEndDate: state.contractOptionEndDate,\n oldStartDate: state.oldStartDate,\n oldEndDate: state.oldEndDate,\n oldContractOptionId: state.oldContractOptionId,\n };\n\n let result;\n try {\n result = await contractOption.upsertContractOption(state.locationId, optionToSave);\n showSaveStatusMessage('contract option');\n } catch (ex) {\n showSaveStatusMessage();\n const errorMsg = await ex.json();\n state.contractOptionSaveError = '* ' + errorMsg;\n return state;\n }\n\n if (result) {\n state.contractOptions = await contractOption.get(state.locationId);\n state.caller.run('refresh', state.locationId);\n this.run('contractOption-edit-cancel');\n }\n }\n },\n\n 'contractOption-edit-delete': async (state) => {\n document.getElementById('ContractOptionIdErrMsg').innerHTML = '';\n document.getElementById('contractOptionStartDateErrMsg').innerHTML = '';\n document.getElementById('contractOptionEndDateErrMsg').innerHTML = '';\n document.getElementById('contractOptionReturnedErrMsg').innerHTML = '';\n\n state.contractOptionSaveError = null;\n const contractOptionReturnedErrMsgDiv = document.getElementById('contractOptionReturnedErrMsg') as HTMLDivElement;\n contractOptionReturnedErrMsgDiv.innerHTML = state.contractOptionSaveError;\n\n const optionToSave = {\n oldStartDate: state.oldStartDate,\n oldEndDate: state.oldEndDate,\n oldContractOptionId: state.oldContractOptionId,\n };\n\n let result;\n try {\n result = await contractOption.deleteContractOption(state.locationId, optionToSave);\n showSaveStatusMessage('contract option');\n } catch (ex) {\n showSaveStatusMessage();\n const errorMsg = await ex.json();\n state.contractOptionSaveError = '* ' + errorMsg;\n return state;\n }\n\n if (result) {\n state.contractOptions = await contractOption.get(state.locationId);\n state.caller.run('refresh', state.locationId);\n this.run('contractOption-edit-cancel');\n }\n },\n\n 'contractOption-edit-cancel': (state) => {\n state.editingContractOption = false;\n state.contractOptionUnderEdit = null;\n state.editingContractOptionId = null;\n\n return state;\n },\n };\n rendered = (state) => {\n return { ...state, editingContractOption: false, contractOptionStartDate: '', contractOptionEndDate:'',startDateEnable:true, endDateEnable:true };\n };\n\n mounted = ({ state }) => {\n this.run('refresh', state);\n };\n}\n", "/* eslint-disable no-console */\nimport app, { Component } from 'apprun';\nimport { locations as objApi } from './api';\nimport { showSaveStatusMessage, lookup_en, isStringEqual } from './utils';\n\nimport PropEditorTextComponent from './common-props/common-props-text-edit';\nimport PropEditorAddressComponent from './common-props/common-props-address-edit';\nimport PropEditorPhoneComponent from './common-props/common-props-phone-edit';\nimport PropEditorSelectionComponent from './common-props/common-props-selection-edit';\nimport PropEditorRegionsComponent from './common-props/common-props-regions-edit';\nimport PropEditorDateComponent from './common-props/common-props-date-edit';\nimport PropEditorRegionSelectionComponent from './location-props/location-props-region-selection-edit';\nimport PropContractOptionComponent from './location-props/location-props-contract-option';\nimport UserPropertySocNetComponent from './user-props/user-props-socialNetworking';\nimport UserPropertyPhotoComponent from './user-props/user-props-photo';\n\nconst objectTypeId = 2;\n\nexport default class LocationComponent extends Component {\n getItemValue(item) {\n if (!item) {return;}\n let itemValue = item.value;\n let selectOptions;\n switch (item.fieldType) {\n case null:\n case 'CALL':\n case 'Text':\n return itemValue;\n case 'Phones':\n case 'html':\n return item.value\n ? item.value.split('
').map(p => (\n \n {p}\n
\n
\n ))\n : '';\n case 'DateStr':\n return item.value ? new Date(item.value).toDateString() : null;\n case 'Int':\n if (itemValue === '-1' && item.fieldTypeDetail) {itemValue = 'Not Available';}\n return itemValue;\n case 'Selection':\n if (item.fieldTypeDetail && item.fieldTypeDetail.startsWith('[')) {\n selectOptions = JSON.parse(item.fieldTypeDetail);\n } else {\n selectOptions = lookup_en[item.fieldTypeDetail];\n }\n selectOptions = selectOptions || [];\n const selectedOption = selectOptions.find((p) => {\n return isStringEqual(p.id, itemValue);\n });\n\n itemValue = selectedOption ? selectedOption.value : item.value;\n return itemValue;\n case 'RegionSelection':\n selectOptions = lookup_en[item.fieldTypeDetail];\n selectOptions = selectOptions || [];\n const regionSelectedOption = selectOptions.find((p) => {\n return isStringEqual(p.id, itemValue);\n });\n\n itemValue = regionSelectedOption ? regionSelectedOption.value : item.value;\n if (itemValue.indexOf('-') >= 0) {\n itemValue = itemValue.substr(0, itemValue.indexOf('-'));\n }\n\n return itemValue;\n\n case 'ContractOption':\n selectOptions = lookup_en[item.fieldTypeDetail];\n selectOptions = selectOptions || [];\n const contractOption = selectOptions.find((p) => {\n return isStringEqual(p.id, itemValue);\n });\n\n itemValue = contractOption ? contractOption.value : item.value;\n\n return itemValue;\n case 'Award':\n return itemValue.replace(' >> ', ' ');\n case 'Regions':\n return itemValue.map(p => (\n \n {p.regionsServicedName}\n
\n
\n ));\n default:\n return itemValue;\n }\n }\n\n Item = ({ item, editing }) => {\n if (!item || !item.displayOrder) {return;}\n return (\n \n \n
{this.getItemValue(item)}
\n
\n {editing ? : ''}\n
\n \n );\n };\n\n List = ({ state }) => (\n \n \n {state.props\n .filter(p => p.fieldType === 'Group' || p.dispName.toUpperCase().indexOf(state.filter.toUpperCase()) >= 0)\n .map((item) => {\n return (\n {\n if (item.fieldType !== 'Group') {this.run('edit-prop', item, e);}\n }}>\n \n \n );\n })}\n \n
\n );\n\n Photo = ({ state }) => (\n
\n this.run('image-failed')}\n onclick={e => this.run('edit-photo', e)}\n />\n
\n );\n\n state = { filter: '', editingItem: null, props:[] };\n\n // prettier-ignore\n view = (state) => {\n if (!state || !state.location || !state.props) {return;}\n return (\n
\n
\n \n
\n
\n
\n
\n \n
\n \n
\n );\n }\n\n update = {\n refresh: async (state, locationId) => {\n state.imageFailed = false;\n const location = await objApi.getProperties(locationId);\n const hasFullAccess = location.hasFullAccess;\n\n state.props = location.locationDetail;\n state.props.sort(function (a, b) {\n return a.orderA2Z - b.orderA2Z;\n });\n state.props.forEach(item => (item.displayOrder = item.orderA2Z));\n\n return { ...state, locationId, location, editingItem: null, hasFullAccess };\n },\n\n 'edit-prop': (state, item, e) => {\n if (!item.editable) {return;}\n e.preventDefault();\n state.editingItem = item;\n\n const panelId = 'prop-edit-' + item.fieldType;\n\n let editorState = {\n item,\n panelId,\n caller: this,\n cancel: 'edit-prop-cancel',\n save: 'save-prop',\n delete: 'delete-prop',\n addressId: 0,\n objectTypeId: 0,\n phoneId: 0,\n extra:{},\n };\n\n let comp;\n switch (item.fieldType) {\n case 'Address':\n comp = PropEditorAddressComponent;\n editorState = { ...editorState, addressId: state.locationId, objectTypeId };\n break;\n case 'Phones':\n comp = PropEditorPhoneComponent;\n editorState = { ...editorState, phoneId: state.locationId, objectTypeId };\n break;\n case 'Selection':\n comp = PropEditorSelectionComponent;\n break;\n case 'RegionSelection':\n comp = PropEditorRegionSelectionComponent;\n break;\n case 'ContractOption':\n comp = PropContractOptionComponent;\n break;\n case 'DateStr':\n comp = PropEditorDateComponent;\n break;\n case 'Regions':\n comp = PropEditorRegionsComponent;\n const provCt = state.location.locationDetail.find(p => p.fieldName === 'ProvStateCt').value;\n const prov = lookup_en.ProvStateCt.find(p => p.id === provCt).value;\n editorState.extra = { province: prov };\n break;\n case 'SocNet':\n comp = UserPropertySocNetComponent;\n break;\n case 'Photo':\n comp = UserPropertyPhotoComponent;\n break;\n default:\n comp = PropEditorTextComponent;\n break;\n }\n\n app.run('#add-panel', { id: panelId, title: item.dispName, Component: comp, state: editorState, level: 4 });\n },\n\n 'save-prop': async (state, item, panelId, newVal) => {\n try{\n if (panelId === 'prop-edit-Address' || panelId === 'prop-edit-Phones') {\n this.run('edit-prop-cancel', panelId);\n this.run('refresh', state.locationId);\n } else if (panelId === 'prop-edit-Regions') {\n if (await objApi.postLocationAreas(state.locationId, newVal)) {\n //state.locationId = newVal;\n this.run('edit-prop-cancel', panelId);\n showSaveStatusMessage('location');\n this.run('refresh', state.locationId);\n }\n } else {\n console.log(newVal);\n const result = await objApi.upsertProperty(state.locationId, { prop: item, newValue: newVal });\n showSaveStatusMessage((result===1)?'location':null);\n if (result) {\n item.value = newVal;\n this.run('edit-prop-cancel', panelId);\n }\n }\n }catch{showSaveStatusMessage();}\n return state;\n },\n\n 'delete-prop': async (state, item, panelId) => {\n try {\n if(\n (item.fieldType==='SocNet') ||\n (item.fieldType==='Photo')\n ) {\n const results = await objApi.deleteProperty(state.locationId, item);\n showSaveStatusMessage((results===1)?'location':null);\n this.run('refresh', state.locationId);\n }\n this.run('edit-prop-cancel', panelId);\n } catch {\n showSaveStatusMessage();\n }\n },\n\n 'edit-prop-cancel': (state, id) => {\n state.editingItem = null;\n app.run('#clear-panel', id);\n return state;\n },\n\n 'image-failed': (state) => {\n if (!state.imageFailed) {return { ...state, imageFailed: true };}\n },\n\n 'edit-photo': (state, e) => {\n console.log('In edit-photo......');\n const item = { ...this.getItem('Photo'), value: e.target.src };\n console.log(item);\n this.run('edit-prop', item, e);\n },\n\n 'start-jumpSync': async (state) => {\n await objApi.initiateForceSync(state.locationId);\n showSaveStatusMessage('Jump Sync');\n },\n };\n\n getItem = fieldName => this.state.props.find(p => p.fieldName === fieldName);\n\n mounted = ({ state }) => {\n this.run('refresh', state.locationId);\n };\n}\n", "import app, { Component } from 'apprun';\nimport { serializeObject, companies, locations } from './api';\nimport { isValid, addOptions, showSaveStatusMessage } from './utils';\n\nexport default class LocationNewComponent extends Component {\n state = {};\n view = (state) =>{\n if (!state || !state.brokerageOptions) {return;}\n return
\n
\n
\n
\n Name: \n
\n
\n
\n Location Type:  \n \n
\n
\n
Company:  \n \n
\n
\n
\n Open Date: \n
\n
\n
\n \n
\n \n \n
\n
;\n }\n\n update = {\n\n save: async () => {\n try {\n const formName = 'locNewForm';\n if (!isValid(formName)) {return;}\n const formData = serializeObject(document.getElementById(formName));\n const result = await locations.post(0, formData);\n showSaveStatusMessage('location');\n app.run('#location', result);\n } catch {\n showSaveStatusMessage();\n }\n },\n\n cancel: () => {\n app.run('#clear-panel', 'locationNew');\n }\n };\n\n mounted = async ({ companyId }, _, state) => {\n if (!state.brokerageOptions) {\n state.brokerageOptions = await companies.getAllCompanies();\n }\n return { ...state, companyId };\n }\n}\n", "import app, { Component } from 'apprun';\nimport { serializeObject, companies, locations, users } from './api';\nimport { isValid, showSaveStatusMessage, validateEmail, lookup_en } from './utils';\n\nexport default class UserNewComponent extends Component {\n state = {\n brokerageOptions: [],\n locationOptions: [],\n picker: null,\n isAgent: false,\n dispAffilDetail: false,\n availabilityMessage: '',\n };\n\n view = (state) => {\n if (!state) { return; }\n return
\n
\n
\n
\n Personnel Type:  \n \n
\n
\n
\n Language:\n \n
\n
\n
\n User Name:\n
\n \n @\n \n
\n
\n this.run('checkAvailability')}> Check Availability\n
{state.availabilityMessage}
\n
\n
\n Select Password: \n
\n
\n
\n First Name: \n
\n
\n
\n Last Name: \n
\n
\n {\n state.isAgent\n ?\n
\n Name on Tag: \n
\n
\n :\n
\n }\n
\n Title:\n \n
\n
\n\n
\n Company:\n \n
\n
\n
\n Location:\n \n
\n
\n {\n state.isAgent\n ?\n
\n Sales Kit Required:\n \n
\n
\n :\n null\n }\n
\n Recruitment Source:\n \n
\n
\n
\n Previous Affiliation:\n \n
\n
\n {\n state.dispAffilDetail\n ?\n
\n Previous Affiliation details: \n
\n
\n :\n null\n }\n \n
\n Start Date: \n
\n
\n
\n \n
\n  \n \n
\n
;\n }\n\n update = {\n refresh: async (state, companyId) => {\n state.companyId = companyId ? companyId : 0;\n if (state.brokerageOptions.length === 0) {\n state.brokerageOptions = await companies.getOpenCompanies();\n }\n this.run('companySelectionChanged', state.companyId);\n return state;\n },\n\n empTypeChanged: (state, idx) => {\n const isAgent = idx === '1' || idx === '8';\n if (isAgent !== state.isAgent) { state.picker = null; }\n return { ...state, isAgent };\n },\n\n prevAffiliationChanged: (state, idx) => {\n //console.log('in prevAffiliationChanged ...');\n const dispAffilDetail = idx === '354';\n if (dispAffilDetail !== state.dispAffilDetail) { state.picker = null; }\n return { ...state, dispAffilDetail };\n },\n\n companySelectionChanged: async (state, idx) => {\n state.companyId = idx;\n state.locationOptions = state.companyId === 0 ? [] : await locations.getLocationsByCompanyID(state.companyId);\n return state;\n },\n\n checkAvailability: async (state) => {\n const userName = (document.getElementById('username') as HTMLInputElement).value.trim();\n const userDomain = (document.getElementById('domain') as HTMLInputElement).value.trim();\n\n if (userName.length === 0) {\n state.availabilityMessage = 'Please provide Username';\n } else if (!validateEmail(userName + '@royallepage.ca')) {\n state.availabilityMessage = 'Invalid Username';\n } else {\n const emailAddress = userName + '@' + userDomain;\n const result = await users.checkEmailAvailability(emailAddress);\n state.availabilityMessage = emailAddress + ' is ' + (result ? 'available' : 'unavailable');\n }\n\n return state;\n },\n\n save: async (state) => {\n try {\n const formName = 'userNewForm';\n\n if (!isValid(formName)) { return; }\n const formData = serializeObject(document.getElementById(formName));\n formData['location'] = { id: formData['location'] };\n\n const emailAddress = formData['username'] + '@' + formData['domain'];\n const isAvailable = await users.checkEmailAvailability(emailAddress);\n if (isAvailable) {\n const result = await users.Post(formData);\n showSaveStatusMessage('user');\n app.run('#user', result.id, result.lastName + ', ' + result.firstName);\n } else {\n state.availabilityMessage = emailAddress + ' is unavailable';\n }\n } catch {\n showSaveStatusMessage();\n }\n },\n cancel: (state) => {\n app.run('#clear-panel', state.panelId);\n },\n };\n\n mounted = ({ state }) => {\n this.run('refresh', state.companyId);\n };\n}\n", "import { app, Component } from 'apprun';\nimport CompanyList from './company-list';\nimport LocationList from './location-list';\nimport TeamList from './team-list';\nimport UserList from './user-list';\nimport GoogleDeleteList from './google-delete-list';\nimport SettingsComponent from './settings';\nimport OnboardingComponent from './onboarding';\nimport User from './user';\nimport { auth } from './api';\nimport { getLookup } from './utils';\n\nimport Company from './company';\nimport CompanyNew from './company-new';\nimport Location from './location';\nimport LocationNew from './location-new';\nimport UserNew from './user-new';\n\nconst Panel = ({ id, title, Comp, state }) =>
\n
\n
\n

{title}

\n
    \n
  • \n {\n e.preventDefault();\n app.run('#clear-panel', id);\n }}>\n \n \n
  • \n
\n
\n
\n
{Comp && }
\n
\n
;\n\nexport default class ManageCompanyComponent extends Component {\n state = {\n panels: {},\n };\n\n view = (state) => {\n const panels = Object.keys(state.panels).map(key => state.panels[key]);\n return (\n
\n {panels.map(p => (\n \n ))}\n
\n );\n };\n\n rendered = () => {\n setTimeout(() => {\n const el = document.querySelector('.panel-container');\n el?.lastElementChild?.scrollIntoView();\n });\n };\n\n update = {\n '#': () => {\n if (!auth.current()) {\n window.location.href = '/#login';\n return;\n }\n app.run('#company-list');\n },\n\n '#company-list': () => {\n app.run('#add-panel', { id: 'Company-List', title: 'RLP Companies', Component: CompanyList, level: 1 });\n },\n\n '#company': (_, companyId, title) => {\n app.run('#add-panel', {\n id: companyId ? 'company' : 'compNew',\n title,\n Component: companyId ? Company : CompanyNew,\n level: 2,\n state: { companyId, caller: this }\n });\n },\n\n '#location-list': (_, companyId) => {\n app.run('#add-panel', {\n id: 'location-list',\n title: 'Locations',\n Component: LocationList,\n level: 1,\n state: { companyId },\n });\n },\n\n '#location': (_, locationId, locationName, companyId) => {\n app.run('#add-panel', {\n id: locationId ? 'location' : 'locationNew',\n title: locationName,\n Component: locationId ? Location : LocationNew,\n state: { locationId, companyId },\n level: 2\n });\n },\n\n '#user-list': (_, companyId, locationId) => {\n app.run('#add-panel', {\n id: 'user-List',\n title: 'Users',\n Component: UserList,\n level: 1,\n state: { companyId, locationId },\n });\n },\n\n '#user-new': () => {\n app.run('#add-panel', {\n id: 'userNew',\n title: 'user [NEW]',\n Component: UserNew,\n level: 2,\n state: { caller: this }\n });\n },\n\n '#onboarding': () => {\n app.run('#add-panel', {\n id: 'onboarding',\n title: 'Onboarding',\n Component: OnboardingComponent,\n level: 1,\n state: {},\n });\n },\n\n '#settings': () => {\n app.run('#add-panel', { id: 'settings', title: 'Settings', Component: SettingsComponent, level: 1, state: {} });\n },\n\n '#google-delete-list': () => {\n app.run('#add-panel', {\n id: 'google-delete-list',\n title: 'Google Delete',\n Component: GoogleDeleteList,\n level: 1,\n state: {},\n });\n },\n\n '#user': (_, personId, name) => {\n if (!personId) {return;}\n app.run('#add-panel', { id: 'user-' + personId, title: name, Component: User, state: { personId }, level: 2 });\n },\n\n '#team-list': (_, companyId) => {\n app.run('#add-panel', {\n id: 'team-list',\n title: 'Teams',\n Component: TeamList,\n level: 1,\n state: { companyId },\n });\n },\n\n '#add-panel': (state, panel) => {\n for (const p in state.panels) {\n if (state.panels[p].level >= panel.level) {\n delete state.panels[p];\n }\n }\n state.panels[panel.id] = panel;\n return state;\n },\n '#clear-panel': (state, id) => {\n delete state.panels[id];\n return state;\n },\n };\n}\n\ngetLookup();\nnew ManageCompanyComponent().start('rlp-app');\n", "import { app, ROUTER_EVENT } from 'apprun';\ndeclare let $;\n\napp.on(ROUTER_EVENT, (route) => {\n const menus = document.querySelectorAll('.side-menu li');\n for (let i = 0; i < menus.length; ++i) {menus[i].classList.remove('active');}\n const item = document.querySelector(`[href='${route}']`);\n item && item.parentElement.classList.add('active');\n});\n\napp.on('set-page-title', title => (document.getElementById('page-title').innerText = title));\n\nconst $toast = $('#toast');\nlet toastid;\n\napp.on('show-message', (msg, duration = 5000) => {\n if (toastid) {\n clearTimeout(toastid);\n $toast.html(`${$toast.html()} ${msg ? `
${msg}` : ''}`);\n toastid = null;\n } else if (msg) {\n $toast.html(msg).slideToggle();\n } else {\n $toast.slideToggle();\n }\n toastid = setTimeout(() => {\n $toast.slideToggle();\n toastid = null;\n }, duration);\n});\n\n// app.on('clear-message', () => {\n// $toast.hide();\n// $toast.html('');\n// if (toastid) {\n// clearTimeout(toastid);\n// toastid = null;\n// }\n// });\n\nimport './login';\nimport './rlp-directory';\n"], "mappings": "ssBAAA,oBACA,AACA,AACA,AACA,AAEC,AAAC,UAAU,EAAQ,GAChB,MAAO,KAAY,UAAY,MAAO,KAAW,YAAc,GAAO,QAAU,IAChF,MAAO,SAAW,YAAc,OAAO,IAAM,OAAO,GACpD,EAAO,OAAS,MAClB,GAAO,WAAc,aAEnB,GAAI,GAEJ,aACI,MAAO,GAAa,MAAM,KAAM,WAKpC,WAAyB,GACrB,EAAe,EAGnB,WAAiB,GACb,MACI,aAAiB,QACjB,OAAO,UAAU,SAAS,KAAK,KAAW,iBAIlD,WAAkB,GAGd,MACI,IAAS,MACT,OAAO,UAAU,SAAS,KAAK,KAAW,kBAIlD,WAAoB,EAAG,GACnB,MAAO,QAAO,UAAU,eAAe,KAAK,EAAG,GAGnD,WAAuB,GACnB,GAAI,OAAO,oBACP,MAAO,QAAO,oBAAoB,GAAK,SAAW,EAElD,GAAI,GACJ,IAAK,IAAK,GACN,GAAI,EAAW,EAAK,GAChB,MAAO,GAGf,MAAO,GAIf,WAAqB,GACjB,MAAO,KAAU,OAGrB,WAAkB,GACd,MACI,OAAO,IAAU,UACjB,OAAO,UAAU,SAAS,KAAK,KAAW,kBAIlD,WAAgB,GACZ,MACI,aAAiB,OACjB,OAAO,UAAU,SAAS,KAAK,KAAW,gBAIlD,YAAa,EAAK,GACd,GAAI,GAAM,GACN,EACJ,IAAK,EAAI,EAAG,EAAI,EAAI,OAAQ,EAAE,EAC1B,EAAI,KAAK,EAAG,EAAI,GAAI,IAExB,MAAO,GAGX,WAAgB,EAAG,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