├── Procfile
├── functions
├── .gitignore
├── package.json
└── index.js
├── image
├── qr.png
└── architecture.png
├── public
├── js
│ ├── module.js
│ └── login_ctl.js
└── bower_components
│ └── moment
│ ├── src
│ ├── lib
│ │ ├── utils
│ │ │ ├── mod.js
│ │ │ ├── is-undefined.js
│ │ │ ├── has-own-prop.js
│ │ │ ├── is-array.js
│ │ │ ├── is-date.js
│ │ │ ├── is-number.js
│ │ │ ├── is-function.js
│ │ │ ├── map.js
│ │ │ ├── abs-ceil.js
│ │ │ ├── abs-round.js
│ │ │ ├── abs-floor.js
│ │ │ ├── is-object.js
│ │ │ ├── defaults.js
│ │ │ ├── to-int.js
│ │ │ ├── zero-fill.js
│ │ │ ├── hooks.js
│ │ │ ├── is-object-empty.js
│ │ │ ├── keys.js
│ │ │ ├── index-of.js
│ │ │ ├── extend.js
│ │ │ ├── some.js
│ │ │ ├── compare-arrays.js
│ │ │ └── deprecate.js
│ │ ├── locale
│ │ │ ├── pre-post-format.js
│ │ │ ├── constructor.js
│ │ │ ├── invalid.js
│ │ │ ├── ordinal.js
│ │ │ ├── calendar.js
│ │ │ ├── en.js
│ │ │ ├── formats.js
│ │ │ ├── relative.js
│ │ │ ├── locale.js
│ │ │ ├── base-config.js
│ │ │ └── set.js
│ │ ├── moment
│ │ │ ├── now.js
│ │ │ ├── clone.js
│ │ │ ├── creation-data.js
│ │ │ ├── valid.js
│ │ │ ├── to.js
│ │ │ ├── from.js
│ │ │ ├── moment.js
│ │ │ ├── to-type.js
│ │ │ ├── locale.js
│ │ │ ├── calendar.js
│ │ │ ├── start-end-of.js
│ │ │ ├── add-subtract.js
│ │ │ ├── get-set.js
│ │ │ ├── min-max.js
│ │ │ └── diff.js
│ │ ├── duration
│ │ │ ├── clone.js
│ │ │ ├── duration.js
│ │ │ ├── abs.js
│ │ │ ├── add-subtract.js
│ │ │ ├── get.js
│ │ │ ├── valid.js
│ │ │ ├── constructor.js
│ │ │ ├── prototype.js
│ │ │ ├── bubble.js
│ │ │ └── as.js
│ │ ├── create
│ │ │ ├── local.js
│ │ │ ├── utc.js
│ │ │ ├── from-object.js
│ │ │ ├── date-from-array.js
│ │ │ ├── parsing-flags.js
│ │ │ ├── check-overflow.js
│ │ │ ├── valid.js
│ │ │ └── from-string-and-array.js
│ │ ├── units
│ │ │ ├── constants.js
│ │ │ ├── timezone.js
│ │ │ ├── priorities.js
│ │ │ ├── units.js
│ │ │ ├── timestamp.js
│ │ │ ├── minute.js
│ │ │ ├── second.js
│ │ │ ├── quarter.js
│ │ │ ├── aliases.js
│ │ │ ├── day-of-year.js
│ │ │ ├── day-of-month.js
│ │ │ ├── week.js
│ │ │ ├── millisecond.js
│ │ │ └── year.js
│ │ └── parse
│ │ │ └── token.js
│ └── locale
│ │ ├── ar-tn.js
│ │ ├── uz.js
│ │ ├── ar-kw.js
│ │ ├── tzm.js
│ │ ├── ar-dz.js
│ │ ├── uz-latn.js
│ │ ├── da.js
│ │ ├── sw.js
│ │ ├── tzm-latn.js
│ │ ├── mt.js
│ │ ├── nn.js
│ │ ├── ar-ma.js
│ │ ├── fo.js
│ │ ├── yo.js
│ │ ├── en-il.js
│ │ ├── tl-ph.js
│ │ ├── bm.js
│ │ ├── en-ca.js
│ │ ├── pt-br.js
│ │ ├── se.js
│ │ ├── nb.js
│ │ ├── cv.js
│ │ ├── lo.js
│ │ ├── th.js
│ │ ├── pt.js
│ │ ├── en-au.js
│ │ ├── en-ie.js
│ │ ├── en-nz.js
│ │ ├── en-gb.js
│ │ ├── eu.js
│ │ ├── mi.js
│ │ ├── sv.js
│ │ ├── si.js
│ │ ├── sq.js
│ │ ├── it.js
│ │ ├── x-pseudo.js
│ │ └── tet.js
│ ├── templates
│ ├── default.js
│ ├── locale-header.js
│ └── test-header.js
│ ├── bower.json
│ ├── .bower.json
│ ├── LICENSE
│ └── locale
│ ├── ar-tn.js
│ ├── uz.js
│ ├── tzm.js
│ ├── ar-kw.js
│ ├── ar-ma.js
│ ├── ar-dz.js
│ ├── tzm-latn.js
│ ├── uz-latn.js
│ ├── mt.js
│ ├── sw.js
│ ├── da.js
│ └── nn.js
├── .bowerrc
├── richmenu
├── control_panel.lbd
└── control_panel.png
├── .gitignore
├── message
├── pay_by_stripe.js
├── select_payment_method.js
├── follow.js
├── faq_is_hot.js
├── faq_search_item.js
├── pay_by_line_pay.js
├── faq_recommendation.js
└── notify_order_ready.js
├── skill
├── check_order_status.js
├── follow.js
├── notify_order_ready.js
├── quit.js
├── robot_response.js
├── notify_paid.js
├── faq_is_hot.js
└── faq_search_item.js
├── views
├── error.ejs
├── close_liff.ejs
├── stripe.ejs
└── login.ejs
├── service
├── translate.js
└── line_event.js
├── .vscode
└── launch.json
├── test-util
└── messenger
│ └── unsupported.js
├── package.json
├── routes
├── console.js
└── liff.js
├── LICENSE
└── test
└── skill
├── faq_is_hot
└── finish.js
└── order
└── begin.js
/Procfile:
--------------------------------------------------------------------------------
1 | web: node index.js
2 |
--------------------------------------------------------------------------------
/functions/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules/
--------------------------------------------------------------------------------
/image/qr.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nkjm/table-order/HEAD/image/qr.png
--------------------------------------------------------------------------------
/public/js/module.js:
--------------------------------------------------------------------------------
1 | angular.module("botex-table-order", ["ngAnimate"]);
2 |
--------------------------------------------------------------------------------
/.bowerrc:
--------------------------------------------------------------------------------
1 | {
2 | "directory": "public/bower_components",
3 | "json": "bower.json"
4 | }
5 |
--------------------------------------------------------------------------------
/image/architecture.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nkjm/table-order/HEAD/image/architecture.png
--------------------------------------------------------------------------------
/richmenu/control_panel.lbd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nkjm/table-order/HEAD/richmenu/control_panel.lbd
--------------------------------------------------------------------------------
/richmenu/control_panel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nkjm/table-order/HEAD/richmenu/control_panel.png
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .env
2 | credential
3 | node_modules
4 | npm-debug.log
5 | deprecated
6 | .firebaserc
7 | firebase.json
8 | dump.rdb
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/utils/mod.js:
--------------------------------------------------------------------------------
1 | export default function mod(n, x) {
2 | return ((n % x) + x) % x;
3 | }
4 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/locale/pre-post-format.js:
--------------------------------------------------------------------------------
1 | export function preParsePostFormat (string) {
2 | return string;
3 | }
4 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/moment/now.js:
--------------------------------------------------------------------------------
1 | export var now = function () {
2 | return Date.now ? Date.now() : +(new Date());
3 | };
4 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/utils/is-undefined.js:
--------------------------------------------------------------------------------
1 | export default function isUndefined(input) {
2 | return input === void 0;
3 | }
4 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/locale/constructor.js:
--------------------------------------------------------------------------------
1 | export function Locale(config) {
2 | if (config != null) {
3 | this.set(config);
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/moment/clone.js:
--------------------------------------------------------------------------------
1 | import { Moment } from './constructor';
2 |
3 | export function clone () {
4 | return new Moment(this);
5 | }
6 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/utils/has-own-prop.js:
--------------------------------------------------------------------------------
1 | export default function hasOwnProp(a, b) {
2 | return Object.prototype.hasOwnProperty.call(a, b);
3 | }
4 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/duration/clone.js:
--------------------------------------------------------------------------------
1 | import { createDuration } from './create';
2 |
3 | export function clone () {
4 | return createDuration(this);
5 | }
6 |
7 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/locale/invalid.js:
--------------------------------------------------------------------------------
1 | export var defaultInvalidDate = 'Invalid date';
2 |
3 | export function invalidDate () {
4 | return this._invalidDate;
5 | }
6 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/utils/is-array.js:
--------------------------------------------------------------------------------
1 | export default function isArray(input) {
2 | return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]';
3 | }
4 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/utils/is-date.js:
--------------------------------------------------------------------------------
1 | export default function isDate(input) {
2 | return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]';
3 | }
4 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/utils/is-number.js:
--------------------------------------------------------------------------------
1 | export default function isNumber(input) {
2 | return typeof input === 'number' || Object.prototype.toString.call(input) === '[object Number]';
3 | }
4 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/utils/is-function.js:
--------------------------------------------------------------------------------
1 | export default function isFunction(input) {
2 | return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]';
3 | }
4 |
--------------------------------------------------------------------------------
/message/pay_by_stripe.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | const Message = require("./message");
4 |
5 | module.exports = class MessagePayByStripe extends Message {
6 | constructor(translator){
7 | super(translator);
8 | }
9 | }
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/utils/map.js:
--------------------------------------------------------------------------------
1 | export default function map(arr, fn) {
2 | var res = [], i;
3 | for (i = 0; i < arr.length; ++i) {
4 | res.push(fn(arr[i], i));
5 | }
6 | return res;
7 | }
8 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/utils/abs-ceil.js:
--------------------------------------------------------------------------------
1 | export default function absCeil (number) {
2 | if (number < 0) {
3 | return Math.floor(number);
4 | } else {
5 | return Math.ceil(number);
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/message/select_payment_method.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | const Message = require("./message");
4 |
5 | module.exports = class MessageSelectPaymentMethod extends Message {
6 | constructor(translator){
7 | super(translator);
8 | }
9 | }
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/utils/abs-round.js:
--------------------------------------------------------------------------------
1 | export default function absRound (number) {
2 | if (number < 0) {
3 | return Math.round(-1 * number) * -1;
4 | } else {
5 | return Math.round(number);
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/create/local.js:
--------------------------------------------------------------------------------
1 | import { createLocalOrUTC } from './from-anything';
2 |
3 | export function createLocal (input, format, locale, strict) {
4 | return createLocalOrUTC(input, format, locale, strict, false);
5 | }
6 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/create/utc.js:
--------------------------------------------------------------------------------
1 | import { createLocalOrUTC } from './from-anything';
2 |
3 | export function createUTC (input, format, locale, strict) {
4 | return createLocalOrUTC(input, format, locale, strict, true).utc();
5 | }
6 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/locale/ordinal.js:
--------------------------------------------------------------------------------
1 | export var defaultOrdinal = '%d';
2 | export var defaultDayOfMonthOrdinalParse = /\d{1,2}/;
3 |
4 | export function ordinal (number) {
5 | return this._ordinal.replace('%d', number);
6 | }
7 |
8 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/utils/abs-floor.js:
--------------------------------------------------------------------------------
1 | export default function absFloor (number) {
2 | if (number < 0) {
3 | // -0 -> 0
4 | return Math.ceil(number) || 0;
5 | } else {
6 | return Math.floor(number);
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/message/follow.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | const debug = require("debug")("bot-express:message");
4 | const Message = require("./message.js");
5 |
6 | module.exports = class MessageFollow extends Message {
7 | constructor(translation){
8 | super(translation);
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/moment/creation-data.js:
--------------------------------------------------------------------------------
1 | export function creationData() {
2 | return {
3 | input: this._i,
4 | format: this._f,
5 | locale: this._locale,
6 | isUTC: this._isUTC,
7 | strict: this._strict
8 | };
9 | }
10 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/utils/is-object.js:
--------------------------------------------------------------------------------
1 | export default function isObject(input) {
2 | // IE8 will treat undefined and null as object if it wasn't for
3 | // input != null
4 | return input != null && Object.prototype.toString.call(input) === '[object Object]';
5 | }
6 |
--------------------------------------------------------------------------------
/message/faq_is_hot.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | const debug = require("debug")("bot-express:message");
4 | const Message = require("./message.js");
5 |
6 | module.exports = class MessageFaqIsHot extends Message {
7 | constructor(translation){
8 | super(translation);
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/units/constants.js:
--------------------------------------------------------------------------------
1 | export var YEAR = 0;
2 | export var MONTH = 1;
3 | export var DATE = 2;
4 | export var HOUR = 3;
5 | export var MINUTE = 4;
6 | export var SECOND = 5;
7 | export var MILLISECOND = 6;
8 | export var WEEK = 7;
9 | export var WEEKDAY = 8;
10 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/utils/defaults.js:
--------------------------------------------------------------------------------
1 | // Pick the first defined of two or three arguments.
2 | export default function defaults(a, b, c) {
3 | if (a != null) {
4 | return a;
5 | }
6 | if (b != null) {
7 | return b;
8 | }
9 | return c;
10 | }
11 |
--------------------------------------------------------------------------------
/message/faq_search_item.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | const debug = require("debug")("bot-express:message");
4 | const Message = require("./message.js");
5 |
6 | module.exports = class MessageFaqSearchItem extends Message {
7 | constructor(translation){
8 | super(translation);
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/message/pay_by_line_pay.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | const debug = require("debug")("bot-express:message");
4 | const Message = require("./message.js");
5 |
6 | module.exports = class MessagePayByLinePay extends Message {
7 | constructor(translation){
8 | super(translation);
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/message/faq_recommendation.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | const debug = require("debug")("bot-express:message");
4 | const Message = require("./message.js");
5 |
6 | module.exports = class MessageFaqRecommendation extends Message {
7 | constructor(translation){
8 | super(translation);
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/public/bower_components/moment/templates/default.js:
--------------------------------------------------------------------------------
1 | ;(function (global, factory) {
2 | typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
3 | typeof define === 'function' && define.amd ? define(factory) :
4 | global.moment = factory()
5 | }(this, (function () { 'use strict';
6 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/utils/to-int.js:
--------------------------------------------------------------------------------
1 | import absFloor from './abs-floor';
2 |
3 | export default function toInt(argumentForCoercion) {
4 | var coercedNumber = +argumentForCoercion,
5 | value = 0;
6 |
7 | if (coercedNumber !== 0 && isFinite(coercedNumber)) {
8 | value = absFloor(coercedNumber);
9 | }
10 |
11 | return value;
12 | }
13 |
--------------------------------------------------------------------------------
/public/bower_components/moment/templates/locale-header.js:
--------------------------------------------------------------------------------
1 | ;(function (global, factory) {
2 | typeof exports === 'object' && typeof module !== 'undefined'
3 | && typeof require === 'function' ? factory(require('../moment')) :
4 | typeof define === 'function' && define.amd ? define(['../moment'], factory) :
5 | factory(global.moment)
6 | }(this, (function (moment) { 'use strict';
7 |
--------------------------------------------------------------------------------
/public/bower_components/moment/templates/test-header.js:
--------------------------------------------------------------------------------
1 | ;(function (global, factory) {
2 | typeof exports === 'object' && typeof module !== 'undefined'
3 | && typeof require === 'function' ? factory(require('../../moment')) :
4 | typeof define === 'function' && define.amd ? define(['../../moment'], factory) :
5 | factory(global.moment)
6 | }(this, (function (moment) { 'use strict';
7 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/utils/zero-fill.js:
--------------------------------------------------------------------------------
1 | export default function zeroFill(number, targetLength, forceSign) {
2 | var absNumber = '' + Math.abs(number),
3 | zerosToFill = targetLength - absNumber.length,
4 | sign = number >= 0;
5 | return (sign ? (forceSign ? '+' : '') : '-') +
6 | Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber;
7 | }
8 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/utils/hooks.js:
--------------------------------------------------------------------------------
1 | export { hooks, setHookCallback };
2 |
3 | var hookCallback;
4 |
5 | function hooks () {
6 | return hookCallback.apply(null, arguments);
7 | }
8 |
9 | // This is done to register the method called with moment()
10 | // without creating circular dependencies.
11 | function setHookCallback (callback) {
12 | hookCallback = callback;
13 | }
14 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/utils/is-object-empty.js:
--------------------------------------------------------------------------------
1 | export default function isObjectEmpty(obj) {
2 | if (Object.getOwnPropertyNames) {
3 | return (Object.getOwnPropertyNames(obj).length === 0);
4 | } else {
5 | var k;
6 | for (k in obj) {
7 | if (obj.hasOwnProperty(k)) {
8 | return false;
9 | }
10 | }
11 | return true;
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/units/timezone.js:
--------------------------------------------------------------------------------
1 | import { addFormatToken } from '../format/format';
2 |
3 | // FORMATTING
4 |
5 | addFormatToken('z', 0, 0, 'zoneAbbr');
6 | addFormatToken('zz', 0, 0, 'zoneName');
7 |
8 | // MOMENTS
9 |
10 | export function getZoneAbbr () {
11 | return this._isUTC ? 'UTC' : '';
12 | }
13 |
14 | export function getZoneName () {
15 | return this._isUTC ? 'Coordinated Universal Time' : '';
16 | }
17 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/duration/duration.js:
--------------------------------------------------------------------------------
1 | // Side effect imports
2 | import './prototype';
3 |
4 | import { createDuration } from './create';
5 | import { isDuration } from './constructor';
6 | import {
7 | getSetRelativeTimeRounding,
8 | getSetRelativeTimeThreshold
9 | } from './humanize';
10 |
11 | export {
12 | createDuration,
13 | isDuration,
14 | getSetRelativeTimeRounding,
15 | getSetRelativeTimeThreshold
16 | };
17 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/utils/keys.js:
--------------------------------------------------------------------------------
1 | import hasOwnProp from './has-own-prop';
2 |
3 | var keys;
4 |
5 | if (Object.keys) {
6 | keys = Object.keys;
7 | } else {
8 | keys = function (obj) {
9 | var i, res = [];
10 | for (i in obj) {
11 | if (hasOwnProp(obj, i)) {
12 | res.push(i);
13 | }
14 | }
15 | return res;
16 | };
17 | }
18 |
19 | export { keys as default };
20 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/utils/index-of.js:
--------------------------------------------------------------------------------
1 | var indexOf;
2 |
3 | if (Array.prototype.indexOf) {
4 | indexOf = Array.prototype.indexOf;
5 | } else {
6 | indexOf = function (o) {
7 | // I know
8 | var i;
9 | for (i = 0; i < this.length; ++i) {
10 | if (this[i] === o) {
11 | return i;
12 | }
13 | }
14 | return -1;
15 | };
16 | }
17 |
18 | export { indexOf as default };
19 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/moment/valid.js:
--------------------------------------------------------------------------------
1 | import { isValid as _isValid } from '../create/valid';
2 | import extend from '../utils/extend';
3 | import getParsingFlags from '../create/parsing-flags';
4 |
5 | export function isValid () {
6 | return _isValid(this);
7 | }
8 |
9 | export function parsingFlags () {
10 | return extend({}, getParsingFlags(this));
11 | }
12 |
13 | export function invalidAt () {
14 | return getParsingFlags(this).overflow;
15 | }
16 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/utils/extend.js:
--------------------------------------------------------------------------------
1 | import hasOwnProp from './has-own-prop';
2 |
3 | export default function extend(a, b) {
4 | for (var i in b) {
5 | if (hasOwnProp(b, i)) {
6 | a[i] = b[i];
7 | }
8 | }
9 |
10 | if (hasOwnProp(b, 'toString')) {
11 | a.toString = b.toString;
12 | }
13 |
14 | if (hasOwnProp(b, 'valueOf')) {
15 | a.valueOf = b.valueOf;
16 | }
17 |
18 | return a;
19 | }
20 |
--------------------------------------------------------------------------------
/skill/check_order_status.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | const debug = require("debug")("bot-express:skill");
4 |
5 | module.exports = class SkillCheckOrderStatus {
6 | constructor(){
7 | this.clear_context_on_finish = true;
8 | }
9 |
10 | async finish(bot, event, context){
11 | let message = {
12 | type: "text",
13 | text: await bot.t("it_will_be_ready_in_2_mins")
14 | }
15 | await bot.reply(message);
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/units/priorities.js:
--------------------------------------------------------------------------------
1 | var priorities = {};
2 |
3 | export function addUnitPriority(unit, priority) {
4 | priorities[unit] = priority;
5 | }
6 |
7 | export function getPrioritizedUnits(unitsObj) {
8 | var units = [];
9 | for (var u in unitsObj) {
10 | units.push({unit: u, priority: priorities[u]});
11 | }
12 | units.sort(function (a, b) {
13 | return a.priority - b.priority;
14 | });
15 | return units;
16 | }
17 |
--------------------------------------------------------------------------------
/skill/follow.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | const debug = require("debug")("bot-express:skill");
4 |
5 | module.exports = class SkillFollow {
6 | constructor(){
7 | this.clear_context_on_finish = true;
8 | }
9 |
10 | async finish(bot, event, context){
11 | // Link richmenu.
12 | if (process.env.BOT_EXPRESS_ENV !== "test"){
13 | await bot.line.sdk.linkRichMenuToUser(bot.extract_sender_id(), process.env.RICHMENU_CONTROL_PANEL);
14 | }
15 | }
16 | }
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/utils/some.js:
--------------------------------------------------------------------------------
1 | var some;
2 | if (Array.prototype.some) {
3 | some = Array.prototype.some;
4 | } else {
5 | some = function (fun) {
6 | var t = Object(this);
7 | var len = t.length >>> 0;
8 |
9 | for (var i = 0; i < len; i++) {
10 | if (i in t && fun.call(this, t[i], i, t)) {
11 | return true;
12 | }
13 | }
14 |
15 | return false;
16 | };
17 | }
18 |
19 | export { some as default };
20 |
--------------------------------------------------------------------------------
/views/error.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Error
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | <%= message %>
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/units/units.js:
--------------------------------------------------------------------------------
1 | // Side effect imports
2 | import './day-of-month';
3 | import './day-of-week';
4 | import './day-of-year';
5 | import './hour';
6 | import './millisecond';
7 | import './minute';
8 | import './month';
9 | import './offset';
10 | import './quarter';
11 | import './second';
12 | import './timestamp';
13 | import './timezone';
14 | import './week-year';
15 | import './week';
16 | import './year';
17 |
18 | import { normalizeUnits } from './aliases';
19 |
20 | export { normalizeUnits };
21 |
--------------------------------------------------------------------------------
/service/translate.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | module.exports = (record_list, lang) => {
4 | const translated_record_list = JSON.parse(JSON.stringify(record_list));
5 |
6 | let i = 0;
7 | for (let record of record_list){
8 | if (record.label[lang]){
9 | translated_record_list[i].label = record.label[lang];
10 | } else {
11 | translated_record_list[i].label = record.label[Object.keys(record.label)[0]];
12 | }
13 | i++;
14 | }
15 |
16 | return translated_record_list;
17 | }
--------------------------------------------------------------------------------
/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | // Use IntelliSense to learn about possible attributes.
3 | // Hover to view descriptions of existing attributes.
4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5 | "version": "0.2.0",
6 | "configurations": [
7 | {
8 | "type": "node",
9 | "request": "launch",
10 | "name": "table-order",
11 | "program": "${workspaceFolder}/index.js",
12 | "console": "externalTerminal"
13 | }
14 | ]
15 | }
16 |
--------------------------------------------------------------------------------
/views/close_liff.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Checkout
5 |
6 |
7 |
8 |
9 |
10 |
11 |
20 |
21 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/locale/calendar.js:
--------------------------------------------------------------------------------
1 | export var defaultCalendar = {
2 | sameDay : '[Today at] LT',
3 | nextDay : '[Tomorrow at] LT',
4 | nextWeek : 'dddd [at] LT',
5 | lastDay : '[Yesterday at] LT',
6 | lastWeek : '[Last] dddd [at] LT',
7 | sameElse : 'L'
8 | };
9 |
10 | import isFunction from '../utils/is-function';
11 |
12 | export function calendar (key, mom, now) {
13 | var output = this._calendar[key] || this._calendar['sameElse'];
14 | return isFunction(output) ? output.call(mom, now) : output;
15 | }
16 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/locale/en.js:
--------------------------------------------------------------------------------
1 | import './prototype';
2 | import { getSetGlobalLocale } from './locales';
3 | import toInt from '../utils/to-int';
4 |
5 | getSetGlobalLocale('en', {
6 | dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
7 | ordinal : function (number) {
8 | var b = number % 10,
9 | output = (toInt(number % 100 / 10) === 1) ? 'th' :
10 | (b === 1) ? 'st' :
11 | (b === 2) ? 'nd' :
12 | (b === 3) ? 'rd' : 'th';
13 | return number + output;
14 | }
15 | });
16 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/create/from-object.js:
--------------------------------------------------------------------------------
1 | import { normalizeObjectUnits } from '../units/aliases';
2 | import { configFromArray } from './from-array';
3 | import map from '../utils/map';
4 |
5 | export function configFromObject(config) {
6 | if (config._d) {
7 | return;
8 | }
9 |
10 | var i = normalizeObjectUnits(config._i);
11 | config._a = map([i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond], function (obj) {
12 | return obj && parseInt(obj, 10);
13 | });
14 |
15 | configFromArray(config);
16 | }
17 |
--------------------------------------------------------------------------------
/public/bower_components/moment/bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "moment",
3 | "license": "MIT",
4 | "main": "moment.js",
5 | "ignore": [
6 | "**/.*",
7 | "benchmarks",
8 | "bower_components",
9 | "meteor",
10 | "node_modules",
11 | "scripts",
12 | "tasks",
13 | "test",
14 | "component.json",
15 | "composer.json",
16 | "CONTRIBUTING.md",
17 | "ender.js",
18 | "Gruntfile.js",
19 | "Moment.js.nuspec",
20 | "package.js",
21 | "package.json",
22 | "ISSUE_TEMPLATE.md",
23 | "typing-tests",
24 | "min/tests.js"
25 | ]
26 | }
27 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/utils/compare-arrays.js:
--------------------------------------------------------------------------------
1 | import toInt from './to-int';
2 |
3 | // compare two arrays, return the number of differences
4 | export default function compareArrays(array1, array2, dontConvert) {
5 | var len = Math.min(array1.length, array2.length),
6 | lengthDiff = Math.abs(array1.length - array2.length),
7 | diffs = 0,
8 | i;
9 | for (i = 0; i < len; i++) {
10 | if ((dontConvert && array1[i] !== array2[i]) ||
11 | (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {
12 | diffs++;
13 | }
14 | }
15 | return diffs + lengthDiff;
16 | }
17 |
--------------------------------------------------------------------------------
/skill/notify_order_ready.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | const debug = require("debug")("bot-express:skill");
4 |
5 | /**
6 | * Following parameters need to be included.
7 | * {String} order
8 | */
9 | module.exports = class SkillNotifyOrderReady {
10 | constructor(){
11 | this.clear_context_on_finish = true;
12 | }
13 |
14 | async finish(bot, event, context){
15 | if (!context.heard.order){
16 | throw new Error(`Order not found.`);
17 | }
18 |
19 | let message = await bot.m.order_ready({
20 | order: context.heard.order
21 | });
22 | await bot.reply(message);
23 | }
24 | }
--------------------------------------------------------------------------------
/skill/quit.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | const debug = require("debug")("bot-express:skill");
4 |
5 | module.exports = class SkillQuit {
6 | constructor(){
7 | this.clear_context_on_finish = true;
8 | }
9 |
10 | async finish(bot, event, context){
11 | // Link richmenu.
12 | if (process.env.BOT_EXPRESS_ENV !== "test"){
13 | await bot.line.sdk.linkRichMenuToUser(bot.extract_sender_id(), process.env.RICHMENU_CONTROL_PANEL);
14 | }
15 |
16 | await bot.reply({
17 | type: "text",
18 | text: `${await bot.t("certainly")} ${await bot.t("quit_order")}`
19 | })
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/duration/abs.js:
--------------------------------------------------------------------------------
1 | var mathAbs = Math.abs;
2 |
3 | export function abs () {
4 | var data = this._data;
5 |
6 | this._milliseconds = mathAbs(this._milliseconds);
7 | this._days = mathAbs(this._days);
8 | this._months = mathAbs(this._months);
9 |
10 | data.milliseconds = mathAbs(data.milliseconds);
11 | data.seconds = mathAbs(data.seconds);
12 | data.minutes = mathAbs(data.minutes);
13 | data.hours = mathAbs(data.hours);
14 | data.months = mathAbs(data.months);
15 | data.years = mathAbs(data.years);
16 |
17 | return this;
18 | }
19 |
--------------------------------------------------------------------------------
/test-util/messenger/unsupported.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | const debug = require("debug")("bot-express:test");
4 |
5 | module.exports = class TestUtilMessengerUnsupported {
6 | /**
7 | @constructor
8 | @param {Object} options
9 | */
10 | constructor(){
11 | }
12 |
13 | create_body(){
14 | let body = {dummy:"dummy"}
15 | return body;
16 | }
17 |
18 | create_header(body){
19 | let header = {"X-Unsupported-Signature": "dummy"};
20 | return header;
21 | }
22 |
23 | create_unsupported_event(source){
24 | let event = {
25 | dummy: "dummy"
26 | }
27 | return event;
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/moment/to.js:
--------------------------------------------------------------------------------
1 | import { createDuration } from '../duration/create';
2 | import { createLocal } from '../create/local';
3 | import { isMoment } from '../moment/constructor';
4 |
5 | export function to (time, withoutSuffix) {
6 | if (this.isValid() &&
7 | ((isMoment(time) && time.isValid()) ||
8 | createLocal(time).isValid())) {
9 | return createDuration({from: this, to: time}).locale(this.locale()).humanize(!withoutSuffix);
10 | } else {
11 | return this.localeData().invalidDate();
12 | }
13 | }
14 |
15 | export function toNow (withoutSuffix) {
16 | return this.to(createLocal(), withoutSuffix);
17 | }
18 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/moment/from.js:
--------------------------------------------------------------------------------
1 | import { createDuration } from '../duration/create';
2 | import { createLocal } from '../create/local';
3 | import { isMoment } from '../moment/constructor';
4 |
5 | export function from (time, withoutSuffix) {
6 | if (this.isValid() &&
7 | ((isMoment(time) && time.isValid()) ||
8 | createLocal(time).isValid())) {
9 | return createDuration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix);
10 | } else {
11 | return this.localeData().invalidDate();
12 | }
13 | }
14 |
15 | export function fromNow (withoutSuffix) {
16 | return this.from(createLocal(), withoutSuffix);
17 | }
18 |
--------------------------------------------------------------------------------
/functions/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "functions",
3 | "description": "Cloud Functions for Firebase",
4 | "scripts": {
5 | "serve": "firebase serve --only functions",
6 | "shell": "firebase functions:shell",
7 | "start": "npm run shell",
8 | "deploy": "firebase deploy --only functions",
9 | "logs": "firebase functions:log"
10 | },
11 | "engines": {
12 | "node": "8"
13 | },
14 | "dependencies": {
15 | "axios": "^0.18.0",
16 | "bluebird": "^3.5.4",
17 | "debug": "^4.1.1",
18 | "firebase-admin": "~7.0.0",
19 | "firebase-functions": "^2.3.0"
20 | },
21 | "devDependencies": {
22 | "firebase-functions-test": "^0.1.6"
23 | },
24 | "private": true
25 | }
26 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/units/timestamp.js:
--------------------------------------------------------------------------------
1 | import { addFormatToken } from '../format/format';
2 | import { addRegexToken, matchTimestamp, matchSigned } from '../parse/regex';
3 | import { addParseToken } from '../parse/token';
4 | import toInt from '../utils/to-int';
5 |
6 | // FORMATTING
7 |
8 | addFormatToken('X', 0, 0, 'unix');
9 | addFormatToken('x', 0, 0, 'valueOf');
10 |
11 | // PARSING
12 |
13 | addRegexToken('x', matchSigned);
14 | addRegexToken('X', matchTimestamp);
15 | addParseToken('X', function (input, array, config) {
16 | config._d = new Date(parseFloat(input, 10) * 1000);
17 | });
18 | addParseToken('x', function (input, array, config) {
19 | config._d = new Date(toInt(input));
20 | });
21 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/locale/formats.js:
--------------------------------------------------------------------------------
1 | export var defaultLongDateFormat = {
2 | LTS : 'h:mm:ss A',
3 | LT : 'h:mm A',
4 | L : 'MM/DD/YYYY',
5 | LL : 'MMMM D, YYYY',
6 | LLL : 'MMMM D, YYYY h:mm A',
7 | LLLL : 'dddd, MMMM D, YYYY h:mm A'
8 | };
9 |
10 | export function longDateFormat (key) {
11 | var format = this._longDateFormat[key],
12 | formatUpper = this._longDateFormat[key.toUpperCase()];
13 |
14 | if (format || !formatUpper) {
15 | return format;
16 | }
17 |
18 | this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) {
19 | return val.slice(1);
20 | });
21 |
22 | return this._longDateFormat[key];
23 | }
24 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/create/date-from-array.js:
--------------------------------------------------------------------------------
1 | export function createDate (y, m, d, h, M, s, ms) {
2 | // can't just apply() to create a date:
3 | // https://stackoverflow.com/q/181348
4 | var date = new Date(y, m, d, h, M, s, ms);
5 |
6 | // the date constructor remaps years 0-99 to 1900-1999
7 | if (y < 100 && y >= 0 && isFinite(date.getFullYear())) {
8 | date.setFullYear(y);
9 | }
10 | return date;
11 | }
12 |
13 | export function createUTCDate (y) {
14 | var date = new Date(Date.UTC.apply(null, arguments));
15 |
16 | // the Date.UTC function remaps years 0-99 to 1900-1999
17 | if (y < 100 && y >= 0 && isFinite(date.getUTCFullYear())) {
18 | date.setUTCFullYear(y);
19 | }
20 | return date;
21 | }
22 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/moment/moment.js:
--------------------------------------------------------------------------------
1 | import { createLocal } from '../create/local';
2 | import { createUTC } from '../create/utc';
3 | import { createInvalid } from '../create/valid';
4 | import { isMoment } from './constructor';
5 | import { min, max } from './min-max';
6 | import { now } from './now';
7 | import momentPrototype from './prototype';
8 |
9 | function createUnix (input) {
10 | return createLocal(input * 1000);
11 | }
12 |
13 | function createInZone () {
14 | return createLocal.apply(null, arguments).parseZone();
15 | }
16 |
17 | export {
18 | now,
19 | min,
20 | max,
21 | isMoment,
22 | createUTC,
23 | createUnix,
24 | createLocal,
25 | createInZone,
26 | createInvalid,
27 | momentPrototype
28 | };
29 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/duration/add-subtract.js:
--------------------------------------------------------------------------------
1 | import { createDuration } from './create';
2 |
3 | function addSubtract (duration, input, value, direction) {
4 | var other = createDuration(input, value);
5 |
6 | duration._milliseconds += direction * other._milliseconds;
7 | duration._days += direction * other._days;
8 | duration._months += direction * other._months;
9 |
10 | return duration._bubble();
11 | }
12 |
13 | // supports only 2.0-style add(1, 's') or add(duration)
14 | export function add (input, value) {
15 | return addSubtract(this, input, value, 1);
16 | }
17 |
18 | // supports only 2.0-style subtract(1, 's') or subtract(duration)
19 | export function subtract (input, value) {
20 | return addSubtract(this, input, value, -1);
21 | }
22 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/create/parsing-flags.js:
--------------------------------------------------------------------------------
1 | function defaultParsingFlags() {
2 | // We need to deep clone this object.
3 | return {
4 | empty : false,
5 | unusedTokens : [],
6 | unusedInput : [],
7 | overflow : -2,
8 | charsLeftOver : 0,
9 | nullInput : false,
10 | invalidMonth : null,
11 | invalidFormat : false,
12 | userInvalidated : false,
13 | iso : false,
14 | parsedDateParts : [],
15 | meridiem : null,
16 | rfc2822 : false,
17 | weekdayMismatch : false
18 | };
19 | }
20 |
21 | export default function getParsingFlags(m) {
22 | if (m._pf == null) {
23 | m._pf = defaultParsingFlags();
24 | }
25 | return m._pf;
26 | }
27 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/units/minute.js:
--------------------------------------------------------------------------------
1 | import { makeGetSet } from '../moment/get-set';
2 | import { addFormatToken } from '../format/format';
3 | import { addUnitAlias } from './aliases';
4 | import { addUnitPriority } from './priorities';
5 | import { addRegexToken, match1to2, match2 } from '../parse/regex';
6 | import { addParseToken } from '../parse/token';
7 | import { MINUTE } from './constants';
8 |
9 | // FORMATTING
10 |
11 | addFormatToken('m', ['mm', 2], 0, 'minute');
12 |
13 | // ALIASES
14 |
15 | addUnitAlias('minute', 'm');
16 |
17 | // PRIORITY
18 |
19 | addUnitPriority('minute', 14);
20 |
21 | // PARSING
22 |
23 | addRegexToken('m', match1to2);
24 | addRegexToken('mm', match1to2, match2);
25 | addParseToken(['m', 'mm'], MINUTE);
26 |
27 | // MOMENTS
28 |
29 | export var getSetMinute = makeGetSet('Minutes', false);
30 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/units/second.js:
--------------------------------------------------------------------------------
1 | import { makeGetSet } from '../moment/get-set';
2 | import { addFormatToken } from '../format/format';
3 | import { addUnitAlias } from './aliases';
4 | import { addUnitPriority } from './priorities';
5 | import { addRegexToken, match1to2, match2 } from '../parse/regex';
6 | import { addParseToken } from '../parse/token';
7 | import { SECOND } from './constants';
8 |
9 | // FORMATTING
10 |
11 | addFormatToken('s', ['ss', 2], 0, 'second');
12 |
13 | // ALIASES
14 |
15 | addUnitAlias('second', 's');
16 |
17 | // PRIORITY
18 |
19 | addUnitPriority('second', 15);
20 |
21 | // PARSING
22 |
23 | addRegexToken('s', match1to2);
24 | addRegexToken('ss', match1to2, match2);
25 | addParseToken(['s', 'ss'], SECOND);
26 |
27 | // MOMENTS
28 |
29 | export var getSetSecond = makeGetSet('Seconds', false);
30 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/duration/get.js:
--------------------------------------------------------------------------------
1 | import { normalizeUnits } from '../units/aliases';
2 | import absFloor from '../utils/abs-floor';
3 |
4 | export function get (units) {
5 | units = normalizeUnits(units);
6 | return this.isValid() ? this[units + 's']() : NaN;
7 | }
8 |
9 | function makeGetter(name) {
10 | return function () {
11 | return this.isValid() ? this._data[name] : NaN;
12 | };
13 | }
14 |
15 | export var milliseconds = makeGetter('milliseconds');
16 | export var seconds = makeGetter('seconds');
17 | export var minutes = makeGetter('minutes');
18 | export var hours = makeGetter('hours');
19 | export var days = makeGetter('days');
20 | export var months = makeGetter('months');
21 | export var years = makeGetter('years');
22 |
23 | export function weeks () {
24 | return absFloor(this.days() / 7);
25 | }
26 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "table-order",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "directories": {
7 | "test": "test"
8 | },
9 | "scripts": {
10 | "start": "node index.js",
11 | "test": "mocha --exit -t 30000"
12 | },
13 | "author": "Kazuki Nakajima",
14 | "license": "MIT",
15 | "dependencies": {
16 | "@google-cloud/translate": "^4.0.1",
17 | "bot-express": "^0.6.5",
18 | "debug": "^3.1.0",
19 | "dialogflow": "^0.9.1",
20 | "dotenv": "^6.0.0",
21 | "ejs": "^2.6.1",
22 | "express": "^4.16.3",
23 | "firebase-admin": "^7.4.0",
24 | "ioredis": "^4.9.3",
25 | "line-pay": "^1.0.15",
26 | "moment": "^2.22.2",
27 | "secure-compare": "^3.0.1",
28 | "stripe": "^6.34.0"
29 | },
30 | "devDependencies": {
31 | "chai": "^4.1.2",
32 | "chai-as-promised": "^7.1.1",
33 | "mocha": "^5.2.0"
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/units/quarter.js:
--------------------------------------------------------------------------------
1 | import { addFormatToken } from '../format/format';
2 | import { addUnitAlias } from './aliases';
3 | import { addUnitPriority } from './priorities';
4 | import { addRegexToken, match1 } from '../parse/regex';
5 | import { addParseToken } from '../parse/token';
6 | import { MONTH } from './constants';
7 | import toInt from '../utils/to-int';
8 |
9 | // FORMATTING
10 |
11 | addFormatToken('Q', 0, 'Qo', 'quarter');
12 |
13 | // ALIASES
14 |
15 | addUnitAlias('quarter', 'Q');
16 |
17 | // PRIORITY
18 |
19 | addUnitPriority('quarter', 7);
20 |
21 | // PARSING
22 |
23 | addRegexToken('Q', match1);
24 | addParseToken('Q', function (input, array) {
25 | array[MONTH] = (toInt(input) - 1) * 3;
26 | });
27 |
28 | // MOMENTS
29 |
30 | export function getSetQuarter (input) {
31 | return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3);
32 | }
33 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/units/aliases.js:
--------------------------------------------------------------------------------
1 | import hasOwnProp from '../utils/has-own-prop';
2 |
3 | var aliases = {};
4 |
5 | export function addUnitAlias (unit, shorthand) {
6 | var lowerCase = unit.toLowerCase();
7 | aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;
8 | }
9 |
10 | export function normalizeUnits(units) {
11 | return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined;
12 | }
13 |
14 | export function normalizeObjectUnits(inputObject) {
15 | var normalizedInput = {},
16 | normalizedProp,
17 | prop;
18 |
19 | for (prop in inputObject) {
20 | if (hasOwnProp(inputObject, prop)) {
21 | normalizedProp = normalizeUnits(prop);
22 | if (normalizedProp) {
23 | normalizedInput[normalizedProp] = inputObject[prop];
24 | }
25 | }
26 | }
27 |
28 | return normalizedInput;
29 | }
30 |
31 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/moment/to-type.js:
--------------------------------------------------------------------------------
1 | export function valueOf () {
2 | return this._d.valueOf() - ((this._offset || 0) * 60000);
3 | }
4 |
5 | export function unix () {
6 | return Math.floor(this.valueOf() / 1000);
7 | }
8 |
9 | export function toDate () {
10 | return new Date(this.valueOf());
11 | }
12 |
13 | export function toArray () {
14 | var m = this;
15 | return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()];
16 | }
17 |
18 | export function toObject () {
19 | var m = this;
20 | return {
21 | years: m.year(),
22 | months: m.month(),
23 | date: m.date(),
24 | hours: m.hours(),
25 | minutes: m.minutes(),
26 | seconds: m.seconds(),
27 | milliseconds: m.milliseconds()
28 | };
29 | }
30 |
31 | export function toJSON () {
32 | // new Date(NaN).toJSON() === null
33 | return this.isValid() ? this.toISOString() : null;
34 | }
35 |
--------------------------------------------------------------------------------
/public/bower_components/moment/.bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "moment",
3 | "license": "MIT",
4 | "main": "moment.js",
5 | "ignore": [
6 | "**/.*",
7 | "benchmarks",
8 | "bower_components",
9 | "meteor",
10 | "node_modules",
11 | "scripts",
12 | "tasks",
13 | "test",
14 | "component.json",
15 | "composer.json",
16 | "CONTRIBUTING.md",
17 | "ender.js",
18 | "Gruntfile.js",
19 | "Moment.js.nuspec",
20 | "package.js",
21 | "package.json",
22 | "ISSUE_TEMPLATE.md",
23 | "typing-tests",
24 | "min/tests.js"
25 | ],
26 | "homepage": "https://github.com/moment/moment",
27 | "version": "2.22.2",
28 | "_release": "2.22.2",
29 | "_resolution": {
30 | "type": "version",
31 | "tag": "2.22.2",
32 | "commit": "a6e564b3813cc19aac6c3a3822df2780d6eef753"
33 | },
34 | "_source": "https://github.com/moment/moment.git",
35 | "_target": "^2.22.2",
36 | "_originalSource": "moment",
37 | "_direct": true
38 | }
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/locale/relative.js:
--------------------------------------------------------------------------------
1 | export var defaultRelativeTime = {
2 | future : 'in %s',
3 | past : '%s ago',
4 | s : 'a few seconds',
5 | ss : '%d seconds',
6 | m : 'a minute',
7 | mm : '%d minutes',
8 | h : 'an hour',
9 | hh : '%d hours',
10 | d : 'a day',
11 | dd : '%d days',
12 | M : 'a month',
13 | MM : '%d months',
14 | y : 'a year',
15 | yy : '%d years'
16 | };
17 |
18 | import isFunction from '../utils/is-function';
19 |
20 | export function relativeTime (number, withoutSuffix, string, isFuture) {
21 | var output = this._relativeTime[string];
22 | return (isFunction(output)) ?
23 | output(number, withoutSuffix, string, isFuture) :
24 | output.replace(/%d/i, number);
25 | }
26 |
27 | export function pastFuture (diff, output) {
28 | var format = this._relativeTime[diff > 0 ? 'future' : 'past'];
29 | return isFunction(format) ? format(output) : format.replace(/%s/i, output);
30 | }
31 |
--------------------------------------------------------------------------------
/skill/robot_response.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | const debug = require("debug")("bot-express:skill");
4 |
5 | module.exports = class SkillRobotResponse {
6 | constructor(){
7 | this.clear_context_on_finish = true;
8 | }
9 |
10 | async finish(bot, event, context){
11 | let message;
12 | if (context.intent.fulfillment && context.intent.fulfillment.length > 0){
13 | let offset = Math.floor(Math.random() * (context.intent.fulfillment.length));
14 | message = context.intent.fulfillment[offset];
15 | } else {
16 | debug("Fulfillment not found so we do nothing.");
17 | return;
18 | }
19 |
20 | if (message.type == "text" && message.text && bot.translator && context.sender_language !== process.env.BOT_LANGUAGE){
21 | message.text = await bot.translator.translate(message.text, context.sender_language || process.env.BOT_LANGUAGE);
22 | }
23 |
24 | await bot.reply(message);
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/locale/locale.js:
--------------------------------------------------------------------------------
1 | // Side effect imports
2 | import './prototype';
3 |
4 | import {
5 | getSetGlobalLocale,
6 | defineLocale,
7 | updateLocale,
8 | getLocale,
9 | listLocales
10 | } from './locales';
11 |
12 | import {
13 | listMonths,
14 | listMonthsShort,
15 | listWeekdays,
16 | listWeekdaysShort,
17 | listWeekdaysMin
18 | } from './lists';
19 |
20 | export {
21 | getSetGlobalLocale,
22 | defineLocale,
23 | updateLocale,
24 | getLocale,
25 | listLocales,
26 | listMonths,
27 | listMonthsShort,
28 | listWeekdays,
29 | listWeekdaysShort,
30 | listWeekdaysMin
31 | };
32 |
33 | import { deprecate } from '../utils/deprecate';
34 | import { hooks } from '../utils/hooks';
35 |
36 | hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', getSetGlobalLocale);
37 | hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', getLocale);
38 |
39 | import './en';
40 |
--------------------------------------------------------------------------------
/routes/console.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | /**
4 | * Import packages
5 | */
6 | const express = require('express');
7 | const router = express.Router();
8 | const debug = require("debug")("bot-express:route");
9 |
10 | /**
11 | * Login.
12 | */
13 | router.get("/login", async (req, res) => {
14 | return res.render("login", {
15 | google_project_id: process.env.FIREBASE_PROJECT_ID,
16 | firebase_api_key: process.env.FIREBASE_API_KEY,
17 | firebase_messaging_sender_id: process.env.FIREBASE_MESSAGING_SENDER_ID,
18 | language: process.env.BOT_LANGUAGE || "en"
19 | });
20 | });
21 |
22 | /**
23 | * Order board.
24 | */
25 | router.get("/order_board", async (req, res) => {
26 | return res.render("order_board", {
27 | google_project_id: process.env.FIREBASE_PROJECT_ID,
28 | firebase_api_key: process.env.FIREBASE_API_KEY,
29 | firebase_messaging_sender_id: process.env.FIREBASE_MESSAGING_SENDER_ID,
30 | language: process.env.BOT_LANGUAGE || "en"
31 | });
32 | });
33 |
34 | module.exports = router;
35 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/parse/token.js:
--------------------------------------------------------------------------------
1 | import hasOwnProp from '../utils/has-own-prop';
2 | import isNumber from '../utils/is-number';
3 | import toInt from '../utils/to-int';
4 |
5 | var tokens = {};
6 |
7 | export function addParseToken (token, callback) {
8 | var i, func = callback;
9 | if (typeof token === 'string') {
10 | token = [token];
11 | }
12 | if (isNumber(callback)) {
13 | func = function (input, array) {
14 | array[callback] = toInt(input);
15 | };
16 | }
17 | for (i = 0; i < token.length; i++) {
18 | tokens[token[i]] = func;
19 | }
20 | }
21 |
22 | export function addWeekParseToken (token, callback) {
23 | addParseToken(token, function (input, array, config, token) {
24 | config._w = config._w || {};
25 | callback(input, config._w, config, token);
26 | });
27 | }
28 |
29 | export function addTimeToArrayFromToken(token, input, config) {
30 | if (input != null && hasOwnProp(tokens, token)) {
31 | tokens[token](input, config._a, config, token);
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/moment/locale.js:
--------------------------------------------------------------------------------
1 | import { getLocale } from '../locale/locales';
2 | import { deprecate } from '../utils/deprecate';
3 |
4 | // If passed a locale key, it will set the locale for this
5 | // instance. Otherwise, it will return the locale configuration
6 | // variables for this instance.
7 | export function locale (key) {
8 | var newLocaleData;
9 |
10 | if (key === undefined) {
11 | return this._locale._abbr;
12 | } else {
13 | newLocaleData = getLocale(key);
14 | if (newLocaleData != null) {
15 | this._locale = newLocaleData;
16 | }
17 | return this;
18 | }
19 | }
20 |
21 | export var lang = deprecate(
22 | 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',
23 | function (key) {
24 | if (key === undefined) {
25 | return this.localeData();
26 | } else {
27 | return this.locale(key);
28 | }
29 | }
30 | );
31 |
32 | export function localeData () {
33 | return this._locale;
34 | }
35 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2019 Kazuki Nakajima
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of
6 | this software and associated documentation files (the "Software"), to deal in
7 | the Software without restriction, including without limitation the rights to
8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9 | the Software, and to permit persons to whom the Software is furnished to do so,
10 | subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
--------------------------------------------------------------------------------
/public/bower_components/moment/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) JS Foundation and other contributors
2 |
3 | Permission is hereby granted, free of charge, to any person
4 | obtaining a copy of this software and associated documentation
5 | files (the "Software"), to deal in the Software without
6 | restriction, including without limitation the rights to use,
7 | copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | copies of the Software, and to permit persons to whom the
9 | Software is furnished to do so, subject to the following
10 | conditions:
11 |
12 | The above copyright notice and this permission notice shall be
13 | included in all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
17 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
19 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22 | OTHER DEALINGS IN THE SOFTWARE.
23 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/duration/valid.js:
--------------------------------------------------------------------------------
1 | import toInt from '../utils/to-int';
2 | import indexOf from '../utils/index-of';
3 | import {Duration} from './constructor';
4 | import {createDuration} from './create';
5 |
6 | var ordering = ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond'];
7 |
8 | export default function isDurationValid(m) {
9 | for (var key in m) {
10 | if (!(indexOf.call(ordering, key) !== -1 && (m[key] == null || !isNaN(m[key])))) {
11 | return false;
12 | }
13 | }
14 |
15 | var unitHasDecimal = false;
16 | for (var i = 0; i < ordering.length; ++i) {
17 | if (m[ordering[i]]) {
18 | if (unitHasDecimal) {
19 | return false; // only allow non-integers for smallest unit
20 | }
21 | if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {
22 | unitHasDecimal = true;
23 | }
24 | }
25 | }
26 |
27 | return true;
28 | }
29 |
30 | export function isValid() {
31 | return this._isValid;
32 | }
33 |
34 | export function createInvalid() {
35 | return createDuration(NaN);
36 | }
37 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/units/day-of-year.js:
--------------------------------------------------------------------------------
1 | import { addFormatToken } from '../format/format';
2 | import { addUnitAlias } from './aliases';
3 | import { addUnitPriority } from './priorities';
4 | import { addRegexToken, match3, match1to3 } from '../parse/regex';
5 | import { daysInYear } from './year';
6 | import { createUTCDate } from '../create/date-from-array';
7 | import { addParseToken } from '../parse/token';
8 | import toInt from '../utils/to-int';
9 |
10 | // FORMATTING
11 |
12 | addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');
13 |
14 | // ALIASES
15 |
16 | addUnitAlias('dayOfYear', 'DDD');
17 |
18 | // PRIORITY
19 | addUnitPriority('dayOfYear', 4);
20 |
21 | // PARSING
22 |
23 | addRegexToken('DDD', match1to3);
24 | addRegexToken('DDDD', match3);
25 | addParseToken(['DDD', 'DDDD'], function (input, array, config) {
26 | config._dayOfYear = toInt(input);
27 | });
28 |
29 | // HELPERS
30 |
31 | // MOMENTS
32 |
33 | export function getSetDayOfYear (input) {
34 | var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1;
35 | return input == null ? dayOfYear : this.add((input - dayOfYear), 'd');
36 | }
37 |
--------------------------------------------------------------------------------
/views/stripe.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Checkout
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
33 |
34 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/moment/calendar.js:
--------------------------------------------------------------------------------
1 | import { createLocal } from '../create/local';
2 | import { cloneWithOffset } from '../units/offset';
3 | import isFunction from '../utils/is-function';
4 | import { hooks } from '../utils/hooks';
5 |
6 | export function getCalendarFormat(myMoment, now) {
7 | var diff = myMoment.diff(now, 'days', true);
8 | return diff < -6 ? 'sameElse' :
9 | diff < -1 ? 'lastWeek' :
10 | diff < 0 ? 'lastDay' :
11 | diff < 1 ? 'sameDay' :
12 | diff < 2 ? 'nextDay' :
13 | diff < 7 ? 'nextWeek' : 'sameElse';
14 | }
15 |
16 | export function calendar (time, formats) {
17 | // We want to compare the start of today, vs this.
18 | // Getting start-of-today depends on whether we're local/utc/offset or not.
19 | var now = time || createLocal(),
20 | sod = cloneWithOffset(now, this).startOf('day'),
21 | format = hooks.calendarFormat(this, sod) || 'sameElse';
22 |
23 | var output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]);
24 |
25 | return this.format(output || this.localeData().calendar(format, this, createLocal(now)));
26 | }
27 |
--------------------------------------------------------------------------------
/skill/notify_paid.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | const debug = require("debug")("bot-express:skill");
4 |
5 | /**
6 | * Following parameters need to be included.
7 | * {Object} order
8 | * {Status} status - "completed" | "failed"
9 | * {String} message_label
10 | */
11 | module.exports = class SkillNotifyPaid {
12 | constructor(){
13 | this.clear_context_on_finish = true;
14 | }
15 |
16 | async finish(bot, event, context){
17 | if (!context.heard.order){
18 | throw new Error(`Order not found.`);
19 | }
20 |
21 | let message;
22 | if (context.heard.status === `completed`){
23 | message = await bot.m.receipt({
24 | order: context.heard.order,
25 | })
26 | } else if (context.heard.status === `failed`){
27 | message = {
28 | type: "text",
29 | text: await bot.t(context.heard.message_label),
30 | }
31 | }
32 |
33 | await bot.reply(message);
34 |
35 | // Link richmenu.
36 | if (process.env.BOT_EXPRESS_ENV !== "test"){
37 | await bot.line.sdk.linkRichMenuToUser(bot.extract_sender_id(), process.env.RICHMENU_CONTROL_PANEL);
38 | }
39 | }
40 | }
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/units/day-of-month.js:
--------------------------------------------------------------------------------
1 | import { makeGetSet } from '../moment/get-set';
2 | import { addFormatToken } from '../format/format';
3 | import { addUnitAlias } from './aliases';
4 | import { addUnitPriority } from './priorities';
5 | import { addRegexToken, match1to2, match2 } from '../parse/regex';
6 | import { addParseToken } from '../parse/token';
7 | import { DATE } from './constants';
8 | import toInt from '../utils/to-int';
9 |
10 | // FORMATTING
11 |
12 | addFormatToken('D', ['DD', 2], 'Do', 'date');
13 |
14 | // ALIASES
15 |
16 | addUnitAlias('date', 'D');
17 |
18 | // PRIORITY
19 | addUnitPriority('date', 9);
20 |
21 | // PARSING
22 |
23 | addRegexToken('D', match1to2);
24 | addRegexToken('DD', match1to2, match2);
25 | addRegexToken('Do', function (isStrict, locale) {
26 | // TODO: Remove "ordinalParse" fallback in next major release.
27 | return isStrict ?
28 | (locale._dayOfMonthOrdinalParse || locale._ordinalParse) :
29 | locale._dayOfMonthOrdinalParseLenient;
30 | });
31 |
32 | addParseToken(['D', 'DD'], DATE);
33 | addParseToken('Do', function (input, array) {
34 | array[DATE] = toInt(input.match(match1to2)[0]);
35 | });
36 |
37 | // MOMENTS
38 |
39 | export var getSetDayOfMonth = makeGetSet('Date', true);
40 |
--------------------------------------------------------------------------------
/routes/liff.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | const express = require('express');
4 | const router = express.Router();
5 | const debug = require("debug")("bot-express:route");
6 |
7 | /**
8 | * Redirect to form to input credit card information hosted by stripe.
9 | * @param {String} session_id - LINE user id.
10 | */
11 | router.get("/stripe", async (req, res, next) => {
12 | const options = {
13 | api_key: process.env.STRIPE_API_KEY,
14 | session_id: req.query.session_id
15 | }
16 |
17 | res.render("stripe", options);
18 | })
19 |
20 | router.get("/line_pay", async (req, res, next) => {
21 | debug(`Redirecting to ${req.query.payment_url}`);
22 |
23 | if (typeof req.query.payment_url !== "string"){
24 | debug("Invalid payment url.");
25 | return res.status(400).json({
26 | message: "Invalid payment url."
27 | })
28 | }
29 |
30 | if (!req.query.payment_url.match(/^https:\/\/sandbox-web-pay\.line\.me\//) && !req.query.payment_url.match(/^https:\/\/web-pay\.line\.me\//)){
31 | debug("Invalid payment url.");
32 | return res.status(400).json({
33 | message: "Invalid payment url."
34 | })
35 | }
36 |
37 | return res.redirect(req.query.payment_url);
38 | })
39 |
40 | module.exports = router;
41 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/locale/base-config.js:
--------------------------------------------------------------------------------
1 | import { defaultCalendar } from './calendar';
2 | import { defaultLongDateFormat } from './formats';
3 | import { defaultInvalidDate } from './invalid';
4 | import { defaultOrdinal, defaultDayOfMonthOrdinalParse } from './ordinal';
5 | import { defaultRelativeTime } from './relative';
6 |
7 | // months
8 | import {
9 | defaultLocaleMonths,
10 | defaultLocaleMonthsShort,
11 | } from '../units/month';
12 |
13 | // week
14 | import { defaultLocaleWeek } from '../units/week';
15 |
16 | // weekdays
17 | import {
18 | defaultLocaleWeekdays,
19 | defaultLocaleWeekdaysMin,
20 | defaultLocaleWeekdaysShort,
21 | } from '../units/day-of-week';
22 |
23 | // meridiem
24 | import { defaultLocaleMeridiemParse } from '../units/hour';
25 |
26 | export var baseConfig = {
27 | calendar: defaultCalendar,
28 | longDateFormat: defaultLongDateFormat,
29 | invalidDate: defaultInvalidDate,
30 | ordinal: defaultOrdinal,
31 | dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,
32 | relativeTime: defaultRelativeTime,
33 |
34 | months: defaultLocaleMonths,
35 | monthsShort: defaultLocaleMonthsShort,
36 |
37 | week: defaultLocaleWeek,
38 |
39 | weekdays: defaultLocaleWeekdays,
40 | weekdaysMin: defaultLocaleWeekdaysMin,
41 | weekdaysShort: defaultLocaleWeekdaysShort,
42 |
43 | meridiemParse: defaultLocaleMeridiemParse
44 | };
45 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/create/check-overflow.js:
--------------------------------------------------------------------------------
1 | import { daysInMonth } from '../units/month';
2 | import { YEAR, MONTH, DATE, HOUR, MINUTE, SECOND, MILLISECOND, WEEK, WEEKDAY } from '../units/constants';
3 | import getParsingFlags from '../create/parsing-flags';
4 |
5 | export default function checkOverflow (m) {
6 | var overflow;
7 | var a = m._a;
8 |
9 | if (a && getParsingFlags(m).overflow === -2) {
10 | overflow =
11 | a[MONTH] < 0 || a[MONTH] > 11 ? MONTH :
12 | a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE :
13 | a[HOUR] < 0 || a[HOUR] > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR :
14 | a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE :
15 | a[SECOND] < 0 || a[SECOND] > 59 ? SECOND :
16 | a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND :
17 | -1;
18 |
19 | if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {
20 | overflow = DATE;
21 | }
22 | if (getParsingFlags(m)._overflowWeeks && overflow === -1) {
23 | overflow = WEEK;
24 | }
25 | if (getParsingFlags(m)._overflowWeekday && overflow === -1) {
26 | overflow = WEEKDAY;
27 | }
28 |
29 | getParsingFlags(m).overflow = overflow;
30 | }
31 |
32 | return m;
33 | }
34 |
35 |
--------------------------------------------------------------------------------
/views/login.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Login
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/create/valid.js:
--------------------------------------------------------------------------------
1 | import extend from '../utils/extend';
2 | import { createUTC } from './utc';
3 | import getParsingFlags from '../create/parsing-flags';
4 | import some from '../utils/some';
5 |
6 | export function isValid(m) {
7 | if (m._isValid == null) {
8 | var flags = getParsingFlags(m);
9 | var parsedParts = some.call(flags.parsedDateParts, function (i) {
10 | return i != null;
11 | });
12 | var isNowValid = !isNaN(m._d.getTime()) &&
13 | flags.overflow < 0 &&
14 | !flags.empty &&
15 | !flags.invalidMonth &&
16 | !flags.invalidWeekday &&
17 | !flags.weekdayMismatch &&
18 | !flags.nullInput &&
19 | !flags.invalidFormat &&
20 | !flags.userInvalidated &&
21 | (!flags.meridiem || (flags.meridiem && parsedParts));
22 |
23 | if (m._strict) {
24 | isNowValid = isNowValid &&
25 | flags.charsLeftOver === 0 &&
26 | flags.unusedTokens.length === 0 &&
27 | flags.bigHour === undefined;
28 | }
29 |
30 | if (Object.isFrozen == null || !Object.isFrozen(m)) {
31 | m._isValid = isNowValid;
32 | }
33 | else {
34 | return isNowValid;
35 | }
36 | }
37 | return m._isValid;
38 | }
39 |
40 | export function createInvalid (flags) {
41 | var m = createUTC(NaN);
42 | if (flags != null) {
43 | extend(getParsingFlags(m), flags);
44 | }
45 | else {
46 | getParsingFlags(m).userInvalidated = true;
47 | }
48 |
49 | return m;
50 | }
51 |
--------------------------------------------------------------------------------
/public/js/login_ctl.js:
--------------------------------------------------------------------------------
1 | angular.module("botex-table-order")
2 | .controller("rootCtl", function($scope, $log, $filter, GOOGLE_PROJECT_ID, FIREBASE_API_KEY, FIREBASE_MESSAGING_SENDER_ID, LANGUAGE){
3 | $scope.ui = {};
4 | $scope.ui.alert_list = [];
5 |
6 | // Initialize Firebase.
7 | var config = {
8 | apiKey: FIREBASE_API_KEY,
9 | authDomain: GOOGLE_PROJECT_ID + ".firebaseapp.com",
10 | databaseURL: "https://" + GOOGLE_PROJECT_ID + ".firebaseio.com",
11 | projectId: GOOGLE_PROJECT_ID,
12 | storageBucket: GOOGLE_PROJECT_ID + ".appspot.com",
13 | messagingSenderId: FIREBASE_MESSAGING_SENDER_ID
14 | };
15 | firebase.initializeApp(config);
16 |
17 | // FirebaseUI config.
18 | var uiConfig = {
19 | signInSuccessUrl: "/console/order_board",
20 | signInOptions: [
21 | // Leave the lines as is for the providers you want to offer your users.
22 | firebase.auth.EmailAuthProvider.PROVIDER_ID,
23 | {
24 | requireDisplayName: false
25 | }
26 | ],
27 | // tosUrl and privacyPolicyUrl accept either url string or a callback
28 | // function.
29 | // Terms of service url/callback.
30 | tosUrl: '/',
31 | // Privacy policy url/callback.
32 | privacyPolicyUrl: function() {
33 | window.location.assign('/');
34 | }
35 | };
36 |
37 | // Initialize the FirebaseUI Widget using Firebase.
38 | var ui = new firebaseui.auth.AuthUI(firebase.auth());
39 | // The start method will wait until the DOM is loaded.
40 | ui.start('#firebaseui-auth-container', uiConfig);
41 | });
42 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/create/from-string-and-array.js:
--------------------------------------------------------------------------------
1 | import { copyConfig } from '../moment/constructor';
2 | import { configFromStringAndFormat } from './from-string-and-format';
3 | import getParsingFlags from './parsing-flags';
4 | import { isValid } from './valid';
5 | import extend from '../utils/extend';
6 |
7 | // date from string and array of format strings
8 | export function configFromStringAndArray(config) {
9 | var tempConfig,
10 | bestMoment,
11 |
12 | scoreToBeat,
13 | i,
14 | currentScore;
15 |
16 | if (config._f.length === 0) {
17 | getParsingFlags(config).invalidFormat = true;
18 | config._d = new Date(NaN);
19 | return;
20 | }
21 |
22 | for (i = 0; i < config._f.length; i++) {
23 | currentScore = 0;
24 | tempConfig = copyConfig({}, config);
25 | if (config._useUTC != null) {
26 | tempConfig._useUTC = config._useUTC;
27 | }
28 | tempConfig._f = config._f[i];
29 | configFromStringAndFormat(tempConfig);
30 |
31 | if (!isValid(tempConfig)) {
32 | continue;
33 | }
34 |
35 | // if there is any input that was not parsed add a penalty for that format
36 | currentScore += getParsingFlags(tempConfig).charsLeftOver;
37 |
38 | //or tokens
39 | currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;
40 |
41 | getParsingFlags(tempConfig).score = currentScore;
42 |
43 | if (scoreToBeat == null || currentScore < scoreToBeat) {
44 | scoreToBeat = currentScore;
45 | bestMoment = tempConfig;
46 | }
47 | }
48 |
49 | extend(config, bestMoment || tempConfig);
50 | }
51 |
--------------------------------------------------------------------------------
/skill/faq_is_hot.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | const debug = require("debug")("bot-express:skill");
4 | const ServiceDb = require("../service/db");
5 | const db = new ServiceDb();
6 | const translate = require("../service/translate");
7 |
8 | module.exports = class SkillFaqIsHot {
9 | constructor(){
10 | this.clear_context_on_finish = true;
11 | }
12 |
13 | async finish(bot, event, context){
14 | if (!context.heard.item_label){
15 | debug(`item_label not found so we skip request.`)
16 | return;
17 | }
18 |
19 | const menu_list = translate(await db.list("menu"), context.sender_language || "en");
20 |
21 | const item = menu_list.find(menu => menu.label === context.heard.item_label);
22 |
23 | if (!item){
24 | await bot.reply({
25 | type: "text",
26 | text: await bot.t("x_not_found_in_menu", { item_label: context.heard.item_label })
27 | })
28 | return
29 | }
30 |
31 | let message_text;
32 | if (item.hot === 3){
33 | message_text = await bot.t("x_is_extremely_hot", { item_label: item.label })
34 | } else if (item.hot === 2){
35 | message_text = await bot.t("x_is_moderately_hot", { item_label: item.label })
36 | } else if (item.hot === 1){
37 | message_text = await bot.t("x_is_not_hot_at_all", { item_label: item.label })
38 | } else {
39 | message_text = await bot.t("i_have_no_idea_how_hot_x_is", { item_label: item.label })
40 | }
41 |
42 | let message = {
43 | type: "text",
44 | text: message_text
45 | }
46 |
47 | await bot.reply(message);
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/moment/start-end-of.js:
--------------------------------------------------------------------------------
1 | import { normalizeUnits } from '../units/aliases';
2 |
3 | export function startOf (units) {
4 | units = normalizeUnits(units);
5 | // the following switch intentionally omits break keywords
6 | // to utilize falling through the cases.
7 | switch (units) {
8 | case 'year':
9 | this.month(0);
10 | /* falls through */
11 | case 'quarter':
12 | case 'month':
13 | this.date(1);
14 | /* falls through */
15 | case 'week':
16 | case 'isoWeek':
17 | case 'day':
18 | case 'date':
19 | this.hours(0);
20 | /* falls through */
21 | case 'hour':
22 | this.minutes(0);
23 | /* falls through */
24 | case 'minute':
25 | this.seconds(0);
26 | /* falls through */
27 | case 'second':
28 | this.milliseconds(0);
29 | }
30 |
31 | // weeks are a special case
32 | if (units === 'week') {
33 | this.weekday(0);
34 | }
35 | if (units === 'isoWeek') {
36 | this.isoWeekday(1);
37 | }
38 |
39 | // quarters are also special
40 | if (units === 'quarter') {
41 | this.month(Math.floor(this.month() / 3) * 3);
42 | }
43 |
44 | return this;
45 | }
46 |
47 | export function endOf (units) {
48 | units = normalizeUnits(units);
49 | if (units === undefined || units === 'millisecond') {
50 | return this;
51 | }
52 |
53 | // 'date' is an alias for 'day', so it should be considered as such.
54 | if (units === 'date') {
55 | units = 'day';
56 | }
57 |
58 | return this.startOf(units).add(1, (units === 'isoWeek' ? 'week' : units)).subtract(1, 'ms');
59 | }
60 |
--------------------------------------------------------------------------------
/functions/index.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | const functions = require('firebase-functions');
4 | const debug = require("debug")("*");
5 | const crypto = require("crypto");
6 | const axios = require("axios");
7 | const Promise = require("bluebird");
8 |
9 | // The Firebase Admin SDK to access the Firebase Realtime Database.
10 | const admin = require('firebase-admin');
11 | admin.initializeApp();
12 |
13 | // If the order status is updated from "paid" to "ready", we send ready message through LINE
14 | exports.notify_order_ready = functions.firestore.document('/order/{order_id}').onUpdate((change, context) => {
15 | let order = change.after.data();
16 | let previous_order = change.before.data();
17 |
18 | if (!(order.status == "ready" && previous_order.status == "paid")){
19 | return Promise.resolve();
20 | }
21 |
22 | if (!order.line_user_id){
23 | debug("Required parameter: line_user_id not found.");
24 | return Promise.reject("Required parameter: line_user_id not found.");
25 | }
26 |
27 | let event = {
28 | type: "bot-express:push",
29 | to: {
30 | type: "user",
31 | userId: order.line_user_id
32 | },
33 | intent: {
34 | name: "notify_order_ready",
35 | parameters: {
36 | order: order
37 | }
38 | },
39 | language: order.language || "en"
40 | }
41 |
42 | const body = {events: [event]};
43 | const signature = crypto.createHmac('sha256', process.env.LINE_BOT_CHANNEL_SECRET).update(JSON.stringify(body)).digest('base64');
44 | const url = process.env.LINE_BOT_WEBHOOK_URL;
45 | const headers = {"X-Line-Signature": signature};
46 |
47 | return axios.post(url, body, {
48 | headers: headers,
49 | });
50 | });
51 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/duration/constructor.js:
--------------------------------------------------------------------------------
1 | import { normalizeObjectUnits } from '../units/aliases';
2 | import { getLocale } from '../locale/locales';
3 | import isDurationValid from './valid.js';
4 |
5 | export function Duration (duration) {
6 | var normalizedInput = normalizeObjectUnits(duration),
7 | years = normalizedInput.year || 0,
8 | quarters = normalizedInput.quarter || 0,
9 | months = normalizedInput.month || 0,
10 | weeks = normalizedInput.week || 0,
11 | days = normalizedInput.day || 0,
12 | hours = normalizedInput.hour || 0,
13 | minutes = normalizedInput.minute || 0,
14 | seconds = normalizedInput.second || 0,
15 | milliseconds = normalizedInput.millisecond || 0;
16 |
17 | this._isValid = isDurationValid(normalizedInput);
18 |
19 | // representation for dateAddRemove
20 | this._milliseconds = +milliseconds +
21 | seconds * 1e3 + // 1000
22 | minutes * 6e4 + // 1000 * 60
23 | hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978
24 | // Because of dateAddRemove treats 24 hours as different from a
25 | // day when working around DST, we need to store them separately
26 | this._days = +days +
27 | weeks * 7;
28 | // It is impossible to translate months into days without knowing
29 | // which months you are are talking about, so we have to store
30 | // it separately.
31 | this._months = +months +
32 | quarters * 3 +
33 | years * 12;
34 |
35 | this._data = {};
36 |
37 | this._locale = getLocale();
38 |
39 | this._bubble();
40 | }
41 |
42 | export function isDuration (obj) {
43 | return obj instanceof Duration;
44 | }
45 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/locale/ar-tn.js:
--------------------------------------------------------------------------------
1 | //! moment.js locale configuration
2 | //! locale : Arabic (Tunisia) [ar-tn]
3 | //! author : Nader Toukabri : https://github.com/naderio
4 |
5 | import moment from '../moment';
6 |
7 | export default moment.defineLocale('ar-tn', {
8 | months: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),
9 | monthsShort: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),
10 | weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
11 | weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
12 | weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
13 | weekdaysParseExact : true,
14 | longDateFormat: {
15 | LT: 'HH:mm',
16 | LTS: 'HH:mm:ss',
17 | L: 'DD/MM/YYYY',
18 | LL: 'D MMMM YYYY',
19 | LLL: 'D MMMM YYYY HH:mm',
20 | LLLL: 'dddd D MMMM YYYY HH:mm'
21 | },
22 | calendar: {
23 | sameDay: '[اليوم على الساعة] LT',
24 | nextDay: '[غدا على الساعة] LT',
25 | nextWeek: 'dddd [على الساعة] LT',
26 | lastDay: '[أمس على الساعة] LT',
27 | lastWeek: 'dddd [على الساعة] LT',
28 | sameElse: 'L'
29 | },
30 | relativeTime: {
31 | future: 'في %s',
32 | past: 'منذ %s',
33 | s: 'ثوان',
34 | ss : '%d ثانية',
35 | m: 'دقيقة',
36 | mm: '%d دقائق',
37 | h: 'ساعة',
38 | hh: '%d ساعات',
39 | d: 'يوم',
40 | dd: '%d أيام',
41 | M: 'شهر',
42 | MM: '%d أشهر',
43 | y: 'سنة',
44 | yy: '%d سنوات'
45 | },
46 | week: {
47 | dow: 1, // Monday is the first day of the week.
48 | doy: 4 // The week that contains Jan 4th is the first week of the year.
49 | }
50 | });
51 |
52 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/locale/uz.js:
--------------------------------------------------------------------------------
1 | //! moment.js locale configuration
2 | //! locale : Uzbek [uz]
3 | //! author : Sardor Muminov : https://github.com/muminoff
4 |
5 | import moment from '../moment';
6 |
7 | export default moment.defineLocale('uz', {
8 | months : 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split('_'),
9 | monthsShort : 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'),
10 | weekdays : 'Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба'.split('_'),
11 | weekdaysShort : 'Якш_Душ_Сеш_Чор_Пай_Жум_Шан'.split('_'),
12 | weekdaysMin : 'Як_Ду_Се_Чо_Па_Жу_Ша'.split('_'),
13 | longDateFormat : {
14 | LT : 'HH:mm',
15 | LTS : 'HH:mm:ss',
16 | L : 'DD/MM/YYYY',
17 | LL : 'D MMMM YYYY',
18 | LLL : 'D MMMM YYYY HH:mm',
19 | LLLL : 'D MMMM YYYY, dddd HH:mm'
20 | },
21 | calendar : {
22 | sameDay : '[Бугун соат] LT [да]',
23 | nextDay : '[Эртага] LT [да]',
24 | nextWeek : 'dddd [куни соат] LT [да]',
25 | lastDay : '[Кеча соат] LT [да]',
26 | lastWeek : '[Утган] dddd [куни соат] LT [да]',
27 | sameElse : 'L'
28 | },
29 | relativeTime : {
30 | future : 'Якин %s ичида',
31 | past : 'Бир неча %s олдин',
32 | s : 'фурсат',
33 | ss : '%d фурсат',
34 | m : 'бир дакика',
35 | mm : '%d дакика',
36 | h : 'бир соат',
37 | hh : '%d соат',
38 | d : 'бир кун',
39 | dd : '%d кун',
40 | M : 'бир ой',
41 | MM : '%d ой',
42 | y : 'бир йил',
43 | yy : '%d йил'
44 | },
45 | week : {
46 | dow : 1, // Monday is the first day of the week.
47 | doy : 7 // The week that contains Jan 4th is the first week of the year.
48 | }
49 | });
50 |
51 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/locale/ar-kw.js:
--------------------------------------------------------------------------------
1 | //! moment.js locale configuration
2 | //! locale : Arabic (Kuwait) [ar-kw]
3 | //! author : Nusret Parlak: https://github.com/nusretparlak
4 |
5 | import moment from '../moment';
6 |
7 | export default moment.defineLocale('ar-kw', {
8 | months : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'),
9 | monthsShort : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'),
10 | weekdays : 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
11 | weekdaysShort : 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),
12 | weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'),
13 | weekdaysParseExact : true,
14 | longDateFormat : {
15 | LT : 'HH:mm',
16 | LTS : 'HH:mm:ss',
17 | L : 'DD/MM/YYYY',
18 | LL : 'D MMMM YYYY',
19 | LLL : 'D MMMM YYYY HH:mm',
20 | LLLL : 'dddd D MMMM YYYY HH:mm'
21 | },
22 | calendar : {
23 | sameDay: '[اليوم على الساعة] LT',
24 | nextDay: '[غدا على الساعة] LT',
25 | nextWeek: 'dddd [على الساعة] LT',
26 | lastDay: '[أمس على الساعة] LT',
27 | lastWeek: 'dddd [على الساعة] LT',
28 | sameElse: 'L'
29 | },
30 | relativeTime : {
31 | future : 'في %s',
32 | past : 'منذ %s',
33 | s : 'ثوان',
34 | ss : '%d ثانية',
35 | m : 'دقيقة',
36 | mm : '%d دقائق',
37 | h : 'ساعة',
38 | hh : '%d ساعات',
39 | d : 'يوم',
40 | dd : '%d أيام',
41 | M : 'شهر',
42 | MM : '%d أشهر',
43 | y : 'سنة',
44 | yy : '%d سنوات'
45 | },
46 | week : {
47 | dow : 0, // Sunday is the first day of the week.
48 | doy : 12 // The week that contains Jan 1st is the first week of the year.
49 | }
50 | });
51 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/locale/tzm.js:
--------------------------------------------------------------------------------
1 | //! moment.js locale configuration
2 | //! locale : Central Atlas Tamazight [tzm]
3 | //! author : Abdel Said : https://github.com/abdelsaid
4 |
5 | import moment from '../moment';
6 |
7 | export default moment.defineLocale('tzm', {
8 | months : 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split('_'),
9 | monthsShort : 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split('_'),
10 | weekdays : 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),
11 | weekdaysShort : 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),
12 | weekdaysMin : 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),
13 | longDateFormat : {
14 | LT : 'HH:mm',
15 | LTS: 'HH:mm:ss',
16 | L : 'DD/MM/YYYY',
17 | LL : 'D MMMM YYYY',
18 | LLL : 'D MMMM YYYY HH:mm',
19 | LLLL : 'dddd D MMMM YYYY HH:mm'
20 | },
21 | calendar : {
22 | sameDay: '[ⴰⵙⴷⵅ ⴴ] LT',
23 | nextDay: '[ⴰⵙⴽⴰ ⴴ] LT',
24 | nextWeek: 'dddd [ⴴ] LT',
25 | lastDay: '[ⴰⵚⴰⵏⵜ ⴴ] LT',
26 | lastWeek: 'dddd [ⴴ] LT',
27 | sameElse: 'L'
28 | },
29 | relativeTime : {
30 | future : 'ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s',
31 | past : 'ⵢⴰⵏ %s',
32 | s : 'ⵉⵎⵉⴽ',
33 | ss : '%d ⵉⵎⵉⴽ',
34 | m : 'ⵎⵉⵏⵓⴺ',
35 | mm : '%d ⵎⵉⵏⵓⴺ',
36 | h : 'ⵙⴰⵄⴰ',
37 | hh : '%d ⵜⴰⵙⵙⴰⵄⵉⵏ',
38 | d : 'ⴰⵙⵙ',
39 | dd : '%d oⵙⵙⴰⵏ',
40 | M : 'ⴰⵢoⵓⵔ',
41 | MM : '%d ⵉⵢⵢⵉⵔⵏ',
42 | y : 'ⴰⵙⴳⴰⵙ',
43 | yy : '%d ⵉⵙⴳⴰⵙⵏ'
44 | },
45 | week : {
46 | dow : 6, // Saturday is the first day of the week.
47 | doy : 12 // The week that contains Jan 1st is the first week of the year.
48 | }
49 | });
50 |
51 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/locale/ar-dz.js:
--------------------------------------------------------------------------------
1 | //! moment.js locale configuration
2 | //! locale : Arabic (Algeria) [ar-dz]
3 | //! author : Noureddine LOUAHEDJ : https://github.com/noureddineme
4 |
5 | import moment from '../moment';
6 |
7 | export default moment.defineLocale('ar-dz', {
8 | months : 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),
9 | monthsShort : 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),
10 | weekdays : 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
11 | weekdaysShort : 'احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),
12 | weekdaysMin : 'أح_إث_ثلا_أر_خم_جم_سب'.split('_'),
13 | weekdaysParseExact : true,
14 | longDateFormat : {
15 | LT : 'HH:mm',
16 | LTS : 'HH:mm:ss',
17 | L : 'DD/MM/YYYY',
18 | LL : 'D MMMM YYYY',
19 | LLL : 'D MMMM YYYY HH:mm',
20 | LLLL : 'dddd D MMMM YYYY HH:mm'
21 | },
22 | calendar : {
23 | sameDay: '[اليوم على الساعة] LT',
24 | nextDay: '[غدا على الساعة] LT',
25 | nextWeek: 'dddd [على الساعة] LT',
26 | lastDay: '[أمس على الساعة] LT',
27 | lastWeek: 'dddd [على الساعة] LT',
28 | sameElse: 'L'
29 | },
30 | relativeTime : {
31 | future : 'في %s',
32 | past : 'منذ %s',
33 | s : 'ثوان',
34 | ss : '%d ثانية',
35 | m : 'دقيقة',
36 | mm : '%d دقائق',
37 | h : 'ساعة',
38 | hh : '%d ساعات',
39 | d : 'يوم',
40 | dd : '%d أيام',
41 | M : 'شهر',
42 | MM : '%d أشهر',
43 | y : 'سنة',
44 | yy : '%d سنوات'
45 | },
46 | week : {
47 | dow : 0, // Sunday is the first day of the week.
48 | doy : 4 // The week that contains Jan 1st is the first week of the year.
49 | }
50 | });
51 |
52 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/locale/uz-latn.js:
--------------------------------------------------------------------------------
1 | //! moment.js locale configuration
2 | //! locale : Uzbek Latin [uz-latn]
3 | //! author : Rasulbek Mirzayev : github.com/Rasulbeeek
4 |
5 | import moment from '../moment';
6 |
7 | export default moment.defineLocale('uz-latn', {
8 | months : 'Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr'.split('_'),
9 | monthsShort : 'Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek'.split('_'),
10 | weekdays : 'Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba'.split('_'),
11 | weekdaysShort : 'Yak_Dush_Sesh_Chor_Pay_Jum_Shan'.split('_'),
12 | weekdaysMin : 'Ya_Du_Se_Cho_Pa_Ju_Sha'.split('_'),
13 | longDateFormat : {
14 | LT : 'HH:mm',
15 | LTS : 'HH:mm:ss',
16 | L : 'DD/MM/YYYY',
17 | LL : 'D MMMM YYYY',
18 | LLL : 'D MMMM YYYY HH:mm',
19 | LLLL : 'D MMMM YYYY, dddd HH:mm'
20 | },
21 | calendar : {
22 | sameDay : '[Bugun soat] LT [da]',
23 | nextDay : '[Ertaga] LT [da]',
24 | nextWeek : 'dddd [kuni soat] LT [da]',
25 | lastDay : '[Kecha soat] LT [da]',
26 | lastWeek : '[O\'tgan] dddd [kuni soat] LT [da]',
27 | sameElse : 'L'
28 | },
29 | relativeTime : {
30 | future : 'Yaqin %s ichida',
31 | past : 'Bir necha %s oldin',
32 | s : 'soniya',
33 | ss : '%d soniya',
34 | m : 'bir daqiqa',
35 | mm : '%d daqiqa',
36 | h : 'bir soat',
37 | hh : '%d soat',
38 | d : 'bir kun',
39 | dd : '%d kun',
40 | M : 'bir oy',
41 | MM : '%d oy',
42 | y : 'bir yil',
43 | yy : '%d yil'
44 | },
45 | week : {
46 | dow : 1, // Monday is the first day of the week.
47 | doy : 7 // The week that contains Jan 1st is the first week of the year.
48 | }
49 | });
50 |
51 |
--------------------------------------------------------------------------------
/message/notify_order_ready.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | const debug = require("debug")("bot-express:message")
4 | const Message = require("./message");
5 |
6 | module.exports = class MessageNotifyOrderReady extends Message {
7 | constructor(translator){
8 | super(translator);
9 | }
10 |
11 | /**
12 | * @method
13 | * @async
14 | * @param {options} options
15 | * @param {order} options.order
16 | * @return {FlexMessageObject}
17 | */
18 | async order_ready(options){
19 | const order = options.order;
20 |
21 | let message = {
22 | type: "flex",
23 | altText: await this.t.t("your_order_is_ready"),
24 | contents: {
25 | type: "bubble",
26 | body: {
27 | type: "box",
28 | layout: "vertical",
29 | spacing: "xl",
30 | contents: [{
31 | type: "text",
32 | text: await this.t.t(`reference_number`),
33 | align: "center",
34 | size: "sm",
35 | weight: "bold"
36 | },{
37 | type: "text",
38 | text: order.reference_number,
39 | align: "center",
40 | size: "4xl",
41 | weight: "bold"
42 | },{
43 | type: "separator"
44 | },{
45 | type: "text",
46 | text: await this.t.t("your_order_is_ready"),
47 | wrap: true
48 | }]
49 | }
50 | }
51 | } // End of message
52 |
53 | debug(JSON.stringify(message));
54 |
55 | return message;
56 | }
57 | }
--------------------------------------------------------------------------------
/public/bower_components/moment/src/locale/da.js:
--------------------------------------------------------------------------------
1 | //! moment.js locale configuration
2 | //! locale : Danish [da]
3 | //! author : Ulrik Nielsen : https://github.com/mrbase
4 |
5 | import moment from '../moment';
6 |
7 | export default moment.defineLocale('da', {
8 | months : 'januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december'.split('_'),
9 | monthsShort : 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),
10 | weekdays : 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),
11 | weekdaysShort : 'søn_man_tir_ons_tor_fre_lør'.split('_'),
12 | weekdaysMin : 'sø_ma_ti_on_to_fr_lø'.split('_'),
13 | longDateFormat : {
14 | LT : 'HH:mm',
15 | LTS : 'HH:mm:ss',
16 | L : 'DD.MM.YYYY',
17 | LL : 'D. MMMM YYYY',
18 | LLL : 'D. MMMM YYYY HH:mm',
19 | LLLL : 'dddd [d.] D. MMMM YYYY [kl.] HH:mm'
20 | },
21 | calendar : {
22 | sameDay : '[i dag kl.] LT',
23 | nextDay : '[i morgen kl.] LT',
24 | nextWeek : 'på dddd [kl.] LT',
25 | lastDay : '[i går kl.] LT',
26 | lastWeek : '[i] dddd[s kl.] LT',
27 | sameElse : 'L'
28 | },
29 | relativeTime : {
30 | future : 'om %s',
31 | past : '%s siden',
32 | s : 'få sekunder',
33 | ss : '%d sekunder',
34 | m : 'et minut',
35 | mm : '%d minutter',
36 | h : 'en time',
37 | hh : '%d timer',
38 | d : 'en dag',
39 | dd : '%d dage',
40 | M : 'en måned',
41 | MM : '%d måneder',
42 | y : 'et år',
43 | yy : '%d år'
44 | },
45 | dayOfMonthOrdinalParse: /\d{1,2}\./,
46 | ordinal : '%d.',
47 | week : {
48 | dow : 1, // Monday is the first day of the week.
49 | doy : 4 // The week that contains Jan 4th is the first week of the year.
50 | }
51 | });
52 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/locale/sw.js:
--------------------------------------------------------------------------------
1 | //! moment.js locale configuration
2 | //! locale : Swahili [sw]
3 | //! author : Fahad Kassim : https://github.com/fadsel
4 |
5 | import moment from '../moment';
6 |
7 | export default moment.defineLocale('sw', {
8 | months : 'Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba'.split('_'),
9 | monthsShort : 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des'.split('_'),
10 | weekdays : 'Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi'.split('_'),
11 | weekdaysShort : 'Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos'.split('_'),
12 | weekdaysMin : 'J2_J3_J4_J5_Al_Ij_J1'.split('_'),
13 | weekdaysParseExact : true,
14 | longDateFormat : {
15 | LT : 'HH:mm',
16 | LTS : 'HH:mm:ss',
17 | L : 'DD.MM.YYYY',
18 | LL : 'D MMMM YYYY',
19 | LLL : 'D MMMM YYYY HH:mm',
20 | LLLL : 'dddd, D MMMM YYYY HH:mm'
21 | },
22 | calendar : {
23 | sameDay : '[leo saa] LT',
24 | nextDay : '[kesho saa] LT',
25 | nextWeek : '[wiki ijayo] dddd [saat] LT',
26 | lastDay : '[jana] LT',
27 | lastWeek : '[wiki iliyopita] dddd [saat] LT',
28 | sameElse : 'L'
29 | },
30 | relativeTime : {
31 | future : '%s baadaye',
32 | past : 'tokea %s',
33 | s : 'hivi punde',
34 | ss : 'sekunde %d',
35 | m : 'dakika moja',
36 | mm : 'dakika %d',
37 | h : 'saa limoja',
38 | hh : 'masaa %d',
39 | d : 'siku moja',
40 | dd : 'masiku %d',
41 | M : 'mwezi mmoja',
42 | MM : 'miezi %d',
43 | y : 'mwaka mmoja',
44 | yy : 'miaka %d'
45 | },
46 | week : {
47 | dow : 1, // Monday is the first day of the week.
48 | doy : 7 // The week that contains Jan 1st is the first week of the year.
49 | }
50 | });
51 |
52 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/locale/tzm-latn.js:
--------------------------------------------------------------------------------
1 | //! moment.js locale configuration
2 | //! locale : Central Atlas Tamazight Latin [tzm-latn]
3 | //! author : Abdel Said : https://github.com/abdelsaid
4 |
5 | import moment from '../moment';
6 |
7 | export default moment.defineLocale('tzm-latn', {
8 | months : 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split('_'),
9 | monthsShort : 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split('_'),
10 | weekdays : 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),
11 | weekdaysShort : 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),
12 | weekdaysMin : 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),
13 | longDateFormat : {
14 | LT : 'HH:mm',
15 | LTS : 'HH:mm:ss',
16 | L : 'DD/MM/YYYY',
17 | LL : 'D MMMM YYYY',
18 | LLL : 'D MMMM YYYY HH:mm',
19 | LLLL : 'dddd D MMMM YYYY HH:mm'
20 | },
21 | calendar : {
22 | sameDay: '[asdkh g] LT',
23 | nextDay: '[aska g] LT',
24 | nextWeek: 'dddd [g] LT',
25 | lastDay: '[assant g] LT',
26 | lastWeek: 'dddd [g] LT',
27 | sameElse: 'L'
28 | },
29 | relativeTime : {
30 | future : 'dadkh s yan %s',
31 | past : 'yan %s',
32 | s : 'imik',
33 | ss : '%d imik',
34 | m : 'minuḍ',
35 | mm : '%d minuḍ',
36 | h : 'saɛa',
37 | hh : '%d tassaɛin',
38 | d : 'ass',
39 | dd : '%d ossan',
40 | M : 'ayowr',
41 | MM : '%d iyyirn',
42 | y : 'asgas',
43 | yy : '%d isgasn'
44 | },
45 | week : {
46 | dow : 6, // Saturday is the first day of the week.
47 | doy : 12 // The week that contains Jan 1st is the first week of the year.
48 | }
49 | });
50 |
51 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/locale/mt.js:
--------------------------------------------------------------------------------
1 | //! moment.js locale configuration
2 | //! locale : Maltese (Malta) [mt]
3 | //! author : Alessandro Maruccia : https://github.com/alesma
4 |
5 | import moment from '../moment';
6 |
7 | export default moment.defineLocale('mt', {
8 | months : 'Jannar_Frar_Marzu_April_Mejju_Ġunju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Diċembru'.split('_'),
9 | monthsShort : 'Jan_Fra_Mar_Apr_Mej_Ġun_Lul_Aww_Set_Ott_Nov_Diċ'.split('_'),
10 | weekdays : 'Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ġimgħa_Is-Sibt'.split('_'),
11 | weekdaysShort : 'Ħad_Tne_Tli_Erb_Ħam_Ġim_Sib'.split('_'),
12 | weekdaysMin : 'Ħa_Tn_Tl_Er_Ħa_Ġi_Si'.split('_'),
13 | longDateFormat : {
14 | LT : 'HH:mm',
15 | LTS : 'HH:mm:ss',
16 | L : 'DD/MM/YYYY',
17 | LL : 'D MMMM YYYY',
18 | LLL : 'D MMMM YYYY HH:mm',
19 | LLLL : 'dddd, D MMMM YYYY HH:mm'
20 | },
21 | calendar : {
22 | sameDay : '[Illum fil-]LT',
23 | nextDay : '[Għada fil-]LT',
24 | nextWeek : 'dddd [fil-]LT',
25 | lastDay : '[Il-bieraħ fil-]LT',
26 | lastWeek : 'dddd [li għadda] [fil-]LT',
27 | sameElse : 'L'
28 | },
29 | relativeTime : {
30 | future : 'f’ %s',
31 | past : '%s ilu',
32 | s : 'ftit sekondi',
33 | ss : '%d sekondi',
34 | m : 'minuta',
35 | mm : '%d minuti',
36 | h : 'siegħa',
37 | hh : '%d siegħat',
38 | d : 'ġurnata',
39 | dd : '%d ġranet',
40 | M : 'xahar',
41 | MM : '%d xhur',
42 | y : 'sena',
43 | yy : '%d sni'
44 | },
45 | dayOfMonthOrdinalParse : /\d{1,2}º/,
46 | ordinal: '%dº',
47 | week : {
48 | dow : 1, // Monday is the first day of the week.
49 | doy : 4 // The week that contains Jan 4th is the first week of the year.
50 | }
51 | });
52 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/locale/nn.js:
--------------------------------------------------------------------------------
1 | //! moment.js locale configuration
2 | //! locale : Nynorsk [nn]
3 | //! author : https://github.com/mechuwind
4 |
5 | import moment from '../moment';
6 |
7 | export default moment.defineLocale('nn', {
8 | months : 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split('_'),
9 | monthsShort : 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'),
10 | weekdays : 'sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag'.split('_'),
11 | weekdaysShort : 'sun_mån_tys_ons_tor_fre_lau'.split('_'),
12 | weekdaysMin : 'su_må_ty_on_to_fr_lø'.split('_'),
13 | longDateFormat : {
14 | LT : 'HH:mm',
15 | LTS : 'HH:mm:ss',
16 | L : 'DD.MM.YYYY',
17 | LL : 'D. MMMM YYYY',
18 | LLL : 'D. MMMM YYYY [kl.] H:mm',
19 | LLLL : 'dddd D. MMMM YYYY [kl.] HH:mm'
20 | },
21 | calendar : {
22 | sameDay: '[I dag klokka] LT',
23 | nextDay: '[I morgon klokka] LT',
24 | nextWeek: 'dddd [klokka] LT',
25 | lastDay: '[I går klokka] LT',
26 | lastWeek: '[Føregåande] dddd [klokka] LT',
27 | sameElse: 'L'
28 | },
29 | relativeTime : {
30 | future : 'om %s',
31 | past : '%s sidan',
32 | s : 'nokre sekund',
33 | ss : '%d sekund',
34 | m : 'eit minutt',
35 | mm : '%d minutt',
36 | h : 'ein time',
37 | hh : '%d timar',
38 | d : 'ein dag',
39 | dd : '%d dagar',
40 | M : 'ein månad',
41 | MM : '%d månader',
42 | y : 'eit år',
43 | yy : '%d år'
44 | },
45 | dayOfMonthOrdinalParse: /\d{1,2}\./,
46 | ordinal : '%d.',
47 | week : {
48 | dow : 1, // Monday is the first day of the week.
49 | doy : 4 // The week that contains Jan 4th is the first week of the year.
50 | }
51 | });
52 |
53 |
--------------------------------------------------------------------------------
/test/skill/faq_is_hot/finish.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | require("dotenv").config();
4 |
5 | const chai = require('chai');
6 | const chaiAsPromised = require('chai-as-promised');
7 | const Emulator = require("../../../test-util/emulator");
8 | const messenger_option = {
9 | name: "line",
10 | options: {
11 | line_channel_secret: process.env.LINE_BOT_CHANNEL_SECRET
12 | }
13 | };
14 | const user_id = "order";
15 | chai.use(chaiAsPromised);
16 | const should = chai.should();
17 | const SENDER_LANGUAGE = "en";
18 |
19 | const emu = new Emulator(messenger_option.name, messenger_option.options);
20 |
21 | const Translation = require("../../../translation/translation");
22 | const t = new Translation(undefined, SENDER_LANGUAGE);
23 |
24 | describe("Test faq_is_hot skill", async function(){
25 | beforeEach(async () => {
26 | await emu.clear_context(user_id);
27 | })
28 |
29 | describe("If it is launched as sub skill and menu has the item,", async function(){
30 | it("provides answer and get back to parent skill.", async function(){
31 | let context;
32 |
33 | context = await emu.send(emu.create_postback_event(user_id, {data: JSON.stringify({
34 | type: "intent",
35 | intent: {
36 | name: "order"
37 | },
38 | language: SENDER_LANGUAGE
39 | })}));
40 |
41 | context.intent.name.should.equal("order");
42 | context.confirming.should.equal("label");
43 |
44 | context = await emu.send(emu.create_message_event(user_id, "How hot is Pad Thai?"));
45 |
46 | context.previous.message[0].message.text.should.equal(await t.t("x_is_moderately_hot", { item_label: "Pad Thai" }))
47 | context.intent.name.should.equal("order");
48 | context.confirming.should.equal("label");
49 | })
50 | })
51 | })
--------------------------------------------------------------------------------
/public/bower_components/moment/src/locale/ar-ma.js:
--------------------------------------------------------------------------------
1 | //! moment.js locale configuration
2 | //! locale : Arabic (Morocco) [ar-ma]
3 | //! author : ElFadili Yassine : https://github.com/ElFadiliY
4 | //! author : Abdel Said : https://github.com/abdelsaid
5 |
6 | import moment from '../moment';
7 |
8 | export default moment.defineLocale('ar-ma', {
9 | months : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'),
10 | monthsShort : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'),
11 | weekdays : 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
12 | weekdaysShort : 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),
13 | weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'),
14 | weekdaysParseExact : true,
15 | longDateFormat : {
16 | LT : 'HH:mm',
17 | LTS : 'HH:mm:ss',
18 | L : 'DD/MM/YYYY',
19 | LL : 'D MMMM YYYY',
20 | LLL : 'D MMMM YYYY HH:mm',
21 | LLLL : 'dddd D MMMM YYYY HH:mm'
22 | },
23 | calendar : {
24 | sameDay: '[اليوم على الساعة] LT',
25 | nextDay: '[غدا على الساعة] LT',
26 | nextWeek: 'dddd [على الساعة] LT',
27 | lastDay: '[أمس على الساعة] LT',
28 | lastWeek: 'dddd [على الساعة] LT',
29 | sameElse: 'L'
30 | },
31 | relativeTime : {
32 | future : 'في %s',
33 | past : 'منذ %s',
34 | s : 'ثوان',
35 | ss : '%d ثانية',
36 | m : 'دقيقة',
37 | mm : '%d دقائق',
38 | h : 'ساعة',
39 | hh : '%d ساعات',
40 | d : 'يوم',
41 | dd : '%d أيام',
42 | M : 'شهر',
43 | MM : '%d أشهر',
44 | y : 'سنة',
45 | yy : '%d سنوات'
46 | },
47 | week : {
48 | dow : 6, // Saturday is the first day of the week.
49 | doy : 12 // The week that contains Jan 1st is the first week of the year.
50 | }
51 | });
52 |
53 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/locale/fo.js:
--------------------------------------------------------------------------------
1 | //! moment.js locale configuration
2 | //! locale : Faroese [fo]
3 | //! author : Ragnar Johannesen : https://github.com/ragnar123
4 |
5 | import moment from '../moment';
6 |
7 | export default moment.defineLocale('fo', {
8 | months : 'januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember'.split('_'),
9 | monthsShort : 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'),
10 | weekdays : 'sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur'.split('_'),
11 | weekdaysShort : 'sun_mán_týs_mik_hós_frí_ley'.split('_'),
12 | weekdaysMin : 'su_má_tý_mi_hó_fr_le'.split('_'),
13 | longDateFormat : {
14 | LT : 'HH:mm',
15 | LTS : 'HH:mm:ss',
16 | L : 'DD/MM/YYYY',
17 | LL : 'D MMMM YYYY',
18 | LLL : 'D MMMM YYYY HH:mm',
19 | LLLL : 'dddd D. MMMM, YYYY HH:mm'
20 | },
21 | calendar : {
22 | sameDay : '[Í dag kl.] LT',
23 | nextDay : '[Í morgin kl.] LT',
24 | nextWeek : 'dddd [kl.] LT',
25 | lastDay : '[Í gjár kl.] LT',
26 | lastWeek : '[síðstu] dddd [kl] LT',
27 | sameElse : 'L'
28 | },
29 | relativeTime : {
30 | future : 'um %s',
31 | past : '%s síðani',
32 | s : 'fá sekund',
33 | ss : '%d sekundir',
34 | m : 'ein minutt',
35 | mm : '%d minuttir',
36 | h : 'ein tími',
37 | hh : '%d tímar',
38 | d : 'ein dagur',
39 | dd : '%d dagar',
40 | M : 'ein mánaði',
41 | MM : '%d mánaðir',
42 | y : 'eitt ár',
43 | yy : '%d ár'
44 | },
45 | dayOfMonthOrdinalParse: /\d{1,2}\./,
46 | ordinal : '%d.',
47 | week : {
48 | dow : 1, // Monday is the first day of the week.
49 | doy : 4 // The week that contains Jan 4th is the first week of the year.
50 | }
51 | });
52 |
53 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/utils/deprecate.js:
--------------------------------------------------------------------------------
1 | import extend from './extend';
2 | import { hooks } from './hooks';
3 | import isUndefined from './is-undefined';
4 |
5 | function warn(msg) {
6 | if (hooks.suppressDeprecationWarnings === false &&
7 | (typeof console !== 'undefined') && console.warn) {
8 | console.warn('Deprecation warning: ' + msg);
9 | }
10 | }
11 |
12 | export function deprecate(msg, fn) {
13 | var firstTime = true;
14 |
15 | return extend(function () {
16 | if (hooks.deprecationHandler != null) {
17 | hooks.deprecationHandler(null, msg);
18 | }
19 | if (firstTime) {
20 | var args = [];
21 | var arg;
22 | for (var i = 0; i < arguments.length; i++) {
23 | arg = '';
24 | if (typeof arguments[i] === 'object') {
25 | arg += '\n[' + i + '] ';
26 | for (var key in arguments[0]) {
27 | arg += key + ': ' + arguments[0][key] + ', ';
28 | }
29 | arg = arg.slice(0, -2); // Remove trailing comma and space
30 | } else {
31 | arg = arguments[i];
32 | }
33 | args.push(arg);
34 | }
35 | warn(msg + '\nArguments: ' + Array.prototype.slice.call(args).join('') + '\n' + (new Error()).stack);
36 | firstTime = false;
37 | }
38 | return fn.apply(this, arguments);
39 | }, fn);
40 | }
41 |
42 | var deprecations = {};
43 |
44 | export function deprecateSimple(name, msg) {
45 | if (hooks.deprecationHandler != null) {
46 | hooks.deprecationHandler(name, msg);
47 | }
48 | if (!deprecations[name]) {
49 | warn(msg);
50 | deprecations[name] = true;
51 | }
52 | }
53 |
54 | hooks.suppressDeprecationWarnings = false;
55 | hooks.deprecationHandler = null;
56 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/locale/set.js:
--------------------------------------------------------------------------------
1 | import isFunction from '../utils/is-function';
2 | import extend from '../utils/extend';
3 | import isObject from '../utils/is-object';
4 | import hasOwnProp from '../utils/has-own-prop';
5 |
6 | export function set (config) {
7 | var prop, i;
8 | for (i in config) {
9 | prop = config[i];
10 | if (isFunction(prop)) {
11 | this[i] = prop;
12 | } else {
13 | this['_' + i] = prop;
14 | }
15 | }
16 | this._config = config;
17 | // Lenient ordinal parsing accepts just a number in addition to
18 | // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.
19 | // TODO: Remove "ordinalParse" fallback in next major release.
20 | this._dayOfMonthOrdinalParseLenient = new RegExp(
21 | (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +
22 | '|' + (/\d{1,2}/).source);
23 | }
24 |
25 | export function mergeConfigs(parentConfig, childConfig) {
26 | var res = extend({}, parentConfig), prop;
27 | for (prop in childConfig) {
28 | if (hasOwnProp(childConfig, prop)) {
29 | if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {
30 | res[prop] = {};
31 | extend(res[prop], parentConfig[prop]);
32 | extend(res[prop], childConfig[prop]);
33 | } else if (childConfig[prop] != null) {
34 | res[prop] = childConfig[prop];
35 | } else {
36 | delete res[prop];
37 | }
38 | }
39 | }
40 | for (prop in parentConfig) {
41 | if (hasOwnProp(parentConfig, prop) &&
42 | !hasOwnProp(childConfig, prop) &&
43 | isObject(parentConfig[prop])) {
44 | // make sure changes to properties don't modify parent config
45 | res[prop] = extend({}, res[prop]);
46 | }
47 | }
48 | return res;
49 | }
50 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/locale/yo.js:
--------------------------------------------------------------------------------
1 | //! moment.js locale configuration
2 | //! locale : Yoruba Nigeria [yo]
3 | //! author : Atolagbe Abisoye : https://github.com/andela-batolagbe
4 |
5 | import moment from '../moment';
6 |
7 | export default moment.defineLocale('yo', {
8 | months : 'Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀'.split('_'),
9 | monthsShort : 'Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀'.split('_'),
10 | weekdays : 'Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta'.split('_'),
11 | weekdaysShort : 'Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá'.split('_'),
12 | weekdaysMin : 'Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb'.split('_'),
13 | longDateFormat : {
14 | LT : 'h:mm A',
15 | LTS : 'h:mm:ss A',
16 | L : 'DD/MM/YYYY',
17 | LL : 'D MMMM YYYY',
18 | LLL : 'D MMMM YYYY h:mm A',
19 | LLLL : 'dddd, D MMMM YYYY h:mm A'
20 | },
21 | calendar : {
22 | sameDay : '[Ònì ni] LT',
23 | nextDay : '[Ọ̀la ni] LT',
24 | nextWeek : 'dddd [Ọsẹ̀ tón\'bọ] [ni] LT',
25 | lastDay : '[Àna ni] LT',
26 | lastWeek : 'dddd [Ọsẹ̀ tólọ́] [ni] LT',
27 | sameElse : 'L'
28 | },
29 | relativeTime : {
30 | future : 'ní %s',
31 | past : '%s kọjá',
32 | s : 'ìsẹjú aayá die',
33 | ss :'aayá %d',
34 | m : 'ìsẹjú kan',
35 | mm : 'ìsẹjú %d',
36 | h : 'wákati kan',
37 | hh : 'wákati %d',
38 | d : 'ọjọ́ kan',
39 | dd : 'ọjọ́ %d',
40 | M : 'osù kan',
41 | MM : 'osù %d',
42 | y : 'ọdún kan',
43 | yy : 'ọdún %d'
44 | },
45 | dayOfMonthOrdinalParse : /ọjọ́\s\d{1,2}/,
46 | ordinal : 'ọjọ́ %d',
47 | week : {
48 | dow : 1, // Monday is the first day of the week.
49 | doy : 4 // The week that contains Jan 4th is the first week of the year.
50 | }
51 | });
52 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/locale/en-il.js:
--------------------------------------------------------------------------------
1 | //! moment.js locale configuration
2 | //! locale : English (Israel) [en-il]
3 | //! author : Chris Gedrim : https://github.com/chrisgedrim
4 |
5 | import moment from '../moment';
6 |
7 | export default moment.defineLocale('en-il', {
8 | months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),
9 | monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
10 | weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
11 | weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
12 | weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
13 | longDateFormat : {
14 | LT : 'HH:mm',
15 | LTS : 'HH:mm:ss',
16 | L : 'DD/MM/YYYY',
17 | LL : 'D MMMM YYYY',
18 | LLL : 'D MMMM YYYY HH:mm',
19 | LLLL : 'dddd, D MMMM YYYY HH:mm'
20 | },
21 | calendar : {
22 | sameDay : '[Today at] LT',
23 | nextDay : '[Tomorrow at] LT',
24 | nextWeek : 'dddd [at] LT',
25 | lastDay : '[Yesterday at] LT',
26 | lastWeek : '[Last] dddd [at] LT',
27 | sameElse : 'L'
28 | },
29 | relativeTime : {
30 | future : 'in %s',
31 | past : '%s ago',
32 | s : 'a few seconds',
33 | m : 'a minute',
34 | mm : '%d minutes',
35 | h : 'an hour',
36 | hh : '%d hours',
37 | d : 'a day',
38 | dd : '%d days',
39 | M : 'a month',
40 | MM : '%d months',
41 | y : 'a year',
42 | yy : '%d years'
43 | },
44 | dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
45 | ordinal : function (number) {
46 | var b = number % 10,
47 | output = (~~(number % 100 / 10) === 1) ? 'th' :
48 | (b === 1) ? 'st' :
49 | (b === 2) ? 'nd' :
50 | (b === 3) ? 'rd' : 'th';
51 | return number + output;
52 | }
53 | });
54 |
55 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/locale/tl-ph.js:
--------------------------------------------------------------------------------
1 | //! moment.js locale configuration
2 | //! locale : Tagalog (Philippines) [tl-ph]
3 | //! author : Dan Hagman : https://github.com/hagmandan
4 |
5 | import moment from '../moment';
6 |
7 | export default moment.defineLocale('tl-ph', {
8 | months : 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split('_'),
9 | monthsShort : 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'),
10 | weekdays : 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split('_'),
11 | weekdaysShort : 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'),
12 | weekdaysMin : 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'),
13 | longDateFormat : {
14 | LT : 'HH:mm',
15 | LTS : 'HH:mm:ss',
16 | L : 'MM/D/YYYY',
17 | LL : 'MMMM D, YYYY',
18 | LLL : 'MMMM D, YYYY HH:mm',
19 | LLLL : 'dddd, MMMM DD, YYYY HH:mm'
20 | },
21 | calendar : {
22 | sameDay: 'LT [ngayong araw]',
23 | nextDay: '[Bukas ng] LT',
24 | nextWeek: 'LT [sa susunod na] dddd',
25 | lastDay: 'LT [kahapon]',
26 | lastWeek: 'LT [noong nakaraang] dddd',
27 | sameElse: 'L'
28 | },
29 | relativeTime : {
30 | future : 'sa loob ng %s',
31 | past : '%s ang nakalipas',
32 | s : 'ilang segundo',
33 | ss : '%d segundo',
34 | m : 'isang minuto',
35 | mm : '%d minuto',
36 | h : 'isang oras',
37 | hh : '%d oras',
38 | d : 'isang araw',
39 | dd : '%d araw',
40 | M : 'isang buwan',
41 | MM : '%d buwan',
42 | y : 'isang taon',
43 | yy : '%d taon'
44 | },
45 | dayOfMonthOrdinalParse: /\d{1,2}/,
46 | ordinal : function (number) {
47 | return number;
48 | },
49 | week : {
50 | dow : 1, // Monday is the first day of the week.
51 | doy : 4 // The week that contains Jan 4th is the first week of the year.
52 | }
53 | });
54 |
55 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/locale/bm.js:
--------------------------------------------------------------------------------
1 | //! moment.js locale configuration
2 | //! locale : Bambara [bm]
3 | //! author : Estelle Comment : https://github.com/estellecomment
4 | // Language contact person : Abdoufata Kane : https://github.com/abdoufata
5 |
6 | import moment from '../moment';
7 |
8 | export default moment.defineLocale('bm', {
9 | months : 'Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_Mɛkalo_Zuwɛnkalo_Zuluyekalo_Utikalo_Sɛtanburukalo_ɔkutɔburukalo_Nowanburukalo_Desanburukalo'.split('_'),
10 | monthsShort : 'Zan_Few_Mar_Awi_Mɛ_Zuw_Zul_Uti_Sɛt_ɔku_Now_Des'.split('_'),
11 | weekdays : 'Kari_Ntɛnɛn_Tarata_Araba_Alamisa_Juma_Sibiri'.split('_'),
12 | weekdaysShort : 'Kar_Ntɛ_Tar_Ara_Ala_Jum_Sib'.split('_'),
13 | weekdaysMin : 'Ka_Nt_Ta_Ar_Al_Ju_Si'.split('_'),
14 | longDateFormat : {
15 | LT : 'HH:mm',
16 | LTS : 'HH:mm:ss',
17 | L : 'DD/MM/YYYY',
18 | LL : 'MMMM [tile] D [san] YYYY',
19 | LLL : 'MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm',
20 | LLLL : 'dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm'
21 | },
22 | calendar : {
23 | sameDay : '[Bi lɛrɛ] LT',
24 | nextDay : '[Sini lɛrɛ] LT',
25 | nextWeek : 'dddd [don lɛrɛ] LT',
26 | lastDay : '[Kunu lɛrɛ] LT',
27 | lastWeek : 'dddd [tɛmɛnen lɛrɛ] LT',
28 | sameElse : 'L'
29 | },
30 | relativeTime : {
31 | future : '%s kɔnɔ',
32 | past : 'a bɛ %s bɔ',
33 | s : 'sanga dama dama',
34 | ss : 'sekondi %d',
35 | m : 'miniti kelen',
36 | mm : 'miniti %d',
37 | h : 'lɛrɛ kelen',
38 | hh : 'lɛrɛ %d',
39 | d : 'tile kelen',
40 | dd : 'tile %d',
41 | M : 'kalo kelen',
42 | MM : 'kalo %d',
43 | y : 'san kelen',
44 | yy : 'san %d'
45 | },
46 | week : {
47 | dow : 1, // Monday is the first day of the week.
48 | doy : 4 // The week that contains Jan 4th is the first week of the year.
49 | }
50 | });
51 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/locale/en-ca.js:
--------------------------------------------------------------------------------
1 | //! moment.js locale configuration
2 | //! locale : English (Canada) [en-ca]
3 | //! author : Jonathan Abourbih : https://github.com/jonbca
4 |
5 | import moment from '../moment';
6 |
7 | export default moment.defineLocale('en-ca', {
8 | months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),
9 | monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
10 | weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
11 | weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
12 | weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
13 | longDateFormat : {
14 | LT : 'h:mm A',
15 | LTS : 'h:mm:ss A',
16 | L : 'YYYY-MM-DD',
17 | LL : 'MMMM D, YYYY',
18 | LLL : 'MMMM D, YYYY h:mm A',
19 | LLLL : 'dddd, MMMM D, YYYY h:mm A'
20 | },
21 | calendar : {
22 | sameDay : '[Today at] LT',
23 | nextDay : '[Tomorrow at] LT',
24 | nextWeek : 'dddd [at] LT',
25 | lastDay : '[Yesterday at] LT',
26 | lastWeek : '[Last] dddd [at] LT',
27 | sameElse : 'L'
28 | },
29 | relativeTime : {
30 | future : 'in %s',
31 | past : '%s ago',
32 | s : 'a few seconds',
33 | ss : '%d seconds',
34 | m : 'a minute',
35 | mm : '%d minutes',
36 | h : 'an hour',
37 | hh : '%d hours',
38 | d : 'a day',
39 | dd : '%d days',
40 | M : 'a month',
41 | MM : '%d months',
42 | y : 'a year',
43 | yy : '%d years'
44 | },
45 | dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
46 | ordinal : function (number) {
47 | var b = number % 10,
48 | output = (~~(number % 100 / 10) === 1) ? 'th' :
49 | (b === 1) ? 'st' :
50 | (b === 2) ? 'nd' :
51 | (b === 3) ? 'rd' : 'th';
52 | return number + output;
53 | }
54 | });
55 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/units/week.js:
--------------------------------------------------------------------------------
1 | import { addFormatToken } from '../format/format';
2 | import { addUnitAlias } from './aliases';
3 | import { addUnitPriority } from './priorities';
4 | import { addRegexToken, match1to2, match2 } from '../parse/regex';
5 | import { addWeekParseToken } from '../parse/token';
6 | import toInt from '../utils/to-int';
7 | import { createLocal } from '../create/local';
8 | import { weekOfYear } from './week-calendar-utils';
9 |
10 | // FORMATTING
11 |
12 | addFormatToken('w', ['ww', 2], 'wo', 'week');
13 | addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');
14 |
15 | // ALIASES
16 |
17 | addUnitAlias('week', 'w');
18 | addUnitAlias('isoWeek', 'W');
19 |
20 | // PRIORITIES
21 |
22 | addUnitPriority('week', 5);
23 | addUnitPriority('isoWeek', 5);
24 |
25 | // PARSING
26 |
27 | addRegexToken('w', match1to2);
28 | addRegexToken('ww', match1to2, match2);
29 | addRegexToken('W', match1to2);
30 | addRegexToken('WW', match1to2, match2);
31 |
32 | addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) {
33 | week[token.substr(0, 1)] = toInt(input);
34 | });
35 |
36 | // HELPERS
37 |
38 | // LOCALES
39 |
40 | export function localeWeek (mom) {
41 | return weekOfYear(mom, this._week.dow, this._week.doy).week;
42 | }
43 |
44 | export var defaultLocaleWeek = {
45 | dow : 0, // Sunday is the first day of the week.
46 | doy : 6 // The week that contains Jan 1st is the first week of the year.
47 | };
48 |
49 | export function localeFirstDayOfWeek () {
50 | return this._week.dow;
51 | }
52 |
53 | export function localeFirstDayOfYear () {
54 | return this._week.doy;
55 | }
56 |
57 | // MOMENTS
58 |
59 | export function getSetWeek (input) {
60 | var week = this.localeData().week(this);
61 | return input == null ? week : this.add((input - week) * 7, 'd');
62 | }
63 |
64 | export function getSetISOWeek (input) {
65 | var week = weekOfYear(this, 1, 4).week;
66 | return input == null ? week : this.add((input - week) * 7, 'd');
67 | }
68 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/locale/pt-br.js:
--------------------------------------------------------------------------------
1 | //! moment.js locale configuration
2 | //! locale : Portuguese (Brazil) [pt-br]
3 | //! author : Caio Ribeiro Pereira : https://github.com/caio-ribeiro-pereira
4 |
5 | import moment from '../moment';
6 |
7 | export default moment.defineLocale('pt-br', {
8 | months : 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split('_'),
9 | monthsShort : 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'),
10 | weekdays : 'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split('_'),
11 | weekdaysShort : 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'),
12 | weekdaysMin : 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'),
13 | weekdaysParseExact : true,
14 | longDateFormat : {
15 | LT : 'HH:mm',
16 | LTS : 'HH:mm:ss',
17 | L : 'DD/MM/YYYY',
18 | LL : 'D [de] MMMM [de] YYYY',
19 | LLL : 'D [de] MMMM [de] YYYY [às] HH:mm',
20 | LLLL : 'dddd, D [de] MMMM [de] YYYY [às] HH:mm'
21 | },
22 | calendar : {
23 | sameDay: '[Hoje às] LT',
24 | nextDay: '[Amanhã às] LT',
25 | nextWeek: 'dddd [às] LT',
26 | lastDay: '[Ontem às] LT',
27 | lastWeek: function () {
28 | return (this.day() === 0 || this.day() === 6) ?
29 | '[Último] dddd [às] LT' : // Saturday + Sunday
30 | '[Última] dddd [às] LT'; // Monday - Friday
31 | },
32 | sameElse: 'L'
33 | },
34 | relativeTime : {
35 | future : 'em %s',
36 | past : 'há %s',
37 | s : 'poucos segundos',
38 | ss : '%d segundos',
39 | m : 'um minuto',
40 | mm : '%d minutos',
41 | h : 'uma hora',
42 | hh : '%d horas',
43 | d : 'um dia',
44 | dd : '%d dias',
45 | M : 'um mês',
46 | MM : '%d meses',
47 | y : 'um ano',
48 | yy : '%d anos'
49 | },
50 | dayOfMonthOrdinalParse: /\d{1,2}º/,
51 | ordinal : '%dº'
52 | });
53 |
54 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/locale/se.js:
--------------------------------------------------------------------------------
1 | //! moment.js locale configuration
2 | //! locale : Northern Sami [se]
3 | //! authors : Bård Rolstad Henriksen : https://github.com/karamell
4 |
5 |
6 | import moment from '../moment';
7 |
8 | export default moment.defineLocale('se', {
9 | months : 'ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu'.split('_'),
10 | monthsShort : 'ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov'.split('_'),
11 | weekdays : 'sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat'.split('_'),
12 | weekdaysShort : 'sotn_vuos_maŋ_gask_duor_bear_láv'.split('_'),
13 | weekdaysMin : 's_v_m_g_d_b_L'.split('_'),
14 | longDateFormat : {
15 | LT : 'HH:mm',
16 | LTS : 'HH:mm:ss',
17 | L : 'DD.MM.YYYY',
18 | LL : 'MMMM D. [b.] YYYY',
19 | LLL : 'MMMM D. [b.] YYYY [ti.] HH:mm',
20 | LLLL : 'dddd, MMMM D. [b.] YYYY [ti.] HH:mm'
21 | },
22 | calendar : {
23 | sameDay: '[otne ti] LT',
24 | nextDay: '[ihttin ti] LT',
25 | nextWeek: 'dddd [ti] LT',
26 | lastDay: '[ikte ti] LT',
27 | lastWeek: '[ovddit] dddd [ti] LT',
28 | sameElse: 'L'
29 | },
30 | relativeTime : {
31 | future : '%s geažes',
32 | past : 'maŋit %s',
33 | s : 'moadde sekunddat',
34 | ss: '%d sekunddat',
35 | m : 'okta minuhta',
36 | mm : '%d minuhtat',
37 | h : 'okta diimmu',
38 | hh : '%d diimmut',
39 | d : 'okta beaivi',
40 | dd : '%d beaivvit',
41 | M : 'okta mánnu',
42 | MM : '%d mánut',
43 | y : 'okta jahki',
44 | yy : '%d jagit'
45 | },
46 | dayOfMonthOrdinalParse: /\d{1,2}\./,
47 | ordinal : '%d.',
48 | week : {
49 | dow : 1, // Monday is the first day of the week.
50 | doy : 4 // The week that contains Jan 4th is the first week of the year.
51 | }
52 | });
53 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/locale/nb.js:
--------------------------------------------------------------------------------
1 | //! moment.js locale configuration
2 | //! locale : Norwegian Bokmål [nb]
3 | //! authors : Espen Hovlandsdal : https://github.com/rexxars
4 | //! Sigurd Gartmann : https://github.com/sigurdga
5 |
6 | import moment from '../moment';
7 |
8 | export default moment.defineLocale('nb', {
9 | months : 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split('_'),
10 | monthsShort : 'jan._feb._mars_april_mai_juni_juli_aug._sep._okt._nov._des.'.split('_'),
11 | monthsParseExact : true,
12 | weekdays : 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),
13 | weekdaysShort : 'sø._ma._ti._on._to._fr._lø.'.split('_'),
14 | weekdaysMin : 'sø_ma_ti_on_to_fr_lø'.split('_'),
15 | weekdaysParseExact : true,
16 | longDateFormat : {
17 | LT : 'HH:mm',
18 | LTS : 'HH:mm:ss',
19 | L : 'DD.MM.YYYY',
20 | LL : 'D. MMMM YYYY',
21 | LLL : 'D. MMMM YYYY [kl.] HH:mm',
22 | LLLL : 'dddd D. MMMM YYYY [kl.] HH:mm'
23 | },
24 | calendar : {
25 | sameDay: '[i dag kl.] LT',
26 | nextDay: '[i morgen kl.] LT',
27 | nextWeek: 'dddd [kl.] LT',
28 | lastDay: '[i går kl.] LT',
29 | lastWeek: '[forrige] dddd [kl.] LT',
30 | sameElse: 'L'
31 | },
32 | relativeTime : {
33 | future : 'om %s',
34 | past : '%s siden',
35 | s : 'noen sekunder',
36 | ss : '%d sekunder',
37 | m : 'ett minutt',
38 | mm : '%d minutter',
39 | h : 'en time',
40 | hh : '%d timer',
41 | d : 'en dag',
42 | dd : '%d dager',
43 | M : 'en måned',
44 | MM : '%d måneder',
45 | y : 'ett år',
46 | yy : '%d år'
47 | },
48 | dayOfMonthOrdinalParse: /\d{1,2}\./,
49 | ordinal : '%d.',
50 | week : {
51 | dow : 1, // Monday is the first day of the week.
52 | doy : 4 // The week that contains Jan 4th is the first week of the year.
53 | }
54 | });
55 |
56 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/moment/add-subtract.js:
--------------------------------------------------------------------------------
1 | import { get, set } from './get-set';
2 | import { setMonth } from '../units/month';
3 | import { createDuration } from '../duration/create';
4 | import { deprecateSimple } from '../utils/deprecate';
5 | import { hooks } from '../utils/hooks';
6 | import absRound from '../utils/abs-round';
7 |
8 |
9 | // TODO: remove 'name' arg after deprecation is removed
10 | function createAdder(direction, name) {
11 | return function (val, period) {
12 | var dur, tmp;
13 | //invert the arguments, but complain about it
14 | if (period !== null && !isNaN(+period)) {
15 | deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +
16 | 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');
17 | tmp = val; val = period; period = tmp;
18 | }
19 |
20 | val = typeof val === 'string' ? +val : val;
21 | dur = createDuration(val, period);
22 | addSubtract(this, dur, direction);
23 | return this;
24 | };
25 | }
26 |
27 | export function addSubtract (mom, duration, isAdding, updateOffset) {
28 | var milliseconds = duration._milliseconds,
29 | days = absRound(duration._days),
30 | months = absRound(duration._months);
31 |
32 | if (!mom.isValid()) {
33 | // No op
34 | return;
35 | }
36 |
37 | updateOffset = updateOffset == null ? true : updateOffset;
38 |
39 | if (months) {
40 | setMonth(mom, get(mom, 'Month') + months * isAdding);
41 | }
42 | if (days) {
43 | set(mom, 'Date', get(mom, 'Date') + days * isAdding);
44 | }
45 | if (milliseconds) {
46 | mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);
47 | }
48 | if (updateOffset) {
49 | hooks.updateOffset(mom, days || months);
50 | }
51 | }
52 |
53 | export var add = createAdder(1, 'add');
54 | export var subtract = createAdder(-1, 'subtract');
55 |
56 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/duration/prototype.js:
--------------------------------------------------------------------------------
1 | import { Duration } from './constructor';
2 |
3 | var proto = Duration.prototype;
4 |
5 | import { abs } from './abs';
6 | import { add, subtract } from './add-subtract';
7 | import { as, asMilliseconds, asSeconds, asMinutes, asHours, asDays, asWeeks, asMonths, asYears, valueOf } from './as';
8 | import { bubble } from './bubble';
9 | import { clone } from './clone';
10 | import { get, milliseconds, seconds, minutes, hours, days, months, years, weeks } from './get';
11 | import { humanize } from './humanize';
12 | import { toISOString } from './iso-string';
13 | import { lang, locale, localeData } from '../moment/locale';
14 | import { isValid } from './valid';
15 |
16 | proto.isValid = isValid;
17 | proto.abs = abs;
18 | proto.add = add;
19 | proto.subtract = subtract;
20 | proto.as = as;
21 | proto.asMilliseconds = asMilliseconds;
22 | proto.asSeconds = asSeconds;
23 | proto.asMinutes = asMinutes;
24 | proto.asHours = asHours;
25 | proto.asDays = asDays;
26 | proto.asWeeks = asWeeks;
27 | proto.asMonths = asMonths;
28 | proto.asYears = asYears;
29 | proto.valueOf = valueOf;
30 | proto._bubble = bubble;
31 | proto.clone = clone;
32 | proto.get = get;
33 | proto.milliseconds = milliseconds;
34 | proto.seconds = seconds;
35 | proto.minutes = minutes;
36 | proto.hours = hours;
37 | proto.days = days;
38 | proto.weeks = weeks;
39 | proto.months = months;
40 | proto.years = years;
41 | proto.humanize = humanize;
42 | proto.toISOString = toISOString;
43 | proto.toString = toISOString;
44 | proto.toJSON = toISOString;
45 | proto.locale = locale;
46 | proto.localeData = localeData;
47 |
48 | // Deprecations
49 | import { deprecate } from '../utils/deprecate';
50 |
51 | proto.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', toISOString);
52 | proto.lang = lang;
53 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/moment/get-set.js:
--------------------------------------------------------------------------------
1 | import { normalizeUnits, normalizeObjectUnits } from '../units/aliases';
2 | import { getPrioritizedUnits } from '../units/priorities';
3 | import { hooks } from '../utils/hooks';
4 | import isFunction from '../utils/is-function';
5 | import { daysInMonth } from '../units/month';
6 | import { isLeapYear } from '../units/year';
7 |
8 | export function makeGetSet (unit, keepTime) {
9 | return function (value) {
10 | if (value != null) {
11 | set(this, unit, value);
12 | hooks.updateOffset(this, keepTime);
13 | return this;
14 | } else {
15 | return get(this, unit);
16 | }
17 | };
18 | }
19 |
20 | export function get (mom, unit) {
21 | return mom.isValid() ?
22 | mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN;
23 | }
24 |
25 | export function set (mom, unit, value) {
26 | if (mom.isValid() && !isNaN(value)) {
27 | if (unit === 'FullYear' && isLeapYear(mom.year()) && mom.month() === 1 && mom.date() === 29) {
28 | mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value, mom.month(), daysInMonth(value, mom.month()));
29 | }
30 | else {
31 | mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);
32 | }
33 | }
34 | }
35 |
36 | // MOMENTS
37 |
38 | export function stringGet (units) {
39 | units = normalizeUnits(units);
40 | if (isFunction(this[units])) {
41 | return this[units]();
42 | }
43 | return this;
44 | }
45 |
46 |
47 | export function stringSet (units, value) {
48 | if (typeof units === 'object') {
49 | units = normalizeObjectUnits(units);
50 | var prioritized = getPrioritizedUnits(units);
51 | for (var i = 0; i < prioritized.length; i++) {
52 | this[prioritized[i].unit](units[prioritized[i].unit]);
53 | }
54 | } else {
55 | units = normalizeUnits(units);
56 | if (isFunction(this[units])) {
57 | return this[units](value);
58 | }
59 | }
60 | return this;
61 | }
62 |
--------------------------------------------------------------------------------
/skill/faq_search_item.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | const debug = require("debug")("bot-express:skill");
4 | const ServiceDb = require("../service/db");
5 | const db = new ServiceDb();
6 | const translate = require("../service/translate");
7 |
8 | module.exports = class SkillFaqSearchItem {
9 | constructor(){
10 | this.clear_context_on_finish = true;
11 |
12 | this.required_parameter = {
13 | item_label: {
14 | message: async (bot, event, context) => {
15 | let message = {
16 | type: "text",
17 | text: await bot.t("pls_tell_me_item_you_are_looking_for")
18 | }
19 | return message;
20 | },
21 | parser: "string"
22 | }
23 | }
24 | }
25 |
26 | async finish(bot, event, context){
27 | const menu_list = translate(await db.list("menu"), context.sender_language || "en");
28 | const item = menu_list.find(menu => menu.label === context.confirmed.item_label);
29 |
30 | if (!item){
31 | return await bot.reply({
32 | type: "text",
33 | text: await bot.t("sorry_we_do_not_have_x", { item_label: context.confirmed.item_label})
34 | })
35 | }
36 |
37 | let message = {
38 | type: "text",
39 | text: await bot.t(`yes_we_have_x`, { item_label: item.label }),
40 | }
41 |
42 | // If this is sub_skill, quick reply returns item label only to apply to label parameter.
43 | // If this is parent skill, quick reply return sentence to launch order skill.
44 | message = await bot.m.qr_push_item(message, {
45 | type: "action",
46 | action: {
47 | type: "message",
48 | label: await bot.t("order_x", { item_label: item.label }),
49 | text: (context._sub_skill) ? item.label : await bot.t("i_like_to_order_x", { item_label: item.label })
50 | }
51 | })
52 |
53 | await bot.reply(message);
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/locale/cv.js:
--------------------------------------------------------------------------------
1 | //! moment.js locale configuration
2 | //! locale : Chuvash [cv]
3 | //! author : Anatoly Mironov : https://github.com/mirontoli
4 |
5 | import moment from '../moment';
6 |
7 | export default moment.defineLocale('cv', {
8 | months : 'кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав'.split('_'),
9 | monthsShort : 'кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш'.split('_'),
10 | weekdays : 'вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун'.split('_'),
11 | weekdaysShort : 'выр_тун_ытл_юн_кӗҫ_эрн_шӑм'.split('_'),
12 | weekdaysMin : 'вр_тн_ыт_юн_кҫ_эр_шм'.split('_'),
13 | longDateFormat : {
14 | LT : 'HH:mm',
15 | LTS : 'HH:mm:ss',
16 | L : 'DD-MM-YYYY',
17 | LL : 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]',
18 | LLL : 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm',
19 | LLLL : 'dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm'
20 | },
21 | calendar : {
22 | sameDay: '[Паян] LT [сехетре]',
23 | nextDay: '[Ыран] LT [сехетре]',
24 | lastDay: '[Ӗнер] LT [сехетре]',
25 | nextWeek: '[Ҫитес] dddd LT [сехетре]',
26 | lastWeek: '[Иртнӗ] dddd LT [сехетре]',
27 | sameElse: 'L'
28 | },
29 | relativeTime : {
30 | future : function (output) {
31 | var affix = /сехет$/i.exec(output) ? 'рен' : /ҫул$/i.exec(output) ? 'тан' : 'ран';
32 | return output + affix;
33 | },
34 | past : '%s каялла',
35 | s : 'пӗр-ик ҫеккунт',
36 | ss : '%d ҫеккунт',
37 | m : 'пӗр минут',
38 | mm : '%d минут',
39 | h : 'пӗр сехет',
40 | hh : '%d сехет',
41 | d : 'пӗр кун',
42 | dd : '%d кун',
43 | M : 'пӗр уйӑх',
44 | MM : '%d уйӑх',
45 | y : 'пӗр ҫул',
46 | yy : '%d ҫул'
47 | },
48 | dayOfMonthOrdinalParse: /\d{1,2}-мӗш/,
49 | ordinal : '%d-мӗш',
50 | week : {
51 | dow : 1, // Monday is the first day of the week.
52 | doy : 7 // The week that contains Jan 1st is the first week of the year.
53 | }
54 | });
55 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/duration/bubble.js:
--------------------------------------------------------------------------------
1 | import absFloor from '../utils/abs-floor';
2 | import absCeil from '../utils/abs-ceil';
3 | import { createUTCDate } from '../create/date-from-array';
4 |
5 | export function bubble () {
6 | var milliseconds = this._milliseconds;
7 | var days = this._days;
8 | var months = this._months;
9 | var data = this._data;
10 | var seconds, minutes, hours, years, monthsFromDays;
11 |
12 | // if we have a mix of positive and negative values, bubble down first
13 | // check: https://github.com/moment/moment/issues/2166
14 | if (!((milliseconds >= 0 && days >= 0 && months >= 0) ||
15 | (milliseconds <= 0 && days <= 0 && months <= 0))) {
16 | milliseconds += absCeil(monthsToDays(months) + days) * 864e5;
17 | days = 0;
18 | months = 0;
19 | }
20 |
21 | // The following code bubbles up values, see the tests for
22 | // examples of what that means.
23 | data.milliseconds = milliseconds % 1000;
24 |
25 | seconds = absFloor(milliseconds / 1000);
26 | data.seconds = seconds % 60;
27 |
28 | minutes = absFloor(seconds / 60);
29 | data.minutes = minutes % 60;
30 |
31 | hours = absFloor(minutes / 60);
32 | data.hours = hours % 24;
33 |
34 | days += absFloor(hours / 24);
35 |
36 | // convert days to months
37 | monthsFromDays = absFloor(daysToMonths(days));
38 | months += monthsFromDays;
39 | days -= absCeil(monthsToDays(monthsFromDays));
40 |
41 | // 12 months -> 1 year
42 | years = absFloor(months / 12);
43 | months %= 12;
44 |
45 | data.days = days;
46 | data.months = months;
47 | data.years = years;
48 |
49 | return this;
50 | }
51 |
52 | export function daysToMonths (days) {
53 | // 400 years have 146097 days (taking into account leap year rules)
54 | // 400 years have 12 months === 4800
55 | return days * 4800 / 146097;
56 | }
57 |
58 | export function monthsToDays (months) {
59 | // the reverse of daysToMonths
60 | return months * 146097 / 4800;
61 | }
62 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/locale/lo.js:
--------------------------------------------------------------------------------
1 | //! moment.js locale configuration
2 | //! locale : Lao [lo]
3 | //! author : Ryan Hart : https://github.com/ryanhart2
4 |
5 | import moment from '../moment';
6 |
7 | export default moment.defineLocale('lo', {
8 | months : 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split('_'),
9 | monthsShort : 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split('_'),
10 | weekdays : 'ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'),
11 | weekdaysShort : 'ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'),
12 | weekdaysMin : 'ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ'.split('_'),
13 | weekdaysParseExact : true,
14 | longDateFormat : {
15 | LT : 'HH:mm',
16 | LTS : 'HH:mm:ss',
17 | L : 'DD/MM/YYYY',
18 | LL : 'D MMMM YYYY',
19 | LLL : 'D MMMM YYYY HH:mm',
20 | LLLL : 'ວັນdddd D MMMM YYYY HH:mm'
21 | },
22 | meridiemParse: /ຕອນເຊົ້າ|ຕອນແລງ/,
23 | isPM: function (input) {
24 | return input === 'ຕອນແລງ';
25 | },
26 | meridiem : function (hour, minute, isLower) {
27 | if (hour < 12) {
28 | return 'ຕອນເຊົ້າ';
29 | } else {
30 | return 'ຕອນແລງ';
31 | }
32 | },
33 | calendar : {
34 | sameDay : '[ມື້ນີ້ເວລາ] LT',
35 | nextDay : '[ມື້ອື່ນເວລາ] LT',
36 | nextWeek : '[ວັນ]dddd[ໜ້າເວລາ] LT',
37 | lastDay : '[ມື້ວານນີ້ເວລາ] LT',
38 | lastWeek : '[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT',
39 | sameElse : 'L'
40 | },
41 | relativeTime : {
42 | future : 'ອີກ %s',
43 | past : '%sຜ່ານມາ',
44 | s : 'ບໍ່ເທົ່າໃດວິນາທີ',
45 | ss : '%d ວິນາທີ' ,
46 | m : '1 ນາທີ',
47 | mm : '%d ນາທີ',
48 | h : '1 ຊົ່ວໂມງ',
49 | hh : '%d ຊົ່ວໂມງ',
50 | d : '1 ມື້',
51 | dd : '%d ມື້',
52 | M : '1 ເດືອນ',
53 | MM : '%d ເດືອນ',
54 | y : '1 ປີ',
55 | yy : '%d ປີ'
56 | },
57 | dayOfMonthOrdinalParse: /(ທີ່)\d{1,2}/,
58 | ordinal : function (number) {
59 | return 'ທີ່' + number;
60 | }
61 | });
62 |
63 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/locale/th.js:
--------------------------------------------------------------------------------
1 | //! moment.js locale configuration
2 | //! locale : Thai [th]
3 | //! author : Kridsada Thanabulpong : https://github.com/sirn
4 |
5 | import moment from '../moment';
6 |
7 | export default moment.defineLocale('th', {
8 | months : 'มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม'.split('_'),
9 | monthsShort : 'ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.'.split('_'),
10 | monthsParseExact: true,
11 | weekdays : 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์'.split('_'),
12 | weekdaysShort : 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์'.split('_'), // yes, three characters difference
13 | weekdaysMin : 'อา._จ._อ._พ._พฤ._ศ._ส.'.split('_'),
14 | weekdaysParseExact : true,
15 | longDateFormat : {
16 | LT : 'H:mm',
17 | LTS : 'H:mm:ss',
18 | L : 'DD/MM/YYYY',
19 | LL : 'D MMMM YYYY',
20 | LLL : 'D MMMM YYYY เวลา H:mm',
21 | LLLL : 'วันddddที่ D MMMM YYYY เวลา H:mm'
22 | },
23 | meridiemParse: /ก่อนเที่ยง|หลังเที่ยง/,
24 | isPM: function (input) {
25 | return input === 'หลังเที่ยง';
26 | },
27 | meridiem : function (hour, minute, isLower) {
28 | if (hour < 12) {
29 | return 'ก่อนเที่ยง';
30 | } else {
31 | return 'หลังเที่ยง';
32 | }
33 | },
34 | calendar : {
35 | sameDay : '[วันนี้ เวลา] LT',
36 | nextDay : '[พรุ่งนี้ เวลา] LT',
37 | nextWeek : 'dddd[หน้า เวลา] LT',
38 | lastDay : '[เมื่อวานนี้ เวลา] LT',
39 | lastWeek : '[วัน]dddd[ที่แล้ว เวลา] LT',
40 | sameElse : 'L'
41 | },
42 | relativeTime : {
43 | future : 'อีก %s',
44 | past : '%sที่แล้ว',
45 | s : 'ไม่กี่วินาที',
46 | ss : '%d วินาที',
47 | m : '1 นาที',
48 | mm : '%d นาที',
49 | h : '1 ชั่วโมง',
50 | hh : '%d ชั่วโมง',
51 | d : '1 วัน',
52 | dd : '%d วัน',
53 | M : '1 เดือน',
54 | MM : '%d เดือน',
55 | y : '1 ปี',
56 | yy : '%d ปี'
57 | }
58 | });
59 |
--------------------------------------------------------------------------------
/service/line_event.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | const debug = require("debug")("bot-express:service");
4 | const crypto = require("crypto");
5 | const axios = require("axios");
6 |
7 | /**
8 | * Utility to trigger LINE webhook event.
9 | * @class
10 | */
11 | module.exports = class ServiceLineEvent {
12 | /**
13 | * Start conversation from chatbot using provided webhook event.
14 | * @method
15 | * @param {Object} event - Webhook event object of LINE Messaging API.
16 | */
17 | static async fire(event){
18 | const url = `http://localhost:${process.env.PORT || 5000}/bot/webhook`;
19 | const body = {events: [event]};
20 | const signature = crypto.createHmac('sha256', process.env.LINE_BOT_CHANNEL_SECRET).update(JSON.stringify(body)).digest('base64');
21 | const headers = {"X-Line-Signature": signature};
22 |
23 | return axios.post(url, body, {
24 | headers: headers,
25 | });
26 | }
27 |
28 | /**
29 | * @method
30 | * @async
31 | * @param {Object} options
32 | * @param {String} options.line_user_id
33 | * @param {String} options.skill
34 | * @param {Object} [options.parameters]
35 | * @param {String} [options.language="en"]
36 | * @param {String} [options.to_type="user"]
37 | */
38 | static async botex_push(options){
39 | const req_param_list = ["line_user_id", "skill"]
40 | const o = options;
41 |
42 | for (const req_param of req_param_list){
43 | if (!o[req_param]) throw new Error(`Required option "${req_param}" not set.`)
44 | }
45 |
46 | const event = {
47 | type: "bot-express:push",
48 | to: {
49 | type: o.to_type || "user",
50 | userId: o.line_user_id
51 | },
52 | intent: {
53 | name: o.skill
54 | },
55 | language: o.language || "en"
56 | }
57 |
58 | if (o.parameters){
59 | event.intent.parameters = o.parameters
60 | }
61 |
62 | return ServiceLineEvent.fire(event);
63 | }
64 | }
--------------------------------------------------------------------------------
/public/bower_components/moment/src/locale/pt.js:
--------------------------------------------------------------------------------
1 | //! moment.js locale configuration
2 | //! locale : Portuguese [pt]
3 | //! author : Jefferson : https://github.com/jalex79
4 |
5 | import moment from '../moment';
6 |
7 | export default moment.defineLocale('pt', {
8 | months : 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split('_'),
9 | monthsShort : 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'),
10 | weekdays : 'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split('_'),
11 | weekdaysShort : 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'),
12 | weekdaysMin : 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'),
13 | weekdaysParseExact : true,
14 | longDateFormat : {
15 | LT : 'HH:mm',
16 | LTS : 'HH:mm:ss',
17 | L : 'DD/MM/YYYY',
18 | LL : 'D [de] MMMM [de] YYYY',
19 | LLL : 'D [de] MMMM [de] YYYY HH:mm',
20 | LLLL : 'dddd, D [de] MMMM [de] YYYY HH:mm'
21 | },
22 | calendar : {
23 | sameDay: '[Hoje às] LT',
24 | nextDay: '[Amanhã às] LT',
25 | nextWeek: 'dddd [às] LT',
26 | lastDay: '[Ontem às] LT',
27 | lastWeek: function () {
28 | return (this.day() === 0 || this.day() === 6) ?
29 | '[Último] dddd [às] LT' : // Saturday + Sunday
30 | '[Última] dddd [às] LT'; // Monday - Friday
31 | },
32 | sameElse: 'L'
33 | },
34 | relativeTime : {
35 | future : 'em %s',
36 | past : 'há %s',
37 | s : 'segundos',
38 | ss : '%d segundos',
39 | m : 'um minuto',
40 | mm : '%d minutos',
41 | h : 'uma hora',
42 | hh : '%d horas',
43 | d : 'um dia',
44 | dd : '%d dias',
45 | M : 'um mês',
46 | MM : '%d meses',
47 | y : 'um ano',
48 | yy : '%d anos'
49 | },
50 | dayOfMonthOrdinalParse: /\d{1,2}º/,
51 | ordinal : '%dº',
52 | week : {
53 | dow : 1, // Monday is the first day of the week.
54 | doy : 4 // The week that contains Jan 4th is the first week of the year.
55 | }
56 | });
57 |
58 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/moment/min-max.js:
--------------------------------------------------------------------------------
1 | import { deprecate } from '../utils/deprecate';
2 | import isArray from '../utils/is-array';
3 | import { createLocal } from '../create/local';
4 | import { createInvalid } from '../create/valid';
5 |
6 | export var prototypeMin = deprecate(
7 | 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',
8 | function () {
9 | var other = createLocal.apply(null, arguments);
10 | if (this.isValid() && other.isValid()) {
11 | return other < this ? this : other;
12 | } else {
13 | return createInvalid();
14 | }
15 | }
16 | );
17 |
18 | export var prototypeMax = deprecate(
19 | 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',
20 | function () {
21 | var other = createLocal.apply(null, arguments);
22 | if (this.isValid() && other.isValid()) {
23 | return other > this ? this : other;
24 | } else {
25 | return createInvalid();
26 | }
27 | }
28 | );
29 |
30 | // Pick a moment m from moments so that m[fn](other) is true for all
31 | // other. This relies on the function fn to be transitive.
32 | //
33 | // moments should either be an array of moment objects or an array, whose
34 | // first element is an array of moment objects.
35 | function pickBy(fn, moments) {
36 | var res, i;
37 | if (moments.length === 1 && isArray(moments[0])) {
38 | moments = moments[0];
39 | }
40 | if (!moments.length) {
41 | return createLocal();
42 | }
43 | res = moments[0];
44 | for (i = 1; i < moments.length; ++i) {
45 | if (!moments[i].isValid() || moments[i][fn](res)) {
46 | res = moments[i];
47 | }
48 | }
49 | return res;
50 | }
51 |
52 | // TODO: Use [].sort instead?
53 | export function min () {
54 | var args = [].slice.call(arguments, 0);
55 |
56 | return pickBy('isBefore', args);
57 | }
58 |
59 | export function max () {
60 | var args = [].slice.call(arguments, 0);
61 |
62 | return pickBy('isAfter', args);
63 | }
64 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/units/millisecond.js:
--------------------------------------------------------------------------------
1 | import { makeGetSet } from '../moment/get-set';
2 | import { addFormatToken } from '../format/format';
3 | import { addUnitAlias } from './aliases';
4 | import { addUnitPriority } from './priorities';
5 | import { addRegexToken, match1, match2, match3, match1to3, matchUnsigned } from '../parse/regex';
6 | import { addParseToken } from '../parse/token';
7 | import { MILLISECOND } from './constants';
8 | import toInt from '../utils/to-int';
9 |
10 | // FORMATTING
11 |
12 | addFormatToken('S', 0, 0, function () {
13 | return ~~(this.millisecond() / 100);
14 | });
15 |
16 | addFormatToken(0, ['SS', 2], 0, function () {
17 | return ~~(this.millisecond() / 10);
18 | });
19 |
20 | addFormatToken(0, ['SSS', 3], 0, 'millisecond');
21 | addFormatToken(0, ['SSSS', 4], 0, function () {
22 | return this.millisecond() * 10;
23 | });
24 | addFormatToken(0, ['SSSSS', 5], 0, function () {
25 | return this.millisecond() * 100;
26 | });
27 | addFormatToken(0, ['SSSSSS', 6], 0, function () {
28 | return this.millisecond() * 1000;
29 | });
30 | addFormatToken(0, ['SSSSSSS', 7], 0, function () {
31 | return this.millisecond() * 10000;
32 | });
33 | addFormatToken(0, ['SSSSSSSS', 8], 0, function () {
34 | return this.millisecond() * 100000;
35 | });
36 | addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {
37 | return this.millisecond() * 1000000;
38 | });
39 |
40 |
41 | // ALIASES
42 |
43 | addUnitAlias('millisecond', 'ms');
44 |
45 | // PRIORITY
46 |
47 | addUnitPriority('millisecond', 16);
48 |
49 | // PARSING
50 |
51 | addRegexToken('S', match1to3, match1);
52 | addRegexToken('SS', match1to3, match2);
53 | addRegexToken('SSS', match1to3, match3);
54 |
55 | var token;
56 | for (token = 'SSSS'; token.length <= 9; token += 'S') {
57 | addRegexToken(token, matchUnsigned);
58 | }
59 |
60 | function parseMs(input, array) {
61 | array[MILLISECOND] = toInt(('0.' + input) * 1000);
62 | }
63 |
64 | for (token = 'S'; token.length <= 9; token += 'S') {
65 | addParseToken(token, parseMs);
66 | }
67 | // MOMENTS
68 |
69 | export var getSetMillisecond = makeGetSet('Milliseconds', false);
70 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/locale/en-au.js:
--------------------------------------------------------------------------------
1 | //! moment.js locale configuration
2 | //! locale : English (Australia) [en-au]
3 | //! author : Jared Morse : https://github.com/jarcoal
4 |
5 | import moment from '../moment';
6 |
7 | export default moment.defineLocale('en-au', {
8 | months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),
9 | monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
10 | weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
11 | weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
12 | weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
13 | longDateFormat : {
14 | LT : 'h:mm A',
15 | LTS : 'h:mm:ss A',
16 | L : 'DD/MM/YYYY',
17 | LL : 'D MMMM YYYY',
18 | LLL : 'D MMMM YYYY h:mm A',
19 | LLLL : 'dddd, D MMMM YYYY h:mm A'
20 | },
21 | calendar : {
22 | sameDay : '[Today at] LT',
23 | nextDay : '[Tomorrow at] LT',
24 | nextWeek : 'dddd [at] LT',
25 | lastDay : '[Yesterday at] LT',
26 | lastWeek : '[Last] dddd [at] LT',
27 | sameElse : 'L'
28 | },
29 | relativeTime : {
30 | future : 'in %s',
31 | past : '%s ago',
32 | s : 'a few seconds',
33 | ss : '%d seconds',
34 | m : 'a minute',
35 | mm : '%d minutes',
36 | h : 'an hour',
37 | hh : '%d hours',
38 | d : 'a day',
39 | dd : '%d days',
40 | M : 'a month',
41 | MM : '%d months',
42 | y : 'a year',
43 | yy : '%d years'
44 | },
45 | dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
46 | ordinal : function (number) {
47 | var b = number % 10,
48 | output = (~~(number % 100 / 10) === 1) ? 'th' :
49 | (b === 1) ? 'st' :
50 | (b === 2) ? 'nd' :
51 | (b === 3) ? 'rd' : 'th';
52 | return number + output;
53 | },
54 | week : {
55 | dow : 1, // Monday is the first day of the week.
56 | doy : 4 // The week that contains Jan 4th is the first week of the year.
57 | }
58 | });
59 |
60 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/locale/en-ie.js:
--------------------------------------------------------------------------------
1 | //! moment.js locale configuration
2 | //! locale : English (Ireland) [en-ie]
3 | //! author : Chris Cartlidge : https://github.com/chriscartlidge
4 |
5 | import moment from '../moment';
6 |
7 | export default moment.defineLocale('en-ie', {
8 | months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),
9 | monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
10 | weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
11 | weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
12 | weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
13 | longDateFormat : {
14 | LT : 'HH:mm',
15 | LTS : 'HH:mm:ss',
16 | L : 'DD-MM-YYYY',
17 | LL : 'D MMMM YYYY',
18 | LLL : 'D MMMM YYYY HH:mm',
19 | LLLL : 'dddd D MMMM YYYY HH:mm'
20 | },
21 | calendar : {
22 | sameDay : '[Today at] LT',
23 | nextDay : '[Tomorrow at] LT',
24 | nextWeek : 'dddd [at] LT',
25 | lastDay : '[Yesterday at] LT',
26 | lastWeek : '[Last] dddd [at] LT',
27 | sameElse : 'L'
28 | },
29 | relativeTime : {
30 | future : 'in %s',
31 | past : '%s ago',
32 | s : 'a few seconds',
33 | ss : '%d seconds',
34 | m : 'a minute',
35 | mm : '%d minutes',
36 | h : 'an hour',
37 | hh : '%d hours',
38 | d : 'a day',
39 | dd : '%d days',
40 | M : 'a month',
41 | MM : '%d months',
42 | y : 'a year',
43 | yy : '%d years'
44 | },
45 | dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
46 | ordinal : function (number) {
47 | var b = number % 10,
48 | output = (~~(number % 100 / 10) === 1) ? 'th' :
49 | (b === 1) ? 'st' :
50 | (b === 2) ? 'nd' :
51 | (b === 3) ? 'rd' : 'th';
52 | return number + output;
53 | },
54 | week : {
55 | dow : 1, // Monday is the first day of the week.
56 | doy : 4 // The week that contains Jan 4th is the first week of the year.
57 | }
58 | });
59 |
60 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/locale/en-nz.js:
--------------------------------------------------------------------------------
1 | //! moment.js locale configuration
2 | //! locale : English (New Zealand) [en-nz]
3 | //! author : Luke McGregor : https://github.com/lukemcgregor
4 |
5 | import moment from '../moment';
6 |
7 | export default moment.defineLocale('en-nz', {
8 | months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),
9 | monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
10 | weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
11 | weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
12 | weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
13 | longDateFormat : {
14 | LT : 'h:mm A',
15 | LTS : 'h:mm:ss A',
16 | L : 'DD/MM/YYYY',
17 | LL : 'D MMMM YYYY',
18 | LLL : 'D MMMM YYYY h:mm A',
19 | LLLL : 'dddd, D MMMM YYYY h:mm A'
20 | },
21 | calendar : {
22 | sameDay : '[Today at] LT',
23 | nextDay : '[Tomorrow at] LT',
24 | nextWeek : 'dddd [at] LT',
25 | lastDay : '[Yesterday at] LT',
26 | lastWeek : '[Last] dddd [at] LT',
27 | sameElse : 'L'
28 | },
29 | relativeTime : {
30 | future : 'in %s',
31 | past : '%s ago',
32 | s : 'a few seconds',
33 | ss : '%d seconds',
34 | m : 'a minute',
35 | mm : '%d minutes',
36 | h : 'an hour',
37 | hh : '%d hours',
38 | d : 'a day',
39 | dd : '%d days',
40 | M : 'a month',
41 | MM : '%d months',
42 | y : 'a year',
43 | yy : '%d years'
44 | },
45 | dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
46 | ordinal : function (number) {
47 | var b = number % 10,
48 | output = (~~(number % 100 / 10) === 1) ? 'th' :
49 | (b === 1) ? 'st' :
50 | (b === 2) ? 'nd' :
51 | (b === 3) ? 'rd' : 'th';
52 | return number + output;
53 | },
54 | week : {
55 | dow : 1, // Monday is the first day of the week.
56 | doy : 4 // The week that contains Jan 4th is the first week of the year.
57 | }
58 | });
59 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/locale/en-gb.js:
--------------------------------------------------------------------------------
1 | //! moment.js locale configuration
2 | //! locale : English (United Kingdom) [en-gb]
3 | //! author : Chris Gedrim : https://github.com/chrisgedrim
4 |
5 | import moment from '../moment';
6 |
7 | export default moment.defineLocale('en-gb', {
8 | months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),
9 | monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
10 | weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
11 | weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
12 | weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
13 | longDateFormat : {
14 | LT : 'HH:mm',
15 | LTS : 'HH:mm:ss',
16 | L : 'DD/MM/YYYY',
17 | LL : 'D MMMM YYYY',
18 | LLL : 'D MMMM YYYY HH:mm',
19 | LLLL : 'dddd, D MMMM YYYY HH:mm'
20 | },
21 | calendar : {
22 | sameDay : '[Today at] LT',
23 | nextDay : '[Tomorrow at] LT',
24 | nextWeek : 'dddd [at] LT',
25 | lastDay : '[Yesterday at] LT',
26 | lastWeek : '[Last] dddd [at] LT',
27 | sameElse : 'L'
28 | },
29 | relativeTime : {
30 | future : 'in %s',
31 | past : '%s ago',
32 | s : 'a few seconds',
33 | ss : '%d seconds',
34 | m : 'a minute',
35 | mm : '%d minutes',
36 | h : 'an hour',
37 | hh : '%d hours',
38 | d : 'a day',
39 | dd : '%d days',
40 | M : 'a month',
41 | MM : '%d months',
42 | y : 'a year',
43 | yy : '%d years'
44 | },
45 | dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
46 | ordinal : function (number) {
47 | var b = number % 10,
48 | output = (~~(number % 100 / 10) === 1) ? 'th' :
49 | (b === 1) ? 'st' :
50 | (b === 2) ? 'nd' :
51 | (b === 3) ? 'rd' : 'th';
52 | return number + output;
53 | },
54 | week : {
55 | dow : 1, // Monday is the first day of the week.
56 | doy : 4 // The week that contains Jan 4th is the first week of the year.
57 | }
58 | });
59 |
60 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/locale/eu.js:
--------------------------------------------------------------------------------
1 | //! moment.js locale configuration
2 | //! locale : Basque [eu]
3 | //! author : Eneko Illarramendi : https://github.com/eillarra
4 |
5 | import moment from '../moment';
6 |
7 | export default moment.defineLocale('eu', {
8 | months : 'urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua'.split('_'),
9 | monthsShort : 'urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.'.split('_'),
10 | monthsParseExact : true,
11 | weekdays : 'igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata'.split('_'),
12 | weekdaysShort : 'ig._al._ar._az._og._ol._lr.'.split('_'),
13 | weekdaysMin : 'ig_al_ar_az_og_ol_lr'.split('_'),
14 | weekdaysParseExact : true,
15 | longDateFormat : {
16 | LT : 'HH:mm',
17 | LTS : 'HH:mm:ss',
18 | L : 'YYYY-MM-DD',
19 | LL : 'YYYY[ko] MMMM[ren] D[a]',
20 | LLL : 'YYYY[ko] MMMM[ren] D[a] HH:mm',
21 | LLLL : 'dddd, YYYY[ko] MMMM[ren] D[a] HH:mm',
22 | l : 'YYYY-M-D',
23 | ll : 'YYYY[ko] MMM D[a]',
24 | lll : 'YYYY[ko] MMM D[a] HH:mm',
25 | llll : 'ddd, YYYY[ko] MMM D[a] HH:mm'
26 | },
27 | calendar : {
28 | sameDay : '[gaur] LT[etan]',
29 | nextDay : '[bihar] LT[etan]',
30 | nextWeek : 'dddd LT[etan]',
31 | lastDay : '[atzo] LT[etan]',
32 | lastWeek : '[aurreko] dddd LT[etan]',
33 | sameElse : 'L'
34 | },
35 | relativeTime : {
36 | future : '%s barru',
37 | past : 'duela %s',
38 | s : 'segundo batzuk',
39 | ss : '%d segundo',
40 | m : 'minutu bat',
41 | mm : '%d minutu',
42 | h : 'ordu bat',
43 | hh : '%d ordu',
44 | d : 'egun bat',
45 | dd : '%d egun',
46 | M : 'hilabete bat',
47 | MM : '%d hilabete',
48 | y : 'urte bat',
49 | yy : '%d urte'
50 | },
51 | dayOfMonthOrdinalParse: /\d{1,2}\./,
52 | ordinal : '%d.',
53 | week : {
54 | dow : 1, // Monday is the first day of the week.
55 | doy : 7 // The week that contains Jan 1st is the first week of the year.
56 | }
57 | });
58 |
59 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/locale/mi.js:
--------------------------------------------------------------------------------
1 | //! moment.js locale configuration
2 | //! locale : Maori [mi]
3 | //! author : John Corrigan : https://github.com/johnideal
4 |
5 | import moment from '../moment';
6 |
7 | export default moment.defineLocale('mi', {
8 | months: 'Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea'.split('_'),
9 | monthsShort: 'Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki'.split('_'),
10 | monthsRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,
11 | monthsStrictRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,
12 | monthsShortRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,
13 | monthsShortStrictRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,2}/i,
14 | weekdays: 'Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei'.split('_'),
15 | weekdaysShort: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'),
16 | weekdaysMin: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'),
17 | longDateFormat: {
18 | LT: 'HH:mm',
19 | LTS: 'HH:mm:ss',
20 | L: 'DD/MM/YYYY',
21 | LL: 'D MMMM YYYY',
22 | LLL: 'D MMMM YYYY [i] HH:mm',
23 | LLLL: 'dddd, D MMMM YYYY [i] HH:mm'
24 | },
25 | calendar: {
26 | sameDay: '[i teie mahana, i] LT',
27 | nextDay: '[apopo i] LT',
28 | nextWeek: 'dddd [i] LT',
29 | lastDay: '[inanahi i] LT',
30 | lastWeek: 'dddd [whakamutunga i] LT',
31 | sameElse: 'L'
32 | },
33 | relativeTime: {
34 | future: 'i roto i %s',
35 | past: '%s i mua',
36 | s: 'te hēkona ruarua',
37 | ss: '%d hēkona',
38 | m: 'he meneti',
39 | mm: '%d meneti',
40 | h: 'te haora',
41 | hh: '%d haora',
42 | d: 'he ra',
43 | dd: '%d ra',
44 | M: 'he marama',
45 | MM: '%d marama',
46 | y: 'he tau',
47 | yy: '%d tau'
48 | },
49 | dayOfMonthOrdinalParse: /\d{1,2}º/,
50 | ordinal: '%dº',
51 | week : {
52 | dow : 1, // Monday is the first day of the week.
53 | doy : 4 // The week that contains Jan 4th is the first week of the year.
54 | }
55 | });
56 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/locale/sv.js:
--------------------------------------------------------------------------------
1 | //! moment.js locale configuration
2 | //! locale : Swedish [sv]
3 | //! author : Jens Alm : https://github.com/ulmus
4 |
5 | import moment from '../moment';
6 |
7 | export default moment.defineLocale('sv', {
8 | months : 'januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december'.split('_'),
9 | monthsShort : 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),
10 | weekdays : 'söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag'.split('_'),
11 | weekdaysShort : 'sön_mån_tis_ons_tor_fre_lör'.split('_'),
12 | weekdaysMin : 'sö_må_ti_on_to_fr_lö'.split('_'),
13 | longDateFormat : {
14 | LT : 'HH:mm',
15 | LTS : 'HH:mm:ss',
16 | L : 'YYYY-MM-DD',
17 | LL : 'D MMMM YYYY',
18 | LLL : 'D MMMM YYYY [kl.] HH:mm',
19 | LLLL : 'dddd D MMMM YYYY [kl.] HH:mm',
20 | lll : 'D MMM YYYY HH:mm',
21 | llll : 'ddd D MMM YYYY HH:mm'
22 | },
23 | calendar : {
24 | sameDay: '[Idag] LT',
25 | nextDay: '[Imorgon] LT',
26 | lastDay: '[Igår] LT',
27 | nextWeek: '[På] dddd LT',
28 | lastWeek: '[I] dddd[s] LT',
29 | sameElse: 'L'
30 | },
31 | relativeTime : {
32 | future : 'om %s',
33 | past : 'för %s sedan',
34 | s : 'några sekunder',
35 | ss : '%d sekunder',
36 | m : 'en minut',
37 | mm : '%d minuter',
38 | h : 'en timme',
39 | hh : '%d timmar',
40 | d : 'en dag',
41 | dd : '%d dagar',
42 | M : 'en månad',
43 | MM : '%d månader',
44 | y : 'ett år',
45 | yy : '%d år'
46 | },
47 | dayOfMonthOrdinalParse: /\d{1,2}(e|a)/,
48 | ordinal : function (number) {
49 | var b = number % 10,
50 | output = (~~(number % 100 / 10) === 1) ? 'e' :
51 | (b === 1) ? 'a' :
52 | (b === 2) ? 'a' :
53 | (b === 3) ? 'e' : 'e';
54 | return number + output;
55 | },
56 | week : {
57 | dow : 1, // Monday is the first day of the week.
58 | doy : 4 // The week that contains Jan 4th is the first week of the year.
59 | }
60 | });
61 |
62 |
--------------------------------------------------------------------------------
/public/bower_components/moment/locale/ar-tn.js:
--------------------------------------------------------------------------------
1 | //! moment.js locale configuration
2 |
3 | ;(function (global, factory) {
4 | typeof exports === 'object' && typeof module !== 'undefined'
5 | && typeof require === 'function' ? factory(require('../moment')) :
6 | typeof define === 'function' && define.amd ? define(['../moment'], factory) :
7 | factory(global.moment)
8 | }(this, (function (moment) { 'use strict';
9 |
10 |
11 | var arTn = moment.defineLocale('ar-tn', {
12 | months: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),
13 | monthsShort: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),
14 | weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
15 | weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
16 | weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
17 | weekdaysParseExact : true,
18 | longDateFormat: {
19 | LT: 'HH:mm',
20 | LTS: 'HH:mm:ss',
21 | L: 'DD/MM/YYYY',
22 | LL: 'D MMMM YYYY',
23 | LLL: 'D MMMM YYYY HH:mm',
24 | LLLL: 'dddd D MMMM YYYY HH:mm'
25 | },
26 | calendar: {
27 | sameDay: '[اليوم على الساعة] LT',
28 | nextDay: '[غدا على الساعة] LT',
29 | nextWeek: 'dddd [على الساعة] LT',
30 | lastDay: '[أمس على الساعة] LT',
31 | lastWeek: 'dddd [على الساعة] LT',
32 | sameElse: 'L'
33 | },
34 | relativeTime: {
35 | future: 'في %s',
36 | past: 'منذ %s',
37 | s: 'ثوان',
38 | ss : '%d ثانية',
39 | m: 'دقيقة',
40 | mm: '%d دقائق',
41 | h: 'ساعة',
42 | hh: '%d ساعات',
43 | d: 'يوم',
44 | dd: '%d أيام',
45 | M: 'شهر',
46 | MM: '%d أشهر',
47 | y: 'سنة',
48 | yy: '%d سنوات'
49 | },
50 | week: {
51 | dow: 1, // Monday is the first day of the week.
52 | doy: 4 // The week that contains Jan 4th is the first week of the year.
53 | }
54 | });
55 |
56 | return arTn;
57 |
58 | })));
59 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/locale/si.js:
--------------------------------------------------------------------------------
1 | //! moment.js locale configuration
2 | //! locale : Sinhalese [si]
3 | //! author : Sampath Sitinamaluwa : https://github.com/sampathsris
4 |
5 | import moment from '../moment';
6 |
7 | /*jshint -W100*/
8 | export default moment.defineLocale('si', {
9 | months : 'ජනවාරි_පෙබරවාරි_මාර්තු_අප්රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්'.split('_'),
10 | monthsShort : 'ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ'.split('_'),
11 | weekdays : 'ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා'.split('_'),
12 | weekdaysShort : 'ඉරි_සඳු_අඟ_බදා_බ්රහ_සිකු_සෙන'.split('_'),
13 | weekdaysMin : 'ඉ_ස_අ_බ_බ්ර_සි_සෙ'.split('_'),
14 | weekdaysParseExact : true,
15 | longDateFormat : {
16 | LT : 'a h:mm',
17 | LTS : 'a h:mm:ss',
18 | L : 'YYYY/MM/DD',
19 | LL : 'YYYY MMMM D',
20 | LLL : 'YYYY MMMM D, a h:mm',
21 | LLLL : 'YYYY MMMM D [වැනි] dddd, a h:mm:ss'
22 | },
23 | calendar : {
24 | sameDay : '[අද] LT[ට]',
25 | nextDay : '[හෙට] LT[ට]',
26 | nextWeek : 'dddd LT[ට]',
27 | lastDay : '[ඊයේ] LT[ට]',
28 | lastWeek : '[පසුගිය] dddd LT[ට]',
29 | sameElse : 'L'
30 | },
31 | relativeTime : {
32 | future : '%sකින්',
33 | past : '%sකට පෙර',
34 | s : 'තත්පර කිහිපය',
35 | ss : 'තත්පර %d',
36 | m : 'මිනිත්තුව',
37 | mm : 'මිනිත්තු %d',
38 | h : 'පැය',
39 | hh : 'පැය %d',
40 | d : 'දිනය',
41 | dd : 'දින %d',
42 | M : 'මාසය',
43 | MM : 'මාස %d',
44 | y : 'වසර',
45 | yy : 'වසර %d'
46 | },
47 | dayOfMonthOrdinalParse: /\d{1,2} වැනි/,
48 | ordinal : function (number) {
49 | return number + ' වැනි';
50 | },
51 | meridiemParse : /පෙර වරු|පස් වරු|පෙ.ව|ප.ව./,
52 | isPM : function (input) {
53 | return input === 'ප.ව.' || input === 'පස් වරු';
54 | },
55 | meridiem : function (hours, minutes, isLower) {
56 | if (hours > 11) {
57 | return isLower ? 'ප.ව.' : 'පස් වරු';
58 | } else {
59 | return isLower ? 'පෙ.ව.' : 'පෙර වරු';
60 | }
61 | }
62 | });
63 |
--------------------------------------------------------------------------------
/public/bower_components/moment/locale/uz.js:
--------------------------------------------------------------------------------
1 | //! moment.js locale configuration
2 |
3 | ;(function (global, factory) {
4 | typeof exports === 'object' && typeof module !== 'undefined'
5 | && typeof require === 'function' ? factory(require('../moment')) :
6 | typeof define === 'function' && define.amd ? define(['../moment'], factory) :
7 | factory(global.moment)
8 | }(this, (function (moment) { 'use strict';
9 |
10 |
11 | var uz = moment.defineLocale('uz', {
12 | months : 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split('_'),
13 | monthsShort : 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'),
14 | weekdays : 'Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба'.split('_'),
15 | weekdaysShort : 'Якш_Душ_Сеш_Чор_Пай_Жум_Шан'.split('_'),
16 | weekdaysMin : 'Як_Ду_Се_Чо_Па_Жу_Ша'.split('_'),
17 | longDateFormat : {
18 | LT : 'HH:mm',
19 | LTS : 'HH:mm:ss',
20 | L : 'DD/MM/YYYY',
21 | LL : 'D MMMM YYYY',
22 | LLL : 'D MMMM YYYY HH:mm',
23 | LLLL : 'D MMMM YYYY, dddd HH:mm'
24 | },
25 | calendar : {
26 | sameDay : '[Бугун соат] LT [да]',
27 | nextDay : '[Эртага] LT [да]',
28 | nextWeek : 'dddd [куни соат] LT [да]',
29 | lastDay : '[Кеча соат] LT [да]',
30 | lastWeek : '[Утган] dddd [куни соат] LT [да]',
31 | sameElse : 'L'
32 | },
33 | relativeTime : {
34 | future : 'Якин %s ичида',
35 | past : 'Бир неча %s олдин',
36 | s : 'фурсат',
37 | ss : '%d фурсат',
38 | m : 'бир дакика',
39 | mm : '%d дакика',
40 | h : 'бир соат',
41 | hh : '%d соат',
42 | d : 'бир кун',
43 | dd : '%d кун',
44 | M : 'бир ой',
45 | MM : '%d ой',
46 | y : 'бир йил',
47 | yy : '%d йил'
48 | },
49 | week : {
50 | dow : 1, // Monday is the first day of the week.
51 | doy : 7 // The week that contains Jan 4th is the first week of the year.
52 | }
53 | });
54 |
55 | return uz;
56 |
57 | })));
58 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/moment/diff.js:
--------------------------------------------------------------------------------
1 | import absFloor from '../utils/abs-floor';
2 | import { cloneWithOffset } from '../units/offset';
3 | import { normalizeUnits } from '../units/aliases';
4 |
5 | export function diff (input, units, asFloat) {
6 | var that,
7 | zoneDelta,
8 | delta, output;
9 |
10 | if (!this.isValid()) {
11 | return NaN;
12 | }
13 |
14 | that = cloneWithOffset(input, this);
15 |
16 | if (!that.isValid()) {
17 | return NaN;
18 | }
19 |
20 | zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;
21 |
22 | units = normalizeUnits(units);
23 |
24 | switch (units) {
25 | case 'year': output = monthDiff(this, that) / 12; break;
26 | case 'month': output = monthDiff(this, that); break;
27 | case 'quarter': output = monthDiff(this, that) / 3; break;
28 | case 'second': output = (this - that) / 1e3; break; // 1000
29 | case 'minute': output = (this - that) / 6e4; break; // 1000 * 60
30 | case 'hour': output = (this - that) / 36e5; break; // 1000 * 60 * 60
31 | case 'day': output = (this - that - zoneDelta) / 864e5; break; // 1000 * 60 * 60 * 24, negate dst
32 | case 'week': output = (this - that - zoneDelta) / 6048e5; break; // 1000 * 60 * 60 * 24 * 7, negate dst
33 | default: output = this - that;
34 | }
35 |
36 | return asFloat ? output : absFloor(output);
37 | }
38 |
39 | function monthDiff (a, b) {
40 | // difference in months
41 | var wholeMonthDiff = ((b.year() - a.year()) * 12) + (b.month() - a.month()),
42 | // b is in (anchor - 1 month, anchor + 1 month)
43 | anchor = a.clone().add(wholeMonthDiff, 'months'),
44 | anchor2, adjust;
45 |
46 | if (b - anchor < 0) {
47 | anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');
48 | // linear across the month
49 | adjust = (b - anchor) / (anchor - anchor2);
50 | } else {
51 | anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');
52 | // linear across the month
53 | adjust = (b - anchor) / (anchor2 - anchor);
54 | }
55 |
56 | //check for negative zero, return zero if negative zero
57 | return -(wholeMonthDiff + adjust) || 0;
58 | }
59 |
--------------------------------------------------------------------------------
/public/bower_components/moment/locale/tzm.js:
--------------------------------------------------------------------------------
1 | //! moment.js locale configuration
2 |
3 | ;(function (global, factory) {
4 | typeof exports === 'object' && typeof module !== 'undefined'
5 | && typeof require === 'function' ? factory(require('../moment')) :
6 | typeof define === 'function' && define.amd ? define(['../moment'], factory) :
7 | factory(global.moment)
8 | }(this, (function (moment) { 'use strict';
9 |
10 |
11 | var tzm = moment.defineLocale('tzm', {
12 | months : 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split('_'),
13 | monthsShort : 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split('_'),
14 | weekdays : 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),
15 | weekdaysShort : 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),
16 | weekdaysMin : 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),
17 | longDateFormat : {
18 | LT : 'HH:mm',
19 | LTS: 'HH:mm:ss',
20 | L : 'DD/MM/YYYY',
21 | LL : 'D MMMM YYYY',
22 | LLL : 'D MMMM YYYY HH:mm',
23 | LLLL : 'dddd D MMMM YYYY HH:mm'
24 | },
25 | calendar : {
26 | sameDay: '[ⴰⵙⴷⵅ ⴴ] LT',
27 | nextDay: '[ⴰⵙⴽⴰ ⴴ] LT',
28 | nextWeek: 'dddd [ⴴ] LT',
29 | lastDay: '[ⴰⵚⴰⵏⵜ ⴴ] LT',
30 | lastWeek: 'dddd [ⴴ] LT',
31 | sameElse: 'L'
32 | },
33 | relativeTime : {
34 | future : 'ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s',
35 | past : 'ⵢⴰⵏ %s',
36 | s : 'ⵉⵎⵉⴽ',
37 | ss : '%d ⵉⵎⵉⴽ',
38 | m : 'ⵎⵉⵏⵓⴺ',
39 | mm : '%d ⵎⵉⵏⵓⴺ',
40 | h : 'ⵙⴰⵄⴰ',
41 | hh : '%d ⵜⴰⵙⵙⴰⵄⵉⵏ',
42 | d : 'ⴰⵙⵙ',
43 | dd : '%d oⵙⵙⴰⵏ',
44 | M : 'ⴰⵢoⵓⵔ',
45 | MM : '%d ⵉⵢⵢⵉⵔⵏ',
46 | y : 'ⴰⵙⴳⴰⵙ',
47 | yy : '%d ⵉⵙⴳⴰⵙⵏ'
48 | },
49 | week : {
50 | dow : 6, // Saturday is the first day of the week.
51 | doy : 12 // The week that contains Jan 1st is the first week of the year.
52 | }
53 | });
54 |
55 | return tzm;
56 |
57 | })));
58 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/locale/sq.js:
--------------------------------------------------------------------------------
1 | //! moment.js locale configuration
2 | //! locale : Albanian [sq]
3 | //! author : Flakërim Ismani : https://github.com/flakerimi
4 | //! author : Menelion Elensúle : https://github.com/Oire
5 | //! author : Oerd Cukalla : https://github.com/oerd
6 |
7 | import moment from '../moment';
8 |
9 | export default moment.defineLocale('sq', {
10 | months : 'Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor'.split('_'),
11 | monthsShort : 'Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj'.split('_'),
12 | weekdays : 'E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë'.split('_'),
13 | weekdaysShort : 'Die_Hën_Mar_Mër_Enj_Pre_Sht'.split('_'),
14 | weekdaysMin : 'D_H_Ma_Më_E_P_Sh'.split('_'),
15 | weekdaysParseExact : true,
16 | meridiemParse: /PD|MD/,
17 | isPM: function (input) {
18 | return input.charAt(0) === 'M';
19 | },
20 | meridiem : function (hours, minutes, isLower) {
21 | return hours < 12 ? 'PD' : 'MD';
22 | },
23 | longDateFormat : {
24 | LT : 'HH:mm',
25 | LTS : 'HH:mm:ss',
26 | L : 'DD/MM/YYYY',
27 | LL : 'D MMMM YYYY',
28 | LLL : 'D MMMM YYYY HH:mm',
29 | LLLL : 'dddd, D MMMM YYYY HH:mm'
30 | },
31 | calendar : {
32 | sameDay : '[Sot në] LT',
33 | nextDay : '[Nesër në] LT',
34 | nextWeek : 'dddd [në] LT',
35 | lastDay : '[Dje në] LT',
36 | lastWeek : 'dddd [e kaluar në] LT',
37 | sameElse : 'L'
38 | },
39 | relativeTime : {
40 | future : 'në %s',
41 | past : '%s më parë',
42 | s : 'disa sekonda',
43 | ss : '%d sekonda',
44 | m : 'një minutë',
45 | mm : '%d minuta',
46 | h : 'një orë',
47 | hh : '%d orë',
48 | d : 'një ditë',
49 | dd : '%d ditë',
50 | M : 'një muaj',
51 | MM : '%d muaj',
52 | y : 'një vit',
53 | yy : '%d vite'
54 | },
55 | dayOfMonthOrdinalParse: /\d{1,2}\./,
56 | ordinal : '%d.',
57 | week : {
58 | dow : 1, // Monday is the first day of the week.
59 | doy : 4 // The week that contains Jan 4th is the first week of the year.
60 | }
61 | });
62 |
63 |
--------------------------------------------------------------------------------
/public/bower_components/moment/locale/ar-kw.js:
--------------------------------------------------------------------------------
1 | //! moment.js locale configuration
2 |
3 | ;(function (global, factory) {
4 | typeof exports === 'object' && typeof module !== 'undefined'
5 | && typeof require === 'function' ? factory(require('../moment')) :
6 | typeof define === 'function' && define.amd ? define(['../moment'], factory) :
7 | factory(global.moment)
8 | }(this, (function (moment) { 'use strict';
9 |
10 |
11 | var arKw = moment.defineLocale('ar-kw', {
12 | months : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'),
13 | monthsShort : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'),
14 | weekdays : 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
15 | weekdaysShort : 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),
16 | weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'),
17 | weekdaysParseExact : true,
18 | longDateFormat : {
19 | LT : 'HH:mm',
20 | LTS : 'HH:mm:ss',
21 | L : 'DD/MM/YYYY',
22 | LL : 'D MMMM YYYY',
23 | LLL : 'D MMMM YYYY HH:mm',
24 | LLLL : 'dddd D MMMM YYYY HH:mm'
25 | },
26 | calendar : {
27 | sameDay: '[اليوم على الساعة] LT',
28 | nextDay: '[غدا على الساعة] LT',
29 | nextWeek: 'dddd [على الساعة] LT',
30 | lastDay: '[أمس على الساعة] LT',
31 | lastWeek: 'dddd [على الساعة] LT',
32 | sameElse: 'L'
33 | },
34 | relativeTime : {
35 | future : 'في %s',
36 | past : 'منذ %s',
37 | s : 'ثوان',
38 | ss : '%d ثانية',
39 | m : 'دقيقة',
40 | mm : '%d دقائق',
41 | h : 'ساعة',
42 | hh : '%d ساعات',
43 | d : 'يوم',
44 | dd : '%d أيام',
45 | M : 'شهر',
46 | MM : '%d أشهر',
47 | y : 'سنة',
48 | yy : '%d سنوات'
49 | },
50 | week : {
51 | dow : 0, // Sunday is the first day of the week.
52 | doy : 12 // The week that contains Jan 1st is the first week of the year.
53 | }
54 | });
55 |
56 | return arKw;
57 |
58 | })));
59 |
--------------------------------------------------------------------------------
/public/bower_components/moment/locale/ar-ma.js:
--------------------------------------------------------------------------------
1 | //! moment.js locale configuration
2 |
3 | ;(function (global, factory) {
4 | typeof exports === 'object' && typeof module !== 'undefined'
5 | && typeof require === 'function' ? factory(require('../moment')) :
6 | typeof define === 'function' && define.amd ? define(['../moment'], factory) :
7 | factory(global.moment)
8 | }(this, (function (moment) { 'use strict';
9 |
10 |
11 | var arMa = moment.defineLocale('ar-ma', {
12 | months : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'),
13 | monthsShort : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'),
14 | weekdays : 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
15 | weekdaysShort : 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),
16 | weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'),
17 | weekdaysParseExact : true,
18 | longDateFormat : {
19 | LT : 'HH:mm',
20 | LTS : 'HH:mm:ss',
21 | L : 'DD/MM/YYYY',
22 | LL : 'D MMMM YYYY',
23 | LLL : 'D MMMM YYYY HH:mm',
24 | LLLL : 'dddd D MMMM YYYY HH:mm'
25 | },
26 | calendar : {
27 | sameDay: '[اليوم على الساعة] LT',
28 | nextDay: '[غدا على الساعة] LT',
29 | nextWeek: 'dddd [على الساعة] LT',
30 | lastDay: '[أمس على الساعة] LT',
31 | lastWeek: 'dddd [على الساعة] LT',
32 | sameElse: 'L'
33 | },
34 | relativeTime : {
35 | future : 'في %s',
36 | past : 'منذ %s',
37 | s : 'ثوان',
38 | ss : '%d ثانية',
39 | m : 'دقيقة',
40 | mm : '%d دقائق',
41 | h : 'ساعة',
42 | hh : '%d ساعات',
43 | d : 'يوم',
44 | dd : '%d أيام',
45 | M : 'شهر',
46 | MM : '%d أشهر',
47 | y : 'سنة',
48 | yy : '%d سنوات'
49 | },
50 | week : {
51 | dow : 6, // Saturday is the first day of the week.
52 | doy : 12 // The week that contains Jan 1st is the first week of the year.
53 | }
54 | });
55 |
56 | return arMa;
57 |
58 | })));
59 |
--------------------------------------------------------------------------------
/public/bower_components/moment/locale/ar-dz.js:
--------------------------------------------------------------------------------
1 | //! moment.js locale configuration
2 |
3 | ;(function (global, factory) {
4 | typeof exports === 'object' && typeof module !== 'undefined'
5 | && typeof require === 'function' ? factory(require('../moment')) :
6 | typeof define === 'function' && define.amd ? define(['../moment'], factory) :
7 | factory(global.moment)
8 | }(this, (function (moment) { 'use strict';
9 |
10 |
11 | var arDz = moment.defineLocale('ar-dz', {
12 | months : 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),
13 | monthsShort : 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),
14 | weekdays : 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
15 | weekdaysShort : 'احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),
16 | weekdaysMin : 'أح_إث_ثلا_أر_خم_جم_سب'.split('_'),
17 | weekdaysParseExact : true,
18 | longDateFormat : {
19 | LT : 'HH:mm',
20 | LTS : 'HH:mm:ss',
21 | L : 'DD/MM/YYYY',
22 | LL : 'D MMMM YYYY',
23 | LLL : 'D MMMM YYYY HH:mm',
24 | LLLL : 'dddd D MMMM YYYY HH:mm'
25 | },
26 | calendar : {
27 | sameDay: '[اليوم على الساعة] LT',
28 | nextDay: '[غدا على الساعة] LT',
29 | nextWeek: 'dddd [على الساعة] LT',
30 | lastDay: '[أمس على الساعة] LT',
31 | lastWeek: 'dddd [على الساعة] LT',
32 | sameElse: 'L'
33 | },
34 | relativeTime : {
35 | future : 'في %s',
36 | past : 'منذ %s',
37 | s : 'ثوان',
38 | ss : '%d ثانية',
39 | m : 'دقيقة',
40 | mm : '%d دقائق',
41 | h : 'ساعة',
42 | hh : '%d ساعات',
43 | d : 'يوم',
44 | dd : '%d أيام',
45 | M : 'شهر',
46 | MM : '%d أشهر',
47 | y : 'سنة',
48 | yy : '%d سنوات'
49 | },
50 | week : {
51 | dow : 0, // Sunday is the first day of the week.
52 | doy : 4 // The week that contains Jan 1st is the first week of the year.
53 | }
54 | });
55 |
56 | return arDz;
57 |
58 | })));
59 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/locale/it.js:
--------------------------------------------------------------------------------
1 | //! moment.js locale configuration
2 | //! locale : Italian [it]
3 | //! author : Lorenzo : https://github.com/aliem
4 | //! author: Mattia Larentis: https://github.com/nostalgiaz
5 |
6 | import moment from '../moment';
7 |
8 | export default moment.defineLocale('it', {
9 | months : 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split('_'),
10 | monthsShort : 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),
11 | weekdays : 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split('_'),
12 | weekdaysShort : 'dom_lun_mar_mer_gio_ven_sab'.split('_'),
13 | weekdaysMin : 'do_lu_ma_me_gi_ve_sa'.split('_'),
14 | longDateFormat : {
15 | LT : 'HH:mm',
16 | LTS : 'HH:mm:ss',
17 | L : 'DD/MM/YYYY',
18 | LL : 'D MMMM YYYY',
19 | LLL : 'D MMMM YYYY HH:mm',
20 | LLLL : 'dddd D MMMM YYYY HH:mm'
21 | },
22 | calendar : {
23 | sameDay: '[Oggi alle] LT',
24 | nextDay: '[Domani alle] LT',
25 | nextWeek: 'dddd [alle] LT',
26 | lastDay: '[Ieri alle] LT',
27 | lastWeek: function () {
28 | switch (this.day()) {
29 | case 0:
30 | return '[la scorsa] dddd [alle] LT';
31 | default:
32 | return '[lo scorso] dddd [alle] LT';
33 | }
34 | },
35 | sameElse: 'L'
36 | },
37 | relativeTime : {
38 | future : function (s) {
39 | return ((/^[0-9].+$/).test(s) ? 'tra' : 'in') + ' ' + s;
40 | },
41 | past : '%s fa',
42 | s : 'alcuni secondi',
43 | ss : '%d secondi',
44 | m : 'un minuto',
45 | mm : '%d minuti',
46 | h : 'un\'ora',
47 | hh : '%d ore',
48 | d : 'un giorno',
49 | dd : '%d giorni',
50 | M : 'un mese',
51 | MM : '%d mesi',
52 | y : 'un anno',
53 | yy : '%d anni'
54 | },
55 | dayOfMonthOrdinalParse : /\d{1,2}º/,
56 | ordinal: '%dº',
57 | week : {
58 | dow : 1, // Monday is the first day of the week.
59 | doy : 4 // The week that contains Jan 4th is the first week of the year.
60 | }
61 | });
62 |
63 |
--------------------------------------------------------------------------------
/public/bower_components/moment/locale/tzm-latn.js:
--------------------------------------------------------------------------------
1 | //! moment.js locale configuration
2 |
3 | ;(function (global, factory) {
4 | typeof exports === 'object' && typeof module !== 'undefined'
5 | && typeof require === 'function' ? factory(require('../moment')) :
6 | typeof define === 'function' && define.amd ? define(['../moment'], factory) :
7 | factory(global.moment)
8 | }(this, (function (moment) { 'use strict';
9 |
10 |
11 | var tzmLatn = moment.defineLocale('tzm-latn', {
12 | months : 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split('_'),
13 | monthsShort : 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split('_'),
14 | weekdays : 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),
15 | weekdaysShort : 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),
16 | weekdaysMin : 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),
17 | longDateFormat : {
18 | LT : 'HH:mm',
19 | LTS : 'HH:mm:ss',
20 | L : 'DD/MM/YYYY',
21 | LL : 'D MMMM YYYY',
22 | LLL : 'D MMMM YYYY HH:mm',
23 | LLLL : 'dddd D MMMM YYYY HH:mm'
24 | },
25 | calendar : {
26 | sameDay: '[asdkh g] LT',
27 | nextDay: '[aska g] LT',
28 | nextWeek: 'dddd [g] LT',
29 | lastDay: '[assant g] LT',
30 | lastWeek: 'dddd [g] LT',
31 | sameElse: 'L'
32 | },
33 | relativeTime : {
34 | future : 'dadkh s yan %s',
35 | past : 'yan %s',
36 | s : 'imik',
37 | ss : '%d imik',
38 | m : 'minuḍ',
39 | mm : '%d minuḍ',
40 | h : 'saɛa',
41 | hh : '%d tassaɛin',
42 | d : 'ass',
43 | dd : '%d ossan',
44 | M : 'ayowr',
45 | MM : '%d iyyirn',
46 | y : 'asgas',
47 | yy : '%d isgasn'
48 | },
49 | week : {
50 | dow : 6, // Saturday is the first day of the week.
51 | doy : 12 // The week that contains Jan 1st is the first week of the year.
52 | }
53 | });
54 |
55 | return tzmLatn;
56 |
57 | })));
58 |
--------------------------------------------------------------------------------
/public/bower_components/moment/locale/uz-latn.js:
--------------------------------------------------------------------------------
1 | //! moment.js locale configuration
2 |
3 | ;(function (global, factory) {
4 | typeof exports === 'object' && typeof module !== 'undefined'
5 | && typeof require === 'function' ? factory(require('../moment')) :
6 | typeof define === 'function' && define.amd ? define(['../moment'], factory) :
7 | factory(global.moment)
8 | }(this, (function (moment) { 'use strict';
9 |
10 |
11 | var uzLatn = moment.defineLocale('uz-latn', {
12 | months : 'Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr'.split('_'),
13 | monthsShort : 'Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek'.split('_'),
14 | weekdays : 'Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba'.split('_'),
15 | weekdaysShort : 'Yak_Dush_Sesh_Chor_Pay_Jum_Shan'.split('_'),
16 | weekdaysMin : 'Ya_Du_Se_Cho_Pa_Ju_Sha'.split('_'),
17 | longDateFormat : {
18 | LT : 'HH:mm',
19 | LTS : 'HH:mm:ss',
20 | L : 'DD/MM/YYYY',
21 | LL : 'D MMMM YYYY',
22 | LLL : 'D MMMM YYYY HH:mm',
23 | LLLL : 'D MMMM YYYY, dddd HH:mm'
24 | },
25 | calendar : {
26 | sameDay : '[Bugun soat] LT [da]',
27 | nextDay : '[Ertaga] LT [da]',
28 | nextWeek : 'dddd [kuni soat] LT [da]',
29 | lastDay : '[Kecha soat] LT [da]',
30 | lastWeek : '[O\'tgan] dddd [kuni soat] LT [da]',
31 | sameElse : 'L'
32 | },
33 | relativeTime : {
34 | future : 'Yaqin %s ichida',
35 | past : 'Bir necha %s oldin',
36 | s : 'soniya',
37 | ss : '%d soniya',
38 | m : 'bir daqiqa',
39 | mm : '%d daqiqa',
40 | h : 'bir soat',
41 | hh : '%d soat',
42 | d : 'bir kun',
43 | dd : '%d kun',
44 | M : 'bir oy',
45 | MM : '%d oy',
46 | y : 'bir yil',
47 | yy : '%d yil'
48 | },
49 | week : {
50 | dow : 1, // Monday is the first day of the week.
51 | doy : 7 // The week that contains Jan 1st is the first week of the year.
52 | }
53 | });
54 |
55 | return uzLatn;
56 |
57 | })));
58 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/locale/x-pseudo.js:
--------------------------------------------------------------------------------
1 | //! moment.js locale configuration
2 | //! locale : Pseudo [x-pseudo]
3 | //! author : Andrew Hood : https://github.com/andrewhood125
4 |
5 | import moment from '../moment';
6 |
7 | export default moment.defineLocale('x-pseudo', {
8 | months : 'J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér'.split('_'),
9 | monthsShort : 'J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc'.split('_'),
10 | monthsParseExact : true,
11 | weekdays : 'S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý'.split('_'),
12 | weekdaysShort : 'S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát'.split('_'),
13 | weekdaysMin : 'S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá'.split('_'),
14 | weekdaysParseExact : true,
15 | longDateFormat : {
16 | LT : 'HH:mm',
17 | L : 'DD/MM/YYYY',
18 | LL : 'D MMMM YYYY',
19 | LLL : 'D MMMM YYYY HH:mm',
20 | LLLL : 'dddd, D MMMM YYYY HH:mm'
21 | },
22 | calendar : {
23 | sameDay : '[T~ódá~ý át] LT',
24 | nextDay : '[T~ómó~rró~w át] LT',
25 | nextWeek : 'dddd [át] LT',
26 | lastDay : '[Ý~ést~érdá~ý át] LT',
27 | lastWeek : '[L~ást] dddd [át] LT',
28 | sameElse : 'L'
29 | },
30 | relativeTime : {
31 | future : 'í~ñ %s',
32 | past : '%s á~gó',
33 | s : 'á ~féw ~sécó~ñds',
34 | ss : '%d s~écóñ~ds',
35 | m : 'á ~míñ~úté',
36 | mm : '%d m~íñú~tés',
37 | h : 'á~ñ hó~úr',
38 | hh : '%d h~óúrs',
39 | d : 'á ~dáý',
40 | dd : '%d d~áýs',
41 | M : 'á ~móñ~th',
42 | MM : '%d m~óñt~hs',
43 | y : 'á ~ýéár',
44 | yy : '%d ý~éárs'
45 | },
46 | dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
47 | ordinal : function (number) {
48 | var b = number % 10,
49 | output = (~~(number % 100 / 10) === 1) ? 'th' :
50 | (b === 1) ? 'st' :
51 | (b === 2) ? 'nd' :
52 | (b === 3) ? 'rd' : 'th';
53 | return number + output;
54 | },
55 | week : {
56 | dow : 1, // Monday is the first day of the week.
57 | doy : 4 // The week that contains Jan 4th is the first week of the year.
58 | }
59 | });
60 |
--------------------------------------------------------------------------------
/public/bower_components/moment/locale/mt.js:
--------------------------------------------------------------------------------
1 | //! moment.js locale configuration
2 |
3 | ;(function (global, factory) {
4 | typeof exports === 'object' && typeof module !== 'undefined'
5 | && typeof require === 'function' ? factory(require('../moment')) :
6 | typeof define === 'function' && define.amd ? define(['../moment'], factory) :
7 | factory(global.moment)
8 | }(this, (function (moment) { 'use strict';
9 |
10 |
11 | var mt = moment.defineLocale('mt', {
12 | months : 'Jannar_Frar_Marzu_April_Mejju_Ġunju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Diċembru'.split('_'),
13 | monthsShort : 'Jan_Fra_Mar_Apr_Mej_Ġun_Lul_Aww_Set_Ott_Nov_Diċ'.split('_'),
14 | weekdays : 'Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ġimgħa_Is-Sibt'.split('_'),
15 | weekdaysShort : 'Ħad_Tne_Tli_Erb_Ħam_Ġim_Sib'.split('_'),
16 | weekdaysMin : 'Ħa_Tn_Tl_Er_Ħa_Ġi_Si'.split('_'),
17 | longDateFormat : {
18 | LT : 'HH:mm',
19 | LTS : 'HH:mm:ss',
20 | L : 'DD/MM/YYYY',
21 | LL : 'D MMMM YYYY',
22 | LLL : 'D MMMM YYYY HH:mm',
23 | LLLL : 'dddd, D MMMM YYYY HH:mm'
24 | },
25 | calendar : {
26 | sameDay : '[Illum fil-]LT',
27 | nextDay : '[Għada fil-]LT',
28 | nextWeek : 'dddd [fil-]LT',
29 | lastDay : '[Il-bieraħ fil-]LT',
30 | lastWeek : 'dddd [li għadda] [fil-]LT',
31 | sameElse : 'L'
32 | },
33 | relativeTime : {
34 | future : 'f’ %s',
35 | past : '%s ilu',
36 | s : 'ftit sekondi',
37 | ss : '%d sekondi',
38 | m : 'minuta',
39 | mm : '%d minuti',
40 | h : 'siegħa',
41 | hh : '%d siegħat',
42 | d : 'ġurnata',
43 | dd : '%d ġranet',
44 | M : 'xahar',
45 | MM : '%d xhur',
46 | y : 'sena',
47 | yy : '%d sni'
48 | },
49 | dayOfMonthOrdinalParse : /\d{1,2}º/,
50 | ordinal: '%dº',
51 | week : {
52 | dow : 1, // Monday is the first day of the week.
53 | doy : 4 // The week that contains Jan 4th is the first week of the year.
54 | }
55 | });
56 |
57 | return mt;
58 |
59 | })));
60 |
--------------------------------------------------------------------------------
/public/bower_components/moment/locale/sw.js:
--------------------------------------------------------------------------------
1 | //! moment.js locale configuration
2 |
3 | ;(function (global, factory) {
4 | typeof exports === 'object' && typeof module !== 'undefined'
5 | && typeof require === 'function' ? factory(require('../moment')) :
6 | typeof define === 'function' && define.amd ? define(['../moment'], factory) :
7 | factory(global.moment)
8 | }(this, (function (moment) { 'use strict';
9 |
10 |
11 | var sw = moment.defineLocale('sw', {
12 | months : 'Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba'.split('_'),
13 | monthsShort : 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des'.split('_'),
14 | weekdays : 'Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi'.split('_'),
15 | weekdaysShort : 'Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos'.split('_'),
16 | weekdaysMin : 'J2_J3_J4_J5_Al_Ij_J1'.split('_'),
17 | weekdaysParseExact : true,
18 | longDateFormat : {
19 | LT : 'HH:mm',
20 | LTS : 'HH:mm:ss',
21 | L : 'DD.MM.YYYY',
22 | LL : 'D MMMM YYYY',
23 | LLL : 'D MMMM YYYY HH:mm',
24 | LLLL : 'dddd, D MMMM YYYY HH:mm'
25 | },
26 | calendar : {
27 | sameDay : '[leo saa] LT',
28 | nextDay : '[kesho saa] LT',
29 | nextWeek : '[wiki ijayo] dddd [saat] LT',
30 | lastDay : '[jana] LT',
31 | lastWeek : '[wiki iliyopita] dddd [saat] LT',
32 | sameElse : 'L'
33 | },
34 | relativeTime : {
35 | future : '%s baadaye',
36 | past : 'tokea %s',
37 | s : 'hivi punde',
38 | ss : 'sekunde %d',
39 | m : 'dakika moja',
40 | mm : 'dakika %d',
41 | h : 'saa limoja',
42 | hh : 'masaa %d',
43 | d : 'siku moja',
44 | dd : 'masiku %d',
45 | M : 'mwezi mmoja',
46 | MM : 'miezi %d',
47 | y : 'mwaka mmoja',
48 | yy : 'miaka %d'
49 | },
50 | week : {
51 | dow : 1, // Monday is the first day of the week.
52 | doy : 7 // The week that contains Jan 1st is the first week of the year.
53 | }
54 | });
55 |
56 | return sw;
57 |
58 | })));
59 |
--------------------------------------------------------------------------------
/test/skill/order/begin.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | require("dotenv").config();
4 |
5 | const chai = require('chai');
6 | const chaiAsPromised = require('chai-as-promised');
7 | const Emulator = require("../../../test-util/emulator");
8 | const messenger_option = {
9 | name: "line",
10 | options: {
11 | line_channel_secret: process.env.LINE_BOT_CHANNEL_SECRET
12 | }
13 | };
14 | const user_id = "order";
15 | chai.use(chaiAsPromised);
16 | const should = chai.should();
17 |
18 | const emu = new Emulator(messenger_option.name, messenger_option.options);
19 |
20 | describe("Test begin of order skill", async function(){
21 | beforeEach(async () => {
22 | await emu.clear_context(user_id);
23 | })
24 |
25 | describe("If sender lang is ja,", async function(){
26 | it("retrieves menu in ja.", async function(){
27 | let event;
28 | let context;
29 | event = emu.create_postback_event(user_id, {data: JSON.stringify({
30 | _type: "intent",
31 | intent: {
32 | name: "order"
33 | },
34 | language: "ja"
35 | })});
36 |
37 | context = await emu.send(event);
38 |
39 | context.intent.name.should.equal("order");
40 | context.confirming.should.equal("label");
41 | context.global.menu_list.should.have.lengthOf(3);
42 | context.global.menu_list[0].label.should.equal("カオマンガイ");
43 | })
44 | })
45 |
46 | describe("If sender lang is en,", async function(){
47 | it("retrieves menu in en.", async function(){
48 | let event;
49 | let context;
50 | event = emu.create_postback_event(user_id, {data: JSON.stringify({
51 | _type: "intent",
52 | intent: {
53 | name: "order"
54 | },
55 | language: "en"
56 | })});
57 |
58 | context = await emu.send(event);
59 |
60 | context.intent.name.should.equal("order");
61 | context.confirming.should.equal("label");
62 | context.global.menu_list.should.have.lengthOf(3);
63 | context.global.menu_list[0].label.should.equal("Khao Man Kai");
64 | })
65 | })
66 | })
--------------------------------------------------------------------------------
/public/bower_components/moment/locale/da.js:
--------------------------------------------------------------------------------
1 | //! moment.js locale configuration
2 |
3 | ;(function (global, factory) {
4 | typeof exports === 'object' && typeof module !== 'undefined'
5 | && typeof require === 'function' ? factory(require('../moment')) :
6 | typeof define === 'function' && define.amd ? define(['../moment'], factory) :
7 | factory(global.moment)
8 | }(this, (function (moment) { 'use strict';
9 |
10 |
11 | var da = moment.defineLocale('da', {
12 | months : 'januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december'.split('_'),
13 | monthsShort : 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),
14 | weekdays : 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),
15 | weekdaysShort : 'søn_man_tir_ons_tor_fre_lør'.split('_'),
16 | weekdaysMin : 'sø_ma_ti_on_to_fr_lø'.split('_'),
17 | longDateFormat : {
18 | LT : 'HH:mm',
19 | LTS : 'HH:mm:ss',
20 | L : 'DD.MM.YYYY',
21 | LL : 'D. MMMM YYYY',
22 | LLL : 'D. MMMM YYYY HH:mm',
23 | LLLL : 'dddd [d.] D. MMMM YYYY [kl.] HH:mm'
24 | },
25 | calendar : {
26 | sameDay : '[i dag kl.] LT',
27 | nextDay : '[i morgen kl.] LT',
28 | nextWeek : 'på dddd [kl.] LT',
29 | lastDay : '[i går kl.] LT',
30 | lastWeek : '[i] dddd[s kl.] LT',
31 | sameElse : 'L'
32 | },
33 | relativeTime : {
34 | future : 'om %s',
35 | past : '%s siden',
36 | s : 'få sekunder',
37 | ss : '%d sekunder',
38 | m : 'et minut',
39 | mm : '%d minutter',
40 | h : 'en time',
41 | hh : '%d timer',
42 | d : 'en dag',
43 | dd : '%d dage',
44 | M : 'en måned',
45 | MM : '%d måneder',
46 | y : 'et år',
47 | yy : '%d år'
48 | },
49 | dayOfMonthOrdinalParse: /\d{1,2}\./,
50 | ordinal : '%d.',
51 | week : {
52 | dow : 1, // Monday is the first day of the week.
53 | doy : 4 // The week that contains Jan 4th is the first week of the year.
54 | }
55 | });
56 |
57 | return da;
58 |
59 | })));
60 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/locale/tet.js:
--------------------------------------------------------------------------------
1 | //! moment.js locale configuration
2 | //! locale : Tetun Dili (East Timor) [tet]
3 | //! author : Joshua Brooks : https://github.com/joshbrooks
4 | //! author : Onorio De J. Afonso : https://github.com/marobo
5 | //! author : Sonia Simoes : https://github.com/soniasimoes
6 |
7 | import moment from '../moment';
8 |
9 | export default moment.defineLocale('tet', {
10 | months : 'Janeiru_Fevereiru_Marsu_Abril_Maiu_Juñu_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru'.split('_'),
11 | monthsShort : 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'),
12 | weekdays : 'Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu'.split('_'),
13 | weekdaysShort : 'Dom_Seg_Ters_Kua_Kint_Sest_Sab'.split('_'),
14 | weekdaysMin : 'Do_Seg_Te_Ku_Ki_Ses_Sa'.split('_'),
15 | longDateFormat : {
16 | LT : 'HH:mm',
17 | LTS : 'HH:mm:ss',
18 | L : 'DD/MM/YYYY',
19 | LL : 'D MMMM YYYY',
20 | LLL : 'D MMMM YYYY HH:mm',
21 | LLLL : 'dddd, D MMMM YYYY HH:mm'
22 | },
23 | calendar : {
24 | sameDay: '[Ohin iha] LT',
25 | nextDay: '[Aban iha] LT',
26 | nextWeek: 'dddd [iha] LT',
27 | lastDay: '[Horiseik iha] LT',
28 | lastWeek: 'dddd [semana kotuk] [iha] LT',
29 | sameElse: 'L'
30 | },
31 | relativeTime : {
32 | future : 'iha %s',
33 | past : '%s liuba',
34 | s : 'minutu balun',
35 | ss : 'minutu %d',
36 | m : 'minutu ida',
37 | mm : 'minutu %d',
38 | h : 'oras ida',
39 | hh : 'oras %d',
40 | d : 'loron ida',
41 | dd : 'loron %d',
42 | M : 'fulan ida',
43 | MM : 'fulan %d',
44 | y : 'tinan ida',
45 | yy : 'tinan %d'
46 | },
47 | dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
48 | ordinal : function (number) {
49 | var b = number % 10,
50 | output = (~~(number % 100 / 10) === 1) ? 'th' :
51 | (b === 1) ? 'st' :
52 | (b === 2) ? 'nd' :
53 | (b === 3) ? 'rd' : 'th';
54 | return number + output;
55 | },
56 | week : {
57 | dow : 1, // Monday is the first day of the week.
58 | doy : 4 // The week that contains Jan 4th is the first week of the year.
59 | }
60 | });
61 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/duration/as.js:
--------------------------------------------------------------------------------
1 | import { daysToMonths, monthsToDays } from './bubble';
2 | import { normalizeUnits } from '../units/aliases';
3 | import toInt from '../utils/to-int';
4 |
5 | export function as (units) {
6 | if (!this.isValid()) {
7 | return NaN;
8 | }
9 | var days;
10 | var months;
11 | var milliseconds = this._milliseconds;
12 |
13 | units = normalizeUnits(units);
14 |
15 | if (units === 'month' || units === 'year') {
16 | days = this._days + milliseconds / 864e5;
17 | months = this._months + daysToMonths(days);
18 | return units === 'month' ? months : months / 12;
19 | } else {
20 | // handle milliseconds separately because of floating point math errors (issue #1867)
21 | days = this._days + Math.round(monthsToDays(this._months));
22 | switch (units) {
23 | case 'week' : return days / 7 + milliseconds / 6048e5;
24 | case 'day' : return days + milliseconds / 864e5;
25 | case 'hour' : return days * 24 + milliseconds / 36e5;
26 | case 'minute' : return days * 1440 + milliseconds / 6e4;
27 | case 'second' : return days * 86400 + milliseconds / 1000;
28 | // Math.floor prevents floating point math errors here
29 | case 'millisecond': return Math.floor(days * 864e5) + milliseconds;
30 | default: throw new Error('Unknown unit ' + units);
31 | }
32 | }
33 | }
34 |
35 | // TODO: Use this.as('ms')?
36 | export function valueOf () {
37 | if (!this.isValid()) {
38 | return NaN;
39 | }
40 | return (
41 | this._milliseconds +
42 | this._days * 864e5 +
43 | (this._months % 12) * 2592e6 +
44 | toInt(this._months / 12) * 31536e6
45 | );
46 | }
47 |
48 | function makeAs (alias) {
49 | return function () {
50 | return this.as(alias);
51 | };
52 | }
53 |
54 | export var asMilliseconds = makeAs('ms');
55 | export var asSeconds = makeAs('s');
56 | export var asMinutes = makeAs('m');
57 | export var asHours = makeAs('h');
58 | export var asDays = makeAs('d');
59 | export var asWeeks = makeAs('w');
60 | export var asMonths = makeAs('M');
61 | export var asYears = makeAs('y');
62 |
--------------------------------------------------------------------------------
/public/bower_components/moment/locale/nn.js:
--------------------------------------------------------------------------------
1 | //! moment.js locale configuration
2 |
3 | ;(function (global, factory) {
4 | typeof exports === 'object' && typeof module !== 'undefined'
5 | && typeof require === 'function' ? factory(require('../moment')) :
6 | typeof define === 'function' && define.amd ? define(['../moment'], factory) :
7 | factory(global.moment)
8 | }(this, (function (moment) { 'use strict';
9 |
10 |
11 | var nn = moment.defineLocale('nn', {
12 | months : 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split('_'),
13 | monthsShort : 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'),
14 | weekdays : 'sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag'.split('_'),
15 | weekdaysShort : 'sun_mån_tys_ons_tor_fre_lau'.split('_'),
16 | weekdaysMin : 'su_må_ty_on_to_fr_lø'.split('_'),
17 | longDateFormat : {
18 | LT : 'HH:mm',
19 | LTS : 'HH:mm:ss',
20 | L : 'DD.MM.YYYY',
21 | LL : 'D. MMMM YYYY',
22 | LLL : 'D. MMMM YYYY [kl.] H:mm',
23 | LLLL : 'dddd D. MMMM YYYY [kl.] HH:mm'
24 | },
25 | calendar : {
26 | sameDay: '[I dag klokka] LT',
27 | nextDay: '[I morgon klokka] LT',
28 | nextWeek: 'dddd [klokka] LT',
29 | lastDay: '[I går klokka] LT',
30 | lastWeek: '[Føregåande] dddd [klokka] LT',
31 | sameElse: 'L'
32 | },
33 | relativeTime : {
34 | future : 'om %s',
35 | past : '%s sidan',
36 | s : 'nokre sekund',
37 | ss : '%d sekund',
38 | m : 'eit minutt',
39 | mm : '%d minutt',
40 | h : 'ein time',
41 | hh : '%d timar',
42 | d : 'ein dag',
43 | dd : '%d dagar',
44 | M : 'ein månad',
45 | MM : '%d månader',
46 | y : 'eit år',
47 | yy : '%d år'
48 | },
49 | dayOfMonthOrdinalParse: /\d{1,2}\./,
50 | ordinal : '%d.',
51 | week : {
52 | dow : 1, // Monday is the first day of the week.
53 | doy : 4 // The week that contains Jan 4th is the first week of the year.
54 | }
55 | });
56 |
57 | return nn;
58 |
59 | })));
60 |
--------------------------------------------------------------------------------
/public/bower_components/moment/src/lib/units/year.js:
--------------------------------------------------------------------------------
1 | import { makeGetSet } from '../moment/get-set';
2 | import { addFormatToken } from '../format/format';
3 | import { addUnitAlias } from './aliases';
4 | import { addUnitPriority } from './priorities';
5 | import { addRegexToken, match1to2, match1to4, match1to6, match2, match4, match6, matchSigned } from '../parse/regex';
6 | import { addParseToken } from '../parse/token';
7 | import { hooks } from '../utils/hooks';
8 | import { YEAR } from './constants';
9 | import toInt from '../utils/to-int';
10 |
11 | // FORMATTING
12 |
13 | addFormatToken('Y', 0, 0, function () {
14 | var y = this.year();
15 | return y <= 9999 ? '' + y : '+' + y;
16 | });
17 |
18 | addFormatToken(0, ['YY', 2], 0, function () {
19 | return this.year() % 100;
20 | });
21 |
22 | addFormatToken(0, ['YYYY', 4], 0, 'year');
23 | addFormatToken(0, ['YYYYY', 5], 0, 'year');
24 | addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');
25 |
26 | // ALIASES
27 |
28 | addUnitAlias('year', 'y');
29 |
30 | // PRIORITIES
31 |
32 | addUnitPriority('year', 1);
33 |
34 | // PARSING
35 |
36 | addRegexToken('Y', matchSigned);
37 | addRegexToken('YY', match1to2, match2);
38 | addRegexToken('YYYY', match1to4, match4);
39 | addRegexToken('YYYYY', match1to6, match6);
40 | addRegexToken('YYYYYY', match1to6, match6);
41 |
42 | addParseToken(['YYYYY', 'YYYYYY'], YEAR);
43 | addParseToken('YYYY', function (input, array) {
44 | array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);
45 | });
46 | addParseToken('YY', function (input, array) {
47 | array[YEAR] = hooks.parseTwoDigitYear(input);
48 | });
49 | addParseToken('Y', function (input, array) {
50 | array[YEAR] = parseInt(input, 10);
51 | });
52 |
53 | // HELPERS
54 |
55 | export function daysInYear(year) {
56 | return isLeapYear(year) ? 366 : 365;
57 | }
58 |
59 | export function isLeapYear(year) {
60 | return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
61 | }
62 |
63 | // HOOKS
64 |
65 | hooks.parseTwoDigitYear = function (input) {
66 | return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);
67 | };
68 |
69 | // MOMENTS
70 |
71 | export var getSetYear = makeGetSet('FullYear', true);
72 |
73 | export function getIsLeapYear () {
74 | return isLeapYear(this.year());
75 | }
76 |
--------------------------------------------------------------------------------