diff --git a/dev/App/Abstract.jsx b/dev/App/Abstract.jsx
index e9ae5dc31..fd22b0553 100644
--- a/dev/App/Abstract.jsx
+++ b/dev/App/Abstract.jsx
@@ -330,7 +330,7 @@ class AbstractApp extends AbstractBoot
{
ssm.addState({
id: 'mobile',
- maxWidth: 767,
+ query: '(max-width: 767px)',
onEnter: () => {
$html.addClass('ssm-state-mobile');
Events.pub('ssm.mobile-enter');
@@ -343,8 +343,7 @@ class AbstractApp extends AbstractBoot
ssm.addState({
id: 'tablet',
- minWidth: 768,
- maxWidth: 999,
+ query: '(min-width: 768px) and (max-width: 999px)',
onEnter: function() {
$html.addClass('ssm-state-tablet');
},
@@ -355,8 +354,7 @@ class AbstractApp extends AbstractBoot
ssm.addState({
id: 'desktop',
- minWidth: 1000,
- maxWidth: 1400,
+ query: '(min-width: 1000px) and (max-width: 1400px)',
onEnter: () => {
$html.addClass('ssm-state-desktop');
},
@@ -367,7 +365,7 @@ class AbstractApp extends AbstractBoot
ssm.addState({
id: 'desktop-large',
- minWidth: 1400,
+ query: '(min-width: 1401px)',
onEnter: () => {
$html.addClass('ssm-state-desktop-large');
},
@@ -394,8 +392,6 @@ class AbstractApp extends AbstractBoot
leftPanelDisabled.valueHasMutated();
- ssm.ready();
-
require('Stores/Language').populate();
require('Stores/Theme').populate();
require('Stores/Social').populate();
diff --git a/dev/Common/ClientStorageDriver/Cookie.jsx b/dev/Common/ClientStorageDriver/Cookie.jsx
index b7e097ba4..8a7bd3070 100644
--- a/dev/Common/ClientStorageDriver/Cookie.jsx
+++ b/dev/Common/ClientStorageDriver/Cookie.jsx
@@ -1,7 +1,6 @@
import window from 'window';
-import $ from '$';
-import JSON from 'JSON';
+import Cookies from 'js-cookie';
import {isUnd} from 'Common/Utils';
import {CLIENT_SIDE_STORAGE_INDEX_NAME} from 'Common/Consts';
@@ -20,8 +19,7 @@ class CookieDriver
try
{
- const storageValue = $.cookie(CLIENT_SIDE_STORAGE_INDEX_NAME);
- storageResult = null === storageValue ? null : JSON.parse(storageValue);
+ storageResult = Cookies.getJSON(CLIENT_SIDE_STORAGE_INDEX_NAME);
}
catch (e) {} // eslint-disable-line no-empty
@@ -29,7 +27,7 @@ class CookieDriver
try
{
- $.cookie(CLIENT_SIDE_STORAGE_INDEX_NAME, JSON.stringify(storageResult), {
+ Cookies.set(CLIENT_SIDE_STORAGE_INDEX_NAME, storageResult, {
expires: 30
});
@@ -50,10 +48,7 @@ class CookieDriver
try
{
- const
- storageValue = $.cookie(CLIENT_SIDE_STORAGE_INDEX_NAME),
- storageResult = null === storageValue ? null : JSON.parse(storageValue);
-
+ const storageResult = Cookies.getJSON(CLIENT_SIDE_STORAGE_INDEX_NAME);
result = (storageResult && !isUnd(storageResult[key])) ? storageResult[key] : null;
}
catch (e) {} // eslint-disable-line no-empty
diff --git a/dev/Common/Consts.jsx b/dev/Common/Consts.jsx
index 47f558924..56b48b3b6 100644
--- a/dev/Common/Consts.jsx
+++ b/dev/Common/Consts.jsx
@@ -1,5 +1,4 @@
-/* eslint max-len: 0 */
export const MESSAGES_PER_PAGE = 20;
export const MESSAGES_PER_PAGE_VALUES = [10, 20, 30, 50, 100];
@@ -38,6 +37,7 @@ export const TOKEN_ERROR_LIMIT = 10;
export const RAINLOOP_TRIAL_KEY = 'RAINLOOP-TRIAL-KEY';
+/* eslint max-len: 0 */
export const DATA_IMAGE_USER_DOT_PIC = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC4AAAAuCAYAAABXuSs3AAAHHklEQVRoQ7VZW08bVxCeXRuwIbTGXIwNtBBaqjwgVUiR8lDlbza9qe1DpVZ9aNQ/0KpPeaJK07SpcuEeCEmUAObm21bfrL9lONjexSYrWfbunj37zXdmvpkz9oIgCKTD0Wg0xPd94TDP83Q0zvWa50vzklSrdanVanqf4/D84GBGr+F+Op3S8fqoJxLOdnZgTvsO/nYhenHA+UC7CWF1uXwkb9++ldPTUwVerVbVqFQqpR8YPjQ0JCMjI5LNDijoRgP3PQVu5+5Eor2XGLg7IV4GkIdHJ/LmzRs5ODiIwNbrdR0O0GCcq4Xz4eFhmZyclP7+tDQaIik/BG5XKQn4SwG3zJTLZXn9+rUclI8UHD5YVoDDN8bSzXhONwL48fFxGR4eilzFZT1uFRIB5yT8BqCdnR3Z3d0VP9Un6XRawYJpggVrZBv38ME4XKtUKnLt2jUplUoy1PR/l3U7T6sVSAQcgMAkj8PDQ9ne3pajoyMRL7zeKsYZWHgWYDGmv78/mmdwcFA+mJlSgziHDWrERrsjEXDXegTi1tZW+DLxI2bxIrqFNYTXyDyCFweMAHCwb8e4RnTNuOsqe3t7sra21pTD0Kct666E8XlcZyzw9/RUUXK5nK5oUinUQI6TQ3cynO/v78vq6qrKXCNwlTiJJpyNGc3nZHp6uqV2dwrQWOCtZBDAV1ZWwsQk7f0wiQn5kffbAu/0/KWBYzIC1+XukfGx0RGZmppKlC2tIV0Bh4aDcZW7HhkfH8urLLZL7T2pihvlkMNnz56FiadHxicL41IsFpN41bkxsYxbRdFo9jwB8KdPn14J8KnSpBQKhQs63nPmbCVRcBUAR2Lq1VVmpksyMTFxAXjcEsQybiegESionjx5osCZOeNe1O4+EhCAX7bQSgQcxRHTMgAgcz5+/Dis/hL4uHU3/B4YGNASGHIKxuEql0k+l05AeIAF1vPnz5VxFFmdDlaJrMtZITJeSsXCOTlMunKxjLtMYOKNjQ158eJFuAuKkUOb5sEwgff19SkJUBVkThZUbnXZrtCKBQ6gbnWIkjZpyne3ejAWoGnA7Icz6irvBLgbOMicCM6TkxPx/LAkbXfgWcsazuE2kFRsKD5Z+CiqDumKncpZvieWcS6dDVD8xiYCNflpJdwcdwJOf9airLmVQ7DPzMxIYWLsXGXoVqLt5k0M3K3JUVPDZdbWNzsCp48TPFdvdnZWUz32nDha7bJ63kgAJPzSdRks9/Kf9xMJAQ1gq2NpaUmy2Yz4zar4nQC3xb99AQwCcGzLAAwuhG8YiWvcOKts+r4GOe5nMhm5efOm9lUA3E3vSZJRrKvE0fnPv//Jy5cvo5cTHIPQbSjhOoqq69evS19f6lxDKK4+sVhigZPtKJqbrQeqxd5+WR4+fKgqgT0k2XX3nhiPgETWXFhYkFzuPZ2yVq1GTSOXpE47/VjgNnD4m4GG7/LhsTx69EiwD4Vr2MwIIxgbAH18fKx1yfz8vEogNvGtWnCuhLZa9UTAreVWFsHy/b/+Vrbdl7E5REMQD2jDoUbByty+/ZnU64GkU2HzyJLhktU1cLv8nARgkYS2d3ajAgwG8qU2oLmDZ92CMaOjo7K4uCiZgbDWaRWgnZhPxLhrMUCvr69riwKZk1LHF7XqrWAO9hJxH6ozNzcnCx/PqztZg9mf6SQMscCtm2C5ke4BGMlHWTUp36036AJajDVrFMzBrhhWslQsSrFYiOqVpMriNYIgqFRq2j3FAb/zffT6zuxFXxsNzs3NTXn16lW4gYiW96w1FyedF+83xG/2FNGCRpU4NjamMsn+OZ9xE5RXqdaDdPpib6RWCzuwKF9RxqI2AVNQBwQYJoK0wdBejnqtEikP3pfP51XjUTESl12FqJEKxsEorARYDD44ONTeID7YpsEnrRvQfWAI2e8WfDaTUSIwJ0iBCmFOtOUAHvVMPp/TPwvYFVYFIuP8l+DBgwdaa2Miqwa0GgYwfeMltovbDfh6c1vIgMYcliSsKv4IWFr6VDHxvldvBAH+1sA+cnl5WYOPmmr9ir+1l9I0Cgz0yjhXjfJJ0JROnmezWbl165ayr/5fqwcBNr7IfhjMqKcvESSM4eRcCasQ3bDNObmKPLdGUGpZsN24cUNLBm9zazu4d++e6qpNBFaTuUS26U5dpuR1CxyA7J9ddrMRqlz4pwLLYawymPd++/2PADt2ugcGwq9gCCdhQ96C6xWwa6j1ceuq+I0EhW0i8MAIVJfeL3d/DVD8EKi12P6/2S2jV/EccVB54O/ejz/9HGCpoBBMta5rXMXLu53D1XAwjhXwvvv+h4BAXVe4bOu3O3ChxF08LiZFG3fel199G9CH3fLyqv24NcB44MRhpdK788U3CpyKwsCw590xmfSpzsBt0Fqc3ud3vtZigxWcVZCklVpSiN0w3q5E/h9TGMIUuA3+EQAAAABJRU5ErkJggg==';
export const DATA_IMAGE_TRANSP_PIC = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQIW2NkAAIAAAoAAggA9GkAAAAASUVORK5CYII=';
diff --git a/dev/Common/Momentor.jsx b/dev/Common/Momentor.jsx
index 33665b3ff..61547ecb0 100644
--- a/dev/Common/Momentor.jsx
+++ b/dev/Common/Momentor.jsx
@@ -40,7 +40,7 @@ export function momentNowUnix()
*/
export function searchSubtractFormatDateHelper(date)
{
- return momentNow().clone().subtract('days', date).format('YYYY.MM.DD');
+ return momentNow().clone().subtract(date, 'days').format('YYYY.MM.DD');
}
/**
@@ -60,7 +60,7 @@ function formatCustomShortDate(m)
return i18n('MESSAGE_LIST/TODAY_AT', {
TIME: m.format('LT')
});
- case now.clone().subtract('days', 1).format('L') === m.format('L'):
+ case now.clone().subtract(1, 'days').format('L') === m.format('L'):
return i18n('MESSAGE_LIST/YESTERDAY_AT', {
TIME: m.format('LT')
});
diff --git a/dev/Common/Utils.jsx b/dev/Common/Utils.jsx
index 29564cf35..31a458ae3 100644
--- a/dev/Common/Utils.jsx
+++ b/dev/Common/Utils.jsx
@@ -7,7 +7,6 @@ import {$win, $div, dropdownVisibility, data as GlobalsData} from 'Common/Global
import {ComposeType, EventKeyCode, SaveSettingsStep, FolderType} from 'Common/Enums';
import {Mime} from 'Common/Mime';
-import JSEncrypt from 'JSEncrypt';
import Autolinker from 'Autolinker';
const trim = $.trim;
@@ -184,59 +183,6 @@ export function fakeMd5(len = 32)
return result;
}
-let encryptObject = null;
-
-/**
- * @param {constructor} JSEncryptClass
- * @param {string} publicKey
- * @returns {JSEncrypt|boolean}
- */
-const rsaObject = (JSEncryptClass, publicKey) => {
-
- if (JSEncryptClass && publicKey && (null === encryptObject || (encryptObject && encryptObject.__publicKey !== publicKey)) &&
- window.crypto && window.crypto.getRandomValues)
- {
- encryptObject = new JSEncryptClass();
- encryptObject.setPublicKey(publicKey);
- encryptObject.__publicKey = publicKey;
- }
- else
- {
- encryptObject = false;
- }
-
- return encryptObject;
-};
-
-/**
- * @param {string} value
- * @param {string} publicKey
- * @returns {string}
- */
-const rsaEncode = (value, publicKey) => {
-
- if (window.crypto && window.crypto.getRandomValues && publicKey)
- {
- let resultValue = false;
- const encrypt = rsaObject(JSEncrypt, publicKey);
-
- if (encrypt)
- {
- resultValue = encrypt.encrypt(fakeMd5() + ':' + value + ':' + fakeMd5());
- if (false !== resultValue && isNormal(resultValue))
- {
- return 'rsa:xxx:' + resultValue;
- }
- }
- }
-
- return value;
-};
-
-rsaEncode.supported = !!(window.crypto && window.crypto.getRandomValues && false && JSEncrypt);
-
-export {rsaEncode};
-
/**
* @param {string} text
* @returns {string}
@@ -248,7 +194,7 @@ export function encodeHtml(text)
/**
* @param {string} text
- * @param {number=} iLen = 100
+ * @param {number=} len = 100
* @returns {string}
*/
export function splitPlainText(text, len = 100)
@@ -312,15 +258,18 @@ export {timeOutAction, timeOutActionSecond};
*/
export function inFocus()
{
- if (window.document.activeElement)
- {
- if (isUnd(window.document.activeElement.__inFocusCache))
+ try {
+ if (window.document.activeElement)
{
- window.document.activeElement.__inFocusCache = $(window.document.activeElement).is('input,textarea,iframe,.cke_editable');
- }
+ if (isUnd(window.document.activeElement.__inFocusCache))
+ {
+ window.document.activeElement.__inFocusCache = $(window.document.activeElement).is('input,textarea,iframe,.cke_editable');
+ }
- return !!window.document.activeElement.__inFocusCache;
+ return !!window.document.activeElement.__inFocusCache;
+ }
}
+ catch (e) {} // eslint-disable-line no-empty
return false;
}
@@ -853,6 +802,8 @@ export function findEmailAndLinks(html)
urls: true,
email: true,
twitter: false,
+ phone: false,
+ hashtag: false,
replaceFn: function(autolinker, match) {
return !(autolinker && match && 'url' === match.getType() && match.matchedText && 0 !== match.matchedText.indexOf('http'));
}
diff --git a/dev/External/ko.js b/dev/External/ko.js
index 6135f8dcc..886c1c8c4 100644
--- a/dev/External/ko.js
+++ b/dev/External/ko.js
@@ -449,14 +449,16 @@ ko.bindingHandlers.modal = {
Globals = require('Common/Globals'),
Utils = require('Common/Utils');
- $(oElement).toggleClass('fade', !Globals.bMobileDevice).modal({
- 'keyboard': false,
- 'show': ko.unwrap(fValueAccessor())
- })
- .on('shown.koModal', Utils.windowResizeCallback)
- .find('.close').on('click.koModal', function() {
- fValueAccessor()(false);
- });
+ $(oElement)
+ .toggleClass('fade', !Globals.bMobileDevice)
+ .modal({
+ 'keyboard': false,
+ 'show': ko.unwrap(fValueAccessor())
+ })
+ .on('shown.koModal', Utils.windowResizeCallback)
+ .find('.close').on('click.koModal', function() {
+ fValueAccessor()(false);
+ });
ko.utils.domNodeDisposal.addDisposeCallback(oElement, function() {
$(oElement)
diff --git a/dev/Model/Email.jsx b/dev/Model/Email.jsx
index 4ec893c18..2f30d363f 100644
--- a/dev/Model/Email.jsx
+++ b/dev/Model/Email.jsx
@@ -172,7 +172,7 @@ class EmailModel
if (friendlyView && '' !== this.name)
{
result = wrapWithLink ? '') +
- '" target="_blank" tabindex="-1">' + encodeHtml(this.name) + '' : (encodeHtml ? encodeHtml(this.name) : this.name);
+ '" target="_blank" tabindex="-1">' + encodeHtml(this.name) + '' : (useEncodeHtml ? encodeHtml(this.name) : this.name);
}
else
{
diff --git a/dev/Model/Folder.jsx b/dev/Model/Folder.jsx
index 136da729c..069b9fd43 100644
--- a/dev/Model/Folder.jsx
+++ b/dev/Model/Folder.jsx
@@ -32,7 +32,6 @@ class FolderModel extends AbstractModel
this.focused = ko.observable(false);
this.selected = ko.observable(false);
this.edited = ko.observable(false);
- this.collapsed = ko.observable(true);
this.subScribed = ko.observable(true);
this.checkable = ko.observable(false);
this.subFolders = ko.observableArray([]);
diff --git a/dev/Promises/User/Populator.js b/dev/Promises/User/Populator.js
index 787e5cdc1..5fbef1aa4 100644
--- a/dev/Promises/User/Populator.js
+++ b/dev/Promises/User/Populator.js
@@ -29,12 +29,12 @@ _.extend(PromisesUserPopulator.prototype, AbstractBasicPromises.prototype);
/**
* @param {string} sFullNameHash
+ * @param {Array?} expandedFolders
* @returns {boolean}
*/
-PromisesUserPopulator.prototype.isFolderExpanded = function(sFullNameHash)
+PromisesUserPopulator.prototype.isFolderExpanded = function(sFullNameHash, expandedFolders)
{
- var aExpandedList = Local.get(Enums.ClientSideKeyName.ExpandedFolders);
- return Utils.isArray(aExpandedList) && -1 !== _.indexOf(aExpandedList, sFullNameHash);
+ return expandedFolders && Utils.isArray(expandedFolders) && -1 !== _.indexOf(expandedFolders, sFullNameHash);
};
/**
@@ -50,9 +50,10 @@ PromisesUserPopulator.prototype.normalizeFolder = function(sFolderFullNameRaw)
/**
* @param {string} sNamespace
* @param {Array} aFolders
+ * @param {Array?} expandedFolders
* @returns {Array}
*/
-PromisesUserPopulator.prototype.folderResponseParseRec = function(sNamespace, aFolders)
+PromisesUserPopulator.prototype.folderResponseParseRec = function(sNamespace, aFolders, expandedFolders)
{
var
self = this,
@@ -60,6 +61,7 @@ PromisesUserPopulator.prototype.folderResponseParseRec = function(sNamespace, aF
iLen = 0,
oFolder = null,
oCacheFolder = null,
+ bDisplaySpecSetting = FolderStore.displaySpecSetting(),
sFolderFullNameRaw = '',
aSubFolders = [],
aList = [];
@@ -84,16 +86,16 @@ PromisesUserPopulator.prototype.folderResponseParseRec = function(sNamespace, aF
if (oCacheFolder)
{
- if (!FolderStore.displaySpecSetting())
- {
- oCacheFolder.checkable(true);
- }
- else
+ if (bDisplaySpecSetting)
{
oCacheFolder.checkable(!!oFolder.Checkable);
}
+ else
+ {
+ oCacheFolder.checkable(true);
+ }
- oCacheFolder.collapsed(!self.isFolderExpanded(oCacheFolder.fullNameHash));
+ oCacheFolder.collapsed(!self.isFolderExpanded(oCacheFolder.fullNameHash, expandedFolders));
if (oFolder.Extended)
{
@@ -118,7 +120,7 @@ PromisesUserPopulator.prototype.folderResponseParseRec = function(sNamespace, aF
aSubFolders['@Collection'] && Utils.isArray(aSubFolders['@Collection']))
{
oCacheFolder.subFolders(
- this.folderResponseParseRec(sNamespace, aSubFolders['@Collection']));
+ this.folderResponseParseRec(sNamespace, aSubFolders['@Collection'], expandedFolders));
}
aList.push(oCacheFolder);
@@ -135,14 +137,16 @@ PromisesUserPopulator.prototype.foldersList = function(oData)
oData['@Collection'] && Utils.isArray(oData['@Collection']))
{
var
+ folderList = [],
+ expandedFolders = Local.get(Enums.ClientSideKeyName.ExpandedFolders),
iLimit = Utils.pInt(Settings.appSettingsGet('folderSpecLimit')),
iC = Utils.pInt(oData.CountRec);
iLimit = 100 < iLimit ? 100 : (10 > iLimit ? 10 : iLimit);
FolderStore.displaySpecSetting(0 >= iC || iLimit < iC);
- FolderStore.folderList(this.folderResponseParseRec(
- Utils.isUnd(oData.Namespace) ? '' : oData.Namespace, oData['@Collection']));
+ folderList = this.folderResponseParseRec(Utils.isUnd(oData.Namespace) ? '' : oData.Namespace, oData['@Collection'], expandedFolders);
+ FolderStore.folderList(folderList); // @todo optimization required
}
};
diff --git a/vendors/progress.js/minified/progressjs.rainloop.css b/dev/Styles/_progressjs.css
similarity index 97%
rename from vendors/progress.js/minified/progressjs.rainloop.css
rename to dev/Styles/_progressjs.css
index ddc78a941..a87c9ec5b 100644
--- a/vendors/progress.js/minified/progressjs.rainloop.css
+++ b/dev/Styles/_progressjs.css
@@ -1,62 +1,63 @@
-.progressjs-theme-rainloop {
- z-index: 2000;
-}
-
-.progressjs-theme-rainloop .progressjs-inner {
-
- background-color: #939595;
- position: relative;
- z-index: 2000;
- height: 3px;
- overflow: hidden;
-
- -webkit-transition: width .5s;
- -moz-transition: width .5s;
- -o-transition: width .5s;
- transition: width .5s;
-}
-
-.progressjs-theme-rainloop .progressjs-percent {
- position: absolute;
- top: 0;
- left: 0;
- right: -32px;
- bottom: 0;
-
- background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.3)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.3)), color-stop(0.75, rgba(255, 255, 255, 0.3)), color-stop(0.75, transparent), to(transparent));
- background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.3) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.3) 50%, rgba(255, 255, 255, 0.3) 75%, transparent 75%, transparent);
- background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.3) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.3) 50%, rgba(255, 255, 255, 0.3) 75%, transparent 75%, transparent);
- background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.3) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.3) 50%, rgba(255, 255, 255, 0.3) 75%, transparent 75%, transparent);
- background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.3) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.3) 50%, rgba(255, 255, 255, 0.3) 75%, transparent 75%, transparent);
- -webkit-background-size: 32px 32px;
- -moz-background-size: 32px 32px;
- -o-background-size: 32px 32px;
- background-size: 32px 32px;
-
- -webkit-animation: simple-pace-stripe-animation 500ms linear infinite;
- -moz-animation: simple-pace-stripe-animation 500ms linear infinite;
- -ms-animation: simple-pace-stripe-animation 500ms linear infinite;
- -o-animation: simple-pace-stripe-animation 500ms linear infinite;
- animation: simple-pace-stripe-animation 500ms linear infinite;
-}
-
-@-webkit-keyframes simple-pace-stripe-animation {
- 0% { -webkit-transform: none; transform: none; }
- 100% { -webkit-transform: translate(-32px, 0); transform: translate(-32px, 0); }
-}
-@-moz-keyframes simple-pace-stripe-animation {
- 0% { -moz-transform: none; transform: none; }
- 100% { -moz-transform: translate(-32px, 0); transform: translate(-32px, 0); }
-}
-@-o-keyframes simple-pace-stripe-animation {
- 0% { -o-transform: none; transform: none; }
- 100% { -o-transform: translate(-32px, 0); transform: translate(-32px, 0); }
-}
-@-ms-keyframes simple-pace-stripe-animation {
- 0% { -ms-transform: none; transform: none; }
- 100% { -ms-transform: translate(-32px, 0); transform: translate(-32px, 0); }
-}
-@keyframes simple-pace-stripe-animation {
- 0% { transform: none; transform: none; }
- 100% { transform: translate(-32px, 0); transform: translate(-32px, 0); }
-}
\ No newline at end of file
+
+.progressjs-theme-rainloop {
+ z-index: 2000;
+}
+
+.progressjs-theme-rainloop .progressjs-inner {
+
+ background-color: #939595;
+ position: relative;
+ z-index: 2000;
+ height: 3px;
+ overflow: hidden;
+
+ -webkit-transition: width .5s;
+ -moz-transition: width .5s;
+ -o-transition: width .5s;
+ transition: width .5s;
+}
+
+.progressjs-theme-rainloop .progressjs-percent {
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: -32px;
+ bottom: 0;
+
+ background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.3)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.3)), color-stop(0.75, rgba(255, 255, 255, 0.3)), color-stop(0.75, transparent), to(transparent));
+ background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.3) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.3) 50%, rgba(255, 255, 255, 0.3) 75%, transparent 75%, transparent);
+ background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.3) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.3) 50%, rgba(255, 255, 255, 0.3) 75%, transparent 75%, transparent);
+ background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.3) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.3) 50%, rgba(255, 255, 255, 0.3) 75%, transparent 75%, transparent);
+ background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.3) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.3) 50%, rgba(255, 255, 255, 0.3) 75%, transparent 75%, transparent);
+ -webkit-background-size: 32px 32px;
+ -moz-background-size: 32px 32px;
+ -o-background-size: 32px 32px;
+ background-size: 32px 32px;
+
+ -webkit-animation: simple-pace-stripe-animation 500ms linear infinite;
+ -moz-animation: simple-pace-stripe-animation 500ms linear infinite;
+ -ms-animation: simple-pace-stripe-animation 500ms linear infinite;
+ -o-animation: simple-pace-stripe-animation 500ms linear infinite;
+ animation: simple-pace-stripe-animation 500ms linear infinite;
+}
+
+@-webkit-keyframes simple-pace-stripe-animation {
+ 0% { -webkit-transform: none; transform: none; }
+ 100% { -webkit-transform: translate(-32px, 0); transform: translate(-32px, 0); }
+}
+@-moz-keyframes simple-pace-stripe-animation {
+ 0% { -moz-transform: none; transform: none; }
+ 100% { -moz-transform: translate(-32px, 0); transform: translate(-32px, 0); }
+}
+@-o-keyframes simple-pace-stripe-animation {
+ 0% { -o-transform: none; transform: none; }
+ 100% { -o-transform: translate(-32px, 0); transform: translate(-32px, 0); }
+}
+@-ms-keyframes simple-pace-stripe-animation {
+ 0% { -ms-transform: none; transform: none; }
+ 100% { -ms-transform: translate(-32px, 0); transform: translate(-32px, 0); }
+}
+@keyframes simple-pace-stripe-animation {
+ 0% { transform: none; transform: none; }
+ 100% { transform: translate(-32px, 0); transform: translate(-32px, 0); }
+}
diff --git a/dev/View/User/Login.js b/dev/View/User/Login.js
index e187b7c52..9cf5f2baa 100644
--- a/dev/View/User/Login.js
+++ b/dev/View/User/Login.js
@@ -265,14 +265,7 @@ function LoginUserView()
}, this);
- if (Settings.appSettingsGet('rsaPublicKey') && Utils.rsaEncode.supported)
- {
- fLoginRequest(Utils.rsaEncode(sPassword, Settings.appSettingsGet('rsaPublicKey')));
- }
- else
- {
- fLoginRequest(sPassword);
- }
+ fLoginRequest(sPassword);
return true;
}, function() {
diff --git a/dev/boot.jsx b/dev/boot.jsx
index 5880021ec..fc2719a9f 100644
--- a/dev/boot.jsx
+++ b/dev/boot.jsx
@@ -2,7 +2,7 @@
import window from 'window';
import {Promise} from 'es6-promise-polyfill/promise.js';
-import {progressJs} from '../vendors/progress.js/src/progress.js';
+import {progressJs} from '../node_modules/Progress.js/src/progress.js';
import {jassl} from 'jassl';
window.jassl = jassl;
@@ -13,14 +13,17 @@ window.progressJs.onbeforeend(() => {
const _$ = window.$;
if (_$)
{
- _$('.progressjs-container').hide();
- window.setTimeout(() => {
- _$('.progressjs-container').remove();
- }, 200); // eslint-disable-line no-magic-numbers
+ try {
+ _$('.progressjs-container').hide();
+ window.setTimeout(() => {
+ _$('.progressjs-container').remove();
+ }, 200); // eslint-disable-line no-magic-numbers
+ }
+ catch (e) {} // eslint-disable-line no-empty
}
});
-require('../vendors/json2/json2.js');
+require('json3');
require('../vendors/modernizr/modernizr-custom.js');
require('Common/Booter.jsx');
diff --git a/gulpfile.js b/gulpfile.js
index f4371deee..dd8a0ba3d 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -1,723 +1,698 @@
-/* RainLoop Webmail (c) RainLoop Team | Licensed under AGPL 3 */
-'use strict';
-
-var
- pkg = require('./package.json'),
- head = {
- rainloop: '/* RainLoop Webmail (c) RainLoop Team | Licensed under RainLoop Software License */',
- agpl: '/* RainLoop Webmail (c) RainLoop Team | Licensed under AGPL v3 */'
- },
- cfg = {
- devVersion: '0.0.0',
- releasesPath: 'build/dist/releases',
- community: true,
- watch: false,
- watchInterval: 1000,
- googleCompile: false,
-
- rainloopBuilded: false,
- destPath: '',
- cleanPath: '',
- zipSrcPath: '',
- zipFile: '',
-
- paths: {},
- uglify: {
- mangle: true,
- compress: true
- }
- },
-
- _ = require('lodash'),
- fs = require('node-fs'),
- path = require('path'),
- notifier = require('node-notifier'),
-
- gulp = require('gulp'),
- concat = require('gulp-concat-util'),
- header = require('gulp-header'),
- stripbom = require('gulp-stripbom'),
- rename = require('gulp-rename'),
- replace = require('gulp-replace'),
- uglify = require('gulp-uglify'),
- notify = require("gulp-notify"),
- plumber = require('gulp-plumber'),
- gulpif = require('gulp-if'),
- eol = require('gulp-eol'),
- livereload = require('gulp-livereload'),
- eslint = require('gulp-eslint'),
- cache = require('gulp-cached'),
- gutil = require('gulp-util')
-;
-
-function getHead()
-{
- return !cfg.community ? head.rainloop : head.agpl;
-}
-
-function regOtherMinTask(sName, sPath, sInc, sOut, sHeader)
-{
- gulp.task(sName, function() {
- return gulp.src(sPath + sInc)
- .pipe(uglify())
- .pipe(header(sHeader || ''))
- .pipe(rename(sOut))
- .pipe(eol('\n', true))
- .pipe(gulp.dest(sPath));
- });
-}
-
-function zipDir(sSrcDir, sDestDir, sFileName)
-{
- return gulp.src(sSrcDir + '**/*')
- .pipe(require('gulp-zip')(sFileName))
- .pipe(gulp.dest(sDestDir));
-}
-
-function cleanDir(sDir)
-{
- return gulp.src(sDir, {read: false})
- .pipe(require('gulp-rimraf')());
-}
-
-function renameFileWithMd5Hash(sFile, callback)
-{
- var sHash = require('crypto').createHash('md5').update(fs.readFileSync(sFile)).digest('hex');
- cfg.lastMd5File = sFile.replace(/\.zip$/, '-' + sHash + '.zip');
- fs.renameSync(sFile, cfg.lastMd5File);
- callback();
-}
-
-function copyFile(sFile, sNewFile, callback)
-{
- fs.writeFileSync(sNewFile, fs.readFileSync(sFile));
- callback();
-}
-
-cfg.paths.globjs = 'dev/**/*.{js,jsx,html,css}';
-cfg.paths.globjsonly = 'dev/**/*.js';
-cfg.paths.globjsxonly = 'dev/**/*.jsx';
-cfg.paths.globjsall = 'dev/**/*.{js,jsx}';
-cfg.paths.globtsonly = 'dev/**/*.ts';
-cfg.paths.static = 'rainloop/v/' + cfg.devVersion + '/static/';
-cfg.paths.staticJS = 'rainloop/v/' + cfg.devVersion + '/static/js/';
-cfg.paths.staticMinJS = 'rainloop/v/' + cfg.devVersion + '/static/js/min/';
-cfg.paths.staticCSS = 'rainloop/v/' + cfg.devVersion + '/static/css/';
-
-cfg.paths.less = {
- main: {
- name: 'less.css',
- src: 'dev/Styles/@Main.less',
- watch: ['dev/Styles/*.less'],
- options: {
- paths: [
- path.join(__dirname, 'dev', 'Styles'),
- path.join(__dirname, 'vendors', 'bootstrap', 'less')
- ]
- }
- }
-};
-
-cfg.paths.css = {
- main: {
- name: 'app.css',
- src: [
- 'node_modules/normalize.css/normalize.css',
- 'vendors/jquery-ui/css/smoothness/jquery-ui-1.10.3.custom.css',
- 'vendors/fontastic/styles.css',
- 'vendors/jquery-nanoscroller/nanoscroller.css',
- 'vendors/jquery-letterfx/jquery-letterfx.min.css',
- 'vendors/progress.js/minified/progressjs.min.css',
- 'vendors/progress.js/minified/progressjs.rainloop.css',
- 'vendors/inputosaurus/inputosaurus.css',
- 'vendors/opentip/opentip.css',
- 'vendors/flags/flags-fixed.css',
- 'vendors/lightGallery/dist/css/lightgallery.min.css',
- 'vendors/lightGallery/dist/css/lg-transitions-lg-lollipop.css',
- 'node_modules/pikaday/css/pikaday.css',
- cfg.paths.staticCSS + cfg.paths.less.main.name
- ]
- },
- social: {
- name: 'social.css',
- src: [
- 'vendors/fontastic/styles.css',
- 'dev/Styles/_social.css'
- ]
- }
-};
-
-cfg.paths.js = {
- openpgp: {
- name: 'openpgp.min.js',
- src: [
- 'node_modules/openpgp/dist/openpgp.min.js'
- ]
- },
- openpgpworker: {
- name: 'openpgp.worker.min.js',
- src: [
- 'node_modules/openpgp/dist/openpgp.worker.min.js'
- ]
- },
- encrypt: {
- name: 'bundle.js',
- header: '(function (window) {',
- footer: '}(window));',
- dest: 'vendors/jsbn/',
- src: [
- 'vendors/jsbn/jsbn.js',
- 'vendors/jsbn/prng4.js',
- 'vendors/jsbn/rng.js',
- 'vendors/jsbn/rsa.js',
- 'vendors/jsbn/fix.js'
- ]
- },
- libs: {
- name: 'libs.js',
- src: [
- 'vendors/underscore/1.6.0/underscore-min.js',
- 'vendors/jquery/jquery-2.2.4.min.js',
-// 'vendors/jquery/jquery-3.0.0-rc1.min.js',
- 'vendors/jquery-ui/js/jquery-ui-1.10.3.custom.min.js',
- 'vendors/jquery-cookie/jquery.cookie-1.4.0.min.js',
- 'vendors/jquery-finger/jquery.finger.min.js',
- 'vendors/jquery-mousewheel/jquery.mousewheel-3.1.4.min.js',
- 'vendors/jquery-scrollstop/jquery.scrollstop.min.js',
- 'vendors/jquery-lazyload/jquery.lazyload.min.js',
- 'vendors/jquery-nanoscroller/jquery.nanoscroller-0.7.min.js',
- 'vendors/jquery-wakeup/jquery.wakeup.min.js',
- 'vendors/jquery-letterfx/jquery-letterfx.min.js',
- 'vendors/jquery-backstretch/jquery.backstretch.min.js',
- 'vendors/inputosaurus/inputosaurus.min.js',
- 'vendors/moment/min/moment.min.js ',
- 'vendors/tinycon/tinycon.min.js ',
- 'vendors/routes/signals.min.js',
- 'vendors/routes/hasher.min.js',
- 'vendors/routes/crossroads.min.js',
- 'vendors/knockout/knockout-3.4.0.js',
- 'vendors/knockout-projections/knockout-projections-1.1.0.min.js',
- 'vendors/knockout-sortable/knockout-sortable.min.js',
- 'vendors/ssm/ssm.min.js',
- 'vendors/jua/jua.min.js',
- 'vendors/opentip/opentip-jquery.min.js',
- 'vendors/Autolinker/Autolinker.min.js',
- 'vendors/lightGallery/dist/js/lightgallery.min.js',
- 'vendors/lightGallery/dist/js/lg-fullscreen.min.js',
- 'vendors/lightGallery/dist/js/lg-thumbnail.min.js',
- 'vendors/lightGallery/dist/js/lg-zoom.min.js',
- 'vendors/lightGallery/dist/js/lg-autoplay.min.js',
- 'vendors/keymaster/keymaster.min.js',
- 'vendors/ifvisible/ifvisible.min.js',
- 'vendors/qr.js/qr.min.js',
- 'vendors/bootstrap/js/bootstrap.min.js'
- ]
- },
- app: {
- name: 'app.js'
- },
- admin: {
- name: 'admin.js'
- }
-};
-
-// CSS
-gulp.task('less:main', function() {
- var less = require('gulp-less');
-
- return gulp.src(cfg.paths.less.main.src)
- .pipe(gulpif(cfg.watch, plumber({errorHandler: notify.onError("Error: <%= error.message %>")})))
- .pipe(less({
- 'paths': cfg.paths.less.main.options.paths
- }))
- .pipe(rename(cfg.paths.less.main.name))
- .pipe(eol('\n', true))
- .pipe(gulp.dest(cfg.paths.staticCSS))
- .on('error', gutil.log);
-});
-
-gulp.task('css:social', function() {
- var autoprefixer = require('gulp-autoprefixer');
- return gulp.src(cfg.paths.css.social.src)
- .pipe(concat(cfg.paths.css.social.name))
- .pipe(autoprefixer('last 3 versions', '> 1%', 'ie 9', 'Firefox ESR', 'Opera 12.1'))
- .pipe(replace(/\.\.\/(img|images|fonts|svg)\//g, '$1/'))
- .pipe(eol('\n', true))
- .pipe(gulp.dest(cfg.paths.staticCSS));
-});
-
-gulp.task('css:main-begin', ['less:main', 'css:social'], function() {
- var autoprefixer = require('gulp-autoprefixer');
- return gulp.src(cfg.paths.css.main.src)
- .pipe(concat(cfg.paths.css.main.name))
- .pipe(autoprefixer('last 3 versions', '> 1%', 'ie 9', 'Firefox ESR', 'Opera 12.1'))
- .pipe(replace(/\.\.\/(img|images|fonts|svg)\//g, '$1/'))
- .pipe(eol('\n', true))
- .pipe(gulp.dest(cfg.paths.staticCSS))
- .pipe(livereload());
-});
-
-gulp.task('package:community-on', function() {
- cfg.community = true;
- return true;
-});
-
-gulp.task('package:community-off', function() {
- cfg.community = false;
- return true;
-});
-
-gulp.task('css:clear-less', ['css:main-begin'], function() {
- return gulp.src(cfg.paths.staticCSS + cfg.paths.less.main.name, {read: false})
- .pipe(require('gulp-rimraf')());
-});
-
-gulp.task('css:main', ['css:clear-less']);
-
-gulp.task('css:main:min', ['css:main'], function() {
- var cleanCSS = require('gulp-clean-css');
- return gulp.src(cfg.paths.staticCSS + cfg.paths.css.main.name)
- .pipe(cleanCSS())
- .pipe(rename({suffix: '.min'}))
- .pipe(eol('\n', true))
- .pipe(gulp.dest(cfg.paths.staticCSS));
-});
-
-gulp.task('css:social:min', ['css:social'], function() {
- var cleanCSS = require('gulp-clean-css');
- return gulp.src(cfg.paths.staticCSS + cfg.paths.css.social.name)
- .pipe(cleanCSS())
- .pipe(rename({suffix: '.min'}))
- .pipe(eol('\n', true))
- .pipe(gulp.dest(cfg.paths.staticCSS));
-});
-
-gulp.task('css:min', ['css:main:min', 'css:social:min']);
-
-// JS
-gulp.task('js:encrypt', function() {
- return gulp.src(cfg.paths.js.encrypt.src)
- .pipe(concat(cfg.paths.js.encrypt.name))
- .pipe(concat.header(cfg.paths.js.encrypt.header || ''))
- .pipe(concat.footer(cfg.paths.js.encrypt.footer || ''))
- .pipe(uglify(cfg.uglify))
- .pipe(eol('\n', true))
- .pipe(gulp.dest(cfg.paths.js.encrypt.dest))
- .on('error', gutil.log);
-});
-
-gulp.task('js:openpgp', function() {
- return gulp.src(cfg.paths.js.openpgp.src)
- .pipe(rename(cfg.paths.js.openpgp.name))
- .pipe(eol('\n', true))
- .pipe(gulp.dest(cfg.paths.staticMinJS));
-});
-
-gulp.task('js:openpgpworker', function() {
- return gulp.src(cfg.paths.js.openpgpworker.src)
- .pipe(rename(cfg.paths.js.openpgpworker.name))
- .pipe(eol('\n', true))
- .pipe(gulp.dest(cfg.paths.staticMinJS));
-});
-
-gulp.task('js:libs', function() {
- return gulp.src(cfg.paths.js.libs.src)
- .pipe(concat(cfg.paths.js.libs.name, {separator: '\n\n'}))
- .pipe(eol('\n', true))
- .pipe(replace(/sourceMappingURL=[a-z0-9\.\-_]{1,20}\.map/ig, ''))
- .pipe(gulp.dest(cfg.paths.staticMinJS));
-});
-
-gulp.task('js:ckeditor:beautify', function() {
- var beautify = require('gulp-beautify');
- return gulp.src(cfg.paths.static + 'ckeditor/ckeditor.js')
- .pipe(beautify({
- 'indentSize': 2
- }))
- .pipe(rename('ckeditor.beautify.js'))
- .pipe(eol('\n', true))
- .pipe(gulp.dest(cfg.paths.static + 'ckeditor/'));
-});
-
-gulp.task('js:webpack', [], function(callback) {
-
- var
- webpack = require('webpack'),
- webpackCfg = require('./webpack.config.js')
- ;
-
- if (webpackCfg && webpackCfg.output)
- {
- webpackCfg.output.publicPath = cfg.paths.staticJS;
- }
-
- if (webpackCfg && webpackCfg.plugins)
- {
- webpackCfg.plugins.push(new webpack.DefinePlugin({
- 'RL_COMMUNITY': !!cfg.community,
- 'process.env': {
- NODE_ENV: '"production"'
- }
- }));
- }
-
- webpack(webpackCfg, function(err, stats) {
-
- var
- fN = function (err) {
- if (err)
- {
- gutil.log('[webpack]', '---');
- gutil.log('[webpack]', err.error ? err.error.toString() : '');
- gutil.log('[webpack]', err.message || '');
- gutil.log('[webpack]', '---');
-
- notifier.notify({
- 'sound': true,
- 'title': 'webpack',
- 'message': err.error ? err.error.toString() : err.message
- });
- }
- }
- ;
-
- if (err)
- {
- if (cfg.watch)
- {
- fN(err);
- }
- else
- {
- throw new gutil.PluginError('webpack', err);
- }
- }
- else if (stats && stats.compilation && stats.compilation.errors &&
- stats.compilation.errors[0])
- {
- if (cfg.watch)
- {
- _.each(stats.compilation.errors, function (err) {
- fN(err);
- });
- }
- else
- {
- throw new gutil.PluginError('webpack', stats.compilation.errors[0]);
- }
- }
-
- callback();
- });
-});
-
-gulp.task('js:app', ['js:webpack'], function() {
- return gulp.src(cfg.paths.staticJS + cfg.paths.js.app.name)
- .pipe(header(getHead() + '\n'))
- .pipe(eol('\n', true))
- .pipe(gulp.dest(cfg.paths.staticJS))
- .on('error', gutil.log);
-});
-
-gulp.task('js:admin', ['js:webpack'], function() {
- return gulp.src(cfg.paths.staticJS + cfg.paths.js.admin.name)
- .pipe(header(getHead() + '\n'))
- .pipe(eol('\n', true))
- .pipe(gulp.dest(cfg.paths.staticJS))
- .on('error', gutil.log);
-});
-
-// - min
-gulp.task('js:min', ['js:app', 'js:admin', 'js:validate'], function() {
- return gulp.src(cfg.paths.staticJS + '*.js')
- .pipe(replace(/"rainloop\/v\/([^\/]+)\/static\/js\/"/g, '"rainloop/v/$1/static/js/min/"'))
- .pipe(uglify(cfg.uglify))
- .pipe(header(getHead() + '\n'))
- .pipe(eol('\n', true))
- .pipe(gulp.dest(cfg.paths.staticMinJS))
- .on('error', gutil.log);
-});
-
-// lint
-gulp.task('js:eslint', function() {
- return gulp.src(cfg.paths.globjsall)
- .pipe(cache('eslint'))
- .pipe(eslint())
- .pipe(gulpif(cfg.watch, plumber({errorHandler: notify.onError("Error: <%= error.message %>")})))
- .pipe(eslint.format())
- .pipe(eslint.failAfterError());
-});
-
-gulp.task('js:validate', ['js:eslint']);
-
-// OTHER
-regOtherMinTask('other:cookie', 'vendors/jquery-cookie/', 'jquery.cookie.js', 'jquery.cookie-1.4.0.min.js',
- '/*! jquery.cookie v1.4.0 (c) 2013 Klaus Hartl | MIT */\n');
-
-regOtherMinTask('other:ifvisible', 'vendors/ifvisible/', 'src/ifvisible.js', 'ifvisible.min.js',
- '/*!ifvisible.js v1.0.0 (c) 2013 Serkan Yersen | MIT */\n');
-
-regOtherMinTask('other:keymaster', 'vendors/keymaster/', 'keymaster.js', 'keymaster.min.js',
- '/*!keymaster.js (c) 2011-2013 Thomas Fuchs | MIT */\n');
-
-regOtherMinTask('other:wakeup', 'vendors/jquery-wakeup/', 'jquery.wakeup.js', 'jquery.wakeup.min.js',
- '/*! jQuery WakeUp plugin (c) 2013 Paul Okopny | MIT */\n');
-
-regOtherMinTask('other:mousewheel', 'vendors/jquery-mousewheel/', 'jquery.mousewheel.js', 'jquery.mousewheel-3.1.4.min.js',
- '/*! jquery.mousewheel v3.1.4 (c) 2013 Brandon Aaron (http://brandon.aaron.sh) | MIT */\n');
-
-regOtherMinTask('other:nano', 'vendors/jquery-nanoscroller/', 'jquery.nanoscroller.js', 'jquery.nanoscroller-0.7.min.js',
- '/*! nanoScrollerJS v0.7 (c) 2013 James Florentino; modified by RainLoop Team | MIT */\n');
-
-regOtherMinTask('other:inputosaurus', 'vendors/inputosaurus/', 'inputosaurus.js', 'inputosaurus.min.js',
- '/*! Inputosaurus Text v0.1.6 (c) 2013 Dan Kielp ; modified by RainLoop Team | MIT */\n');
-
-regOtherMinTask('other:pace', 'vendors/simple-pace/', 'simple-pace.js', 'simple-pace-1.0.min.js',
- '/*! RainLoop Simple Pace v1.0 (c) 2014 RainLoop Team; Licensed under MIT */\n');
-
-regOtherMinTask('other:rl', 'vendors/rl/', 'rl.js', 'rl-1.5.min.js',
- '/*! RainLoop Index Helper v1.5 (c) 2015 RainLoop Team; Licensed under MIT */\n');
-
-gulp.task('fontastic-fonts:clear', function() {
- return cleanDir('rainloop/v/' + cfg.devVersion + '/static/css/fonts/rainloop.*');
-});
-
-gulp.task('fontastic-svg:clear', function() {
- return cleanDir('rainloop/v/' + cfg.devVersion + '/static/css/svg/*.svg');
-});
-
-gulp.task('fontastic-fonts:copy', ['fontastic-fonts:clear'], function() {
- return gulp.src('vendors/fontastic/fonts/rainloop.*')
- .pipe(gulp.dest('rainloop/v/' + cfg.devVersion + '/static/css/fonts'));
-});
-
-gulp.task('fontastic-svg:copy', ['fontastic-svg:clear'], function() {
- return gulp.src('vendors/fontastic/svg/*.svg')
- .pipe(gulp.dest('rainloop/v/' + cfg.devVersion + '/static/css/svg'));
-});
-
-gulp.task('fontastic', ['fontastic-fonts:copy', 'fontastic-svg:copy']);
-
-gulp.task('ckeditor:clear', function() {
- return cleanDir('rainloop/v/' + cfg.devVersion + '/static/ckeditor');
-});
-
-gulp.task('ckeditor:copy', ['ckeditor:clear'], function() {
- return gulp.src(['vendors/ckeditor/**/*', 'vendors/ckeditor/.gitempty', '!vendors/ckeditor/samples{,/**}', '!vendors/ckeditor/adapters{,/**}', '!vendors/ckeditor/*.md'])
- .pipe(gulp.dest('rainloop/v/' + cfg.devVersion + '/static/ckeditor'));
-});
-
-gulp.task('ckeditor:copy-plugins', ['ckeditor:copy'], function() {
- return gulp.src('vendors/ckeditor-plugins/**/*')
- .pipe(gulp.dest('rainloop/v/' + cfg.devVersion + '/static/ckeditor/plugins'));
-});
-
-gulp.task('ckeditor', ['ckeditor:copy-plugins'], function () {
- return gulp.src('rainloop/v/' + cfg.devVersion + '/static/ckeditor/*.js')
- .pipe(stripbom())
- .pipe(header("\uFEFF")) // BOM
- .pipe(gulp.dest('rainloop/v/' + cfg.devVersion + '/static/ckeditor'));
-});
-
-// BUILD (RainLoop)
-gulp.task('rainloop:copy', ['default'], function() {
-
- var
- versionFull = pkg.version + '.' + parseInt(pkg.release, 10),
- dist = cfg.releasesPath + '/webmail/' + versionFull + '/src/'
- ;
-
- fs.mkdirSync(dist, '0777', true);
- fs.mkdirSync(dist + 'data');
- fs.mkdirSync(dist + 'rainloop/v/' + versionFull, '0777', true);
-
- return gulp.src('rainloop/v/' + cfg.devVersion + '/**/*', {base: 'rainloop/v/' + cfg.devVersion})
- .pipe(gulp.dest(dist + 'rainloop/v/' + versionFull));
-});
-
-gulp.task('rainloop:setup', ['rainloop:copy'], function() {
-
- var
- versionFull = pkg.version + '.' + parseInt(pkg.release, 10),
- dist = cfg.releasesPath + '/webmail/' + versionFull + '/src/'
- ;
-
- fs.writeFileSync(dist + 'data/VERSION', versionFull);
- fs.writeFileSync(dist + 'data/EMPTY', versionFull);
-
- fs.writeFileSync(dist + 'index.php',
- fs.readFileSync('index.php', 'utf8').replace('\'APP_VERSION\', \'0.0.0\'', '\'APP_VERSION\', \'' + versionFull + '\''));
-
- fs.writeFileSync(dist + 'rainloop/v/' + versionFull + '/index.php.root', fs.readFileSync(dist + 'index.php'));
-
- if (cfg.community)
- {
- require('rimraf').sync(dist + 'rainloop/v/' + versionFull + '/app/libraries/RainLoop/Prem/');
- }
-
- cfg.destPath = cfg.releasesPath + '/webmail/' + versionFull + '/';
- cfg.cleanPath = dist;
- cfg.zipSrcPath = dist;
- cfg.zipFile = 'rainloop-' + (cfg.community ? 'community-' : '') + versionFull + '.zip';
- cfg.md5File = cfg.zipFile;
- cfg.lastMd5File = '';
-
- cfg.rainloopBuilded = true;
-});
-
-gulp.task('rainloop:zip', ['rainloop:copy', 'rainloop:setup'], function() {
- return (cfg.destPath && cfg.zipSrcPath && cfg.zipFile) ?
- zipDir(cfg.zipSrcPath, cfg.destPath, cfg.zipFile) : false;
-});
-
-gulp.task('rainloop:md5', ['rainloop:zip'], function(callback) {
- renameFileWithMd5Hash(cfg.destPath + cfg.md5File, callback);
-});
-
-gulp.task('rainloop:clean', ['rainloop:copy', 'rainloop:setup', 'rainloop:zip'], function() {
- return (cfg.cleanPath) ? cleanDir(cfg.cleanPath) : false;
-});
-
-gulp.task('rainloop:shortname', ['rainloop:md5'], function(callback) {
- copyFile(cfg.lastMd5File, cfg.destPath +
- 'rainloop' + (cfg.community ? '-community' : '') + '-latest.zip', callback);
-});
-
-// BUILD (OwnCloud)
-gulp.task('rainloop:owncloud:copy', function() {
-
- var
- versionFull = pkg.ownCloudPackageVersion,
- dist = cfg.releasesPath + '/owncloud/' + versionFull + '/src/'
- ;
-
- fs.mkdirSync(dist, '0777', true);
- fs.mkdirSync(dist + 'rainloop', '0777', true);
-
- return gulp.src('build/owncloud/rainloop-app/**/*', {base: 'build/owncloud/rainloop-app/'})
- .pipe(gulp.dest(dist + 'rainloop'));
-});
-
-gulp.task('rainloop:owncloud:copy-rainloop', ['rainloop:start', 'rainloop:owncloud:copy'], function() {
-
- var
- versionFull = pkg.ownCloudPackageVersion,
- dist = cfg.releasesPath + '/owncloud/' + versionFull + '/src/rainloop/'
- ;
-
- if (cfg.rainloopBuilded && cfg.destPath)
- {
- return gulp.src(cfg.destPath + '/src/**/*', {base: cfg.destPath + '/src/'})
- .pipe(gulp.dest(dist + 'app/'));
- }
-
- return true;
-});
-
-gulp.task('rainloop:owncloud:copy-rainloop:clean', ['rainloop:owncloud:copy-rainloop'], function() {
- return (cfg.cleanPath) ? cleanDir(cfg.cleanPath) : false;
-});
-
-gulp.task('rainloop:owncloud:setup', ['rainloop:owncloud:copy',
- 'rainloop:owncloud:copy-rainloop'], function() {
-
- var
- versionFull = pkg.ownCloudPackageVersion,
- dist = cfg.releasesPath + '/owncloud/' + versionFull + '/src/'
- ;
-
- fs.writeFileSync(dist + 'rainloop/appinfo/info.xml',
- fs.readFileSync(dist + 'rainloop/appinfo/info.xml', 'utf8')
- .replace('0.0', '' + versionFull + '')
- .replace('', '' + (cfg.community ? 'AGPLv3' : 'RainLoop Software License') + '')
- );
-
- fs.writeFileSync(dist + 'rainloop/appinfo/version', versionFull);
- fs.writeFileSync(dist + 'rainloop/VERSION', versionFull);
-
- cfg.destPath = cfg.releasesPath + '/owncloud/' + versionFull + '/';
- cfg.cleanPath = dist;
- cfg.zipSrcPath = dist;
- cfg.zipFile = 'rainloop-owncloud-app-' + (cfg.community ? '' : 'standard-') + versionFull + '.zip';
- cfg.md5File = cfg.zipFile;
-
-});
-
-gulp.task('rainloop:owncloud:zip', ['rainloop:owncloud:copy', 'rainloop:owncloud:setup'], function() {
- return (cfg.destPath && cfg.zipSrcPath && cfg.zipFile) ?
- zipDir(cfg.zipSrcPath, cfg.destPath, cfg.zipFile) : false;
-});
-
-gulp.task('rainloop:owncloud:md5', ['rainloop:owncloud:zip'], function(callback) {
- renameFileWithMd5Hash(cfg.destPath + cfg.md5File, callback);
-});
-
-gulp.task('rainloop:owncloud:clean', ['rainloop:owncloud:copy', 'rainloop:owncloud:setup', 'rainloop:owncloud:zip'], function() {
- return (cfg.cleanPath) ? cleanDir(cfg.cleanPath) : false;
-});
-
-gulp.task('rainloop:owncloud:shortname', ['rainloop:owncloud:md5'], function(callback) {
- copyFile(cfg.lastMd5File, cfg.destPath +
- 'rainloop' + (cfg.community ? '' : '-standard') + '.zip', callback);
-});
-
-// MAIN
-gulp.task('js:pgp', ['js:openpgp', 'js:openpgpworker']);
-
-gulp.task('default', ['js:libs', 'js:pgp', 'js:min', 'css:min', 'ckeditor', 'fontastic']);
-gulp.task('default+', ['package:community-off', 'default']);
-gulp.task('fast-', ['js:app', 'js:admin', 'css:main']);
-
-gulp.task('fast', ['package:community-on', 'fast-']);
-gulp.task('fast+', ['package:community-off', 'fast-']);
-
-gulp.task('rainloop:start', ['rainloop:copy', 'rainloop:setup']);
-
-gulp.task('rainloop-', ['rainloop:start', 'rainloop:zip', 'rainloop:md5', 'rainloop:clean', 'rainloop:shortname']);
-
-gulp.task('rainloop', ['package:community-on', 'rainloop-']);
-gulp.task('rainloop+', ['package:community-off', 'rainloop-']);
-
-gulp.task('owncloud-', ['rainloop:owncloud:copy',
- 'rainloop:owncloud:copy-rainloop', 'rainloop:owncloud:copy-rainloop:clean',
- 'rainloop:owncloud:setup', 'rainloop:owncloud:zip', 'rainloop:owncloud:md5', 'rainloop:owncloud:clean', 'rainloop:owncloud:shortname']);
-
-gulp.task('owncloud', ['package:community-on', 'owncloud-']);
-gulp.task('owncloud+', ['package:community-off', 'owncloud-']);
-
-//WATCH
-gulp.task('watch', ['fast'], function() {
- cfg.watch = true;
- livereload.listen();
- gulp.watch(cfg.paths.globjs, {interval: cfg.watchInterval}, ['js:app', 'js:admin']);
- gulp.watch(cfg.paths.globjsall, {interval: cfg.watchInterval}, ['js:validate']);
- gulp.watch(cfg.paths.less.main.watch, {interval: cfg.watchInterval}, ['css:main']);
-});
-
-gulp.task('watch+', ['fast+'], function() {
- cfg.watch = true;
- livereload.listen();
- gulp.watch(cfg.paths.globjs, {interval: cfg.watchInterval}, ['js:app', 'js:admin']);
- gulp.watch(cfg.paths.globjsall, {interval: cfg.watchInterval}, ['js:validate']);
- gulp.watch(cfg.paths.less.main.watch, {interval: cfg.watchInterval}, ['css:main']);
-});
-
-// ALIASES
-gulp.task('build', ['rainloop']);
-gulp.task('build+', ['rainloop+']);
-
-gulp.task('js:v', ['js:validate']);
-gulp.task('v', ['js:v']);
-
-gulp.task('d', ['default']);
-gulp.task('d+', ['default+']);
-gulp.task('w', ['watch']);
-gulp.task('w+', ['watch+']);
-gulp.task('f', ['fast']);
-gulp.task('f+', ['fast+']);
-
-gulp.task('b', ['build']);
-gulp.task('b+', ['build+']);
-
-gulp.task('o', ['owncloud']);
-gulp.task('o+', ['owncloud+']);
+/* RainLoop Webmail (c) RainLoop Team | Licensed under AGPL 3 */
+'use strict';
+
+var
+ pkg = require('./package.json'),
+ head = {
+ rainloop: '/* RainLoop Webmail (c) RainLoop Team | Licensed under RainLoop Software License */',
+ agpl: '/* RainLoop Webmail (c) RainLoop Team | Licensed under AGPL v3 */'
+ },
+ cfg = {
+ devVersion: '0.0.0',
+ releasesPath: 'build/dist/releases',
+ community: true,
+ watch: false,
+ watchInterval: 1000,
+ googleCompile: false,
+
+ rainloopBuilded: false,
+ destPath: '',
+ cleanPath: '',
+ zipSrcPath: '',
+ zipFile: '',
+
+ paths: {},
+ uglify: {
+ mangle: true,
+ compress: true
+ }
+ },
+
+ _ = require('lodash'),
+ fs = require('node-fs'),
+ path = require('path'),
+ notifier = require('node-notifier'),
+
+ gulp = require('gulp'),
+ concat = require('gulp-concat-util'),
+ header = require('gulp-header'),
+ stripbom = require('gulp-stripbom'),
+ rename = require('gulp-rename'),
+ replace = require('gulp-replace'),
+ uglify = require('gulp-uglify'),
+ notify = require("gulp-notify"),
+ plumber = require('gulp-plumber'),
+ gulpif = require('gulp-if'),
+ eol = require('gulp-eol'),
+ livereload = require('gulp-livereload'),
+ eslint = require('gulp-eslint'),
+ cache = require('gulp-cached'),
+ gutil = require('gulp-util')
+;
+
+function getHead()
+{
+ return !cfg.community ? head.rainloop : head.agpl;
+}
+
+function regOtherMinTask(sName, sPath, sInc, sOut, sHeader)
+{
+ gulp.task(sName, function() {
+ return gulp.src(sPath + sInc)
+ .pipe(uglify())
+ .pipe(header(sHeader || ''))
+ .pipe(rename(sOut))
+ .pipe(eol('\n', true))
+ .pipe(gulp.dest(sPath));
+ });
+}
+
+function zipDir(sSrcDir, sDestDir, sFileName)
+{
+ return gulp.src(sSrcDir + '**/*')
+ .pipe(require('gulp-zip')(sFileName))
+ .pipe(gulp.dest(sDestDir));
+}
+
+function cleanDir(sDir)
+{
+ return gulp.src(sDir, {read: false})
+ .pipe(require('gulp-rimraf')());
+}
+
+function renameFileWithMd5Hash(sFile, callback)
+{
+ var sHash = require('crypto').createHash('md5').update(fs.readFileSync(sFile)).digest('hex');
+ cfg.lastMd5File = sFile.replace(/\.zip$/, '-' + sHash + '.zip');
+ fs.renameSync(sFile, cfg.lastMd5File);
+ callback();
+}
+
+function copyFile(sFile, sNewFile, callback)
+{
+ fs.writeFileSync(sNewFile, fs.readFileSync(sFile));
+ callback();
+}
+
+cfg.paths.globjs = 'dev/**/*.{js,jsx,html,css}';
+cfg.paths.globjsonly = 'dev/**/*.js';
+cfg.paths.globjsxonly = 'dev/**/*.jsx';
+cfg.paths.globjsall = 'dev/**/*.{js,jsx}';
+cfg.paths.globtsonly = 'dev/**/*.ts';
+cfg.paths.static = 'rainloop/v/' + cfg.devVersion + '/static/';
+cfg.paths.staticJS = 'rainloop/v/' + cfg.devVersion + '/static/js/';
+cfg.paths.staticMinJS = 'rainloop/v/' + cfg.devVersion + '/static/js/min/';
+cfg.paths.staticCSS = 'rainloop/v/' + cfg.devVersion + '/static/css/';
+cfg.paths.momentLocales = 'rainloop/v/' + cfg.devVersion + '/app/localization/moment/';
+
+cfg.paths.less = {
+ main: {
+ name: 'less.css',
+ src: 'dev/Styles/@Main.less',
+ watch: ['dev/Styles/*.less'],
+ options: {
+ paths: [
+ path.join(__dirname, 'dev', 'Styles'),
+ path.join(__dirname, 'vendors', 'bootstrap', 'less')
+ ]
+ }
+ }
+};
+
+cfg.paths.css = {
+ main: {
+ name: 'app.css',
+ src: [
+ 'node_modules/normalize.css/normalize.css',
+ 'vendors/jquery-ui/css/smoothness/jquery-ui-1.10.3.custom.css',
+ 'vendors/fontastic/styles.css',
+ 'vendors/jquery-nanoscroller/nanoscroller.css',
+ 'vendors/jquery-letterfx/jquery-letterfx.min.css',
+ 'vendors/inputosaurus/inputosaurus.css',
+ 'vendors/flags/flags-fixed.css',
+ 'node_modules/opentip/css/opentip.css',
+ 'node_modules/pikaday/css/pikaday.css',
+ 'node_modules/lightgallery/dist/css/lightgallery.min.css',
+ 'node_modules/lightgallery/dist/css/lg-transitions.min.css',
+ 'node_modules/Progress.js/minified/progressjs.min.css',
+ 'dev/Styles/_progressjs.css',
+ cfg.paths.staticCSS + cfg.paths.less.main.name
+ ]
+ },
+ social: {
+ name: 'social.css',
+ src: [
+ 'vendors/fontastic/styles.css',
+ 'dev/Styles/_social.css'
+ ]
+ }
+};
+
+cfg.paths.js = {
+ openpgp: {
+ name: 'openpgp.min.js',
+ src: [
+ 'node_modules/openpgp/dist/openpgp.min.js'
+ ]
+ },
+ openpgpworker: {
+ name: 'openpgp.worker.min.js',
+ src: [
+ 'node_modules/openpgp/dist/openpgp.worker.min.js'
+ ]
+ },
+ moment: {
+ locales: [
+ 'node_modules/moment/locale/*.js'
+ ]
+ },
+ libs: {
+ name: 'libs.js',
+ src: [
+ 'node_modules/jquery/dist/jquery.min.js',
+ 'node_modules/jquery-mousewheel/jquery.mousewheel.js',
+ 'node_modules/jquery-scrollstop/jquery.scrollstop.js',
+ 'node_modules/jquery-lazyload/jquery.lazyload.js ',
+ 'node_modules/jquery.backstretch/jquery.backstretch.min.js',
+ 'vendors/jquery-ui/js/jquery-ui-1.10.3.custom.min.js', // custom
+ 'vendors/jquery-nanoscroller/jquery.nanoscroller.js', // custom (modified)
+ 'vendors/jquery-wakeup/jquery.wakeup.js', // no-npm
+ 'vendors/jquery-letterfx/jquery-letterfx.min.js', // no-npm
+ 'vendors/inputosaurus/inputosaurus.js', // custom (modified)
+ 'vendors/routes/signals.min.js', // fixed
+ 'vendors/routes/hasher.min.js', // fixed
+ 'vendors/routes/crossroads.min.js', // fixed
+ 'vendors/jua/jua.min.js', // custom
+ 'vendors/keymaster/keymaster.js', // custom (modified)
+ 'vendors/qr.js/qr.min.js', // fixed
+ 'vendors/bootstrap/js/bootstrap.min.js', // fixed
+ 'node_modules/underscore/underscore-min.js',
+ 'node_modules/moment/min/moment.min.js',
+ 'node_modules/tinycon/tinycon.min.js',
+ 'node_modules/knockout/build/output/knockout-latest.js',
+ 'node_modules/knockout-projections/dist/knockout-projections.min.js',
+ 'node_modules/knockout-sortable/build/knockout-sortable.min.js ',
+ 'node_modules/matchmedia-polyfill/matchMedia.js',
+ 'node_modules/matchmedia-polyfill/matchMedia.addListener.js',
+ 'node_modules/simplestatemanager/dist/ssm.min.js',
+ 'node_modules/autolinker/dist/Autolinker.min.js',
+ 'node_modules/opentip/lib/opentip.js',
+ 'node_modules/opentip/lib/adapter-jquery.js',
+ 'node_modules/lightgallery/dist/js/lightgallery.min.js',
+ 'node_modules/lightgallery/dist/js/lg-fullscreen.min.js',
+ 'node_modules/lightgallery/dist/js/lg-thumbnail.min.js',
+ 'node_modules/lightgallery/dist/js/lg-zoom.min.js',
+ 'node_modules/lightgallery/dist/js/lg-autoplay.min.js',
+ 'node_modules/ifvisible.js/src/ifvisible.min.js'
+ ]
+ },
+ app: {
+ name: 'app.js'
+ },
+ admin: {
+ name: 'admin.js'
+ }
+};
+
+// CSS
+gulp.task('less:main', function() {
+ var less = require('gulp-less');
+
+ return gulp.src(cfg.paths.less.main.src)
+ .pipe(gulpif(cfg.watch, plumber({errorHandler: notify.onError("Error: <%= error.message %>")})))
+ .pipe(less({
+ 'paths': cfg.paths.less.main.options.paths
+ }))
+ .pipe(rename(cfg.paths.less.main.name))
+ .pipe(eol('\n', true))
+ .pipe(gulp.dest(cfg.paths.staticCSS))
+ .on('error', gutil.log);
+});
+
+gulp.task('css:social', function() {
+ var autoprefixer = require('gulp-autoprefixer');
+ return gulp.src(cfg.paths.css.social.src)
+ .pipe(concat(cfg.paths.css.social.name))
+ .pipe(autoprefixer('last 3 versions', '> 1%', 'ie 9', 'Firefox ESR', 'Opera 12.1'))
+ .pipe(replace(/\.\.\/(img|images|fonts|svg)\//g, '$1/'))
+ .pipe(eol('\n', true))
+ .pipe(gulp.dest(cfg.paths.staticCSS));
+});
+
+gulp.task('css:main-begin', ['less:main', 'css:social'], function() {
+ var autoprefixer = require('gulp-autoprefixer');
+ return gulp.src(cfg.paths.css.main.src)
+ .pipe(concat(cfg.paths.css.main.name))
+ .pipe(autoprefixer('last 3 versions', '> 1%', 'ie 9', 'Firefox ESR', 'Opera 12.1'))
+ .pipe(replace(/\.\.\/(img|images|fonts|svg)\//g, '$1/'))
+ .pipe(eol('\n', true))
+ .pipe(gulp.dest(cfg.paths.staticCSS))
+ .pipe(livereload());
+});
+
+gulp.task('package:community-on', function() {
+ cfg.community = true;
+ return true;
+});
+
+gulp.task('package:community-off', function() {
+ cfg.community = false;
+ return true;
+});
+
+gulp.task('css:clear-less', ['css:main-begin'], function() {
+ return gulp.src(cfg.paths.staticCSS + cfg.paths.less.main.name, {read: false})
+ .pipe(require('gulp-rimraf')());
+});
+
+gulp.task('css:main', ['css:clear-less']);
+
+gulp.task('css:main:min', ['css:main'], function() {
+ var cleanCSS = require('gulp-clean-css');
+ return gulp.src(cfg.paths.staticCSS + cfg.paths.css.main.name)
+ .pipe(cleanCSS())
+ .pipe(rename({suffix: '.min'}))
+ .pipe(eol('\n', true))
+ .pipe(gulp.dest(cfg.paths.staticCSS));
+});
+
+gulp.task('css:social:min', ['css:social'], function() {
+ var cleanCSS = require('gulp-clean-css');
+ return gulp.src(cfg.paths.staticCSS + cfg.paths.css.social.name)
+ .pipe(cleanCSS())
+ .pipe(rename({suffix: '.min'}))
+ .pipe(eol('\n', true))
+ .pipe(gulp.dest(cfg.paths.staticCSS));
+});
+
+gulp.task('css:min', ['css:main:min', 'css:social:min']);
+
+// JS
+gulp.task('js:openpgp', function() {
+ return gulp.src(cfg.paths.js.openpgp.src)
+ .pipe(rename(cfg.paths.js.openpgp.name))
+ .pipe(eol('\n', true))
+ .pipe(gulp.dest(cfg.paths.staticMinJS));
+});
+
+gulp.task('js:openpgpworker', function() {
+ return gulp.src(cfg.paths.js.openpgpworker.src)
+ .pipe(rename(cfg.paths.js.openpgpworker.name))
+ .pipe(eol('\n', true))
+ .pipe(gulp.dest(cfg.paths.staticMinJS));
+});
+
+gulp.task('js:moment:locales-clear', function() {
+ return cleanDir('rainloop/v/' + cfg.devVersion + '/app/localization/moment/*.js');
+});
+
+gulp.task('js:moment:locales', ['js:moment:locales-clear'], function() {
+ return gulp.src(cfg.paths.js.moment.locales)
+ .pipe(gulp.dest(cfg.paths.momentLocales));
+});
+
+gulp.task('js:libs', function() {
+ return gulp.src(cfg.paths.js.libs.src)
+ .pipe(concat(cfg.paths.js.libs.name, {separator: '\n\n'}))
+ .pipe(eol('\n', true))
+ .pipe(replace(/sourceMappingURL=[a-z0-9\.\-_]{1,20}\.map/ig, ''))
+ .pipe(gulp.dest(cfg.paths.staticJS));
+});
+
+gulp.task('js:ckeditor:beautify', function() {
+ var beautify = require('gulp-beautify');
+ return gulp.src(cfg.paths.static + 'ckeditor/ckeditor.js')
+ .pipe(beautify({
+ 'indentSize': 2
+ }))
+ .pipe(rename('ckeditor.beautify.js'))
+ .pipe(eol('\n', true))
+ .pipe(gulp.dest(cfg.paths.static + 'ckeditor/'));
+});
+
+gulp.task('js:webpack', [], function(callback) {
+
+ var
+ webpack = require('webpack'),
+ webpackCfg = require('./webpack.config.js')
+ ;
+
+ if (webpackCfg && webpackCfg.output)
+ {
+ webpackCfg.output.publicPath = cfg.paths.staticJS;
+ }
+
+ if (webpackCfg && webpackCfg.plugins)
+ {
+ webpackCfg.plugins.push(new webpack.DefinePlugin({
+ 'RL_COMMUNITY': !!cfg.community,
+ 'process.env': {
+ NODE_ENV: '"production"'
+ }
+ }));
+ }
+
+ webpack(webpackCfg, function(err, stats) {
+
+ var
+ fN = function (err) {
+ if (err)
+ {
+ gutil.log('[webpack]', '---');
+ gutil.log('[webpack]', err.error ? err.error.toString() : '');
+ gutil.log('[webpack]', err.message || '');
+ gutil.log('[webpack]', '---');
+
+ notifier.notify({
+ 'sound': true,
+ 'title': 'webpack',
+ 'message': err.error ? err.error.toString() : err.message
+ });
+ }
+ }
+ ;
+
+ if (err)
+ {
+ if (cfg.watch)
+ {
+ fN(err);
+ }
+ else
+ {
+ throw new gutil.PluginError('webpack', err);
+ }
+ }
+ else if (stats && stats.compilation && stats.compilation.errors &&
+ stats.compilation.errors[0])
+ {
+ if (cfg.watch)
+ {
+ _.each(stats.compilation.errors, function (err) {
+ fN(err);
+ });
+ }
+ else
+ {
+ throw new gutil.PluginError('webpack', stats.compilation.errors[0]);
+ }
+ }
+
+ callback();
+ });
+});
+
+gulp.task('js:app', ['js:webpack'], function() {
+ return gulp.src(cfg.paths.staticJS + cfg.paths.js.app.name)
+ .pipe(header(getHead() + '\n'))
+ .pipe(eol('\n', true))
+ .pipe(gulp.dest(cfg.paths.staticJS))
+ .on('error', gutil.log);
+});
+
+gulp.task('js:admin', ['js:webpack'], function() {
+ return gulp.src(cfg.paths.staticJS + cfg.paths.js.admin.name)
+ .pipe(header(getHead() + '\n'))
+ .pipe(eol('\n', true))
+ .pipe(gulp.dest(cfg.paths.staticJS))
+ .on('error', gutil.log);
+});
+
+// - min
+gulp.task('js:min', ['js:app', 'js:admin', 'js:validate'], function() {
+ return gulp.src(cfg.paths.staticJS + '*.js')
+ .pipe(replace(/"rainloop\/v\/([^\/]+)\/static\/js\/"/g, '"rainloop/v/$1/static/js/min/"'))
+ .pipe(uglify(cfg.uglify))
+ .pipe(header(getHead() + '\n'))
+ .pipe(eol('\n', true))
+ .pipe(gulp.dest(cfg.paths.staticMinJS))
+ .on('error', gutil.log);
+});
+
+// lint
+gulp.task('js:eslint', function() {
+ return gulp.src(cfg.paths.globjsall)
+ .pipe(cache('eslint'))
+ .pipe(eslint())
+ .pipe(gulpif(cfg.watch, plumber({errorHandler: notify.onError("Error: <%= error.message %>")})))
+ .pipe(eslint.format())
+ .pipe(eslint.failAfterError());
+});
+
+gulp.task('js:validate', ['js:eslint']);
+
+// OTHER
+gulp.task('lightgallery-fonts:clear', function() {
+ return cleanDir('rainloop/v/' + cfg.devVersion + '/static/css/fonts/lg.*');
+});
+
+gulp.task('fontastic-fonts:clear', function() {
+ return cleanDir('rainloop/v/' + cfg.devVersion + '/static/css/fonts/rainloop.*');
+});
+
+gulp.task('fontastic-svg:clear', function() {
+ return cleanDir('rainloop/v/' + cfg.devVersion + '/static/css/svg/*.svg');
+});
+
+gulp.task('lightgallery-fonts:copy', ['lightgallery-fonts:clear'], function() {
+ return gulp.src('node_modules/lightgallery/dist/fonts/lg.*')
+ .pipe(gulp.dest('rainloop/v/' + cfg.devVersion + '/static/css/fonts'));
+});
+
+gulp.task('fontastic-fonts:copy', ['fontastic-fonts:clear'], function() {
+ return gulp.src('vendors/fontastic/fonts/rainloop.*')
+ .pipe(gulp.dest('rainloop/v/' + cfg.devVersion + '/static/css/fonts'));
+});
+
+gulp.task('fontastic-svg:copy', ['fontastic-svg:clear'], function() {
+ return gulp.src('vendors/fontastic/svg/*.svg')
+ .pipe(gulp.dest('rainloop/v/' + cfg.devVersion + '/static/css/svg'));
+});
+
+gulp.task('lightgallery', ['lightgallery-fonts:copy']);
+gulp.task('fontastic', ['fontastic-fonts:copy', 'fontastic-svg:copy']);
+
+gulp.task('ckeditor:clear', function() {
+ return cleanDir('rainloop/v/' + cfg.devVersion + '/static/ckeditor');
+});
+
+gulp.task('ckeditor:copy', ['ckeditor:clear'], function() {
+ return gulp.src(['vendors/ckeditor/**/*', 'vendors/ckeditor/.gitempty', '!vendors/ckeditor/samples{,/**}', '!vendors/ckeditor/adapters{,/**}', '!vendors/ckeditor/*.md'])
+ .pipe(gulp.dest('rainloop/v/' + cfg.devVersion + '/static/ckeditor'));
+});
+
+gulp.task('ckeditor:copy-plugins', ['ckeditor:copy'], function() {
+ return gulp.src('vendors/ckeditor-plugins/**/*')
+ .pipe(gulp.dest('rainloop/v/' + cfg.devVersion + '/static/ckeditor/plugins'));
+});
+
+gulp.task('ckeditor', ['ckeditor:copy-plugins'], function () {
+ return gulp.src('rainloop/v/' + cfg.devVersion + '/static/ckeditor/*.js')
+ .pipe(stripbom())
+ .pipe(header("\uFEFF")) // BOM
+ .pipe(gulp.dest('rainloop/v/' + cfg.devVersion + '/static/ckeditor'));
+});
+
+// BUILD (RainLoop)
+gulp.task('rainloop:copy', ['default'], function() {
+
+ var
+ versionFull = pkg.version + '.' + parseInt(pkg.release, 10),
+ dist = cfg.releasesPath + '/webmail/' + versionFull + '/src/'
+ ;
+
+ fs.mkdirSync(dist, '0777', true);
+ fs.mkdirSync(dist + 'data');
+ fs.mkdirSync(dist + 'rainloop/v/' + versionFull, '0777', true);
+
+ return gulp.src('rainloop/v/' + cfg.devVersion + '/**/*', {base: 'rainloop/v/' + cfg.devVersion})
+ .pipe(gulp.dest(dist + 'rainloop/v/' + versionFull));
+});
+
+gulp.task('rainloop:setup', ['rainloop:copy'], function() {
+
+ var
+ versionFull = pkg.version + '.' + parseInt(pkg.release, 10),
+ dist = cfg.releasesPath + '/webmail/' + versionFull + '/src/'
+ ;
+
+ fs.writeFileSync(dist + 'data/VERSION', versionFull);
+ fs.writeFileSync(dist + 'data/EMPTY', versionFull);
+
+ fs.writeFileSync(dist + 'index.php',
+ fs.readFileSync('index.php', 'utf8').replace('\'APP_VERSION\', \'0.0.0\'', '\'APP_VERSION\', \'' + versionFull + '\''));
+
+ fs.writeFileSync(dist + 'rainloop/v/' + versionFull + '/index.php.root', fs.readFileSync(dist + 'index.php'));
+
+ if (cfg.community)
+ {
+ require('rimraf').sync(dist + 'rainloop/v/' + versionFull + '/app/libraries/RainLoop/Prem/');
+ }
+
+ cfg.destPath = cfg.releasesPath + '/webmail/' + versionFull + '/';
+ cfg.cleanPath = dist;
+ cfg.zipSrcPath = dist;
+ cfg.zipFile = 'rainloop-' + (cfg.community ? 'community-' : '') + versionFull + '.zip';
+ cfg.md5File = cfg.zipFile;
+ cfg.lastMd5File = '';
+
+ cfg.rainloopBuilded = true;
+});
+
+gulp.task('rainloop:zip', ['rainloop:copy', 'rainloop:setup'], function() {
+ return (cfg.destPath && cfg.zipSrcPath && cfg.zipFile) ?
+ zipDir(cfg.zipSrcPath, cfg.destPath, cfg.zipFile) : false;
+});
+
+gulp.task('rainloop:md5', ['rainloop:zip'], function(callback) {
+ renameFileWithMd5Hash(cfg.destPath + cfg.md5File, callback);
+});
+
+gulp.task('rainloop:clean', ['rainloop:copy', 'rainloop:setup', 'rainloop:zip'], function() {
+ return (cfg.cleanPath) ? cleanDir(cfg.cleanPath) : false;
+});
+
+gulp.task('rainloop:shortname', ['rainloop:md5'], function(callback) {
+ copyFile(cfg.lastMd5File, cfg.destPath +
+ 'rainloop' + (cfg.community ? '-community' : '') + '-latest.zip', callback);
+});
+
+// BUILD (OwnCloud)
+gulp.task('rainloop:owncloud:copy', function() {
+
+ var
+ versionFull = pkg.ownCloudPackageVersion,
+ dist = cfg.releasesPath + '/owncloud/' + versionFull + '/src/'
+ ;
+
+ fs.mkdirSync(dist, '0777', true);
+ fs.mkdirSync(dist + 'rainloop', '0777', true);
+
+ return gulp.src('build/owncloud/rainloop-app/**/*', {base: 'build/owncloud/rainloop-app/'})
+ .pipe(gulp.dest(dist + 'rainloop'));
+});
+
+gulp.task('rainloop:owncloud:copy-rainloop', ['rainloop:start', 'rainloop:owncloud:copy'], function() {
+
+ var
+ versionFull = pkg.ownCloudPackageVersion,
+ dist = cfg.releasesPath + '/owncloud/' + versionFull + '/src/rainloop/'
+ ;
+
+ if (cfg.rainloopBuilded && cfg.destPath)
+ {
+ return gulp.src(cfg.destPath + '/src/**/*', {base: cfg.destPath + '/src/'})
+ .pipe(gulp.dest(dist + 'app/'));
+ }
+
+ return true;
+});
+
+gulp.task('rainloop:owncloud:copy-rainloop:clean', ['rainloop:owncloud:copy-rainloop'], function() {
+ return (cfg.cleanPath) ? cleanDir(cfg.cleanPath) : false;
+});
+
+gulp.task('rainloop:owncloud:setup', ['rainloop:owncloud:copy',
+ 'rainloop:owncloud:copy-rainloop'], function() {
+
+ var
+ versionFull = pkg.ownCloudPackageVersion,
+ dist = cfg.releasesPath + '/owncloud/' + versionFull + '/src/'
+ ;
+
+ fs.writeFileSync(dist + 'rainloop/appinfo/info.xml',
+ fs.readFileSync(dist + 'rainloop/appinfo/info.xml', 'utf8')
+ .replace('0.0', '' + versionFull + '')
+ .replace('', '' + (cfg.community ? 'AGPLv3' : 'RainLoop Software License') + '')
+ );
+
+ fs.writeFileSync(dist + 'rainloop/appinfo/version', versionFull);
+ fs.writeFileSync(dist + 'rainloop/VERSION', versionFull);
+
+ cfg.destPath = cfg.releasesPath + '/owncloud/' + versionFull + '/';
+ cfg.cleanPath = dist;
+ cfg.zipSrcPath = dist;
+ cfg.zipFile = 'rainloop-owncloud-app-' + (cfg.community ? '' : 'standard-') + versionFull + '.zip';
+ cfg.md5File = cfg.zipFile;
+
+});
+
+gulp.task('rainloop:owncloud:zip', ['rainloop:owncloud:copy', 'rainloop:owncloud:setup'], function() {
+ return (cfg.destPath && cfg.zipSrcPath && cfg.zipFile) ?
+ zipDir(cfg.zipSrcPath, cfg.destPath, cfg.zipFile) : false;
+});
+
+gulp.task('rainloop:owncloud:md5', ['rainloop:owncloud:zip'], function(callback) {
+ renameFileWithMd5Hash(cfg.destPath + cfg.md5File, callback);
+});
+
+gulp.task('rainloop:owncloud:clean', ['rainloop:owncloud:copy', 'rainloop:owncloud:setup', 'rainloop:owncloud:zip'], function() {
+ return (cfg.cleanPath) ? cleanDir(cfg.cleanPath) : false;
+});
+
+gulp.task('rainloop:owncloud:shortname', ['rainloop:owncloud:md5'], function(callback) {
+ copyFile(cfg.lastMd5File, cfg.destPath +
+ 'rainloop' + (cfg.community ? '' : '-standard') + '.zip', callback);
+});
+
+// MAIN
+gulp.task('js:pgp', ['js:openpgp', 'js:openpgpworker']);
+gulp.task('js:moment', ['js:moment:locales']);
+
+gulp.task('default', ['js:libs', 'js:pgp', 'js:moment', 'js:min', 'css:min', 'ckeditor', 'fontastic', 'lightgallery']);
+gulp.task('default+', ['package:community-off', 'default']);
+gulp.task('fast-', ['js:app', 'js:admin', 'css:main']);
+
+gulp.task('fast', ['package:community-on', 'fast-']);
+gulp.task('fast+', ['package:community-off', 'fast-']);
+
+gulp.task('rainloop:start', ['rainloop:copy', 'rainloop:setup']);
+
+gulp.task('rainloop-', ['rainloop:start', 'rainloop:zip', 'rainloop:md5', 'rainloop:clean', 'rainloop:shortname']);
+
+gulp.task('rainloop', ['package:community-on', 'rainloop-']);
+gulp.task('rainloop+', ['package:community-off', 'rainloop-']);
+
+gulp.task('owncloud-', ['rainloop:owncloud:copy',
+ 'rainloop:owncloud:copy-rainloop', 'rainloop:owncloud:copy-rainloop:clean',
+ 'rainloop:owncloud:setup', 'rainloop:owncloud:zip', 'rainloop:owncloud:md5', 'rainloop:owncloud:clean', 'rainloop:owncloud:shortname']);
+
+gulp.task('owncloud', ['package:community-on', 'owncloud-']);
+gulp.task('owncloud+', ['package:community-off', 'owncloud-']);
+
+//WATCH
+gulp.task('watch', ['fast'], function() {
+ cfg.watch = true;
+ livereload.listen();
+ gulp.watch(cfg.paths.globjs, {interval: cfg.watchInterval}, ['js:app', 'js:admin']);
+ gulp.watch(cfg.paths.globjsall, {interval: cfg.watchInterval}, ['js:validate']);
+ gulp.watch(cfg.paths.less.main.watch, {interval: cfg.watchInterval}, ['css:main']);
+});
+
+gulp.task('watch+', ['fast+'], function() {
+ cfg.watch = true;
+ livereload.listen();
+ gulp.watch(cfg.paths.globjs, {interval: cfg.watchInterval}, ['js:app', 'js:admin']);
+ gulp.watch(cfg.paths.globjsall, {interval: cfg.watchInterval}, ['js:validate']);
+ gulp.watch(cfg.paths.less.main.watch, {interval: cfg.watchInterval}, ['css:main']);
+});
+
+// ALIASES
+gulp.task('build', ['rainloop']);
+gulp.task('build+', ['rainloop+']);
+
+gulp.task('js:v', ['js:validate']);
+gulp.task('v', ['js:v']);
+
+gulp.task('d', ['default']);
+gulp.task('d+', ['default+']);
+gulp.task('w', ['watch']);
+gulp.task('w+', ['watch+']);
+gulp.task('f', ['fast']);
+gulp.task('f+', ['fast+']);
+
+gulp.task('b', ['build']);
+gulp.task('b+', ['build+']);
+
+gulp.task('o', ['owncloud']);
+gulp.task('o+', ['owncloud+']);
diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json
deleted file mode 100644
index fe0282fcf..000000000
--- a/npm-shrinkwrap.json
+++ /dev/null
@@ -1,3976 +0,0 @@
-{
- "name": "RainLoop",
- "version": "1.10.2",
- "dependencies": {
- "abbrev": {
- "version": "1.0.9",
- "from": "abbrev@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz"
- },
- "acorn": {
- "version": "3.2.0",
- "from": "acorn@>=3.2.0 <4.0.0",
- "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.2.0.tgz"
- },
- "acorn-jsx": {
- "version": "3.0.1",
- "from": "acorn-jsx@>=3.0.0 <4.0.0",
- "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-3.0.1.tgz"
- },
- "align-text": {
- "version": "0.1.4",
- "from": "align-text@>=0.1.3 <0.2.0",
- "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz"
- },
- "amdefine": {
- "version": "1.0.0",
- "from": "amdefine@>=0.0.4",
- "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.0.tgz"
- },
- "ansi-escapes": {
- "version": "1.4.0",
- "from": "ansi-escapes@>=1.1.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz"
- },
- "ansi-regex": {
- "version": "2.0.0",
- "from": "ansi-regex@>=2.0.0 <3.0.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.0.0.tgz"
- },
- "ansi-styles": {
- "version": "2.2.1",
- "from": "ansi-styles@>=2.2.1 <3.0.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz"
- },
- "ansicolors": {
- "version": "0.2.1",
- "from": "ansicolors@>=0.2.1 <0.3.0",
- "resolved": "https://registry.npmjs.org/ansicolors/-/ansicolors-0.2.1.tgz"
- },
- "anymatch": {
- "version": "1.3.0",
- "from": "anymatch@>=1.3.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.0.tgz"
- },
- "archy": {
- "version": "1.0.0",
- "from": "archy@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz"
- },
- "argparse": {
- "version": "1.0.7",
- "from": "argparse@>=1.0.7 <2.0.0",
- "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.7.tgz"
- },
- "arr-diff": {
- "version": "2.0.0",
- "from": "arr-diff@>=2.0.0 <3.0.0",
- "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz"
- },
- "arr-flatten": {
- "version": "1.0.1",
- "from": "arr-flatten@>=1.0.1 <2.0.0",
- "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.0.1.tgz"
- },
- "array-differ": {
- "version": "1.0.0",
- "from": "array-differ@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz"
- },
- "array-find-index": {
- "version": "1.0.1",
- "from": "array-find-index@>=1.0.1 <2.0.0",
- "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.1.tgz"
- },
- "array-union": {
- "version": "1.0.2",
- "from": "array-union@>=1.0.1 <2.0.0",
- "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz"
- },
- "array-uniq": {
- "version": "1.0.3",
- "from": "array-uniq@>=1.0.2 <2.0.0",
- "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz"
- },
- "array-unique": {
- "version": "0.2.1",
- "from": "array-unique@>=0.2.1 <0.3.0",
- "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz"
- },
- "arrify": {
- "version": "1.0.1",
- "from": "arrify@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz"
- },
- "asn1": {
- "version": "0.1.11",
- "from": "asn1@0.1.11",
- "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.1.11.tgz"
- },
- "asn1.js": {
- "version": "4.6.2",
- "from": "asn1.js@>=4.0.0 <5.0.0",
- "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.6.2.tgz"
- },
- "assert": {
- "version": "1.4.1",
- "from": "assert@>=1.1.1 <2.0.0",
- "resolved": "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz"
- },
- "assert-plus": {
- "version": "0.1.5",
- "from": "assert-plus@>=0.1.5 <0.2.0",
- "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.1.5.tgz"
- },
- "async": {
- "version": "0.9.2",
- "from": "async@>=0.9.0 <0.10.0",
- "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz"
- },
- "async-each": {
- "version": "1.0.0",
- "from": "async-each@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.0.tgz"
- },
- "autoprefixer": {
- "version": "6.3.6",
- "from": "autoprefixer@>=6.0.0 <7.0.0",
- "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-6.3.6.tgz"
- },
- "aws-sign2": {
- "version": "0.5.0",
- "from": "aws-sign2@>=0.5.0 <0.6.0",
- "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.5.0.tgz"
- },
- "babel-code-frame": {
- "version": "6.11.0",
- "from": "babel-code-frame@>=6.8.0 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.11.0.tgz"
- },
- "babel-core": {
- "version": "6.10.4",
- "from": "babel-core@>=6.1.4 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.10.4.tgz"
- },
- "babel-generator": {
- "version": "6.11.0",
- "from": "babel-generator@>=6.9.0 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.11.0.tgz"
- },
- "babel-helper-bindify-decorators": {
- "version": "6.8.0",
- "from": "babel-helper-bindify-decorators@>=6.8.0 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-helper-bindify-decorators/-/babel-helper-bindify-decorators-6.8.0.tgz"
- },
- "babel-helper-builder-binary-assignment-operator-visitor": {
- "version": "6.8.0",
- "from": "babel-helper-builder-binary-assignment-operator-visitor@>=6.8.0 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.8.0.tgz"
- },
- "babel-helper-call-delegate": {
- "version": "6.8.0",
- "from": "babel-helper-call-delegate@>=6.8.0 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-helper-call-delegate/-/babel-helper-call-delegate-6.8.0.tgz"
- },
- "babel-helper-define-map": {
- "version": "6.9.0",
- "from": "babel-helper-define-map@>=6.9.0 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-helper-define-map/-/babel-helper-define-map-6.9.0.tgz"
- },
- "babel-helper-explode-assignable-expression": {
- "version": "6.8.0",
- "from": "babel-helper-explode-assignable-expression@>=6.8.0 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.8.0.tgz"
- },
- "babel-helper-explode-class": {
- "version": "6.8.0",
- "from": "babel-helper-explode-class@>=6.8.0 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-helper-explode-class/-/babel-helper-explode-class-6.8.0.tgz"
- },
- "babel-helper-function-name": {
- "version": "6.8.0",
- "from": "babel-helper-function-name@>=6.8.0 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-helper-function-name/-/babel-helper-function-name-6.8.0.tgz"
- },
- "babel-helper-get-function-arity": {
- "version": "6.8.0",
- "from": "babel-helper-get-function-arity@>=6.8.0 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.8.0.tgz"
- },
- "babel-helper-hoist-variables": {
- "version": "6.8.0",
- "from": "babel-helper-hoist-variables@>=6.8.0 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.8.0.tgz"
- },
- "babel-helper-optimise-call-expression": {
- "version": "6.8.0",
- "from": "babel-helper-optimise-call-expression@>=6.8.0 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.8.0.tgz"
- },
- "babel-helper-regex": {
- "version": "6.9.0",
- "from": "babel-helper-regex@>=6.8.0 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-helper-regex/-/babel-helper-regex-6.9.0.tgz"
- },
- "babel-helper-remap-async-to-generator": {
- "version": "6.11.2",
- "from": "babel-helper-remap-async-to-generator@>=6.8.0 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.11.2.tgz"
- },
- "babel-helper-replace-supers": {
- "version": "6.8.0",
- "from": "babel-helper-replace-supers@>=6.8.0 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-helper-replace-supers/-/babel-helper-replace-supers-6.8.0.tgz"
- },
- "babel-helpers": {
- "version": "6.8.0",
- "from": "babel-helpers@>=6.8.0 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.8.0.tgz"
- },
- "babel-loader": {
- "version": "6.2.4",
- "from": "babel-loader@>=6.1.0 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-6.2.4.tgz"
- },
- "babel-messages": {
- "version": "6.8.0",
- "from": "babel-messages@>=6.8.0 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.8.0.tgz"
- },
- "babel-plugin-check-es2015-constants": {
- "version": "6.8.0",
- "from": "babel-plugin-check-es2015-constants@>=6.3.13 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.8.0.tgz"
- },
- "babel-plugin-syntax-async-functions": {
- "version": "6.8.0",
- "from": "babel-plugin-syntax-async-functions@>=6.8.0 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.8.0.tgz"
- },
- "babel-plugin-syntax-class-constructor-call": {
- "version": "6.8.0",
- "from": "babel-plugin-syntax-class-constructor-call@>=6.8.0 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-syntax-class-constructor-call/-/babel-plugin-syntax-class-constructor-call-6.8.0.tgz"
- },
- "babel-plugin-syntax-class-properties": {
- "version": "6.8.0",
- "from": "babel-plugin-syntax-class-properties@>=6.8.0 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-syntax-class-properties/-/babel-plugin-syntax-class-properties-6.8.0.tgz"
- },
- "babel-plugin-syntax-decorators": {
- "version": "6.8.0",
- "from": "babel-plugin-syntax-decorators@>=6.8.0 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-syntax-decorators/-/babel-plugin-syntax-decorators-6.8.0.tgz"
- },
- "babel-plugin-syntax-do-expressions": {
- "version": "6.8.0",
- "from": "babel-plugin-syntax-do-expressions@>=6.8.0 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-syntax-do-expressions/-/babel-plugin-syntax-do-expressions-6.8.0.tgz"
- },
- "babel-plugin-syntax-exponentiation-operator": {
- "version": "6.8.0",
- "from": "babel-plugin-syntax-exponentiation-operator@>=6.8.0 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.8.0.tgz"
- },
- "babel-plugin-syntax-export-extensions": {
- "version": "6.8.0",
- "from": "babel-plugin-syntax-export-extensions@>=6.8.0 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-syntax-export-extensions/-/babel-plugin-syntax-export-extensions-6.8.0.tgz"
- },
- "babel-plugin-syntax-function-bind": {
- "version": "6.8.0",
- "from": "babel-plugin-syntax-function-bind@>=6.8.0 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-syntax-function-bind/-/babel-plugin-syntax-function-bind-6.8.0.tgz"
- },
- "babel-plugin-syntax-object-rest-spread": {
- "version": "6.8.0",
- "from": "babel-plugin-syntax-object-rest-spread@>=6.8.0 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.8.0.tgz"
- },
- "babel-plugin-syntax-trailing-function-commas": {
- "version": "6.8.0",
- "from": "babel-plugin-syntax-trailing-function-commas@>=6.3.13 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.8.0.tgz"
- },
- "babel-plugin-transform-async-to-generator": {
- "version": "6.8.0",
- "from": "babel-plugin-transform-async-to-generator@>=6.3.13 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.8.0.tgz"
- },
- "babel-plugin-transform-class-constructor-call": {
- "version": "6.8.0",
- "from": "babel-plugin-transform-class-constructor-call@>=6.3.13 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-transform-class-constructor-call/-/babel-plugin-transform-class-constructor-call-6.8.0.tgz"
- },
- "babel-plugin-transform-class-properties": {
- "version": "6.10.2",
- "from": "babel-plugin-transform-class-properties@>=6.3.13 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-transform-class-properties/-/babel-plugin-transform-class-properties-6.10.2.tgz"
- },
- "babel-plugin-transform-decorators": {
- "version": "6.8.0",
- "from": "babel-plugin-transform-decorators@>=6.3.13 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-transform-decorators/-/babel-plugin-transform-decorators-6.8.0.tgz"
- },
- "babel-plugin-transform-do-expressions": {
- "version": "6.8.0",
- "from": "babel-plugin-transform-do-expressions@>=6.3.13 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-transform-do-expressions/-/babel-plugin-transform-do-expressions-6.8.0.tgz"
- },
- "babel-plugin-transform-es2015-arrow-functions": {
- "version": "6.8.0",
- "from": "babel-plugin-transform-es2015-arrow-functions@>=6.3.13 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.8.0.tgz"
- },
- "babel-plugin-transform-es2015-block-scoped-functions": {
- "version": "6.8.0",
- "from": "babel-plugin-transform-es2015-block-scoped-functions@>=6.3.13 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.8.0.tgz"
- },
- "babel-plugin-transform-es2015-block-scoping": {
- "version": "6.10.1",
- "from": "babel-plugin-transform-es2015-block-scoping@>=6.9.0 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.10.1.tgz"
- },
- "babel-plugin-transform-es2015-classes": {
- "version": "6.9.0",
- "from": "babel-plugin-transform-es2015-classes@>=6.9.0 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.9.0.tgz"
- },
- "babel-plugin-transform-es2015-computed-properties": {
- "version": "6.8.0",
- "from": "babel-plugin-transform-es2015-computed-properties@>=6.3.13 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.8.0.tgz"
- },
- "babel-plugin-transform-es2015-destructuring": {
- "version": "6.9.0",
- "from": "babel-plugin-transform-es2015-destructuring@>=6.9.0 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.9.0.tgz"
- },
- "babel-plugin-transform-es2015-duplicate-keys": {
- "version": "6.8.0",
- "from": "babel-plugin-transform-es2015-duplicate-keys@>=6.6.0 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.8.0.tgz"
- },
- "babel-plugin-transform-es2015-for-of": {
- "version": "6.8.0",
- "from": "babel-plugin-transform-es2015-for-of@>=6.6.0 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.8.0.tgz"
- },
- "babel-plugin-transform-es2015-function-name": {
- "version": "6.9.0",
- "from": "babel-plugin-transform-es2015-function-name@>=6.9.0 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.9.0.tgz"
- },
- "babel-plugin-transform-es2015-literals": {
- "version": "6.8.0",
- "from": "babel-plugin-transform-es2015-literals@>=6.3.13 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.8.0.tgz"
- },
- "babel-plugin-transform-es2015-modules-commonjs": {
- "version": "6.10.3",
- "from": "babel-plugin-transform-es2015-modules-commonjs@>=6.6.0 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.10.3.tgz"
- },
- "babel-plugin-transform-es2015-object-super": {
- "version": "6.8.0",
- "from": "babel-plugin-transform-es2015-object-super@>=6.3.13 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.8.0.tgz"
- },
- "babel-plugin-transform-es2015-parameters": {
- "version": "6.9.0",
- "from": "babel-plugin-transform-es2015-parameters@>=6.9.0 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.9.0.tgz"
- },
- "babel-plugin-transform-es2015-shorthand-properties": {
- "version": "6.8.0",
- "from": "babel-plugin-transform-es2015-shorthand-properties@>=6.3.13 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.8.0.tgz"
- },
- "babel-plugin-transform-es2015-spread": {
- "version": "6.8.0",
- "from": "babel-plugin-transform-es2015-spread@>=6.3.13 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.8.0.tgz"
- },
- "babel-plugin-transform-es2015-sticky-regex": {
- "version": "6.8.0",
- "from": "babel-plugin-transform-es2015-sticky-regex@>=6.3.13 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.8.0.tgz"
- },
- "babel-plugin-transform-es2015-template-literals": {
- "version": "6.8.0",
- "from": "babel-plugin-transform-es2015-template-literals@>=6.6.0 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.8.0.tgz"
- },
- "babel-plugin-transform-es2015-typeof-symbol": {
- "version": "6.8.0",
- "from": "babel-plugin-transform-es2015-typeof-symbol@>=6.6.0 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.8.0.tgz"
- },
- "babel-plugin-transform-es2015-unicode-regex": {
- "version": "6.11.0",
- "from": "babel-plugin-transform-es2015-unicode-regex@>=6.3.13 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.11.0.tgz"
- },
- "babel-plugin-transform-exponentiation-operator": {
- "version": "6.8.0",
- "from": "babel-plugin-transform-exponentiation-operator@>=6.3.13 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.8.0.tgz"
- },
- "babel-plugin-transform-export-extensions": {
- "version": "6.8.0",
- "from": "babel-plugin-transform-export-extensions@>=6.3.13 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-transform-export-extensions/-/babel-plugin-transform-export-extensions-6.8.0.tgz"
- },
- "babel-plugin-transform-function-bind": {
- "version": "6.8.0",
- "from": "babel-plugin-transform-function-bind@>=6.3.13 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-transform-function-bind/-/babel-plugin-transform-function-bind-6.8.0.tgz"
- },
- "babel-plugin-transform-object-rest-spread": {
- "version": "6.8.0",
- "from": "babel-plugin-transform-object-rest-spread@>=6.3.13 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.8.0.tgz"
- },
- "babel-plugin-transform-regenerator": {
- "version": "6.9.0",
- "from": "babel-plugin-transform-regenerator@>=6.9.0 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.9.0.tgz"
- },
- "babel-plugin-transform-runtime": {
- "version": "6.9.0",
- "from": "babel-plugin-transform-runtime@>=6.9.0 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-transform-runtime/-/babel-plugin-transform-runtime-6.9.0.tgz"
- },
- "babel-plugin-transform-strict-mode": {
- "version": "6.8.0",
- "from": "babel-plugin-transform-strict-mode@>=6.8.0 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.8.0.tgz"
- },
- "babel-preset-es2015": {
- "version": "6.9.0",
- "from": "babel-preset-es2015@*",
- "resolved": "https://registry.npmjs.org/babel-preset-es2015/-/babel-preset-es2015-6.9.0.tgz"
- },
- "babel-preset-es2015-loose": {
- "version": "7.0.0",
- "from": "babel-preset-es2015-loose@*",
- "resolved": "https://registry.npmjs.org/babel-preset-es2015-loose/-/babel-preset-es2015-loose-7.0.0.tgz"
- },
- "babel-preset-es2015-loose-native-modules": {
- "version": "1.0.0",
- "from": "babel-preset-es2015-loose-native-modules@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/babel-preset-es2015-loose-native-modules/-/babel-preset-es2015-loose-native-modules-1.0.0.tgz"
- },
- "babel-preset-stage-0": {
- "version": "6.5.0",
- "from": "babel-preset-stage-0@>=6.5.0 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-preset-stage-0/-/babel-preset-stage-0-6.5.0.tgz"
- },
- "babel-preset-stage-1": {
- "version": "6.5.0",
- "from": "babel-preset-stage-1@>=6.3.13 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-preset-stage-1/-/babel-preset-stage-1-6.5.0.tgz"
- },
- "babel-preset-stage-2": {
- "version": "6.11.0",
- "from": "babel-preset-stage-2@>=6.3.13 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-preset-stage-2/-/babel-preset-stage-2-6.11.0.tgz"
- },
- "babel-preset-stage-3": {
- "version": "6.11.0",
- "from": "babel-preset-stage-3@>=6.11.0 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-preset-stage-3/-/babel-preset-stage-3-6.11.0.tgz"
- },
- "babel-register": {
- "version": "6.9.0",
- "from": "babel-register@>=6.9.0 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.9.0.tgz"
- },
- "babel-runtime": {
- "version": "6.9.2",
- "from": "babel-runtime@>=6.1.18 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.9.2.tgz"
- },
- "babel-template": {
- "version": "6.9.0",
- "from": "babel-template@>=6.9.0 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.9.0.tgz"
- },
- "babel-traverse": {
- "version": "6.10.4",
- "from": "babel-traverse@>=6.10.4 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.10.4.tgz"
- },
- "babel-types": {
- "version": "6.11.1",
- "from": "babel-types@>=6.9.1 <7.0.0",
- "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.11.1.tgz"
- },
- "babylon": {
- "version": "6.8.2",
- "from": "babylon@>=6.7.0 <7.0.0",
- "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.8.2.tgz"
- },
- "balanced-match": {
- "version": "0.4.1",
- "from": "balanced-match@>=0.4.1 <0.5.0",
- "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.1.tgz"
- },
- "Base64": {
- "version": "0.2.1",
- "from": "Base64@>=0.2.0 <0.3.0",
- "resolved": "https://registry.npmjs.org/Base64/-/Base64-0.2.1.tgz"
- },
- "base64-js": {
- "version": "1.1.2",
- "from": "base64-js@>=1.0.2 <2.0.0",
- "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.1.2.tgz"
- },
- "beeper": {
- "version": "1.1.0",
- "from": "beeper@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/beeper/-/beeper-1.1.0.tgz"
- },
- "big.js": {
- "version": "3.1.3",
- "from": "big.js@>=3.1.3 <4.0.0",
- "resolved": "https://registry.npmjs.org/big.js/-/big.js-3.1.3.tgz"
- },
- "binary-extensions": {
- "version": "1.5.0",
- "from": "binary-extensions@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.5.0.tgz"
- },
- "binaryextensions": {
- "version": "1.0.1",
- "from": "binaryextensions@>=1.0.0 <1.1.0",
- "resolved": "https://registry.npmjs.org/binaryextensions/-/binaryextensions-1.0.1.tgz"
- },
- "bluebird": {
- "version": "3.4.1",
- "from": "bluebird@>=3.1.1 <4.0.0",
- "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.4.1.tgz"
- },
- "bn.js": {
- "version": "4.11.4",
- "from": "bn.js@>=4.1.1 <5.0.0",
- "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.4.tgz"
- },
- "body-parser": {
- "version": "1.14.2",
- "from": "body-parser@>=1.14.0 <1.15.0",
- "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.14.2.tgz",
- "dependencies": {
- "qs": {
- "version": "5.2.0",
- "from": "qs@5.2.0",
- "resolved": "https://registry.npmjs.org/qs/-/qs-5.2.0.tgz"
- }
- }
- },
- "boom": {
- "version": "0.4.2",
- "from": "boom@>=0.4.0 <0.5.0",
- "resolved": "https://registry.npmjs.org/boom/-/boom-0.4.2.tgz"
- },
- "brace-expansion": {
- "version": "1.1.5",
- "from": "brace-expansion@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.5.tgz"
- },
- "braces": {
- "version": "1.8.5",
- "from": "braces@>=1.8.2 <2.0.0",
- "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz"
- },
- "brorand": {
- "version": "1.0.5",
- "from": "brorand@>=1.0.1 <2.0.0",
- "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.0.5.tgz"
- },
- "browserify-aes": {
- "version": "1.0.6",
- "from": "browserify-aes@>=1.0.4 <2.0.0",
- "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.0.6.tgz"
- },
- "browserify-cipher": {
- "version": "1.0.0",
- "from": "browserify-cipher@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.0.tgz"
- },
- "browserify-des": {
- "version": "1.0.0",
- "from": "browserify-des@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.0.tgz"
- },
- "browserify-rsa": {
- "version": "4.0.1",
- "from": "browserify-rsa@>=4.0.0 <5.0.0",
- "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz"
- },
- "browserify-sign": {
- "version": "4.0.0",
- "from": "browserify-sign@>=4.0.0 <5.0.0",
- "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.0.tgz"
- },
- "browserify-zlib": {
- "version": "0.1.4",
- "from": "browserify-zlib@>=0.1.4 <0.2.0",
- "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.1.4.tgz"
- },
- "browserslist": {
- "version": "1.3.4",
- "from": "browserslist@>=1.3.1 <1.4.0",
- "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-1.3.4.tgz"
- },
- "buffer": {
- "version": "4.7.0",
- "from": "buffer@>=4.3.0 <5.0.0",
- "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.7.0.tgz",
- "dependencies": {
- "isarray": {
- "version": "1.0.0",
- "from": "isarray@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz"
- }
- }
- },
- "buffer-crc32": {
- "version": "0.2.5",
- "from": "buffer-crc32@>=0.2.3 <0.3.0",
- "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.5.tgz"
- },
- "buffer-shims": {
- "version": "1.0.0",
- "from": "buffer-shims@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz"
- },
- "buffer-xor": {
- "version": "1.0.3",
- "from": "buffer-xor@>=1.0.2 <2.0.0",
- "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz"
- },
- "bufferstreams": {
- "version": "1.0.1",
- "from": "bufferstreams@1.0.1",
- "resolved": "https://registry.npmjs.org/bufferstreams/-/bufferstreams-1.0.1.tgz"
- },
- "builtin-modules": {
- "version": "1.1.1",
- "from": "builtin-modules@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz"
- },
- "bytes": {
- "version": "2.2.0",
- "from": "bytes@2.2.0",
- "resolved": "https://registry.npmjs.org/bytes/-/bytes-2.2.0.tgz"
- },
- "caller-path": {
- "version": "0.1.0",
- "from": "caller-path@>=0.1.0 <0.2.0",
- "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz"
- },
- "callsites": {
- "version": "0.2.0",
- "from": "callsites@>=0.2.0 <0.3.0",
- "resolved": "https://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz"
- },
- "camelcase": {
- "version": "1.2.1",
- "from": "camelcase@>=1.0.2 <2.0.0",
- "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz"
- },
- "camelcase-keys": {
- "version": "2.1.0",
- "from": "camelcase-keys@>=2.0.0 <3.0.0",
- "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz",
- "dependencies": {
- "camelcase": {
- "version": "2.1.1",
- "from": "camelcase@>=2.0.0 <3.0.0",
- "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz"
- }
- }
- },
- "caniuse-db": {
- "version": "1.0.30000488",
- "from": "caniuse-db@>=1.0.30000444 <2.0.0",
- "resolved": "https://registry.npmjs.org/caniuse-db/-/caniuse-db-1.0.30000488.tgz"
- },
- "cardinal": {
- "version": "0.5.0",
- "from": "cardinal@>=0.5.0 <0.6.0",
- "resolved": "https://registry.npmjs.org/cardinal/-/cardinal-0.5.0.tgz"
- },
- "center-align": {
- "version": "0.1.3",
- "from": "center-align@>=0.1.1 <0.2.0",
- "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz"
- },
- "chalk": {
- "version": "1.1.3",
- "from": "chalk@>=1.1.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz"
- },
- "chokidar": {
- "version": "1.6.0",
- "from": "chokidar@>=1.4.3 <2.0.0",
- "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.6.0.tgz"
- },
- "cipher-base": {
- "version": "1.0.2",
- "from": "cipher-base@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.2.tgz"
- },
- "clean-css": {
- "version": "3.4.18",
- "from": "clean-css@>=3.4.17 <4.0.0",
- "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-3.4.18.tgz",
- "dependencies": {
- "source-map": {
- "version": "0.4.4",
- "from": "source-map@>=0.4.0 <0.5.0",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz"
- }
- }
- },
- "cli-cursor": {
- "version": "1.0.2",
- "from": "cli-cursor@>=1.0.1 <2.0.0",
- "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz"
- },
- "cli-table": {
- "version": "0.3.1",
- "from": "cli-table@>=0.3.1 <0.4.0",
- "resolved": "https://registry.npmjs.org/cli-table/-/cli-table-0.3.1.tgz"
- },
- "cli-usage": {
- "version": "0.1.2",
- "from": "cli-usage@>=0.1.1 <0.2.0",
- "resolved": "https://registry.npmjs.org/cli-usage/-/cli-usage-0.1.2.tgz",
- "dependencies": {
- "minimist": {
- "version": "0.2.0",
- "from": "minimist@>=0.2.0 <0.3.0",
- "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.2.0.tgz"
- }
- }
- },
- "cli-width": {
- "version": "2.1.0",
- "from": "cli-width@>=2.0.0 <3.0.0",
- "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.1.0.tgz"
- },
- "cliui": {
- "version": "2.1.0",
- "from": "cliui@>=2.1.0 <3.0.0",
- "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz",
- "dependencies": {
- "wordwrap": {
- "version": "0.0.2",
- "from": "wordwrap@0.0.2",
- "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz"
- }
- }
- },
- "clone": {
- "version": "1.0.2",
- "from": "clone@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.2.tgz"
- },
- "clone-stats": {
- "version": "0.0.1",
- "from": "clone-stats@>=0.0.1 <0.0.2",
- "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz"
- },
- "code-point-at": {
- "version": "1.0.0",
- "from": "code-point-at@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.0.0.tgz"
- },
- "colors": {
- "version": "1.0.3",
- "from": "colors@1.0.3",
- "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz"
- },
- "combined-stream": {
- "version": "0.0.7",
- "from": "combined-stream@>=0.0.4 <0.1.0",
- "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-0.0.7.tgz"
- },
- "commander": {
- "version": "2.8.1",
- "from": "commander@>=2.8.0 <2.9.0",
- "resolved": "https://registry.npmjs.org/commander/-/commander-2.8.1.tgz"
- },
- "concat-map": {
- "version": "0.0.1",
- "from": "concat-map@0.0.1",
- "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz"
- },
- "concat-stream": {
- "version": "1.5.1",
- "from": "concat-stream@>=1.4.6 <2.0.0",
- "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.5.1.tgz",
- "dependencies": {
- "isarray": {
- "version": "1.0.0",
- "from": "isarray@>=1.0.0 <1.1.0",
- "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz"
- },
- "readable-stream": {
- "version": "2.0.6",
- "from": "readable-stream@>=2.0.0 <2.1.0",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz"
- }
- }
- },
- "concat-with-sourcemaps": {
- "version": "1.0.4",
- "from": "concat-with-sourcemaps@>=1.0.4 <2.0.0",
- "resolved": "https://registry.npmjs.org/concat-with-sourcemaps/-/concat-with-sourcemaps-1.0.4.tgz"
- },
- "config-chain": {
- "version": "1.1.10",
- "from": "config-chain@>=1.1.5 <1.2.0",
- "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.10.tgz"
- },
- "console-browserify": {
- "version": "1.1.0",
- "from": "console-browserify@>=1.1.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz"
- },
- "constants-browserify": {
- "version": "1.0.0",
- "from": "constants-browserify@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz"
- },
- "content-type": {
- "version": "1.0.2",
- "from": "content-type@>=1.0.1 <1.1.0",
- "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.2.tgz"
- },
- "convert-source-map": {
- "version": "1.2.0",
- "from": "convert-source-map@>=1.1.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.2.0.tgz"
- },
- "core-js": {
- "version": "2.4.0",
- "from": "core-js@>=2.4.0 <3.0.0",
- "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.4.0.tgz"
- },
- "core-util-is": {
- "version": "1.0.2",
- "from": "core-util-is@>=1.0.0 <1.1.0",
- "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz"
- },
- "create-ecdh": {
- "version": "4.0.0",
- "from": "create-ecdh@>=4.0.0 <5.0.0",
- "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.0.tgz"
- },
- "create-hash": {
- "version": "1.1.2",
- "from": "create-hash@>=1.1.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.1.2.tgz"
- },
- "create-hmac": {
- "version": "1.1.4",
- "from": "create-hmac@>=1.1.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.4.tgz"
- },
- "cryptiles": {
- "version": "0.2.2",
- "from": "cryptiles@>=0.2.0 <0.3.0",
- "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-0.2.2.tgz"
- },
- "crypto-browserify": {
- "version": "3.11.0",
- "from": "crypto-browserify@>=3.11.0 <4.0.0",
- "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.11.0.tgz"
- },
- "ctype": {
- "version": "0.5.3",
- "from": "ctype@0.5.3",
- "resolved": "https://registry.npmjs.org/ctype/-/ctype-0.5.3.tgz"
- },
- "currently-unhandled": {
- "version": "0.4.1",
- "from": "currently-unhandled@>=0.4.1 <0.5.0",
- "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz"
- },
- "d": {
- "version": "0.1.1",
- "from": "d@>=0.1.1 <0.2.0",
- "resolved": "https://registry.npmjs.org/d/-/d-0.1.1.tgz"
- },
- "date-now": {
- "version": "0.1.4",
- "from": "date-now@>=0.1.4 <0.2.0",
- "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz"
- },
- "dateformat": {
- "version": "1.0.12",
- "from": "dateformat@>=1.0.11 <2.0.0",
- "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-1.0.12.tgz"
- },
- "deap": {
- "version": "1.0.0",
- "from": "deap@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/deap/-/deap-1.0.0.tgz"
- },
- "debug": {
- "version": "2.2.0",
- "from": "debug@>=2.1.1 <3.0.0",
- "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz"
- },
- "decamelize": {
- "version": "1.2.0",
- "from": "decamelize@>=1.1.2 <2.0.0",
- "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz"
- },
- "deep-is": {
- "version": "0.1.3",
- "from": "deep-is@>=0.1.3 <0.2.0",
- "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz"
- },
- "defaults": {
- "version": "1.0.3",
- "from": "defaults@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz"
- },
- "del": {
- "version": "2.2.1",
- "from": "del@>=2.0.2 <3.0.0",
- "resolved": "https://registry.npmjs.org/del/-/del-2.2.1.tgz"
- },
- "delayed-stream": {
- "version": "0.0.5",
- "from": "delayed-stream@0.0.5",
- "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-0.0.5.tgz"
- },
- "depd": {
- "version": "1.1.0",
- "from": "depd@>=1.1.0 <1.2.0",
- "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.0.tgz"
- },
- "deprecated": {
- "version": "0.0.1",
- "from": "deprecated@>=0.0.1 <0.0.2",
- "resolved": "https://registry.npmjs.org/deprecated/-/deprecated-0.0.1.tgz"
- },
- "des.js": {
- "version": "1.0.0",
- "from": "des.js@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz"
- },
- "detect-indent": {
- "version": "3.0.1",
- "from": "detect-indent@>=3.0.1 <4.0.0",
- "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-3.0.1.tgz"
- },
- "diffie-hellman": {
- "version": "5.0.2",
- "from": "diffie-hellman@>=5.0.0 <6.0.0",
- "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.2.tgz"
- },
- "doctrine": {
- "version": "1.2.2",
- "from": "doctrine@>=1.2.2 <2.0.0",
- "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.2.2.tgz",
- "dependencies": {
- "esutils": {
- "version": "1.1.6",
- "from": "esutils@>=1.1.6 <2.0.0",
- "resolved": "https://registry.npmjs.org/esutils/-/esutils-1.1.6.tgz"
- },
- "isarray": {
- "version": "1.0.0",
- "from": "isarray@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz"
- }
- }
- },
- "domain-browser": {
- "version": "1.1.7",
- "from": "domain-browser@>=1.1.1 <2.0.0",
- "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.1.7.tgz"
- },
- "duplexer": {
- "version": "0.1.1",
- "from": "duplexer@>=0.1.1 <0.2.0",
- "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz"
- },
- "duplexer2": {
- "version": "0.0.2",
- "from": "duplexer2@0.0.2",
- "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.0.2.tgz"
- },
- "duplexify": {
- "version": "3.4.3",
- "from": "duplexify@>=3.4.2 <4.0.0",
- "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.4.3.tgz",
- "dependencies": {
- "end-of-stream": {
- "version": "1.0.0",
- "from": "end-of-stream@1.0.0",
- "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.0.0.tgz"
- },
- "isarray": {
- "version": "1.0.0",
- "from": "isarray@>=1.0.0 <1.1.0",
- "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz"
- },
- "readable-stream": {
- "version": "2.1.4",
- "from": "readable-stream@>=2.0.0 <3.0.0",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.1.4.tgz"
- }
- }
- },
- "ee-first": {
- "version": "1.1.1",
- "from": "ee-first@1.1.1",
- "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz"
- },
- "elliptic": {
- "version": "6.3.1",
- "from": "elliptic@>=6.0.0 <7.0.0",
- "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.3.1.tgz"
- },
- "emojis-list": {
- "version": "2.0.1",
- "from": "emojis-list@>=2.0.0 <3.0.0",
- "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.0.1.tgz"
- },
- "encoding": {
- "version": "0.1.12",
- "from": "encoding@>=0.1.11 <0.2.0",
- "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz"
- },
- "end-of-stream": {
- "version": "0.1.5",
- "from": "end-of-stream@>=0.1.5 <0.2.0",
- "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-0.1.5.tgz"
- },
- "enhanced-resolve": {
- "version": "2.2.2",
- "from": "enhanced-resolve@>=2.2.0 <3.0.0",
- "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-2.2.2.tgz"
- },
- "errno": {
- "version": "0.1.4",
- "from": "errno@>=0.1.3 <0.2.0",
- "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.4.tgz"
- },
- "error-ex": {
- "version": "1.3.0",
- "from": "error-ex@>=1.2.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.0.tgz"
- },
- "es5-ext": {
- "version": "0.10.11",
- "from": "es5-ext@>=0.10.11 <0.11.0",
- "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.11.tgz",
- "dependencies": {
- "es6-symbol": {
- "version": "3.0.2",
- "from": "es6-symbol@>=3.0.2 <3.1.0",
- "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.0.2.tgz"
- }
- }
- },
- "es6-iterator": {
- "version": "2.0.0",
- "from": "es6-iterator@>=2.0.0 <3.0.0",
- "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.0.tgz"
- },
- "es6-map": {
- "version": "0.1.4",
- "from": "es6-map@>=0.1.3 <0.2.0",
- "resolved": "https://registry.npmjs.org/es6-map/-/es6-map-0.1.4.tgz"
- },
- "es6-promise-polyfill": {
- "version": "1.2.0",
- "from": "es6-promise-polyfill@>=1.2.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/es6-promise-polyfill/-/es6-promise-polyfill-1.2.0.tgz"
- },
- "es6-set": {
- "version": "0.1.4",
- "from": "es6-set@>=0.1.3 <0.2.0",
- "resolved": "https://registry.npmjs.org/es6-set/-/es6-set-0.1.4.tgz"
- },
- "es6-symbol": {
- "version": "3.1.0",
- "from": "es6-symbol@>=3.1.0 <3.2.0",
- "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.0.tgz"
- },
- "es6-weak-map": {
- "version": "2.0.1",
- "from": "es6-weak-map@>=2.0.1 <3.0.0",
- "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.1.tgz"
- },
- "escape-string-regexp": {
- "version": "1.0.5",
- "from": "escape-string-regexp@>=1.0.2 <2.0.0",
- "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz"
- },
- "escope": {
- "version": "3.6.0",
- "from": "escope@>=3.6.0 <4.0.0",
- "resolved": "https://registry.npmjs.org/escope/-/escope-3.6.0.tgz"
- },
- "eslint": {
- "version": "2.13.1",
- "from": "eslint@>=2.0.0 <3.0.0",
- "resolved": "https://registry.npmjs.org/eslint/-/eslint-2.13.1.tgz",
- "dependencies": {
- "glob": {
- "version": "7.0.5",
- "from": "glob@>=7.0.3 <8.0.0",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.0.5.tgz"
- },
- "globals": {
- "version": "9.8.0",
- "from": "globals@>=9.2.0 <10.0.0",
- "resolved": "https://registry.npmjs.org/globals/-/globals-9.8.0.tgz"
- },
- "user-home": {
- "version": "2.0.0",
- "from": "user-home@>=2.0.0 <3.0.0",
- "resolved": "https://registry.npmjs.org/user-home/-/user-home-2.0.0.tgz"
- }
- }
- },
- "espree": {
- "version": "3.1.6",
- "from": "espree@>=3.1.6 <4.0.0",
- "resolved": "https://registry.npmjs.org/espree/-/espree-3.1.6.tgz"
- },
- "esprima": {
- "version": "2.7.2",
- "from": "esprima@>=2.6.0 <3.0.0",
- "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.2.tgz"
- },
- "esrecurse": {
- "version": "4.1.0",
- "from": "esrecurse@>=4.1.0 <5.0.0",
- "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.1.0.tgz",
- "dependencies": {
- "estraverse": {
- "version": "4.1.1",
- "from": "estraverse@>=4.1.0 <4.2.0",
- "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.1.1.tgz"
- }
- }
- },
- "estraverse": {
- "version": "4.2.0",
- "from": "estraverse@>=4.2.0 <5.0.0",
- "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz"
- },
- "esutils": {
- "version": "2.0.2",
- "from": "esutils@>=2.0.2 <3.0.0",
- "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz"
- },
- "event-emitter": {
- "version": "0.3.4",
- "from": "event-emitter@>=0.3.4 <0.4.0",
- "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.4.tgz"
- },
- "event-stream": {
- "version": "3.3.3",
- "from": "event-stream@>=3.1.7 <4.0.0",
- "resolved": "https://registry.npmjs.org/event-stream/-/event-stream-3.3.3.tgz"
- },
- "events": {
- "version": "1.1.1",
- "from": "events@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz"
- },
- "evp_bytestokey": {
- "version": "1.0.0",
- "from": "evp_bytestokey@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.0.tgz"
- },
- "exit-hook": {
- "version": "1.1.1",
- "from": "exit-hook@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/exit-hook/-/exit-hook-1.1.1.tgz"
- },
- "expand-brackets": {
- "version": "0.1.5",
- "from": "expand-brackets@>=0.1.4 <0.2.0",
- "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz"
- },
- "expand-range": {
- "version": "1.8.2",
- "from": "expand-range@>=1.8.1 <2.0.0",
- "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz"
- },
- "extend": {
- "version": "3.0.0",
- "from": "extend@>=3.0.0 <4.0.0",
- "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.0.tgz"
- },
- "extglob": {
- "version": "0.3.2",
- "from": "extglob@>=0.3.1 <0.4.0",
- "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz"
- },
- "fancy-log": {
- "version": "1.2.0",
- "from": "fancy-log@>=1.1.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.2.0.tgz"
- },
- "fast-levenshtein": {
- "version": "1.1.3",
- "from": "fast-levenshtein@>=1.1.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-1.1.3.tgz"
- },
- "faye-websocket": {
- "version": "0.7.3",
- "from": "faye-websocket@>=0.7.2 <0.8.0",
- "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.7.3.tgz"
- },
- "figures": {
- "version": "1.7.0",
- "from": "figures@>=1.3.5 <2.0.0",
- "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz"
- },
- "file-entry-cache": {
- "version": "1.2.4",
- "from": "file-entry-cache@>=1.1.1 <2.0.0",
- "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-1.2.4.tgz"
- },
- "filename-regex": {
- "version": "2.0.0",
- "from": "filename-regex@>=2.0.0 <3.0.0",
- "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.0.tgz"
- },
- "fill-range": {
- "version": "2.2.3",
- "from": "fill-range@>=2.1.0 <3.0.0",
- "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz"
- },
- "find-index": {
- "version": "0.1.1",
- "from": "find-index@>=0.1.1 <0.2.0",
- "resolved": "https://registry.npmjs.org/find-index/-/find-index-0.1.1.tgz"
- },
- "find-up": {
- "version": "1.1.2",
- "from": "find-up@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz",
- "dependencies": {
- "path-exists": {
- "version": "2.1.0",
- "from": "path-exists@>=2.0.0 <3.0.0",
- "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz"
- }
- }
- },
- "findup-sync": {
- "version": "0.3.0",
- "from": "findup-sync@>=0.3.0 <0.4.0",
- "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.3.0.tgz"
- },
- "first-chunk-stream": {
- "version": "1.0.0",
- "from": "first-chunk-stream@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz"
- },
- "flagged-respawn": {
- "version": "0.3.2",
- "from": "flagged-respawn@>=0.3.2 <0.4.0",
- "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-0.3.2.tgz"
- },
- "flat-cache": {
- "version": "1.0.10",
- "from": "flat-cache@>=1.0.9 <2.0.0",
- "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.0.10.tgz"
- },
- "for-in": {
- "version": "0.1.5",
- "from": "for-in@>=0.1.5 <0.2.0",
- "resolved": "https://registry.npmjs.org/for-in/-/for-in-0.1.5.tgz"
- },
- "for-own": {
- "version": "0.1.4",
- "from": "for-own@>=0.1.3 <0.2.0",
- "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.4.tgz"
- },
- "forever-agent": {
- "version": "0.5.2",
- "from": "forever-agent@>=0.5.0 <0.6.0",
- "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.5.2.tgz"
- },
- "fork-stream": {
- "version": "0.0.4",
- "from": "fork-stream@>=0.0.4 <0.0.5",
- "resolved": "https://registry.npmjs.org/fork-stream/-/fork-stream-0.0.4.tgz"
- },
- "form-data": {
- "version": "0.1.4",
- "from": "form-data@>=0.1.0 <0.2.0",
- "resolved": "https://registry.npmjs.org/form-data/-/form-data-0.1.4.tgz"
- },
- "from": {
- "version": "0.1.3",
- "from": "from@>=0.0.0 <1.0.0",
- "resolved": "https://registry.npmjs.org/from/-/from-0.1.3.tgz"
- },
- "fs.realpath": {
- "version": "1.0.0",
- "from": "fs.realpath@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz"
- },
- "gaze": {
- "version": "0.5.2",
- "from": "gaze@>=0.5.1 <0.6.0",
- "resolved": "https://registry.npmjs.org/gaze/-/gaze-0.5.2.tgz"
- },
- "generate-function": {
- "version": "2.0.0",
- "from": "generate-function@>=2.0.0 <3.0.0",
- "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz"
- },
- "generate-object-property": {
- "version": "1.2.0",
- "from": "generate-object-property@>=1.1.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz"
- },
- "get-stdin": {
- "version": "4.0.1",
- "from": "get-stdin@>=4.0.1 <5.0.0",
- "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz"
- },
- "glob": {
- "version": "5.0.15",
- "from": "glob@>=5.0.0 <5.1.0",
- "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz"
- },
- "glob-base": {
- "version": "0.3.0",
- "from": "glob-base@>=0.3.0 <0.4.0",
- "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz"
- },
- "glob-parent": {
- "version": "2.0.0",
- "from": "glob-parent@>=2.0.0 <3.0.0",
- "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz"
- },
- "glob-stream": {
- "version": "3.1.18",
- "from": "glob-stream@>=3.1.5 <4.0.0",
- "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-3.1.18.tgz",
- "dependencies": {
- "glob": {
- "version": "4.5.3",
- "from": "glob@>=4.3.1 <5.0.0",
- "resolved": "https://registry.npmjs.org/glob/-/glob-4.5.3.tgz"
- },
- "minimatch": {
- "version": "2.0.10",
- "from": "minimatch@>=2.0.1 <3.0.0",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz"
- },
- "readable-stream": {
- "version": "1.0.34",
- "from": "readable-stream@>=1.0.33-1 <1.1.0-0",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz"
- },
- "through2": {
- "version": "0.6.5",
- "from": "through2@>=0.6.1 <0.7.0",
- "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz"
- }
- }
- },
- "glob-watcher": {
- "version": "0.0.6",
- "from": "glob-watcher@>=0.0.6 <0.0.7",
- "resolved": "https://registry.npmjs.org/glob-watcher/-/glob-watcher-0.0.6.tgz"
- },
- "glob2base": {
- "version": "0.0.12",
- "from": "glob2base@>=0.0.12 <0.0.13",
- "resolved": "https://registry.npmjs.org/glob2base/-/glob2base-0.0.12.tgz"
- },
- "globals": {
- "version": "8.18.0",
- "from": "globals@>=8.3.0 <9.0.0",
- "resolved": "https://registry.npmjs.org/globals/-/globals-8.18.0.tgz"
- },
- "globby": {
- "version": "5.0.0",
- "from": "globby@>=5.0.0 <6.0.0",
- "resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz",
- "dependencies": {
- "glob": {
- "version": "7.0.5",
- "from": "glob@>=7.0.3 <8.0.0",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.0.5.tgz"
- }
- }
- },
- "globule": {
- "version": "0.1.0",
- "from": "globule@>=0.1.0 <0.2.0",
- "resolved": "https://registry.npmjs.org/globule/-/globule-0.1.0.tgz",
- "dependencies": {
- "glob": {
- "version": "3.1.21",
- "from": "glob@>=3.1.21 <3.2.0",
- "resolved": "https://registry.npmjs.org/glob/-/glob-3.1.21.tgz"
- },
- "graceful-fs": {
- "version": "1.2.3",
- "from": "graceful-fs@>=1.2.0 <1.3.0",
- "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.2.3.tgz"
- },
- "inherits": {
- "version": "1.0.2",
- "from": "inherits@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/inherits/-/inherits-1.0.2.tgz"
- },
- "lodash": {
- "version": "1.0.2",
- "from": "lodash@>=1.0.1 <1.1.0",
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-1.0.2.tgz"
- },
- "minimatch": {
- "version": "0.2.14",
- "from": "minimatch@>=0.2.11 <0.3.0",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.2.14.tgz"
- }
- }
- },
- "glogg": {
- "version": "1.0.0",
- "from": "glogg@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.0.tgz"
- },
- "graceful-fs": {
- "version": "4.1.4",
- "from": "graceful-fs@>=4.1.2 <5.0.0",
- "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.4.tgz"
- },
- "graceful-readlink": {
- "version": "1.0.1",
- "from": "graceful-readlink@>=1.0.0",
- "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz"
- },
- "growly": {
- "version": "1.3.0",
- "from": "growly@>=1.2.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/growly/-/growly-1.3.0.tgz"
- },
- "gulp": {
- "version": "3.9.1",
- "from": "gulp@>=3.9.0 <3.10.0",
- "resolved": "https://registry.npmjs.org/gulp/-/gulp-3.9.1.tgz",
- "dependencies": {
- "semver": {
- "version": "4.3.6",
- "from": "semver@>=4.1.0 <5.0.0",
- "resolved": "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz"
- }
- }
- },
- "gulp-autoprefixer": {
- "version": "3.1.0",
- "from": "gulp-autoprefixer@*",
- "resolved": "https://registry.npmjs.org/gulp-autoprefixer/-/gulp-autoprefixer-3.1.0.tgz"
- },
- "gulp-beautify": {
- "version": "2.0.0",
- "from": "gulp-beautify@*",
- "resolved": "https://registry.npmjs.org/gulp-beautify/-/gulp-beautify-2.0.0.tgz"
- },
- "gulp-cached": {
- "version": "1.1.0",
- "from": "gulp-cached@*",
- "resolved": "https://registry.npmjs.org/gulp-cached/-/gulp-cached-1.1.0.tgz",
- "dependencies": {
- "readable-stream": {
- "version": "1.0.34",
- "from": "readable-stream@>=1.0.17 <1.1.0",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz"
- },
- "through2": {
- "version": "0.5.1",
- "from": "through2@>=0.5.1 <0.6.0",
- "resolved": "https://registry.npmjs.org/through2/-/through2-0.5.1.tgz"
- },
- "xtend": {
- "version": "3.0.0",
- "from": "xtend@>=3.0.0 <3.1.0",
- "resolved": "https://registry.npmjs.org/xtend/-/xtend-3.0.0.tgz"
- }
- }
- },
- "gulp-clean-css": {
- "version": "2.0.10",
- "from": "gulp-clean-css@>=2.0.7 <3.0.0",
- "resolved": "https://registry.npmjs.org/gulp-clean-css/-/gulp-clean-css-2.0.10.tgz",
- "dependencies": {
- "isarray": {
- "version": "1.0.0",
- "from": "isarray@>=1.0.0 <1.1.0",
- "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz"
- },
- "readable-stream": {
- "version": "2.1.4",
- "from": "readable-stream@>=2.1.4 <3.0.0",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.1.4.tgz"
- }
- }
- },
- "gulp-concat-util": {
- "version": "0.5.5",
- "from": "gulp-concat-util@*",
- "resolved": "https://registry.npmjs.org/gulp-concat-util/-/gulp-concat-util-0.5.5.tgz",
- "dependencies": {
- "gulp-if": {
- "version": "2.0.1",
- "from": "gulp-if@>=2.0.0 <3.0.0",
- "resolved": "https://registry.npmjs.org/gulp-if/-/gulp-if-2.0.1.tgz"
- }
- }
- },
- "gulp-eol": {
- "version": "0.1.2",
- "from": "gulp-eol@*",
- "resolved": "https://registry.npmjs.org/gulp-eol/-/gulp-eol-0.1.2.tgz",
- "dependencies": {
- "ansi-regex": {
- "version": "0.2.1",
- "from": "ansi-regex@>=0.2.0 <0.3.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-0.2.1.tgz"
- },
- "ansi-styles": {
- "version": "1.1.0",
- "from": "ansi-styles@>=1.1.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-1.1.0.tgz"
- },
- "chalk": {
- "version": "0.5.1",
- "from": "chalk@>=0.5.0 <0.6.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-0.5.1.tgz"
- },
- "gulp-util": {
- "version": "2.2.20",
- "from": "gulp-util@>=2.2.0 <2.3.0",
- "resolved": "https://registry.npmjs.org/gulp-util/-/gulp-util-2.2.20.tgz",
- "dependencies": {
- "through2": {
- "version": "0.5.1",
- "from": "through2@>=0.5.0 <0.6.0",
- "resolved": "https://registry.npmjs.org/through2/-/through2-0.5.1.tgz"
- }
- }
- },
- "has-ansi": {
- "version": "0.1.0",
- "from": "has-ansi@>=0.1.0 <0.2.0",
- "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-0.1.0.tgz"
- },
- "lodash._reinterpolate": {
- "version": "2.4.1",
- "from": "lodash._reinterpolate@>=2.4.1 <3.0.0",
- "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-2.4.1.tgz"
- },
- "lodash.escape": {
- "version": "2.4.1",
- "from": "lodash.escape@>=2.4.1 <2.5.0",
- "resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-2.4.1.tgz"
- },
- "lodash.keys": {
- "version": "2.4.1",
- "from": "lodash.keys@>=2.4.1 <2.5.0",
- "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-2.4.1.tgz"
- },
- "lodash.template": {
- "version": "2.4.1",
- "from": "lodash.template@>=2.4.1 <3.0.0",
- "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-2.4.1.tgz"
- },
- "lodash.templatesettings": {
- "version": "2.4.1",
- "from": "lodash.templatesettings@>=2.4.1 <2.5.0",
- "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-2.4.1.tgz"
- },
- "minimist": {
- "version": "0.2.0",
- "from": "minimist@>=0.2.0 <0.3.0",
- "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.2.0.tgz"
- },
- "readable-stream": {
- "version": "1.0.34",
- "from": "readable-stream@>=1.0.17 <1.1.0",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz"
- },
- "strip-ansi": {
- "version": "0.3.0",
- "from": "strip-ansi@>=0.3.0 <0.4.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-0.3.0.tgz"
- },
- "supports-color": {
- "version": "0.2.0",
- "from": "supports-color@>=0.2.0 <0.3.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-0.2.0.tgz"
- },
- "through2": {
- "version": "0.4.2",
- "from": "through2@>=0.4.0 <0.5.0",
- "resolved": "https://registry.npmjs.org/through2/-/through2-0.4.2.tgz",
- "dependencies": {
- "xtend": {
- "version": "2.1.2",
- "from": "xtend@>=2.1.1 <2.2.0",
- "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz"
- }
- }
- },
- "vinyl": {
- "version": "0.2.3",
- "from": "vinyl@>=0.2.1 <0.3.0",
- "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.2.3.tgz"
- },
- "xtend": {
- "version": "3.0.0",
- "from": "xtend@>=3.0.0 <3.1.0",
- "resolved": "https://registry.npmjs.org/xtend/-/xtend-3.0.0.tgz"
- }
- }
- },
- "gulp-eslint": {
- "version": "2.0.0",
- "from": "gulp-eslint@>=2.0.0 <3.0.0",
- "resolved": "https://registry.npmjs.org/gulp-eslint/-/gulp-eslint-2.0.0.tgz",
- "dependencies": {
- "bufferstreams": {
- "version": "1.1.1",
- "from": "bufferstreams@>=1.1.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/bufferstreams/-/bufferstreams-1.1.1.tgz"
- },
- "isarray": {
- "version": "1.0.0",
- "from": "isarray@>=1.0.0 <1.1.0",
- "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz"
- },
- "readable-stream": {
- "version": "2.1.4",
- "from": "readable-stream@>=2.0.2 <3.0.0",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.1.4.tgz"
- }
- }
- },
- "gulp-header": {
- "version": "1.8.7",
- "from": "gulp-header@*",
- "resolved": "https://registry.npmjs.org/gulp-header/-/gulp-header-1.8.7.tgz"
- },
- "gulp-if": {
- "version": "1.2.5",
- "from": "gulp-if@>=1.2.5 <1.3.0",
- "resolved": "https://registry.npmjs.org/gulp-if/-/gulp-if-1.2.5.tgz",
- "dependencies": {
- "gulp-match": {
- "version": "0.2.1",
- "from": "gulp-match@>=0.2.1 <0.3.0",
- "resolved": "https://registry.npmjs.org/gulp-match/-/gulp-match-0.2.1.tgz"
- },
- "merge-stream": {
- "version": "0.1.8",
- "from": "merge-stream@>=0.1.6 <0.2.0",
- "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-0.1.8.tgz"
- },
- "minimatch": {
- "version": "1.0.0",
- "from": "minimatch@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-1.0.0.tgz"
- },
- "readable-stream": {
- "version": "1.0.34",
- "from": "readable-stream@>=1.0.33-1 <1.1.0-0",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz"
- },
- "ternary-stream": {
- "version": "1.2.3",
- "from": "ternary-stream@>=1.2.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/ternary-stream/-/ternary-stream-1.2.3.tgz"
- },
- "through2": {
- "version": "0.6.5",
- "from": "through2@>=0.6.2 <0.7.0",
- "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz"
- }
- }
- },
- "gulp-less": {
- "version": "1.3.6",
- "from": "gulp-less@1.3.6",
- "resolved": "https://registry.npmjs.org/gulp-less/-/gulp-less-1.3.6.tgz",
- "dependencies": {
- "convert-source-map": {
- "version": "0.4.1",
- "from": "convert-source-map@>=0.4.0 <0.5.0",
- "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-0.4.1.tgz"
- },
- "readable-stream": {
- "version": "1.0.34",
- "from": "readable-stream@>=1.0.17 <1.1.0",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz"
- },
- "source-map": {
- "version": "0.1.43",
- "from": "source-map@>=0.1.39 <0.2.0",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.43.tgz"
- },
- "through2": {
- "version": "0.5.1",
- "from": "through2@>=0.5.1 <0.6.0",
- "resolved": "https://registry.npmjs.org/through2/-/through2-0.5.1.tgz"
- },
- "vinyl-sourcemaps-apply": {
- "version": "0.1.4",
- "from": "vinyl-sourcemaps-apply@>=0.1.1 <0.2.0",
- "resolved": "https://registry.npmjs.org/vinyl-sourcemaps-apply/-/vinyl-sourcemaps-apply-0.1.4.tgz"
- },
- "xtend": {
- "version": "3.0.0",
- "from": "xtend@>=3.0.0 <3.1.0",
- "resolved": "https://registry.npmjs.org/xtend/-/xtend-3.0.0.tgz"
- }
- }
- },
- "gulp-livereload": {
- "version": "3.8.1",
- "from": "gulp-livereload@>=3.8.0 <3.9.0",
- "resolved": "https://registry.npmjs.org/gulp-livereload/-/gulp-livereload-3.8.1.tgz",
- "dependencies": {
- "ansi-regex": {
- "version": "0.2.1",
- "from": "ansi-regex@>=0.2.0 <0.3.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-0.2.1.tgz"
- },
- "ansi-styles": {
- "version": "1.1.0",
- "from": "ansi-styles@>=1.1.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-1.1.0.tgz"
- },
- "chalk": {
- "version": "0.5.1",
- "from": "chalk@>=0.5.1 <0.6.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-0.5.1.tgz"
- },
- "has-ansi": {
- "version": "0.1.0",
- "from": "has-ansi@>=0.1.0 <0.2.0",
- "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-0.1.0.tgz"
- },
- "strip-ansi": {
- "version": "0.3.0",
- "from": "strip-ansi@>=0.3.0 <0.4.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-0.3.0.tgz"
- },
- "supports-color": {
- "version": "0.2.0",
- "from": "supports-color@>=0.2.0 <0.3.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-0.2.0.tgz"
- }
- }
- },
- "gulp-match": {
- "version": "1.0.2",
- "from": "gulp-match@>=1.0.2 <2.0.0",
- "resolved": "https://registry.npmjs.org/gulp-match/-/gulp-match-1.0.2.tgz"
- },
- "gulp-notify": {
- "version": "2.2.0",
- "from": "gulp-notify@>=2.2.0 <2.3.0",
- "resolved": "https://registry.npmjs.org/gulp-notify/-/gulp-notify-2.2.0.tgz",
- "dependencies": {
- "readable-stream": {
- "version": "1.0.34",
- "from": "readable-stream@>=1.0.33-1 <1.1.0-0",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz"
- },
- "through2": {
- "version": "0.6.5",
- "from": "through2@>=0.6.3 <0.7.0",
- "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz"
- }
- }
- },
- "gulp-plumber": {
- "version": "1.1.0",
- "from": "gulp-plumber@*",
- "resolved": "https://registry.npmjs.org/gulp-plumber/-/gulp-plumber-1.1.0.tgz"
- },
- "gulp-rename": {
- "version": "1.2.2",
- "from": "gulp-rename@*",
- "resolved": "https://registry.npmjs.org/gulp-rename/-/gulp-rename-1.2.2.tgz"
- },
- "gulp-replace": {
- "version": "0.5.4",
- "from": "gulp-replace@*",
- "resolved": "https://registry.npmjs.org/gulp-replace/-/gulp-replace-0.5.4.tgz",
- "dependencies": {
- "isarray": {
- "version": "1.0.0",
- "from": "isarray@>=1.0.0 <1.1.0",
- "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz"
- },
- "readable-stream": {
- "version": "2.1.4",
- "from": "readable-stream@>=2.0.1 <3.0.0",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.1.4.tgz"
- }
- }
- },
- "gulp-rimraf": {
- "version": "0.2.0",
- "from": "gulp-rimraf@*",
- "resolved": "https://registry.npmjs.org/gulp-rimraf/-/gulp-rimraf-0.2.0.tgz"
- },
- "gulp-stripbom": {
- "version": "1.0.4",
- "from": "gulp-stripbom@*",
- "resolved": "https://registry.npmjs.org/gulp-stripbom/-/gulp-stripbom-1.0.4.tgz",
- "dependencies": {
- "readable-stream": {
- "version": "1.0.34",
- "from": "readable-stream@>=1.0.17 <1.1.0",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz"
- },
- "strip-bom": {
- "version": "1.0.0",
- "from": "strip-bom@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-1.0.0.tgz"
- },
- "through2": {
- "version": "0.5.1",
- "from": "through2@>=0.5.1 <0.6.0",
- "resolved": "https://registry.npmjs.org/through2/-/through2-0.5.1.tgz"
- },
- "xtend": {
- "version": "3.0.0",
- "from": "xtend@>=3.0.0 <3.1.0",
- "resolved": "https://registry.npmjs.org/xtend/-/xtend-3.0.0.tgz"
- }
- }
- },
- "gulp-through": {
- "version": "0.3.2",
- "from": "gulp-through@>=0.3.0 <0.4.0",
- "resolved": "https://registry.npmjs.org/gulp-through/-/gulp-through-0.3.2.tgz",
- "dependencies": {
- "ansi-regex": {
- "version": "0.2.1",
- "from": "ansi-regex@>=0.2.0 <0.3.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-0.2.1.tgz"
- },
- "ansi-styles": {
- "version": "1.1.0",
- "from": "ansi-styles@>=1.1.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-1.1.0.tgz"
- },
- "bluebird": {
- "version": "2.10.2",
- "from": "bluebird@>=2.3.0 <3.0.0",
- "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-2.10.2.tgz"
- },
- "chalk": {
- "version": "0.5.1",
- "from": "chalk@>=0.5.1 <0.6.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-0.5.1.tgz"
- },
- "has-ansi": {
- "version": "0.1.0",
- "from": "has-ansi@>=0.1.0 <0.2.0",
- "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-0.1.0.tgz"
- },
- "readable-stream": {
- "version": "1.0.34",
- "from": "readable-stream@>=1.0.33-1 <1.1.0-0",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz"
- },
- "strip-ansi": {
- "version": "0.3.0",
- "from": "strip-ansi@>=0.3.0 <0.4.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-0.3.0.tgz"
- },
- "supports-color": {
- "version": "0.2.0",
- "from": "supports-color@>=0.2.0 <0.3.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-0.2.0.tgz"
- },
- "through2": {
- "version": "0.6.5",
- "from": "through2@>=0.6.1 <0.7.0",
- "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz"
- }
- }
- },
- "gulp-uglify": {
- "version": "1.5.4",
- "from": "gulp-uglify@*",
- "resolved": "https://registry.npmjs.org/gulp-uglify/-/gulp-uglify-1.5.4.tgz"
- },
- "gulp-util": {
- "version": "3.0.7",
- "from": "gulp-util@*",
- "resolved": "https://registry.npmjs.org/gulp-util/-/gulp-util-3.0.7.tgz",
- "dependencies": {
- "object-assign": {
- "version": "3.0.0",
- "from": "object-assign@>=3.0.0 <4.0.0",
- "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz"
- }
- }
- },
- "gulp-zip": {
- "version": "3.2.0",
- "from": "gulp-zip@*",
- "resolved": "https://registry.npmjs.org/gulp-zip/-/gulp-zip-3.2.0.tgz"
- },
- "gulplog": {
- "version": "1.0.0",
- "from": "gulplog@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz"
- },
- "has-ansi": {
- "version": "2.0.0",
- "from": "has-ansi@>=2.0.0 <3.0.0",
- "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz"
- },
- "has-flag": {
- "version": "1.0.0",
- "from": "has-flag@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz"
- },
- "has-gulplog": {
- "version": "0.1.0",
- "from": "has-gulplog@>=0.1.0 <0.2.0",
- "resolved": "https://registry.npmjs.org/has-gulplog/-/has-gulplog-0.1.0.tgz"
- },
- "hash.js": {
- "version": "1.0.3",
- "from": "hash.js@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.0.3.tgz"
- },
- "hawk": {
- "version": "1.1.1",
- "from": "hawk@1.1.1",
- "resolved": "https://registry.npmjs.org/hawk/-/hawk-1.1.1.tgz"
- },
- "hoek": {
- "version": "0.9.1",
- "from": "hoek@>=0.9.0 <0.10.0",
- "resolved": "https://registry.npmjs.org/hoek/-/hoek-0.9.1.tgz"
- },
- "home-or-tmp": {
- "version": "1.0.0",
- "from": "home-or-tmp@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-1.0.0.tgz"
- },
- "hosted-git-info": {
- "version": "2.1.5",
- "from": "hosted-git-info@>=2.1.4 <3.0.0",
- "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.1.5.tgz"
- },
- "http-browserify": {
- "version": "1.7.0",
- "from": "http-browserify@>=1.3.2 <2.0.0",
- "resolved": "https://registry.npmjs.org/http-browserify/-/http-browserify-1.7.0.tgz"
- },
- "http-errors": {
- "version": "1.3.1",
- "from": "http-errors@>=1.3.1 <1.4.0",
- "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.3.1.tgz"
- },
- "http-signature": {
- "version": "0.10.1",
- "from": "http-signature@>=0.10.0 <0.11.0",
- "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-0.10.1.tgz"
- },
- "https-browserify": {
- "version": "0.0.1",
- "from": "https-browserify@0.0.1",
- "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-0.0.1.tgz"
- },
- "iconv-lite": {
- "version": "0.4.13",
- "from": "iconv-lite@0.4.13",
- "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.13.tgz"
- },
- "ieee754": {
- "version": "1.1.6",
- "from": "ieee754@>=1.1.4 <2.0.0",
- "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.6.tgz"
- },
- "ignore": {
- "version": "3.1.3",
- "from": "ignore@>=3.1.2 <4.0.0",
- "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.1.3.tgz"
- },
- "imurmurhash": {
- "version": "0.1.4",
- "from": "imurmurhash@>=0.1.4 <0.2.0",
- "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz"
- },
- "indent-string": {
- "version": "2.1.0",
- "from": "indent-string@>=2.1.0 <3.0.0",
- "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz",
- "dependencies": {
- "repeating": {
- "version": "2.0.1",
- "from": "repeating@>=2.0.0 <3.0.0",
- "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz"
- }
- }
- },
- "indexof": {
- "version": "0.0.1",
- "from": "indexof@0.0.1",
- "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz"
- },
- "inflight": {
- "version": "1.0.5",
- "from": "inflight@>=1.0.4 <2.0.0",
- "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.5.tgz"
- },
- "inherits": {
- "version": "2.0.1",
- "from": "inherits@>=2.0.1 <2.1.0",
- "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz"
- },
- "ini": {
- "version": "1.3.4",
- "from": "ini@>=1.3.4 <2.0.0",
- "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz"
- },
- "inquirer": {
- "version": "0.12.0",
- "from": "inquirer@>=0.12.0 <0.13.0",
- "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-0.12.0.tgz"
- },
- "interpret": {
- "version": "1.0.1",
- "from": "interpret@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.0.1.tgz"
- },
- "invariant": {
- "version": "2.2.1",
- "from": "invariant@>=2.2.0 <3.0.0",
- "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.1.tgz"
- },
- "invert-kv": {
- "version": "1.0.0",
- "from": "invert-kv@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz"
- },
- "is": {
- "version": "3.1.0",
- "from": "is@>=3.0.1 <4.0.0",
- "resolved": "https://registry.npmjs.org/is/-/is-3.1.0.tgz"
- },
- "is-arrayish": {
- "version": "0.2.1",
- "from": "is-arrayish@>=0.2.1 <0.3.0",
- "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz"
- },
- "is-binary-path": {
- "version": "1.0.1",
- "from": "is-binary-path@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz"
- },
- "is-buffer": {
- "version": "1.1.3",
- "from": "is-buffer@>=1.0.2 <2.0.0",
- "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.3.tgz"
- },
- "is-builtin-module": {
- "version": "1.0.0",
- "from": "is-builtin-module@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz"
- },
- "is-dotfile": {
- "version": "1.0.2",
- "from": "is-dotfile@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.2.tgz"
- },
- "is-equal-shallow": {
- "version": "0.1.3",
- "from": "is-equal-shallow@>=0.1.3 <0.2.0",
- "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz"
- },
- "is-extendable": {
- "version": "0.1.1",
- "from": "is-extendable@>=0.1.1 <0.2.0",
- "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz"
- },
- "is-extglob": {
- "version": "1.0.0",
- "from": "is-extglob@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz"
- },
- "is-finite": {
- "version": "1.0.1",
- "from": "is-finite@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.1.tgz"
- },
- "is-fullwidth-code-point": {
- "version": "1.0.0",
- "from": "is-fullwidth-code-point@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz"
- },
- "is-glob": {
- "version": "2.0.1",
- "from": "is-glob@>=2.0.0 <3.0.0",
- "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz"
- },
- "is-my-json-valid": {
- "version": "2.13.1",
- "from": "is-my-json-valid@>=2.10.0 <3.0.0",
- "resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.13.1.tgz"
- },
- "is-number": {
- "version": "2.1.0",
- "from": "is-number@>=2.1.0 <3.0.0",
- "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz"
- },
- "is-path-cwd": {
- "version": "1.0.0",
- "from": "is-path-cwd@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz"
- },
- "is-path-in-cwd": {
- "version": "1.0.0",
- "from": "is-path-in-cwd@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz"
- },
- "is-path-inside": {
- "version": "1.0.0",
- "from": "is-path-inside@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.0.tgz"
- },
- "is-posix-bracket": {
- "version": "0.1.1",
- "from": "is-posix-bracket@>=0.1.0 <0.2.0",
- "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz"
- },
- "is-primitive": {
- "version": "2.0.0",
- "from": "is-primitive@>=2.0.0 <3.0.0",
- "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz"
- },
- "is-property": {
- "version": "1.0.2",
- "from": "is-property@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz"
- },
- "is-resolvable": {
- "version": "1.0.0",
- "from": "is-resolvable@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.0.0.tgz"
- },
- "is-stream": {
- "version": "1.1.0",
- "from": "is-stream@>=1.0.1 <2.0.0",
- "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz"
- },
- "is-utf8": {
- "version": "0.2.1",
- "from": "is-utf8@>=0.2.0 <0.3.0",
- "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz"
- },
- "isarray": {
- "version": "0.0.1",
- "from": "isarray@0.0.1",
- "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz"
- },
- "isexe": {
- "version": "1.1.2",
- "from": "isexe@>=1.1.1 <2.0.0",
- "resolved": "https://registry.npmjs.org/isexe/-/isexe-1.1.2.tgz"
- },
- "isobject": {
- "version": "2.1.0",
- "from": "isobject@>=2.0.0 <3.0.0",
- "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz",
- "dependencies": {
- "isarray": {
- "version": "1.0.0",
- "from": "isarray@1.0.0",
- "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz"
- }
- }
- },
- "istextorbinary": {
- "version": "1.0.2",
- "from": "istextorbinary@1.0.2",
- "resolved": "https://registry.npmjs.org/istextorbinary/-/istextorbinary-1.0.2.tgz"
- },
- "jassl": {
- "version": "1.2.0",
- "from": "rainloop/jassl",
- "resolved": "git://github.com/rainloop/jassl.git#8243909fc281c2310e7ae854629c62a171c943c3"
- },
- "js-base64": {
- "version": "2.1.9",
- "from": "js-base64@>=2.1.9 <3.0.0",
- "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.1.9.tgz"
- },
- "js-beautify": {
- "version": "1.6.3",
- "from": "js-beautify@>=1.5.10 <2.0.0",
- "resolved": "https://registry.npmjs.org/js-beautify/-/js-beautify-1.6.3.tgz"
- },
- "js-tokens": {
- "version": "2.0.0",
- "from": "js-tokens@>=2.0.0 <3.0.0",
- "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-2.0.0.tgz"
- },
- "js-yaml": {
- "version": "3.6.1",
- "from": "js-yaml@>=3.5.1 <4.0.0",
- "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.6.1.tgz"
- },
- "jsesc": {
- "version": "0.5.0",
- "from": "jsesc@>=0.5.0 <0.6.0",
- "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz"
- },
- "json-loader": {
- "version": "0.5.4",
- "from": "json-loader@>=0.5.4 <0.6.0",
- "resolved": "https://registry.npmjs.org/json-loader/-/json-loader-0.5.4.tgz"
- },
- "json-stable-stringify": {
- "version": "1.0.1",
- "from": "json-stable-stringify@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz"
- },
- "json-stringify-safe": {
- "version": "5.0.1",
- "from": "json-stringify-safe@>=5.0.0 <5.1.0",
- "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz"
- },
- "json5": {
- "version": "0.4.0",
- "from": "json5@>=0.4.0 <0.5.0",
- "resolved": "https://registry.npmjs.org/json5/-/json5-0.4.0.tgz"
- },
- "jsonify": {
- "version": "0.0.0",
- "from": "jsonify@>=0.0.0 <0.1.0",
- "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz"
- },
- "jsonpointer": {
- "version": "2.0.0",
- "from": "jsonpointer@2.0.0",
- "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-2.0.0.tgz"
- },
- "kind-of": {
- "version": "3.0.3",
- "from": "kind-of@>=3.0.2 <4.0.0",
- "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.0.3.tgz"
- },
- "lazy-cache": {
- "version": "1.0.4",
- "from": "lazy-cache@>=1.0.3 <2.0.0",
- "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz"
- },
- "lcid": {
- "version": "1.0.0",
- "from": "lcid@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz"
- },
- "less": {
- "version": "1.7.5",
- "from": "less@>=1.7.4 <2.0.0",
- "resolved": "https://registry.npmjs.org/less/-/less-1.7.5.tgz",
- "dependencies": {
- "clean-css": {
- "version": "2.2.23",
- "from": "clean-css@>=2.2.0 <2.3.0",
- "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-2.2.23.tgz"
- },
- "commander": {
- "version": "2.2.0",
- "from": "commander@>=2.2.0 <2.3.0",
- "resolved": "https://registry.npmjs.org/commander/-/commander-2.2.0.tgz"
- },
- "graceful-fs": {
- "version": "3.0.8",
- "from": "graceful-fs@>=3.0.2 <3.1.0",
- "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.8.tgz"
- },
- "source-map": {
- "version": "0.1.43",
- "from": "source-map@>=0.1.0 <0.2.0",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.43.tgz"
- }
- }
- },
- "levn": {
- "version": "0.3.0",
- "from": "levn@>=0.3.0 <0.4.0",
- "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz"
- },
- "liftoff": {
- "version": "2.2.4",
- "from": "liftoff@>=2.1.0 <3.0.0",
- "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-2.2.4.tgz"
- },
- "livereload-js": {
- "version": "2.2.2",
- "from": "livereload-js@>=2.2.0 <3.0.0",
- "resolved": "https://registry.npmjs.org/livereload-js/-/livereload-js-2.2.2.tgz"
- },
- "load-json-file": {
- "version": "1.1.0",
- "from": "load-json-file@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz"
- },
- "loader-runner": {
- "version": "2.1.1",
- "from": "loader-runner@>=2.1.0 <3.0.0",
- "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.1.1.tgz"
- },
- "loader-utils": {
- "version": "0.2.15",
- "from": "loader-utils@>=0.2.11 <0.3.0",
- "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-0.2.15.tgz",
- "dependencies": {
- "json5": {
- "version": "0.5.0",
- "from": "json5@>=0.5.0 <0.6.0",
- "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.0.tgz"
- }
- }
- },
- "lodash": {
- "version": "4.13.1",
- "from": "lodash@>=4.2.0 <5.0.0",
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.13.1.tgz"
- },
- "lodash._arraycopy": {
- "version": "3.0.0",
- "from": "lodash._arraycopy@>=3.0.0 <4.0.0",
- "resolved": "https://registry.npmjs.org/lodash._arraycopy/-/lodash._arraycopy-3.0.0.tgz"
- },
- "lodash._arrayeach": {
- "version": "3.0.0",
- "from": "lodash._arrayeach@>=3.0.0 <4.0.0",
- "resolved": "https://registry.npmjs.org/lodash._arrayeach/-/lodash._arrayeach-3.0.0.tgz"
- },
- "lodash._baseassign": {
- "version": "3.2.0",
- "from": "lodash._baseassign@>=3.0.0 <4.0.0",
- "resolved": "https://registry.npmjs.org/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz"
- },
- "lodash._baseclone": {
- "version": "4.5.7",
- "from": "lodash._baseclone@>=4.5.0 <4.6.0",
- "resolved": "https://registry.npmjs.org/lodash._baseclone/-/lodash._baseclone-4.5.7.tgz"
- },
- "lodash._basecopy": {
- "version": "3.0.1",
- "from": "lodash._basecopy@>=3.0.0 <4.0.0",
- "resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz"
- },
- "lodash._basefor": {
- "version": "3.0.3",
- "from": "lodash._basefor@>=3.0.0 <4.0.0",
- "resolved": "https://registry.npmjs.org/lodash._basefor/-/lodash._basefor-3.0.3.tgz"
- },
- "lodash._basetostring": {
- "version": "3.0.1",
- "from": "lodash._basetostring@>=3.0.0 <4.0.0",
- "resolved": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz"
- },
- "lodash._basevalues": {
- "version": "3.0.0",
- "from": "lodash._basevalues@>=3.0.0 <4.0.0",
- "resolved": "https://registry.npmjs.org/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz"
- },
- "lodash._bindcallback": {
- "version": "3.0.1",
- "from": "lodash._bindcallback@>=3.0.0 <4.0.0",
- "resolved": "https://registry.npmjs.org/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz"
- },
- "lodash._createassigner": {
- "version": "3.1.1",
- "from": "lodash._createassigner@>=3.0.0 <4.0.0",
- "resolved": "https://registry.npmjs.org/lodash._createassigner/-/lodash._createassigner-3.1.1.tgz"
- },
- "lodash._escapehtmlchar": {
- "version": "2.4.1",
- "from": "lodash._escapehtmlchar@>=2.4.1 <2.5.0",
- "resolved": "https://registry.npmjs.org/lodash._escapehtmlchar/-/lodash._escapehtmlchar-2.4.1.tgz"
- },
- "lodash._escapestringchar": {
- "version": "2.4.1",
- "from": "lodash._escapestringchar@>=2.4.1 <2.5.0",
- "resolved": "https://registry.npmjs.org/lodash._escapestringchar/-/lodash._escapestringchar-2.4.1.tgz"
- },
- "lodash._getnative": {
- "version": "3.9.1",
- "from": "lodash._getnative@>=3.0.0 <4.0.0",
- "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz"
- },
- "lodash._htmlescapes": {
- "version": "2.4.1",
- "from": "lodash._htmlescapes@>=2.4.1 <2.5.0",
- "resolved": "https://registry.npmjs.org/lodash._htmlescapes/-/lodash._htmlescapes-2.4.1.tgz"
- },
- "lodash._isiterateecall": {
- "version": "3.0.9",
- "from": "lodash._isiterateecall@>=3.0.0 <4.0.0",
- "resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz"
- },
- "lodash._isnative": {
- "version": "2.4.1",
- "from": "lodash._isnative@>=2.4.1 <2.5.0",
- "resolved": "https://registry.npmjs.org/lodash._isnative/-/lodash._isnative-2.4.1.tgz"
- },
- "lodash._objecttypes": {
- "version": "2.4.1",
- "from": "lodash._objecttypes@>=2.4.1 <2.5.0",
- "resolved": "https://registry.npmjs.org/lodash._objecttypes/-/lodash._objecttypes-2.4.1.tgz"
- },
- "lodash._reescape": {
- "version": "3.0.0",
- "from": "lodash._reescape@>=3.0.0 <4.0.0",
- "resolved": "https://registry.npmjs.org/lodash._reescape/-/lodash._reescape-3.0.0.tgz"
- },
- "lodash._reevaluate": {
- "version": "3.0.0",
- "from": "lodash._reevaluate@>=3.0.0 <4.0.0",
- "resolved": "https://registry.npmjs.org/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz"
- },
- "lodash._reinterpolate": {
- "version": "3.0.0",
- "from": "lodash._reinterpolate@>=3.0.0 <4.0.0",
- "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz"
- },
- "lodash._reunescapedhtml": {
- "version": "2.4.1",
- "from": "lodash._reunescapedhtml@>=2.4.1 <2.5.0",
- "resolved": "https://registry.npmjs.org/lodash._reunescapedhtml/-/lodash._reunescapedhtml-2.4.1.tgz",
- "dependencies": {
- "lodash.keys": {
- "version": "2.4.1",
- "from": "lodash.keys@>=2.4.1 <2.5.0",
- "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-2.4.1.tgz"
- }
- }
- },
- "lodash._root": {
- "version": "3.0.1",
- "from": "lodash._root@>=3.0.0 <4.0.0",
- "resolved": "https://registry.npmjs.org/lodash._root/-/lodash._root-3.0.1.tgz"
- },
- "lodash._shimkeys": {
- "version": "2.4.1",
- "from": "lodash._shimkeys@>=2.4.1 <2.5.0",
- "resolved": "https://registry.npmjs.org/lodash._shimkeys/-/lodash._shimkeys-2.4.1.tgz"
- },
- "lodash.assign": {
- "version": "3.2.0",
- "from": "lodash.assign@>=3.2.0 <4.0.0",
- "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-3.2.0.tgz"
- },
- "lodash.clonedeep": {
- "version": "4.3.2",
- "from": "lodash.clonedeep@>=4.3.2 <5.0.0",
- "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.3.2.tgz"
- },
- "lodash.defaults": {
- "version": "2.4.1",
- "from": "lodash.defaults@>=2.4.1 <2.5.0",
- "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-2.4.1.tgz",
- "dependencies": {
- "lodash.keys": {
- "version": "2.4.1",
- "from": "lodash.keys@>=2.4.1 <2.5.0",
- "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-2.4.1.tgz"
- }
- }
- },
- "lodash.escape": {
- "version": "3.2.0",
- "from": "lodash.escape@>=3.0.0 <4.0.0",
- "resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-3.2.0.tgz"
- },
- "lodash.isarguments": {
- "version": "3.0.8",
- "from": "lodash.isarguments@>=3.0.0 <4.0.0",
- "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.0.8.tgz"
- },
- "lodash.isarray": {
- "version": "3.0.4",
- "from": "lodash.isarray@>=3.0.0 <4.0.0",
- "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz"
- },
- "lodash.isobject": {
- "version": "2.4.1",
- "from": "lodash.isobject@>=2.4.1 <2.5.0",
- "resolved": "https://registry.npmjs.org/lodash.isobject/-/lodash.isobject-2.4.1.tgz"
- },
- "lodash.keys": {
- "version": "3.1.2",
- "from": "lodash.keys@>=3.0.0 <4.0.0",
- "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz"
- },
- "lodash.rest": {
- "version": "4.0.3",
- "from": "lodash.rest@>=4.0.0 <5.0.0",
- "resolved": "https://registry.npmjs.org/lodash.rest/-/lodash.rest-4.0.3.tgz"
- },
- "lodash.restparam": {
- "version": "3.6.1",
- "from": "lodash.restparam@>=3.0.0 <4.0.0",
- "resolved": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz"
- },
- "lodash.template": {
- "version": "3.6.2",
- "from": "lodash.template@>=3.0.0 <4.0.0",
- "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-3.6.2.tgz"
- },
- "lodash.templatesettings": {
- "version": "3.1.1",
- "from": "lodash.templatesettings@>=3.0.0 <4.0.0",
- "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-3.1.1.tgz"
- },
- "lodash.values": {
- "version": "2.4.1",
- "from": "lodash.values@>=2.4.1 <2.5.0",
- "resolved": "https://registry.npmjs.org/lodash.values/-/lodash.values-2.4.1.tgz",
- "dependencies": {
- "lodash.keys": {
- "version": "2.4.1",
- "from": "lodash.keys@>=2.4.1 <2.5.0",
- "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-2.4.1.tgz"
- }
- }
- },
- "log-symbols": {
- "version": "1.0.2",
- "from": "log-symbols@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-1.0.2.tgz"
- },
- "longest": {
- "version": "1.0.1",
- "from": "longest@>=1.0.1 <2.0.0",
- "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz"
- },
- "loose-envify": {
- "version": "1.2.0",
- "from": "loose-envify@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.2.0.tgz",
- "dependencies": {
- "js-tokens": {
- "version": "1.0.3",
- "from": "js-tokens@>=1.0.1 <2.0.0",
- "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-1.0.3.tgz"
- }
- }
- },
- "loud-rejection": {
- "version": "1.5.0",
- "from": "loud-rejection@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.5.0.tgz"
- },
- "lru-cache": {
- "version": "2.7.3",
- "from": "lru-cache@>=2.0.0 <3.0.0",
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz"
- },
- "map-obj": {
- "version": "1.0.1",
- "from": "map-obj@>=1.0.1 <2.0.0",
- "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz"
- },
- "map-stream": {
- "version": "0.1.0",
- "from": "map-stream@>=0.1.0 <0.2.0",
- "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.1.0.tgz"
- },
- "marked": {
- "version": "0.3.5",
- "from": "marked@>=0.3.2 <0.4.0",
- "resolved": "https://registry.npmjs.org/marked/-/marked-0.3.5.tgz"
- },
- "marked-terminal": {
- "version": "1.6.1",
- "from": "marked-terminal@>=1.6.1 <2.0.0",
- "resolved": "https://registry.npmjs.org/marked-terminal/-/marked-terminal-1.6.1.tgz"
- },
- "media-typer": {
- "version": "0.3.0",
- "from": "media-typer@0.3.0",
- "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz"
- },
- "memory-fs": {
- "version": "0.3.0",
- "from": "memory-fs@>=0.3.0 <0.4.0",
- "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.3.0.tgz",
- "dependencies": {
- "isarray": {
- "version": "1.0.0",
- "from": "isarray@>=1.0.0 <1.1.0",
- "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz"
- },
- "readable-stream": {
- "version": "2.1.4",
- "from": "readable-stream@>=2.0.1 <3.0.0",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.1.4.tgz"
- }
- }
- },
- "meow": {
- "version": "3.7.0",
- "from": "meow@>=3.3.0 <4.0.0",
- "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz"
- },
- "merge-stream": {
- "version": "1.0.0",
- "from": "merge-stream@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-1.0.0.tgz",
- "dependencies": {
- "isarray": {
- "version": "1.0.0",
- "from": "isarray@>=1.0.0 <1.1.0",
- "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz"
- },
- "readable-stream": {
- "version": "2.1.4",
- "from": "readable-stream@>=2.0.1 <3.0.0",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.1.4.tgz"
- }
- }
- },
- "micromatch": {
- "version": "2.3.10",
- "from": "micromatch@>=2.1.5 <3.0.0",
- "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.10.tgz"
- },
- "miller-rabin": {
- "version": "4.0.0",
- "from": "miller-rabin@>=4.0.0 <5.0.0",
- "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.0.tgz"
- },
- "mime": {
- "version": "1.2.11",
- "from": "mime@>=1.2.11 <1.3.0",
- "resolved": "https://registry.npmjs.org/mime/-/mime-1.2.11.tgz"
- },
- "mime-db": {
- "version": "1.23.0",
- "from": "mime-db@>=1.23.0 <1.24.0",
- "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.23.0.tgz"
- },
- "mime-types": {
- "version": "1.0.2",
- "from": "mime-types@>=1.0.1 <1.1.0",
- "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-1.0.2.tgz"
- },
- "mini-lr": {
- "version": "0.1.9",
- "from": "mini-lr@>=0.1.8 <0.2.0",
- "resolved": "https://registry.npmjs.org/mini-lr/-/mini-lr-0.1.9.tgz",
- "dependencies": {
- "qs": {
- "version": "2.2.5",
- "from": "qs@>=2.2.3 <2.3.0",
- "resolved": "https://registry.npmjs.org/qs/-/qs-2.2.5.tgz"
- }
- }
- },
- "minimalistic-assert": {
- "version": "1.0.0",
- "from": "minimalistic-assert@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz"
- },
- "minimatch": {
- "version": "3.0.2",
- "from": "minimatch@>=3.0.2 <4.0.0",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.2.tgz"
- },
- "minimist": {
- "version": "1.2.0",
- "from": "minimist@>=1.1.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz"
- },
- "mkdirp": {
- "version": "0.5.1",
- "from": "mkdirp@>=0.5.1 <0.6.0",
- "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
- "dependencies": {
- "minimist": {
- "version": "0.0.8",
- "from": "minimist@0.0.8",
- "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz"
- }
- }
- },
- "modify-babel-preset": {
- "version": "1.2.0",
- "from": "modify-babel-preset@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/modify-babel-preset/-/modify-babel-preset-1.2.0.tgz"
- },
- "moment": {
- "version": "2.13.0",
- "from": "moment@>=2.0.0 <3.0.0",
- "resolved": "https://registry.npmjs.org/moment/-/moment-2.13.0.tgz"
- },
- "ms": {
- "version": "0.7.1",
- "from": "ms@0.7.1",
- "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz"
- },
- "multipipe": {
- "version": "0.1.2",
- "from": "multipipe@>=0.1.2 <0.2.0",
- "resolved": "https://registry.npmjs.org/multipipe/-/multipipe-0.1.2.tgz"
- },
- "mute-stream": {
- "version": "0.0.5",
- "from": "mute-stream@0.0.5",
- "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.5.tgz"
- },
- "node-emoji": {
- "version": "0.1.0",
- "from": "node-emoji@>=0.1.0 <0.2.0",
- "resolved": "https://registry.npmjs.org/node-emoji/-/node-emoji-0.1.0.tgz"
- },
- "node-fetch": {
- "version": "1.5.3",
- "from": "node-fetch@>=1.3.3 <2.0.0",
- "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.5.3.tgz"
- },
- "node-fs": {
- "version": "0.1.7",
- "from": "node-fs@*",
- "resolved": "https://registry.npmjs.org/node-fs/-/node-fs-0.1.7.tgz"
- },
- "node-libs-browser": {
- "version": "1.0.0",
- "from": "node-libs-browser@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-1.0.0.tgz",
- "dependencies": {
- "isarray": {
- "version": "1.0.0",
- "from": "isarray@>=1.0.0 <1.1.0",
- "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz"
- },
- "readable-stream": {
- "version": "2.1.4",
- "from": "readable-stream@>=2.0.5 <3.0.0",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.1.4.tgz"
- }
- }
- },
- "node-localstorage": {
- "version": "1.1.2",
- "from": "node-localstorage@>=1.1.2 <1.2.0",
- "resolved": "https://registry.npmjs.org/node-localstorage/-/node-localstorage-1.1.2.tgz"
- },
- "node-notifier": {
- "version": "4.2.3",
- "from": "node-notifier@>=4.2.3 <4.3.0",
- "resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-4.2.3.tgz",
- "dependencies": {
- "lodash._baseclone": {
- "version": "3.3.0",
- "from": "lodash._baseclone@>=3.0.0 <4.0.0",
- "resolved": "https://registry.npmjs.org/lodash._baseclone/-/lodash._baseclone-3.3.0.tgz"
- },
- "lodash.clonedeep": {
- "version": "3.0.2",
- "from": "lodash.clonedeep@>=3.0.0 <4.0.0",
- "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-3.0.2.tgz"
- },
- "semver": {
- "version": "4.3.6",
- "from": "semver@>=4.0.3 <5.0.0",
- "resolved": "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz"
- }
- }
- },
- "node-uuid": {
- "version": "1.4.7",
- "from": "node-uuid@>=1.4.0 <1.5.0",
- "resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.7.tgz"
- },
- "node.extend": {
- "version": "1.1.5",
- "from": "node.extend@>=1.1.3 <2.0.0",
- "resolved": "https://registry.npmjs.org/node.extend/-/node.extend-1.1.5.tgz"
- },
- "nopt": {
- "version": "3.0.6",
- "from": "nopt@>=3.0.1 <3.1.0",
- "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz"
- },
- "normalize-package-data": {
- "version": "2.3.5",
- "from": "normalize-package-data@>=2.3.4 <3.0.0",
- "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.3.5.tgz"
- },
- "normalize-path": {
- "version": "2.0.1",
- "from": "normalize-path@>=2.0.1 <3.0.0",
- "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.0.1.tgz"
- },
- "normalize-range": {
- "version": "0.1.2",
- "from": "normalize-range@>=0.1.2 <0.2.0",
- "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz"
- },
- "normalize.css": {
- "version": "4.2.0",
- "from": "normalize.css@*",
- "resolved": "https://registry.npmjs.org/normalize.css/-/normalize.css-4.2.0.tgz"
- },
- "num2fraction": {
- "version": "1.2.2",
- "from": "num2fraction@>=1.2.2 <2.0.0",
- "resolved": "https://registry.npmjs.org/num2fraction/-/num2fraction-1.2.2.tgz"
- },
- "number-is-nan": {
- "version": "1.0.0",
- "from": "number-is-nan@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.0.tgz"
- },
- "oauth-sign": {
- "version": "0.3.0",
- "from": "oauth-sign@>=0.3.0 <0.4.0",
- "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.3.0.tgz"
- },
- "object-assign": {
- "version": "4.1.0",
- "from": "object-assign@>=4.0.1 <5.0.0",
- "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.0.tgz"
- },
- "object-keys": {
- "version": "0.4.0",
- "from": "object-keys@>=0.4.0 <0.5.0",
- "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz"
- },
- "object.omit": {
- "version": "2.0.0",
- "from": "object.omit@>=2.0.0 <3.0.0",
- "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.0.tgz"
- },
- "on-finished": {
- "version": "2.3.0",
- "from": "on-finished@>=2.3.0 <2.4.0",
- "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz"
- },
- "once": {
- "version": "1.3.3",
- "from": "once@>=1.3.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/once/-/once-1.3.3.tgz"
- },
- "onetime": {
- "version": "1.1.0",
- "from": "onetime@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz"
- },
- "openpgp": {
- "version": "2.3.2",
- "from": "openpgp@*",
- "resolved": "https://registry.npmjs.org/openpgp/-/openpgp-2.3.2.tgz"
- },
- "optionator": {
- "version": "0.8.1",
- "from": "optionator@>=0.8.1 <0.9.0",
- "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.1.tgz"
- },
- "orchestrator": {
- "version": "0.3.7",
- "from": "orchestrator@>=0.3.0 <0.4.0",
- "resolved": "https://registry.npmjs.org/orchestrator/-/orchestrator-0.3.7.tgz"
- },
- "ordered-read-streams": {
- "version": "0.1.0",
- "from": "ordered-read-streams@>=0.1.0 <0.2.0",
- "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-0.1.0.tgz"
- },
- "os-browserify": {
- "version": "0.2.1",
- "from": "os-browserify@>=0.2.0 <0.3.0",
- "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.2.1.tgz"
- },
- "os-homedir": {
- "version": "1.0.1",
- "from": "os-homedir@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.1.tgz"
- },
- "os-locale": {
- "version": "1.4.0",
- "from": "os-locale@>=1.4.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz"
- },
- "os-tmpdir": {
- "version": "1.0.1",
- "from": "os-tmpdir@>=1.0.1 <2.0.0",
- "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.1.tgz"
- },
- "pako": {
- "version": "0.2.8",
- "from": "pako@>=0.2.0 <0.3.0",
- "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.8.tgz"
- },
- "parse-asn1": {
- "version": "5.0.0",
- "from": "parse-asn1@>=5.0.0 <6.0.0",
- "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.0.0.tgz"
- },
- "parse-glob": {
- "version": "3.0.4",
- "from": "parse-glob@>=3.0.4 <4.0.0",
- "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz"
- },
- "parse-json": {
- "version": "2.2.0",
- "from": "parse-json@>=2.2.0 <3.0.0",
- "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz"
- },
- "parseurl": {
- "version": "1.3.1",
- "from": "parseurl@>=1.3.0 <1.4.0",
- "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.1.tgz"
- },
- "path-browserify": {
- "version": "0.0.0",
- "from": "path-browserify@0.0.0",
- "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz"
- },
- "path-exists": {
- "version": "1.0.0",
- "from": "path-exists@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-1.0.0.tgz"
- },
- "path-is-absolute": {
- "version": "1.0.0",
- "from": "path-is-absolute@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.0.tgz"
- },
- "path-is-inside": {
- "version": "1.0.1",
- "from": "path-is-inside@>=1.0.1 <2.0.0",
- "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.1.tgz"
- },
- "path-type": {
- "version": "1.1.0",
- "from": "path-type@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz"
- },
- "pause-stream": {
- "version": "0.0.11",
- "from": "pause-stream@0.0.11",
- "resolved": "https://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz"
- },
- "pbkdf2": {
- "version": "3.0.4",
- "from": "pbkdf2@>=3.0.3 <4.0.0",
- "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.4.tgz"
- },
- "pify": {
- "version": "2.3.0",
- "from": "pify@>=2.0.0 <3.0.0",
- "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz"
- },
- "pikaday": {
- "version": "1.4.0",
- "from": "pikaday@>=1.4.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/pikaday/-/pikaday-1.4.0.tgz"
- },
- "pinkie": {
- "version": "2.0.4",
- "from": "pinkie@>=2.0.0 <3.0.0",
- "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz"
- },
- "pinkie-promise": {
- "version": "2.0.1",
- "from": "pinkie-promise@>=2.0.0 <3.0.0",
- "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz"
- },
- "pkg-conf": {
- "version": "1.1.3",
- "from": "pkg-conf@>=1.1.2 <2.0.0",
- "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-1.1.3.tgz"
- },
- "pluralize": {
- "version": "1.2.1",
- "from": "pluralize@>=1.2.1 <2.0.0",
- "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-1.2.1.tgz"
- },
- "postcss": {
- "version": "5.0.21",
- "from": "postcss@>=5.0.4 <6.0.0",
- "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.0.21.tgz",
- "dependencies": {
- "supports-color": {
- "version": "3.1.2",
- "from": "supports-color@>=3.1.2 <4.0.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.1.2.tgz"
- }
- }
- },
- "postcss-value-parser": {
- "version": "3.3.0",
- "from": "postcss-value-parser@>=3.2.3 <4.0.0",
- "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.0.tgz"
- },
- "prelude-ls": {
- "version": "1.1.2",
- "from": "prelude-ls@>=1.1.2 <1.2.0",
- "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz"
- },
- "preserve": {
- "version": "0.2.0",
- "from": "preserve@>=0.2.0 <0.3.0",
- "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz"
- },
- "pretty-hrtime": {
- "version": "1.0.2",
- "from": "pretty-hrtime@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.2.tgz"
- },
- "private": {
- "version": "0.1.6",
- "from": "private@>=0.1.6 <0.2.0",
- "resolved": "https://registry.npmjs.org/private/-/private-0.1.6.tgz"
- },
- "process": {
- "version": "0.11.5",
- "from": "process@>=0.11.0 <0.12.0",
- "resolved": "https://registry.npmjs.org/process/-/process-0.11.5.tgz"
- },
- "process-nextick-args": {
- "version": "1.0.7",
- "from": "process-nextick-args@>=1.0.6 <1.1.0",
- "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz"
- },
- "progress": {
- "version": "1.1.8",
- "from": "progress@>=1.1.8 <2.0.0",
- "resolved": "https://registry.npmjs.org/progress/-/progress-1.1.8.tgz"
- },
- "proto-list": {
- "version": "1.2.4",
- "from": "proto-list@>=1.2.1 <1.3.0",
- "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz"
- },
- "prr": {
- "version": "0.0.0",
- "from": "prr@>=0.0.0 <0.1.0",
- "resolved": "https://registry.npmjs.org/prr/-/prr-0.0.0.tgz"
- },
- "public-encrypt": {
- "version": "4.0.0",
- "from": "public-encrypt@>=4.0.0 <5.0.0",
- "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.0.tgz"
- },
- "punycode": {
- "version": "1.4.1",
- "from": "punycode@>=1.2.4 <2.0.0",
- "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz"
- },
- "qs": {
- "version": "1.0.2",
- "from": "qs@>=1.0.0 <1.1.0",
- "resolved": "https://registry.npmjs.org/qs/-/qs-1.0.2.tgz"
- },
- "querystring": {
- "version": "0.2.0",
- "from": "querystring@0.2.0",
- "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz"
- },
- "querystring-es3": {
- "version": "0.2.1",
- "from": "querystring-es3@>=0.2.0 <0.3.0",
- "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz"
- },
- "randomatic": {
- "version": "1.1.5",
- "from": "randomatic@>=1.1.3 <2.0.0",
- "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.5.tgz"
- },
- "randombytes": {
- "version": "2.0.3",
- "from": "randombytes@>=2.0.0 <3.0.0",
- "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.3.tgz"
- },
- "raw-body": {
- "version": "2.1.7",
- "from": "raw-body@>=2.1.5 <2.2.0",
- "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.1.7.tgz",
- "dependencies": {
- "bytes": {
- "version": "2.4.0",
- "from": "bytes@2.4.0",
- "resolved": "https://registry.npmjs.org/bytes/-/bytes-2.4.0.tgz"
- }
- }
- },
- "raw-loader": {
- "version": "0.5.1",
- "from": "raw-loader@>=0.5.1 <0.6.0",
- "resolved": "https://registry.npmjs.org/raw-loader/-/raw-loader-0.5.1.tgz"
- },
- "rcfinder": {
- "version": "0.1.9",
- "from": "rcfinder@>=0.1.6 <0.2.0",
- "resolved": "https://registry.npmjs.org/rcfinder/-/rcfinder-0.1.9.tgz"
- },
- "rcloader": {
- "version": "0.1.4",
- "from": "rcloader@>=0.1.2 <0.2.0",
- "resolved": "https://registry.npmjs.org/rcloader/-/rcloader-0.1.4.tgz",
- "dependencies": {
- "lodash": {
- "version": "3.10.1",
- "from": "lodash@>=3.0.1 <4.0.0",
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz"
- }
- }
- },
- "read-json-sync": {
- "version": "1.1.1",
- "from": "read-json-sync@>=1.1.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/read-json-sync/-/read-json-sync-1.1.1.tgz"
- },
- "read-pkg": {
- "version": "1.1.0",
- "from": "read-pkg@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz"
- },
- "read-pkg-up": {
- "version": "1.0.1",
- "from": "read-pkg-up@>=1.0.1 <2.0.0",
- "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz"
- },
- "readable-stream": {
- "version": "1.1.14",
- "from": "readable-stream@>=1.1.9 <1.2.0",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz"
- },
- "readdirp": {
- "version": "2.1.0",
- "from": "readdirp@>=2.0.0 <3.0.0",
- "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz",
- "dependencies": {
- "isarray": {
- "version": "1.0.0",
- "from": "isarray@>=1.0.0 <1.1.0",
- "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz"
- },
- "readable-stream": {
- "version": "2.1.4",
- "from": "readable-stream@>=2.0.2 <3.0.0",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.1.4.tgz"
- }
- }
- },
- "readline2": {
- "version": "1.0.1",
- "from": "readline2@>=1.0.1 <2.0.0",
- "resolved": "https://registry.npmjs.org/readline2/-/readline2-1.0.1.tgz"
- },
- "rechoir": {
- "version": "0.6.2",
- "from": "rechoir@>=0.6.2 <0.7.0",
- "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz"
- },
- "redent": {
- "version": "1.0.0",
- "from": "redent@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz"
- },
- "redeyed": {
- "version": "0.5.0",
- "from": "redeyed@>=0.5.0 <0.6.0",
- "resolved": "https://registry.npmjs.org/redeyed/-/redeyed-0.5.0.tgz",
- "dependencies": {
- "esprima-fb": {
- "version": "12001.1.0-dev-harmony-fb",
- "from": "esprima-fb@>=12001.1.0-dev-harmony-fb <12001.2.0",
- "resolved": "https://registry.npmjs.org/esprima-fb/-/esprima-fb-12001.1.0-dev-harmony-fb.tgz"
- }
- }
- },
- "regenerate": {
- "version": "1.3.1",
- "from": "regenerate@>=1.2.1 <2.0.0",
- "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.3.1.tgz"
- },
- "regenerator-runtime": {
- "version": "0.9.5",
- "from": "regenerator-runtime@>=0.9.5 <0.10.0",
- "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.9.5.tgz"
- },
- "regex-cache": {
- "version": "0.4.3",
- "from": "regex-cache@>=0.4.2 <0.5.0",
- "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.3.tgz"
- },
- "regexpu-core": {
- "version": "2.0.0",
- "from": "regexpu-core@>=2.0.0 <3.0.0",
- "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-2.0.0.tgz"
- },
- "regjsgen": {
- "version": "0.2.0",
- "from": "regjsgen@>=0.2.0 <0.3.0",
- "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz"
- },
- "regjsparser": {
- "version": "0.1.5",
- "from": "regjsparser@>=0.1.4 <0.2.0",
- "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz"
- },
- "repeat-element": {
- "version": "1.1.2",
- "from": "repeat-element@>=1.1.2 <2.0.0",
- "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz"
- },
- "repeat-string": {
- "version": "1.5.4",
- "from": "repeat-string@>=1.5.2 <2.0.0",
- "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.5.4.tgz"
- },
- "repeating": {
- "version": "1.1.3",
- "from": "repeating@>=1.1.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/repeating/-/repeating-1.1.3.tgz"
- },
- "replace-ext": {
- "version": "0.0.1",
- "from": "replace-ext@0.0.1",
- "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz"
- },
- "replacestream": {
- "version": "4.0.0",
- "from": "replacestream@>=4.0.0 <5.0.0",
- "resolved": "https://registry.npmjs.org/replacestream/-/replacestream-4.0.0.tgz",
- "dependencies": {
- "isarray": {
- "version": "1.0.0",
- "from": "isarray@>=1.0.0 <1.1.0",
- "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz"
- },
- "object-assign": {
- "version": "3.0.0",
- "from": "object-assign@>=3.0.0 <4.0.0",
- "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz"
- },
- "readable-stream": {
- "version": "2.1.4",
- "from": "readable-stream@>=2.0.1 <3.0.0",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.1.4.tgz"
- }
- }
- },
- "request": {
- "version": "2.40.0",
- "from": "request@>=2.40.0 <2.41.0",
- "resolved": "https://registry.npmjs.org/request/-/request-2.40.0.tgz"
- },
- "require-main-filename": {
- "version": "1.0.1",
- "from": "require-main-filename@>=1.0.1 <2.0.0",
- "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz"
- },
- "require-relative": {
- "version": "0.8.7",
- "from": "require-relative@>=0.8.7 <0.9.0",
- "resolved": "https://registry.npmjs.org/require-relative/-/require-relative-0.8.7.tgz"
- },
- "require-uncached": {
- "version": "1.0.2",
- "from": "require-uncached@>=1.0.2 <2.0.0",
- "resolved": "https://registry.npmjs.org/require-uncached/-/require-uncached-1.0.2.tgz"
- },
- "resolve": {
- "version": "1.1.7",
- "from": "resolve@>=1.1.7 <2.0.0",
- "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz"
- },
- "resolve-from": {
- "version": "1.0.1",
- "from": "resolve-from@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz"
- },
- "restore-cursor": {
- "version": "1.0.1",
- "from": "restore-cursor@>=1.0.1 <2.0.0",
- "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz"
- },
- "right-align": {
- "version": "0.1.3",
- "from": "right-align@>=0.1.1 <0.2.0",
- "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz"
- },
- "rimraf": {
- "version": "2.5.2",
- "from": "rimraf@*",
- "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.5.2.tgz",
- "dependencies": {
- "glob": {
- "version": "7.0.5",
- "from": "glob@>=7.0.0 <8.0.0",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.0.5.tgz"
- }
- }
- },
- "ripemd160": {
- "version": "1.0.1",
- "from": "ripemd160@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-1.0.1.tgz"
- },
- "run-async": {
- "version": "0.1.0",
- "from": "run-async@>=0.1.0 <0.2.0",
- "resolved": "https://registry.npmjs.org/run-async/-/run-async-0.1.0.tgz"
- },
- "rx-lite": {
- "version": "3.1.2",
- "from": "rx-lite@>=3.1.2 <4.0.0",
- "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-3.1.2.tgz"
- },
- "semver": {
- "version": "5.2.0",
- "from": "semver@>=2.0.0 <3.0.0||>=3.0.0 <4.0.0||>=4.0.0 <5.0.0||>=5.0.0 <6.0.0",
- "resolved": "https://registry.npmjs.org/semver/-/semver-5.2.0.tgz"
- },
- "sequencify": {
- "version": "0.0.7",
- "from": "sequencify@>=0.0.7 <0.1.0",
- "resolved": "https://registry.npmjs.org/sequencify/-/sequencify-0.0.7.tgz"
- },
- "set-blocking": {
- "version": "1.0.0",
- "from": "set-blocking@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-1.0.0.tgz"
- },
- "set-immediate-shim": {
- "version": "1.0.1",
- "from": "set-immediate-shim@>=1.0.1 <2.0.0",
- "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz"
- },
- "sha.js": {
- "version": "2.4.5",
- "from": "sha.js@>=2.3.6 <3.0.0",
- "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.5.tgz"
- },
- "shebang-regex": {
- "version": "1.0.0",
- "from": "shebang-regex@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz"
- },
- "shelljs": {
- "version": "0.6.0",
- "from": "shelljs@>=0.6.0 <0.7.0",
- "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.6.0.tgz"
- },
- "shellwords": {
- "version": "0.1.0",
- "from": "shellwords@>=0.1.0 <0.2.0",
- "resolved": "https://registry.npmjs.org/shellwords/-/shellwords-0.1.0.tgz"
- },
- "sigmund": {
- "version": "1.0.1",
- "from": "sigmund@>=1.0.0 <1.1.0",
- "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz"
- },
- "signal-exit": {
- "version": "3.0.0",
- "from": "signal-exit@>=3.0.0 <4.0.0",
- "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.0.tgz"
- },
- "slash": {
- "version": "1.0.0",
- "from": "slash@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz"
- },
- "slice-ansi": {
- "version": "0.0.4",
- "from": "slice-ansi@0.0.4",
- "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-0.0.4.tgz"
- },
- "sntp": {
- "version": "0.2.4",
- "from": "sntp@>=0.2.0 <0.3.0",
- "resolved": "https://registry.npmjs.org/sntp/-/sntp-0.2.4.tgz"
- },
- "source-list-map": {
- "version": "0.1.6",
- "from": "source-list-map@>=0.1.0 <0.2.0",
- "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-0.1.6.tgz"
- },
- "source-map": {
- "version": "0.5.6",
- "from": "source-map@>=0.5.0 <0.6.0",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz"
- },
- "source-map-support": {
- "version": "0.2.10",
- "from": "source-map-support@>=0.2.10 <0.3.0",
- "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.2.10.tgz",
- "dependencies": {
- "source-map": {
- "version": "0.1.32",
- "from": "source-map@0.1.32",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.32.tgz"
- }
- }
- },
- "sparkles": {
- "version": "1.0.0",
- "from": "sparkles@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.0.tgz"
- },
- "spdx-correct": {
- "version": "1.0.2",
- "from": "spdx-correct@>=1.0.0 <1.1.0",
- "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz"
- },
- "spdx-exceptions": {
- "version": "1.0.4",
- "from": "spdx-exceptions@>=1.0.4 <2.0.0",
- "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-1.0.4.tgz"
- },
- "spdx-expression-parse": {
- "version": "1.0.2",
- "from": "spdx-expression-parse@>=1.0.0 <1.1.0",
- "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.2.tgz"
- },
- "spdx-license-ids": {
- "version": "1.2.1",
- "from": "spdx-license-ids@>=1.0.2 <2.0.0",
- "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.1.tgz"
- },
- "split": {
- "version": "0.3.3",
- "from": "split@>=0.3.0 <0.4.0",
- "resolved": "https://registry.npmjs.org/split/-/split-0.3.3.tgz"
- },
- "sprintf-js": {
- "version": "1.0.3",
- "from": "sprintf-js@>=1.0.2 <1.1.0",
- "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz"
- },
- "statuses": {
- "version": "1.3.0",
- "from": "statuses@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.0.tgz"
- },
- "stream-browserify": {
- "version": "2.0.1",
- "from": "stream-browserify@>=2.0.1 <3.0.0",
- "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz",
- "dependencies": {
- "isarray": {
- "version": "1.0.0",
- "from": "isarray@>=1.0.0 <1.1.0",
- "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz"
- },
- "readable-stream": {
- "version": "2.1.4",
- "from": "readable-stream@>=2.0.2 <3.0.0",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.1.4.tgz"
- }
- }
- },
- "stream-combiner": {
- "version": "0.0.4",
- "from": "stream-combiner@>=0.0.4 <0.1.0",
- "resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.0.4.tgz"
- },
- "stream-combiner2": {
- "version": "1.1.1",
- "from": "stream-combiner2@>=1.1.1 <2.0.0",
- "resolved": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.1.1.tgz",
- "dependencies": {
- "duplexer2": {
- "version": "0.1.4",
- "from": "duplexer2@>=0.1.0 <0.2.0",
- "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz"
- },
- "isarray": {
- "version": "1.0.0",
- "from": "isarray@>=1.0.0 <1.1.0",
- "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz"
- },
- "readable-stream": {
- "version": "2.1.4",
- "from": "readable-stream@>=2.0.2 <3.0.0",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.1.4.tgz"
- }
- }
- },
- "stream-consume": {
- "version": "0.1.0",
- "from": "stream-consume@>=0.1.0 <0.2.0",
- "resolved": "https://registry.npmjs.org/stream-consume/-/stream-consume-0.1.0.tgz"
- },
- "string_decoder": {
- "version": "0.10.31",
- "from": "string_decoder@>=0.10.0 <0.11.0",
- "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz"
- },
- "string-width": {
- "version": "1.0.1",
- "from": "string-width@>=1.0.1 <2.0.0",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.1.tgz"
- },
- "stringstream": {
- "version": "0.0.5",
- "from": "stringstream@>=0.0.4 <0.1.0",
- "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz"
- },
- "strip-ansi": {
- "version": "3.0.1",
- "from": "strip-ansi@>=3.0.0 <4.0.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz"
- },
- "strip-bom": {
- "version": "2.0.0",
- "from": "strip-bom@>=2.0.0 <3.0.0",
- "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz"
- },
- "strip-indent": {
- "version": "1.0.1",
- "from": "strip-indent@>=1.0.1 <2.0.0",
- "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz"
- },
- "strip-json-comments": {
- "version": "1.0.4",
- "from": "strip-json-comments@>=1.0.1 <1.1.0",
- "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz"
- },
- "supports-color": {
- "version": "2.0.0",
- "from": "supports-color@>=2.0.0 <3.0.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz"
- },
- "symbol": {
- "version": "0.2.3",
- "from": "symbol@>=0.2.1 <0.3.0",
- "resolved": "https://registry.npmjs.org/symbol/-/symbol-0.2.3.tgz"
- },
- "table": {
- "version": "3.7.8",
- "from": "table@>=3.7.8 <4.0.0",
- "resolved": "https://registry.npmjs.org/table/-/table-3.7.8.tgz"
- },
- "tapable": {
- "version": "0.2.4",
- "from": "tapable@>=0.2.3 <0.3.0",
- "resolved": "https://registry.npmjs.org/tapable/-/tapable-0.2.4.tgz"
- },
- "ternary-stream": {
- "version": "2.0.0",
- "from": "ternary-stream@>=2.0.0 <3.0.0",
- "resolved": "https://registry.npmjs.org/ternary-stream/-/ternary-stream-2.0.0.tgz"
- },
- "text-table": {
- "version": "0.2.0",
- "from": "text-table@>=0.2.0 <0.3.0",
- "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz"
- },
- "textextensions": {
- "version": "1.0.2",
- "from": "textextensions@>=1.0.0 <1.1.0",
- "resolved": "https://registry.npmjs.org/textextensions/-/textextensions-1.0.2.tgz"
- },
- "through": {
- "version": "2.3.8",
- "from": "through@>=2.3.6 <3.0.0",
- "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz"
- },
- "through2": {
- "version": "2.0.1",
- "from": "through2@>=2.0.0 <3.0.0",
- "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.1.tgz",
- "dependencies": {
- "isarray": {
- "version": "1.0.0",
- "from": "isarray@>=1.0.0 <1.1.0",
- "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz"
- },
- "readable-stream": {
- "version": "2.0.6",
- "from": "readable-stream@>=2.0.0 <2.1.0",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz"
- }
- }
- },
- "tildify": {
- "version": "1.2.0",
- "from": "tildify@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/tildify/-/tildify-1.2.0.tgz"
- },
- "time-stamp": {
- "version": "1.0.1",
- "from": "time-stamp@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-1.0.1.tgz"
- },
- "timers-browserify": {
- "version": "1.4.2",
- "from": "timers-browserify@>=1.0.1 <2.0.0",
- "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-1.4.2.tgz"
- },
- "to-fast-properties": {
- "version": "1.0.2",
- "from": "to-fast-properties@>=1.0.1 <2.0.0",
- "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.2.tgz"
- },
- "tough-cookie": {
- "version": "2.2.2",
- "from": "tough-cookie@>=0.12.0",
- "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.2.2.tgz"
- },
- "trim-newlines": {
- "version": "1.0.0",
- "from": "trim-newlines@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz"
- },
- "tryit": {
- "version": "1.0.2",
- "from": "tryit@>=1.0.1 <2.0.0",
- "resolved": "https://registry.npmjs.org/tryit/-/tryit-1.0.2.tgz"
- },
- "tty-browserify": {
- "version": "0.0.0",
- "from": "tty-browserify@0.0.0",
- "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz"
- },
- "tunnel-agent": {
- "version": "0.4.3",
- "from": "tunnel-agent@>=0.4.0 <0.5.0",
- "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz"
- },
- "tv4": {
- "version": "1.2.7",
- "from": "tv4@>=1.2.7 <2.0.0",
- "resolved": "https://registry.npmjs.org/tv4/-/tv4-1.2.7.tgz"
- },
- "type-check": {
- "version": "0.3.2",
- "from": "type-check@>=0.3.2 <0.4.0",
- "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz"
- },
- "type-is": {
- "version": "1.6.13",
- "from": "type-is@>=1.6.10 <1.7.0",
- "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.13.tgz",
- "dependencies": {
- "mime-types": {
- "version": "2.1.11",
- "from": "mime-types@>=2.1.11 <2.2.0",
- "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.11.tgz"
- }
- }
- },
- "typedarray": {
- "version": "0.0.6",
- "from": "typedarray@>=0.0.5 <0.1.0",
- "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz"
- },
- "uglify-js": {
- "version": "2.6.4",
- "from": "uglify-js@2.6.4",
- "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.6.4.tgz",
- "dependencies": {
- "async": {
- "version": "0.2.10",
- "from": "async@>=0.2.6 <0.3.0",
- "resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz"
- },
- "yargs": {
- "version": "3.10.0",
- "from": "yargs@>=3.10.0 <3.11.0",
- "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz"
- }
- }
- },
- "uglify-save-license": {
- "version": "0.4.1",
- "from": "uglify-save-license@>=0.4.1 <0.5.0",
- "resolved": "https://registry.npmjs.org/uglify-save-license/-/uglify-save-license-0.4.1.tgz"
- },
- "uglify-to-browserify": {
- "version": "1.0.2",
- "from": "uglify-to-browserify@>=1.0.0 <1.1.0",
- "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz"
- },
- "unique-stream": {
- "version": "1.0.0",
- "from": "unique-stream@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-1.0.0.tgz"
- },
- "unpipe": {
- "version": "1.0.0",
- "from": "unpipe@1.0.0",
- "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz"
- },
- "url": {
- "version": "0.11.0",
- "from": "url@>=0.11.0 <0.12.0",
- "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz",
- "dependencies": {
- "punycode": {
- "version": "1.3.2",
- "from": "punycode@1.3.2",
- "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz"
- }
- }
- },
- "user-home": {
- "version": "1.1.1",
- "from": "user-home@>=1.1.1 <2.0.0",
- "resolved": "https://registry.npmjs.org/user-home/-/user-home-1.1.1.tgz"
- },
- "util": {
- "version": "0.10.3",
- "from": "util@>=0.10.3 <0.11.0",
- "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz"
- },
- "util-deprecate": {
- "version": "1.0.2",
- "from": "util-deprecate@>=1.0.1 <1.1.0",
- "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz"
- },
- "v8flags": {
- "version": "2.0.11",
- "from": "v8flags@>=2.0.2 <3.0.0",
- "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-2.0.11.tgz"
- },
- "validate-npm-package-license": {
- "version": "3.0.1",
- "from": "validate-npm-package-license@>=3.0.1 <4.0.0",
- "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz"
- },
- "vinyl": {
- "version": "0.5.3",
- "from": "vinyl@>=0.5.0 <0.6.0",
- "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.5.3.tgz"
- },
- "vinyl-bufferstream": {
- "version": "1.0.1",
- "from": "vinyl-bufferstream@>=1.0.1 <2.0.0",
- "resolved": "https://registry.npmjs.org/vinyl-bufferstream/-/vinyl-bufferstream-1.0.1.tgz"
- },
- "vinyl-fs": {
- "version": "0.3.14",
- "from": "vinyl-fs@>=0.3.0 <0.4.0",
- "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-0.3.14.tgz",
- "dependencies": {
- "clone": {
- "version": "0.2.0",
- "from": "clone@>=0.2.0 <0.3.0",
- "resolved": "https://registry.npmjs.org/clone/-/clone-0.2.0.tgz"
- },
- "graceful-fs": {
- "version": "3.0.8",
- "from": "graceful-fs@>=3.0.0 <4.0.0",
- "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.8.tgz"
- },
- "readable-stream": {
- "version": "1.0.34",
- "from": "readable-stream@>=1.0.33-1 <1.1.0-0",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz"
- },
- "strip-bom": {
- "version": "1.0.0",
- "from": "strip-bom@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-1.0.0.tgz"
- },
- "through2": {
- "version": "0.6.5",
- "from": "through2@>=0.6.1 <0.7.0",
- "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz"
- },
- "vinyl": {
- "version": "0.4.6",
- "from": "vinyl@>=0.4.0 <0.5.0",
- "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.4.6.tgz"
- }
- }
- },
- "vinyl-sourcemaps-apply": {
- "version": "0.2.1",
- "from": "vinyl-sourcemaps-apply@>=0.2.0 <0.3.0",
- "resolved": "https://registry.npmjs.org/vinyl-sourcemaps-apply/-/vinyl-sourcemaps-apply-0.2.1.tgz"
- },
- "vm-browserify": {
- "version": "0.0.4",
- "from": "vm-browserify@0.0.4",
- "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz"
- },
- "watchpack": {
- "version": "1.1.0",
- "from": "watchpack@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.1.0.tgz",
- "dependencies": {
- "async": {
- "version": "2.0.0-rc.4",
- "from": "async@2.0.0-rc.4",
- "resolved": "https://registry.npmjs.org/async/-/async-2.0.0-rc.4.tgz"
- }
- }
- },
- "webpack": {
- "version": "2.1.0-beta.15",
- "from": "webpack@2.1.0-beta.15",
- "resolved": "https://registry.npmjs.org/webpack/-/webpack-2.1.0-beta.15.tgz",
- "dependencies": {
- "async": {
- "version": "1.5.2",
- "from": "async@>=1.3.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz"
- },
- "supports-color": {
- "version": "3.1.2",
- "from": "supports-color@>=3.1.0 <4.0.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.1.2.tgz"
- }
- }
- },
- "webpack-sources": {
- "version": "0.1.2",
- "from": "webpack-sources@>=0.1.0 <0.2.0",
- "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-0.1.2.tgz"
- },
- "websocket-driver": {
- "version": "0.6.5",
- "from": "websocket-driver@>=0.3.6",
- "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.6.5.tgz"
- },
- "websocket-extensions": {
- "version": "0.1.1",
- "from": "websocket-extensions@>=0.1.1",
- "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.1.tgz"
- },
- "which": {
- "version": "1.2.10",
- "from": "which@>=1.0.5 <2.0.0",
- "resolved": "https://registry.npmjs.org/which/-/which-1.2.10.tgz"
- },
- "window-size": {
- "version": "0.1.0",
- "from": "window-size@0.1.0",
- "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz"
- },
- "wordwrap": {
- "version": "1.0.0",
- "from": "wordwrap@>=1.0.0 <1.1.0",
- "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz"
- },
- "wrap-ansi": {
- "version": "2.0.0",
- "from": "wrap-ansi@>=2.0.0 <3.0.0",
- "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.0.0.tgz"
- },
- "wrappy": {
- "version": "1.0.2",
- "from": "wrappy@>=1.0.0 <2.0.0",
- "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz"
- },
- "write": {
- "version": "0.2.1",
- "from": "write@>=0.2.1 <0.3.0",
- "resolved": "https://registry.npmjs.org/write/-/write-0.2.1.tgz"
- },
- "xregexp": {
- "version": "3.1.1",
- "from": "xregexp@>=3.0.0 <4.0.0",
- "resolved": "https://registry.npmjs.org/xregexp/-/xregexp-3.1.1.tgz"
- },
- "xtend": {
- "version": "4.0.1",
- "from": "xtend@>=4.0.0 <4.1.0",
- "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz"
- },
- "y18n": {
- "version": "3.2.1",
- "from": "y18n@>=3.2.1 <4.0.0",
- "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz"
- },
- "yargs": {
- "version": "4.7.1",
- "from": "yargs@>=4.7.1 <5.0.0",
- "resolved": "https://registry.npmjs.org/yargs/-/yargs-4.7.1.tgz",
- "dependencies": {
- "camelcase": {
- "version": "3.0.0",
- "from": "camelcase@>=3.0.0 <4.0.0",
- "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz"
- },
- "cliui": {
- "version": "3.2.0",
- "from": "cliui@>=3.2.0 <4.0.0",
- "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz"
- },
- "lodash.assign": {
- "version": "4.0.9",
- "from": "lodash.assign@>=4.0.3 <5.0.0",
- "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.0.9.tgz"
- },
- "lodash.keys": {
- "version": "4.0.7",
- "from": "lodash.keys@>=4.0.0 <5.0.0",
- "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-4.0.7.tgz"
- },
- "window-size": {
- "version": "0.2.0",
- "from": "window-size@>=0.2.0 <0.3.0",
- "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.2.0.tgz"
- }
- }
- },
- "yargs-parser": {
- "version": "2.4.0",
- "from": "yargs-parser@>=2.4.0 <3.0.0",
- "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-2.4.0.tgz",
- "dependencies": {
- "camelcase": {
- "version": "2.1.1",
- "from": "camelcase@>=2.1.1 <3.0.0",
- "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz"
- },
- "lodash.assign": {
- "version": "4.0.9",
- "from": "lodash.assign@>=4.0.6 <5.0.0",
- "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.0.9.tgz"
- },
- "lodash.keys": {
- "version": "4.0.7",
- "from": "lodash.keys@>=4.0.0 <5.0.0",
- "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-4.0.7.tgz"
- }
- }
- },
- "yazl": {
- "version": "2.4.1",
- "from": "yazl@>=2.1.0 <3.0.0",
- "resolved": "https://registry.npmjs.org/yazl/-/yazl-2.4.1.tgz"
- }
- }
-}
diff --git a/package.json b/package.json
index 8a2451be8..ae094ff6d 100644
--- a/package.json
+++ b/package.json
@@ -47,46 +47,67 @@
"node": ">= 4"
},
"devDependencies": {
+ "Progress.js": "github:usablica/progress.js",
+ "autolinker": "^0.27.0",
"babel-core": "^6.1.4",
"babel-loader": "^6.1.0",
"babel-plugin-transform-runtime": "^6.9.0",
- "babel-preset-es2015": "*",
- "babel-preset-es2015-loose": "*",
+ "babel-preset-es2015": "^6.9.0",
+ "babel-preset-es2015-loose": "^7.0.0",
"babel-preset-es2015-loose-native-modules": "^1.0.0",
"babel-preset-stage-0": "^6.5.0",
"babel-runtime": "^6.1.18",
"es6-promise-polyfill": "^1.2.0",
"gulp": "~3.9.0",
- "gulp-autoprefixer": "*",
- "gulp-beautify": "*",
+ "gulp-autoprefixer": "^3.1.0",
+ "gulp-beautify": "^2.0.0",
"gulp-cached": "^1.1.0",
"gulp-clean-css": "^2.0.7",
- "gulp-concat-util": "*",
- "gulp-eol": "*",
- "gulp-eslint": "^2.0.0",
- "gulp-header": "*",
- "gulp-if": "~1.2.5",
+ "gulp-concat-util": "^0.5.5",
+ "gulp-eol": "^0.1.2",
+ "gulp-eslint": "^3.0.1",
+ "gulp-header": "^1.8.7",
+ "gulp-if": "^2.0.1",
"gulp-less": "1.3.6",
"gulp-livereload": "~3.8.0",
"gulp-notify": "~2.2.0",
- "gulp-plumber": "*",
- "gulp-rename": "*",
- "gulp-replace": "*",
- "gulp-rimraf": "*",
- "gulp-stripbom": "*",
- "gulp-through": "~0.3.0",
- "gulp-uglify": "*",
- "gulp-util": "*",
- "gulp-zip": "*",
+ "gulp-plumber": "^1.1.0",
+ "gulp-rename": "^1.2.2",
+ "gulp-replace": "^0.5.4",
+ "gulp-rimraf": "^0.2.0",
+ "gulp-stripbom": "^1.0.4",
+ "gulp-through": "^0.4.0",
+ "gulp-uglify": "^1.5.4",
+ "gulp-util": "^3.0.7",
+ "gulp-zip": "^3.2.0",
+ "ifvisible.js": "^1.0.6",
"jassl": "github:rainloop/jassl",
+ "jquery": "^2",
+ "jquery-lazyload": "^1.9.7",
+ "jquery-mousewheel": "^3.1.13",
+ "jquery-scrollstop": "^1.2.0",
+ "jquery.backstretch": "^2.1.13",
+ "js-cookie": "^2.1.2",
"json-loader": "^0.5.4",
- "node-fs": "*",
- "node-notifier": "~4.2.3",
+ "json3": "^3.3.2",
+ "knockout": "^3.4.0",
+ "knockout-projections": "github:stevesanderson/knockout-projections",
+ "knockout-sortable": "^0.14.1",
+ "lightgallery": "^1.2.21",
+ "matchmedia-polyfill": "^0.3.0",
+ "moment": "^2.14.1",
+ "node-fs": "^0.1.7",
+ "node-notifier": "^4.6.0",
"normalize.css": "^4.2.0",
"openpgp": "^2.3.2",
+ "opentip": "^2.4.3",
"pikaday": "^1.4.0",
"raw-loader": "^0.5.1",
- "rimraf": "*",
- "webpack": "^2.1.0-beta.15"
+ "rifraf": "^2.0.2",
+ "rimraf": "^2.5.4",
+ "simplestatemanager": "^3.1.3",
+ "tinycon": "github:tommoor/tinycon",
+ "underscore": "^1.8.3",
+ "webpack": "^2.1.0-beta.20"
}
}
diff --git a/plugins/snowfall-on-login-screen/js/snowfall.js b/plugins/snowfall-on-login-screen/js/snowfall.js
index 7dfcfaed1..a60c80abf 100644
--- a/plugins/snowfall-on-login-screen/js/snowfall.js
+++ b/plugins/snowfall-on-login-screen/js/snowfall.js
@@ -1,275 +1,275 @@
-/* Snowfall pure js
- ====================================================================
- LICENSE
- ====================================================================
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- ====================================================================
-
- 1.0
- Wanted to rewrite my snow plugin to use pure JS so you werent necessarily tied to using a framework.
- Does not include a selector engine or anything, just pass elements to it using standard JS selectors.
-
- Does not clear snow currently. Collection portion removed just for ease of testing will add back in next version
-
- Theres a few ways to call the snow you could do it the following way by directly passing the selector,
-
- snowFall.snow(document.getElementsByTagName("body"), {options});
-
- or you could save the selector results to a variable, and then call it
-
- var elements = document.getElementsByClassName('yourclass');
- snowFall.snow(elements, {options});
-
- Options are all the same as the plugin except clear, and collection
-
- values for snow options are
-
- flakeCount,
- flakeColor,
- flakeIndex,
- minSize,
- maxSize,
- minSpeed,
- maxSpeed,
- round, true or false, makes the snowflakes rounded if the browser supports it.
- shadow true or false, gives the snowflakes a shadow if the browser supports it.
-
-*/
-
-// Paul Irish requestAnimationFrame polyfill
-(function() {
- var lastTime = 0;
- var vendors = ['webkit', 'moz'];
- for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
- window.requestAnimationFrame = window[vendors[x]+'RequestAnimationFrame'];
- window.cancelAnimationFrame =
- window[vendors[x]+'CancelAnimationFrame'] || window[vendors[x]+'CancelRequestAnimationFrame'];
- }
-
- if (!window.requestAnimationFrame)
- window.requestAnimationFrame = function(callback, element) {
- var currTime = new Date().getTime();
- var timeToCall = Math.max(0, 16 - (currTime - lastTime));
- var id = window.setTimeout(function() { callback(currTime + timeToCall); },
- timeToCall);
- lastTime = currTime + timeToCall;
- return id;
- };
-
- if (!window.cancelAnimationFrame)
- window.cancelAnimationFrame = function(id) {
- clearTimeout(id);
- };
-}());
-
-var snowFall = (function(){
- function jSnow(){
- // local methods
- var defaults = {
- flakeCount : 35,
- flakeColor : '#ffffff',
- flakeIndex: 999999,
- minSize : 1,
- maxSize : 2,
- minSpeed : 1,
- maxSpeed : 5,
- round : false,
- shadow : false,
- collection : false,
- image : false,
- collectionHeight : 40
- },
- element = {},
- flakes = [],
- flakeId = 0,
- elHeight = 0,
- elWidth = 0,
- elTop = 0,
- elLeft = 0,
- widthOffset = 0,
- snowTimeout = 0,
- // For extending the default object with properties
- extend = function(obj, extObj){
- for(var i in extObj){
- if(obj.hasOwnProperty(i)){
- obj[i] = extObj[i];
- }
- }
- },
- // random between range
- random = function random(min, max){
- return Math.round(min + Math.random()*(max-min));
- },
- // Set multiple styles at once.
- setStyle = function(element, props)
- {
- for (var property in props){
- element.style[property] = props[property] + ((property == 'width' || property == 'height') ? 'px' : '');
- }
- },
- // snowflake
- flake = function(_x, _y, _size, _speed, _id)
- {
- // Flake properties
- this.id = _id;
- this.x = _x + elLeft;
- this.y = _y + elTop;
- this.size = _size;
- this.speed = _speed;
- this.step = 0;
- this.stepSize = random(1,10) / 100;
-
- if(defaults.collection){
- this.target = canvasCollection[random(0,canvasCollection.length-1)];
- }
-
- var flakeObj = null;
-
- if(defaults.image){
- flakeObj = new Image();
- flakeObj.src = defaults.image;
- }else{
- flakeObj = document.createElement("div");
- setStyle(flakeObj, {'background' : defaults.flakeColor});
- }
-
- flakeObj.className = 'snowfall-flakes';
- flakeObj.setAttribute('id','flake-' + this.id);
- setStyle(flakeObj, {'width' : this.size, 'height' : this.size, 'position' : 'absolute', 'top' : this.y, 'left' : this.x, 'fontSize' : 0, 'zIndex' : defaults.flakeIndex});
-
- // This adds the style to make the snowflakes round via border radius property
- if(defaults.round){
- setStyle(flakeObj,{'-moz-border-radius' : ~~(defaults.maxSize) + 'px', '-webkit-border-radius' : ~~(defaults.maxSize) + 'px', 'borderRadius' : ~~(defaults.maxSize) + 'px'});
- }
-
- // This adds shadows just below the snowflake so they pop a bit on lighter colored web pages
- if(defaults.shadow){
- setStyle(flakeObj,{'-moz-box-shadow' : '1px 1px 1px #555', '-webkit-box-shadow' : '1px 1px 1px #555', 'boxShadow' : '1px 1px 1px #555'});
- }
-
- document.body.appendChild(flakeObj);
-
- this.element = flakeObj;
-
- // Update function, used to update the snow flakes, and checks current snowflake against bounds
- this.update = function(){
- this.y += this.speed;
-
- if(this.y > (elTop + elHeight) - (this.size + 6)){
- this.reset();
- }
-
- this.element.style.top = this.y + 'px';
- this.element.style.left = ~~this.x + 'px';
-
- this.step += this.stepSize;
- this.x += Math.cos(this.step);
-
- if(this.x > (elLeft + elWidth) - widthOffset || this.x < widthOffset){
- this.reset();
- }
- }
-
- // Resets the snowflake once it reaches one of the bounds set
- this.reset = function(){
- this.y = elTop;
- this.x = elLeft + random(widthOffset, elWidth - widthOffset);
- this.stepSize = random(1,10) / 100;
- this.size = random((defaults.minSize * 100), (defaults.maxSize * 100)) / 100;
- this.speed = random(defaults.minSpeed, defaults.maxSpeed);
- }
- },
- // this controls flow of the updating snow
- animateSnow = function(){
- for(var i = 0; i < flakes.length; i += 1){
- flakes[i].update();
- }
- snowTimeout = requestAnimationFrame(function(){animateSnow()});
- }
- return{
- snow : function(_element, _options){
- extend(defaults, _options);
-
- //init the element vars
- element = _element;
- elHeight = element.clientHeight,
- elWidth = element.offsetWidth;
- elTop = element.offsetTop;
- elLeft = element.offsetLeft;
-
- element.snow = this;
-
- // if this is the body the offset is a little different
- if(element.tagName.toLowerCase() === 'body'){
- widthOffset = 25;
- }
-
- // Bind the window resize event so we can get the innerHeight again
- window.onresize = function(){
- elHeight = element.clientHeight;
- elWidth = element.offsetWidth;
- elTop = element.offsetTop;
- elLeft = element.offsetLeft;
- }
-
- // initialize the flakes
- for(i = 0; i < defaults.flakeCount; i+=1){
- flakeId = flakes.length;
- flakes.push(new flake(random(widthOffset,elWidth - widthOffset), random(0, elHeight), random((defaults.minSize * 100), (defaults.maxSize * 100)) / 100, random(defaults.minSpeed, defaults.maxSpeed), flakeId));
- }
- // start the snow
- animateSnow();
- },
- clear : function(){
- var flakeChildren = null;
-
- if(!element.getElementsByClassName){
- flakeChildren = element.querySelectorAll('.snowfall-flakes');
- }else{
- flakeChildren = element.getElementsByClassName('snowfall-flakes');
- }
-
- var flakeChilLen = flakeChildren.length;
- while(flakeChilLen--){
- element.removeChild(flakeChildren[flakeChilLen]);
- }
-
- flakes = [];
- cancelAnimationFrame(snowTimeout);
- }
- }
- };
- return{
- snow : function(elements, options){
- if(typeof(options) == "string"){
- if(elements.length > 0){
- for(var i = 0; i < elements.length; i++){
- if(elements[i].snow){
- elements[i].snow.clear();
- }
- }
- }else{
- elements.snow.clear();
- }
- }else{
- if(elements.length > 0){
- for(var i = 0; i < elements.length; i++){
- new jSnow().snow(elements[i], options);
- }
- }else{
- new jSnow().snow(elements, options);
- }
- }
- }
- }
+/* Snowfall pure js
+ ====================================================================
+ LICENSE
+ ====================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ====================================================================
+
+ 1.0
+ Wanted to rewrite my snow plugin to use pure JS so you werent necessarily tied to using a framework.
+ Does not include a selector engine or anything, just pass elements to it using standard JS selectors.
+
+ Does not clear snow currently. Collection portion removed just for ease of testing will add back in next version
+
+ Theres a few ways to call the snow you could do it the following way by directly passing the selector,
+
+ snowFall.snow(document.getElementsByTagName("body"), {options});
+
+ or you could save the selector results to a variable, and then call it
+
+ var elements = document.getElementsByClassName('yourclass');
+ snowFall.snow(elements, {options});
+
+ Options are all the same as the plugin except clear, and collection
+
+ values for snow options are
+
+ flakeCount,
+ flakeColor,
+ flakeIndex,
+ minSize,
+ maxSize,
+ minSpeed,
+ maxSpeed,
+ round, true or false, makes the snowflakes rounded if the browser supports it.
+ shadow true or false, gives the snowflakes a shadow if the browser supports it.
+
+*/
+
+// Paul Irish requestAnimationFrame polyfill
+(function(window) {
+ var lastTime = 0;
+ var vendors = ['webkit', 'moz'];
+ for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
+ window.requestAnimationFrame = window[vendors[x]+'RequestAnimationFrame'];
+ window.cancelAnimationFrame =
+ window[vendors[x]+'CancelAnimationFrame'] || window[vendors[x]+'CancelRequestAnimationFrame'];
+ }
+
+ if (!window.requestAnimationFrame)
+ window.requestAnimationFrame = function(callback, element) {
+ var currTime = new Date().getTime();
+ var timeToCall = window.Math.max(0, 16 - (currTime - lastTime));
+ var id = window.setTimeout(function() { callback(currTime + timeToCall); },
+ timeToCall);
+ lastTime = currTime + timeToCall;
+ return id;
+ };
+
+ if (!window.cancelAnimationFrame)
+ window.cancelAnimationFrame = function(id) {
+ clearTimeout(id);
+ };
+}(window));
+
+var snowFall = (function(){
+ function jSnow(){
+ // local methods
+ var defaults = {
+ flakeCount : 35,
+ flakeColor : '#ffffff',
+ flakeIndex: 999999,
+ minSize : 1,
+ maxSize : 2,
+ minSpeed : 1,
+ maxSpeed : 5,
+ round : false,
+ shadow : false,
+ collection : false,
+ image : false,
+ collectionHeight : 40
+ },
+ element = {},
+ flakes = [],
+ flakeId = 0,
+ elHeight = 0,
+ elWidth = 0,
+ elTop = 0,
+ elLeft = 0,
+ widthOffset = 0,
+ snowTimeout = 0,
+ // For extending the default object with properties
+ extend = function(obj, extObj){
+ for(var i in extObj){
+ if(obj.hasOwnProperty(i)){
+ obj[i] = extObj[i];
+ }
+ }
+ },
+ // random between range
+ random = function random(min, max){
+ return window.Math.round(min + window.Math.random()*(max-min));
+ },
+ // Set multiple styles at once.
+ setStyle = function(element, props)
+ {
+ for (var property in props){
+ element.style[property] = props[property] + ((property === 'width' || property === 'height') ? 'px' : '');
+ }
+ },
+ // snowflake
+ flake = function(_x, _y, _size, _speed, _id)
+ {
+ // Flake properties
+ this.id = _id;
+ this.x = _x + elLeft;
+ this.y = _y + elTop;
+ this.size = _size;
+ this.speed = _speed;
+ this.step = 0;
+ this.stepSize = random(1,10) / 100;
+
+ if(defaults.collection){
+ this.target = defaults.collection[random(0,defaults.collection.length-1)];
+ }
+
+ var flakeObj = null;
+
+ if(defaults.image){
+ flakeObj = new Image();
+ flakeObj.src = defaults.image;
+ }else{
+ flakeObj = window.document.createElement("div");
+ setStyle(flakeObj, {'background' : defaults.flakeColor});
+ }
+
+ flakeObj.className = 'snowfall-flakes';
+ flakeObj.setAttribute('id','flake-' + this.id);
+ setStyle(flakeObj, {'width' : this.size, 'height' : this.size, 'position' : 'absolute', 'top' : this.y, 'left' : this.x, 'fontSize' : 0, 'zIndex' : defaults.flakeIndex});
+
+ // This adds the style to make the snowflakes round via border radius property
+ if(defaults.round){
+ setStyle(flakeObj,{'-moz-border-radius' : ~~(defaults.maxSize) + 'px', '-webkit-border-radius' : ~~(defaults.maxSize) + 'px', 'borderRadius' : ~~(defaults.maxSize) + 'px'});
+ }
+
+ // This adds shadows just below the snowflake so they pop a bit on lighter colored web pages
+ if(defaults.shadow){
+ setStyle(flakeObj,{'-moz-box-shadow' : '1px 1px 1px #555', '-webkit-box-shadow' : '1px 1px 1px #555', 'boxShadow' : '1px 1px 1px #555'});
+ }
+
+ window.document.body.appendChild(flakeObj);
+
+ this.element = flakeObj;
+
+ // Update function, used to update the snow flakes, and checks current snowflake against bounds
+ this.update = function(){
+ this.y += this.speed;
+
+ if(this.y > (elTop + elHeight) - (this.size + 6)){
+ this.reset();
+ }
+
+ this.element.style.top = this.y + 'px';
+ this.element.style.left = ~~this.x + 'px';
+
+ this.step += this.stepSize;
+ this.x += window.Math.cos(this.step);
+
+ if(this.x > (elLeft + elWidth) - widthOffset || this.x < widthOffset){
+ this.reset();
+ }
+ };
+
+ // Resets the snowflake once it reaches one of the bounds set
+ this.reset = function(){
+ this.y = elTop;
+ this.x = elLeft + random(widthOffset, elWidth - widthOffset);
+ this.stepSize = random(1,10) / 100;
+ this.size = random((defaults.minSize * 100), (defaults.maxSize * 100)) / 100;
+ this.speed = random(defaults.minSpeed, defaults.maxSpeed);
+ };
+ },
+ // this controls flow of the updating snow
+ animateSnow = function(){
+ for(var i = 0; i < flakes.length; i += 1){
+ flakes[i].update();
+ }
+ snowTimeout = requestAnimationFrame(function(){animateSnow();});
+ };
+ return{
+ snow : function(_element, _options){
+ extend(defaults, _options);
+
+ //init the element vars
+ element = _element;
+ elHeight = element.clientHeight,
+ elWidth = element.offsetWidth;
+ elTop = element.offsetTop;
+ elLeft = element.offsetLeft;
+
+ element.snow = this;
+
+ // if this is the body the offset is a little different
+ if(element.tagName.toLowerCase() === 'body'){
+ widthOffset = 25;
+ }
+
+ // Bind the window resize event so we can get the innerHeight again
+ window.onresize = function(){
+ elHeight = element.clientHeight;
+ elWidth = element.offsetWidth;
+ elTop = element.offsetTop;
+ elLeft = element.offsetLeft;
+ };
+
+ // initialize the flakes
+ for(var i = 0; i < defaults.flakeCount; i+=1){
+ flakeId = flakes.length;
+ flakes.push(new flake(random(widthOffset,elWidth - widthOffset), random(0, elHeight), random((defaults.minSize * 100), (defaults.maxSize * 100)) / 100, random(defaults.minSpeed, defaults.maxSpeed), flakeId));
+ }
+ // start the snow
+ animateSnow();
+ },
+ clear : function(){
+ var flakeChildren = null;
+
+ if(!element.getElementsByClassName){
+ flakeChildren = element.querySelectorAll('.snowfall-flakes');
+ }else{
+ flakeChildren = element.getElementsByClassName('snowfall-flakes');
+ }
+
+ var flakeChilLen = flakeChildren.length;
+ while(flakeChilLen--){
+ element.removeChild(flakeChildren[flakeChilLen]);
+ }
+
+ flakes = [];
+ cancelAnimationFrame(snowTimeout);
+ }
+ };
+ };
+ return{
+ snow : function(elements, options){
+ if(typeof(options) === 'string'){
+ if(elements.length > 0){
+ for(var i = 0; i < elements.length; i++){
+ if(elements[i].snow){
+ elements[i].snow.clear();
+ }
+ }
+ }else{
+ elements.snow.clear();
+ }
+ }else{
+ if(elements.length > 0){
+ for(var i = 0; i < elements.length; i++){
+ new jSnow().snow(elements[i], options);
+ }
+ }else{
+ new jSnow().snow(elements, options);
+ }
+ }
+ }
+ };
})();
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/libraries/RainLoop/Actions.php b/rainloop/v/0.0.0/app/libraries/RainLoop/Actions.php
index f48bb8d27..c3f034c4a 100644
--- a/rainloop/v/0.0.0/app/libraries/RainLoop/Actions.php
+++ b/rainloop/v/0.0.0/app/libraries/RainLoop/Actions.php
@@ -1,10252 +1,10207 @@
-aCurrentActionParams = array();
-
- $this->oHttp = null;
- $this->oLogger = null;
- $this->oPlugins = null;
- $this->oMailClient = null;
- $this->oSocial = null;
- $this->oConfig = null;
- $this->aCachers = array();
-
- $this->oStorageProvider = null;
- $this->oLocalStorageProvider = null;
- $this->oSettingsProvider = null;
- $this->oLocalSettingsProvider = null;
- $this->oFilesProvider = null;
- $this->oFiltersProvider = null;
- $this->oDomainProvider = null;
- $this->oAddressBookProvider = null;
- $this->oSuggestionsProvider = null;
- $this->oChangePasswordProvider = null;
- $this->oTwoFactorAuthProvider = null;
- $this->oPremProvider = null;
-
- $this->sSpecAuthToken = '';
-
- $oConfig = $this->Config();
- $this->Plugins()->RunHook('filter.application-config', array(&$oConfig));
-
- $this->Logger()->Ping();
- }
-
- /**
- * @return \RainLoop\Actions
- */
- public static function NewInstance()
- {
- return new self();
- }
-
- /**
- * @param string $sSpecAuthToken
- *
- * @return \RainLoop\Application
- */
- public function SetSpecAuthToken($sSpecAuthToken)
- {
- $this->sSpecAuthToken = $sSpecAuthToken;
-
- return $this;
- }
-
- /**
- * @return string
- */
- public function GetSpecAuthToken()
- {
- return $this->sSpecAuthToken;
- }
-
- /**
- * @return string
- */
- public function GetShortLifeSpecAuthToken($iLife = 60)
- {
- $aAccountHash = \RainLoop\Utils::DecodeKeyValues($this->getLocalAuthToken());
- if (!empty($aAccountHash[0]) && 'token' === $aAccountHash[0] && \is_array($aAccountHash))
- {
- $aAccountHash[10] = \time() + $iLife;
- return \RainLoop\Utils::EncodeKeyValues($aAccountHash);
- }
-
- return '';
- }
-
- /**
- * @return \RainLoop\Application
- */
- public function Config()
- {
- if (null === $this->oConfig)
- {
- $this->oConfig = new \RainLoop\Config\Application();
-
- $bSave = defined('APP_INSTALLED_START');
-
- $bLoaded = $this->oConfig->Load();
- if (!$bLoaded && !$bSave)
- {
- usleep(10000); // TODO
- $bLoaded = $this->oConfig->Load();
- }
-
- if (!$bLoaded && !$this->oConfig->IsFileExists())
- {
- $bSave = true;
- }
-
- if ($bLoaded && !$bSave)
- {
- $bSave = APP_VERSION !== $this->oConfig->Get('version', 'current');
- }
-
- if ($bSave)
- {
- $this->oConfig->Save();
- }
- }
-
- return $this->oConfig;
- }
-
- /**
- * @param string $sName
- * @param \RainLoop\Model\Account $oAccount = null
- *
- * @return mixed
- */
- private function fabrica($sName, $oAccount = null)
- {
- $mResult = null;
- $this->Plugins()
- ->RunHook('main.fabrica', array($sName, &$mResult), false)
- ->RunHook('main.fabrica[2]', array($sName, &$mResult, $oAccount), false)
- ;
-
- if (null === $mResult)
- {
- switch ($sName)
- {
- case 'files':
- // RainLoop\Providers\Files\IFiles
- $mResult = new \RainLoop\Providers\Files\FileStorage(APP_PRIVATE_DATA.'storage/files');
- break;
- case 'storage':
- case 'storage-local':
- // RainLoop\Providers\Storage\IStorage
- $mResult = new \RainLoop\Providers\Storage\FileStorage(
- APP_PRIVATE_DATA.'storage', 'storage-local' === $sName);
- break;
- case 'settings':
- case 'settings-local':
- // RainLoop\Providers\Settings\ISettings
- $mResult = new \RainLoop\Providers\Settings\DefaultSettings(
- $this->StorageProvider('settings-local' === $sName));
- break;
- case 'login':
- // \RainLoop\Providers\Login\LoginInterface
- $mResult = new \RainLoop\Providers\Login\DefaultLogin();
- break;
- case 'domain':
- // \RainLoop\Providers\Domain\DomainAdminInterface
- $mResult = new \RainLoop\Providers\Domain\DefaultDomain(APP_PRIVATE_DATA.'domains', $this->Cacher());
- break;
- case 'filters':
- // \RainLoop\Providers\Filters\FiltersInterface
- $mResult = new \RainLoop\Providers\Filters\SieveStorage(
- $this->Plugins(), $this->Config()
- );
- break;
- case 'address-book':
- // \RainLoop\Providers\AddressBook\AddressBookInterface
-
- $sDsn = \trim($this->Config()->Get('contacts', 'pdo_dsn', ''));
- $sUser = \trim($this->Config()->Get('contacts', 'pdo_user', ''));
- $sPassword = (string) $this->Config()->Get('contacts', 'pdo_password', '');
-
- $sDsnType = $this->ValidateContactPdoType(\trim($this->Config()->Get('contacts', 'type', 'sqlite')));
- if ('sqlite' === $sDsnType)
- {
- $mResult = new \RainLoop\Providers\AddressBook\PdoAddressBook(
- 'sqlite:'.APP_PRIVATE_DATA.'AddressBook.sqlite', '', '', 'sqlite');
- }
- else
- {
- $mResult = new \RainLoop\Providers\AddressBook\PdoAddressBook($sDsn, $sUser, $sPassword, $sDsnType);
- }
- break;
- case 'suggestions':
-
- if (null === $mResult)
- {
- $mResult = array();
- }
-
- if (\is_array($mResult) && \RainLoop\Utils::IsOwnCloud() && $this->Config()->Get('labs', 'owncloud_suggestions', true))
- {
- // \RainLoop\Providers\Suggestions\ISuggestions
- $mResult[] = new \RainLoop\Providers\Suggestions\OwnCloudSuggestions();
- }
-
- break;
- case 'change-password':
- // \RainLoop\Providers\ChangePassword\ChangePasswordInterface
- break;
- case 'two-factor-auth':
- // \RainLoop\Providers\TwoFactorAuth\TwoFactorAuthInterface
- $mResult = new \RainLoop\Providers\TwoFactorAuth\GoogleTwoFactorAuth();
- break;
- }
- }
-
- foreach (\is_array($mResult) ? $mResult : array($mResult) as $oItem)
- {
- if ($oItem && \method_exists($oItem, 'SetLogger'))
- {
- $oItem->SetLogger($this->Logger());
- }
- }
-
- $this->Plugins()->RunHook('filter.fabrica', array($sName, &$mResult, $oAccount), false);
-
- return $mResult;
- }
-
- /**
- * @return void
- */
- public function BootStart()
- {
- if (defined('APP_INSTALLED_START') && defined('APP_INSTALLED_VERSION') &&
- APP_INSTALLED_START && !APP_INSTALLED_VERSION)
- {
- try
- {
- $this->KeenIO('Install');
- }
- catch (\Exception $oException) { unset($oException); }
- }
- }
-
- /**
- * @return void
- */
- public function BootEnd()
- {
- try
- {
- if ($this->MailClient()->IsLoggined())
- {
- $this->MailClient()->LogoutAndDisconnect();
- }
- }
- catch (\Exception $oException) { unset($oException); }
- }
-
- /**
- * @return string
- */
- public function ParseQueryAuthString()
- {
- $sQuery = \trim($this->Http()->GetQueryString());
-
- $iPos = \strpos($sQuery, '&');
- if (0 < $iPos)
- {
- $sQuery = \substr($sQuery, 0, $iPos);
- }
-
- $sQuery = \trim(\trim($sQuery), ' /');
-
- $aSubQuery = $this->Http()->GetQuery('q', null);
- if (\is_array($aSubQuery))
- {
- $aSubQuery = \array_map(function ($sS) {
- return \trim(\trim($sS), ' /');
- }, $aSubQuery);
-
- if (0 < \count($aSubQuery))
- {
- $sQuery .= '/'.\implode('/', $aSubQuery);
- }
- }
-
- if ('' === $this->GetSpecAuthToken())
- {
- $aPaths = \explode('/', $sQuery);
- if (!empty($aPaths[0]) && !empty($aPaths[1]) && '_' === substr($aPaths[1], 0, 1))
- {
- $this->SetSpecAuthToken($aPaths[1]);
- }
- }
-
- return $sQuery;
- }
-
- /**
- * @param string $sLine
- * @param \RainLoop\Model\Account $oAccount = null
- * @param bool $bUrlEncode = false
- * @param array $aAdditionalParams = array()
- *
- * @return string
- */
- private function compileLogParams($sLine, $oAccount = null, $bUrlEncode = false, $aAdditionalParams = array())
- {
- $aClear = array();
-
- if (false !== \strpos($sLine, '{date:'))
- {
- $iTimeOffset = (int) $this->Config()->Get('logs', 'time_offset', 0);
- $sLine = \preg_replace_callback('/\{date:([^}]+)\}/', function ($aMatch) use ($iTimeOffset, $bUrlEncode) {
- return \RainLoop\Utils::UrlEncode(\MailSo\Log\Logger::DateHelper($aMatch[1], $iTimeOffset), $bUrlEncode);
- }, $sLine);
-
- $aClear['/\{date:([^}]*)\}/'] = 'date';
- }
-
- if (false !== \strpos($sLine, '{imap:') || false !== \strpos($sLine, '{smtp:'))
- {
- if (!$oAccount)
- {
- $this->ParseQueryAuthString();
- $oAccount = $this->getAccountFromToken(false);
- }
-
- if ($oAccount)
- {
- $sLine = \str_replace('{imap:login}', \RainLoop\Utils::UrlEncode($oAccount->IncLogin(), $bUrlEncode), $sLine);
- $sLine = \str_replace('{imap:host}', \RainLoop\Utils::UrlEncode($oAccount->DomainIncHost(), $bUrlEncode), $sLine);
- $sLine = \str_replace('{imap:port}', \RainLoop\Utils::UrlEncode($oAccount->DomainIncPort(), $bUrlEncode), $sLine);
-
- $sLine = \str_replace('{smtp:login}', \RainLoop\Utils::UrlEncode($oAccount->OutLogin(), $bUrlEncode), $sLine);
- $sLine = \str_replace('{smtp:host}', \RainLoop\Utils::UrlEncode($oAccount->DomainOutHost(), $bUrlEncode), $sLine);
- $sLine = \str_replace('{smtp:port}', \RainLoop\Utils::UrlEncode($oAccount->DomainOutPort(), $bUrlEncode), $sLine);
- }
-
- $aClear['/\{imap:([^}]*)\}/i'] = 'imap';
- $aClear['/\{smtp:([^}]*)\}/i'] = 'smtp';
- }
-
- if (false !== \strpos($sLine, '{request:'))
- {
- if (false !== \strpos($sLine, '{request:ip}'))
- {
- $sLine = \str_replace('{request:ip}', \RainLoop\Utils::UrlEncode($this->Http()->GetClientIp(
- $this->Config()->Get('labs', 'http_client_ip_check_proxy', false)), $bUrlEncode), $sLine);
- }
-
- if (false !== \strpos($sLine, '{request:domain}'))
- {
- $sLine = \str_replace('{request:domain}',
- \RainLoop\Utils::UrlEncode($this->Http()->GetHost(false, true, true), $bUrlEncode), $sLine);
- }
-
- if (false !== \strpos($sLine, '{request:domain-clear}'))
- {
- $sLine = \str_replace('{request:domain-clear}',
- \RainLoop\Utils::UrlEncode(
- \MailSo\Base\Utils::GetClearDomainName($this->Http()->GetHost(false, true, true)), $bUrlEncode), $sLine);
- }
-
- $aClear['/\{request:([^}]*)\}/i'] = 'request';
- }
-
- if (false !== \strpos($sLine, '{user:'))
- {
- if (false !== \strpos($sLine, '{user:uid}'))
- {
- $sLine = \str_replace('{user:uid}',
- \RainLoop\Utils::UrlEncode(\base_convert(\sprintf('%u',
- \crc32(\md5(\RainLoop\Utils::GetConnectionToken()))), 10, 32), $bUrlEncode),
- $sLine
- );
- }
-
- if (false !== \strpos($sLine, '{user:ip}'))
- {
- $sLine = \str_replace('{user:ip}', \RainLoop\Utils::UrlEncode($this->Http()->GetClientIp(
- $this->Config()->Get('labs', 'http_client_ip_check_proxy', false)), $bUrlEncode), $sLine);
- }
-
- if (\preg_match('/\{user:(email|login|domain)\}/i', $sLine))
- {
- if (!$oAccount)
- {
- $this->ParseQueryAuthString();
- $oAccount = $this->getAccountFromToken(false);
- }
-
- if ($oAccount)
- {
- $sEmail = $oAccount->Email();
-
- $sLine = \str_replace('{user:email}', \RainLoop\Utils::UrlEncode($sEmail, $bUrlEncode), $sLine);
- $sLine = \str_replace('{user:login}', \RainLoop\Utils::UrlEncode(
- \MailSo\Base\Utils::GetAccountNameFromEmail($sEmail), $bUrlEncode), $sLine);
- $sLine = \str_replace('{user:domain}', \RainLoop\Utils::UrlEncode(
- \MailSo\Base\Utils::GetDomainFromEmail($sEmail), $bUrlEncode), $sLine);
- $sLine = \str_replace('{user:domain-clear}', \RainLoop\Utils::UrlEncode(
- \MailSo\Base\Utils::GetClearDomainName(
- \MailSo\Base\Utils::GetDomainFromEmail($sEmail)), $bUrlEncode), $sLine);
- }
- }
-
- $aClear['/\{user:([^}]*)\}/i'] = 'unknown';
- }
-
- if (false !== \strpos($sLine, '{labs:'))
- {
- $sLine = \preg_replace_callback('/\{labs:rand:([1-9])\}/', function ($aMatch) {
- return \rand(\pow(10, $aMatch[1] - 1), \pow(10, $aMatch[1]) - 1);
- }, $sLine);
-
- $aClear['/\{labs:([^}]*)\}/'] = 'labs';
- }
-
- if (\is_array($aAdditionalParams) && 0 < \count($aAdditionalParams))
- {
- foreach ($aAdditionalParams as $sKey => $sValue)
- {
- $sLine = \str_replace($sKey, $sValue, $sLine);
- }
- }
-
- if (0 < \count($aClear))
- {
- foreach ($aClear as $sKey => $sValue)
- {
- $sLine = \preg_replace($sKey, $sValue, $sLine);
- }
- }
-
- return $sLine;
- }
-
- /**
- * @param string $sFileName
- *
- * @return string
- */
- private function compileLogFileName($sFileName)
- {
- $sFileName = \trim($sFileName);
-
- if (0 !== \strlen($sFileName))
- {
- $sFileName = $this->compileLogParams($sFileName);
-
- $sFileName = \preg_replace('/[\/]+/', '/', \preg_replace('/[.]+/', '.', $sFileName));
- $sFileName = \preg_replace('/[^a-zA-Z0-9@_+=\-\.\/!()\[\]]/', '', $sFileName);
- }
-
- if (0 === \strlen($sFileName))
- {
- $sFileName = 'rainloop-log.txt';
- }
-
- return $sFileName;
- }
-
- /**
- * @return void
- */
- public function SetAuthLogoutToken()
- {
- @\header('X-RainLoop-Action: Logout');
- \RainLoop\Utils::SetCookie(self::AUTH_SPEC_LOGOUT_TOKEN_KEY, \md5(APP_START_TIME), 0);
- }
-
- /**
- * @param \RainLoop\Model\Account $oAccount
- *
- * @return void
- */
- public function SetAuthToken($oAccount)
- {
- if ($oAccount)
- {
- $sSpecAuthToken = '_'.$oAccount->GetAuthTokenQ();
-
- $this->SetSpecAuthToken($sSpecAuthToken);
- \RainLoop\Utils::SetCookie(self::AUTH_SPEC_TOKEN_KEY, $sSpecAuthToken, 0);
-
- if ($oAccount->SignMe() && 0 < \strlen($oAccount->SignMeToken()))
- {
- \RainLoop\Utils::SetCookie(self::AUTH_SIGN_ME_TOKEN_KEY,
- \RainLoop\Utils::EncodeKeyValuesQ(array(
- 'e' => $oAccount->Email(),
- 't' => $oAccount->SignMeToken()
- )),
- \time() + 60 * 60 * 24 * 30);
-
- $this->StorageProvider()->Put($oAccount,
- \RainLoop\Providers\Storage\Enumerations\StorageType::CONFIG,
- 'sign_me',
- \RainLoop\Utils::EncodeKeyValuesQ(array(
- 'Time' => \time(),
- 'AuthToken' => $oAccount->GetAuthTokenQ(),
- 'SignMetToken' => $oAccount->SignMeToken()
- ))
- );
- }
- }
- }
-
- /**
- * @return string
- */
- public function GetSpecAuthTokenWithDeletion()
- {
- $sResult = \RainLoop\Utils::GetCookie(self::AUTH_SPEC_TOKEN_KEY, '');
- if (0 < strlen($sResult))
- {
- \RainLoop\Utils::ClearCookie(self::AUTH_SPEC_TOKEN_KEY);
- }
-
- return $sResult;
- }
-
- /**
- * @return string
- */
- public function GetSpecAuthLogoutTokenWithDeletion()
- {
- $sResult = \RainLoop\Utils::GetCookie(self::AUTH_SPEC_LOGOUT_TOKEN_KEY, '');
- if (0 < strlen($sResult))
- {
- \RainLoop\Utils::ClearCookie(self::AUTH_SPEC_LOGOUT_TOKEN_KEY);
- }
-
- return $sResult;
- }
-
- /**
- * @return string
- */
- public function GetSpecLogoutCustomMgsWithDeletion()
- {
- $sResult = \RainLoop\Utils::GetCookie(self::AUTH_SPEC_LOGOUT_CUSTOM_MSG_KEY, '');
- if (0 < strlen($sResult))
- {
- \RainLoop\Utils::ClearCookie(self::AUTH_SPEC_LOGOUT_CUSTOM_MSG_KEY);
- }
-
- return $sResult;
- }
-
- /**
- * @return string
- */
- public function SetSpecLogoutCustomMgsWithDeletion($sMessage)
- {
- \RainLoop\Utils::SetCookie(self::AUTH_SPEC_LOGOUT_CUSTOM_MSG_KEY, $sMessage, 0);
- }
-
- /**
- * @return void
- */
- private function setAdminAuthToken($sToken)
- {
- \RainLoop\Utils::SetCookie(self::AUTH_ADMIN_TOKEN_KEY, $sToken, 0);
- }
-
- /**
- * @return string
- */
- private function getLocalAuthToken()
- {
- $sToken = $this->GetSpecAuthToken();
- return !empty($sToken) && '_' === \substr($sToken, 0, 1) ? \substr($sToken, 1) : '';
- }
-
- /**
- * @return string
- */
- private function getAdminAuthToken()
- {
- return \RainLoop\Utils::GetCookie(self::AUTH_ADMIN_TOKEN_KEY, '');
- }
-
- /**
- * @return void
- */
- public function ClearAdminAuthToken()
- {
- $aAdminHash = \RainLoop\Utils::DecodeKeyValuesQ($this->getAdminAuthToken());
- if (
- !empty($aAdminHash[0]) && !empty($aAdminHash[1]) && !empty($aAdminHash[2]) &&
- 'token' === $aAdminHash[0] && \md5(APP_SALT) === $aAdminHash[1]
- )
- {
- $this->Cacher(null, true)->Delete(\RainLoop\KeyPathHelper::SessionAdminKey($aAdminHash[2]));
- }
-
- \RainLoop\Utils::ClearCookie(self::AUTH_ADMIN_TOKEN_KEY);
- }
-
- /**
- * @param bool $bThrowExceptionOnFalse = false
- *
- * @return \RainLoop\Model\Account|bool
- * @throws \RainLoop\Exceptions\ClientException
- */
- public function GetAccount($bThrowExceptionOnFalse = false)
- {
- return $this->getAccountFromToken($bThrowExceptionOnFalse);
- }
-
- /**
- * @return \MailSo\Base\Http
- */
- public function Http()
- {
- if (null === $this->oHttp)
- {
- $this->oHttp = \MailSo\Base\Http::SingletonInstance();
- }
-
- return $this->oHttp;
- }
-
- /**
- * @return \RainLoop\Social
- */
- public function Social()
- {
- if (null === $this->oSocial)
- {
- $this->oSocial = new \RainLoop\Social($this->Http(), $this);
- }
-
- return $this->oSocial;
- }
-
- /**
- * @return \MailSo\Mail\MailClient
- */
- public function MailClient()
- {
- if (null === $this->oMailClient)
- {
- $this->oMailClient = \MailSo\Mail\MailClient::NewInstance();
- $this->oMailClient->SetLogger($this->Logger());
- }
-
- return $this->oMailClient;
- }
-
- /**
- * @return \RainLoop\Providers\Filters
- */
- public function FiltersProvider()
- {
- if (null === $this->oFiltersProvider)
- {
- $this->oFiltersProvider = new \RainLoop\Providers\Filters(
- $this->fabrica('filters'));
- }
-
- return $this->oFiltersProvider;
- }
-
- /**
- * @return \RainLoop\Providers\ChangePassword
- */
- public function ChangePasswordProvider()
- {
- if (null === $this->oChangePasswordProvider)
- {
- $this->oChangePasswordProvider = new \RainLoop\Providers\ChangePassword(
- $this, $this->fabrica('change-password'), !!$this->Config()->Get('labs', 'check_new_password_strength', true)
- );
- }
-
- return $this->oChangePasswordProvider;
- }
-
- /**
- * @return \RainLoop\Providers\TwoFactorAuth
- */
- public function TwoFactorAuthProvider()
- {
- if (null === $this->oTwoFactorAuthProvider)
- {
- $this->oTwoFactorAuthProvider = new \RainLoop\Providers\TwoFactorAuth(
- $this->Config()->Get('security', 'allow_two_factor_auth', false) ? $this->fabrica('two-factor-auth') : null
- );
- }
-
- return $this->oTwoFactorAuthProvider;
- }
-
- /**
- * @return \RainLoop\Providers\Prem
- */
- public function PremProvider()
- {
- if (null === $this->oPremProvider)
- {
- if (\file_exists(APP_VERSION_ROOT_PATH.'app/libraries/RainLoop/Prem/Provider.php'))
- {
- $this->oPremProvider = new \RainLoop\Prem\Provider(
- $this->Config(), $this->Logger(), $this->Cacher(null, true)
- );
- }
- else
- {
- $this->oPremProvider = false;
- }
- }
-
- return $this->oPremProvider;
- }
-
- /**
- * @param bool $bLocal = false
- *
- * @return \RainLoop\Providers\Storage
- */
- public function StorageProvider($bLocal = false)
- {
- if ($bLocal)
- {
- if (null === $this->oLocalStorageProvider)
- {
- $this->oLocalStorageProvider = new \RainLoop\Providers\Storage(
- $this->fabrica('storage-local'));
- }
-
- return $this->oLocalStorageProvider;
- }
- else
- {
- if (null === $this->oStorageProvider)
- {
- $this->oStorageProvider = new \RainLoop\Providers\Storage(
- $this->fabrica('storage'));
- }
-
- return $this->oStorageProvider;
- }
-
- return null;
- }
-
- /**
- * @return \RainLoop\Providers\Settings
- */
- public function SettingsProvider($bLocal = false)
- {
- if ($bLocal)
- {
- if (null === $this->oLocalSettingsProvider)
- {
- $this->oLocalSettingsProvider = new \RainLoop\Providers\Settings(
- $this->fabrica('settings-local'));
- }
-
- return $this->oLocalSettingsProvider;
- }
- else
- {
- if (null === $this->oSettingsProvider)
- {
- $this->oSettingsProvider = new \RainLoop\Providers\Settings(
- $this->fabrica('settings'));
- }
-
- return $this->oSettingsProvider;
- }
-
- return null;
- }
-
- /**
- * @return \RainLoop\Providers\Files
- */
- public function FilesProvider()
- {
- if (null === $this->oFilesProvider)
- {
- $this->oFilesProvider = new \RainLoop\Providers\Files(
- $this->fabrica('files'));
- }
-
- return $this->oFilesProvider;
- }
-
- /**
- * @return \RainLoop\Providers\Domain
- */
- public function DomainProvider()
- {
- if (null === $this->oDomainProvider)
- {
- $this->oDomainProvider = new \RainLoop\Providers\Domain(
- $this->fabrica('domain'), $this->Plugins());
- }
-
- return $this->oDomainProvider;
- }
-
- /**
- * @return \RainLoop\Providers\Suggestions
- */
- public function SuggestionsProvider()
- {
- if (null === $this->oSuggestionsProvider)
- {
- $this->oSuggestionsProvider = new \RainLoop\Providers\Suggestions(
- $this->fabrica('suggestions'));
- }
-
- return $this->oSuggestionsProvider;
- }
-
- /**
- * @param \RainLoop\Model\Account $oAccount = null
- * @param bool $bForceEnable = false
- *
- * @return \RainLoop\Providers\AddressBook
- */
- public function AddressBookProvider($oAccount = null, $bForceEnable = false)
- {
- if (null === $this->oAddressBookProvider)
- {
- $oDriver = null;
- if ($this->GetCapa(false, false, \RainLoop\Enumerations\Capa::CONTACTS, $oAccount))
- {
- if ($this->Config()->Get('contacts', 'enable', false) || $bForceEnable)
- {
- $oDriver = $this->fabrica('address-book', $oAccount);
- }
- }
-
- $this->oAddressBookProvider = new \RainLoop\Providers\AddressBook($oDriver);
- $this->oAddressBookProvider->SetLogger($this->Logger());
- }
-
- return $this->oAddressBookProvider;
- }
-
- /**
- * @param \RainLoop\Model\Account $oAccount = null
- * @param bool $bForceFile = false
- *
- * @return \MailSo\Cache\CacheClient
- */
- public function Cacher($oAccount = null, $bForceFile = false)
- {
- $sKey = '';
- if ($oAccount)
- {
- $sKey = $oAccount->ParentEmailHelper();
- }
-
- $sIndexKey = empty($sKey) ? '_default_' : $sKey;
- if ($bForceFile)
- {
- $sIndexKey .= '/_files_';
- }
-
- if (!isset($this->aCachers[$sIndexKey]))
- {
- $this->aCachers[$sIndexKey] = \MailSo\Cache\CacheClient::NewInstance();
-
- $oDriver = null;
- $sDriver = \strtoupper(\trim($this->Config()->Get('cache', 'fast_cache_driver', 'files')));
-
- switch (true)
- {
- default:
- case $bForceFile:
- $oDriver = \MailSo\Cache\Drivers\File::NewInstance(APP_PRIVATE_DATA.'cache', $sKey);
- break;
-
- case ('APC' === $sDriver || 'APCU' === $sDriver) &&
- \MailSo\Base\Utils::FunctionExistsAndEnabled(array(
- 'apc_store', 'apc_fetch', 'apc_delete', 'apc_clear_cache')):
-
- $oDriver = \MailSo\Cache\Drivers\APC::NewInstance($sKey);
- break;
-
- case ('MEMCACHE' === $sDriver || 'MEMCACHED' === $sDriver) &&
- \MailSo\Base\Utils::FunctionExistsAndEnabled('memcache_connect'):
-
- $oDriver = \MailSo\Cache\Drivers\Memcache::NewInstance(
- $this->Config()->Get('labs', 'fast_cache_memcache_host', '127.0.0.1'),
- (int) $this->Config()->Get('labs', 'fast_cache_memcache_port', 11211),
- 43200,
- $sKey
- );
- break;
-
- case 'REDIS' === $sDriver && \class_exists('Predis\Client'):
- $oDriver = \MailSo\Cache\Drivers\Redis::NewInstance(
- $this->Config()->Get('labs', 'fast_cache_redis_host', '127.0.0.1'),
- (int) $this->Config()->Get('labs', 'fast_cache_redis_port', 6379),
- 43200,
- $sKey
- );
- break;
- }
-
- if ($oDriver)
- {
- $this->aCachers[$sIndexKey]->SetDriver($oDriver);
- }
-
- $this->aCachers[$sIndexKey]->SetCacheIndex($this->Config()->Get('cache', 'fast_cache_index', ''));
- }
-
- return $this->aCachers[$sIndexKey];
- }
-
- /**
- * @return \RainLoop\Plugins\Manager
- */
- public function Plugins()
- {
- if (null === $this->oPlugins)
- {
- $this->oPlugins = new \RainLoop\Plugins\Manager($this);
- $this->oPlugins->SetLogger($this->Logger());
- }
-
- return $this->oPlugins;
- }
-
- /**
- * @return \MailSo\Log\Logger
- */
- public function Logger()
- {
- if (null === $this->oLogger)
- {
- $this->oLogger = \MailSo\Log\Logger::SingletonInstance();
-
- if (!!$this->Config()->Get('logs', 'enable', false))
- {
- $sSessionFilter = (string) $this->Config()->Get('logs', 'session_filter', '');
- if (!empty($sSessionFilter))
- {
- $aSessionParts = \explode(':', $sSessionFilter, 2);
-
- if (empty($aSessionParts[0]) || empty($aSessionParts[1]) ||
- (string) $aSessionParts[1] !== (string) \RainLoop\Utils::GetCookie($aSessionParts[0], ''))
- {
- return $this->oLogger;
- }
- }
-
- $iTimeOffset = (int) $this->Config()->Get('logs', 'time_offset', 0);
-
- $this->oLogger->SetShowSecter(!$this->Config()->Get('logs', 'hide_passwords', true));
-
- $sLogFileName = $this->Config()->Get('logs', 'filename', '');
-
- $oDriver = null;
- if ('syslog' === $sLogFileName)
- {
- $oDriver = \MailSo\Log\Drivers\Syslog::NewInstance();
- }
- else
- {
- $sLogFileFullPath = \APP_PRIVATE_DATA.'logs/'.$this->compileLogFileName($sLogFileName);
- $sLogFileDir = \dirname($sLogFileFullPath);
-
- if (!@is_dir($sLogFileDir))
- {
- @mkdir($sLogFileDir, 0755, true);
- }
-
- $oDriver = \MailSo\Log\Drivers\File::NewInstance($sLogFileFullPath);
- }
-
- $this->oLogger->Add($oDriver
- ->WriteOnErrorOnly($this->Config()->Get('logs', 'write_on_error_only', false))
- ->WriteOnPhpErrorOnly($this->Config()->Get('logs', 'write_on_php_error_only', false))
- ->WriteOnTimeoutOnly($this->Config()->Get('logs', 'write_on_timeout_only', 0))
- ->SetTimeOffset($iTimeOffset)
- );
-
- if (!$this->Config()->Get('debug', 'enable', false))
- {
- $this->oLogger->AddForbiddenType(\MailSo\Log\Enumerations\Type::TIME);
- }
-
- $this->oLogger->WriteEmptyLine();
-
- $oHttp = $this->Http();
-
- $this->oLogger->Write('[DATE:'.\MailSo\Log\Logger::DateHelper('d.m.y', $iTimeOffset).
- (0 !== $iTimeOffset ? '][OFFSET:'.(0 < $iTimeOffset ? '+' : '-').
- \str_pad((string) \abs($iTimeOffset), 2, '0', STR_PAD_LEFT) : '').
- '][RL:'.APP_VERSION.'][PHP:'.PHP_VERSION.'][IP:'.
- $oHttp->GetClientIp($this->Config()->Get('labs', 'http_client_ip_check_proxy', false)).'][PID:'.
- (\MailSo\Base\Utils::FunctionExistsAndEnabled('getmypid') ? \getmypid() : 'unknown').']['.
- $oHttp->GetServer('SERVER_SOFTWARE', '~').']['.
- (\MailSo\Base\Utils::FunctionExistsAndEnabled('php_sapi_name') ? \php_sapi_name() : '~' ).']'
- );
-
- $sPdo = (\class_exists('PDO') ? \implode(',', \PDO::getAvailableDrivers()) : 'off');
- $sPdo = empty($sPdo) ? '~' : $sPdo;
-
- $this->oLogger->Write('['.
- 'Suhosin:'.(\extension_loaded('suhosin') || @\ini_get('suhosin.get.max_value_length') ? 'on' : 'off').
- '][APC:'.(\MailSo\Base\Utils::FunctionExistsAndEnabled('apc_fetch') ? 'on' : 'off').
- '][MB:'.(\MailSo\Base\Utils::FunctionExistsAndEnabled('mb_convert_encoding') ? 'on' : 'off').
- '][PDO:'.$sPdo.
- (\RainLoop\Utils::IsOwnCloud() ? '][ownCloud:true' : '').
- '][Streams:'.\implode(',', \stream_get_transports()).
- ']');
-
- $this->oLogger->Write(
- '['.$oHttp->GetMethod().'] '.$oHttp->GetScheme().'://'.$oHttp->GetHost(false, false).$oHttp->GetServer('REQUEST_URI', ''),
- \MailSo\Log\Enumerations\Type::NOTE, 'REQUEST');
- }
- }
-
- return $this->oLogger;
- }
-
- /**
- * @return \MailSo\Log\Logger
- */
- public function LoggerAuth()
- {
- if (null === $this->oLoggerAuth)
- {
- $this->oLoggerAuth = \MailSo\Log\Logger::NewInstance(false);
-
- if (!!$this->Config()->Get('logs', 'auth_logging', false))
- {
- $sAuthLogFileFullPath = \APP_PRIVATE_DATA.'logs/'.$this->compileLogFileName(
- $this->Config()->Get('logs', 'auth_logging_filename', ''));
-
- $sLogFileDir = \dirname($sAuthLogFileFullPath);
-
- if (!@is_dir($sLogFileDir))
- {
- @mkdir($sLogFileDir, 0755, true);
- }
-
- $this->oLoggerAuth->AddForbiddenType(\MailSo\Log\Enumerations\Type::MEMORY);
- $this->oLoggerAuth->AddForbiddenType(\MailSo\Log\Enumerations\Type::TIME);
- $this->oLoggerAuth->AddForbiddenType(\MailSo\Log\Enumerations\Type::TIME_DELTA);
-
- $oDriver = \MailSo\Log\Drivers\File::NewInstance($sAuthLogFileFullPath);
-
- $oDriver->DisableTimePrefix();
- $oDriver->DisableGuidPrefix();
- $oDriver->DisableTypedPrefix();
-
- $this->oLoggerAuth->Add($oDriver);
- }
- }
-
- return $this->oLoggerAuth;
- }
-
- /**
- * @param \RainLoop\Model\Account $oAccount = null
- * @param array $aAdditionalParams = array()
- */
- public function LoggerAuthHelper($oAccount = null, $aAdditionalParams = array())
- {
- $sLine = $this->Config()->Get('logs', 'auth_logging_format', '');
- if (!empty($sLine))
- {
- $this->LoggerAuth()->Write($this->compileLogParams($sLine, $oAccount, false, $aAdditionalParams));
- }
- }
-
- /**
- * @return string
- */
- private function getAdminToken()
- {
- $sRand = \MailSo\Base\Utils::Md5Rand();
- if (!$this->Cacher(null, true)->Set(\RainLoop\KeyPathHelper::SessionAdminKey($sRand), \time()))
- {
- $this->oLogger->Write('Cannot store an admin token',
- \MailSo\Log\Enumerations\Type::WARNING);
-
- $sRand = '';
- }
-
- return '' === $sRand ? '' : \RainLoop\Utils::EncodeKeyValuesQ(array('token', \md5(APP_SALT), $sRand));
- }
-
- /**
- * @param bool $bThrowExceptionOnFalse = true
- *
- * @return bool
- */
- public function IsAdminLoggined($bThrowExceptionOnFalse = true)
- {
- $bResult = false;
- if ($this->Config()->Get('security', 'allow_admin_panel', true))
- {
- $aAdminHash = \RainLoop\Utils::DecodeKeyValuesQ($this->getAdminAuthToken());
- if (!empty($aAdminHash[0]) && !empty($aAdminHash[1]) && !empty($aAdminHash[2]) &&
- 'token' === $aAdminHash[0] && \md5(APP_SALT) === $aAdminHash[1] &&
- '' !== $this->Cacher(null, true)->Get(\RainLoop\KeyPathHelper::SessionAdminKey($aAdminHash[2]), '')
- )
- {
- $bResult = true;
- }
- }
-
- if (!$bResult && $bThrowExceptionOnFalse)
- {
- throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::AuthError);
- }
-
- return $bResult;
- }
-
- /**
- * @param string $sTo
- */
- public function SetMailtoRequest($sTo)
- {
- if (!empty($sTo))
- {
- \RainLoop\Utils::SetCookie(self::AUTH_MAILTO_TOKEN_KEY,
- \RainLoop\Utils::EncodeKeyValuesQ(array(
- 'Time' => \microtime(true),
- 'MailTo' => 'MailTo',
- 'To' => $sTo
- )), 0);
- }
- }
-
- /**
- * @param string $sEmail
- * @param string $sLogin
- * @param string $sPassword
- * @param string $sSignMeToken = ''
- * @param bool $bThrowProvideException = false
- *
- * @return \RainLoop\Model\Account|null
- */
- public function LoginProvide($sEmail, $sLogin, $sPassword, $sSignMeToken = '', $bThrowProvideException = false)
- {
- $oAccount = null;
- if (0 < \strlen($sEmail) && 0 < \strlen($sLogin) && 0 < \strlen($sPassword))
- {
- $oDomain = $this->DomainProvider()->Load(\MailSo\Base\Utils::GetDomainFromEmail($sEmail), true);
- if ($oDomain instanceof \RainLoop\Model\Domain)
- {
- if ($oDomain->ValidateWhiteList($sEmail, $sLogin))
- {
- $oAccount = \RainLoop\Model\Account::NewInstance($sEmail, $sLogin, $sPassword, $oDomain, $sSignMeToken);
- $this->Plugins()->RunHook('filter.acount', array(&$oAccount));
-
- if ($bThrowProvideException && !($oAccount instanceof \RainLoop\Model\Account))
- {
- throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::AuthError);
- }
- }
- else if ($bThrowProvideException)
- {
- throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::AccountNotAllowed);
- }
- }
- else if ($bThrowProvideException)
- {
- throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::DomainNotAllowed);
- }
- }
-
- return $oAccount;
- }
-
- /**
- * @param string $sToken
- * @param bool $bThrowExceptionOnFalse = true
- * @param bool $bValidateShortToken = true
- * @param bool $bQ = false
- *
- * @return \RainLoop\Model\Account|bool
- * @throws \RainLoop\Exceptions\ClientException
- */
- public function GetAccountFromCustomToken($sToken, $bThrowExceptionOnFalse = true, $bValidateShortToken = true, $bQ = false)
- {
- $oResult = false;
- if (!empty($sToken))
- {
- $aAccountHash = $bQ ? \RainLoop\Utils::DecodeKeyValuesQ($sToken) : \RainLoop\Utils::DecodeKeyValues($sToken);
- if (!empty($aAccountHash[0]) && 'token' === $aAccountHash[0] && // simple token validation
- 8 <= \count($aAccountHash) && // length checking
- !empty($aAccountHash[7]) && // does short token exist
- (!$bValidateShortToken || \RainLoop\Utils::GetShortToken() === $aAccountHash[7] || // check short token if needed
- (isset($aAccountHash[10]) && 0 < $aAccountHash[10] && \time() < $aAccountHash[10]))
- )
- {
- $oAccount = $this->LoginProvide($aAccountHash[1], $aAccountHash[2], $aAccountHash[3],
- empty($aAccountHash[5]) ? '' : $aAccountHash[5], $bThrowExceptionOnFalse);
-
- if ($oAccount instanceof \RainLoop\Model\Account)
- {
- if (!empty($aAccountHash[8]) && !empty($aAccountHash[9])) // init proxy user/password
- {
- $oAccount->SetProxyAuthUser($aAccountHash[8]);
- $oAccount->SetProxyAuthPassword($aAccountHash[9]);
- }
-
- $this->Logger()->AddSecret($oAccount->Password());
- $this->Logger()->AddSecret($oAccount->ProxyAuthPassword());
-
- $oAccount->SetParentEmail($aAccountHash[6]);
- $oResult = $oAccount;
- }
- }
- else if ($bThrowExceptionOnFalse)
- {
- throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::AuthError);
- }
- }
-
- if ($bThrowExceptionOnFalse && !($oResult instanceof \RainLoop\Model\Account))
- {
- throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::AuthError);
- }
-
- return $oResult;
- }
-
- /**
- * @return \RainLoop\Model\Account|bool
- */
- public function GetAccountFromSignMeToken()
- {
- $oAccount = false;
-
- $sSignMeToken = \RainLoop\Utils::GetCookie(\RainLoop\Actions::AUTH_SIGN_ME_TOKEN_KEY, '');
- if (!empty($sSignMeToken))
- {
- $aTokenData = \RainLoop\Utils::DecodeKeyValuesQ($sSignMeToken);
- if (\is_array($aTokenData) && !empty($aTokenData['e']) && !empty($aTokenData['t']))
- {
- $sTokenSettings = $this->StorageProvider()->Get($aTokenData['e'],
- \RainLoop\Providers\Storage\Enumerations\StorageType::CONFIG,
- 'sign_me'
- );
-
- if (!empty($sTokenSettings))
- {
- $aSignMeData = \RainLoop\Utils::DecodeKeyValuesQ($sTokenSettings);
- if (\is_array($aSignMeData) &&
- !empty($aSignMeData['AuthToken']) &&
- !empty($aSignMeData['SignMetToken']) &&
- $aSignMeData['SignMetToken'] === $aTokenData['t'])
- {
- $oAccount = $this->GetAccountFromCustomToken($aSignMeData['AuthToken'], false, false, true);
- }
- }
- }
- }
- else
- {
- \RainLoop\Utils::ClearCookie(\RainLoop\Actions::AUTH_SIGN_ME_TOKEN_KEY);
- }
-
- return $oAccount;
- }
-
- /**
- * @param bool $bThrowExceptionOnFalse = true
- *
- * @return \RainLoop\Model\Account|bool
- * @throws \RainLoop\Exceptions\ClientException
- */
- public function getAccountFromToken($bThrowExceptionOnFalse = true)
- {
- return $this->GetAccountFromCustomToken($this->getLocalAuthToken(), $bThrowExceptionOnFalse, true, true);
- }
-
- /**
- * @return bool
- */
- public function IsOpen()
- {
- return !$this->PremProvider();
- }
-
- /**
- * @param bool $bAdmin = false
- * @param bool $bMobile = false
- * @param bool $bMobileDevice = false
- *
- * @return array
- */
- public function AppDataSystem($bAdmin = false, $bMobile = false, $bMobileDevice = false)
- {
- $oConfig = $this->Config();
-
- $sRsaPublicKey = '';
- if ($oConfig->Get('security', 'use_rsa_encryption', false) &&
- \file_exists(APP_PRIVATE_DATA.'rsa/public') && \file_exists(APP_PRIVATE_DATA.'rsa/private'))
- {
- $sRsaPublicKey = @\file_get_contents(APP_PRIVATE_DATA.'rsa/public') || '';
- if (false === \strpos($sRsaPublicKey, 'PUBLIC KEY'))
- {
- $sRsaPublicKey = '';
- }
- }
-
- $aAttachmentsActions = array();
- if ($this->GetCapa(false, $bMobile, \RainLoop\Enumerations\Capa::ATTACHMENTS_ACTIONS))
- {
- if (!!\class_exists('ZipArchive'))
- {
- $aAttachmentsActions[] = 'zip';
- }
-
- if (\RainLoop\Utils::IsOwnCloudLoggedIn() && \class_exists('OCP\Files'))
- {
- $aAttachmentsActions[] = 'owncloud';
- }
-
- if ($oConfig->Get('social', 'dropbox_enable', false) && 0 < \strlen(\trim($oConfig->Get('social', 'dropbox_api_key', ''))))
- {
- $aAttachmentsActions[] = 'dropbox';
- }
- }
-
- return \array_merge(array(
- 'version' => APP_VERSION,
- 'mobile' => $bMobile,
- 'mobileDevice' => $bMobileDevice,
- 'webPath' => \RainLoop\Utils::WebPath(),
- 'webVersionPath' => \RainLoop\Utils::WebVersionPath(),
- 'token' => $oConfig->Get('security', 'csrf_protection', false) ? \RainLoop\Utils::GetCsrfToken() : '',
- 'inIframe' => (bool) $oConfig->Get('labs', 'in_iframe', false),
- 'allowHtmlEditorSourceButton' => (bool) $oConfig->Get('labs', 'allow_html_editor_source_button', false),
- 'allowHtmlEditorBitiButtons' => (bool) $oConfig->Get('labs', 'allow_html_editor_biti_buttons', false),
- 'allowCtrlEnterOnCompose' => (bool) $oConfig->Get('labs', 'allow_ctrl_enter_on_compose', false),
- 'customLoginLink' => $oConfig->Get('labs', 'custom_login_link', ''),
- 'customLogoutLink' => $oConfig->Get('labs', 'custom_logout_link', ''),
- 'forgotPasswordLinkUrl' => \trim($oConfig->Get('login', 'forgot_password_link_url', '')),
- 'registrationLinkUrl' => \trim($oConfig->Get('login', 'registration_link_url', '')),
- 'jsHash' => \md5(\RainLoop\Utils::GetConnectionToken()),
- 'useImapThread' => (bool) $oConfig->Get('labs', 'use_imap_thread', false),
- 'useImapSubscribe' => (bool) $oConfig->Get('labs', 'use_imap_list_subscribe', true),
- 'allowAppendMessage' => (bool) $oConfig->Get('labs', 'allow_message_append', false),
- 'materialDesign' => (bool) $oConfig->Get('labs', 'use_material_design', true),
- 'folderSpecLimit' => (int) $oConfig->Get('labs', 'folders_spec_limit', 50),
- 'faviconStatus' => (bool) $oConfig->Get('labs', 'favicon_status', true),
- 'useNativeScrollbars' => (bool) $oConfig->Get('interface', 'use_native_scrollbars', false),
- 'listPermanentFiltered' => '' !== \trim(\RainLoop\Api::Config()->Get('labs', 'imap_message_list_permanent_filter', '')),
- 'themes' => $this->GetThemes($bMobile, false),
- 'languages' => $this->GetLanguages(false),
- 'languagesAdmin' => $this->GetLanguages(true),
- 'attachmentsActions' => $aAttachmentsActions,
- 'rsaPublicKey' => $sRsaPublicKey,
- 'openpgpPublicKeyServer' => $oConfig->Get('security', 'openpgp_public_key_server', '')
- ), $bAdmin ? array(
- 'adminHostUse' => '' !== $oConfig->Get('security', 'admin_panel_host', ''),
- 'adminPath' => \strtolower($oConfig->Get('security', 'admin_panel_key', 'admin')),
- 'allowAdminPanel' => (bool) $oConfig->Get('security', 'allow_admin_panel', true),
- ) : array());
- }
-
- /**
- * @param bool $bAdmin
- * @param bool $bMobile = false
- * @param string $sAuthAccountHash = ''
- *
- * @return array
- */
- public function AppData($bAdmin, $bMobile = false, $bMobileDevice = false, $sAuthAccountHash = '')
- {
- if (0 < \strlen($sAuthAccountHash) && \preg_match('/[^_\-\.a-zA-Z0-9]/', $sAuthAccountHash))
- {
- $sAuthAccountHash = '';
- }
-
- $oAccount = null;
- $oConfig = $this->Config();
-
-/*
-required by Index.html and rl.js:
-NewThemeLink IncludeCss LoadingDescriptionEsc TemplatesLink LangLink IncludeBackground PluginsLink AuthAccountHash
-*/
-
- $aResult = array(
- 'Auth' => false,
- 'AccountHash' => '',
- 'AccountSignMe' => false,
- 'AuthAccountHash' => '',
- 'MailToEmail' => '',
- 'Email' => '',
- 'DevEmail' => '',
- 'DevPassword' => '',
- 'Title' => $oConfig->Get('webmail', 'title', 'RainLoop Webmail'),
- 'LoadingDescription' => $oConfig->Get('webmail', 'loading_description', 'RainLoop'),
- 'LoadingDescriptionEsc' => 'RainLoop',
- 'FaviconUrl' => $oConfig->Get('webmail', 'favicon_url', ''),
- 'LoginDescription' => '',
- 'LoginPowered' => true,
- 'LoginLogo' => '',
- 'LoginBackground' => '',
- 'LoginCss' => '',
- 'UserLogo' => '',
- 'UserLogoTitle' => '',
- 'UserLogoMessage' => '',
- 'UserCss' => '',
- 'WelcomePageUrl' => '',
- 'WelcomePageDisplay' => 'none',
- 'IncludeCss' => '',
- 'IncludeBackground' => '',
- 'LoginDefaultDomain' => $oConfig->Get('login', 'default_domain', ''),
- 'DetermineUserLanguage' => (bool) $oConfig->Get('login', 'determine_user_language', true),
- 'DetermineUserDomain' => (bool) $oConfig->Get('login', 'determine_user_domain', false),
- 'UseLoginWelcomePage' => (bool) $oConfig->Get('login', 'welcome_page', false),
- 'StartupUrl' => \trim(\ltrim(\trim($oConfig->Get('labs', 'startup_url', '')), '#/')),
- 'ContactsIsAllowed' => false,
- 'ChangePasswordIsAllowed' => false,
- 'RequireTwoFactor' => false,
- 'Community' => true,
- 'PremType' => false,
- 'Admin' => array(),
- 'Capa' => array(),
- 'Plugins' => array(),
- 'System' => $this->AppDataSystem($bAdmin, $bMobile, $bMobileDevice)
- );
-
- if (0 < \strlen($sAuthAccountHash))
- {
- $aResult['AuthAccountHash'] = $sAuthAccountHash;
- }
-
- $oPremProvider = $this->PremProvider();
- if ($oPremProvider)
- {
- $oPremProvider->PopulateAppData($aResult);
- }
-
- if ('' !== $aResult['LoadingDescription'] && 'RainLoop' !== $aResult['LoadingDescription'])
- {
- $aResult['LoadingDescriptionEsc'] = @\htmlspecialchars($aResult['LoadingDescription'], ENT_QUOTES|ENT_IGNORE, 'UTF-8');
- }
-
- $oSettings = null;
-
- if (!$bAdmin)
- {
- $oAccount = $this->getAccountFromToken(false);
- if ($oAccount instanceof \RainLoop\Model\Account)
- {
- $aResult['IncludeCss'] = $aResult['UserCss'];
-
- $oAddressBookProvider = $this->AddressBookProvider($oAccount);
-
- $aResult['Auth'] = true;
- $aResult['Email'] = $oAccount->Email();
- $aResult['IncLogin'] = $oAccount->IncLogin();
- $aResult['OutLogin'] = $oAccount->OutLogin();
- $aResult['AccountHash'] = $oAccount->Hash();
- $aResult['AccountSignMe'] = $oAccount->SignMe();
- $aResult['ChangePasswordIsAllowed'] = $this->ChangePasswordProvider()->PasswordChangePossibility($oAccount);
- $aResult['ContactsIsAllowed'] = $oAddressBookProvider->IsActive();
- $aResult['ContactsSharingIsAllowed'] = $oAddressBookProvider->IsSharingAllowed();
- $aResult['ContactsSyncIsAllowed'] = (bool) $oConfig->Get('contacts', 'allow_sync', false);
- $aResult['ContactsSyncInterval'] = (int) $oConfig->Get('contacts', 'sync_interval', 20);
-
- $aResult['EnableContactsSync'] = false;
- $aResult['ContactsSyncUrl'] = '';
- $aResult['ContactsSyncUser'] = '';
- $aResult['ContactsSyncPassword'] = '';
-
- if ($aResult['ContactsIsAllowed'] && $aResult['ContactsSyncIsAllowed'])
- {
- $mData = $this->getContactsSyncData($oAccount);
- if (\is_array($mData))
- {
- $aResult['EnableContactsSync'] = isset($mData['Enable']) ? !!$mData['Enable'] : false;
- $aResult['ContactsSyncUrl'] = isset($mData['Url']) ? \trim($mData['Url']) : '';
- $aResult['ContactsSyncUser'] = isset($mData['User']) ? \trim($mData['User']) : '';
- $aResult['ContactsSyncPassword'] = APP_DUMMY;
- }
- }
-
- if ($aResult['AccountSignMe'])
- {
- $sToken = \RainLoop\Utils::GetCookie(self::AUTH_MAILTO_TOKEN_KEY, null);
- if (null !== $sToken)
- {
- \RainLoop\Utils::ClearCookie(self::AUTH_MAILTO_TOKEN_KEY);
-
- $mMailToData = \RainLoop\Utils::DecodeKeyValuesQ($sToken);
- if (\is_array($mMailToData) && !empty($mMailToData['MailTo']) &&
- 'MailTo' === $mMailToData['MailTo'] && !empty($mMailToData['To']))
- {
- $aResult['MailToEmail'] = $mMailToData['To'];
- }
- }
- }
-
- $oSettings = $this->SettingsProvider()->Load($oAccount);
-
- if (!$oAccount->IsAdditionalAccount() && !empty($aResult['WelcomePageUrl']) &&
- ('once' === $aResult['WelcomePageDisplay'] || 'always' === $aResult['WelcomePageDisplay']))
- {
- if ('once' === $aResult['WelcomePageDisplay'])
- {
- if ($aResult['WelcomePageUrl'] === $oSettings->GetConf('LastWelcomePage', ''))
- {
- $aResult['WelcomePageUrl'] = '';
- $aResult['WelcomePageDisplay'] = '';
- }
- }
- }
- else
- {
- $aResult['WelcomePageUrl'] = '';
- $aResult['WelcomePageDisplay'] = '';
- }
-
- if (!empty($aResult['StartupUrl']))
- {
- $aResult['StartupUrl'] = $this->compileLogParams($aResult['StartupUrl'], $oAccount, true);
- }
-
- if (!empty($aResult['UserIframeMessage']))
- {
- $aResult['UserIframeMessage'] = $this->compileLogParams($aResult['UserIframeMessage'], $oAccount, true);
- }
- }
- else
- {
- $oAccount = null;
-
- $aResult['IncludeBackground'] = $aResult['LoginBackground'];
- $aResult['IncludeCss'] = $aResult['LoginCss'];
-
- $aResult['DevEmail'] = $oConfig->Get('labs', 'dev_email', '');
- $aResult['DevPassword'] = $oConfig->Get('labs', 'dev_password', '');
-
- $aResult['WelcomePageUrl'] = '';
- $aResult['WelcomePageDisplay'] = '';
-
- $aResult['StartupUrl'] = '';
-
- if (empty($aResult['AdditionalLoginError']))
- {
- $aResult['AdditionalLoginError'] = $this->GetSpecLogoutCustomMgsWithDeletion();
- }
- }
-
- $aResult['AllowGoogleSocial'] = (bool) $oConfig->Get('social', 'google_enable', false);
- $aResult['AllowGoogleSocialAuth'] = (bool) $oConfig->Get('social', 'google_enable_auth', true);
- $aResult['AllowGoogleSocialAuthFast'] = (bool) $oConfig->Get('social', 'google_enable_auth_fast', true);
- $aResult['AllowGoogleSocialDrive'] = (bool) $oConfig->Get('social', 'google_enable_drive', true);
- $aResult['AllowGoogleSocialPreview'] = (bool) $oConfig->Get('social', 'google_enable_preview', true);
-
- $aResult['GoogleClientID'] = \trim($oConfig->Get('social', 'google_client_id', ''));
- $aResult['GoogleApiKey'] = \trim($oConfig->Get('social', 'google_api_key', ''));
-
- if (!$aResult['AllowGoogleSocial'] || ($aResult['AllowGoogleSocial'] && (
- '' === \trim($oConfig->Get('social', 'google_client_id', '')) || '' === \trim($oConfig->Get('social', 'google_client_secret', '')))))
- {
- $aResult['AllowGoogleSocialAuth'] = false;
- $aResult['AllowGoogleSocialAuthFast'] = false;
- $aResult['AllowGoogleSocialDrive'] = false;
- $aResult['GoogleClientID'] = '';
- $aResult['GoogleApiKey'] = '';
- }
-
- if (!$aResult['AllowGoogleSocial'])
- {
- $aResult['AllowGoogleSocialPreview'] = false;
- }
-
- if ($aResult['AllowGoogleSocial'] &&
- !$aResult['AllowGoogleSocialAuth'] && !$aResult['AllowGoogleSocialAuthFast'] &&
- !$aResult['AllowGoogleSocialDrive'] && !$aResult['AllowGoogleSocialPreview'])
- {
- $aResult['AllowGoogleSocial'] = false;
- }
-
- $aResult['AllowFacebookSocial'] = (bool) $oConfig->Get('social', 'fb_enable', false);
- if ($aResult['AllowFacebookSocial'] && (
- '' === \trim($oConfig->Get('social', 'fb_app_id', '')) || '' === \trim($oConfig->Get('social', 'fb_app_secret', ''))))
- {
- $aResult['AllowFacebookSocial'] = false;
- }
-
- $aResult['AllowTwitterSocial'] = (bool) $oConfig->Get('social', 'twitter_enable', false);
- if ($aResult['AllowTwitterSocial'] && (
- '' === \trim($oConfig->Get('social', 'twitter_consumer_key', '')) || '' === \trim($oConfig->Get('social', 'twitter_consumer_secret', ''))))
- {
- $aResult['AllowTwitterSocial'] = false;
- }
-
- $aResult['AllowDropboxSocial'] = (bool) $oConfig->Get('social', 'dropbox_enable', false);
- $aResult['DropboxApiKey'] = \trim($oConfig->Get('social', 'dropbox_api_key', ''));
-
- if (!$aResult['AllowDropboxSocial'])
- {
- $aResult['DropboxApiKey'] = '';
- }
- else if (0 === strlen($aResult['DropboxApiKey']))
- {
- $aResult['AllowDropboxSocial'] = false;
- }
-
- $aResult['Capa'] = $this->Capa(false, $bMobile, $oAccount);
-
- if ($aResult['Auth'] && !$aResult['RequireTwoFactor'])
- {
- if ($this->GetCapa(false, $bMobile, \RainLoop\Enumerations\Capa::TWO_FACTOR, $oAccount) &&
- $this->GetCapa(false, $bMobile, \RainLoop\Enumerations\Capa::TWO_FACTOR_FORCE, $oAccount) &&
- $this->TwoFactorAuthProvider()->IsActive())
- {
- $aData = $this->getTwoFactorInfo($oAccount, true);
-
- $aResult['RequireTwoFactor'] = !$aData ||
- !isset($aData['User'], $aData['IsSet'], $aData['Enable']) ||
- !($aData['IsSet'] && $aData['Enable']);
- }
- }
- }
- else
- {
- $aResult['Auth'] = $this->IsAdminLoggined(false);
- if ($aResult['Auth'])
- {
- $aResult['AdminDomain'] = APP_SITE;
- $aResult['AdminLogin'] = (string) $oConfig->Get('security', 'admin_login', '');
- $aResult['UseTokenProtection'] = (bool) $oConfig->Get('security', 'csrf_protection', true);
- $aResult['EnabledPlugins'] = (bool) $oConfig->Get('plugins', 'enable', false);
-
- $aResult['VerifySslCertificate'] = (bool) $oConfig->Get('ssl', 'verify_certificate', false);
- $aResult['AllowSelfSigned'] = (bool) $oConfig->Get('ssl', 'allow_self_signed', true);
-
- $aDrivers = \class_exists('PDO') ? \PDO::getAvailableDrivers() : null;
- $aResult['MySqlIsSupported'] = \is_array($aDrivers) ? \in_array('mysql', $aDrivers) : false;
- $aResult['SQLiteIsSupported'] = \is_array($aDrivers) ? \in_array('sqlite', $aDrivers) : false;
- $aResult['PostgreSqlIsSupported'] = \is_array($aDrivers) ? \in_array('pgsql', $aDrivers) : false;
-
- $aResult['ContactsEnable'] = (bool) $oConfig->Get('contacts', 'enable', false);
- $aResult['ContactsSharing'] = (bool) $oConfig->Get('contacts', 'allow_sharing', false);
- $aResult['ContactsSync'] = (bool) $oConfig->Get('contacts', 'allow_sync', false);
- $aResult['ContactsPdoType'] = (string) $this->ValidateContactPdoType(\trim($this->Config()->Get('contacts', 'type', 'sqlite')));
- $aResult['ContactsPdoDsn'] = (string) $oConfig->Get('contacts', 'pdo_dsn', '');
- $aResult['ContactsPdoType'] = (string) $oConfig->Get('contacts', 'type', '');
- $aResult['ContactsPdoUser'] = (string) $oConfig->Get('contacts', 'pdo_user', '');
- $aResult['ContactsPdoPassword'] = (string) APP_DUMMY;
-
- $aResult['AllowGoogleSocial'] = (bool) $oConfig->Get('social', 'google_enable', false);
- $aResult['AllowGoogleSocialAuth'] = (bool) $oConfig->Get('social', 'google_enable_auth', true);
- $aResult['AllowGoogleSocialAuthFast'] = (bool) $oConfig->Get('social', 'google_enable_auth_fast', true);
- $aResult['AllowGoogleSocialDrive'] = (bool) $oConfig->Get('social', 'google_enable_drive', true);
- $aResult['AllowGoogleSocialPreview'] = (bool) $oConfig->Get('social', 'google_enable_preview', true);
-
- $aResult['GoogleClientID'] = (string) $oConfig->Get('social', 'google_client_id', '');
- $aResult['GoogleClientSecret'] = (string) $oConfig->Get('social', 'google_client_secret', '');
- $aResult['GoogleApiKey'] = (string) $oConfig->Get('social', 'google_api_key', '');
-
- $aResult['AllowFacebookSocial'] = (bool) $oConfig->Get('social', 'fb_enable', false);
- $aResult['FacebookAppID'] = (string) $oConfig->Get('social', 'fb_app_id', '');
- $aResult['FacebookAppSecret'] = (string) $oConfig->Get('social', 'fb_app_secret', '');
-
- $aResult['AllowTwitterSocial'] = (bool) $oConfig->Get('social', 'twitter_enable', false);
- $aResult['TwitterConsumerKey'] = (string) $oConfig->Get('social', 'twitter_consumer_key', '');
- $aResult['TwitterConsumerSecret'] = (string) $oConfig->Get('social', 'twitter_consumer_secret', '');
-
- $aResult['AllowDropboxSocial'] = (bool) $oConfig->Get('social', 'dropbox_enable', false);
- $aResult['DropboxApiKey'] = (string) $oConfig->Get('social', 'dropbox_api_key', '');
-
- $aResult['SubscriptionEnabled'] = (bool) \MailSo\Base\Utils::ValidateDomain($aResult['AdminDomain']);
-// || \MailSo\Base\Utils::ValidateIP($aResult['AdminDomain']);
-
- $aResult['WeakPassword'] = (bool) $oConfig->ValidatePassword('12345');
- $aResult['CoreAccess'] = (bool) $this->rainLoopCoreAccess();
-
- $aResult['PhpUploadSizes'] = array(
- 'upload_max_filesize' => \ini_get('upload_max_filesize'),
- 'post_max_size' => \ini_get('post_max_size')
- );
- }
-
- $aResult['Capa'] = $this->Capa(true, $bMobile);
- }
-
- $aResult['SupportedFacebookSocial'] = (bool) \version_compare(PHP_VERSION, '5.4.0', '>=');
- if (!$aResult['SupportedFacebookSocial'])
- {
- $aResult['AllowFacebookSocial'] = false;
- $aResult['FacebookAppID'] = '';
- $aResult['FacebookAppSecret'] = '';
- }
-
- $aResult['ProjectHash'] = \md5($aResult['AccountHash'].APP_VERSION.$this->Plugins()->Hash());
-
- $sLanguage = $oConfig->Get('webmail', 'language', 'en');
- $sLanguageAdmin = $oConfig->Get('webmail', 'language_admin', 'en');
- $sTheme = $oConfig->Get('webmail', 'theme', 'Default');
-
- $aResult['AllowLanguagesOnSettings'] = (bool) $oConfig->Get('webmail', 'allow_languages_on_settings', true);
- $aResult['AllowLanguagesOnLogin'] = (bool) $oConfig->Get('login', 'allow_languages_on_login', true);
- $aResult['AttachmentLimit'] = ((int) $oConfig->Get('webmail', 'attachment_size_limit', 10)) * 1024 * 1024;
- $aResult['SignMe'] = (string) $oConfig->Get('login', 'sign_me_auto', \RainLoop\Enumerations\SignMeType::DEFAILT_OFF);
- $aResult['UseLocalProxyForExternalImages'] = (bool) $oConfig->Get('labs', 'use_local_proxy_for_external_images', false);
-
- // user
- $aResult['ShowImages'] = (bool) $oConfig->Get('defaults', 'show_images', false);
- $aResult['MPP'] = (int) $oConfig->Get('webmail', 'messages_per_page', 25);
- $aResult['SoundNotification'] = false;
- $aResult['DesktopNotifications'] = false;
- $aResult['Layout'] = (int) $oConfig->Get('defaults', 'view_layout', \RainLoop\Enumerations\Layout::SIDE_PREVIEW);
- $aResult['EditorDefaultType'] = (string) $oConfig->Get('defaults', 'view_editor_type', '');
- $aResult['UseCheckboxesInList'] = (bool) $oConfig->Get('defaults', 'view_use_checkboxes', true);
- $aResult['AutoLogout'] = (int) $oConfig->Get('defaults', 'autologout', 30);
- $aResult['UseThreads'] = (bool) $oConfig->Get('defaults', 'mail_use_threads', false);
- $aResult['ReplySameFolder'] = (bool) $oConfig->Get('defaults', 'mail_reply_same_folder', false);
- $aResult['ContactsAutosave'] = (bool) $oConfig->Get('defaults', 'contacts_autosave', true);
- $aResult['EnableTwoFactor'] = false;
- $aResult['ParentEmail'] = '';
- $aResult['InterfaceAnimation'] = true;
- $aResult['UserBackgroundName'] = '';
- $aResult['UserBackgroundHash'] = '';
-
- if (!$bAdmin && $oAccount instanceof \RainLoop\Model\Account)
- {
- $aResult['ParentEmail'] = $oAccount->ParentEmail();
-
- $oSettingsLocal = $this->SettingsProvider(true)->Load($oAccount);
-
- if ($oSettingsLocal instanceof \RainLoop\Settings)
- {
-// if ($this->GetCapa(false, $bMobile, \RainLoop\Enumerations\Capa::FOLDERS, $oAccount))
-
- $aResult['SentFolder'] = (string) $oSettingsLocal->GetConf('SentFolder', '');
- $aResult['DraftFolder'] = (string) $oSettingsLocal->GetConf('DraftFolder', '');
- $aResult['SpamFolder'] = (string) $oSettingsLocal->GetConf('SpamFolder', '');
- $aResult['TrashFolder'] = (string) $oSettingsLocal->GetConf('TrashFolder', '');
- $aResult['ArchiveFolder'] = (string) $oSettingsLocal->GetConf('ArchiveFolder', '');
- $aResult['NullFolder'] = (string) $oSettingsLocal->GetConf('NullFolder', '');
- }
-
- if ($this->GetCapa(false, $bMobile, \RainLoop\Enumerations\Capa::SETTINGS, $oAccount))
- {
- if ($oSettings instanceof \RainLoop\Settings)
- {
- if ($oConfig->Get('webmail', 'allow_languages_on_settings', true))
- {
- $sLanguage = (string) $oSettings->GetConf('Language', $sLanguage);
- }
-
- $aResult['EditorDefaultType'] = (string) $oSettings->GetConf('EditorDefaultType', $aResult['EditorDefaultType']);
- $aResult['ShowImages'] = (bool) $oSettings->GetConf('ShowImages', $aResult['ShowImages']);
- $aResult['ContactsAutosave'] = (bool) $oSettings->GetConf('ContactsAutosave', $aResult['ContactsAutosave']);
- $aResult['MPP'] = (int) $oSettings->GetConf('MPP', $aResult['MPP']);
- $aResult['SoundNotification'] = (bool) $oSettings->GetConf('SoundNotification', $aResult['SoundNotification']);
- $aResult['DesktopNotifications'] = (bool) $oSettings->GetConf('DesktopNotifications', $aResult['DesktopNotifications']);
- $aResult['UseCheckboxesInList'] = (bool) $oSettings->GetConf('UseCheckboxesInList', $aResult['UseCheckboxesInList']);
- $aResult['AutoLogout'] = (int) $oSettings->GetConf('AutoLogout', $aResult['AutoLogout']);
- $aResult['Layout'] = (int) $oSettings->GetConf('Layout', $aResult['Layout']);
-
- if (!$this->GetCapa(false, $bMobile, \RainLoop\Enumerations\Capa::AUTOLOGOUT, $oAccount))
- {
- $aResult['AutoLogout'] = 0;
- }
-
- if ($this->GetCapa(false, $bMobile, \RainLoop\Enumerations\Capa::USER_BACKGROUND, $oAccount))
- {
- $aResult['UserBackgroundName'] = (string) $oSettings->GetConf('UserBackgroundName', $aResult['UserBackgroundName']);
- $aResult['UserBackgroundHash'] = (string) $oSettings->GetConf('UserBackgroundHash', $aResult['UserBackgroundHash']);
-// if (!empty($aResult['UserBackgroundName']) && !empty($aResult['UserBackgroundHash']))
-// {
-// $aResult['IncludeBackground'] = './?/Raw/&q[]=/{{USER}}/UserBackground/&q[]=/'.
-// $aResult['UserBackgroundHash'].'/';
-// }
- }
-
- $aResult['EnableTwoFactor'] = (bool) $oSettings->GetConf('EnableTwoFactor', $aResult['EnableTwoFactor']);
- }
-
- if ($oSettingsLocal instanceof \RainLoop\Settings)
- {
- $aResult['UseThreads'] = (bool) $oSettingsLocal->GetConf('UseThreads', $aResult['UseThreads']);
- $aResult['ReplySameFolder'] = (bool) $oSettingsLocal->GetConf('ReplySameFolder', $aResult['ReplySameFolder']);
-
- if ($this->GetCapa(false, $bMobile, \RainLoop\Enumerations\Capa::THEMES, $oAccount))
- {
- $sTheme = (string) $oSettingsLocal->GetConf('Theme', $sTheme);
- }
- }
- }
- }
-
- if (!$aResult['Auth'])
- {
- if (!$bAdmin)
- {
- if ($oConfig->Get('login', 'allow_languages_on_login', true) &&
- $oConfig->Get('login', 'determine_user_language', true))
- {
- $sLanguage = $this->ValidateLanguage(
- $this->detectUserLanguage($bAdmin), $sLanguage, false);
- }
- }
- }
-
- $sTheme = $this->ValidateTheme($sTheme, $bMobile);
- $sStaticCache = $this->StaticCache();
-
- $aResult['Theme'] = $sTheme;
- $aResult['NewThemeLink'] = $this->ThemeLink($sTheme, $bAdmin);
-
- $aResult['Language'] = $this->ValidateLanguage($sLanguage, '', false);
- $aResult['LanguageAdmin'] = $this->ValidateLanguage($sLanguageAdmin, '', true);
-
- $aResult['UserLanguageRaw'] = $this->detectUserLanguage($bAdmin);
-
- $aResult['UserLanguage'] = $this->ValidateLanguage($aResult['UserLanguageRaw'], '', false, true);
- $aResult['UserLanguageAdmin'] = $this->ValidateLanguage($aResult['UserLanguageRaw'], '', true, true);
-
- $aResult['PluginsLink'] = '';
- if (0 < $this->Plugins()->Count() && $this->Plugins()->HaveJs($bAdmin))
- {
- $aResult['PluginsLink'] = './?/Plugins/0/'.($bAdmin ? 'Admin' : 'User').'/'.$sStaticCache.'/';
- }
-
- $aResult['LangLink'] = './?/Lang/0/'.($bAdmin ? 'Admin' : 'App').'/'.
- ($bAdmin ? $aResult['LanguageAdmin'] : $aResult['Language']).'/'.$sStaticCache.'/';
-
- $aResult['TemplatesLink'] = './?/Templates/0/'.($bAdmin ? 'Admin' : 'App').'/'.$sStaticCache.'/';
-
- $bAppJsDebug = !!$this->Config()->Get('labs', 'use_app_debug_js', false);
-
- $aResult['StaticLibJsLink'] = $this->StaticPath('js/min/libs.js');
- $aResult['StaticAppJsLink'] = $this->StaticPath('js/'.($bAppJsDebug ? '' : 'min/').($bAdmin ? 'admin' : 'app').'.js');
- $aResult['StaticEditorJsLink'] = $this->StaticPath('ckeditor/ckeditor.js');
-
- $aResult['EditorDefaultType'] = \in_array($aResult['EditorDefaultType'], array('Plain', 'Html', 'HtmlForced', 'PlainForced')) ?
- $aResult['EditorDefaultType'] : 'Plain';
-
- // IDN
- $aResult['Email'] = \MailSo\Base\Utils::IdnToUtf8($aResult['Email']);
- $aResult['ParentEmail'] = \MailSo\Base\Utils::IdnToUtf8($aResult['ParentEmail']);
- $aResult['MailToEmail'] = \MailSo\Base\Utils::IdnToUtf8($aResult['MailToEmail']);
- $aResult['DevEmail'] = \MailSo\Base\Utils::IdnToUtf8($aResult['DevEmail']);
-
- // Mobile override
- if ($bMobile)
- {
- $aResult['Layout'] = \RainLoop\Enumerations\Layout::NO_PREVIW;
-
- $aResult['SoundNotification'] = false;
- $aResult['DesktopNotifications'] = false;
- $aResult['UseCheckboxesInList'] = true;
-
- $aResult['UserBackgroundName'] = '';
- $aResult['UserBackgroundHash'] = '';
- }
-
- $this->Plugins()->InitAppData($bAdmin, $aResult, $oAccount);
-
- return $aResult;
- }
-
- /**
- * @return array
- */
- private function getUserLanguagesFromHeader()
- {
- $aResult = $aList = array();
- $sAcceptLang = \strtolower($this->Http()->GetServer('HTTP_ACCEPT_LANGUAGE', 'en'));
- if (!empty($sAcceptLang) && \preg_match_all('/([a-z]{1,8}(?:-[a-z]{1,8})?)(?:;q=([0-9.]+))?/', $sAcceptLang, $aList))
- {
- $aResult = \array_combine($aList[1], $aList[2]);
- foreach ($aResult as $n => $v)
- {
- $aResult[$n] = $v ? $v : 1;
- }
-
- \arsort($aResult, SORT_NUMERIC);
- }
-
- return $aResult;
- }
-
- /**
- * @return string
- */
- public function detectUserLanguage($bAdmin = false)
- {
- $sResult = '';
- $aLangs = $this->getUserLanguagesFromHeader();
-
- foreach (\array_keys($aLangs) as $sLang)
- {
- $sLang = $this->ValidateLanguage($sLang, '', $bAdmin, true);
- if (!empty($sLang))
- {
- $sResult = $sLang;
- break;
- }
- }
-
- return $sResult;
- }
-
- /**
- * @param int $iWait = 1
- * @param int $iDelay = 1
- */
- private function requestSleep($iWait = 1, $iDelay = 1)
- {
- if (0 < $iDelay && 0 < $iWait)
- {
- if ($iWait > \time() - APP_START_TIME)
- {
- \sleep($iDelay);
- }
- }
- }
-
- private function loginErrorDelay()
- {
- $iDelay = (int) $this->Config()->Get('labs', 'login_fault_delay', 0);
- if (0 < $iDelay)
- {
- $this->requestSleep(1, $iDelay);
- }
- }
-
- /**
- * @param \RainLoop\Model\Account $oAccount
- */
- public function AuthToken($oAccount)
- {
- if ($oAccount instanceof \RainLoop\Model\Account)
- {
- $this->SetAuthToken($oAccount);
-
- $aAccounts = $this->GetAccounts($oAccount);
- if (\is_array($aAccounts) && isset($aAccounts[$oAccount->Email()]))
- {
- $aAccounts[$oAccount->Email()] = $oAccount->GetAuthToken();
- $this->SetAccounts($oAccount, $aAccounts);
- }
- }
- }
-
- /**
- * @param \RainLoop\Model\Account $oAccount
- * @param bool $bAuthLog = false
- *
- * @throws \RainLoop\Exceptions\ClientException
- */
- public function CheckMailConnection($oAccount, $bAuthLog = false)
- {
- try
- {
- $oAccount->IncConnectAndLoginHelper($this->Plugins(), $this->MailClient(), $this->Config());
- }
- catch (\RainLoop\Exceptions\ClientException $oException)
- {
- throw $oException;
- }
- catch (\MailSo\Net\Exceptions\ConnectionException $oException)
- {
- throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::ConnectionError, $oException);
- }
- catch (\MailSo\Imap\Exceptions\LoginBadCredentialsException $oException)
- {
- if ($bAuthLog)
- {
- $this->LoggerAuthHelper($oAccount);
- }
-
- if ($this->Config()->Get('labs', 'imap_show_login_alert', true))
- {
- throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::AuthError,
- $oException, $oException->getAlertFromStatus());
- }
- else
- {
- throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::AuthError, $oException);
- }
- }
- catch (\Exception $oException)
- {
- throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::AuthError, $oException);
- }
- }
-
- /**
- * @param string $sLogin
- * @param bool $bAdmin = false
- * @return array
- */
- private function getAdditionalLogParamsByUserLogin($sLogin, $bAdmin = false)
- {
- $sHost = $bAdmin ? $this->Http()->GetHost(false, true, true) : \MailSo\Base\Utils::GetDomainFromEmail($sLogin);
- return array(
- '{imap:login}' => $sLogin,
- '{imap:host}' => $sHost,
- '{smtp:login}' => $sLogin,
- '{smtp:host}' => $sHost,
- '{user:email}' => $sLogin,
- '{user:login}' => \MailSo\Base\Utils::GetAccountNameFromEmail($sLogin),
- '{user:domain}' => $sHost,
- );
- }
-
- /**
- * @param string $sEmail
- * @param string $sPassword
- * @param string $sSignMeToken = ''
- * @param string $sAdditionalCode = ''
- * @param string $bAdditionalCodeSignMe = false
- *
- * @return \RainLoop\Model\Account
- * @throws \RainLoop\Exceptions\ClientException
- */
- public function LoginProcess(&$sEmail, &$sPassword, $sSignMeToken = '',
- $sAdditionalCode = '', $bAdditionalCodeSignMe = false)
- {
- $sInputEmail = $sEmail;
-
- $this->Plugins()->RunHook('filter.login-credentials.step-1', array(&$sEmail, &$sPassword));
-
- $sEmail = \MailSo\Base\Utils::StrToLowerIfAscii(\MailSo\Base\Utils::Trim($sEmail));
-
- if (false === \strpos($sEmail, '@'))
- {
- $this->Logger()->Write('The email address "'.$sEmail.'" is not complete', \MailSo\Log\Enumerations\Type::INFO, 'LOGIN');
-
- if (false === \strpos($sEmail, '@') && !!$this->Config()->Get('login', 'determine_user_domain', false))
- {
- $sUserHost = \trim($this->Http()->GetHost(false, true, true));
- $this->Logger()->Write('Determined user domain: '.$sUserHost, \MailSo\Log\Enumerations\Type::INFO, 'LOGIN');
-
- $bAdded = false;
-
- $iLimit = 14;
- $aDomainParts = \explode('.', $sUserHost);
-
- $oDomainProvider = $this->DomainProvider();
- while (0 < \count($aDomainParts) && 0 < $iLimit)
- {
- $sLine = \trim(\implode('.', $aDomainParts), '. ');
-
- $oDomain = $oDomainProvider->Load($sLine, false);
- if ($oDomain && $oDomain instanceof \RainLoop\Model\Domain)
- {
- $bAdded = true;
- $this->Logger()->Write('Check "'.$sLine.'": OK ('.$sEmail.' > '.$sEmail.'@'.$sLine.')',
- \MailSo\Log\Enumerations\Type::INFO, 'LOGIN');
-
- $sEmail = $sEmail.'@'.$sLine;
- break;
- }
- else
- {
- $this->Logger()->Write('Check "'.$sLine.'": NO', \MailSo\Log\Enumerations\Type::INFO, 'LOGIN');
- }
-
- \array_shift($aDomainParts);
- $iLimit--;
- }
-
- if (!$bAdded)
- {
- $sLine = $sUserHost;
- $oDomain = $oDomainProvider->Load($sLine, true);
- if ($oDomain && $oDomain instanceof \RainLoop\Model\Domain)
- {
- $bAdded = true;
- $this->Logger()->Write('Check "'.$sLine.'" with wildcard: OK ('.$sEmail.' > '.$sEmail.'@'.$sLine.')',
- \MailSo\Log\Enumerations\Type::INFO, 'LOGIN');
-
- $sEmail = $sEmail.'@'.$sLine;
- }
- else
- {
- $this->Logger()->Write('Check "'.$sLine.'" with wildcard: NO', \MailSo\Log\Enumerations\Type::INFO, 'LOGIN');
- }
- }
-
- if (!$bAdded)
- {
- $this->Logger()->Write('Domain was not found!', \MailSo\Log\Enumerations\Type::INFO, 'LOGIN');
- }
- }
-
- $sDefDomain = \trim($this->Config()->Get('login', 'default_domain', ''));
- if (false === \strpos($sEmail, '@') && 0 < \strlen($sDefDomain))
- {
- $this->Logger()->Write('Default domain "'.$sDefDomain.'" was used. ('.$sEmail.' > '.$sEmail.'@'.$sDefDomain.')',
- \MailSo\Log\Enumerations\Type::INFO, 'LOGIN');
-
- $sEmail = $sEmail.'@'.$sDefDomain;
- }
- }
-
- $this->Plugins()->RunHook('filter.login-credentials.step-2', array(&$sEmail, &$sPassword));
-
- if (false === \strpos($sEmail, '@') || 0 === \strlen($sPassword))
- {
- $this->loginErrorDelay();
-
- throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::InvalidInputArgument);
- }
-
- $this->Logger()->AddSecret($sPassword);
-
- $sLogin = $sEmail;
- $this->Plugins()->RunHook('filter.login-credentials', array(&$sEmail, &$sLogin, &$sPassword));
-
- $this->Logger()->AddSecret($sPassword);
-
- $this->Plugins()->RunHook('event.login-pre-login-provide', array());
-
- $oAccount = null;
-
- try
- {
- $oAccount = $this->LoginProvide($sEmail, $sLogin, $sPassword, $sSignMeToken, true);
-
- if (!($oAccount instanceof \RainLoop\Model\Account))
- {
- throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::AuthError);
- }
-
- $this->Plugins()->RunHook('event.login-post-login-provide', array(&$oAccount));
-
- if (!($oAccount instanceof \RainLoop\Model\Account))
- {
- throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::AuthError);
- }
- }
- catch (\Exception $oException)
- {
- $this->loginErrorDelay();
- $this->LoggerAuthHelper($oAccount, $this->getAdditionalLogParamsByUserLogin($sInputEmail));
- throw $oException;
- }
-
- // Two factor auth
- if ($this->TwoFactorAuthProvider()->IsActive())
- {
- $aData = $this->getTwoFactorInfo($oAccount);
- if ($aData && isset($aData['IsSet'], $aData['Enable']) && !empty($aData['Secret']) && $aData['IsSet'] && $aData['Enable'])
- {
- $sSecretHash = \md5(APP_SALT.$aData['Secret'].\RainLoop\Utils::Fingerprint());
- $sSecretCookieHash = \RainLoop\Utils::GetCookie(self::AUTH_TFA_SIGN_ME_TOKEN_KEY, '');
-
- if (empty($sSecretCookieHash) || $sSecretHash !== $sSecretCookieHash)
- {
- $sAdditionalCode = \trim($sAdditionalCode);
- if (empty($sAdditionalCode))
- {
- $this->Logger()->Write('TFA: Required Code for '.$oAccount->ParentEmailHelper().' account.');
-
- throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::AccountTwoFactorAuthRequired);
- }
- else
- {
- $this->Logger()->Write('TFA: Verify Code for '.$oAccount->ParentEmailHelper().' account.');
-
- $bGood = false;
- if (6 < \strlen($sAdditionalCode) && !empty($aData['BackupCodes']))
- {
- $aBackupCodes = \explode(' ', \trim(\preg_replace('/[^\d]+/', ' ', $aData['BackupCodes'])));
- $bGood = \in_array($sAdditionalCode, $aBackupCodes);
-
- if ($bGood)
- {
- $this->removeBackupCodeFromTwoFactorInfo($oAccount->ParentEmailHelper(), $sAdditionalCode);
- }
- }
-
- if ($bAdditionalCodeSignMe)
- {
- \RainLoop\Utils::SetCookie(self::AUTH_TFA_SIGN_ME_TOKEN_KEY, $sSecretHash,
- \time() + 60 * 60 * 24 * 14);
- }
-
- if (!$bGood && !$this->TwoFactorAuthProvider()->VerifyCode($aData['Secret'], $sAdditionalCode))
- {
- $this->loginErrorDelay();
-
- $this->LoggerAuthHelper($oAccount);
-
- throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::AccountTwoFactorAuthError);
- }
- }
- }
- }
- }
-
- try
- {
- $this->CheckMailConnection($oAccount, true);
- }
- catch (\Exception $oException)
- {
- $this->loginErrorDelay();
-
- throw $oException;
- }
-
- return $oAccount;
- }
-
- /**
- * @param string $sEncryptedData
- *
- * @return string
- */
- private function clientRsaDecryptHelper($sEncryptedData)
- {
-// $aMatch = array();
-// if ('rsa:xxx:' === \substr($sEncryptedData, 0, 8) && $this->Config()->Get('security', 'use_rsa_encryption', false))
-// {
-// $oLogger = $this->Logger();
-// $oLogger->Write('Trying to decode encrypted data', \MailSo\Log\Enumerations\Type::INFO, 'RSA');
-// $oLogger->HideErrorNotices(true);
-//
-// $sData = \trim(\substr($sEncryptedData, 8));
-// $sData = \RainLoop\Utils::DecryptStringRSA(\base64_decode($sData));
-//
-// if (false !== $sData && \preg_match('/^[a-z0-9]{32}:(.+):[a-z0-9]{32}$/', $sData, $aMatch) && isset($aMatch[1]))
-// {
-// $sEncryptedData = $aMatch[1];
-// }
-// else
-// {
-// $oLogger->Write('Invalid decrypted data', \MailSo\Log\Enumerations\Type::WARNING, 'RSA');
-// }
-//
-// $oLogger->HideErrorNotices(false);
-// }
-
- return $sEncryptedData;
- }
-
- /**
- * @param string $sEmail
- *
- * @return string
- */
- private function generateSignMeToken($sEmail)
- {
- return \MailSo\Base\Utils::Md5Rand(APP_SALT.$sEmail);
- }
-
- /**
- * @return array
- *
- * @throws \MailSo\Base\Exceptions\Exception
- */
- public function DoLogin()
- {
- $sEmail = \MailSo\Base\Utils::Trim($this->GetActionParam('Email', ''));
- $sPassword = $this->GetActionParam('Password', '');
- $sLanguage = $this->GetActionParam('Language', '');
- $bSignMe = '1' === (string) $this->GetActionParam('SignMe', '0');
-
- $sAdditionalCode = $this->GetActionParam('AdditionalCode', '');
- $bAdditionalCodeSignMe = '1' === (string) $this->GetActionParam('AdditionalCodeSignMe', '0');
-
- $oAccount = null;
-
- $sPassword = $this->clientRsaDecryptHelper($sPassword);
- $this->Logger()->AddSecret($sPassword);
-
- if ('sleep@sleep.dev' === $sEmail && 0 < \strlen($sPassword) &&
- \is_numeric($sPassword) && $this->Config()->Get('debug', 'enable', false)
- )
- {
- \sleep((int) $sPassword);
- throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::AuthError);
- }
-
- try
- {
- $oAccount = $this->LoginProcess($sEmail, $sPassword,
- $bSignMe ? $this->generateSignMeToken($sEmail) : '',
- $sAdditionalCode, $bAdditionalCodeSignMe);
- }
- catch (\RainLoop\Exceptions\ClientException $oException)
- {
- if ($oException &&
- \RainLoop\Notifications::AccountTwoFactorAuthRequired === $oException->getCode())
- {
- return $this->DefaultResponse(__FUNCTION__, true, array(
- 'TwoFactorAuth' => true
- ));
- }
- else
- {
- throw $oException;
- }
- }
-
- $this->AuthToken($oAccount);
-
- if ($oAccount && 0 < \strlen($sLanguage))
- {
- $oSettings = $this->SettingsProvider()->Load($oAccount);
- if ($oSettings)
- {
- $sLanguage = $this->ValidateLanguage($sLanguage);
- $sCurrentLanguage = $oSettings->GetConf('Language', '');
-
- if ($sCurrentLanguage !== $sLanguage)
- {
- $oSettings->SetConf('Language', $sLanguage);
- $this->SettingsProvider()->Save($oAccount, $oSettings);
- }
- }
- }
-
- return $this->TrueResponse(__FUNCTION__);
- }
-
- /**
- * @param \RainLoop\Model\Account $oAccount
- *
- * @return array
- */
- public function GetAccounts($oAccount)
- {
- if ($this->GetCapa(false, false, \RainLoop\Enumerations\Capa::ADDITIONAL_ACCOUNTS, $oAccount))
- {
- $sAccounts = $this->StorageProvider()->Get($oAccount,
- \RainLoop\Providers\Storage\Enumerations\StorageType::CONFIG,
- 'accounts'
- );
-
- $aAccounts = array();
- if ('' !== $sAccounts && '{' === \substr($sAccounts, 0, 1))
- {
- $aAccounts = @\json_decode($sAccounts, true);
- }
-
- if (\is_array($aAccounts) && 0 < \count($aAccounts))
- {
- if (1 === \count($aAccounts))
- {
- $this->SetAccounts($oAccount, array());
-
- }
- else if (1 < \count($aAccounts))
- {
- $sOrder = $this->StorageProvider()->Get($oAccount,
- \RainLoop\Providers\Storage\Enumerations\StorageType::CONFIG,
- 'accounts_identities_order'
- );
-
- $aOrder = empty($sOrder) ? array() : @\json_decode($sOrder, true);
- if (isset($aOrder['Accounts']) && \is_array($aOrder['Accounts']) &&
- 1 < \count($aOrder['Accounts']))
- {
- $aAccounts = \array_merge(\array_flip($aOrder['Accounts']), $aAccounts);
-
- $aAccounts = \array_filter($aAccounts, function ($sHash) {
- return 5 < \strlen($sHash);
- });
- }
- }
-
- return $aAccounts;
- }
- }
-
- $aAccounts = array();
- if (!$oAccount->IsAdditionalAccount())
- {
- $aAccounts[$oAccount->Email()] = $oAccount->GetAuthToken();
- }
-
- return $aAccounts;
- }
-
- /**
- * @param \RainLoop\Model\Account $oAccount
- *
- * @return array
- */
- public function GetTemplates($oAccount)
- {
- $aTemplates = array();
- if ($oAccount)
- {
- $aData = array();
-
- $sData = $this->StorageProvider(true)->Get($oAccount,
- \RainLoop\Providers\Storage\Enumerations\StorageType::CONFIG,
- 'templates'
- );
-
- if ('' !== $sData && '[' === \substr($sData, 0, 1))
- {
- $aData = @\json_decode($sData, true);
- }
-
- if (\is_array($aData) && 0 < \count($aData))
- {
- foreach ($aData as $aItem)
- {
- $oItem = \RainLoop\Model\Template::NewInstance();
- $oItem->FromJSON($aItem);
-
- if ($oItem && $oItem->Validate())
- {
- \array_push($aTemplates, $oItem);
- }
- }
- }
-
- if (1 < \count($aTemplates))
- {
- $sOrder = $this->StorageProvider()->Get($oAccount,
- \RainLoop\Providers\Storage\Enumerations\StorageType::CONFIG,
- 'templates_order'
- );
-
- $aOrder = empty($sOrder) ? array() : @\json_decode($sOrder, true);
- if (\is_array($aOrder) && 1 < \count($aOrder))
- {
- \usort($aTemplates, function ($a, $b) use ($aOrder) {
- return \array_search($a->Id(), $aOrder) < \array_search($b->Id(), $aOrder) ? -1 : 1;
- });
- }
- }
- }
-
- return $aTemplates;
- }
-
- /**
- * @param \RainLoop\Model\Account $oAccount
- * @param string $sID
- *
- * @return \RainLoop\Model\Identity
- */
- public function GetTemplateByID($oAccount, $sID)
- {
- $aTemplates = $this->GetTemplates($oAccount);
- if (\is_array($aTemplates))
- {
- foreach ($aTemplates as $oIdentity)
- {
- if ($oIdentity && $sID === $oIdentity->Id())
- {
- return $oIdentity;
- }
- }
- }
-
- return isset($aTemplates[0]) ? $aTemplates[0] : null;
- }
-
- /**
- * @param \RainLoop\Model\Account $oAccount
- *
- * @return array
- */
- public function GetIdentities($oAccount)
- {
- $bAllowIdentities = $this->GetCapa(false, false,
- \RainLoop\Enumerations\Capa::IDENTITIES, $oAccount);
-
- $aIdentities = array();
- if ($oAccount)
- {
- $aSubIdentities = array();
-
- $sData = $this->StorageProvider(true)->Get($oAccount,
- \RainLoop\Providers\Storage\Enumerations\StorageType::CONFIG,
- 'identities'
- );
-
- if ('' !== $sData && '[' === \substr($sData, 0, 1))
- {
- $aSubIdentities = @\json_decode($sData, true);
- }
-
- $bHasAccountIdentity = false;
-
- if (\is_array($aSubIdentities) && 0 < \count($aSubIdentities))
- {
- foreach ($aSubIdentities as $aItem)
- {
- $oItem = \RainLoop\Model\Identity::NewInstance();
- $oItem->FromJSON($aItem);
-
- if ($oItem && $oItem->Validate())
- {
- if ($oItem->IsAccountIdentities())
- {
- $oItem->SetEmail($oAccount->Email());
- $bHasAccountIdentity = true;
-
- \array_push($aIdentities, $oItem);
- }
- else if ($bAllowIdentities)
- {
- \array_push($aIdentities, $oItem);
- }
- }
- }
- }
-
- if (!$bHasAccountIdentity)
- {
- \array_unshift($aIdentities,
- \RainLoop\Model\Identity::NewInstanceFromAccount($oAccount));
- }
-
- if (1 < \count($aIdentities) && $bAllowIdentities)
- {
- $sOrder = $this->StorageProvider()->Get($oAccount,
- \RainLoop\Providers\Storage\Enumerations\StorageType::CONFIG,
- 'accounts_identities_order'
- );
-
- $aOrder = empty($sOrder) ? array() : @\json_decode($sOrder, true);
- if (isset($aOrder['Identities']) && \is_array($aOrder['Identities']) &&
- 1 < \count($aOrder['Identities']))
- {
- $aList = $aOrder['Identities'];
- foreach ($aList as $iIndex => $sItem)
- {
- if ('' === $sItem)
- {
- $aList[$iIndex] = '---';
- }
- }
-
- \usort($aIdentities, function ($a, $b) use ($aList) {
- return \array_search($a->Id(true), $aList) < \array_search($b->Id(true), $aList) ? -1 : 1;
- });
- }
- }
- }
-
- return $aIdentities;
- }
-
- /**
- * @param \RainLoop\Model\Account $oAccount
- * @param string $sID
- * @param bool $bFirstOnEmpty = false
- *
- * @return \RainLoop\Model\Identity
- */
- public function GetIdentityByID($oAccount, $sID, $bFirstOnEmpty = false)
- {
- $aIdentities = $this->GetIdentities($oAccount);
-
- if (\is_array($aIdentities))
- {
- foreach ($aIdentities as $oIdentity)
- {
- if ($oIdentity && $sID === $oIdentity->Id())
- {
- return $oIdentity;
- }
- }
- }
-
- return $bFirstOnEmpty && \is_array($aIdentities) && isset($aIdentities[0]) ? $aIdentities[0] : null;
- }
- /**
- * @param \RainLoop\Model\Account $oAccount
- *
- * @return \RainLoop\Model\Identity
- */
- public function GetAccountIdentity($oAccount)
- {
- return $this->GetIdentityByID($oAccount, '', true);
- }
-
- /**
- * @param \RainLoop\Model\Account $oAccount
- * @param array $aAccounts = array()
- *
- * @return array
- */
- public function SetAccounts($oAccount, $aAccounts = array())
- {
- $sParentEmail = $oAccount->ParentEmailHelper();
- if (!\is_array($aAccounts) || 0 >= \count($aAccounts) ||
- (1 === \count($aAccounts) && !empty($aAccounts[$sParentEmail])))
- {
- $this->StorageProvider()->Clear($oAccount,
- \RainLoop\Providers\Storage\Enumerations\StorageType::CONFIG,
- 'accounts'
- );
- }
- else
- {
- $this->StorageProvider()->Put($oAccount,
- \RainLoop\Providers\Storage\Enumerations\StorageType::CONFIG,
- 'accounts',
- @\json_encode($aAccounts)
- );
- }
- }
-
- /**
- * @param \RainLoop\Model\Account $oAccount
- * @param array $aIdentities = array()
- *
- * @return array
- */
- public function SetIdentities($oAccount, $aIdentities = array())
- {
- $bAllowIdentities = $this->GetCapa(false, false, \RainLoop\Enumerations\Capa::IDENTITIES, $oAccount);
-
- $aResult = array();
- foreach ($aIdentities as $oItem)
- {
- if (!$bAllowIdentities && $oItem && !$oItem->IsAccountIdentities())
- {
- continue;
- }
-
- $aResult[] = $oItem->ToSimpleJSON(false);
- }
-
- return $this->StorageProvider(true)->Put($oAccount,
- \RainLoop\Providers\Storage\Enumerations\StorageType::CONFIG,
- 'identities',
- @\json_encode($aResult)
- );
- }
-
- /**
- * @param \RainLoop\Model\Account $oAccount
- * @param array $aTemplates = array()
- *
- * @return array
- */
- public function SetTemplates($oAccount, $aTemplates = array())
- {
- $aResult = array();
- foreach ($aTemplates as $oItem)
- {
- $aResult[] = $oItem->ToSimpleJSON(false);
- }
-
- return $this->StorageProvider(true)->Put($oAccount,
- \RainLoop\Providers\Storage\Enumerations\StorageType::CONFIG,
- 'templates',
- @\json_encode($aResult)
- );
- }
-
- /**
- * @return array
- *
- * @throws \MailSo\Base\Exceptions\Exception
- */
- public function DoFilters()
- {
- $oAccount = $this->getAccountFromToken();
-
- if (!$this->GetCapa(false, false, \RainLoop\Enumerations\Capa::FILTERS, $oAccount))
- {
- return $this->FalseResponse(__FUNCTION__);
- }
-
- $aFakeFilters = null;
-
- $this->Plugins()
- ->RunHook('filter.filters-fake', array($oAccount, &$aFakeFilters))
- ;
-
- if ($aFakeFilters)
- {
- return $this->DefaultResponse(__FUNCTION__, $aFakeFilters);
- }
-
- return $this->DefaultResponse(__FUNCTION__,
- $this->FiltersProvider()->Load($oAccount, $oAccount->DomainSieveAllowRaw()));
- }
-
- /**
- * @return array
- *
- * @throws \MailSo\Base\Exceptions\Exception
- */
- public function DoFiltersSave()
- {
- $oAccount = $this->getAccountFromToken();
-
- if (!$this->GetCapa(false, false, \RainLoop\Enumerations\Capa::FILTERS, $oAccount))
- {
- return $this->FalseResponse(__FUNCTION__);
- }
-
- $aIncFilters = $this->GetActionParam('Filters', array());
-
- $sRaw = $this->GetActionParam('Raw', '');
- $bRawIsActive = '1' === (string) $this->GetActionParam('RawIsActive', '0');
-
- $aFilters = array();
- foreach ($aIncFilters as $aFilter)
- {
- if ($aFilter)
- {
- $oFilter = new \RainLoop\Providers\Filters\Classes\Filter();
- if ($oFilter->FromJSON($aFilter))
- {
- $aFilters[] = $oFilter;
- }
- }
- }
-
- $this->Plugins()
- ->RunHook('filter.filters-save', array($oAccount, &$aFilters, &$sRaw, &$bRawIsActive))
- ;
-
- return $this->DefaultResponse(__FUNCTION__, $this->FiltersProvider()->Save($oAccount,
- $aFilters, $sRaw, $bRawIsActive));
- }
-
- /**
- * @return array
- *
- * @throws \MailSo\Base\Exceptions\Exception
- */
- public function DoAccountSetup()
- {
- $oAccount = $this->getAccountFromToken();
-
- if (!$this->GetCapa(false, false, \RainLoop\Enumerations\Capa::ADDITIONAL_ACCOUNTS, $oAccount))
- {
- return $this->FalseResponse(__FUNCTION__);
- }
-
- $sParentEmail = $oAccount->ParentEmailHelper();
-
- $aAccounts = $this->GetAccounts($oAccount);
- if (!\is_array($aAccounts))
- {
- $aAccounts = array();
- }
-
- $sEmail = \trim($this->GetActionParam('Email', ''));
- $sPassword = $this->GetActionParam('Password', '');
- $bNew = '1' === (string) $this->GetActionParam('New', '1');
-
- $sEmail = \MailSo\Base\Utils::IdnToAscii($sEmail, true);
- if ($bNew && ($oAccount->Email() === $sEmail || $sParentEmail === $sEmail || isset($aAccounts[$sEmail])))
- {
- throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::AccountAlreadyExists);
- }
- else if (!$bNew && !isset($aAccounts[$sEmail]))
- {
- throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::AccountDoesNotExist);
- }
-
- $oNewAccount = $this->LoginProcess($sEmail, $sPassword);
- $oNewAccount->SetParentEmail($sParentEmail);
-
- $aAccounts[$oNewAccount->Email()] = $oNewAccount->GetAuthToken();
- if (!$oAccount->IsAdditionalAccount())
- {
- $aAccounts[$oAccount->Email()] = $oAccount->GetAuthToken();
- }
-
- $this->SetAccounts($oAccount, $aAccounts);
- return $this->TrueResponse(__FUNCTION__);
- }
-
- /**
- * @return array
- *
- * @throws \MailSo\Base\Exceptions\Exception
- */
- public function DoAccountDelete()
- {
- $oAccount = $this->getAccountFromToken();
-
- if (!$this->GetCapa(false, false, \RainLoop\Enumerations\Capa::ADDITIONAL_ACCOUNTS, $oAccount))
- {
- return $this->FalseResponse(__FUNCTION__);
- }
-
- $sParentEmail = $oAccount->ParentEmailHelper();
- $sEmailToDelete = \trim($this->GetActionParam('EmailToDelete', ''));
- $sEmailToDelete = \MailSo\Base\Utils::IdnToAscii($sEmailToDelete, true);
-
- $aAccounts = $this->GetAccounts($oAccount);
-
- if (0 < \strlen($sEmailToDelete) && $sEmailToDelete !== $sParentEmail && \is_array($aAccounts) && isset($aAccounts[$sEmailToDelete]))
- {
- unset($aAccounts[$sEmailToDelete]);
-
- $oAccountToChange = null;
- if ($oAccount->Email() === $sEmailToDelete && !empty($aAccounts[$sParentEmail]))
- {
- $oAccountToChange = $this->GetAccountFromCustomToken($aAccounts[$sParentEmail], false, false);
- if ($oAccountToChange)
- {
- $this->AuthToken($oAccountToChange);
- }
- }
-
- $this->SetAccounts($oAccount, $aAccounts);
- return $this->TrueResponse(__FUNCTION__, array('Reload' => !!$oAccountToChange));
- }
-
- return $this->FalseResponse(__FUNCTION__);
- }
-
- /**
- * @return array
- *
- * @throws \MailSo\Base\Exceptions\Exception
- */
- public function DoAttachmentsActions()
- {
- if (!$this->GetCapa(false, false, \RainLoop\Enumerations\Capa::ATTACHMENTS_ACTIONS))
- {
- return $this->FalseResponse(__FUNCTION__);
- }
-
- $oAccount = $this->initMailClientConnection();
-
- $sAction = $this->GetActionParam('Do', '');
- $aHashes = $this->GetActionParam('Hashes', null);
-
- $mResult = false;
- $bError = false;
- $aData = false;
-
- if (\is_array($aHashes) && 0 < \count($aHashes))
- {
- $aData = array();
- foreach ($aHashes as $sZipHash)
- {
- $aResult = $this->getMimeFileByHash($oAccount, $sZipHash);
- if (\is_array($aResult) && !empty($aResult['FileHash']))
- {
- $aData[] = $aResult;
- }
- else
- {
- $bError = true;
- break;
- }
- }
- }
-
- $oFilesProvider = $this->FilesProvider();
- if (!empty($sAction) && !$bError && \is_array($aData) && 0 < \count($aData) &&
- $oFilesProvider && $oFilesProvider->IsActive())
- {
-
- $bError = false;
- switch (\strtolower($sAction))
- {
- case 'zip':
-
- if (\class_exists('ZipArchive'))
- {
- $sZipHash = \MailSo\Base\Utils::Md5Rand();
- $sZipFileName = $oFilesProvider->GenerateLocalFullFileName($oAccount, $sZipHash);
-
- if (!empty($sZipFileName))
- {
- $oZip = new \ZipArchive();
- $oZip->open($sZipFileName, \ZIPARCHIVE::CREATE | \ZIPARCHIVE::OVERWRITE);
- $oZip->setArchiveComment('RainLoop/'.APP_VERSION);
-
- foreach ($aData as $aItem)
- {
- $sFileName = (string) (isset($aItem['FileName']) ? $aItem['FileName'] : 'file.dat');
- $sFileHash = (string) (isset($aItem['FileHash']) ? $aItem['FileHash'] : '');
-
- if (!empty($sFileHash))
- {
- $sFullFileNameHash = $oFilesProvider->GetFileName($oAccount, $sFileHash);
- if (!$oZip->addFile($sFullFileNameHash, $sFileName))
- {
- $bError = true;
- }
- }
- }
-
- if (!$bError)
- {
- $bError = !$oZip->close();
- }
- else
- {
- $oZip->close();
- }
- }
-
- foreach ($aData as $aItem)
- {
- $sFileHash = (string) (isset($aItem['FileHash']) ? $aItem['FileHash'] : '');
- if (!empty($sFileHash))
- {
- $oFilesProvider->Clear($oAccount, $sFileHash);
- }
- }
-
- if (!$bError)
- {
- $mResult = array(
- 'Files' => array(array(
- 'FileName' => 'attachments.zip',
- 'Hash' => \RainLoop\Utils::EncodeKeyValuesQ(array(
- 'V' => APP_VERSION,
- 'Account' => $oAccount ? \md5($oAccount->Hash()) : '',
- 'FileName' => 'attachments.zip',
- 'MimeType' => 'application/zip',
- 'FileHash' => $sZipHash
- ))
- ))
- );
- }
- }
- break;
-
- case 'owncloud':
-
- $mResult = false;
-
- if (\RainLoop\Utils::IsOwnCloudLoggedIn() && \class_exists('OCP\Files'))
- {
- $sSaveFolder = $this->Config()->Get('labs', 'owncloud_save_folder', '');
- if (empty($sSaveFolder))
- {
- $sSaveFolder = 'Attachments';
- }
-
- $oFiles = \OCP\Files::getStorage('files');
-
- if ($oFilesProvider && $oFiles && $oFilesProvider->IsActive() &&
- \method_exists($oFiles, 'file_put_contents'))
- {
- if (!$oFiles->is_dir($sSaveFolder))
- {
- $oFiles->mkdir($sSaveFolder);
- }
-
- $mResult = true;
- foreach ($aData as $aItem)
- {
- $sSavedFileName = isset($aItem['FileName']) ? $aItem['FileName'] : 'file.dat';
- $sSavedFileHash = !empty($aItem['FileHash']) ? $aItem['FileHash'] : '';
-
- if (!empty($sSavedFileHash))
- {
- $fFile = $oFilesProvider->GetFile($oAccount, $sSavedFileHash, 'rb');
- if (\is_resource($fFile))
- {
- $sSavedFileNameFull = \MailSo\Base\Utils::SmartFileExists($sSaveFolder.'/'.$sSavedFileName, function ($sPath) use ($oFiles) {
- return $oFiles->file_exists($sPath);
- });
-
- if (!$oFiles->file_put_contents($sSavedFileNameFull, $fFile))
- {
- $mResult = false;
- }
-
- if (\is_resource($fFile))
- {
- @\fclose($fFile);
- }
- }
- }
- }
- }
- }
-
- foreach ($aData as $aItem)
- {
- $sFileHash = (string) (isset($aItem['FileHash']) ? $aItem['FileHash'] : '');
- if (!empty($sFileHash))
- {
- $oFilesProvider->Clear($oAccount, $sFileHash);
- }
- }
-
- break;
-
- case 'dropbox':
-
- $mResult = array(
- 'ShortLife' => '_'.$this->GetShortLifeSpecAuthToken(),
- 'Url' => \preg_replace('/\?(.*)$/', '', $this->Http()->GetFullUrl()),
- 'Files' => array()
- );
-
- foreach ($aData as $aItem)
- {
- $mResult['Files'][] = array(
- 'FileName' => isset($aItem['FileName']) ? $aItem['FileName'] : 'file.dat',
- 'Hash' => \RainLoop\Utils::EncodeKeyValuesQ($aItem)
- );
- }
-
- break;
- }
- }
- else
- {
- $bError = true;
- }
-
- $this->requestSleep();
- return $this->DefaultResponse(__FUNCTION__, $bError ? false : $mResult);
- }
-
- /**
- * @return array
- *
- * @throws \MailSo\Base\Exceptions\Exception
- */
- public function DoIdentityUpdate()
- {
- $oAccount = $this->getAccountFromToken();
-
- $oIdentity = \RainLoop\Model\Identity::NewInstance();
- if (!$oIdentity->FromJSON($this->GetActionParams(), true))
- {
- throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::InvalidInputArgument);
- }
-
- $aIdentities = $this->GetIdentities($oAccount);
-
- $bAdded = false;
- $aIdentitiesForSave = array();
- foreach ($aIdentities as $oItem)
- {
- if ($oItem)
- {
- if ($oItem->Id() === $oIdentity->Id())
- {
- $aIdentitiesForSave[] = $oIdentity;
- $bAdded = true;
- }
- else
- {
- $aIdentitiesForSave[] = $oItem;
- }
- }
- }
-
- if (!$bAdded)
- {
- $aIdentitiesForSave[] = $oIdentity;
- }
-
- return $this->DefaultResponse(__FUNCTION__, $this->SetIdentities($oAccount, $aIdentitiesForSave));
- }
-
- /**
- * @return array
- *
- * @throws \MailSo\Base\Exceptions\Exception
- */
- public function DoIdentityDelete()
- {
- $oAccount = $this->getAccountFromToken();
-
- if (!$this->GetCapa(false, false, \RainLoop\Enumerations\Capa::IDENTITIES, $oAccount))
- {
- return $this->FalseResponse(__FUNCTION__);
- }
-
- $sId = \trim($this->GetActionParam('IdToDelete', ''));
- if (empty($sId))
- {
- throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::UnknownError);
- }
-
- $aNew = array();
- $aIdentities = $this->GetIdentities($oAccount);
-
- foreach ($aIdentities as $oItem)
- {
- if ($oItem && $sId !== $oItem->Id())
- {
- $aNew[] = $oItem;
- }
- }
-
- return $this->DefaultResponse(__FUNCTION__, $this->SetIdentities($oAccount, $aNew));
- }
-
- /**
- * @return array
- *
- * @throws \MailSo\Base\Exceptions\Exception
- */
- public function DoTemplateSetup()
- {
- $oAccount = $this->getAccountFromToken();
-
- if (!$this->GetCapa(false, false, \RainLoop\Enumerations\Capa::TEMPLATES, $oAccount))
- {
- return $this->FalseResponse(__FUNCTION__);
- }
-
- $oTemplate = \RainLoop\Model\Template::NewInstance();
- if (!$oTemplate->FromJSON($this->GetActionParams(), true))
- {
- throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::InvalidInputArgument);
- }
-
- if ('' === $oTemplate->Id())
- {
- $oTemplate->GenerateID();
- }
-
- $aTemplatesForSave = array();
- $aTemplates = $this->GetTemplates($oAccount);
-
-
- foreach ($aTemplates as $oItem)
- {
- if ($oItem && $oItem->Id() !== $oTemplate->Id())
- {
- $aTemplatesForSave[] = $oItem;
- }
- }
-
- $aTemplatesForSave[] = $oTemplate;
-
- return $this->DefaultResponse(__FUNCTION__, $this->SetTemplates($oAccount, $aTemplatesForSave));
- }
-
- /**
- * @return array
- *
- * @throws \MailSo\Base\Exceptions\Exception
- */
- public function DoTemplateDelete()
- {
- $oAccount = $this->getAccountFromToken();
-
- if (!$this->GetCapa(false, false, \RainLoop\Enumerations\Capa::TEMPLATES, $oAccount))
- {
- return $this->FalseResponse(__FUNCTION__);
- }
-
- $sId = \trim($this->GetActionParam('IdToDelete', ''));
- if (empty($sId))
- {
- throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::UnknownError);
- }
-
- $aNew = array();
- $aTemplates = $this->GetTemplates($oAccount);
- foreach ($aTemplates as $oItem)
- {
- if ($oItem && $sId !== $oItem->Id())
- {
- $aNew[] = $oItem;
- }
- }
-
- return $this->DefaultResponse(__FUNCTION__, $this->SetTemplates($oAccount, $aNew));
- }
-
- /**
- * @return array
- *
- * @throws \MailSo\Base\Exceptions\Exception
- */
- public function DoTemplateGetByID()
- {
- $oAccount = $this->getAccountFromToken();
-
- if (!$this->GetCapa(false, false, \RainLoop\Enumerations\Capa::TEMPLATES, $oAccount))
- {
- return $this->FalseResponse(__FUNCTION__);
- }
-
- $sId = \trim($this->GetActionParam('ID', ''));
- if (empty($sId))
- {
- throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::UnknownError);
- }
-
- $oTemplate = false;
- $aTemplates = $this->GetTemplates($oAccount);
-
- foreach ($aTemplates as $oItem)
- {
- if ($oItem && $sId === $oItem->Id())
- {
- $oTemplate = $oItem;
- break;
- }
- }
-
- $oTemplate->SetPopulateAlways(true);
- return $this->DefaultResponse(__FUNCTION__, $oTemplate);
- }
-
- /**
- * @return array
- *
- * @throws \MailSo\Base\Exceptions\Exception
- */
- public function DoAccountsAndIdentitiesSortOrder()
- {
- $oAccount = $this->getAccountFromToken();
-
- $aAccounts = $this->GetActionParam('Accounts', null);
- $aIdentities = $this->GetActionParam('Identities', null);
-
- if (!\is_array($aAccounts) && !\is_array($aIdentities))
- {
- return $this->FalseResponse(__FUNCTION__);
- }
-
- return $this->DefaultResponse(__FUNCTION__, $this->StorageProvider()->Put($oAccount,
- \RainLoop\Providers\Storage\Enumerations\StorageType::CONFIG, 'accounts_identities_order',
- \json_encode(array(
- 'Accounts' => \is_array($aAccounts) ? $aAccounts : array(),
- 'Identities' => \is_array($aIdentities) ? $aIdentities : array()
- ))
- ));
- }
-
- /**
- * @return array
- *
- * @throws \MailSo\Base\Exceptions\Exception
- */
- public function DoAccountsAndIdentities()
- {
- $oAccount = $this->getAccountFromToken();
-
- $mAccounts = false;
-
- if ($this->GetCapa(false, false, \RainLoop\Enumerations\Capa::ADDITIONAL_ACCOUNTS, $oAccount))
- {
- $mAccounts = $this->GetAccounts($oAccount);
- $mAccounts = \array_keys($mAccounts);
-
- foreach ($mAccounts as $iIndex => $sName)
- {
- $mAccounts[$iIndex] = \MailSo\Base\Utils::IdnToUtf8($sName);
- }
- }
-
- return $this->DefaultResponse(__FUNCTION__, array(
- 'Accounts' => $mAccounts,
- 'Identities' => $this->GetIdentities($oAccount)
- ));
- }
-
- /**
- * @return array
- *
- * @throws \MailSo\Base\Exceptions\Exception
- */
- public function DoTemplates()
- {
- $oAccount = $this->getAccountFromToken();
-
- if (!$this->GetCapa(false, false, \RainLoop\Enumerations\Capa::TEMPLATES, $oAccount))
- {
- return $this->FalseResponse(__FUNCTION__);
- }
-
- return $this->DefaultResponse(__FUNCTION__, array(
- 'Templates' => $this->GetTemplates($oAccount)
- ));
- }
-
- /**
- * @param string $sHash
- *
- * @return int
- *
- * @throws \MailSo\Base\Exceptions\Exception
- */
- public function getAccountUnredCountFromHash($sHash)
- {
- $iResult = 0;
-
- $oAccount = $this->GetAccountFromCustomToken($sHash, false);
- if ($oAccount)
- {
- try
- {
- $oMailClient = \MailSo\Mail\MailClient::NewInstance();
- $oMailClient->SetLogger($this->Logger());
-
- $oAccount->IncConnectAndLoginHelper($this->Plugins(),$oMailClient, $this->Config());
-
- $iResult = $oMailClient->InboxUnreadCount();
-
- $oMailClient->LogoutAndDisconnect();
- }
- catch (\Exception $oException)
- {
- $this->Logger()->WriteException($oException);
- }
- }
-
- return $iResult;
- }
-
- /**
- * @return array
- *
- * @throws \MailSo\Base\Exceptions\Exception
- */
- public function DoAccountsCounts()
- {
- $oAccount = $this->getAccountFromToken();
-
- $bComplete = true;
- $aCounts = array();
-
- if ($this->GetCapa(false, false, \RainLoop\Enumerations\Capa::ADDITIONAL_ACCOUNTS, $oAccount))
- {
- $iLimit = 7;
- $mAccounts = $this->GetAccounts($oAccount);
- if (\is_array($mAccounts) && 0 < \count($mAccounts))
- {
- if ($iLimit > \count($mAccounts))
- {
- $mAccounts = \array_slice($mAccounts, 0, $iLimit);
- }
- else
- {
- $bComplete = false;
- }
-
- if (0 < \count($mAccounts))
- {
- foreach ($mAccounts as $sEmail => $sHash)
- {
- $aCounts[] = array(\MailSo\Base\Utils::IdnToUtf8($sEmail),
- $oAccount->Email() === $sEmail ? 0 : $this->getAccountUnredCountFromHash($sHash));
- }
- }
- }
- }
- else
- {
- $aCounts[] = array(\MailSo\Base\Utils::IdnToUtf8($oAccount->Email()), 0);
- }
-
- return $this->DefaultResponse(__FUNCTION__, array(
- 'Complete' => $bComplete,
- 'Counts' => $aCounts
- ));
- }
-
- /**
- * @param \RainLoop\Model\Account $oAccount
- */
- public function ClearSignMeData($oAccount)
- {
- if ($oAccount)
- {
- \RainLoop\Utils::ClearCookie(\RainLoop\Actions::AUTH_SIGN_ME_TOKEN_KEY);
-
- $this->StorageProvider()->Clear($oAccount,
- \RainLoop\Providers\Storage\Enumerations\StorageType::CONFIG,
- 'sign_me'
- );
- }
- }
-
- /**
- * @return array
- */
- public function DoLogout()
- {
- $oAccount = $this->getAccountFromToken(false);
- if ($oAccount)
- {
- if ($oAccount->SignMe())
- {
- $this->ClearSignMeData($oAccount);
- }
-
- if (!$oAccount->IsAdditionalAccount())
- {
- \RainLoop\Utils::ClearCookie(\RainLoop\Actions::AUTH_SPEC_TOKEN_KEY);
- }
- }
-
- return $this->TrueResponse(__FUNCTION__);
- }
-
- /**
- * @return array
- */
- public function DoAppDelayStart()
- {
- $this->Plugins()->RunHook('service.app-delay-start-begin');
-
- \RainLoop\Utils::UpdateConnectionToken();
-
- $bMainCache = false;
- $bFilesCache = false;
- $bVersionsCache = false;
-
- $iOneDay1 = 60 * 60 * 23;
- $iOneDay2 = 60 * 60 * 25;
- $iOneDay3 = 60 * 60 * 30;
-
- $sTimers = $this->StorageProvider()->Get(null,
- \RainLoop\Providers\Storage\Enumerations\StorageType::NOBODY, 'Cache/Timers', '');
-
- $aTimers = \explode(',', $sTimers);
-
- $iMainCacheTime = !empty($aTimers[0]) && \is_numeric($aTimers[0]) ? (int) $aTimers[0] : 0;
- $iFilesCacheTime = !empty($aTimers[1]) && \is_numeric($aTimers[1]) ? (int) $aTimers[1] : 0;
- $iVersionsCacheTime = !empty($aTimers[2]) && \is_numeric($aTimers[2]) ? (int) $aTimers[2] : 0;
-
- if (0 === $iMainCacheTime || $iMainCacheTime + $iOneDay1 < \time())
- {
- $bMainCache = true;
- $iMainCacheTime = \time();
- }
-
- if (0 === $iFilesCacheTime || $iFilesCacheTime + $iOneDay2 < \time())
- {
- $bFilesCache = true;
- $iFilesCacheTime = \time();
- }
-
- if (0 === $iVersionsCacheTime || $iVersionsCacheTime + $iOneDay3 < \time())
- {
- $bVersionsCache = true;
- $iVersionsCacheTime = \time();
- }
-
- if ($bMainCache || $bFilesCache || $bVersionsCache)
- {
- if (!$this->StorageProvider()->Put(null,
- \RainLoop\Providers\Storage\Enumerations\StorageType::NOBODY, 'Cache/Timers',
- \implode(',', array($iMainCacheTime, $iFilesCacheTime, $iVersionsCacheTime))))
- {
- $bMainCache = $bFilesCache = $bVersionsCache = false;
- }
- }
-
- if ($bMainCache)
- {
- $this->Logger()->Write('Cacher GC: Begin');
- $this->Cacher()->GC(48);
- $this->Logger()->Write('Cacher GC: End');
- }
- else if ($bFilesCache)
- {
- $this->Logger()->Write('Files GC: Begin');
- $this->FilesProvider()->GC(48);
- $this->Logger()->Write('Files GC: End');
- }
- else if ($bVersionsCache)
- {
- $oPremProvider = $this->PremProvider();
- if ($oPremProvider)
- {
- $oPremProvider->ClearOldVersion();
- }
- }
-
- $this->Plugins()->RunHook('service.app-delay-start-end');
-
- return $this->TrueResponse(__FUNCTION__);
- }
-
- /**
- * @return array
- */
- public function DoSystemFoldersUpdate()
- {
- $oAccount = $this->getAccountFromToken();
-
- $oSettingsLocal = $this->SettingsProvider(true)->Load($oAccount);
-
- $oSettingsLocal->SetConf('SentFolder', $this->GetActionParam('SentFolder', ''));
- $oSettingsLocal->SetConf('DraftFolder', $this->GetActionParam('DraftFolder', ''));
- $oSettingsLocal->SetConf('SpamFolder', $this->GetActionParam('SpamFolder', ''));
- $oSettingsLocal->SetConf('TrashFolder', $this->GetActionParam('TrashFolder', ''));
- $oSettingsLocal->SetConf('ArchiveFolder', $this->GetActionParam('ArchiveFolder', ''));
- $oSettingsLocal->SetConf('NullFolder', $this->GetActionParam('NullFolder', ''));
-
- return $this->DefaultResponse(__FUNCTION__,
- $this->SettingsProvider(true)->Save($oAccount, $oSettingsLocal));
- }
-
- /**
- * @param \RainLoop\Config\Application $oConfig
- * @param string $sParamName
- * @param string $sConfigSector
- * @param string $sConfigName
- * @param string $sType = 'string'
- * @param callable|null $mStringCallback = null
- */
- public function setConfigFromParams(&$oConfig, $sParamName, $sConfigSector, $sConfigName, $sType = 'string', $mStringCallback = null)
- {
- $sValue = $this->GetActionParam($sParamName, '');
- if ($this->HasActionParam($sParamName))
- {
- switch ($sType)
- {
- default:
- case 'string':
- $sValue = (string) $sValue;
- if ($mStringCallback && is_callable($mStringCallback))
- {
- $sValue = call_user_func($mStringCallback, $sValue);
- }
-
- $oConfig->Set($sConfigSector, $sConfigName, (string) $sValue);
- break;
-
- case 'dummy':
- $sValue = (string) $this->GetActionParam('ContactsPdoPassword', APP_DUMMY);
- if (APP_DUMMY !== $sValue)
- {
- $oConfig->Set($sConfigSector, $sConfigName, (string) $sValue);
- }
- break;
-
- case 'int':
- $iValue = (int) $sValue;
- $oConfig->Set($sConfigSector, $sConfigName, $iValue);
- break;
-
- case 'bool':
- $oConfig->Set($sConfigSector, $sConfigName, '1' === (string) $sValue);
- break;
- }
- }
- }
-
- /**
- * @param \RainLoop\Config\Application $oConfig
- * @param string $sParamName
- * @param string $sCapa
- */
- private function setCapaFromParams(&$oConfig, $sParamName, $sCapa)
- {
- switch ($sCapa)
- {
- case \RainLoop\Enumerations\Capa::ADDITIONAL_ACCOUNTS:
- $this->setConfigFromParams($oConfig, $sParamName, 'webmail', 'allow_additional_accounts', 'bool');
- break;
- case \RainLoop\Enumerations\Capa::IDENTITIES:
- $this->setConfigFromParams($oConfig, $sParamName, 'webmail', 'allow_additional_identities', 'bool');
- break;
- case \RainLoop\Enumerations\Capa::TEMPLATES:
- $this->setConfigFromParams($oConfig, $sParamName, 'capa', 'x-templates', 'bool');
- break;
- case \RainLoop\Enumerations\Capa::TWO_FACTOR:
- $this->setConfigFromParams($oConfig, $sParamName, 'security', 'allow_two_factor_auth', 'bool');
- break;
- case \RainLoop\Enumerations\Capa::TWO_FACTOR_FORCE:
- $this->setConfigFromParams($oConfig, $sParamName, 'security', 'force_two_factor_auth', 'bool');
- break;
- case \RainLoop\Enumerations\Capa::GRAVATAR:
- $this->setConfigFromParams($oConfig, $sParamName, 'labs', 'allow_gravatar', 'bool');
- break;
- case \RainLoop\Enumerations\Capa::ATTACHMENT_THUMBNAILS:
- $this->setConfigFromParams($oConfig, $sParamName, 'interface', 'show_attachment_thumbnail', 'bool');
- break;
- case \RainLoop\Enumerations\Capa::THEMES:
- $this->setConfigFromParams($oConfig, $sParamName, 'webmail', 'allow_themes', 'bool');
- break;
- case \RainLoop\Enumerations\Capa::USER_BACKGROUND:
- $this->setConfigFromParams($oConfig, $sParamName, 'webmail', 'allow_user_background', 'bool');
- break;
- case \RainLoop\Enumerations\Capa::OPEN_PGP:
- $this->setConfigFromParams($oConfig, $sParamName, 'security', 'openpgp', 'bool');
- break;
- }
- }
-
- /**
- * @param \RainLoop\Settings $oSettings
- * @param string $sConfigName
- * @param string $sType = 'string'
- * @param callable|null $mStringCallback = null
- */
- private function setSettingsFromParams(&$oSettings, $sConfigName, $sType = 'string', $mStringCallback = null)
- {
- if ($this->HasActionParam($sConfigName))
- {
- $sValue = $this->GetActionParam($sConfigName, '');
- switch ($sType)
- {
- default:
- case 'string':
- $sValue = (string) $sValue;
- if ($mStringCallback && is_callable($mStringCallback))
- {
- $sValue = call_user_func($mStringCallback, $sValue);
- }
-
- $oSettings->SetConf($sConfigName, (string) $sValue);
- break;
-
- case 'int':
- $iValue = (int) $sValue;
- $oSettings->SetConf($sConfigName, $iValue);
- break;
-
- case 'bool':
- $oSettings->SetConf($sConfigName, '1' === (string) $sValue);
- break;
- }
- }
- }
-
- /**
- * @return array
- */
- public function DoAdminSettingsUpdate()
- {
-// sleep(3);
-// return $this->DefaultResponse(__FUNCTION__, false);
-
- $this->IsAdminLoggined();
-
- $oConfig = $this->Config();
-
- $self = $this;
-
- $this->setConfigFromParams($oConfig, 'Language', 'webmail', 'language', 'string', function ($sLanguage) use ($self) {
- return $self->ValidateLanguage($sLanguage, '', false);
- });
-
- $this->setConfigFromParams($oConfig, 'LanguageAdmin', 'webmail', 'language_admin', 'string', function ($sLanguage) use ($self) {
- return $self->ValidateLanguage($sLanguage, '', true);
- });
-
- $this->setConfigFromParams($oConfig, 'Theme', 'webmail', 'theme', 'string', function ($sTheme) use ($self) {
- return $self->ValidateTheme($sTheme);
- });
-
- $this->setConfigFromParams($oConfig, 'VerifySslCertificate', 'ssl', 'verify_certificate', 'bool');
- $this->setConfigFromParams($oConfig, 'AllowSelfSigned', 'ssl', 'allow_self_signed', 'bool');
-
- $this->setConfigFromParams($oConfig, 'UseLocalProxyForExternalImages', 'labs', 'use_local_proxy_for_external_images', 'bool');
-
- $this->setConfigFromParams($oConfig, 'AllowLanguagesOnSettings', 'webmail', 'allow_languages_on_settings', 'bool');
- $this->setConfigFromParams($oConfig, 'AllowLanguagesOnLogin', 'login', 'allow_languages_on_login', 'bool');
- $this->setConfigFromParams($oConfig, 'AttachmentLimit', 'webmail', 'attachment_size_limit', 'int');
-
- $this->setConfigFromParams($oConfig, 'LoginDefaultDomain', 'login', 'default_domain', 'string');
-
- $this->setConfigFromParams($oConfig, 'ContactsEnable', 'contacts', 'enable', 'bool');
- $this->setConfigFromParams($oConfig, 'ContactsSharing', 'contacts', 'allow_sharing', 'bool');
- $this->setConfigFromParams($oConfig, 'ContactsSync', 'contacts', 'allow_sync', 'bool');
- $this->setConfigFromParams($oConfig, 'ContactsPdoDsn', 'contacts', 'pdo_dsn', 'string');
- $this->setConfigFromParams($oConfig, 'ContactsPdoUser', 'contacts', 'pdo_user', 'string');
- $this->setConfigFromParams($oConfig, 'ContactsPdoPassword', 'contacts', 'pdo_password', 'dummy');
-
- $this->setConfigFromParams($oConfig, 'ContactsPdoType', 'contacts', 'type', 'string', function ($sType) use ($self) {
- return $self->ValidateContactPdoType($sType);
- });
-
- $this->setCapaFromParams($oConfig, 'CapaAdditionalAccounts', \RainLoop\Enumerations\Capa::ADDITIONAL_ACCOUNTS);
- $this->setCapaFromParams($oConfig, 'CapaIdentities', \RainLoop\Enumerations\Capa::IDENTITIES);
- $this->setCapaFromParams($oConfig, 'CapaTemplates', \RainLoop\Enumerations\Capa::TEMPLATES);
- $this->setCapaFromParams($oConfig, 'CapaTwoFactorAuth', \RainLoop\Enumerations\Capa::TWO_FACTOR);
- $this->setCapaFromParams($oConfig, 'CapaTwoFactorAuthForce', \RainLoop\Enumerations\Capa::TWO_FACTOR_FORCE);
- $this->setCapaFromParams($oConfig, 'CapaOpenPGP', \RainLoop\Enumerations\Capa::OPEN_PGP);
- $this->setCapaFromParams($oConfig, 'CapaGravatar', \RainLoop\Enumerations\Capa::GRAVATAR);
- $this->setCapaFromParams($oConfig, 'CapaThemes', \RainLoop\Enumerations\Capa::THEMES);
- $this->setCapaFromParams($oConfig, 'CapaUserBackground', \RainLoop\Enumerations\Capa::USER_BACKGROUND);
- $this->setCapaFromParams($oConfig, 'CapaAttachmentThumbnails', \RainLoop\Enumerations\Capa::ATTACHMENT_THUMBNAILS);
-
- $this->setConfigFromParams($oConfig, 'DetermineUserLanguage', 'login', 'determine_user_language', 'bool');
- $this->setConfigFromParams($oConfig, 'DetermineUserDomain', 'login', 'determine_user_domain', 'bool');
-
- $this->setConfigFromParams($oConfig, 'Title', 'webmail', 'title', 'string');
- $this->setConfigFromParams($oConfig, 'LoadingDescription', 'webmail', 'loading_description', 'string');
- $this->setConfigFromParams($oConfig, 'FaviconUrl', 'webmail', 'favicon_url', 'string');
-
- $this->setConfigFromParams($oConfig, 'TokenProtection', 'security', 'csrf_protection', 'bool');
- $this->setConfigFromParams($oConfig, 'EnabledPlugins', 'plugins', 'enable', 'bool');
-
- $this->setConfigFromParams($oConfig, 'GoogleEnable', 'social', 'google_enable', 'bool');
- $this->setConfigFromParams($oConfig, 'GoogleEnableAuth', 'social', 'google_enable_auth', 'bool');
- $this->setConfigFromParams($oConfig, 'GoogleEnableAuthFast', 'social', 'google_enable_auth_fast', 'bool');
- $this->setConfigFromParams($oConfig, 'GoogleEnableDrive', 'social', 'google_enable_drive', 'bool');
- $this->setConfigFromParams($oConfig, 'GoogleEnablePreview', 'social', 'google_enable_preview', 'bool');
- $this->setConfigFromParams($oConfig, 'GoogleClientID', 'social', 'google_client_id', 'string');
- $this->setConfigFromParams($oConfig, 'GoogleClientSecret', 'social', 'google_client_secret', 'string');
- $this->setConfigFromParams($oConfig, 'GoogleApiKey', 'social', 'google_api_key', 'string');
-
- $this->setConfigFromParams($oConfig, 'FacebookEnable', 'social', 'fb_enable', 'bool');
- $this->setConfigFromParams($oConfig, 'FacebookAppID', 'social', 'fb_app_id', 'string');
- $this->setConfigFromParams($oConfig, 'FacebookAppSecret', 'social', 'fb_app_secret', 'string');
-
- $this->setConfigFromParams($oConfig, 'TwitterEnable', 'social', 'twitter_enable', 'bool');
- $this->setConfigFromParams($oConfig, 'TwitterConsumerKey', 'social', 'twitter_consumer_key', 'string');
- $this->setConfigFromParams($oConfig, 'TwitterConsumerSecret', 'social', 'twitter_consumer_secret', 'string');
-
- $this->setConfigFromParams($oConfig, 'DropboxEnable', 'social', 'dropbox_enable', 'bool');
- $this->setConfigFromParams($oConfig, 'DropboxApiKey', 'social', 'dropbox_api_key', 'string');
-
- $oPremProvider = $this->PremProvider();
- if ($oPremProvider)
- {
- $oPremProvider->PremSection($this, $oConfig);
- }
-
- return $this->DefaultResponse(__FUNCTION__, $oConfig->Save());
- }
-
- /**
- * @return array
- *
- * @throws \MailSo\Base\Exceptions\Exception
- */
- public function DoAdminLogin()
- {
- $sLogin = trim($this->GetActionParam('Login', ''));
- $sPassword = $this->GetActionParam('Password', '');
-
- $this->Logger()->AddSecret($sPassword);
-
- if (0 === strlen($sLogin) || 0 === strlen($sPassword) ||
- !$this->Config()->Get('security', 'allow_admin_panel', true) ||
- $sLogin !== $this->Config()->Get('security', 'admin_login', '') ||
- !$this->Config()->ValidatePassword($sPassword))
- {
- $this->loginErrorDelay();
- $this->LoggerAuthHelper(null, $this->getAdditionalLogParamsByUserLogin($sLogin, true));
- throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::AuthError);
- }
-
- $sToken = $this->getAdminToken();
- $this->setAdminAuthToken($sToken);
-
- return $this->DefaultResponse(__FUNCTION__, $sToken ? true : false);
- }
-
- /**
- * @return array
- */
- public function DoAdminLogout()
- {
- $this->ClearAdminAuthToken();
- return $this->TrueResponse(__FUNCTION__);
- }
-
- /**
- * @return array
- */
- public function DoAdminPing()
- {
- $this->IsAdminLoggined();
-
- return $this->DefaultResponse(__FUNCTION__, true);
- }
-
- /**
- * @return array
- */
- public function DoAdminContactsTest()
- {
- $this->IsAdminLoggined();
-
- $oConfig = $this->Config();
-
- $this->setConfigFromParams($oConfig, 'ContactsPdoDsn', 'contacts', 'pdo_dsn', 'string');
- $this->setConfigFromParams($oConfig, 'ContactsPdoUser', 'contacts', 'pdo_user', 'string');
- $this->setConfigFromParams($oConfig, 'ContactsPdoPassword', 'contacts', 'pdo_password', 'dummy');
-
- $self = $this;
- $this->setConfigFromParams($oConfig, 'ContactsPdoType', 'contacts', 'type', 'string', function ($sType) use ($self) {
- return $self->ValidateContactPdoType($sType);
- });
-
- $sTestMessage = $this->AddressBookProvider(null, true)->Test();
- return $this->DefaultResponse(__FUNCTION__, array(
- 'Result' => '' === $sTestMessage,
- 'Message' => \MailSo\Base\Utils::Utf8Clear($sTestMessage, '?')
- ));
- }
-
- /**
- * @return array
- */
- public function DoAdminLicensing()
- {
- $this->IsAdminLoggined();
-
- $bForce = '1' === (string) $this->GetActionParam('Force', '0');
-
- $mResult = false;
- $iErrorCode = -1;
-
- $oPremProvider = $this->PremProvider();
-
- if ($oPremProvider && 2 < \strlen(APP_SITE))
- {
- $sValue = $oPremProvider->Fetcher($bForce);
-
- $this->requestSleep();
-
- $iExpired = 0;
- if ($oPremProvider->Parser($sValue, $iExpired))
- {
- $mResult = array(
- 'Banned' => false,
- 'Expired' => $iExpired,
- );
- }
- else if ($sValue === 'NO' || \preg_match('/^EXPIRED:[\d]+$/', $sValue))
- {
- $iErrorCode = -1;
- }
- else if ($sValue === 'TOO_MANY_CONNECTIONS')
- {
- $iErrorCode = -1;
- }
- else
- {
- $iErrorCode = \RainLoop\Notifications::LicensingServerIsUnavailable;
- }
- }
-
- if (0 < $iErrorCode && !$mResult)
- {
- throw new \RainLoop\Exceptions\ClientException($iErrorCode);
- }
-
- return $this->DefaultResponse(__FUNCTION__, $mResult);
- }
-
- /**
- * @return array
- */
- public function DoAdminLicensingActivate()
- {
- $this->IsAdminLoggined();
-
- $sDomain = (string) $this->GetActionParam('Domain', '');
- $sKey = (string) $this->GetActionParam('Key', '');
-
- $mResult = false;
- $iErrorCode = -1;
-
- $oPrem = $this->PremProvider();
-
- if ($oPrem && 2 < \strlen($sDomain) && 2 < \strlen($sKey) && $sDomain === APP_SITE)
- {
- $iCode = 0;
- $sValue = $oPrem->Activate($sDomain, $sKey, $iCode);
-
- $this->requestSleep();
-
- $aMatch = array();
- if ('OK' === $sValue)
- {
- $mResult = true;
- }
- else if ('TOO_MANY_CONNECTIONS' === $sValue)
- {
- $mResult = 'Too many connections. Please try again later.';
- }
- else if (\preg_match('/^ERROR:(.+)$/', $sValue, $aMatch) && !empty($aMatch[1]))
- {
- $mResult = trim($aMatch[1]);
-
- $this->Logger()->Write('Activation error for: '.$sKey.' ('.$sDomain.')', \MailSo\Log\Enumerations\Type::ERROR);
- $this->Logger()->Write($mResult, \MailSo\Log\Enumerations\Type::ERROR);
- }
- else
- {
- $iErrorCode = \RainLoop\Notifications::LicensingServerIsUnavailable;
- }
- }
-
- if (0 < $iErrorCode && !$mResult)
- {
- throw new \RainLoop\Exceptions\ClientException($iErrorCode);
- }
-
- return $this->DefaultResponse(__FUNCTION__, $mResult);
- }
-
- /**
- * @return array
- */
- public function DoAdminPasswordUpdate()
- {
- $this->IsAdminLoggined();
-
- $bResult = false;
- $oConfig = $this->Config();
-
- $sLogin = \trim($this->GetActionParam('Login', ''));
- $sPassword = $this->GetActionParam('Password', '');
- $this->Logger()->AddSecret($sPassword);
-
- $sNewPassword = $this->GetActionParam('NewPassword', '');
- if (0 < \strlen(\trim($sNewPassword)))
- {
- $this->Logger()->AddSecret($sNewPassword);
- }
-
- if ($oConfig->ValidatePassword($sPassword))
- {
- if (0 < \strlen($sLogin))
- {
- $oConfig->Set('security', 'admin_login', $sLogin);
- }
-
- if (0 < \strlen(\trim($sNewPassword)))
- {
- $oConfig->SetPassword($sNewPassword);
- }
-
- $bResult = true;
- }
-
- return $this->DefaultResponse(__FUNCTION__, $bResult ?
- ($oConfig->Save() ? array('Weak' => $oConfig->ValidatePassword('12345')) : false) : false);
- }
-
- /**
- * @return array
- */
- public function DoAdminDomainLoad()
- {
- $this->IsAdminLoggined();
-
- return $this->DefaultResponse(__FUNCTION__,
- $this->DomainProvider()->Load($this->GetActionParam('Name', ''), false, false));
- }
-
- /**
- * @return array
- */
- public function DoAdminDomainList()
- {
- $this->IsAdminLoggined();
-
- $iOffset = (int) $this->GetActionParam('Offset', 0);
- $iLimit = (int) $this->GetActionParam('Limit', 20);
- $sSearch = (string) $this->GetActionParam('Search', '');
- $bIncludeAliases = '1' === (string) $this->GetActionParam('IncludeAliases', '1');
-
- $iOffset = 0;
- $sSearch = '';
- $iLimit = $this->Config()->Get('labs', 'domain_list_limit', 99);
-
- return $this->DefaultResponse(__FUNCTION__,
- $this->DomainProvider()->GetList($iOffset, $iLimit, $sSearch, $bIncludeAliases));
- }
-
- /**
- * @return array
- */
- public function DoAdminDomainDelete()
- {
- $this->IsAdminLoggined();
-
- return $this->DefaultResponse(__FUNCTION__,
- $this->DomainProvider()->Delete((string) $this->GetActionParam('Name', '')));
- }
-
- /**
- * @return array
- */
- public function DoAdminDomainDisable()
- {
- $this->IsAdminLoggined();
-
- return $this->DefaultResponse(__FUNCTION__, $this->DomainProvider()->Disable(
- (string) $this->GetActionParam('Name', ''),
- '1' === (string) $this->GetActionParam('Disabled', '0')
- ));
- }
-
- /**
- * @return array
- */
- public function DoAdminDomainSave()
- {
- $this->IsAdminLoggined();
-
- $oDomain = $this->DomainProvider()->LoadOrCreateNewFromAction($this);
-
- return $this->DefaultResponse(__FUNCTION__,
- $oDomain instanceof \RainLoop\Model\Domain ? $this->DomainProvider()->Save($oDomain) : false);
- }
-
- /**
- * @return array
- */
- public function DoAdminDomainAliasSave()
- {
- $this->IsAdminLoggined();
-
- return $this->DefaultResponse(__FUNCTION__, $this->DomainProvider()->SaveAlias(
- (string) $this->GetActionParam('Name', ''),
- (string) $this->GetActionParam('Alias', '')
- ));
- }
-
- /**
- * @return array
- */
- public function DoAdminDomainTest()
- {
- $this->IsAdminLoggined();
-
- $bImapResult = false;
- $sImapErrorDesc = '';
- $bSmtpResult = false;
- $sSmtpErrorDesc = '';
- $bSieveResult = false;
- $sSieveErrorDesc = '';
-
- $iImapTime = 0;
- $iSmtpTime = 0;
- $iSieveTime = 0;
-
- $iConnectionTimeout = 5;
-
- $oDomain = $this->DomainProvider()->LoadOrCreateNewFromAction($this, 'domain-test-connection.de');
- if ($oDomain)
- {
- try
- {
- $oImapClient = \MailSo\Imap\ImapClient::NewInstance()->SetLogger($this->Logger());
- $oImapClient->SetTimeOuts($iConnectionTimeout);
-
- $iTime = \microtime(true);
- $oImapClient->Connect($oDomain->IncHost(), $oDomain->IncPort(), $oDomain->IncSecure(),
- !!$this->Config()->Get('ssl', 'verify_certificate', false),
- !!$this->Config()->Get('ssl', 'allow_self_signed', true)
- );
-
- $iImapTime = \microtime(true) - $iTime;
- $oImapClient->Disconnect();
- $bImapResult = true;
- }
- catch (\MailSo\Net\Exceptions\SocketCanNotConnectToHostException $oException)
- {
- $this->Logger()->WriteException($oException, \MailSo\Log\Enumerations\Type::ERROR);
- $sImapErrorDesc = $oException->getSocketMessage();
- if (empty($sImapErrorDesc))
- {
- $sImapErrorDesc = $oException->getMessage();
- }
- }
- catch (\Exception $oException)
- {
- $this->Logger()->WriteException($oException, \MailSo\Log\Enumerations\Type::ERROR);
- $sImapErrorDesc = $oException->getMessage();
- }
-
- if ($oDomain->OutUsePhpMail())
- {
- $bSmtpResult = \MailSo\Base\Utils::FunctionExistsAndEnabled('mail');
- if (!$bSmtpResult)
- {
- $sSmtpErrorDesc = 'PHP: mail() function is undefined';
- }
- }
- else
- {
- try
- {
- $oSmtpClient = \MailSo\Smtp\SmtpClient::NewInstance()->SetLogger($this->Logger());
- $oSmtpClient->SetTimeOuts($iConnectionTimeout);
-
- $iTime = \microtime(true);
- $oSmtpClient->Connect($oDomain->OutHost(), $oDomain->OutPort(),
- \MailSo\Smtp\SmtpClient::EhloHelper(), $oDomain->OutSecure(),
- !!$this->Config()->Get('ssl', 'verify_certificate', false),
- !!$this->Config()->Get('ssl', 'allow_self_signed', true)
- );
-
- $iSmtpTime = \microtime(true) - $iTime;
- $oSmtpClient->Disconnect();
- $bSmtpResult = true;
- }
- catch (\MailSo\Net\Exceptions\SocketCanNotConnectToHostException $oException)
- {
- $this->Logger()->WriteException($oException, \MailSo\Log\Enumerations\Type::ERROR);
- $sSmtpErrorDesc = $oException->getSocketMessage();
- if (empty($sSmtpErrorDesc))
- {
- $sSmtpErrorDesc = $oException->getMessage();
- }
- }
- catch (\Exception $oException)
- {
- $this->Logger()->WriteException($oException, \MailSo\Log\Enumerations\Type::ERROR);
- $sSmtpErrorDesc = $oException->getMessage();
- }
- }
-
- if ($oDomain->UseSieve())
- {
- try
- {
- $oSieveClient = \MailSo\Sieve\ManageSieveClient::NewInstance()->SetLogger($this->Logger());
- $oSieveClient->SetTimeOuts($iConnectionTimeout);
-
- $iTime = \microtime(true);
- $oSieveClient->Connect($oDomain->SieveHost(), $oDomain->SievePort(), $oDomain->SieveSecure(),
- !!$this->Config()->Get('ssl', 'verify_certificate', false),
- !!$this->Config()->Get('ssl', 'allow_self_signed', true)
- );
-
- $iSieveTime = \microtime(true) - $iTime;
- $oSieveClient->Disconnect();
- $bSieveResult = true;
- }
- catch (\MailSo\Net\Exceptions\SocketCanNotConnectToHostException $oException)
- {
- $this->Logger()->WriteException($oException, \MailSo\Log\Enumerations\Type::ERROR);
- $sSieveErrorDesc = $oException->getSocketMessage();
- if (empty($sSieveErrorDesc))
- {
- $sSieveErrorDesc = $oException->getMessage();
- }
- }
- catch (\Exception $oException)
- {
- $this->Logger()->WriteException($oException, \MailSo\Log\Enumerations\Type::ERROR);
- $sSieveErrorDesc = $oException->getMessage();
- }
- }
- else
- {
- $bSieveResult = true;
- }
- }
-
- return $this->DefaultResponse(__FUNCTION__, array(
- 'Imap' => $bImapResult ? true : $sImapErrorDesc,
- 'Smtp' => $bSmtpResult ? true : $sSmtpErrorDesc,
- 'Sieve' => $bSieveResult ? true : $sSieveErrorDesc
- ));
- }
-
- /**
- * @return string
- */
- private function rainLoopRepo()
- {
- $sUrl = APP_REPOSITORY_PATH;
- if ('' !== $sUrl)
- {
- $sUrl = rtrim($sUrl, '\\/').'/';
- }
-
- return $sUrl;
- }
-
- private function rainLoopUpdatable()
- {
- return @file_exists(APP_INDEX_ROOT_PATH.'index.php') &&
- @is_writable(APP_INDEX_ROOT_PATH.'index.php') &&
- @is_writable(APP_INDEX_ROOT_PATH.'rainloop/') &&
- APP_VERSION !== APP_DEV_VERSION
- ;
- }
-
- private function rainLoopCoreAccess()
- {
- $sCoreAccess = \strtolower(\preg_replace('/[\s,;]+/', ' ',
- $this->Config()->Get('security', 'core_install_access_domain', '')));
-
- return '' === $sCoreAccess || '*' === $sCoreAccess || APP_SITE === $sCoreAccess;
- }
-
- /**
- * @param string $sRepo
- * @param bool $bReal = false
- *
- * @return array
- */
- private function getRepositoryDataByUrl($sRepo, &$bReal = false)
- {
- $bReal = false;
- $aRep = null;
-
- $sRep = '';
- $sRepoFile = 'repository.json';
- $iRepTime = 0;
-
- $oHttp = \MailSo\Base\Http::SingletonInstance();
-
- $sCacheKey = \RainLoop\KeyPathHelper::RepositoryCacheFile($sRepo, $sRepoFile);
- $sRep = $this->Cacher()->Get($sCacheKey);
- if ('' !== $sRep)
- {
- $iRepTime = $this->Cacher()->GetTimer($sCacheKey);
- }
-
- if ('' === $sRep || 0 === $iRepTime || time() - 3600 > $iRepTime)
- {
- $iCode = 0;
- $sContentType = '';
-
- $sRepPath = $sRepo.$sRepoFile;
- $sRep = '' !== $sRepo ? $oHttp->GetUrlAsString($sRepPath, 'RainLoop', $sContentType, $iCode, $this->Logger(), 10,
- $this->Config()->Get('labs', 'curl_proxy', ''), $this->Config()->Get('labs', 'curl_proxy_auth', '')) : false;
-
- if (false !== $sRep)
- {
- $aRep = @\json_decode($sRep);
- $bReal = \is_array($aRep) && 0 < \count($aRep);
-
- if ($bReal)
- {
- $this->Cacher()->Set($sCacheKey, $sRep);
- $this->Cacher()->SetTimer($sCacheKey);
- }
- }
- else
- {
- $this->Logger()->Write('Cannot read remote repository file: '.$sRepPath, \MailSo\Log\Enumerations\Type::ERROR, 'INSTALLER');
- }
- }
- else if ('' !== $sRep)
- {
- $aRep = @\json_decode($sRep, false, 10);
- $bReal = \is_array($aRep) && 0 < \count($aRep);
- }
-
- $aResult = array();
- if (\is_array($aRep))
- {
- foreach ($aRep as $oItem)
- {
- if ($oItem && isset($oItem->type, $oItem->id, $oItem->name,
- $oItem->version, $oItem->release, $oItem->file, $oItem->description))
- {
- if (!empty($oItem->required) && APP_DEV_VERSION !== APP_VERSION && version_compare(APP_VERSION, $oItem->required, '<'))
- {
- continue;
- }
-
- if (!empty($oItem->depricated) && APP_DEV_VERSION !== APP_VERSION && version_compare(APP_VERSION, $oItem->depricated, '>='))
- {
- continue;
- }
-
- if ('plugin' === $oItem->type)
- {
- $aResult[] = array(
- 'type' => $oItem->type,
- 'id' => $oItem->id,
- 'name' => $oItem->name,
- 'installed' => '',
- 'version' => $oItem->version,
- 'file' => $oItem->file,
- 'release' => $oItem->release,
- 'desc' => $oItem->description
- );
- }
- }
- }
- }
-
- return $aResult;
- }
-
- /**
- * @return string
- */
- private function getCoreChannel()
- {
- $sChannel = \trim(\strtolower($this->Config()->Get('labs', 'update_channel', 'stable')));
- if (empty($sChannel) || !\in_array($sChannel, array('stable', 'beta')))
- {
- $sChannel = 'stable';
- }
-
- return $sChannel;
- }
-
- private function getCoreData(&$bReal)
- {
- $bReal = false;
-
- $sChannel = $this->getCoreChannel();
-
- $sRepo = \str_replace('{{channel}}', $sChannel, APP_REPO_CORE_FILE);
-
- $oHttp = \MailSo\Base\Http::SingletonInstance();
-
- $sCacheKey = \RainLoop\KeyPathHelper::RepositoryCacheCore($sRepo);
- $sRep = $this->Cacher()->Get($sCacheKey);
- if ('' !== $sRep)
- {
- $iRepTime = $this->Cacher()->GetTimer($sCacheKey);
- }
-
- if ('' === $sRep || 0 === $iRepTime || time() - 3600 > $iRepTime)
- {
- $iCode = 0;
- $sContentType = '';
-
- $sRep = '' !== $sRepo ? $oHttp->GetUrlAsString($sRepo, 'RainLoop', $sContentType, $iCode, $this->Logger(), 10,
- $this->Config()->Get('labs', 'curl_proxy', ''), $this->Config()->Get('labs', 'curl_proxy_auth', '')) : false;
-
- if (false !== $sRep)
- {
- $aRep = @\json_decode($sRep, true, 10);
- $bReal = \is_array($aRep) && 0 < \count($aRep) && isset($aRep['id']) && 'rainloop' === $aRep['id'];
-
- if ($bReal)
- {
- $this->Cacher()->Set($sCacheKey, $sRep);
- $this->Cacher()->SetTimer($sCacheKey);
- }
- }
- else
- {
- $this->Logger()->Write('Cannot read remote repository file: '.$sRepo, \MailSo\Log\Enumerations\Type::ERROR, 'INSTALLER');
- }
- }
- else if ('' !== $sRep)
- {
- $aRep = @\json_decode($sRep, true, 10);
- $bReal = \is_array($aRep) && 0 < \count($aRep) && isset($aRep['id']) && 'rainloop' === $aRep['id'];
- }
-
- return $bReal ? $aRep : false;
- }
-
- private function getRepositoryData(&$bReal, &$bRainLoopUpdatable)
- {
- $bRainLoopUpdatable = $this->rainLoopUpdatable();
-
- $aResult = $this->getRepositoryDataByUrl($this->rainLoopRepo(), $bReal);
-
- $aSub = array();
- if (\is_array($aResult))
- {
- foreach ($aResult as $aItem)
- {
- if ('plugin' === $aItem['type'])
- {
- $aSub[] = $aItem;
- }
- }
-
- $aResult = $aSub;
- unset($aSub);
- }
-
- $aInstalled = $this->Plugins()->InstalledPlugins();
- if (\is_array($aInstalled))
- {
- foreach ($aResult as &$aItem)
- {
- if ('plugin' === $aItem['type'])
- {
- foreach ($aInstalled as &$aSubItem)
- {
- if (\is_array($aSubItem) && isset($aSubItem[0]) && $aSubItem[0] === $aItem['id'])
- {
- $aSubItem[2] = true;
- $aItem['installed'] = $aSubItem[1];
- }
- }
- }
- }
-
- foreach ($aInstalled as $aSubItemSec)
- {
- if ($aSubItemSec && !isset($aSubItemSec[2]))
- {
- \array_push($aResult, array(
- 'type' => 'plugin',
- 'id' => $aSubItemSec[0],
- 'name' => $aSubItemSec[0],
- 'installed' => $aSubItemSec[1],
- 'version' => '',
- 'file' => '',
- 'release' => '',
- 'desc' => ''
- ));
- }
- }
- }
-
- foreach ($aResult as &$aItem)
- {
- $aItem['compare'] = \version_compare($aItem['installed'], $aItem['version'], '<');
- $aItem['canBeDeleted'] = '' !== $aItem['installed'] && 'plugin' === $aItem['type'];
- $aItem['canBeUpdated'] = $aItem['compare'];
- $aItem['canBeInstalled'] = true;
- }
-
- return $aResult;
- }
-
- /**
- * @return array
- */
- public function DoAdminPackagesList()
- {
- $this->IsAdminLoggined();
-
- $bReal = false;
- $bRainLoopUpdatable = false;
- $aList = $this->getRepositoryData($bReal, $bRainLoopUpdatable);
-
- return $this->DefaultResponse(__FUNCTION__, array(
- 'Real' => $bReal,
- 'MainUpdatable' => $bRainLoopUpdatable,
- 'List' => $aList
- ));
- }
-
- /**
- * @return array
- */
- public function DoAdminCoreData()
- {
- $this->IsAdminLoggined();
-
- $bReal = false;
- $aData = array();
-
- $bRainLoopUpdatable = $this->rainLoopUpdatable();
- $bRainLoopAccess = $this->rainLoopCoreAccess();
-
- if ($bRainLoopAccess)
- {
- $aData = $this->getCoreData($bReal);
- }
-
- $sVersion = empty($aData['version']) ? '' : $aData['version'];
- $sType = empty($aData['channel']) ? 'stable' : $aData['channel'];
-
- $sWarnings = empty($aData['warnings']) ? '' : $aData['warnings'];
- $aWarnings = $sWarnings ? explode('|', $sWarnings) : array();
-
- $sCurrentVersion = APP_VERSION;
-
- $bShowWarning = false;
- if ($sCurrentVersion !== APP_DEV_VERSION)
- {
- foreach ($aWarnings as $sWarningVersion)
- {
- $sWarningVersion = \trim($sWarningVersion);
-
- if (\version_compare($sCurrentVersion, $sWarningVersion, '<') &&
- \version_compare($sVersion, $sWarningVersion, '>='))
- {
- $bShowWarning = true;
- break;
- }
- }
- }
-
- return $this->DefaultResponse(__FUNCTION__, array(
- 'Real' => $bReal,
- 'Access' => $bRainLoopAccess,
- 'Updatable' => $bRainLoopUpdatable,
- 'Warning' => $bShowWarning,
- 'Channel' => $this->getCoreChannel(),
- 'Type' => $sType,
- 'Version' => $sCurrentVersion,
- 'RemoteVersion' => $sVersion,
- 'RemoteRelease' => empty($aData['release']) ? '' : $aData['release'],
- 'VersionCompare' => \version_compare($sCurrentVersion, $sVersion)
- ));
- }
-
- /**
- * @return array
- */
- public function DoAdminUpdateCoreData()
- {
- $this->IsAdminLoggined();
-
- $bReal = false;
-
- $bRainLoopUpdatable = $this->rainLoopUpdatable();
- $bRainLoopAccess = $this->rainLoopCoreAccess();
- $oPremProvider = $this->PremProvider();
-
- $aData = array();
- if ($bRainLoopUpdatable && $bRainLoopAccess)
- {
- $aData = $this->getCoreData($bReal);
- }
-
- $bResult = false;
- if ($bReal && $oPremProvider && !empty($aData['file']))
- {
- $bResult = $oPremProvider->UpdateCore($this, $aData['file']);
- }
-
- return $this->DefaultResponse(__FUNCTION__, $bResult);
- }
-
- /**
- * @return array
- */
- public function DoAdminPackageDelete()
- {
- $this->IsAdminLoggined();
-
- $sId = $this->GetActionParam('Id', '');
-
- $bReal = false;
- $bRainLoopUpdatable = false;
- $aList = $this->getRepositoryData($bReal, $bRainLoopUpdatable);
-
- $sResultId = '';
- foreach ($aList as $oItem)
- {
- if ($oItem && 'plugin' === $oItem['type'] && $sId === $oItem['id'])
- {
- $sResultId = $sId;
- break;
- }
- }
-
- $bResult = false;
- if ('' !== $sResultId)
- {
- $bResult = \MailSo\Base\Utils::RecRmDir(APP_PLUGINS_PATH.$sResultId);
- if ($bResult)
- {
- $this->pluginEnable($sResultId, false);
- }
- }
-
- return $this->DefaultResponse(__FUNCTION__, $bResult);
- }
-
- /**
- * @param string $sUrl
- *
- * @return string
- */
- public function downloadRemotePackageByUrl($sUrl)
- {
- $bResult = false;
- $sTmp = APP_PRIVATE_DATA.\md5(\microtime(true).$sUrl).'.zip';
- $pDest = @\fopen($sTmp, 'w+b');
- if ($pDest)
- {
- $iCode = 0;
- $sContentType = '';
-
- @\set_time_limit(120);
-
- $oHttp = \MailSo\Base\Http::SingletonInstance();
- $bResult = $oHttp->SaveUrlToFile($sUrl, $pDest, $sTmp, $sContentType, $iCode, $this->Logger(), 60,
- $this->Config()->Get('labs', 'curl_proxy', ''), $this->Config()->Get('labs', 'curl_proxy_auth', ''));
-
- if (!$bResult)
- {
- $this->Logger()->Write('Cannot save url to temp file: ', \MailSo\Log\Enumerations\Type::ERROR, 'INSTALLER');
- $this->Logger()->Write($sUrl.' -> '.$sTmp, \MailSo\Log\Enumerations\Type::ERROR, 'INSTALLER');
- }
-
- @\fclose($pDest);
- }
- else
- {
- $this->Logger()->Write('Cannot create temp file: '.$sTmp, \MailSo\Log\Enumerations\Type::ERROR, 'INSTALLER');
- }
-
- return $bResult ? $sTmp : '';
- }
-
- /**
- * @return array
- */
- public function DoAdminPackageInstall()
- {
- $this->IsAdminLoggined();
-
- $sType = $this->GetActionParam('Type', '');
- $sId = $this->GetActionParam('Id', '');
- $sFile = $this->GetActionParam('File', '');
-
- $this->Logger()->Write('Start package install: '.$sFile.' ('.$sType.')', \MailSo\Log\Enumerations\Type::INFO, 'INSTALLER');
-
- $sRealFile = '';
-
- $bReal = false;
- $bRainLoopUpdatable = false;
- $aList = $this->getRepositoryData($bReal, $bRainLoopUpdatable);
-
- if ('plugin' === $sType)
- {
- foreach ($aList as $oItem)
- {
- if ($oItem && $sFile === $oItem['file'] && $sId === $oItem['id'])
- {
- $sRealFile = $sFile;
- break;
- }
- }
- }
-
- $sTmp = '';
- $bResult = false;
- if ('' !== $sRealFile)
- {
- $sUrl = $this->rainLoopRepo().$sRealFile;
- $sTmp = $this->downloadRemotePackageByUrl($sUrl);
- }
-
- if ('' !== $sTmp)
- {
- include_once APP_VERSION_ROOT_PATH.'app/libraries/pclzip/pclzip.lib.php';
-
- $oArchive = new \PclZip($sTmp);
- if ('plugin' === $sType)
- {
- $bResult = true;
- if (\is_dir(APP_PLUGINS_PATH.$sId))
- {
- $bResult = \MailSo\Base\Utils::RecRmDir(APP_PLUGINS_PATH.$sId);
- if (!$bResult)
- {
- $this->Logger()->Write('Cannot remove previous plugin folder: '.$sId, \MailSo\Log\Enumerations\Type::ERROR, 'INSTALLER');
- }
- }
-
- if ($bResult)
- {
- $bResult = 0 !== $oArchive->extract(PCLZIP_OPT_PATH, APP_PLUGINS_PATH);
- if (!$bResult)
- {
- $this->Logger()->Write('Cannot extract package files: '.$oArchive->errorInfo(), \MailSo\Log\Enumerations\Type::ERROR, 'INSTALLER');
- }
- }
- }
-
- @\unlink($sTmp);
- }
-
- return $this->DefaultResponse(__FUNCTION__, $bResult ?
- ('plugin' !== $sType ? array('Reload' => true) : true) : false);
- }
-
- /**
- * @return array
- */
- public function DoAdminPluginList()
- {
- $this->IsAdminLoggined();
-
- $aResult = array();
-
- $sEnabledPlugins = $this->Config()->Get('plugins', 'enabled_list', '');
- $aEnabledPlugins = \explode(',', \strtolower($sEnabledPlugins));
- $aEnabledPlugins = \array_map('trim', $aEnabledPlugins);
-
- $aList = $this->Plugins()->InstalledPlugins();
- foreach ($aList as $aItem)
- {
- $aResult[] = array(
- 'Name' => $aItem[0],
- 'Enabled' => \in_array(\strtolower($aItem[0]), $aEnabledPlugins),
- 'Configured' => false
- );
- }
-
- return $this->DefaultResponse(__FUNCTION__, $aResult);
- }
-
- /**
- * @param string $sName
- * @param bool $bEnable = true
- * @return bool
- */
- private function pluginEnable($sName, $bEnable = true)
- {
- if (0 === \strlen($sName))
- {
- return false;
- }
-
- $oConfig = $this->Config();
-
- $sEnabledPlugins = $oConfig->Get('plugins', 'enabled_list', '');
- $aEnabledPlugins = \explode(',', \strtolower($sEnabledPlugins));
- $aEnabledPlugins = \array_map('trim', $aEnabledPlugins);
-
- $aNewEnabledPlugins = array();
- if ($bEnable)
- {
- $aNewEnabledPlugins = $aEnabledPlugins;
- $aNewEnabledPlugins[] = $sName;
- }
- else
- {
- foreach ($aEnabledPlugins as $sPlugin)
- {
- if ($sName !== $sPlugin && 0 < \strlen($sPlugin))
- {
- $aNewEnabledPlugins[] = $sPlugin;
- }
- }
- }
-
- $aNewEnabledPlugins = \array_unique($aNewEnabledPlugins);
- $oConfig->Set('plugins', 'enabled_list', \trim(\implode(',', $aNewEnabledPlugins), ' ,'));
-
- return $oConfig->Save();
- }
-
- /**
- * @return array
- */
- public function DoAdminPluginDisable()
- {
- $this->IsAdminLoggined();
-
- $sName = (string) $this->GetActionParam('Name', '');
- $bDisable = '1' === (string) $this->GetActionParam('Disabled', '1');
-
- if (!$bDisable)
- {
- $oPlugin = $this->Plugins()->CreatePluginByName($sName);
- if ($oPlugin && ($oPlugin instanceof \RainLoop\Plugins\AbstractPlugin))
- {
- $sValue = $oPlugin->Supported();
- if (0 < \strlen($sValue))
- {
- return $this->FalseResponse(__FUNCTION__, \RainLoop\Notifications::UnsupportedPluginPackage, $sValue);
- }
- }
- else
- {
- return $this->FalseResponse(__FUNCTION__, \RainLoop\Notifications::InvalidPluginPackage);
- }
- }
-
- return $this->DefaultResponse(__FUNCTION__, $this->pluginEnable($sName, !$bDisable));
- }
-
- /**
- * @return array
- */
- public function DoAdminPluginLoad()
- {
- $this->IsAdminLoggined();
-
- $mResult = false;
- $sName = (string) $this->GetActionParam('Name', '');
-
- if (!empty($sName))
- {
- $oPlugin = $this->Plugins()->CreatePluginByName($sName);
- if ($oPlugin)
- {
- $mResult = array(
- 'Name' => $sName,
- 'Readme' => file_exists($oPlugin->Path().'/README') ? file_get_contents($oPlugin->Path().'/README') : '',
- 'Config' => array()
- );
-
- $aMap = $oPlugin->ConfigMap();
- $oConfig = $oPlugin->Config();
- if (is_array($aMap) && 0 < count($aMap))
- {
- foreach ($aMap as $oItem)
- {
- if ($oItem && ($oItem instanceof \RainLoop\Plugins\Property))
- {
- $aItem = $oItem->ToArray();
- $aItem[0] = $oConfig->Get('plugin', $oItem->Name(), '');
- if (\RainLoop\Enumerations\PluginPropertyType::PASSWORD === $oItem->Type())
- {
- $aItem[0] = APP_DUMMY;
- }
-
- $mResult['Config'][] = $aItem;
- }
- }
- }
- }
- }
-
- return $this->DefaultResponse(__FUNCTION__, $mResult);
- }
-
- /**
- * @return array
- */
- public function DoAdminPluginSettingsUpdate()
- {
- $this->IsAdminLoggined();
-
- $mResult = false;
- $sName = (string) $this->GetActionParam('Name', '');
-
- if (!empty($sName))
- {
- $oPlugin = $this->Plugins()->CreatePluginByName($sName);
- if ($oPlugin)
- {
- $oConfig = $oPlugin->Config();
- $aMap = $oPlugin->ConfigMap();
- if (is_array($aMap) && 0 < count($aMap))
- {
- foreach ($aMap as $oItem)
- {
- $sValue = $this->GetActionParam('_'.$oItem->Name(), $oConfig->Get('plugin', $oItem->Name()));
- if (\RainLoop\Enumerations\PluginPropertyType::PASSWORD !== $oItem->Type() || APP_DUMMY !== $sValue)
- {
- $mResultValue = null;
- switch ($oItem->Type()) {
- case \RainLoop\Enumerations\PluginPropertyType::INT:
- $mResultValue = (int) $sValue;
- break;
- case \RainLoop\Enumerations\PluginPropertyType::BOOL:
- $mResultValue = '1' === (string) $sValue;
- break;
- case \RainLoop\Enumerations\PluginPropertyType::SELECTION:
- if (is_array($oItem->DefaultValue()) && in_array($sValue, $oItem->DefaultValue()))
- {
- $mResultValue = (string) $sValue;
- }
- break;
- case \RainLoop\Enumerations\PluginPropertyType::PASSWORD:
- case \RainLoop\Enumerations\PluginPropertyType::STRING:
- case \RainLoop\Enumerations\PluginPropertyType::STRING_TEXT:
- $mResultValue = (string) $sValue;
- break;
- }
-
- if (null !== $mResultValue)
- {
- $oConfig->Set('plugin', $oItem->Name(), $mResultValue);
- }
- }
- }
- }
-
- $mResult = $oConfig->Save();
- }
- }
-
- if (!$mResult)
- {
- throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::CantSavePluginSettings);
- }
-
- return $this->DefaultResponse(__FUNCTION__, true);
- }
-
- /**
- * @return array
- */
- public function DoSettingsUpdate()
- {
- $oAccount = $this->getAccountFromToken();
- if (!$this->GetCapa(false, false, \RainLoop\Enumerations\Capa::SETTINGS, $oAccount))
- {
- return $this->FalseResponse(__FUNCTION__);
- }
-
- $self = $this;
- $oConfig = $this->Config();
-
- $oSettings = $this->SettingsProvider()->Load($oAccount);
- $oSettingsLocal = $this->SettingsProvider(true)->Load($oAccount);
-
- if ($oConfig->Get('webmail', 'allow_languages_on_settings', true))
- {
- $this->setSettingsFromParams($oSettings, 'Language', 'string', function ($sLanguage) use ($self) {
- return $self->ValidateLanguage($sLanguage);
- });
- }
- else
- {
- $oSettings->SetConf('Language', $this->ValidateLanguage($oConfig->Get('webmail', 'language', 'en')));
- }
-
- if ($this->GetCapa(false, false, \RainLoop\Enumerations\Capa::THEMES, $oAccount))
- {
- $this->setSettingsFromParams($oSettingsLocal, 'Theme', 'string', function ($sTheme) use ($self) {
- return $self->ValidateTheme($sTheme);
- });
- }
- else
- {
- $oSettingsLocal->SetConf('Theme', $this->ValidateTheme($oConfig->Get('webmail', 'theme', 'Default')));
- }
-
- $this->setSettingsFromParams($oSettings, 'MPP', 'int', function ($iValue) {
- return (int) (\in_array($iValue, array(10, 20, 30, 50, 100, 150, 200, 300)) ? $iValue : 20);
- });
-
- $this->setSettingsFromParams($oSettings, 'Layout', 'int', function ($iValue) {
- return (int) (\in_array((int) $iValue, array(\RainLoop\Enumerations\Layout::NO_PREVIW,
- \RainLoop\Enumerations\Layout::SIDE_PREVIEW, \RainLoop\Enumerations\Layout::BOTTOM_PREVIEW)) ?
- $iValue : \RainLoop\Enumerations\Layout::SIDE_PREVIEW);
- });
-
- $this->setSettingsFromParams($oSettings, 'EditorDefaultType', 'string');
- $this->setSettingsFromParams($oSettings, 'ShowImages', 'bool');
- $this->setSettingsFromParams($oSettings, 'ContactsAutosave', 'bool');
- $this->setSettingsFromParams($oSettings, 'DesktopNotifications', 'bool');
- $this->setSettingsFromParams($oSettings, 'SoundNotification', 'bool');
- $this->setSettingsFromParams($oSettings, 'UseCheckboxesInList', 'bool');
- $this->setSettingsFromParams($oSettings, 'AutoLogout', 'int');
-
- $this->setSettingsFromParams($oSettings, 'EnableTwoFactor', 'bool');
-
- $this->setSettingsFromParams($oSettingsLocal, 'UseThreads', 'bool');
- $this->setSettingsFromParams($oSettingsLocal, 'ReplySameFolder', 'bool');
-
- return $this->DefaultResponse(__FUNCTION__,
- $this->SettingsProvider()->Save($oAccount, $oSettings) &&
- $this->SettingsProvider(true)->Save($oAccount, $oSettingsLocal));
- }
-
- /**
- * @return array
- */
- public function DoNoop()
- {
- $this->initMailClientConnection();
- return $this->TrueResponse(__FUNCTION__);
- }
-
- /**
- * @return array
- */
- public function DoPing()
- {
- return $this->DefaultResponse(__FUNCTION__, 'Pong');
- }
-
- /**
- * @return array
- */
- public function DoChangePassword()
- {
- $mResult = false;
-
- $oAccount = $this->getAccountFromToken();
- if ($oAccount)
- {
- try
- {
- $mResult = $this->ChangePasswordProvider()->ChangePassword(
- $oAccount,
- $this->GetActionParam('PrevPassword', ''),
- $this->GetActionParam('NewPassword', '')
- );
- }
- catch (\Exception $oException)
- {
- $this->loginErrorDelay();
- $this->Logger()->Write('Error: Can\'t change password for '.$oAccount->Email().' account.', \MailSo\Log\Enumerations\Type::NOTICE);
-
- throw $oException;
- }
- }
-
- return $this->DefaultResponse(__FUNCTION__, $mResult);
- }
-
- /**
- * @return array
- */
- public function DoJsInfo()
- {
- $bIsError = '1' === (string) $this->GetActionParam('IsError', '0');
- $mData = $this->GetActionParam('Data', null);
-
- $this->Logger()->WriteDump(is_array($mData) ? $mData : array(),
- $bIsError ? \MailSo\Log\Enumerations\Type::ERROR : \MailSo\Log\Enumerations\Type::INFO, 'JS-INFO');
-
- return $this->DefaultResponse(__FUNCTION__, true);
- }
-
- /**
- * @return array
- */
- public function DoWelcomeClose()
- {
- $oAccount = $this->getAccountFromToken();
- if ($oAccount && !$oAccount->IsAdditionalAccount())
- {
- $oSettings = $this->SettingsProvider()->Load($oAccount);
- $oSettings->SetConf('LastWelcomePage',
- $this->Config()->Get('branding', 'welcome_page_url', ''));
-
- return $this->DefaultResponse(__FUNCTION__,
- $this->SettingsProvider()->Save($oAccount, $oSettings));
- }
-
- return $this->FalseResponse(__FUNCTION__);
- }
-
- /**
- * @return array
- */
- public function DoVersion()
- {
- return $this->DefaultResponse(__FUNCTION__,
- APP_VERSION === (string) $this->GetActionParam('Version', ''));
- }
-
- /**
- * @return array
- */
- public function DoJsError()
- {
- $sMessage = $this->GetActionParam('Message', '');
- if (0 < strlen($sMessage))
- {
- $sFileName = $this->GetActionParam('FileName', '');
- $sLineNo = $this->GetActionParam('LineNo', '');
- $sLocation = $this->GetActionParam('Location', '');
- $sHtmlCapa = $this->GetActionParam('HtmlCapa', '');
- $sTimeOnPage = $this->GetActionParam('TimeOnPage', '');
-
- $oHttp = $this->Http();
-
- $this->Logger()->Write($sMessage.' ('.$sFileName.' ~ '.$sLineNo.')', \MailSo\Log\Enumerations\Type::ERROR, 'JS');
- $this->Logger()->WriteDump(array(
- 'Location' => $sLocation,
- 'Capability' => $sHtmlCapa,
- 'TimeOnPage' => $sTimeOnPage,
- 'HTTP_USER_AGENT' => $oHttp->GetServer('HTTP_USER_AGENT', ''),
- 'HTTP_ACCEPT_ENCODING' => $oHttp->GetServer('HTTP_ACCEPT_ENCODING', ''),
- 'HTTP_ACCEPT_LANGUAGE' => $oHttp->GetServer('HTTP_ACCEPT_LANGUAGE', '')
- ));
- }
-
- return $this->DefaultResponse(__FUNCTION__, true);
- }
-
- /**
- * @param \MailSo\Mail\FolderCollection $oFolders
- * @return array
- */
- private function recFoldersNames($oFolders)
- {
- $aResult = array();
- if ($oFolders)
- {
- $aFolders =& $oFolders->GetAsArray();
-
- foreach ($aFolders as $oFolder)
- {
- $aResult[] = $oFolder->FullNameRaw()."|".
- implode("|", $oFolder->Flags()).($oFolder->IsSubscribed() ? '1' : '0');
-
- $oSub = $oFolder->SubFolders();
- if ($oSub && 0 < $oSub->Count())
- {
- $aResult = \array_merge($aResult, $this->recFoldersNames($oSub));
- }
- }
- }
-
- return $aResult;
- }
-
- /**
- * @staticvar array $aCache
- * @param \RainLoop\Model\Account $oAccount
- *
- * @return array
- */
- private function systemFoldersNames($oAccount)
- {
- static $aCache = null;
- if (null === $aCache)
- {
- $aCache = array(
-
- 'Sent' => \MailSo\Imap\Enumerations\FolderType::SENT,
-
- 'Send' => \MailSo\Imap\Enumerations\FolderType::SENT,
- 'Sent Item' => \MailSo\Imap\Enumerations\FolderType::SENT,
- 'Sent Items' => \MailSo\Imap\Enumerations\FolderType::SENT,
- 'Send Item' => \MailSo\Imap\Enumerations\FolderType::SENT,
- 'Send Items' => \MailSo\Imap\Enumerations\FolderType::SENT,
- 'Sent Mail' => \MailSo\Imap\Enumerations\FolderType::SENT,
- 'Sent Mails' => \MailSo\Imap\Enumerations\FolderType::SENT,
- 'Send Mail' => \MailSo\Imap\Enumerations\FolderType::SENT,
- 'Send Mails' => \MailSo\Imap\Enumerations\FolderType::SENT,
-
- 'Drafts' => \MailSo\Imap\Enumerations\FolderType::DRAFTS,
-
- 'Draft' => \MailSo\Imap\Enumerations\FolderType::DRAFTS,
- 'Draft Mail' => \MailSo\Imap\Enumerations\FolderType::DRAFTS,
- 'Draft Mails' => \MailSo\Imap\Enumerations\FolderType::DRAFTS,
- 'Drafts Mail' => \MailSo\Imap\Enumerations\FolderType::DRAFTS,
- 'Drafts Mails' => \MailSo\Imap\Enumerations\FolderType::DRAFTS,
-
- 'Spam' => \MailSo\Imap\Enumerations\FolderType::JUNK,
-
- 'Junk' => \MailSo\Imap\Enumerations\FolderType::JUNK,
- 'Bulk Mail' => \MailSo\Imap\Enumerations\FolderType::JUNK,
- 'Bulk Mails' => \MailSo\Imap\Enumerations\FolderType::JUNK,
-
- 'Trash' => \MailSo\Imap\Enumerations\FolderType::TRASH,
- 'Deleted' => \MailSo\Imap\Enumerations\FolderType::TRASH,
- 'Bin' => \MailSo\Imap\Enumerations\FolderType::TRASH,
-
- 'Archive' => \MailSo\Imap\Enumerations\FolderType::ALL,
-
- 'All' => \MailSo\Imap\Enumerations\FolderType::ALL,
- 'All Mail' => \MailSo\Imap\Enumerations\FolderType::ALL,
- 'All Mails' => \MailSo\Imap\Enumerations\FolderType::ALL,
- 'AllMail' => \MailSo\Imap\Enumerations\FolderType::ALL,
- 'AllMails' => \MailSo\Imap\Enumerations\FolderType::ALL,
- );
-
- $this->Plugins()->RunHook('filter.system-folders-names', array($oAccount, &$aCache));
- }
-
- return $aCache;
- }
-
- /**
- * @param \RainLoop\Model\Account $oAccount
- * @param \MailSo\Mail\FolderCollection $oFolders
- * @param array $aResult
- * @param bool $bListFolderTypes = true
- */
- private function recFoldersTypes($oAccount, $oFolders, &$aResult, $bListFolderTypes = true)
- {
- if ($oFolders)
- {
- $aFolders =& $oFolders->GetAsArray();
- if (\is_array($aFolders) && 0 < \count($aFolders))
- {
- if ($bListFolderTypes)
- {
- foreach ($aFolders as $oFolder)
- {
- $iFolderListType = $oFolder->GetFolderListType();
- if (!isset($aResult[$iFolderListType]) && \in_array($iFolderListType, array(
- \MailSo\Imap\Enumerations\FolderType::SENT,
- \MailSo\Imap\Enumerations\FolderType::DRAFTS,
- \MailSo\Imap\Enumerations\FolderType::JUNK,
- \MailSo\Imap\Enumerations\FolderType::TRASH,
- \MailSo\Imap\Enumerations\FolderType::ALL
- )))
- {
- $aResult[$iFolderListType] = $oFolder->FullNameRaw();
- }
- }
-
- foreach ($aFolders as $oFolder)
- {
- $oSub = $oFolder->SubFolders();
- if ($oSub && 0 < $oSub->Count())
- {
- $this->recFoldersTypes($oAccount, $oSub, $aResult, true);
- }
- }
- }
-
- $aMap = $this->systemFoldersNames($oAccount);
- foreach ($aFolders as $oFolder)
- {
- $sName = $oFolder->Name();
- $sFullName = $oFolder->FullName();
-
- if (isset($aMap[$sName]) || isset($aMap[$sFullName]))
- {
- $iFolderType = isset($aMap[$sName]) ? $aMap[$sName] : $aMap[$sFullName];
- if (!isset($aResult[$iFolderType]) && \in_array($iFolderType, array(
- \MailSo\Imap\Enumerations\FolderType::SENT,
- \MailSo\Imap\Enumerations\FolderType::DRAFTS,
- \MailSo\Imap\Enumerations\FolderType::JUNK,
- \MailSo\Imap\Enumerations\FolderType::TRASH,
- \MailSo\Imap\Enumerations\FolderType::ALL
- )))
- {
- $aResult[$iFolderType] = $oFolder->FullNameRaw();
- }
- }
- }
-
- foreach ($aFolders as $oFolder)
- {
- $oSub = $oFolder->SubFolders();
- if ($oSub && 0 < $oSub->Count())
- {
- $this->recFoldersTypes($oAccount, $oSub, $aResult, false);
- }
- }
- }
- }
- }
-
- /**
- * @return array
- */
- public function DoFolders()
- {
- $oAccount = $this->initMailClientConnection();
-
- $oFolderCollection = null;
- $this->Plugins()->RunHook('filter.folders-before', array($oAccount, &$oFolderCollection));
-
- $bUseFolders = $this->GetCapa(false, false, \RainLoop\Enumerations\Capa::FOLDERS, $oAccount);
-
- if (null === $oFolderCollection)
- {
- $oFolderCollection = $this->MailClient()->Folders('',
- $bUseFolders ? '*' : 'INBOX',
- !!$this->Config()->Get('labs', 'use_imap_list_subscribe', true),
- (int) $this->Config()->Get('labs', 'imap_folder_list_limit', 200)
- );
- }
-
- $this->Plugins()->RunHook('filter.folders-post', array($oAccount, &$oFolderCollection));
-
- if ($oFolderCollection instanceof \MailSo\Mail\FolderCollection)
- {
- $oSettingsLocal = $this->SettingsProvider(true)->Load($oAccount);
-
- $aSystemFolders = array();
- $this->recFoldersTypes($oAccount, $oFolderCollection, $aSystemFolders);
- $oFolderCollection->SystemFolders = $aSystemFolders;
-
- if ($bUseFolders && $this->Config()->Get('labs', 'autocreate_system_folders', true))
- {
- $bDoItAgain = false;
-
- $sNamespace = $oFolderCollection->GetNamespace();
- $sParent = empty($sNamespace) ? '' : \substr($sNamespace, 0, -1);
-
- $sDelimiter = $oFolderCollection->FindDelimiter();
-
- $aList = array();
- $aMap = $this->systemFoldersNames($oAccount);
-
- if ('' === $oSettingsLocal->GetConf('SentFolder', ''))
- {
- $aList[] = \MailSo\Imap\Enumerations\FolderType::SENT;
- }
-
- if ('' === $oSettingsLocal->GetConf('DraftFolder', ''))
- {
- $aList[] = \MailSo\Imap\Enumerations\FolderType::DRAFTS;
- }
-
- if ('' === $oSettingsLocal->GetConf('SpamFolder', ''))
- {
- $aList[] = \MailSo\Imap\Enumerations\FolderType::JUNK;
- }
-
- if ('' === $oSettingsLocal->GetConf('TrashFolder', ''))
- {
- $aList[] = \MailSo\Imap\Enumerations\FolderType::TRASH;
- }
-
- if ('' === $oSettingsLocal->GetConf('ArchiveFolder', ''))
- {
- $aList[] = \MailSo\Imap\Enumerations\FolderType::ALL;
- }
-
- $this->Plugins()->RunHook('filter.folders-system-types', array($oAccount, &$aList));
-
- foreach ($aList as $iType)
- {
- if (!isset($aSystemFolders[$iType]))
- {
- $mFolderNameToCreate = \array_search($iType, $aMap);
- if (!empty($mFolderNameToCreate))
- {
- $iPos = \strrpos($mFolderNameToCreate, $sDelimiter);
- if (false !== $iPos)
- {
- $mNewParent = \substr($mFolderNameToCreate, 0, $iPos);
- $mNewFolderNameToCreate = \substr($mFolderNameToCreate, $iPos + 1);
- if (0 < \strlen($mNewFolderNameToCreate))
- {
- $mFolderNameToCreate = $mNewFolderNameToCreate;
- }
-
- if (0 < \strlen($mNewParent))
- {
- $sParent = 0 < \strlen($sParent) ? $sParent.$sDelimiter.$mNewParent : $mNewParent;
- }
- }
-
- $sFullNameToCheck = \MailSo\Base\Utils::ConvertEncoding($mFolderNameToCreate,
- \MailSo\Base\Enumerations\Charset::UTF_8, \MailSo\Base\Enumerations\Charset::UTF_7_IMAP);
-
- if (0 < \strlen(\trim($sParent)))
- {
- $sFullNameToCheck = $sParent.$sDelimiter.$sFullNameToCheck;
- }
-
- if (!$oFolderCollection->GetByFullNameRaw($sFullNameToCheck))
- {
- try
- {
- if ($this->MailClient()->FolderCreate($mFolderNameToCreate, $sParent, true, $sDelimiter))
- {
- $bDoItAgain = true;
- }
- }
- catch (\Exception $oException)
- {
- $this->Logger()->WriteException($oException);
- }
- }
- }
- }
- }
-
- if ($bDoItAgain)
- {
- $oFolderCollection = $this->MailClient()->Folders('', '*',
- !!$this->Config()->Get('labs', 'use_imap_list_subscribe', true),
- (int) $this->Config()->Get('labs', 'imap_folder_list_limit', 200)
- );
-
- if ($oFolderCollection)
- {
- $aSystemFolders = array();
- $this->recFoldersTypes($oAccount, $oFolderCollection, $aSystemFolders);
- $oFolderCollection->SystemFolders = $aSystemFolders;
- }
- }
- }
-
- if ($oFolderCollection)
- {
- $oFolderCollection->FoldersHash = \md5(\implode("\x0", $this->recFoldersNames($oFolderCollection)));
- }
- }
-
- $this->Plugins()->RunHook('filter.folders-complete', array($oAccount, &$oFolderCollection));
-
- return $this->DefaultResponse(__FUNCTION__, $oFolderCollection);
- }
-
- /**
- * @return array
- */
- public function DoFolderCreate()
- {
- $oAccount = $this->initMailClientConnection();
-
- if (!$this->GetCapa(false, false, \RainLoop\Enumerations\Capa::FOLDERS, $oAccount))
- {
- return $this->FalseResponse(__FUNCTION__);
- }
-
- try
- {
- $sFolderNameInUtf = $this->GetActionParam('Folder', '');
- $sFolderParentFullNameRaw = $this->GetActionParam('Parent', '');
-
- $this->MailClient()->FolderCreate($sFolderNameInUtf, $sFolderParentFullNameRaw,
- !!$this->Config()->Get('labs', 'use_imap_list_subscribe', true));
- }
- catch (\Exception $oException)
- {
- throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::CantCreateFolder, $oException);
- }
-
- return $this->TrueResponse(__FUNCTION__);
- }
-
- /**
- * @return array
- */
- public function DoFolderSubscribe()
- {
- $oAccount = $this->initMailClientConnection();
-
- if (!$this->GetCapa(false, false, \RainLoop\Enumerations\Capa::FOLDERS, $oAccount))
- {
- return $this->FalseResponse(__FUNCTION__);
- }
-
- $sFolderFullNameRaw = $this->GetActionParam('Folder', '');
- $bSubscribe = '1' === (string) $this->GetActionParam('Subscribe', '0');
-
- try
- {
- $this->MailClient()->FolderSubscribe($sFolderFullNameRaw, !!$bSubscribe);
- }
- catch (\Exception $oException)
- {
- if ($bSubscribe)
- {
- throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::CantSubscribeFolder, $oException);
- }
- else
- {
- throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::CantUnsubscribeFolder, $oException);
- }
- }
-
- return $this->TrueResponse(__FUNCTION__);
- }
-
- /**
- * @return array
- */
- public function DoFolderCheckable()
- {
- $oAccount = $this->getAccountFromToken();
-
- if (!$this->GetCapa(false, false, \RainLoop\Enumerations\Capa::FOLDERS, $oAccount))
- {
- return $this->FalseResponse(__FUNCTION__);
- }
-
- $sFolderFullNameRaw = $this->GetActionParam('Folder', '');
- $bCheckable = '1' === (string) $this->GetActionParam('Checkable', '0');
-
- $oSettingsLocal = $this->SettingsProvider(true)->Load($oAccount);
-
- $sCheckableFolder = $oSettingsLocal->GetConf('CheckableFolder', '[]');
- $aCheckableFolder = @\json_decode($sCheckableFolder);
-
- if (!\is_array($aCheckableFolder))
- {
- $aCheckableFolder = array();
- }
-
- if ($bCheckable)
- {
- $aCheckableFolder[] = $sFolderFullNameRaw;
- }
- else
- {
- $aCheckableFolderNew = array();
- foreach ($aCheckableFolder as $sFolder)
- {
- if ($sFolder !== $sFolderFullNameRaw)
- {
- $aCheckableFolderNew[] = $sFolder;
- }
- }
- $aCheckableFolder = $aCheckableFolderNew;
- }
-
- $aCheckableFolder = \array_unique($aCheckableFolder);
-
- $oSettingsLocal->SetConf('CheckableFolder', @\json_encode($aCheckableFolder));
-
- return $this->DefaultResponse(__FUNCTION__,
- $this->SettingsProvider(true)->Save($oAccount, $oSettingsLocal));
- }
-
- /**
- * @return array
- *
- * @throws \MailSo\Base\Exceptions\Exception
- */
- public function DoFolderRename()
- {
- $oAccount = $this->initMailClientConnection();
-
- if (!$this->GetCapa(false, false, \RainLoop\Enumerations\Capa::FOLDERS, $oAccount))
- {
- return $this->FalseResponse(__FUNCTION__);
- }
-
- $sPrevFolderFullNameRaw = $this->GetActionParam('Folder', '');
- $sNewTopFolderNameInUtf = $this->GetActionParam('NewFolderName', '');
-
- try
- {
- $this->MailClient()->FolderRename($sPrevFolderFullNameRaw, $sNewTopFolderNameInUtf,
- !!$this->Config()->Get('labs', 'use_imap_list_subscribe', true));
- }
- catch (\Exception $oException)
- {
- throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::CantRenameFolder, $oException);
- }
-
- return $this->TrueResponse(__FUNCTION__);
- }
-
- /**
- * @return array
- *
- * @throws \MailSo\Base\Exceptions\Exception
- */
- public function DoFolderDelete()
- {
- $oAccount = $this->initMailClientConnection();
-
- if (!$this->GetCapa(false, false, \RainLoop\Enumerations\Capa::FOLDERS, $oAccount))
- {
- return $this->FalseResponse(__FUNCTION__);
- }
-
- $sFolderFullNameRaw = $this->GetActionParam('Folder', '');
-
- try
- {
- $this->MailClient()->FolderDelete($sFolderFullNameRaw,
- !!$this->Config()->Get('labs', 'use_imap_list_subscribe', true));
- }
- catch (\MailSo\Mail\Exceptions\NonEmptyFolder $oException)
- {
- throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::CantDeleteNonEmptyFolder, $oException);
- }
- catch (\Exception $oException)
- {
- throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::CantDeleteFolder, $oException);
- }
-
- return $this->TrueResponse(__FUNCTION__);
- }
-
- /**
- * @return array
- *
- * @throws \MailSo\Base\Exceptions\Exception
- */
- public function DoFolderClear()
- {
- $this->initMailClientConnection();
-
- $sFolderFullNameRaw = $this->GetActionParam('Folder', '');
-
- try
- {
- $this->MailClient()->FolderClear($sFolderFullNameRaw);
- }
- catch (\Exception $oException)
- {
- throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::MailServerError, $oException);
- }
-
- return $this->TrueResponse(__FUNCTION__);
- }
-
- /**
- * @return array
- *
- * @throws \MailSo\Base\Exceptions\Exception
- */
- public function DoFolderInformation()
- {
- $sFolder = $this->GetActionParam('Folder', '');
- $sPrevUidNext = $this->GetActionParam('UidNext', '');
- $aFlagsUids = array();
- $sFlagsUids = (string) $this->GetActionParam('FlagsUids', '');
-
- $aFlagsFilteredUids = array();
- if (0 < strlen($sFlagsUids))
- {
- $aFlagsUids = explode(',', $sFlagsUids);
- $aFlagsFilteredUids = array_filter($aFlagsUids, function (&$sUid) {
- $sUid = (int) trim($sUid);
- return 0 < (int) trim($sUid);
- });
- }
-
- $this->initMailClientConnection();
-
- $sForwardedFlag = $this->Config()->Get('labs', 'imap_forwarded_flag', '');
- $sReadReceiptFlag = $this->Config()->Get('labs', 'imap_read_receipt_flag', '');
- try
- {
- $aInboxInformation = $this->MailClient()->FolderInformation(
- $sFolder, $sPrevUidNext, $aFlagsFilteredUids
- );
-
- if (\is_array($aInboxInformation) && isset($aInboxInformation['Flags']) && \is_array($aInboxInformation['Flags']))
- {
- foreach ($aInboxInformation['Flags'] as $iUid => $aFlags)
- {
- $aLowerFlags = array_map('strtolower', $aFlags);
- $aInboxInformation['Flags'][$iUid] = array(
- 'IsSeen' => in_array('\\seen', $aLowerFlags),
- 'IsFlagged' => in_array('\\flagged', $aLowerFlags),
- 'IsAnswered' => in_array('\\answered', $aLowerFlags),
- 'IsDeleted' => in_array('\\deleted', $aLowerFlags),
- 'IsForwarded' => 0 < strlen($sForwardedFlag) && in_array(strtolower($sForwardedFlag), $aLowerFlags),
- 'IsReadReceipt' => 0 < strlen($sReadReceiptFlag) && in_array(strtolower($sReadReceiptFlag), $aLowerFlags)
- );
- }
- }
- }
- catch (\Exception $oException)
- {
- throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::MailServerError, $oException);
- }
-
- if (\is_array($aInboxInformation))
- {
- $aInboxInformation['Version'] = APP_VERSION;
- }
-
- return $this->DefaultResponse(__FUNCTION__, $aInboxInformation);
- }
-
- /**
- * @return array
- *
- * @throws \MailSo\Base\Exceptions\Exception
- */
- public function DoFolderInformationMultiply()
- {
- $aResult = array(
- 'List' => array(),
- 'Version' => APP_VERSION
- );
-
- $aFolders = $this->GetActionParam('Folders', null);
- if (\is_array($aFolders))
- {
- $this->initMailClientConnection();
-
- $aFolders = \array_unique($aFolders);
- foreach ($aFolders as $sFolder)
- {
- if (0 < \strlen(\trim($sFolder)) && 'INBOX' !== \strtoupper($sFolder))
- {
- try
- {
- $aInboxInformation = $this->MailClient()->FolderInformation($sFolder, '', array());
- if (\is_array($aInboxInformation) && isset($aInboxInformation['Folder']))
- {
- $aResult['List'][] = $aInboxInformation;
- }
- }
- catch (\Exception $oException)
- {
- $this->Logger()->WriteException($oException);
- }
- }
- }
- }
-
- return $this->DefaultResponse(__FUNCTION__, $aResult);
- }
-
- /**
- * @return array
- *
- * @throws \MailSo\Base\Exceptions\Exception
- */
- public function DoMessageList()
- {
-// \sleep(1);
-// throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::CantGetMessageList);
-
- $sFolder = '';
- $iOffset = 0;
- $iLimit = 20;
- $sSearch = '';
- $sUidNext = '';
- $bUseThreads = false;
- $sThreadUid = '';
-
- $sRawKey = $this->GetActionParam('RawKey', '');
- $aValues = $this->getDecodedClientRawKeyValue($sRawKey, 9);
-
- if (\is_array($aValues) && 7 < \count($aValues))
- {
- $sFolder =(string) $aValues[0];
- $iOffset = (int) $aValues[1];
- $iLimit = (int) $aValues[2];
- $sSearch = (string) $aValues[3];
- $sUidNext = (string) $aValues[6];
- $bUseThreads = (bool) $aValues[7];
-
- if ($bUseThreads)
- {
- $sThreadUid = isset($aValues[8]) ? (string) $aValues[8] : '';
- }
-
- $this->verifyCacheByKey($sRawKey);
- }
- else
- {
- $sFolder = $this->GetActionParam('Folder', '');
- $iOffset = (int) $this->GetActionParam('Offset', 0);
- $iLimit = (int) $this->GetActionParam('Limit', 10);
- $sSearch = $this->GetActionParam('Search', '');
- $sUidNext = $this->GetActionParam('UidNext', '');
- $bUseThreads = '1' === (string) $this->GetActionParam('UseThreads', '0');
-
- if ($bUseThreads)
- {
- $sThreadUid = (string) $this->GetActionParam('ThreadUid', '');
- }
- }
-
- if (0 === strlen($sFolder))
- {
- throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::CantGetMessageList);
- }
-
- $this->initMailClientConnection();
-
- try
- {
- if (!$this->Config()->Get('labs', 'use_imap_thread', false))
- {
- $bUseThreads = false;
- }
-
- $oMessageList = $this->MailClient()->MessageList(
- $sFolder, $iOffset, $iLimit, $sSearch, $sUidNext,
- $this->cacherForUids(),
- !!$this->Config()->Get('labs', 'use_imap_sort', false),
- $bUseThreads,
- $sThreadUid,
- ''
- );
- }
- catch (\Exception $oException)
- {
- throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::CantGetMessageList, $oException);
- }
-
- if ($oMessageList instanceof \MailSo\Mail\MessageCollection)
- {
- $this->cacheByKey($sRawKey);
- }
-
- return $this->DefaultResponse(__FUNCTION__, $oMessageList);
- }
-
- /**
- * @param \RainLoop\Model\Account $oAccount
- * @param bool $bWithDraftInfo = true
- *
- * @return \MailSo\Mime\Message
- */
- private function buildMessage($oAccount, $bWithDraftInfo = true)
- {
- $sIdentityID = $this->GetActionParam('IdentityID', '');
- $sTo = $this->GetActionParam('To', '');
- $sCc = $this->GetActionParam('Cc', '');
- $sBcc = $this->GetActionParam('Bcc', '');
- $sReplyTo = $this->GetActionParam('ReplyTo', '');
- $sSubject = $this->GetActionParam('Subject', '');
- $bTextIsHtml = '1' === $this->GetActionParam('TextIsHtml', '0');
- $bReadReceiptRequest = '1' === $this->GetActionParam('ReadReceiptRequest', '0');
- $bMarkAsImportant = '1' === $this->GetActionParam('MarkAsImportant', '0');
- $sText = $this->GetActionParam('Text', '');
- $aAttachments = $this->GetActionParam('Attachments', null);
-
- $aDraftInfo = $this->GetActionParam('DraftInfo', null);
- $sInReplyTo = $this->GetActionParam('InReplyTo', '');
- $sReferences = $this->GetActionParam('References', '');
-
- $oMessage = \MailSo\Mime\Message::NewInstance();
- $oMessage->RegenerateMessageId();
-
- $oMessage->SetXMailer('RainLoop/'.APP_VERSION);
-
- $oFromIdentity = $this->GetIdentityByID($oAccount, $sIdentityID);
- if ($oFromIdentity)
- {
- $oMessage->SetFrom(\MailSo\Mime\Email::NewInstance(
- $oFromIdentity->Email(), $oFromIdentity->Name()));
- }
- else
- {
- $oMessage->SetFrom(\MailSo\Mime\Email::Parse($oAccount->Email()));
- }
-
- if (!empty($sReplyTo))
- {
- $oReplyTo = \MailSo\Mime\EmailCollection::NewInstance($sReplyTo);
- if ($oReplyTo && 0 < $oReplyTo->Count())
- {
- $oMessage->SetReplyTo($oReplyTo);
- }
- }
-
- if ($bReadReceiptRequest)
- {
- $oMessage->SetReadReceipt($oAccount->Email());
- }
-
- if ($bMarkAsImportant)
- {
- $oMessage->SetPriority(\MailSo\Mime\Enumerations\MessagePriority::HIGH);
- }
-
- $oMessage->SetSubject($sSubject);
-
- $oToEmails = \MailSo\Mime\EmailCollection::NewInstance($sTo);
- if ($oToEmails && $oToEmails->Count())
- {
- $oMessage->SetTo($oToEmails);
- }
-
- $oCcEmails = \MailSo\Mime\EmailCollection::NewInstance($sCc);
- if ($oCcEmails && $oCcEmails->Count())
- {
- $oMessage->SetCc($oCcEmails);
- }
-
- $oBccEmails = \MailSo\Mime\EmailCollection::NewInstance($sBcc);
- if ($oBccEmails && $oBccEmails->Count())
- {
- $oMessage->SetBcc($oBccEmails);
- }
-
- if ($bWithDraftInfo && \is_array($aDraftInfo) && !empty($aDraftInfo[0]) && !empty($aDraftInfo[1]) && !empty($aDraftInfo[2]))
- {
- $oMessage->SetDraftInfo($aDraftInfo[0], $aDraftInfo[1], $aDraftInfo[2]);
- }
-
- if (0 < \strlen($sInReplyTo))
- {
- $oMessage->SetInReplyTo($sInReplyTo);
- }
-
- if (0 < \strlen($sReferences))
- {
- $oMessage->SetReferences($sReferences);
- }
-
- $aFoundedCids = array();
- $mFoundDataURL = array();
- $aFoundedContentLocationUrls = array();
-
- $sTextToAdd = $bTextIsHtml ?
- \MailSo\Base\HtmlUtils::BuildHtml($sText, $aFoundedCids, $mFoundDataURL, $aFoundedContentLocationUrls) : $sText;
-
- $this->Plugins()->RunHook($bTextIsHtml ? 'filter.message-html' : 'filter.message-plain',
- array($oAccount, &$oMessage, &$sTextToAdd));
-
- if ($bTextIsHtml && 0 < \strlen($sTextToAdd))
- {
- $sTextConverted = \MailSo\Base\HtmlUtils::ConvertHtmlToPlain($sTextToAdd);
- $this->Plugins()->RunHook('filter.message-plain', array($oAccount, &$oMessage, &$sTextConverted));
- $oMessage->AddText($sTextConverted, false);
- }
-
- $oMessage->AddText($sTextToAdd, $bTextIsHtml);
-
- if (\is_array($aAttachments))
- {
- foreach ($aAttachments as $sTempName => $aData)
- {
- $sFileName = (string) $aData[0];
- $bIsInline = (bool) $aData[1];
- $sCID = (string) $aData[2];
- $sContentLocation = isset($aData[3]) ? (string) $aData[3] : '';
-
- $rResource = $this->FilesProvider()->GetFile($oAccount, $sTempName);
- if (\is_resource($rResource))
- {
- $iFileSize = $this->FilesProvider()->FileSize($oAccount, $sTempName);
-
- $oMessage->Attachments()->Add(
- \MailSo\Mime\Attachment::NewInstance($rResource, $sFileName, $iFileSize, $bIsInline,
- \in_array(trim(trim($sCID), '<>'), $aFoundedCids),
- $sCID, array(), $sContentLocation
- )
- );
- }
- }
- }
-
- if ($mFoundDataURL && \is_array($mFoundDataURL) && 0 < \count($mFoundDataURL))
- {
- foreach ($mFoundDataURL as $sCidHash => $sDataUrlString)
- {
- $aMatch = array();
- $sCID = '<'.$sCidHash.'>';
- if (\preg_match('/^data:(image\/[a-zA-Z0-9]+);base64,(.+)$/i', $sDataUrlString, $aMatch) &&
- !empty($aMatch[1]) && !empty($aMatch[2]))
- {
- $sRaw = \MailSo\Base\Utils::Base64Decode($aMatch[2]);
- $iFileSize = \strlen($sRaw);
- if (0 < $iFileSize)
- {
- $sFileName = \preg_replace('/[^a-z0-9]+/i', '.', $aMatch[1]);
- $rResource = \MailSo\Base\ResourceRegistry::CreateMemoryResourceFromString($sRaw);
-
- $sRaw = '';
- unset($sRaw);
- unset($aMatch);
-
- $oMessage->Attachments()->Add(
- \MailSo\Mime\Attachment::NewInstance($rResource, $sFileName, $iFileSize, true, true, $sCID)
- );
- }
- }
- }
- }
-
- $this->Plugins()->RunHook('filter.build-message', array(&$oMessage));
- $this->Plugins()->RunHook('filter.build-message[2]', array(&$oMessage, $oAccount));
-
- return $oMessage;
- }
-
- /**
- * @param \RainLoop\Model\Account $oAccount
- *
- * @return void
- */
- private function deleteMessageAttachmnets($oAccount)
- {
- $aAttachments = $this->GetActionParam('Attachments', null);
-
- if (\is_array($aAttachments))
- {
- foreach (\array_keys($aAttachments) as $sTempName)
- {
- if ($this->FilesProvider()->FileExists($oAccount, $sTempName))
- {
- $this->FilesProvider()->Clear($oAccount, $sTempName);
- }
- }
- }
- }
-
- /**
- * @param \RainLoop\Model\Account $oAccount
- *
- * @return \MailSo\Mime\Message
- */
- private function buildReadReceiptMessage($oAccount)
- {
- $sReadReceipt = $this->GetActionParam('ReadReceipt', '');
- $sSubject = $this->GetActionParam('Subject', '');
- $sText = $this->GetActionParam('Text', '');
-
- $oIdentity = $this->GetAccountIdentity($oAccount);
-
- if (empty($sReadReceipt) || empty($sSubject) || empty($sText) || !$oIdentity)
- {
- throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::UnknownError);
- }
-
- $oMessage = \MailSo\Mime\Message::NewInstance();
- $oMessage->RegenerateMessageId();
-
- $oMessage->SetXMailer('RainLoop/'.APP_VERSION);
-
- $oMessage->SetFrom(\MailSo\Mime\Email::NewInstance($oIdentity->Email(), $oIdentity->Name()));
-
- $sReplyTo = $oIdentity->ReplyTo();
- if (!empty($sReplyTo))
- {
- $oReplyTo = \MailSo\Mime\EmailCollection::NewInstance($sReplyTo);
- if ($oReplyTo && $oReplyTo->Count())
- {
- $oMessage->SetReplyTo($oReplyTo);
- }
- }
-
- $oMessage->SetSubject($sSubject);
-
- $oToEmails = \MailSo\Mime\EmailCollection::NewInstance($sReadReceipt);
- if ($oToEmails && $oToEmails->Count())
- {
- $oMessage->SetTo($oToEmails);
- }
-
- $this->Plugins()->RunHook('filter.read-receipt-message-plain', array($oAccount, &$oMessage, &$sText));
-
- $oMessage->AddText($sText, false);
-
- $this->Plugins()->RunHook('filter.build-read-receipt-message', array(&$oMessage, $oAccount));
-
- return $oMessage;
- }
-
- /**
- * @return array
- */
- public function DoSaveMessage()
- {
- $oAccount = $this->initMailClientConnection();
-
- if (!$this->GetCapa(false, false, \RainLoop\Enumerations\Capa::COMPOSER, $oAccount))
- {
- return $this->FalseResponse(__FUNCTION__);
- }
-
- $sMessageFolder = $this->GetActionParam('MessageFolder', '');
- $sMessageUid = $this->GetActionParam('MessageUid', '');
-
- $sDraftFolder = $this->GetActionParam('DraftFolder', '');
- if (0 === strlen($sDraftFolder))
- {
- throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::UnknownError);
- }
-
- $oMessage = $this->buildMessage($oAccount, true);
-
- $this->Plugins()
- ->RunHook('filter.save-message', array(&$oMessage))
- ->RunHook('filter.save-message[2]', array(&$oMessage, $oAccount))
- ;
-
- $mResult = false;
- if ($oMessage)
- {
- $rMessageStream = \MailSo\Base\ResourceRegistry::CreateMemoryResource();
-
- $iMessageStreamSize = \MailSo\Base\Utils::MultipleStreamWriter(
- $oMessage->ToStream(false), array($rMessageStream), 8192, true, true);
-
- if (false !== $iMessageStreamSize)
- {
- $sMessageId = $oMessage->MessageId();
-
- \rewind($rMessageStream);
-
- $iNewUid = 0;
- $this->MailClient()->MessageAppendStream(
- $rMessageStream, $iMessageStreamSize, $sDraftFolder, array(
- \MailSo\Imap\Enumerations\MessageFlag::SEEN
- ), $iNewUid);
-
- if (!empty($sMessageId) && (null === $iNewUid || 0 === $iNewUid))
- {
- $iNewUid = $this->MailClient()->FindMessageUidByMessageId($sDraftFolder, $sMessageId);
- }
-
- $mResult = true;
-
- if (0 < strlen($sMessageFolder) && 0 < strlen($sMessageUid))
- {
- $this->MailClient()->MessageDelete($sMessageFolder, array($sMessageUid), true, true);
- }
-
- if (null !== $iNewUid && 0 < $iNewUid)
- {
- $mResult = array(
- 'NewFolder' => $sDraftFolder,
- 'NewUid' => $iNewUid
- );
- }
- }
- }
-
- return $this->DefaultResponse(__FUNCTION__, $mResult);
- }
-
- /**
- *
- * @param \RainLoop\Model\Account $oAccount
- * @param \MailSo\Mime\Message $oMessage
- * @param resource $rMessageStream
- * @param bool $bDsn = false
- * @param bool $bAddHiddenRcpt = true
- *
- * @throws \RainLoop\Exceptions\ClientException
- * @throws \MailSo\Net\Exceptions\ConnectionException
- */
- private function smtpSendMessage($oAccount, $oMessage,
- &$rMessageStream, &$iMessageStreamSize, $bDsn = false, $bAddHiddenRcpt = true)
- {
- $oRcpt = $oMessage->GetRcpt();
- if ($oRcpt && 0 < $oRcpt->Count())
- {
- $this->Plugins()->RunHook('filter.smtp-message-stream',
- array($oAccount, &$rMessageStream, &$iMessageStreamSize));
-
- $this->Plugins()->RunHook('filter.message-rcpt', array($oAccount, &$oRcpt));
-
- try
- {
- $oFrom = $oMessage->GetFrom();
- $sFrom = $oFrom instanceof \MailSo\Mime\Email ? $oFrom->GetEmail() : '';
- $sFrom = empty($sFrom) ? $oAccount->Email() : $sFrom;
-
- $this->Plugins()->RunHook('filter.smtp-from', array($oAccount, $oMessage, &$sFrom));
-
- $aHiddenRcpt = array();
- if ($bAddHiddenRcpt)
- {
- $this->Plugins()->RunHook('filter.smtp-hidden-rcpt', array($oAccount, $oMessage, &$aHiddenRcpt));
- }
-
- $bUsePhpMail = $oAccount->Domain()->OutUsePhpMail();
-
- $oSmtpClient = \MailSo\Smtp\SmtpClient::NewInstance()->SetLogger($this->Logger());
- $oSmtpClient->SetTimeOuts(10, (int) \RainLoop\Api::Config()->Get('labs', 'smtp_timeout', 60));
-
- $bLoggined = $oAccount->OutConnectAndLoginHelper($this->Plugins(), $oSmtpClient, $this->Config(), $bUsePhpMail);
-
- if ($bUsePhpMail)
- {
- if (\MailSo\Base\Utils::FunctionExistsAndEnabled('mail'))
- {
- $aToCollection = $oMessage->GetTo();
- if ($aToCollection && $oFrom)
- {
- $sRawBody = @\stream_get_contents($rMessageStream);
- if (!empty($sRawBody))
- {
- $sMailTo = \trim($aToCollection->ToString(true));
- $sMailSubject = \trim($oMessage->GetSubject());
- $sMailSubject = 0 === \strlen($sMailSubject) ? '' : \MailSo\Base\Utils::EncodeUnencodedValue(
- \MailSo\Base\Enumerations\Encoding::BASE64_SHORT, $sMailSubject);
-
- $sMailHeaders = $sMailBody = '';
- list($sMailHeaders, $sMailBody) = \explode("\r\n\r\n", $sRawBody, 2);
- unset($sRawBody);
-
- if ($this->Config()->Get('labs', 'mail_func_clear_headers', true))
- {
- $sMailHeaders = \MailSo\Base\Utils::RemoveHeaderFromHeaders($sMailHeaders, array(
- \MailSo\Mime\Enumerations\Header::TO_,
- \MailSo\Mime\Enumerations\Header::SUBJECT
- ));
- }
-
- if ($this->Config()->Get('debug', 'enable', false))
- {
- $this->Logger()->WriteDump(array(
- $sMailTo, $sMailSubject, $sMailBody, $sMailHeaders
- ));
- }
-
- $bR = $this->Config()->Get('labs', 'mail_func_additional_parameters', false) ?
- \mail($sMailTo, $sMailSubject, $sMailBody, $sMailHeaders, '-f'.$oFrom->GetEmail()) :
- \mail($sMailTo, $sMailSubject, $sMailBody, $sMailHeaders);
-
- if (!$bR)
- {
- throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::CantSendMessage);
- }
- }
- }
- }
- else
- {
- throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::CantSendMessage);
- }
- }
- else if ($oSmtpClient->IsConnected())
- {
- if (!empty($sFrom))
- {
- $oSmtpClient->MailFrom($sFrom, '', $bDsn);
- }
-
- $aRcpt =& $oRcpt->GetAsArray();
- foreach ($aRcpt as /* @var $oEmail \MailSo\Mime\Email */ $oEmail)
- {
- $oSmtpClient->Rcpt($oEmail->GetEmail(), $bDsn);
- }
-
- if ($bAddHiddenRcpt && \is_array($aHiddenRcpt) && 0 < \count($aHiddenRcpt))
- {
- foreach ($aHiddenRcpt as $sEmail)
- {
- if (\preg_match('/^[^@\s]+@[^@\s]+$/', $sEmail))
- {
- $oSmtpClient->Rcpt($sEmail);
- }
- }
- }
-
- $oSmtpClient->DataWithStream($rMessageStream);
-
- if ($bLoggined)
- {
- $oSmtpClient->Logout();
- }
-
- $oSmtpClient->Disconnect();
- }
- }
- catch (\MailSo\Net\Exceptions\ConnectionException $oException)
- {
- if ($this->Config()->Get('labs', 'smtp_show_server_errors'))
- {
- throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::ClientViewError, $oException);
- }
- else
- {
- throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::ConnectionError, $oException);
- }
- }
- catch (\MailSo\Smtp\Exceptions\LoginException $oException)
- {
- throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::AuthError, $oException);
- }
- catch (\Exception $oException)
- {
- if ($this->Config()->Get('labs', 'smtp_show_server_errors'))
- {
- throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::ClientViewError, $oException);
- }
- else
- {
- throw $oException;
- }
- }
- }
- else
- {
- throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::InvalidRecipients);
- }
- }
-
- /**
- * @return array
- */
- public function DoSendMessage()
- {
- $oAccount = $this->initMailClientConnection();
-
- if (!$this->GetCapa(false, false, \RainLoop\Enumerations\Capa::COMPOSER, $oAccount))
- {
- return $this->FalseResponse(__FUNCTION__);
- }
-
- $oConfig = $this->Config();
-
- $sDraftFolder = $this->GetActionParam('MessageFolder', '');
- $sDraftUid = $this->GetActionParam('MessageUid', '');
- $sSentFolder = $this->GetActionParam('SentFolder', '');
- $aDraftInfo = $this->GetActionParam('DraftInfo', null);
- $bDsn = '1' === (string) $this->GetActionParam('Dsn', '0');
-
- $oMessage = $this->buildMessage($oAccount, false);
-
- $this->Plugins()
- ->RunHook('filter.send-message', array(&$oMessage))
- ->RunHook('filter.send-message[2]', array(&$oMessage, $oAccount))
- ;
-
- $mResult = false;
- try
- {
- if ($oMessage)
- {
- $rMessageStream = \MailSo\Base\ResourceRegistry::CreateMemoryResource();
-
- $iMessageStreamSize = \MailSo\Base\Utils::MultipleStreamWriter(
- $oMessage->ToStream(true), array($rMessageStream), 8192, true, true, true);
-
- if (false !== $iMessageStreamSize)
- {
- $this->smtpSendMessage($oAccount, $oMessage, $rMessageStream, $iMessageStreamSize, $bDsn, true);
-
- if (\is_array($aDraftInfo) && 3 === \count($aDraftInfo))
- {
- $sDraftInfoType = $aDraftInfo[0];
- $sDraftInfoUid = $aDraftInfo[1];
- $sDraftInfoFolder = $aDraftInfo[2];
-
- try
- {
- switch (\strtolower($sDraftInfoType))
- {
- case 'reply':
- case 'reply-all':
- $this->MailClient()->MessageSetFlag($sDraftInfoFolder, array($sDraftInfoUid), true,
- \MailSo\Imap\Enumerations\MessageFlag::ANSWERED, true);
- break;
- case 'forward':
- $sForwardedFlag = $this->Config()->Get('labs', 'imap_forwarded_flag', '');
- if (0 < strlen($sForwardedFlag))
- {
- $this->MailClient()->MessageSetFlag($sDraftInfoFolder, array($sDraftInfoUid), true,
- $sForwardedFlag, true);
- }
- break;
- }
- }
- catch (\Exception $oException)
- {
- $this->Logger()->WriteException($oException, \MailSo\Log\Enumerations\Type::ERROR);
- }
- }
-
- if (0 < \strlen($sSentFolder))
- {
- try
- {
- if (!$oMessage->GetBcc())
- {
- if (\is_resource($rMessageStream))
- {
- \rewind($rMessageStream);
- }
-
- $this->Plugins()->RunHook('filter.sent-message-stream',
- array($oAccount, &$rMessageStream, &$iMessageStreamSize));
-
- $this->MailClient()->MessageAppendStream(
- $rMessageStream, $iMessageStreamSize, $sSentFolder, array(
- \MailSo\Imap\Enumerations\MessageFlag::SEEN
- )
- );
- }
- else
- {
- $rAppendMessageStream = \MailSo\Base\ResourceRegistry::CreateMemoryResource();
-
- $iAppendMessageStreamSize = \MailSo\Base\Utils::MultipleStreamWriter(
- $oMessage->ToStream(false), array($rAppendMessageStream), 8192, true, true, true);
-
- $this->Plugins()->RunHook('filter.sent-message-stream',
- array($oAccount, &$rAppendMessageStream, &$iAppendMessageStreamSize));
-
- $this->MailClient()->MessageAppendStream(
- $rAppendMessageStream, $iAppendMessageStreamSize, $sSentFolder, array(
- \MailSo\Imap\Enumerations\MessageFlag::SEEN
- ));
-
- if (\is_resource($rAppendMessageStream))
- {
- @fclose($rAppendMessageStream);
- }
- }
- }
- catch (\Exception $oException)
- {
- throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::CantSaveMessage, $oException);
- }
- }
-
- if (\is_resource($rMessageStream))
- {
- @\fclose($rMessageStream);
- }
-
- $this->deleteMessageAttachmnets($oAccount);
-
- if (0 < \strlen($sDraftFolder) && 0 < \strlen($sDraftUid))
- {
- try
- {
- $this->MailClient()->MessageDelete($sDraftFolder, array($sDraftUid), true, true);
- }
- catch (\Exception $oException)
- {
- $this->Logger()->WriteException($oException, \MailSo\Log\Enumerations\Type::ERROR);
- }
- }
-
- $mResult = true;
- }
- }
- }
- catch (\RainLoop\Exceptions\ClientException $oException)
- {
- throw $oException;
- }
- catch (\Exception $oException)
- {
- throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::CantSendMessage, $oException);
- }
-
- if (false === $mResult)
- {
- throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::CantSendMessage);
- }
-
- try
- {
- if ($oMessage && $this->AddressBookProvider($oAccount)->IsActive())
- {
- $aArrayToFrec = array();
- $oToCollection = $oMessage->GetTo();
- if ($oToCollection)
- {
- $aTo =& $oToCollection->GetAsArray();
- foreach ($aTo as /* @var $oEmail \MailSo\Mime\Email */ $oEmail)
- {
- $aArrayToFrec[$oEmail->GetEmail(true)] = $oEmail->ToString(false, true);
- }
- }
-
- if (0 < \count($aArrayToFrec))
- {
- $oSettings = $this->SettingsProvider()->Load($oAccount);
-
- $this->AddressBookProvider($oAccount)->IncFrec(
- $oAccount->ParentEmailHelper(), \array_values($aArrayToFrec),
- !!$oSettings->GetConf('ContactsAutosave',
- !!$oConfig->Get('defaults', 'contacts_autosave', true)));
- }
- }
- }
- catch (\Exception $oException)
- {
- $this->Logger()->WriteException($oException);
- }
-
- return $this->TrueResponse(__FUNCTION__);
- }
-
- /**
- * @return array
- */
- public function DoSendReadReceiptMessage()
- {
- $oAccount = $this->initMailClientConnection();
-
- if (!$this->GetCapa(false, false, \RainLoop\Enumerations\Capa::COMPOSER, $oAccount))
- {
- return $this->FalseResponse(__FUNCTION__);
- }
-
- $oMessage = $this->buildReadReceiptMessage($oAccount);
-
- $this->Plugins()->RunHook('filter.send-read-receipt-message', array(&$oMessage, $oAccount));
-
- $mResult = false;
- try
- {
- if ($oMessage)
- {
- $rMessageStream = \MailSo\Base\ResourceRegistry::CreateMemoryResource();
-
- $iMessageStreamSize = \MailSo\Base\Utils::MultipleStreamWriter(
- $oMessage->ToStream(true), array($rMessageStream), 8192, true, true, true);
-
- if (false !== $iMessageStreamSize)
- {
- $this->smtpSendMessage($oAccount, $oMessage, $rMessageStream, $iMessageStreamSize, false, false);
-
- if (\is_resource($rMessageStream))
- {
- @\fclose($rMessageStream);
- }
-
- $mResult = true;
-
- $sReadReceiptFlag = $this->Config()->Get('labs', 'imap_read_receipt_flag', '');
- if (!empty($sReadReceiptFlag))
- {
- $sFolderFullName = $this->GetActionParam('MessageFolder', '');
- $sUid = $this->GetActionParam('MessageUid', '');
-
- $this->Cacher($oAccount)->Set(\RainLoop\KeyPathHelper::ReadReceiptCache($oAccount->Email(), $sFolderFullName, $sUid), '1');
-
- if (0 < \strlen($sFolderFullName) && 0 < \strlen($sUid))
- {
- try
- {
- $this->MailClient()->MessageSetFlag($sFolderFullName, array($sUid), true, $sReadReceiptFlag, true, true);
- }
- catch (\Exception $oException) {}
- }
- }
- }
- }
- }
- catch (\RainLoop\Exceptions\ClientException $oException)
- {
- throw $oException;
- }
- catch (\Exception $oException)
- {
- throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::CantSendMessage, $oException);
- }
-
- if (false === $mResult)
- {
- throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::CantSendMessage);
- }
-
- return $this->TrueResponse(__FUNCTION__);
- }
-
- /**
- * @return array
- */
- public function DoQuota()
- {
- $oAccount = $this->initMailClientConnection();
-
- if (!$this->GetCapa(false, false, \RainLoop\Enumerations\Capa::QUOTA, $oAccount))
- {
- return $this->DefaultResponse(__FUNCTION__, array(0, 0, 0, 0));
- }
-
- try
- {
- $aQuota = $this->MailClient()->Quota();
- }
- catch (\Exception $oException)
- {
- throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::MailServerError, $oException);
- }
-
- return $this->DefaultResponse(__FUNCTION__, $aQuota);
- }
-
- private function getContactsSyncData($oAccount)
- {
- $mResult = null;
-
- $sData = $this->StorageProvider()->Get($oAccount,
- \RainLoop\Providers\Storage\Enumerations\StorageType::CONFIG,
- 'contacts_sync'
- );
-
- if (!empty($sData))
- {
- $mData = \RainLoop\Utils::DecodeKeyValues($sData);
- if (\is_array($mData))
- {
- $mResult = array(
- 'Enable' => isset($mData['Enable']) ? !!$mData['Enable'] : false,
- 'Url' => isset($mData['Url']) ? \trim($mData['Url']) : '',
- 'User' => isset($mData['User']) ? \trim($mData['User']) : '',
- 'Password' => isset($mData['Password']) ? $mData['Password'] : ''
- );
- }
- }
-
- return $mResult;
- }
-
- /**
- * @return array
- */
- public function DoSaveContactsSyncData()
- {
- $oAccount = $this->getAccountFromToken();
-
- $oAddressBookProvider = $this->AddressBookProvider($oAccount);
- if (!$oAddressBookProvider || !$oAddressBookProvider->IsActive())
- {
- return $this->FalseResponse(__FUNCTION__);
- }
-
- $bEnabled = '1' === (string) $this->GetActionParam('Enable', '0');
- $sUrl = $this->GetActionParam('Url', '');
- $sUser = $this->GetActionParam('User', '');
- $sPassword = $this->GetActionParam('Password', '');
-
- $mData = $this->getContactsSyncData($oAccount);
-
- $bResult = $this->StorageProvider()->Put($oAccount,
- \RainLoop\Providers\Storage\Enumerations\StorageType::CONFIG,
- 'contacts_sync',
- \RainLoop\Utils::EncodeKeyValues(array(
- 'Enable' => $bEnabled,
- 'User' => $sUser,
- 'Password' => APP_DUMMY === $sPassword && isset($mData['Password']) ?
- $mData['Password'] : (APP_DUMMY === $sPassword ? '' : $sPassword),
- 'Url' => $sUrl
- ))
- );
-
- return $this->DefaultResponse(__FUNCTION__, $bResult);
- }
-
- /**
- * @return array
- */
- public function DoContactsSync()
- {
- $bResult = false;
- $oAccount = $this->getAccountFromToken();
-
- $oAddressBookProvider = $this->AddressBookProvider($oAccount);
- if ($oAddressBookProvider && $oAddressBookProvider->IsActive())
- {
- $mData = $this->getContactsSyncData($oAccount);
- if (\is_array($mData) && isset($mData['Enable'], $mData['User'], $mData['Password'], $mData['Url']) && $mData['Enable'])
- {
- $bResult = $oAddressBookProvider->Sync(
- $oAccount->ParentEmailHelper(),
- $mData['Url'], $mData['User'], $mData['Password']);
- }
- }
-
- if (!$bResult)
- {
- throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::ContactsSyncError);
- }
-
- return $this->TrueResponse(__FUNCTION__);
- }
-
- private function getTwoFactorInfo($oAccount, $bRemoveSecret = false)
- {
- $sEmail = $oAccount->ParentEmailHelper();
-
- $mData = null;
-
- $aResult = array(
- 'User' => '',
- 'IsSet' => false,
- 'Enable' => false,
- 'Secret' => '',
- 'UrlTitle' => '',
- 'BackupCodes' => ''
- );
-
- if (!empty($sEmail))
- {
- $aResult['User'] = $sEmail;
-
- $sData = $this->StorageProvider()->Get($oAccount,
- \RainLoop\Providers\Storage\Enumerations\StorageType::CONFIG,
- 'two_factor'
- );
-
- if ($sData)
- {
- $mData = \RainLoop\Utils::DecodeKeyValues($sData);
- }
- }
-
- if (\is_array($mData) && !empty($aResult['User']) &&
- !empty($mData['User']) && !empty($mData['Secret']) &&
- !empty($mData['BackupCodes']) && $sEmail === $mData['User'])
- {
- $aResult['IsSet'] = true;
- $aResult['Enable'] = isset($mData['Enable']) ? !!$mData['Enable'] : false;
- $aResult['Secret'] = $mData['Secret'];
- $aResult['BackupCodes'] = $mData['BackupCodes'];
- $aResult['UrlTitle'] = $this->Config()->Get('webmail', 'title', '');
- }
-
- if ($bRemoveSecret)
- {
- if (isset($aResult['Secret']))
- {
- unset($aResult['Secret']);
- }
-
- if (isset($aResult['UrlTitle']))
- {
- unset($aResult['UrlTitle']);
- }
-
- if (isset($aResult['BackupCodes']))
- {
- unset($aResult['BackupCodes']);
- }
- }
-
- return $aResult;
- }
-
- /**
- * @param \RainLoop\Model\Account $oAccount
- * @param string $sCode
- *
- * @return bool
- */
- private function removeBackupCodeFromTwoFactorInfo($oAccount, $sCode)
- {
- if (!$oAccount || empty($sCode))
- {
- return false;
- }
-
- $sData = $this->StorageProvider()->Get($oAccount,
- \RainLoop\Providers\Storage\Enumerations\StorageType::CONFIG,
- 'two_factor'
- );
-
- if ($sData)
- {
- $mData = \RainLoop\Utils::DecodeKeyValues($sData);
-
- if (!empty($mData['BackupCodes']))
- {
- $sBackupCodes = \preg_replace('/[^\d]+/', ' ', ' '.$mData['BackupCodes'].' ');
- $sBackupCodes = \str_replace(' '.$sCode.' ', '', $sBackupCodes);
-
- $mData['BackupCodes'] = \trim(\preg_replace('/[^\d]+/', ' ', $sBackupCodes));
-
- return $this->StorageProvider()->Put($oAccount,
- \RainLoop\Providers\Storage\Enumerations\StorageType::CONFIG,
- 'two_factor',
- \RainLoop\Utils::EncodeKeyValues($mData)
- );
- }
- }
-
- return false;
- }
-
- /**
- * @return array
- */
- public function DoGetTwoFactorInfo()
- {
- $oAccount = $this->getAccountFromToken();
-
- if (!$this->TwoFactorAuthProvider()->IsActive() ||
- !$this->GetCapa(false, false, \RainLoop\Enumerations\Capa::TWO_FACTOR, $oAccount))
- {
- return $this->FalseResponse(__FUNCTION__);
- }
-
- return $this->DefaultResponse(__FUNCTION__,
- $this->getTwoFactorInfo($oAccount, true));
- }
-
- /**
- * @return array
- */
- public function DoCreateTwoFactorSecret()
- {
- $oAccount = $this->getAccountFromToken();
-
- if (!$this->TwoFactorAuthProvider()->IsActive() ||
- !$this->GetCapa(false, false, \RainLoop\Enumerations\Capa::TWO_FACTOR, $oAccount))
- {
- return $this->FalseResponse(__FUNCTION__);
- }
-
- $sEmail = $oAccount->ParentEmailHelper();
-
- $sSecret = $this->TwoFactorAuthProvider()->CreateSecret();
-
- $aCodes = array();
- for ($iIndex = 9; $iIndex > 0; $iIndex--)
- {
- $aCodes[] = \rand(100000000, 900000000);
- }
-
- $this->StorageProvider()->Put($oAccount,
- \RainLoop\Providers\Storage\Enumerations\StorageType::CONFIG,
- 'two_factor',
- \RainLoop\Utils::EncodeKeyValues(array(
- 'User' => $sEmail,
- 'Enable' => false,
- 'Secret' => $sSecret,
- 'BackupCodes' => \implode(' ', $aCodes)
- ))
- );
-
- $this->requestSleep();
-
- return $this->DefaultResponse(__FUNCTION__,
- $this->getTwoFactorInfo($oAccount));
- }
-
- /**
- * @return array
- */
- public function DoShowTwoFactorSecret()
- {
- $oAccount = $this->getAccountFromToken();
-
- if (!$this->TwoFactorAuthProvider()->IsActive() ||
- !$this->GetCapa(false, false, \RainLoop\Enumerations\Capa::TWO_FACTOR, $oAccount))
- {
- return $this->FalseResponse(__FUNCTION__);
- }
-
- $aResult = $this->getTwoFactorInfo($oAccount);
- if (\is_array($aResult))
- {
- unset($aResult['BackupCodes']);
- }
-
- return $this->DefaultResponse(__FUNCTION__, $aResult);
- }
-
- /**
- * @return array
- */
- public function DoEnableTwoFactor()
- {
- $oAccount = $this->getAccountFromToken();
-
- if (!$this->TwoFactorAuthProvider()->IsActive() ||
- !$this->GetCapa(false, false, \RainLoop\Enumerations\Capa::TWO_FACTOR, $oAccount))
- {
- return $this->FalseResponse(__FUNCTION__);
- }
-
- $sEmail = $oAccount->ParentEmailHelper();
-
- $bResult = false;
- $mData = $this->getTwoFactorInfo($oAccount);
- if (isset($mData['Secret'], $mData['BackupCodes']))
- {
- $bResult = $this->StorageProvider()->Put($oAccount,
- \RainLoop\Providers\Storage\Enumerations\StorageType::CONFIG,
- 'two_factor',
- \RainLoop\Utils::EncodeKeyValues(array(
- 'User' => $sEmail,
- 'Enable' => '1' === \trim($this->GetActionParam('Enable', '0')),
- 'Secret' => $mData['Secret'],
- 'BackupCodes' => $mData['BackupCodes']
- ))
- );
- }
-
- return $this->DefaultResponse(__FUNCTION__, $bResult);
- }
-
- /**
- * @return array
- */
- public function DoTestTwoFactorInfo()
- {
- $oAccount = $this->getAccountFromToken();
-
- if (!$this->TwoFactorAuthProvider()->IsActive() ||
- !$this->GetCapa(false, false, \RainLoop\Enumerations\Capa::TWO_FACTOR, $oAccount))
- {
- return $this->FalseResponse(__FUNCTION__);
- }
-
- $sCode = \trim($this->GetActionParam('Code', ''));
-
- $aData = $this->getTwoFactorInfo($oAccount);
- $sSecret = !empty($aData['Secret']) ? $aData['Secret'] : '';
-
-// $this->Logger()->WriteDump(array(
-// $sCode, $sSecret, $aData,
-// $this->TwoFactorAuthProvider()->VerifyCode($sSecret, $sCode)
-// ));
-
- $this->requestSleep();
-
- return $this->DefaultResponse(__FUNCTION__,
- $this->TwoFactorAuthProvider()->VerifyCode($sSecret, $sCode));
- }
-
- /**
- * @return array
- */
- public function DoClearTwoFactorInfo()
- {
- $oAccount = $this->getAccountFromToken();
-
- if (!$this->TwoFactorAuthProvider()->IsActive() ||
- !$this->GetCapa(false, false, \RainLoop\Enumerations\Capa::TWO_FACTOR, $oAccount))
- {
- return $this->FalseResponse(__FUNCTION__);
- }
-
- $this->StorageProvider()->Clear($oAccount,
- \RainLoop\Providers\Storage\Enumerations\StorageType::CONFIG,
- 'two_factor'
- );
-
- return $this->DefaultResponse(__FUNCTION__,
- $this->getTwoFactorInfo($oAccount, true));
- }
-
- /**
- * @return array
- */
- public function DoContacts()
- {
- $oAccount = $this->getAccountFromToken();
-
- $sSearch = \trim($this->GetActionParam('Search', ''));
- $iOffset = (int) $this->GetActionParam('Offset', 0);
- $iLimit = (int) $this->GetActionParam('Limit', 20);
- $iOffset = 0 > $iOffset ? 0 : $iOffset;
- $iLimit = 0 > $iLimit ? 20 : $iLimit;
-
- $iResultCount = 0;
- $mResult = array();
-
- $oAbp = $this->AddressBookProvider($oAccount);
- if ($oAbp->IsActive())
- {
- $iResultCount = 0;
- $mResult = $oAbp->GetContacts($oAccount->ParentEmailHelper(),
- $iOffset, $iLimit, $sSearch, $iResultCount);
- }
-
- return $this->DefaultResponse(__FUNCTION__, array(
- 'Offset' => $iOffset,
- 'Limit' => $iLimit,
- 'Count' => $iResultCount,
- 'Search' => $sSearch,
- 'List' => $mResult
- ));
- }
-
- /**
- * @return array
- */
- public function DoContactsDelete()
- {
- $oAccount = $this->getAccountFromToken();
- $aUids = \explode(',', (string) $this->GetActionParam('Uids', ''));
-
- $aFilteredUids = \array_filter($aUids, function (&$mUid) {
- $mUid = (int) \trim($mUid);
- return 0 < $mUid;
- });
-
- $bResult = false;
- if (0 < \count($aFilteredUids) && $this->AddressBookProvider($oAccount)->IsActive())
- {
- $bResult = $this->AddressBookProvider($oAccount)->DeleteContacts($oAccount->ParentEmailHelper(), $aFilteredUids);
- }
-
- return $this->DefaultResponse(__FUNCTION__, $bResult);
- }
-
- /**
- * @return array
- */
- public function DoContactSave()
- {
- $oAccount = $this->getAccountFromToken();
-
- $bResult = false;
-
- $oAddressBookProvider = $this->AddressBookProvider($oAccount);
- $sRequestUid = \trim($this->GetActionParam('RequestUid', ''));
- if ($oAddressBookProvider && $oAddressBookProvider->IsActive() && 0 < \strlen($sRequestUid))
- {
- $sUid = \trim($this->GetActionParam('Uid', ''));
-
- $oContact = null;
- if (0 < \strlen($sUid))
- {
- $oContact = $oAddressBookProvider->GetContactByID($oAccount->ParentEmailHelper(), $sUid);
- }
-
- if (!$oContact)
- {
- $oContact = new \RainLoop\Providers\AddressBook\Classes\Contact();
- if (0 < \strlen($sUid))
- {
- $oContact->IdContact = $sUid;
- }
- }
-
- $oContact->Properties = array();
- $aProperties = $this->GetActionParam('Properties', array());
- if (\is_array($aProperties))
- {
- foreach ($aProperties as $aItem)
- {
- if ($aItem && isset($aItem[0], $aItem[1]) && \is_numeric($aItem[0]))
- {
- $oProp = new \RainLoop\Providers\AddressBook\Classes\Property();
- $oProp->Type = (int) $aItem[0];
- $oProp->Value = $aItem[1];
- $oProp->TypeStr = empty($aItem[2]) ? '': $aItem[2];
-
- $oContact->Properties[] = $oProp;
- }
- }
- }
-
- if (!empty($oContact->Etag))
- {
- $oContact->Etag = \md5($oContact->ToVCard());
- }
-
- $oContact->PopulateDisplayAndFullNameValue(true);
-
- $bResult = $oAddressBookProvider->ContactSave($oAccount->ParentEmailHelper(), $oContact);
- }
-
- return $this->DefaultResponse(__FUNCTION__, array(
- 'RequestUid' => $sRequestUid,
- 'ResultID' => $bResult ? $oContact->IdContact : '',
- 'Result' => $bResult
- ));
- }
-
- /**
- * @return array
- */
- public function DoSuggestions()
- {
- $oAccount = $this->getAccountFromToken();
-
- $sQuery = \trim($this->GetActionParam('Query', ''));
- $iLimit = (int) $this->Config()->Get('contacts', 'suggestions_limit', 20);
-
- $aResult = array();
-
- $this->Plugins()->RunHook('ajax.suggestions-input-parameters', array(&$sQuery, &$iLimit, $oAccount));
-
- $iLimit = (int) $iLimit;
- if (5 > $iLimit)
- {
- $iLimit = 5;
- }
-
- $this->Plugins()->RunHook('ajax.suggestions-pre', array(&$aResult, $sQuery, $oAccount, $iLimit));
-
- if ($iLimit > \count($aResult) && 0 < \strlen($sQuery))
- {
- try
- {
- // Address Book
- $oAddressBookProvider = $this->AddressBookProvider($oAccount);
- if ($oAddressBookProvider && $oAddressBookProvider->IsActive())
- {
- $aSuggestions = $oAddressBookProvider->GetSuggestions($oAccount->ParentEmailHelper(), $sQuery, $iLimit);
- if (0 === \count($aResult))
- {
- $aResult = $aSuggestions;
- }
- else
- {
- $aResult = \array_merge($aResult, $aSuggestions);
- }
- }
- }
- catch (\Exception $oException)
- {
- $this->Logger()->WriteException($oException);
- }
- }
-
- if ($iLimit > \count($aResult) && 0 < \strlen($sQuery))
- {
- $oSuggestionsProvider = $this->SuggestionsProvider();
- if ($oSuggestionsProvider && $oSuggestionsProvider->IsActive())
- {
- $aSuggestionsProviderResult = $oSuggestionsProvider->Process($oAccount, $sQuery, $iLimit);
- if (\is_array($aSuggestionsProviderResult) && 0 < \count($aSuggestionsProviderResult))
- {
- $aResult = \array_merge($aResult, $aSuggestionsProviderResult);
- }
- }
-
- }
-
- $aResult = \RainLoop\Utils::RemoveSuggestionDuplicates($aResult);
- if ($iLimit < \count($aResult))
- {
- $aResult = \array_slice($aResult, 0, $iLimit);
- }
-
- $this->Plugins()->RunHook('ajax.suggestions-post', array(&$aResult, $sQuery, $oAccount, $iLimit));
-
- $aResult = \RainLoop\Utils::RemoveSuggestionDuplicates($aResult);
- if ($iLimit < \count($aResult))
- {
- $aResult = \array_slice($aResult, 0, $iLimit);
- }
-
- return $this->DefaultResponse(__FUNCTION__, $aResult);
- }
-
- /**
- * @return array
- */
- private function messageSetFlag($sActionFunction, $sResponseFunction)
- {
- $this->initMailClientConnection();
-
- $sFolder = $this->GetActionParam('Folder', '');
- $bSetAction = '1' === (string) $this->GetActionParam('SetAction', '0');
- $aUids = \explode(',', (string) $this->GetActionParam('Uids', ''));
- $aFilteredUids = \array_filter($aUids, function (&$sUid) {
- $sUid = (int) \trim($sUid);
- return 0 < $sUid;
- });
-
- try
- {
- $this->MailClient()->{$sActionFunction}($sFolder, $aFilteredUids, true, $bSetAction, true);
- }
- catch (\Exception $oException)
- {
- throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::MailServerError, $oException);
- }
-
- return $this->TrueResponse($sResponseFunction);
- }
-
- /**
- * @return array
- */
- public function DoMessageSetSeen()
- {
- return $this->messageSetFlag('MessageSetSeen', __FUNCTION__);
- }
-
- /**
- * @return array
- */
- public function DoMessageSetSeenToAll()
- {
- $this->initMailClientConnection();
-
- $sFolder = $this->GetActionParam('Folder', '');
- $bSetAction = '1' === (string) $this->GetActionParam('SetAction', '0');
-
- try
- {
- $this->MailClient()->MessageSetSeenToAll($sFolder, $bSetAction);
- }
- catch (\Exception $oException)
- {
- throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::MailServerError, $oException);
- }
-
- return $this->TrueResponse(__FUNCTION__);
- }
-
- /**
- * @return array
- */
- public function DoMessageSetFlagged()
- {
- return $this->messageSetFlag('MessageSetFlagged', __FUNCTION__);
- }
-
- /**
- * @return array
- *
- * @throws \MailSo\Base\Exceptions\Exception
- */
- public function DoMessage()
- {
- $sRawKey = (string) $this->GetActionParam('RawKey', '');
-
- $sFolder = '';
- $iUid = 0;
-
- $aValues = $this->getDecodedClientRawKeyValue($sRawKey, 4);
- if (is_array($aValues) && 4 === count($aValues))
- {
- $sFolder = (string) $aValues[0];
- $iUid = (int) $aValues[1];
-
- $this->verifyCacheByKey($sRawKey);
- }
- else
- {
- $sFolder = $this->GetActionParam('Folder', '');
- $iUid = (int) $this->GetActionParam('Uid', 0);
- }
-
- $oAccount = $this->initMailClientConnection();
-
- try
- {
- $oMessage = $this->MailClient()->Message($sFolder, $iUid, true,
- $this->cacherForThreads(),
- (int) $this->Config()->Get('labs', 'imap_body_text_limit', 0)
- );
- }
- catch (\Exception $oException)
- {
- throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::CantGetMessage, $oException);
- }
-
- if ($oMessage instanceof \MailSo\Mail\Message)
- {
- $this->Plugins()
- ->RunHook('filter.result-message', array(&$oMessage))
- ->RunHook('filter.result-message[2]', array(&$oMessage, $oAccount))
- ;
-
- $this->cacheByKey($sRawKey);
- }
-
- return $this->DefaultResponse(__FUNCTION__, $oMessage);
- }
-
- /**
- * @return array
- *
- * @throws \MailSo\Base\Exceptions\Exception
- */
- public function DoMessageDelete()
- {
- $this->initMailClientConnection();
-
- $sFolder = $this->GetActionParam('Folder', '');
- $aUids = \explode(',', (string) $this->GetActionParam('Uids', ''));
-
- $aFilteredUids = \array_filter($aUids, function (&$sUid) {
- $sUid = (int) \trim($sUid);
- return 0 < $sUid;
- });
-
- try
- {
- $this->MailClient()->MessageDelete($sFolder, $aFilteredUids, true, true,
- !!$this->Config()->Get('labs', 'use_imap_expunge_all_on_delete', false));
- }
- catch (\Exception $oException)
- {
- throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::CantDeleteMessage, $oException);
- }
-
- if ($this->Config()->Get('labs', 'use_imap_unselect', true))
- {
- try
- {
- $this->MailClient()->FolderUnSelect();
- }
- catch (\Exception $oException)
- {
- unset($oException);
- }
- }
-
- $sHash = '';
-
- try
- {
- $sHash = $this->MailClient()->FolderHash($sFolder);
- }
- catch (\Exception $oException)
- {
- unset($oException);
- }
-
- return $this->DefaultResponse(__FUNCTION__, '' === $sHash ? false : array($sFolder, $sHash));
- }
-
- /**
- * @return array
- *
- * @throws \MailSo\Base\Exceptions\Exception
- */
- public function DoMessageMove()
- {
- $this->initMailClientConnection();
-
- $sFromFolder = $this->GetActionParam('FromFolder', '');
- $sToFolder = $this->GetActionParam('ToFolder', '');
- $aUids = \explode(',', (string) $this->GetActionParam('Uids', ''));
- $bMarkAsRead = '1' === (string) $this->GetActionParam('MarkAsRead', '0');
-
- $aFilteredUids = \array_filter($aUids, function (&$mUid) {
- $mUid = (int) \trim($mUid);
- return 0 < $mUid;
- });
-
- if ($bMarkAsRead)
- {
- try
- {
- $this->MailClient()->MessageSetSeen($sFromFolder, $aFilteredUids, true, true);
- }
- catch (\Exception $oException)
- {
- unset($oException);
- }
- }
-
- try
- {
- $this->MailClient()->MessageMove($sFromFolder, $sToFolder, $aFilteredUids, true,
- !!$this->Config()->Get('labs', 'use_imap_move', true),
- !!$this->Config()->Get('labs', 'use_imap_expunge_all_on_delete', false)
- );
- }
- catch (\Exception $oException)
- {
- throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::CantMoveMessage, $oException);
- }
-
- if ($this->Config()->Get('labs', 'use_imap_unselect', true))
- {
- try
- {
- $this->MailClient()->FolderUnSelect();
- }
- catch (\Exception $oException)
- {
- unset($oException);
- }
- }
-
- $sHash = '';
-
- try
- {
- $sHash = $this->MailClient()->FolderHash($sFromFolder);
- }
- catch (\Exception $oException)
- {
- unset($oException);
- }
-
- return $this->DefaultResponse(__FUNCTION__, '' === $sHash ? false : array($sFromFolder, $sHash));
- }
-
- /**
- * @return array
- *
- * @throws \MailSo\Base\Exceptions\Exception
- */
- public function DoMessageCopy()
- {
- $this->initMailClientConnection();
-
- $sFromFolder = $this->GetActionParam('FromFolder', '');
- $sToFolder = $this->GetActionParam('ToFolder', '');
- $aUids = \explode(',', (string) $this->GetActionParam('Uids', ''));
-
- $aFilteredUids = \array_filter($aUids, function (&$mUid) {
- $mUid = (int) \trim($mUid);
- return 0 < $mUid;
- });
-
- try
- {
- $this->MailClient()->MessageCopy($sFromFolder, $sToFolder,
- $aFilteredUids, true);
-
- $sHash = $this->MailClient()->FolderHash($sFromFolder);
- }
- catch (\Exception $oException)
- {
- throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::CantCopyMessage, $oException);
- }
-
- return $this->DefaultResponse(__FUNCTION__,
- '' === $sHash ? false : array($sFromFolder, $sHash));
- }
-
- /**
- * @param string $sFileName
- * @param string $sContentType
- * @param string $sMimeIndex
- * @param int $iMaxLength = 250
- *
- * @return string
- */
- public function MainClearFileName($sFileName, $sContentType, $sMimeIndex, $iMaxLength = 250)
- {
- $sFileName = 0 === \strlen($sFileName) ? \preg_replace('/[^a-zA-Z0-9]/', '.', (empty($sMimeIndex) ? '' : $sMimeIndex.'.').$sContentType) : $sFileName;
- $sClearedFileName = \MailSo\Base\Utils::StripSpaces(\preg_replace('/[\.]+/', '.', $sFileName));
- $sExt = \MailSo\Base\Utils::GetFileExtension($sClearedFileName);
-
- if (10 < $iMaxLength && $iMaxLength < \strlen($sClearedFileName) - \strlen($sExt))
- {
- $sClearedFileName = \substr($sClearedFileName, 0, $iMaxLength).(empty($sExt) ? '' : '.'.$sExt);
- }
-
- return \MailSo\Base\Utils::ClearFileName(\MailSo\Base\Utils::Utf8Clear($sClearedFileName));
- }
-
- /**
- * @return array
- */
- public function DoMessageUploadAttachments()
- {
- $oAccount = $this->initMailClientConnection();
-
- $mResult = false;
- $self = $this;
-
- try
- {
- $aAttachments = $this->GetActionParam('Attachments', array());
- if (\is_array($aAttachments) && 0 < \count($aAttachments))
- {
- $mResult = array();
- foreach ($aAttachments as $sAttachment)
- {
- $aValues = \RainLoop\Utils::DecodeKeyValuesQ($sAttachment);
- if (\is_array($aValues))
- {
- $sFolder = isset($aValues['Folder']) ? $aValues['Folder'] : '';
- $iUid = (int) isset($aValues['Uid']) ? $aValues['Uid'] : 0;
- $sMimeIndex = (string) isset($aValues['MimeIndex']) ? $aValues['MimeIndex'] : '';
-
- $sTempName = \md5($sAttachment);
- if (!$this->FilesProvider()->FileExists($oAccount, $sTempName))
- {
- $this->MailClient()->MessageMimeStream(
- function($rResource, $sContentType, $sFileName, $sMimeIndex = '') use ($oAccount, &$mResult, $sTempName, $sAttachment, $self) {
- if (is_resource($rResource))
- {
- $sContentType = (empty($sFileName)) ? 'text/plain' : \MailSo\Base\Utils::MimeContentType($sFileName);
- $sFileName = $self->MainClearFileName($sFileName, $sContentType, $sMimeIndex);
-
- if ($self->FilesProvider()->PutFile($oAccount, $sTempName, $rResource))
- {
- $mResult[$sTempName] = $sAttachment;
- }
- }
- }, $sFolder, $iUid, true, $sMimeIndex);
- }
- else
- {
- $mResult[$sTempName] = $sAttachment;
- }
- }
- }
- }
- }
- catch (\Exception $oException)
- {
- throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::MailServerError, $oException);
- }
-
- return $this->DefaultResponse(__FUNCTION__, $mResult);
- }
-
- /**
- * @return array
- */
- public function DoComposeUploadExternals()
- {
- $oAccount = $this->getAccountFromToken();
-
- $mResult = false;
- $aExternals = $this->GetActionParam('Externals', array());
- if (\is_array($aExternals) && 0 < \count($aExternals))
- {
- $oHttp = \MailSo\Base\Http::SingletonInstance();
-
- $mResult = array();
- foreach ($aExternals as $sUrl)
- {
- $mResult[$sUrl] = '';
-
- $sTempName = \md5($sUrl);
-
- $iCode = 0;
- $sContentType = '';
-
- $rFile = $this->FilesProvider()->GetFile($oAccount, $sTempName, 'wb+');
- if ($rFile && $oHttp->SaveUrlToFile($sUrl, $rFile, '', $sContentType, $iCode, $this->Logger(), 60,
- $this->Config()->Get('labs', 'curl_proxy', ''), $this->Config()->Get('labs', 'curl_proxy_auth', '')))
- {
- $mResult[$sUrl] = $sTempName;
- }
-
- if (\is_resource($rFile))
- {
- @\fclose($rFile);
- }
- }
- }
-
- return $this->DefaultResponse(__FUNCTION__, $mResult);
- }
-
- /**
- * @return array
- */
- public function DoComposeUploadDrive()
- {
- $oAccount = $this->getAccountFromToken();
-
- $mResult = false;
-
- $sUrl = $this->GetActionParam('Url', '');
- $sAccessToken = $this->GetActionParam('AccessToken', '');
- $sGoogleApiKey = (string) $this->Config()->Get('social', 'google_api_key', '');
-
- if (0 < \strlen($sUrl) && 0 < \strlen($sAccessToken) && 0 < \strlen($sGoogleApiKey))
- {
- $oHttp = \MailSo\Base\Http::SingletonInstance();
-
- $mResult[$sUrl] = false;
-
- $sTempName = \md5($sUrl);
-
- $iCode = 0;
- $sContentType = '';
-
- $rFile = $this->FilesProvider()->GetFile($oAccount, $sTempName, 'wb+');
- if ($rFile && $oHttp->SaveUrlToFile($sUrl.'&key='.$sGoogleApiKey, $rFile, '', $sContentType, $iCode, $this->Logger(), 60,
- $this->Config()->Get('labs', 'curl_proxy', ''), $this->Config()->Get('labs', 'curl_proxy_auth', ''),
- array('Authorization: Bearer '.$sAccessToken)))
- {
- $mResult[$sUrl] = array($sTempName, 0);
- }
-
- if (\is_resource($rFile))
- {
- @\fclose($rFile);
- }
-
- if (isset($mResult[$sUrl][1]))
- {
- $mResult[$sUrl][1] = $rFile = $this->FilesProvider()->FileSize($oAccount, $sTempName);
- }
- }
-
- return $this->DefaultResponse(__FUNCTION__, $mResult);
- }
-
- /**
- * @return array
- */
- public function DoSocialUsers()
- {
- $oAccount = $this->getAccountFromToken();
-
- $oSettings = $this->SettingsProvider()->Load($oAccount);
-
- $aData = array(
- 'Google' => '',
- 'Facebook' => '',
- 'Twitter' => ''
- );
-
- if ($oSettings)
- {
- $aData['Google'] = $oSettings->GetConf('GoogleSocialName', '');
- $aData['Facebook'] = $oSettings->GetConf('FacebookSocialName', '');
- $aData['Twitter'] = $oSettings->GetConf('TwitterSocialName', '');
- }
-
- return $this->DefaultResponse(__FUNCTION__, $aData);
- }
-
- /**
- * @return array
- */
- public function DoSocialGoogleDisconnect()
- {
- $oAccount = $this->getAccountFromToken();
- return $this->DefaultResponse(__FUNCTION__, $this->Social()->GoogleDisconnect($oAccount));
- }
-
- /**
- * @return array
- */
- public function DoSocialTwitterDisconnect()
- {
- $oAccount = $this->getAccountFromToken();
- return $this->DefaultResponse(__FUNCTION__, $this->Social()->TwitterDisconnect($oAccount));
- }
-
- /**
- * @return array
- */
- public function DoSocialFacebookDisconnect()
- {
- $oAccount = $this->getAccountFromToken();
- return $this->DefaultResponse(__FUNCTION__, $this->Social()->FacebookDisconnect($oAccount));
- }
-
- /**
- * @param int $iError
- * @param int $iClientError
- *
- * @return string
- */
- private function getUploadErrorMessageByCode($iError, &$iClientError)
- {
- $sError = '';
- $iClientError = UploadClientError::NORMAL;
- switch($iError)
- {
- case UPLOAD_ERR_OK:
- break;
- case UPLOAD_ERR_INI_SIZE:
- case UPLOAD_ERR_FORM_SIZE:
- case UploadError::CONFIG_SIZE:
- case UploadError::EMPTY_FILES_DATA:
- $sError = 'File is too big';
- $iClientError = UploadClientError::FILE_IS_TOO_BIG;
- break;
- case UPLOAD_ERR_PARTIAL:
- $sError = 'File partially uploaded';
- $iClientError = UploadClientError::FILE_PARTIALLY_UPLOADED;
- break;
- case UPLOAD_ERR_NO_FILE:
- $sError = 'No file uploaded';
- $iClientError = UploadClientError::FILE_NO_UPLOADED;
- break;
- case UPLOAD_ERR_NO_TMP_DIR:
- case UPLOAD_ERR_CANT_WRITE:
- case UPLOAD_ERR_EXTENSION:
- $sError = 'Missing temp folder';
- $iClientError = UploadClientError::MISSING_TEMP_FOLDER;
- break;
- case UploadError::ON_SAVING:
- $sError = 'Error on saving file';
- $iClientError = UploadClientError::FILE_ON_SAVING_ERROR;
- break;
- case UploadError::FILE_TYPE:
- $sError = 'Invalid file type';
- $iClientError = UploadClientError::FILE_TYPE;
- break;
- case UploadError::UNKNOWN:
- default:
- $sError = 'Unknown error';
- $iClientError = UploadClientError::UNKNOWN;
- break;
- }
-
- return $sError;
- }
-
- /**
- * @return array
- */
- public function Upload()
- {
- $oAccount = $this->getAccountFromToken();
-
- $aResponse = array();
-
- $aFile = $this->GetActionParam('File', null);
- $iError = $this->GetActionParam('Error', \RainLoop\Enumerations\UploadError::UNKNOWN);
-
- if ($oAccount && UPLOAD_ERR_OK === $iError && \is_array($aFile))
- {
- $sSavedName = 'upload-post-'.\md5($aFile['name'].$aFile['tmp_name']);
- if (!$this->FilesProvider()->MoveUploadedFile($oAccount, $sSavedName, $aFile['tmp_name']))
- {
- $iError = \RainLoop\Enumerations\UploadError::ON_SAVING;
- }
- else
- {
- $sUploadName = $aFile['name'];
- $iSize = $aFile['size'];
- $sMimeType = $aFile['type'];
-
- $aResponse['Attachment'] = array(
- 'Name' => $sUploadName,
- 'TempName' => $sSavedName,
- 'MimeType' => $sMimeType,
- 'Size' => (int) $iSize
- );
- }
- }
-
- if (UPLOAD_ERR_OK !== $iError)
- {
- $iClientError = \RainLoop\Enumerations\UploadClientError::NORMAL;
- $sError = $this->getUploadErrorMessageByCode($iError, $iClientError);
-
- if (!empty($sError))
- {
- $aResponse['ErrorCode'] = $iClientError;
- $aResponse['Error'] = $sError;
- }
- }
-
- return $this->DefaultResponse(__FUNCTION__, $aResponse);
- }
-
- /**
- * @return array
- */
- public function DoClearUserBackground()
- {
- $oAccount = $this->getAccountFromToken();
-
- if (!$this->GetCapa(false, false, \RainLoop\Enumerations\Capa::USER_BACKGROUND, $oAccount))
- {
- return $this->FalseResponse(__FUNCTION__);
- }
-
- $oSettings = $this->SettingsProvider()->Load($oAccount);
- if ($oAccount && $oSettings)
- {
- $this->StorageProvider()->Clear($oAccount,
- \RainLoop\Providers\Storage\Enumerations\StorageType::CONFIG,
- 'background'
- );
-
- $oSettings->SetConf('UserBackgroundName', '');
- $oSettings->SetConf('UserBackgroundHash', '');
- }
-
- return $this->DefaultResponse(__FUNCTION__, $oAccount && $oSettings ?
- $this->SettingsProvider()->Save($oAccount, $oSettings) : false);
- }
-
- /**
- * @return array
- */
- public function UploadBackground()
- {
- $oAccount = $this->getAccountFromToken();
-
- if (!$this->GetCapa(false, false, \RainLoop\Enumerations\Capa::USER_BACKGROUND, $oAccount))
- {
- return $this->FalseResponse(__FUNCTION__);
- }
-
- $sName = '';
- $sHash = '';
-
- $aFile = $this->GetActionParam('File', null);
- $iError = $this->GetActionParam('Error', \RainLoop\Enumerations\UploadError::UNKNOWN);
-
- if ($oAccount && UPLOAD_ERR_OK === $iError && \is_array($aFile))
- {
- $sMimeType = \strtolower(\MailSo\Base\Utils::MimeContentType($aFile['name']));
- if (\in_array($sMimeType, array('image/png', 'image/jpg', 'image/jpeg')))
- {
- $sSavedName = 'upload-post-'.\md5($aFile['name'].$aFile['tmp_name']);
- if (!$this->FilesProvider()->MoveUploadedFile($oAccount, $sSavedName, $aFile['tmp_name']))
- {
- $iError = \RainLoop\Enumerations\UploadError::ON_SAVING;
- }
- else
- {
- $rData = $this->FilesProvider()->GetFile($oAccount, $sSavedName);
- if (@\is_resource($rData))
- {
- $sData = @\stream_get_contents($rData);
- if (!empty($sData) && 0 < \strlen($sData))
- {
- $sName = $aFile['name'];
- if (empty($sName))
- {
- $sName = '_';
- }
-
- if ($this->StorageProvider()->Put($oAccount,
- \RainLoop\Providers\Storage\Enumerations\StorageType::CONFIG,
- 'background',
- \json_encode(array(
- 'Name' => $aFile['name'],
- 'ContentType' => $sMimeType,
- 'Raw' => \base64_encode($sData)
- ))
- ))
- {
- $oSettings = $this->SettingsProvider()->Load($oAccount);
- if ($oSettings)
- {
- $sHash = \MailSo\Base\Utils::Md5Rand($sName.APP_VERSION.APP_SALT);
-
- $oSettings->SetConf('UserBackgroundName', $sName);
- $oSettings->SetConf('UserBackgroundHash', $sHash);
- $this->SettingsProvider()->Save($oAccount, $oSettings);
- }
- }
- }
-
- unset($sData);
- }
-
- if (@\is_resource($rData))
- {
- @\fclose($rData);
- }
-
- unset($rData);
- }
-
- $this->FilesProvider()->Clear($oAccount, $sSavedName);
- }
- else
- {
- $iError = \RainLoop\Enumerations\UploadError::FILE_TYPE;
- }
- }
-
- if (UPLOAD_ERR_OK !== $iError)
- {
- $iClientError = \RainLoop\Enumerations\UploadClientError::NORMAL;
- $sError = $this->getUploadErrorMessageByCode($iError, $iClientError);
-
- if (!empty($sError))
- {
- return $this->FalseResponse(__FUNCTION__, $iClientError, $sError);
- }
- }
-
- return $this->DefaultResponse(__FUNCTION__, !empty($sName) && !empty($sHash) ? array(
- 'Name' => $sName,
- 'Hash' => $sHash
- ) : false);
- }
-
- /**
- * @return array
- */
- public function UploadContacts()
- {
- $oAccount = $this->getAccountFromToken();
-
- $mResponse = false;
-
- $aFile = $this->GetActionParam('File', null);
- $iError = $this->GetActionParam('Error', \RainLoop\Enumerations\UploadError::UNKNOWN);
-
- if ($oAccount && UPLOAD_ERR_OK === $iError && \is_array($aFile))
- {
- $sSavedName = 'upload-post-'.\md5($aFile['name'].$aFile['tmp_name']);
- if (!$this->FilesProvider()->MoveUploadedFile($oAccount, $sSavedName, $aFile['tmp_name']))
- {
- $iError = \RainLoop\Enumerations\UploadError::ON_SAVING;
- }
- else
- {
- @\ini_set('auto_detect_line_endings', true);
- $mData = $this->FilesProvider()->GetFile($oAccount, $sSavedName);
- if ($mData)
- {
- $sFileStart = @\fread($mData, 20);
- \rewind($mData);
-
- if (false !== $sFileStart)
- {
- $sFileStart = \trim($sFileStart);
- if (false !== \strpos($sFileStart, 'BEGIN:VCARD'))
- {
- $mResponse = $this->importContactsFromVcfFile($oAccount, $mData);
- }
- else if (false !== \strpos($sFileStart, ',') || false !== \strpos($sFileStart, ';'))
- {
- $mResponse = $this->importContactsFromCsvFile($oAccount, $mData, $sFileStart);
- }
- }
- }
-
- if (\is_resource($mData))
- {
- @\fclose($mData);
- }
-
- unset($mData);
- $this->FilesProvider()->Clear($oAccount, $sSavedName);
-
- @\ini_set('auto_detect_line_endings', false);
- }
- }
-
- if (UPLOAD_ERR_OK !== $iError)
- {
- $iClientError = \RainLoop\Enumerations\UploadClientError::NORMAL;
- $sError = $this->getUploadErrorMessageByCode($iError, $iClientError);
-
- if (!empty($sError))
- {
- return $this->FalseResponse(__FUNCTION__, $iClientError, $sError);
- }
- }
-
- return $this->DefaultResponse(__FUNCTION__, $mResponse);
- }
-
- /**
- * @param \RainLoop\Model\Account $oAccount
- * @param resource $rFile
- * @param string $sFileStart
- *
- * @return int
- */
- private function importContactsFromCsvFile($oAccount, $rFile, $sFileStart)
- {
- $iCount = 0;
- $aHeaders = null;
- $aData = array();
-
- if ($oAccount && \is_resource($rFile))
- {
- $oAddressBookProvider = $this->AddressBookProvider($oAccount);
- if ($oAddressBookProvider && $oAddressBookProvider->IsActive())
- {
- $sDelimiter = ((int) \strpos($sFileStart, ',') > (int) \strpos($sFileStart, ';')) ? ',' : ';';
-
- @\setlocale(LC_CTYPE, 'en_US.UTF-8');
- while (false !== ($mRow = \fgetcsv($rFile, 5000, $sDelimiter, '"')))
- {
- if (null === $aHeaders)
- {
- if (3 >= \count($mRow))
- {
- return 0;
- }
-
- $aHeaders = $mRow;
-
- foreach ($aHeaders as $iIndex => $sHeaderValue)
- {
- $aHeaders[$iIndex] = \MailSo\Base\Utils::Utf8Clear($sHeaderValue);
- }
- }
- else
- {
- $aNewItem = array();
- foreach ($aHeaders as $iIndex => $sHeaderValue)
- {
- $aNewItem[$sHeaderValue] = isset($mRow[$iIndex]) ? $mRow[$iIndex] : '';
- }
-
- $aData[] = $aNewItem;
- }
- }
-
- if (\is_array($aData) && 0 < \count($aData))
- {
- $this->Logger()->Write('Import contacts from csv');
- $iCount = $oAddressBookProvider->ImportCsvArray($oAccount->ParentEmailHelper(), $aData);
- }
- }
- }
-
- return $iCount;
- }
-
- /**
- * @param \RainLoop\Model\Account $oAccount
- * @param resource $rFile
- *
- * @return int
- */
- private function importContactsFromVcfFile($oAccount, $rFile)
- {
- $iCount = 0;
- if ($oAccount && \is_resource($rFile))
- {
- $oAddressBookProvider = $this->AddressBookProvider($oAccount);
- if ($oAddressBookProvider && $oAddressBookProvider->IsActive())
- {
- $sFile = \stream_get_contents($rFile);
- if (\is_resource($rFile))
- {
- \fclose($rFile);
- }
-
- if (is_string($sFile) && 5 < \strlen($sFile))
- {
- $this->Logger()->Write('Import contacts from vcf');
- $iCount = $oAddressBookProvider->ImportVcfFile($oAccount->ParentEmailHelper(), $sFile);
- }
- }
- }
-
- return $iCount;
- }
-
- /**
- * @return bool
- *
- * @throws \MailSo\Base\Exceptions\Exception
- */
- public function RawViewAsPlain()
- {
- $this->initMailClientConnection();
-
- $sRawKey = (string) $this->GetActionParam('RawKey', '');
- $aValues = $this->getDecodedRawKeyValue($sRawKey);
-
- $sFolder = isset($aValues['Folder']) ? $aValues['Folder'] : '';
- $iUid = (int) (isset($aValues['Uid']) ? $aValues['Uid'] : 0);
- $sMimeIndex = (string) (isset($aValues['MimeIndex']) ? $aValues['MimeIndex'] : '');
-
- \header('Content-Type: text/plain', true);
-
- return $this->MailClient()->MessageMimeStream(function ($rResource) {
- if (\is_resource($rResource))
- {
- \MailSo\Base\Utils::FpassthruWithTimeLimitReset($rResource);
- }
- }, $sFolder, $iUid, true, $sMimeIndex);
- }
-
- /**
- * @return string
- */
- public function RawFramedView()
- {
- $oAccount = $this->getAccountFromToken(false);
- if ($oAccount)
- {
- $sRawKey = (string) $this->GetActionParam('RawKey', '');
- $aParams = $this->GetActionParam('Params', null);
- $this->Http()->ServerNoCache();
-
- $aData = \RainLoop\Utils::DecodeKeyValuesQ($sRawKey);
- if (isset($aParams[0], $aParams[1], $aParams[2]) &&
- 'Raw' === $aParams[0] && 'FramedView' === $aParams[2] && isset($aData['Framed']) && $aData['Framed'] && $aData['FileName'])
- {
- if ($this->isFileHasFramedPreview($aData['FileName']))
- {
- $sNewSpecAuthToken = $this->GetShortLifeSpecAuthToken();
- if (!empty($sNewSpecAuthToken))
- {
- $aParams[1] = '_'.$sNewSpecAuthToken;
- $aParams[2] = 'View';
-
- \array_shift($aParams);
- $sLast = \array_pop($aParams);
-
- $sUrl = $this->Http()->GetFullUrl().'?/Raw/&q[]=/'.\implode('/', $aParams).'/&q[]=/'.$sLast;
- $sFullUrl = 'https://docs.google.com/viewer?embedded=true&url='.\urlencode($sUrl);
-
- @\header('Content-Type: text/html; charset=utf-8');
- echo ''.
- ''.
- ''.
- '';
- }
- }
- }
- }
-
-
- return true;
-
- }
-
- /**
- * @return bool
- *
- * @throws \MailSo\Base\Exceptions\Exception
- */
- public function Append()
- {
- $oAccount = $this->initMailClientConnection();
-
- $sFolderFullNameRaw = $this->GetActionParam('Folder', '');
-
- $_FILES = isset($_FILES) ? $_FILES : null;
- if ($oAccount instanceof \RainLoop\Model\Account &&
- $this->Config()->Get('labs', 'allow_message_append', false) &&
- isset($_FILES, $_FILES['AppendFile'], $_FILES['AppendFile']['name'],
- $_FILES['AppendFile']['tmp_name'], $_FILES['AppendFile']['size']))
- {
- if (is_string($_FILES['AppendFile']['tmp_name']) && 0 < strlen($_FILES['AppendFile']['tmp_name']))
- {
- if (\UPLOAD_ERR_OK === (int) $_FILES['AppendFile']['error'] && !empty($sFolderFullNameRaw))
- {
- $sSavedName = 'append-post-'.md5($sFolderFullNameRaw.$_FILES['AppendFile']['name'].$_FILES['AppendFile']['tmp_name']);
-
- if ($this->FilesProvider()->MoveUploadedFile($oAccount,
- $sSavedName, $_FILES['AppendFile']['tmp_name']))
- {
- $iMessageStreamSize = $this->FilesProvider()->FileSize($oAccount, $sSavedName);
- $rMessageStream = $this->FilesProvider()->GetFile($oAccount, $sSavedName);
-
- $this->MailClient()->MessageAppendStream($rMessageStream, $iMessageStreamSize, $sFolderFullNameRaw);
-
- $this->FilesProvider()->Clear($oAccount, $sSavedName);
- }
- }
- }
- }
-
- return $this->DefaultResponse(__FUNCTION__, true);
- }
-
- /**
- * @param bool $bAdmin
- * @param bool $bMobile = false
- * @param \RainLoop\Model\Account $oAccount = null
- *
- * @return array
- */
- public function Capa($bAdmin, $bMobile = false, $oAccount = null)
- {
- $oConfig = $this->Config();
-
- $aResult = array();
-
- if ($oConfig->Get('capa', 'folders', true))
- {
- $aResult[] = \RainLoop\Enumerations\Capa::FOLDERS;
-
- if ($oConfig->Get('capa', 'messagelist_actions', true))
- {
- $aResult[] = \RainLoop\Enumerations\Capa::MESSAGELIST_ACTIONS;
-
- if ($oConfig->Get('capa', 'dangerous_actions', true))
- {
- $aResult[] = \RainLoop\Enumerations\Capa::DANGEROUS_ACTIONS;
- }
- }
- }
-
- if ($oConfig->Get('capa', 'reload', true))
- {
- $aResult[] = \RainLoop\Enumerations\Capa::RELOAD;
- }
-
- if ($oConfig->Get('capa', 'quota', true))
- {
- $aResult[] = \RainLoop\Enumerations\Capa::QUOTA;
- }
-
- if ($oConfig->Get('capa', 'settings', true))
- {
- $aResult[] = \RainLoop\Enumerations\Capa::SETTINGS;
-
- if ($oConfig->Get('webmail', 'allow_additional_accounts', false))
- {
- $aResult[] = \RainLoop\Enumerations\Capa::ADDITIONAL_ACCOUNTS;
- }
-
- if ($oConfig->Get('webmail', 'allow_additional_identities', false))
- {
- $aResult[] = \RainLoop\Enumerations\Capa::IDENTITIES;
- }
-
- if ($oConfig->Get('capa', 'x-templates', true) && !$bMobile)
- {
- $aResult[] = \RainLoop\Enumerations\Capa::TEMPLATES;
- }
-
- if ($oConfig->Get('webmail', 'allow_themes', false) && !$bMobile)
- {
- $aResult[] = \RainLoop\Enumerations\Capa::THEMES;
- }
-
- if ($oConfig->Get('webmail', 'allow_user_background', false) && !$bMobile)
- {
- $aResult[] = \RainLoop\Enumerations\Capa::USER_BACKGROUND;
- }
-
- if ($oConfig->Get('security', 'openpgp', false) && !$bMobile)
- {
- $aResult[] = \RainLoop\Enumerations\Capa::OPEN_PGP;
- }
-
- if ($oConfig->Get('capa', 'filters', false))
- {
- $aResult[] = \RainLoop\Enumerations\Capa::FILTERS;
- if ($bAdmin || ($oAccount && $oAccount->Domain()->UseSieve()))
- {
- $aResult[] = \RainLoop\Enumerations\Capa::SIEVE;
- }
- }
- }
-
- if ($oConfig->Get('security', 'allow_two_factor_auth', false) &&
- ($bAdmin || ($oAccount && !$oAccount->IsAdditionalAccount())))
- {
- $aResult[] = \RainLoop\Enumerations\Capa::TWO_FACTOR;
-
- if ($oConfig->Get('security', 'force_two_factor_auth', false) &&
- ($bAdmin || ($oAccount && !$oAccount->IsAdditionalAccount())))
- {
- $aResult[] = \RainLoop\Enumerations\Capa::TWO_FACTOR_FORCE;
- }
- }
-
- if ($oConfig->Get('capa', 'help', true) && !$bMobile)
- {
- $aResult[] = \RainLoop\Enumerations\Capa::HELP;
- }
-
- if ($oConfig->Get('capa', 'attachments_actions', false))
- {
- $aResult[] = \RainLoop\Enumerations\Capa::ATTACHMENTS_ACTIONS;
- }
-
- if ($oConfig->Get('capa', 'message_actions', true))
- {
- $aResult[] = \RainLoop\Enumerations\Capa::MESSAGE_ACTIONS;
- }
-
- if ($oConfig->Get('capa', 'composer', true))
- {
- $aResult[] = \RainLoop\Enumerations\Capa::COMPOSER;
-
- if ($oConfig->Get('capa', 'contacts', true))
- {
- $aResult[] = \RainLoop\Enumerations\Capa::CONTACTS;
- }
- }
-
- if ($oConfig->Get('capa', 'search', true))
- {
- $aResult[] = \RainLoop\Enumerations\Capa::SEARCH;
-
- if ($oConfig->Get('capa', 'search_adv', true) && !$bMobile)
- {
- $aResult[] = \RainLoop\Enumerations\Capa::SEARCH_ADV;
- }
- }
-
- if ($oConfig->Get('labs', 'allow_gravatar', false))
- {
- $aResult[] = \RainLoop\Enumerations\Capa::GRAVATAR;
- }
-
- if ($oConfig->Get('interface', 'show_attachment_thumbnail', true))
- {
- $aResult[] = \RainLoop\Enumerations\Capa::ATTACHMENT_THUMBNAILS;
- }
-
- if ($oConfig->Get('labs', 'allow_prefetch', false) && !$bMobile)
- {
- $aResult[] = \RainLoop\Enumerations\Capa::PREFETCH;
- }
-
- if (!\RainLoop\Utils::IsOwnCloud())
- {
- $aResult[] = \RainLoop\Enumerations\Capa::AUTOLOGOUT;
- }
-
- return $aResult;
- }
-
- /**
- * @param bool $bAdmin
- * @param bool $bMobile
- * @param string $sName
- * @param \RainLoop\Model\Account $oAccount = null
- *
- * @return bool
- */
- public function GetCapa($bAdmin, $bMobile, $sName, $oAccount = null)
- {
- return \in_array($sName, $this->Capa($bAdmin, $bMobile, $oAccount));
- }
-
- /**
- * @param string $sKey
- * @param bool $bForce = false
- *
- * @return bool
- */
- public function cacheByKey($sKey, $bForce = false)
- {
- $bResult = false;
- if (!empty($sKey) && ($bForce || $this->Config()->Get('cache', 'enable', true) && $this->Config()->Get('cache', 'http', true)))
- {
- $this->oHttp->ServerUseCache(
- \md5('Etag:'.\md5($sKey.\md5($this->Config()->Get('cache', 'index', '')))),
- 1382478804, 2002478804);
-
- $bResult = true;
- }
-
- return $bResult;
- }
-
- /**
- * @param string $sKey
- * @param bool $bForce = false
- *
- * @return void
- */
- public function verifyCacheByKey($sKey, $bForce = false)
- {
- if (!empty($sKey) && ($bForce || $this->Config()->Get('cache', 'enable', true) && $this->Config()->Get('cache', 'http', true)))
- {
- $sIfModifiedSince = $this->Http()->GetHeader('If-Modified-Since', '');
- $sIfNoneMatch = $this->Http()->GetHeader('If-None-Match', '');
-
- if (!empty($sIfModifiedSince) || !empty($sIfNoneMatch))
- {
- $this->Http()->StatusHeader(304);
- $this->cacheByKey($sKey);
- exit(0);
- }
- }
- }
-
- /**
- * @param \RainLoop\Model\Account $oAccount
- * @param string $sHash
- *
- * @return array
- */
- private function getMimeFileByHash($oAccount, $sHash)
- {
- $aValues = $this->getDecodedRawKeyValue($sHash);
-
- $sFolder = isset($aValues['Folder']) ? $aValues['Folder'] : '';
- $iUid = (int) isset($aValues['Uid']) ? $aValues['Uid'] : 0;
- $sMimeIndex = (string) isset($aValues['MimeIndex']) ? $aValues['MimeIndex'] : '';
-
- $sContentTypeIn = (string) isset($aValues['MimeType']) ? $aValues['MimeType'] : '';
- $sFileNameIn = (string) isset($aValues['FileName']) ? $aValues['FileName'] : '';
-
- $oFileProvider = $this->FilesProvider();
-
- $sResultHash = '';
-
- $mResult = $this->MailClient()->MessageMimeStream(function($rResource, $sContentType, $sFileName, $sMimeIndex = '')
- use ($oAccount, $oFileProvider, $sFileNameIn, $sContentTypeIn, &$sResultHash) {
-
- unset($sContentType, $sFileName, $sMimeIndex);
-
- if ($oAccount && \is_resource($rResource))
- {
- $sHash = \MailSo\Base\Utils::Md5Rand($sFileNameIn.'~'.$sContentTypeIn);
- $rTempResource = $oFileProvider->GetFile($oAccount, $sHash, 'wb+');
-
- if (@\is_resource($rTempResource))
- {
- if (false !== \MailSo\Base\Utils::MultipleStreamWriter($rResource, array($rTempResource)))
- {
- $sResultHash = $sHash;
- }
-
- @\fclose($rTempResource);
- }
- }
-
- }, $sFolder, $iUid, true, $sMimeIndex);
-
- $aValues['FileHash'] = '';
- if ($mResult)
- {
- $aValues['FileHash'] = $sResultHash;
- }
-
- return $aValues;
- }
-
- /**
- * @param \Imagine\Image\AbstractImage $oImage
- * @param int $iOrientation
- */
- private function rotateImageByOrientation(&$oImage, $iOrientation)
- {
- if (0 < $iOrientation)
- {
- switch ($iOrientation)
- {
- default:
- case 1:
- break;
-
- case 2: // horizontal flip
- $oImage->flipHorizontally();
- break;
-
- case 3: // 180 rotate left
- $oImage->rotate(180);
- break;
-
- case 4: // vertical flip
- $oImage->flipVertically();
- break;
-
- case 5: // vertical flip + 90 rotate right
- $oImage->flipVertically();
- $oImage->rotate(-90);
- break;
-
- case 6: // 90 rotate right
- $oImage->rotate(-90);
- break;
-
- case 7: // horizontal flip + 90 rotate right
- $oImage->flipHorizontally();
- $oImage->rotate(-90);
- break;
-
- case 8: // 90 rotate left
- $oImage->rotate(90);
- break;
- }
- }
- }
-
- /**
- * @param \Imagine\Image\AbstractImage $oImage
- */
- private function correctImageOrientation($oImage, $bDetectImageOrientation = true, $iThumbnailBoxSize = null)
- {
- $iOrientation = 1;
- if ($bDetectImageOrientation && \MailSo\Base\Utils::FunctionExistsAndEnabled('exif_read_data') &&
- \MailSo\Base\Utils::FunctionExistsAndEnabled('gd_info'))
- {
- $oMetadata = $oImage->metadata(new \Imagine\Image\Metadata\ExifMetadataReader());
- $iOrientation = isset($oMetadata['ifd0.Orientation']) &&
- is_numeric($oMetadata['ifd0.Orientation']) ? (int) $oMetadata['ifd0.Orientation'] : 1;
- }
-
- if ($iThumbnailBoxSize && 0 < $iThumbnailBoxSize)
- {
- $oImage = $oImage->thumbnail(
- new \Imagine\Image\Box($iThumbnailBoxSize, $iThumbnailBoxSize),
- \Imagine\Image\ImageInterface::THUMBNAIL_OUTBOUND);
-
- $this->rotateImageByOrientation($oImage, $iOrientation);
- }
- else
- {
- $this->rotateImageByOrientation($oImage, $iOrientation);
- }
-
- return $oImage;
- }
-
- /**
- * @param bool $bDownload
- * @param bool $bThumbnail = false
- *
- * @return bool
- */
- private function rawSmart($bDownload, $bThumbnail = false)
- {
- $sRawKey = (string) $this->GetActionParam('RawKey', '');
- $aValues = $this->getDecodedRawKeyValue($sRawKey);
-
- $sRange = $this->Http()->GetHeader('Range');
-
- $aMatch = array();
- $sRangeStart = $sRangeEnd = '';
- $bIsRangeRequest = false;
-
- if (!empty($sRange) && 'bytes=0-' !== \strtolower($sRange) && \preg_match('/^bytes=([0-9]+)-([0-9]*)/i', \trim($sRange), $aMatch))
- {
- $sRangeStart = $aMatch[1];
- $sRangeEnd = $aMatch[2];
-
- $bIsRangeRequest = true;
- }
-
- $sFolder = isset($aValues['Folder']) ? $aValues['Folder'] : '';
- $iUid = isset($aValues['Uid']) ? (int) $aValues['Uid'] : 0;
- $sMimeIndex = isset($aValues['MimeIndex']) ? (string) $aValues['MimeIndex'] : '';
-
- $sContentTypeIn = isset($aValues['MimeType']) ? (string) $aValues['MimeType'] : '';
- $sFileNameIn = isset($aValues['FileName']) ? (string) $aValues['FileName'] : '';
- $sFileHashIn = isset($aValues['FileHash']) ? (string) $aValues['FileHash'] : '';
-
- $bDetectImageOrientation = !!$this->Config()->Get('labs', 'detect_image_exif_orientation', true);
-
- if (!empty($sFileHashIn))
- {
- $this->verifyCacheByKey($sRawKey);
-
- $oAccount = $this->getAccountFromToken();
-
- $sContentTypeOut = empty($sContentTypeIn) ?
- \MailSo\Base\Utils::MimeContentType($sFileNameIn) : $sContentTypeIn;
-
- $sFileNameOut = $this->MainClearFileName($sFileNameIn, $sContentTypeIn, $sMimeIndex);
-
- $rResource = $this->FilesProvider()->GetFile($oAccount, $sFileHashIn);
- if (\is_resource($rResource))
- {
- $sFileNameOut = \MailSo\Base\Utils::ConvertEncoding(
- $sFileNameOut, \MailSo\Base\Enumerations\Charset::UTF_8,
- \MailSo\Base\Enumerations\Charset::CP858);
-
- \header('Content-Type: '.$sContentTypeOut);
- \header('Content-Disposition: attachment; '.
- \trim(\MailSo\Base\Utils::EncodeHeaderUtf8AttributeValue('filename', $sFileNameOut)), true);
-
- \header('Accept-Ranges: none', true);
- \header('Content-Transfer-Encoding: binary');
-
- \MailSo\Base\Utils::FpassthruWithTimeLimitReset($rResource);
- return true;
- }
-
- return false;
- }
- else
- {
- if (!empty($sFolder) && 0 < $iUid)
- {
- $this->verifyCacheByKey($sRawKey);
- }
- }
-
- $oAccount = $this->initMailClientConnection();
-
- $self = $this;
- return $this->MailClient()->MessageMimeStream(
- function($rResource, $sContentType, $sFileName, $sMimeIndex = '') use (
- $self, $oAccount, $sRawKey, $sContentTypeIn, $sFileNameIn, $bDownload, $bThumbnail, $bDetectImageOrientation,
- $bIsRangeRequest, $sRangeStart, $sRangeEnd
- ) {
- if ($oAccount && \is_resource($rResource))
- {
- \MailSo\Base\Utils::ResetTimeLimit();
-
- $sContentTypeOut = $sContentTypeIn;
- if (empty($sContentTypeOut))
- {
- $sContentTypeOut = $sContentType;
- if (empty($sContentTypeOut))
- {
- $sContentTypeOut = (empty($sFileName)) ? 'text/plain' : \MailSo\Base\Utils::MimeContentType($sFileName);
- }
- }
-
- $sFileNameOut = $sFileNameIn;
- if (empty($sFileNameOut))
- {
- $sFileNameOut = $sFileName;
- }
-
- $sFileNameOut = $self->MainClearFileName($sFileNameOut, $sContentTypeOut, $sMimeIndex);
-
- $self->cacheByKey($sRawKey);
-
- $sLoadedData = null;
- $bDetectImageOrientation = false;
-
- if (!$bDownload)
- {
- if ($bThumbnail)
- {
- try
- {
- $oImagine = new \Imagine\Gd\Imagine();
-
- $oImage = $oImagine->load(\stream_get_contents($rResource));
-
- $oImage = $self->correctImageOrientation($oImage, $bDetectImageOrientation, 60);
-
- \header('Content-Disposition: inline; '.
- \trim(\MailSo\Base\Utils::EncodeHeaderUtf8AttributeValue('filename', $sFileNameOut.'_thumb60x60.png')), true);
-
- $oImage->show('png');
- }
- catch (\Exception $oException)
- {
- $self->Logger()->WriteExceptionShort($oException);
- }
- }
- else if ($bDetectImageOrientation &&
- \in_array($sContentTypeOut, array('image/png', 'image/jpeg', 'image/jpg')) &&
- \MailSo\Base\Utils::FunctionExistsAndEnabled('gd_info'))
- {
- try
- {
- $oImagine = new \Imagine\Gd\Imagine();
-
- $sLoadedData = \stream_get_contents($rResource);
-
- $oImage = $oImagine->load($sLoadedData);
-
- $oImage = $self->correctImageOrientation($oImage, $bDetectImageOrientation);
-
- \header('Content-Disposition: inline; '.
- \trim(\MailSo\Base\Utils::EncodeHeaderUtf8AttributeValue('filename', $sFileNameOut)), true);
-
- $oImage->show($sContentTypeOut === 'image/png' ? 'png' : 'jpg');
- }
- catch (\Exception $oException)
- {
- $self->Logger()->WriteExceptionShort($oException);
- }
- }
- else
- {
- $sLoadedData = \stream_get_contents($rResource);
- }
- }
-
- if ($bDownload || $sLoadedData)
- {
- \header('Content-Type: '.$sContentTypeOut);
- \header('Content-Disposition: '.($bDownload ? 'attachment' : 'inline').'; '.
- \trim(\MailSo\Base\Utils::EncodeHeaderUtf8AttributeValue('filename', $sFileNameOut)), true);
-
- \header('Accept-Ranges: bytes');
- \header('Content-Transfer-Encoding: binary');
-
- if ($bIsRangeRequest && !$sLoadedData)
- {
- $sLoadedData = \stream_get_contents($rResource);
- }
-
- \MailSo\Base\Utils::ResetTimeLimit();
-
- if ($sLoadedData)
- {
- if ($bIsRangeRequest && (0 < \strlen($sRangeStart) || 0 < \strlen($sRangeEnd)))
- {
- $iFullContentLength = \strlen($sLoadedData);
-
- $self->Http()->StatusHeader(206);
-
- $iRangeStart = (int) $sRangeStart;
- $iRangeEnd = (int) $sRangeEnd;
-
- if ('' === $sRangeEnd)
- {
- $sLoadedData = 0 < $iRangeStart ? \substr($sLoadedData, $iRangeStart) : $sLoadedData;
- }
- else
- {
- if ($iRangeStart < $iRangeEnd)
- {
- $sLoadedData = \substr($sLoadedData, $iRangeStart, $iRangeEnd - $iRangeStart);
- }
- else
- {
- $sLoadedData = 0 < $iRangeStart ? \substr($sLoadedData, $iRangeStart) : $sLoadedData;
- }
- }
-
- $iContentLength = \strlen($sLoadedData);
-
- if (0 < $iContentLength)
- {
- \header('Content-Length: '.$iContentLength, true);
- \header('Content-Range: bytes '.$sRangeStart.'-'.(0 < $iRangeEnd ? $iRangeEnd : $iFullContentLength - 1).'/'.$iFullContentLength);
- }
-
- echo $sLoadedData;
- }
- else
- {
- echo $sLoadedData;
- }
-
- unset($sLoadedData);
- }
- else
- {
- \MailSo\Base\Utils::FpassthruWithTimeLimitReset($rResource);
- }
- }
- }
- }, $sFolder, $iUid, true, $sMimeIndex);
- }
-
- /**
- * @return bool
- */
- public function RawDownload()
- {
- return $this->rawSmart(true);
- }
-
- /**
- * @return bool
- */
- public function RawView()
- {
- return $this->rawSmart(false);
- }
-
- /**
- * @return bool
- */
- public function RawViewThumbnail()
- {
- return $this->rawSmart(false, true);
- }
-
- /**
- * @return bool
- */
- public function RawUserBackground()
- {
- $sRawKey = (string) $this->GetActionParam('RawKey', '');
- $this->verifyCacheByKey($sRawKey);
-
- $oAccount = $this->getAccountFromToken();
-
- $sData = $this->StorageProvider()->Get($oAccount,
- \RainLoop\Providers\Storage\Enumerations\StorageType::CONFIG,
- 'background'
- );
-
- if (!empty($sData))
- {
- $aData = \json_decode($sData, true);
- unset($sData);
-
- if (!empty($aData['ContentType']) && !empty($aData['Raw']) &&
- \in_array($aData['ContentType'], array('image/png', 'image/jpg', 'image/jpeg')))
- {
- $this->cacheByKey($sRawKey);
-
- @\header('Content-Type: '.$aData['ContentType']);
- echo \base64_decode($aData['Raw']);
- unset($aData);
-
- return true;
- }
- }
-
- return false;
- }
-
- /**
- * @return bool
- */
- public function RawPublic()
- {
- $sRawKey = (string) $this->GetActionParam('RawKey', '');
- $this->verifyCacheByKey($sRawKey);
-
- $sHash = $sRawKey;
- $sData = '';
-
- if (!empty($sHash))
- {
- $sData = $this->StorageProvider()->Get(null,
- \RainLoop\Providers\Storage\Enumerations\StorageType::NOBODY,
- \RainLoop\KeyPathHelper::PublicFile($sHash)
- );
- }
-
- $aMatch = array();
- if (!empty($sData) && 0 === \strpos($sData, 'data:') &&
- \preg_match('/^data:([^:]+):/', $sData, $aMatch) && !empty($aMatch[1]))
- {
- $sContentType = \trim($aMatch[1]);
- if (\in_array($sContentType, array('image/png', 'image/jpg', 'image/jpeg')))
- {
- $this->cacheByKey($sRawKey);
-
- @\header('Content-Type: '.$sContentType);
- echo \preg_replace('/^data:[^:]+:/', '', $sData);
- unset($sData);
-
- return true;
- }
- }
-
- return false;
- }
-
- /**
- * @param string $sFileName
- *
- * @return bool
- */
- public function isFileHasFramedPreview($sFileName)
- {
- $sExt = \MailSo\Base\Utils::GetFileExtension($sFileName);
- return \in_array($sExt, array('doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx'));
- }
-
- /**
- * @param string $sFileName
- *
- * @return bool
- */
- public function isFileHasThumbnail($sFileName)
- {
- static $aCache = array();
-
- $sExt = \MailSo\Base\Utils::GetFileExtension($sFileName);
- if (isset($aCache[$sExt]))
- {
- return $aCache[$sExt];
- }
-
- $bResult = \function_exists('gd_info');
- if ($bResult)
- {
- $bResult = false;
- switch ($sExt)
- {
- case 'png':
- $bResult = \function_exists('imagecreatefrompng');
- break;
- case 'gif':
- $bResult = \function_exists('imagecreatefromgif');
- break;
- case 'jpg':
- case 'jpeg':
- $bResult = \function_exists('imagecreatefromjpeg');
- break;
- }
- }
-
- $aCache[$sExt] = $bResult;
-
- return $bResult;
- }
-
- /**
- * @return bool
- */
- public function RawAvatar()
- {
- $sData = '';
-
- $sRawKey = (string) $this->GetActionParam('RawKey', '');
- $sRawKey = \urldecode($sRawKey);
-
- $this->verifyCacheByKey($sRawKey);
-
- if (0 < \strlen($sRawKey) && \preg_match('/^[^@]+@([^@]+)$/', $sRawKey))
- {
- $sEmail = \MailSo\Base\Utils::IdnToAscii($sRawKey, true);
-
- $iCode = 0;
- $sContentType = '';
-
- $sGravatarUrl = 'http://gravatar.com/avatar/'.\md5($sEmail).'.jpg?s=80&d=404';
-
- $this->Logger()->Write('gravatar: '.$sGravatarUrl);
-
- $sData = $this->Http()->GetUrlAsString($sGravatarUrl, null, $sContentType, $iCode, null, 5,
- $this->Config()->Get('labs', 'curl_proxy', ''), $this->Config()->Get('labs', 'curl_proxy_auth', ''));
-
- $sContentType = \strtolower(\trim($sContentType));
- if (200 !== $iCode || empty($sData) || !\in_array($sContentType, array('image/jpeg', 'image/jpg', 'image/png')))
- {
- $this->Logger()->Write('gravatar: code: '.$iCode.', content-type: '.$sContentType);
-
- $sData = '';
-
- $aMatch = array();
- if (\preg_match('/^[^@]+@([a-z0-9\-\.]+)$/', $sEmail, $aMatch) && !empty($aMatch[1]))
- {
- $sDomain = $aMatch[1];
- if (\file_exists(APP_VERSION_ROOT_PATH.'app/resources/images/services/'.$sDomain.'.png'))
- {
- $sContentType = 'image/png';
- $sData = \file_get_contents(APP_VERSION_ROOT_PATH.'app/resources/images/services/'.$sDomain.'.png');
- }
- }
- }
- }
-
- if (empty($sData) || empty($sContentType))
- {
- $sContentType = 'image/png';
- $sData = \file_get_contents(APP_VERSION_ROOT_PATH.'app/resources/images/empty-contact.png');
- }
-
- $this->cacheByKey($sRawKey);
- \header('Content-Type: '.$sContentType);
- echo $sData;
- return true;
- }
-
- /**
- * @return bool
- */
- public function RawContactsVcf()
- {
- $oAccount = $this->getAccountFromToken();
-
- \header('Content-Type: text/x-vcard; charset=UTF-8');
- \header('Content-Disposition: attachment; filename="contacts.vcf"', true);
- \header('Accept-Ranges: none', true);
- \header('Content-Transfer-Encoding: binary');
-
- $this->oHttp->ServerNoCache();
-
- return $this->AddressBookProvider($oAccount)->IsActive() ?
- $this->AddressBookProvider($oAccount)->Export($oAccount->ParentEmailHelper(), 'vcf') : false;
- }
-
- /**
- * @return bool
- */
- public function RawContactsCsv()
- {
- $oAccount = $this->getAccountFromToken();
-
- \header('Content-Type: text/csv; charset=UTF-8');
- \header('Content-Disposition: attachment; filename="contacts.csv"', true);
- \header('Accept-Ranges: none', true);
- \header('Content-Transfer-Encoding: binary');
-
- $this->oHttp->ServerNoCache();
-
- return $this->AddressBookProvider($oAccount)->IsActive() ?
- $this->AddressBookProvider($oAccount)->Export($oAccount->ParentEmailHelper(), 'csv') : false;
- }
-
- /**
- * @return \RainLoop\Model\Account|bool
- */
- private function initMailClientConnection()
- {
- $oAccount = null;
-
- if (!$this->MailClient()->IsLoggined())
- {
- $oAccount = $this->getAccountFromToken();
-
- try
- {
- $oAccount->IncConnectAndLoginHelper($this->Plugins(), $this->MailClient(), $this->Config());
- }
- catch (\MailSo\Net\Exceptions\ConnectionException $oException)
- {
- throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::ConnectionError, $oException);
- }
- catch (\Exception $oException)
- {
- throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::AuthError, $oException);
- }
-
- $this->MailClient()->ImapClient()->__FORCE_SELECT_ON_EXAMINE__ = !!$this->Config()->Get('labs', 'use_imap_force_selection');
- }
-
- return $oAccount;
- }
-
- /**
- * @param string $sRawKey
- *
- * @return array | false
- */
- private function getDecodedRawKeyValue($sRawKey)
- {
- $bResult = false;
- if (!empty($sRawKey))
- {
- $aValues = \RainLoop\Utils::DecodeKeyValuesQ($sRawKey);
- if (is_array($aValues))
- {
- $bResult = $aValues;
- }
- }
-
- return $bResult;
- }
-
- /**
- * @param string $sRawKey
- * @param int | null $iLenCache
- * @return array | bool
- */
- private function getDecodedClientRawKeyValue($sRawKey, $iLenCache = null)
- {
- $mResult = false;
- if (!empty($sRawKey))
- {
- $sRawKey = \MailSo\Base\Utils::UrlSafeBase64Decode($sRawKey);
- $aValues = explode("\x0", $sRawKey);
-
- if (is_array($aValues) && (null === $iLenCache || $iLenCache === count($aValues)))
- {
- $mResult = $aValues;
- }
- }
-
- return $mResult;
- }
-
- /**
- * @return string
- */
- public function StaticCache()
- {
- static $sCache = null;
- if (!$sCache)
- {
- $sCache = \md5(APP_VERSION.$this->Plugins()->Hash());
- }
- return $sCache;
- }
-
- /**
- * @param string $sTheme
- *
- * @return string
- */
- public function ThemeLink($sTheme, $bAdmin)
- {
- return './?/Css/0/'.($bAdmin ? 'Admin' : 'User').'/-/'.$sTheme.'/-/'.$this->StaticCache().'/Hash/-/';
- }
-
- /**
- * @param string $sTheme
- *
- * @return string
- */
- public function ValidateTheme($sTheme, $bMobile = false)
- {
- if ($bMobile)
- {
- return 'Mobile';
- }
-
- return \in_array($sTheme, $this->GetThemes($bMobile)) ?
- $sTheme : $this->Config()->Get('themes', 'default', $bMobile ? 'Mobile' : 'Default');
- }
-
- /**
- * @param string $sLanguage
- * @param string $sDefault = ''
- * @param bool $bAdmin = false
- * @param bool $bAllowEmptyResult = false
- *
- * @return string
- */
- public function ValidateLanguage($sLanguage, $sDefault = '', $bAdmin = false, $bAllowEmptyResult = false)
- {
- $sResult = '';
- $aLang = $this->GetLanguages($bAdmin);
-
- if (\is_array($aLang))
- {
- $aHelper = array('en' => 'en_us', 'ar' => 'ar_sa', 'cs' => 'cs_cz', 'no' => 'nb_no', 'ua' => 'uk_ua',
- 'cn' => 'zh_cn', 'zh' => 'zh_cn', 'tw' => 'zh_tw');
-
- $sLanguage = isset($aHelper[$sLanguage]) ? $aHelper[$sLanguage] : $sLanguage;
- $sDefault = isset($aHelper[$sDefault]) ? $aHelper[$sDefault] : $sDefault;
-
- $sLanguage = \strtolower(\str_replace('-', '_', $sLanguage));
- if (2 === strlen($sLanguage))
- {
- $sLanguage = $sLanguage.'_'.$sLanguage;
- }
-
- $sDefault = \strtolower(\str_replace('-', '_', $sDefault));
- if (2 === strlen($sDefault))
- {
- $sDefault = $sDefault.'_'.$sDefault;
- }
-
- $sLanguage = \preg_replace_callback('/_([a-zA-Z0-9]{2})$/', function ($aData) {
- return \strtoupper($aData[0]);
- }, $sLanguage);
-
- $sDefault = \preg_replace_callback('/_([a-zA-Z0-9]{2})$/', function ($aData) {
- return \strtoupper($aData[0]);
- }, $sDefault);
-
- if (\in_array($sLanguage, $aLang))
- {
- $sResult = $sLanguage;
- }
-
- if (empty($sResult) && !empty($sDefault) && \in_array($sDefault, $aLang))
- {
- $sResult = $sDefault;
- }
-
- if (empty($sResult) && !$bAllowEmptyResult)
- {
- $sResult = $this->Config()->Get('webmail', $bAdmin ? 'language_admin' : 'language', 'en_US');
- $sResult = \in_array($sResult, $aLang) ? $sResult : 'en_US';
- }
- }
-
- return $sResult;
- }
-
- /**
- * @param string $sType
- *
- * @return string
- */
- public function ValidateContactPdoType($sType)
- {
- return \in_array($sType, array('mysql', 'pgsql', 'sqlite')) ? $sType : 'sqlite';
- }
-
- /**
- * @staticvar array $aCache
- *
- * @return array
- */
- public function GetThemes($bMobile = false, $bIncludeMobile = true)
- {
- if ($bMobile)
- {
- return array('Mobile');
- }
-
- static $aCache = array('full' => null, 'mobile' => null);
- if ($bIncludeMobile && \is_array($aCache['full']))
- {
- return $aCache['full'];
- }
- else if ($bIncludeMobile && \is_array($aCache['mobile']))
- {
- return $aCache['mobile'];
- }
-
- $bClear = false;
- $bDefault = false;
- $sList = array();
- $sDir = APP_VERSION_ROOT_PATH.'themes';
- if (@\is_dir($sDir))
- {
- $rDirH = \opendir($sDir);
- if ($rDirH)
- {
- while (($sFile = \readdir($rDirH)) !== false)
- {
- if ('.' !== $sFile{0} && \is_dir($sDir.'/'.$sFile) && \file_exists($sDir.'/'.$sFile.'/styles.less'))
- {
- if ('Default' === $sFile)
- {
- $bDefault = true;
- }
- else if ('Clear' === $sFile)
- {
- $bClear = true;
- }
- else if ($bIncludeMobile || 'Mobile' !== $sFile)
- {
- $sList[] = $sFile;
- }
- }
- }
- @closedir($rDirH);
- }
- }
-
- $sDir = APP_INDEX_ROOT_PATH.'themes'; // custom user themes
- if (@\is_dir($sDir))
- {
- $rDirH = \opendir($sDir);
- if ($rDirH)
- {
- while (($sFile = \readdir($rDirH)) !== false)
- {
- if ('.' !== $sFile{0} && \is_dir($sDir.'/'.$sFile) && \file_exists($sDir.'/'.$sFile.'/styles.less'))
- {
- $sList[] = $sFile.'@custom';
- }
- }
-
- @\closedir($rDirH);
- }
- }
-
- $sList = \array_unique($sList);
- \sort($sList);
-
- if ($bDefault)
- {
- \array_unshift($sList, 'Default');
- }
-
- if ($bClear)
- {
- \array_push($sList, 'Clear');
- }
-
- $aCache[$bIncludeMobile ? 'full' : 'mobile'] = $sList;
- return $sList;
- }
-
- /**
- * @staticvar array $aCache
- * @param bool $bAdmin = false
- *
- * @return array
- */
- public function GetLanguages($bAdmin = false)
- {
- static $aCache = array();
- $sDir = APP_VERSION_ROOT_PATH.'app/localization/'.($bAdmin ? 'admin' : 'webmail').'/';
-
- if (isset($aCache[$sDir]))
- {
- return $aCache[$sDir];
- }
-
- $aTop = array();
- $aList = array();
-
- if (@\is_dir($sDir))
- {
- $rDirH = \opendir($sDir);
- if ($rDirH)
- {
- while (($sFile = \readdir($rDirH)) !== false)
- {
- if ('.' !== $sFile{0} && \is_file($sDir.'/'.$sFile) && '.yml' === \substr($sFile, -4))
- {
- $sLang = \substr($sFile, 0, -4);
- if (0 < \strlen($sLang) && 'always' !== $sLang && '_source.en' !== $sLang)
- {
- \array_push($aList, $sLang);
- }
- }
- }
-
- @\closedir($rDirH);
- }
- }
-
- \sort($aTop);
- \sort($aList);
-
- $aCache[$sDir] = \array_merge($aTop, $aList);
- return $aCache[$sDir];
- }
-
- /**
- * @param string $sName
- * @param string $sHtml
- *
- * @return string
- */
- public function ProcessTemplate($sName, $sHtml)
- {
- $sHtml = $this->Plugins()->ProcessTemplate($sName, $sHtml);
- $sHtml = \preg_replace('/\{\{INCLUDE\/([a-zA-Z]+)\/PLACE\}\}/', '', $sHtml);
-
- $sHtml = \preg_replace('/';
- }
-
- unset($aTemplates);
-
- return $bJsOutput ? 'window.rainloopTEMPLATES='.\MailSo\Base\Utils::Php2js(array($sHtml), $this->Logger()).';' : $sHtml;
- }
-
- /**
- * @param string $sLanguage
- *
- * @return string
- */
- private function convertLanguageNameToMomentLanguageName($sLanguage)
- {
- $aHelper = array('en_gb' => 'en-gb', 'fr_ca' => 'fr-ca', 'pt_br' => 'pt-br',
- 'uk_ua' => 'ua', 'zh_cn' => 'zh-cn', 'zh_tw' => 'zh-tw');
-
- return isset($aHelper[$sLanguage]) ? $aHelper[$sLanguage] : \substr($sLanguage, 0, 2);
- }
-
- /**
- * @param string $sLanguage
- * @param bool $bAdmin = false
- * @param bool $bWrapByScriptTag = true
- *
- * @return string
- */
- private function compileLanguage($sLanguage, $bAdmin = false, $bWrapByScriptTag = true)
- {
- $aResultLang = array();
-
- $sMoment = 'window.moment && window.moment.lang && window.moment.lang(\'en\');';
- $sMomentFileName = APP_VERSION_ROOT_PATH.'app/localization/moment/'.
- $this->convertLanguageNameToMomentLanguageName($sLanguage).'.js';
-
- if (\file_exists($sMomentFileName))
- {
- $sMoment = \file_get_contents($sMomentFileName);
- $sMoment = \preg_replace('/\/\/[^\n]+\n/', '', $sMoment);
- }
-
- \RainLoop\Utils::ReadAndAddLang(APP_VERSION_ROOT_PATH.'app/localization/langs.yml', $aResultLang);
- \RainLoop\Utils::ReadAndAddLang(APP_VERSION_ROOT_PATH.'app/localization/'.
- ($bAdmin ? 'admin' : 'webmail').'/_source.en.yml', $aResultLang);
- \RainLoop\Utils::ReadAndAddLang(APP_VERSION_ROOT_PATH.'app/localization/'.
- ($bAdmin ? 'admin' : 'webmail').'/'.$sLanguage.'.yml', $aResultLang);
-
- $this->Plugins()->ReadLang($sLanguage, $aResultLang);
-
- $sLangJs = '';
- $aLangKeys = \array_keys($aResultLang);
- foreach ($aLangKeys as $sKey)
- {
- $sString = isset($aResultLang[$sKey]) ? $aResultLang[$sKey] : $sKey;
- if (\is_array($sString))
- {
- $sString = \implode("\n", $sString);
- }
-
- $sLangJs .= '"'.\str_replace('"', '\\"', \str_replace('\\', '\\\\', $sKey)).'":'
- .'"'.\str_replace(array("\r", "\n", "\t"), array('\r', '\n', '\t'),
- \str_replace('"', '\\"', \str_replace('\\', '\\\\', $sString))).'",';
- }
-
- $sResult = empty($sLangJs) ? 'null' : '{'.\substr($sLangJs, 0, -1).'}';
-
- return
- ($bWrapByScriptTag ? '' : '')
- ;
- }
-
- /**
- * @param array $aAppData
- * @param bool $bWrapByScriptTag = true
- *
- * @return string
- */
- private function compileAppData($aAppData, $bWrapByScriptTag = true)
- {
- return
- ($bWrapByScriptTag ? '' : '')
- ;
- }
-}
+oHttp = $oHttp;
+ $this->oActions = $oActions;
+ $this->aPaths = array();
+ $this->sQuery = '';
+ }
+
+ /**
+ * @return \MailSo\Log\Logger
+ */
+ public function Logger()
+ {
+ return $this->oActions->Logger();
+ }
+
+ /**
+ * @return \RainLoop\Plugins\Manager
+ */
+ public function Plugins()
+ {
+ return $this->oActions->Plugins();
+ }
+
+ /**
+ * @return \RainLoop\Application
+ */
+ public function Config()
+ {
+ return $this->oActions->Config();
+ }
+
+ /**
+ * @return \MailSo\Cache\CacheClient
+ */
+ public function Cacher()
+ {
+ return $this->oActions->Cacher();
+ }
+
+ /**
+ * @return \RainLoop\Providers\Storage
+ */
+ public function StorageProvider()
+ {
+ return $this->oActions->StorageProvider();
+ }
+
+ /**
+ * @return \RainLoop\Providers\Settings
+ */
+ public function SettingsProvider()
+ {
+ return $this->oActions->SettingsProvider();
+ }
+
+ /**
+ * @param array $aPaths
+ *
+ * @return \RainLoop\ServiceActions
+ */
+ public function SetPaths($aPaths)
+ {
+ $this->aPaths = \is_array($aPaths) ? $aPaths : array();
+ return $this;
+ }
+
+ /**
+ * @param string $sQuery
+ *
+ * @return \RainLoop\ServiceActions
+ */
+ public function SetQuery($sQuery)
+ {
+ $this->sQuery = $sQuery;
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function ServiceAjax()
+ {
+ @\ob_start();
+
+ $aResponseItem = null;
+ $oException = null;
+
+ $sAction = $this->oHttp->GetPost('Action', null);
+ if (empty($sAction) && $this->oHttp->IsGet() && !empty($this->aPaths[2]))
+ {
+ $sAction = $this->aPaths[2];
+ }
+
+ try
+ {
+ if ($this->oHttp->IsPost() && !in_array($sAction, array('JsInfo', 'JsError')) &&
+ $this->Config()->Get('security', 'csrf_protection', false) &&
+ $this->oHttp->GetPost('XToken', '') !== \RainLoop\Utils::GetCsrfToken())
+ {
+ throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::InvalidToken);
+ }
+ else if (!empty($sAction))
+ {
+ $sMethodName = 'Do'.$sAction;
+
+ $this->Logger()->Write('Action: '.$sMethodName, \MailSo\Log\Enumerations\Type::NOTE, 'AJAX');
+
+ $aPost = $this->oHttp->GetPostAsArray();
+ if (\is_array($aPost) && 0 < \count($aPost))
+ {
+ $this->oActions->SetActionParams($aPost, $sMethodName);
+ switch ($sMethodName)
+ {
+ case 'DoLogin':
+ case 'DoAdminLogin':
+ case 'DoAccountAdd':
+ $this->Logger()->AddSecret($this->oActions->GetActionParam('Password', ''));
+ break;
+ case 'DoChangePassword':
+ $this->Logger()->AddSecret($this->oActions->GetActionParam('PrevPassword', ''));
+ $this->Logger()->AddSecret($this->oActions->GetActionParam('NewPassword', ''));
+ break;
+ }
+
+ $this->Logger()->Write(\MailSo\Base\Utils::Php2js($aPost, $this->Logger()),
+ \MailSo\Log\Enumerations\Type::INFO, 'POST', true);
+ }
+ else if (3 < \count($this->aPaths) && $this->oHttp->IsGet())
+ {
+ $this->oActions->SetActionParams(array(
+ 'RawKey' => empty($this->aPaths[3]) ? '' : $this->aPaths[3]
+ ), $sMethodName);
+ }
+
+ if (\method_exists($this->oActions, $sMethodName) &&
+ \is_callable(array($this->oActions, $sMethodName)))
+ {
+ $this->Plugins()->RunHook('ajax.action-pre-call', array($sAction));
+ $aResponseItem = \call_user_func(array($this->oActions, $sMethodName));
+ $this->Plugins()->RunHook('ajax.action-post-call', array($sAction, &$aResponseItem));
+ }
+ else if ($this->Plugins()->HasAdditionalAjax($sMethodName))
+ {
+ $this->Plugins()->RunHook('ajax.action-pre-call', array($sAction));
+ $aResponseItem = $this->Plugins()->RunAdditionalAjax($sMethodName);
+ $this->Plugins()->RunHook('ajax.action-post-call', array($sAction, &$aResponseItem));
+ }
+ }
+
+ if (!\is_array($aResponseItem))
+ {
+ throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::UnknownError);
+ }
+ }
+ catch (\Exception $oException)
+ {
+ $aResponseItem = $this->oActions->ExceptionResponse(
+ empty($sAction) ? 'Unknown' : $sAction, $oException);
+
+ if (\is_array($aResponseItem) && $oException instanceof \RainLoop\Exceptions\ClientException)
+ {
+ if ('Folders' === $sAction)
+ {
+ $aResponseItem['ClearAuth'] = true;
+ }
+
+ if ($oException->getLogoutOnException())
+ {
+ $aResponseItem['Logout'] = true;
+ if ($oException->getAdditionalMessage())
+ {
+ $this->oActions->SetSpecLogoutCustomMgsWithDeletion($oException->getAdditionalMessage());
+ }
+ }
+ }
+ }
+
+ if (\is_array($aResponseItem))
+ {
+ $aResponseItem['Time'] = (int) ((\microtime(true) - APP_START) * 1000);
+ }
+
+ $this->Plugins()->RunHook('filter.ajax-response', array($sAction, &$aResponseItem));
+
+ @\header('Content-Type: application/json; charset=utf-8');
+
+ $sResult = \MailSo\Base\Utils::Php2js($aResponseItem, $this->Logger());
+
+ $sObResult = @\ob_get_clean();
+
+ if ($this->Logger()->IsEnabled())
+ {
+ if (0 < \strlen($sObResult))
+ {
+ $this->Logger()->Write($sObResult, \MailSo\Log\Enumerations\Type::ERROR, 'OB-DATA');
+ }
+
+ if ($oException)
+ {
+ $this->Logger()->WriteException($oException, \MailSo\Log\Enumerations\Type::ERROR);
+ }
+
+ $iLimit = (int) $this->Config()->Get('labs', 'log_ajax_response_write_limit', 0);
+ $this->Logger()->Write(0 < $iLimit && $iLimit < \strlen($sResult)
+ ? \substr($sResult, 0, $iLimit).'...' : $sResult, \MailSo\Log\Enumerations\Type::INFO, 'AJAX');
+ }
+
+ return $sResult;
+ }
+
+ /**
+ * @return string
+ */
+ public function ServiceOwnCloudAuth()
+ {
+ $this->oHttp->ServerNoCache();
+
+ if (!\RainLoop\Utils::IsOwnCloud() ||
+ !isset($_ENV['___rainloop_owncloud_email']) ||
+ !isset($_ENV['___rainloop_owncloud_password']) ||
+ empty($_ENV['___rainloop_owncloud_email'])
+ )
+ {
+ $this->oActions->SetAuthLogoutToken();
+ $this->oActions->Location('./');
+ return '';
+ }
+
+ $bLogout = true;
+
+ $sEmail = $_ENV['___rainloop_owncloud_email'];
+ $sPassword = $_ENV['___rainloop_owncloud_password'];
+
+ try
+ {
+ $oAccount = $this->oActions->LoginProcess($sEmail, $sPassword);
+ $this->oActions->AuthToken($oAccount);
+
+ $bLogout = !($oAccount instanceof \RainLoop\Model\Account);
+ }
+ catch (\Exception $oException)
+ {
+ $this->oActions->Logger()->WriteException($oException);
+ }
+
+ if ($bLogout)
+ {
+ $this->oActions->SetAuthLogoutToken();
+ }
+
+ $this->oActions->Location('./');
+ return '';
+ }
+
+ /**
+ * @return string
+ */
+ public function ServiceAppend()
+ {
+ @\ob_start();
+ $bResponse = false;
+ $oException = null;
+ try
+ {
+ if (\method_exists($this->oActions, 'Append') &&
+ \is_callable(array($this->oActions, 'Append')))
+ {
+ $this->oActions->SetActionParams($this->oHttp->GetPostAsArray(), 'Append');
+ $bResponse = \call_user_func(array($this->oActions, 'Append'));
+ }
+ }
+ catch (\Exception $oException)
+ {
+ $bResponse = false;
+ }
+
+ @\header('Content-Type: text/plain; charset=utf-8');
+ $sResult = true === $bResponse ? '1' : '0';
+
+ $sObResult = @\ob_get_clean();
+ if (0 < \strlen($sObResult))
+ {
+ $this->Logger()->Write($sObResult, \MailSo\Log\Enumerations\Type::ERROR, 'OB-DATA');
+ }
+
+ if ($oException)
+ {
+ $this->Logger()->WriteException($oException, \MailSo\Log\Enumerations\Type::ERROR);
+ }
+
+ $this->Logger()->Write($sResult, \MailSo\Log\Enumerations\Type::INFO, 'APPEND');
+
+ return $sResult;
+ }
+
+ /**
+ * @param string $sAction
+ * @param int $iSizeLimit = 0
+ *
+ * @return string
+ */
+ private function privateUpload($sAction, $iSizeLimit = 0)
+ {
+ $oConfig = $this->Config();
+
+ @\ob_start();
+ $aResponseItem = null;
+ try
+ {
+ $aFile = null;
+ $sInputName = 'uploader';
+ $iError = \RainLoop\Enumerations\UploadError::UNKNOWN;
+ $iSizeLimit = (0 < $iSizeLimit ? $iSizeLimit : ((int) $oConfig->Get('webmail', 'attachment_size_limit', 0))) * 1024 * 1024;
+
+ $iError = UPLOAD_ERR_OK;
+ $_FILES = isset($_FILES) ? $_FILES : null;
+ if (isset($_FILES, $_FILES[$sInputName], $_FILES[$sInputName]['name'], $_FILES[$sInputName]['tmp_name'], $_FILES[$sInputName]['size']))
+ {
+ $iError = (isset($_FILES[$sInputName]['error'])) ? (int) $_FILES[$sInputName]['error'] : UPLOAD_ERR_OK;
+
+ if (UPLOAD_ERR_OK === $iError && 0 < $iSizeLimit && $iSizeLimit < (int) $_FILES[$sInputName]['size'])
+ {
+ $iError = \RainLoop\Enumerations\UploadError::CONFIG_SIZE;
+ }
+
+ if (UPLOAD_ERR_OK === $iError)
+ {
+ $aFile = $_FILES[$sInputName];
+ }
+ }
+ else if (!isset($_FILES) || !is_array($_FILES) || 0 === count($_FILES))
+ {
+ $iError = UPLOAD_ERR_INI_SIZE;
+ }
+ else
+ {
+ $iError = \RainLoop\Enumerations\UploadError::EMPTY_FILES_DATA;
+ }
+
+ if (\method_exists($this->oActions, $sAction) &&
+ \is_callable(array($this->oActions, $sAction)))
+ {
+ $aActionParams = $this->oHttp->GetQueryAsArray();
+
+ $aActionParams['File'] = $aFile;
+ $aActionParams['Error'] = $iError;
+
+ $this->oActions->SetActionParams($aActionParams, $sAction);
+
+ $aResponseItem = \call_user_func(array($this->oActions, $sAction));
+ }
+
+ if (!is_array($aResponseItem))
+ {
+ throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::UnknownError);
+ }
+ }
+ catch (\Exception $oException)
+ {
+ $aResponseItem = $this->oActions->ExceptionResponse($sAction, $oException);
+ }
+
+ if ('iframe' === $this->oHttp->GetPost('jua-post-type', ''))
+ {
+ @\header('Content-Type: text/html; charset=utf-8');
+ }
+ else
+ {
+ @\header('Content-Type: application/json; charset=utf-8');
+ }
+
+ $this->Plugins()->RunHook('filter.upload-response', array(&$aResponseItem));
+ $sResult = \MailSo\Base\Utils::Php2js($aResponseItem, $this->Logger());
+
+ $sObResult = @\ob_get_clean();
+ if (0 < \strlen($sObResult))
+ {
+ $this->Logger()->Write($sObResult, \MailSo\Log\Enumerations\Type::ERROR, 'OB-DATA');
+ }
+
+ $this->Logger()->Write($sResult, \MailSo\Log\Enumerations\Type::INFO, 'UPLOAD');
+
+ return $sResult;
+ }
+
+ /**
+ * @return string
+ */
+ public function ServiceUpload()
+ {
+ return $this->privateUpload('Upload');
+ }
+
+ /**
+ * @return string
+ */
+ public function ServiceUploadContacts()
+ {
+ return $this->privateUpload('UploadContacts', 5);
+ }
+
+ /**
+ * @return string
+ */
+ public function ServiceUploadBackground()
+ {
+ return $this->privateUpload('UploadBackground', 1);
+ }
+
+ /**
+ * @return string
+ */
+ public function ServiceProxyExternal()
+ {
+ $bResult = false;
+ $sData = empty($this->aPaths[1]) ? '' : $this->aPaths[1];
+ if (!empty($sData) && $this->oActions->Config()->Get('labs', 'use_local_proxy_for_external_images', false))
+ {
+ $this->oActions->verifyCacheByKey($sData);
+
+ $aData = \RainLoop\Utils::DecodeKeyValuesQ($sData);
+ if (\is_array($aData) && !empty($aData['Token']) && !empty($aData['Url']) && $aData['Token'] === \RainLoop\Utils::GetConnectionToken())
+ {
+ $iCode = 404;
+ $sContentType = '';
+ $mResult = $this->oHttp->GetUrlAsString($aData['Url'], 'RainLoop External Proxy', $sContentType, $iCode);
+
+ if (false !== $mResult && 200 === $iCode &&
+ \in_array($sContentType, array('image/png', 'image/jpeg', 'image/jpg', 'image/bmp', 'image/gif')))
+ {
+ $bResult = true;
+
+ $this->oActions->cacheByKey($sData);
+
+ \header('Content-Type: '.$sContentType);
+ echo $mResult;
+ }
+ }
+ }
+
+ if (!$bResult)
+ {
+ $this->oHttp->StatusHeader(404);
+ }
+
+ return '';
+ }
+
+ /**
+ * @return string
+ */
+ public function ServiceRaw()
+ {
+ $sResult = '';
+ $sRawError = '';
+ $sAction = empty($this->aPaths[2]) ? '' : $this->aPaths[2];
+ $oException = null;
+
+ try
+ {
+ $sRawError = 'Invalid action';
+ if (0 !== \strlen($sAction))
+ {
+ $sMethodName = 'Raw'.$sAction;
+ if (\method_exists($this->oActions, $sMethodName))
+ {
+ @\header('X-Raw-Action: '.$sMethodName, true);
+
+ $sRawError = '';
+ $this->oActions->SetActionParams(array(
+ 'RawKey' => empty($this->aPaths[3]) ? '' : $this->aPaths[3],
+ 'Params' => $this->aPaths
+ ), $sMethodName);
+
+ if (!\call_user_func(array($this->oActions, $sMethodName)))
+ {
+ $sRawError = 'False result';
+ }
+ else
+ {
+ $sRawError = '';
+ }
+ }
+ else
+ {
+ $sRawError = 'Unknown action "'.$sAction.'"';
+ }
+ }
+ else
+ {
+ $sRawError = 'Empty action';
+ }
+ }
+ catch (\RainLoop\Exceptions\ClientException $oException)
+ {
+ $sRawError = 'Exception as result';
+ switch ($oException->getCode())
+ {
+ case \RainLoop\Notifications::AuthError:
+ $sRawError = 'Authentication failed';
+ break;
+ }
+ }
+ catch (\Exception $oException)
+ {
+ $sRawError = 'Exception as result';
+ }
+
+ if (0 < \strlen($sRawError))
+ {
+ $this->oActions->Logger()->Write($sRawError, \MailSo\Log\Enumerations\Type::ERROR);
+ $this->oActions->Logger()->WriteDump($this->aPaths, \MailSo\Log\Enumerations\Type::ERROR, 'PATHS');
+ }
+
+ if ($oException)
+ {
+ $this->Logger()->WriteException($oException, \MailSo\Log\Enumerations\Type::ERROR, 'RAW');
+ }
+
+ return $sResult;
+ }
+
+ /**
+ * @return string
+ */
+ public function ServiceLang()
+ {
+// sleep(2);
+ $sResult = '';
+ @\header('Content-Type: application/javascript; charset=utf-8');
+
+ if (!empty($this->aPaths[3]))
+ {
+ $bAdmim = 'Admin' === (isset($this->aPaths[2]) ? (string) $this->aPaths[2] : 'App');
+ $sLanguage = $this->oActions->ValidateLanguage($this->aPaths[3], '', $bAdmim);
+
+ $bCacheEnabled = $this->Config()->Get('labs', 'cache_system_data', true);
+ if (!empty($sLanguage) && $bCacheEnabled)
+ {
+ $this->oActions->verifyCacheByKey($this->sQuery);
+ }
+
+ $sCacheFileName = '';
+ if ($bCacheEnabled)
+ {
+ $sCacheFileName = \RainLoop\KeyPathHelper::LangCache(
+ $sLanguage, $bAdmim, $this->oActions->Plugins()->Hash());
+
+ $sResult = $this->Cacher()->Get($sCacheFileName);
+ }
+
+ if (0 === \strlen($sResult))
+ {
+ $sResult = $this->compileLanguage($sLanguage, $bAdmim, false);
+ if ($bCacheEnabled && 0 < \strlen($sCacheFileName))
+ {
+ $this->Cacher()->Set($sCacheFileName, $sResult);
+ }
+ }
+
+ if ($bCacheEnabled)
+ {
+ $this->oActions->cacheByKey($this->sQuery);
+ }
+ }
+
+ return $sResult;
+ }
+
+ /**
+ * @return string
+ */
+ public function ServiceTemplates()
+ {
+ $sResult = '';
+ @\header('Content-Type: application/javascript; charset=utf-8');
+
+ $bCacheEnabled = $this->Config()->Get('labs', 'cache_system_data', true);
+ if ($bCacheEnabled)
+ {
+ $this->oActions->verifyCacheByKey($this->sQuery);
+ }
+
+ $bAdmin = false !== \strpos($this->sQuery, 'Admin');
+
+ $sCacheFileName = '';
+ if ($bCacheEnabled)
+ {
+ $sCacheFileName = \RainLoop\KeyPathHelper::TemplatesCache($bAdmin, $this->oActions->Plugins()->Hash());
+ $sResult = $this->Cacher()->Get($sCacheFileName);
+ }
+
+ if (0 === \strlen($sResult))
+ {
+ $sResult = $this->compileTemplates($bAdmin);
+ if ($bCacheEnabled && 0 < \strlen($sCacheFileName))
+ {
+ $this->Cacher()->Set($sCacheFileName, $sResult);
+ }
+ }
+
+ if ($bCacheEnabled)
+ {
+ $this->oActions->cacheByKey($this->sQuery);
+ }
+
+ return $sResult;
+ }
+
+ /**
+ * @return string
+ */
+ public function ServicePlugins()
+ {
+ $sResult = '';
+ $bAdmin = !empty($this->aPaths[2]) && 'Admin' === $this->aPaths[2];
+
+ @\header('Content-Type: application/javascript; charset=utf-8');
+
+ $bCacheEnabled = $this->Config()->Get('labs', 'cache_system_data', true);
+ if ($bCacheEnabled)
+ {
+ $this->oActions->verifyCacheByKey($this->sQuery);
+ }
+
+ $sCacheFileName = '';
+ if ($bCacheEnabled)
+ {
+ $sCacheFileName = \RainLoop\KeyPathHelper::PluginsJsCache($this->oActions->Plugins()->Hash());
+ $sResult = $this->Cacher()->Get($sCacheFileName);
+ }
+
+ if (0 === strlen($sResult))
+ {
+ $sResult = $this->Plugins()->CompileJs($bAdmin);
+ if ($bCacheEnabled && 0 < \strlen($sCacheFileName))
+ {
+ $this->Cacher()->Set($sCacheFileName, $sResult);
+ }
+ }
+
+ if ($bCacheEnabled)
+ {
+ $this->oActions->cacheByKey($this->sQuery);
+ }
+
+ return $sResult;
+ }
+
+ /**
+ * @return string
+ */
+ public function ServiceCss()
+ {
+ $sResult = '';
+
+ $bAdmin = !empty($this->aPaths[2]) && 'Admin' === $this->aPaths[2];
+ $bJson = !empty($this->aPaths[9]) && 'Json' === $this->aPaths[9];
+
+ if ($bJson)
+ {
+ @\header('Content-Type: application/json; charset=utf-8');
+ }
+ else
+ {
+ @\header('Content-Type: text/css; charset=utf-8');
+ }
+
+ $sTheme = '';
+ if (!empty($this->aPaths[4]))
+ {
+ $sTheme = $this->oActions->ValidateTheme($this->aPaths[4]);
+ $sRealTheme = $sTheme;
+
+ $bCustomTheme = '@custom' === \substr($sTheme, -7);
+ if ($bCustomTheme)
+ {
+ $sRealTheme = \substr($sTheme, 0, -7);
+ }
+
+ $bCacheEnabled = $this->Config()->Get('labs', 'cache_system_data', true);
+ if ($bCacheEnabled)
+ {
+ $this->oActions->verifyCacheByKey($this->sQuery);
+ }
+
+ $sCacheFileName = '';
+ if ($bCacheEnabled)
+ {
+ $sCacheFileName = \RainLoop\KeyPathHelper::CssCache($sTheme, $this->oActions->Plugins()->Hash());
+ $sResult = $this->Cacher()->Get($sCacheFileName);
+ }
+
+ if (0 === \strlen($sResult))
+ {
+ try
+ {
+ include_once APP_VERSION_ROOT_PATH.'app/libraries/lessphp/ctype.php';
+ include_once APP_VERSION_ROOT_PATH.'app/libraries/lessphp/lessc.inc.php';
+
+ $oLess = new \RainLoopVendor\lessc();
+ $oLess->setFormatter('compressed');
+
+ $aResult = array();
+
+ $sThemeFile = ($bCustomTheme ? APP_INDEX_ROOT_PATH : APP_VERSION_ROOT_PATH).'themes/'.$sRealTheme.'/styles.less';
+ $sThemeExtFile = ($bCustomTheme ? APP_INDEX_ROOT_PATH : APP_VERSION_ROOT_PATH).'themes/'.$sRealTheme.'/ext.less';
+
+ $sThemeValuesFile = APP_VERSION_ROOT_PATH.'app/templates/Themes/values.less';
+ $sThemeTemplateFile = APP_VERSION_ROOT_PATH.'app/templates/Themes/template.less';
+
+ if (\file_exists($sThemeFile) && \file_exists($sThemeTemplateFile) && \file_exists($sThemeValuesFile))
+ {
+ $aResult[] = '@base: "'.
+ ($bCustomTheme ? \RainLoop\Utils::WebPath() : \RainLoop\Utils::WebVersionPath()).
+ 'themes/'.$sRealTheme.'/";';
+
+ $aResult[] = \file_get_contents($sThemeValuesFile);
+ $aResult[] = \file_get_contents($sThemeFile);
+ $aResult[] = \file_get_contents($sThemeTemplateFile);
+
+ if (\file_exists($sThemeExtFile))
+ {
+ $aResult[] = \file_get_contents($sThemeExtFile);
+ }
+ }
+
+ $aResult[] = $this->Plugins()->CompileCss($bAdmin);
+
+ $sResult = $oLess->compile(\implode("\n", $aResult));
+
+ if ($bCacheEnabled)
+ {
+ if (0 < \strlen($sCacheFileName))
+ {
+ $this->Cacher()->Set($sCacheFileName, $sResult);
+ }
+ }
+ }
+ catch (\Exception $oException)
+ {
+ $this->Logger()->WriteException($oException, \MailSo\Log\Enumerations\Type::ERROR, 'LESS');
+ }
+ }
+
+ if ($bCacheEnabled)
+ {
+ $this->oActions->cacheByKey($this->sQuery);
+ }
+ }
+
+ return $bJson ? \MailSo\Base\Utils::Php2js(array($sTheme, $sResult), $this->Logger()) : $sResult;
+ }
+
+ /**
+ * @return string
+ */
+ public function ServiceSocialGoogle()
+ {
+ $bXAuth = '1' === (string) $this->oHttp->GetQuery('xauth', '0');
+ return $this->oActions->Social()->GooglePopupService($bXAuth);
+ }
+
+ /**
+ * @return string
+ */
+ public function ServiceSocialFacebook()
+ {
+ return $this->oActions->Social()->FacebookPopupService();
+ }
+
+ /**
+ * @return string
+ */
+ public function ServiceSocialTwitter()
+ {
+ return $this->oActions->Social()->TwitterPopupService();
+ }
+
+ /**
+ * @return string
+ */
+ public function ServiceAppData($sAdd = '')
+ {
+ return $this->localAppData(false, $sAdd);
+ }
+
+ /**
+ * @return string
+ */
+ public function ServiceAdminAppData($sAdd = '')
+ {
+ return $this->localAppData(true, $sAdd);
+ }
+
+ /**
+ * @return string
+ */
+ public function ServiceSkipMobile()
+ {
+ \RainLoop\Utils::SetCookie(\RainLoop\Actions::RL_SKIP_MOBILE_KEY, 1);
+ $this->oActions->Location('./');
+ return '';
+ }
+
+ /**
+ * @return string
+ */
+ public function ServiceClearSkipMobile()
+ {
+ \RainLoop\Utils::ClearCookie(\RainLoop\Actions::RL_SKIP_MOBILE_KEY);
+ $this->oActions->Location('./');
+ return '';
+ }
+
+ /**
+ * @return string
+ */
+ public function ServiceNoScript()
+ {
+ return $this->localError($this->oActions->StaticI18N('STATIC/NO_SCRIPT_TITLE'), $this->oActions->StaticI18N('STATIC/NO_SCRIPT_DESC'));
+ }
+
+ /**
+ * @return string
+ */
+ public function ServiceNoCookie()
+ {
+ return $this->localError($this->oActions->StaticI18N('STATIC/NO_COOKIE_TITLE'), $this->oActions->StaticI18N('STATIC/NO_COOKIE_DESC'));
+ }
+
+ /**
+ * @return string
+ */
+ public function ServiceBadBrowser()
+ {
+ $sTitle = $this->oActions->StaticI18N('STATIC/BAD_BROWSER_TITLE');
+ $sDesc = \nl2br($this->oActions->StaticI18N('STATIC/BAD_BROWSER_DESC'));
+
+ @\header('Content-Type: text/html; charset=utf-8');
+ return \strtr(\file_get_contents(APP_VERSION_ROOT_PATH.'app/templates/BadBrowser.html'), array(
+ '{{BaseWebStaticPath}}' => \RainLoop\Utils::WebStaticPath(),
+ '{{ErrorTitle}}' => $sTitle,
+ '{{ErrorHeader}}' => $sTitle,
+ '{{ErrorDesc}}' => $sDesc
+ ));
+ }
+
+ /**
+ * @return string
+ */
+ public function ServiceMailto()
+ {
+ $this->oHttp->ServerNoCache();
+
+ $sTo = \trim($this->oHttp->GetQuery('to', ''));
+ if (!empty($sTo) && \preg_match('/^mailto:/i', $sTo))
+ {
+ $oAccount = $this->oActions->GetAccountFromSignMeToken();
+ if ($oAccount)
+ {
+ $this->oActions->SetMailtoRequest($sTo);
+ }
+ }
+
+ $this->oActions->Location('./');
+ return '';
+ }
+
+ /**
+ * @return string
+ */
+ public function ServicePing()
+ {
+ $this->oHttp->ServerNoCache();
+
+ @\header('Content-Type: text/plain; charset=utf-8');
+ $this->oActions->Logger()->Write('Pong', \MailSo\Log\Enumerations\Type::INFO, 'PING');
+ return 'Pong';
+ }
+
+ /**
+ * @return string
+ */
+ public function ServiceInfo()
+ {
+ $this->oHttp->ServerNoCache();
+
+ if ($this->oActions->IsAdminLoggined(false))
+ {
+ @\header('Content-Type: text/html; charset=utf-8');
+ \phpinfo();
+ }
+ }
+
+ /**
+ * @return string
+ */
+ public function ServiceSso()
+ {
+ $this->oHttp->ServerNoCache();
+
+ $oException = null;
+ $oAccount = null;
+ $bLogout = true;
+
+ $sSsoHash = $this->oHttp->GetRequest('hash', '');
+ if (!empty($sSsoHash))
+ {
+ $mData = null;
+
+ $sSsoSubData = $this->Cacher()->Get(\RainLoop\KeyPathHelper::SsoCacherKey($sSsoHash));
+ if (!empty($sSsoSubData))
+ {
+ $mData = \RainLoop\Utils::DecodeKeyValuesQ($sSsoSubData);
+ $this->Cacher()->Delete(\RainLoop\KeyPathHelper::SsoCacherKey($sSsoHash));
+
+ if (\is_array($mData) && !empty($mData['Email']) && isset($mData['Password'], $mData['Time']) &&
+ (0 === $mData['Time'] || \time() - 10 < $mData['Time']))
+ {
+ $sEmail = \trim($mData['Email']);
+ $sPassword = $mData['Password'];
+
+ $aAdditionalOptions = isset($mData['AdditionalOptions']) && \is_array($mData['AdditionalOptions']) &&
+ 0 < \count($mData['AdditionalOptions']) ? $mData['AdditionalOptions'] : null;
+
+ try
+ {
+ $oAccount = $this->oActions->LoginProcess($sEmail, $sPassword);
+
+ if ($oAccount instanceof \RainLoop\Model\Account && $aAdditionalOptions)
+ {
+ $bNeedToSettings = false;
+
+ $oSettings = $this->SettingsProvider()->Load($oAccount);
+ if ($oSettings)
+ {
+ $sLanguage = isset($aAdditionalOptions['Language']) ?
+ $aAdditionalOptions['Language'] : '';
+
+ if ($sLanguage)
+ {
+ $sLanguage = $this->oActions->ValidateLanguage($sLanguage);
+ if ($sLanguage !== $oSettings->GetConf('Language', ''))
+ {
+ $bNeedToSettings = true;
+ $oSettings->SetConf('Language', $sLanguage);
+ }
+ }
+ }
+
+ if ($bNeedToSettings)
+ {
+ $this->SettingsProvider()->Save($oAccount, $oSettings);
+ }
+ }
+
+ $this->oActions->AuthToken($oAccount);
+
+ $bLogout = !($oAccount instanceof \RainLoop\Model\Account);
+ }
+ catch (\Exception $oException)
+ {
+ $this->oActions->Logger()->WriteException($oException);
+ }
+ }
+ }
+ }
+
+ if ($bLogout)
+ {
+ $this->oActions->SetAuthLogoutToken();
+ }
+
+ $this->oActions->Location('./');
+ return '';
+ }
+
+ /**
+ * @return string
+ */
+ public function ServiceRemoteAutoLogin()
+ {
+ $oException = null;
+ $oAccount = null;
+ $bLogout = true;
+
+ $sEmail = $this->oHttp->GetEnv('REMOTE_USER', '');
+ $sPassword = $this->oHttp->GetEnv('REMOTE_PASSWORD', '');
+
+ if (0 < \strlen($sEmail) && 0 < \strlen(\trim($sPassword)))
+ {
+ try
+ {
+ $oAccount = $this->oActions->LoginProcess($sEmail, $sPassword);
+ $this->oActions->AuthToken($oAccount);
+ $bLogout = !($oAccount instanceof \RainLoop\Model\Account);
+ }
+ catch (\Exception $oException)
+ {
+ $this->oActions->Logger()->WriteException($oException);
+ }
+ }
+
+ if ($bLogout)
+ {
+ $this->oActions->SetAuthLogoutToken();
+ }
+
+ $this->oActions->Location('./');
+ return '';
+ }
+
+ /**
+ * @return string
+ */
+ public function ServiceExternalLogin()
+ {
+ $this->oHttp->ServerNoCache();
+
+ $oException = null;
+ $oAccount = null;
+ $bLogout = true;
+
+ if ($this->oActions->Config()->Get('labs', 'allow_external_login', false))
+ {
+ $sEmail = \trim($this->oHttp->GetRequest('Email', ''));
+ $sPassword = $this->oHttp->GetRequest('Password', '');
+
+ try
+ {
+ $oAccount = $this->oActions->LoginProcess($sEmail, $sPassword);
+ $this->oActions->AuthToken($oAccount);
+ $bLogout = !($oAccount instanceof \RainLoop\Model\Account);
+ }
+ catch (\Exception $oException)
+ {
+ $this->oActions->Logger()->WriteException($oException);
+ }
+
+ if ($bLogout)
+ {
+ $this->oActions->SetAuthLogoutToken();
+ }
+ }
+
+ switch (\strtolower($this->oHttp->GetRequest('Output', 'Redirect')))
+ {
+ case 'json':
+
+ @\header('Content-Type: application/json; charset=utf-8');
+
+ $aResult = array(
+ 'Action' => 'ExternalLogin',
+ 'Result' => $oAccount instanceof \RainLoop\Model\Account ? true : false,
+ 'ErrorCode' => 0
+ );
+
+ if (!$aResult['Result'])
+ {
+ if ($oException instanceof \RainLoop\Exceptions\ClientException)
+ {
+ $aResult['ErrorCode'] = $oException->getCode();
+ }
+ else
+ {
+ $aResult['ErrorCode'] = \RainLoop\Notifications::AuthError;
+ }
+ }
+
+ return \MailSo\Base\Utils::Php2js($aResult, $this->Logger());
+
+ case 'redirect':
+ default:
+ $this->oActions->Location('./');
+ break;
+ }
+
+ return '';
+ }
+
+ /**
+ * @return string
+ */
+ public function ServiceExternalSso()
+ {
+ $this->oHttp->ServerNoCache();
+
+ $sResult = '';
+ $bLogout = true;
+ $sKey = $this->oActions->Config()->Get('labs', 'external_sso_key', '');
+ if ($this->oActions->Config()->Get('labs', 'allow_external_sso', false) &&
+ !empty($sKey) && $sKey === \trim($this->oHttp->GetRequest('SsoKey', '')))
+ {
+ $sEmail = \trim($this->oHttp->GetRequest('Email', ''));
+ $sPassword = $this->oHttp->GetRequest('Password', '');
+
+ $sResult = \RainLoop\Api::GetUserSsoHash($sEmail, $sPassword);
+ $bLogout = 0 === \strlen($sResult);
+
+ switch (\strtolower($this->oHttp->GetRequest('Output', 'Plain')))
+ {
+ case 'plain':
+ @\header('Content-Type: text/plain');
+ break;
+
+ case 'json':
+ @\header('Content-Type: application/json; charset=utf-8');
+ $sResult = \MailSo\Base\Utils::Php2js(array(
+ 'Action' => 'ExternalSso',
+ 'Result' => $sResult
+ ), $this->Logger());
+ break;
+ }
+ }
+
+ if ($bLogout)
+ {
+ $this->oActions->SetAuthLogoutToken();
+ }
+
+ return $sResult;
+ }
+
+ private function changeAction()
+ {
+ $this->oHttp->ServerNoCache();
+
+ $oAccount = $this->oActions->GetAccount();
+
+ if ($oAccount && $this->oActions->GetCapa(false, false, \RainLoop\Enumerations\Capa::ADDITIONAL_ACCOUNTS, $oAccount))
+ {
+ $oAccountToLogin = null;
+ $sEmail = empty($this->aPaths[2]) ? '' : \urldecode(\trim($this->aPaths[2]));
+ if (!empty($sEmail))
+ {
+ $sEmail = \MailSo\Base\Utils::IdnToAscii($sEmail);
+
+ $aAccounts = $this->oActions->GetAccounts($oAccount);
+ if (isset($aAccounts[$sEmail]))
+ {
+ $oAccountToLogin = $this->oActions->GetAccountFromCustomToken($aAccounts[$sEmail], false, false);
+ }
+ }
+
+ if ($oAccountToLogin)
+ {
+ $this->oActions->AuthToken($oAccountToLogin);
+ }
+ }
+ }
+
+ /**
+ * @return string
+ */
+ public function ServiceChangeMobile()
+ {
+ $this->changeAction();
+ $this->oActions->Location('./?/Mobile/');
+ return '';
+ }
+
+ /**
+ * @return string
+ */
+ public function ServiceChange()
+ {
+ $this->changeAction();
+ $this->oActions->Location('./');
+ return '';
+ }
+
+ /**
+ * @param string $sTitle
+ * @param string $sDesc
+ *
+ * @return mixed
+ */
+ public function ErrorTemplates($sTitle, $sDesc, $bShowBackLink = true)
+ {
+ return strtr(file_get_contents(APP_VERSION_ROOT_PATH.'app/templates/Error.html'), array(
+ '{{BaseWebStaticPath}}' => \RainLoop\Utils::WebStaticPath(),
+ '{{ErrorTitle}}' => $sTitle,
+ '{{ErrorHeader}}' => $sTitle,
+ '{{ErrorDesc}}' => $sDesc,
+ '{{BackLinkVisibilityStyle}}' => $bShowBackLink ? 'display:inline-block' : 'display:none',
+ '{{BackLink}}' => $this->oActions->StaticI18N('STATIC/BACK_LINK'),
+ '{{BackHref}}' => './'
+ ));
+ }
+
+ /**
+ * @param string $sTitle
+ * @param string $sDesc
+ *
+ * @return string
+ */
+ private function localError($sTitle, $sDesc)
+ {
+ @header('Content-Type: text/html; charset=utf-8');
+ return $this->ErrorTemplates($sTitle, \nl2br($sDesc));
+ }
+
+ /**
+ * @param bool $bAdmin = true
+ * @param string $sAdd = ''
+ *
+ * @return string
+ */
+ private function localAppData($bAdmin = false, $sAdd = '')
+ {
+ @\header('Content-Type: application/javascript; charset=utf-8');
+ $this->oHttp->ServerNoCache();
+
+ $sAuthAccountHash = '';
+ if (!$bAdmin && 0 === \strlen($this->oActions->GetSpecAuthLogoutTokenWithDeletion()))
+ {
+ $sAuthAccountHash = $this->oActions->GetSpecAuthTokenWithDeletion();
+ if (empty($sAuthAccountHash))
+ {
+ $sAuthAccountHash = $this->oActions->GetSpecAuthToken();
+ }
+
+ if (empty($sAuthAccountHash))
+ {
+ $oAccount = $this->oActions->GetAccountFromSignMeToken();
+ if ($oAccount)
+ {
+ try
+ {
+ $this->oActions->CheckMailConnection($oAccount);
+
+ $this->oActions->AuthToken($oAccount);
+
+ $sAuthAccountHash = $this->oActions->GetSpecAuthToken();
+ }
+ catch (\Exception $oException)
+ {
+ $oException = null;
+ $this->oActions->ClearSignMeData($oAccount);
+ }
+ }
+ }
+
+ $this->oActions->SetSpecAuthToken($sAuthAccountHash);
+ }
+
+ $sResult = $this->compileAppData($this->oActions->AppData($bAdmin,
+ 0 === \strpos($sAdd, 'mobile'), '1' === \substr($sAdd, -1),
+ $sAuthAccountHash), false);
+
+ $this->Logger()->Write($sResult, \MailSo\Log\Enumerations\Type::INFO, 'APPDATA');
+
+ return $sResult;
+ }
+
+ /**
+ * @param bool $bAdmin = false
+ * @param bool $bJsOutput = true
+ *
+ * @return string
+ */
+ public function compileTemplates($bAdmin = false, $bJsOutput = true)
+ {
+ $aTemplates = array();
+
+ \RainLoop\Utils::CompileTemplates($aTemplates, APP_VERSION_ROOT_PATH.'app/templates/Views/Components', 'Component');
+ \RainLoop\Utils::CompileTemplates($aTemplates, APP_VERSION_ROOT_PATH.'app/templates/Views/'.($bAdmin ? 'Admin' : 'User'));
+ \RainLoop\Utils::CompileTemplates($aTemplates, APP_VERSION_ROOT_PATH.'app/templates/Views/Common');
+
+ $this->oActions->Plugins()->CompileTemplate($aTemplates, $bAdmin);
+
+ $sHtml = '';
+ foreach ($aTemplates as $sName => $sFile)
+ {
+ $sName = \preg_replace('/[^a-zA-Z0-9]/', '', $sName);
+ $sHtml .= '';
+ }
+
+ unset($aTemplates);
+
+ return $bJsOutput ? 'window.rainloopTEMPLATES='.\MailSo\Base\Utils::Php2js(array($sHtml), $this->Logger()).';' : $sHtml;
+ }
+
+ /**
+ * @param string $sLanguage
+ *
+ * @return string
+ */
+ private function convertLanguageNameToMomentLanguageName($sLanguage)
+ {
+ $aHelper = array('en_gb' => 'en-gb', 'fr_ca' => 'fr-ca', 'pt_br' => 'pt-br',
+ 'uk_ua' => 'ua', 'zh_cn' => 'zh-cn', 'zh_tw' => 'zh-tw');
+
+ return isset($aHelper[$sLanguage]) ? $aHelper[$sLanguage] : \substr($sLanguage, 0, 2);
+ }
+
+ /**
+ * @param string $sLanguage
+ * @param bool $bAdmin = false
+ * @param bool $bWrapByScriptTag = true
+ *
+ * @return string
+ */
+ private function compileLanguage($sLanguage, $bAdmin = false, $bWrapByScriptTag = true)
+ {
+ $aResultLang = array();
+
+ $sMoment = 'window.moment && window.moment.locale && window.moment.locale(\'en\');';
+ $sMomentFileName = APP_VERSION_ROOT_PATH.'app/localization/moment/'.
+ $this->convertLanguageNameToMomentLanguageName($sLanguage).'.js';
+
+ if (\file_exists($sMomentFileName))
+ {
+ $sMoment = \file_get_contents($sMomentFileName);
+ $sMoment = \preg_replace('/\/\/[^\n]+\n/', '', $sMoment);
+ }
+
+ \RainLoop\Utils::ReadAndAddLang(APP_VERSION_ROOT_PATH.'app/localization/langs.yml', $aResultLang);
+ \RainLoop\Utils::ReadAndAddLang(APP_VERSION_ROOT_PATH.'app/localization/'.
+ ($bAdmin ? 'admin' : 'webmail').'/_source.en.yml', $aResultLang);
+ \RainLoop\Utils::ReadAndAddLang(APP_VERSION_ROOT_PATH.'app/localization/'.
+ ($bAdmin ? 'admin' : 'webmail').'/'.$sLanguage.'.yml', $aResultLang);
+
+ $this->Plugins()->ReadLang($sLanguage, $aResultLang);
+
+ $sLangJs = '';
+ $aLangKeys = \array_keys($aResultLang);
+ foreach ($aLangKeys as $sKey)
+ {
+ $sString = isset($aResultLang[$sKey]) ? $aResultLang[$sKey] : $sKey;
+ if (\is_array($sString))
+ {
+ $sString = \implode("\n", $sString);
+ }
+
+ $sLangJs .= '"'.\str_replace('"', '\\"', \str_replace('\\', '\\\\', $sKey)).'":'
+ .'"'.\str_replace(array("\r", "\n", "\t"), array('\r', '\n', '\t'),
+ \str_replace('"', '\\"', \str_replace('\\', '\\\\', $sString))).'",';
+ }
+
+ $sResult = empty($sLangJs) ? 'null' : '{'.\substr($sLangJs, 0, -1).'}';
+
+ return
+ ($bWrapByScriptTag ? '' : '')
+ ;
+ }
+
+ /**
+ * @param array $aAppData
+ * @param bool $bWrapByScriptTag = true
+ *
+ * @return string
+ */
+ private function compileAppData($aAppData, $bWrapByScriptTag = true)
+ {
+ return
+ ($bWrapByScriptTag ? '' : '')
+ ;
+ }
+}
diff --git a/rainloop/v/0.0.0/app/localization/.gitignore b/rainloop/v/0.0.0/app/localization/.gitignore
new file mode 100644
index 000000000..c4098032d
--- /dev/null
+++ b/rainloop/v/0.0.0/app/localization/.gitignore
@@ -0,0 +1 @@
+/moment/**
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/ar-ma.js b/rainloop/v/0.0.0/app/localization/moment/ar-ma.js
index 1c159f102..b12a7b167 100644
--- a/rainloop/v/0.0.0/app/localization/moment/ar-ma.js
+++ b/rainloop/v/0.0.0/app/localization/moment/ar-ma.js
@@ -1,32 +1,33 @@
-// moment.js language configuration
-// language : Moroccan Arabic (ar-ma)
-// author : ElFadili Yassine : https://github.com/ElFadiliY
-// author : Abdel Said : https://github.com/abdelsaid
+//! moment.js locale configuration
+//! locale : Arabic (Morocco) [ar-ma]
+//! author : ElFadili Yassine : https://github.com/ElFadiliY
+//! author : Abdel Said : https://github.com/abdelsaid
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
- return moment.lang('ar-ma', {
- months : "يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),
- monthsShort : "يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),
- weekdays : "الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),
- weekdaysShort : "احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),
- weekdaysMin : "ح_ن_ث_ر_خ_ج_س".split("_"),
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
+
+
+ var ar_ma = moment.defineLocale('ar-ma', {
+ months : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'),
+ monthsShort : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'),
+ weekdays : 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
+ weekdaysShort : 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),
+ weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'),
+ weekdaysParseExact : true,
longDateFormat : {
- LT : "HH:mm",
- L : "DD/MM/YYYY",
- LL : "D MMMM YYYY",
- LLL : "D MMMM YYYY LT",
- LLLL : "dddd D MMMM YYYY LT"
+ LT : 'HH:mm',
+ LTS : 'HH:mm:ss',
+ L : 'DD/MM/YYYY',
+ LL : 'D MMMM YYYY',
+ LLL : 'D MMMM YYYY HH:mm',
+ LLLL : 'dddd D MMMM YYYY HH:mm'
},
calendar : {
- sameDay: "[اليوم على الساعة] LT",
+ sameDay: '[اليوم على الساعة] LT',
nextDay: '[غدا على الساعة] LT',
nextWeek: 'dddd [على الساعة] LT',
lastDay: '[أمس على الساعة] LT',
@@ -34,23 +35,26 @@
sameElse: 'L'
},
relativeTime : {
- future : "في %s",
- past : "منذ %s",
- s : "ثوان",
- m : "دقيقة",
- mm : "%d دقائق",
- h : "ساعة",
- hh : "%d ساعات",
- d : "يوم",
- dd : "%d أيام",
- M : "شهر",
- MM : "%d أشهر",
- y : "سنة",
- yy : "%d سنوات"
+ future : 'في %s',
+ past : 'منذ %s',
+ s : 'ثوان',
+ m : 'دقيقة',
+ mm : '%d دقائق',
+ h : 'ساعة',
+ hh : '%d ساعات',
+ d : 'يوم',
+ dd : '%d أيام',
+ M : 'شهر',
+ MM : '%d أشهر',
+ y : 'سنة',
+ yy : '%d سنوات'
},
week : {
dow : 6, // Saturday is the first day of the week.
doy : 12 // The week that contains Jan 1st is the first week of the year.
}
});
-}));
+
+ return ar_ma;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/ar.js b/rainloop/v/0.0.0/app/localization/moment/ar.js
index dd01a42cf..6e727729f 100644
--- a/rainloop/v/0.0.0/app/localization/moment/ar.js
+++ b/rainloop/v/0.0.0/app/localization/moment/ar.js
@@ -1,17 +1,17 @@
-// moment.js language configuration
-// language : Arabic (ar)
-// author : Abdel Said : https://github.com/abdelsaid
-// changes in months, weekdays : Ahmed Elkhatib
+//! moment.js locale configuration
+//! locale : Arabic [ar]
+//! author : Abdel Said: https://github.com/abdelsaid
+//! changes in months, weekdays: Ahmed Elkhatib
+//! Native plural forms: forabi https://github.com/forabi
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
+
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
var symbolMap = {
'1': '١',
'2': '٢',
@@ -34,53 +34,90 @@
'٨': '8',
'٩': '9',
'٠': '0'
- };
+ }, pluralForm = function (n) {
+ return n === 0 ? 0 : n === 1 ? 1 : n === 2 ? 2 : n % 100 >= 3 && n % 100 <= 10 ? 3 : n % 100 >= 11 ? 4 : 5;
+ }, plurals = {
+ s : ['أقل من ثانية', 'ثانية واحدة', ['ثانيتان', 'ثانيتين'], '%d ثوان', '%d ثانية', '%d ثانية'],
+ m : ['أقل من دقيقة', 'دقيقة واحدة', ['دقيقتان', 'دقيقتين'], '%d دقائق', '%d دقيقة', '%d دقيقة'],
+ h : ['أقل من ساعة', 'ساعة واحدة', ['ساعتان', 'ساعتين'], '%d ساعات', '%d ساعة', '%d ساعة'],
+ d : ['أقل من يوم', 'يوم واحد', ['يومان', 'يومين'], '%d أيام', '%d يومًا', '%d يوم'],
+ M : ['أقل من شهر', 'شهر واحد', ['شهران', 'شهرين'], '%d أشهر', '%d شهرا', '%d شهر'],
+ y : ['أقل من عام', 'عام واحد', ['عامان', 'عامين'], '%d أعوام', '%d عامًا', '%d عام']
+ }, pluralize = function (u) {
+ return function (number, withoutSuffix, string, isFuture) {
+ var f = pluralForm(number),
+ str = plurals[u][pluralForm(number)];
+ if (f === 2) {
+ str = str[withoutSuffix ? 0 : 1];
+ }
+ return str.replace(/%d/i, number);
+ };
+ }, months = [
+ 'كانون الثاني يناير',
+ 'شباط فبراير',
+ 'آذار مارس',
+ 'نيسان أبريل',
+ 'أيار مايو',
+ 'حزيران يونيو',
+ 'تموز يوليو',
+ 'آب أغسطس',
+ 'أيلول سبتمبر',
+ 'تشرين الأول أكتوبر',
+ 'تشرين الثاني نوفمبر',
+ 'كانون الأول ديسمبر'
+ ];
- return moment.lang('ar', {
- months : "يناير/ كانون الثاني_فبراير/ شباط_مارس/ آذار_أبريل/ نيسان_مايو/ أيار_يونيو/ حزيران_يوليو/ تموز_أغسطس/ آب_سبتمبر/ أيلول_أكتوبر/ تشرين الأول_نوفمبر/ تشرين الثاني_ديسمبر/ كانون الأول".split("_"),
- monthsShort : "يناير/ كانون الثاني_فبراير/ شباط_مارس/ آذار_أبريل/ نيسان_مايو/ أيار_يونيو/ حزيران_يوليو/ تموز_أغسطس/ آب_سبتمبر/ أيلول_أكتوبر/ تشرين الأول_نوفمبر/ تشرين الثاني_ديسمبر/ كانون الأول".split("_"),
- weekdays : "الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),
- weekdaysShort : "أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),
- weekdaysMin : "ح_ن_ث_ر_خ_ج_س".split("_"),
+ var ar = moment.defineLocale('ar', {
+ months : months,
+ monthsShort : months,
+ weekdays : 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
+ weekdaysShort : 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
+ weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'),
+ weekdaysParseExact : true,
longDateFormat : {
- LT : "HH:mm",
- L : "DD/MM/YYYY",
- LL : "D MMMM YYYY",
- LLL : "D MMMM YYYY LT",
- LLLL : "dddd D MMMM YYYY LT"
+ LT : 'HH:mm',
+ LTS : 'HH:mm:ss',
+ L : 'D/\u200FM/\u200FYYYY',
+ LL : 'D MMMM YYYY',
+ LLL : 'D MMMM YYYY HH:mm',
+ LLLL : 'dddd D MMMM YYYY HH:mm'
+ },
+ meridiemParse: /ص|م/,
+ isPM : function (input) {
+ return 'م' === input;
},
meridiem : function (hour, minute, isLower) {
if (hour < 12) {
- return "ص";
+ return 'ص';
} else {
- return "م";
+ return 'م';
}
},
calendar : {
- sameDay: "[اليوم على الساعة] LT",
- nextDay: '[غدا على الساعة] LT',
- nextWeek: 'dddd [على الساعة] LT',
- lastDay: '[أمس على الساعة] LT',
- lastWeek: 'dddd [على الساعة] LT',
+ sameDay: '[اليوم عند الساعة] LT',
+ nextDay: '[غدًا عند الساعة] LT',
+ nextWeek: 'dddd [عند الساعة] LT',
+ lastDay: '[أمس عند الساعة] LT',
+ lastWeek: 'dddd [عند الساعة] LT',
sameElse: 'L'
},
relativeTime : {
- future : "في %s",
- past : "منذ %s",
- s : "ثوان",
- m : "دقيقة",
- mm : "%d دقائق",
- h : "ساعة",
- hh : "%d ساعات",
- d : "يوم",
- dd : "%d أيام",
- M : "شهر",
- MM : "%d أشهر",
- y : "سنة",
- yy : "%d سنوات"
+ future : 'بعد %s',
+ past : 'منذ %s',
+ s : pluralize('s'),
+ m : pluralize('m'),
+ mm : pluralize('m'),
+ h : pluralize('h'),
+ hh : pluralize('h'),
+ d : pluralize('d'),
+ dd : pluralize('d'),
+ M : pluralize('M'),
+ MM : pluralize('M'),
+ y : pluralize('y'),
+ yy : pluralize('y')
},
preparse: function (string) {
- return string.replace(/[۰-۹]/g, function (match) {
+ return string.replace(/\u200f/g, '').replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {
return numberMap[match];
}).replace(/،/g, ',');
},
@@ -94,4 +131,7 @@
doy : 12 // The week that contains Jan 1st is the first week of the year.
}
});
-}));
+
+ return ar;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/bg.js b/rainloop/v/0.0.0/app/localization/moment/bg.js
index f47ed65a9..deedab8cd 100644
--- a/rainloop/v/0.0.0/app/localization/moment/bg.js
+++ b/rainloop/v/0.0.0/app/localization/moment/bg.js
@@ -1,28 +1,28 @@
-// moment.js language configuration
-// language : bulgarian (bg)
-// author : Krasen Borisov : https://github.com/kraz
+//! moment.js locale configuration
+//! locale : Bulgarian [bg]
+//! author : Krasen Borisov : https://github.com/kraz
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
- return moment.lang('bg', {
- months : "януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември".split("_"),
- monthsShort : "янр_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек".split("_"),
- weekdays : "неделя_понеделник_вторник_сряда_четвъртък_петък_събота".split("_"),
- weekdaysShort : "нед_пон_вто_сря_чет_пет_съб".split("_"),
- weekdaysMin : "нд_пн_вт_ср_чт_пт_сб".split("_"),
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
+
+
+ var bg = moment.defineLocale('bg', {
+ months : 'януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември'.split('_'),
+ monthsShort : 'янр_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек'.split('_'),
+ weekdays : 'неделя_понеделник_вторник_сряда_четвъртък_петък_събота'.split('_'),
+ weekdaysShort : 'нед_пон_вто_сря_чет_пет_съб'.split('_'),
+ weekdaysMin : 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
longDateFormat : {
- LT : "H:mm",
- L : "D.MM.YYYY",
- LL : "D MMMM YYYY",
- LLL : "D MMMM YYYY LT",
- LLLL : "dddd, D MMMM YYYY LT"
+ LT : 'H:mm',
+ LTS : 'H:mm:ss',
+ L : 'D.MM.YYYY',
+ LL : 'D MMMM YYYY',
+ LLL : 'D MMMM YYYY H:mm',
+ LLLL : 'dddd, D MMMM YYYY H:mm'
},
calendar : {
sameDay : '[Днес в] LT',
@@ -31,34 +31,35 @@
lastDay : '[Вчера в] LT',
lastWeek : function () {
switch (this.day()) {
- case 0:
- case 3:
- case 6:
- return '[В изминалата] dddd [в] LT';
- case 1:
- case 2:
- case 4:
- case 5:
- return '[В изминалия] dddd [в] LT';
+ case 0:
+ case 3:
+ case 6:
+ return '[В изминалата] dddd [в] LT';
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ return '[В изминалия] dddd [в] LT';
}
},
sameElse : 'L'
},
relativeTime : {
- future : "след %s",
- past : "преди %s",
- s : "няколко секунди",
- m : "минута",
- mm : "%d минути",
- h : "час",
- hh : "%d часа",
- d : "ден",
- dd : "%d дни",
- M : "месец",
- MM : "%d месеца",
- y : "година",
- yy : "%d години"
+ future : 'след %s',
+ past : 'преди %s',
+ s : 'няколко секунди',
+ m : 'минута',
+ mm : '%d минути',
+ h : 'час',
+ hh : '%d часа',
+ d : 'ден',
+ dd : '%d дни',
+ M : 'месец',
+ MM : '%d месеца',
+ y : 'година',
+ yy : '%d години'
},
+ ordinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/,
ordinal : function (number) {
var lastDigit = number % 10,
last2Digits = number % 100;
@@ -83,4 +84,7 @@
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
});
-}));
+
+ return bg;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/br.js b/rainloop/v/0.0.0/app/localization/moment/br.js
index 39c60df07..ca290f3c8 100644
--- a/rainloop/v/0.0.0/app/localization/moment/br.js
+++ b/rainloop/v/0.0.0/app/localization/moment/br.js
@@ -1,52 +1,47 @@
-// moment.js language configuration
-// language : breton (br)
-// author : Jean-Baptiste Le Duigou : https://github.com/jbleduigou
+//! moment.js locale configuration
+//! locale : Breton [br]
+//! author : Jean-Baptiste Le Duigou : https://github.com/jbleduigou
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
+
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
function relativeTimeWithMutation(number, withoutSuffix, key) {
var format = {
- 'mm': "munutenn",
- 'MM': "miz",
- 'dd': "devezh"
+ 'mm': 'munutenn',
+ 'MM': 'miz',
+ 'dd': 'devezh'
};
return number + ' ' + mutation(format[key], number);
}
-
function specialMutationForYears(number) {
switch (lastNumber(number)) {
- case 1:
- case 3:
- case 4:
- case 5:
- case 9:
- return number + ' bloaz';
- default:
- return number + ' vloaz';
+ case 1:
+ case 3:
+ case 4:
+ case 5:
+ case 9:
+ return number + ' bloaz';
+ default:
+ return number + ' vloaz';
}
}
-
function lastNumber(number) {
if (number > 9) {
return lastNumber(number % 10);
}
return number;
}
-
function mutation(text, number) {
if (number === 2) {
return softMutation(text);
}
return text;
}
-
function softMutation(text) {
var mutationTable = {
'm': 'v',
@@ -59,18 +54,20 @@
return mutationTable[text.charAt(0)] + text.substring(1);
}
- return moment.lang('br', {
- months : "Genver_C'hwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu".split("_"),
- monthsShort : "Gen_C'hwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker".split("_"),
- weekdays : "Sul_Lun_Meurzh_Merc'her_Yaou_Gwener_Sadorn".split("_"),
- weekdaysShort : "Sul_Lun_Meu_Mer_Yao_Gwe_Sad".split("_"),
- weekdaysMin : "Su_Lu_Me_Mer_Ya_Gw_Sa".split("_"),
+ var br = moment.defineLocale('br', {
+ months : 'Genver_C\'hwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu'.split('_'),
+ monthsShort : 'Gen_C\'hwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker'.split('_'),
+ weekdays : 'Sul_Lun_Meurzh_Merc\'her_Yaou_Gwener_Sadorn'.split('_'),
+ weekdaysShort : 'Sul_Lun_Meu_Mer_Yao_Gwe_Sad'.split('_'),
+ weekdaysMin : 'Su_Lu_Me_Mer_Ya_Gw_Sa'.split('_'),
+ weekdaysParseExact : true,
longDateFormat : {
- LT : "h[e]mm A",
- L : "DD/MM/YYYY",
- LL : "D [a viz] MMMM YYYY",
- LLL : "D [a viz] MMMM YYYY LT",
- LLLL : "dddd, D [a viz] MMMM YYYY LT"
+ LT : 'h[e]mm A',
+ LTS : 'h[e]mm:ss A',
+ L : 'DD/MM/YYYY',
+ LL : 'D [a viz] MMMM YYYY',
+ LLL : 'D [a viz] MMMM YYYY h[e]mm A',
+ LLLL : 'dddd, D [a viz] MMMM YYYY h[e]mm A'
},
calendar : {
sameDay : '[Hiziv da] LT',
@@ -81,20 +78,21 @@
sameElse : 'L'
},
relativeTime : {
- future : "a-benn %s",
- past : "%s 'zo",
- s : "un nebeud segondennoù",
- m : "ur vunutenn",
+ future : 'a-benn %s',
+ past : '%s \'zo',
+ s : 'un nebeud segondennoù',
+ m : 'ur vunutenn',
mm : relativeTimeWithMutation,
- h : "un eur",
- hh : "%d eur",
- d : "un devezh",
+ h : 'un eur',
+ hh : '%d eur',
+ d : 'un devezh',
dd : relativeTimeWithMutation,
- M : "ur miz",
+ M : 'ur miz',
MM : relativeTimeWithMutation,
- y : "ur bloaz",
+ y : 'ur bloaz',
yy : specialMutationForYears
},
+ ordinalParse: /\d{1,2}(añ|vet)/,
ordinal : function (number) {
var output = (number === 1) ? 'añ' : 'vet';
return number + output;
@@ -104,4 +102,7 @@
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
-}));
+
+ return br;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/bs.js b/rainloop/v/0.0.0/app/localization/moment/bs.js
index 83a9b4c07..5bf3e60e0 100644
--- a/rainloop/v/0.0.0/app/localization/moment/bs.js
+++ b/rainloop/v/0.0.0/app/localization/moment/bs.js
@@ -1,139 +1,143 @@
-// moment.js language configuration
-// language : bosnian (bs)
-// author : Nedim Cholich : https://github.com/frontyard
-// based on (hr) translation by Bojan Marković
+//! moment.js locale configuration
+//! locale : Bosnian [bs]
+//! author : Nedim Cholich : https://github.com/frontyard
+//! based on (hr) translation by Bojan Marković
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
function translate(number, withoutSuffix, key) {
- var result = number + " ";
+ var result = number + ' ';
switch (key) {
- case 'm':
- return withoutSuffix ? 'jedna minuta' : 'jedne minute';
- case 'mm':
- if (number === 1) {
- result += 'minuta';
- } else if (number === 2 || number === 3 || number === 4) {
- result += 'minute';
- } else {
- result += 'minuta';
- }
- return result;
- case 'h':
- return withoutSuffix ? 'jedan sat' : 'jednog sata';
- case 'hh':
- if (number === 1) {
- result += 'sat';
- } else if (number === 2 || number === 3 || number === 4) {
- result += 'sata';
- } else {
- result += 'sati';
- }
- return result;
- case 'dd':
- if (number === 1) {
- result += 'dan';
- } else {
- result += 'dana';
- }
- return result;
- case 'MM':
- if (number === 1) {
- result += 'mjesec';
- } else if (number === 2 || number === 3 || number === 4) {
- result += 'mjeseca';
- } else {
- result += 'mjeseci';
- }
- return result;
- case 'yy':
- if (number === 1) {
- result += 'godina';
- } else if (number === 2 || number === 3 || number === 4) {
- result += 'godine';
- } else {
- result += 'godina';
- }
- return result;
+ case 'm':
+ return withoutSuffix ? 'jedna minuta' : 'jedne minute';
+ case 'mm':
+ if (number === 1) {
+ result += 'minuta';
+ } else if (number === 2 || number === 3 || number === 4) {
+ result += 'minute';
+ } else {
+ result += 'minuta';
+ }
+ return result;
+ case 'h':
+ return withoutSuffix ? 'jedan sat' : 'jednog sata';
+ case 'hh':
+ if (number === 1) {
+ result += 'sat';
+ } else if (number === 2 || number === 3 || number === 4) {
+ result += 'sata';
+ } else {
+ result += 'sati';
+ }
+ return result;
+ case 'dd':
+ if (number === 1) {
+ result += 'dan';
+ } else {
+ result += 'dana';
+ }
+ return result;
+ case 'MM':
+ if (number === 1) {
+ result += 'mjesec';
+ } else if (number === 2 || number === 3 || number === 4) {
+ result += 'mjeseca';
+ } else {
+ result += 'mjeseci';
+ }
+ return result;
+ case 'yy':
+ if (number === 1) {
+ result += 'godina';
+ } else if (number === 2 || number === 3 || number === 4) {
+ result += 'godine';
+ } else {
+ result += 'godina';
+ }
+ return result;
}
}
- return moment.lang('bs', {
- months : "januar_februar_mart_april_maj_juni_juli_avgust_septembar_oktobar_novembar_decembar".split("_"),
- monthsShort : "jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.".split("_"),
- weekdays : "nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),
- weekdaysShort : "ned._pon._uto._sri._čet._pet._sub.".split("_"),
- weekdaysMin : "ne_po_ut_sr_če_pe_su".split("_"),
+ var bs = moment.defineLocale('bs', {
+ months : 'januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar'.split('_'),
+ monthsShort : 'jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.'.split('_'),
+ monthsParseExact: true,
+ weekdays : 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split('_'),
+ weekdaysShort : 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),
+ weekdaysMin : 'ne_po_ut_sr_če_pe_su'.split('_'),
+ weekdaysParseExact : true,
longDateFormat : {
- LT : "H:mm",
- L : "DD. MM. YYYY",
- LL : "D. MMMM YYYY",
- LLL : "D. MMMM YYYY LT",
- LLLL : "dddd, D. MMMM YYYY LT"
+ LT : 'H:mm',
+ LTS : 'H:mm:ss',
+ L : 'DD. MM. YYYY',
+ LL : 'D. MMMM YYYY',
+ LLL : 'D. MMMM YYYY H:mm',
+ LLLL : 'dddd, D. MMMM YYYY H:mm'
},
calendar : {
sameDay : '[danas u] LT',
nextDay : '[sutra u] LT',
-
nextWeek : function () {
switch (this.day()) {
- case 0:
- return '[u] [nedjelju] [u] LT';
- case 3:
- return '[u] [srijedu] [u] LT';
- case 6:
- return '[u] [subotu] [u] LT';
- case 1:
- case 2:
- case 4:
- case 5:
- return '[u] dddd [u] LT';
+ case 0:
+ return '[u] [nedjelju] [u] LT';
+ case 3:
+ return '[u] [srijedu] [u] LT';
+ case 6:
+ return '[u] [subotu] [u] LT';
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ return '[u] dddd [u] LT';
}
},
lastDay : '[jučer u] LT',
lastWeek : function () {
switch (this.day()) {
- case 0:
- case 3:
- return '[prošlu] dddd [u] LT';
- case 6:
- return '[prošle] [subote] [u] LT';
- case 1:
- case 2:
- case 4:
- case 5:
- return '[prošli] dddd [u] LT';
+ case 0:
+ case 3:
+ return '[prošlu] dddd [u] LT';
+ case 6:
+ return '[prošle] [subote] [u] LT';
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ return '[prošli] dddd [u] LT';
}
},
sameElse : 'L'
},
relativeTime : {
- future : "za %s",
- past : "prije %s",
- s : "par sekundi",
+ future : 'za %s',
+ past : 'prije %s',
+ s : 'par sekundi',
m : translate,
mm : translate,
h : translate,
hh : translate,
- d : "dan",
+ d : 'dan',
dd : translate,
- M : "mjesec",
+ M : 'mjesec',
MM : translate,
- y : "godinu",
+ y : 'godinu',
yy : translate
},
+ ordinalParse: /\d{1,2}\./,
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
});
-}));
+
+ return bs;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/ca.js b/rainloop/v/0.0.0/app/localization/moment/ca.js
index cf471130d..7882800a2 100644
--- a/rainloop/v/0.0.0/app/localization/moment/ca.js
+++ b/rainloop/v/0.0.0/app/localization/moment/ca.js
@@ -1,28 +1,30 @@
-// moment.js language configuration
-// language : catalan (ca)
-// author : Juan G. Hurtado : https://github.com/juanghurtado
+//! moment.js locale configuration
+//! locale : Catalan [ca]
+//! author : Juan G. Hurtado : https://github.com/juanghurtado
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
- return moment.lang('ca', {
- months : "gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre".split("_"),
- monthsShort : "gen._febr._mar._abr._mai._jun._jul._ag._set._oct._nov._des.".split("_"),
- weekdays : "diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte".split("_"),
- weekdaysShort : "dg._dl._dt._dc._dj._dv._ds.".split("_"),
- weekdaysMin : "Dg_Dl_Dt_Dc_Dj_Dv_Ds".split("_"),
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
+
+
+ var ca = moment.defineLocale('ca', {
+ months : 'gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split('_'),
+ monthsShort : 'gen._febr._mar._abr._mai._jun._jul._ag._set._oct._nov._des.'.split('_'),
+ monthsParseExact : true,
+ weekdays : 'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split('_'),
+ weekdaysShort : 'dg._dl._dt._dc._dj._dv._ds.'.split('_'),
+ weekdaysMin : 'Dg_Dl_Dt_Dc_Dj_Dv_Ds'.split('_'),
+ weekdaysParseExact : true,
longDateFormat : {
- LT : "H:mm",
- L : "DD/MM/YYYY",
- LL : "D MMMM YYYY",
- LLL : "D MMMM YYYY LT",
- LLLL : "dddd D MMMM YYYY LT"
+ LT : 'H:mm',
+ LTS : 'H:mm:ss',
+ L : 'DD/MM/YYYY',
+ LL : 'D MMMM YYYY',
+ LLL : 'D MMMM YYYY H:mm',
+ LLLL : 'dddd D MMMM YYYY H:mm'
},
calendar : {
sameDay : function () {
@@ -43,24 +45,37 @@
sameElse : 'L'
},
relativeTime : {
- future : "en %s",
- past : "fa %s",
- s : "uns segons",
- m : "un minut",
- mm : "%d minuts",
- h : "una hora",
- hh : "%d hores",
- d : "un dia",
- dd : "%d dies",
- M : "un mes",
- MM : "%d mesos",
- y : "un any",
- yy : "%d anys"
+ future : 'en %s',
+ past : 'fa %s',
+ s : 'uns segons',
+ m : 'un minut',
+ mm : '%d minuts',
+ h : 'una hora',
+ hh : '%d hores',
+ d : 'un dia',
+ dd : '%d dies',
+ M : 'un mes',
+ MM : '%d mesos',
+ y : 'un any',
+ yy : '%d anys'
+ },
+ ordinalParse: /\d{1,2}(r|n|t|è|a)/,
+ ordinal : function (number, period) {
+ var output = (number === 1) ? 'r' :
+ (number === 2) ? 'n' :
+ (number === 3) ? 'r' :
+ (number === 4) ? 't' : 'è';
+ if (period === 'w' || period === 'W') {
+ output = 'a';
+ }
+ return number + output;
},
- ordinal : '%dº',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
-}));
+
+ return ca;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/cs.js b/rainloop/v/0.0.0/app/localization/moment/cs.js
index cb79c9b3c..129e936b1 100644
--- a/rainloop/v/0.0.0/app/localization/moment/cs.js
+++ b/rainloop/v/0.0.0/app/localization/moment/cs.js
@@ -1,77 +1,74 @@
-// moment.js language configuration
-// language : czech (cs)
-// author : petrbela : https://github.com/petrbela
+//! moment.js locale configuration
+//! locale : Czech [cs]
+//! author : petrbela : https://github.com/petrbela
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
- var months = "leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec".split("_"),
- monthsShort = "led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro".split("_");
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
+
+ var months = 'leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec'.split('_'),
+ monthsShort = 'led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro'.split('_');
function plural(n) {
return (n > 1) && (n < 5) && (~~(n / 10) !== 1);
}
-
function translate(number, withoutSuffix, key, isFuture) {
- var result = number + " ";
+ var result = number + ' ';
switch (key) {
- case 's': // a few seconds / in a few seconds / a few seconds ago
- return (withoutSuffix || isFuture) ? 'pár sekund' : 'pár sekundami';
- case 'm': // a minute / in a minute / a minute ago
- return withoutSuffix ? 'minuta' : (isFuture ? 'minutu' : 'minutou');
- case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago
- if (withoutSuffix || isFuture) {
- return result + (plural(number) ? 'minuty' : 'minut');
- } else {
- return result + 'minutami';
- }
- break;
- case 'h': // an hour / in an hour / an hour ago
- return withoutSuffix ? 'hodina' : (isFuture ? 'hodinu' : 'hodinou');
- case 'hh': // 9 hours / in 9 hours / 9 hours ago
- if (withoutSuffix || isFuture) {
- return result + (plural(number) ? 'hodiny' : 'hodin');
- } else {
- return result + 'hodinami';
- }
- break;
- case 'd': // a day / in a day / a day ago
- return (withoutSuffix || isFuture) ? 'den' : 'dnem';
- case 'dd': // 9 days / in 9 days / 9 days ago
- if (withoutSuffix || isFuture) {
- return result + (plural(number) ? 'dny' : 'dní');
- } else {
- return result + 'dny';
- }
- break;
- case 'M': // a month / in a month / a month ago
- return (withoutSuffix || isFuture) ? 'měsíc' : 'měsícem';
- case 'MM': // 9 months / in 9 months / 9 months ago
- if (withoutSuffix || isFuture) {
- return result + (plural(number) ? 'měsíce' : 'měsíců');
- } else {
- return result + 'měsíci';
- }
- break;
- case 'y': // a year / in a year / a year ago
- return (withoutSuffix || isFuture) ? 'rok' : 'rokem';
- case 'yy': // 9 years / in 9 years / 9 years ago
- if (withoutSuffix || isFuture) {
- return result + (plural(number) ? 'roky' : 'let');
- } else {
- return result + 'lety';
- }
- break;
+ case 's': // a few seconds / in a few seconds / a few seconds ago
+ return (withoutSuffix || isFuture) ? 'pár sekund' : 'pár sekundami';
+ case 'm': // a minute / in a minute / a minute ago
+ return withoutSuffix ? 'minuta' : (isFuture ? 'minutu' : 'minutou');
+ case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural(number) ? 'minuty' : 'minut');
+ } else {
+ return result + 'minutami';
+ }
+ break;
+ case 'h': // an hour / in an hour / an hour ago
+ return withoutSuffix ? 'hodina' : (isFuture ? 'hodinu' : 'hodinou');
+ case 'hh': // 9 hours / in 9 hours / 9 hours ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural(number) ? 'hodiny' : 'hodin');
+ } else {
+ return result + 'hodinami';
+ }
+ break;
+ case 'd': // a day / in a day / a day ago
+ return (withoutSuffix || isFuture) ? 'den' : 'dnem';
+ case 'dd': // 9 days / in 9 days / 9 days ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural(number) ? 'dny' : 'dní');
+ } else {
+ return result + 'dny';
+ }
+ break;
+ case 'M': // a month / in a month / a month ago
+ return (withoutSuffix || isFuture) ? 'měsíc' : 'měsícem';
+ case 'MM': // 9 months / in 9 months / 9 months ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural(number) ? 'měsíce' : 'měsíců');
+ } else {
+ return result + 'měsíci';
+ }
+ break;
+ case 'y': // a year / in a year / a year ago
+ return (withoutSuffix || isFuture) ? 'rok' : 'rokem';
+ case 'yy': // 9 years / in 9 years / 9 years ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural(number) ? 'roky' : 'let');
+ } else {
+ return result + 'lety';
+ }
+ break;
}
}
- return moment.lang('cs', {
+ var cs = moment.defineLocale('cs', {
months : months,
monthsShort : monthsShort,
monthsParse : (function (months, monthsShort) {
@@ -82,58 +79,74 @@
}
return _monthsParse;
}(months, monthsShort)),
- weekdays : "neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota".split("_"),
- weekdaysShort : "ne_po_út_st_čt_pá_so".split("_"),
- weekdaysMin : "ne_po_út_st_čt_pá_so".split("_"),
+ shortMonthsParse : (function (monthsShort) {
+ var i, _shortMonthsParse = [];
+ for (i = 0; i < 12; i++) {
+ _shortMonthsParse[i] = new RegExp('^' + monthsShort[i] + '$', 'i');
+ }
+ return _shortMonthsParse;
+ }(monthsShort)),
+ longMonthsParse : (function (months) {
+ var i, _longMonthsParse = [];
+ for (i = 0; i < 12; i++) {
+ _longMonthsParse[i] = new RegExp('^' + months[i] + '$', 'i');
+ }
+ return _longMonthsParse;
+ }(months)),
+ weekdays : 'neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota'.split('_'),
+ weekdaysShort : 'ne_po_út_st_čt_pá_so'.split('_'),
+ weekdaysMin : 'ne_po_út_st_čt_pá_so'.split('_'),
longDateFormat : {
- LT: "H.mm",
- L : "DD. MM. YYYY",
- LL : "D. MMMM YYYY",
- LLL : "D. MMMM YYYY LT",
- LLLL : "dddd D. MMMM YYYY LT"
+ LT: 'H:mm',
+ LTS : 'H:mm:ss',
+ L : 'DD.MM.YYYY',
+ LL : 'D. MMMM YYYY',
+ LLL : 'D. MMMM YYYY H:mm',
+ LLLL : 'dddd D. MMMM YYYY H:mm',
+ l : 'D. M. YYYY'
},
calendar : {
- sameDay: "[dnes v] LT",
+ sameDay: '[dnes v] LT',
nextDay: '[zítra v] LT',
nextWeek: function () {
switch (this.day()) {
- case 0:
- return '[v neděli v] LT';
- case 1:
- case 2:
- return '[v] dddd [v] LT';
- case 3:
- return '[ve středu v] LT';
- case 4:
- return '[ve čtvrtek v] LT';
- case 5:
- return '[v pátek v] LT';
- case 6:
- return '[v sobotu v] LT';
+ case 0:
+ return '[v neděli v] LT';
+ case 1:
+ case 2:
+ return '[v] dddd [v] LT';
+ case 3:
+ return '[ve středu v] LT';
+ case 4:
+ return '[ve čtvrtek v] LT';
+ case 5:
+ return '[v pátek v] LT';
+ case 6:
+ return '[v sobotu v] LT';
}
},
lastDay: '[včera v] LT',
lastWeek: function () {
switch (this.day()) {
- case 0:
- return '[minulou neděli v] LT';
- case 1:
- case 2:
- return '[minulé] dddd [v] LT';
- case 3:
- return '[minulou středu v] LT';
- case 4:
- case 5:
- return '[minulý] dddd [v] LT';
- case 6:
- return '[minulou sobotu v] LT';
+ case 0:
+ return '[minulou neděli v] LT';
+ case 1:
+ case 2:
+ return '[minulé] dddd [v] LT';
+ case 3:
+ return '[minulou středu v] LT';
+ case 4:
+ case 5:
+ return '[minulý] dddd [v] LT';
+ case 6:
+ return '[minulou sobotu v] LT';
}
},
- sameElse: "L"
+ sameElse: 'L'
},
relativeTime : {
- future : "za %s",
- past : "před %s",
+ future : 'za %s',
+ past : 'před %s',
s : translate,
m : translate,
mm : translate,
@@ -146,10 +159,14 @@
y : translate,
yy : translate
},
+ ordinalParse : /\d{1,2}\./,
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
-}));
+
+ return cs;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/cv.js b/rainloop/v/0.0.0/app/localization/moment/cv.js
index a5812deba..60bf21389 100644
--- a/rainloop/v/0.0.0/app/localization/moment/cv.js
+++ b/rainloop/v/0.0.0/app/localization/moment/cv.js
@@ -1,59 +1,63 @@
-// moment.js language configuration
-// language : chuvash (cv)
-// author : Anatoly Mironov : https://github.com/mirontoli
+//! moment.js locale configuration
+//! locale : Chuvash [cv]
+//! author : Anatoly Mironov : https://github.com/mirontoli
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
- return moment.lang('cv', {
- months : "кăрлач_нарăс_пуш_ака_май_çĕртме_утă_çурла_авăн_юпа_чӳк_раштав".split("_"),
- monthsShort : "кăр_нар_пуш_ака_май_çĕр_утă_çур_ав_юпа_чӳк_раш".split("_"),
- weekdays : "вырсарникун_тунтикун_ытларикун_юнкун_кĕçнерникун_эрнекун_шăматкун".split("_"),
- weekdaysShort : "выр_тун_ытл_юн_кĕç_эрн_шăм".split("_"),
- weekdaysMin : "вр_тн_ыт_юн_кç_эр_шм".split("_"),
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
+
+
+ var cv = moment.defineLocale('cv', {
+ months : 'кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав'.split('_'),
+ monthsShort : 'кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш'.split('_'),
+ weekdays : 'вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун'.split('_'),
+ weekdaysShort : 'выр_тун_ытл_юн_кӗҫ_эрн_шӑм'.split('_'),
+ weekdaysMin : 'вр_тн_ыт_юн_кҫ_эр_шм'.split('_'),
longDateFormat : {
- LT : "HH:mm",
- L : "DD-MM-YYYY",
- LL : "YYYY [çулхи] MMMM [уйăхĕн] D[-мĕшĕ]",
- LLL : "YYYY [çулхи] MMMM [уйăхĕн] D[-мĕшĕ], LT",
- LLLL : "dddd, YYYY [çулхи] MMMM [уйăхĕн] D[-мĕшĕ], LT"
+ LT : 'HH:mm',
+ LTS : 'HH:mm:ss',
+ L : 'DD-MM-YYYY',
+ LL : 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]',
+ LLL : 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm',
+ LLLL : 'dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm'
},
calendar : {
sameDay: '[Паян] LT [сехетре]',
nextDay: '[Ыран] LT [сехетре]',
- lastDay: '[Ĕнер] LT [сехетре]',
- nextWeek: '[Çитес] dddd LT [сехетре]',
- lastWeek: '[Иртнĕ] dddd LT [сехетре]',
+ lastDay: '[Ӗнер] LT [сехетре]',
+ nextWeek: '[Ҫитес] dddd LT [сехетре]',
+ lastWeek: '[Иртнӗ] dddd LT [сехетре]',
sameElse: 'L'
},
relativeTime : {
future : function (output) {
- var affix = /сехет$/i.exec(output) ? "рен" : /çул$/i.exec(output) ? "тан" : "ран";
+ var affix = /сехет$/i.exec(output) ? 'рен' : /ҫул$/i.exec(output) ? 'тан' : 'ран';
return output + affix;
},
- past : "%s каялла",
- s : "пĕр-ик çеккунт",
- m : "пĕр минут",
- mm : "%d минут",
- h : "пĕр сехет",
- hh : "%d сехет",
- d : "пĕр кун",
- dd : "%d кун",
- M : "пĕр уйăх",
- MM : "%d уйăх",
- y : "пĕр çул",
- yy : "%d çул"
+ past : '%s каялла',
+ s : 'пӗр-ик ҫеккунт',
+ m : 'пӗр минут',
+ mm : '%d минут',
+ h : 'пӗр сехет',
+ hh : '%d сехет',
+ d : 'пӗр кун',
+ dd : '%d кун',
+ M : 'пӗр уйӑх',
+ MM : '%d уйӑх',
+ y : 'пӗр ҫул',
+ yy : '%d ҫул'
},
- ordinal : '%d-мĕш',
+ ordinalParse: /\d{1,2}-мӗш/,
+ ordinal : '%d-мӗш',
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
});
-}));
+
+ return cv;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/cy.js b/rainloop/v/0.0.0/app/localization/moment/cy.js
index b47d7c275..9a43529cb 100644
--- a/rainloop/v/0.0.0/app/localization/moment/cy.js
+++ b/rainloop/v/0.0.0/app/localization/moment/cy.js
@@ -1,29 +1,30 @@
-// moment.js language configuration
-// language : Welsh (cy)
-// author : Robert Allen
+//! moment.js locale configuration
+//! locale : Welsh [cy]
+//! author : Robert Allen
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
- return moment.lang("cy", {
- months: "Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr".split("_"),
- monthsShort: "Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag".split("_"),
- weekdays: "Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn".split("_"),
- weekdaysShort: "Sul_Llun_Maw_Mer_Iau_Gwe_Sad".split("_"),
- weekdaysMin: "Su_Ll_Ma_Me_Ia_Gw_Sa".split("_"),
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
+
+
+ var cy = moment.defineLocale('cy', {
+ months: 'Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr'.split('_'),
+ monthsShort: 'Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag'.split('_'),
+ weekdays: 'Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn'.split('_'),
+ weekdaysShort: 'Sul_Llun_Maw_Mer_Iau_Gwe_Sad'.split('_'),
+ weekdaysMin: 'Su_Ll_Ma_Me_Ia_Gw_Sa'.split('_'),
+ weekdaysParseExact : true,
// time formats are the same as en-gb
longDateFormat: {
- LT: "HH:mm",
- L: "DD/MM/YYYY",
- LL: "D MMMM YYYY",
- LLL: "D MMMM YYYY LT",
- LLLL: "dddd, D MMMM YYYY LT"
+ LT: 'HH:mm',
+ LTS : 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm'
},
calendar: {
sameDay: '[Heddiw am] LT',
@@ -34,20 +35,21 @@
sameElse: 'L'
},
relativeTime: {
- future: "mewn %s",
- past: "%s yn àl",
- s: "ychydig eiliadau",
- m: "munud",
- mm: "%d munud",
- h: "awr",
- hh: "%d awr",
- d: "diwrnod",
- dd: "%d diwrnod",
- M: "mis",
- MM: "%d mis",
- y: "blwyddyn",
- yy: "%d flynedd"
+ future: 'mewn %s',
+ past: '%s yn ôl',
+ s: 'ychydig eiliadau',
+ m: 'munud',
+ mm: '%d munud',
+ h: 'awr',
+ hh: '%d awr',
+ d: 'diwrnod',
+ dd: '%d diwrnod',
+ M: 'mis',
+ MM: '%d mis',
+ y: 'blwyddyn',
+ yy: '%d flynedd'
},
+ ordinalParse: /\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,
// traditional ordinal numbers above 31 are not commonly used in colloquial Welsh
ordinal: function (number) {
var b = number,
@@ -56,7 +58,6 @@
'', 'af', 'il', 'ydd', 'ydd', 'ed', 'ed', 'ed', 'fed', 'fed', 'fed', // 1af to 10fed
'eg', 'fed', 'eg', 'eg', 'fed', 'eg', 'eg', 'fed', 'eg', 'fed' // 11eg to 20fed
];
-
if (b > 20) {
if (b === 40 || b === 50 || b === 60 || b === 80 || b === 100) {
output = 'fed'; // not 30ain, 70ain or 90ain
@@ -66,7 +67,6 @@
} else if (b > 0) {
output = lookup[b];
}
-
return number + output;
},
week : {
@@ -74,4 +74,7 @@
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
-}));
+
+ return cy;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/da.js b/rainloop/v/0.0.0/app/localization/moment/da.js
index 2fa8244c0..d5cbbdb34 100644
--- a/rainloop/v/0.0.0/app/localization/moment/da.js
+++ b/rainloop/v/0.0.0/app/localization/moment/da.js
@@ -1,28 +1,28 @@
-// moment.js language configuration
-// language : danish (da)
-// author : Ulrik Nielsen : https://github.com/mrbase
+//! moment.js locale configuration
+//! locale : Danish [da]
+//! author : Ulrik Nielsen : https://github.com/mrbase
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
- return moment.lang('da', {
- months : "januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december".split("_"),
- monthsShort : "jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),
- weekdays : "søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),
- weekdaysShort : "søn_man_tir_ons_tor_fre_lør".split("_"),
- weekdaysMin : "sø_ma_ti_on_to_fr_lø".split("_"),
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
+
+
+ var da = moment.defineLocale('da', {
+ months : 'januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december'.split('_'),
+ monthsShort : 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),
+ weekdays : 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),
+ weekdaysShort : 'søn_man_tir_ons_tor_fre_lør'.split('_'),
+ weekdaysMin : 'sø_ma_ti_on_to_fr_lø'.split('_'),
longDateFormat : {
- LT : "HH:mm",
- L : "DD/MM/YYYY",
- LL : "D MMMM YYYY",
- LLL : "D MMMM YYYY LT",
- LLLL : "dddd D. MMMM, YYYY LT"
+ LT : 'HH:mm',
+ LTS : 'HH:mm:ss',
+ L : 'DD/MM/YYYY',
+ LL : 'D. MMMM YYYY',
+ LLL : 'D. MMMM YYYY HH:mm',
+ LLLL : 'dddd [d.] D. MMMM YYYY HH:mm'
},
calendar : {
sameDay : '[I dag kl.] LT',
@@ -33,24 +33,28 @@
sameElse : 'L'
},
relativeTime : {
- future : "om %s",
- past : "%s siden",
- s : "få sekunder",
- m : "et minut",
- mm : "%d minutter",
- h : "en time",
- hh : "%d timer",
- d : "en dag",
- dd : "%d dage",
- M : "en måned",
- MM : "%d måneder",
- y : "et år",
- yy : "%d år"
+ future : 'om %s',
+ past : '%s siden',
+ s : 'få sekunder',
+ m : 'et minut',
+ mm : '%d minutter',
+ h : 'en time',
+ hh : '%d timer',
+ d : 'en dag',
+ dd : '%d dage',
+ M : 'en måned',
+ MM : '%d måneder',
+ y : 'et år',
+ yy : '%d år'
},
+ ordinalParse: /\d{1,2}\./,
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
-}));
+
+ return da;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/de.js b/rainloop/v/0.0.0/app/localization/moment/de.js
index 86cd26877..203dac910 100644
--- a/rainloop/v/0.0.0/app/localization/moment/de.js
+++ b/rainloop/v/0.0.0/app/localization/moment/de.js
@@ -1,17 +1,17 @@
-// moment.js language configuration
-// language : german (de)
-// author : lluchs : https://github.com/lluchs
-// author: Menelion Elensúle: https://github.com/Oire
+//! moment.js locale configuration
+//! locale : German [de]
+//! author : lluchs : https://github.com/lluchs
+//! author: Menelion Elensúle: https://github.com/Oire
+//! author : Mikolaj Dadela : https://github.com/mik01aj
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
+
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
function processRelativeTime(number, withoutSuffix, key, isFuture) {
var format = {
'm': ['eine Minute', 'einer Minute'],
@@ -26,35 +26,38 @@
return withoutSuffix ? format[key][0] : format[key][1];
}
- return moment.lang('de', {
- months : "Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),
- monthsShort : "Jan._Febr._Mrz._Apr._Mai_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),
- weekdays : "Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),
- weekdaysShort : "So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),
- weekdaysMin : "So_Mo_Di_Mi_Do_Fr_Sa".split("_"),
+ var de = moment.defineLocale('de', {
+ months : 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'),
+ monthsShort : 'Jan._Febr._Mrz._Apr._Mai_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split('_'),
+ monthsParseExact : true,
+ weekdays : 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'),
+ weekdaysShort : 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),
+ weekdaysMin : 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
+ weekdaysParseExact : true,
longDateFormat : {
- LT: "HH:mm [Uhr]",
- L : "DD.MM.YYYY",
- LL : "D. MMMM YYYY",
- LLL : "D. MMMM YYYY LT",
- LLLL : "dddd, D. MMMM YYYY LT"
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L : 'DD.MM.YYYY',
+ LL : 'D. MMMM YYYY',
+ LLL : 'D. MMMM YYYY HH:mm',
+ LLLL : 'dddd, D. MMMM YYYY HH:mm'
},
calendar : {
- sameDay: "[Heute um] LT",
- sameElse: "L",
- nextDay: '[Morgen um] LT',
- nextWeek: 'dddd [um] LT',
- lastDay: '[Gestern um] LT',
- lastWeek: '[letzten] dddd [um] LT'
+ sameDay: '[heute um] LT [Uhr]',
+ sameElse: 'L',
+ nextDay: '[morgen um] LT [Uhr]',
+ nextWeek: 'dddd [um] LT [Uhr]',
+ lastDay: '[gestern um] LT [Uhr]',
+ lastWeek: '[letzten] dddd [um] LT [Uhr]'
},
relativeTime : {
- future : "in %s",
- past : "vor %s",
- s : "ein paar Sekunden",
+ future : 'in %s',
+ past : 'vor %s',
+ s : 'ein paar Sekunden',
m : processRelativeTime,
- mm : "%d Minuten",
+ mm : '%d Minuten',
h : processRelativeTime,
- hh : "%d Stunden",
+ hh : '%d Stunden',
d : processRelativeTime,
dd : processRelativeTime,
M : processRelativeTime,
@@ -62,10 +65,14 @@
y : processRelativeTime,
yy : processRelativeTime
},
+ ordinalParse: /\d{1,2}\./,
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
-}));
+
+ return de;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/el.js b/rainloop/v/0.0.0/app/localization/moment/el.js
index e2a38cdb5..588cb235c 100644
--- a/rainloop/v/0.0.0/app/localization/moment/el.js
+++ b/rainloop/v/0.0.0/app/localization/moment/el.js
@@ -1,30 +1,33 @@
-// moment.js language configuration
-// language : modern greek (el)
-// author : Aggelos Karalias : https://github.com/mehiel
+//! moment.js locale configuration
+//! locale : Greek [el]
+//! author : Aggelos Karalias : https://github.com/mehiel
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
+
+ function isFunction(input) {
+ return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]';
}
-}(function (moment) {
- return moment.lang('el', {
- monthsNominativeEl : "Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος".split("_"),
- monthsGenitiveEl : "Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου".split("_"),
+
+
+ var el = moment.defineLocale('el', {
+ monthsNominativeEl : 'Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος'.split('_'),
+ monthsGenitiveEl : 'Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου'.split('_'),
months : function (momentToFormat, format) {
- if (/D/.test(format.substring(0, format.indexOf("MMMM")))) { // if there is a day number before 'MMMM'
+ if (/D/.test(format.substring(0, format.indexOf('MMMM')))) { // if there is a day number before 'MMMM'
return this._monthsGenitiveEl[momentToFormat.month()];
} else {
return this._monthsNominativeEl[momentToFormat.month()];
}
},
- monthsShort : "Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ".split("_"),
- weekdays : "Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο".split("_"),
- weekdaysShort : "Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ".split("_"),
- weekdaysMin : "Κυ_Δε_Τρ_Τε_Πε_Πα_Σα".split("_"),
+ monthsShort : 'Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ'.split('_'),
+ weekdays : 'Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο'.split('_'),
+ weekdaysShort : 'Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ'.split('_'),
+ weekdaysMin : 'Κυ_Δε_Τρ_Τε_Πε_Πα_Σα'.split('_'),
meridiem : function (hours, minutes, isLower) {
if (hours > 11) {
return isLower ? 'μμ' : 'ΜΜ';
@@ -32,19 +35,24 @@
return isLower ? 'πμ' : 'ΠΜ';
}
},
+ isPM : function (input) {
+ return ((input + '').toLowerCase()[0] === 'μ');
+ },
+ meridiemParse : /[ΠΜ]\.?Μ?\.?/i,
longDateFormat : {
- LT : "h:mm A",
- L : "DD/MM/YYYY",
- LL : "D MMMM YYYY",
- LLL : "D MMMM YYYY LT",
- LLLL : "dddd, D MMMM YYYY LT"
+ LT : 'h:mm A',
+ LTS : 'h:mm:ss A',
+ L : 'DD/MM/YYYY',
+ LL : 'D MMMM YYYY',
+ LLL : 'D MMMM YYYY h:mm A',
+ LLLL : 'dddd, D MMMM YYYY h:mm A'
},
calendarEl : {
sameDay : '[Σήμερα {}] LT',
nextDay : '[Αύριο {}] LT',
nextWeek : 'dddd [{}] LT',
lastDay : '[Χθες {}] LT',
- lastWeek : function() {
+ lastWeek : function () {
switch (this.day()) {
case 6:
return '[το προηγούμενο] dddd [{}] LT';
@@ -57,34 +65,34 @@
calendar : function (key, mom) {
var output = this._calendarEl[key],
hours = mom && mom.hours();
-
- if (typeof output === 'function') {
+ if (isFunction(output)) {
output = output.apply(mom);
}
-
- return output.replace("{}", (hours % 12 === 1 ? "στη" : "στις"));
+ return output.replace('{}', (hours % 12 === 1 ? 'στη' : 'στις'));
},
relativeTime : {
- future : "σε %s",
- past : "%s πριν",
- s : "δευτερόλεπτα",
- m : "ένα λεπτό",
- mm : "%d λεπτά",
- h : "μία ώρα",
- hh : "%d ώρες",
- d : "μία μέρα",
- dd : "%d μέρες",
- M : "ένας μήνας",
- MM : "%d μήνες",
- y : "ένας χρόνος",
- yy : "%d χρόνια"
- },
- ordinal : function (number) {
- return number + 'η';
+ future : 'σε %s',
+ past : '%s πριν',
+ s : 'λίγα δευτερόλεπτα',
+ m : 'ένα λεπτό',
+ mm : '%d λεπτά',
+ h : 'μία ώρα',
+ hh : '%d ώρες',
+ d : 'μία μέρα',
+ dd : '%d μέρες',
+ M : 'ένας μήνας',
+ MM : '%d μήνες',
+ y : 'ένας χρόνος',
+ yy : '%d χρόνια'
},
+ ordinalParse: /\d{1,2}η/,
+ ordinal: '%dη',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4st is the first week of the year.
}
});
-}));
+
+ return el;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/en-au.js b/rainloop/v/0.0.0/app/localization/moment/en-au.js
index 4d91e2569..92a2a636a 100644
--- a/rainloop/v/0.0.0/app/localization/moment/en-au.js
+++ b/rainloop/v/0.0.0/app/localization/moment/en-au.js
@@ -1,27 +1,27 @@
-// moment.js language configuration
-// language : australian english (en-au)
+//! moment.js locale configuration
+//! locale : English (Australia) [en-au]
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
- return moment.lang('en-au', {
- months : "January_February_March_April_May_June_July_August_September_October_November_December".split("_"),
- monthsShort : "Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),
- weekdays : "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),
- weekdaysShort : "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),
- weekdaysMin : "Su_Mo_Tu_We_Th_Fr_Sa".split("_"),
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
+
+
+ var en_au = moment.defineLocale('en-au', {
+ months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),
+ monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
+ weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
+ weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
+ weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
longDateFormat : {
- LT : "h:mm A",
- L : "DD/MM/YYYY",
- LL : "D MMMM YYYY",
- LLL : "D MMMM YYYY LT",
- LLLL : "dddd, D MMMM YYYY LT"
+ LT : 'h:mm A',
+ LTS : 'h:mm:ss A',
+ L : 'DD/MM/YYYY',
+ LL : 'D MMMM YYYY',
+ LLL : 'D MMMM YYYY h:mm A',
+ LLLL : 'dddd, D MMMM YYYY h:mm A'
},
calendar : {
sameDay : '[Today at] LT',
@@ -32,23 +32,24 @@
sameElse : 'L'
},
relativeTime : {
- future : "in %s",
- past : "%s ago",
- s : "a few seconds",
- m : "a minute",
- mm : "%d minutes",
- h : "an hour",
- hh : "%d hours",
- d : "a day",
- dd : "%d days",
- M : "a month",
- MM : "%d months",
- y : "a year",
- yy : "%d years"
+ future : 'in %s',
+ past : '%s ago',
+ s : 'a few seconds',
+ m : 'a minute',
+ mm : '%d minutes',
+ h : 'an hour',
+ hh : '%d hours',
+ d : 'a day',
+ dd : '%d days',
+ M : 'a month',
+ MM : '%d months',
+ y : 'a year',
+ yy : '%d years'
},
+ ordinalParse: /\d{1,2}(st|nd|rd|th)/,
ordinal : function (number) {
var b = number % 10,
- output = (~~ (number % 100 / 10) === 1) ? 'th' :
+ output = (~~(number % 100 / 10) === 1) ? 'th' :
(b === 1) ? 'st' :
(b === 2) ? 'nd' :
(b === 3) ? 'rd' : 'th';
@@ -59,4 +60,7 @@
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
-}));
+
+ return en_au;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/en-ca.js b/rainloop/v/0.0.0/app/localization/moment/en-ca.js
index a97e9f396..9ac521f9e 100644
--- a/rainloop/v/0.0.0/app/localization/moment/en-ca.js
+++ b/rainloop/v/0.0.0/app/localization/moment/en-ca.js
@@ -1,28 +1,28 @@
-// moment.js language configuration
-// language : canadian english (en-ca)
-// author : Jonathan Abourbih : https://github.com/jonbca
+//! moment.js locale configuration
+//! locale : English (Canada) [en-ca]
+//! author : Jonathan Abourbih : https://github.com/jonbca
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
- return moment.lang('en-ca', {
- months : "January_February_March_April_May_June_July_August_September_October_November_December".split("_"),
- monthsShort : "Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),
- weekdays : "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),
- weekdaysShort : "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),
- weekdaysMin : "Su_Mo_Tu_We_Th_Fr_Sa".split("_"),
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
+
+
+ var en_ca = moment.defineLocale('en-ca', {
+ months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),
+ monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
+ weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
+ weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
+ weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
longDateFormat : {
- LT : "h:mm A",
- L : "YYYY-MM-DD",
- LL : "D MMMM, YYYY",
- LLL : "D MMMM, YYYY LT",
- LLLL : "dddd, D MMMM, YYYY LT"
+ LT : 'h:mm A',
+ LTS : 'h:mm:ss A',
+ L : 'YYYY-MM-DD',
+ LL : 'MMMM D, YYYY',
+ LLL : 'MMMM D, YYYY h:mm A',
+ LLLL : 'dddd, MMMM D, YYYY h:mm A'
},
calendar : {
sameDay : '[Today at] LT',
@@ -33,27 +33,31 @@
sameElse : 'L'
},
relativeTime : {
- future : "in %s",
- past : "%s ago",
- s : "a few seconds",
- m : "a minute",
- mm : "%d minutes",
- h : "an hour",
- hh : "%d hours",
- d : "a day",
- dd : "%d days",
- M : "a month",
- MM : "%d months",
- y : "a year",
- yy : "%d years"
+ future : 'in %s',
+ past : '%s ago',
+ s : 'a few seconds',
+ m : 'a minute',
+ mm : '%d minutes',
+ h : 'an hour',
+ hh : '%d hours',
+ d : 'a day',
+ dd : '%d days',
+ M : 'a month',
+ MM : '%d months',
+ y : 'a year',
+ yy : '%d years'
},
+ ordinalParse: /\d{1,2}(st|nd|rd|th)/,
ordinal : function (number) {
var b = number % 10,
- output = (~~ (number % 100 / 10) === 1) ? 'th' :
+ output = (~~(number % 100 / 10) === 1) ? 'th' :
(b === 1) ? 'st' :
(b === 2) ? 'nd' :
(b === 3) ? 'rd' : 'th';
return number + output;
}
});
-}));
+
+ return en_ca;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/en-gb.js b/rainloop/v/0.0.0/app/localization/moment/en-gb.js
index 3a7907be5..843d2e585 100644
--- a/rainloop/v/0.0.0/app/localization/moment/en-gb.js
+++ b/rainloop/v/0.0.0/app/localization/moment/en-gb.js
@@ -1,28 +1,28 @@
-// moment.js language configuration
-// language : great britain english (en-gb)
-// author : Chris Gedrim : https://github.com/chrisgedrim
+//! moment.js locale configuration
+//! locale : English (United Kingdom) [en-gb]
+//! author : Chris Gedrim : https://github.com/chrisgedrim
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
- return moment.lang('en-gb', {
- months : "January_February_March_April_May_June_July_August_September_October_November_December".split("_"),
- monthsShort : "Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),
- weekdays : "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),
- weekdaysShort : "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),
- weekdaysMin : "Su_Mo_Tu_We_Th_Fr_Sa".split("_"),
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
+
+
+ var en_gb = moment.defineLocale('en-gb', {
+ months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),
+ monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
+ weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
+ weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
+ weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
longDateFormat : {
- LT : "HH:mm",
- L : "DD/MM/YYYY",
- LL : "D MMMM YYYY",
- LLL : "D MMMM YYYY LT",
- LLLL : "dddd, D MMMM YYYY LT"
+ LT : 'HH:mm',
+ LTS : 'HH:mm:ss',
+ L : 'DD/MM/YYYY',
+ LL : 'D MMMM YYYY',
+ LLL : 'D MMMM YYYY HH:mm',
+ LLLL : 'dddd, D MMMM YYYY HH:mm'
},
calendar : {
sameDay : '[Today at] LT',
@@ -33,23 +33,24 @@
sameElse : 'L'
},
relativeTime : {
- future : "in %s",
- past : "%s ago",
- s : "a few seconds",
- m : "a minute",
- mm : "%d minutes",
- h : "an hour",
- hh : "%d hours",
- d : "a day",
- dd : "%d days",
- M : "a month",
- MM : "%d months",
- y : "a year",
- yy : "%d years"
+ future : 'in %s',
+ past : '%s ago',
+ s : 'a few seconds',
+ m : 'a minute',
+ mm : '%d minutes',
+ h : 'an hour',
+ hh : '%d hours',
+ d : 'a day',
+ dd : '%d days',
+ M : 'a month',
+ MM : '%d months',
+ y : 'a year',
+ yy : '%d years'
},
+ ordinalParse: /\d{1,2}(st|nd|rd|th)/,
ordinal : function (number) {
var b = number % 10,
- output = (~~ (number % 100 / 10) === 1) ? 'th' :
+ output = (~~(number % 100 / 10) === 1) ? 'th' :
(b === 1) ? 'st' :
(b === 2) ? 'nd' :
(b === 3) ? 'rd' : 'th';
@@ -60,4 +61,7 @@
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
-}));
+
+ return en_gb;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/eo.js b/rainloop/v/0.0.0/app/localization/moment/eo.js
index 03b1abff1..5b21f8242 100644
--- a/rainloop/v/0.0.0/app/localization/moment/eo.js
+++ b/rainloop/v/0.0.0/app/localization/moment/eo.js
@@ -1,30 +1,34 @@
-// moment.js language configuration
-// language : esperanto (eo)
-// author : Colin Dean : https://github.com/colindean
-// komento: Mi estas malcerta se mi korekte traktis akuzativojn en tiu traduko.
-// Se ne, bonvolu korekti kaj avizi min por ke mi povas lerni!
+//! moment.js locale configuration
+//! locale : Esperanto [eo]
+//! author : Colin Dean : https://github.com/colindean
+//! komento: Mi estas malcerta se mi korekte traktis akuzativojn en tiu traduko.
+//! Se ne, bonvolu korekti kaj avizi min por ke mi povas lerni!
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
- return moment.lang('eo', {
- months : "januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro".split("_"),
- monthsShort : "jan_feb_mar_apr_maj_jun_jul_aŭg_sep_okt_nov_dec".split("_"),
- weekdays : "Dimanĉo_Lundo_Mardo_Merkredo_Ĵaŭdo_Vendredo_Sabato".split("_"),
- weekdaysShort : "Dim_Lun_Mard_Merk_Ĵaŭ_Ven_Sab".split("_"),
- weekdaysMin : "Di_Lu_Ma_Me_Ĵa_Ve_Sa".split("_"),
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
+
+
+ var eo = moment.defineLocale('eo', {
+ months : 'januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro'.split('_'),
+ monthsShort : 'jan_feb_mar_apr_maj_jun_jul_aŭg_sep_okt_nov_dec'.split('_'),
+ weekdays : 'Dimanĉo_Lundo_Mardo_Merkredo_Ĵaŭdo_Vendredo_Sabato'.split('_'),
+ weekdaysShort : 'Dim_Lun_Mard_Merk_Ĵaŭ_Ven_Sab'.split('_'),
+ weekdaysMin : 'Di_Lu_Ma_Me_Ĵa_Ve_Sa'.split('_'),
longDateFormat : {
- LT : "HH:mm",
- L : "YYYY-MM-DD",
- LL : "D[-an de] MMMM, YYYY",
- LLL : "D[-an de] MMMM, YYYY LT",
- LLLL : "dddd, [la] D[-an de] MMMM, YYYY LT"
+ LT : 'HH:mm',
+ LTS : 'HH:mm:ss',
+ L : 'YYYY-MM-DD',
+ LL : 'D[-an de] MMMM, YYYY',
+ LLL : 'D[-an de] MMMM, YYYY HH:mm',
+ LLLL : 'dddd, [la] D[-an de] MMMM, YYYY HH:mm'
+ },
+ meridiemParse: /[ap]\.t\.m/i,
+ isPM: function (input) {
+ return input.charAt(0).toLowerCase() === 'p';
},
meridiem : function (hours, minutes, isLower) {
if (hours > 11) {
@@ -42,24 +46,28 @@
sameElse : 'L'
},
relativeTime : {
- future : "je %s",
- past : "antaŭ %s",
- s : "sekundoj",
- m : "minuto",
- mm : "%d minutoj",
- h : "horo",
- hh : "%d horoj",
- d : "tago",//ne 'diurno', ĉar estas uzita por proksimumo
- dd : "%d tagoj",
- M : "monato",
- MM : "%d monatoj",
- y : "jaro",
- yy : "%d jaroj"
+ future : 'je %s',
+ past : 'antaŭ %s',
+ s : 'sekundoj',
+ m : 'minuto',
+ mm : '%d minutoj',
+ h : 'horo',
+ hh : '%d horoj',
+ d : 'tago',//ne 'diurno', ĉar estas uzita por proksimumo
+ dd : '%d tagoj',
+ M : 'monato',
+ MM : '%d monatoj',
+ y : 'jaro',
+ yy : '%d jaroj'
},
- ordinal : "%da",
+ ordinalParse: /\d{1,2}a/,
+ ordinal : '%da',
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
});
-}));
+
+ return eo;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/es.js b/rainloop/v/0.0.0/app/localization/moment/es.js
index 67432ca3e..cd819056e 100644
--- a/rainloop/v/0.0.0/app/localization/moment/es.js
+++ b/rainloop/v/0.0.0/app/localization/moment/es.js
@@ -1,21 +1,20 @@
-// moment.js language configuration
-// language : spanish (es)
-// author : Julio Napurí : https://github.com/julionc
+//! moment.js locale configuration
+//! locale : Spanish [es]
+//! author : Julio Napurí : https://github.com/julionc
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
- var monthsShortDot = "ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),
- monthsShort = "ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_");
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
- return moment.lang('es', {
- months : "enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),
+
+ var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_'),
+ monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_');
+
+ var es = moment.defineLocale('es', {
+ months : 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),
monthsShort : function (m, format) {
if (/-MMM-/.test(format)) {
return monthsShort[m.month()];
@@ -23,15 +22,18 @@
return monthsShortDot[m.month()];
}
},
- weekdays : "domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),
- weekdaysShort : "dom._lun._mar._mié._jue._vie._sáb.".split("_"),
- weekdaysMin : "Do_Lu_Ma_Mi_Ju_Vi_Sá".split("_"),
+ monthsParseExact : true,
+ weekdays : 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
+ weekdaysShort : 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
+ weekdaysMin : 'do_lu_ma_mi_ju_vi_sá'.split('_'),
+ weekdaysParseExact : true,
longDateFormat : {
- LT : "H:mm",
- L : "DD/MM/YYYY",
- LL : "D [de] MMMM [del] YYYY",
- LLL : "D [de] MMMM [del] YYYY LT",
- LLLL : "dddd, D [de] MMMM [del] YYYY LT"
+ LT : 'H:mm',
+ LTS : 'H:mm:ss',
+ L : 'DD/MM/YYYY',
+ LL : 'D [de] MMMM [de] YYYY',
+ LLL : 'D [de] MMMM [de] YYYY H:mm',
+ LLLL : 'dddd, D [de] MMMM [de] YYYY H:mm'
},
calendar : {
sameDay : function () {
@@ -52,24 +54,28 @@
sameElse : 'L'
},
relativeTime : {
- future : "en %s",
- past : "hace %s",
- s : "unos segundos",
- m : "un minuto",
- mm : "%d minutos",
- h : "una hora",
- hh : "%d horas",
- d : "un día",
- dd : "%d días",
- M : "un mes",
- MM : "%d meses",
- y : "un año",
- yy : "%d años"
+ future : 'en %s',
+ past : 'hace %s',
+ s : 'unos segundos',
+ m : 'un minuto',
+ mm : '%d minutos',
+ h : 'una hora',
+ hh : '%d horas',
+ d : 'un día',
+ dd : '%d días',
+ M : 'un mes',
+ MM : '%d meses',
+ y : 'un año',
+ yy : '%d años'
},
+ ordinalParse : /\d{1,2}º/,
ordinal : '%dº',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
-}));
+
+ return es;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/et.js b/rainloop/v/0.0.0/app/localization/moment/et.js
index fb410ef44..97fd945ad 100644
--- a/rainloop/v/0.0.0/app/localization/moment/et.js
+++ b/rainloop/v/0.0.0/app/localization/moment/et.js
@@ -1,17 +1,16 @@
-// moment.js language configuration
-// language : estonian (et)
-// author : Henry Kehlmann : https://github.com/madhenry
-// improvements : Illimar Tambek : https://github.com/ragulka
+//! moment.js locale configuration
+//! locale : Estonian [et]
+//! author : Henry Kehlmann : https://github.com/madhenry
+//! improvements : Illimar Tambek : https://github.com/ragulka
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
+
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
function processRelativeTime(number, withoutSuffix, key, isFuture) {
var format = {
's' : ['mõne sekundi', 'mõni sekund', 'paar sekundit'],
@@ -31,18 +30,19 @@
return isFuture ? format[key][0] : format[key][1];
}
- return moment.lang('et', {
- months : "jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember".split("_"),
- monthsShort : "jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets".split("_"),
- weekdays : "pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev".split("_"),
- weekdaysShort : "P_E_T_K_N_R_L".split("_"),
- weekdaysMin : "P_E_T_K_N_R_L".split("_"),
+ var et = moment.defineLocale('et', {
+ months : 'jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember'.split('_'),
+ monthsShort : 'jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets'.split('_'),
+ weekdays : 'pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev'.split('_'),
+ weekdaysShort : 'P_E_T_K_N_R_L'.split('_'),
+ weekdaysMin : 'P_E_T_K_N_R_L'.split('_'),
longDateFormat : {
- LT : "H:mm",
- L : "DD.MM.YYYY",
- LL : "D. MMMM YYYY",
- LLL : "D. MMMM YYYY LT",
- LLLL : "dddd, D. MMMM YYYY LT"
+ LT : 'H:mm',
+ LTS : 'H:mm:ss',
+ L : 'DD.MM.YYYY',
+ LL : 'D. MMMM YYYY',
+ LLL : 'D. MMMM YYYY H:mm',
+ LLLL : 'dddd, D. MMMM YYYY H:mm'
},
calendar : {
sameDay : '[Täna,] LT',
@@ -53,8 +53,8 @@
sameElse : 'L'
},
relativeTime : {
- future : "%s pärast",
- past : "%s tagasi",
+ future : '%s pärast',
+ past : '%s tagasi',
s : processRelativeTime,
m : processRelativeTime,
mm : processRelativeTime,
@@ -67,10 +67,14 @@
y : processRelativeTime,
yy : processRelativeTime
},
+ ordinalParse: /\d{1,2}\./,
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
-}));
+
+ return et;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/eu.js b/rainloop/v/0.0.0/app/localization/moment/eu.js
index 659b739bf..15d7dd3e6 100644
--- a/rainloop/v/0.0.0/app/localization/moment/eu.js
+++ b/rainloop/v/0.0.0/app/localization/moment/eu.js
@@ -1,32 +1,34 @@
-// moment.js language configuration
-// language : euskara (eu)
-// author : Eneko Illarramendi : https://github.com/eillarra
+//! moment.js locale configuration
+//! locale : Basque [eu]
+//! author : Eneko Illarramendi : https://github.com/eillarra
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
- return moment.lang('eu', {
- months : "urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua".split("_"),
- monthsShort : "urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.".split("_"),
- weekdays : "igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata".split("_"),
- weekdaysShort : "ig._al._ar._az._og._ol._lr.".split("_"),
- weekdaysMin : "ig_al_ar_az_og_ol_lr".split("_"),
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
+
+
+ var eu = moment.defineLocale('eu', {
+ months : 'urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua'.split('_'),
+ monthsShort : 'urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.'.split('_'),
+ monthsParseExact : true,
+ weekdays : 'igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata'.split('_'),
+ weekdaysShort : 'ig._al._ar._az._og._ol._lr.'.split('_'),
+ weekdaysMin : 'ig_al_ar_az_og_ol_lr'.split('_'),
+ weekdaysParseExact : true,
longDateFormat : {
- LT : "HH:mm",
- L : "YYYY-MM-DD",
- LL : "YYYY[ko] MMMM[ren] D[a]",
- LLL : "YYYY[ko] MMMM[ren] D[a] LT",
- LLLL : "dddd, YYYY[ko] MMMM[ren] D[a] LT",
- l : "YYYY-M-D",
- ll : "YYYY[ko] MMM D[a]",
- lll : "YYYY[ko] MMM D[a] LT",
- llll : "ddd, YYYY[ko] MMM D[a] LT"
+ LT : 'HH:mm',
+ LTS : 'HH:mm:ss',
+ L : 'YYYY-MM-DD',
+ LL : 'YYYY[ko] MMMM[ren] D[a]',
+ LLL : 'YYYY[ko] MMMM[ren] D[a] HH:mm',
+ LLLL : 'dddd, YYYY[ko] MMMM[ren] D[a] HH:mm',
+ l : 'YYYY-M-D',
+ ll : 'YYYY[ko] MMM D[a]',
+ lll : 'YYYY[ko] MMM D[a] HH:mm',
+ llll : 'ddd, YYYY[ko] MMM D[a] HH:mm'
},
calendar : {
sameDay : '[gaur] LT[etan]',
@@ -37,24 +39,28 @@
sameElse : 'L'
},
relativeTime : {
- future : "%s barru",
- past : "duela %s",
- s : "segundo batzuk",
- m : "minutu bat",
- mm : "%d minutu",
- h : "ordu bat",
- hh : "%d ordu",
- d : "egun bat",
- dd : "%d egun",
- M : "hilabete bat",
- MM : "%d hilabete",
- y : "urte bat",
- yy : "%d urte"
+ future : '%s barru',
+ past : 'duela %s',
+ s : 'segundo batzuk',
+ m : 'minutu bat',
+ mm : '%d minutu',
+ h : 'ordu bat',
+ hh : '%d ordu',
+ d : 'egun bat',
+ dd : '%d egun',
+ M : 'hilabete bat',
+ MM : '%d hilabete',
+ y : 'urte bat',
+ yy : '%d urte'
},
+ ordinalParse: /\d{1,2}\./,
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
});
-}));
+
+ return eu;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/fa.js b/rainloop/v/0.0.0/app/localization/moment/fa.js
index 4a690c407..535174beb 100644
--- a/rainloop/v/0.0.0/app/localization/moment/fa.js
+++ b/rainloop/v/0.0.0/app/localization/moment/fa.js
@@ -1,16 +1,15 @@
-// moment.js language configuration
-// language : Persian Language
-// author : Ebrahim Byagowi : https://github.com/ebraminio
+//! moment.js locale configuration
+//! locale : Persian [fa]
+//! author : Ebrahim Byagowi : https://github.com/ebraminio
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
+
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
var symbolMap = {
'1': '۱',
'2': '۲',
@@ -35,24 +34,30 @@
'۰': '0'
};
- return moment.lang('fa', {
+ var fa = moment.defineLocale('fa', {
months : 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split('_'),
monthsShort : 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split('_'),
weekdays : 'یک\u200cشنبه_دوشنبه_سه\u200cشنبه_چهارشنبه_پنج\u200cشنبه_جمعه_شنبه'.split('_'),
weekdaysShort : 'یک\u200cشنبه_دوشنبه_سه\u200cشنبه_چهارشنبه_پنج\u200cشنبه_جمعه_شنبه'.split('_'),
weekdaysMin : 'ی_د_س_چ_پ_ج_ش'.split('_'),
+ weekdaysParseExact : true,
longDateFormat : {
LT : 'HH:mm',
+ LTS : 'HH:mm:ss',
L : 'DD/MM/YYYY',
LL : 'D MMMM YYYY',
- LLL : 'D MMMM YYYY LT',
- LLLL : 'dddd, D MMMM YYYY LT'
+ LLL : 'D MMMM YYYY HH:mm',
+ LLLL : 'dddd, D MMMM YYYY HH:mm'
+ },
+ meridiemParse: /قبل از ظهر|بعد از ظهر/,
+ isPM: function (input) {
+ return /بعد از ظهر/.test(input);
},
meridiem : function (hour, minute, isLower) {
if (hour < 12) {
- return "قبل از ظهر";
+ return 'قبل از ظهر';
} else {
- return "بعد از ظهر";
+ return 'بعد از ظهر';
}
},
calendar : {
@@ -88,10 +93,14 @@
return symbolMap[match];
}).replace(/,/g, '،');
},
+ ordinalParse: /\d{1,2}م/,
ordinal : '%dم',
week : {
dow : 6, // Saturday is the first day of the week.
doy : 12 // The week that contains Jan 1st is the first week of the year.
}
});
-}));
+
+ return fa;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/fi.js b/rainloop/v/0.0.0/app/localization/moment/fi.js
index 49f477c08..ee93848c7 100644
--- a/rainloop/v/0.0.0/app/localization/moment/fi.js
+++ b/rainloop/v/0.0.0/app/localization/moment/fi.js
@@ -1,75 +1,75 @@
-// moment.js language configuration
-// language : finnish (fi)
-// author : Tarmo Aidantausta : https://github.com/bleadof
+//! moment.js locale configuration
+//! locale : Finnish [fi]
+//! author : Tarmo Aidantausta : https://github.com/bleadof
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
+
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
var numbersPast = 'nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän'.split(' '),
- numbersFuture = ['nolla', 'yhden', 'kahden', 'kolmen', 'neljän', 'viiden', 'kuuden',
- numbersPast[7], numbersPast[8], numbersPast[9]];
-
+ numbersFuture = [
+ 'nolla', 'yhden', 'kahden', 'kolmen', 'neljän', 'viiden', 'kuuden',
+ numbersPast[7], numbersPast[8], numbersPast[9]
+ ];
function translate(number, withoutSuffix, key, isFuture) {
- var result = "";
+ var result = '';
switch (key) {
- case 's':
- return isFuture ? 'muutaman sekunnin' : 'muutama sekunti';
- case 'm':
- return isFuture ? 'minuutin' : 'minuutti';
- case 'mm':
- result = isFuture ? 'minuutin' : 'minuuttia';
- break;
- case 'h':
- return isFuture ? 'tunnin' : 'tunti';
- case 'hh':
- result = isFuture ? 'tunnin' : 'tuntia';
- break;
- case 'd':
- return isFuture ? 'päivän' : 'päivä';
- case 'dd':
- result = isFuture ? 'päivän' : 'päivää';
- break;
- case 'M':
- return isFuture ? 'kuukauden' : 'kuukausi';
- case 'MM':
- result = isFuture ? 'kuukauden' : 'kuukautta';
- break;
- case 'y':
- return isFuture ? 'vuoden' : 'vuosi';
- case 'yy':
- result = isFuture ? 'vuoden' : 'vuotta';
- break;
+ case 's':
+ return isFuture ? 'muutaman sekunnin' : 'muutama sekunti';
+ case 'm':
+ return isFuture ? 'minuutin' : 'minuutti';
+ case 'mm':
+ result = isFuture ? 'minuutin' : 'minuuttia';
+ break;
+ case 'h':
+ return isFuture ? 'tunnin' : 'tunti';
+ case 'hh':
+ result = isFuture ? 'tunnin' : 'tuntia';
+ break;
+ case 'd':
+ return isFuture ? 'päivän' : 'päivä';
+ case 'dd':
+ result = isFuture ? 'päivän' : 'päivää';
+ break;
+ case 'M':
+ return isFuture ? 'kuukauden' : 'kuukausi';
+ case 'MM':
+ result = isFuture ? 'kuukauden' : 'kuukautta';
+ break;
+ case 'y':
+ return isFuture ? 'vuoden' : 'vuosi';
+ case 'yy':
+ result = isFuture ? 'vuoden' : 'vuotta';
+ break;
}
- result = verbalNumber(number, isFuture) + " " + result;
+ result = verbalNumber(number, isFuture) + ' ' + result;
return result;
}
-
function verbalNumber(number, isFuture) {
return number < 10 ? (isFuture ? numbersFuture[number] : numbersPast[number]) : number;
}
- return moment.lang('fi', {
- months : "tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),
- monthsShort : "tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu".split("_"),
- weekdays : "sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),
- weekdaysShort : "su_ma_ti_ke_to_pe_la".split("_"),
- weekdaysMin : "su_ma_ti_ke_to_pe_la".split("_"),
+ var fi = moment.defineLocale('fi', {
+ months : 'tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu'.split('_'),
+ monthsShort : 'tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu'.split('_'),
+ weekdays : 'sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai'.split('_'),
+ weekdaysShort : 'su_ma_ti_ke_to_pe_la'.split('_'),
+ weekdaysMin : 'su_ma_ti_ke_to_pe_la'.split('_'),
longDateFormat : {
- LT : "HH.mm",
- L : "DD.MM.YYYY",
- LL : "Do MMMM[ta] YYYY",
- LLL : "Do MMMM[ta] YYYY, [klo] LT",
- LLLL : "dddd, Do MMMM[ta] YYYY, [klo] LT",
- l : "D.M.YYYY",
- ll : "Do MMM YYYY",
- lll : "Do MMM YYYY, [klo] LT",
- llll : "ddd, Do MMM YYYY, [klo] LT"
+ LT : 'HH.mm',
+ LTS : 'HH.mm.ss',
+ L : 'DD.MM.YYYY',
+ LL : 'Do MMMM[ta] YYYY',
+ LLL : 'Do MMMM[ta] YYYY, [klo] HH.mm',
+ LLLL : 'dddd, Do MMMM[ta] YYYY, [klo] HH.mm',
+ l : 'D.M.YYYY',
+ ll : 'Do MMM YYYY',
+ lll : 'Do MMM YYYY, [klo] HH.mm',
+ llll : 'ddd, Do MMM YYYY, [klo] HH.mm'
},
calendar : {
sameDay : '[tänään] [klo] LT',
@@ -80,8 +80,8 @@
sameElse : 'L'
},
relativeTime : {
- future : "%s päästä",
- past : "%s sitten",
+ future : '%s päästä',
+ past : '%s sitten',
s : translate,
m : translate,
mm : translate,
@@ -94,10 +94,14 @@
y : translate,
yy : translate
},
- ordinal : "%d.",
+ ordinalParse: /\d{1,2}\./,
+ ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
-}));
+
+ return fi;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/fo.js b/rainloop/v/0.0.0/app/localization/moment/fo.js
index 2f1cbb815..93567e447 100644
--- a/rainloop/v/0.0.0/app/localization/moment/fo.js
+++ b/rainloop/v/0.0.0/app/localization/moment/fo.js
@@ -1,28 +1,28 @@
-// moment.js language configuration
-// language : faroese (fo)
-// author : Ragnar Johannesen : https://github.com/ragnar123
+//! moment.js locale configuration
+//! locale : Faroese [fo]
+//! author : Ragnar Johannesen : https://github.com/ragnar123
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
- return moment.lang('fo', {
- months : "januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember".split("_"),
- monthsShort : "jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),
- weekdays : "sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur".split("_"),
- weekdaysShort : "sun_mán_týs_mik_hós_frí_ley".split("_"),
- weekdaysMin : "su_má_tý_mi_hó_fr_le".split("_"),
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
+
+
+ var fo = moment.defineLocale('fo', {
+ months : 'januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember'.split('_'),
+ monthsShort : 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'),
+ weekdays : 'sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur'.split('_'),
+ weekdaysShort : 'sun_mán_týs_mik_hós_frí_ley'.split('_'),
+ weekdaysMin : 'su_má_tý_mi_hó_fr_le'.split('_'),
longDateFormat : {
- LT : "HH:mm",
- L : "DD/MM/YYYY",
- LL : "D MMMM YYYY",
- LLL : "D MMMM YYYY LT",
- LLLL : "dddd D. MMMM, YYYY LT"
+ LT : 'HH:mm',
+ LTS : 'HH:mm:ss',
+ L : 'DD/MM/YYYY',
+ LL : 'D MMMM YYYY',
+ LLL : 'D MMMM YYYY HH:mm',
+ LLLL : 'dddd D. MMMM, YYYY HH:mm'
},
calendar : {
sameDay : '[Í dag kl.] LT',
@@ -33,24 +33,28 @@
sameElse : 'L'
},
relativeTime : {
- future : "um %s",
- past : "%s síðani",
- s : "fá sekund",
- m : "ein minutt",
- mm : "%d minuttir",
- h : "ein tími",
- hh : "%d tímar",
- d : "ein dagur",
- dd : "%d dagar",
- M : "ein mánaði",
- MM : "%d mánaðir",
- y : "eitt ár",
- yy : "%d ár"
+ future : 'um %s',
+ past : '%s síðani',
+ s : 'fá sekund',
+ m : 'ein minutt',
+ mm : '%d minuttir',
+ h : 'ein tími',
+ hh : '%d tímar',
+ d : 'ein dagur',
+ dd : '%d dagar',
+ M : 'ein mánaði',
+ MM : '%d mánaðir',
+ y : 'eitt ár',
+ yy : '%d ár'
},
+ ordinalParse: /\d{1,2}\./,
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
-}));
+
+ return fo;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/fr-ca.js b/rainloop/v/0.0.0/app/localization/moment/fr-ca.js
index 3280d7945..6ec487bd4 100644
--- a/rainloop/v/0.0.0/app/localization/moment/fr-ca.js
+++ b/rainloop/v/0.0.0/app/localization/moment/fr-ca.js
@@ -1,31 +1,33 @@
-// moment.js language configuration
-// language : canadian french (fr-ca)
-// author : Jonathan Abourbih : https://github.com/jonbca
+//! moment.js locale configuration
+//! locale : French (Canada) [fr-ca]
+//! author : Jonathan Abourbih : https://github.com/jonbca
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
- return moment.lang('fr-ca', {
- months : "janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),
- monthsShort : "janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),
- weekdays : "dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),
- weekdaysShort : "dim._lun._mar._mer._jeu._ven._sam.".split("_"),
- weekdaysMin : "Di_Lu_Ma_Me_Je_Ve_Sa".split("_"),
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
+
+
+ var fr_ca = moment.defineLocale('fr-ca', {
+ months : 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'),
+ monthsShort : 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'),
+ monthsParseExact : true,
+ weekdays : 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),
+ weekdaysShort : 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),
+ weekdaysMin : 'Di_Lu_Ma_Me_Je_Ve_Sa'.split('_'),
+ weekdaysParseExact : true,
longDateFormat : {
- LT : "HH:mm",
- L : "YYYY-MM-DD",
- LL : "D MMMM YYYY",
- LLL : "D MMMM YYYY LT",
- LLLL : "dddd D MMMM YYYY LT"
+ LT : 'HH:mm',
+ LTS : 'HH:mm:ss',
+ L : 'YYYY-MM-DD',
+ LL : 'D MMMM YYYY',
+ LLL : 'D MMMM YYYY HH:mm',
+ LLLL : 'dddd D MMMM YYYY HH:mm'
},
calendar : {
- sameDay: "[Aujourd'hui à] LT",
+ sameDay: '[Aujourd\'hui à] LT',
nextDay: '[Demain à] LT',
nextWeek: 'dddd [à] LT',
lastDay: '[Hier à] LT',
@@ -33,22 +35,26 @@
sameElse: 'L'
},
relativeTime : {
- future : "dans %s",
- past : "il y a %s",
- s : "quelques secondes",
- m : "une minute",
- mm : "%d minutes",
- h : "une heure",
- hh : "%d heures",
- d : "un jour",
- dd : "%d jours",
- M : "un mois",
- MM : "%d mois",
- y : "un an",
- yy : "%d ans"
+ future : 'dans %s',
+ past : 'il y a %s',
+ s : 'quelques secondes',
+ m : 'une minute',
+ mm : '%d minutes',
+ h : 'une heure',
+ hh : '%d heures',
+ d : 'un jour',
+ dd : '%d jours',
+ M : 'un mois',
+ MM : '%d mois',
+ y : 'un an',
+ yy : '%d ans'
},
+ ordinalParse: /\d{1,2}(er|e)/,
ordinal : function (number) {
- return number + (number === 1 ? 'er' : '');
+ return number + (number === 1 ? 'er' : 'e');
}
});
-}));
+
+ return fr_ca;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/fr.js b/rainloop/v/0.0.0/app/localization/moment/fr.js
index 6b3dc526e..90662e2cc 100644
--- a/rainloop/v/0.0.0/app/localization/moment/fr.js
+++ b/rainloop/v/0.0.0/app/localization/moment/fr.js
@@ -1,31 +1,33 @@
-// moment.js language configuration
-// language : french (fr)
-// author : John Fischer : https://github.com/jfroffice
+//! moment.js locale configuration
+//! locale : French [fr]
+//! author : John Fischer : https://github.com/jfroffice
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
- return moment.lang('fr', {
- months : "janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),
- monthsShort : "janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),
- weekdays : "dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),
- weekdaysShort : "dim._lun._mar._mer._jeu._ven._sam.".split("_"),
- weekdaysMin : "Di_Lu_Ma_Me_Je_Ve_Sa".split("_"),
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
+
+
+ var fr = moment.defineLocale('fr', {
+ months : 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'),
+ monthsShort : 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'),
+ monthsParseExact : true,
+ weekdays : 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),
+ weekdaysShort : 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),
+ weekdaysMin : 'Di_Lu_Ma_Me_Je_Ve_Sa'.split('_'),
+ weekdaysParseExact : true,
longDateFormat : {
- LT : "HH:mm",
- L : "DD/MM/YYYY",
- LL : "D MMMM YYYY",
- LLL : "D MMMM YYYY LT",
- LLLL : "dddd D MMMM YYYY LT"
+ LT : 'HH:mm',
+ LTS : 'HH:mm:ss',
+ L : 'DD/MM/YYYY',
+ LL : 'D MMMM YYYY',
+ LLL : 'D MMMM YYYY HH:mm',
+ LLLL : 'dddd D MMMM YYYY HH:mm'
},
calendar : {
- sameDay: "[Aujourd'hui à] LT",
+ sameDay: '[Aujourd\'hui à] LT',
nextDay: '[Demain à] LT',
nextWeek: 'dddd [à] LT',
lastDay: '[Hier à] LT',
@@ -33,20 +35,21 @@
sameElse: 'L'
},
relativeTime : {
- future : "dans %s",
- past : "il y a %s",
- s : "quelques secondes",
- m : "une minute",
- mm : "%d minutes",
- h : "une heure",
- hh : "%d heures",
- d : "un jour",
- dd : "%d jours",
- M : "un mois",
- MM : "%d mois",
- y : "un an",
- yy : "%d ans"
+ future : 'dans %s',
+ past : 'il y a %s',
+ s : 'quelques secondes',
+ m : 'une minute',
+ mm : '%d minutes',
+ h : 'une heure',
+ hh : '%d heures',
+ d : 'un jour',
+ dd : '%d jours',
+ M : 'un mois',
+ MM : '%d mois',
+ y : 'un an',
+ yy : '%d ans'
},
+ ordinalParse: /\d{1,2}(er|)/,
ordinal : function (number) {
return number + (number === 1 ? 'er' : '');
},
@@ -55,4 +58,7 @@
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
-}));
+
+ return fr;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/gl.js b/rainloop/v/0.0.0/app/localization/moment/gl.js
index 8b141278e..9fdc236ae 100644
--- a/rainloop/v/0.0.0/app/localization/moment/gl.js
+++ b/rainloop/v/0.0.0/app/localization/moment/gl.js
@@ -1,28 +1,30 @@
-// moment.js language configuration
-// language : galician (gl)
-// author : Juan G. Hurtado : https://github.com/juanghurtado
+//! moment.js locale configuration
+//! locale : Galician [gl]
+//! author : Juan G. Hurtado : https://github.com/juanghurtado
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
- return moment.lang('gl', {
- months : "Xaneiro_Febreiro_Marzo_Abril_Maio_Xuño_Xullo_Agosto_Setembro_Outubro_Novembro_Decembro".split("_"),
- monthsShort : "Xan._Feb._Mar._Abr._Mai._Xuñ._Xul._Ago._Set._Out._Nov._Dec.".split("_"),
- weekdays : "Domingo_Luns_Martes_Mércores_Xoves_Venres_Sábado".split("_"),
- weekdaysShort : "Dom._Lun._Mar._Mér._Xov._Ven._Sáb.".split("_"),
- weekdaysMin : "Do_Lu_Ma_Mé_Xo_Ve_Sá".split("_"),
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
+
+
+ var gl = moment.defineLocale('gl', {
+ months : 'Xaneiro_Febreiro_Marzo_Abril_Maio_Xuño_Xullo_Agosto_Setembro_Outubro_Novembro_Decembro'.split('_'),
+ monthsShort : 'Xan._Feb._Mar._Abr._Mai._Xuñ._Xul._Ago._Set._Out._Nov._Dec.'.split('_'),
+ monthsParseExact: true,
+ weekdays : 'Domingo_Luns_Martes_Mércores_Xoves_Venres_Sábado'.split('_'),
+ weekdaysShort : 'Dom._Lun._Mar._Mér._Xov._Ven._Sáb.'.split('_'),
+ weekdaysMin : 'Do_Lu_Ma_Mé_Xo_Ve_Sá'.split('_'),
+ weekdaysParseExact : true,
longDateFormat : {
- LT : "H:mm",
- L : "DD/MM/YYYY",
- LL : "D MMMM YYYY",
- LLL : "D MMMM YYYY LT",
- LLLL : "dddd D MMMM YYYY LT"
+ LT : 'H:mm',
+ LTS : 'H:mm:ss',
+ L : 'DD/MM/YYYY',
+ LL : 'D MMMM YYYY',
+ LLL : 'D MMMM YYYY H:mm',
+ LLLL : 'dddd D MMMM YYYY H:mm'
},
calendar : {
sameDay : function () {
@@ -44,28 +46,32 @@
},
relativeTime : {
future : function (str) {
- if (str === "uns segundos") {
- return "nuns segundos";
+ if (str === 'uns segundos') {
+ return 'nuns segundos';
}
- return "en " + str;
+ return 'en ' + str;
},
- past : "hai %s",
- s : "uns segundos",
- m : "un minuto",
- mm : "%d minutos",
- h : "unha hora",
- hh : "%d horas",
- d : "un día",
- dd : "%d días",
- M : "un mes",
- MM : "%d meses",
- y : "un ano",
- yy : "%d anos"
+ past : 'hai %s',
+ s : 'uns segundos',
+ m : 'un minuto',
+ mm : '%d minutos',
+ h : 'unha hora',
+ hh : '%d horas',
+ d : 'un día',
+ dd : '%d días',
+ M : 'un mes',
+ MM : '%d meses',
+ y : 'un ano',
+ yy : '%d anos'
},
+ ordinalParse : /\d{1,2}º/,
ordinal : '%dº',
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
});
-}));
+
+ return gl;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/he.js b/rainloop/v/0.0.0/app/localization/moment/he.js
index b85dbe858..6e55a7a24 100644
--- a/rainloop/v/0.0.0/app/localization/moment/he.js
+++ b/rainloop/v/0.0.0/app/localization/moment/he.js
@@ -1,34 +1,34 @@
-// moment.js language configuration
-// language : Hebrew (he)
-// author : Tomer Cohen : https://github.com/tomer
-// author : Moshe Simantov : https://github.com/DevelopmentIL
-// author : Tal Ater : https://github.com/TalAter
+//! moment.js locale configuration
+//! locale : Hebrew [he]
+//! author : Tomer Cohen : https://github.com/tomer
+//! author : Moshe Simantov : https://github.com/DevelopmentIL
+//! author : Tal Ater : https://github.com/TalAter
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
- return moment.lang('he', {
- months : "ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר".split("_"),
- monthsShort : "ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳".split("_"),
- weekdays : "ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת".split("_"),
- weekdaysShort : "א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳".split("_"),
- weekdaysMin : "א_ב_ג_ד_ה_ו_ש".split("_"),
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
+
+
+ var he = moment.defineLocale('he', {
+ months : 'ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר'.split('_'),
+ monthsShort : 'ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳'.split('_'),
+ weekdays : 'ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת'.split('_'),
+ weekdaysShort : 'א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳'.split('_'),
+ weekdaysMin : 'א_ב_ג_ד_ה_ו_ש'.split('_'),
longDateFormat : {
- LT : "HH:mm",
- L : "DD/MM/YYYY",
- LL : "D [ב]MMMM YYYY",
- LLL : "D [ב]MMMM YYYY LT",
- LLLL : "dddd, D [ב]MMMM YYYY LT",
- l : "D/M/YYYY",
- ll : "D MMM YYYY",
- lll : "D MMM YYYY LT",
- llll : "ddd, D MMM YYYY LT"
+ LT : 'HH:mm',
+ LTS : 'HH:mm:ss',
+ L : 'DD/MM/YYYY',
+ LL : 'D [ב]MMMM YYYY',
+ LLL : 'D [ב]MMMM YYYY HH:mm',
+ LLLL : 'dddd, D [ב]MMMM YYYY HH:mm',
+ l : 'D/M/YYYY',
+ ll : 'D MMM YYYY',
+ lll : 'D MMM YYYY HH:mm',
+ llll : 'ddd, D MMM YYYY HH:mm'
},
calendar : {
sameDay : '[היום ב־]LT',
@@ -39,39 +39,61 @@
sameElse : 'L'
},
relativeTime : {
- future : "בעוד %s",
- past : "לפני %s",
- s : "מספר שניות",
- m : "דקה",
- mm : "%d דקות",
- h : "שעה",
+ future : 'בעוד %s',
+ past : 'לפני %s',
+ s : 'מספר שניות',
+ m : 'דקה',
+ mm : '%d דקות',
+ h : 'שעה',
hh : function (number) {
if (number === 2) {
- return "שעתיים";
+ return 'שעתיים';
}
- return number + " שעות";
+ return number + ' שעות';
},
- d : "יום",
+ d : 'יום',
dd : function (number) {
if (number === 2) {
- return "יומיים";
+ return 'יומיים';
}
- return number + " ימים";
+ return number + ' ימים';
},
- M : "חודש",
+ M : 'חודש',
MM : function (number) {
if (number === 2) {
- return "חודשיים";
+ return 'חודשיים';
}
- return number + " חודשים";
+ return number + ' חודשים';
},
- y : "שנה",
+ y : 'שנה',
yy : function (number) {
if (number === 2) {
- return "שנתיים";
+ return 'שנתיים';
+ } else if (number % 10 === 0 && number !== 10) {
+ return number + ' שנה';
}
- return number + " שנים";
+ return number + ' שנים';
+ }
+ },
+ meridiemParse: /אחה"צ|לפנה"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,
+ isPM : function (input) {
+ return /^(אחה"צ|אחרי הצהריים|בערב)$/.test(input);
+ },
+ meridiem : function (hour, minute, isLower) {
+ if (hour < 5) {
+ return 'לפנות בוקר';
+ } else if (hour < 10) {
+ return 'בבוקר';
+ } else if (hour < 12) {
+ return isLower ? 'לפנה"צ' : 'לפני הצהריים';
+ } else if (hour < 18) {
+ return isLower ? 'אחה"צ' : 'אחרי הצהריים';
+ } else {
+ return 'בערב';
}
}
});
-}));
+
+ return he;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/hi.js b/rainloop/v/0.0.0/app/localization/moment/hi.js
index 8e6e99c19..fc597712e 100644
--- a/rainloop/v/0.0.0/app/localization/moment/hi.js
+++ b/rainloop/v/0.0.0/app/localization/moment/hi.js
@@ -1,16 +1,15 @@
-// moment.js language configuration
-// language : hindi (hi)
-// author : Mayank Singhal : https://github.com/mayanksinghal
+//! moment.js locale configuration
+//! locale : Hindi [hi]
+//! author : Mayank Singhal : https://github.com/mayanksinghal
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
+
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
var symbolMap = {
'1': '१',
'2': '२',
@@ -36,18 +35,20 @@
'०': '0'
};
- return moment.lang('hi', {
- months : 'जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर'.split("_"),
- monthsShort : 'जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.'.split("_"),
- weekdays : 'रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split("_"),
- weekdaysShort : 'रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि'.split("_"),
- weekdaysMin : 'र_सो_मं_बु_गु_शु_श'.split("_"),
+ var hi = moment.defineLocale('hi', {
+ months : 'जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर'.split('_'),
+ monthsShort : 'जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.'.split('_'),
+ monthsParseExact: true,
+ weekdays : 'रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),
+ weekdaysShort : 'रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि'.split('_'),
+ weekdaysMin : 'र_सो_मं_बु_गु_शु_श'.split('_'),
longDateFormat : {
- LT : "A h:mm बजे",
- L : "DD/MM/YYYY",
- LL : "D MMMM YYYY",
- LLL : "D MMMM YYYY, LT",
- LLLL : "dddd, D MMMM YYYY, LT"
+ LT : 'A h:mm बजे',
+ LTS : 'A h:mm:ss बजे',
+ L : 'DD/MM/YYYY',
+ LL : 'D MMMM YYYY',
+ LLL : 'D MMMM YYYY, A h:mm बजे',
+ LLLL : 'dddd, D MMMM YYYY, A h:mm बजे'
},
calendar : {
sameDay : '[आज] LT',
@@ -58,19 +59,19 @@
sameElse : 'L'
},
relativeTime : {
- future : "%s में",
- past : "%s पहले",
- s : "कुछ ही क्षण",
- m : "एक मिनट",
- mm : "%d मिनट",
- h : "एक घंटा",
- hh : "%d घंटे",
- d : "एक दिन",
- dd : "%d दिन",
- M : "एक महीने",
- MM : "%d महीने",
- y : "एक वर्ष",
- yy : "%d वर्ष"
+ future : '%s में',
+ past : '%s पहले',
+ s : 'कुछ ही क्षण',
+ m : 'एक मिनट',
+ mm : '%d मिनट',
+ h : 'एक घंटा',
+ hh : '%d घंटे',
+ d : 'एक दिन',
+ dd : '%d दिन',
+ M : 'एक महीने',
+ MM : '%d महीने',
+ y : 'एक वर्ष',
+ yy : '%d वर्ष'
},
preparse: function (string) {
return string.replace(/[१२३४५६७८९०]/g, function (match) {
@@ -84,17 +85,32 @@
},
// Hindi notation for meridiems are quite fuzzy in practice. While there exists
// a rigid notion of a 'Pahar' it is not used as rigidly in modern Hindi.
+ meridiemParse: /रात|सुबह|दोपहर|शाम/,
+ meridiemHour : function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'रात') {
+ return hour < 4 ? hour : hour + 12;
+ } else if (meridiem === 'सुबह') {
+ return hour;
+ } else if (meridiem === 'दोपहर') {
+ return hour >= 10 ? hour : hour + 12;
+ } else if (meridiem === 'शाम') {
+ return hour + 12;
+ }
+ },
meridiem : function (hour, minute, isLower) {
if (hour < 4) {
- return "रात";
+ return 'रात';
} else if (hour < 10) {
- return "सुबह";
+ return 'सुबह';
} else if (hour < 17) {
- return "दोपहर";
+ return 'दोपहर';
} else if (hour < 20) {
- return "शाम";
+ return 'शाम';
} else {
- return "रात";
+ return 'रात';
}
},
week : {
@@ -102,4 +118,7 @@
doy : 6 // The week that contains Jan 1st is the first week of the year.
}
});
-}));
+
+ return hi;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/hr.js b/rainloop/v/0.0.0/app/localization/moment/hr.js
index 2e3bf1128..70fdf5177 100644
--- a/rainloop/v/0.0.0/app/localization/moment/hr.js
+++ b/rainloop/v/0.0.0/app/localization/moment/hr.js
@@ -1,140 +1,145 @@
-// moment.js language configuration
-// language : hrvatski (hr)
-// author : Bojan Marković : https://github.com/bmarkovic
+//! moment.js locale configuration
+//! locale : Croatian [hr]
+//! author : Bojan Marković : https://github.com/bmarkovic
-// based on (sl) translation by Robert Sedovšek
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
function translate(number, withoutSuffix, key) {
- var result = number + " ";
+ var result = number + ' ';
switch (key) {
- case 'm':
- return withoutSuffix ? 'jedna minuta' : 'jedne minute';
- case 'mm':
- if (number === 1) {
- result += 'minuta';
- } else if (number === 2 || number === 3 || number === 4) {
- result += 'minute';
- } else {
- result += 'minuta';
- }
- return result;
- case 'h':
- return withoutSuffix ? 'jedan sat' : 'jednog sata';
- case 'hh':
- if (number === 1) {
- result += 'sat';
- } else if (number === 2 || number === 3 || number === 4) {
- result += 'sata';
- } else {
- result += 'sati';
- }
- return result;
- case 'dd':
- if (number === 1) {
- result += 'dan';
- } else {
- result += 'dana';
- }
- return result;
- case 'MM':
- if (number === 1) {
- result += 'mjesec';
- } else if (number === 2 || number === 3 || number === 4) {
- result += 'mjeseca';
- } else {
- result += 'mjeseci';
- }
- return result;
- case 'yy':
- if (number === 1) {
- result += 'godina';
- } else if (number === 2 || number === 3 || number === 4) {
- result += 'godine';
- } else {
- result += 'godina';
- }
- return result;
+ case 'm':
+ return withoutSuffix ? 'jedna minuta' : 'jedne minute';
+ case 'mm':
+ if (number === 1) {
+ result += 'minuta';
+ } else if (number === 2 || number === 3 || number === 4) {
+ result += 'minute';
+ } else {
+ result += 'minuta';
+ }
+ return result;
+ case 'h':
+ return withoutSuffix ? 'jedan sat' : 'jednog sata';
+ case 'hh':
+ if (number === 1) {
+ result += 'sat';
+ } else if (number === 2 || number === 3 || number === 4) {
+ result += 'sata';
+ } else {
+ result += 'sati';
+ }
+ return result;
+ case 'dd':
+ if (number === 1) {
+ result += 'dan';
+ } else {
+ result += 'dana';
+ }
+ return result;
+ case 'MM':
+ if (number === 1) {
+ result += 'mjesec';
+ } else if (number === 2 || number === 3 || number === 4) {
+ result += 'mjeseca';
+ } else {
+ result += 'mjeseci';
+ }
+ return result;
+ case 'yy':
+ if (number === 1) {
+ result += 'godina';
+ } else if (number === 2 || number === 3 || number === 4) {
+ result += 'godine';
+ } else {
+ result += 'godina';
+ }
+ return result;
}
}
- return moment.lang('hr', {
- months : "sječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac".split("_"),
- monthsShort : "sje._vel._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.".split("_"),
- weekdays : "nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),
- weekdaysShort : "ned._pon._uto._sri._čet._pet._sub.".split("_"),
- weekdaysMin : "ne_po_ut_sr_če_pe_su".split("_"),
+ var hr = moment.defineLocale('hr', {
+ months : {
+ format: 'siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca'.split('_'),
+ standalone: 'siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac'.split('_')
+ },
+ monthsShort : 'sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.'.split('_'),
+ monthsParseExact: true,
+ weekdays : 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split('_'),
+ weekdaysShort : 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),
+ weekdaysMin : 'ne_po_ut_sr_če_pe_su'.split('_'),
+ weekdaysParseExact : true,
longDateFormat : {
- LT : "H:mm",
- L : "DD. MM. YYYY",
- LL : "D. MMMM YYYY",
- LLL : "D. MMMM YYYY LT",
- LLLL : "dddd, D. MMMM YYYY LT"
+ LT : 'H:mm',
+ LTS : 'H:mm:ss',
+ L : 'DD. MM. YYYY',
+ LL : 'D. MMMM YYYY',
+ LLL : 'D. MMMM YYYY H:mm',
+ LLLL : 'dddd, D. MMMM YYYY H:mm'
},
calendar : {
sameDay : '[danas u] LT',
nextDay : '[sutra u] LT',
-
nextWeek : function () {
switch (this.day()) {
- case 0:
- return '[u] [nedjelju] [u] LT';
- case 3:
- return '[u] [srijedu] [u] LT';
- case 6:
- return '[u] [subotu] [u] LT';
- case 1:
- case 2:
- case 4:
- case 5:
- return '[u] dddd [u] LT';
+ case 0:
+ return '[u] [nedjelju] [u] LT';
+ case 3:
+ return '[u] [srijedu] [u] LT';
+ case 6:
+ return '[u] [subotu] [u] LT';
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ return '[u] dddd [u] LT';
}
},
lastDay : '[jučer u] LT',
lastWeek : function () {
switch (this.day()) {
- case 0:
- case 3:
- return '[prošlu] dddd [u] LT';
- case 6:
- return '[prošle] [subote] [u] LT';
- case 1:
- case 2:
- case 4:
- case 5:
- return '[prošli] dddd [u] LT';
+ case 0:
+ case 3:
+ return '[prošlu] dddd [u] LT';
+ case 6:
+ return '[prošle] [subote] [u] LT';
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ return '[prošli] dddd [u] LT';
}
},
sameElse : 'L'
},
relativeTime : {
- future : "za %s",
- past : "prije %s",
- s : "par sekundi",
+ future : 'za %s',
+ past : 'prije %s',
+ s : 'par sekundi',
m : translate,
mm : translate,
h : translate,
hh : translate,
- d : "dan",
+ d : 'dan',
dd : translate,
- M : "mjesec",
+ M : 'mjesec',
MM : translate,
- y : "godinu",
+ y : 'godinu',
yy : translate
},
+ ordinalParse: /\d{1,2}\./,
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
});
-}));
+
+ return hr;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/hu.js b/rainloop/v/0.0.0/app/localization/moment/hu.js
index 9833024cd..af5c73155 100644
--- a/rainloop/v/0.0.0/app/localization/moment/hu.js
+++ b/rainloop/v/0.0.0/app/localization/moment/hu.js
@@ -1,66 +1,66 @@
-// moment.js language configuration
-// language : hungarian (hu)
-// author : Adam Brunner : https://github.com/adambrunner
+//! moment.js locale configuration
+//! locale : Hungarian [hu]
+//! author : Adam Brunner : https://github.com/adambrunner
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
+
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
var weekEndings = 'vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton'.split(' ');
-
function translate(number, withoutSuffix, key, isFuture) {
var num = number,
suffix;
-
switch (key) {
- case 's':
- return (isFuture || withoutSuffix) ? 'néhány másodperc' : 'néhány másodperce';
- case 'm':
- return 'egy' + (isFuture || withoutSuffix ? ' perc' : ' perce');
- case 'mm':
- return num + (isFuture || withoutSuffix ? ' perc' : ' perce');
- case 'h':
- return 'egy' + (isFuture || withoutSuffix ? ' óra' : ' órája');
- case 'hh':
- return num + (isFuture || withoutSuffix ? ' óra' : ' órája');
- case 'd':
- return 'egy' + (isFuture || withoutSuffix ? ' nap' : ' napja');
- case 'dd':
- return num + (isFuture || withoutSuffix ? ' nap' : ' napja');
- case 'M':
- return 'egy' + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');
- case 'MM':
- return num + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');
- case 'y':
- return 'egy' + (isFuture || withoutSuffix ? ' év' : ' éve');
- case 'yy':
- return num + (isFuture || withoutSuffix ? ' év' : ' éve');
+ case 's':
+ return (isFuture || withoutSuffix) ? 'néhány másodperc' : 'néhány másodperce';
+ case 'm':
+ return 'egy' + (isFuture || withoutSuffix ? ' perc' : ' perce');
+ case 'mm':
+ return num + (isFuture || withoutSuffix ? ' perc' : ' perce');
+ case 'h':
+ return 'egy' + (isFuture || withoutSuffix ? ' óra' : ' órája');
+ case 'hh':
+ return num + (isFuture || withoutSuffix ? ' óra' : ' órája');
+ case 'd':
+ return 'egy' + (isFuture || withoutSuffix ? ' nap' : ' napja');
+ case 'dd':
+ return num + (isFuture || withoutSuffix ? ' nap' : ' napja');
+ case 'M':
+ return 'egy' + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');
+ case 'MM':
+ return num + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');
+ case 'y':
+ return 'egy' + (isFuture || withoutSuffix ? ' év' : ' éve');
+ case 'yy':
+ return num + (isFuture || withoutSuffix ? ' év' : ' éve');
}
-
return '';
}
-
function week(isFuture) {
return (isFuture ? '' : '[múlt] ') + '[' + weekEndings[this.day()] + '] LT[-kor]';
}
- return moment.lang('hu', {
- months : "január_február_március_április_május_június_július_augusztus_szeptember_október_november_december".split("_"),
- monthsShort : "jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec".split("_"),
- weekdays : "vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat".split("_"),
- weekdaysShort : "vas_hét_kedd_sze_csüt_pén_szo".split("_"),
- weekdaysMin : "v_h_k_sze_cs_p_szo".split("_"),
+ var hu = moment.defineLocale('hu', {
+ months : 'január_február_március_április_május_június_július_augusztus_szeptember_október_november_december'.split('_'),
+ monthsShort : 'jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec'.split('_'),
+ weekdays : 'vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat'.split('_'),
+ weekdaysShort : 'vas_hét_kedd_sze_csüt_pén_szo'.split('_'),
+ weekdaysMin : 'v_h_k_sze_cs_p_szo'.split('_'),
longDateFormat : {
- LT : "H:mm",
- L : "YYYY.MM.DD.",
- LL : "YYYY. MMMM D.",
- LLL : "YYYY. MMMM D., LT",
- LLLL : "YYYY. MMMM D., dddd LT"
+ LT : 'H:mm',
+ LTS : 'H:mm:ss',
+ L : 'YYYY.MM.DD.',
+ LL : 'YYYY. MMMM D.',
+ LLL : 'YYYY. MMMM D. H:mm',
+ LLLL : 'YYYY. MMMM D., dddd H:mm'
+ },
+ meridiemParse: /de|du/i,
+ isPM: function (input) {
+ return input.charAt(1).toLowerCase() === 'u';
},
meridiem : function (hours, minutes, isLower) {
if (hours < 12) {
@@ -82,8 +82,8 @@
sameElse : 'L'
},
relativeTime : {
- future : "%s múlva",
- past : "%s",
+ future : '%s múlva',
+ past : '%s',
s : translate,
m : translate,
mm : translate,
@@ -96,10 +96,14 @@
y : translate,
yy : translate
},
+ ordinalParse: /\d{1,2}\./,
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
});
-}));
+
+ return hu;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/hy-am.js b/rainloop/v/0.0.0/app/localization/moment/hy-am.js
index 951655bc2..8b262005f 100644
--- a/rainloop/v/0.0.0/app/localization/moment/hy-am.js
+++ b/rainloop/v/0.0.0/app/localization/moment/hy-am.js
@@ -1,54 +1,31 @@
-// moment.js language configuration
-// language : Armenian (hy-am)
-// author : Armendarabyan : https://github.com/armendarabyan
+//! moment.js locale configuration
+//! locale : Armenian [hy-am]
+//! author : Armendarabyan : https://github.com/armendarabyan
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
- function monthsCaseReplace(m, format) {
- var months = {
- 'nominative': 'հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր'.split('_'),
- 'accusative': 'հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի'.split('_')
+
+ var hy_am = moment.defineLocale('hy-am', {
+ months : {
+ format: 'հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի'.split('_'),
+ standalone: 'հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր'.split('_')
},
-
- nounCase = (/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/).test(format) ?
- 'accusative' :
- 'nominative';
-
- return months[nounCase][m.month()];
- }
-
- function monthsShortCaseReplace(m, format) {
- var monthsShort = 'հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ'.split('_');
-
- return monthsShort[m.month()];
- }
-
- function weekdaysCaseReplace(m, format) {
- var weekdays = 'կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ'.split('_');
-
- return weekdays[m.day()];
- }
-
- return moment.lang('hy-am', {
- months : monthsCaseReplace,
- monthsShort : monthsShortCaseReplace,
- weekdays : weekdaysCaseReplace,
- weekdaysShort : "կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),
- weekdaysMin : "կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),
+ monthsShort : 'հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ'.split('_'),
+ weekdays : 'կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ'.split('_'),
+ weekdaysShort : 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),
+ weekdaysMin : 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),
longDateFormat : {
- LT : "HH:mm",
- L : "DD.MM.YYYY",
- LL : "D MMMM YYYY թ.",
- LLL : "D MMMM YYYY թ., LT",
- LLLL : "dddd, D MMMM YYYY թ., LT"
+ LT : 'HH:mm',
+ LTS : 'HH:mm:ss',
+ L : 'DD.MM.YYYY',
+ LL : 'D MMMM YYYY թ.',
+ LLL : 'D MMMM YYYY թ., HH:mm',
+ LLLL : 'dddd, D MMMM YYYY թ., HH:mm'
},
calendar : {
sameDay: '[այսօր] LT',
@@ -63,51 +40,56 @@
sameElse: 'L'
},
relativeTime : {
- future : "%s հետո",
- past : "%s առաջ",
- s : "մի քանի վայրկյան",
- m : "րոպե",
- mm : "%d րոպե",
- h : "ժամ",
- hh : "%d ժամ",
- d : "օր",
- dd : "%d օր",
- M : "ամիս",
- MM : "%d ամիս",
- y : "տարի",
- yy : "%d տարի"
+ future : '%s հետո',
+ past : '%s առաջ',
+ s : 'մի քանի վայրկյան',
+ m : 'րոպե',
+ mm : '%d րոպե',
+ h : 'ժամ',
+ hh : '%d ժամ',
+ d : 'օր',
+ dd : '%d օր',
+ M : 'ամիս',
+ MM : '%d ամիս',
+ y : 'տարի',
+ yy : '%d տարի'
+ },
+ meridiemParse: /գիշերվա|առավոտվա|ցերեկվա|երեկոյան/,
+ isPM: function (input) {
+ return /^(ցերեկվա|երեկոյան)$/.test(input);
},
-
meridiem : function (hour) {
if (hour < 4) {
- return "գիշերվա";
+ return 'գիշերվա';
} else if (hour < 12) {
- return "առավոտվա";
+ return 'առավոտվա';
} else if (hour < 17) {
- return "ցերեկվա";
+ return 'ցերեկվա';
} else {
- return "երեկոյան";
+ return 'երեկոյան';
}
},
-
+ ordinalParse: /\d{1,2}|\d{1,2}-(ին|րդ)/,
ordinal: function (number, period) {
switch (period) {
- case 'DDD':
- case 'w':
- case 'W':
- case 'DDDo':
- if (number === 1) {
- return number + '-ին';
- }
- return number + '-րդ';
- default:
- return number;
+ case 'DDD':
+ case 'w':
+ case 'W':
+ case 'DDDo':
+ if (number === 1) {
+ return number + '-ին';
+ }
+ return number + '-րդ';
+ default:
+ return number;
}
},
-
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
});
-}));
+
+ return hy_am;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/id.js b/rainloop/v/0.0.0/app/localization/moment/id.js
index f186280d8..16dff2f1b 100644
--- a/rainloop/v/0.0.0/app/localization/moment/id.js
+++ b/rainloop/v/0.0.0/app/localization/moment/id.js
@@ -1,29 +1,42 @@
-// moment.js language configuration
-// language : Bahasa Indonesia (id)
-// author : Mohammad Satrio Utomo : https://github.com/tyok
-// reference: http://id.wikisource.org/wiki/Pedoman_Umum_Ejaan_Bahasa_Indonesia_yang_Disempurnakan
+//! moment.js locale configuration
+//! locale : Indonesian [id]
+//! author : Mohammad Satrio Utomo : https://github.com/tyok
+//! reference: http://id.wikisource.org/wiki/Pedoman_Umum_Ejaan_Bahasa_Indonesia_yang_Disempurnakan
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
- return moment.lang('id', {
- months : "Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember".split("_"),
- monthsShort : "Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nov_Des".split("_"),
- weekdays : "Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu".split("_"),
- weekdaysShort : "Min_Sen_Sel_Rab_Kam_Jum_Sab".split("_"),
- weekdaysMin : "Mg_Sn_Sl_Rb_Km_Jm_Sb".split("_"),
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
+
+
+ var id = moment.defineLocale('id', {
+ months : 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember'.split('_'),
+ monthsShort : 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nov_Des'.split('_'),
+ weekdays : 'Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu'.split('_'),
+ weekdaysShort : 'Min_Sen_Sel_Rab_Kam_Jum_Sab'.split('_'),
+ weekdaysMin : 'Mg_Sn_Sl_Rb_Km_Jm_Sb'.split('_'),
longDateFormat : {
- LT : "HH.mm",
- L : "DD/MM/YYYY",
- LL : "D MMMM YYYY",
- LLL : "D MMMM YYYY [pukul] LT",
- LLLL : "dddd, D MMMM YYYY [pukul] LT"
+ LT : 'HH.mm',
+ LTS : 'HH.mm.ss',
+ L : 'DD/MM/YYYY',
+ LL : 'D MMMM YYYY',
+ LLL : 'D MMMM YYYY [pukul] HH.mm',
+ LLLL : 'dddd, D MMMM YYYY [pukul] HH.mm'
+ },
+ meridiemParse: /pagi|siang|sore|malam/,
+ meridiemHour : function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'pagi') {
+ return hour;
+ } else if (meridiem === 'siang') {
+ return hour >= 11 ? hour : hour + 12;
+ } else if (meridiem === 'sore' || meridiem === 'malam') {
+ return hour + 12;
+ }
},
meridiem : function (hours, minutes, isLower) {
if (hours < 11) {
@@ -45,23 +58,26 @@
sameElse : 'L'
},
relativeTime : {
- future : "dalam %s",
- past : "%s yang lalu",
- s : "beberapa detik",
- m : "semenit",
- mm : "%d menit",
- h : "sejam",
- hh : "%d jam",
- d : "sehari",
- dd : "%d hari",
- M : "sebulan",
- MM : "%d bulan",
- y : "setahun",
- yy : "%d tahun"
+ future : 'dalam %s',
+ past : '%s yang lalu',
+ s : 'beberapa detik',
+ m : 'semenit',
+ mm : '%d menit',
+ h : 'sejam',
+ hh : '%d jam',
+ d : 'sehari',
+ dd : '%d hari',
+ M : 'sebulan',
+ MM : '%d bulan',
+ y : 'setahun',
+ yy : '%d tahun'
},
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
});
-}));
+
+ return id;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/is.js b/rainloop/v/0.0.0/app/localization/moment/is.js
index 5b6b2a821..810fee617 100644
--- a/rainloop/v/0.0.0/app/localization/moment/is.js
+++ b/rainloop/v/0.0.0/app/localization/moment/is.js
@@ -1,16 +1,15 @@
-// moment.js language configuration
-// language : icelandic (is)
-// author : Hinrik Örn Sigurðsson : https://github.com/hinrik
+//! moment.js locale configuration
+//! locale : Icelandic [is]
+//! author : Hinrik Örn Sigurðsson : https://github.com/hinrik
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
+
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
function plural(n) {
if (n % 100 === 11) {
return true;
@@ -19,78 +18,78 @@
}
return true;
}
-
function translate(number, withoutSuffix, key, isFuture) {
- var result = number + " ";
+ var result = number + ' ';
switch (key) {
- case 's':
- return withoutSuffix || isFuture ? 'nokkrar sekúndur' : 'nokkrum sekúndum';
- case 'm':
- return withoutSuffix ? 'mínúta' : 'mínútu';
- case 'mm':
- if (plural(number)) {
- return result + (withoutSuffix || isFuture ? 'mínútur' : 'mínútum');
- } else if (withoutSuffix) {
- return result + 'mínúta';
- }
- return result + 'mínútu';
- case 'hh':
- if (plural(number)) {
- return result + (withoutSuffix || isFuture ? 'klukkustundir' : 'klukkustundum');
- }
- return result + 'klukkustund';
- case 'd':
- if (withoutSuffix) {
- return 'dagur';
- }
- return isFuture ? 'dag' : 'degi';
- case 'dd':
- if (plural(number)) {
- if (withoutSuffix) {
- return result + 'dagar';
+ case 's':
+ return withoutSuffix || isFuture ? 'nokkrar sekúndur' : 'nokkrum sekúndum';
+ case 'm':
+ return withoutSuffix ? 'mínúta' : 'mínútu';
+ case 'mm':
+ if (plural(number)) {
+ return result + (withoutSuffix || isFuture ? 'mínútur' : 'mínútum');
+ } else if (withoutSuffix) {
+ return result + 'mínúta';
}
- return result + (isFuture ? 'daga' : 'dögum');
- } else if (withoutSuffix) {
- return result + 'dagur';
- }
- return result + (isFuture ? 'dag' : 'degi');
- case 'M':
- if (withoutSuffix) {
- return 'mánuður';
- }
- return isFuture ? 'mánuð' : 'mánuði';
- case 'MM':
- if (plural(number)) {
- if (withoutSuffix) {
- return result + 'mánuðir';
+ return result + 'mínútu';
+ case 'hh':
+ if (plural(number)) {
+ return result + (withoutSuffix || isFuture ? 'klukkustundir' : 'klukkustundum');
}
- return result + (isFuture ? 'mánuði' : 'mánuðum');
- } else if (withoutSuffix) {
- return result + 'mánuður';
- }
- return result + (isFuture ? 'mánuð' : 'mánuði');
- case 'y':
- return withoutSuffix || isFuture ? 'ár' : 'ári';
- case 'yy':
- if (plural(number)) {
- return result + (withoutSuffix || isFuture ? 'ár' : 'árum');
- }
- return result + (withoutSuffix || isFuture ? 'ár' : 'ári');
+ return result + 'klukkustund';
+ case 'd':
+ if (withoutSuffix) {
+ return 'dagur';
+ }
+ return isFuture ? 'dag' : 'degi';
+ case 'dd':
+ if (plural(number)) {
+ if (withoutSuffix) {
+ return result + 'dagar';
+ }
+ return result + (isFuture ? 'daga' : 'dögum');
+ } else if (withoutSuffix) {
+ return result + 'dagur';
+ }
+ return result + (isFuture ? 'dag' : 'degi');
+ case 'M':
+ if (withoutSuffix) {
+ return 'mánuður';
+ }
+ return isFuture ? 'mánuð' : 'mánuði';
+ case 'MM':
+ if (plural(number)) {
+ if (withoutSuffix) {
+ return result + 'mánuðir';
+ }
+ return result + (isFuture ? 'mánuði' : 'mánuðum');
+ } else if (withoutSuffix) {
+ return result + 'mánuður';
+ }
+ return result + (isFuture ? 'mánuð' : 'mánuði');
+ case 'y':
+ return withoutSuffix || isFuture ? 'ár' : 'ári';
+ case 'yy':
+ if (plural(number)) {
+ return result + (withoutSuffix || isFuture ? 'ár' : 'árum');
+ }
+ return result + (withoutSuffix || isFuture ? 'ár' : 'ári');
}
}
- return moment.lang('is', {
- months : "janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember".split("_"),
- monthsShort : "jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des".split("_"),
- weekdays : "sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur".split("_"),
- weekdaysShort : "sun_mán_þri_mið_fim_fös_lau".split("_"),
- weekdaysMin : "Su_Má_Þr_Mi_Fi_Fö_La".split("_"),
+ var is = moment.defineLocale('is', {
+ months : 'janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember'.split('_'),
+ monthsShort : 'jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des'.split('_'),
+ weekdays : 'sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur'.split('_'),
+ weekdaysShort : 'sun_mán_þri_mið_fim_fös_lau'.split('_'),
+ weekdaysMin : 'Su_Má_Þr_Mi_Fi_Fö_La'.split('_'),
longDateFormat : {
- LT : "H:mm",
- L : "DD/MM/YYYY",
- LL : "D. MMMM YYYY",
- LLL : "D. MMMM YYYY [kl.] LT",
- LLLL : "dddd, D. MMMM YYYY [kl.] LT"
+ LT : 'H:mm',
+ LTS : 'H:mm:ss',
+ L : 'DD.MM.YYYY',
+ LL : 'D. MMMM YYYY',
+ LLL : 'D. MMMM YYYY [kl.] H:mm',
+ LLLL : 'dddd, D. MMMM YYYY [kl.] H:mm'
},
calendar : {
sameDay : '[í dag kl.] LT',
@@ -101,12 +100,12 @@
sameElse : 'L'
},
relativeTime : {
- future : "eftir %s",
- past : "fyrir %s síðan",
+ future : 'eftir %s',
+ past : 'fyrir %s síðan',
s : translate,
m : translate,
mm : translate,
- h : "klukkustund",
+ h : 'klukkustund',
hh : translate,
d : translate,
dd : translate,
@@ -115,10 +114,14 @@
y : translate,
yy : translate
},
+ ordinalParse: /\d{1,2}\./,
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
-}));
+
+ return is;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/it.js b/rainloop/v/0.0.0/app/localization/moment/it.js
index 84b7698be..35d44ccac 100644
--- a/rainloop/v/0.0.0/app/localization/moment/it.js
+++ b/rainloop/v/0.0.0/app/localization/moment/it.js
@@ -1,59 +1,70 @@
-// moment.js language configuration
-// language : italian (it)
-// author : Lorenzo : https://github.com/aliem
-// author: Mattia Larentis: https://github.com/nostalgiaz
+//! moment.js locale configuration
+//! locale : Italian [it]
+//! author : Lorenzo : https://github.com/aliem
+//! author: Mattia Larentis: https://github.com/nostalgiaz
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
- return moment.lang('it', {
- months : "Gennaio_Febbraio_Marzo_Aprile_Maggio_Giugno_Luglio_Agosto_Settembre_Ottobre_Novembre_Dicembre".split("_"),
- monthsShort : "Gen_Feb_Mar_Apr_Mag_Giu_Lug_Ago_Set_Ott_Nov_Dic".split("_"),
- weekdays : "Domenica_Lunedì_Martedì_Mercoledì_Giovedì_Venerdì_Sabato".split("_"),
- weekdaysShort : "Dom_Lun_Mar_Mer_Gio_Ven_Sab".split("_"),
- weekdaysMin : "D_L_Ma_Me_G_V_S".split("_"),
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
+
+
+ var it = moment.defineLocale('it', {
+ months : 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split('_'),
+ monthsShort : 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),
+ weekdays : 'Domenica_Lunedì_Martedì_Mercoledì_Giovedì_Venerdì_Sabato'.split('_'),
+ weekdaysShort : 'Dom_Lun_Mar_Mer_Gio_Ven_Sab'.split('_'),
+ weekdaysMin : 'Do_Lu_Ma_Me_Gi_Ve_Sa'.split('_'),
longDateFormat : {
- LT : "HH:mm",
- L : "DD/MM/YYYY",
- LL : "D MMMM YYYY",
- LLL : "D MMMM YYYY LT",
- LLLL : "dddd, D MMMM YYYY LT"
+ LT : 'HH:mm',
+ LTS : 'HH:mm:ss',
+ L : 'DD/MM/YYYY',
+ LL : 'D MMMM YYYY',
+ LLL : 'D MMMM YYYY HH:mm',
+ LLLL : 'dddd, D MMMM YYYY HH:mm'
},
calendar : {
sameDay: '[Oggi alle] LT',
nextDay: '[Domani alle] LT',
nextWeek: 'dddd [alle] LT',
lastDay: '[Ieri alle] LT',
- lastWeek: '[lo scorso] dddd [alle] LT',
+ lastWeek: function () {
+ switch (this.day()) {
+ case 0:
+ return '[la scorsa] dddd [alle] LT';
+ default:
+ return '[lo scorso] dddd [alle] LT';
+ }
+ },
sameElse: 'L'
},
relativeTime : {
future : function (s) {
- return ((/^[0-9].+$/).test(s) ? "tra" : "in") + " " + s;
+ return ((/^[0-9].+$/).test(s) ? 'tra' : 'in') + ' ' + s;
},
- past : "%s fa",
- s : "alcuni secondi",
- m : "un minuto",
- mm : "%d minuti",
- h : "un'ora",
- hh : "%d ore",
- d : "un giorno",
- dd : "%d giorni",
- M : "un mese",
- MM : "%d mesi",
- y : "un anno",
- yy : "%d anni"
+ past : '%s fa',
+ s : 'alcuni secondi',
+ m : 'un minuto',
+ mm : '%d minuti',
+ h : 'un\'ora',
+ hh : '%d ore',
+ d : 'un giorno',
+ dd : '%d giorni',
+ M : 'un mese',
+ MM : '%d mesi',
+ y : 'un anno',
+ yy : '%d anni'
},
+ ordinalParse : /\d{1,2}º/,
ordinal: '%dº',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
-}));
+
+ return it;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/ja.js b/rainloop/v/0.0.0/app/localization/moment/ja.js
index 9cd7e9e98..adea3597c 100644
--- a/rainloop/v/0.0.0/app/localization/moment/ja.js
+++ b/rainloop/v/0.0.0/app/localization/moment/ja.js
@@ -1,34 +1,38 @@
-// moment.js language configuration
-// language : japanese (ja)
-// author : LI Long : https://github.com/baryon
+//! moment.js locale configuration
+//! locale : Japanese [ja]
+//! author : LI Long : https://github.com/baryon
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
- return moment.lang('ja', {
- months : "1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),
- monthsShort : "1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),
- weekdays : "日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),
- weekdaysShort : "日_月_火_水_木_金_土".split("_"),
- weekdaysMin : "日_月_火_水_木_金_土".split("_"),
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
+
+
+ var ja = moment.defineLocale('ja', {
+ months : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
+ monthsShort : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
+ weekdays : '日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日'.split('_'),
+ weekdaysShort : '日_月_火_水_木_金_土'.split('_'),
+ weekdaysMin : '日_月_火_水_木_金_土'.split('_'),
longDateFormat : {
- LT : "Ah時m分",
- L : "YYYY/MM/DD",
- LL : "YYYY年M月D日",
- LLL : "YYYY年M月D日LT",
- LLLL : "YYYY年M月D日LT dddd"
+ LT : 'Ah時m分',
+ LTS : 'Ah時m分s秒',
+ L : 'YYYY/MM/DD',
+ LL : 'YYYY年M月D日',
+ LLL : 'YYYY年M月D日Ah時m分',
+ LLLL : 'YYYY年M月D日Ah時m分 dddd'
+ },
+ meridiemParse: /午前|午後/i,
+ isPM : function (input) {
+ return input === '午後';
},
meridiem : function (hour, minute, isLower) {
if (hour < 12) {
- return "午前";
+ return '午前';
} else {
- return "午後";
+ return '午後';
}
},
calendar : {
@@ -39,20 +43,34 @@
lastWeek : '[前週]dddd LT',
sameElse : 'L'
},
+ ordinalParse : /\d{1,2}日/,
+ ordinal : function (number, period) {
+ switch (period) {
+ case 'd':
+ case 'D':
+ case 'DDD':
+ return number + '日';
+ default:
+ return number;
+ }
+ },
relativeTime : {
- future : "%s後",
- past : "%s前",
- s : "数秒",
- m : "1分",
- mm : "%d分",
- h : "1時間",
- hh : "%d時間",
- d : "1日",
- dd : "%d日",
- M : "1ヶ月",
- MM : "%dヶ月",
- y : "1年",
- yy : "%d年"
+ future : '%s後',
+ past : '%s前',
+ s : '数秒',
+ m : '1分',
+ mm : '%d分',
+ h : '1時間',
+ hh : '%d時間',
+ d : '1日',
+ dd : '%d日',
+ M : '1ヶ月',
+ MM : '%dヶ月',
+ y : '1年',
+ yy : '%d年'
}
});
-}));
+
+ return ja;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/ka.js b/rainloop/v/0.0.0/app/localization/moment/ka.js
index 0cebdaae2..b9faf6834 100644
--- a/rainloop/v/0.0.0/app/localization/moment/ka.js
+++ b/rainloop/v/0.0.0/app/localization/moment/ka.js
@@ -1,55 +1,35 @@
-// moment.js language configuration
-// language : Georgian (ka)
-// author : Irakli Janiashvili : https://github.com/irakli-janiashvili
+//! moment.js locale configuration
+//! locale : Georgian [ka]
+//! author : Irakli Janiashvili : https://github.com/irakli-janiashvili
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
- function monthsCaseReplace(m, format) {
- var months = {
- 'nominative': 'იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი'.split('_'),
- 'accusative': 'იანვარს_თებერვალს_მარტს_აპრილის_მაისს_ივნისს_ივლისს_აგვისტს_სექტემბერს_ოქტომბერს_ნოემბერს_დეკემბერს'.split('_')
+
+ var ka = moment.defineLocale('ka', {
+ months : {
+ standalone: 'იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი'.split('_'),
+ format: 'იანვარს_თებერვალს_მარტს_აპრილის_მაისს_ივნისს_ივლისს_აგვისტს_სექტემბერს_ოქტომბერს_ნოემბერს_დეკემბერს'.split('_')
},
-
- nounCase = (/D[oD] *MMMM?/).test(format) ?
- 'accusative' :
- 'nominative';
-
- return months[nounCase][m.month()];
- }
-
- function weekdaysCaseReplace(m, format) {
- var weekdays = {
- 'nominative': 'კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი'.split('_'),
- 'accusative': 'კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს'.split('_')
+ monthsShort : 'იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ'.split('_'),
+ weekdays : {
+ standalone: 'კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი'.split('_'),
+ format: 'კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს'.split('_'),
+ isFormat: /(წინა|შემდეგ)/
},
-
- nounCase = (/(წინა|შემდეგ)/).test(format) ?
- 'accusative' :
- 'nominative';
-
- return weekdays[nounCase][m.day()];
- }
-
- return moment.lang('ka', {
- months : monthsCaseReplace,
- monthsShort : "იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ".split("_"),
- weekdays : weekdaysCaseReplace,
- weekdaysShort : "კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ".split("_"),
- weekdaysMin : "კვ_ორ_სა_ოთ_ხუ_პა_შა".split("_"),
+ weekdaysShort : 'კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ'.split('_'),
+ weekdaysMin : 'კვ_ორ_სა_ოთ_ხუ_პა_შა'.split('_'),
longDateFormat : {
- LT : "h:mm A",
- L : "DD/MM/YYYY",
- LL : "D MMMM YYYY",
- LLL : "D MMMM YYYY LT",
- LLLL : "dddd, D MMMM YYYY LT"
+ LT : 'h:mm A',
+ LTS : 'h:mm:ss A',
+ L : 'DD/MM/YYYY',
+ LL : 'D MMMM YYYY',
+ LLL : 'D MMMM YYYY h:mm A',
+ LLLL : 'dddd, D MMMM YYYY h:mm A'
},
calendar : {
sameDay : '[დღეს] LT[-ზე]',
@@ -62,47 +42,48 @@
relativeTime : {
future : function (s) {
return (/(წამი|წუთი|საათი|წელი)/).test(s) ?
- s.replace(/ი$/, "ში") :
- s + "ში";
+ s.replace(/ი$/, 'ში') :
+ s + 'ში';
},
past : function (s) {
if ((/(წამი|წუთი|საათი|დღე|თვე)/).test(s)) {
- return s.replace(/(ი|ე)$/, "ის წინ");
+ return s.replace(/(ი|ე)$/, 'ის წინ');
}
if ((/წელი/).test(s)) {
- return s.replace(/წელი$/, "წლის წინ");
+ return s.replace(/წელი$/, 'წლის წინ');
}
},
- s : "რამდენიმე წამი",
- m : "წუთი",
- mm : "%d წუთი",
- h : "საათი",
- hh : "%d საათი",
- d : "დღე",
- dd : "%d დღე",
- M : "თვე",
- MM : "%d თვე",
- y : "წელი",
- yy : "%d წელი"
+ s : 'რამდენიმე წამი',
+ m : 'წუთი',
+ mm : '%d წუთი',
+ h : 'საათი',
+ hh : '%d საათი',
+ d : 'დღე',
+ dd : '%d დღე',
+ M : 'თვე',
+ MM : '%d თვე',
+ y : 'წელი',
+ yy : '%d წელი'
},
+ ordinalParse: /0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/,
ordinal : function (number) {
if (number === 0) {
return number;
}
-
if (number === 1) {
- return number + "-ლი";
+ return number + '-ლი';
}
-
if ((number < 20) || (number <= 100 && (number % 20 === 0)) || (number % 100 === 0)) {
- return "მე-" + number;
+ return 'მე-' + number;
}
-
- return number + "-ე";
+ return number + '-ე';
},
week : {
dow : 1,
doy : 7
}
});
-}));
+
+ return ka;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/km.js b/rainloop/v/0.0.0/app/localization/moment/km.js
index 0759c8f1d..cbfe31df7 100644
--- a/rainloop/v/0.0.0/app/localization/moment/km.js
+++ b/rainloop/v/0.0.0/app/localization/moment/km.js
@@ -1,31 +1,31 @@
-// moment.js language configuration
-// language : khmer (km)
-// author : Kruy Vanna : https://github.com/kruyvanna
+//! moment.js locale configuration
+//! locale : Cambodian [km]
+//! author : Kruy Vanna : https://github.com/kruyvanna
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
- return moment.lang('km', {
- months: "មករា_កុម្ភៈ_មិនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),
- monthsShort: "មករា_កុម្ភៈ_មិនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),
- weekdays: "អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),
- weekdaysShort: "អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),
- weekdaysMin: "អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
+
+
+ var km = moment.defineLocale('km', {
+ months: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split('_'),
+ monthsShort: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split('_'),
+ weekdays: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'),
+ weekdaysShort: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'),
+ weekdaysMin: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'),
longDateFormat: {
- LT: "HH:mm",
- L: "DD/MM/YYYY",
- LL: "D MMMM YYYY",
- LLL: "D MMMM YYYY LT",
- LLLL: "dddd, D MMMM YYYY LT"
+ LT: 'HH:mm',
+ LTS : 'HH:mm:ss',
+ L: 'DD/MM/YYYY',
+ LL: 'D MMMM YYYY',
+ LLL: 'D MMMM YYYY HH:mm',
+ LLLL: 'dddd, D MMMM YYYY HH:mm'
},
calendar: {
- sameDay: '[ថ្ងៃនៈ ម៉ោង] LT',
+ sameDay: '[ថ្ងៃនេះ ម៉ោង] LT',
nextDay: '[ស្អែក ម៉ោង] LT',
nextWeek: 'dddd [ម៉ោង] LT',
lastDay: '[ម្សិលមិញ ម៉ោង] LT',
@@ -33,23 +33,26 @@
sameElse: 'L'
},
relativeTime: {
- future: "%sទៀត",
- past: "%sមុន",
- s: "ប៉ុន្មានវិនាទី",
- m: "មួយនាទី",
- mm: "%d នាទី",
- h: "មួយម៉ោង",
- hh: "%d ម៉ោង",
- d: "មួយថ្ងៃ",
- dd: "%d ថ្ងៃ",
- M: "មួយខែ",
- MM: "%d ខែ",
- y: "មួយឆ្នាំ",
- yy: "%d ឆ្នាំ"
+ future: '%sទៀត',
+ past: '%sមុន',
+ s: 'ប៉ុន្មានវិនាទី',
+ m: 'មួយនាទី',
+ mm: '%d នាទី',
+ h: 'មួយម៉ោង',
+ hh: '%d ម៉ោង',
+ d: 'មួយថ្ងៃ',
+ dd: '%d ថ្ងៃ',
+ M: 'មួយខែ',
+ MM: '%d ខែ',
+ y: 'មួយឆ្នាំ',
+ yy: '%d ឆ្នាំ'
},
week: {
dow: 1, // Monday is the first day of the week.
doy: 4 // The week that contains Jan 4th is the first week of the year.
}
});
-}));
+
+ return km;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/ko.js b/rainloop/v/0.0.0/app/localization/moment/ko.js
index 3b469df33..248b6bae7 100644
--- a/rainloop/v/0.0.0/app/localization/moment/ko.js
+++ b/rainloop/v/0.0.0/app/localization/moment/ko.js
@@ -1,34 +1,32 @@
-// moment.js language configuration
-// language : korean (ko)
-//
-// authors
-//
-// - Kyungwook, Park : https://github.com/kyungw00k
-// - Jeeeyul Lee
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
- return moment.lang('ko', {
- months : "1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),
- monthsShort : "1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),
- weekdays : "일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),
- weekdaysShort : "일_월_화_수_목_금_토".split("_"),
- weekdaysMin : "일_월_화_수_목_금_토".split("_"),
+//! moment.js locale configuration
+//! locale : Korean [ko]
+//!
+//! authors
+//!
+//! - Kyungwook, Park : https://github.com/kyungw00k
+//! - Jeeeyul Lee
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
+
+
+ var ko = moment.defineLocale('ko', {
+ months : '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'),
+ monthsShort : '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'),
+ weekdays : '일요일_월요일_화요일_수요일_목요일_금요일_토요일'.split('_'),
+ weekdaysShort : '일_월_화_수_목_금_토'.split('_'),
+ weekdaysMin : '일_월_화_수_목_금_토'.split('_'),
longDateFormat : {
- LT : "A h시 mm분",
- L : "YYYY.MM.DD",
- LL : "YYYY년 MMMM D일",
- LLL : "YYYY년 MMMM D일 LT",
- LLLL : "YYYY년 MMMM D일 dddd LT"
- },
- meridiem : function (hour, minute, isUpper) {
- return hour < 12 ? '오전' : '오후';
+ LT : 'A h시 m분',
+ LTS : 'A h시 m분 s초',
+ L : 'YYYY.MM.DD',
+ LL : 'YYYY년 MMMM D일',
+ LLL : 'YYYY년 MMMM D일 A h시 m분',
+ LLLL : 'YYYY년 MMMM D일 dddd A h시 m분'
},
calendar : {
sameDay : '오늘 LT',
@@ -39,25 +37,32 @@
sameElse : 'L'
},
relativeTime : {
- future : "%s 후",
- past : "%s 전",
- s : "몇초",
- ss : "%d초",
- m : "일분",
- mm : "%d분",
- h : "한시간",
- hh : "%d시간",
- d : "하루",
- dd : "%d일",
- M : "한달",
- MM : "%d달",
- y : "일년",
- yy : "%d년"
+ future : '%s 후',
+ past : '%s 전',
+ s : '몇 초',
+ ss : '%d초',
+ m : '일분',
+ mm : '%d분',
+ h : '한 시간',
+ hh : '%d시간',
+ d : '하루',
+ dd : '%d일',
+ M : '한 달',
+ MM : '%d달',
+ y : '일 년',
+ yy : '%d년'
},
+ ordinalParse : /\d{1,2}일/,
ordinal : '%d일',
- meridiemParse : /(오전|오후)/,
+ meridiemParse : /오전|오후/,
isPM : function (token) {
- return token === "오후";
+ return token === '오후';
+ },
+ meridiem : function (hour, minute, isUpper) {
+ return hour < 12 ? '오전' : '오후';
}
});
-}));
+
+ return ko;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/lb.js b/rainloop/v/0.0.0/app/localization/moment/lb.js
index 946ba13c2..2f4298320 100644
--- a/rainloop/v/0.0.0/app/localization/moment/lb.js
+++ b/rainloop/v/0.0.0/app/localization/moment/lb.js
@@ -1,82 +1,42 @@
-// moment.js language configuration
-// language : Luxembourgish (lb)
-// author : mweimerskirch : https://github.com/mweimerskirch
+//! moment.js locale configuration
+//! locale : Luxembourgish [lb]
+//! author : mweimerskirch : https://github.com/mweimerskirch, David Raison : https://github.com/kwisatz
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
-// Note: Luxembourgish has a very particular phonological rule ("Eifeler Regel") that causes the
-// deletion of the final "n" in certain contexts. That's what the "eifelerRegelAppliesToWeekday"
-// and "eifelerRegelAppliesToNumber" methods are meant for
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
function processRelativeTime(number, withoutSuffix, key, isFuture) {
var format = {
'm': ['eng Minutt', 'enger Minutt'],
'h': ['eng Stonn', 'enger Stonn'],
'd': ['een Dag', 'engem Dag'],
- 'dd': [number + ' Deeg', number + ' Deeg'],
'M': ['ee Mount', 'engem Mount'],
- 'MM': [number + ' Méint', number + ' Méint'],
- 'y': ['ee Joer', 'engem Joer'],
- 'yy': [number + ' Joer', number + ' Joer']
+ 'y': ['ee Joer', 'engem Joer']
};
return withoutSuffix ? format[key][0] : format[key][1];
}
-
function processFutureTime(string) {
var number = string.substr(0, string.indexOf(' '));
if (eifelerRegelAppliesToNumber(number)) {
- return "a " + string;
+ return 'a ' + string;
}
- return "an " + string;
+ return 'an ' + string;
}
-
function processPastTime(string) {
var number = string.substr(0, string.indexOf(' '));
if (eifelerRegelAppliesToNumber(number)) {
- return "viru " + string;
+ return 'viru ' + string;
}
- return "virun " + string;
+ return 'virun ' + string;
}
-
- function processLastWeek(string1) {
- var weekday = this.format('d');
- if (eifelerRegelAppliesToWeekday(weekday)) {
- return '[Leschte] dddd [um] LT';
- }
- return '[Leschten] dddd [um] LT';
- }
-
/**
- * Returns true if the word before the given week day loses the "-n" ending.
- * e.g. "Leschten Dënschdeg" but "Leschte Méindeg"
- *
- * @param weekday {integer}
- * @returns {boolean}
- */
- function eifelerRegelAppliesToWeekday(weekday) {
- weekday = parseInt(weekday, 10);
- switch (weekday) {
- case 0: // Sonndeg
- case 1: // Méindeg
- case 3: // Mëttwoch
- case 5: // Freideg
- case 6: // Samschdeg
- return true;
- default: // 2 Dënschdeg, 4 Donneschdeg
- return false;
- }
- }
-
- /**
- * Returns true if the word before the given number loses the "-n" ending.
- * e.g. "an 10 Deeg" but "a 5 Deeg"
+ * Returns true if the word before the given number loses the '-n' ending.
+ * e.g. 'an 10 Deeg' but 'a 5 Deeg'
*
* @param number {integer}
* @returns {boolean}
@@ -115,46 +75,62 @@
}
}
- return moment.lang('lb', {
- months: "Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),
- monthsShort: "Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),
- weekdays: "Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg".split("_"),
- weekdaysShort: "So._Mé._Dë._Më._Do._Fr._Sa.".split("_"),
- weekdaysMin: "So_Mé_Dë_Më_Do_Fr_Sa".split("_"),
+ var lb = moment.defineLocale('lb', {
+ months: 'Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'),
+ monthsShort: 'Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split('_'),
+ monthsParseExact : true,
+ weekdays: 'Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg'.split('_'),
+ weekdaysShort: 'So._Mé._Dë._Më._Do._Fr._Sa.'.split('_'),
+ weekdaysMin: 'So_Mé_Dë_Më_Do_Fr_Sa'.split('_'),
+ weekdaysParseExact : true,
longDateFormat: {
- LT: "H:mm [Auer]",
- L: "DD.MM.YYYY",
- LL: "D. MMMM YYYY",
- LLL: "D. MMMM YYYY LT",
- LLLL: "dddd, D. MMMM YYYY LT"
+ LT: 'H:mm [Auer]',
+ LTS: 'H:mm:ss [Auer]',
+ L: 'DD.MM.YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY H:mm [Auer]',
+ LLLL: 'dddd, D. MMMM YYYY H:mm [Auer]'
},
calendar: {
- sameDay: "[Haut um] LT",
- sameElse: "L",
+ sameDay: '[Haut um] LT',
+ sameElse: 'L',
nextDay: '[Muer um] LT',
nextWeek: 'dddd [um] LT',
lastDay: '[Gëschter um] LT',
- lastWeek: processLastWeek
+ lastWeek: function () {
+ // Different date string for 'Dënschdeg' (Tuesday) and 'Donneschdeg' (Thursday) due to phonological rule
+ switch (this.day()) {
+ case 2:
+ case 4:
+ return '[Leschten] dddd [um] LT';
+ default:
+ return '[Leschte] dddd [um] LT';
+ }
+ }
},
- relativeTime: {
- future: processFutureTime,
- past: processPastTime,
- s: "e puer Sekonnen",
- m: processRelativeTime,
- mm: "%d Minutten",
- h: processRelativeTime,
- hh: "%d Stonnen",
- d: processRelativeTime,
- dd: processRelativeTime,
- M: processRelativeTime,
- MM: processRelativeTime,
- y: processRelativeTime,
- yy: processRelativeTime
+ relativeTime : {
+ future : processFutureTime,
+ past : processPastTime,
+ s : 'e puer Sekonnen',
+ m : processRelativeTime,
+ mm : '%d Minutten',
+ h : processRelativeTime,
+ hh : '%d Stonnen',
+ d : processRelativeTime,
+ dd : '%d Deeg',
+ M : processRelativeTime,
+ MM : '%d Méint',
+ y : processRelativeTime,
+ yy : '%d Joer'
},
+ ordinalParse: /\d{1,2}\./,
ordinal: '%d.',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4 // The week that contains Jan 4th is the first week of the year.
}
});
-}));
+
+ return lb;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/lt.js b/rainloop/v/0.0.0/app/localization/moment/lt.js
index 3377375cd..2bb9a36d8 100644
--- a/rainloop/v/0.0.0/app/localization/moment/lt.js
+++ b/rainloop/v/0.0.0/app/localization/moment/lt.js
@@ -1,52 +1,45 @@
-// moment.js language configuration
-// language : Lithuanian (lt)
-// author : Mindaugas Mozūras : https://github.com/mmozuras
+//! moment.js locale configuration
+//! locale : Lithuanian [lt]
+//! author : Mindaugas Mozūras : https://github.com/mmozuras
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
+
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
var units = {
- "m" : "minutė_minutės_minutę",
- "mm": "minutės_minučių_minutes",
- "h" : "valanda_valandos_valandą",
- "hh": "valandos_valandų_valandas",
- "d" : "diena_dienos_dieną",
- "dd": "dienos_dienų_dienas",
- "M" : "mėnuo_mėnesio_mėnesį",
- "MM": "mėnesiai_mėnesių_mėnesius",
- "y" : "metai_metų_metus",
- "yy": "metai_metų_metus"
- },
- weekDays = "pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis_sekmadienis".split("_");
-
+ 'm' : 'minutė_minutės_minutę',
+ 'mm': 'minutės_minučių_minutes',
+ 'h' : 'valanda_valandos_valandą',
+ 'hh': 'valandos_valandų_valandas',
+ 'd' : 'diena_dienos_dieną',
+ 'dd': 'dienos_dienų_dienas',
+ 'M' : 'mėnuo_mėnesio_mėnesį',
+ 'MM': 'mėnesiai_mėnesių_mėnesius',
+ 'y' : 'metai_metų_metus',
+ 'yy': 'metai_metų_metus'
+ };
function translateSeconds(number, withoutSuffix, key, isFuture) {
if (withoutSuffix) {
- return "kelios sekundės";
+ return 'kelios sekundės';
} else {
- return isFuture ? "kelių sekundžių" : "kelias sekundes";
+ return isFuture ? 'kelių sekundžių' : 'kelias sekundes';
}
}
-
function translateSingular(number, withoutSuffix, key, isFuture) {
return withoutSuffix ? forms(key)[0] : (isFuture ? forms(key)[1] : forms(key)[2]);
}
-
function special(number) {
return number % 10 === 0 || (number > 10 && number < 20);
}
-
function forms(key) {
- return units[key].split("_");
+ return units[key].split('_');
}
-
function translate(number, withoutSuffix, key, isFuture) {
- var result = number + " ";
+ var result = number + ' ';
if (number === 1) {
return result + translateSingular(number, withoutSuffix, key[0], isFuture);
} else if (withoutSuffix) {
@@ -59,42 +52,44 @@
}
}
}
-
- function relativeWeekDay(moment, format) {
- var nominative = format.indexOf('dddd HH:mm') === -1,
- weekDay = weekDays[moment.weekday()];
-
- return nominative ? weekDay : weekDay.substring(0, weekDay.length - 2) + "į";
- }
-
- return moment.lang("lt", {
- months : "sausio_vasario_kovo_balandžio_gegužės_biržėlio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio".split("_"),
- monthsShort : "sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd".split("_"),
- weekdays : relativeWeekDay,
- weekdaysShort : "Sek_Pir_Ant_Tre_Ket_Pen_Šeš".split("_"),
- weekdaysMin : "S_P_A_T_K_Pn_Š".split("_"),
+ var lt = moment.defineLocale('lt', {
+ months : {
+ format: 'sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio'.split('_'),
+ standalone: 'sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis'.split('_'),
+ isFormat: /D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?|MMMM?(\[[^\[\]]*\]|\s+)+D[oD]?/
+ },
+ monthsShort : 'sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd'.split('_'),
+ weekdays : {
+ format: 'sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį'.split('_'),
+ standalone: 'sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis'.split('_'),
+ isFormat: /dddd HH:mm/
+ },
+ weekdaysShort : 'Sek_Pir_Ant_Tre_Ket_Pen_Šeš'.split('_'),
+ weekdaysMin : 'S_P_A_T_K_Pn_Š'.split('_'),
+ weekdaysParseExact : true,
longDateFormat : {
- LT : "HH:mm",
- L : "YYYY-MM-DD",
- LL : "YYYY [m.] MMMM D [d.]",
- LLL : "YYYY [m.] MMMM D [d.], LT [val.]",
- LLLL : "YYYY [m.] MMMM D [d.], dddd, LT [val.]",
- l : "YYYY-MM-DD",
- ll : "YYYY [m.] MMMM D [d.]",
- lll : "YYYY [m.] MMMM D [d.], LT [val.]",
- llll : "YYYY [m.] MMMM D [d.], ddd, LT [val.]"
+ LT : 'HH:mm',
+ LTS : 'HH:mm:ss',
+ L : 'YYYY-MM-DD',
+ LL : 'YYYY [m.] MMMM D [d.]',
+ LLL : 'YYYY [m.] MMMM D [d.], HH:mm [val.]',
+ LLLL : 'YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]',
+ l : 'YYYY-MM-DD',
+ ll : 'YYYY [m.] MMMM D [d.]',
+ lll : 'YYYY [m.] MMMM D [d.], HH:mm [val.]',
+ llll : 'YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]'
},
calendar : {
- sameDay : "[Šiandien] LT",
- nextDay : "[Rytoj] LT",
- nextWeek : "dddd LT",
- lastDay : "[Vakar] LT",
- lastWeek : "[Praėjusį] dddd LT",
- sameElse : "L"
+ sameDay : '[Šiandien] LT',
+ nextDay : '[Rytoj] LT',
+ nextWeek : 'dddd LT',
+ lastDay : '[Vakar] LT',
+ lastWeek : '[Praėjusį] dddd LT',
+ sameElse : 'L'
},
relativeTime : {
- future : "po %s",
- past : "prieš %s",
+ future : 'po %s',
+ past : 'prieš %s',
s : translateSeconds,
m : translateSingular,
mm : translate,
@@ -107,6 +102,7 @@
y : translateSingular,
yy : translate
},
+ ordinalParse: /\d{1,2}-oji/,
ordinal : function (number) {
return number + '-oji';
},
@@ -115,4 +111,7 @@
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
-}));
+
+ return lt;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/lv.js b/rainloop/v/0.0.0/app/localization/moment/lv.js
index ffe25cfe4..780be1398 100644
--- a/rainloop/v/0.0.0/app/localization/moment/lv.js
+++ b/rainloop/v/0.0.0/app/localization/moment/lv.js
@@ -1,49 +1,65 @@
-// moment.js language configuration
-// language : latvian (lv)
-// author : Kristaps Karlsons : https://github.com/skakri
+//! moment.js locale configuration
+//! locale : Latvian [lv]
+//! author : Kristaps Karlsons : https://github.com/skakri
+//! author : Jānis Elmeris : https://github.com/JanisE
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
+
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
var units = {
- 'mm': 'minūti_minūtes_minūte_minūtes',
- 'hh': 'stundu_stundas_stunda_stundas',
- 'dd': 'dienu_dienas_diena_dienas',
- 'MM': 'mēnesi_mēnešus_mēnesis_mēneši',
- 'yy': 'gadu_gadus_gads_gadi'
+ 'm': 'minūtes_minūtēm_minūte_minūtes'.split('_'),
+ 'mm': 'minūtes_minūtēm_minūte_minūtes'.split('_'),
+ 'h': 'stundas_stundām_stunda_stundas'.split('_'),
+ 'hh': 'stundas_stundām_stunda_stundas'.split('_'),
+ 'd': 'dienas_dienām_diena_dienas'.split('_'),
+ 'dd': 'dienas_dienām_diena_dienas'.split('_'),
+ 'M': 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),
+ 'MM': 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),
+ 'y': 'gada_gadiem_gads_gadi'.split('_'),
+ 'yy': 'gada_gadiem_gads_gadi'.split('_')
};
-
- function format(word, number, withoutSuffix) {
- var forms = word.split('_');
+ /**
+ * @param withoutSuffix boolean true = a length of time; false = before/after a period of time.
+ */
+ function format(forms, number, withoutSuffix) {
if (withoutSuffix) {
- return number % 10 === 1 && number !== 11 ? forms[2] : forms[3];
+ // E.g. "21 minūte", "3 minūtes".
+ return number % 10 === 1 && number % 100 !== 11 ? forms[2] : forms[3];
} else {
- return number % 10 === 1 && number !== 11 ? forms[0] : forms[1];
+ // E.g. "21 minūtes" as in "pēc 21 minūtes".
+ // E.g. "3 minūtēm" as in "pēc 3 minūtēm".
+ return number % 10 === 1 && number % 100 !== 11 ? forms[0] : forms[1];
}
}
-
function relativeTimeWithPlural(number, withoutSuffix, key) {
return number + ' ' + format(units[key], number, withoutSuffix);
}
+ function relativeTimeWithSingular(number, withoutSuffix, key) {
+ return format(units[key], number, withoutSuffix);
+ }
+ function relativeSeconds(number, withoutSuffix) {
+ return withoutSuffix ? 'dažas sekundes' : 'dažām sekundēm';
+ }
- return moment.lang('lv', {
- months : "janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris".split("_"),
- monthsShort : "jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec".split("_"),
- weekdays : "svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena".split("_"),
- weekdaysShort : "Sv_P_O_T_C_Pk_S".split("_"),
- weekdaysMin : "Sv_P_O_T_C_Pk_S".split("_"),
+ var lv = moment.defineLocale('lv', {
+ months : 'janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris'.split('_'),
+ monthsShort : 'jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec'.split('_'),
+ weekdays : 'svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena'.split('_'),
+ weekdaysShort : 'Sv_P_O_T_C_Pk_S'.split('_'),
+ weekdaysMin : 'Sv_P_O_T_C_Pk_S'.split('_'),
+ weekdaysParseExact : true,
longDateFormat : {
- LT : "HH:mm",
- L : "DD.MM.YYYY",
- LL : "YYYY. [gada] D. MMMM",
- LLL : "YYYY. [gada] D. MMMM, LT",
- LLLL : "YYYY. [gada] D. MMMM, dddd, LT"
+ LT : 'HH:mm',
+ LTS : 'HH:mm:ss',
+ L : 'DD.MM.YYYY.',
+ LL : 'YYYY. [gada] D. MMMM',
+ LLL : 'YYYY. [gada] D. MMMM, HH:mm',
+ LLLL : 'YYYY. [gada] D. MMMM, dddd, HH:mm'
},
calendar : {
sameDay : '[Šodien pulksten] LT',
@@ -54,24 +70,28 @@
sameElse : 'L'
},
relativeTime : {
- future : "%s vēlāk",
- past : "%s agrāk",
- s : "dažas sekundes",
- m : "minūti",
+ future : 'pēc %s',
+ past : 'pirms %s',
+ s : relativeSeconds,
+ m : relativeTimeWithSingular,
mm : relativeTimeWithPlural,
- h : "stundu",
+ h : relativeTimeWithSingular,
hh : relativeTimeWithPlural,
- d : "dienu",
+ d : relativeTimeWithSingular,
dd : relativeTimeWithPlural,
- M : "mēnesi",
+ M : relativeTimeWithSingular,
MM : relativeTimeWithPlural,
- y : "gadu",
+ y : relativeTimeWithSingular,
yy : relativeTimeWithPlural
},
+ ordinalParse: /\d{1,2}\./,
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
-}));
+
+ return lv;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/mk.js b/rainloop/v/0.0.0/app/localization/moment/mk.js
index 5f272fa2d..88413ace2 100644
--- a/rainloop/v/0.0.0/app/localization/moment/mk.js
+++ b/rainloop/v/0.0.0/app/localization/moment/mk.js
@@ -1,64 +1,65 @@
-// moment.js language configuration
-// language : macedonian (mk)
-// author : Borislav Mickov : https://github.com/B0k0
+//! moment.js locale configuration
+//! locale : Macedonian [mk]
+//! author : Borislav Mickov : https://github.com/B0k0
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
- return moment.lang('mk', {
- months : "јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември".split("_"),
- monthsShort : "јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек".split("_"),
- weekdays : "недела_понеделник_вторник_среда_четврток_петок_сабота".split("_"),
- weekdaysShort : "нед_пон_вто_сре_чет_пет_саб".split("_"),
- weekdaysMin : "нe_пo_вт_ср_че_пе_сa".split("_"),
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
+
+
+ var mk = moment.defineLocale('mk', {
+ months : 'јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември'.split('_'),
+ monthsShort : 'јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек'.split('_'),
+ weekdays : 'недела_понеделник_вторник_среда_четврток_петок_сабота'.split('_'),
+ weekdaysShort : 'нед_пон_вто_сре_чет_пет_саб'.split('_'),
+ weekdaysMin : 'нe_пo_вт_ср_че_пе_сa'.split('_'),
longDateFormat : {
- LT : "H:mm",
- L : "D.MM.YYYY",
- LL : "D MMMM YYYY",
- LLL : "D MMMM YYYY LT",
- LLLL : "dddd, D MMMM YYYY LT"
+ LT : 'H:mm',
+ LTS : 'H:mm:ss',
+ L : 'D.MM.YYYY',
+ LL : 'D MMMM YYYY',
+ LLL : 'D MMMM YYYY H:mm',
+ LLLL : 'dddd, D MMMM YYYY H:mm'
},
calendar : {
sameDay : '[Денес во] LT',
nextDay : '[Утре во] LT',
- nextWeek : 'dddd [во] LT',
+ nextWeek : '[Во] dddd [во] LT',
lastDay : '[Вчера во] LT',
lastWeek : function () {
switch (this.day()) {
- case 0:
- case 3:
- case 6:
- return '[Во изминатата] dddd [во] LT';
- case 1:
- case 2:
- case 4:
- case 5:
- return '[Во изминатиот] dddd [во] LT';
+ case 0:
+ case 3:
+ case 6:
+ return '[Изминатата] dddd [во] LT';
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ return '[Изминатиот] dddd [во] LT';
}
},
sameElse : 'L'
},
relativeTime : {
- future : "после %s",
- past : "пред %s",
- s : "неколку секунди",
- m : "минута",
- mm : "%d минути",
- h : "час",
- hh : "%d часа",
- d : "ден",
- dd : "%d дена",
- M : "месец",
- MM : "%d месеци",
- y : "година",
- yy : "%d години"
+ future : 'после %s',
+ past : 'пред %s',
+ s : 'неколку секунди',
+ m : 'минута',
+ mm : '%d минути',
+ h : 'час',
+ hh : '%d часа',
+ d : 'ден',
+ dd : '%d дена',
+ M : 'месец',
+ MM : '%d месеци',
+ y : 'година',
+ yy : '%d години'
},
+ ordinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/,
ordinal : function (number) {
var lastDigit = number % 10,
last2Digits = number % 100;
@@ -83,4 +84,7 @@
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
});
-}));
+
+ return mk;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/ml.js b/rainloop/v/0.0.0/app/localization/moment/ml.js
index cc7db9a30..487b37a63 100644
--- a/rainloop/v/0.0.0/app/localization/moment/ml.js
+++ b/rainloop/v/0.0.0/app/localization/moment/ml.js
@@ -1,28 +1,29 @@
-// moment.js language configuration
-// language : malayalam (ml)
-// author : Floyd Pink : https://github.com/floydpink
+//! moment.js locale configuration
+//! locale : Malayalam [ml]
+//! author : Floyd Pink : https://github.com/floydpink
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
- return moment.lang('ml', {
- months : 'ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ'.split("_"),
- monthsShort : 'ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.'.split("_"),
- weekdays : 'ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച'.split("_"),
- weekdaysShort : 'ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി'.split("_"),
- weekdaysMin : 'ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ'.split("_"),
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
+
+
+ var ml = moment.defineLocale('ml', {
+ months : 'ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ'.split('_'),
+ monthsShort : 'ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.'.split('_'),
+ monthsParseExact : true,
+ weekdays : 'ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച'.split('_'),
+ weekdaysShort : 'ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി'.split('_'),
+ weekdaysMin : 'ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ'.split('_'),
longDateFormat : {
- LT : "A h:mm -നു",
- L : "DD/MM/YYYY",
- LL : "D MMMM YYYY",
- LLL : "D MMMM YYYY, LT",
- LLLL : "dddd, D MMMM YYYY, LT"
+ LT : 'A h:mm -നു',
+ LTS : 'A h:mm:ss -നു',
+ L : 'DD/MM/YYYY',
+ LL : 'D MMMM YYYY',
+ LLL : 'D MMMM YYYY, A h:mm -നു',
+ LLLL : 'dddd, D MMMM YYYY, A h:mm -നു'
},
calendar : {
sameDay : '[ഇന്ന്] LT',
@@ -33,32 +34,48 @@
sameElse : 'L'
},
relativeTime : {
- future : "%s കഴിഞ്ഞ്",
- past : "%s മുൻപ്",
- s : "അൽപ നിമിഷങ്ങൾ",
- m : "ഒരു മിനിറ്റ്",
- mm : "%d മിനിറ്റ്",
- h : "ഒരു മണിക്കൂർ",
- hh : "%d മണിക്കൂർ",
- d : "ഒരു ദിവസം",
- dd : "%d ദിവസം",
- M : "ഒരു മാസം",
- MM : "%d മാസം",
- y : "ഒരു വർഷം",
- yy : "%d വർഷം"
+ future : '%s കഴിഞ്ഞ്',
+ past : '%s മുൻപ്',
+ s : 'അൽപ നിമിഷങ്ങൾ',
+ m : 'ഒരു മിനിറ്റ്',
+ mm : '%d മിനിറ്റ്',
+ h : 'ഒരു മണിക്കൂർ',
+ hh : '%d മണിക്കൂർ',
+ d : 'ഒരു ദിവസം',
+ dd : '%d ദിവസം',
+ M : 'ഒരു മാസം',
+ MM : '%d മാസം',
+ y : 'ഒരു വർഷം',
+ yy : '%d വർഷം'
+ },
+ meridiemParse: /രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i,
+ meridiemHour : function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if ((meridiem === 'രാത്രി' && hour >= 4) ||
+ meridiem === 'ഉച്ച കഴിഞ്ഞ്' ||
+ meridiem === 'വൈകുന്നേരം') {
+ return hour + 12;
+ } else {
+ return hour;
+ }
},
meridiem : function (hour, minute, isLower) {
if (hour < 4) {
- return "രാത്രി";
+ return 'രാത്രി';
} else if (hour < 12) {
- return "രാവിലെ";
+ return 'രാവിലെ';
} else if (hour < 17) {
- return "ഉച്ച കഴിഞ്ഞ്";
+ return 'ഉച്ച കഴിഞ്ഞ്';
} else if (hour < 20) {
- return "വൈകുന്നേരം";
+ return 'വൈകുന്നേരം';
} else {
- return "രാത്രി";
+ return 'രാത്രി';
}
}
});
-}));
+
+ return ml;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/mr.js b/rainloop/v/0.0.0/app/localization/moment/mr.js
index 0d1adfd64..fc388b013 100644
--- a/rainloop/v/0.0.0/app/localization/moment/mr.js
+++ b/rainloop/v/0.0.0/app/localization/moment/mr.js
@@ -1,16 +1,16 @@
-// moment.js language configuration
-// language : Marathi (mr)
-// author : Harshad Kale : https://github.com/kalehv
+//! moment.js locale configuration
+//! locale : Marathi [mr]
+//! author : Harshad Kale : https://github.com/kalehv
+//! author : Vivek Athalye : https://github.com/vnathalye
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
+
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
var symbolMap = {
'1': '१',
'2': '२',
@@ -36,18 +36,56 @@
'०': '0'
};
- return moment.lang('mr', {
- months : 'जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split("_"),
- monthsShort: 'जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split("_"),
- weekdays : 'रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split("_"),
- weekdaysShort : 'रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि'.split("_"),
- weekdaysMin : 'र_सो_मं_बु_गु_शु_श'.split("_"),
+ function relativeTimeMr(number, withoutSuffix, string, isFuture)
+ {
+ var output = '';
+ if (withoutSuffix) {
+ switch (string) {
+ case 's': output = 'काही सेकंद'; break;
+ case 'm': output = 'एक मिनिट'; break;
+ case 'mm': output = '%d मिनिटे'; break;
+ case 'h': output = 'एक तास'; break;
+ case 'hh': output = '%d तास'; break;
+ case 'd': output = 'एक दिवस'; break;
+ case 'dd': output = '%d दिवस'; break;
+ case 'M': output = 'एक महिना'; break;
+ case 'MM': output = '%d महिने'; break;
+ case 'y': output = 'एक वर्ष'; break;
+ case 'yy': output = '%d वर्षे'; break;
+ }
+ }
+ else {
+ switch (string) {
+ case 's': output = 'काही सेकंदां'; break;
+ case 'm': output = 'एका मिनिटा'; break;
+ case 'mm': output = '%d मिनिटां'; break;
+ case 'h': output = 'एका तासा'; break;
+ case 'hh': output = '%d तासां'; break;
+ case 'd': output = 'एका दिवसा'; break;
+ case 'dd': output = '%d दिवसां'; break;
+ case 'M': output = 'एका महिन्या'; break;
+ case 'MM': output = '%d महिन्यां'; break;
+ case 'y': output = 'एका वर्षा'; break;
+ case 'yy': output = '%d वर्षां'; break;
+ }
+ }
+ return output.replace(/%d/i, number);
+ }
+
+ var mr = moment.defineLocale('mr', {
+ months : 'जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split('_'),
+ monthsShort: 'जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split('_'),
+ monthsParseExact : true,
+ weekdays : 'रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),
+ weekdaysShort : 'रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि'.split('_'),
+ weekdaysMin : 'र_सो_मं_बु_गु_शु_श'.split('_'),
longDateFormat : {
- LT : "A h:mm वाजता",
- L : "DD/MM/YYYY",
- LL : "D MMMM YYYY",
- LLL : "D MMMM YYYY, LT",
- LLLL : "dddd, D MMMM YYYY, LT"
+ LT : 'A h:mm वाजता',
+ LTS : 'A h:mm:ss वाजता',
+ L : 'DD/MM/YYYY',
+ LL : 'D MMMM YYYY',
+ LLL : 'D MMMM YYYY, A h:mm वाजता',
+ LLLL : 'dddd, D MMMM YYYY, A h:mm वाजता'
},
calendar : {
sameDay : '[आज] LT',
@@ -58,19 +96,19 @@
sameElse : 'L'
},
relativeTime : {
- future : "%s नंतर",
- past : "%s पूर्वी",
- s : "सेकंद",
- m: "एक मिनिट",
- mm: "%d मिनिटे",
- h : "एक तास",
- hh : "%d तास",
- d : "एक दिवस",
- dd : "%d दिवस",
- M : "एक महिना",
- MM : "%d महिने",
- y : "एक वर्ष",
- yy : "%d वर्षे"
+ future: '%sमध्ये',
+ past: '%sपूर्वी',
+ s: relativeTimeMr,
+ m: relativeTimeMr,
+ mm: relativeTimeMr,
+ h: relativeTimeMr,
+ hh: relativeTimeMr,
+ d: relativeTimeMr,
+ dd: relativeTimeMr,
+ M: relativeTimeMr,
+ MM: relativeTimeMr,
+ y: relativeTimeMr,
+ yy: relativeTimeMr
},
preparse: function (string) {
return string.replace(/[१२३४५६७८९०]/g, function (match) {
@@ -82,18 +120,32 @@
return symbolMap[match];
});
},
- meridiem: function (hour, minute, isLower)
- {
+ meridiemParse: /रात्री|सकाळी|दुपारी|सायंकाळी/,
+ meridiemHour : function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'रात्री') {
+ return hour < 4 ? hour : hour + 12;
+ } else if (meridiem === 'सकाळी') {
+ return hour;
+ } else if (meridiem === 'दुपारी') {
+ return hour >= 10 ? hour : hour + 12;
+ } else if (meridiem === 'सायंकाळी') {
+ return hour + 12;
+ }
+ },
+ meridiem: function (hour, minute, isLower) {
if (hour < 4) {
- return "रात्री";
+ return 'रात्री';
} else if (hour < 10) {
- return "सकाळी";
+ return 'सकाळी';
} else if (hour < 17) {
- return "दुपारी";
+ return 'दुपारी';
} else if (hour < 20) {
- return "सायंकाळी";
+ return 'सायंकाळी';
} else {
- return "रात्री";
+ return 'रात्री';
}
},
week : {
@@ -101,4 +153,7 @@
doy : 6 // The week that contains Jan 1st is the first week of the year.
}
});
-}));
+
+ return mr;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/ms-my.js b/rainloop/v/0.0.0/app/localization/moment/ms-my.js
index 501d5aaa0..e353173a9 100644
--- a/rainloop/v/0.0.0/app/localization/moment/ms-my.js
+++ b/rainloop/v/0.0.0/app/localization/moment/ms-my.js
@@ -1,28 +1,42 @@
-// moment.js language configuration
-// language : Bahasa Malaysia (ms-MY)
-// author : Weldan Jamili : https://github.com/weldan
+//! moment.js locale configuration
+//! locale : Malay [ms-my]
+//! note : DEPRECATED, the correct one is [ms]
+//! author : Weldan Jamili : https://github.com/weldan
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
- return moment.lang('ms-my', {
- months : "Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),
- monthsShort : "Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),
- weekdays : "Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),
- weekdaysShort : "Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),
- weekdaysMin : "Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
+
+
+ var ms_my = moment.defineLocale('ms-my', {
+ months : 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split('_'),
+ monthsShort : 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'),
+ weekdays : 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),
+ weekdaysShort : 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),
+ weekdaysMin : 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),
longDateFormat : {
- LT : "HH.mm",
- L : "DD/MM/YYYY",
- LL : "D MMMM YYYY",
- LLL : "D MMMM YYYY [pukul] LT",
- LLLL : "dddd, D MMMM YYYY [pukul] LT"
+ LT : 'HH.mm',
+ LTS : 'HH.mm.ss',
+ L : 'DD/MM/YYYY',
+ LL : 'D MMMM YYYY',
+ LLL : 'D MMMM YYYY [pukul] HH.mm',
+ LLLL : 'dddd, D MMMM YYYY [pukul] HH.mm'
+ },
+ meridiemParse: /pagi|tengahari|petang|malam/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'pagi') {
+ return hour;
+ } else if (meridiem === 'tengahari') {
+ return hour >= 11 ? hour : hour + 12;
+ } else if (meridiem === 'petang' || meridiem === 'malam') {
+ return hour + 12;
+ }
},
meridiem : function (hours, minutes, isLower) {
if (hours < 11) {
@@ -44,23 +58,26 @@
sameElse : 'L'
},
relativeTime : {
- future : "dalam %s",
- past : "%s yang lepas",
- s : "beberapa saat",
- m : "seminit",
- mm : "%d minit",
- h : "sejam",
- hh : "%d jam",
- d : "sehari",
- dd : "%d hari",
- M : "sebulan",
- MM : "%d bulan",
- y : "setahun",
- yy : "%d tahun"
+ future : 'dalam %s',
+ past : '%s yang lepas',
+ s : 'beberapa saat',
+ m : 'seminit',
+ mm : '%d minit',
+ h : 'sejam',
+ hh : '%d jam',
+ d : 'sehari',
+ dd : '%d hari',
+ M : 'sebulan',
+ MM : '%d bulan',
+ y : 'setahun',
+ yy : '%d tahun'
},
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
});
-}));
+
+ return ms_my;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/nb.js b/rainloop/v/0.0.0/app/localization/moment/nb.js
index 2f652efd1..592734d6c 100644
--- a/rainloop/v/0.0.0/app/localization/moment/nb.js
+++ b/rainloop/v/0.0.0/app/localization/moment/nb.js
@@ -1,29 +1,31 @@
-// moment.js language configuration
-// language : norwegian bokmål (nb)
-// authors : Espen Hovlandsdal : https://github.com/rexxars
-// Sigurd Gartmann : https://github.com/sigurdga
+//! moment.js locale configuration
+//! locale : Norwegian Bokmål [nb]
+//! authors : Espen Hovlandsdal : https://github.com/rexxars
+//! Sigurd Gartmann : https://github.com/sigurdga
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
- return moment.lang('nb', {
- months : "januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),
- monthsShort : "jan._feb._mars_april_mai_juni_juli_aug._sep._okt._nov._des.".split("_"),
- weekdays : "søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),
- weekdaysShort : "sø._ma._ti._on._to._fr._lø.".split("_"),
- weekdaysMin : "sø_ma_ti_on_to_fr_lø".split("_"),
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
+
+
+ var nb = moment.defineLocale('nb', {
+ months : 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split('_'),
+ monthsShort : 'jan._feb._mars_april_mai_juni_juli_aug._sep._okt._nov._des.'.split('_'),
+ monthsParseExact : true,
+ weekdays : 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),
+ weekdaysShort : 'sø._ma._ti._on._to._fr._lø.'.split('_'),
+ weekdaysMin : 'sø_ma_ti_on_to_fr_lø'.split('_'),
+ weekdaysParseExact : true,
longDateFormat : {
- LT : "H.mm",
- L : "DD.MM.YYYY",
- LL : "D. MMMM YYYY",
- LLL : "D. MMMM YYYY [kl.] LT",
- LLLL : "dddd D. MMMM YYYY [kl.] LT"
+ LT : 'HH:mm',
+ LTS : 'HH:mm:ss',
+ L : 'DD.MM.YYYY',
+ LL : 'D. MMMM YYYY',
+ LLL : 'D. MMMM YYYY [kl.] HH:mm',
+ LLLL : 'dddd D. MMMM YYYY [kl.] HH:mm'
},
calendar : {
sameDay: '[i dag kl.] LT',
@@ -34,24 +36,28 @@
sameElse: 'L'
},
relativeTime : {
- future : "om %s",
- past : "for %s siden",
- s : "noen sekunder",
- m : "ett minutt",
- mm : "%d minutter",
- h : "en time",
- hh : "%d timer",
- d : "en dag",
- dd : "%d dager",
- M : "en måned",
- MM : "%d måneder",
- y : "ett år",
- yy : "%d år"
+ future : 'om %s',
+ past : '%s siden',
+ s : 'noen sekunder',
+ m : 'ett minutt',
+ mm : '%d minutter',
+ h : 'en time',
+ hh : '%d timer',
+ d : 'en dag',
+ dd : '%d dager',
+ M : 'en måned',
+ MM : '%d måneder',
+ y : 'ett år',
+ yy : '%d år'
},
+ ordinalParse: /\d{1,2}\./,
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
-}));
+
+ return nb;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/ne.js b/rainloop/v/0.0.0/app/localization/moment/ne.js
index 1d57b8cbf..85de195ea 100644
--- a/rainloop/v/0.0.0/app/localization/moment/ne.js
+++ b/rainloop/v/0.0.0/app/localization/moment/ne.js
@@ -1,16 +1,15 @@
-// moment.js language configuration
-// language : nepali/nepalese
-// author : suvash : https://github.com/suvash
+//! moment.js locale configuration
+//! locale : Nepalese [ne]
+//! author : suvash : https://github.com/suvash
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
+
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
var symbolMap = {
'1': '१',
'2': '२',
@@ -36,18 +35,21 @@
'०': '0'
};
- return moment.lang('ne', {
- months : 'जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर'.split("_"),
- monthsShort : 'जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.'.split("_"),
- weekdays : 'आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार'.split("_"),
- weekdaysShort : 'आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.'.split("_"),
- weekdaysMin : 'आइ._सो._मङ्_बु._बि._शु._श.'.split("_"),
+ var ne = moment.defineLocale('ne', {
+ months : 'जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर'.split('_'),
+ monthsShort : 'जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.'.split('_'),
+ monthsParseExact : true,
+ weekdays : 'आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार'.split('_'),
+ weekdaysShort : 'आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.'.split('_'),
+ weekdaysMin : 'आ._सो._मं._बु._बि._शु._श.'.split('_'),
+ weekdaysParseExact : true,
longDateFormat : {
- LT : "Aको h:mm बजे",
- L : "DD/MM/YYYY",
- LL : "D MMMM YYYY",
- LLL : "D MMMM YYYY, LT",
- LLLL : "dddd, D MMMM YYYY, LT"
+ LT : 'Aको h:mm बजे',
+ LTS : 'Aको h:mm:ss बजे',
+ L : 'DD/MM/YYYY',
+ LL : 'D MMMM YYYY',
+ LLL : 'D MMMM YYYY, Aको h:mm बजे',
+ LLLL : 'dddd, D MMMM YYYY, Aको h:mm बजे'
},
preparse: function (string) {
return string.replace(/[१२३४५६७८९०]/g, function (match) {
@@ -59,47 +61,63 @@
return symbolMap[match];
});
},
+ meridiemParse: /राति|बिहान|दिउँसो|साँझ/,
+ meridiemHour : function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'राति') {
+ return hour < 4 ? hour : hour + 12;
+ } else if (meridiem === 'बिहान') {
+ return hour;
+ } else if (meridiem === 'दिउँसो') {
+ return hour >= 10 ? hour : hour + 12;
+ } else if (meridiem === 'साँझ') {
+ return hour + 12;
+ }
+ },
meridiem : function (hour, minute, isLower) {
if (hour < 3) {
- return "राती";
- } else if (hour < 10) {
- return "बिहान";
- } else if (hour < 15) {
- return "दिउँसो";
- } else if (hour < 18) {
- return "बेलुका";
+ return 'राति';
+ } else if (hour < 12) {
+ return 'बिहान';
+ } else if (hour < 16) {
+ return 'दिउँसो';
} else if (hour < 20) {
- return "साँझ";
+ return 'साँझ';
} else {
- return "राती";
+ return 'राति';
}
},
calendar : {
sameDay : '[आज] LT',
- nextDay : '[भोली] LT',
+ nextDay : '[भोलि] LT',
nextWeek : '[आउँदो] dddd[,] LT',
lastDay : '[हिजो] LT',
lastWeek : '[गएको] dddd[,] LT',
sameElse : 'L'
},
relativeTime : {
- future : "%sमा",
- past : "%s अगाडी",
- s : "केही समय",
- m : "एक मिनेट",
- mm : "%d मिनेट",
- h : "एक घण्टा",
- hh : "%d घण्टा",
- d : "एक दिन",
- dd : "%d दिन",
- M : "एक महिना",
- MM : "%d महिना",
- y : "एक बर्ष",
- yy : "%d बर्ष"
+ future : '%sमा',
+ past : '%s अगाडि',
+ s : 'केही क्षण',
+ m : 'एक मिनेट',
+ mm : '%d मिनेट',
+ h : 'एक घण्टा',
+ hh : '%d घण्टा',
+ d : 'एक दिन',
+ dd : '%d दिन',
+ M : 'एक महिना',
+ MM : '%d महिना',
+ y : 'एक बर्ष',
+ yy : '%d बर्ष'
},
week : {
- dow : 1, // Monday is the first day of the week.
- doy : 7 // The week that contains Jan 1st is the first week of the year.
+ dow : 0, // Sunday is the first day of the week.
+ doy : 6 // The week that contains Jan 1st is the first week of the year.
}
});
-}));
+
+ return ne;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/nl.js b/rainloop/v/0.0.0/app/localization/moment/nl.js
index ffd454faf..724930a76 100644
--- a/rainloop/v/0.0.0/app/localization/moment/nl.js
+++ b/rainloop/v/0.0.0/app/localization/moment/nl.js
@@ -1,21 +1,20 @@
-// moment.js language configuration
-// language : dutch (nl)
-// author : Joris Röling : https://github.com/jjupiter
+//! moment.js locale configuration
+//! locale : Dutch [nl]
+//! author : Joris Röling : https://github.com/jjupiter
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
- var monthsShortWithDots = "jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),
- monthsShortWithoutDots = "jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_");
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
- return moment.lang('nl', {
- months : "januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),
+
+ var monthsShortWithDots = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_'),
+ monthsShortWithoutDots = 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_');
+
+ var nl = moment.defineLocale('nl', {
+ months : 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split('_'),
monthsShort : function (m, format) {
if (/-MMM-/.test(format)) {
return monthsShortWithoutDots[m.month()];
@@ -23,15 +22,18 @@
return monthsShortWithDots[m.month()];
}
},
- weekdays : "zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),
- weekdaysShort : "zo._ma._di._wo._do._vr._za.".split("_"),
- weekdaysMin : "Zo_Ma_Di_Wo_Do_Vr_Za".split("_"),
+ monthsParseExact : true,
+ weekdays : 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),
+ weekdaysShort : 'zo._ma._di._wo._do._vr._za.'.split('_'),
+ weekdaysMin : 'Zo_Ma_Di_Wo_Do_Vr_Za'.split('_'),
+ weekdaysParseExact : true,
longDateFormat : {
- LT : "HH:mm",
- L : "DD-MM-YYYY",
- LL : "D MMMM YYYY",
- LLL : "D MMMM YYYY LT",
- LLLL : "dddd D MMMM YYYY LT"
+ LT : 'HH:mm',
+ LTS : 'HH:mm:ss',
+ L : 'DD-MM-YYYY',
+ LL : 'D MMMM YYYY',
+ LLL : 'D MMMM YYYY HH:mm',
+ LLLL : 'dddd D MMMM YYYY HH:mm'
},
calendar : {
sameDay: '[vandaag om] LT',
@@ -42,20 +44,21 @@
sameElse: 'L'
},
relativeTime : {
- future : "over %s",
- past : "%s geleden",
- s : "een paar seconden",
- m : "één minuut",
- mm : "%d minuten",
- h : "één uur",
- hh : "%d uur",
- d : "één dag",
- dd : "%d dagen",
- M : "één maand",
- MM : "%d maanden",
- y : "één jaar",
- yy : "%d jaar"
+ future : 'over %s',
+ past : '%s geleden',
+ s : 'een paar seconden',
+ m : 'één minuut',
+ mm : '%d minuten',
+ h : 'één uur',
+ hh : '%d uur',
+ d : 'één dag',
+ dd : '%d dagen',
+ M : 'één maand',
+ MM : '%d maanden',
+ y : 'één jaar',
+ yy : '%d jaar'
},
+ ordinalParse: /\d{1,2}(ste|de)/,
ordinal : function (number) {
return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de');
},
@@ -64,4 +67,7 @@
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
-}));
+
+ return nl;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/nn.js b/rainloop/v/0.0.0/app/localization/moment/nn.js
index 8c1510855..cb3307d3d 100644
--- a/rainloop/v/0.0.0/app/localization/moment/nn.js
+++ b/rainloop/v/0.0.0/app/localization/moment/nn.js
@@ -1,28 +1,28 @@
-// moment.js language configuration
-// language : norwegian nynorsk (nn)
-// author : https://github.com/mechuwind
+//! moment.js locale configuration
+//! locale : Nynorsk [nn]
+//! author : https://github.com/mechuwind
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
- return moment.lang('nn', {
- months : "januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),
- monthsShort : "jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),
- weekdays : "sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag".split("_"),
- weekdaysShort : "sun_mån_tys_ons_tor_fre_lau".split("_"),
- weekdaysMin : "su_må_ty_on_to_fr_lø".split("_"),
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
+
+
+ var nn = moment.defineLocale('nn', {
+ months : 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split('_'),
+ monthsShort : 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'),
+ weekdays : 'sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag'.split('_'),
+ weekdaysShort : 'sun_mån_tys_ons_tor_fre_lau'.split('_'),
+ weekdaysMin : 'su_må_ty_on_to_fr_lø'.split('_'),
longDateFormat : {
- LT : "HH:mm",
- L : "DD.MM.YYYY",
- LL : "D MMMM YYYY",
- LLL : "D MMMM YYYY LT",
- LLLL : "dddd D MMMM YYYY LT"
+ LT : 'HH:mm',
+ LTS : 'HH:mm:ss',
+ L : 'DD.MM.YYYY',
+ LL : 'D. MMMM YYYY',
+ LLL : 'D. MMMM YYYY [kl.] H:mm',
+ LLLL : 'dddd D. MMMM YYYY [kl.] HH:mm'
},
calendar : {
sameDay: '[I dag klokka] LT',
@@ -33,24 +33,28 @@
sameElse: 'L'
},
relativeTime : {
- future : "om %s",
- past : "for %s sidan",
- s : "nokre sekund",
- m : "eit minutt",
- mm : "%d minutt",
- h : "ein time",
- hh : "%d timar",
- d : "ein dag",
- dd : "%d dagar",
- M : "ein månad",
- MM : "%d månader",
- y : "eit år",
- yy : "%d år"
+ future : 'om %s',
+ past : '%s sidan',
+ s : 'nokre sekund',
+ m : 'eit minutt',
+ mm : '%d minutt',
+ h : 'ein time',
+ hh : '%d timar',
+ d : 'ein dag',
+ dd : '%d dagar',
+ M : 'ein månad',
+ MM : '%d månader',
+ y : 'eit år',
+ yy : '%d år'
},
+ ordinalParse: /\d{1,2}\./,
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
-}));
+
+ return nn;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/pl.js b/rainloop/v/0.0.0/app/localization/moment/pl.js
index 97770d2ad..0a861d1d6 100644
--- a/rainloop/v/0.0.0/app/localization/moment/pl.js
+++ b/rainloop/v/0.0.0/app/localization/moment/pl.js
@@ -1,59 +1,62 @@
-// moment.js language configuration
-// language : polish (pl)
-// author : Rafal Hirsz : https://github.com/evoL
+//! moment.js locale configuration
+//! locale : Polish [pl]
+//! author : Rafal Hirsz : https://github.com/evoL
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
- var monthsNominative = "styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"),
- monthsSubjective = "stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia".split("_");
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
+
+ var monthsNominative = 'styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień'.split('_'),
+ monthsSubjective = 'stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia'.split('_');
function plural(n) {
return (n % 10 < 5) && (n % 10 > 1) && ((~~(n / 10) % 10) !== 1);
}
-
function translate(number, withoutSuffix, key) {
- var result = number + " ";
+ var result = number + ' ';
switch (key) {
- case 'm':
- return withoutSuffix ? 'minuta' : 'minutę';
- case 'mm':
- return result + (plural(number) ? 'minuty' : 'minut');
- case 'h':
- return withoutSuffix ? 'godzina' : 'godzinę';
- case 'hh':
- return result + (plural(number) ? 'godziny' : 'godzin');
- case 'MM':
- return result + (plural(number) ? 'miesiące' : 'miesięcy');
- case 'yy':
- return result + (plural(number) ? 'lata' : 'lat');
+ case 'm':
+ return withoutSuffix ? 'minuta' : 'minutę';
+ case 'mm':
+ return result + (plural(number) ? 'minuty' : 'minut');
+ case 'h':
+ return withoutSuffix ? 'godzina' : 'godzinę';
+ case 'hh':
+ return result + (plural(number) ? 'godziny' : 'godzin');
+ case 'MM':
+ return result + (plural(number) ? 'miesiące' : 'miesięcy');
+ case 'yy':
+ return result + (plural(number) ? 'lata' : 'lat');
}
}
- return moment.lang('pl', {
+ var pl = moment.defineLocale('pl', {
months : function (momentToFormat, format) {
- if (/D MMMM/.test(format)) {
+ if (format === '') {
+ // Hack: if format empty we know this is used to generate
+ // RegExp by moment. Give then back both valid forms of months
+ // in RegExp ready format.
+ return '(' + monthsSubjective[momentToFormat.month()] + '|' + monthsNominative[momentToFormat.month()] + ')';
+ } else if (/D MMMM/.test(format)) {
return monthsSubjective[momentToFormat.month()];
} else {
return monthsNominative[momentToFormat.month()];
}
},
- monthsShort : "sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),
- weekdays : "niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),
- weekdaysShort : "nie_pon_wt_śr_czw_pt_sb".split("_"),
- weekdaysMin : "N_Pn_Wt_Śr_Cz_Pt_So".split("_"),
+ monthsShort : 'sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru'.split('_'),
+ weekdays : 'niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota'.split('_'),
+ weekdaysShort : 'nie_pon_wt_śr_czw_pt_sb'.split('_'),
+ weekdaysMin : 'Nd_Pn_Wt_Śr_Cz_Pt_So'.split('_'),
longDateFormat : {
- LT : "HH:mm",
- L : "DD.MM.YYYY",
- LL : "D MMMM YYYY",
- LLL : "D MMMM YYYY LT",
- LLLL : "dddd, D MMMM YYYY LT"
+ LT : 'HH:mm',
+ LTS : 'HH:mm:ss',
+ L : 'DD.MM.YYYY',
+ LL : 'D MMMM YYYY',
+ LLL : 'D MMMM YYYY HH:mm',
+ LLLL : 'dddd, D MMMM YYYY HH:mm'
},
calendar : {
sameDay: '[Dziś o] LT',
@@ -62,37 +65,41 @@
lastDay: '[Wczoraj o] LT',
lastWeek: function () {
switch (this.day()) {
- case 0:
- return '[W zeszłą niedzielę o] LT';
- case 3:
- return '[W zeszłą środę o] LT';
- case 6:
- return '[W zeszłą sobotę o] LT';
- default:
- return '[W zeszły] dddd [o] LT';
+ case 0:
+ return '[W zeszłą niedzielę o] LT';
+ case 3:
+ return '[W zeszłą środę o] LT';
+ case 6:
+ return '[W zeszłą sobotę o] LT';
+ default:
+ return '[W zeszły] dddd [o] LT';
}
},
sameElse: 'L'
},
relativeTime : {
- future : "za %s",
- past : "%s temu",
- s : "kilka sekund",
+ future : 'za %s',
+ past : '%s temu',
+ s : 'kilka sekund',
m : translate,
mm : translate,
h : translate,
hh : translate,
- d : "1 dzień",
+ d : '1 dzień',
dd : '%d dni',
- M : "miesiąc",
+ M : 'miesiąc',
MM : translate,
- y : "rok",
+ y : 'rok',
yy : translate
},
+ ordinalParse: /\d{1,2}\./,
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
-}));
+
+ return pl;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/pt-br.js b/rainloop/v/0.0.0/app/localization/moment/pt-br.js
index 8f142d19e..32272050c 100644
--- a/rainloop/v/0.0.0/app/localization/moment/pt-br.js
+++ b/rainloop/v/0.0.0/app/localization/moment/pt-br.js
@@ -1,28 +1,29 @@
-// moment.js language configuration
-// language : brazilian portuguese (pt-br)
-// author : Caio Ribeiro Pereira : https://github.com/caio-ribeiro-pereira
+//! moment.js locale configuration
+//! locale : Portuguese (Brazil) [pt-br]
+//! author : Caio Ribeiro Pereira : https://github.com/caio-ribeiro-pereira
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
- return moment.lang('pt-br', {
- months : "janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),
- monthsShort : "jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),
- weekdays : "domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado".split("_"),
- weekdaysShort : "dom_seg_ter_qua_qui_sex_sáb".split("_"),
- weekdaysMin : "dom_2ª_3ª_4ª_5ª_6ª_sáb".split("_"),
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
+
+
+ var pt_br = moment.defineLocale('pt-br', {
+ months : 'Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro'.split('_'),
+ monthsShort : 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'),
+ weekdays : 'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split('_'),
+ weekdaysShort : 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'),
+ weekdaysMin : 'Dom_2ª_3ª_4ª_5ª_6ª_Sáb'.split('_'),
+ weekdaysParseExact : true,
longDateFormat : {
- LT : "HH:mm",
- L : "DD/MM/YYYY",
- LL : "D [de] MMMM [de] YYYY",
- LLL : "D [de] MMMM [de] YYYY [às] LT",
- LLLL : "dddd, D [de] MMMM [de] YYYY [às] LT"
+ LT : 'HH:mm',
+ LTS : 'HH:mm:ss',
+ L : 'DD/MM/YYYY',
+ LL : 'D [de] MMMM [de] YYYY',
+ LLL : 'D [de] MMMM [de] YYYY [às] HH:mm',
+ LLLL : 'dddd, D [de] MMMM [de] YYYY [às] HH:mm'
},
calendar : {
sameDay: '[Hoje às] LT',
@@ -37,20 +38,24 @@
sameElse: 'L'
},
relativeTime : {
- future : "em %s",
- past : "%s atrás",
- s : "segundos",
- m : "um minuto",
- mm : "%d minutos",
- h : "uma hora",
- hh : "%d horas",
- d : "um dia",
- dd : "%d dias",
- M : "um mês",
- MM : "%d meses",
- y : "um ano",
- yy : "%d anos"
+ future : 'em %s',
+ past : '%s atrás',
+ s : 'poucos segundos',
+ m : 'um minuto',
+ mm : '%d minutos',
+ h : 'uma hora',
+ hh : '%d horas',
+ d : 'um dia',
+ dd : '%d dias',
+ M : 'um mês',
+ MM : '%d meses',
+ y : 'um ano',
+ yy : '%d anos'
},
+ ordinalParse: /\d{1,2}º/,
ordinal : '%dº'
});
-}));
+
+ return pt_br;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/pt.js b/rainloop/v/0.0.0/app/localization/moment/pt.js
index a96297e4d..72c2a1bdb 100644
--- a/rainloop/v/0.0.0/app/localization/moment/pt.js
+++ b/rainloop/v/0.0.0/app/localization/moment/pt.js
@@ -1,28 +1,29 @@
-// moment.js language configuration
-// language : portuguese (pt)
-// author : Jefferson : https://github.com/jalex79
+//! moment.js locale configuration
+//! locale : Portuguese [pt]
+//! author : Jefferson : https://github.com/jalex79
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
- return moment.lang('pt', {
- months : "Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"),
- monthsShort : "Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),
- weekdays : "Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"),
- weekdaysShort : "Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),
- weekdaysMin : "Dom_2ª_3ª_4ª_5ª_6ª_Sáb".split("_"),
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
+
+
+ var pt = moment.defineLocale('pt', {
+ months : 'Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro'.split('_'),
+ monthsShort : 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'),
+ weekdays : 'Domingo_Segunda-Feira_Terça-Feira_Quarta-Feira_Quinta-Feira_Sexta-Feira_Sábado'.split('_'),
+ weekdaysShort : 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'),
+ weekdaysMin : 'Dom_2ª_3ª_4ª_5ª_6ª_Sáb'.split('_'),
+ weekdaysParseExact : true,
longDateFormat : {
- LT : "HH:mm",
- L : "DD/MM/YYYY",
- LL : "D [de] MMMM [de] YYYY",
- LLL : "D [de] MMMM [de] YYYY [às] LT",
- LLLL : "dddd, D [de] MMMM [de] YYYY [às] LT"
+ LT : 'HH:mm',
+ LTS : 'HH:mm:ss',
+ L : 'DD/MM/YYYY',
+ LL : 'D [de] MMMM [de] YYYY',
+ LLL : 'D [de] MMMM [de] YYYY HH:mm',
+ LLLL : 'dddd, D [de] MMMM [de] YYYY HH:mm'
},
calendar : {
sameDay: '[Hoje às] LT',
@@ -37,24 +38,28 @@
sameElse: 'L'
},
relativeTime : {
- future : "daqui a %s",
- past : "%s atrás",
- s : "segundos",
- m : "um minuto",
- mm : "%d minutos",
- h : "uma hora",
- hh : "%d horas",
- d : "um dia",
- dd : "%d dias",
- M : "um mês",
- MM : "%d meses",
- y : "um ano",
- yy : "%d anos"
+ future : 'em %s',
+ past : 'há %s',
+ s : 'segundos',
+ m : 'um minuto',
+ mm : '%d minutos',
+ h : 'uma hora',
+ hh : '%d horas',
+ d : 'um dia',
+ dd : '%d dias',
+ M : 'um mês',
+ MM : '%d meses',
+ y : 'um ano',
+ yy : '%d anos'
},
+ ordinalParse: /\d{1,2}º/,
ordinal : '%dº',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
-}));
+
+ return pt;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/ro.js b/rainloop/v/0.0.0/app/localization/moment/ro.js
index fc2750990..78b325ac3 100644
--- a/rainloop/v/0.0.0/app/localization/moment/ro.js
+++ b/rainloop/v/0.0.0/app/localization/moment/ro.js
@@ -1,48 +1,48 @@
-// moment.js language configuration
-// language : romanian (ro)
-// author : Vlad Gurdiga : https://github.com/gurdiga
-// author : Valentin Agachi : https://github.com/avaly
+//! moment.js locale configuration
+//! locale : Romanian [ro]
+//! author : Vlad Gurdiga : https://github.com/gurdiga
+//! author : Valentin Agachi : https://github.com/avaly
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
+
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
function relativeTimeWithPlural(number, withoutSuffix, key) {
var format = {
- 'mm': 'minute',
- 'hh': 'ore',
- 'dd': 'zile',
- 'MM': 'luni',
- 'yy': 'ani'
- },
+ 'mm': 'minute',
+ 'hh': 'ore',
+ 'dd': 'zile',
+ 'MM': 'luni',
+ 'yy': 'ani'
+ },
separator = ' ';
if (number % 100 >= 20 || (number >= 100 && number % 100 === 0)) {
separator = ' de ';
}
-
return number + separator + format[key];
}
- return moment.lang('ro', {
- months : "ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie".split("_"),
- monthsShort : "ian._febr._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.".split("_"),
- weekdays : "duminică_luni_marți_miercuri_joi_vineri_sâmbătă".split("_"),
- weekdaysShort : "Dum_Lun_Mar_Mie_Joi_Vin_Sâm".split("_"),
- weekdaysMin : "Du_Lu_Ma_Mi_Jo_Vi_Sâ".split("_"),
+ var ro = moment.defineLocale('ro', {
+ months : 'ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie'.split('_'),
+ monthsShort : 'ian._febr._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.'.split('_'),
+ monthsParseExact: true,
+ weekdays : 'duminică_luni_marți_miercuri_joi_vineri_sâmbătă'.split('_'),
+ weekdaysShort : 'Dum_Lun_Mar_Mie_Joi_Vin_Sâm'.split('_'),
+ weekdaysMin : 'Du_Lu_Ma_Mi_Jo_Vi_Sâ'.split('_'),
longDateFormat : {
- LT : "H:mm",
- L : "DD.MM.YYYY",
- LL : "D MMMM YYYY",
- LLL : "D MMMM YYYY H:mm",
- LLLL : "dddd, D MMMM YYYY H:mm"
+ LT : 'H:mm',
+ LTS : 'H:mm:ss',
+ L : 'DD.MM.YYYY',
+ LL : 'D MMMM YYYY',
+ LLL : 'D MMMM YYYY H:mm',
+ LLLL : 'dddd, D MMMM YYYY H:mm'
},
calendar : {
- sameDay: "[azi la] LT",
+ sameDay: '[azi la] LT',
nextDay: '[mâine la] LT',
nextWeek: 'dddd [la] LT',
lastDay: '[ieri la] LT',
@@ -50,18 +50,18 @@
sameElse: 'L'
},
relativeTime : {
- future : "peste %s",
- past : "%s în urmă",
- s : "câteva secunde",
- m : "un minut",
+ future : 'peste %s',
+ past : '%s în urmă',
+ s : 'câteva secunde',
+ m : 'un minut',
mm : relativeTimeWithPlural,
- h : "o oră",
+ h : 'o oră',
hh : relativeTimeWithPlural,
- d : "o zi",
+ d : 'o zi',
dd : relativeTimeWithPlural,
- M : "o lună",
+ M : 'o lună',
MM : relativeTimeWithPlural,
- y : "un an",
+ y : 'un an',
yy : relativeTimeWithPlural
},
week : {
@@ -69,4 +69,7 @@
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
});
-}));
+
+ return ro;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/ru.js b/rainloop/v/0.0.0/app/localization/moment/ru.js
index ac5400da8..faa3cc2e3 100644
--- a/rainloop/v/0.0.0/app/localization/moment/ru.js
+++ b/rainloop/v/0.0.0/app/localization/moment/ru.js
@@ -1,22 +1,21 @@
-// moment.js language configuration
-// language : russian (ru)
-// author : Viktorminator : https://github.com/Viktorminator
-// Author : Menelion Elensúle : https://github.com/Oire
+//! moment.js locale configuration
+//! locale : Russian [ru]
+//! author : Viktorminator : https://github.com/Viktorminator
+//! Author : Menelion Elensúle : https://github.com/Oire
+//! author : Коренберг Марк : https://github.com/socketpair
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
+
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
function plural(word, num) {
var forms = word.split('_');
return num % 10 === 1 && num % 100 !== 11 ? forms[0] : (num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]);
}
-
function relativeTimeWithPlural(number, withoutSuffix, key) {
var format = {
'mm': withoutSuffix ? 'минута_минуты_минут' : 'минуту_минуты_минут',
@@ -32,132 +31,153 @@
return number + ' ' + plural(format[key], +number);
}
}
+ var monthsParse = [/^янв/i, /^фев/i, /^мар/i, /^апр/i, /^ма[йя]/i, /^июн/i, /^июл/i, /^авг/i, /^сен/i, /^окт/i, /^ноя/i, /^дек/i];
- function monthsCaseReplace(m, format) {
- var months = {
- 'nominative': 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split('_'),
- 'accusative': 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split('_')
+ // http://new.gramota.ru/spravka/rules/139-prop : § 103
+ // Сокращения месяцев: http://new.gramota.ru/spravka/buro/search-answer?s=242637
+ // CLDR data: http://www.unicode.org/cldr/charts/28/summary/ru.html#1753
+ var ru = moment.defineLocale('ru', {
+ months : {
+ format: 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split('_'),
+ standalone: 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split('_')
},
-
- nounCase = (/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/).test(format) ?
- 'accusative' :
- 'nominative';
-
- return months[nounCase][m.month()];
- }
-
- function monthsShortCaseReplace(m, format) {
- var monthsShort = {
- 'nominative': 'янв_фев_мар_апр_май_июнь_июль_авг_сен_окт_ноя_дек'.split('_'),
- 'accusative': 'янв_фев_мар_апр_мая_июня_июля_авг_сен_окт_ноя_дек'.split('_')
+ monthsShort : {
+ // по CLDR именно "июл." и "июн.", но какой смысл менять букву на точку ?
+ format: 'янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.'.split('_'),
+ standalone: 'янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.'.split('_')
},
-
- nounCase = (/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/).test(format) ?
- 'accusative' :
- 'nominative';
-
- return monthsShort[nounCase][m.month()];
- }
-
- function weekdaysCaseReplace(m, format) {
- var weekdays = {
- 'nominative': 'воскресенье_понедельник_вторник_среда_четверг_пятница_суббота'.split('_'),
- 'accusative': 'воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу'.split('_')
+ weekdays : {
+ standalone: 'воскресенье_понедельник_вторник_среда_четверг_пятница_суббота'.split('_'),
+ format: 'воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу'.split('_'),
+ isFormat: /\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?\] ?dddd/
},
+ weekdaysShort : 'вс_пн_вт_ср_чт_пт_сб'.split('_'),
+ weekdaysMin : 'вс_пн_вт_ср_чт_пт_сб'.split('_'),
+ monthsParse : monthsParse,
+ longMonthsParse : monthsParse,
+ shortMonthsParse : monthsParse,
- nounCase = (/\[ ?[Вв] ?(?:прошлую|следующую)? ?\] ?dddd/).test(format) ?
- 'accusative' :
- 'nominative';
+ // полные названия с падежами, по три буквы, для некоторых, по 4 буквы, сокращения с точкой и без точки
+ monthsRegex: /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,
- return weekdays[nounCase][m.day()];
- }
+ // копия предыдущего
+ monthsShortRegex: /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,
- return moment.lang('ru', {
- months : monthsCaseReplace,
- monthsShort : monthsShortCaseReplace,
- weekdays : weekdaysCaseReplace,
- weekdaysShort : "вс_пн_вт_ср_чт_пт_сб".split("_"),
- weekdaysMin : "вс_пн_вт_ср_чт_пт_сб".split("_"),
- monthsParse : [/^янв/i, /^фев/i, /^мар/i, /^апр/i, /^ма[й|я]/i, /^июн/i, /^июл/i, /^авг/i, /^сен/i, /^окт/i, /^ноя/i, /^дек/i],
+ // полные названия с падежами
+ monthsStrictRegex: /^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,
+
+ // Выражение, которое соотвествует только сокращённым формам
+ monthsShortStrictRegex: /^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i,
longDateFormat : {
- LT : "HH:mm",
- L : "DD.MM.YYYY",
- LL : "D MMMM YYYY г.",
- LLL : "D MMMM YYYY г., LT",
- LLLL : "dddd, D MMMM YYYY г., LT"
+ LT : 'HH:mm',
+ LTS : 'HH:mm:ss',
+ L : 'DD.MM.YYYY',
+ LL : 'D MMMM YYYY г.',
+ LLL : 'D MMMM YYYY г., HH:mm',
+ LLLL : 'dddd, D MMMM YYYY г., HH:mm'
},
calendar : {
sameDay: '[Сегодня в] LT',
nextDay: '[Завтра в] LT',
lastDay: '[Вчера в] LT',
- nextWeek: function () {
- return this.day() === 2 ? '[Во] dddd [в] LT' : '[В] dddd [в] LT';
+ nextWeek: function (now) {
+ if (now.week() !== this.week()) {
+ switch (this.day()) {
+ case 0:
+ return '[В следующее] dddd [в] LT';
+ case 1:
+ case 2:
+ case 4:
+ return '[В следующий] dddd [в] LT';
+ case 3:
+ case 5:
+ case 6:
+ return '[В следующую] dddd [в] LT';
+ }
+ } else {
+ if (this.day() === 2) {
+ return '[Во] dddd [в] LT';
+ } else {
+ return '[В] dddd [в] LT';
+ }
+ }
},
- lastWeek: function () {
- switch (this.day()) {
- case 0:
- return '[В прошлое] dddd [в] LT';
- case 1:
- case 2:
- case 4:
- return '[В прошлый] dddd [в] LT';
- case 3:
- case 5:
- case 6:
- return '[В прошлую] dddd [в] LT';
+ lastWeek: function (now) {
+ if (now.week() !== this.week()) {
+ switch (this.day()) {
+ case 0:
+ return '[В прошлое] dddd [в] LT';
+ case 1:
+ case 2:
+ case 4:
+ return '[В прошлый] dddd [в] LT';
+ case 3:
+ case 5:
+ case 6:
+ return '[В прошлую] dddd [в] LT';
+ }
+ } else {
+ if (this.day() === 2) {
+ return '[Во] dddd [в] LT';
+ } else {
+ return '[В] dddd [в] LT';
+ }
}
},
sameElse: 'L'
},
relativeTime : {
- future : "через %s",
- past : "%s назад",
- s : "несколько секунд",
+ future : 'через %s',
+ past : '%s назад',
+ s : 'несколько секунд',
m : relativeTimeWithPlural,
mm : relativeTimeWithPlural,
- h : "час",
+ h : 'час',
hh : relativeTimeWithPlural,
- d : "день",
+ d : 'день',
dd : relativeTimeWithPlural,
- M : "месяц",
+ M : 'месяц',
MM : relativeTimeWithPlural,
- y : "год",
+ y : 'год',
yy : relativeTimeWithPlural
},
-
- // M. E.: those two are virtually unused but a user might want to implement them for his/her website for some reason
-
+ meridiemParse: /ночи|утра|дня|вечера/i,
+ isPM : function (input) {
+ return /^(дня|вечера)$/.test(input);
+ },
meridiem : function (hour, minute, isLower) {
if (hour < 4) {
- return "ночи";
+ return 'ночи';
} else if (hour < 12) {
- return "утра";
+ return 'утра';
} else if (hour < 17) {
- return "дня";
+ return 'дня';
} else {
- return "вечера";
+ return 'вечера';
}
},
-
+ ordinalParse: /\d{1,2}-(й|го|я)/,
ordinal: function (number, period) {
switch (period) {
- case 'M':
- case 'd':
- case 'DDD':
- return number + '-й';
- case 'D':
- return number + '-го';
- case 'w':
- case 'W':
- return number + '-я';
- default:
- return number;
+ case 'M':
+ case 'd':
+ case 'DDD':
+ return number + '-й';
+ case 'D':
+ return number + '-го';
+ case 'w':
+ case 'W':
+ return number + '-я';
+ default:
+ return number;
}
},
-
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
});
-}));
+
+ return ru;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/sk.js b/rainloop/v/0.0.0/app/localization/moment/sk.js
index ed8a41d48..582ae7ee6 100644
--- a/rainloop/v/0.0.0/app/localization/moment/sk.js
+++ b/rainloop/v/0.0.0/app/localization/moment/sk.js
@@ -1,140 +1,130 @@
-// moment.js language configuration
-// language : slovak (sk)
-// author : Martin Minka : https://github.com/k2s
-// based on work of petrbela : https://github.com/petrbela
+//! moment.js locale configuration
+//! locale : Slovak [sk]
+//! author : Martin Minka : https://github.com/k2s
+//! based on work of petrbela : https://github.com/petrbela
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
- var months = "január_február_marec_apríl_máj_jún_júl_august_september_október_november_december".split("_"),
- monthsShort = "jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec".split("_");
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
+
+ var months = 'január_február_marec_apríl_máj_jún_júl_august_september_október_november_december'.split('_'),
+ monthsShort = 'jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec'.split('_');
function plural(n) {
return (n > 1) && (n < 5);
}
-
function translate(number, withoutSuffix, key, isFuture) {
- var result = number + " ";
+ var result = number + ' ';
switch (key) {
- case 's': // a few seconds / in a few seconds / a few seconds ago
- return (withoutSuffix || isFuture) ? 'pár sekúnd' : 'pár sekundami';
- case 'm': // a minute / in a minute / a minute ago
- return withoutSuffix ? 'minúta' : (isFuture ? 'minútu' : 'minútou');
- case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago
- if (withoutSuffix || isFuture) {
- return result + (plural(number) ? 'minúty' : 'minút');
- } else {
- return result + 'minútami';
- }
- break;
- case 'h': // an hour / in an hour / an hour ago
- return withoutSuffix ? 'hodina' : (isFuture ? 'hodinu' : 'hodinou');
- case 'hh': // 9 hours / in 9 hours / 9 hours ago
- if (withoutSuffix || isFuture) {
- return result + (plural(number) ? 'hodiny' : 'hodín');
- } else {
- return result + 'hodinami';
- }
- break;
- case 'd': // a day / in a day / a day ago
- return (withoutSuffix || isFuture) ? 'deň' : 'dňom';
- case 'dd': // 9 days / in 9 days / 9 days ago
- if (withoutSuffix || isFuture) {
- return result + (plural(number) ? 'dni' : 'dní');
- } else {
- return result + 'dňami';
- }
- break;
- case 'M': // a month / in a month / a month ago
- return (withoutSuffix || isFuture) ? 'mesiac' : 'mesiacom';
- case 'MM': // 9 months / in 9 months / 9 months ago
- if (withoutSuffix || isFuture) {
- return result + (plural(number) ? 'mesiace' : 'mesiacov');
- } else {
- return result + 'mesiacmi';
- }
- break;
- case 'y': // a year / in a year / a year ago
- return (withoutSuffix || isFuture) ? 'rok' : 'rokom';
- case 'yy': // 9 years / in 9 years / 9 years ago
- if (withoutSuffix || isFuture) {
- return result + (plural(number) ? 'roky' : 'rokov');
- } else {
- return result + 'rokmi';
- }
- break;
+ case 's': // a few seconds / in a few seconds / a few seconds ago
+ return (withoutSuffix || isFuture) ? 'pár sekúnd' : 'pár sekundami';
+ case 'm': // a minute / in a minute / a minute ago
+ return withoutSuffix ? 'minúta' : (isFuture ? 'minútu' : 'minútou');
+ case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural(number) ? 'minúty' : 'minút');
+ } else {
+ return result + 'minútami';
+ }
+ break;
+ case 'h': // an hour / in an hour / an hour ago
+ return withoutSuffix ? 'hodina' : (isFuture ? 'hodinu' : 'hodinou');
+ case 'hh': // 9 hours / in 9 hours / 9 hours ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural(number) ? 'hodiny' : 'hodín');
+ } else {
+ return result + 'hodinami';
+ }
+ break;
+ case 'd': // a day / in a day / a day ago
+ return (withoutSuffix || isFuture) ? 'deň' : 'dňom';
+ case 'dd': // 9 days / in 9 days / 9 days ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural(number) ? 'dni' : 'dní');
+ } else {
+ return result + 'dňami';
+ }
+ break;
+ case 'M': // a month / in a month / a month ago
+ return (withoutSuffix || isFuture) ? 'mesiac' : 'mesiacom';
+ case 'MM': // 9 months / in 9 months / 9 months ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural(number) ? 'mesiace' : 'mesiacov');
+ } else {
+ return result + 'mesiacmi';
+ }
+ break;
+ case 'y': // a year / in a year / a year ago
+ return (withoutSuffix || isFuture) ? 'rok' : 'rokom';
+ case 'yy': // 9 years / in 9 years / 9 years ago
+ if (withoutSuffix || isFuture) {
+ return result + (plural(number) ? 'roky' : 'rokov');
+ } else {
+ return result + 'rokmi';
+ }
+ break;
}
}
- return moment.lang('sk', {
+ var sk = moment.defineLocale('sk', {
months : months,
monthsShort : monthsShort,
- monthsParse : (function (months, monthsShort) {
- var i, _monthsParse = [];
- for (i = 0; i < 12; i++) {
- // use custom parser to solve problem with July (červenec)
- _monthsParse[i] = new RegExp('^' + months[i] + '$|^' + monthsShort[i] + '$', 'i');
- }
- return _monthsParse;
- }(months, monthsShort)),
- weekdays : "nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota".split("_"),
- weekdaysShort : "ne_po_ut_st_št_pi_so".split("_"),
- weekdaysMin : "ne_po_ut_st_št_pi_so".split("_"),
+ weekdays : 'nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota'.split('_'),
+ weekdaysShort : 'ne_po_ut_st_št_pi_so'.split('_'),
+ weekdaysMin : 'ne_po_ut_st_št_pi_so'.split('_'),
longDateFormat : {
- LT: "H:mm",
- L : "DD.MM.YYYY",
- LL : "D. MMMM YYYY",
- LLL : "D. MMMM YYYY LT",
- LLLL : "dddd D. MMMM YYYY LT"
+ LT: 'H:mm',
+ LTS : 'H:mm:ss',
+ L : 'DD.MM.YYYY',
+ LL : 'D. MMMM YYYY',
+ LLL : 'D. MMMM YYYY H:mm',
+ LLLL : 'dddd D. MMMM YYYY H:mm'
},
calendar : {
- sameDay: "[dnes o] LT",
+ sameDay: '[dnes o] LT',
nextDay: '[zajtra o] LT',
nextWeek: function () {
switch (this.day()) {
- case 0:
- return '[v nedeľu o] LT';
- case 1:
- case 2:
- return '[v] dddd [o] LT';
- case 3:
- return '[v stredu o] LT';
- case 4:
- return '[vo štvrtok o] LT';
- case 5:
- return '[v piatok o] LT';
- case 6:
- return '[v sobotu o] LT';
+ case 0:
+ return '[v nedeľu o] LT';
+ case 1:
+ case 2:
+ return '[v] dddd [o] LT';
+ case 3:
+ return '[v stredu o] LT';
+ case 4:
+ return '[vo štvrtok o] LT';
+ case 5:
+ return '[v piatok o] LT';
+ case 6:
+ return '[v sobotu o] LT';
}
},
lastDay: '[včera o] LT',
lastWeek: function () {
switch (this.day()) {
- case 0:
- return '[minulú nedeľu o] LT';
- case 1:
- case 2:
- return '[minulý] dddd [o] LT';
- case 3:
- return '[minulú stredu o] LT';
- case 4:
- case 5:
- return '[minulý] dddd [o] LT';
- case 6:
- return '[minulú sobotu o] LT';
+ case 0:
+ return '[minulú nedeľu o] LT';
+ case 1:
+ case 2:
+ return '[minulý] dddd [o] LT';
+ case 3:
+ return '[minulú stredu o] LT';
+ case 4:
+ case 5:
+ return '[minulý] dddd [o] LT';
+ case 6:
+ return '[minulú sobotu o] LT';
}
},
- sameElse: "L"
+ sameElse: 'L'
},
relativeTime : {
- future : "za %s",
- past : "pred %s",
+ future : 'za %s',
+ past : 'pred %s',
s : translate,
m : translate,
mm : translate,
@@ -147,10 +137,14 @@
y : translate,
yy : translate
},
+ ordinalParse: /\d{1,2}\./,
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
-}));
+
+ return sk;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/sl.js b/rainloop/v/0.0.0/app/localization/moment/sl.js
index d260f80d9..9015e9198 100644
--- a/rainloop/v/0.0.0/app/localization/moment/sl.js
+++ b/rainloop/v/0.0.0/app/localization/moment/sl.js
@@ -1,89 +1,101 @@
-// moment.js language configuration
-// language : slovenian (sl)
-// author : Robert Sedovšek : https://github.com/sedovsek
+//! moment.js locale configuration
+//! locale : Slovenian [sl]
+//! author : Robert Sedovšek : https://github.com/sedovsek
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
- function translate(number, withoutSuffix, key) {
- var result = number + " ";
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
+
+
+ function processRelativeTime(number, withoutSuffix, key, isFuture) {
+ var result = number + ' ';
switch (key) {
- case 'm':
- return withoutSuffix ? 'ena minuta' : 'eno minuto';
- case 'mm':
- if (number === 1) {
- result += 'minuta';
- } else if (number === 2) {
- result += 'minuti';
- } else if (number === 3 || number === 4) {
- result += 'minute';
- } else {
- result += 'minut';
- }
- return result;
- case 'h':
- return withoutSuffix ? 'ena ura' : 'eno uro';
- case 'hh':
- if (number === 1) {
- result += 'ura';
- } else if (number === 2) {
- result += 'uri';
- } else if (number === 3 || number === 4) {
- result += 'ure';
- } else {
- result += 'ur';
- }
- return result;
- case 'dd':
- if (number === 1) {
- result += 'dan';
- } else {
- result += 'dni';
- }
- return result;
- case 'MM':
- if (number === 1) {
- result += 'mesec';
- } else if (number === 2) {
- result += 'meseca';
- } else if (number === 3 || number === 4) {
- result += 'mesece';
- } else {
- result += 'mesecev';
- }
- return result;
- case 'yy':
- if (number === 1) {
- result += 'leto';
- } else if (number === 2) {
- result += 'leti';
- } else if (number === 3 || number === 4) {
- result += 'leta';
- } else {
- result += 'let';
- }
- return result;
+ case 's':
+ return withoutSuffix || isFuture ? 'nekaj sekund' : 'nekaj sekundami';
+ case 'm':
+ return withoutSuffix ? 'ena minuta' : 'eno minuto';
+ case 'mm':
+ if (number === 1) {
+ result += withoutSuffix ? 'minuta' : 'minuto';
+ } else if (number === 2) {
+ result += withoutSuffix || isFuture ? 'minuti' : 'minutama';
+ } else if (number < 5) {
+ result += withoutSuffix || isFuture ? 'minute' : 'minutami';
+ } else {
+ result += withoutSuffix || isFuture ? 'minut' : 'minutami';
+ }
+ return result;
+ case 'h':
+ return withoutSuffix ? 'ena ura' : 'eno uro';
+ case 'hh':
+ if (number === 1) {
+ result += withoutSuffix ? 'ura' : 'uro';
+ } else if (number === 2) {
+ result += withoutSuffix || isFuture ? 'uri' : 'urama';
+ } else if (number < 5) {
+ result += withoutSuffix || isFuture ? 'ure' : 'urami';
+ } else {
+ result += withoutSuffix || isFuture ? 'ur' : 'urami';
+ }
+ return result;
+ case 'd':
+ return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';
+ case 'dd':
+ if (number === 1) {
+ result += withoutSuffix || isFuture ? 'dan' : 'dnem';
+ } else if (number === 2) {
+ result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';
+ } else {
+ result += withoutSuffix || isFuture ? 'dni' : 'dnevi';
+ }
+ return result;
+ case 'M':
+ return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';
+ case 'MM':
+ if (number === 1) {
+ result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';
+ } else if (number === 2) {
+ result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';
+ } else if (number < 5) {
+ result += withoutSuffix || isFuture ? 'mesece' : 'meseci';
+ } else {
+ result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';
+ }
+ return result;
+ case 'y':
+ return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';
+ case 'yy':
+ if (number === 1) {
+ result += withoutSuffix || isFuture ? 'leto' : 'letom';
+ } else if (number === 2) {
+ result += withoutSuffix || isFuture ? 'leti' : 'letoma';
+ } else if (number < 5) {
+ result += withoutSuffix || isFuture ? 'leta' : 'leti';
+ } else {
+ result += withoutSuffix || isFuture ? 'let' : 'leti';
+ }
+ return result;
}
}
- return moment.lang('sl', {
- months : "januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december".split("_"),
- monthsShort : "jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.".split("_"),
- weekdays : "nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota".split("_"),
- weekdaysShort : "ned._pon._tor._sre._čet._pet._sob.".split("_"),
- weekdaysMin : "ne_po_to_sr_če_pe_so".split("_"),
+ var sl = moment.defineLocale('sl', {
+ months : 'januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december'.split('_'),
+ monthsShort : 'jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.'.split('_'),
+ monthsParseExact: true,
+ weekdays : 'nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota'.split('_'),
+ weekdaysShort : 'ned._pon._tor._sre._čet._pet._sob.'.split('_'),
+ weekdaysMin : 'ne_po_to_sr_če_pe_so'.split('_'),
+ weekdaysParseExact : true,
longDateFormat : {
- LT : "H:mm",
- L : "DD. MM. YYYY",
- LL : "D. MMMM YYYY",
- LLL : "D. MMMM YYYY LT",
- LLLL : "dddd, D. MMMM YYYY LT"
+ LT : 'H:mm',
+ LTS : 'H:mm:ss',
+ L : 'DD. MM. YYYY',
+ LL : 'D. MMMM YYYY',
+ LLL : 'D. MMMM YYYY H:mm',
+ LLLL : 'dddd, D. MMMM YYYY H:mm'
},
calendar : {
sameDay : '[danes ob] LT',
@@ -91,54 +103,60 @@
nextWeek : function () {
switch (this.day()) {
- case 0:
- return '[v] [nedeljo] [ob] LT';
- case 3:
- return '[v] [sredo] [ob] LT';
- case 6:
- return '[v] [soboto] [ob] LT';
- case 1:
- case 2:
- case 4:
- case 5:
- return '[v] dddd [ob] LT';
+ case 0:
+ return '[v] [nedeljo] [ob] LT';
+ case 3:
+ return '[v] [sredo] [ob] LT';
+ case 6:
+ return '[v] [soboto] [ob] LT';
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ return '[v] dddd [ob] LT';
}
},
lastDay : '[včeraj ob] LT',
lastWeek : function () {
switch (this.day()) {
- case 0:
- case 3:
- case 6:
- return '[prejšnja] dddd [ob] LT';
- case 1:
- case 2:
- case 4:
- case 5:
- return '[prejšnji] dddd [ob] LT';
+ case 0:
+ return '[prejšnjo] [nedeljo] [ob] LT';
+ case 3:
+ return '[prejšnjo] [sredo] [ob] LT';
+ case 6:
+ return '[prejšnjo] [soboto] [ob] LT';
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ return '[prejšnji] dddd [ob] LT';
}
},
sameElse : 'L'
},
relativeTime : {
- future : "čez %s",
- past : "%s nazaj",
- s : "nekaj sekund",
- m : translate,
- mm : translate,
- h : translate,
- hh : translate,
- d : "en dan",
- dd : translate,
- M : "en mesec",
- MM : translate,
- y : "eno leto",
- yy : translate
+ future : 'čez %s',
+ past : 'pred %s',
+ s : processRelativeTime,
+ m : processRelativeTime,
+ mm : processRelativeTime,
+ h : processRelativeTime,
+ hh : processRelativeTime,
+ d : processRelativeTime,
+ dd : processRelativeTime,
+ M : processRelativeTime,
+ MM : processRelativeTime,
+ y : processRelativeTime,
+ yy : processRelativeTime
},
+ ordinalParse: /\d{1,2}\./,
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
});
-}));
+
+ return sl;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/sq.js b/rainloop/v/0.0.0/app/localization/moment/sq.js
index 0d3cdcf7c..6fa245519 100644
--- a/rainloop/v/0.0.0/app/localization/moment/sq.js
+++ b/rainloop/v/0.0.0/app/localization/moment/sq.js
@@ -1,33 +1,38 @@
-// moment.js language configuration
-// language : Albanian (sq)
-// author : Flakërim Ismani : https://github.com/flakerimi
-// author: Menelion Elensúle: https://github.com/Oire (tests)
-// author : Oerd Cukalla : https://github.com/oerd (fixes)
+//! moment.js locale configuration
+//! locale : Albanian [sq]
+//! author : Flakërim Ismani : https://github.com/flakerimi
+//! author: Menelion Elensúle: https://github.com/Oire (tests)
+//! author : Oerd Cukalla : https://github.com/oerd (fixes)
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
- return moment.lang('sq', {
- months : "Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor".split("_"),
- monthsShort : "Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj".split("_"),
- weekdays : "E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë".split("_"),
- weekdaysShort : "Die_Hën_Mar_Mër_Enj_Pre_Sht".split("_"),
- weekdaysMin : "D_H_Ma_Më_E_P_Sh".split("_"),
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
+
+
+ var sq = moment.defineLocale('sq', {
+ months : 'Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor'.split('_'),
+ monthsShort : 'Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj'.split('_'),
+ weekdays : 'E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë'.split('_'),
+ weekdaysShort : 'Die_Hën_Mar_Mër_Enj_Pre_Sht'.split('_'),
+ weekdaysMin : 'D_H_Ma_Më_E_P_Sh'.split('_'),
+ weekdaysParseExact : true,
+ meridiemParse: /PD|MD/,
+ isPM: function (input) {
+ return input.charAt(0) === 'M';
+ },
meridiem : function (hours, minutes, isLower) {
return hours < 12 ? 'PD' : 'MD';
},
longDateFormat : {
- LT : "HH:mm",
- L : "DD/MM/YYYY",
- LL : "D MMMM YYYY",
- LLL : "D MMMM YYYY LT",
- LLLL : "dddd, D MMMM YYYY LT"
+ LT : 'HH:mm',
+ LTS : 'HH:mm:ss',
+ L : 'DD/MM/YYYY',
+ LL : 'D MMMM YYYY',
+ LLL : 'D MMMM YYYY HH:mm',
+ LLLL : 'dddd, D MMMM YYYY HH:mm'
},
calendar : {
sameDay : '[Sot në] LT',
@@ -38,24 +43,28 @@
sameElse : 'L'
},
relativeTime : {
- future : "në %s",
- past : "%s më parë",
- s : "disa sekonda",
- m : "një minutë",
- mm : "%d minuta",
- h : "një orë",
- hh : "%d orë",
- d : "një ditë",
- dd : "%d ditë",
- M : "një muaj",
- MM : "%d muaj",
- y : "një vit",
- yy : "%d vite"
+ future : 'në %s',
+ past : '%s më parë',
+ s : 'disa sekonda',
+ m : 'një minutë',
+ mm : '%d minuta',
+ h : 'një orë',
+ hh : '%d orë',
+ d : 'një ditë',
+ dd : '%d ditë',
+ M : 'një muaj',
+ MM : '%d muaj',
+ y : 'një vit',
+ yy : '%d vite'
},
+ ordinalParse: /\d{1,2}\./,
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
-}));
+
+ return sq;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/sr-cyrl.js b/rainloop/v/0.0.0/app/localization/moment/sr-cyrl.js
index ae1754b34..943d57c42 100644
--- a/rainloop/v/0.0.0/app/localization/moment/sr-cyrl.js
+++ b/rainloop/v/0.0.0/app/localization/moment/sr-cyrl.js
@@ -1,16 +1,14 @@
-// moment.js language configuration
-// language : Serbian-cyrillic (sr-cyrl)
-// author : Milan Janačković : https://github.com/milan-j
+//! moment.js locale configuration
+//! locale : Serbian Cyrillic [sr-cyrl]
+//! author : Milan Janačković : https://github.com/milan-j
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
var translator = {
words: { //Different grammatical cases
@@ -35,36 +33,38 @@
}
};
- return moment.lang('sr-cyrl', {
- months: ['јануар', 'фебруар', 'март', 'април', 'мај', 'јун', 'јул', 'август', 'септембар', 'октобар', 'новембар', 'децембар'],
- monthsShort: ['јан.', 'феб.', 'мар.', 'апр.', 'мај', 'јун', 'јул', 'авг.', 'сеп.', 'окт.', 'нов.', 'дец.'],
- weekdays: ['недеља', 'понедељак', 'уторак', 'среда', 'четвртак', 'петак', 'субота'],
- weekdaysShort: ['нед.', 'пон.', 'уто.', 'сре.', 'чет.', 'пет.', 'суб.'],
- weekdaysMin: ['не', 'по', 'ут', 'ср', 'че', 'пе', 'су'],
+ var sr_cyrl = moment.defineLocale('sr-cyrl', {
+ months: 'јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар'.split('_'),
+ monthsShort: 'јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.'.split('_'),
+ monthsParseExact: true,
+ weekdays: 'недеља_понедељак_уторак_среда_четвртак_петак_субота'.split('_'),
+ weekdaysShort: 'нед._пон._уто._сре._чет._пет._суб.'.split('_'),
+ weekdaysMin: 'не_по_ут_ср_че_пе_су'.split('_'),
+ weekdaysParseExact : true,
longDateFormat: {
- LT: "H:mm",
- L: "DD. MM. YYYY",
- LL: "D. MMMM YYYY",
- LLL: "D. MMMM YYYY LT",
- LLLL: "dddd, D. MMMM YYYY LT"
+ LT: 'H:mm',
+ LTS : 'H:mm:ss',
+ L: 'DD. MM. YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY H:mm',
+ LLLL: 'dddd, D. MMMM YYYY H:mm'
},
calendar: {
sameDay: '[данас у] LT',
nextDay: '[сутра у] LT',
-
nextWeek: function () {
switch (this.day()) {
- case 0:
- return '[у] [недељу] [у] LT';
- case 3:
- return '[у] [среду] [у] LT';
- case 6:
- return '[у] [суботу] [у] LT';
- case 1:
- case 2:
- case 4:
- case 5:
- return '[у] dddd [у] LT';
+ case 0:
+ return '[у] [недељу] [у] LT';
+ case 3:
+ return '[у] [среду] [у] LT';
+ case 6:
+ return '[у] [суботу] [у] LT';
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ return '[у] dddd [у] LT';
}
},
lastDay : '[јуче у] LT',
@@ -83,24 +83,28 @@
sameElse : 'L'
},
relativeTime : {
- future : "за %s",
- past : "пре %s",
- s : "неколико секунди",
+ future : 'за %s',
+ past : 'пре %s',
+ s : 'неколико секунди',
m : translator.translate,
mm : translator.translate,
h : translator.translate,
hh : translator.translate,
- d : "дан",
+ d : 'дан',
dd : translator.translate,
- M : "месец",
+ M : 'месец',
MM : translator.translate,
- y : "годину",
+ y : 'годину',
yy : translator.translate
},
+ ordinalParse: /\d{1,2}\./,
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
});
-}));
+
+ return sr_cyrl;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/sr.js b/rainloop/v/0.0.0/app/localization/moment/sr.js
index 54a5f4f6e..a1f0ccb77 100644
--- a/rainloop/v/0.0.0/app/localization/moment/sr.js
+++ b/rainloop/v/0.0.0/app/localization/moment/sr.js
@@ -1,16 +1,14 @@
-// moment.js language configuration
-// language : Serbian-latin (sr)
-// author : Milan Janačković : https://github.com/milan-j
+//! moment.js locale configuration
+//! locale : Serbian [sr]
+//! author : Milan Janačković : https://github.com/milan-j
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
var translator = {
words: { //Different grammatical cases
@@ -35,36 +33,38 @@
}
};
- return moment.lang('sr', {
- months: ['januar', 'februar', 'mart', 'april', 'maj', 'jun', 'jul', 'avgust', 'septembar', 'oktobar', 'novembar', 'decembar'],
- monthsShort: ['jan.', 'feb.', 'mar.', 'apr.', 'maj', 'jun', 'jul', 'avg.', 'sep.', 'okt.', 'nov.', 'dec.'],
- weekdays: ['nedelja', 'ponedeljak', 'utorak', 'sreda', 'četvrtak', 'petak', 'subota'],
- weekdaysShort: ['ned.', 'pon.', 'uto.', 'sre.', 'čet.', 'pet.', 'sub.'],
- weekdaysMin: ['ne', 'po', 'ut', 'sr', 'če', 'pe', 'su'],
+ var sr = moment.defineLocale('sr', {
+ months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split('_'),
+ monthsShort: 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'),
+ monthsParseExact: true,
+ weekdays: 'nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota'.split('_'),
+ weekdaysShort: 'ned._pon._uto._sre._čet._pet._sub.'.split('_'),
+ weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
+ weekdaysParseExact : true,
longDateFormat: {
- LT: "H:mm",
- L: "DD. MM. YYYY",
- LL: "D. MMMM YYYY",
- LLL: "D. MMMM YYYY LT",
- LLLL: "dddd, D. MMMM YYYY LT"
+ LT: 'H:mm',
+ LTS : 'H:mm:ss',
+ L: 'DD. MM. YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY H:mm',
+ LLLL: 'dddd, D. MMMM YYYY H:mm'
},
calendar: {
sameDay: '[danas u] LT',
nextDay: '[sutra u] LT',
-
nextWeek: function () {
switch (this.day()) {
- case 0:
- return '[u] [nedelju] [u] LT';
- case 3:
- return '[u] [sredu] [u] LT';
- case 6:
- return '[u] [subotu] [u] LT';
- case 1:
- case 2:
- case 4:
- case 5:
- return '[u] dddd [u] LT';
+ case 0:
+ return '[u] [nedelju] [u] LT';
+ case 3:
+ return '[u] [sredu] [u] LT';
+ case 6:
+ return '[u] [subotu] [u] LT';
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ return '[u] dddd [u] LT';
}
},
lastDay : '[juče u] LT',
@@ -83,24 +83,28 @@
sameElse : 'L'
},
relativeTime : {
- future : "za %s",
- past : "pre %s",
- s : "nekoliko sekundi",
+ future : 'za %s',
+ past : 'pre %s',
+ s : 'nekoliko sekundi',
m : translator.translate,
mm : translator.translate,
h : translator.translate,
hh : translator.translate,
- d : "dan",
+ d : 'dan',
dd : translator.translate,
- M : "mesec",
+ M : 'mesec',
MM : translator.translate,
- y : "godinu",
+ y : 'godinu',
yy : translator.translate
},
+ ordinalParse: /\d{1,2}\./,
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
});
-}));
+
+ return sr;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/sv.js b/rainloop/v/0.0.0/app/localization/moment/sv.js
index 0de8c40ba..a77c3e107 100644
--- a/rainloop/v/0.0.0/app/localization/moment/sv.js
+++ b/rainloop/v/0.0.0/app/localization/moment/sv.js
@@ -1,55 +1,58 @@
-// moment.js language configuration
-// language : swedish (sv)
-// author : Jens Alm : https://github.com/ulmus
+//! moment.js locale configuration
+//! locale : Swedish [sv]
+//! author : Jens Alm : https://github.com/ulmus
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
- return moment.lang('sv', {
- months : "januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),
- monthsShort : "jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),
- weekdays : "söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag".split("_"),
- weekdaysShort : "sön_mån_tis_ons_tor_fre_lör".split("_"),
- weekdaysMin : "sö_må_ti_on_to_fr_lö".split("_"),
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
+
+
+ var sv = moment.defineLocale('sv', {
+ months : 'januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december'.split('_'),
+ monthsShort : 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),
+ weekdays : 'söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag'.split('_'),
+ weekdaysShort : 'sön_mån_tis_ons_tor_fre_lör'.split('_'),
+ weekdaysMin : 'sö_må_ti_on_to_fr_lö'.split('_'),
longDateFormat : {
- LT : "HH:mm",
- L : "YYYY-MM-DD",
- LL : "D MMMM YYYY",
- LLL : "D MMMM YYYY LT",
- LLLL : "dddd D MMMM YYYY LT"
+ LT : 'HH:mm',
+ LTS : 'HH:mm:ss',
+ L : 'YYYY-MM-DD',
+ LL : 'D MMMM YYYY',
+ LLL : 'D MMMM YYYY [kl.] HH:mm',
+ LLLL : 'dddd D MMMM YYYY [kl.] HH:mm',
+ lll : 'D MMM YYYY HH:mm',
+ llll : 'ddd D MMM YYYY HH:mm'
},
calendar : {
sameDay: '[Idag] LT',
nextDay: '[Imorgon] LT',
lastDay: '[Igår] LT',
- nextWeek: 'dddd LT',
- lastWeek: '[Förra] dddd[en] LT',
+ nextWeek: '[På] dddd LT',
+ lastWeek: '[I] dddd[s] LT',
sameElse: 'L'
},
relativeTime : {
- future : "om %s",
- past : "för %s sedan",
- s : "några sekunder",
- m : "en minut",
- mm : "%d minuter",
- h : "en timme",
- hh : "%d timmar",
- d : "en dag",
- dd : "%d dagar",
- M : "en månad",
- MM : "%d månader",
- y : "ett år",
- yy : "%d år"
+ future : 'om %s',
+ past : 'för %s sedan',
+ s : 'några sekunder',
+ m : 'en minut',
+ mm : '%d minuter',
+ h : 'en timme',
+ hh : '%d timmar',
+ d : 'en dag',
+ dd : '%d dagar',
+ M : 'en månad',
+ MM : '%d månader',
+ y : 'ett år',
+ yy : '%d år'
},
+ ordinalParse: /\d{1,2}(e|a)/,
ordinal : function (number) {
var b = number % 10,
- output = (~~ (number % 100 / 10) === 1) ? 'e' :
+ output = (~~(number % 100 / 10) === 1) ? 'e' :
(b === 1) ? 'a' :
(b === 2) ? 'a' :
(b === 3) ? 'e' : 'e';
@@ -60,4 +63,7 @@
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
-}));
+
+ return sv;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/ta.js b/rainloop/v/0.0.0/app/localization/moment/ta.js
index cc742c989..c04fa587b 100644
--- a/rainloop/v/0.0.0/app/localization/moment/ta.js
+++ b/rainloop/v/0.0.0/app/localization/moment/ta.js
@@ -1,53 +1,52 @@
-// moment.js language configuration
-// language : tamil (ta)
-// author : Arjunkumar Krishnamoorthy : https://github.com/tk120404
+//! moment.js locale configuration
+//! locale : Tamil [ta]
+//! author : Arjunkumar Krishnamoorthy : https://github.com/tk120404
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
- /*var symbolMap = {
- '1': '௧',
- '2': '௨',
- '3': '௩',
- '4': '௪',
- '5': '௫',
- '6': '௬',
- '7': '௭',
- '8': '௮',
- '9': '௯',
- '0': '௦'
- },
- numberMap = {
- '௧': '1',
- '௨': '2',
- '௩': '3',
- '௪': '4',
- '௫': '5',
- '௬': '6',
- '௭': '7',
- '௮': '8',
- '௯': '9',
- '௦': '0'
- }; */
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
- return moment.lang('ta', {
- months : 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split("_"),
- monthsShort : 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split("_"),
- weekdays : 'ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை'.split("_"),
- weekdaysShort : 'ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி'.split("_"),
- weekdaysMin : 'ஞா_தி_செ_பு_வி_வெ_ச'.split("_"),
+
+ var symbolMap = {
+ '1': '௧',
+ '2': '௨',
+ '3': '௩',
+ '4': '௪',
+ '5': '௫',
+ '6': '௬',
+ '7': '௭',
+ '8': '௮',
+ '9': '௯',
+ '0': '௦'
+ }, numberMap = {
+ '௧': '1',
+ '௨': '2',
+ '௩': '3',
+ '௪': '4',
+ '௫': '5',
+ '௬': '6',
+ '௭': '7',
+ '௮': '8',
+ '௯': '9',
+ '௦': '0'
+ };
+
+ var ta = moment.defineLocale('ta', {
+ months : 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split('_'),
+ monthsShort : 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split('_'),
+ weekdays : 'ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை'.split('_'),
+ weekdaysShort : 'ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி'.split('_'),
+ weekdaysMin : 'ஞா_தி_செ_பு_வி_வெ_ச'.split('_'),
longDateFormat : {
- LT : "HH:mm",
- L : "DD/MM/YYYY",
- LL : "D MMMM YYYY",
- LLL : "D MMMM YYYY, LT",
- LLLL : "dddd, D MMMM YYYY, LT"
+ LT : 'HH:mm',
+ LTS : 'HH:mm:ss',
+ L : 'DD/MM/YYYY',
+ LL : 'D MMMM YYYY',
+ LLL : 'D MMMM YYYY, HH:mm',
+ LLLL : 'dddd, D MMMM YYYY, HH:mm'
},
calendar : {
sameDay : '[இன்று] LT',
@@ -58,21 +57,25 @@
sameElse : 'L'
},
relativeTime : {
- future : "%s இல்",
- past : "%s முன்",
- s : "ஒரு சில விநாடிகள்",
- m : "ஒரு நிமிடம்",
- mm : "%d நிமிடங்கள்",
- h : "ஒரு மணி நேரம்",
- hh : "%d மணி நேரம்",
- d : "ஒரு நாள்",
- dd : "%d நாட்கள்",
- M : "ஒரு மாதம்",
- MM : "%d மாதங்கள்",
- y : "ஒரு வருடம்",
- yy : "%d ஆண்டுகள்"
+ future : '%s இல்',
+ past : '%s முன்',
+ s : 'ஒரு சில விநாடிகள்',
+ m : 'ஒரு நிமிடம்',
+ mm : '%d நிமிடங்கள்',
+ h : 'ஒரு மணி நேரம்',
+ hh : '%d மணி நேரம்',
+ d : 'ஒரு நாள்',
+ dd : '%d நாட்கள்',
+ M : 'ஒரு மாதம்',
+ MM : '%d மாதங்கள்',
+ y : 'ஒரு வருடம்',
+ yy : '%d ஆண்டுகள்'
},
-/* preparse: function (string) {
+ ordinalParse: /\d{1,2}வது/,
+ ordinal : function (number) {
+ return number + 'வது';
+ },
+ preparse: function (string) {
return string.replace(/[௧௨௩௪௫௬௭௮௯௦]/g, function (match) {
return numberMap[match];
});
@@ -81,27 +84,38 @@
return string.replace(/\d/g, function (match) {
return symbolMap[match];
});
- },*/
- ordinal : function (number) {
- return number + 'வது';
},
-
-
-// refer http://ta.wikipedia.org/s/1er1
-
+ // refer http://ta.wikipedia.org/s/1er1
+ meridiemParse: /யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,
meridiem : function (hour, minute, isLower) {
- if (hour >= 6 && hour <= 10) {
- return " காலை";
- } else if (hour >= 10 && hour <= 14) {
- return " நண்பகல்";
- } else if (hour >= 14 && hour <= 18) {
- return " எற்பாடு";
- } else if (hour >= 18 && hour <= 20) {
- return " மாலை";
- } else if (hour >= 20 && hour <= 24) {
- return " இரவு";
- } else if (hour >= 0 && hour <= 6) {
- return " வைகறை";
+ if (hour < 2) {
+ return ' யாமம்';
+ } else if (hour < 6) {
+ return ' வைகறை'; // வைகறை
+ } else if (hour < 10) {
+ return ' காலை'; // காலை
+ } else if (hour < 14) {
+ return ' நண்பகல்'; // நண்பகல்
+ } else if (hour < 18) {
+ return ' எற்பாடு'; // எற்பாடு
+ } else if (hour < 22) {
+ return ' மாலை'; // மாலை
+ } else {
+ return ' யாமம்';
+ }
+ },
+ meridiemHour : function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'யாமம்') {
+ return hour < 2 ? hour : hour + 12;
+ } else if (meridiem === 'வைகறை' || meridiem === 'காலை') {
+ return hour;
+ } else if (meridiem === 'நண்பகல்') {
+ return hour >= 10 ? hour : hour + 12;
+ } else {
+ return hour + 12;
}
},
week : {
@@ -109,4 +123,7 @@
doy : 6 // The week that contains Jan 1st is the first week of the year.
}
});
-}));
+
+ return ta;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/th.js b/rainloop/v/0.0.0/app/localization/moment/th.js
index 70336c87e..4d3c2784c 100644
--- a/rainloop/v/0.0.0/app/localization/moment/th.js
+++ b/rainloop/v/0.0.0/app/localization/moment/th.js
@@ -1,34 +1,40 @@
-// moment.js language configuration
-// language : thai (th)
-// author : Kridsada Thanabulpong : https://github.com/sirn
+//! moment.js locale configuration
+//! locale : Thai [th]
+//! author : Kridsada Thanabulpong : https://github.com/sirn
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
- return moment.lang('th', {
- months : "มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม".split("_"),
- monthsShort : "มกรา_กุมภา_มีนา_เมษา_พฤษภา_มิถุนา_กรกฎา_สิงหา_กันยา_ตุลา_พฤศจิกา_ธันวา".split("_"),
- weekdays : "อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์".split("_"),
- weekdaysShort : "อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์".split("_"), // yes, three characters difference
- weekdaysMin : "อา._จ._อ._พ._พฤ._ศ._ส.".split("_"),
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
+
+
+ var th = moment.defineLocale('th', {
+ months : 'มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม'.split('_'),
+ monthsShort : 'ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.'.split('_'),
+ monthsParseExact: true,
+ weekdays : 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์'.split('_'),
+ weekdaysShort : 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์'.split('_'), // yes, three characters difference
+ weekdaysMin : 'อา._จ._อ._พ._พฤ._ศ._ส.'.split('_'),
+ weekdaysParseExact : true,
longDateFormat : {
- LT : "H นาฬิกา m นาที",
- L : "YYYY/MM/DD",
- LL : "D MMMM YYYY",
- LLL : "D MMMM YYYY เวลา LT",
- LLLL : "วันddddที่ D MMMM YYYY เวลา LT"
+ LT : 'H นาฬิกา m นาที',
+ LTS : 'H นาฬิกา m นาที s วินาที',
+ L : 'YYYY/MM/DD',
+ LL : 'D MMMM YYYY',
+ LLL : 'D MMMM YYYY เวลา H นาฬิกา m นาที',
+ LLLL : 'วันddddที่ D MMMM YYYY เวลา H นาฬิกา m นาที'
+ },
+ meridiemParse: /ก่อนเที่ยง|หลังเที่ยง/,
+ isPM: function (input) {
+ return input === 'หลังเที่ยง';
},
meridiem : function (hour, minute, isLower) {
if (hour < 12) {
- return "ก่อนเที่ยง";
+ return 'ก่อนเที่ยง';
} else {
- return "หลังเที่ยง";
+ return 'หลังเที่ยง';
}
},
calendar : {
@@ -40,19 +46,22 @@
sameElse : 'L'
},
relativeTime : {
- future : "อีก %s",
- past : "%sที่แล้ว",
- s : "ไม่กี่วินาที",
- m : "1 นาที",
- mm : "%d นาที",
- h : "1 ชั่วโมง",
- hh : "%d ชั่วโมง",
- d : "1 วัน",
- dd : "%d วัน",
- M : "1 เดือน",
- MM : "%d เดือน",
- y : "1 ปี",
- yy : "%d ปี"
+ future : 'อีก %s',
+ past : '%sที่แล้ว',
+ s : 'ไม่กี่วินาที',
+ m : '1 นาที',
+ mm : '%d นาที',
+ h : '1 ชั่วโมง',
+ hh : '%d ชั่วโมง',
+ d : '1 วัน',
+ dd : '%d วัน',
+ M : '1 เดือน',
+ MM : '%d เดือน',
+ y : '1 ปี',
+ yy : '%d ปี'
}
});
-}));
+
+ return th;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/tl-ph.js b/rainloop/v/0.0.0/app/localization/moment/tl-ph.js
index 804448306..48d2dc869 100644
--- a/rainloop/v/0.0.0/app/localization/moment/tl-ph.js
+++ b/rainloop/v/0.0.0/app/localization/moment/tl-ph.js
@@ -1,31 +1,31 @@
-// moment.js language configuration
-// language : Tagalog/Filipino (tl-ph)
-// author : Dan Hagman
+//! moment.js locale configuration
+//! locale : Tagalog (Philippines) [tl-ph]
+//! author : Dan Hagman
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
- return moment.lang('tl-ph', {
- months : "Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre".split("_"),
- monthsShort : "Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis".split("_"),
- weekdays : "Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado".split("_"),
- weekdaysShort : "Lin_Lun_Mar_Miy_Huw_Biy_Sab".split("_"),
- weekdaysMin : "Li_Lu_Ma_Mi_Hu_Bi_Sab".split("_"),
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
+
+
+ var tl_ph = moment.defineLocale('tl-ph', {
+ months : 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split('_'),
+ monthsShort : 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'),
+ weekdays : 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split('_'),
+ weekdaysShort : 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'),
+ weekdaysMin : 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'),
longDateFormat : {
- LT : "HH:mm",
- L : "MM/D/YYYY",
- LL : "MMMM D, YYYY",
- LLL : "MMMM D, YYYY LT",
- LLLL : "dddd, MMMM DD, YYYY LT"
+ LT : 'HH:mm',
+ LTS : 'HH:mm:ss',
+ L : 'MM/D/YYYY',
+ LL : 'MMMM D, YYYY',
+ LLL : 'MMMM D, YYYY HH:mm',
+ LLLL : 'dddd, MMMM DD, YYYY HH:mm'
},
calendar : {
- sameDay: "[Ngayon sa] LT",
+ sameDay: '[Ngayon sa] LT',
nextDay: '[Bukas sa] LT',
nextWeek: 'dddd [sa] LT',
lastDay: '[Kahapon sa] LT',
@@ -33,20 +33,21 @@
sameElse: 'L'
},
relativeTime : {
- future : "sa loob ng %s",
- past : "%s ang nakalipas",
- s : "ilang segundo",
- m : "isang minuto",
- mm : "%d minuto",
- h : "isang oras",
- hh : "%d oras",
- d : "isang araw",
- dd : "%d araw",
- M : "isang buwan",
- MM : "%d buwan",
- y : "isang taon",
- yy : "%d taon"
+ future : 'sa loob ng %s',
+ past : '%s ang nakalipas',
+ s : 'ilang segundo',
+ m : 'isang minuto',
+ mm : '%d minuto',
+ h : 'isang oras',
+ hh : '%d oras',
+ d : 'isang araw',
+ dd : '%d araw',
+ M : 'isang buwan',
+ MM : '%d buwan',
+ y : 'isang taon',
+ yy : '%d taon'
},
+ ordinalParse: /\d{1,2}/,
ordinal : function (number) {
return number;
},
@@ -55,4 +56,7 @@
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
-}));
+
+ return tl_ph;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/tr.js b/rainloop/v/0.0.0/app/localization/moment/tr.js
index e90f250e5..c88ed7eed 100644
--- a/rainloop/v/0.0.0/app/localization/moment/tr.js
+++ b/rainloop/v/0.0.0/app/localization/moment/tr.js
@@ -1,56 +1,50 @@
-// moment.js language configuration
-// language : turkish (tr)
-// authors : Erhan Gundogan : https://github.com/erhangundogan,
-// Burak Yiğit Kaya: https://github.com/BYK
+//! moment.js locale configuration
+//! locale : Turkish [tr]
+//! authors : Erhan Gundogan : https://github.com/erhangundogan,
+//! Burak Yiğit Kaya: https://github.com/BYK
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
var suffixes = {
- 1: "'inci",
- 5: "'inci",
- 8: "'inci",
- 70: "'inci",
- 80: "'inci",
-
- 2: "'nci",
- 7: "'nci",
- 20: "'nci",
- 50: "'nci",
-
- 3: "'üncü",
- 4: "'üncü",
- 100: "'üncü",
-
- 6: "'ncı",
-
- 9: "'uncu",
- 10: "'uncu",
- 30: "'uncu",
-
- 60: "'ıncı",
- 90: "'ıncı"
+ 1: '\'inci',
+ 5: '\'inci',
+ 8: '\'inci',
+ 70: '\'inci',
+ 80: '\'inci',
+ 2: '\'nci',
+ 7: '\'nci',
+ 20: '\'nci',
+ 50: '\'nci',
+ 3: '\'üncü',
+ 4: '\'üncü',
+ 100: '\'üncü',
+ 6: '\'ncı',
+ 9: '\'uncu',
+ 10: '\'uncu',
+ 30: '\'uncu',
+ 60: '\'ıncı',
+ 90: '\'ıncı'
};
- return moment.lang('tr', {
- months : "Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık".split("_"),
- monthsShort : "Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara".split("_"),
- weekdays : "Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi".split("_"),
- weekdaysShort : "Paz_Pts_Sal_Çar_Per_Cum_Cts".split("_"),
- weekdaysMin : "Pz_Pt_Sa_Ça_Pe_Cu_Ct".split("_"),
+ var tr = moment.defineLocale('tr', {
+ months : 'Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık'.split('_'),
+ monthsShort : 'Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara'.split('_'),
+ weekdays : 'Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi'.split('_'),
+ weekdaysShort : 'Paz_Pts_Sal_Çar_Per_Cum_Cts'.split('_'),
+ weekdaysMin : 'Pz_Pt_Sa_Ça_Pe_Cu_Ct'.split('_'),
longDateFormat : {
- LT : "HH:mm",
- L : "DD.MM.YYYY",
- LL : "D MMMM YYYY",
- LLL : "D MMMM YYYY LT",
- LLLL : "dddd, D MMMM YYYY LT"
+ LT : 'HH:mm',
+ LTS : 'HH:mm:ss',
+ L : 'DD.MM.YYYY',
+ LL : 'D MMMM YYYY',
+ LLL : 'D MMMM YYYY HH:mm',
+ LLLL : 'dddd, D MMMM YYYY HH:mm'
},
calendar : {
sameDay : '[bugün saat] LT',
@@ -61,28 +55,28 @@
sameElse : 'L'
},
relativeTime : {
- future : "%s sonra",
- past : "%s önce",
- s : "birkaç saniye",
- m : "bir dakika",
- mm : "%d dakika",
- h : "bir saat",
- hh : "%d saat",
- d : "bir gün",
- dd : "%d gün",
- M : "bir ay",
- MM : "%d ay",
- y : "bir yıl",
- yy : "%d yıl"
+ future : '%s sonra',
+ past : '%s önce',
+ s : 'birkaç saniye',
+ m : 'bir dakika',
+ mm : '%d dakika',
+ h : 'bir saat',
+ hh : '%d saat',
+ d : 'bir gün',
+ dd : '%d gün',
+ M : 'bir ay',
+ MM : '%d ay',
+ y : 'bir yıl',
+ yy : '%d yıl'
},
+ ordinalParse: /\d{1,2}'(inci|nci|üncü|ncı|uncu|ıncı)/,
ordinal : function (number) {
if (number === 0) { // special case for zero
- return number + "'ıncı";
+ return number + '\'ıncı';
}
var a = number % 10,
b = number % 100 - a,
c = number >= 100 ? 100 : null;
-
return number + (suffixes[a] || suffixes[b] || suffixes[c]);
},
week : {
@@ -90,4 +84,7 @@
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
});
-}));
+
+ return tr;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/tzm-latn.js b/rainloop/v/0.0.0/app/localization/moment/tzm-latn.js
index f7e908977..ccf96b992 100644
--- a/rainloop/v/0.0.0/app/localization/moment/tzm-latn.js
+++ b/rainloop/v/0.0.0/app/localization/moment/tzm-latn.js
@@ -1,31 +1,31 @@
-// moment.js language configuration
-// language : Morocco Central Atlas Tamaziɣt in Latin (tzm-latn)
-// author : Abdel Said : https://github.com/abdelsaid
+//! moment.js locale configuration
+//! locale : Central Atlas Tamazight Latin [tzm-latn]
+//! author : Abdel Said : https://github.com/abdelsaid
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
- return moment.lang('tzm-latn', {
- months : "innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),
- monthsShort : "innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),
- weekdays : "asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),
- weekdaysShort : "asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),
- weekdaysMin : "asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
+
+
+ var tzm_latn = moment.defineLocale('tzm-latn', {
+ months : 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split('_'),
+ monthsShort : 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split('_'),
+ weekdays : 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),
+ weekdaysShort : 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),
+ weekdaysMin : 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),
longDateFormat : {
- LT : "HH:mm",
- L : "DD/MM/YYYY",
- LL : "D MMMM YYYY",
- LLL : "D MMMM YYYY LT",
- LLLL : "dddd D MMMM YYYY LT"
+ LT : 'HH:mm',
+ LTS : 'HH:mm:ss',
+ L : 'DD/MM/YYYY',
+ LL : 'D MMMM YYYY',
+ LLL : 'D MMMM YYYY HH:mm',
+ LLLL : 'dddd D MMMM YYYY HH:mm'
},
calendar : {
- sameDay: "[asdkh g] LT",
+ sameDay: '[asdkh g] LT',
nextDay: '[aska g] LT',
nextWeek: 'dddd [g] LT',
lastDay: '[assant g] LT',
@@ -33,23 +33,26 @@
sameElse: 'L'
},
relativeTime : {
- future : "dadkh s yan %s",
- past : "yan %s",
- s : "imik",
- m : "minuḍ",
- mm : "%d minuḍ",
- h : "saɛa",
- hh : "%d tassaɛin",
- d : "ass",
- dd : "%d ossan",
- M : "ayowr",
- MM : "%d iyyirn",
- y : "asgas",
- yy : "%d isgasn"
+ future : 'dadkh s yan %s',
+ past : 'yan %s',
+ s : 'imik',
+ m : 'minuḍ',
+ mm : '%d minuḍ',
+ h : 'saɛa',
+ hh : '%d tassaɛin',
+ d : 'ass',
+ dd : '%d ossan',
+ M : 'ayowr',
+ MM : '%d iyyirn',
+ y : 'asgas',
+ yy : '%d isgasn'
},
week : {
dow : 6, // Saturday is the first day of the week.
doy : 12 // The week that contains Jan 1st is the first week of the year.
}
});
-}));
+
+ return tzm_latn;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/tzm.js b/rainloop/v/0.0.0/app/localization/moment/tzm.js
index c7c76bdc6..71fb076ae 100644
--- a/rainloop/v/0.0.0/app/localization/moment/tzm.js
+++ b/rainloop/v/0.0.0/app/localization/moment/tzm.js
@@ -1,31 +1,31 @@
-// moment.js language configuration
-// language : Morocco Central Atlas Tamaziɣt (tzm)
-// author : Abdel Said : https://github.com/abdelsaid
+//! moment.js locale configuration
+//! locale : Central Atlas Tamazight [tzm]
+//! author : Abdel Said : https://github.com/abdelsaid
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
- return moment.lang('tzm', {
- months : "ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),
- monthsShort : "ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),
- weekdays : "ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),
- weekdaysShort : "ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),
- weekdaysMin : "ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
+
+
+ var tzm = moment.defineLocale('tzm', {
+ months : 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split('_'),
+ monthsShort : 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split('_'),
+ weekdays : 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),
+ weekdaysShort : 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),
+ weekdaysMin : 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),
longDateFormat : {
- LT : "HH:mm",
- L : "DD/MM/YYYY",
- LL : "D MMMM YYYY",
- LLL : "D MMMM YYYY LT",
- LLLL : "dddd D MMMM YYYY LT"
+ LT : 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L : 'DD/MM/YYYY',
+ LL : 'D MMMM YYYY',
+ LLL : 'D MMMM YYYY HH:mm',
+ LLLL : 'dddd D MMMM YYYY HH:mm'
},
calendar : {
- sameDay: "[ⴰⵙⴷⵅ ⴴ] LT",
+ sameDay: '[ⴰⵙⴷⵅ ⴴ] LT',
nextDay: '[ⴰⵙⴽⴰ ⴴ] LT',
nextWeek: 'dddd [ⴴ] LT',
lastDay: '[ⴰⵚⴰⵏⵜ ⴴ] LT',
@@ -33,23 +33,26 @@
sameElse: 'L'
},
relativeTime : {
- future : "ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s",
- past : "ⵢⴰⵏ %s",
- s : "ⵉⵎⵉⴽ",
- m : "ⵎⵉⵏⵓⴺ",
- mm : "%d ⵎⵉⵏⵓⴺ",
- h : "ⵙⴰⵄⴰ",
- hh : "%d ⵜⴰⵙⵙⴰⵄⵉⵏ",
- d : "ⴰⵙⵙ",
- dd : "%d oⵙⵙⴰⵏ",
- M : "ⴰⵢoⵓⵔ",
- MM : "%d ⵉⵢⵢⵉⵔⵏ",
- y : "ⴰⵙⴳⴰⵙ",
- yy : "%d ⵉⵙⴳⴰⵙⵏ"
+ future : 'ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s',
+ past : 'ⵢⴰⵏ %s',
+ s : 'ⵉⵎⵉⴽ',
+ m : 'ⵎⵉⵏⵓⴺ',
+ mm : '%d ⵎⵉⵏⵓⴺ',
+ h : 'ⵙⴰⵄⴰ',
+ hh : '%d ⵜⴰⵙⵙⴰⵄⵉⵏ',
+ d : 'ⴰⵙⵙ',
+ dd : '%d oⵙⵙⴰⵏ',
+ M : 'ⴰⵢoⵓⵔ',
+ MM : '%d ⵉⵢⵢⵉⵔⵏ',
+ y : 'ⴰⵙⴳⴰⵙ',
+ yy : '%d ⵉⵙⴳⴰⵙⵏ'
},
week : {
dow : 6, // Saturday is the first day of the week.
doy : 12 // The week that contains Jan 1st is the first week of the year.
}
});
-}));
+
+ return tzm;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/ua.js b/rainloop/v/0.0.0/app/localization/moment/ua.js
deleted file mode 100644
index 92536c9d2..000000000
--- a/rainloop/v/0.0.0/app/localization/moment/ua.js
+++ /dev/null
@@ -1,162 +0,0 @@
-// moment.js language configuration
-// language : ukrainian (ua)
-// author : Olexandr Loskutov : https://github.com/alex-connor
-
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
- function plural(word, num) {
- var forms = word.split('_');
- return num % 10 === 1 && num % 100 !== 11 ? forms[0] : (num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]);
- }
-
- function relativeTimeWithPlural(number, withoutSuffix, key) {
- var format = {
- 'mm': withoutSuffix ? 'хвилине_хвилини_хвилин' : 'хвилину_хвилини_хвилин',
- 'hh': 'годину_години_годин',
- 'dd': 'день_дня_днів',
- 'MM': 'місяць_місяці_місяців',
- 'yy': 'рік_року_років'
- };
- if (key === 'm') {
- return withoutSuffix ? 'хвилина' : 'хвилин';
- }
- else {
- return number + ' ' + plural(format[key], +number);
- }
- }
-
- function monthsCaseReplace(m, format) {
- var months = {
- 'nominative': 'січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листовад_грудень'.split('_'),
- 'accusative': 'січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня'.split('_')
- },
-
- nounCase = (/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/).test(format) ?
- 'accusative' :
- 'nominative';
-
- return months[nounCase][m.month()];
- }
-
- function monthsShortCaseReplace(m, format) {
- var monthsShort = {
- 'nominative': 'січ_лют_бер_кві_тра_чер_лип_сер_вер_жов_лис_гру'.split('_'),
- 'accusative': 'січ_лют_бер_кві_тра_чер_лип_сер_вер_жов_лис_гру'.split('_')
- },
-
- nounCase = (/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/).test(format) ?
- 'accusative' :
- 'nominative';
-
- return monthsShort[nounCase][m.month()];
- }
-
- function weekdaysCaseReplace(m, format) {
- var weekdays = {
- 'nominative': 'неділя_понеділок_вівторок_середа_четвер_п\'ятниця_субота'.split('_'),
- 'accusative': 'неділю_понеділок_вівторок_середу_четвер_п\'ятницю_суботу'.split('_')
- },
-
- nounCase = (/\[ ?[Вв] ?(?:попередню|наступну)? ?\] ?dddd/).test(format) ?
- 'accusative' :
- 'nominative';
-
- return weekdays[nounCase][m.day()];
- }
-
- return moment.lang('ua', {
- months : monthsCaseReplace,
- monthsShort : monthsShortCaseReplace,
- weekdays : weekdaysCaseReplace,
- weekdaysShort : "нд_пн_вт_ср_чт_пт_сб".split("_"),
- weekdaysMin : "нд_пн_вт_ср_чт_пт_сб".split("_"),
- monthsParse : [/^січ/i, /^лют/i, /^бер/i, /^кві/i, /^тра/i, /^чер/i, /^лип/i, /^сер/i, /^вер/i, /^жов/i, /^лис/i, /^гру/i],
- longDateFormat : {
- LT : "HH:mm",
- L : "DD.MM.YYYY",
- LL : "D MMMM YYYY г.",
- LLL : "D MMMM YYYY г., LT",
- LLLL : "dddd, D MMMM YYYY г., LT"
- },
- calendar : {
- sameDay: '[Сьогодні в] LT',
- nextDay: '[Завтра в] LT',
- lastDay: '[Вчора в] LT',
- nextWeek: function () {
- return this.day() === 2 ? '[Во] dddd [в] LT' : '[В] dddd [в] LT';
- },
- lastWeek: function () {
- switch (this.day()) {
- case 0:
- return '[В минуле] dddd [в] LT';
- case 1:
- case 2:
- case 4:
- return '[В минулий] dddd [в] LT';
- case 3:
- case 5:
- case 6:
- return '[В минулу] dddd [в] LT';
- }
- },
- sameElse: 'L'
- },
- relativeTime : {
- future : "через %s",
- past : "%s назад",
- s : "кілька секунд",
- m : relativeTimeWithPlural,
- mm : relativeTimeWithPlural,
- h : "година",
- hh : relativeTimeWithPlural,
- d : "день",
- dd : relativeTimeWithPlural,
- M : "місяць",
- MM : relativeTimeWithPlural,
- y : "рік",
- yy : relativeTimeWithPlural
- },
-
- // M. E.: those two are virtually unused but a user might want to implement them for his/her website for some reason
-
- meridiem : function (hour, minute, isLower) {
- if (hour < 4) {
- return "ночі";
- } else if (hour < 12) {
- return "ранку";
- } else if (hour < 17) {
- return "дня";
- } else {
- return "вечора";
- }
- },
-
- ordinal: function (number, period) {
- switch (period) {
- case 'M':
- case 'd':
- case 'DDD':
- return number + '-й';
- case 'D':
- return number + '-го';
- case 'w':
- case 'W':
- return number + '-я';
- default:
- return number;
- }
- },
-
- week : {
- dow : 1, // Monday is the first day of the week.
- doy : 7 // The week that contains Jan 1st is the first week of the year.
- }
- });
-}));
diff --git a/rainloop/v/0.0.0/app/localization/moment/uk.js b/rainloop/v/0.0.0/app/localization/moment/uk.js
index 47056cb64..91ec18bf7 100644
--- a/rainloop/v/0.0.0/app/localization/moment/uk.js
+++ b/rainloop/v/0.0.0/app/localization/moment/uk.js
@@ -1,26 +1,24 @@
-// moment.js language configuration
-// language : ukrainian (uk)
-// author : zemlanin : https://github.com/zemlanin
-// Author : Menelion Elensúle : https://github.com/Oire
+//! moment.js locale configuration
+//! locale : Ukrainian [uk]
+//! author : zemlanin : https://github.com/zemlanin
+//! Author : Menelion Elensúle : https://github.com/Oire
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
+
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
function plural(word, num) {
var forms = word.split('_');
return num % 10 === 1 && num % 100 !== 11 ? forms[0] : (num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]);
}
-
function relativeTimeWithPlural(number, withoutSuffix, key) {
var format = {
- 'mm': 'хвилина_хвилини_хвилин',
- 'hh': 'година_години_годин',
+ 'mm': withoutSuffix ? 'хвилина_хвилини_хвилин' : 'хвилину_хвилини_хвилин',
+ 'hh': withoutSuffix ? 'година_години_годин' : 'годину_години_годин',
'dd': 'день_дні_днів',
'MM': 'місяць_місяці_місяців',
'yy': 'рік_роки_років'
@@ -35,54 +33,41 @@
return number + ' ' + plural(format[key], +number);
}
}
-
- function monthsCaseReplace(m, format) {
- var months = {
- 'nominative': 'січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень'.split('_'),
- 'accusative': 'січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня'.split('_')
- },
-
- nounCase = (/D[oD]? *MMMM?/).test(format) ?
- 'accusative' :
- 'nominative';
-
- return months[nounCase][m.month()];
- }
-
function weekdaysCaseReplace(m, format) {
var weekdays = {
'nominative': 'неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота'.split('_'),
'accusative': 'неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу'.split('_'),
'genitive': 'неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи'.split('_')
},
-
nounCase = (/(\[[ВвУу]\]) ?dddd/).test(format) ?
'accusative' :
((/\[?(?:минулої|наступної)? ?\] ?dddd/).test(format) ?
'genitive' :
'nominative');
-
return weekdays[nounCase][m.day()];
}
-
function processHoursFunction(str) {
return function () {
return str + 'о' + (this.hours() === 11 ? 'б' : '') + '] LT';
};
}
- return moment.lang('uk', {
- months : monthsCaseReplace,
- monthsShort : "січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд".split("_"),
+ var uk = moment.defineLocale('uk', {
+ months : {
+ 'format': 'січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня'.split('_'),
+ 'standalone': 'січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень'.split('_')
+ },
+ monthsShort : 'січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд'.split('_'),
weekdays : weekdaysCaseReplace,
- weekdaysShort : "нд_пн_вт_ср_чт_пт_сб".split("_"),
- weekdaysMin : "нд_пн_вт_ср_чт_пт_сб".split("_"),
+ weekdaysShort : 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
+ weekdaysMin : 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
longDateFormat : {
- LT : "HH:mm",
- L : "DD.MM.YYYY",
- LL : "D MMMM YYYY р.",
- LLL : "D MMMM YYYY р., LT",
- LLLL : "dddd, D MMMM YYYY р., LT"
+ LT : 'HH:mm',
+ LTS : 'HH:mm:ss',
+ L : 'DD.MM.YYYY',
+ LL : 'D MMMM YYYY р.',
+ LLL : 'D MMMM YYYY р., HH:mm',
+ LLLL : 'dddd, D MMMM YYYY р., HH:mm'
},
calendar : {
sameDay: processHoursFunction('[Сьогодні '),
@@ -91,67 +76,71 @@
nextWeek: processHoursFunction('[У] dddd ['),
lastWeek: function () {
switch (this.day()) {
- case 0:
- case 3:
- case 5:
- case 6:
- return processHoursFunction('[Минулої] dddd [').call(this);
- case 1:
- case 2:
- case 4:
- return processHoursFunction('[Минулого] dddd [').call(this);
+ case 0:
+ case 3:
+ case 5:
+ case 6:
+ return processHoursFunction('[Минулої] dddd [').call(this);
+ case 1:
+ case 2:
+ case 4:
+ return processHoursFunction('[Минулого] dddd [').call(this);
}
},
sameElse: 'L'
},
relativeTime : {
- future : "за %s",
- past : "%s тому",
- s : "декілька секунд",
+ future : 'за %s',
+ past : '%s тому',
+ s : 'декілька секунд',
m : relativeTimeWithPlural,
mm : relativeTimeWithPlural,
- h : "годину",
+ h : 'годину',
hh : relativeTimeWithPlural,
- d : "день",
+ d : 'день',
dd : relativeTimeWithPlural,
- M : "місяць",
+ M : 'місяць',
MM : relativeTimeWithPlural,
- y : "рік",
+ y : 'рік',
yy : relativeTimeWithPlural
},
-
// M. E.: those two are virtually unused but a user might want to implement them for his/her website for some reason
-
+ meridiemParse: /ночі|ранку|дня|вечора/,
+ isPM: function (input) {
+ return /^(дня|вечора)$/.test(input);
+ },
meridiem : function (hour, minute, isLower) {
if (hour < 4) {
- return "ночі";
+ return 'ночі';
} else if (hour < 12) {
- return "ранку";
+ return 'ранку';
} else if (hour < 17) {
- return "дня";
+ return 'дня';
} else {
- return "вечора";
+ return 'вечора';
}
},
-
+ ordinalParse: /\d{1,2}-(й|го)/,
ordinal: function (number, period) {
switch (period) {
- case 'M':
- case 'd':
- case 'DDD':
- case 'w':
- case 'W':
- return number + '-й';
- case 'D':
- return number + '-го';
- default:
- return number;
+ case 'M':
+ case 'd':
+ case 'DDD':
+ case 'w':
+ case 'W':
+ return number + '-й';
+ case 'D':
+ return number + '-го';
+ default:
+ return number;
}
},
-
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
});
-}));
+
+ return uk;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/uz.js b/rainloop/v/0.0.0/app/localization/moment/uz.js
index a5b06fa9f..3fccde184 100644
--- a/rainloop/v/0.0.0/app/localization/moment/uz.js
+++ b/rainloop/v/0.0.0/app/localization/moment/uz.js
@@ -1,28 +1,28 @@
-// moment.js language configuration
-// language : uzbek
-// author : Sardor Muminov : https://github.com/muminoff
+//! moment.js locale configuration
+//! locale : Uzbek [uz]
+//! author : Sardor Muminov : https://github.com/muminoff
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
- return moment.lang('uz', {
- months : "январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),
- monthsShort : "янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),
- weekdays : "Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба".split("_"),
- weekdaysShort : "Якш_Душ_Сеш_Чор_Пай_Жум_Шан".split("_"),
- weekdaysMin : "Як_Ду_Се_Чо_Па_Жу_Ша".split("_"),
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
+
+
+ var uz = moment.defineLocale('uz', {
+ months : 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split('_'),
+ monthsShort : 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'),
+ weekdays : 'Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба'.split('_'),
+ weekdaysShort : 'Якш_Душ_Сеш_Чор_Пай_Жум_Шан'.split('_'),
+ weekdaysMin : 'Як_Ду_Се_Чо_Па_Жу_Ша'.split('_'),
longDateFormat : {
- LT : "HH:mm",
- L : "DD/MM/YYYY",
- LL : "D MMMM YYYY",
- LLL : "D MMMM YYYY LT",
- LLLL : "D MMMM YYYY, dddd LT"
+ LT : 'HH:mm',
+ LTS : 'HH:mm:ss',
+ L : 'DD/MM/YYYY',
+ LL : 'D MMMM YYYY',
+ LLL : 'D MMMM YYYY HH:mm',
+ LLLL : 'D MMMM YYYY, dddd HH:mm'
},
calendar : {
sameDay : '[Бугун соат] LT [да]',
@@ -33,23 +33,26 @@
sameElse : 'L'
},
relativeTime : {
- future : "Якин %s ичида",
- past : "Бир неча %s олдин",
- s : "фурсат",
- m : "бир дакика",
- mm : "%d дакика",
- h : "бир соат",
- hh : "%d соат",
- d : "бир кун",
- dd : "%d кун",
- M : "бир ой",
- MM : "%d ой",
- y : "бир йил",
- yy : "%d йил"
+ future : 'Якин %s ичида',
+ past : 'Бир неча %s олдин',
+ s : 'фурсат',
+ m : 'бир дакика',
+ mm : '%d дакика',
+ h : 'бир соат',
+ hh : '%d соат',
+ d : 'бир кун',
+ dd : '%d кун',
+ M : 'бир ой',
+ MM : '%d ой',
+ y : 'бир йил',
+ yy : '%d йил'
},
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 4th is the first week of the year.
}
});
-}));
+
+ return uz;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/vi.js b/rainloop/v/0.0.0/app/localization/moment/vi.js
index 94890b03d..ba207e93e 100644
--- a/rainloop/v/0.0.0/app/localization/moment/vi.js
+++ b/rainloop/v/0.0.0/app/localization/moment/vi.js
@@ -1,35 +1,48 @@
-// moment.js language configuration
-// language : vietnamese (vi)
-// author : Bang Nguyen : https://github.com/bangnk
+//! moment.js locale configuration
+//! locale : Vietnamese [vi]
+//! author : Bang Nguyen : https://github.com/bangnk
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
- return moment.lang('vi', {
- months : "tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12".split("_"),
- monthsShort : "Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12".split("_"),
- weekdays : "chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy".split("_"),
- weekdaysShort : "CN_T2_T3_T4_T5_T6_T7".split("_"),
- weekdaysMin : "CN_T2_T3_T4_T5_T6_T7".split("_"),
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
+
+
+ var vi = moment.defineLocale('vi', {
+ months : 'tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12'.split('_'),
+ monthsShort : 'Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12'.split('_'),
+ monthsParseExact : true,
+ weekdays : 'chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy'.split('_'),
+ weekdaysShort : 'CN_T2_T3_T4_T5_T6_T7'.split('_'),
+ weekdaysMin : 'CN_T2_T3_T4_T5_T6_T7'.split('_'),
+ weekdaysParseExact : true,
+ meridiemParse: /sa|ch/i,
+ isPM : function (input) {
+ return /^ch$/i.test(input);
+ },
+ meridiem : function (hours, minutes, isLower) {
+ if (hours < 12) {
+ return isLower ? 'sa' : 'SA';
+ } else {
+ return isLower ? 'ch' : 'CH';
+ }
+ },
longDateFormat : {
- LT : "HH:mm",
- L : "DD/MM/YYYY",
- LL : "D MMMM [năm] YYYY",
- LLL : "D MMMM [năm] YYYY LT",
- LLLL : "dddd, D MMMM [năm] YYYY LT",
- l : "DD/M/YYYY",
- ll : "D MMM YYYY",
- lll : "D MMM YYYY LT",
- llll : "ddd, D MMM YYYY LT"
+ LT : 'HH:mm',
+ LTS : 'HH:mm:ss',
+ L : 'DD/MM/YYYY',
+ LL : 'D MMMM [năm] YYYY',
+ LLL : 'D MMMM [năm] YYYY HH:mm',
+ LLLL : 'dddd, D MMMM [năm] YYYY HH:mm',
+ l : 'DD/M/YYYY',
+ ll : 'D MMM YYYY',
+ lll : 'D MMM YYYY HH:mm',
+ llll : 'ddd, D MMM YYYY HH:mm'
},
calendar : {
- sameDay: "[Hôm nay lúc] LT",
+ sameDay: '[Hôm nay lúc] LT',
nextDay: '[Ngày mai lúc] LT',
nextWeek: 'dddd [tuần tới lúc] LT',
lastDay: '[Hôm qua lúc] LT',
@@ -37,20 +50,21 @@
sameElse: 'L'
},
relativeTime : {
- future : "%s tới",
- past : "%s trước",
- s : "vài giây",
- m : "một phút",
- mm : "%d phút",
- h : "một giờ",
- hh : "%d giờ",
- d : "một ngày",
- dd : "%d ngày",
- M : "một tháng",
- MM : "%d tháng",
- y : "một năm",
- yy : "%d năm"
+ future : '%s tới',
+ past : '%s trước',
+ s : 'vài giây',
+ m : 'một phút',
+ mm : '%d phút',
+ h : 'một giờ',
+ hh : '%d giờ',
+ d : 'một ngày',
+ dd : '%d ngày',
+ M : 'một tháng',
+ MM : '%d tháng',
+ y : 'một năm',
+ yy : '%d năm'
},
+ ordinalParse: /\d{1,2}/,
ordinal : function (number) {
return number;
},
@@ -59,4 +73,7 @@
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
-}));
+
+ return vi;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/zh-cn.js b/rainloop/v/0.0.0/app/localization/moment/zh-cn.js
index 50a3ed93f..cee6160fb 100644
--- a/rainloop/v/0.0.0/app/localization/moment/zh-cn.js
+++ b/rainloop/v/0.0.0/app/localization/moment/zh-cn.js
@@ -1,103 +1,119 @@
-// moment.js language configuration
-// language : chinese
-// author : suupic : https://github.com/suupic
-// author : Zeno Zeng : https://github.com/zenozeng
+//! moment.js locale configuration
+//! locale : Chinese (China) [zh-cn]
+//! author : suupic : https://github.com/suupic
+//! author : Zeno Zeng : https://github.com/zenozeng
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
- return moment.lang('zh-cn', {
- months : "一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),
- monthsShort : "1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),
- weekdays : "星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),
- weekdaysShort : "周日_周一_周二_周三_周四_周五_周六".split("_"),
- weekdaysMin : "日_一_二_三_四_五_六".split("_"),
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
+
+
+ var zh_cn = moment.defineLocale('zh-cn', {
+ months : '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'),
+ monthsShort : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
+ weekdays : '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
+ weekdaysShort : '周日_周一_周二_周三_周四_周五_周六'.split('_'),
+ weekdaysMin : '日_一_二_三_四_五_六'.split('_'),
longDateFormat : {
- LT : "Ah点mm",
- L : "YYYY-MM-DD",
- LL : "YYYY年MMMD日",
- LLL : "YYYY年MMMD日LT",
- LLLL : "YYYY年MMMD日ddddLT",
- l : "YYYY-MM-DD",
- ll : "YYYY年MMMD日",
- lll : "YYYY年MMMD日LT",
- llll : "YYYY年MMMD日ddddLT"
+ LT : 'Ah点mm分',
+ LTS : 'Ah点m分s秒',
+ L : 'YYYY-MM-DD',
+ LL : 'YYYY年MMMD日',
+ LLL : 'YYYY年MMMD日Ah点mm分',
+ LLLL : 'YYYY年MMMD日ddddAh点mm分',
+ l : 'YYYY-MM-DD',
+ ll : 'YYYY年MMMD日',
+ lll : 'YYYY年MMMD日Ah点mm分',
+ llll : 'YYYY年MMMD日ddddAh点mm分'
+ },
+ meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === '凌晨' || meridiem === '早上' ||
+ meridiem === '上午') {
+ return hour;
+ } else if (meridiem === '下午' || meridiem === '晚上') {
+ return hour + 12;
+ } else {
+ // '中午'
+ return hour >= 11 ? hour : hour + 12;
+ }
},
meridiem : function (hour, minute, isLower) {
var hm = hour * 100 + minute;
if (hm < 600) {
- return "凌晨";
+ return '凌晨';
} else if (hm < 900) {
- return "早上";
+ return '早上';
} else if (hm < 1130) {
- return "上午";
+ return '上午';
} else if (hm < 1230) {
- return "中午";
+ return '中午';
} else if (hm < 1800) {
- return "下午";
+ return '下午';
} else {
- return "晚上";
+ return '晚上';
}
},
calendar : {
sameDay : function () {
- return this.minutes() === 0 ? "[今天]Ah[点整]" : "[今天]LT";
+ return this.minutes() === 0 ? '[今天]Ah[点整]' : '[今天]LT';
},
nextDay : function () {
- return this.minutes() === 0 ? "[明天]Ah[点整]" : "[明天]LT";
+ return this.minutes() === 0 ? '[明天]Ah[点整]' : '[明天]LT';
},
lastDay : function () {
- return this.minutes() === 0 ? "[昨天]Ah[点整]" : "[昨天]LT";
+ return this.minutes() === 0 ? '[昨天]Ah[点整]' : '[昨天]LT';
},
nextWeek : function () {
var startOfWeek, prefix;
startOfWeek = moment().startOf('week');
- prefix = this.unix() - startOfWeek.unix() >= 7 * 24 * 3600 ? '[下]' : '[本]';
- return this.minutes() === 0 ? prefix + "dddAh点整" : prefix + "dddAh点mm";
+ prefix = this.diff(startOfWeek, 'days') >= 7 ? '[下]' : '[本]';
+ return this.minutes() === 0 ? prefix + 'dddAh点整' : prefix + 'dddAh点mm';
},
lastWeek : function () {
var startOfWeek, prefix;
startOfWeek = moment().startOf('week');
prefix = this.unix() < startOfWeek.unix() ? '[上]' : '[本]';
- return this.minutes() === 0 ? prefix + "dddAh点整" : prefix + "dddAh点mm";
+ return this.minutes() === 0 ? prefix + 'dddAh点整' : prefix + 'dddAh点mm';
},
sameElse : 'LL'
},
+ ordinalParse: /\d{1,2}(日|月|周)/,
ordinal : function (number, period) {
switch (period) {
- case "d":
- case "D":
- case "DDD":
- return number + "日";
- case "M":
- return number + "月";
- case "w":
- case "W":
- return number + "周";
- default:
- return number;
+ case 'd':
+ case 'D':
+ case 'DDD':
+ return number + '日';
+ case 'M':
+ return number + '月';
+ case 'w':
+ case 'W':
+ return number + '周';
+ default:
+ return number;
}
},
relativeTime : {
- future : "%s内",
- past : "%s前",
- s : "几秒",
- m : "1分钟",
- mm : "%d分钟",
- h : "1小时",
- hh : "%d小时",
- d : "1天",
- dd : "%d天",
- M : "1个月",
- MM : "%d个月",
- y : "1年",
- yy : "%d年"
+ future : '%s内',
+ past : '%s前',
+ s : '几秒',
+ m : '1 分钟',
+ mm : '%d 分钟',
+ h : '1 小时',
+ hh : '%d 小时',
+ d : '1 天',
+ dd : '%d 天',
+ M : '1 个月',
+ MM : '%d 个月',
+ y : '1 年',
+ yy : '%d 年'
},
week : {
// GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效
@@ -105,4 +121,7 @@
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
-}));
+
+ return zh_cn;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/localization/moment/zh-tw.js b/rainloop/v/0.0.0/app/localization/moment/zh-tw.js
index bbb07376e..c6766c8b6 100644
--- a/rainloop/v/0.0.0/app/localization/moment/zh-tw.js
+++ b/rainloop/v/0.0.0/app/localization/moment/zh-tw.js
@@ -1,45 +1,61 @@
-// moment.js language configuration
-// language : traditional chinese (zh-tw)
-// author : Ben : https://github.com/ben-lin
+//! moment.js locale configuration
+//! locale : Chinese (Taiwan) [zh-tw]
+//! author : Ben : https://github.com/ben-lin
+//! author : Chris Lam : https://github.com/hehachris
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
- return moment.lang('zh-tw', {
- months : "一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),
- monthsShort : "1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),
- weekdays : "星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),
- weekdaysShort : "週日_週一_週二_週三_週四_週五_週六".split("_"),
- weekdaysMin : "日_一_二_三_四_五_六".split("_"),
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
+
+
+ var zh_tw = moment.defineLocale('zh-tw', {
+ months : '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'),
+ monthsShort : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
+ weekdays : '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
+ weekdaysShort : '週日_週一_週二_週三_週四_週五_週六'.split('_'),
+ weekdaysMin : '日_一_二_三_四_五_六'.split('_'),
longDateFormat : {
- LT : "Ah點mm",
- L : "YYYY年MMMD日",
- LL : "YYYY年MMMD日",
- LLL : "YYYY年MMMD日LT",
- LLLL : "YYYY年MMMD日ddddLT",
- l : "YYYY年MMMD日",
- ll : "YYYY年MMMD日",
- lll : "YYYY年MMMD日LT",
- llll : "YYYY年MMMD日ddddLT"
+ LT : 'Ah點mm分',
+ LTS : 'Ah點m分s秒',
+ L : 'YYYY年MMMD日',
+ LL : 'YYYY年MMMD日',
+ LLL : 'YYYY年MMMD日Ah點mm分',
+ LLLL : 'YYYY年MMMD日ddddAh點mm分',
+ l : 'YYYY年MMMD日',
+ ll : 'YYYY年MMMD日',
+ lll : 'YYYY年MMMD日Ah點mm分',
+ llll : 'YYYY年MMMD日ddddAh點mm分'
+ },
+ meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
+ meridiemHour : function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {
+ return hour;
+ } else if (meridiem === '中午') {
+ return hour >= 11 ? hour : hour + 12;
+ } else if (meridiem === '下午' || meridiem === '晚上') {
+ return hour + 12;
+ }
},
meridiem : function (hour, minute, isLower) {
var hm = hour * 100 + minute;
- if (hm < 900) {
- return "早上";
+ if (hm < 600) {
+ return '凌晨';
+ } else if (hm < 900) {
+ return '早上';
} else if (hm < 1130) {
- return "上午";
+ return '上午';
} else if (hm < 1230) {
- return "中午";
+ return '中午';
} else if (hm < 1800) {
- return "下午";
+ return '下午';
} else {
- return "晚上";
+ return '晚上';
}
},
calendar : {
@@ -50,35 +66,39 @@
lastWeek : '[上]ddddLT',
sameElse : 'L'
},
+ ordinalParse: /\d{1,2}(日|月|週)/,
ordinal : function (number, period) {
switch (period) {
- case "d" :
- case "D" :
- case "DDD" :
- return number + "日";
- case "M" :
- return number + "月";
- case "w" :
- case "W" :
- return number + "週";
- default :
- return number;
+ case 'd' :
+ case 'D' :
+ case 'DDD' :
+ return number + '日';
+ case 'M' :
+ return number + '月';
+ case 'w' :
+ case 'W' :
+ return number + '週';
+ default :
+ return number;
}
},
relativeTime : {
- future : "%s內",
- past : "%s前",
- s : "幾秒",
- m : "一分鐘",
- mm : "%d分鐘",
- h : "一小時",
- hh : "%d小時",
- d : "一天",
- dd : "%d天",
- M : "一個月",
- MM : "%d個月",
- y : "一年",
- yy : "%d年"
+ future : '%s內',
+ past : '%s前',
+ s : '幾秒',
+ m : '1 分鐘',
+ mm : '%d 分鐘',
+ h : '1 小時',
+ hh : '%d 小時',
+ d : '1 天',
+ dd : '%d 天',
+ M : '1 個月',
+ MM : '%d 個月',
+ y : '1 年',
+ yy : '%d 年'
}
});
-}));
+
+ return zh_tw;
+
+}));
\ No newline at end of file
diff --git a/rainloop/v/0.0.0/app/templates/Views/Common/PopupsLanguages.html b/rainloop/v/0.0.0/app/templates/Views/Common/PopupsLanguages.html
index 4e365ef2d..03e3297ba 100644
--- a/rainloop/v/0.0.0/app/templates/Views/Common/PopupsLanguages.html
+++ b/rainloop/v/0.0.0/app/templates/Views/Common/PopupsLanguages.html
@@ -1,23 +1,22 @@
-